feat: getAssetEdits respond with edit IDs (#26445)

* feat: getAssetEdits respond with edit IDs

* chore: cleanup typings for edit API

* chore: cleanup types with jason

* fix: openapi sync

* fix: factory
This commit is contained in:
Brandon Wees
2026-02-23 14:57:57 -06:00
committed by GitHub
parent f616de5af8
commit e5722c525b
24 changed files with 462 additions and 549 deletions

View File

@@ -887,15 +887,16 @@ describe(AssetService.name, () => {
await ctx.newExif({ assetId: asset.id, exifImageHeight: 42, exifImageWidth: 69, orientation: '1' });
const editAction = { action: AssetEditAction.Rotate, parameters: { angle: 90 } } as const;
const editResponse = { ...editAction, id: expect.any(String) };
await expect(sut.editAsset(auth, asset.id, { edits: [editAction] })).resolves.toEqual({
assetId: asset.id,
edits: [editAction],
edits: [editResponse],
});
await expect(ctx.get(AssetRepository).getById(asset.id)).resolves.toEqual(
expect.objectContaining({ isEdited: true }),
);
await expect(ctx.get(AssetEditRepository).getAll(asset.id)).resolves.toEqual([editAction]);
await expect(ctx.get(AssetEditRepository).getAll(asset.id)).resolves.toEqual([editResponse]);
});
});
});