feat: sync assets, partner assets, exif, and partner exif ()

* feat: sync assets, partner assets, exif, and partner exif

Co-authored-by: Zack Pollard <zack@futo.org>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>

* refactor: remove duplicate where clause and orderBy statements in sync queries

* fix: asset deletes not filtering by ownerId

---------

Co-authored-by: Zack Pollard <zack@futo.org>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This commit is contained in:
Jason Rasmussen 2025-03-10 12:05:39 -04:00 committed by GitHub
parent e97df503f2
commit a96bba4b26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 2037 additions and 46 deletions

View file

@ -12049,12 +12049,228 @@
],
"type": "object"
},
"SyncAssetDeleteV1": {
"properties": {
"assetId": {
"type": "string"
}
},
"required": [
"assetId"
],
"type": "object"
},
"SyncAssetExifV1": {
"properties": {
"assetId": {
"type": "string"
},
"city": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"dateTimeOriginal": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"description": {
"nullable": true,
"type": "string"
},
"exifImageHeight": {
"nullable": true,
"type": "integer"
},
"exifImageWidth": {
"nullable": true,
"type": "integer"
},
"exposureTime": {
"nullable": true,
"type": "string"
},
"fNumber": {
"nullable": true,
"type": "integer"
},
"fileSizeInByte": {
"nullable": true,
"type": "integer"
},
"focalLength": {
"nullable": true,
"type": "integer"
},
"fps": {
"nullable": true,
"type": "integer"
},
"iso": {
"nullable": true,
"type": "integer"
},
"latitude": {
"nullable": true,
"type": "integer"
},
"lensModel": {
"nullable": true,
"type": "string"
},
"longitude": {
"nullable": true,
"type": "integer"
},
"make": {
"nullable": true,
"type": "string"
},
"model": {
"nullable": true,
"type": "string"
},
"modifyDate": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"orientation": {
"nullable": true,
"type": "string"
},
"profileDescription": {
"nullable": true,
"type": "string"
},
"projectionType": {
"nullable": true,
"type": "string"
},
"rating": {
"nullable": true,
"type": "integer"
},
"state": {
"nullable": true,
"type": "string"
},
"timeZone": {
"nullable": true,
"type": "string"
}
},
"required": [
"assetId",
"city",
"country",
"dateTimeOriginal",
"description",
"exifImageHeight",
"exifImageWidth",
"exposureTime",
"fNumber",
"fileSizeInByte",
"focalLength",
"fps",
"iso",
"latitude",
"lensModel",
"longitude",
"make",
"model",
"modifyDate",
"orientation",
"profileDescription",
"projectionType",
"rating",
"state",
"timeZone"
],
"type": "object"
},
"SyncAssetV1": {
"properties": {
"checksum": {
"type": "string"
},
"deletedAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"fileCreatedAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"fileModifiedAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"id": {
"type": "string"
},
"isFavorite": {
"type": "boolean"
},
"isVisible": {
"type": "boolean"
},
"localDateTime": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"ownerId": {
"type": "string"
},
"thumbhash": {
"nullable": true,
"type": "string"
},
"type": {
"enum": [
"IMAGE",
"VIDEO",
"AUDIO",
"OTHER"
],
"type": "string"
}
},
"required": [
"checksum",
"deletedAt",
"fileCreatedAt",
"fileModifiedAt",
"id",
"isFavorite",
"isVisible",
"localDateTime",
"ownerId",
"thumbhash",
"type"
],
"type": "object"
},
"SyncEntityType": {
"enum": [
"UserV1",
"UserDeleteV1",
"PartnerV1",
"PartnerDeleteV1"
"PartnerDeleteV1",
"AssetV1",
"AssetDeleteV1",
"AssetExifV1",
"PartnerAssetV1",
"PartnerAssetDeleteV1",
"PartnerAssetExifV1"
],
"type": "string"
},
@ -12095,7 +12311,11 @@
"SyncRequestType": {
"enum": [
"UsersV1",
"PartnersV1"
"PartnersV1",
"AssetsV1",
"AssetExifsV1",
"PartnerAssetsV1",
"PartnerAssetExifsV1"
],
"type": "string"
},

View file

@ -3647,11 +3647,21 @@ export enum SyncEntityType {
UserV1 = "UserV1",
UserDeleteV1 = "UserDeleteV1",
PartnerV1 = "PartnerV1",
PartnerDeleteV1 = "PartnerDeleteV1"
PartnerDeleteV1 = "PartnerDeleteV1",
AssetV1 = "AssetV1",
AssetDeleteV1 = "AssetDeleteV1",
AssetExifV1 = "AssetExifV1",
PartnerAssetV1 = "PartnerAssetV1",
PartnerAssetDeleteV1 = "PartnerAssetDeleteV1",
PartnerAssetExifV1 = "PartnerAssetExifV1"
}
export enum SyncRequestType {
UsersV1 = "UsersV1",
PartnersV1 = "PartnersV1"
PartnersV1 = "PartnersV1",
AssetsV1 = "AssetsV1",
AssetExifsV1 = "AssetExifsV1",
PartnerAssetsV1 = "PartnerAssetsV1",
PartnerAssetExifsV1 = "PartnerAssetExifsV1"
}
export enum TranscodeHWAccel {
Nvenc = "nvenc",