refactor: library type (#9525)

This commit is contained in:
Jason Rasmussen
2024-05-20 18:09:10 -04:00
committed by GitHub
parent 4353153fe6
commit 84d824d6a7
66 changed files with 183 additions and 984 deletions

View File

@@ -2439,16 +2439,7 @@
"/library": {
"get": {
"operationId": "getAllLibraries",
"parameters": [
{
"name": "type",
"required": false,
"in": "query",
"schema": {
"$ref": "#/components/schemas/LibraryType"
}
}
],
"parameters": [],
"responses": {
"200": {
"content": {
@@ -7365,6 +7356,9 @@
"type": "boolean"
},
"libraryId": {
"deprecated": true,
"description": "This property was deprecated in v1.106.0",
"nullable": true,
"type": "string"
},
"livePhotoVideoId": {
@@ -7444,7 +7438,6 @@
"isFavorite",
"isOffline",
"isTrashed",
"libraryId",
"localDateTime",
"originalFileName",
"originalPath",
@@ -7715,10 +7708,6 @@
"isVisible": {
"type": "boolean"
},
"libraryId": {
"format": "uuid",
"type": "string"
},
"livePhotoData": {
"format": "binary",
"type": "string"
@@ -7757,14 +7746,10 @@
"ownerId": {
"format": "uuid",
"type": "string"
},
"type": {
"$ref": "#/components/schemas/LibraryType"
}
},
"required": [
"ownerId",
"type"
"ownerId"
],
"type": "object"
},
@@ -8319,9 +8304,6 @@
"nullable": true,
"type": "string"
},
"type": {
"$ref": "#/components/schemas/LibraryType"
},
"updatedAt": {
"format": "date-time",
"type": "string"
@@ -8336,7 +8318,6 @@
"name",
"ownerId",
"refreshedAt",
"type",
"updatedAt"
],
"type": "object"
@@ -8369,13 +8350,6 @@
],
"type": "object"
},
"LibraryType": {
"enum": [
"UPLOAD",
"EXTERNAL"
],
"type": "string"
},
"LogLevel": {
"enum": [
"verbose",

View File

@@ -130,7 +130,8 @@ export type AssetResponseDto = {
/** This property was deprecated in v1.104.0 */
isReadOnly?: boolean;
isTrashed: boolean;
libraryId: string;
/** This property was deprecated in v1.106.0 */
libraryId?: string | null;
livePhotoVideoId?: string | null;
localDateTime: string;
originalFileName: string;
@@ -307,7 +308,6 @@ export type CreateAssetDto = {
isFavorite?: boolean;
isOffline?: boolean;
isVisible?: boolean;
libraryId?: string;
livePhotoData?: Blob;
sidecarData?: Blob;
};
@@ -442,7 +442,6 @@ export type LibraryResponseDto = {
name: string;
ownerId: string;
refreshedAt: string | null;
"type": LibraryType;
updatedAt: string;
};
export type CreateLibraryDto = {
@@ -450,7 +449,6 @@ export type CreateLibraryDto = {
importPaths?: string[];
name?: string;
ownerId: string;
"type": LibraryType;
};
export type UpdateLibraryDto = {
exclusionPatterns?: string[];
@@ -1754,15 +1752,11 @@ export function sendJobCommand({ id, jobCommandDto }: {
body: jobCommandDto
})));
}
export function getAllLibraries({ $type }: {
$type?: LibraryType;
}, opts?: Oazapfts.RequestOpts) {
export function getAllLibraries(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LibraryResponseDto[];
}>(`/library${QS.query(QS.explode({
"type": $type
}))}`, {
}>("/library", {
...opts
}));
}
@@ -2913,10 +2907,6 @@ export enum JobCommand {
Empty = "empty",
ClearFailed = "clear-failed"
}
export enum LibraryType {
Upload = "UPLOAD",
External = "EXTERNAL"
}
export enum Type2 {
OnThisDay = "on_this_day"
}