mirror of
https://github.com/immich-app/immich.git
synced 2026-03-23 12:09:55 +03:00
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:
@@ -8,7 +8,7 @@ import {
|
||||
Table,
|
||||
Unique,
|
||||
} from '@immich/sql-tools';
|
||||
import { AssetEditAction, AssetEditActionParameter } from 'src/dtos/editing.dto';
|
||||
import { AssetEditAction, AssetEditParameters } from 'src/dtos/editing.dto';
|
||||
import { asset_edit_delete, asset_edit_insert } from 'src/schema/functions';
|
||||
import { AssetTable } from 'src/schema/tables/asset.table';
|
||||
|
||||
@@ -21,7 +21,7 @@ import { AssetTable } from 'src/schema/tables/asset.table';
|
||||
when: 'pg_trigger_depth() = 0',
|
||||
})
|
||||
@Unique({ columns: ['assetId', 'sequence'] })
|
||||
export class AssetEditTable<T extends AssetEditAction = AssetEditAction> {
|
||||
export class AssetEditTable {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: Generated<string>;
|
||||
|
||||
@@ -29,10 +29,10 @@ export class AssetEditTable<T extends AssetEditAction = AssetEditAction> {
|
||||
assetId!: string;
|
||||
|
||||
@Column()
|
||||
action!: T;
|
||||
action!: AssetEditAction;
|
||||
|
||||
@Column({ type: 'jsonb' })
|
||||
parameters!: AssetEditActionParameter[T];
|
||||
parameters!: AssetEditParameters;
|
||||
|
||||
@Column({ type: 'integer' })
|
||||
sequence!: number;
|
||||
|
||||
Reference in New Issue
Block a user