From f249a3761b7b301c6c3bdb7902b5e6cd0a910c75 Mon Sep 17 00:00:00 2001 From: martabal <74269598+martabal@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:07:19 +0100 Subject: [PATCH] chore: regenerate api --- cli/src/api/open-api/api.ts | 561 ++++++++++++++---- mobile/openapi/.openapi-generator/FILES | 15 +- mobile/openapi/README.md | 7 +- mobile/openapi/doc/PartnerResponseDto.md | 1 + mobile/openapi/doc/UpdateUserDto.md | 3 +- mobile/openapi/doc/UserDto.md | 3 +- mobile/openapi/doc/UserResponseDto.md | 3 +- mobile/openapi/lib/api.dart | 5 +- mobile/openapi/lib/api_client.dart | 10 +- mobile/openapi/lib/api_helper.dart | 6 + .../lib/model/partner_response_dto.dart | 108 +++- mobile/openapi/lib/model/update_user_dto.dart | 41 +- mobile/openapi/lib/model/user_dto.dart | 24 +- .../openapi/lib/model/user_response_dto.dart | 26 +- .../test/partner_response_dto_test.dart | 5 + mobile/openapi/test/update_user_dto_test.dart | 13 +- mobile/openapi/test/user_dto_test.dart | 9 +- .../openapi/test/user_response_dto_test.dart | 13 +- server/immich-openapi-specs.json | 16 + web/src/api/open-api/api.ts | 561 ++++++++++++++---- .../album-page/user-selection-modal.svelte | 2 +- .../navigation-bar/account-info-panel.svelte | 3 +- 22 files changed, 1073 insertions(+), 362 deletions(-) diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index 1d222eb6d..999090bb9 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -209,43 +209,6 @@ export interface AddUsersDto { */ 'sharedUserIds': Array; } -/** - * - * @export - * @interface AdminSignupResponseDto - */ -export interface AdminSignupResponseDto { - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'email': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'firstName': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'id': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'lastName': string; -} /** * * @export @@ -1378,24 +1341,18 @@ export interface CreateUserDto { * @memberof CreateUserDto */ 'externalPath'?: string | null; - /** - * - * @type {string} - * @memberof CreateUserDto - */ - 'firstName': string; - /** - * - * @type {string} - * @memberof CreateUserDto - */ - 'lastName': string; /** * * @type {boolean} * @memberof CreateUserDto */ 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof CreateUserDto + */ + 'name': string; /** * * @type {string} @@ -2174,12 +2131,6 @@ export interface LoginResponseDto { * @memberof LoginResponseDto */ 'accessToken': string; - /** - * - * @type {string} - * @memberof LoginResponseDto - */ - 'firstName': string; /** * * @type {boolean} @@ -2191,7 +2142,7 @@ export interface LoginResponseDto { * @type {string} * @memberof LoginResponseDto */ - 'lastName': string; + 'name': string; /** * * @type {string} @@ -2261,6 +2212,20 @@ export interface MapMarkerResponseDto { */ 'lon': number; } +/** + * + * @export + * @enum {string} + */ + +export const MapTheme = { + Light: 'light', + Dark: 'dark' +} as const; + +export type MapTheme = typeof MapTheme[keyof typeof MapTheme]; + + /** * * @export @@ -2384,6 +2349,119 @@ export interface OAuthConfigResponseDto { */ 'url'?: string; } +/** + * + * @export + * @interface PartnerResponseDto + */ +export interface PartnerResponseDto { + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'avatarColor': PartnerResponseDtoAvatarColorEnum; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'createdAt': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'deletedAt': string | null; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'email': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'externalPath': string | null; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'id': string; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'inTimeline'?: boolean; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'isAdmin': boolean; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'name': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'oauthId': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'profileImagePath': string; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'shouldChangePassword': boolean; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'storageLabel': string | null; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'updatedAt': string; +} + +export const PartnerResponseDtoAvatarColorEnum = { + Primary: 'primary', + Pink: 'pink', + Red: 'red', + Yellow: 'yellow', + Blue: 'blue', + Green: 'green', + Purple: 'purple', + Orange: 'orange', + Gray: 'gray', + Amber: 'amber' +} as const; + +export type PartnerResponseDtoAvatarColorEnum = typeof PartnerResponseDtoAvatarColorEnum[keyof typeof PartnerResponseDtoAvatarColorEnum]; + /** * * @export @@ -2593,6 +2671,20 @@ export interface QueueStatusDto { */ 'isPaused': boolean; } +/** + * + * @export + * @enum {string} + */ + +export const ReactionLevel = { + Album: 'album', + Asset: 'asset' +} as const; + +export type ReactionLevel = typeof ReactionLevel[keyof typeof ReactionLevel]; + + /** * * @export @@ -2859,12 +2951,6 @@ export interface ServerConfigDto { * @memberof ServerConfigDto */ 'loginPageMessage': string; - /** - * - * @type {string} - * @memberof ServerConfigDto - */ - 'mapTileUrl': string; /** * * @type {string} @@ -3349,13 +3435,7 @@ export interface SignUpDto { * @type {string} * @memberof SignUpDto */ - 'firstName': string; - /** - * - * @type {string} - * @memberof SignUpDto - */ - 'lastName': string; + 'name': string; /** * * @type {string} @@ -3732,6 +3812,12 @@ export interface SystemConfigMachineLearningDto { * @interface SystemConfigMapDto */ export interface SystemConfigMapDto { + /** + * + * @type {string} + * @memberof SystemConfigMapDto + */ + 'darkStyle': string; /** * * @type {boolean} @@ -3743,7 +3829,7 @@ export interface SystemConfigMapDto { * @type {string} * @memberof SystemConfigMapDto */ - 'tileUrl': string; + 'lightStyle': string; } /** * @@ -4229,6 +4315,19 @@ export interface UpdateLibraryDto { */ 'name'?: string; } +/** + * + * @export + * @interface UpdatePartnerDto + */ +export interface UpdatePartnerDto { + /** + * + * @type {boolean} + * @memberof UpdatePartnerDto + */ + 'inTimeline': boolean; +} /** * * @export @@ -4285,12 +4384,6 @@ export interface UpdateUserDto { * @memberof UpdateUserDto */ 'externalPath'?: string; - /** - * - * @type {string} - * @memberof UpdateUserDto - */ - 'firstName'?: string; /** * * @type {string} @@ -4303,18 +4396,18 @@ export interface UpdateUserDto { * @memberof UpdateUserDto */ 'isAdmin'?: boolean; - /** - * - * @type {string} - * @memberof UpdateUserDto - */ - 'lastName'?: string; /** * * @type {boolean} * @memberof UpdateUserDto */ 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof UpdateUserDto + */ + 'name'?: string; /** * * @type {string} @@ -4354,12 +4447,6 @@ export interface UsageByUserDto { * @memberof UsageByUserDto */ 'usage': number; - /** - * - * @type {string} - * @memberof UsageByUserDto - */ - 'userFirstName': string; /** * * @type {string} @@ -4371,7 +4458,7 @@ export interface UsageByUserDto { * @type {string} * @memberof UsageByUserDto */ - 'userLastName': string; + 'userName': string; /** * * @type {number} @@ -4419,12 +4506,6 @@ export interface UserDto { * @memberof UserDto */ 'email': string; - /** - * - * @type {string} - * @memberof UserDto - */ - 'firstName': string; /** * * @type {string} @@ -4436,7 +4517,7 @@ export interface UserDto { * @type {string} * @memberof UserDto */ - 'lastName': string; + 'name': string; /** * * @type {string} @@ -4496,12 +4577,6 @@ export interface UserResponseDto { * @memberof UserResponseDto */ 'externalPath': string | null; - /** - * - * @type {string} - * @memberof UserResponseDto - */ - 'firstName': string; /** * * @type {string} @@ -4514,18 +4589,18 @@ export interface UserResponseDto { * @memberof UserResponseDto */ 'isAdmin': boolean; - /** - * - * @type {string} - * @memberof UserResponseDto - */ - 'lastName': string; /** * * @type {boolean} * @memberof UserResponseDto */ 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof UserResponseDto + */ + 'name': string; /** * * @type {string} @@ -5162,11 +5237,12 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat * @param {string} albumId * @param {string} [assetId] * @param {ReactionType} [type] + * @param {ReactionLevel} [level] * @param {string} [userId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getActivities: async (albumId: string, assetId?: string, type?: ReactionType, userId?: string, options: AxiosRequestConfig = {}): Promise => { + getActivities: async (albumId: string, assetId?: string, type?: ReactionType, level?: ReactionLevel, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('getActivities', 'albumId', albumId) const localVarPath = `/activity`; @@ -5202,6 +5278,10 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['type'] = type; } + if (level !== undefined) { + localVarQueryParameter['level'] = level; + } + if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } @@ -5302,12 +5382,13 @@ export const ActivityApiFp = function(configuration?: Configuration) { * @param {string} albumId * @param {string} [assetId] * @param {ReactionType} [type] + * @param {ReactionLevel} [level] * @param {string} [userId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getActivities(albumId: string, assetId?: string, type?: ReactionType, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, userId, options); + async getActivities(albumId: string, assetId?: string, type?: ReactionType, level?: ReactionLevel, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, level, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -5356,7 +5437,7 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP * @throws {RequiredError} */ getActivities(requestParameters: ActivityApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(axios, basePath)); + return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.level, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * @@ -5425,6 +5506,13 @@ export interface ActivityApiGetActivitiesRequest { */ readonly type?: ReactionType + /** + * + * @type {ReactionLevel} + * @memberof ActivityApiGetActivities + */ + readonly level?: ReactionLevel + /** * * @type {string} @@ -5491,7 +5579,7 @@ export class ActivityApi extends BaseAPI { * @memberof ActivityApi */ public getActivities(requestParameters: ActivityApiGetActivitiesRequest, options?: AxiosRequestConfig) { - return ActivityApiFp(this.configuration).getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + return ActivityApiFp(this.configuration).getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.level, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** @@ -7344,11 +7432,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getTimeBucket', 'size', size) // verify required parameter 'timeBucket' is not null or undefined @@ -7406,6 +7495,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['withStacked'] = withStacked; } + if (withPartners !== undefined) { + localVarQueryParameter['withPartners'] = withPartners; + } + if (timeBucket !== undefined) { localVarQueryParameter['timeBucket'] = timeBucket; } @@ -7435,11 +7528,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getTimeBuckets', 'size', size) const localVarPath = `/asset/time-buckets`; @@ -7495,6 +7589,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['withStacked'] = withStacked; } + if (withPartners !== undefined) { + localVarQueryParameter['withPartners'] = withPartners; + } + if (key !== undefined) { localVarQueryParameter['key'] = key; } @@ -8297,12 +8395,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key, options); + async getTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, withPartners, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -8315,12 +8414,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key, options); + async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, withPartners, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -8617,7 +8717,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getTimeBucket(requestParameters: AssetApiGetTimeBucketRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * @@ -8626,7 +8726,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * Get all asset of a device that are in the database, ID only. @@ -9113,6 +9213,13 @@ export interface AssetApiGetTimeBucketRequest { */ readonly withStacked?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetTimeBucket + */ + readonly withPartners?: boolean + /** * * @type {string} @@ -9183,6 +9290,13 @@ export interface AssetApiGetTimeBucketsRequest { */ readonly withStacked?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetTimeBuckets + */ + readonly withPartners?: boolean + /** * * @type {string} @@ -9662,7 +9776,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getTimeBucket(requestParameters: AssetApiGetTimeBucketRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -9673,7 +9787,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -10583,7 +10697,7 @@ export const AuthenticationApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async signUpAdmin(signUpDto: SignUpDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async signUpAdmin(signUpDto: SignUpDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.signUpAdmin(signUpDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -10663,7 +10777,7 @@ export const AuthenticationApiFactory = function (configuration?: Configuration, * @param {*} [options] Override http request option. * @throws {RequiredError} */ - signUpAdmin(requestParameters: AuthenticationApiSignUpAdminRequest, options?: AxiosRequestConfig): AxiosPromise { + signUpAdmin(requestParameters: AuthenticationApiSignUpAdminRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.signUpAdmin(requestParameters.signUpDto, options).then((request) => request(axios, basePath)); }, /** @@ -12382,6 +12496,54 @@ export const PartnerApiAxiosParamCreator = function (configuration?: Configurati let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} id + * @param {UpdatePartnerDto} updatePartnerDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePartner: async (id: string, updatePartnerDto: UpdatePartnerDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updatePartner', 'id', id) + // verify required parameter 'updatePartnerDto' is not null or undefined + assertParamExists('updatePartner', 'updatePartnerDto', updatePartnerDto) + const localVarPath = `/partner/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updatePartnerDto, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -12403,7 +12565,7 @@ export const PartnerApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createPartner(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createPartner(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createPartner(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12413,7 +12575,7 @@ export const PartnerApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPartners(direction: 'shared-by' | 'shared-with', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async getPartners(direction: 'shared-by' | 'shared-with', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPartners(direction, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12427,6 +12589,17 @@ export const PartnerApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.removePartner(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {string} id + * @param {UpdatePartnerDto} updatePartnerDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePartner(id: string, updatePartnerDto: UpdatePartnerDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePartner(id, updatePartnerDto, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } }; @@ -12443,7 +12616,7 @@ export const PartnerApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createPartner(requestParameters: PartnerApiCreatePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { + createPartner(requestParameters: PartnerApiCreatePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createPartner(requestParameters.id, options).then((request) => request(axios, basePath)); }, /** @@ -12452,7 +12625,7 @@ export const PartnerApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPartners(requestParameters: PartnerApiGetPartnersRequest, options?: AxiosRequestConfig): AxiosPromise> { + getPartners(requestParameters: PartnerApiGetPartnersRequest, options?: AxiosRequestConfig): AxiosPromise> { return localVarFp.getPartners(requestParameters.direction, options).then((request) => request(axios, basePath)); }, /** @@ -12464,6 +12637,15 @@ export const PartnerApiFactory = function (configuration?: Configuration, basePa removePartner(requestParameters: PartnerApiRemovePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.removePartner(requestParameters.id, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {PartnerApiUpdatePartnerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePartner(requestParameters: PartnerApiUpdatePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.updatePartner(requestParameters.id, requestParameters.updatePartnerDto, options).then((request) => request(axios, basePath)); + }, }; }; @@ -12509,6 +12691,27 @@ export interface PartnerApiRemovePartnerRequest { readonly id: string } +/** + * Request parameters for updatePartner operation in PartnerApi. + * @export + * @interface PartnerApiUpdatePartnerRequest + */ +export interface PartnerApiUpdatePartnerRequest { + /** + * + * @type {string} + * @memberof PartnerApiUpdatePartner + */ + readonly id: string + + /** + * + * @type {UpdatePartnerDto} + * @memberof PartnerApiUpdatePartner + */ + readonly updatePartnerDto: UpdatePartnerDto +} + /** * PartnerApi - object-oriented interface * @export @@ -12548,6 +12751,17 @@ export class PartnerApi extends BaseAPI { public removePartner(requestParameters: PartnerApiRemovePartnerRequest, options?: AxiosRequestConfig) { return PartnerApiFp(this.configuration).removePartner(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @param {PartnerApiUpdatePartnerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PartnerApi + */ + public updatePartner(requestParameters: PartnerApiUpdatePartnerRequest, options?: AxiosRequestConfig) { + return PartnerApiFp(this.configuration).updatePartner(requestParameters.id, requestParameters.updatePartnerDto, options).then((request) => request(this.axios, this.basePath)); + } } @@ -15174,6 +15388,51 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {MapTheme} theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMapStyle: async (theme: MapTheme, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'theme' is not null or undefined + assertParamExists('getMapStyle', 'theme', theme) + const localVarPath = `/system-config/map/style.json`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (theme !== undefined) { + localVarQueryParameter['theme'] = theme; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -15293,6 +15552,16 @@ export const SystemConfigApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getConfigDefaults(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {MapTheme} theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMapStyle(theme: MapTheme, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMapStyle(theme, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @param {*} [options] Override http request option. @@ -15338,6 +15607,15 @@ export const SystemConfigApiFactory = function (configuration?: Configuration, b getConfigDefaults(options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getConfigDefaults(options).then((request) => request(axios, basePath)); }, + /** + * + * @param {SystemConfigApiGetMapStyleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMapStyle(requestParameters: SystemConfigApiGetMapStyleRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getMapStyle(requestParameters.theme, options).then((request) => request(axios, basePath)); + }, /** * * @param {*} [options] Override http request option. @@ -15358,6 +15636,20 @@ export const SystemConfigApiFactory = function (configuration?: Configuration, b }; }; +/** + * Request parameters for getMapStyle operation in SystemConfigApi. + * @export + * @interface SystemConfigApiGetMapStyleRequest + */ +export interface SystemConfigApiGetMapStyleRequest { + /** + * + * @type {MapTheme} + * @memberof SystemConfigApiGetMapStyle + */ + readonly theme: MapTheme +} + /** * Request parameters for updateConfig operation in SystemConfigApi. * @export @@ -15399,6 +15691,17 @@ export class SystemConfigApi extends BaseAPI { return SystemConfigApiFp(this.configuration).getConfigDefaults(options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @param {SystemConfigApiGetMapStyleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemConfigApi + */ + public getMapStyle(requestParameters: SystemConfigApiGetMapStyleRequest, options?: AxiosRequestConfig) { + return SystemConfigApiFp(this.configuration).getMapStyle(requestParameters.theme, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @param {*} [options] Override http request option. diff --git a/mobile/openapi/.openapi-generator/FILES b/mobile/openapi/.openapi-generator/FILES index 8d7b77eeb..9ca833516 100644 --- a/mobile/openapi/.openapi-generator/FILES +++ b/mobile/openapi/.openapi-generator/FILES @@ -13,7 +13,6 @@ doc/ActivityCreateDto.md doc/ActivityResponseDto.md doc/ActivityStatisticsResponseDto.md doc/AddUsersDto.md -doc/AdminSignupResponseDto.md doc/AlbumApi.md doc/AlbumCountResponseDto.md doc/AlbumResponseDto.md @@ -82,6 +81,7 @@ doc/LoginCredentialDto.md doc/LoginResponseDto.md doc/LogoutResponseDto.md doc/MapMarkerResponseDto.md +doc/MapTheme.md doc/MemoryLaneResponseDto.md doc/MergePersonDto.md doc/ModelType.md @@ -91,6 +91,7 @@ doc/OAuthCallbackDto.md doc/OAuthConfigDto.md doc/OAuthConfigResponseDto.md doc/PartnerApi.md +doc/PartnerResponseDto.md doc/PathEntityType.md doc/PathType.md doc/PeopleResponseDto.md @@ -101,6 +102,7 @@ doc/PersonResponseDto.md doc/PersonStatisticsResponseDto.md doc/PersonUpdateDto.md doc/QueueStatusDto.md +doc/ReactionLevel.md doc/ReactionType.md doc/RecognitionConfig.md doc/ScanLibraryDto.md @@ -158,6 +160,7 @@ doc/TranscodePolicy.md doc/UpdateAlbumDto.md doc/UpdateAssetDto.md doc/UpdateLibraryDto.md +doc/UpdatePartnerDto.md doc/UpdateStackParentDto.md doc/UpdateTagDto.md doc/UpdateUserDto.md @@ -199,7 +202,6 @@ lib/model/activity_create_dto.dart lib/model/activity_response_dto.dart lib/model/activity_statistics_response_dto.dart lib/model/add_users_dto.dart -lib/model/admin_signup_response_dto.dart lib/model/album_count_response_dto.dart lib/model/album_response_dto.dart lib/model/all_job_status_response_dto.dart @@ -266,6 +268,7 @@ lib/model/login_credential_dto.dart lib/model/login_response_dto.dart lib/model/logout_response_dto.dart lib/model/map_marker_response_dto.dart +lib/model/map_theme.dart lib/model/memory_lane_response_dto.dart lib/model/merge_person_dto.dart lib/model/model_type.dart @@ -273,6 +276,7 @@ lib/model/o_auth_authorize_response_dto.dart lib/model/o_auth_callback_dto.dart lib/model/o_auth_config_dto.dart lib/model/o_auth_config_response_dto.dart +lib/model/partner_response_dto.dart lib/model/path_entity_type.dart lib/model/path_type.dart lib/model/people_response_dto.dart @@ -282,6 +286,7 @@ lib/model/person_response_dto.dart lib/model/person_statistics_response_dto.dart lib/model/person_update_dto.dart lib/model/queue_status_dto.dart +lib/model/reaction_level.dart lib/model/reaction_type.dart lib/model/recognition_config.dart lib/model/scan_library_dto.dart @@ -334,6 +339,7 @@ lib/model/transcode_policy.dart lib/model/update_album_dto.dart lib/model/update_asset_dto.dart lib/model/update_library_dto.dart +lib/model/update_partner_dto.dart lib/model/update_stack_parent_dto.dart lib/model/update_tag_dto.dart lib/model/update_user_dto.dart @@ -349,7 +355,6 @@ test/activity_create_dto_test.dart test/activity_response_dto_test.dart test/activity_statistics_response_dto_test.dart 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_response_dto_test.dart @@ -423,6 +428,7 @@ test/login_credential_dto_test.dart test/login_response_dto_test.dart test/logout_response_dto_test.dart test/map_marker_response_dto_test.dart +test/map_theme_test.dart test/memory_lane_response_dto_test.dart test/merge_person_dto_test.dart test/model_type_test.dart @@ -432,6 +438,7 @@ test/o_auth_callback_dto_test.dart test/o_auth_config_dto_test.dart test/o_auth_config_response_dto_test.dart test/partner_api_test.dart +test/partner_response_dto_test.dart test/path_entity_type_test.dart test/path_type_test.dart test/people_response_dto_test.dart @@ -442,6 +449,7 @@ test/person_response_dto_test.dart test/person_statistics_response_dto_test.dart test/person_update_dto_test.dart test/queue_status_dto_test.dart +test/reaction_level_test.dart test/reaction_type_test.dart test/recognition_config_test.dart test/scan_library_dto_test.dart @@ -499,6 +507,7 @@ test/transcode_policy_test.dart test/update_album_dto_test.dart test/update_asset_dto_test.dart test/update_library_dto_test.dart +test/update_partner_dto_test.dart test/update_stack_parent_dto_test.dart test/update_tag_dto_test.dart test/update_user_dto_test.dart diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 618cb2614..4d54d41c3 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -152,6 +152,7 @@ Class | Method | HTTP request | Description *PartnerApi* | [**createPartner**](doc//PartnerApi.md#createpartner) | **POST** /partner/{id} | *PartnerApi* | [**getPartners**](doc//PartnerApi.md#getpartners) | **GET** /partner | *PartnerApi* | [**removePartner**](doc//PartnerApi.md#removepartner) | **DELETE** /partner/{id} | +*PartnerApi* | [**updatePartner**](doc//PartnerApi.md#updatepartner) | **PUT** /partner/{id} | *PersonApi* | [**getAllPeople**](doc//PersonApi.md#getallpeople) | **GET** /person | *PersonApi* | [**getPerson**](doc//PersonApi.md#getperson) | **GET** /person/{id} | *PersonApi* | [**getPersonAssets**](doc//PersonApi.md#getpersonassets) | **GET** /person/{id}/assets | @@ -181,6 +182,7 @@ Class | Method | HTTP request | Description *SharedLinkApi* | [**updateSharedLink**](doc//SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} | *SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | *SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | +*SystemConfigApi* | [**getMapStyle**](doc//SystemConfigApi.md#getmapstyle) | **GET** /system-config/map/style.json | *SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | *SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | *TagApi* | [**createTag**](doc//TagApi.md#createtag) | **POST** /tag | @@ -213,7 +215,6 @@ Class | Method | HTTP request | Description - [ActivityResponseDto](doc//ActivityResponseDto.md) - [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md) - [AddUsersDto](doc//AddUsersDto.md) - - [AdminSignupResponseDto](doc//AdminSignupResponseDto.md) - [AlbumCountResponseDto](doc//AlbumCountResponseDto.md) - [AlbumResponseDto](doc//AlbumResponseDto.md) - [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md) @@ -276,6 +277,7 @@ Class | Method | HTTP request | Description - [LoginResponseDto](doc//LoginResponseDto.md) - [LogoutResponseDto](doc//LogoutResponseDto.md) - [MapMarkerResponseDto](doc//MapMarkerResponseDto.md) + - [MapTheme](doc//MapTheme.md) - [MemoryLaneResponseDto](doc//MemoryLaneResponseDto.md) - [MergePersonDto](doc//MergePersonDto.md) - [ModelType](doc//ModelType.md) @@ -283,6 +285,7 @@ Class | Method | HTTP request | Description - [OAuthCallbackDto](doc//OAuthCallbackDto.md) - [OAuthConfigDto](doc//OAuthConfigDto.md) - [OAuthConfigResponseDto](doc//OAuthConfigResponseDto.md) + - [PartnerResponseDto](doc//PartnerResponseDto.md) - [PathEntityType](doc//PathEntityType.md) - [PathType](doc//PathType.md) - [PeopleResponseDto](doc//PeopleResponseDto.md) @@ -292,6 +295,7 @@ Class | Method | HTTP request | Description - [PersonStatisticsResponseDto](doc//PersonStatisticsResponseDto.md) - [PersonUpdateDto](doc//PersonUpdateDto.md) - [QueueStatusDto](doc//QueueStatusDto.md) + - [ReactionLevel](doc//ReactionLevel.md) - [ReactionType](doc//ReactionType.md) - [RecognitionConfig](doc//RecognitionConfig.md) - [ScanLibraryDto](doc//ScanLibraryDto.md) @@ -344,6 +348,7 @@ Class | Method | HTTP request | Description - [UpdateAlbumDto](doc//UpdateAlbumDto.md) - [UpdateAssetDto](doc//UpdateAssetDto.md) - [UpdateLibraryDto](doc//UpdateLibraryDto.md) + - [UpdatePartnerDto](doc//UpdatePartnerDto.md) - [UpdateStackParentDto](doc//UpdateStackParentDto.md) - [UpdateTagDto](doc//UpdateTagDto.md) - [UpdateUserDto](doc//UpdateUserDto.md) diff --git a/mobile/openapi/doc/PartnerResponseDto.md b/mobile/openapi/doc/PartnerResponseDto.md index f7133bbf7..ea9349a67 100644 --- a/mobile/openapi/doc/PartnerResponseDto.md +++ b/mobile/openapi/doc/PartnerResponseDto.md @@ -8,6 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**avatarColor** | **String** | | **createdAt** | [**DateTime**](DateTime.md) | | **deletedAt** | [**DateTime**](DateTime.md) | | **email** | **String** | | diff --git a/mobile/openapi/doc/UpdateUserDto.md b/mobile/openapi/doc/UpdateUserDto.md index f2bf1aee6..567bc43eb 100644 --- a/mobile/openapi/doc/UpdateUserDto.md +++ b/mobile/openapi/doc/UpdateUserDto.md @@ -11,11 +11,10 @@ Name | Type | Description | Notes **avatarColor** | [**UserAvatarColor**](UserAvatarColor.md) | | [optional] **email** | **String** | | [optional] **externalPath** | **String** | | [optional] -**firstName** | **String** | | [optional] **id** | **String** | | **isAdmin** | **bool** | | [optional] -**lastName** | **String** | | [optional] **memoriesEnabled** | **bool** | | [optional] +**name** | **String** | | [optional] **password** | **String** | | [optional] **shouldChangePassword** | **bool** | | [optional] **storageLabel** | **String** | | [optional] diff --git a/mobile/openapi/doc/UserDto.md b/mobile/openapi/doc/UserDto.md index 03c4e2dd3..d83fe9640 100644 --- a/mobile/openapi/doc/UserDto.md +++ b/mobile/openapi/doc/UserDto.md @@ -10,9 +10,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avatarColor** | **String** | | **email** | **String** | | -**firstName** | **String** | | **id** | **String** | | -**lastName** | **String** | | +**name** | **String** | | **profileImagePath** | **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/UserResponseDto.md b/mobile/openapi/doc/UserResponseDto.md index ee5c450ab..c22aaade6 100644 --- a/mobile/openapi/doc/UserResponseDto.md +++ b/mobile/openapi/doc/UserResponseDto.md @@ -13,11 +13,10 @@ Name | Type | Description | Notes **deletedAt** | [**DateTime**](DateTime.md) | | **email** | **String** | | **externalPath** | **String** | | -**firstName** | **String** | | **id** | **String** | | **isAdmin** | **bool** | | -**lastName** | **String** | | **memoriesEnabled** | **bool** | | [optional] +**name** | **String** | | **oauthId** | **String** | | **profileImagePath** | **String** | | **shouldChangePassword** | **bool** | | diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index 71ebe3895..92bfa3f81 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -54,7 +54,6 @@ part 'model/activity_create_dto.dart'; part 'model/activity_response_dto.dart'; part 'model/activity_statistics_response_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_response_dto.dart'; part 'model/all_job_status_response_dto.dart'; @@ -117,6 +116,7 @@ part 'model/login_credential_dto.dart'; part 'model/login_response_dto.dart'; part 'model/logout_response_dto.dart'; part 'model/map_marker_response_dto.dart'; +part 'model/map_theme.dart'; part 'model/memory_lane_response_dto.dart'; part 'model/merge_person_dto.dart'; part 'model/model_type.dart'; @@ -124,6 +124,7 @@ part 'model/o_auth_authorize_response_dto.dart'; part 'model/o_auth_callback_dto.dart'; part 'model/o_auth_config_dto.dart'; part 'model/o_auth_config_response_dto.dart'; +part 'model/partner_response_dto.dart'; part 'model/path_entity_type.dart'; part 'model/path_type.dart'; part 'model/people_response_dto.dart'; @@ -133,6 +134,7 @@ part 'model/person_response_dto.dart'; part 'model/person_statistics_response_dto.dart'; part 'model/person_update_dto.dart'; part 'model/queue_status_dto.dart'; +part 'model/reaction_level.dart'; part 'model/reaction_type.dart'; part 'model/recognition_config.dart'; part 'model/scan_library_dto.dart'; @@ -185,6 +187,7 @@ part 'model/transcode_policy.dart'; part 'model/update_album_dto.dart'; part 'model/update_asset_dto.dart'; part 'model/update_library_dto.dart'; +part 'model/update_partner_dto.dart'; part 'model/update_stack_parent_dto.dart'; part 'model/update_tag_dto.dart'; part 'model/update_user_dto.dart'; diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index edadd0b20..4c24967ec 100644 --- a/mobile/openapi/lib/api_client.dart +++ b/mobile/openapi/lib/api_client.dart @@ -197,8 +197,6 @@ class ApiClient { return ActivityStatisticsResponseDto.fromJson(value); case 'AddUsersDto': return AddUsersDto.fromJson(value); - case 'AdminSignupResponseDto': - return AdminSignupResponseDto.fromJson(value); case 'AlbumCountResponseDto': return AlbumCountResponseDto.fromJson(value); case 'AlbumResponseDto': @@ -323,6 +321,8 @@ class ApiClient { return LogoutResponseDto.fromJson(value); case 'MapMarkerResponseDto': return MapMarkerResponseDto.fromJson(value); + case 'MapTheme': + return MapThemeTypeTransformer().decode(value); case 'MemoryLaneResponseDto': return MemoryLaneResponseDto.fromJson(value); case 'MergePersonDto': @@ -337,6 +337,8 @@ class ApiClient { return OAuthConfigDto.fromJson(value); case 'OAuthConfigResponseDto': return OAuthConfigResponseDto.fromJson(value); + case 'PartnerResponseDto': + return PartnerResponseDto.fromJson(value); case 'PathEntityType': return PathEntityTypeTypeTransformer().decode(value); case 'PathType': @@ -355,6 +357,8 @@ class ApiClient { return PersonUpdateDto.fromJson(value); case 'QueueStatusDto': return QueueStatusDto.fromJson(value); + case 'ReactionLevel': + return ReactionLevelTypeTransformer().decode(value); case 'ReactionType': return ReactionTypeTypeTransformer().decode(value); case 'RecognitionConfig': @@ -459,6 +463,8 @@ class ApiClient { return UpdateAssetDto.fromJson(value); case 'UpdateLibraryDto': return UpdateLibraryDto.fromJson(value); + case 'UpdatePartnerDto': + return UpdatePartnerDto.fromJson(value); case 'UpdateStackParentDto': return UpdateStackParentDto.fromJson(value); case 'UpdateTagDto': diff --git a/mobile/openapi/lib/api_helper.dart b/mobile/openapi/lib/api_helper.dart index 0f55f1b07..ddb16df0c 100644 --- a/mobile/openapi/lib/api_helper.dart +++ b/mobile/openapi/lib/api_helper.dart @@ -88,6 +88,9 @@ String parameterToString(dynamic value) { if (value is LibraryType) { return LibraryTypeTypeTransformer().encode(value).toString(); } + if (value is MapTheme) { + return MapThemeTypeTransformer().encode(value).toString(); + } if (value is ModelType) { return ModelTypeTypeTransformer().encode(value).toString(); } @@ -97,6 +100,9 @@ String parameterToString(dynamic value) { if (value is PathType) { return PathTypeTypeTransformer().encode(value).toString(); } + if (value is ReactionLevel) { + return ReactionLevelTypeTransformer().encode(value).toString(); + } if (value is ReactionType) { return ReactionTypeTypeTransformer().encode(value).toString(); } diff --git a/mobile/openapi/lib/model/partner_response_dto.dart b/mobile/openapi/lib/model/partner_response_dto.dart index 5ccef68d8..bb2279010 100644 --- a/mobile/openapi/lib/model/partner_response_dto.dart +++ b/mobile/openapi/lib/model/partner_response_dto.dart @@ -13,6 +13,7 @@ part of openapi.api; class PartnerResponseDto { /// Returns a new [PartnerResponseDto] instance. PartnerResponseDto({ + required this.avatarColor, required this.createdAt, required this.deletedAt, required this.email, @@ -29,6 +30,8 @@ class PartnerResponseDto { required this.updatedAt, }); + PartnerResponseDtoAvatarColorEnum avatarColor; + DateTime createdAt; DateTime? deletedAt; @@ -71,6 +74,7 @@ class PartnerResponseDto { @override bool operator ==(Object other) => identical(this, other) || other is PartnerResponseDto && + other.avatarColor == avatarColor && other.createdAt == createdAt && other.deletedAt == deletedAt && other.email == email && @@ -89,6 +93,7 @@ class PartnerResponseDto { @override int get hashCode => // ignore: unnecessary_parenthesis + (avatarColor.hashCode) + (createdAt.hashCode) + (deletedAt == null ? 0 : deletedAt!.hashCode) + (email.hashCode) + @@ -105,10 +110,11 @@ class PartnerResponseDto { (updatedAt.hashCode); @override - String toString() => 'PartnerResponseDto[createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, id=$id, inTimeline=$inTimeline, isAdmin=$isAdmin, memoriesEnabled=$memoriesEnabled, name=$name, oauthId=$oauthId, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, updatedAt=$updatedAt]'; + String toString() => 'PartnerResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, id=$id, inTimeline=$inTimeline, isAdmin=$isAdmin, memoriesEnabled=$memoriesEnabled, name=$name, oauthId=$oauthId, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, updatedAt=$updatedAt]'; Map toJson() { final json = {}; + json[r'avatarColor'] = this.avatarColor; json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); if (this.deletedAt != null) { json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String(); @@ -154,6 +160,7 @@ class PartnerResponseDto { final json = value.cast(); return PartnerResponseDto( + avatarColor: PartnerResponseDtoAvatarColorEnum.fromJson(json[r'avatarColor'])!, createdAt: mapDateTime(json, r'createdAt', '')!, deletedAt: mapDateTime(json, r'deletedAt', ''), email: mapValueOfType(json, r'email')!, @@ -215,6 +222,7 @@ class PartnerResponseDto { /// The list of required keys that must be present in a JSON. static const requiredKeys = { + 'avatarColor', 'createdAt', 'deletedAt', 'email', @@ -230,3 +238,101 @@ class PartnerResponseDto { }; } + +class PartnerResponseDtoAvatarColorEnum { + /// Instantiate a new enum with the provided [value]. + const PartnerResponseDtoAvatarColorEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const primary = PartnerResponseDtoAvatarColorEnum._(r'primary'); + static const pink = PartnerResponseDtoAvatarColorEnum._(r'pink'); + static const red = PartnerResponseDtoAvatarColorEnum._(r'red'); + static const yellow = PartnerResponseDtoAvatarColorEnum._(r'yellow'); + static const blue = PartnerResponseDtoAvatarColorEnum._(r'blue'); + static const green = PartnerResponseDtoAvatarColorEnum._(r'green'); + static const purple = PartnerResponseDtoAvatarColorEnum._(r'purple'); + static const orange = PartnerResponseDtoAvatarColorEnum._(r'orange'); + static const gray = PartnerResponseDtoAvatarColorEnum._(r'gray'); + static const amber = PartnerResponseDtoAvatarColorEnum._(r'amber'); + + /// List of all possible values in this [enum][PartnerResponseDtoAvatarColorEnum]. + static const values = [ + primary, + pink, + red, + yellow, + blue, + green, + purple, + orange, + gray, + amber, + ]; + + static PartnerResponseDtoAvatarColorEnum? fromJson(dynamic value) => PartnerResponseDtoAvatarColorEnumTypeTransformer().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 = PartnerResponseDtoAvatarColorEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [PartnerResponseDtoAvatarColorEnum] to String, +/// and [decode] dynamic data back to [PartnerResponseDtoAvatarColorEnum]. +class PartnerResponseDtoAvatarColorEnumTypeTransformer { + factory PartnerResponseDtoAvatarColorEnumTypeTransformer() => _instance ??= const PartnerResponseDtoAvatarColorEnumTypeTransformer._(); + + const PartnerResponseDtoAvatarColorEnumTypeTransformer._(); + + String encode(PartnerResponseDtoAvatarColorEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a PartnerResponseDtoAvatarColorEnum. + /// + /// 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. + PartnerResponseDtoAvatarColorEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'primary': return PartnerResponseDtoAvatarColorEnum.primary; + case r'pink': return PartnerResponseDtoAvatarColorEnum.pink; + case r'red': return PartnerResponseDtoAvatarColorEnum.red; + case r'yellow': return PartnerResponseDtoAvatarColorEnum.yellow; + case r'blue': return PartnerResponseDtoAvatarColorEnum.blue; + case r'green': return PartnerResponseDtoAvatarColorEnum.green; + case r'purple': return PartnerResponseDtoAvatarColorEnum.purple; + case r'orange': return PartnerResponseDtoAvatarColorEnum.orange; + case r'gray': return PartnerResponseDtoAvatarColorEnum.gray; + case r'amber': return PartnerResponseDtoAvatarColorEnum.amber; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [PartnerResponseDtoAvatarColorEnumTypeTransformer] instance. + static PartnerResponseDtoAvatarColorEnumTypeTransformer? _instance; +} + + diff --git a/mobile/openapi/lib/model/update_user_dto.dart b/mobile/openapi/lib/model/update_user_dto.dart index 15d04684e..d0e46e7f5 100644 --- a/mobile/openapi/lib/model/update_user_dto.dart +++ b/mobile/openapi/lib/model/update_user_dto.dart @@ -16,11 +16,10 @@ class UpdateUserDto { this.avatarColor, this.email, this.externalPath, - this.firstName, required this.id, this.isAdmin, - this.lastName, this.memoriesEnabled, + this.name, this.password, this.shouldChangePassword, this.storageLabel, @@ -50,14 +49,6 @@ class UpdateUserDto { /// String? externalPath; - /// - /// 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? firstName; - String id; /// @@ -74,7 +65,7 @@ class UpdateUserDto { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? lastName; + bool? memoriesEnabled; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -82,7 +73,7 @@ class UpdateUserDto { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - bool? memoriesEnabled; + String? name; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -113,11 +104,10 @@ class UpdateUserDto { other.avatarColor == avatarColor && other.email == email && other.externalPath == externalPath && - other.firstName == firstName && other.id == id && other.isAdmin == isAdmin && - other.lastName == lastName && other.memoriesEnabled == memoriesEnabled && + other.name == name && other.password == password && other.shouldChangePassword == shouldChangePassword && other.storageLabel == storageLabel; @@ -128,17 +118,16 @@ class UpdateUserDto { (avatarColor == null ? 0 : avatarColor!.hashCode) + (email == null ? 0 : email!.hashCode) + (externalPath == null ? 0 : externalPath!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + (id.hashCode) + (isAdmin == null ? 0 : isAdmin!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode) + (memoriesEnabled == null ? 0 : memoriesEnabled!.hashCode) + + (name == null ? 0 : name!.hashCode) + (password == null ? 0 : password!.hashCode) + (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + (storageLabel == null ? 0 : storageLabel!.hashCode); @override - String toString() => 'UpdateUserDto[avatarColor=$avatarColor, email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; + String toString() => 'UpdateUserDto[avatarColor=$avatarColor, email=$email, externalPath=$externalPath, id=$id, isAdmin=$isAdmin, memoriesEnabled=$memoriesEnabled, name=$name, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; Map toJson() { final json = {}; @@ -156,11 +145,6 @@ class UpdateUserDto { json[r'externalPath'] = this.externalPath; } else { // json[r'externalPath'] = null; - } - if (this.firstName != null) { - json[r'firstName'] = this.firstName; - } else { - // json[r'firstName'] = null; } json[r'id'] = this.id; if (this.isAdmin != null) { @@ -168,16 +152,16 @@ class UpdateUserDto { } else { // json[r'isAdmin'] = null; } - if (this.lastName != null) { - json[r'lastName'] = this.lastName; - } else { - // json[r'lastName'] = null; - } if (this.memoriesEnabled != null) { json[r'memoriesEnabled'] = this.memoriesEnabled; } else { // json[r'memoriesEnabled'] = null; } + if (this.name != null) { + json[r'name'] = this.name; + } else { + // json[r'name'] = null; + } if (this.password != null) { json[r'password'] = this.password; } else { @@ -207,11 +191,10 @@ class UpdateUserDto { avatarColor: UserAvatarColor.fromJson(json[r'avatarColor']), 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'), + name: mapValueOfType(json, r'name'), password: mapValueOfType(json, r'password'), shouldChangePassword: mapValueOfType(json, r'shouldChangePassword'), storageLabel: mapValueOfType(json, r'storageLabel'), diff --git a/mobile/openapi/lib/model/user_dto.dart b/mobile/openapi/lib/model/user_dto.dart index c57a5360f..d0ab8bae6 100644 --- a/mobile/openapi/lib/model/user_dto.dart +++ b/mobile/openapi/lib/model/user_dto.dart @@ -15,9 +15,8 @@ class UserDto { UserDto({ required this.avatarColor, required this.email, - required this.firstName, required this.id, - required this.lastName, + required this.name, required this.profileImagePath, }); @@ -25,11 +24,9 @@ class UserDto { String email; - String firstName; - String id; - String lastName; + String name; String profileImagePath; @@ -37,9 +34,8 @@ class UserDto { bool operator ==(Object other) => identical(this, other) || other is UserDto && other.avatarColor == avatarColor && other.email == email && - other.firstName == firstName && other.id == id && - other.lastName == lastName && + other.name == name && other.profileImagePath == profileImagePath; @override @@ -47,21 +43,19 @@ class UserDto { // ignore: unnecessary_parenthesis (avatarColor.hashCode) + (email.hashCode) + - (firstName.hashCode) + (id.hashCode) + - (lastName.hashCode) + + (name.hashCode) + (profileImagePath.hashCode); @override - String toString() => 'UserDto[avatarColor=$avatarColor, email=$email, firstName=$firstName, id=$id, lastName=$lastName, profileImagePath=$profileImagePath]'; + String toString() => 'UserDto[avatarColor=$avatarColor, email=$email, id=$id, name=$name, profileImagePath=$profileImagePath]'; Map toJson() { final json = {}; json[r'avatarColor'] = this.avatarColor; json[r'email'] = this.email; - json[r'firstName'] = this.firstName; json[r'id'] = this.id; - json[r'lastName'] = this.lastName; + json[r'name'] = this.name; json[r'profileImagePath'] = this.profileImagePath; return json; } @@ -76,9 +70,8 @@ class UserDto { return UserDto( avatarColor: UserDtoAvatarColorEnum.fromJson(json[r'avatarColor'])!, email: mapValueOfType(json, r'email')!, - firstName: mapValueOfType(json, r'firstName')!, id: mapValueOfType(json, r'id')!, - lastName: mapValueOfType(json, r'lastName')!, + name: mapValueOfType(json, r'name')!, profileImagePath: mapValueOfType(json, r'profileImagePath')!, ); } @@ -129,9 +122,8 @@ class UserDto { static const requiredKeys = { 'avatarColor', 'email', - 'firstName', 'id', - 'lastName', + 'name', 'profileImagePath', }; } diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart index 607d07d57..5674f08bf 100644 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ b/mobile/openapi/lib/model/user_response_dto.dart @@ -18,11 +18,10 @@ class UserResponseDto { required this.deletedAt, required this.email, required this.externalPath, - required this.firstName, required this.id, required this.isAdmin, - required this.lastName, this.memoriesEnabled, + required this.name, required this.oauthId, required this.profileImagePath, required this.shouldChangePassword, @@ -40,14 +39,10 @@ class UserResponseDto { String? externalPath; - String firstName; - String id; bool isAdmin; - String lastName; - /// /// 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 @@ -56,6 +51,8 @@ class UserResponseDto { /// bool? memoriesEnabled; + String name; + String oauthId; String profileImagePath; @@ -73,11 +70,10 @@ class UserResponseDto { 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.name == name && other.oauthId == oauthId && other.profileImagePath == profileImagePath && other.shouldChangePassword == shouldChangePassword && @@ -92,11 +88,10 @@ class UserResponseDto { (deletedAt == null ? 0 : deletedAt!.hashCode) + (email.hashCode) + (externalPath == null ? 0 : externalPath!.hashCode) + - (firstName.hashCode) + (id.hashCode) + (isAdmin.hashCode) + - (lastName.hashCode) + (memoriesEnabled == null ? 0 : memoriesEnabled!.hashCode) + + (name.hashCode) + (oauthId.hashCode) + (profileImagePath.hashCode) + (shouldChangePassword.hashCode) + @@ -104,7 +99,7 @@ class UserResponseDto { (updatedAt.hashCode); @override - String toString() => 'UserResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, oauthId=$oauthId, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, updatedAt=$updatedAt]'; + String toString() => 'UserResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, id=$id, isAdmin=$isAdmin, memoriesEnabled=$memoriesEnabled, name=$name, oauthId=$oauthId, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, updatedAt=$updatedAt]'; Map toJson() { final json = {}; @@ -121,15 +116,14 @@ class UserResponseDto { } 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; if (this.memoriesEnabled != null) { json[r'memoriesEnabled'] = this.memoriesEnabled; } else { // json[r'memoriesEnabled'] = null; } + json[r'name'] = this.name; json[r'oauthId'] = this.oauthId; json[r'profileImagePath'] = this.profileImagePath; json[r'shouldChangePassword'] = this.shouldChangePassword; @@ -155,11 +149,10 @@ class UserResponseDto { 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'), + name: mapValueOfType(json, r'name')!, oauthId: mapValueOfType(json, r'oauthId')!, profileImagePath: mapValueOfType(json, r'profileImagePath')!, shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, @@ -217,10 +210,9 @@ class UserResponseDto { 'deletedAt', 'email', 'externalPath', - 'firstName', 'id', 'isAdmin', - 'lastName', + 'name', 'oauthId', 'profileImagePath', 'shouldChangePassword', diff --git a/mobile/openapi/test/partner_response_dto_test.dart b/mobile/openapi/test/partner_response_dto_test.dart index 495762d3b..c74604a35 100644 --- a/mobile/openapi/test/partner_response_dto_test.dart +++ b/mobile/openapi/test/partner_response_dto_test.dart @@ -16,6 +16,11 @@ void main() { // final instance = PartnerResponseDto(); group('test PartnerResponseDto', () { + // String avatarColor + test('to test the property `avatarColor`', () async { + // TODO + }); + // DateTime createdAt test('to test the property `createdAt`', () async { // TODO diff --git a/mobile/openapi/test/update_user_dto_test.dart b/mobile/openapi/test/update_user_dto_test.dart index 5671ad616..0b4cc0b65 100644 --- a/mobile/openapi/test/update_user_dto_test.dart +++ b/mobile/openapi/test/update_user_dto_test.dart @@ -31,11 +31,6 @@ void main() { // TODO }); - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - // String id test('to test the property `id`', () async { // TODO @@ -46,13 +41,13 @@ void main() { // TODO }); - // String lastName - test('to test the property `lastName`', () async { + // bool memoriesEnabled + test('to test the property `memoriesEnabled`', () async { // TODO }); - // bool memoriesEnabled - test('to test the property `memoriesEnabled`', () async { + // String name + test('to test the property `name`', () async { // TODO }); diff --git a/mobile/openapi/test/user_dto_test.dart b/mobile/openapi/test/user_dto_test.dart index 29f208425..d9cf96cf0 100644 --- a/mobile/openapi/test/user_dto_test.dart +++ b/mobile/openapi/test/user_dto_test.dart @@ -26,18 +26,13 @@ void main() { // TODO }); - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - // String id test('to test the property `id`', () async { // TODO }); - // String lastName - test('to test the property `lastName`', () async { + // String name + test('to test the property `name`', () async { // TODO }); diff --git a/mobile/openapi/test/user_response_dto_test.dart b/mobile/openapi/test/user_response_dto_test.dart index d4a9e8185..dd1cf0927 100644 --- a/mobile/openapi/test/user_response_dto_test.dart +++ b/mobile/openapi/test/user_response_dto_test.dart @@ -41,11 +41,6 @@ void main() { // TODO }); - // String firstName - test('to test the property `firstName`', () async { - // TODO - }); - // String id test('to test the property `id`', () async { // TODO @@ -56,13 +51,13 @@ void main() { // TODO }); - // String lastName - test('to test the property `lastName`', () async { + // bool memoriesEnabled + test('to test the property `memoriesEnabled`', () async { // TODO }); - // bool memoriesEnabled - test('to test the property `memoriesEnabled`', () async { + // String name + test('to test the property `name`', () async { // TODO }); diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index bb610b5fe..acb6ef37d 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -7655,6 +7655,21 @@ }, "PartnerResponseDto": { "properties": { + "avatarColor": { + "enum": [ + "primary", + "pink", + "red", + "yellow", + "blue", + "green", + "purple", + "orange", + "gray", + "amber" + ], + "type": "string" + }, "createdAt": { "format": "date-time", "type": "string" @@ -7709,6 +7724,7 @@ "name", "email", "profileImagePath", + "avatarColor", "storageLabel", "externalPath", "shouldChangePassword", diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index 1d222eb6d..999090bb9 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -209,43 +209,6 @@ export interface AddUsersDto { */ 'sharedUserIds': Array; } -/** - * - * @export - * @interface AdminSignupResponseDto - */ -export interface AdminSignupResponseDto { - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'createdAt': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'email': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'firstName': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'id': string; - /** - * - * @type {string} - * @memberof AdminSignupResponseDto - */ - 'lastName': string; -} /** * * @export @@ -1378,24 +1341,18 @@ export interface CreateUserDto { * @memberof CreateUserDto */ 'externalPath'?: string | null; - /** - * - * @type {string} - * @memberof CreateUserDto - */ - 'firstName': string; - /** - * - * @type {string} - * @memberof CreateUserDto - */ - 'lastName': string; /** * * @type {boolean} * @memberof CreateUserDto */ 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof CreateUserDto + */ + 'name': string; /** * * @type {string} @@ -2174,12 +2131,6 @@ export interface LoginResponseDto { * @memberof LoginResponseDto */ 'accessToken': string; - /** - * - * @type {string} - * @memberof LoginResponseDto - */ - 'firstName': string; /** * * @type {boolean} @@ -2191,7 +2142,7 @@ export interface LoginResponseDto { * @type {string} * @memberof LoginResponseDto */ - 'lastName': string; + 'name': string; /** * * @type {string} @@ -2261,6 +2212,20 @@ export interface MapMarkerResponseDto { */ 'lon': number; } +/** + * + * @export + * @enum {string} + */ + +export const MapTheme = { + Light: 'light', + Dark: 'dark' +} as const; + +export type MapTheme = typeof MapTheme[keyof typeof MapTheme]; + + /** * * @export @@ -2384,6 +2349,119 @@ export interface OAuthConfigResponseDto { */ 'url'?: string; } +/** + * + * @export + * @interface PartnerResponseDto + */ +export interface PartnerResponseDto { + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'avatarColor': PartnerResponseDtoAvatarColorEnum; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'createdAt': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'deletedAt': string | null; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'email': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'externalPath': string | null; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'id': string; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'inTimeline'?: boolean; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'isAdmin': boolean; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'name': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'oauthId': string; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'profileImagePath': string; + /** + * + * @type {boolean} + * @memberof PartnerResponseDto + */ + 'shouldChangePassword': boolean; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'storageLabel': string | null; + /** + * + * @type {string} + * @memberof PartnerResponseDto + */ + 'updatedAt': string; +} + +export const PartnerResponseDtoAvatarColorEnum = { + Primary: 'primary', + Pink: 'pink', + Red: 'red', + Yellow: 'yellow', + Blue: 'blue', + Green: 'green', + Purple: 'purple', + Orange: 'orange', + Gray: 'gray', + Amber: 'amber' +} as const; + +export type PartnerResponseDtoAvatarColorEnum = typeof PartnerResponseDtoAvatarColorEnum[keyof typeof PartnerResponseDtoAvatarColorEnum]; + /** * * @export @@ -2593,6 +2671,20 @@ export interface QueueStatusDto { */ 'isPaused': boolean; } +/** + * + * @export + * @enum {string} + */ + +export const ReactionLevel = { + Album: 'album', + Asset: 'asset' +} as const; + +export type ReactionLevel = typeof ReactionLevel[keyof typeof ReactionLevel]; + + /** * * @export @@ -2859,12 +2951,6 @@ export interface ServerConfigDto { * @memberof ServerConfigDto */ 'loginPageMessage': string; - /** - * - * @type {string} - * @memberof ServerConfigDto - */ - 'mapTileUrl': string; /** * * @type {string} @@ -3349,13 +3435,7 @@ export interface SignUpDto { * @type {string} * @memberof SignUpDto */ - 'firstName': string; - /** - * - * @type {string} - * @memberof SignUpDto - */ - 'lastName': string; + 'name': string; /** * * @type {string} @@ -3732,6 +3812,12 @@ export interface SystemConfigMachineLearningDto { * @interface SystemConfigMapDto */ export interface SystemConfigMapDto { + /** + * + * @type {string} + * @memberof SystemConfigMapDto + */ + 'darkStyle': string; /** * * @type {boolean} @@ -3743,7 +3829,7 @@ export interface SystemConfigMapDto { * @type {string} * @memberof SystemConfigMapDto */ - 'tileUrl': string; + 'lightStyle': string; } /** * @@ -4229,6 +4315,19 @@ export interface UpdateLibraryDto { */ 'name'?: string; } +/** + * + * @export + * @interface UpdatePartnerDto + */ +export interface UpdatePartnerDto { + /** + * + * @type {boolean} + * @memberof UpdatePartnerDto + */ + 'inTimeline': boolean; +} /** * * @export @@ -4285,12 +4384,6 @@ export interface UpdateUserDto { * @memberof UpdateUserDto */ 'externalPath'?: string; - /** - * - * @type {string} - * @memberof UpdateUserDto - */ - 'firstName'?: string; /** * * @type {string} @@ -4303,18 +4396,18 @@ export interface UpdateUserDto { * @memberof UpdateUserDto */ 'isAdmin'?: boolean; - /** - * - * @type {string} - * @memberof UpdateUserDto - */ - 'lastName'?: string; /** * * @type {boolean} * @memberof UpdateUserDto */ 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof UpdateUserDto + */ + 'name'?: string; /** * * @type {string} @@ -4354,12 +4447,6 @@ export interface UsageByUserDto { * @memberof UsageByUserDto */ 'usage': number; - /** - * - * @type {string} - * @memberof UsageByUserDto - */ - 'userFirstName': string; /** * * @type {string} @@ -4371,7 +4458,7 @@ export interface UsageByUserDto { * @type {string} * @memberof UsageByUserDto */ - 'userLastName': string; + 'userName': string; /** * * @type {number} @@ -4419,12 +4506,6 @@ export interface UserDto { * @memberof UserDto */ 'email': string; - /** - * - * @type {string} - * @memberof UserDto - */ - 'firstName': string; /** * * @type {string} @@ -4436,7 +4517,7 @@ export interface UserDto { * @type {string} * @memberof UserDto */ - 'lastName': string; + 'name': string; /** * * @type {string} @@ -4496,12 +4577,6 @@ export interface UserResponseDto { * @memberof UserResponseDto */ 'externalPath': string | null; - /** - * - * @type {string} - * @memberof UserResponseDto - */ - 'firstName': string; /** * * @type {string} @@ -4514,18 +4589,18 @@ export interface UserResponseDto { * @memberof UserResponseDto */ 'isAdmin': boolean; - /** - * - * @type {string} - * @memberof UserResponseDto - */ - 'lastName': string; /** * * @type {boolean} * @memberof UserResponseDto */ 'memoriesEnabled'?: boolean; + /** + * + * @type {string} + * @memberof UserResponseDto + */ + 'name': string; /** * * @type {string} @@ -5162,11 +5237,12 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat * @param {string} albumId * @param {string} [assetId] * @param {ReactionType} [type] + * @param {ReactionLevel} [level] * @param {string} [userId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getActivities: async (albumId: string, assetId?: string, type?: ReactionType, userId?: string, options: AxiosRequestConfig = {}): Promise => { + getActivities: async (albumId: string, assetId?: string, type?: ReactionType, level?: ReactionLevel, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('getActivities', 'albumId', albumId) const localVarPath = `/activity`; @@ -5202,6 +5278,10 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['type'] = type; } + if (level !== undefined) { + localVarQueryParameter['level'] = level; + } + if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } @@ -5302,12 +5382,13 @@ export const ActivityApiFp = function(configuration?: Configuration) { * @param {string} albumId * @param {string} [assetId] * @param {ReactionType} [type] + * @param {ReactionLevel} [level] * @param {string} [userId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getActivities(albumId: string, assetId?: string, type?: ReactionType, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, userId, options); + async getActivities(albumId: string, assetId?: string, type?: ReactionType, level?: ReactionLevel, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, level, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -5356,7 +5437,7 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP * @throws {RequiredError} */ getActivities(requestParameters: ActivityApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(axios, basePath)); + return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.level, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * @@ -5425,6 +5506,13 @@ export interface ActivityApiGetActivitiesRequest { */ readonly type?: ReactionType + /** + * + * @type {ReactionLevel} + * @memberof ActivityApiGetActivities + */ + readonly level?: ReactionLevel + /** * * @type {string} @@ -5491,7 +5579,7 @@ export class ActivityApi extends BaseAPI { * @memberof ActivityApi */ public getActivities(requestParameters: ActivityApiGetActivitiesRequest, options?: AxiosRequestConfig) { - return ActivityApiFp(this.configuration).getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); + return ActivityApiFp(this.configuration).getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.level, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** @@ -7344,11 +7432,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getTimeBucket: async (size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getTimeBucket', 'size', size) // verify required parameter 'timeBucket' is not null or undefined @@ -7406,6 +7495,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['withStacked'] = withStacked; } + if (withPartners !== undefined) { + localVarQueryParameter['withPartners'] = withPartners; + } + if (timeBucket !== undefined) { localVarQueryParameter['timeBucket'] = timeBucket; } @@ -7435,11 +7528,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { + getTimeBuckets: async (size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'size' is not null or undefined assertParamExists('getTimeBuckets', 'size', size) const localVarPath = `/asset/time-buckets`; @@ -7495,6 +7589,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['withStacked'] = withStacked; } + if (withPartners !== undefined) { + localVarQueryParameter['withPartners'] = withPartners; + } + if (key !== undefined) { localVarQueryParameter['key'] = key; } @@ -8297,12 +8395,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key, options); + async getTimeBucket(size: TimeBucketSize, timeBucket: string, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, withPartners, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -8315,12 +8414,13 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {boolean} [isFavorite] * @param {boolean} [isTrashed] * @param {boolean} [withStacked] + * @param {boolean} [withPartners] * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key, options); + async getTimeBuckets(size: TimeBucketSize, userId?: string, albumId?: string, personId?: string, isArchived?: boolean, isFavorite?: boolean, isTrashed?: boolean, withStacked?: boolean, withPartners?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, withPartners, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -8617,7 +8717,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getTimeBucket(requestParameters: AssetApiGetTimeBucketRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * @@ -8626,7 +8726,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig): AxiosPromise> { - return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(axios, basePath)); + return localVarFp.getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(axios, basePath)); }, /** * Get all asset of a device that are in the database, ID only. @@ -9113,6 +9213,13 @@ export interface AssetApiGetTimeBucketRequest { */ readonly withStacked?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetTimeBucket + */ + readonly withPartners?: boolean + /** * * @type {string} @@ -9183,6 +9290,13 @@ export interface AssetApiGetTimeBucketsRequest { */ readonly withStacked?: boolean + /** + * + * @type {boolean} + * @memberof AssetApiGetTimeBuckets + */ + readonly withPartners?: boolean + /** * * @type {string} @@ -9662,7 +9776,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getTimeBucket(requestParameters: AssetApiGetTimeBucketRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getTimeBucket(requestParameters.size, requestParameters.timeBucket, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -9673,7 +9787,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public getTimeBuckets(requestParameters: AssetApiGetTimeBucketsRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).getTimeBuckets(requestParameters.size, requestParameters.userId, requestParameters.albumId, requestParameters.personId, requestParameters.isArchived, requestParameters.isFavorite, requestParameters.isTrashed, requestParameters.withStacked, requestParameters.withPartners, requestParameters.key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -10583,7 +10697,7 @@ export const AuthenticationApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async signUpAdmin(signUpDto: SignUpDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async signUpAdmin(signUpDto: SignUpDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.signUpAdmin(signUpDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -10663,7 +10777,7 @@ export const AuthenticationApiFactory = function (configuration?: Configuration, * @param {*} [options] Override http request option. * @throws {RequiredError} */ - signUpAdmin(requestParameters: AuthenticationApiSignUpAdminRequest, options?: AxiosRequestConfig): AxiosPromise { + signUpAdmin(requestParameters: AuthenticationApiSignUpAdminRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.signUpAdmin(requestParameters.signUpDto, options).then((request) => request(axios, basePath)); }, /** @@ -12382,6 +12496,54 @@ export const PartnerApiAxiosParamCreator = function (configuration?: Configurati let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} id + * @param {UpdatePartnerDto} updatePartnerDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePartner: async (id: string, updatePartnerDto: UpdatePartnerDto, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updatePartner', 'id', id) + // verify required parameter 'updatePartnerDto' is not null or undefined + assertParamExists('updatePartner', 'updatePartnerDto', updatePartnerDto) + const localVarPath = `/partner/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updatePartnerDto, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -12403,7 +12565,7 @@ export const PartnerApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createPartner(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createPartner(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createPartner(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12413,7 +12575,7 @@ export const PartnerApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPartners(direction: 'shared-by' | 'shared-with', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async getPartners(direction: 'shared-by' | 'shared-with', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPartners(direction, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -12427,6 +12589,17 @@ export const PartnerApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.removePartner(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {string} id + * @param {UpdatePartnerDto} updatePartnerDto + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePartner(id: string, updatePartnerDto: UpdatePartnerDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePartner(id, updatePartnerDto, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } }; @@ -12443,7 +12616,7 @@ export const PartnerApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createPartner(requestParameters: PartnerApiCreatePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { + createPartner(requestParameters: PartnerApiCreatePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createPartner(requestParameters.id, options).then((request) => request(axios, basePath)); }, /** @@ -12452,7 +12625,7 @@ export const PartnerApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPartners(requestParameters: PartnerApiGetPartnersRequest, options?: AxiosRequestConfig): AxiosPromise> { + getPartners(requestParameters: PartnerApiGetPartnersRequest, options?: AxiosRequestConfig): AxiosPromise> { return localVarFp.getPartners(requestParameters.direction, options).then((request) => request(axios, basePath)); }, /** @@ -12464,6 +12637,15 @@ export const PartnerApiFactory = function (configuration?: Configuration, basePa removePartner(requestParameters: PartnerApiRemovePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.removePartner(requestParameters.id, options).then((request) => request(axios, basePath)); }, + /** + * + * @param {PartnerApiUpdatePartnerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePartner(requestParameters: PartnerApiUpdatePartnerRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.updatePartner(requestParameters.id, requestParameters.updatePartnerDto, options).then((request) => request(axios, basePath)); + }, }; }; @@ -12509,6 +12691,27 @@ export interface PartnerApiRemovePartnerRequest { readonly id: string } +/** + * Request parameters for updatePartner operation in PartnerApi. + * @export + * @interface PartnerApiUpdatePartnerRequest + */ +export interface PartnerApiUpdatePartnerRequest { + /** + * + * @type {string} + * @memberof PartnerApiUpdatePartner + */ + readonly id: string + + /** + * + * @type {UpdatePartnerDto} + * @memberof PartnerApiUpdatePartner + */ + readonly updatePartnerDto: UpdatePartnerDto +} + /** * PartnerApi - object-oriented interface * @export @@ -12548,6 +12751,17 @@ export class PartnerApi extends BaseAPI { public removePartner(requestParameters: PartnerApiRemovePartnerRequest, options?: AxiosRequestConfig) { return PartnerApiFp(this.configuration).removePartner(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @param {PartnerApiUpdatePartnerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PartnerApi + */ + public updatePartner(requestParameters: PartnerApiUpdatePartnerRequest, options?: AxiosRequestConfig) { + return PartnerApiFp(this.configuration).updatePartner(requestParameters.id, requestParameters.updatePartnerDto, options).then((request) => request(this.axios, this.basePath)); + } } @@ -15174,6 +15388,51 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {MapTheme} theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMapStyle: async (theme: MapTheme, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'theme' is not null or undefined + assertParamExists('getMapStyle', 'theme', theme) + const localVarPath = `/system-config/map/style.json`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication cookie required + + // authentication api_key required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (theme !== undefined) { + localVarQueryParameter['theme'] = theme; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -15293,6 +15552,16 @@ export const SystemConfigApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getConfigDefaults(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @param {MapTheme} theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMapStyle(theme: MapTheme, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMapStyle(theme, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @param {*} [options] Override http request option. @@ -15338,6 +15607,15 @@ export const SystemConfigApiFactory = function (configuration?: Configuration, b getConfigDefaults(options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getConfigDefaults(options).then((request) => request(axios, basePath)); }, + /** + * + * @param {SystemConfigApiGetMapStyleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMapStyle(requestParameters: SystemConfigApiGetMapStyleRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getMapStyle(requestParameters.theme, options).then((request) => request(axios, basePath)); + }, /** * * @param {*} [options] Override http request option. @@ -15358,6 +15636,20 @@ export const SystemConfigApiFactory = function (configuration?: Configuration, b }; }; +/** + * Request parameters for getMapStyle operation in SystemConfigApi. + * @export + * @interface SystemConfigApiGetMapStyleRequest + */ +export interface SystemConfigApiGetMapStyleRequest { + /** + * + * @type {MapTheme} + * @memberof SystemConfigApiGetMapStyle + */ + readonly theme: MapTheme +} + /** * Request parameters for updateConfig operation in SystemConfigApi. * @export @@ -15399,6 +15691,17 @@ export class SystemConfigApi extends BaseAPI { return SystemConfigApiFp(this.configuration).getConfigDefaults(options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @param {SystemConfigApiGetMapStyleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemConfigApi + */ + public getMapStyle(requestParameters: SystemConfigApiGetMapStyleRequest, options?: AxiosRequestConfig) { + return SystemConfigApiFp(this.configuration).getMapStyle(requestParameters.theme, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @param {*} [options] Override http request option. diff --git a/web/src/lib/components/album-page/user-selection-modal.svelte b/web/src/lib/components/album-page/user-selection-modal.svelte index 1db22c36e..33b5494fc 100644 --- a/web/src/lib/components/album-page/user-selection-modal.svelte +++ b/web/src/lib/components/album-page/user-selection-modal.svelte @@ -71,7 +71,7 @@ on:click={() => handleUnselect(user)} class="flex place-items-center gap-1 rounded-full border border-gray-400 p-1 transition-colors hover:bg-gray-200 dark:hover:bg-gray-700" > - +

{user.name}

{/key} diff --git a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte index bc833a57e..b032ecceb 100644 --- a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte +++ b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte @@ -27,8 +27,7 @@ updateUserDto: { id: user.id, email: user.email, - firstName: user.firstName, - lastName: user.lastName, + name: user.name, avatarColor: color, }, });