@immich/sdk 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 22.20.0
1
+ 24.11.0
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Immich
3
- * 2.1.0
3
+ * 2.2.0
4
4
  * DO NOT MODIFY - This file has been generated using oazapfts.
5
5
  * See https://www.npmjs.com/package/oazapfts
6
6
  */
@@ -66,6 +66,7 @@ export type SystemConfigSmtpTransportDto = {
66
66
  ignoreCert: boolean;
67
67
  password: string;
68
68
  port: number;
69
+ secure: boolean;
69
70
  username: string;
70
71
  };
71
72
  export type SystemConfigSmtpDto = {
@@ -238,6 +239,17 @@ export type UserPreferencesUpdateDto = {
238
239
  sharedLinks?: SharedLinksUpdate;
239
240
  tags?: TagsUpdate;
240
241
  };
242
+ export type SessionResponseDto = {
243
+ appVersion: string | null;
244
+ createdAt: string;
245
+ current: boolean;
246
+ deviceOS: string;
247
+ deviceType: string;
248
+ expiresAt?: string;
249
+ id: string;
250
+ isPendingSyncReset: boolean;
251
+ updatedAt: string;
252
+ };
241
253
  export type AssetStatsResponseDto = {
242
254
  images: number;
243
255
  total: number;
@@ -351,12 +363,17 @@ export type AssetResponseDto = {
351
363
  updatedAt: string;
352
364
  visibility: AssetVisibility;
353
365
  };
366
+ export type ContributorCountResponseDto = {
367
+ assetCount: number;
368
+ userId: string;
369
+ };
354
370
  export type AlbumResponseDto = {
355
371
  albumName: string;
356
372
  albumThumbnailAssetId: string | null;
357
373
  albumUsers: AlbumUserResponseDto[];
358
374
  assetCount: number;
359
375
  assets: AssetResponseDto[];
376
+ contributorCounts?: ContributorCountResponseDto[];
360
377
  createdAt: string;
361
378
  description: string;
362
379
  endDate?: string;
@@ -495,6 +512,15 @@ export type AssetBulkUploadCheckResult = {
495
512
  export type AssetBulkUploadCheckResponseDto = {
496
513
  results: AssetBulkUploadCheckResult[];
497
514
  };
515
+ export type AssetCopyDto = {
516
+ albums?: boolean;
517
+ favorite?: boolean;
518
+ sharedLinks?: boolean;
519
+ sidecar?: boolean;
520
+ sourceId: string;
521
+ stack?: boolean;
522
+ targetId: string;
523
+ };
498
524
  export type CheckExistingAssetsDto = {
499
525
  deviceAssetIds: string[];
500
526
  deviceId: string;
@@ -524,6 +550,32 @@ export type AssetMetadataResponseDto = {
524
550
  export type AssetMetadataUpsertDto = {
525
551
  items: AssetMetadataUpsertItemDto[];
526
552
  };
553
+ export type AssetOcrResponseDto = {
554
+ assetId: string;
555
+ /** Confidence score for text detection box */
556
+ boxScore: number;
557
+ id: string;
558
+ /** Recognized text */
559
+ text: string;
560
+ /** Confidence score for text recognition */
561
+ textScore: number;
562
+ /** Normalized x coordinate of box corner 1 (0-1) */
563
+ x1: number;
564
+ /** Normalized x coordinate of box corner 2 (0-1) */
565
+ x2: number;
566
+ /** Normalized x coordinate of box corner 3 (0-1) */
567
+ x3: number;
568
+ /** Normalized x coordinate of box corner 4 (0-1) */
569
+ x4: number;
570
+ /** Normalized y coordinate of box corner 1 (0-1) */
571
+ y1: number;
572
+ /** Normalized y coordinate of box corner 2 (0-1) */
573
+ y2: number;
574
+ /** Normalized y coordinate of box corner 3 (0-1) */
575
+ y3: number;
576
+ /** Normalized y coordinate of box corner 4 (0-1) */
577
+ y4: number;
578
+ };
527
579
  export type AssetMediaReplaceDto = {
528
580
  assetData: Blob;
529
581
  deviceAssetId: string;
@@ -539,6 +591,7 @@ export type SignUpDto = {
539
591
  password: string;
540
592
  };
541
593
  export type ChangePasswordDto = {
594
+ invalidateSessions?: boolean;
542
595
  newPassword: string;
543
596
  password: string;
544
597
  };
@@ -673,6 +726,7 @@ export type AllJobStatusResponseDto = {
673
726
  metadataExtraction: JobStatusDto;
674
727
  migration: JobStatusDto;
675
728
  notifications: JobStatusDto;
729
+ ocr: JobStatusDto;
676
730
  search: JobStatusDto;
677
731
  sidecar: JobStatusDto;
678
732
  smartSearch: JobStatusDto;
@@ -903,6 +957,7 @@ export type MetadataSearchDto = {
903
957
  libraryId?: string | null;
904
958
  make?: string;
905
959
  model?: string | null;
960
+ ocr?: string;
906
961
  order?: AssetOrder;
907
962
  originalFileName?: string;
908
963
  originalPath?: string;
@@ -975,6 +1030,7 @@ export type RandomSearchDto = {
975
1030
  libraryId?: string | null;
976
1031
  make?: string;
977
1032
  model?: string | null;
1033
+ ocr?: string;
978
1034
  personIds?: string[];
979
1035
  rating?: number;
980
1036
  size?: number;
@@ -1010,6 +1066,7 @@ export type SmartSearchDto = {
1010
1066
  libraryId?: string | null;
1011
1067
  make?: string;
1012
1068
  model?: string | null;
1069
+ ocr?: string;
1013
1070
  page?: number;
1014
1071
  personIds?: string[];
1015
1072
  query?: string;
@@ -1046,6 +1103,7 @@ export type StatisticsSearchDto = {
1046
1103
  libraryId?: string | null;
1047
1104
  make?: string;
1048
1105
  model?: string | null;
1106
+ ocr?: string;
1049
1107
  personIds?: string[];
1050
1108
  rating?: number;
1051
1109
  state?: string | null;
@@ -1112,6 +1170,7 @@ export type ServerFeaturesDto = {
1112
1170
  map: boolean;
1113
1171
  oauth: boolean;
1114
1172
  oauthAutoLaunch: boolean;
1173
+ ocr: boolean;
1115
1174
  passwordLogin: boolean;
1116
1175
  reverseGeocoding: boolean;
1117
1176
  search: boolean;
@@ -1181,16 +1240,6 @@ export type ServerVersionHistoryResponseDto = {
1181
1240
  id: string;
1182
1241
  version: string;
1183
1242
  };
1184
- export type SessionResponseDto = {
1185
- createdAt: string;
1186
- current: boolean;
1187
- deviceOS: string;
1188
- deviceType: string;
1189
- expiresAt?: string;
1190
- id: string;
1191
- isPendingSyncReset: boolean;
1192
- updatedAt: string;
1193
- };
1194
1243
  export type SessionCreateDto = {
1195
1244
  deviceOS?: string;
1196
1245
  deviceType?: string;
@@ -1198,6 +1247,7 @@ export type SessionCreateDto = {
1198
1247
  duration?: number;
1199
1248
  };
1200
1249
  export type SessionCreateResponseDto = {
1250
+ appVersion: string | null;
1201
1251
  createdAt: string;
1202
1252
  current: boolean;
1203
1253
  deviceOS: string;
@@ -1357,6 +1407,7 @@ export type SystemConfigJobDto = {
1357
1407
  metadataExtraction: JobSettingsDto;
1358
1408
  migration: JobSettingsDto;
1359
1409
  notifications: JobSettingsDto;
1410
+ ocr: JobSettingsDto;
1360
1411
  search: JobSettingsDto;
1361
1412
  sidecar: JobSettingsDto;
1362
1413
  smartSearch: JobSettingsDto;
@@ -1398,12 +1449,20 @@ export type FacialRecognitionConfig = {
1398
1449
  minScore: number;
1399
1450
  modelName: string;
1400
1451
  };
1452
+ export type OcrConfig = {
1453
+ enabled: boolean;
1454
+ maxResolution: number;
1455
+ minDetectionScore: number;
1456
+ minRecognitionScore: number;
1457
+ modelName: string;
1458
+ };
1401
1459
  export type SystemConfigMachineLearningDto = {
1402
1460
  availabilityChecks: MachineLearningAvailabilityChecksDto;
1403
1461
  clip: ClipConfig;
1404
1462
  duplicateDetection: DuplicateDetectionConfig;
1405
1463
  enabled: boolean;
1406
1464
  facialRecognition: FacialRecognitionConfig;
1465
+ ocr: OcrConfig;
1407
1466
  urls: string[];
1408
1467
  };
1409
1468
  export type SystemConfigMapDto = {
@@ -1705,6 +1764,12 @@ export declare function updateUserPreferencesAdmin({ id, userPreferencesUpdateDt
1705
1764
  export declare function restoreUserAdmin({ id }: {
1706
1765
  id: string;
1707
1766
  }, opts?: Oazapfts.RequestOpts): Promise<UserAdminResponseDto>;
1767
+ /**
1768
+ * This endpoint is an admin-only route, and requires the `adminSession.read` permission.
1769
+ */
1770
+ export declare function getUserSessionsAdmin({ id }: {
1771
+ id: string;
1772
+ }, opts?: Oazapfts.RequestOpts): Promise<SessionResponseDto[]>;
1708
1773
  /**
1709
1774
  * This endpoint is an admin-only route, and requires the `adminUser.read` permission.
1710
1775
  */
@@ -1856,6 +1921,12 @@ export declare function updateAssets({ assetBulkUpdateDto }: {
1856
1921
  export declare function checkBulkUpload({ assetBulkUploadCheckDto }: {
1857
1922
  assetBulkUploadCheckDto: AssetBulkUploadCheckDto;
1858
1923
  }, opts?: Oazapfts.RequestOpts): Promise<AssetBulkUploadCheckResponseDto>;
1924
+ /**
1925
+ * This endpoint requires the `asset.copy` permission.
1926
+ */
1927
+ export declare function copyAsset({ assetCopyDto }: {
1928
+ assetCopyDto: AssetCopyDto;
1929
+ }, opts?: Oazapfts.RequestOpts): Promise<never>;
1859
1930
  /**
1860
1931
  * getAllUserAssetsByDeviceId
1861
1932
  */
@@ -1927,6 +1998,12 @@ export declare function getAssetMetadataByKey({ id, key }: {
1927
1998
  id: string;
1928
1999
  key: AssetMetadataKey;
1929
2000
  }, opts?: Oazapfts.RequestOpts): Promise<AssetMetadataResponseDto>;
2001
+ /**
2002
+ * This endpoint requires the `asset.read` permission.
2003
+ */
2004
+ export declare function getAssetOcr({ id }: {
2005
+ id: string;
2006
+ }, opts?: Oazapfts.RequestOpts): Promise<AssetOcrResponseDto[]>;
1930
2007
  /**
1931
2008
  * This endpoint requires the `asset.download` permission.
1932
2009
  */
@@ -2353,7 +2430,7 @@ export declare function getExploreData(opts?: Oazapfts.RequestOpts): Promise<Sea
2353
2430
  /**
2354
2431
  * This endpoint requires the `asset.read` permission.
2355
2432
  */
2356
- export declare function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: {
2433
+ export declare function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: {
2357
2434
  albumIds?: string[];
2358
2435
  city?: string | null;
2359
2436
  country?: string | null;
@@ -2370,6 +2447,7 @@ export declare function searchLargeAssets({ albumIds, city, country, createdAfte
2370
2447
  make?: string;
2371
2448
  minFileSize?: number;
2372
2449
  model?: string | null;
2450
+ ocr?: string;
2373
2451
  personIds?: string[];
2374
2452
  rating?: number;
2375
2453
  size?: number;
@@ -2426,9 +2504,10 @@ export declare function searchAssetStatistics({ statisticsSearchDto }: {
2426
2504
  /**
2427
2505
  * This endpoint requires the `asset.read` permission.
2428
2506
  */
2429
- export declare function getSearchSuggestions({ country, includeNull, make, model, state, $type }: {
2507
+ export declare function getSearchSuggestions({ country, includeNull, lensModel, make, model, state, $type }: {
2430
2508
  country?: string;
2431
2509
  includeNull?: boolean;
2510
+ lensModel?: string;
2432
2511
  make?: string;
2433
2512
  model?: string;
2434
2513
  state?: string;
@@ -2945,6 +3024,7 @@ export declare enum Permission {
2945
3024
  AssetDownload = "asset.download",
2946
3025
  AssetUpload = "asset.upload",
2947
3026
  AssetReplace = "asset.replace",
3027
+ AssetCopy = "asset.copy",
2948
3028
  AlbumCreate = "album.create",
2949
3029
  AlbumRead = "album.read",
2950
3030
  AlbumUpdate = "album.update",
@@ -3053,6 +3133,7 @@ export declare enum Permission {
3053
3133
  AdminUserRead = "adminUser.read",
3054
3134
  AdminUserUpdate = "adminUser.update",
3055
3135
  AdminUserDelete = "adminUser.delete",
3136
+ AdminSessionRead = "adminSession.read",
3056
3137
  AdminAuthUnlinkAll = "adminAuth.unlinkAll"
3057
3138
  }
3058
3139
  export declare enum AssetMetadataKey {
@@ -3105,7 +3186,8 @@ export declare enum JobName {
3105
3186
  Sidecar = "sidecar",
3106
3187
  Library = "library",
3107
3188
  Notifications = "notifications",
3108
- BackupDatabase = "backupDatabase"
3189
+ BackupDatabase = "backupDatabase",
3190
+ Ocr = "ocr"
3109
3191
  }
3110
3192
  export declare enum JobCommand {
3111
3193
  Start = "start",
@@ -3126,7 +3208,8 @@ export declare enum SearchSuggestionType {
3126
3208
  State = "state",
3127
3209
  City = "city",
3128
3210
  CameraMake = "camera-make",
3129
- CameraModel = "camera-model"
3211
+ CameraModel = "camera-model",
3212
+ CameraLensModel = "camera-lens-model"
3130
3213
  }
3131
3214
  export declare enum SharedLinkType {
3132
3215
  Album = "ALBUM",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Immich
3
- * 2.1.0
3
+ * 2.2.0
4
4
  * DO NOT MODIFY - This file has been generated using oazapfts.
5
5
  * See https://www.npmjs.com/package/oazapfts
6
6
  */
@@ -164,6 +164,14 @@ export function restoreUserAdmin({ id }, opts) {
164
164
  method: "POST"
165
165
  }));
166
166
  }
167
+ /**
168
+ * This endpoint is an admin-only route, and requires the `adminSession.read` permission.
169
+ */
170
+ export function getUserSessionsAdmin({ id }, opts) {
171
+ return oazapfts.ok(oazapfts.fetchJson(`/admin/users/${encodeURIComponent(id)}/sessions`, {
172
+ ...opts
173
+ }));
174
+ }
167
175
  /**
168
176
  * This endpoint is an admin-only route, and requires the `adminUser.read` permission.
169
177
  */
@@ -397,6 +405,16 @@ export function checkBulkUpload({ assetBulkUploadCheckDto }, opts) {
397
405
  body: assetBulkUploadCheckDto
398
406
  })));
399
407
  }
408
+ /**
409
+ * This endpoint requires the `asset.copy` permission.
410
+ */
411
+ export function copyAsset({ assetCopyDto }, opts) {
412
+ return oazapfts.ok(oazapfts.fetchText("/assets/copy", oazapfts.json({
413
+ ...opts,
414
+ method: "PUT",
415
+ body: assetCopyDto
416
+ })));
417
+ }
400
418
  /**
401
419
  * getAllUserAssetsByDeviceId
402
420
  */
@@ -500,6 +518,14 @@ export function getAssetMetadataByKey({ id, key }, opts) {
500
518
  ...opts
501
519
  }));
502
520
  }
521
+ /**
522
+ * This endpoint requires the `asset.read` permission.
523
+ */
524
+ export function getAssetOcr({ id }, opts) {
525
+ return oazapfts.ok(oazapfts.fetchJson(`/assets/${encodeURIComponent(id)}/ocr`, {
526
+ ...opts
527
+ }));
528
+ }
503
529
  /**
504
530
  * This endpoint requires the `asset.download` permission.
505
531
  */
@@ -1190,7 +1216,7 @@ export function getExploreData(opts) {
1190
1216
  /**
1191
1217
  * This endpoint requires the `asset.read` permission.
1192
1218
  */
1193
- export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }, opts) {
1219
+ export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }, opts) {
1194
1220
  return oazapfts.ok(oazapfts.fetchJson(`/search/large-assets${QS.query(QS.explode({
1195
1221
  albumIds,
1196
1222
  city,
@@ -1208,6 +1234,7 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat
1208
1234
  make,
1209
1235
  minFileSize,
1210
1236
  model,
1237
+ ocr,
1211
1238
  personIds,
1212
1239
  rating,
1213
1240
  size,
@@ -1292,10 +1319,11 @@ export function searchAssetStatistics({ statisticsSearchDto }, opts) {
1292
1319
  /**
1293
1320
  * This endpoint requires the `asset.read` permission.
1294
1321
  */
1295
- export function getSearchSuggestions({ country, includeNull, make, model, state, $type }, opts) {
1322
+ export function getSearchSuggestions({ country, includeNull, lensModel, make, model, state, $type }, opts) {
1296
1323
  return oazapfts.ok(oazapfts.fetchJson(`/search/suggestions${QS.query(QS.explode({
1297
1324
  country,
1298
1325
  includeNull,
1326
+ lensModel,
1299
1327
  make,
1300
1328
  model,
1301
1329
  state,
@@ -2137,6 +2165,7 @@ export var Permission;
2137
2165
  Permission["AssetDownload"] = "asset.download";
2138
2166
  Permission["AssetUpload"] = "asset.upload";
2139
2167
  Permission["AssetReplace"] = "asset.replace";
2168
+ Permission["AssetCopy"] = "asset.copy";
2140
2169
  Permission["AlbumCreate"] = "album.create";
2141
2170
  Permission["AlbumRead"] = "album.read";
2142
2171
  Permission["AlbumUpdate"] = "album.update";
@@ -2245,6 +2274,7 @@ export var Permission;
2245
2274
  Permission["AdminUserRead"] = "adminUser.read";
2246
2275
  Permission["AdminUserUpdate"] = "adminUser.update";
2247
2276
  Permission["AdminUserDelete"] = "adminUser.delete";
2277
+ Permission["AdminSessionRead"] = "adminSession.read";
2248
2278
  Permission["AdminAuthUnlinkAll"] = "adminAuth.unlinkAll";
2249
2279
  })(Permission || (Permission = {}));
2250
2280
  export var AssetMetadataKey;
@@ -2306,6 +2336,7 @@ export var JobName;
2306
2336
  JobName["Library"] = "library";
2307
2337
  JobName["Notifications"] = "notifications";
2308
2338
  JobName["BackupDatabase"] = "backupDatabase";
2339
+ JobName["Ocr"] = "ocr";
2309
2340
  })(JobName || (JobName = {}));
2310
2341
  export var JobCommand;
2311
2342
  (function (JobCommand) {
@@ -2331,6 +2362,7 @@ export var SearchSuggestionType;
2331
2362
  SearchSuggestionType["City"] = "city";
2332
2363
  SearchSuggestionType["CameraMake"] = "camera-make";
2333
2364
  SearchSuggestionType["CameraModel"] = "camera-model";
2365
+ SearchSuggestionType["CameraLensModel"] = "camera-lens-model";
2334
2366
  })(SearchSuggestionType || (SearchSuggestionType = {}));
2335
2367
  export var SharedLinkType;
2336
2368
  (function (SharedLinkType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immich/sdk",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Auto-generated TypeScript SDK for the Immich API",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -16,7 +16,7 @@
16
16
  "@oazapfts/runtime": "^1.0.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^22.18.8",
19
+ "@types/node": "^22.18.12",
20
20
  "typescript": "^5.3.3"
21
21
  },
22
22
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "directory": "open-api/typescript-sdk"
26
26
  },
27
27
  "volta": {
28
- "node": "22.20.0"
28
+ "node": "24.11.0"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsc"