rename stuff

This commit is contained in:
mgabor
2024-04-16 18:14:08 +02:00
parent 38bab135af
commit 9677d6108a
34 changed files with 471 additions and 487 deletions
+36 -36
View File
@@ -591,7 +591,7 @@
},
"/album/{id}/permission/{userId}": {
"put": {
"operationId": "setAlbumPermission",
"operationId": "updateAlbumUser",
"parameters": [
{
"name": "id",
@@ -615,7 +615,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetAlbumPermissionDto"
"$ref": "#/components/schemas/UpdateAlbumUserDto"
}
}
},
@@ -7118,32 +7118,11 @@
],
"type": "object"
},
"AlbumPermissionResponseDto": {
"properties": {
"readonly": {
"type": "boolean"
},
"user": {
"$ref": "#/components/schemas/UserResponseDto"
}
},
"required": [
"readonly",
"user"
],
"type": "object"
},
"AlbumResponseDto": {
"properties": {
"albumName": {
"type": "string"
},
"albumPermissions": {
"items": {
"$ref": "#/components/schemas/AlbumPermissionResponseDto"
},
"type": "array"
},
"albumThumbnailAssetId": {
"nullable": true,
"type": "string"
@@ -7195,12 +7174,18 @@
},
"sharedUsers": {
"deprecated": true,
"description": "Deprecated in favor of albumPermissions",
"description": "Deprecated in favor of users",
"items": {
"$ref": "#/components/schemas/UserResponseDto"
},
"type": "array"
},
"sharedUsersV2": {
"items": {
"$ref": "#/components/schemas/AlbumUserResponseDto"
},
"type": "array"
},
"startDate": {
"format": "date-time",
"type": "string"
@@ -7212,7 +7197,6 @@
},
"required": [
"albumName",
"albumPermissions",
"albumThumbnailAssetId",
"assetCount",
"assets",
@@ -7225,10 +7209,26 @@
"ownerId",
"shared",
"sharedUsers",
"sharedUsersV2",
"updatedAt"
],
"type": "object"
},
"AlbumUserResponseDto": {
"properties": {
"readonly": {
"type": "boolean"
},
"user": {
"$ref": "#/components/schemas/UserResponseDto"
}
},
"required": [
"readonly",
"user"
],
"type": "object"
},
"AllJobStatusResponseDto": {
"properties": {
"backgroundTask": {
@@ -9967,17 +9967,6 @@
],
"type": "object"
},
"SetAlbumPermissionDto": {
"properties": {
"readonly": {
"type": "boolean"
}
},
"required": [
"readonly"
],
"type": "object"
},
"SharedLinkCreateDto": {
"properties": {
"albumId": {
@@ -10971,6 +10960,17 @@
},
"type": "object"
},
"UpdateAlbumUserDto": {
"properties": {
"readonly": {
"type": "boolean"
}
},
"required": [
"readonly"
],
"type": "object"
},
"UpdateAssetDto": {
"properties": {
"dateTimeOriginal": {
+28 -28
View File
@@ -38,28 +38,6 @@ export type ActivityCreateDto = {
export type ActivityStatisticsResponseDto = {
comments: number;
};
export type UserResponseDto = {
avatarColor: UserAvatarColor;
createdAt: string;
deletedAt: string | null;
email: string;
id: string;
isAdmin: boolean;
memoriesEnabled?: boolean;
name: string;
oauthId: string;
profileImagePath: string;
quotaSizeInBytes: number | null;
quotaUsageInBytes: number | null;
shouldChangePassword: boolean;
status: UserStatus;
storageLabel: string | null;
updatedAt: string;
};
export type AlbumPermissionResponseDto = {
"readonly": boolean;
user: UserResponseDto;
};
export type ExifResponseDto = {
city?: string | null;
country?: string | null;
@@ -83,6 +61,24 @@ export type ExifResponseDto = {
state?: string | null;
timeZone?: string | null;
};
export type UserResponseDto = {
avatarColor: UserAvatarColor;
createdAt: string;
deletedAt: string | null;
email: string;
id: string;
isAdmin: boolean;
memoriesEnabled?: boolean;
name: string;
oauthId: string;
profileImagePath: string;
quotaSizeInBytes: number | null;
quotaUsageInBytes: number | null;
shouldChangePassword: boolean;
status: UserStatus;
storageLabel: string | null;
updatedAt: string;
};
export type AssetFaceWithoutPersonResponseDto = {
boundingBoxX1: number;
boundingBoxX2: number;
@@ -145,9 +141,12 @@ export type AssetResponseDto = {
"type": AssetTypeEnum;
updatedAt: string;
};
export type AlbumUserResponseDto = {
"readonly": boolean;
user: UserResponseDto;
};
export type AlbumResponseDto = {
albumName: string;
albumPermissions: AlbumPermissionResponseDto[];
albumThumbnailAssetId: string | null;
assetCount: number;
assets: AssetResponseDto[];
@@ -162,8 +161,9 @@ export type AlbumResponseDto = {
owner: UserResponseDto;
ownerId: string;
shared: boolean;
/** Deprecated in favor of albumPermissions */
/** Deprecated in favor of users */
sharedUsers: UserResponseDto[];
sharedUsersV2: AlbumUserResponseDto[];
startDate?: string;
updatedAt: string;
};
@@ -193,7 +193,7 @@ export type BulkIdResponseDto = {
id: string;
success: boolean;
};
export type SetAlbumPermissionDto = {
export type UpdateAlbumUserDto = {
"readonly": boolean;
};
export type AddUsersDto = {
@@ -1196,15 +1196,15 @@ export function addAssetsToAlbum({ id, key, bulkIdsDto }: {
body: bulkIdsDto
})));
}
export function setAlbumPermission({ id, userId, setAlbumPermissionDto }: {
export function updateAlbumUser({ id, userId, updateAlbumUserDto }: {
id: string;
userId: string;
setAlbumPermissionDto: SetAlbumPermissionDto;
updateAlbumUserDto: UpdateAlbumUserDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}/permission/${encodeURIComponent(userId)}`, oazapfts.json({
...opts,
method: "PUT",
body: setAlbumPermissionDto
body: updateAlbumUserDto
})));
}
export function removeUserFromAlbum({ id, userId }: {