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

@ -6024,6 +6024,56 @@
"tags": [
"Sessions"
]
},
"put": {
"operationId": "updateSession",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionUpdateDto"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Sessions"
]
}
},
"/sessions/{id}/lock": {
@ -12790,6 +12840,9 @@
"id": {
"type": "string"
},
"isPendingSyncReset": {
"type": "boolean"
},
"token": {
"type": "string"
},
@ -12803,6 +12856,7 @@
"deviceOS",
"deviceType",
"id",
"isPendingSyncReset",
"token",
"updatedAt"
],
@ -12828,6 +12882,9 @@
"id": {
"type": "string"
},
"isPendingSyncReset": {
"type": "boolean"
},
"updatedAt": {
"type": "string"
}
@ -12838,6 +12895,7 @@
"deviceOS",
"deviceType",
"id",
"isPendingSyncReset",
"updatedAt"
],
"type": "object"
@ -12854,6 +12912,14 @@
},
"type": "object"
},
"SessionUpdateDto": {
"properties": {
"isPendingSyncReset": {
"type": "boolean"
}
},
"type": "object"
},
"SharedLinkCreateDto": {
"properties": {
"albumId": {
@ -13836,7 +13902,8 @@
"StackDeleteV1",
"PersonV1",
"PersonDeleteV1",
"SyncAckV1"
"SyncAckV1",
"SyncResetV1"
],
"type": "string"
},
@ -14074,6 +14141,10 @@
],
"type": "string"
},
"SyncResetV1": {
"properties": {},
"type": "object"
},
"SyncStackDeleteV1": {
"properties": {
"stackId": {
@ -14116,6 +14187,9 @@
},
"SyncStreamDto": {
"properties": {
"reset": {
"type": "boolean"
},
"types": {
"items": {
"$ref": "#/components/schemas/SyncRequestType"

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",