rename new API field to albumUsers

This commit is contained in:
mgabor
2024-04-19 20:07:53 +02:00
parent 3d528f0840
commit 4960477627
14 changed files with 85 additions and 63 deletions
+8 -8
View File
@@ -7261,6 +7261,12 @@
"nullable": true,
"type": "string"
},
"albumUsers": {
"items": {
"$ref": "#/components/schemas/AlbumUserResponseDto"
},
"type": "array"
},
"assetCount": {
"type": "integer"
},
@@ -7308,18 +7314,12 @@
},
"sharedUsers": {
"deprecated": true,
"description": "Deprecated in favor of sharedUsersV2",
"description": "Deprecated in favor of albumUsers",
"items": {
"$ref": "#/components/schemas/UserResponseDto"
},
"type": "array"
},
"sharedUsersV2": {
"items": {
"$ref": "#/components/schemas/AlbumUserResponseDto"
},
"type": "array"
},
"startDate": {
"format": "date-time",
"type": "string"
@@ -7332,6 +7332,7 @@
"required": [
"albumName",
"albumThumbnailAssetId",
"albumUsers",
"assetCount",
"assets",
"createdAt",
@@ -7343,7 +7344,6 @@
"ownerId",
"shared",
"sharedUsers",
"sharedUsersV2",
"updatedAt"
],
"type": "object"
+28 -28
View File
@@ -38,6 +38,28 @@ 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 AlbumUserResponseDto = {
role: AlbumUserRole;
user: UserResponseDto;
};
export type ExifResponseDto = {
city?: string | null;
country?: string | null;
@@ -61,24 +83,6 @@ 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;
@@ -141,13 +145,10 @@ export type AssetResponseDto = {
"type": AssetTypeEnum;
updatedAt: string;
};
export type AlbumUserResponseDto = {
role: AlbumUserRole;
user: UserResponseDto;
};
export type AlbumResponseDto = {
albumName: string;
albumThumbnailAssetId: string | null;
albumUsers: AlbumUserResponseDto[];
assetCount: number;
assets: AssetResponseDto[];
createdAt: string;
@@ -161,9 +162,8 @@ export type AlbumResponseDto = {
owner: UserResponseDto;
ownerId: string;
shared: boolean;
/** Deprecated in favor of sharedUsersV2 */
/** Deprecated in favor of albumUsers */
sharedUsers: UserResponseDto[];
sharedUsersV2: AlbumUserResponseDto[];
startDate?: string;
updatedAt: string;
};
@@ -2920,6 +2920,10 @@ export enum UserAvatarColor {
Gray = "gray",
Amber = "amber"
}
export enum AlbumUserRole {
Editor = "editor",
Viewer = "viewer"
}
export enum UserStatus {
Active = "active",
Removing = "removing",
@@ -2940,10 +2944,6 @@ export enum AssetOrder {
Asc = "asc",
Desc = "desc"
}
export enum AlbumUserRole {
Editor = "editor",
Viewer = "viewer"
}
export enum Error {
Duplicate = "duplicate",
NoPermission = "no_permission",