From 2689178a355f9f513ab36fe6c0f389eaf95555b3 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 17 May 2024 12:05:23 -0500 Subject: [PATCH] chore(server): openapi generation for Duplicate controller (#9560) --- mobile/openapi/.openapi-generator/FILES | 3 ++ mobile/openapi/README.md | Bin 26937 -> 27045 bytes mobile/openapi/doc/DuplicateApi.md | Bin 0 -> 2121 bytes mobile/openapi/lib/api.dart | Bin 9624 -> 9655 bytes mobile/openapi/lib/api/duplicate_api.dart | Bin 0 -> 1912 bytes mobile/openapi/test/duplicate_api_test.dart | Bin 0 -> 598 bytes open-api/immich-openapi-specs.json | 35 ++++++++++++++++++++ open-api/typescript-sdk/src/fetch-client.ts | 8 +++++ server/src/controllers/index.ts | 2 ++ 9 files changed, 48 insertions(+) create mode 100644 mobile/openapi/doc/DuplicateApi.md create mode 100644 mobile/openapi/lib/api/duplicate_api.dart create mode 100644 mobile/openapi/test/duplicate_api_test.dart diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILES index 222e6c1111..ae72e70d5b 100644 --- a/mobile/openapi/.openapi-generator/FILES +++ b/mobile/openapi/.openapi-generator/FILES @@ -68,6 +68,7 @@ doc/DownloadApi.md doc/DownloadArchiveInfo.md doc/DownloadInfoDto.md doc/DownloadResponseDto.md +doc/DuplicateApi.md doc/DuplicateDetectionConfig.md doc/EntityType.md doc/ExifResponseDto.md @@ -224,6 +225,7 @@ lib/api/asset_api.dart lib/api/audit_api.dart lib/api/authentication_api.dart lib/api/download_api.dart +lib/api/duplicate_api.dart lib/api/face_api.dart lib/api/file_report_api.dart lib/api/job_api.dart @@ -503,6 +505,7 @@ test/download_api_test.dart test/download_archive_info_test.dart test/download_info_dto_test.dart test/download_response_dto_test.dart +test/duplicate_api_test.dart test/duplicate_detection_config_test.dart test/entity_type_test.dart test/exif_response_dto_test.dart diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index b5a49aa26c262a05649ec26289543cbeb0dbc853..3cce4635ccaaaf0bbe857ba2fd73e065143714c1 100644 GIT binary patch delta 118 zcmdmaiE-&=#tltU=`N)OIho0cC8>@DnOX`p3ej3x>8T}-#l@*5aH(P~tyqne{A7K7 oxDZgaUT%sqP-!AaX$s7gVojhKT3YU|AzE4r`Uv68wNiWh07}~{VE_OC delta 18 acmZ2_nQ`YO#tltUlg*_0Hvf@Y=?4H%LI?x^ diff --git a/mobile/openapi/doc/DuplicateApi.md b/mobile/openapi/doc/DuplicateApi.md new file mode 100644 index 0000000000000000000000000000000000000000..4dfbe55d3dee920341c5a538c11321a8b17f0d62 GIT binary patch literal 2121 zcmd5-+in{-5Pj!Y44?v9Eut0LM>jQ~NNN%|jtyCU2wcNvc1IHH70Hs^#A@n)@8NQ7 z%SsBkmxl@vBn}Vfa%OngBV$=htBUxYHnvu!3_P|Riwf+eh0foA5dw`jbbqxRlJl<9Z>J2R;)u2GXfTW zW2*sviM=D5Ft-OLr)&hCWL6u=o+JyGnlhj*0BptL!Iyi@PI89+|Sw!jn zwv@q8g(R?&kyK5s)r6M4b^J_apG-=ThgW{7t=iY)#ITP7ZTxURLkR8=wG8ijfJg1o#j&Zlex{R6#6CHl K$lMDLM*alEAH=8t literal 0 HcmV?d00001 diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index 917959d84b6fbcad7f27d2ef00e445b1ae4413db..69be2f8a9506b33b54a81a355247a9ee343f41b2 100644 GIT binary patch delta 26 icmbQ?z1@4m9cIpy(t@1K!nF>|_ delta 12 Ucmdn)J;Qs$9p=rynfE9H04Wa!0{{R3 diff --git a/mobile/openapi/lib/api/duplicate_api.dart b/mobile/openapi/lib/api/duplicate_api.dart new file mode 100644 index 0000000000000000000000000000000000000000..2833d091e9a6051baa703fd33aaa5633eb7625ab GIT binary patch literal 1912 zcmah~-;dHj5Pt7pG5R2oU{T|PIqyI`IK4!V^TZf)xzxRO3ae$e?oLHC_rE*4OG`1R z4?uT2KfmvrVK9gW0~mjp&mO*-UQDmX^XUZ6&fiS?Fqy%{Yz}W{lk>Ar_t?x?zQ}~3 zlPB@xXOTO~h0+F-T$?191s*}ADvMcy1+Gw0zdp-VsSO?U5XD+-Y*JQ~82naA!|qC~ z_`4K_e+iA{;Km+yPqnfn6eTj_gff?Cyt_S^tdI(AQfRecGg=CjJbRR+OJQsjaXJE> zgDz2tQpWsw9z{`F2y09ap~*B(-9j3=C3b zlm%KMTwkFr885tvIoVmoZ}7Oj8^Qu{q3`(v{N5i&DB>m2=%$$SADlDzrJY~8B04| zm9&8osH!Mfr+aVxv<1JO!{p9&v6agkY3bO@q!!ME^l)@YJ%1=BkY%w?o z<+x5`FE@m?vF&*z92SmHR{zH(@`N$9D@_O%&381-v?&d@90JxnKx`BWcFX0-qo;jX zv;9&q?n)Cc0+$dZxta8l$K2=_lI z{893xU^4@zp^M*# z&S436+o|q;cC-$cq~6lt3Coa2H((VUHbATT=CC2_^qt$!-dzUPxlZ zxpVJK6p<)`_$AM7pVC8mjPo>s?QWk=A<5v7#-C9j3l zNGqvn#T#6J6V6~svB4IFonC9+Dyi+Df;FG)Y^ZXUYJ7KGd%0k(zZKK|wWy76uFbH# zkiu9dEajy) byZ0F&d!r8S!UusLAkUJl6JPqU;kl4+4}Zos literal 0 HcmV?d00001 diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index f59bc7a0ad..7fbf5f8302 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -2221,6 +2221,41 @@ ] } }, + "/duplicates": { + "get": { + "operationId": "getAssetDuplicates", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AssetResponseDto" + }, + "type": "array" + } + } + }, + "description": "" + } + }, + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + }, + { + "api_key": [] + } + ], + "tags": [ + "Duplicate" + ] + } + }, "/face": { "get": { "operationId": "getFaces", diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 996f69de83..92396c360f 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1695,6 +1695,14 @@ export function getDownloadInfo({ key, downloadInfoDto }: { body: downloadInfoDto }))); } +export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchJson<{ + status: 200; + data: AssetResponseDto[]; + }>("/duplicates", { + ...opts + })); +} export function getFaces({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { diff --git a/server/src/controllers/index.ts b/server/src/controllers/index.ts index df1a44a157..feec616f21 100644 --- a/server/src/controllers/index.ts +++ b/server/src/controllers/index.ts @@ -7,6 +7,7 @@ import { AssetController } from 'src/controllers/asset.controller'; import { AuditController } from 'src/controllers/audit.controller'; import { AuthController } from 'src/controllers/auth.controller'; import { DownloadController } from 'src/controllers/download.controller'; +import { DuplicateController } from 'src/controllers/duplicate.controller'; import { FaceController } from 'src/controllers/face.controller'; import { ReportController } from 'src/controllers/file-report.controller'; import { JobController } from 'src/controllers/job.controller'; @@ -37,6 +38,7 @@ export const controllers = [ AuditController, AuthController, DownloadController, + DuplicateController, FaceController, JobController, LibraryController,