mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-01 02:17:43 +09:00 
			
		
		
		
	feat: sync implementation for the user entity (#16234)
* ci: print out typeorm generation changes * feat: sync implementation for the user entity wip --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
		| @@ -1104,6 +1104,16 @@ export type StackCreateDto = { | ||||
| export type StackUpdateDto = { | ||||
|     primaryAssetId?: string; | ||||
| }; | ||||
| export type SyncAckDeleteDto = { | ||||
|     types?: SyncEntityType[]; | ||||
| }; | ||||
| export type SyncAckDto = { | ||||
|     ack: string; | ||||
|     "type": SyncEntityType; | ||||
| }; | ||||
| export type SyncAckSetDto = { | ||||
|     acks: string[]; | ||||
| }; | ||||
| export type AssetDeltaSyncDto = { | ||||
|     updatedAfter: string; | ||||
|     userIds: string[]; | ||||
| @@ -1119,6 +1129,9 @@ export type AssetFullSyncDto = { | ||||
|     updatedUntil: string; | ||||
|     userId?: string; | ||||
| }; | ||||
| export type SyncStreamDto = { | ||||
|     types: SyncRequestType[]; | ||||
| }; | ||||
| export type DatabaseBackupConfig = { | ||||
|     cronExpression: string; | ||||
|     enabled: boolean; | ||||
| @@ -2912,6 +2925,32 @@ export function updateStack({ id, stackUpdateDto }: { | ||||
|         body: stackUpdateDto | ||||
|     }))); | ||||
| } | ||||
| export function deleteSyncAck({ syncAckDeleteDto }: { | ||||
|     syncAckDeleteDto: SyncAckDeleteDto; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchText("/sync/ack", oazapfts.json({ | ||||
|         ...opts, | ||||
|         method: "DELETE", | ||||
|         body: syncAckDeleteDto | ||||
|     }))); | ||||
| } | ||||
| export function getSyncAck(opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchJson<{ | ||||
|         status: 200; | ||||
|         data: SyncAckDto[]; | ||||
|     }>("/sync/ack", { | ||||
|         ...opts | ||||
|     })); | ||||
| } | ||||
| export function sendSyncAck({ syncAckSetDto }: { | ||||
|     syncAckSetDto: SyncAckSetDto; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchText("/sync/ack", oazapfts.json({ | ||||
|         ...opts, | ||||
|         method: "POST", | ||||
|         body: syncAckSetDto | ||||
|     }))); | ||||
| } | ||||
| export function getDeltaSync({ assetDeltaSyncDto }: { | ||||
|     assetDeltaSyncDto: AssetDeltaSyncDto; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
| @@ -2936,6 +2975,15 @@ export function getFullSyncForUser({ assetFullSyncDto }: { | ||||
|         body: assetFullSyncDto | ||||
|     }))); | ||||
| } | ||||
| export function getSyncStream({ syncStreamDto }: { | ||||
|     syncStreamDto: SyncStreamDto; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchText("/sync/stream", oazapfts.json({ | ||||
|         ...opts, | ||||
|         method: "POST", | ||||
|         body: syncStreamDto | ||||
|     }))); | ||||
| } | ||||
| export function getConfig(opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchJson<{ | ||||
|         status: 200; | ||||
| @@ -3548,6 +3596,13 @@ export enum Error2 { | ||||
|     NoPermission = "no_permission", | ||||
|     NotFound = "not_found" | ||||
| } | ||||
| export enum SyncEntityType { | ||||
|     UserV1 = "UserV1", | ||||
|     UserDeleteV1 = "UserDeleteV1" | ||||
| } | ||||
| export enum SyncRequestType { | ||||
|     UsersV1 = "UsersV1" | ||||
| } | ||||
| export enum TranscodeHWAccel { | ||||
|     Nvenc = "nvenc", | ||||
|     Qsv = "qsv", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user