1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-07 23:03:36 +02:00

feat: pending sync reset flag (#19861)

This commit is contained in:
Jason Rasmussen
2025-07-11 09:38:02 -04:00
committed by GitHub
parent 34f0f6c813
commit 4b3a4725c6
28 changed files with 499 additions and 27 deletions

View File

@ -1164,6 +1164,7 @@ export type SessionResponseDto = {
deviceType: string;
expiresAt?: string;
id: string;
isPendingSyncReset: boolean;
updatedAt: string;
};
export type SessionCreateDto = {
@ -1179,9 +1180,13 @@ export type SessionCreateResponseDto = {
deviceType: string;
expiresAt?: string;
id: string;
isPendingSyncReset: boolean;
token: string;
updatedAt: string;
};
export type SessionUpdateDto = {
isPendingSyncReset?: boolean;
};
export type SharedLinkResponseDto = {
album?: AlbumResponseDto;
allowDownload: boolean;
@ -1264,6 +1269,7 @@ export type AssetFullSyncDto = {
userId?: string;
};
export type SyncStreamDto = {
reset?: boolean;
types: SyncRequestType[];
};
export type DatabaseBackupConfig = {
@ -3170,6 +3176,19 @@ export function deleteSession({ id }: {
method: "DELETE"
}));
}
export function updateSession({ id, sessionUpdateDto }: {
id: string;
sessionUpdateDto: SessionUpdateDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: SessionResponseDto;
}>(`/sessions/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PUT",
body: sessionUpdateDto
})));
}
export function lockSession({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
@ -4097,7 +4116,8 @@ export enum SyncEntityType {
StackDeleteV1 = "StackDeleteV1",
PersonV1 = "PersonV1",
PersonDeleteV1 = "PersonDeleteV1",
SyncAckV1 = "SyncAckV1"
SyncAckV1 = "SyncAckV1",
SyncResetV1 = "SyncResetV1"
}
export enum SyncRequestType {
AlbumsV1 = "AlbumsV1",