From 4dcc1131fa7d28bbe053e297e018d41937a16a3d Mon Sep 17 00:00:00 2001 From: martabal <74269598+martabal@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:06:18 +0200 Subject: [PATCH] regenerate api --- cli/src/api/open-api/api.ts | 1022 +---------------- mobile/openapi/.openapi-generator/FILES | 33 +- mobile/openapi/README.md | 11 +- mobile/openapi/doc/AlbumEntity.md | 27 - mobile/openapi/doc/AssetEntity.md | 49 - ...{SmartInfoEntity.md => AssetFaceBoxDto.md} | 13 +- mobile/openapi/doc/AssetFaceEntity.md | 25 - mobile/openapi/doc/ExifEntity.md | 43 - mobile/openapi/doc/LibraryEntity.md | 27 - mobile/openapi/doc/PersonApi.md | 8 +- mobile/openapi/doc/PersonEntity.md | 26 - mobile/openapi/doc/SharedLinkEntity.md | 28 - mobile/openapi/doc/TagEntity.md | 21 - mobile/openapi/doc/UserEntity.md | 31 - mobile/openapi/lib/api.dart | 11 +- mobile/openapi/lib/api/person_api.dart | 8 +- mobile/openapi/lib/api_client.dart | 22 +- mobile/openapi/lib/model/album_entity.dart | 206 ---- mobile/openapi/lib/model/asset_entity.dart | 499 -------- .../openapi/lib/model/asset_face_box_dto.dart | 138 +++ .../openapi/lib/model/asset_face_entity.dart | 196 ---- mobile/openapi/lib/model/exif_entity.dart | 453 -------- mobile/openapi/lib/model/library_entity.dart | 285 ----- mobile/openapi/lib/model/person_entity.dart | 198 ---- .../openapi/lib/model/shared_link_entity.dart | 297 ----- .../openapi/lib/model/smart_info_entity.dart | 157 --- mobile/openapi/lib/model/tag_entity.dart | 227 ---- mobile/openapi/lib/model/user_entity.dart | 247 ---- mobile/openapi/test/album_entity_test.dart | 87 -- mobile/openapi/test/asset_entity_test.dart | 197 ---- ...test.dart => asset_face_box_dto_test.dart} | 43 +- mobile/openapi/test/exif_entity_test.dart | 170 --- mobile/openapi/test/library_entity_test.dart | 87 -- mobile/openapi/test/person_api_test.dart | 4 +- mobile/openapi/test/person_entity_test.dart | 82 -- .../openapi/test/shared_link_entity_test.dart | 92 -- .../openapi/test/smart_info_entity_test.dart | 47 - mobile/openapi/test/tag_entity_test.dart | 57 - mobile/openapi/test/user_entity_test.dart | 107 -- server/immich-openapi-specs.json | 837 +------------- server/src/domain/person/person.dto.ts | 20 + server/src/domain/person/person.service.ts | 17 +- .../immich/controllers/person.controller.ts | 6 +- web/src/api/open-api/api.ts | 1022 +---------------- 44 files changed, 241 insertions(+), 6942 deletions(-) delete mode 100644 mobile/openapi/doc/AlbumEntity.md delete mode 100644 mobile/openapi/doc/AssetEntity.md rename mobile/openapi/doc/{SmartInfoEntity.md => AssetFaceBoxDto.md} (53%) delete mode 100644 mobile/openapi/doc/AssetFaceEntity.md delete mode 100644 mobile/openapi/doc/ExifEntity.md delete mode 100644 mobile/openapi/doc/LibraryEntity.md delete mode 100644 mobile/openapi/doc/PersonEntity.md delete mode 100644 mobile/openapi/doc/SharedLinkEntity.md delete mode 100644 mobile/openapi/doc/TagEntity.md delete mode 100644 mobile/openapi/doc/UserEntity.md delete mode 100644 mobile/openapi/lib/model/album_entity.dart delete mode 100644 mobile/openapi/lib/model/asset_entity.dart create mode 100644 mobile/openapi/lib/model/asset_face_box_dto.dart delete mode 100644 mobile/openapi/lib/model/asset_face_entity.dart delete mode 100644 mobile/openapi/lib/model/exif_entity.dart delete mode 100644 mobile/openapi/lib/model/library_entity.dart delete mode 100644 mobile/openapi/lib/model/person_entity.dart delete mode 100644 mobile/openapi/lib/model/shared_link_entity.dart delete mode 100644 mobile/openapi/lib/model/smart_info_entity.dart delete mode 100644 mobile/openapi/lib/model/tag_entity.dart delete mode 100644 mobile/openapi/lib/model/user_entity.dart delete mode 100644 mobile/openapi/test/album_entity_test.dart delete mode 100644 mobile/openapi/test/asset_entity_test.dart rename mobile/openapi/test/{asset_face_entity_test.dart => asset_face_box_dto_test.dart} (52%) delete mode 100644 mobile/openapi/test/exif_entity_test.dart delete mode 100644 mobile/openapi/test/library_entity_test.dart delete mode 100644 mobile/openapi/test/person_entity_test.dart delete mode 100644 mobile/openapi/test/shared_link_entity_test.dart delete mode 100644 mobile/openapi/test/smart_info_entity_test.dart delete mode 100644 mobile/openapi/test/tag_entity_test.dart delete mode 100644 mobile/openapi/test/user_entity_test.dart diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index bbae62bca..68406cfc6 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -174,91 +174,6 @@ export interface AlbumCountResponseDto { */ 'shared': number; } -/** - * - * @export - * @interface AlbumEntity - */ -export interface AlbumEntity { - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'albumName': string; - /** - * - * @type {AssetEntity} - * @memberof AlbumEntity - */ - 'albumThumbnailAsset': AssetEntity | null; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'albumThumbnailAssetId': string | null; - /** - * - * @type {Array} - * @memberof AlbumEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'deletedAt': string | null; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'description': string; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'id': string; - /** - * - * @type {UserEntity} - * @memberof AlbumEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'ownerId': string; - /** - * - * @type {Array} - * @memberof AlbumEntity - */ - 'sharedLinks': Array; - /** - * - * @type {Array} - * @memberof AlbumEntity - */ - 'sharedUsers': Array; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'updatedAt': string; -} /** * * @export @@ -559,302 +474,45 @@ export type AssetBulkUploadCheckResultReasonEnum = typeof AssetBulkUploadCheckRe /** * * @export - * @interface AssetEntity + * @interface AssetFaceBoxDto */ -export interface AssetEntity { - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'albums'?: Array; - /** - * - * @type {object} - * @memberof AssetEntity - */ - 'checksum': object; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'deviceAssetId': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'deviceId': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'duration': string | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'encodedVideoPath': string | null; - /** - * - * @type {ExifEntity} - * @memberof AssetEntity - */ - 'exifInfo'?: ExifEntity; - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'faces': Array; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'fileCreatedAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'fileModifiedAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'id': string; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isArchived': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isExternal': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isFavorite': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isOffline': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isReadOnly': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isVisible': boolean; - /** - * - * @type {LibraryEntity} - * @memberof AssetEntity - */ - 'library': LibraryEntity; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'libraryId': string; - /** - * - * @type {AssetEntity} - * @memberof AssetEntity - */ - 'livePhotoVideo': AssetEntity | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'livePhotoVideoId': string | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'originalFileName': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'originalPath': string; - /** - * - * @type {UserEntity} - * @memberof AssetEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'ownerId': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'resizePath': string | null; - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'sharedLinks': Array; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'sidecarPath': string | null; - /** - * - * @type {SmartInfoEntity} - * @memberof AssetEntity - */ - 'smartInfo'?: SmartInfoEntity; - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'tags': Array; - /** - * - * @type {object} - * @memberof AssetEntity - */ - 'thumbhash': object | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'type': AssetEntityTypeEnum; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'updatedAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'webpPath': string | null; -} - -export const AssetEntityTypeEnum = { - Image: 'IMAGE', - Video: 'VIDEO', - Audio: 'AUDIO', - Other: 'OTHER' -} as const; - -export type AssetEntityTypeEnum = typeof AssetEntityTypeEnum[keyof typeof AssetEntityTypeEnum]; - -/** - * - * @export - * @interface AssetFaceEntity - */ -export interface AssetFaceEntity { - /** - * - * @type {AssetEntity} - * @memberof AssetFaceEntity - */ - 'asset': AssetEntity; - /** - * - * @type {string} - * @memberof AssetFaceEntity - */ - 'assetId': string; +export interface AssetFaceBoxDto { /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxX1': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxX2': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxY1': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxY2': number; - /** - * - * @type {Array} - * @memberof AssetFaceEntity - */ - 'embedding': Array | null; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'imageHeight': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'imageWidth': number; - /** - * - * @type {PersonEntity} - * @memberof AssetFaceEntity - */ - 'person': PersonEntity; - /** - * - * @type {string} - * @memberof AssetFaceEntity - */ - 'personId': string; } /** * @@ -1899,187 +1557,6 @@ export const EntityType = { export type EntityType = typeof EntityType[keyof typeof EntityType]; -/** - * - * @export - * @interface ExifEntity - */ -export interface ExifEntity { - /** - * - * @type {AssetEntity} - * @memberof ExifEntity - */ - 'asset'?: AssetEntity; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'assetId': string; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'bitsPerSample': number | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'city': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'colorspace': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'country': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'dateTimeOriginal': string | null; - /** - * General info - * @type {string} - * @memberof ExifEntity - */ - 'description': string; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'exifImageHeight': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'exifImageWidth': number | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'exifTextSearchableColumn': string; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'exposureTime': string | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'fNumber': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'fileSizeInByte': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'focalLength': number | null; - /** - * Video info - * @type {number} - * @memberof ExifEntity - */ - 'fps'?: number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'iso': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'latitude': number | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'lensModel': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'livePhotoCID': string | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'longitude': number | null; - /** - * Image info - * @type {string} - * @memberof ExifEntity - */ - 'make': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'model': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'modifyDate': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'orientation': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'profileDescription': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'projectionType': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'state': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'timeZone': string | null; -} /** * * @export @@ -2440,99 +1917,6 @@ export interface JobStatusDto { */ 'queueStatus': QueueStatusDto; } -/** - * - * @export - * @interface LibraryEntity - */ -export interface LibraryEntity { - /** - * - * @type {Array} - * @memberof LibraryEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'deletedAt'?: string; - /** - * - * @type {Array} - * @memberof LibraryEntity - */ - 'exclusionPatterns': Array; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'id': string; - /** - * - * @type {Array} - * @memberof LibraryEntity - */ - 'importPaths': Array; - /** - * - * @type {boolean} - * @memberof LibraryEntity - */ - 'isVisible': boolean; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'name': string; - /** - * - * @type {UserEntity} - * @memberof LibraryEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'ownerId': string; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'refreshedAt': string | null; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'type': LibraryEntityTypeEnum; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'updatedAt': string; -} - -export const LibraryEntityTypeEnum = { - Upload: 'UPLOAD', - External: 'EXTERNAL' -} as const; - -export type LibraryEntityTypeEnum = typeof LibraryEntityTypeEnum[keyof typeof LibraryEntityTypeEnum]; - /** * * @export @@ -2963,85 +2347,6 @@ export interface PeopleUpdateItem { */ 'name'?: string; } -/** - * - * @export - * @interface PersonEntity - */ -export interface PersonEntity { - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'birthDate': string | null; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'createdAt': string; - /** - * - * @type {AssetEntity} - * @memberof PersonEntity - */ - 'faceAsset': AssetEntity | null; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'faceAssetId': string | null; - /** - * - * @type {Array} - * @memberof PersonEntity - */ - 'faces': Array; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'id': string; - /** - * - * @type {boolean} - * @memberof PersonEntity - */ - 'isHidden': boolean; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'name': string; - /** - * - * @type {UserEntity} - * @memberof PersonEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'ownerId': string; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'thumbnailPath': string; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'updatedAt': string; -} /** * * @export @@ -3698,105 +3003,6 @@ export interface SharedLinkEditDto { */ 'showExif'?: boolean; } -/** - * - * @export - * @interface SharedLinkEntity - */ -export interface SharedLinkEntity { - /** - * - * @type {AlbumEntity} - * @memberof SharedLinkEntity - */ - 'album'?: AlbumEntity; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'albumId': string | null; - /** - * - * @type {boolean} - * @memberof SharedLinkEntity - */ - 'allowDownload': boolean; - /** - * - * @type {boolean} - * @memberof SharedLinkEntity - */ - 'allowUpload': boolean; - /** - * - * @type {Array} - * @memberof SharedLinkEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'description': string | null; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'expiresAt': string | null; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'id': string; - /** - * - * @type {object} - * @memberof SharedLinkEntity - */ - 'key': object; - /** - * - * @type {boolean} - * @memberof SharedLinkEntity - */ - 'showExif': boolean; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'type': SharedLinkEntityTypeEnum; - /** - * - * @type {UserEntity} - * @memberof SharedLinkEntity - */ - 'user': UserEntity; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'userId': string; -} - -export const SharedLinkEntityTypeEnum = { - Album: 'ALBUM', - Individual: 'INDIVIDUAL' -} as const; - -export type SharedLinkEntityTypeEnum = typeof SharedLinkEntityTypeEnum[keyof typeof SharedLinkEntityTypeEnum]; - /** * * @export @@ -3923,43 +3129,6 @@ export interface SignUpDto { */ 'password': string; } -/** - * - * @export - * @interface SmartInfoEntity - */ -export interface SmartInfoEntity { - /** - * - * @type {AssetEntity} - * @memberof SmartInfoEntity - */ - 'asset'?: AssetEntity; - /** - * - * @type {string} - * @memberof SmartInfoEntity - */ - 'assetId': string; - /** - * - * @type {Array} - * @memberof SmartInfoEntity - */ - 'clipEmbedding': Array | null; - /** - * - * @type {Array} - * @memberof SmartInfoEntity - */ - 'objects': Array | null; - /** - * - * @type {Array} - * @memberof SmartInfoEntity - */ - 'tags': Array | null; -} /** * * @export @@ -4494,64 +3663,6 @@ export interface SystemConfigThumbnailDto { } -/** - * - * @export - * @interface TagEntity - */ -export interface TagEntity { - /** - * - * @type {Array} - * @memberof TagEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'id': string; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'name': string; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'renameTagId': string | null; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'type': TagEntityTypeEnum; - /** - * - * @type {UserEntity} - * @memberof TagEntity - */ - 'user': UserEntity; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'userId': string; -} - -export const TagEntityTypeEnum = { - Object: 'OBJECT', - Face: 'FACE', - Custom: 'CUSTOM' -} as const; - -export type TagEntityTypeEnum = typeof TagEntityTypeEnum[keyof typeof TagEntityTypeEnum]; - /** * * @export @@ -4912,115 +4023,6 @@ export interface UserCountResponseDto { */ 'userCount': number; } -/** - * - * @export - * @interface UserEntity - */ -export interface UserEntity { - /** - * - * @type {Array} - * @memberof UserEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'deletedAt': string | null; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'email': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'externalPath': string | null; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'firstName': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'id': string; - /** - * - * @type {boolean} - * @memberof UserEntity - */ - 'isAdmin': boolean; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'lastName': string; - /** - * - * @type {boolean} - * @memberof UserEntity - */ - 'memoriesEnabled': boolean; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'oauthId': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'password'?: string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'profileImagePath': string; - /** - * - * @type {boolean} - * @memberof UserEntity - */ - 'shouldChangePassword': boolean; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'storageLabel': string | null; - /** - * - * @type {Array} - * @memberof UserEntity - */ - 'tags': Array; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'updatedAt': string; -} /** * * @export @@ -12554,7 +11556,7 @@ export const PersonApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createPerson(assetFaceUpdateDto: AssetFaceUpdateDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createPerson(assetFaceUpdateDto: AssetFaceUpdateDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createPerson(assetFaceUpdateDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12575,7 +11577,7 @@ export const PersonApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetFace(id: string, assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getAssetFace(id: string, assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetFace(id, assetId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12668,7 +11670,7 @@ export const PersonApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createPerson(requestParameters: PersonApiCreatePersonRequest, options?: AxiosRequestConfig): AxiosPromise { + createPerson(requestParameters: PersonApiCreatePersonRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createPerson(requestParameters.assetFaceUpdateDto, options).then((request) => request(axios, basePath)); }, /** @@ -12686,7 +11688,7 @@ export const PersonApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetFace(requestParameters: PersonApiGetAssetFaceRequest, options?: AxiosRequestConfig): AxiosPromise { + getAssetFace(requestParameters: PersonApiGetAssetFaceRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getAssetFace(requestParameters.id, requestParameters.assetId, options).then((request) => request(axios, basePath)); }, /** diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILES index ca6134178..b34025888 100644 --- a/mobile/openapi/.openapi-generator/FILES +++ b/mobile/openapi/.openapi-generator/FILES @@ -12,7 +12,6 @@ doc/AddUsersDto.md doc/AdminSignupResponseDto.md doc/AlbumApi.md doc/AlbumCountResponseDto.md -doc/AlbumEntity.md doc/AlbumResponseDto.md doc/AllJobStatusResponseDto.md doc/AssetApi.md @@ -21,8 +20,7 @@ doc/AssetBulkUploadCheckDto.md doc/AssetBulkUploadCheckItem.md doc/AssetBulkUploadCheckResponseDto.md doc/AssetBulkUploadCheckResult.md -doc/AssetEntity.md -doc/AssetFaceEntity.md +doc/AssetFaceBoxDto.md doc/AssetFaceUpdateDto.md doc/AssetFileUploadResponseDto.md doc/AssetIdsDto.md @@ -65,7 +63,6 @@ doc/DownloadArchiveInfo.md doc/DownloadInfoDto.md doc/DownloadResponseDto.md doc/EntityType.md -doc/ExifEntity.md doc/ExifResponseDto.md doc/ImportAssetDto.md doc/JobApi.md @@ -76,7 +73,6 @@ doc/JobName.md doc/JobSettingsDto.md doc/JobStatusDto.md doc/LibraryApi.md -doc/LibraryEntity.md doc/LibraryResponseDto.md doc/LibraryStatsResponseDto.md doc/LibraryType.md @@ -97,7 +93,6 @@ doc/PeopleResponseDto.md doc/PeopleUpdateDto.md doc/PeopleUpdateItem.md doc/PersonApi.md -doc/PersonEntity.md doc/PersonResponseDto.md doc/PersonUpdateDto.md doc/QueueStatusDto.md @@ -123,11 +118,9 @@ doc/ServerVersionResponseDto.md doc/SharedLinkApi.md doc/SharedLinkCreateDto.md doc/SharedLinkEditDto.md -doc/SharedLinkEntity.md doc/SharedLinkResponseDto.md doc/SharedLinkType.md doc/SignUpDto.md -doc/SmartInfoEntity.md doc/SmartInfoResponseDto.md doc/SystemConfigApi.md doc/SystemConfigDto.md @@ -142,7 +135,6 @@ doc/SystemConfigStorageTemplateDto.md doc/SystemConfigTemplateStorageOptionDto.md doc/SystemConfigThumbnailDto.md doc/TagApi.md -doc/TagEntity.md doc/TagResponseDto.md doc/TagTypeEnum.md doc/ThumbnailFormat.md @@ -159,7 +151,6 @@ doc/UpdateUserDto.md doc/UsageByUserDto.md doc/UserApi.md doc/UserCountResponseDto.md -doc/UserEntity.md doc/UserResponseDto.md doc/ValidateAccessTokenResponseDto.md doc/VideoCodec.md @@ -192,7 +183,6 @@ lib/auth/oauth.dart lib/model/add_users_dto.dart lib/model/admin_signup_response_dto.dart lib/model/album_count_response_dto.dart -lib/model/album_entity.dart lib/model/album_response_dto.dart lib/model/all_job_status_response_dto.dart lib/model/api_key_create_dto.dart @@ -204,8 +194,7 @@ lib/model/asset_bulk_upload_check_dto.dart lib/model/asset_bulk_upload_check_item.dart lib/model/asset_bulk_upload_check_response_dto.dart lib/model/asset_bulk_upload_check_result.dart -lib/model/asset_entity.dart -lib/model/asset_face_entity.dart +lib/model/asset_face_box_dto.dart lib/model/asset_face_update_dto.dart lib/model/asset_file_upload_response_dto.dart lib/model/asset_ids_dto.dart @@ -246,7 +235,6 @@ lib/model/download_archive_info.dart lib/model/download_info_dto.dart lib/model/download_response_dto.dart lib/model/entity_type.dart -lib/model/exif_entity.dart lib/model/exif_response_dto.dart lib/model/import_asset_dto.dart lib/model/job_command.dart @@ -255,7 +243,6 @@ lib/model/job_counts_dto.dart lib/model/job_name.dart lib/model/job_settings_dto.dart lib/model/job_status_dto.dart -lib/model/library_entity.dart lib/model/library_response_dto.dart lib/model/library_stats_response_dto.dart lib/model/library_type.dart @@ -273,7 +260,6 @@ lib/model/o_auth_config_response_dto.dart lib/model/people_response_dto.dart lib/model/people_update_dto.dart lib/model/people_update_item.dart -lib/model/person_entity.dart lib/model/person_response_dto.dart lib/model/person_update_dto.dart lib/model/queue_status_dto.dart @@ -296,11 +282,9 @@ lib/model/server_stats_response_dto.dart lib/model/server_version_response_dto.dart lib/model/shared_link_create_dto.dart lib/model/shared_link_edit_dto.dart -lib/model/shared_link_entity.dart lib/model/shared_link_response_dto.dart lib/model/shared_link_type.dart lib/model/sign_up_dto.dart -lib/model/smart_info_entity.dart lib/model/smart_info_response_dto.dart lib/model/system_config_dto.dart lib/model/system_config_f_fmpeg_dto.dart @@ -313,7 +297,6 @@ lib/model/system_config_reverse_geocoding_dto.dart lib/model/system_config_storage_template_dto.dart lib/model/system_config_template_storage_option_dto.dart lib/model/system_config_thumbnail_dto.dart -lib/model/tag_entity.dart lib/model/tag_response_dto.dart lib/model/tag_type_enum.dart lib/model/thumbnail_format.dart @@ -329,7 +312,6 @@ lib/model/update_tag_dto.dart lib/model/update_user_dto.dart lib/model/usage_by_user_dto.dart lib/model/user_count_response_dto.dart -lib/model/user_entity.dart lib/model/user_response_dto.dart lib/model/validate_access_token_response_dto.dart lib/model/video_codec.dart @@ -338,7 +320,6 @@ test/add_users_dto_test.dart test/admin_signup_response_dto_test.dart test/album_api_test.dart test/album_count_response_dto_test.dart -test/album_entity_test.dart test/album_response_dto_test.dart test/all_job_status_response_dto_test.dart test/api_key_api_test.dart @@ -352,8 +333,7 @@ test/asset_bulk_upload_check_dto_test.dart test/asset_bulk_upload_check_item_test.dart test/asset_bulk_upload_check_response_dto_test.dart test/asset_bulk_upload_check_result_test.dart -test/asset_entity_test.dart -test/asset_face_entity_test.dart +test/asset_face_box_dto_test.dart test/asset_face_update_dto_test.dart test/asset_file_upload_response_dto_test.dart test/asset_ids_dto_test.dart @@ -396,7 +376,6 @@ test/download_archive_info_test.dart test/download_info_dto_test.dart test/download_response_dto_test.dart test/entity_type_test.dart -test/exif_entity_test.dart test/exif_response_dto_test.dart test/import_asset_dto_test.dart test/job_api_test.dart @@ -407,7 +386,6 @@ test/job_name_test.dart test/job_settings_dto_test.dart test/job_status_dto_test.dart test/library_api_test.dart -test/library_entity_test.dart test/library_response_dto_test.dart test/library_stats_response_dto_test.dart test/library_type_test.dart @@ -428,7 +406,6 @@ test/people_response_dto_test.dart test/people_update_dto_test.dart test/people_update_item_test.dart test/person_api_test.dart -test/person_entity_test.dart test/person_response_dto_test.dart test/person_update_dto_test.dart test/queue_status_dto_test.dart @@ -454,11 +431,9 @@ test/server_version_response_dto_test.dart test/shared_link_api_test.dart test/shared_link_create_dto_test.dart test/shared_link_edit_dto_test.dart -test/shared_link_entity_test.dart test/shared_link_response_dto_test.dart test/shared_link_type_test.dart test/sign_up_dto_test.dart -test/smart_info_entity_test.dart test/smart_info_response_dto_test.dart test/system_config_api_test.dart test/system_config_dto_test.dart @@ -473,7 +448,6 @@ test/system_config_storage_template_dto_test.dart test/system_config_template_storage_option_dto_test.dart test/system_config_thumbnail_dto_test.dart test/tag_api_test.dart -test/tag_entity_test.dart test/tag_response_dto_test.dart test/tag_type_enum_test.dart test/thumbnail_format_test.dart @@ -490,7 +464,6 @@ test/update_user_dto_test.dart test/usage_by_user_dto_test.dart test/user_api_test.dart test/user_count_response_dto_test.dart -test/user_entity_test.dart test/user_response_dto_test.dart test/validate_access_token_response_dto_test.dart test/video_codec_test.dart diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 7d9e0fc32..b5a71ca1d 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -202,7 +202,6 @@ Class | Method | HTTP request | Description - [AddUsersDto](doc//AddUsersDto.md) - [AdminSignupResponseDto](doc//AdminSignupResponseDto.md) - [AlbumCountResponseDto](doc//AlbumCountResponseDto.md) - - [AlbumEntity](doc//AlbumEntity.md) - [AlbumResponseDto](doc//AlbumResponseDto.md) - [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md) - [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md) @@ -210,8 +209,7 @@ Class | Method | HTTP request | Description - [AssetBulkUploadCheckItem](doc//AssetBulkUploadCheckItem.md) - [AssetBulkUploadCheckResponseDto](doc//AssetBulkUploadCheckResponseDto.md) - [AssetBulkUploadCheckResult](doc//AssetBulkUploadCheckResult.md) - - [AssetEntity](doc//AssetEntity.md) - - [AssetFaceEntity](doc//AssetFaceEntity.md) + - [AssetFaceBoxDto](doc//AssetFaceBoxDto.md) - [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md) - [AssetFileUploadResponseDto](doc//AssetFileUploadResponseDto.md) - [AssetIdsDto](doc//AssetIdsDto.md) @@ -252,7 +250,6 @@ Class | Method | HTTP request | Description - [DownloadInfoDto](doc//DownloadInfoDto.md) - [DownloadResponseDto](doc//DownloadResponseDto.md) - [EntityType](doc//EntityType.md) - - [ExifEntity](doc//ExifEntity.md) - [ExifResponseDto](doc//ExifResponseDto.md) - [ImportAssetDto](doc//ImportAssetDto.md) - [JobCommand](doc//JobCommand.md) @@ -261,7 +258,6 @@ Class | Method | HTTP request | Description - [JobName](doc//JobName.md) - [JobSettingsDto](doc//JobSettingsDto.md) - [JobStatusDto](doc//JobStatusDto.md) - - [LibraryEntity](doc//LibraryEntity.md) - [LibraryResponseDto](doc//LibraryResponseDto.md) - [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md) - [LibraryType](doc//LibraryType.md) @@ -279,7 +275,6 @@ Class | Method | HTTP request | Description - [PeopleResponseDto](doc//PeopleResponseDto.md) - [PeopleUpdateDto](doc//PeopleUpdateDto.md) - [PeopleUpdateItem](doc//PeopleUpdateItem.md) - - [PersonEntity](doc//PersonEntity.md) - [PersonResponseDto](doc//PersonResponseDto.md) - [PersonUpdateDto](doc//PersonUpdateDto.md) - [QueueStatusDto](doc//QueueStatusDto.md) @@ -302,11 +297,9 @@ Class | Method | HTTP request | Description - [ServerVersionResponseDto](doc//ServerVersionResponseDto.md) - [SharedLinkCreateDto](doc//SharedLinkCreateDto.md) - [SharedLinkEditDto](doc//SharedLinkEditDto.md) - - [SharedLinkEntity](doc//SharedLinkEntity.md) - [SharedLinkResponseDto](doc//SharedLinkResponseDto.md) - [SharedLinkType](doc//SharedLinkType.md) - [SignUpDto](doc//SignUpDto.md) - - [SmartInfoEntity](doc//SmartInfoEntity.md) - [SmartInfoResponseDto](doc//SmartInfoResponseDto.md) - [SystemConfigDto](doc//SystemConfigDto.md) - [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md) @@ -319,7 +312,6 @@ Class | Method | HTTP request | Description - [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md) - [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md) - [SystemConfigThumbnailDto](doc//SystemConfigThumbnailDto.md) - - [TagEntity](doc//TagEntity.md) - [TagResponseDto](doc//TagResponseDto.md) - [TagTypeEnum](doc//TagTypeEnum.md) - [ThumbnailFormat](doc//ThumbnailFormat.md) @@ -335,7 +327,6 @@ Class | Method | HTTP request | Description - [UpdateUserDto](doc//UpdateUserDto.md) - [UsageByUserDto](doc//UsageByUserDto.md) - [UserCountResponseDto](doc//UserCountResponseDto.md) - - [UserEntity](doc//UserEntity.md) - [UserResponseDto](doc//UserResponseDto.md) - [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md) - [VideoCodec](doc//VideoCodec.md) diff --git a/mobile/openapi/doc/AlbumEntity.md b/mobile/openapi/doc/AlbumEntity.md deleted file mode 100644 index eb8573b67..000000000 --- a/mobile/openapi/doc/AlbumEntity.md +++ /dev/null @@ -1,27 +0,0 @@ -# openapi.model.AlbumEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**albumName** | **String** | | -**albumThumbnailAsset** | [**AssetEntity**](AssetEntity.md) | | -**albumThumbnailAssetId** | **String** | | -**assets** | [**List**](AssetEntity.md) | | [default to const []] -**createdAt** | [**DateTime**](DateTime.md) | | -**deletedAt** | [**DateTime**](DateTime.md) | | -**description** | **String** | | -**id** | **String** | | -**owner** | [**UserEntity**](UserEntity.md) | | -**ownerId** | **String** | | -**sharedLinks** | [**List**](SharedLinkEntity.md) | | [default to const []] -**sharedUsers** | [**List**](UserEntity.md) | | [default to const []] -**updatedAt** | [**DateTime**](DateTime.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/AssetEntity.md b/mobile/openapi/doc/AssetEntity.md deleted file mode 100644 index ad71fa87a..000000000 --- a/mobile/openapi/doc/AssetEntity.md +++ /dev/null @@ -1,49 +0,0 @@ -# openapi.model.AssetEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**albums** | [**List**](AlbumEntity.md) | | [optional] [default to const []] -**checksum** | [**Object**](.md) | | -**createdAt** | [**DateTime**](DateTime.md) | | -**deviceAssetId** | **String** | | -**deviceId** | **String** | | -**duration** | **String** | | -**encodedVideoPath** | **String** | | -**exifInfo** | [**ExifEntity**](ExifEntity.md) | | [optional] -**faces** | [**List**](AssetFaceEntity.md) | | [default to const []] -**fileCreatedAt** | [**DateTime**](DateTime.md) | | -**fileModifiedAt** | [**DateTime**](DateTime.md) | | -**id** | **String** | | -**isArchived** | **bool** | | -**isExternal** | **bool** | | -**isFavorite** | **bool** | | -**isOffline** | **bool** | | -**isReadOnly** | **bool** | | -**isVisible** | **bool** | | -**library_** | [**LibraryEntity**](LibraryEntity.md) | | -**libraryId** | **String** | | -**livePhotoVideo** | [**AssetEntity**](AssetEntity.md) | | -**livePhotoVideoId** | **String** | | -**originalFileName** | **String** | | -**originalPath** | **String** | | -**owner** | [**UserEntity**](UserEntity.md) | | -**ownerId** | **String** | | -**resizePath** | **String** | | -**sharedLinks** | [**List**](SharedLinkEntity.md) | | [default to const []] -**sidecarPath** | **String** | | -**smartInfo** | [**SmartInfoEntity**](SmartInfoEntity.md) | | [optional] -**tags** | [**List**](TagEntity.md) | | [default to const []] -**thumbhash** | [**Object**](.md) | | -**type** | **String** | | -**updatedAt** | [**DateTime**](DateTime.md) | | -**webpPath** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/SmartInfoEntity.md b/mobile/openapi/doc/AssetFaceBoxDto.md similarity index 53% rename from mobile/openapi/doc/SmartInfoEntity.md rename to mobile/openapi/doc/AssetFaceBoxDto.md index 6b6403d2a..13388de79 100644 --- a/mobile/openapi/doc/SmartInfoEntity.md +++ b/mobile/openapi/doc/AssetFaceBoxDto.md @@ -1,4 +1,4 @@ -# openapi.model.SmartInfoEntity +# openapi.model.AssetFaceBoxDto ## Load the model package ```dart @@ -8,11 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asset** | [**AssetEntity**](AssetEntity.md) | | [optional] -**assetId** | **String** | | -**clipEmbedding** | **List** | | [default to const []] -**objects** | **List** | | [default to const []] -**tags** | **List** | | [default to const []] +**boundingBoxX1** | **int** | | +**boundingBoxX2** | **int** | | +**boundingBoxY1** | **int** | | +**boundingBoxY2** | **int** | | +**imageHeight** | **int** | | +**imageWidth** | **int** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mobile/openapi/doc/AssetFaceEntity.md b/mobile/openapi/doc/AssetFaceEntity.md deleted file mode 100644 index 1099373c6..000000000 --- a/mobile/openapi/doc/AssetFaceEntity.md +++ /dev/null @@ -1,25 +0,0 @@ -# openapi.model.AssetFaceEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**asset** | [**AssetEntity**](AssetEntity.md) | | -**assetId** | **String** | | -**boundingBoxX1** | **num** | | -**boundingBoxX2** | **num** | | -**boundingBoxY1** | **num** | | -**boundingBoxY2** | **num** | | -**embedding** | **List** | | [default to const []] -**imageHeight** | **num** | | -**imageWidth** | **num** | | -**person** | [**PersonEntity**](PersonEntity.md) | | -**personId** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/ExifEntity.md b/mobile/openapi/doc/ExifEntity.md deleted file mode 100644 index 13edbee87..000000000 --- a/mobile/openapi/doc/ExifEntity.md +++ /dev/null @@ -1,43 +0,0 @@ -# openapi.model.ExifEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**asset** | [**AssetEntity**](AssetEntity.md) | | [optional] -**assetId** | **String** | | -**bitsPerSample** | **num** | | -**city** | **String** | | -**colorspace** | **String** | | -**country** | **String** | | -**dateTimeOriginal** | [**DateTime**](DateTime.md) | | -**description** | **String** | General info | -**exifImageHeight** | **num** | | -**exifImageWidth** | **num** | | -**exifTextSearchableColumn** | **String** | | -**exposureTime** | **String** | | -**fNumber** | **num** | | -**fileSizeInByte** | **num** | | -**focalLength** | **num** | | -**fps** | **num** | Video info | [optional] -**iso** | **num** | | -**latitude** | **num** | | -**lensModel** | **String** | | -**livePhotoCID** | **String** | | -**longitude** | **num** | | -**make** | **String** | Image info | -**model** | **String** | | -**modifyDate** | [**DateTime**](DateTime.md) | | -**orientation** | **String** | | -**profileDescription** | **String** | | -**projectionType** | **String** | | -**state** | **String** | | -**timeZone** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/LibraryEntity.md b/mobile/openapi/doc/LibraryEntity.md deleted file mode 100644 index bcb65359a..000000000 --- a/mobile/openapi/doc/LibraryEntity.md +++ /dev/null @@ -1,27 +0,0 @@ -# openapi.model.LibraryEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | [**List**](AssetEntity.md) | | [default to const []] -**createdAt** | [**DateTime**](DateTime.md) | | -**deletedAt** | [**DateTime**](DateTime.md) | | [optional] -**exclusionPatterns** | **List** | | [default to const []] -**id** | **String** | | -**importPaths** | **List** | | [default to const []] -**isVisible** | **bool** | | -**name** | **String** | | -**owner** | [**UserEntity**](UserEntity.md) | | -**ownerId** | **String** | | -**refreshedAt** | [**DateTime**](DateTime.md) | | -**type** | **String** | | -**updatedAt** | [**DateTime**](DateTime.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/PersonApi.md b/mobile/openapi/doc/PersonApi.md index 24e74e722..da4d7170f 100644 --- a/mobile/openapi/doc/PersonApi.md +++ b/mobile/openapi/doc/PersonApi.md @@ -22,7 +22,7 @@ Method | HTTP request | Description # **createPerson** -> PersonEntity createPerson(assetFaceUpdateDto) +> PersonResponseDto createPerson(assetFaceUpdateDto) @@ -63,7 +63,7 @@ Name | Type | Description | Notes ### Return type -[**PersonEntity**](PersonEntity.md) +[**PersonResponseDto**](PersonResponseDto.md) ### Authorization @@ -132,7 +132,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getAssetFace** -> AssetFaceEntity getAssetFace(id, assetId) +> AssetFaceBoxDto getAssetFace(id, assetId) @@ -175,7 +175,7 @@ Name | Type | Description | Notes ### Return type -[**AssetFaceEntity**](AssetFaceEntity.md) +[**AssetFaceBoxDto**](AssetFaceBoxDto.md) ### Authorization diff --git a/mobile/openapi/doc/PersonEntity.md b/mobile/openapi/doc/PersonEntity.md deleted file mode 100644 index 2388a4ae6..000000000 --- a/mobile/openapi/doc/PersonEntity.md +++ /dev/null @@ -1,26 +0,0 @@ -# openapi.model.PersonEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**birthDate** | [**DateTime**](DateTime.md) | | -**createdAt** | [**DateTime**](DateTime.md) | | -**faceAsset** | [**AssetEntity**](AssetEntity.md) | | -**faceAssetId** | **String** | | -**faces** | [**List**](AssetFaceEntity.md) | | [default to const []] -**id** | **String** | | -**isHidden** | **bool** | | -**name** | **String** | | -**owner** | [**UserEntity**](UserEntity.md) | | -**ownerId** | **String** | | -**thumbnailPath** | **String** | | -**updatedAt** | [**DateTime**](DateTime.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/SharedLinkEntity.md b/mobile/openapi/doc/SharedLinkEntity.md deleted file mode 100644 index 1807d7c62..000000000 --- a/mobile/openapi/doc/SharedLinkEntity.md +++ /dev/null @@ -1,28 +0,0 @@ -# openapi.model.SharedLinkEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**album** | [**AlbumEntity**](AlbumEntity.md) | | [optional] -**albumId** | **String** | | -**allowDownload** | **bool** | | -**allowUpload** | **bool** | | -**assets** | [**List**](AssetEntity.md) | | [default to const []] -**createdAt** | [**DateTime**](DateTime.md) | | -**description** | **String** | | -**expiresAt** | [**DateTime**](DateTime.md) | | -**id** | **String** | | -**key** | [**Object**](.md) | | -**showExif** | **bool** | | -**type** | **String** | | -**user** | [**UserEntity**](UserEntity.md) | | -**userId** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/TagEntity.md b/mobile/openapi/doc/TagEntity.md deleted file mode 100644 index cfaee0395..000000000 --- a/mobile/openapi/doc/TagEntity.md +++ /dev/null @@ -1,21 +0,0 @@ -# openapi.model.TagEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | [**List**](AssetEntity.md) | | [default to const []] -**id** | **String** | | -**name** | **String** | | -**renameTagId** | **String** | | -**type** | **String** | | -**user** | [**UserEntity**](UserEntity.md) | | -**userId** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/doc/UserEntity.md b/mobile/openapi/doc/UserEntity.md deleted file mode 100644 index c63735717..000000000 --- a/mobile/openapi/doc/UserEntity.md +++ /dev/null @@ -1,31 +0,0 @@ -# openapi.model.UserEntity - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assets** | [**List**](AssetEntity.md) | | [default to const []] -**createdAt** | [**DateTime**](DateTime.md) | | -**deletedAt** | [**DateTime**](DateTime.md) | | -**email** | **String** | | -**externalPath** | **String** | | -**firstName** | **String** | | -**id** | **String** | | -**isAdmin** | **bool** | | -**lastName** | **String** | | -**memoriesEnabled** | **bool** | | -**oauthId** | **String** | | -**password** | **String** | | [optional] -**profileImagePath** | **String** | | -**shouldChangePassword** | **bool** | | -**storageLabel** | **String** | | -**tags** | [**List**](TagEntity.md) | | [default to const []] -**updatedAt** | [**DateTime**](DateTime.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index 3a76e677f..ba39fd1b7 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -52,7 +52,6 @@ part 'model/api_key_update_dto.dart'; part 'model/add_users_dto.dart'; part 'model/admin_signup_response_dto.dart'; part 'model/album_count_response_dto.dart'; -part 'model/album_entity.dart'; part 'model/album_response_dto.dart'; part 'model/all_job_status_response_dto.dart'; part 'model/asset_bulk_update_dto.dart'; @@ -60,8 +59,7 @@ part 'model/asset_bulk_upload_check_dto.dart'; part 'model/asset_bulk_upload_check_item.dart'; part 'model/asset_bulk_upload_check_response_dto.dart'; part 'model/asset_bulk_upload_check_result.dart'; -part 'model/asset_entity.dart'; -part 'model/asset_face_entity.dart'; +part 'model/asset_face_box_dto.dart'; part 'model/asset_face_update_dto.dart'; part 'model/asset_file_upload_response_dto.dart'; part 'model/asset_ids_dto.dart'; @@ -102,7 +100,6 @@ part 'model/download_archive_info.dart'; part 'model/download_info_dto.dart'; part 'model/download_response_dto.dart'; part 'model/entity_type.dart'; -part 'model/exif_entity.dart'; part 'model/exif_response_dto.dart'; part 'model/import_asset_dto.dart'; part 'model/job_command.dart'; @@ -111,7 +108,6 @@ part 'model/job_counts_dto.dart'; part 'model/job_name.dart'; part 'model/job_settings_dto.dart'; part 'model/job_status_dto.dart'; -part 'model/library_entity.dart'; part 'model/library_response_dto.dart'; part 'model/library_stats_response_dto.dart'; part 'model/library_type.dart'; @@ -129,7 +125,6 @@ part 'model/o_auth_config_response_dto.dart'; part 'model/people_response_dto.dart'; part 'model/people_update_dto.dart'; part 'model/people_update_item.dart'; -part 'model/person_entity.dart'; part 'model/person_response_dto.dart'; part 'model/person_update_dto.dart'; part 'model/queue_status_dto.dart'; @@ -152,11 +147,9 @@ part 'model/server_stats_response_dto.dart'; part 'model/server_version_response_dto.dart'; part 'model/shared_link_create_dto.dart'; part 'model/shared_link_edit_dto.dart'; -part 'model/shared_link_entity.dart'; part 'model/shared_link_response_dto.dart'; part 'model/shared_link_type.dart'; part 'model/sign_up_dto.dart'; -part 'model/smart_info_entity.dart'; part 'model/smart_info_response_dto.dart'; part 'model/system_config_dto.dart'; part 'model/system_config_f_fmpeg_dto.dart'; @@ -169,7 +162,6 @@ part 'model/system_config_reverse_geocoding_dto.dart'; part 'model/system_config_storage_template_dto.dart'; part 'model/system_config_template_storage_option_dto.dart'; part 'model/system_config_thumbnail_dto.dart'; -part 'model/tag_entity.dart'; part 'model/tag_response_dto.dart'; part 'model/tag_type_enum.dart'; part 'model/thumbnail_format.dart'; @@ -185,7 +177,6 @@ part 'model/update_tag_dto.dart'; part 'model/update_user_dto.dart'; part 'model/usage_by_user_dto.dart'; part 'model/user_count_response_dto.dart'; -part 'model/user_entity.dart'; part 'model/user_response_dto.dart'; part 'model/validate_access_token_response_dto.dart'; part 'model/video_codec.dart'; diff --git a/mobile/openapi/lib/api/person_api.dart b/mobile/openapi/lib/api/person_api.dart index a610a6439..dfb40c102 100644 --- a/mobile/openapi/lib/api/person_api.dart +++ b/mobile/openapi/lib/api/person_api.dart @@ -48,7 +48,7 @@ class PersonApi { /// Parameters: /// /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future createPerson(AssetFaceUpdateDto assetFaceUpdateDto,) async { + Future createPerson(AssetFaceUpdateDto assetFaceUpdateDto,) async { final response = await createPersonWithHttpInfo(assetFaceUpdateDto,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -57,7 +57,7 @@ class PersonApi { // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonEntity',) as PersonEntity; + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; } return null; @@ -152,7 +152,7 @@ class PersonApi { /// * [String] id (required): /// /// * [String] assetId (required): - Future getAssetFace(String id, String assetId,) async { + Future getAssetFace(String id, String assetId,) async { final response = await getAssetFaceWithHttpInfo(id, assetId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); @@ -161,7 +161,7 @@ class PersonApi { // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" // FormatException when trying to decode an empty string. if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetFaceEntity',) as AssetFaceEntity; + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetFaceBoxDto',) as AssetFaceBoxDto; } return null; diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index d62a4b8c8..fc26fbe15 100644 --- a/mobile/openapi/lib/api_client.dart +++ b/mobile/openapi/lib/api_client.dart @@ -195,8 +195,6 @@ class ApiClient { return AdminSignupResponseDto.fromJson(value); case 'AlbumCountResponseDto': return AlbumCountResponseDto.fromJson(value); - case 'AlbumEntity': - return AlbumEntity.fromJson(value); case 'AlbumResponseDto': return AlbumResponseDto.fromJson(value); case 'AllJobStatusResponseDto': @@ -211,10 +209,8 @@ class ApiClient { return AssetBulkUploadCheckResponseDto.fromJson(value); case 'AssetBulkUploadCheckResult': return AssetBulkUploadCheckResult.fromJson(value); - case 'AssetEntity': - return AssetEntity.fromJson(value); - case 'AssetFaceEntity': - return AssetFaceEntity.fromJson(value); + case 'AssetFaceBoxDto': + return AssetFaceBoxDto.fromJson(value); case 'AssetFaceUpdateDto': return AssetFaceUpdateDto.fromJson(value); case 'AssetFileUploadResponseDto': @@ -295,8 +291,6 @@ class ApiClient { return DownloadResponseDto.fromJson(value); case 'EntityType': return EntityTypeTypeTransformer().decode(value); - case 'ExifEntity': - return ExifEntity.fromJson(value); case 'ExifResponseDto': return ExifResponseDto.fromJson(value); case 'ImportAssetDto': @@ -313,8 +307,6 @@ class ApiClient { return JobSettingsDto.fromJson(value); case 'JobStatusDto': return JobStatusDto.fromJson(value); - case 'LibraryEntity': - return LibraryEntity.fromJson(value); case 'LibraryResponseDto': return LibraryResponseDto.fromJson(value); case 'LibraryStatsResponseDto': @@ -349,8 +341,6 @@ class ApiClient { return PeopleUpdateDto.fromJson(value); case 'PeopleUpdateItem': return PeopleUpdateItem.fromJson(value); - case 'PersonEntity': - return PersonEntity.fromJson(value); case 'PersonResponseDto': return PersonResponseDto.fromJson(value); case 'PersonUpdateDto': @@ -395,16 +385,12 @@ class ApiClient { return SharedLinkCreateDto.fromJson(value); case 'SharedLinkEditDto': return SharedLinkEditDto.fromJson(value); - case 'SharedLinkEntity': - return SharedLinkEntity.fromJson(value); case 'SharedLinkResponseDto': return SharedLinkResponseDto.fromJson(value); case 'SharedLinkType': return SharedLinkTypeTypeTransformer().decode(value); case 'SignUpDto': return SignUpDto.fromJson(value); - case 'SmartInfoEntity': - return SmartInfoEntity.fromJson(value); case 'SmartInfoResponseDto': return SmartInfoResponseDto.fromJson(value); case 'SystemConfigDto': @@ -429,8 +415,6 @@ class ApiClient { return SystemConfigTemplateStorageOptionDto.fromJson(value); case 'SystemConfigThumbnailDto': return SystemConfigThumbnailDto.fromJson(value); - case 'TagEntity': - return TagEntity.fromJson(value); case 'TagResponseDto': return TagResponseDto.fromJson(value); case 'TagTypeEnum': @@ -461,8 +445,6 @@ class ApiClient { return UsageByUserDto.fromJson(value); case 'UserCountResponseDto': return UserCountResponseDto.fromJson(value); - case 'UserEntity': - return UserEntity.fromJson(value); case 'UserResponseDto': return UserResponseDto.fromJson(value); case 'ValidateAccessTokenResponseDto': diff --git a/mobile/openapi/lib/model/album_entity.dart b/mobile/openapi/lib/model/album_entity.dart deleted file mode 100644 index 8bf4293c6..000000000 --- a/mobile/openapi/lib/model/album_entity.dart +++ /dev/null @@ -1,206 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumEntity { - /// Returns a new [AlbumEntity] instance. - AlbumEntity({ - required this.albumName, - required this.albumThumbnailAsset, - required this.albumThumbnailAssetId, - this.assets = const [], - required this.createdAt, - required this.deletedAt, - required this.description, - required this.id, - required this.owner, - required this.ownerId, - this.sharedLinks = const [], - this.sharedUsers = const [], - required this.updatedAt, - }); - - String albumName; - - AssetEntity? albumThumbnailAsset; - - String? albumThumbnailAssetId; - - List assets; - - DateTime createdAt; - - DateTime? deletedAt; - - String description; - - String id; - - UserEntity owner; - - String ownerId; - - List sharedLinks; - - List sharedUsers; - - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumEntity && - other.albumName == albumName && - other.albumThumbnailAsset == albumThumbnailAsset && - other.albumThumbnailAssetId == albumThumbnailAssetId && - other.assets == assets && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.description == description && - other.id == id && - other.owner == owner && - other.ownerId == ownerId && - other.sharedLinks == sharedLinks && - other.sharedUsers == sharedUsers && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumThumbnailAsset == null ? 0 : albumThumbnailAsset!.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (assets.hashCode) + - (createdAt.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (description.hashCode) + - (id.hashCode) + - (owner.hashCode) + - (ownerId.hashCode) + - (sharedLinks.hashCode) + - (sharedUsers.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'AlbumEntity[albumName=$albumName, albumThumbnailAsset=$albumThumbnailAsset, albumThumbnailAssetId=$albumThumbnailAssetId, assets=$assets, createdAt=$createdAt, deletedAt=$deletedAt, description=$description, id=$id, owner=$owner, ownerId=$ownerId, sharedLinks=$sharedLinks, sharedUsers=$sharedUsers, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumThumbnailAsset != null) { - json[r'albumThumbnailAsset'] = this.albumThumbnailAsset; - } else { - // json[r'albumThumbnailAsset'] = null; - } - if (this.albumThumbnailAssetId != null) { - json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; - } else { - // json[r'albumThumbnailAssetId'] = null; - } - json[r'assets'] = this.assets; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.deletedAt != null) { - json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String(); - } else { - // json[r'deletedAt'] = null; - } - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'owner'] = this.owner; - json[r'ownerId'] = this.ownerId; - json[r'sharedLinks'] = this.sharedLinks; - json[r'sharedUsers'] = this.sharedUsers; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [AlbumEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return AlbumEntity( - albumName: mapValueOfType(json, r'albumName')!, - albumThumbnailAsset: AssetEntity.fromJson(json[r'albumThumbnailAsset']), - albumThumbnailAssetId: mapValueOfType(json, r'albumThumbnailAssetId'), - assets: AssetEntity.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', '')!, - deletedAt: mapDateTime(json, r'deletedAt', ''), - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - owner: UserEntity.fromJson(json[r'owner'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - sharedLinks: SharedLinkEntity.listFromJson(json[r'sharedLinks']), - sharedUsers: UserEntity.listFromJson(json[r'sharedUsers']), - updatedAt: mapDateTime(json, r'updatedAt', '')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - 'albumThumbnailAsset', - 'albumThumbnailAssetId', - 'assets', - 'createdAt', - 'deletedAt', - 'description', - 'id', - 'owner', - 'ownerId', - 'sharedLinks', - 'sharedUsers', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/asset_entity.dart b/mobile/openapi/lib/model/asset_entity.dart deleted file mode 100644 index eaeba9e37..000000000 --- a/mobile/openapi/lib/model/asset_entity.dart +++ /dev/null @@ -1,499 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEntity { - /// Returns a new [AssetEntity] instance. - AssetEntity({ - this.albums = const [], - required this.checksum, - required this.createdAt, - required this.deviceAssetId, - required this.deviceId, - required this.duration, - required this.encodedVideoPath, - this.exifInfo, - this.faces = const [], - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.id, - required this.isArchived, - required this.isExternal, - required this.isFavorite, - required this.isOffline, - required this.isReadOnly, - required this.isVisible, - required this.library_, - required this.libraryId, - required this.livePhotoVideo, - required this.livePhotoVideoId, - required this.originalFileName, - required this.originalPath, - required this.owner, - required this.ownerId, - required this.resizePath, - this.sharedLinks = const [], - required this.sidecarPath, - this.smartInfo, - this.tags = const [], - required this.thumbhash, - required this.type, - required this.updatedAt, - required this.webpPath, - }); - - List albums; - - Object checksum; - - DateTime createdAt; - - String deviceAssetId; - - String deviceId; - - String? duration; - - String? encodedVideoPath; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - ExifEntity? exifInfo; - - List faces; - - DateTime fileCreatedAt; - - DateTime fileModifiedAt; - - String id; - - bool isArchived; - - bool isExternal; - - bool isFavorite; - - bool isOffline; - - bool isReadOnly; - - bool isVisible; - - LibraryEntity library_; - - String libraryId; - - AssetEntity? livePhotoVideo; - - String? livePhotoVideoId; - - String originalFileName; - - String originalPath; - - UserEntity owner; - - String ownerId; - - String? resizePath; - - List sharedLinks; - - String? sidecarPath; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - SmartInfoEntity? smartInfo; - - List tags; - - Object? thumbhash; - - AssetEntityTypeEnum type; - - DateTime updatedAt; - - String? webpPath; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEntity && - other.albums == albums && - other.checksum == checksum && - other.createdAt == createdAt && - other.deviceAssetId == deviceAssetId && - other.deviceId == deviceId && - other.duration == duration && - other.encodedVideoPath == encodedVideoPath && - other.exifInfo == exifInfo && - other.faces == faces && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.id == id && - other.isArchived == isArchived && - other.isExternal == isExternal && - other.isFavorite == isFavorite && - other.isOffline == isOffline && - other.isReadOnly == isReadOnly && - other.isVisible == isVisible && - other.library_ == library_ && - other.libraryId == libraryId && - other.livePhotoVideo == livePhotoVideo && - other.livePhotoVideoId == livePhotoVideoId && - other.originalFileName == originalFileName && - other.originalPath == originalPath && - other.owner == owner && - other.ownerId == ownerId && - other.resizePath == resizePath && - other.sharedLinks == sharedLinks && - other.sidecarPath == sidecarPath && - other.smartInfo == smartInfo && - other.tags == tags && - other.thumbhash == thumbhash && - other.type == type && - other.updatedAt == updatedAt && - other.webpPath == webpPath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (checksum.hashCode) + - (createdAt.hashCode) + - (deviceAssetId.hashCode) + - (deviceId.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + - (exifInfo == null ? 0 : exifInfo!.hashCode) + - (faces.hashCode) + - (fileCreatedAt.hashCode) + - (fileModifiedAt.hashCode) + - (id.hashCode) + - (isArchived.hashCode) + - (isExternal.hashCode) + - (isFavorite.hashCode) + - (isOffline.hashCode) + - (isReadOnly.hashCode) + - (isVisible.hashCode) + - (library_.hashCode) + - (libraryId.hashCode) + - (livePhotoVideo == null ? 0 : livePhotoVideo!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (originalFileName.hashCode) + - (originalPath.hashCode) + - (owner.hashCode) + - (ownerId.hashCode) + - (resizePath == null ? 0 : resizePath!.hashCode) + - (sharedLinks.hashCode) + - (sidecarPath == null ? 0 : sidecarPath!.hashCode) + - (smartInfo == null ? 0 : smartInfo!.hashCode) + - (tags.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode) + - (webpPath == null ? 0 : webpPath!.hashCode); - - @override - String toString() => 'AssetEntity[albums=$albums, checksum=$checksum, createdAt=$createdAt, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, faces=$faces, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, id=$id, isArchived=$isArchived, isExternal=$isExternal, isFavorite=$isFavorite, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, library_=$library_, libraryId=$libraryId, livePhotoVideo=$livePhotoVideo, livePhotoVideoId=$livePhotoVideoId, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, resizePath=$resizePath, sharedLinks=$sharedLinks, sidecarPath=$sidecarPath, smartInfo=$smartInfo, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt, webpPath=$webpPath]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'checksum'] = this.checksum; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'deviceAssetId'] = this.deviceAssetId; - json[r'deviceId'] = this.deviceId; - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - // json[r'duration'] = null; - } - if (this.encodedVideoPath != null) { - json[r'encodedVideoPath'] = this.encodedVideoPath; - } else { - // json[r'encodedVideoPath'] = null; - } - if (this.exifInfo != null) { - json[r'exifInfo'] = this.exifInfo; - } else { - // json[r'exifInfo'] = null; - } - json[r'faces'] = this.faces; - json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String(); - json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'isArchived'] = this.isArchived; - json[r'isExternal'] = this.isExternal; - json[r'isFavorite'] = this.isFavorite; - json[r'isOffline'] = this.isOffline; - json[r'isReadOnly'] = this.isReadOnly; - json[r'isVisible'] = this.isVisible; - json[r'library'] = this.library_; - json[r'libraryId'] = this.libraryId; - if (this.livePhotoVideo != null) { - json[r'livePhotoVideo'] = this.livePhotoVideo; - } else { - // json[r'livePhotoVideo'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - // json[r'livePhotoVideoId'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'originalPath'] = this.originalPath; - json[r'owner'] = this.owner; - json[r'ownerId'] = this.ownerId; - if (this.resizePath != null) { - json[r'resizePath'] = this.resizePath; - } else { - // json[r'resizePath'] = null; - } - json[r'sharedLinks'] = this.sharedLinks; - if (this.sidecarPath != null) { - json[r'sidecarPath'] = this.sidecarPath; - } else { - // json[r'sidecarPath'] = null; - } - if (this.smartInfo != null) { - json[r'smartInfo'] = this.smartInfo; - } else { - // json[r'smartInfo'] = null; - } - json[r'tags'] = this.tags; - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - // json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - if (this.webpPath != null) { - json[r'webpPath'] = this.webpPath; - } else { - // json[r'webpPath'] = null; - } - return json; - } - - /// Returns a new [AssetEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return AssetEntity( - albums: AlbumEntity.listFromJson(json[r'albums']), - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', '')!, - deviceAssetId: mapValueOfType(json, r'deviceAssetId')!, - deviceId: mapValueOfType(json, r'deviceId')!, - duration: mapValueOfType(json, r'duration'), - encodedVideoPath: mapValueOfType(json, r'encodedVideoPath'), - exifInfo: ExifEntity.fromJson(json[r'exifInfo']), - faces: AssetFaceEntity.listFromJson(json[r'faces']), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!, - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!, - id: mapValueOfType(json, r'id')!, - isArchived: mapValueOfType(json, r'isArchived')!, - isExternal: mapValueOfType(json, r'isExternal')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isOffline: mapValueOfType(json, r'isOffline')!, - isReadOnly: mapValueOfType(json, r'isReadOnly')!, - isVisible: mapValueOfType(json, r'isVisible')!, - library_: LibraryEntity.fromJson(json[r'library'])!, - libraryId: mapValueOfType(json, r'libraryId')!, - livePhotoVideo: AssetEntity.fromJson(json[r'livePhotoVideo']), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - originalPath: mapValueOfType(json, r'originalPath')!, - owner: UserEntity.fromJson(json[r'owner'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - resizePath: mapValueOfType(json, r'resizePath'), - sharedLinks: SharedLinkEntity.listFromJson(json[r'sharedLinks']), - sidecarPath: mapValueOfType(json, r'sidecarPath'), - smartInfo: SmartInfoEntity.fromJson(json[r'smartInfo']), - tags: TagEntity.listFromJson(json[r'tags']), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetEntityTypeEnum.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', '')!, - webpPath: mapValueOfType(json, r'webpPath'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deviceAssetId', - 'deviceId', - 'duration', - 'encodedVideoPath', - 'faces', - 'fileCreatedAt', - 'fileModifiedAt', - 'id', - 'isArchived', - 'isExternal', - 'isFavorite', - 'isOffline', - 'isReadOnly', - 'isVisible', - 'library', - 'libraryId', - 'livePhotoVideo', - 'livePhotoVideoId', - 'originalFileName', - 'originalPath', - 'owner', - 'ownerId', - 'resizePath', - 'sharedLinks', - 'sidecarPath', - 'tags', - 'thumbhash', - 'type', - 'updatedAt', - 'webpPath', - }; -} - - -class AssetEntityTypeEnum { - /// Instantiate a new enum with the provided [value]. - const AssetEntityTypeEnum._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const IMAGE = AssetEntityTypeEnum._(r'IMAGE'); - static const VIDEO = AssetEntityTypeEnum._(r'VIDEO'); - static const AUDIO = AssetEntityTypeEnum._(r'AUDIO'); - static const OTHER = AssetEntityTypeEnum._(r'OTHER'); - - /// List of all possible values in this [enum][AssetEntityTypeEnum]. - static const values = [ - IMAGE, - VIDEO, - AUDIO, - OTHER, - ]; - - static AssetEntityTypeEnum? fromJson(dynamic value) => AssetEntityTypeEnumTypeTransformer().decode(value); - - static List? listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEntityTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetEntityTypeEnum] to String, -/// and [decode] dynamic data back to [AssetEntityTypeEnum]. -class AssetEntityTypeEnumTypeTransformer { - factory AssetEntityTypeEnumTypeTransformer() => _instance ??= const AssetEntityTypeEnumTypeTransformer._(); - - const AssetEntityTypeEnumTypeTransformer._(); - - String encode(AssetEntityTypeEnum data) => data.value; - - /// Decodes a [dynamic value][data] to a AssetEntityTypeEnum. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'IMAGE': return AssetEntityTypeEnum.IMAGE; - case r'VIDEO': return AssetEntityTypeEnum.VIDEO; - case r'AUDIO': return AssetEntityTypeEnum.AUDIO; - case r'OTHER': return AssetEntityTypeEnum.OTHER; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [AssetEntityTypeEnumTypeTransformer] instance. - static AssetEntityTypeEnumTypeTransformer? _instance; -} - - diff --git a/mobile/openapi/lib/model/asset_face_box_dto.dart b/mobile/openapi/lib/model/asset_face_box_dto.dart new file mode 100644 index 000000000..dcfe4db7a --- /dev/null +++ b/mobile/openapi/lib/model/asset_face_box_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AssetFaceBoxDto { + /// Returns a new [AssetFaceBoxDto] instance. + AssetFaceBoxDto({ + required this.boundingBoxX1, + required this.boundingBoxX2, + required this.boundingBoxY1, + required this.boundingBoxY2, + required this.imageHeight, + required this.imageWidth, + }); + + int boundingBoxX1; + + int boundingBoxX2; + + int boundingBoxY1; + + int boundingBoxY2; + + int imageHeight; + + int imageWidth; + + @override + bool operator ==(Object other) => identical(this, other) || other is AssetFaceBoxDto && + other.boundingBoxX1 == boundingBoxX1 && + other.boundingBoxX2 == boundingBoxX2 && + other.boundingBoxY1 == boundingBoxY1 && + other.boundingBoxY2 == boundingBoxY2 && + other.imageHeight == imageHeight && + other.imageWidth == imageWidth; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (boundingBoxX1.hashCode) + + (boundingBoxX2.hashCode) + + (boundingBoxY1.hashCode) + + (boundingBoxY2.hashCode) + + (imageHeight.hashCode) + + (imageWidth.hashCode); + + @override + String toString() => 'AssetFaceBoxDto[boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, imageHeight=$imageHeight, imageWidth=$imageWidth]'; + + Map toJson() { + final json = {}; + json[r'boundingBoxX1'] = this.boundingBoxX1; + json[r'boundingBoxX2'] = this.boundingBoxX2; + json[r'boundingBoxY1'] = this.boundingBoxY1; + json[r'boundingBoxY2'] = this.boundingBoxY2; + json[r'imageHeight'] = this.imageHeight; + json[r'imageWidth'] = this.imageWidth; + return json; + } + + /// Returns a new [AssetFaceBoxDto] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AssetFaceBoxDto? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + return AssetFaceBoxDto( + boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, + boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, + boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, + boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, + imageHeight: mapValueOfType(json, r'imageHeight')!, + imageWidth: mapValueOfType(json, r'imageWidth')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AssetFaceBoxDto.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AssetFaceBoxDto.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AssetFaceBoxDto-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AssetFaceBoxDto.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'boundingBoxX1', + 'boundingBoxX2', + 'boundingBoxY1', + 'boundingBoxY2', + 'imageHeight', + 'imageWidth', + }; +} + diff --git a/mobile/openapi/lib/model/asset_face_entity.dart b/mobile/openapi/lib/model/asset_face_entity.dart deleted file mode 100644 index 127d99e6a..000000000 --- a/mobile/openapi/lib/model/asset_face_entity.dart +++ /dev/null @@ -1,196 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceEntity { - /// Returns a new [AssetFaceEntity] instance. - AssetFaceEntity({ - required this.asset, - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - this.embedding = const [], - required this.imageHeight, - required this.imageWidth, - required this.person, - required this.personId, - }); - - AssetEntity asset; - - String assetId; - - num boundingBoxX1; - - num boundingBoxX2; - - num boundingBoxY1; - - num boundingBoxY2; - - List? embedding; - - num imageHeight; - - num imageWidth; - - PersonEntity person; - - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceEntity && - other.asset == asset && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.embedding == embedding && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.person == person && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (asset.hashCode) + - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (embedding == null ? 0 : embedding!.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (person.hashCode) + - (personId.hashCode); - - @override - String toString() => 'AssetFaceEntity[asset=$asset, assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, embedding=$embedding, imageHeight=$imageHeight, imageWidth=$imageWidth, person=$person, personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'asset'] = this.asset; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - if (this.embedding != null) { - json[r'embedding'] = this.embedding; - } else { - // json[r'embedding'] = null; - } - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'person'] = this.person; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [AssetFaceEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return AssetFaceEntity( - asset: AssetEntity.fromJson(json[r'asset'])!, - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: json[r'boundingBoxX1'] == null - ? null - : num.parse(json[r'boundingBoxX1'].toString()), - boundingBoxX2: json[r'boundingBoxX2'] == null - ? null - : num.parse(json[r'boundingBoxX2'].toString()), - boundingBoxY1: json[r'boundingBoxY1'] == null - ? null - : num.parse(json[r'boundingBoxY1'].toString()), - boundingBoxY2: json[r'boundingBoxY2'] == null - ? null - : num.parse(json[r'boundingBoxY2'].toString()), - embedding: json[r'embedding'] is List - ? (json[r'embedding'] as List).cast() - : const [], - imageHeight: json[r'imageHeight'] == null - ? null - : num.parse(json[r'imageHeight'].toString()), - imageWidth: json[r'imageWidth'] == null - ? null - : num.parse(json[r'imageWidth'].toString()), - person: PersonEntity.fromJson(json[r'person'])!, - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'asset', - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'embedding', - 'imageHeight', - 'imageWidth', - 'person', - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/exif_entity.dart b/mobile/openapi/lib/model/exif_entity.dart deleted file mode 100644 index 95c080291..000000000 --- a/mobile/openapi/lib/model/exif_entity.dart +++ /dev/null @@ -1,453 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ExifEntity { - /// Returns a new [ExifEntity] instance. - ExifEntity({ - this.asset, - required this.assetId, - required this.bitsPerSample, - required this.city, - required this.colorspace, - required this.country, - required this.dateTimeOriginal, - required this.description, - required this.exifImageHeight, - required this.exifImageWidth, - required this.exifTextSearchableColumn, - required this.exposureTime, - required this.fNumber, - required this.fileSizeInByte, - required this.focalLength, - this.fps, - required this.iso, - required this.latitude, - required this.lensModel, - required this.livePhotoCID, - required this.longitude, - required this.make, - required this.model, - required this.modifyDate, - required this.orientation, - required this.profileDescription, - required this.projectionType, - required this.state, - required this.timeZone, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - AssetEntity? asset; - - String assetId; - - num? bitsPerSample; - - String? city; - - String? colorspace; - - String? country; - - DateTime? dateTimeOriginal; - - /// General info - String description; - - num? exifImageHeight; - - num? exifImageWidth; - - String exifTextSearchableColumn; - - String? exposureTime; - - num? fNumber; - - num? fileSizeInByte; - - num? focalLength; - - /// Video info - num? fps; - - num? iso; - - num? latitude; - - String? lensModel; - - String? livePhotoCID; - - num? longitude; - - /// Image info - String? make; - - String? model; - - DateTime? modifyDate; - - String? orientation; - - String? profileDescription; - - String? projectionType; - - String? state; - - String? timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is ExifEntity && - other.asset == asset && - other.assetId == assetId && - other.bitsPerSample == bitsPerSample && - other.city == city && - other.colorspace == colorspace && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exifTextSearchableColumn == exifTextSearchableColumn && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.fps == fps && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.livePhotoCID == livePhotoCID && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.profileDescription == profileDescription && - other.projectionType == projectionType && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (asset == null ? 0 : asset!.hashCode) + - (assetId.hashCode) + - (bitsPerSample == null ? 0 : bitsPerSample!.hashCode) + - (city == null ? 0 : city!.hashCode) + - (colorspace == null ? 0 : colorspace!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exifTextSearchableColumn.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (fps == null ? 0 : fps!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (livePhotoCID == null ? 0 : livePhotoCID!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (profileDescription == null ? 0 : profileDescription!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'ExifEntity[asset=$asset, assetId=$assetId, bitsPerSample=$bitsPerSample, city=$city, colorspace=$colorspace, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exifTextSearchableColumn=$exifTextSearchableColumn, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, fps=$fps, iso=$iso, latitude=$latitude, lensModel=$lensModel, livePhotoCID=$livePhotoCID, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, profileDescription=$profileDescription, projectionType=$projectionType, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - if (this.asset != null) { - json[r'asset'] = this.asset; - } else { - // json[r'asset'] = null; - } - json[r'assetId'] = this.assetId; - if (this.bitsPerSample != null) { - json[r'bitsPerSample'] = this.bitsPerSample; - } else { - // json[r'bitsPerSample'] = null; - } - if (this.city != null) { - json[r'city'] = this.city; - } else { - // json[r'city'] = null; - } - if (this.colorspace != null) { - json[r'colorspace'] = this.colorspace; - } else { - // json[r'colorspace'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - // json[r'country'] = null; - } - if (this.dateTimeOriginal != null) { - json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String(); - } else { - // json[r'dateTimeOriginal'] = null; - } - json[r'description'] = this.description; - if (this.exifImageHeight != null) { - json[r'exifImageHeight'] = this.exifImageHeight; - } else { - // json[r'exifImageHeight'] = null; - } - if (this.exifImageWidth != null) { - json[r'exifImageWidth'] = this.exifImageWidth; - } else { - // json[r'exifImageWidth'] = null; - } - json[r'exifTextSearchableColumn'] = this.exifTextSearchableColumn; - if (this.exposureTime != null) { - json[r'exposureTime'] = this.exposureTime; - } else { - // json[r'exposureTime'] = null; - } - if (this.fNumber != null) { - json[r'fNumber'] = this.fNumber; - } else { - // json[r'fNumber'] = null; - } - if (this.fileSizeInByte != null) { - json[r'fileSizeInByte'] = this.fileSizeInByte; - } else { - // json[r'fileSizeInByte'] = null; - } - if (this.focalLength != null) { - json[r'focalLength'] = this.focalLength; - } else { - // json[r'focalLength'] = null; - } - if (this.fps != null) { - json[r'fps'] = this.fps; - } else { - // json[r'fps'] = null; - } - if (this.iso != null) { - json[r'iso'] = this.iso; - } else { - // json[r'iso'] = null; - } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; - } else { - // json[r'latitude'] = null; - } - if (this.lensModel != null) { - json[r'lensModel'] = this.lensModel; - } else { - // json[r'lensModel'] = null; - } - if (this.livePhotoCID != null) { - json[r'livePhotoCID'] = this.livePhotoCID; - } else { - // json[r'livePhotoCID'] = null; - } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; - } else { - // json[r'longitude'] = null; - } - if (this.make != null) { - json[r'make'] = this.make; - } else { - // json[r'make'] = null; - } - if (this.model != null) { - json[r'model'] = this.model; - } else { - // json[r'model'] = null; - } - if (this.modifyDate != null) { - json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String(); - } else { - // json[r'modifyDate'] = null; - } - if (this.orientation != null) { - json[r'orientation'] = this.orientation; - } else { - // json[r'orientation'] = null; - } - if (this.profileDescription != null) { - json[r'profileDescription'] = this.profileDescription; - } else { - // json[r'profileDescription'] = null; - } - if (this.projectionType != null) { - json[r'projectionType'] = this.projectionType; - } else { - // json[r'projectionType'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - // json[r'state'] = null; - } - if (this.timeZone != null) { - json[r'timeZone'] = this.timeZone; - } else { - // json[r'timeZone'] = null; - } - return json; - } - - /// Returns a new [ExifEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ExifEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return ExifEntity( - asset: AssetEntity.fromJson(json[r'asset']), - assetId: mapValueOfType(json, r'assetId')!, - bitsPerSample: json[r'bitsPerSample'] == null - ? null - : num.parse(json[r'bitsPerSample'].toString()), - city: mapValueOfType(json, r'city'), - colorspace: mapValueOfType(json, r'colorspace'), - country: mapValueOfType(json, r'country'), - dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', ''), - description: mapValueOfType(json, r'description')!, - exifImageHeight: json[r'exifImageHeight'] == null - ? null - : num.parse(json[r'exifImageHeight'].toString()), - exifImageWidth: json[r'exifImageWidth'] == null - ? null - : num.parse(json[r'exifImageWidth'].toString()), - exifTextSearchableColumn: mapValueOfType(json, r'exifTextSearchableColumn')!, - exposureTime: mapValueOfType(json, r'exposureTime'), - fNumber: json[r'fNumber'] == null - ? null - : num.parse(json[r'fNumber'].toString()), - fileSizeInByte: json[r'fileSizeInByte'] == null - ? null - : num.parse(json[r'fileSizeInByte'].toString()), - focalLength: json[r'focalLength'] == null - ? null - : num.parse(json[r'focalLength'].toString()), - fps: json[r'fps'] == null - ? null - : num.parse(json[r'fps'].toString()), - iso: json[r'iso'] == null - ? null - : num.parse(json[r'iso'].toString()), - latitude: json[r'latitude'] == null - ? null - : num.parse(json[r'latitude'].toString()), - lensModel: mapValueOfType(json, r'lensModel'), - livePhotoCID: mapValueOfType(json, r'livePhotoCID'), - longitude: json[r'longitude'] == null - ? null - : num.parse(json[r'longitude'].toString()), - make: mapValueOfType(json, r'make'), - model: mapValueOfType(json, r'model'), - modifyDate: mapDateTime(json, r'modifyDate', ''), - orientation: mapValueOfType(json, r'orientation'), - profileDescription: mapValueOfType(json, r'profileDescription'), - projectionType: mapValueOfType(json, r'projectionType'), - state: mapValueOfType(json, r'state'), - timeZone: mapValueOfType(json, r'timeZone'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ExifEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ExifEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ExifEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ExifEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'bitsPerSample', - 'city', - 'colorspace', - 'country', - 'dateTimeOriginal', - 'description', - 'exifImageHeight', - 'exifImageWidth', - 'exifTextSearchableColumn', - 'exposureTime', - 'fNumber', - 'fileSizeInByte', - 'focalLength', - 'iso', - 'latitude', - 'lensModel', - 'livePhotoCID', - 'longitude', - 'make', - 'model', - 'modifyDate', - 'orientation', - 'profileDescription', - 'projectionType', - 'state', - 'timeZone', - }; -} - diff --git a/mobile/openapi/lib/model/library_entity.dart b/mobile/openapi/lib/model/library_entity.dart deleted file mode 100644 index eac225131..000000000 --- a/mobile/openapi/lib/model/library_entity.dart +++ /dev/null @@ -1,285 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LibraryEntity { - /// Returns a new [LibraryEntity] instance. - LibraryEntity({ - this.assets = const [], - required this.createdAt, - this.deletedAt, - this.exclusionPatterns = const [], - required this.id, - this.importPaths = const [], - required this.isVisible, - required this.name, - required this.owner, - required this.ownerId, - required this.refreshedAt, - required this.type, - required this.updatedAt, - }); - - List assets; - - DateTime createdAt; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - DateTime? deletedAt; - - List exclusionPatterns; - - String id; - - List importPaths; - - bool isVisible; - - String name; - - UserEntity owner; - - String ownerId; - - DateTime? refreshedAt; - - LibraryEntityTypeEnum type; - - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryEntity && - other.assets == assets && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.exclusionPatterns == exclusionPatterns && - other.id == id && - other.importPaths == importPaths && - other.isVisible == isVisible && - other.name == name && - other.owner == owner && - other.ownerId == ownerId && - other.refreshedAt == refreshedAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (createdAt.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (exclusionPatterns.hashCode) + - (id.hashCode) + - (importPaths.hashCode) + - (isVisible.hashCode) + - (name.hashCode) + - (owner.hashCode) + - (ownerId.hashCode) + - (refreshedAt == null ? 0 : refreshedAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'LibraryEntity[assets=$assets, createdAt=$createdAt, deletedAt=$deletedAt, exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, isVisible=$isVisible, name=$name, owner=$owner, ownerId=$ownerId, refreshedAt=$refreshedAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.deletedAt != null) { - json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String(); - } else { - // json[r'deletedAt'] = null; - } - json[r'exclusionPatterns'] = this.exclusionPatterns; - json[r'id'] = this.id; - json[r'importPaths'] = this.importPaths; - json[r'isVisible'] = this.isVisible; - json[r'name'] = this.name; - json[r'owner'] = this.owner; - json[r'ownerId'] = this.ownerId; - if (this.refreshedAt != null) { - json[r'refreshedAt'] = this.refreshedAt!.toUtc().toIso8601String(); - } else { - // json[r'refreshedAt'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [LibraryEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return LibraryEntity( - assets: AssetEntity.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', '')!, - deletedAt: mapDateTime(json, r'deletedAt', ''), - exclusionPatterns: json[r'exclusionPatterns'] is List - ? (json[r'exclusionPatterns'] as List).cast() - : const [], - id: mapValueOfType(json, r'id')!, - importPaths: json[r'importPaths'] is List - ? (json[r'importPaths'] as List).cast() - : const [], - isVisible: mapValueOfType(json, r'isVisible')!, - name: mapValueOfType(json, r'name')!, - owner: UserEntity.fromJson(json[r'owner'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - refreshedAt: mapDateTime(json, r'refreshedAt', ''), - type: LibraryEntityTypeEnum.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', '')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'createdAt', - 'exclusionPatterns', - 'id', - 'importPaths', - 'isVisible', - 'name', - 'owner', - 'ownerId', - 'refreshedAt', - 'type', - 'updatedAt', - }; -} - - -class LibraryEntityTypeEnum { - /// Instantiate a new enum with the provided [value]. - const LibraryEntityTypeEnum._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const UPLOAD = LibraryEntityTypeEnum._(r'UPLOAD'); - static const EXTERNAL = LibraryEntityTypeEnum._(r'EXTERNAL'); - - /// List of all possible values in this [enum][LibraryEntityTypeEnum]. - static const values = [ - UPLOAD, - EXTERNAL, - ]; - - static LibraryEntityTypeEnum? fromJson(dynamic value) => LibraryEntityTypeEnumTypeTransformer().decode(value); - - static List? listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryEntityTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [LibraryEntityTypeEnum] to String, -/// and [decode] dynamic data back to [LibraryEntityTypeEnum]. -class LibraryEntityTypeEnumTypeTransformer { - factory LibraryEntityTypeEnumTypeTransformer() => _instance ??= const LibraryEntityTypeEnumTypeTransformer._(); - - const LibraryEntityTypeEnumTypeTransformer._(); - - String encode(LibraryEntityTypeEnum data) => data.value; - - /// Decodes a [dynamic value][data] to a LibraryEntityTypeEnum. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - LibraryEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'UPLOAD': return LibraryEntityTypeEnum.UPLOAD; - case r'EXTERNAL': return LibraryEntityTypeEnum.EXTERNAL; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [LibraryEntityTypeEnumTypeTransformer] instance. - static LibraryEntityTypeEnumTypeTransformer? _instance; -} - - diff --git a/mobile/openapi/lib/model/person_entity.dart b/mobile/openapi/lib/model/person_entity.dart deleted file mode 100644 index 6bd07bc57..000000000 --- a/mobile/openapi/lib/model/person_entity.dart +++ /dev/null @@ -1,198 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonEntity { - /// Returns a new [PersonEntity] instance. - PersonEntity({ - required this.birthDate, - required this.createdAt, - required this.faceAsset, - required this.faceAssetId, - this.faces = const [], - required this.id, - required this.isHidden, - required this.name, - required this.owner, - required this.ownerId, - required this.thumbnailPath, - required this.updatedAt, - }); - - DateTime? birthDate; - - DateTime createdAt; - - AssetEntity? faceAsset; - - String? faceAssetId; - - List faces; - - String id; - - bool isHidden; - - String name; - - UserEntity owner; - - String ownerId; - - String thumbnailPath; - - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonEntity && - other.birthDate == birthDate && - other.createdAt == createdAt && - other.faceAsset == faceAsset && - other.faceAssetId == faceAssetId && - other.faces == faces && - other.id == id && - other.isHidden == isHidden && - other.name == name && - other.owner == owner && - other.ownerId == ownerId && - other.thumbnailPath == thumbnailPath && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (createdAt.hashCode) + - (faceAsset == null ? 0 : faceAsset!.hashCode) + - (faceAssetId == null ? 0 : faceAssetId!.hashCode) + - (faces.hashCode) + - (id.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (owner.hashCode) + - (ownerId.hashCode) + - (thumbnailPath.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'PersonEntity[birthDate=$birthDate, createdAt=$createdAt, faceAsset=$faceAsset, faceAssetId=$faceAssetId, faces=$faces, id=$id, isHidden=$isHidden, name=$name, owner=$owner, ownerId=$ownerId, thumbnailPath=$thumbnailPath, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = this.birthDate!.toUtc().toIso8601String(); - } else { - // json[r'birthDate'] = null; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.faceAsset != null) { - json[r'faceAsset'] = this.faceAsset; - } else { - // json[r'faceAsset'] = null; - } - if (this.faceAssetId != null) { - json[r'faceAssetId'] = this.faceAssetId; - } else { - // json[r'faceAssetId'] = null; - } - json[r'faces'] = this.faces; - json[r'id'] = this.id; - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'owner'] = this.owner; - json[r'ownerId'] = this.ownerId; - json[r'thumbnailPath'] = this.thumbnailPath; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [PersonEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return PersonEntity( - birthDate: mapDateTime(json, r'birthDate', ''), - createdAt: mapDateTime(json, r'createdAt', '')!, - faceAsset: AssetEntity.fromJson(json[r'faceAsset']), - faceAssetId: mapValueOfType(json, r'faceAssetId'), - faces: AssetFaceEntity.listFromJson(json[r'faces']), - id: mapValueOfType(json, r'id')!, - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - owner: UserEntity.fromJson(json[r'owner'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - thumbnailPath: mapValueOfType(json, r'thumbnailPath')!, - updatedAt: mapDateTime(json, r'updatedAt', '')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'createdAt', - 'faceAsset', - 'faceAssetId', - 'faces', - 'id', - 'isHidden', - 'name', - 'owner', - 'ownerId', - 'thumbnailPath', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_entity.dart b/mobile/openapi/lib/model/shared_link_entity.dart deleted file mode 100644 index 5017f9319..000000000 --- a/mobile/openapi/lib/model/shared_link_entity.dart +++ /dev/null @@ -1,297 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkEntity { - /// Returns a new [SharedLinkEntity] instance. - SharedLinkEntity({ - this.album, - required this.albumId, - required this.allowDownload, - required this.allowUpload, - this.assets = const [], - required this.createdAt, - required this.description, - required this.expiresAt, - required this.id, - required this.key, - required this.showExif, - required this.type, - required this.user, - required this.userId, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - AlbumEntity? album; - - String? albumId; - - bool allowDownload; - - bool allowUpload; - - List assets; - - DateTime createdAt; - - String? description; - - DateTime? expiresAt; - - String id; - - Object key; - - bool showExif; - - SharedLinkEntityTypeEnum type; - - UserEntity user; - - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkEntity && - other.album == album && - other.albumId == albumId && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - other.assets == assets && - other.createdAt == createdAt && - other.description == description && - other.expiresAt == expiresAt && - other.id == id && - other.key == key && - other.showExif == showExif && - other.type == type && - other.user == user && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (album == null ? 0 : album!.hashCode) + - (albumId == null ? 0 : albumId!.hashCode) + - (allowDownload.hashCode) + - (allowUpload.hashCode) + - (assets.hashCode) + - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (key.hashCode) + - (showExif.hashCode) + - (type.hashCode) + - (user.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SharedLinkEntity[album=$album, albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, showExif=$showExif, type=$type, user=$user, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.album != null) { - json[r'album'] = this.album; - } else { - // json[r'album'] = null; - } - if (this.albumId != null) { - json[r'albumId'] = this.albumId; - } else { - // json[r'albumId'] = null; - } - json[r'allowDownload'] = this.allowDownload; - json[r'allowUpload'] = this.allowUpload; - json[r'assets'] = this.assets; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.description != null) { - json[r'description'] = this.description; - } else { - // json[r'description'] = null; - } - if (this.expiresAt != null) { - json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String(); - } else { - // json[r'expiresAt'] = null; - } - json[r'id'] = this.id; - json[r'key'] = this.key; - json[r'showExif'] = this.showExif; - json[r'type'] = this.type; - json[r'user'] = this.user; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SharedLinkEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return SharedLinkEntity( - album: AlbumEntity.fromJson(json[r'album']), - albumId: mapValueOfType(json, r'albumId'), - allowDownload: mapValueOfType(json, r'allowDownload')!, - allowUpload: mapValueOfType(json, r'allowUpload')!, - assets: AssetEntity.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', '')!, - description: mapValueOfType(json, r'description'), - expiresAt: mapDateTime(json, r'expiresAt', ''), - id: mapValueOfType(json, r'id')!, - key: mapValueOfType(json, r'key')!, - showExif: mapValueOfType(json, r'showExif')!, - type: SharedLinkEntityTypeEnum.fromJson(json[r'type'])!, - user: UserEntity.fromJson(json[r'user'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'allowDownload', - 'allowUpload', - 'assets', - 'createdAt', - 'description', - 'expiresAt', - 'id', - 'key', - 'showExif', - 'type', - 'user', - 'userId', - }; -} - - -class SharedLinkEntityTypeEnum { - /// Instantiate a new enum with the provided [value]. - const SharedLinkEntityTypeEnum._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const ALBUM = SharedLinkEntityTypeEnum._(r'ALBUM'); - static const INDIVIDUAL = SharedLinkEntityTypeEnum._(r'INDIVIDUAL'); - - /// List of all possible values in this [enum][SharedLinkEntityTypeEnum]. - static const values = [ - ALBUM, - INDIVIDUAL, - ]; - - static SharedLinkEntityTypeEnum? fromJson(dynamic value) => SharedLinkEntityTypeEnumTypeTransformer().decode(value); - - static List? listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkEntityTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SharedLinkEntityTypeEnum] to String, -/// and [decode] dynamic data back to [SharedLinkEntityTypeEnum]. -class SharedLinkEntityTypeEnumTypeTransformer { - factory SharedLinkEntityTypeEnumTypeTransformer() => _instance ??= const SharedLinkEntityTypeEnumTypeTransformer._(); - - const SharedLinkEntityTypeEnumTypeTransformer._(); - - String encode(SharedLinkEntityTypeEnum data) => data.value; - - /// Decodes a [dynamic value][data] to a SharedLinkEntityTypeEnum. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SharedLinkEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'ALBUM': return SharedLinkEntityTypeEnum.ALBUM; - case r'INDIVIDUAL': return SharedLinkEntityTypeEnum.INDIVIDUAL; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [SharedLinkEntityTypeEnumTypeTransformer] instance. - static SharedLinkEntityTypeEnumTypeTransformer? _instance; -} - - diff --git a/mobile/openapi/lib/model/smart_info_entity.dart b/mobile/openapi/lib/model/smart_info_entity.dart deleted file mode 100644 index b9f39d9fb..000000000 --- a/mobile/openapi/lib/model/smart_info_entity.dart +++ /dev/null @@ -1,157 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SmartInfoEntity { - /// Returns a new [SmartInfoEntity] instance. - SmartInfoEntity({ - this.asset, - required this.assetId, - this.clipEmbedding = const [], - this.objects = const [], - this.tags = const [], - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - AssetEntity? asset; - - String assetId; - - List? clipEmbedding; - - List? objects; - - List? tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is SmartInfoEntity && - other.asset == asset && - other.assetId == assetId && - other.clipEmbedding == clipEmbedding && - other.objects == objects && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (asset == null ? 0 : asset!.hashCode) + - (assetId.hashCode) + - (clipEmbedding == null ? 0 : clipEmbedding!.hashCode) + - (objects == null ? 0 : objects!.hashCode) + - (tags == null ? 0 : tags!.hashCode); - - @override - String toString() => 'SmartInfoEntity[asset=$asset, assetId=$assetId, clipEmbedding=$clipEmbedding, objects=$objects, tags=$tags]'; - - Map toJson() { - final json = {}; - if (this.asset != null) { - json[r'asset'] = this.asset; - } else { - // json[r'asset'] = null; - } - json[r'assetId'] = this.assetId; - if (this.clipEmbedding != null) { - json[r'clipEmbedding'] = this.clipEmbedding; - } else { - // json[r'clipEmbedding'] = null; - } - if (this.objects != null) { - json[r'objects'] = this.objects; - } else { - // json[r'objects'] = null; - } - if (this.tags != null) { - json[r'tags'] = this.tags; - } else { - // json[r'tags'] = null; - } - return json; - } - - /// Returns a new [SmartInfoEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SmartInfoEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return SmartInfoEntity( - asset: AssetEntity.fromJson(json[r'asset']), - assetId: mapValueOfType(json, r'assetId')!, - clipEmbedding: json[r'clipEmbedding'] is List - ? (json[r'clipEmbedding'] as List).cast() - : const [], - objects: json[r'objects'] is List - ? (json[r'objects'] as List).cast() - : const [], - tags: json[r'tags'] is List - ? (json[r'tags'] as List).cast() - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SmartInfoEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SmartInfoEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SmartInfoEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SmartInfoEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'clipEmbedding', - 'objects', - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/tag_entity.dart b/mobile/openapi/lib/model/tag_entity.dart deleted file mode 100644 index 23c9c8ac1..000000000 --- a/mobile/openapi/lib/model/tag_entity.dart +++ /dev/null @@ -1,227 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagEntity { - /// Returns a new [TagEntity] instance. - TagEntity({ - this.assets = const [], - required this.id, - required this.name, - required this.renameTagId, - required this.type, - required this.user, - required this.userId, - }); - - List assets; - - String id; - - String name; - - String? renameTagId; - - TagEntityTypeEnum type; - - UserEntity user; - - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagEntity && - other.assets == assets && - other.id == id && - other.name == name && - other.renameTagId == renameTagId && - other.type == type && - other.user == user && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (id.hashCode) + - (name.hashCode) + - (renameTagId == null ? 0 : renameTagId!.hashCode) + - (type.hashCode) + - (user.hashCode) + - (userId.hashCode); - - @override - String toString() => 'TagEntity[assets=$assets, id=$id, name=$name, renameTagId=$renameTagId, type=$type, user=$user, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'id'] = this.id; - json[r'name'] = this.name; - if (this.renameTagId != null) { - json[r'renameTagId'] = this.renameTagId; - } else { - // json[r'renameTagId'] = null; - } - json[r'type'] = this.type; - json[r'user'] = this.user; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [TagEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return TagEntity( - assets: AssetEntity.listFromJson(json[r'assets']), - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - renameTagId: mapValueOfType(json, r'renameTagId'), - type: TagEntityTypeEnum.fromJson(json[r'type'])!, - user: UserEntity.fromJson(json[r'user'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'id', - 'name', - 'renameTagId', - 'type', - 'user', - 'userId', - }; -} - - -class TagEntityTypeEnum { - /// Instantiate a new enum with the provided [value]. - const TagEntityTypeEnum._(this.value); - - /// The underlying value of this enum member. - final String value; - - @override - String toString() => value; - - String toJson() => value; - - static const OBJECT = TagEntityTypeEnum._(r'OBJECT'); - static const FACE = TagEntityTypeEnum._(r'FACE'); - static const CUSTOM = TagEntityTypeEnum._(r'CUSTOM'); - - /// List of all possible values in this [enum][TagEntityTypeEnum]. - static const values = [ - OBJECT, - FACE, - CUSTOM, - ]; - - static TagEntityTypeEnum? fromJson(dynamic value) => TagEntityTypeEnumTypeTransformer().decode(value); - - static List? listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagEntityTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TagEntityTypeEnum] to String, -/// and [decode] dynamic data back to [TagEntityTypeEnum]. -class TagEntityTypeEnumTypeTransformer { - factory TagEntityTypeEnumTypeTransformer() => _instance ??= const TagEntityTypeEnumTypeTransformer._(); - - const TagEntityTypeEnumTypeTransformer._(); - - String encode(TagEntityTypeEnum data) => data.value; - - /// Decodes a [dynamic value][data] to a TagEntityTypeEnum. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - TagEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { - switch (data) { - case r'OBJECT': return TagEntityTypeEnum.OBJECT; - case r'FACE': return TagEntityTypeEnum.FACE; - case r'CUSTOM': return TagEntityTypeEnum.CUSTOM; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// Singleton [TagEntityTypeEnumTypeTransformer] instance. - static TagEntityTypeEnumTypeTransformer? _instance; -} - - diff --git a/mobile/openapi/lib/model/user_entity.dart b/mobile/openapi/lib/model/user_entity.dart deleted file mode 100644 index 8994d5149..000000000 --- a/mobile/openapi/lib/model/user_entity.dart +++ /dev/null @@ -1,247 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserEntity { - /// Returns a new [UserEntity] instance. - UserEntity({ - this.assets = const [], - required this.createdAt, - required this.deletedAt, - required this.email, - required this.externalPath, - required this.firstName, - required this.id, - required this.isAdmin, - required this.lastName, - required this.memoriesEnabled, - required this.oauthId, - this.password, - required this.profileImagePath, - required this.shouldChangePassword, - required this.storageLabel, - this.tags = const [], - required this.updatedAt, - }); - - List assets; - - DateTime createdAt; - - DateTime? deletedAt; - - String email; - - String? externalPath; - - String firstName; - - String id; - - bool isAdmin; - - String lastName; - - bool memoriesEnabled; - - String oauthId; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - String? password; - - String profileImagePath; - - bool shouldChangePassword; - - String? storageLabel; - - List tags; - - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserEntity && - other.assets == assets && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.email == email && - other.externalPath == externalPath && - other.firstName == firstName && - other.id == id && - other.isAdmin == isAdmin && - other.lastName == lastName && - other.memoriesEnabled == memoriesEnabled && - other.oauthId == oauthId && - other.password == password && - other.profileImagePath == profileImagePath && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel && - other.tags == tags && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (createdAt.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (externalPath == null ? 0 : externalPath!.hashCode) + - (firstName.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (lastName.hashCode) + - (memoriesEnabled.hashCode) + - (oauthId.hashCode) + - (password == null ? 0 : password!.hashCode) + - (profileImagePath.hashCode) + - (shouldChangePassword.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode) + - (tags.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'UserEntity[assets=$assets, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, oauthId=$oauthId, password=$password, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, tags=$tags, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.deletedAt != null) { - json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String(); - } else { - // json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - if (this.externalPath != null) { - json[r'externalPath'] = this.externalPath; - } else { - // json[r'externalPath'] = null; - } - json[r'firstName'] = this.firstName; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - json[r'lastName'] = this.lastName; - json[r'memoriesEnabled'] = this.memoriesEnabled; - json[r'oauthId'] = this.oauthId; - if (this.password != null) { - json[r'password'] = this.password; - } else { - // json[r'password'] = null; - } - json[r'profileImagePath'] = this.profileImagePath; - json[r'shouldChangePassword'] = this.shouldChangePassword; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - // json[r'storageLabel'] = null; - } - json[r'tags'] = this.tags; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [UserEntity] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserEntity? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - return UserEntity( - assets: AssetEntity.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', '')!, - deletedAt: mapDateTime(json, r'deletedAt', ''), - email: mapValueOfType(json, r'email')!, - externalPath: mapValueOfType(json, r'externalPath'), - firstName: mapValueOfType(json, r'firstName')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - lastName: mapValueOfType(json, r'lastName')!, - memoriesEnabled: mapValueOfType(json, r'memoriesEnabled')!, - oauthId: mapValueOfType(json, r'oauthId')!, - password: mapValueOfType(json, r'password'), - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - storageLabel: mapValueOfType(json, r'storageLabel'), - tags: TagEntity.listFromJson(json[r'tags']), - updatedAt: mapDateTime(json, r'updatedAt', '')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserEntity.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserEntity.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserEntity-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserEntity.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'createdAt', - 'deletedAt', - 'email', - 'externalPath', - 'firstName', - 'id', - 'isAdmin', - 'lastName', - 'memoriesEnabled', - 'oauthId', - 'profileImagePath', - 'shouldChangePassword', - 'storageLabel', - 'tags', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/test/album_entity_test.dart b/mobile/openapi/test/album_entity_test.dart deleted file mode 100644 index 0f6c47770..000000000 --- a/mobile/openapi/test/album_entity_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for AlbumEntity -void main() { - // final instance = AlbumEntity(); - - group('test AlbumEntity', () { - // String albumName - test('to test the property `albumName`', () async { - // TODO - }); - - // AssetEntity albumThumbnailAsset - test('to test the property `albumThumbnailAsset`', () async { - // TODO - }); - - // String albumThumbnailAssetId - test('to test the property `albumThumbnailAssetId`', () async { - // TODO - }); - - // List assets (default value: const []) - test('to test the property `assets`', () async { - // TODO - }); - - // DateTime createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // DateTime deletedAt - test('to test the property `deletedAt`', () async { - // TODO - }); - - // String description - test('to test the property `description`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // UserEntity owner - test('to test the property `owner`', () async { - // TODO - }); - - // String ownerId - test('to test the property `ownerId`', () async { - // TODO - }); - - // List sharedLinks (default value: const []) - test('to test the property `sharedLinks`', () async { - // TODO - }); - - // List sharedUsers (default value: const []) - test('to test the property `sharedUsers`', () async { - // TODO - }); - - // DateTime updatedAt - test('to test the property `updatedAt`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/asset_entity_test.dart b/mobile/openapi/test/asset_entity_test.dart deleted file mode 100644 index 834018d84..000000000 --- a/mobile/openapi/test/asset_entity_test.dart +++ /dev/null @@ -1,197 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for AssetEntity -void main() { - // final instance = AssetEntity(); - - group('test AssetEntity', () { - // List albums (default value: const []) - test('to test the property `albums`', () async { - // TODO - }); - - // Object checksum - test('to test the property `checksum`', () async { - // TODO - }); - - // DateTime createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // String deviceAssetId - test('to test the property `deviceAssetId`', () async { - // TODO - }); - - // String deviceId - test('to test the property `deviceId`', () async { - // TODO - }); - - // String duration - test('to test the property `duration`', () async { - // TODO - }); - - // String encodedVideoPath - test('to test the property `encodedVideoPath`', () async { - // TODO - }); - - // ExifEntity exifInfo - test('to test the property `exifInfo`', () async { - // TODO - }); - - // List faces (default value: const []) - test('to test the property `faces`', () async { - // TODO - }); - - // DateTime fileCreatedAt - test('to test the property `fileCreatedAt`', () async { - // TODO - }); - - // DateTime fileModifiedAt - test('to test the property `fileModifiedAt`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // bool isArchived - test('to test the property `isArchived`', () async { - // TODO - }); - - // bool isExternal - test('to test the property `isExternal`', () async { - // TODO - }); - - // bool isFavorite - test('to test the property `isFavorite`', () async { - // TODO - }); - - // bool isOffline - test('to test the property `isOffline`', () async { - // TODO - }); - - // bool isReadOnly - test('to test the property `isReadOnly`', () async { - // TODO - }); - - // bool isVisible - test('to test the property `isVisible`', () async { - // TODO - }); - - // LibraryEntity library_ - test('to test the property `library_`', () async { - // TODO - }); - - // String libraryId - test('to test the property `libraryId`', () async { - // TODO - }); - - // AssetEntity livePhotoVideo - test('to test the property `livePhotoVideo`', () async { - // TODO - }); - - // String livePhotoVideoId - test('to test the property `livePhotoVideoId`', () async { - // TODO - }); - - // String originalFileName - test('to test the property `originalFileName`', () async { - // TODO - }); - - // String originalPath - test('to test the property `originalPath`', () async { - // TODO - }); - - // UserEntity owner - test('to test the property `owner`', () async { - // TODO - }); - - // String ownerId - test('to test the property `ownerId`', () async { - // TODO - }); - - // String resizePath - test('to test the property `resizePath`', () async { - // TODO - }); - - // List sharedLinks (default value: const []) - test('to test the property `sharedLinks`', () async { - // TODO - }); - - // String sidecarPath - test('to test the property `sidecarPath`', () async { - // TODO - }); - - // SmartInfoEntity smartInfo - test('to test the property `smartInfo`', () async { - // TODO - }); - - // List tags (default value: const []) - test('to test the property `tags`', () async { - // TODO - }); - - // Object thumbhash - test('to test the property `thumbhash`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // DateTime updatedAt - test('to test the property `updatedAt`', () async { - // TODO - }); - - // String webpPath - test('to test the property `webpPath`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/asset_face_entity_test.dart b/mobile/openapi/test/asset_face_box_dto_test.dart similarity index 52% rename from mobile/openapi/test/asset_face_entity_test.dart rename to mobile/openapi/test/asset_face_box_dto_test.dart index f90eb88e7..811e779f3 100644 --- a/mobile/openapi/test/asset_face_entity_test.dart +++ b/mobile/openapi/test/asset_face_box_dto_test.dart @@ -11,66 +11,41 @@ import 'package:openapi/api.dart'; import 'package:test/test.dart'; -// tests for AssetFaceEntity +// tests for AssetFaceBoxDto void main() { - // final instance = AssetFaceEntity(); + // final instance = AssetFaceBoxDto(); - group('test AssetFaceEntity', () { - // AssetEntity asset - test('to test the property `asset`', () async { - // TODO - }); - - // String assetId - test('to test the property `assetId`', () async { - // TODO - }); - - // num boundingBoxX1 + group('test AssetFaceBoxDto', () { + // int boundingBoxX1 test('to test the property `boundingBoxX1`', () async { // TODO }); - // num boundingBoxX2 + // int boundingBoxX2 test('to test the property `boundingBoxX2`', () async { // TODO }); - // num boundingBoxY1 + // int boundingBoxY1 test('to test the property `boundingBoxY1`', () async { // TODO }); - // num boundingBoxY2 + // int boundingBoxY2 test('to test the property `boundingBoxY2`', () async { // TODO }); - // List embedding (default value: const []) - test('to test the property `embedding`', () async { - // TODO - }); - - // num imageHeight + // int imageHeight test('to test the property `imageHeight`', () async { // TODO }); - // num imageWidth + // int imageWidth test('to test the property `imageWidth`', () async { // TODO }); - // PersonEntity person - test('to test the property `person`', () async { - // TODO - }); - - // String personId - test('to test the property `personId`', () async { - // TODO - }); - }); diff --git a/mobile/openapi/test/exif_entity_test.dart b/mobile/openapi/test/exif_entity_test.dart deleted file mode 100644 index 192163274..000000000 --- a/mobile/openapi/test/exif_entity_test.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for ExifEntity -void main() { - // final instance = ExifEntity(); - - group('test ExifEntity', () { - // AssetEntity asset - test('to test the property `asset`', () async { - // TODO - }); - - // String assetId - test('to test the property `assetId`', () async { - // TODO - }); - - // num bitsPerSample - test('to test the property `bitsPerSample`', () async { - // TODO - }); - - // String city - test('to test the property `city`', () async { - // TODO - }); - - // String colorspace - test('to test the property `colorspace`', () async { - // TODO - }); - - // String country - test('to test the property `country`', () async { - // TODO - }); - - // DateTime dateTimeOriginal - test('to test the property `dateTimeOriginal`', () async { - // TODO - }); - - // General info - // String description - test('to test the property `description`', () async { - // TODO - }); - - // num exifImageHeight - test('to test the property `exifImageHeight`', () async { - // TODO - }); - - // num exifImageWidth - test('to test the property `exifImageWidth`', () async { - // TODO - }); - - // String exifTextSearchableColumn - test('to test the property `exifTextSearchableColumn`', () async { - // TODO - }); - - // String exposureTime - test('to test the property `exposureTime`', () async { - // TODO - }); - - // num fNumber - test('to test the property `fNumber`', () async { - // TODO - }); - - // num fileSizeInByte - test('to test the property `fileSizeInByte`', () async { - // TODO - }); - - // num focalLength - test('to test the property `focalLength`', () async { - // TODO - }); - - // Video info - // num fps - test('to test the property `fps`', () async { - // TODO - }); - - // num iso - test('to test the property `iso`', () async { - // TODO - }); - - // num latitude - test('to test the property `latitude`', () async { - // TODO - }); - - // String lensModel - test('to test the property `lensModel`', () async { - // TODO - }); - - // String livePhotoCID - test('to test the property `livePhotoCID`', () async { - // TODO - }); - - // num longitude - test('to test the property `longitude`', () async { - // TODO - }); - - // Image info - // String make - test('to test the property `make`', () async { - // TODO - }); - - // String model - test('to test the property `model`', () async { - // TODO - }); - - // DateTime modifyDate - test('to test the property `modifyDate`', () async { - // TODO - }); - - // String orientation - test('to test the property `orientation`', () async { - // TODO - }); - - // String profileDescription - test('to test the property `profileDescription`', () async { - // TODO - }); - - // String projectionType - test('to test the property `projectionType`', () async { - // TODO - }); - - // String state - test('to test the property `state`', () async { - // TODO - }); - - // String timeZone - test('to test the property `timeZone`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/library_entity_test.dart b/mobile/openapi/test/library_entity_test.dart deleted file mode 100644 index 852701c9f..000000000 --- a/mobile/openapi/test/library_entity_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for LibraryEntity -void main() { - // final instance = LibraryEntity(); - - group('test LibraryEntity', () { - // List assets (default value: const []) - test('to test the property `assets`', () async { - // TODO - }); - - // DateTime createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // DateTime deletedAt - test('to test the property `deletedAt`', () async { - // TODO - }); - - // List exclusionPatterns (default value: const []) - test('to test the property `exclusionPatterns`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // List importPaths (default value: const []) - test('to test the property `importPaths`', () async { - // TODO - }); - - // bool isVisible - test('to test the property `isVisible`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - // UserEntity owner - test('to test the property `owner`', () async { - // TODO - }); - - // String ownerId - test('to test the property `ownerId`', () async { - // TODO - }); - - // DateTime refreshedAt - test('to test the property `refreshedAt`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // DateTime updatedAt - test('to test the property `updatedAt`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/person_api_test.dart b/mobile/openapi/test/person_api_test.dart index aaa16663d..20d90eb6f 100644 --- a/mobile/openapi/test/person_api_test.dart +++ b/mobile/openapi/test/person_api_test.dart @@ -17,7 +17,7 @@ void main() { // final instance = PersonApi(); group('tests for PersonApi', () { - //Future createPerson(AssetFaceUpdateDto assetFaceUpdateDto) async + //Future createPerson(AssetFaceUpdateDto assetFaceUpdateDto) async test('test createPerson', () async { // TODO }); @@ -27,7 +27,7 @@ void main() { // TODO }); - //Future getAssetFace(String id, String assetId) async + //Future getAssetFace(String id, String assetId) async test('test getAssetFace', () async { // TODO }); diff --git a/mobile/openapi/test/person_entity_test.dart b/mobile/openapi/test/person_entity_test.dart deleted file mode 100644 index 49ef2b906..000000000 --- a/mobile/openapi/test/person_entity_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for PersonEntity -void main() { - // final instance = PersonEntity(); - - group('test PersonEntity', () { - // DateTime birthDate - test('to test the property `birthDate`', () async { - // TODO - }); - - // DateTime createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // AssetEntity faceAsset - test('to test the property `faceAsset`', () async { - // TODO - }); - - // String faceAssetId - test('to test the property `faceAssetId`', () async { - // TODO - }); - - // List faces (default value: const []) - test('to test the property `faces`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // bool isHidden - test('to test the property `isHidden`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - // UserEntity owner - test('to test the property `owner`', () async { - // TODO - }); - - // String ownerId - test('to test the property `ownerId`', () async { - // TODO - }); - - // String thumbnailPath - test('to test the property `thumbnailPath`', () async { - // TODO - }); - - // DateTime updatedAt - test('to test the property `updatedAt`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/shared_link_entity_test.dart b/mobile/openapi/test/shared_link_entity_test.dart deleted file mode 100644 index 13337c79f..000000000 --- a/mobile/openapi/test/shared_link_entity_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for SharedLinkEntity -void main() { - // final instance = SharedLinkEntity(); - - group('test SharedLinkEntity', () { - // AlbumEntity album - test('to test the property `album`', () async { - // TODO - }); - - // String albumId - test('to test the property `albumId`', () async { - // TODO - }); - - // bool allowDownload - test('to test the property `allowDownload`', () async { - // TODO - }); - - // bool allowUpload - test('to test the property `allowUpload`', () async { - // TODO - }); - - // List assets (default value: const []) - test('to test the property `assets`', () async { - // TODO - }); - - // DateTime createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // String description - test('to test the property `description`', () async { - // TODO - }); - - // DateTime expiresAt - test('to test the property `expiresAt`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // Object key - test('to test the property `key`', () async { - // TODO - }); - - // bool showExif - test('to test the property `showExif`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // UserEntity user - test('to test the property `user`', () async { - // TODO - }); - - // String userId - test('to test the property `userId`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/smart_info_entity_test.dart b/mobile/openapi/test/smart_info_entity_test.dart deleted file mode 100644 index 4bf899890..000000000 --- a/mobile/openapi/test/smart_info_entity_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for SmartInfoEntity -void main() { - // final instance = SmartInfoEntity(); - - group('test SmartInfoEntity', () { - // AssetEntity asset - test('to test the property `asset`', () async { - // TODO - }); - - // String assetId - test('to test the property `assetId`', () async { - // TODO - }); - - // List clipEmbedding (default value: const []) - test('to test the property `clipEmbedding`', () async { - // TODO - }); - - // List objects (default value: const []) - test('to test the property `objects`', () async { - // TODO - }); - - // List tags (default value: const []) - test('to test the property `tags`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/tag_entity_test.dart b/mobile/openapi/test/tag_entity_test.dart deleted file mode 100644 index 0160c0ac5..000000000 --- a/mobile/openapi/test/tag_entity_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for TagEntity -void main() { - // final instance = TagEntity(); - - group('test TagEntity', () { - // List assets (default value: const []) - test('to test the property `assets`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // String name - test('to test the property `name`', () async { - // TODO - }); - - // String renameTagId - test('to test the property `renameTagId`', () async { - // TODO - }); - - // String type - test('to test the property `type`', () async { - // TODO - }); - - // UserEntity user - test('to test the property `user`', () async { - // TODO - }); - - // String userId - test('to test the property `userId`', () async { - // TODO - }); - - - }); - -} diff --git a/mobile/openapi/test/user_entity_test.dart b/mobile/openapi/test/user_entity_test.dart deleted file mode 100644 index 572197d7b..000000000 --- a/mobile/openapi/test/user_entity_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// tests for UserEntity -void main() { - // final instance = UserEntity(); - - group('test UserEntity', () { - // List assets (default value: const []) - test('to test the property `assets`', () async { - // TODO - }); - - // DateTime createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // DateTime deletedAt - test('to test the property `deletedAt`', () async { - // TODO - }); - - // String email - test('to test the property `email`', () async { - // TODO - }); - - // String externalPath - test('to test the property `externalPath`', () async { - // TODO - }); - - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - - // String id - test('to test the property `id`', () async { - // TODO - }); - - // bool isAdmin - test('to test the property `isAdmin`', () async { - // TODO - }); - - // String lastName - test('to test the property `lastName`', () async { - // TODO - }); - - // bool memoriesEnabled - test('to test the property `memoriesEnabled`', () async { - // TODO - }); - - // String oauthId - test('to test the property `oauthId`', () async { - // TODO - }); - - // String password - test('to test the property `password`', () async { - // TODO - }); - - // String profileImagePath - test('to test the property `profileImagePath`', () async { - // TODO - }); - - // bool shouldChangePassword - test('to test the property `shouldChangePassword`', () async { - // TODO - }); - - // String storageLabel - test('to test the property `storageLabel`', () async { - // TODO - }); - - // List tags (default value: const []) - test('to test the property `tags`', () async { - // TODO - }); - - // DateTime updatedAt - test('to test the property `updatedAt`', () async { - // TODO - }); - - - }); - -} diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index b508ebf94..955515a18 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -3207,7 +3207,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PersonEntity" + "$ref": "#/components/schemas/PersonResponseDto" } } }, @@ -3590,7 +3590,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetFaceEntity" + "$ref": "#/components/schemas/AssetFaceBoxDto" } } }, @@ -5394,84 +5394,6 @@ ], "type": "object" }, - "AlbumEntity": { - "properties": { - "albumName": { - "type": "string" - }, - "albumThumbnailAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetEntity" - } - ], - "nullable": true - }, - "albumThumbnailAssetId": { - "nullable": true, - "type": "string" - }, - "assets": { - "items": { - "$ref": "#/components/schemas/AssetEntity" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "owner": { - "$ref": "#/components/schemas/UserEntity" - }, - "ownerId": { - "type": "string" - }, - "sharedLinks": { - "items": { - "$ref": "#/components/schemas/SharedLinkEntity" - }, - "type": "array" - }, - "sharedUsers": { - "items": { - "$ref": "#/components/schemas/UserEntity" - }, - "type": "array" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "owner", - "ownerId", - "albumName", - "description", - "createdAt", - "updatedAt", - "deletedAt", - "albumThumbnailAsset", - "albumThumbnailAssetId", - "sharedUsers", - "assets", - "sharedLinks" - ], - "type": "object" - }, "AlbumResponseDto": { "properties": { "albumName": { @@ -5701,236 +5623,34 @@ ], "type": "object" }, - "AssetEntity": { + "AssetFaceBoxDto": { "properties": { - "albums": { - "items": { - "$ref": "#/components/schemas/AlbumEntity" - }, - "type": "array" - }, - "checksum": { - "type": "object" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "deviceAssetId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "duration": { - "nullable": true, - "type": "string" - }, - "encodedVideoPath": { - "nullable": true, - "type": "string" - }, - "exifInfo": { - "$ref": "#/components/schemas/ExifEntity" - }, - "faces": { - "items": { - "$ref": "#/components/schemas/AssetFaceEntity" - }, - "type": "array" - }, - "fileCreatedAt": { - "format": "date-time", - "type": "string" - }, - "fileModifiedAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "isArchived": { - "type": "boolean" - }, - "isExternal": { - "type": "boolean" - }, - "isFavorite": { - "type": "boolean" - }, - "isOffline": { - "type": "boolean" - }, - "isReadOnly": { - "type": "boolean" - }, - "isVisible": { - "type": "boolean" - }, - "library": { - "$ref": "#/components/schemas/LibraryEntity" - }, - "libraryId": { - "type": "string" - }, - "livePhotoVideo": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetEntity" - } - ], - "nullable": true - }, - "livePhotoVideoId": { - "nullable": true, - "type": "string" - }, - "originalFileName": { - "type": "string" - }, - "originalPath": { - "type": "string" - }, - "owner": { - "$ref": "#/components/schemas/UserEntity" - }, - "ownerId": { - "type": "string" - }, - "resizePath": { - "nullable": true, - "type": "string" - }, - "sharedLinks": { - "items": { - "$ref": "#/components/schemas/SharedLinkEntity" - }, - "type": "array" - }, - "sidecarPath": { - "nullable": true, - "type": "string" - }, - "smartInfo": { - "$ref": "#/components/schemas/SmartInfoEntity" - }, - "tags": { - "items": { - "$ref": "#/components/schemas/TagEntity" - }, - "type": "array" - }, - "thumbhash": { - "nullable": true, - "type": "object" - }, - "type": { - "enum": [ - "IMAGE", - "VIDEO", - "AUDIO", - "OTHER" - ], - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - }, - "webpPath": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "id", - "deviceAssetId", - "owner", - "ownerId", - "library", - "libraryId", - "deviceId", - "type", - "originalPath", - "resizePath", - "webpPath", - "thumbhash", - "encodedVideoPath", - "createdAt", - "updatedAt", - "fileCreatedAt", - "fileModifiedAt", - "isFavorite", - "isArchived", - "isExternal", - "isReadOnly", - "isOffline", - "checksum", - "duration", - "isVisible", - "livePhotoVideo", - "livePhotoVideoId", - "originalFileName", - "sidecarPath", - "tags", - "sharedLinks", - "faces" - ], - "type": "object" - }, - "AssetFaceEntity": { - "properties": { - "asset": { - "$ref": "#/components/schemas/AssetEntity" - }, - "assetId": { - "type": "string" - }, "boundingBoxX1": { - "type": "number" + "type": "integer" }, "boundingBoxX2": { - "type": "number" + "type": "integer" }, "boundingBoxY1": { - "type": "number" + "type": "integer" }, "boundingBoxY2": { - "type": "number" - }, - "embedding": { - "items": { - "type": "number" - }, - "nullable": true, - "type": "array" + "type": "integer" }, "imageHeight": { - "type": "number" + "type": "integer" }, "imageWidth": { - "type": "number" - }, - "person": { - "$ref": "#/components/schemas/PersonEntity" - }, - "personId": { - "type": "string" + "type": "integer" } }, "required": [ - "assetId", - "personId", - "embedding", "imageWidth", "imageHeight", "boundingBoxX1", "boundingBoxY1", "boundingBoxX2", - "boundingBoxY2", - "asset", - "person" + "boundingBoxY2" ], "type": "object" }, @@ -6796,157 +6516,6 @@ ], "type": "string" }, - "ExifEntity": { - "properties": { - "asset": { - "$ref": "#/components/schemas/AssetEntity" - }, - "assetId": { - "type": "string" - }, - "bitsPerSample": { - "nullable": true, - "type": "number" - }, - "city": { - "nullable": true, - "type": "string" - }, - "colorspace": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, - "dateTimeOriginal": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "description": "General info", - "type": "string" - }, - "exifImageHeight": { - "nullable": true, - "type": "number" - }, - "exifImageWidth": { - "nullable": true, - "type": "number" - }, - "exifTextSearchableColumn": { - "type": "string" - }, - "exposureTime": { - "nullable": true, - "type": "string" - }, - "fNumber": { - "nullable": true, - "type": "number" - }, - "fileSizeInByte": { - "nullable": true, - "type": "number" - }, - "focalLength": { - "nullable": true, - "type": "number" - }, - "fps": { - "description": "Video info", - "nullable": true, - "type": "number" - }, - "iso": { - "nullable": true, - "type": "number" - }, - "latitude": { - "nullable": true, - "type": "number" - }, - "lensModel": { - "nullable": true, - "type": "string" - }, - "livePhotoCID": { - "nullable": true, - "type": "string" - }, - "longitude": { - "nullable": true, - "type": "number" - }, - "make": { - "description": "Image info", - "nullable": true, - "type": "string" - }, - "model": { - "nullable": true, - "type": "string" - }, - "modifyDate": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "orientation": { - "nullable": true, - "type": "string" - }, - "profileDescription": { - "nullable": true, - "type": "string" - }, - "projectionType": { - "nullable": true, - "type": "string" - }, - "state": { - "nullable": true, - "type": "string" - }, - "timeZone": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "assetId", - "description", - "exifImageWidth", - "exifImageHeight", - "fileSizeInByte", - "orientation", - "dateTimeOriginal", - "modifyDate", - "timeZone", - "latitude", - "longitude", - "projectionType", - "city", - "livePhotoCID", - "state", - "country", - "make", - "model", - "lensModel", - "fNumber", - "focalLength", - "iso", - "exposureTime", - "profileDescription", - "colorspace", - "bitsPerSample", - "exifTextSearchableColumn" - ], - "type": "object" - }, "ExifResponseDto": { "properties": { "city": { @@ -7217,82 +6786,6 @@ ], "type": "object" }, - "LibraryEntity": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetEntity" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "type": "string" - }, - "exclusionPatterns": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "importPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "isVisible": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "owner": { - "$ref": "#/components/schemas/UserEntity" - }, - "ownerId": { - "type": "string" - }, - "refreshedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "type": { - "enum": [ - "UPLOAD", - "EXTERNAL" - ], - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "name", - "assets", - "owner", - "ownerId", - "type", - "importPaths", - "exclusionPatterns", - "createdAt", - "updatedAt", - "refreshedAt", - "isVisible" - ], - "type": "object" - }, "LibraryResponseDto": { "properties": { "assetCount": { @@ -7649,74 +7142,6 @@ ], "type": "object" }, - "PersonEntity": { - "properties": { - "birthDate": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "faceAsset": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetEntity" - } - ], - "nullable": true - }, - "faceAssetId": { - "nullable": true, - "type": "string" - }, - "faces": { - "items": { - "$ref": "#/components/schemas/AssetFaceEntity" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "isHidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "owner": { - "$ref": "#/components/schemas/UserEntity" - }, - "ownerId": { - "type": "string" - }, - "thumbnailPath": { - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "createdAt", - "updatedAt", - "ownerId", - "owner", - "name", - "birthDate", - "thumbnailPath", - "faceAssetId", - "faceAsset", - "faces", - "isHidden" - ], - "type": "object" - }, "PersonResponseDto": { "properties": { "birthDate": { @@ -8249,80 +7674,6 @@ }, "type": "object" }, - "SharedLinkEntity": { - "properties": { - "album": { - "$ref": "#/components/schemas/AlbumEntity" - }, - "albumId": { - "nullable": true, - "type": "string" - }, - "allowDownload": { - "type": "boolean" - }, - "allowUpload": { - "type": "boolean" - }, - "assets": { - "items": { - "$ref": "#/components/schemas/AssetEntity" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "description": { - "nullable": true, - "type": "string" - }, - "expiresAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "id": { - "type": "string" - }, - "key": { - "type": "object" - }, - "showExif": { - "type": "boolean" - }, - "type": { - "enum": [ - "ALBUM", - "INDIVIDUAL" - ], - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/UserEntity" - }, - "userId": { - "type": "string" - } - }, - "required": [ - "id", - "description", - "userId", - "user", - "key", - "type", - "createdAt", - "expiresAt", - "allowUpload", - "allowDownload", - "showExif", - "assets", - "albumId" - ], - "type": "object" - }, "SharedLinkResponseDto": { "properties": { "album": { @@ -8418,44 +7769,6 @@ ], "type": "object" }, - "SmartInfoEntity": { - "properties": { - "asset": { - "$ref": "#/components/schemas/AssetEntity" - }, - "assetId": { - "type": "string" - }, - "clipEmbedding": { - "items": { - "type": "number" - }, - "nullable": true, - "type": "array" - }, - "objects": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "tags": { - "items": { - "type": "string" - }, - "nullable": true, - "type": "array" - } - }, - "required": [ - "assetId", - "tags", - "objects", - "clipEmbedding" - ], - "type": "object" - }, "SmartInfoResponseDto": { "properties": { "objects": { @@ -8864,50 +8177,6 @@ ], "type": "object" }, - "TagEntity": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetEntity" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "renameTagId": { - "nullable": true, - "type": "string" - }, - "type": { - "enum": [ - "OBJECT", - "FACE", - "CUSTOM" - ], - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/UserEntity" - }, - "userId": { - "type": "string" - } - }, - "required": [ - "id", - "type", - "name", - "user", - "userId", - "renameTagId", - "assets" - ], - "type": "object" - }, "TagResponseDto": { "properties": { "id": { @@ -9137,92 +8406,6 @@ ], "type": "object" }, - "UserEntity": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetEntity" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "email": { - "type": "string" - }, - "externalPath": { - "nullable": true, - "type": "string" - }, - "firstName": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isAdmin": { - "type": "boolean" - }, - "lastName": { - "type": "string" - }, - "memoriesEnabled": { - "type": "boolean" - }, - "oauthId": { - "type": "string" - }, - "password": { - "type": "string" - }, - "profileImagePath": { - "type": "string" - }, - "shouldChangePassword": { - "type": "boolean" - }, - "storageLabel": { - "nullable": true, - "type": "string" - }, - "tags": { - "items": { - "$ref": "#/components/schemas/TagEntity" - }, - "type": "array" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "firstName", - "lastName", - "isAdmin", - "email", - "storageLabel", - "externalPath", - "oauthId", - "profileImagePath", - "shouldChangePassword", - "createdAt", - "deletedAt", - "updatedAt", - "memoriesEnabled", - "tags", - "assets" - ], - "type": "object" - }, "UserResponseDto": { "properties": { "createdAt": { diff --git a/server/src/domain/person/person.dto.ts b/server/src/domain/person/person.dto.ts index b313df569..01ecd7bd3 100644 --- a/server/src/domain/person/person.dto.ts +++ b/server/src/domain/person/person.dto.ts @@ -79,6 +79,26 @@ export class PersonSearchDto { withHidden?: boolean = false; } +export class AssetFaceBoxDto { + @ApiProperty({ type: 'integer' }) + imageWidth!: number; + + @ApiProperty({ type: 'integer' }) + imageHeight!: number; + + @ApiProperty({ type: 'integer' }) + boundingBoxX1!: number; + + @ApiProperty({ type: 'integer' }) + boundingBoxY1!: number; + + @ApiProperty({ type: 'integer' }) + boundingBoxX2!: number; + + @ApiProperty({ type: 'integer' }) + boundingBoxY2!: number; +} + export class PersonResponseDto { id!: string; name!: string; diff --git a/server/src/domain/person/person.service.ts b/server/src/domain/person/person.service.ts index 467cac2ee..adc4284cd 100644 --- a/server/src/domain/person/person.service.ts +++ b/server/src/domain/person/person.service.ts @@ -1,4 +1,4 @@ -import { AssetFaceEntity, PersonEntity } from '@app/infra/entities'; +import { PersonEntity } from '@app/infra/entities'; import { BadRequestException, Inject, Injectable, Logger, NotFoundException } from '@nestjs/common'; import { AccessCore, IAccessRepository, Permission } from '../access'; import { @@ -19,6 +19,7 @@ import { IMachineLearningRepository } from '../smart-info'; import { IStorageRepository, ImmichReadStream, StorageCore, StorageFolder } from '../storage'; import { ISystemConfigRepository, SystemConfigCore } from '../system-config'; import { + AssetFaceBoxDto, AssetFaceUpdateDto, MergePersonDto, PeopleResponseDto, @@ -196,16 +197,24 @@ export class PersonService { return true; } - async getFaceEntity(authUser: AuthUserDto, personId: string, assetId: string): Promise { + async getFaceEntity(authUser: AuthUserDto, personId: string, assetId: string): Promise { await this.access.requirePermission(authUser, Permission.PERSON_READ, personId); const [face] = await this.repository.getFacesByIds([{ personId, assetId }]); if (!face) { throw new BadRequestException('Invalid assetId for feature face'); } - return face; + + return { + boundingBoxX1: face.boundingBoxX1, + boundingBoxX2: face.boundingBoxX2, + boundingBoxY1: face.boundingBoxY1, + boundingBoxY2: face.boundingBoxY2, + imageHeight: face.imageHeight, + imageWidth: face.imageWidth, + }; } - async createPerson(authUser: AuthUserDto, dto: AssetFaceUpdateDto): Promise { + async createPerson(authUser: AuthUserDto, dto: AssetFaceUpdateDto): Promise { let hasGeneratedFaceThumbnail = false; const newPerson = await this.repository.create({ ownerId: authUser.id }); diff --git a/server/src/immich/controllers/person.controller.ts b/server/src/immich/controllers/person.controller.ts index 0431c03f5..ce6410aa7 100644 --- a/server/src/immich/controllers/person.controller.ts +++ b/server/src/immich/controllers/person.controller.ts @@ -1,4 +1,5 @@ import { + AssetFaceBoxDto, AssetFaceUpdateDto, AssetResponseDto, AuthUserDto, @@ -12,7 +13,6 @@ import { PersonService, PersonUpdateDto, } from '@app/domain'; -import { AssetFaceEntity, PersonEntity } from '@app/infra/entities'; import { Body, Controller, Get, Param, Post, Put, Query, StreamableFile } from '@nestjs/common'; import { ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { ParseMeUUIDPipe } from '../api-v1/validation/parse-me-uuid-pipe'; @@ -45,12 +45,12 @@ export class PersonController { @AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto, @Param('assetId', new ParseMeUUIDPipe({ version: '4' })) assetId: string, - ): Promise { + ): Promise { return this.service.getFaceEntity(authUser, id, assetId); } @Post('') - createPerson(@AuthUser() authUser: AuthUserDto, @Body() dto: AssetFaceUpdateDto): Promise { + createPerson(@AuthUser() authUser: AuthUserDto, @Body() dto: AssetFaceUpdateDto): Promise { return this.service.createPerson(authUser, dto); } diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index bbae62bca..68406cfc6 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -174,91 +174,6 @@ export interface AlbumCountResponseDto { */ 'shared': number; } -/** - * - * @export - * @interface AlbumEntity - */ -export interface AlbumEntity { - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'albumName': string; - /** - * - * @type {AssetEntity} - * @memberof AlbumEntity - */ - 'albumThumbnailAsset': AssetEntity | null; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'albumThumbnailAssetId': string | null; - /** - * - * @type {Array} - * @memberof AlbumEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'deletedAt': string | null; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'description': string; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'id': string; - /** - * - * @type {UserEntity} - * @memberof AlbumEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'ownerId': string; - /** - * - * @type {Array} - * @memberof AlbumEntity - */ - 'sharedLinks': Array; - /** - * - * @type {Array} - * @memberof AlbumEntity - */ - 'sharedUsers': Array; - /** - * - * @type {string} - * @memberof AlbumEntity - */ - 'updatedAt': string; -} /** * * @export @@ -559,302 +474,45 @@ export type AssetBulkUploadCheckResultReasonEnum = typeof AssetBulkUploadCheckRe /** * * @export - * @interface AssetEntity + * @interface AssetFaceBoxDto */ -export interface AssetEntity { - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'albums'?: Array; - /** - * - * @type {object} - * @memberof AssetEntity - */ - 'checksum': object; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'deviceAssetId': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'deviceId': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'duration': string | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'encodedVideoPath': string | null; - /** - * - * @type {ExifEntity} - * @memberof AssetEntity - */ - 'exifInfo'?: ExifEntity; - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'faces': Array; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'fileCreatedAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'fileModifiedAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'id': string; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isArchived': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isExternal': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isFavorite': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isOffline': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isReadOnly': boolean; - /** - * - * @type {boolean} - * @memberof AssetEntity - */ - 'isVisible': boolean; - /** - * - * @type {LibraryEntity} - * @memberof AssetEntity - */ - 'library': LibraryEntity; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'libraryId': string; - /** - * - * @type {AssetEntity} - * @memberof AssetEntity - */ - 'livePhotoVideo': AssetEntity | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'livePhotoVideoId': string | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'originalFileName': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'originalPath': string; - /** - * - * @type {UserEntity} - * @memberof AssetEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'ownerId': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'resizePath': string | null; - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'sharedLinks': Array; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'sidecarPath': string | null; - /** - * - * @type {SmartInfoEntity} - * @memberof AssetEntity - */ - 'smartInfo'?: SmartInfoEntity; - /** - * - * @type {Array} - * @memberof AssetEntity - */ - 'tags': Array; - /** - * - * @type {object} - * @memberof AssetEntity - */ - 'thumbhash': object | null; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'type': AssetEntityTypeEnum; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'updatedAt': string; - /** - * - * @type {string} - * @memberof AssetEntity - */ - 'webpPath': string | null; -} - -export const AssetEntityTypeEnum = { - Image: 'IMAGE', - Video: 'VIDEO', - Audio: 'AUDIO', - Other: 'OTHER' -} as const; - -export type AssetEntityTypeEnum = typeof AssetEntityTypeEnum[keyof typeof AssetEntityTypeEnum]; - -/** - * - * @export - * @interface AssetFaceEntity - */ -export interface AssetFaceEntity { - /** - * - * @type {AssetEntity} - * @memberof AssetFaceEntity - */ - 'asset': AssetEntity; - /** - * - * @type {string} - * @memberof AssetFaceEntity - */ - 'assetId': string; +export interface AssetFaceBoxDto { /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxX1': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxX2': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxY1': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'boundingBoxY2': number; - /** - * - * @type {Array} - * @memberof AssetFaceEntity - */ - 'embedding': Array | null; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'imageHeight': number; /** * * @type {number} - * @memberof AssetFaceEntity + * @memberof AssetFaceBoxDto */ 'imageWidth': number; - /** - * - * @type {PersonEntity} - * @memberof AssetFaceEntity - */ - 'person': PersonEntity; - /** - * - * @type {string} - * @memberof AssetFaceEntity - */ - 'personId': string; } /** * @@ -1899,187 +1557,6 @@ export const EntityType = { export type EntityType = typeof EntityType[keyof typeof EntityType]; -/** - * - * @export - * @interface ExifEntity - */ -export interface ExifEntity { - /** - * - * @type {AssetEntity} - * @memberof ExifEntity - */ - 'asset'?: AssetEntity; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'assetId': string; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'bitsPerSample': number | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'city': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'colorspace': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'country': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'dateTimeOriginal': string | null; - /** - * General info - * @type {string} - * @memberof ExifEntity - */ - 'description': string; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'exifImageHeight': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'exifImageWidth': number | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'exifTextSearchableColumn': string; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'exposureTime': string | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'fNumber': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'fileSizeInByte': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'focalLength': number | null; - /** - * Video info - * @type {number} - * @memberof ExifEntity - */ - 'fps'?: number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'iso': number | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'latitude': number | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'lensModel': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'livePhotoCID': string | null; - /** - * - * @type {number} - * @memberof ExifEntity - */ - 'longitude': number | null; - /** - * Image info - * @type {string} - * @memberof ExifEntity - */ - 'make': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'model': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'modifyDate': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'orientation': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'profileDescription': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'projectionType': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'state': string | null; - /** - * - * @type {string} - * @memberof ExifEntity - */ - 'timeZone': string | null; -} /** * * @export @@ -2440,99 +1917,6 @@ export interface JobStatusDto { */ 'queueStatus': QueueStatusDto; } -/** - * - * @export - * @interface LibraryEntity - */ -export interface LibraryEntity { - /** - * - * @type {Array} - * @memberof LibraryEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'deletedAt'?: string; - /** - * - * @type {Array} - * @memberof LibraryEntity - */ - 'exclusionPatterns': Array; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'id': string; - /** - * - * @type {Array} - * @memberof LibraryEntity - */ - 'importPaths': Array; - /** - * - * @type {boolean} - * @memberof LibraryEntity - */ - 'isVisible': boolean; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'name': string; - /** - * - * @type {UserEntity} - * @memberof LibraryEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'ownerId': string; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'refreshedAt': string | null; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'type': LibraryEntityTypeEnum; - /** - * - * @type {string} - * @memberof LibraryEntity - */ - 'updatedAt': string; -} - -export const LibraryEntityTypeEnum = { - Upload: 'UPLOAD', - External: 'EXTERNAL' -} as const; - -export type LibraryEntityTypeEnum = typeof LibraryEntityTypeEnum[keyof typeof LibraryEntityTypeEnum]; - /** * * @export @@ -2963,85 +2347,6 @@ export interface PeopleUpdateItem { */ 'name'?: string; } -/** - * - * @export - * @interface PersonEntity - */ -export interface PersonEntity { - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'birthDate': string | null; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'createdAt': string; - /** - * - * @type {AssetEntity} - * @memberof PersonEntity - */ - 'faceAsset': AssetEntity | null; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'faceAssetId': string | null; - /** - * - * @type {Array} - * @memberof PersonEntity - */ - 'faces': Array; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'id': string; - /** - * - * @type {boolean} - * @memberof PersonEntity - */ - 'isHidden': boolean; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'name': string; - /** - * - * @type {UserEntity} - * @memberof PersonEntity - */ - 'owner': UserEntity; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'ownerId': string; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'thumbnailPath': string; - /** - * - * @type {string} - * @memberof PersonEntity - */ - 'updatedAt': string; -} /** * * @export @@ -3698,105 +3003,6 @@ export interface SharedLinkEditDto { */ 'showExif'?: boolean; } -/** - * - * @export - * @interface SharedLinkEntity - */ -export interface SharedLinkEntity { - /** - * - * @type {AlbumEntity} - * @memberof SharedLinkEntity - */ - 'album'?: AlbumEntity; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'albumId': string | null; - /** - * - * @type {boolean} - * @memberof SharedLinkEntity - */ - 'allowDownload': boolean; - /** - * - * @type {boolean} - * @memberof SharedLinkEntity - */ - 'allowUpload': boolean; - /** - * - * @type {Array} - * @memberof SharedLinkEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'description': string | null; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'expiresAt': string | null; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'id': string; - /** - * - * @type {object} - * @memberof SharedLinkEntity - */ - 'key': object; - /** - * - * @type {boolean} - * @memberof SharedLinkEntity - */ - 'showExif': boolean; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'type': SharedLinkEntityTypeEnum; - /** - * - * @type {UserEntity} - * @memberof SharedLinkEntity - */ - 'user': UserEntity; - /** - * - * @type {string} - * @memberof SharedLinkEntity - */ - 'userId': string; -} - -export const SharedLinkEntityTypeEnum = { - Album: 'ALBUM', - Individual: 'INDIVIDUAL' -} as const; - -export type SharedLinkEntityTypeEnum = typeof SharedLinkEntityTypeEnum[keyof typeof SharedLinkEntityTypeEnum]; - /** * * @export @@ -3923,43 +3129,6 @@ export interface SignUpDto { */ 'password': string; } -/** - * - * @export - * @interface SmartInfoEntity - */ -export interface SmartInfoEntity { - /** - * - * @type {AssetEntity} - * @memberof SmartInfoEntity - */ - 'asset'?: AssetEntity; - /** - * - * @type {string} - * @memberof SmartInfoEntity - */ - 'assetId': string; - /** - * - * @type {Array} - * @memberof SmartInfoEntity - */ - 'clipEmbedding': Array | null; - /** - * - * @type {Array} - * @memberof SmartInfoEntity - */ - 'objects': Array | null; - /** - * - * @type {Array} - * @memberof SmartInfoEntity - */ - 'tags': Array | null; -} /** * * @export @@ -4494,64 +3663,6 @@ export interface SystemConfigThumbnailDto { } -/** - * - * @export - * @interface TagEntity - */ -export interface TagEntity { - /** - * - * @type {Array} - * @memberof TagEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'id': string; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'name': string; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'renameTagId': string | null; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'type': TagEntityTypeEnum; - /** - * - * @type {UserEntity} - * @memberof TagEntity - */ - 'user': UserEntity; - /** - * - * @type {string} - * @memberof TagEntity - */ - 'userId': string; -} - -export const TagEntityTypeEnum = { - Object: 'OBJECT', - Face: 'FACE', - Custom: 'CUSTOM' -} as const; - -export type TagEntityTypeEnum = typeof TagEntityTypeEnum[keyof typeof TagEntityTypeEnum]; - /** * * @export @@ -4912,115 +4023,6 @@ export interface UserCountResponseDto { */ 'userCount': number; } -/** - * - * @export - * @interface UserEntity - */ -export interface UserEntity { - /** - * - * @type {Array} - * @memberof UserEntity - */ - 'assets': Array; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'deletedAt': string | null; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'email': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'externalPath': string | null; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'firstName': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'id': string; - /** - * - * @type {boolean} - * @memberof UserEntity - */ - 'isAdmin': boolean; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'lastName': string; - /** - * - * @type {boolean} - * @memberof UserEntity - */ - 'memoriesEnabled': boolean; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'oauthId': string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'password'?: string; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'profileImagePath': string; - /** - * - * @type {boolean} - * @memberof UserEntity - */ - 'shouldChangePassword': boolean; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'storageLabel': string | null; - /** - * - * @type {Array} - * @memberof UserEntity - */ - 'tags': Array; - /** - * - * @type {string} - * @memberof UserEntity - */ - 'updatedAt': string; -} /** * * @export @@ -12554,7 +11556,7 @@ export const PersonApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createPerson(assetFaceUpdateDto: AssetFaceUpdateDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createPerson(assetFaceUpdateDto: AssetFaceUpdateDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createPerson(assetFaceUpdateDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12575,7 +11577,7 @@ export const PersonApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetFace(id: string, assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getAssetFace(id: string, assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetFace(id, assetId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12668,7 +11670,7 @@ export const PersonApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createPerson(requestParameters: PersonApiCreatePersonRequest, options?: AxiosRequestConfig): AxiosPromise { + createPerson(requestParameters: PersonApiCreatePersonRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createPerson(requestParameters.assetFaceUpdateDto, options).then((request) => request(axios, basePath)); }, /** @@ -12686,7 +11688,7 @@ export const PersonApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetFace(requestParameters: PersonApiGetAssetFaceRequest, options?: AxiosRequestConfig): AxiosPromise { + getAssetFace(requestParameters: PersonApiGetAssetFaceRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getAssetFace(requestParameters.id, requestParameters.assetId, options).then((request) => request(axios, basePath)); }, /**