chore(server): openapi generation (#9585)

This commit is contained in:
Alex
2024-05-18 13:50:28 -05:00
committed by GitHub
parent 60427f18ce
commit 1ad04f0b17
15 changed files with 214 additions and 9 deletions
+23 -1
View File
@@ -2231,7 +2231,7 @@
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/AssetResponseDto"
"$ref": "#/components/schemas/DuplicateResponseDto"
},
"type": "array"
}
@@ -7318,6 +7318,10 @@
"deviceId": {
"type": "string"
},
"duplicateId": {
"nullable": true,
"type": "string"
},
"duration": {
"type": "string"
},
@@ -7930,6 +7934,24 @@
],
"type": "object"
},
"DuplicateResponseDto": {
"properties": {
"assets": {
"items": {
"$ref": "#/components/schemas/AssetResponseDto"
},
"type": "array"
},
"duplicateId": {
"type": "string"
}
},
"required": [
"assets",
"duplicateId"
],
"type": "object"
},
"EntityType": {
"enum": [
"ASSET",
+6 -1
View File
@@ -115,6 +115,7 @@ export type AssetResponseDto = {
checksum: string;
deviceAssetId: string;
deviceId: string;
duplicateId?: string | null;
duration: string;
exifInfo?: ExifResponseDto;
fileCreatedAt: string;
@@ -372,6 +373,10 @@ export type DownloadResponseDto = {
archives: DownloadArchiveInfo[];
totalSize: number;
};
export type DuplicateResponseDto = {
assets: AssetResponseDto[];
duplicateId: string;
};
export type PersonResponseDto = {
birthDate: string | null;
id: string;
@@ -1698,7 +1703,7 @@ export function getDownloadInfo({ key, downloadInfoDto }: {
export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: AssetResponseDto[];
data: DuplicateResponseDto[];
}>("/duplicates", {
...opts
}));