chore: regenerate api

This commit is contained in:
martabal 2023-11-04 15:22:37 +01:00
parent f28c369c16
commit 6c2bf550bc
No known key found for this signature in database
GPG key ID: C00196E3148A52BD
22 changed files with 42 additions and 785 deletions

View file

@ -4,7 +4,7 @@
* Immich
* Immich API
*
* The version of the OpenAPI document: 1.83.0
* The version of the OpenAPI document: 1.84.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -4255,12 +4255,6 @@ export interface UpdateTagDto {
* @interface UpdateUserDto
*/
export interface UpdateUserDto {
/**
*
* @type {UserAvatarColor}
* @memberof UpdateUserDto
*/
'avatarColor'?: UserAvatarColor;
/**
*
* @type {string}
@ -4322,8 +4316,6 @@ export interface UpdateUserDto {
*/
'storageLabel'?: string;
}
/**
*
* @export
@ -4367,40 +4359,12 @@ export interface UsageByUserDto {
*/
'videos': number;
}
/**
*
* @export
* @enum {string}
*/
export const UserAvatarColor = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserAvatarColor = typeof UserAvatarColor[keyof typeof UserAvatarColor];
/**
*
* @export
* @interface UserDto
*/
export interface UserDto {
/**
*
* @type {string}
* @memberof UserDto
*/
'avatarColor': UserDtoAvatarColorEnum;
/**
*
* @type {string}
@ -4432,34 +4396,12 @@ export interface UserDto {
*/
'profileImagePath': string;
}
export const UserDtoAvatarColorEnum = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserDtoAvatarColorEnum = typeof UserDtoAvatarColorEnum[keyof typeof UserDtoAvatarColorEnum];
/**
*
* @export
* @interface UserResponseDto
*/
export interface UserResponseDto {
/**
*
* @type {string}
* @memberof UserResponseDto
*/
'avatarColor': UserResponseDtoAvatarColorEnum;
/**
*
* @type {string}
@ -4545,22 +4487,6 @@ export interface UserResponseDto {
*/
'updatedAt': string;
}
export const UserResponseDtoAvatarColorEnum = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserResponseDtoAvatarColorEnum = typeof UserResponseDtoAvatarColorEnum[keyof typeof UserResponseDtoAvatarColorEnum];
/**
*
* @export
@ -5150,10 +5076,11 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat
* @param {string} albumId
* @param {string} [assetId]
* @param {ReactionType} [type]
* @param {string} [userId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getActivities: async (albumId: string, assetId?: string, type?: ReactionType, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
getActivities: async (albumId: string, assetId?: string, type?: ReactionType, userId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'albumId' is not null or undefined
assertParamExists('getActivities', 'albumId', albumId)
const localVarPath = `/activity`;
@ -5189,6 +5116,10 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat
localVarQueryParameter['type'] = type;
}
if (userId !== undefined) {
localVarQueryParameter['userId'] = userId;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
@ -5285,11 +5216,12 @@ export const ActivityApiFp = function(configuration?: Configuration) {
* @param {string} albumId
* @param {string} [assetId]
* @param {ReactionType} [type]
* @param {string} [userId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getActivities(albumId: string, assetId?: string, type?: ReactionType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ActivityResponseDto>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, options);
async getActivities(albumId: string, assetId?: string, type?: ReactionType, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ActivityResponseDto>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, userId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
@ -5338,7 +5270,7 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP
* @throws {RequiredError}
*/
getActivities(requestParameters: ActivityApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<ActivityResponseDto>> {
return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, options).then((request) => request(axios, basePath));
return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(axios, basePath));
},
/**
*
@ -5406,6 +5338,13 @@ export interface ActivityApiGetActivitiesRequest {
* @memberof ActivityApiGetActivities
*/
readonly type?: ReactionType
/**
*
* @type {string}
* @memberof ActivityApiGetActivities
*/
readonly userId?: string
}
/**
@ -5466,7 +5405,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, options).then((request) => request(this.axios, this.basePath));
return ActivityApiFp(this.configuration).getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
}
/**
@ -16219,44 +16158,6 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
options: localVarRequestOptions,
};
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProfileImage: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/user/profile-image`;
// 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: 'DELETE', ...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)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
@ -16582,15 +16483,6 @@ export const UserApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(createUserDto, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteProfileImage(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProfileImage(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id
@ -16688,14 +16580,6 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig): AxiosPromise<UserResponseDto> {
return localVarFp.createUser(requestParameters.createUserDto, options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProfileImage(options?: AxiosRequestConfig): AxiosPromise<void> {
return localVarFp.deleteProfileImage(options).then((request) => request(axios, basePath));
},
/**
*
* @param {UserApiDeleteUserRequest} requestParameters Request parameters.
@ -16902,16 +16786,6 @@ export class UserApi extends BaseAPI {
return UserApiFp(this.configuration).createUser(requestParameters.createUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UserApi
*/
public deleteProfileImage(options?: AxiosRequestConfig) {
return UserApiFp(this.configuration).deleteProfileImage(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {UserApiDeleteUserRequest} requestParameters Request parameters.

View file

@ -163,7 +163,6 @@ doc/UpdateTagDto.md
doc/UpdateUserDto.md
doc/UsageByUserDto.md
doc/UserApi.md
doc/UserAvatarColor.md
doc/UserDto.md
doc/UserResponseDto.md
doc/ValidateAccessTokenResponseDto.md
@ -338,7 +337,6 @@ lib/model/update_stack_parent_dto.dart
lib/model/update_tag_dto.dart
lib/model/update_user_dto.dart
lib/model/usage_by_user_dto.dart
lib/model/user_avatar_color.dart
lib/model/user_dto.dart
lib/model/user_response_dto.dart
lib/model/validate_access_token_response_dto.dart
@ -504,7 +502,6 @@ test/update_tag_dto_test.dart
test/update_user_dto_test.dart
test/usage_by_user_dto_test.dart
test/user_api_test.dart
test/user_avatar_color_test.dart
test/user_dto_test.dart
test/user_response_dto_test.dart
test/validate_access_token_response_dto_test.dart

View file

@ -3,7 +3,7 @@ Immich API
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.83.0
- API version: 1.84.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
## Requirements
@ -193,7 +193,6 @@ Class | Method | HTTP request | Description
*TagApi* | [**updateTag**](doc//TagApi.md#updatetag) | **PATCH** /tag/{id} |
*UserApi* | [**createProfileImage**](doc//UserApi.md#createprofileimage) | **POST** /user/profile-image |
*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user |
*UserApi* | [**deleteProfileImage**](doc//UserApi.md#deleteprofileimage) | **DELETE** /user/profile-image |
*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{id} |
*UserApi* | [**getAllUsers**](doc//UserApi.md#getallusers) | **GET** /user |
*UserApi* | [**getMyUserInfo**](doc//UserApi.md#getmyuserinfo) | **GET** /user/me |
@ -348,7 +347,6 @@ Class | Method | HTTP request | Description
- [UpdateTagDto](doc//UpdateTagDto.md)
- [UpdateUserDto](doc//UpdateUserDto.md)
- [UsageByUserDto](doc//UsageByUserDto.md)
- [UserAvatarColor](doc//UserAvatarColor.md)
- [UserDto](doc//UserDto.md)
- [UserResponseDto](doc//UserResponseDto.md)
- [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md)

View file

@ -8,7 +8,6 @@ import 'package:openapi/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**avatarColor** | [**UserAvatarColor**](UserAvatarColor.md) | | [optional]
**email** | **String** | | [optional]
**externalPath** | **String** | | [optional]
**firstName** | **String** | | [optional]

View file

@ -11,7 +11,6 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**createProfileImage**](UserApi.md#createprofileimage) | **POST** /user/profile-image |
[**createUser**](UserApi.md#createuser) | **POST** /user |
[**deleteProfileImage**](UserApi.md#deleteprofileimage) | **DELETE** /user/profile-image |
[**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{id} |
[**getAllUsers**](UserApi.md#getallusers) | **GET** /user |
[**getMyUserInfo**](UserApi.md#getmyuserinfo) | **GET** /user/me |
@ -131,56 +130,6 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deleteProfileImage**
> deleteProfileImage()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = UserApi();
try {
api_instance.deleteProfileImage();
} catch (e) {
print('Exception when calling UserApi->deleteProfileImage: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deleteUser**
> UserResponseDto deleteUser(id)

View file

@ -1,14 +0,0 @@
# openapi.model.UserAvatarColor
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -8,7 +8,6 @@ import 'package:openapi/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**avatarColor** | **String** | |
**email** | **String** | |
**firstName** | **String** | |
**id** | **String** | |

View file

@ -8,7 +8,6 @@ import 'package:openapi/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**avatarColor** | **String** | |
**createdAt** | [**DateTime**](DateTime.md) | |
**deletedAt** | [**DateTime**](DateTime.md) | |
**email** | **String** | |

View file

@ -189,7 +189,6 @@ part 'model/update_stack_parent_dto.dart';
part 'model/update_tag_dto.dart';
part 'model/update_user_dto.dart';
part 'model/usage_by_user_dto.dart';
part 'model/user_avatar_color.dart';
part 'model/user_dto.dart';
part 'model/user_response_dto.dart';
part 'model/validate_access_token_response_dto.dart';

View file

@ -120,39 +120,6 @@ class UserApi {
return null;
}
/// Performs an HTTP 'DELETE /user/profile-image' operation and returns the [Response].
Future<Response> deleteProfileImageWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/user/profile-image';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<void> deleteProfileImage() async {
final response = await deleteProfileImageWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'DELETE /user/{id}' operation and returns the [Response].
/// Parameters:
///

View file

@ -467,8 +467,6 @@ class ApiClient {
return UpdateUserDto.fromJson(value);
case 'UsageByUserDto':
return UsageByUserDto.fromJson(value);
case 'UserAvatarColor':
return UserAvatarColorTypeTransformer().decode(value);
case 'UserDto':
return UserDto.fromJson(value);
case 'UserResponseDto':

View file

@ -121,9 +121,6 @@ String parameterToString(dynamic value) {
if (value is TranscodePolicy) {
return TranscodePolicyTypeTransformer().encode(value).toString();
}
if (value is UserAvatarColor) {
return UserAvatarColorTypeTransformer().encode(value).toString();
}
if (value is VideoCodec) {
return VideoCodecTypeTransformer().encode(value).toString();
}

View file

@ -13,7 +13,6 @@ part of openapi.api;
class UpdateUserDto {
/// Returns a new [UpdateUserDto] instance.
UpdateUserDto({
this.avatarColor,
this.email,
this.externalPath,
this.firstName,
@ -26,14 +25,6 @@ class UpdateUserDto {
this.storageLabel,
});
///
/// 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.
///
UserAvatarColor? avatarColor;
///
/// 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
@ -110,7 +101,6 @@ class UpdateUserDto {
@override
bool operator ==(Object other) => identical(this, other) || other is UpdateUserDto &&
other.avatarColor == avatarColor &&
other.email == email &&
other.externalPath == externalPath &&
other.firstName == firstName &&
@ -125,7 +115,6 @@ class UpdateUserDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor == null ? 0 : avatarColor!.hashCode) +
(email == null ? 0 : email!.hashCode) +
(externalPath == null ? 0 : externalPath!.hashCode) +
(firstName == null ? 0 : firstName!.hashCode) +
@ -138,15 +127,10 @@ class UpdateUserDto {
(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[email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.avatarColor != null) {
json[r'avatarColor'] = this.avatarColor;
} else {
// json[r'avatarColor'] = null;
}
if (this.email != null) {
json[r'email'] = this.email;
} else {
@ -204,7 +188,6 @@ class UpdateUserDto {
final json = value.cast<String, dynamic>();
return UpdateUserDto(
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor']),
email: mapValueOfType<String>(json, r'email'),
externalPath: mapValueOfType<String>(json, r'externalPath'),
firstName: mapValueOfType<String>(json, r'firstName'),

View file

@ -1,109 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UserAvatarColor {
/// Instantiate a new enum with the provided [value].
const UserAvatarColor._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const primary = UserAvatarColor._(r'primary');
static const pink = UserAvatarColor._(r'pink');
static const red = UserAvatarColor._(r'red');
static const yellow = UserAvatarColor._(r'yellow');
static const blue = UserAvatarColor._(r'blue');
static const green = UserAvatarColor._(r'green');
static const purple = UserAvatarColor._(r'purple');
static const orange = UserAvatarColor._(r'orange');
static const gray = UserAvatarColor._(r'gray');
static const amber = UserAvatarColor._(r'amber');
/// List of all possible values in this [enum][UserAvatarColor].
static const values = <UserAvatarColor>[
primary,
pink,
red,
yellow,
blue,
green,
purple,
orange,
gray,
amber,
];
static UserAvatarColor? fromJson(dynamic value) => UserAvatarColorTypeTransformer().decode(value);
static List<UserAvatarColor>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserAvatarColor>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UserAvatarColor.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [UserAvatarColor] to String,
/// and [decode] dynamic data back to [UserAvatarColor].
class UserAvatarColorTypeTransformer {
factory UserAvatarColorTypeTransformer() => _instance ??= const UserAvatarColorTypeTransformer._();
const UserAvatarColorTypeTransformer._();
String encode(UserAvatarColor data) => data.value;
/// Decodes a [dynamic value][data] to a UserAvatarColor.
///
/// 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.
UserAvatarColor? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'primary': return UserAvatarColor.primary;
case r'pink': return UserAvatarColor.pink;
case r'red': return UserAvatarColor.red;
case r'yellow': return UserAvatarColor.yellow;
case r'blue': return UserAvatarColor.blue;
case r'green': return UserAvatarColor.green;
case r'purple': return UserAvatarColor.purple;
case r'orange': return UserAvatarColor.orange;
case r'gray': return UserAvatarColor.gray;
case r'amber': return UserAvatarColor.amber;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [UserAvatarColorTypeTransformer] instance.
static UserAvatarColorTypeTransformer? _instance;
}

View file

@ -13,7 +13,6 @@ part of openapi.api;
class UserDto {
/// Returns a new [UserDto] instance.
UserDto({
required this.avatarColor,
required this.email,
required this.firstName,
required this.id,
@ -21,8 +20,6 @@ class UserDto {
required this.profileImagePath,
});
UserDtoAvatarColorEnum avatarColor;
String email;
String firstName;
@ -35,7 +32,6 @@ class UserDto {
@override
bool operator ==(Object other) => identical(this, other) || other is UserDto &&
other.avatarColor == avatarColor &&
other.email == email &&
other.firstName == firstName &&
other.id == id &&
@ -45,7 +41,6 @@ class UserDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor.hashCode) +
(email.hashCode) +
(firstName.hashCode) +
(id.hashCode) +
@ -53,11 +48,10 @@ class UserDto {
(profileImagePath.hashCode);
@override
String toString() => 'UserDto[avatarColor=$avatarColor, email=$email, firstName=$firstName, id=$id, lastName=$lastName, profileImagePath=$profileImagePath]';
String toString() => 'UserDto[email=$email, firstName=$firstName, id=$id, lastName=$lastName, profileImagePath=$profileImagePath]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'avatarColor'] = this.avatarColor;
json[r'email'] = this.email;
json[r'firstName'] = this.firstName;
json[r'id'] = this.id;
@ -74,7 +68,6 @@ class UserDto {
final json = value.cast<String, dynamic>();
return UserDto(
avatarColor: UserDtoAvatarColorEnum.fromJson(json[r'avatarColor'])!,
email: mapValueOfType<String>(json, r'email')!,
firstName: mapValueOfType<String>(json, r'firstName')!,
id: mapValueOfType<String>(json, r'id')!,
@ -127,7 +120,6 @@ class UserDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'avatarColor',
'email',
'firstName',
'id',
@ -136,101 +128,3 @@ class UserDto {
};
}
class UserDtoAvatarColorEnum {
/// Instantiate a new enum with the provided [value].
const UserDtoAvatarColorEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const primary = UserDtoAvatarColorEnum._(r'primary');
static const pink = UserDtoAvatarColorEnum._(r'pink');
static const red = UserDtoAvatarColorEnum._(r'red');
static const yellow = UserDtoAvatarColorEnum._(r'yellow');
static const blue = UserDtoAvatarColorEnum._(r'blue');
static const green = UserDtoAvatarColorEnum._(r'green');
static const purple = UserDtoAvatarColorEnum._(r'purple');
static const orange = UserDtoAvatarColorEnum._(r'orange');
static const gray = UserDtoAvatarColorEnum._(r'gray');
static const amber = UserDtoAvatarColorEnum._(r'amber');
/// List of all possible values in this [enum][UserDtoAvatarColorEnum].
static const values = <UserDtoAvatarColorEnum>[
primary,
pink,
red,
yellow,
blue,
green,
purple,
orange,
gray,
amber,
];
static UserDtoAvatarColorEnum? fromJson(dynamic value) => UserDtoAvatarColorEnumTypeTransformer().decode(value);
static List<UserDtoAvatarColorEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserDtoAvatarColorEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UserDtoAvatarColorEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [UserDtoAvatarColorEnum] to String,
/// and [decode] dynamic data back to [UserDtoAvatarColorEnum].
class UserDtoAvatarColorEnumTypeTransformer {
factory UserDtoAvatarColorEnumTypeTransformer() => _instance ??= const UserDtoAvatarColorEnumTypeTransformer._();
const UserDtoAvatarColorEnumTypeTransformer._();
String encode(UserDtoAvatarColorEnum data) => data.value;
/// Decodes a [dynamic value][data] to a UserDtoAvatarColorEnum.
///
/// 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.
UserDtoAvatarColorEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'primary': return UserDtoAvatarColorEnum.primary;
case r'pink': return UserDtoAvatarColorEnum.pink;
case r'red': return UserDtoAvatarColorEnum.red;
case r'yellow': return UserDtoAvatarColorEnum.yellow;
case r'blue': return UserDtoAvatarColorEnum.blue;
case r'green': return UserDtoAvatarColorEnum.green;
case r'purple': return UserDtoAvatarColorEnum.purple;
case r'orange': return UserDtoAvatarColorEnum.orange;
case r'gray': return UserDtoAvatarColorEnum.gray;
case r'amber': return UserDtoAvatarColorEnum.amber;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [UserDtoAvatarColorEnumTypeTransformer] instance.
static UserDtoAvatarColorEnumTypeTransformer? _instance;
}

View file

@ -13,7 +13,6 @@ part of openapi.api;
class UserResponseDto {
/// Returns a new [UserResponseDto] instance.
UserResponseDto({
required this.avatarColor,
required this.createdAt,
required this.deletedAt,
required this.email,
@ -30,8 +29,6 @@ class UserResponseDto {
required this.updatedAt,
});
UserResponseDtoAvatarColorEnum avatarColor;
DateTime createdAt;
DateTime? deletedAt;
@ -68,7 +65,6 @@ class UserResponseDto {
@override
bool operator ==(Object other) => identical(this, other) || other is UserResponseDto &&
other.avatarColor == avatarColor &&
other.createdAt == createdAt &&
other.deletedAt == deletedAt &&
other.email == email &&
@ -87,7 +83,6 @@ class UserResponseDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor.hashCode) +
(createdAt.hashCode) +
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(email.hashCode) +
@ -104,11 +99,10 @@ 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[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]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'avatarColor'] = this.avatarColor;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
@ -150,7 +144,6 @@ class UserResponseDto {
final json = value.cast<String, dynamic>();
return UserResponseDto(
avatarColor: UserResponseDtoAvatarColorEnum.fromJson(json[r'avatarColor'])!,
createdAt: mapDateTime(json, r'createdAt', '')!,
deletedAt: mapDateTime(json, r'deletedAt', ''),
email: mapValueOfType<String>(json, r'email')!,
@ -212,7 +205,6 @@ class UserResponseDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'avatarColor',
'createdAt',
'deletedAt',
'email',
@ -229,101 +221,3 @@ class UserResponseDto {
};
}
class UserResponseDtoAvatarColorEnum {
/// Instantiate a new enum with the provided [value].
const UserResponseDtoAvatarColorEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const primary = UserResponseDtoAvatarColorEnum._(r'primary');
static const pink = UserResponseDtoAvatarColorEnum._(r'pink');
static const red = UserResponseDtoAvatarColorEnum._(r'red');
static const yellow = UserResponseDtoAvatarColorEnum._(r'yellow');
static const blue = UserResponseDtoAvatarColorEnum._(r'blue');
static const green = UserResponseDtoAvatarColorEnum._(r'green');
static const purple = UserResponseDtoAvatarColorEnum._(r'purple');
static const orange = UserResponseDtoAvatarColorEnum._(r'orange');
static const gray = UserResponseDtoAvatarColorEnum._(r'gray');
static const amber = UserResponseDtoAvatarColorEnum._(r'amber');
/// List of all possible values in this [enum][UserResponseDtoAvatarColorEnum].
static const values = <UserResponseDtoAvatarColorEnum>[
primary,
pink,
red,
yellow,
blue,
green,
purple,
orange,
gray,
amber,
];
static UserResponseDtoAvatarColorEnum? fromJson(dynamic value) => UserResponseDtoAvatarColorEnumTypeTransformer().decode(value);
static List<UserResponseDtoAvatarColorEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserResponseDtoAvatarColorEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UserResponseDtoAvatarColorEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [UserResponseDtoAvatarColorEnum] to String,
/// and [decode] dynamic data back to [UserResponseDtoAvatarColorEnum].
class UserResponseDtoAvatarColorEnumTypeTransformer {
factory UserResponseDtoAvatarColorEnumTypeTransformer() => _instance ??= const UserResponseDtoAvatarColorEnumTypeTransformer._();
const UserResponseDtoAvatarColorEnumTypeTransformer._();
String encode(UserResponseDtoAvatarColorEnum data) => data.value;
/// Decodes a [dynamic value][data] to a UserResponseDtoAvatarColorEnum.
///
/// 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.
UserResponseDtoAvatarColorEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'primary': return UserResponseDtoAvatarColorEnum.primary;
case r'pink': return UserResponseDtoAvatarColorEnum.pink;
case r'red': return UserResponseDtoAvatarColorEnum.red;
case r'yellow': return UserResponseDtoAvatarColorEnum.yellow;
case r'blue': return UserResponseDtoAvatarColorEnum.blue;
case r'green': return UserResponseDtoAvatarColorEnum.green;
case r'purple': return UserResponseDtoAvatarColorEnum.purple;
case r'orange': return UserResponseDtoAvatarColorEnum.orange;
case r'gray': return UserResponseDtoAvatarColorEnum.gray;
case r'amber': return UserResponseDtoAvatarColorEnum.amber;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [UserResponseDtoAvatarColorEnumTypeTransformer] instance.
static UserResponseDtoAvatarColorEnumTypeTransformer? _instance;
}

View file

@ -16,11 +16,6 @@ void main() {
// final instance = UpdateUserDto();
group('test UpdateUserDto', () {
// UserAvatarColor avatarColor
test('to test the property `avatarColor`', () async {
// TODO
});
// String email
test('to test the property `email`', () async {
// TODO

View file

@ -27,11 +27,6 @@ void main() {
// TODO
});
//Future deleteProfileImage() async
test('test deleteProfileImage', () async {
// TODO
});
//Future<UserResponseDto> deleteUser(String id) async
test('test deleteUser', () async {
// TODO

View file

@ -1,21 +0,0 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for UserAvatarColor
void main() {
group('test UserAvatarColor', () {
});
}

View file

@ -16,11 +16,6 @@ void main() {
// final instance = UserDto();
group('test UserDto', () {
// String avatarColor
test('to test the property `avatarColor`', () async {
// TODO
});
// String email
test('to test the property `email`', () async {
// TODO

View file

@ -16,11 +16,6 @@ void main() {
// final instance = UserResponseDto();
group('test UserResponseDto', () {
// String avatarColor
test('to test the property `avatarColor`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO

View file

@ -4,7 +4,7 @@
* Immich
* Immich API
*
* The version of the OpenAPI document: 1.83.0
* The version of the OpenAPI document: 1.84.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -4255,12 +4255,6 @@ export interface UpdateTagDto {
* @interface UpdateUserDto
*/
export interface UpdateUserDto {
/**
*
* @type {UserAvatarColor}
* @memberof UpdateUserDto
*/
'avatarColor'?: UserAvatarColor;
/**
*
* @type {string}
@ -4322,8 +4316,6 @@ export interface UpdateUserDto {
*/
'storageLabel'?: string;
}
/**
*
* @export
@ -4367,40 +4359,12 @@ export interface UsageByUserDto {
*/
'videos': number;
}
/**
*
* @export
* @enum {string}
*/
export const UserAvatarColor = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserAvatarColor = typeof UserAvatarColor[keyof typeof UserAvatarColor];
/**
*
* @export
* @interface UserDto
*/
export interface UserDto {
/**
*
* @type {string}
* @memberof UserDto
*/
'avatarColor': UserDtoAvatarColorEnum;
/**
*
* @type {string}
@ -4432,34 +4396,12 @@ export interface UserDto {
*/
'profileImagePath': string;
}
export const UserDtoAvatarColorEnum = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserDtoAvatarColorEnum = typeof UserDtoAvatarColorEnum[keyof typeof UserDtoAvatarColorEnum];
/**
*
* @export
* @interface UserResponseDto
*/
export interface UserResponseDto {
/**
*
* @type {string}
* @memberof UserResponseDto
*/
'avatarColor': UserResponseDtoAvatarColorEnum;
/**
*
* @type {string}
@ -4545,22 +4487,6 @@ export interface UserResponseDto {
*/
'updatedAt': string;
}
export const UserResponseDtoAvatarColorEnum = {
Primary: 'primary',
Pink: 'pink',
Red: 'red',
Yellow: 'yellow',
Blue: 'blue',
Green: 'green',
Purple: 'purple',
Orange: 'orange',
Gray: 'gray',
Amber: 'amber'
} as const;
export type UserResponseDtoAvatarColorEnum = typeof UserResponseDtoAvatarColorEnum[keyof typeof UserResponseDtoAvatarColorEnum];
/**
*
* @export
@ -5150,10 +5076,11 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat
* @param {string} albumId
* @param {string} [assetId]
* @param {ReactionType} [type]
* @param {string} [userId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getActivities: async (albumId: string, assetId?: string, type?: ReactionType, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
getActivities: async (albumId: string, assetId?: string, type?: ReactionType, userId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'albumId' is not null or undefined
assertParamExists('getActivities', 'albumId', albumId)
const localVarPath = `/activity`;
@ -5189,6 +5116,10 @@ export const ActivityApiAxiosParamCreator = function (configuration?: Configurat
localVarQueryParameter['type'] = type;
}
if (userId !== undefined) {
localVarQueryParameter['userId'] = userId;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
@ -5285,11 +5216,12 @@ export const ActivityApiFp = function(configuration?: Configuration) {
* @param {string} albumId
* @param {string} [assetId]
* @param {ReactionType} [type]
* @param {string} [userId]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getActivities(albumId: string, assetId?: string, type?: ReactionType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ActivityResponseDto>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, options);
async getActivities(albumId: string, assetId?: string, type?: ReactionType, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ActivityResponseDto>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(albumId, assetId, type, userId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
@ -5338,7 +5270,7 @@ export const ActivityApiFactory = function (configuration?: Configuration, baseP
* @throws {RequiredError}
*/
getActivities(requestParameters: ActivityApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<ActivityResponseDto>> {
return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, options).then((request) => request(axios, basePath));
return localVarFp.getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(axios, basePath));
},
/**
*
@ -5406,6 +5338,13 @@ export interface ActivityApiGetActivitiesRequest {
* @memberof ActivityApiGetActivities
*/
readonly type?: ReactionType
/**
*
* @type {string}
* @memberof ActivityApiGetActivities
*/
readonly userId?: string
}
/**
@ -5466,7 +5405,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, options).then((request) => request(this.axios, this.basePath));
return ActivityApiFp(this.configuration).getActivities(requestParameters.albumId, requestParameters.assetId, requestParameters.type, requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
}
/**
@ -16219,44 +16158,6 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
options: localVarRequestOptions,
};
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProfileImage: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/user/profile-image`;
// 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: 'DELETE', ...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)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id
@ -16582,15 +16483,6 @@ export const UserApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(createUserDto, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteProfileImage(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProfileImage(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id
@ -16688,14 +16580,6 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig): AxiosPromise<UserResponseDto> {
return localVarFp.createUser(requestParameters.createUserDto, options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteProfileImage(options?: AxiosRequestConfig): AxiosPromise<void> {
return localVarFp.deleteProfileImage(options).then((request) => request(axios, basePath));
},
/**
*
* @param {UserApiDeleteUserRequest} requestParameters Request parameters.
@ -16902,16 +16786,6 @@ export class UserApi extends BaseAPI {
return UserApiFp(this.configuration).createUser(requestParameters.createUserDto, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UserApi
*/
public deleteProfileImage(options?: AxiosRequestConfig) {
return UserApiFp(this.configuration).deleteProfileImage(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {UserApiDeleteUserRequest} requestParameters Request parameters.