mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix(server): pin openapi genreator patch and regenerate api (#3573)
* fix(server): pin openapi genreator patch and regenerate api * variable
This commit is contained in:
parent
3edb347666
commit
13df619ba9
4
mobile/openapi/doc/PeopleResponseDto.md
generated
4
mobile/openapi/doc/PeopleResponseDto.md
generated
@ -9,8 +9,8 @@ import 'package:openapi/api.dart';
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**people** | [**List<PersonResponseDto>**](PersonResponseDto.md) | | [default to const []]
|
||||
**total** | **num** | |
|
||||
**visible** | **num** | |
|
||||
**total** | **int** | |
|
||||
**visible** | **int** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
6
mobile/openapi/lib/model/add_users_dto.dart
generated
6
mobile/openapi/lib/model/add_users_dto.dart
generated
@ -20,7 +20,7 @@ class AddUsersDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AddUsersDto &&
|
||||
_deepEquality.equals(other.sharedUserIds, sharedUserIds);
|
||||
other.sharedUserIds == sharedUserIds;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -44,8 +44,8 @@ class AddUsersDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AddUsersDto(
|
||||
sharedUserIds: json[r'sharedUserIds'] is Iterable
|
||||
? (json[r'sharedUserIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
sharedUserIds: json[r'sharedUserIds'] is List
|
||||
? (json[r'sharedUserIds'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class AdminSignupResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AdminSignupResponseDto(
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
email: mapValueOfType<String>(json, r'email')!,
|
||||
firstName: mapValueOfType<String>(json, r'firstName')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
|
10
mobile/openapi/lib/model/album_response_dto.dart
generated
10
mobile/openapi/lib/model/album_response_dto.dart
generated
@ -65,7 +65,7 @@ class AlbumResponseDto {
|
||||
other.albumName == albumName &&
|
||||
other.albumThumbnailAssetId == albumThumbnailAssetId &&
|
||||
other.assetCount == assetCount &&
|
||||
_deepEquality.equals(other.assets, assets) &&
|
||||
other.assets == assets &&
|
||||
other.createdAt == createdAt &&
|
||||
other.description == description &&
|
||||
other.id == id &&
|
||||
@ -73,7 +73,7 @@ class AlbumResponseDto {
|
||||
other.owner == owner &&
|
||||
other.ownerId == ownerId &&
|
||||
other.shared == shared &&
|
||||
_deepEquality.equals(other.sharedUsers, sharedUsers) &&
|
||||
other.sharedUsers == sharedUsers &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@override
|
||||
@ -134,15 +134,15 @@ class AlbumResponseDto {
|
||||
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
|
||||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
description: mapValueOfType<String>(json, r'description')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', r''),
|
||||
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', ''),
|
||||
owner: UserResponseDto.fromJson(json[r'owner'])!,
|
||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||
shared: mapValueOfType<bool>(json, r'shared')!,
|
||||
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
@ -62,10 +62,10 @@ class APIKeyResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return APIKeyResponseDto(
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
@ -20,7 +20,7 @@ class AssetBulkUploadCheckDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckDto &&
|
||||
_deepEquality.equals(other.assets, assets);
|
||||
other.assets == assets;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
|
@ -20,7 +20,7 @@ class AssetBulkUploadCheckResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResponseDto &&
|
||||
_deepEquality.equals(other.results, results);
|
||||
other.results == results;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
|
6
mobile/openapi/lib/model/asset_ids_dto.dart
generated
6
mobile/openapi/lib/model/asset_ids_dto.dart
generated
@ -20,7 +20,7 @@ class AssetIdsDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AssetIdsDto &&
|
||||
_deepEquality.equals(other.assetIds, assetIds);
|
||||
other.assetIds == assetIds;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -44,8 +44,8 @@ class AssetIdsDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AssetIdsDto(
|
||||
assetIds: json[r'assetIds'] is Iterable
|
||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
assetIds: json[r'assetIds'] is List
|
||||
? (json[r'assetIds'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
10
mobile/openapi/lib/model/asset_response_dto.dart
generated
10
mobile/openapi/lib/model/asset_response_dto.dart
generated
@ -108,10 +108,10 @@ class AssetResponseDto {
|
||||
other.originalFileName == originalFileName &&
|
||||
other.originalPath == originalPath &&
|
||||
other.ownerId == ownerId &&
|
||||
_deepEquality.equals(other.people, people) &&
|
||||
other.people == people &&
|
||||
other.resized == resized &&
|
||||
other.smartInfo == smartInfo &&
|
||||
_deepEquality.equals(other.tags, tags) &&
|
||||
other.tags == tags &&
|
||||
other.thumbhash == thumbhash &&
|
||||
other.type == type &&
|
||||
other.updatedAt == updatedAt;
|
||||
@ -199,8 +199,8 @@ class AssetResponseDto {
|
||||
deviceId: mapValueOfType<String>(json, r'deviceId')!,
|
||||
duration: mapValueOfType<String>(json, r'duration')!,
|
||||
exifInfo: ExifResponseDto.fromJson(json[r'exifInfo']),
|
||||
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!,
|
||||
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!,
|
||||
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
|
||||
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
|
||||
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
|
||||
@ -214,7 +214,7 @@ class AssetResponseDto {
|
||||
tags: TagResponseDto.listFromJson(json[r'tags']),
|
||||
thumbhash: mapValueOfType<String>(json, r'thumbhash'),
|
||||
type: AssetTypeEnum.fromJson(json[r'type'])!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
6
mobile/openapi/lib/model/bulk_ids_dto.dart
generated
6
mobile/openapi/lib/model/bulk_ids_dto.dart
generated
@ -20,7 +20,7 @@ class BulkIdsDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is BulkIdsDto &&
|
||||
_deepEquality.equals(other.ids, ids);
|
||||
other.ids == ids;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -44,8 +44,8 @@ class BulkIdsDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return BulkIdsDto(
|
||||
ids: json[r'ids'] is Iterable
|
||||
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
|
||||
ids: json[r'ids'] is List
|
||||
? (json[r'ids'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class CheckExistingAssetsDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CheckExistingAssetsDto &&
|
||||
_deepEquality.equals(other.deviceAssetIds, deviceAssetIds) &&
|
||||
other.deviceAssetIds == deviceAssetIds &&
|
||||
other.deviceId == deviceId;
|
||||
|
||||
@override
|
||||
@ -50,8 +50,8 @@ class CheckExistingAssetsDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return CheckExistingAssetsDto(
|
||||
deviceAssetIds: json[r'deviceAssetIds'] is Iterable
|
||||
? (json[r'deviceAssetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
deviceAssetIds: json[r'deviceAssetIds'] is List
|
||||
? (json[r'deviceAssetIds'] as List).cast<String>()
|
||||
: const [],
|
||||
deviceId: mapValueOfType<String>(json, r'deviceId')!,
|
||||
);
|
||||
|
@ -20,7 +20,7 @@ class CheckExistingAssetsResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CheckExistingAssetsResponseDto &&
|
||||
_deepEquality.equals(other.existingIds, existingIds);
|
||||
other.existingIds == existingIds;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -44,8 +44,8 @@ class CheckExistingAssetsResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return CheckExistingAssetsResponseDto(
|
||||
existingIds: json[r'existingIds'] is Iterable
|
||||
? (json[r'existingIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
existingIds: json[r'existingIds'] is List
|
||||
? (json[r'existingIds'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
12
mobile/openapi/lib/model/create_album_dto.dart
generated
12
mobile/openapi/lib/model/create_album_dto.dart
generated
@ -36,9 +36,9 @@ class CreateAlbumDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto &&
|
||||
other.albumName == albumName &&
|
||||
_deepEquality.equals(other.assetIds, assetIds) &&
|
||||
other.assetIds == assetIds &&
|
||||
other.description == description &&
|
||||
_deepEquality.equals(other.sharedWithUserIds, sharedWithUserIds);
|
||||
other.sharedWithUserIds == sharedWithUserIds;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -73,12 +73,12 @@ class CreateAlbumDto {
|
||||
|
||||
return CreateAlbumDto(
|
||||
albumName: mapValueOfType<String>(json, r'albumName')!,
|
||||
assetIds: json[r'assetIds'] is Iterable
|
||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
assetIds: json[r'assetIds'] is List
|
||||
? (json[r'assetIds'] as List).cast<String>()
|
||||
: const [],
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
sharedWithUserIds: json[r'sharedWithUserIds'] is Iterable
|
||||
? (json[r'sharedWithUserIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
sharedWithUserIds: json[r'sharedWithUserIds'] is List
|
||||
? (json[r'sharedWithUserIds'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
6
mobile/openapi/lib/model/delete_asset_dto.dart
generated
6
mobile/openapi/lib/model/delete_asset_dto.dart
generated
@ -20,7 +20,7 @@ class DeleteAssetDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeleteAssetDto &&
|
||||
_deepEquality.equals(other.ids, ids);
|
||||
other.ids == ids;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -44,8 +44,8 @@ class DeleteAssetDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return DeleteAssetDto(
|
||||
ids: json[r'ids'] is Iterable
|
||||
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
|
||||
ids: json[r'ids'] is List
|
||||
? (json[r'ids'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class DownloadArchiveInfo {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveInfo &&
|
||||
_deepEquality.equals(other.assetIds, assetIds) &&
|
||||
other.assetIds == assetIds &&
|
||||
other.size == size;
|
||||
|
||||
@override
|
||||
@ -50,8 +50,8 @@ class DownloadArchiveInfo {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return DownloadArchiveInfo(
|
||||
assetIds: json[r'assetIds'] is Iterable
|
||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
assetIds: json[r'assetIds'] is List
|
||||
? (json[r'assetIds'] as List).cast<String>()
|
||||
: const [],
|
||||
size: mapValueOfType<int>(json, r'size')!,
|
||||
);
|
||||
|
@ -23,7 +23,7 @@ class DownloadResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DownloadResponseDto &&
|
||||
_deepEquality.equals(other.archives, archives) &&
|
||||
other.archives == archives &&
|
||||
other.totalSize == totalSize;
|
||||
|
||||
@override
|
||||
|
18
mobile/openapi/lib/model/exif_response_dto.dart
generated
18
mobile/openapi/lib/model/exif_response_dto.dart
generated
@ -250,35 +250,35 @@ class ExifResponseDto {
|
||||
return ExifResponseDto(
|
||||
city: mapValueOfType<String>(json, r'city'),
|
||||
country: mapValueOfType<String>(json, r'country'),
|
||||
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', r''),
|
||||
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', ''),
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
exifImageHeight: json[r'exifImageHeight'] == null
|
||||
? null
|
||||
: num.parse('${json[r'exifImageHeight']}'),
|
||||
: num.parse(json[r'exifImageHeight'].toString()),
|
||||
exifImageWidth: json[r'exifImageWidth'] == null
|
||||
? null
|
||||
: num.parse('${json[r'exifImageWidth']}'),
|
||||
: num.parse(json[r'exifImageWidth'].toString()),
|
||||
exposureTime: mapValueOfType<String>(json, r'exposureTime'),
|
||||
fNumber: json[r'fNumber'] == null
|
||||
? null
|
||||
: num.parse('${json[r'fNumber']}'),
|
||||
: num.parse(json[r'fNumber'].toString()),
|
||||
fileSizeInByte: mapValueOfType<int>(json, r'fileSizeInByte'),
|
||||
focalLength: json[r'focalLength'] == null
|
||||
? null
|
||||
: num.parse('${json[r'focalLength']}'),
|
||||
: num.parse(json[r'focalLength'].toString()),
|
||||
iso: json[r'iso'] == null
|
||||
? null
|
||||
: num.parse('${json[r'iso']}'),
|
||||
: num.parse(json[r'iso'].toString()),
|
||||
latitude: json[r'latitude'] == null
|
||||
? null
|
||||
: num.parse('${json[r'latitude']}'),
|
||||
: num.parse(json[r'latitude'].toString()),
|
||||
lensModel: mapValueOfType<String>(json, r'lensModel'),
|
||||
longitude: json[r'longitude'] == null
|
||||
? null
|
||||
: num.parse('${json[r'longitude']}'),
|
||||
: num.parse(json[r'longitude'].toString()),
|
||||
make: mapValueOfType<String>(json, r'make'),
|
||||
model: mapValueOfType<String>(json, r'model'),
|
||||
modifyDate: mapDateTime(json, r'modifyDate', r''),
|
||||
modifyDate: mapDateTime(json, r'modifyDate', ''),
|
||||
orientation: mapValueOfType<String>(json, r'orientation'),
|
||||
projectionType: mapValueOfType<String>(json, r'projectionType'),
|
||||
state: mapValueOfType<String>(json, r'state'),
|
||||
|
4
mobile/openapi/lib/model/import_asset_dto.dart
generated
4
mobile/openapi/lib/model/import_asset_dto.dart
generated
@ -148,8 +148,8 @@ class ImportAssetDto {
|
||||
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
|
||||
deviceId: mapValueOfType<String>(json, r'deviceId')!,
|
||||
duration: mapValueOfType<String>(json, r'duration'),
|
||||
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!,
|
||||
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!,
|
||||
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
|
||||
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
|
||||
isArchived: mapValueOfType<bool>(json, r'isArchived'),
|
||||
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
|
||||
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly') ?? true,
|
||||
|
@ -23,7 +23,7 @@ class MemoryLaneResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MemoryLaneResponseDto &&
|
||||
_deepEquality.equals(other.assets, assets) &&
|
||||
other.assets == assets &&
|
||||
other.title == title;
|
||||
|
||||
@override
|
||||
|
6
mobile/openapi/lib/model/merge_person_dto.dart
generated
6
mobile/openapi/lib/model/merge_person_dto.dart
generated
@ -20,7 +20,7 @@ class MergePersonDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MergePersonDto &&
|
||||
_deepEquality.equals(other.ids, ids);
|
||||
other.ids == ids;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -44,8 +44,8 @@ class MergePersonDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return MergePersonDto(
|
||||
ids: json[r'ids'] is Iterable
|
||||
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
|
||||
ids: json[r'ids'] is List
|
||||
? (json[r'ids'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
10
mobile/openapi/lib/model/people_response_dto.dart
generated
10
mobile/openapi/lib/model/people_response_dto.dart
generated
@ -20,13 +20,13 @@ class PeopleResponseDto {
|
||||
|
||||
List<PersonResponseDto> people;
|
||||
|
||||
num total;
|
||||
int total;
|
||||
|
||||
num visible;
|
||||
int visible;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is PeopleResponseDto &&
|
||||
_deepEquality.equals(other.people, people) &&
|
||||
other.people == people &&
|
||||
other.total == total &&
|
||||
other.visible == visible;
|
||||
|
||||
@ -57,8 +57,8 @@ class PeopleResponseDto {
|
||||
|
||||
return PeopleResponseDto(
|
||||
people: PersonResponseDto.listFromJson(json[r'people']),
|
||||
total: num.parse('${json[r'total']}'),
|
||||
visible: num.parse('${json[r'visible']}'),
|
||||
total: mapValueOfType<int>(json, r'total')!,
|
||||
visible: mapValueOfType<int>(json, r'visible')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
2
mobile/openapi/lib/model/people_update_dto.dart
generated
2
mobile/openapi/lib/model/people_update_dto.dart
generated
@ -20,7 +20,7 @@ class PeopleUpdateDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateDto &&
|
||||
_deepEquality.equals(other.people, people);
|
||||
other.people == people;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
|
@ -30,8 +30,8 @@ class SearchAlbumResponseDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SearchAlbumResponseDto &&
|
||||
other.count == count &&
|
||||
_deepEquality.equals(other.facets, facets) &&
|
||||
_deepEquality.equals(other.items, items) &&
|
||||
other.facets == facets &&
|
||||
other.items == items &&
|
||||
other.total == total;
|
||||
|
||||
@override
|
||||
|
@ -30,8 +30,8 @@ class SearchAssetResponseDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SearchAssetResponseDto &&
|
||||
other.count == count &&
|
||||
_deepEquality.equals(other.facets, facets) &&
|
||||
_deepEquality.equals(other.items, items) &&
|
||||
other.facets == facets &&
|
||||
other.items == items &&
|
||||
other.total == total;
|
||||
|
||||
@override
|
||||
|
@ -24,7 +24,7 @@ class SearchExploreResponseDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SearchExploreResponseDto &&
|
||||
other.fieldName == fieldName &&
|
||||
_deepEquality.equals(other.items, items);
|
||||
other.items == items;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
|
@ -23,7 +23,7 @@ class SearchFacetResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SearchFacetResponseDto &&
|
||||
_deepEquality.equals(other.counts, counts) &&
|
||||
other.counts == counts &&
|
||||
other.fieldName == fieldName;
|
||||
|
||||
@override
|
||||
|
@ -26,9 +26,9 @@ class ServerMediaTypesResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ServerMediaTypesResponseDto &&
|
||||
_deepEquality.equals(other.image, image) &&
|
||||
_deepEquality.equals(other.sidecar, sidecar) &&
|
||||
_deepEquality.equals(other.video, video);
|
||||
other.image == image &&
|
||||
other.sidecar == sidecar &&
|
||||
other.video == video;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -56,14 +56,14 @@ class ServerMediaTypesResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ServerMediaTypesResponseDto(
|
||||
image: json[r'image'] is Iterable
|
||||
? (json[r'image'] as Iterable).cast<String>().toList(growable: false)
|
||||
image: json[r'image'] is List
|
||||
? (json[r'image'] as List).cast<String>()
|
||||
: const [],
|
||||
sidecar: json[r'sidecar'] is Iterable
|
||||
? (json[r'sidecar'] as Iterable).cast<String>().toList(growable: false)
|
||||
sidecar: json[r'sidecar'] is List
|
||||
? (json[r'sidecar'] as List).cast<String>()
|
||||
: const [],
|
||||
video: json[r'video'] is Iterable
|
||||
? (json[r'video'] as Iterable).cast<String>().toList(growable: false)
|
||||
video: json[r'video'] is List
|
||||
? (json[r'video'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class ServerStatsResponseDto {
|
||||
bool operator ==(Object other) => identical(this, other) || other is ServerStatsResponseDto &&
|
||||
other.photos == photos &&
|
||||
other.usage == usage &&
|
||||
_deepEquality.equals(other.usageByUser, usageByUser) &&
|
||||
other.usageByUser == usageByUser &&
|
||||
other.videos == videos;
|
||||
|
||||
@override
|
||||
|
@ -56,7 +56,7 @@ class SharedLinkCreateDto {
|
||||
other.albumId == albumId &&
|
||||
other.allowDownload == allowDownload &&
|
||||
other.allowUpload == allowUpload &&
|
||||
_deepEquality.equals(other.assetIds, assetIds) &&
|
||||
other.assetIds == assetIds &&
|
||||
other.description == description &&
|
||||
other.expiresAt == expiresAt &&
|
||||
other.showExif == showExif &&
|
||||
@ -113,11 +113,11 @@ class SharedLinkCreateDto {
|
||||
albumId: mapValueOfType<String>(json, r'albumId'),
|
||||
allowDownload: mapValueOfType<bool>(json, r'allowDownload') ?? true,
|
||||
allowUpload: mapValueOfType<bool>(json, r'allowUpload') ?? false,
|
||||
assetIds: json[r'assetIds'] is Iterable
|
||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
assetIds: json[r'assetIds'] is List
|
||||
? (json[r'assetIds'] as List).cast<String>()
|
||||
: const [],
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', r''),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', ''),
|
||||
showExif: mapValueOfType<bool>(json, r'showExif') ?? true,
|
||||
type: SharedLinkType.fromJson(json[r'type'])!,
|
||||
);
|
||||
|
@ -115,7 +115,7 @@ class SharedLinkEditDto {
|
||||
allowDownload: mapValueOfType<bool>(json, r'allowDownload'),
|
||||
allowUpload: mapValueOfType<bool>(json, r'allowUpload'),
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', r''),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', ''),
|
||||
showExif: mapValueOfType<bool>(json, r'showExif'),
|
||||
);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class SharedLinkResponseDto {
|
||||
other.album == album &&
|
||||
other.allowDownload == allowDownload &&
|
||||
other.allowUpload == allowUpload &&
|
||||
_deepEquality.equals(other.assets, assets) &&
|
||||
other.assets == assets &&
|
||||
other.createdAt == createdAt &&
|
||||
other.description == description &&
|
||||
other.expiresAt == expiresAt &&
|
||||
@ -132,9 +132,9 @@ class SharedLinkResponseDto {
|
||||
allowDownload: mapValueOfType<bool>(json, r'allowDownload')!,
|
||||
allowUpload: mapValueOfType<bool>(json, r'allowUpload')!,
|
||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', r''),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', ''),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
key: mapValueOfType<String>(json, r'key')!,
|
||||
showExif: mapValueOfType<bool>(json, r'showExif')!,
|
||||
|
@ -23,8 +23,8 @@ class SmartInfoResponseDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SmartInfoResponseDto &&
|
||||
_deepEquality.equals(other.objects, objects) &&
|
||||
_deepEquality.equals(other.tags, tags);
|
||||
other.objects == objects &&
|
||||
other.tags == tags;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -58,11 +58,11 @@ class SmartInfoResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SmartInfoResponseDto(
|
||||
objects: json[r'objects'] is Iterable
|
||||
? (json[r'objects'] as Iterable).cast<String>().toList(growable: false)
|
||||
objects: json[r'objects'] is List
|
||||
? (json[r'objects'] as List).cast<String>()
|
||||
: const [],
|
||||
tags: json[r'tags'] is Iterable
|
||||
? (json[r'tags'] as Iterable).cast<String>().toList(growable: false)
|
||||
tags: json[r'tags'] is List
|
||||
? (json[r'tags'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
@ -38,13 +38,13 @@ class SystemConfigTemplateStorageOptionDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateStorageOptionDto &&
|
||||
_deepEquality.equals(other.dayOptions, dayOptions) &&
|
||||
_deepEquality.equals(other.hourOptions, hourOptions) &&
|
||||
_deepEquality.equals(other.minuteOptions, minuteOptions) &&
|
||||
_deepEquality.equals(other.monthOptions, monthOptions) &&
|
||||
_deepEquality.equals(other.presetOptions, presetOptions) &&
|
||||
_deepEquality.equals(other.secondOptions, secondOptions) &&
|
||||
_deepEquality.equals(other.yearOptions, yearOptions);
|
||||
other.dayOptions == dayOptions &&
|
||||
other.hourOptions == hourOptions &&
|
||||
other.minuteOptions == minuteOptions &&
|
||||
other.monthOptions == monthOptions &&
|
||||
other.presetOptions == presetOptions &&
|
||||
other.secondOptions == secondOptions &&
|
||||
other.yearOptions == yearOptions;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -80,26 +80,26 @@ class SystemConfigTemplateStorageOptionDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SystemConfigTemplateStorageOptionDto(
|
||||
dayOptions: json[r'dayOptions'] is Iterable
|
||||
? (json[r'dayOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
dayOptions: json[r'dayOptions'] is List
|
||||
? (json[r'dayOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
hourOptions: json[r'hourOptions'] is Iterable
|
||||
? (json[r'hourOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
hourOptions: json[r'hourOptions'] is List
|
||||
? (json[r'hourOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
minuteOptions: json[r'minuteOptions'] is Iterable
|
||||
? (json[r'minuteOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
minuteOptions: json[r'minuteOptions'] is List
|
||||
? (json[r'minuteOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
monthOptions: json[r'monthOptions'] is Iterable
|
||||
? (json[r'monthOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
monthOptions: json[r'monthOptions'] is List
|
||||
? (json[r'monthOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
presetOptions: json[r'presetOptions'] is Iterable
|
||||
? (json[r'presetOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
presetOptions: json[r'presetOptions'] is List
|
||||
? (json[r'presetOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
secondOptions: json[r'secondOptions'] is Iterable
|
||||
? (json[r'secondOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
secondOptions: json[r'secondOptions'] is List
|
||||
? (json[r'secondOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
yearOptions: json[r'yearOptions'] is Iterable
|
||||
? (json[r'yearOptions'] as Iterable).cast<String>().toList(growable: false)
|
||||
yearOptions: json[r'yearOptions'] is List
|
||||
? (json[r'yearOptions'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
6
mobile/openapi/lib/model/update_asset_dto.dart
generated
6
mobile/openapi/lib/model/update_asset_dto.dart
generated
@ -50,7 +50,7 @@ class UpdateAssetDto {
|
||||
other.description == description &&
|
||||
other.isArchived == isArchived &&
|
||||
other.isFavorite == isFavorite &&
|
||||
_deepEquality.equals(other.tagIds, tagIds);
|
||||
other.tagIds == tagIds;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -95,8 +95,8 @@ class UpdateAssetDto {
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
isArchived: mapValueOfType<bool>(json, r'isArchived'),
|
||||
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
|
||||
tagIds: json[r'tagIds'] is Iterable
|
||||
? (json[r'tagIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
tagIds: json[r'tagIds'] is List
|
||||
? (json[r'tagIds'] as List).cast<String>()
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
|
6
mobile/openapi/lib/model/user_response_dto.dart
generated
6
mobile/openapi/lib/model/user_response_dto.dart
generated
@ -128,8 +128,8 @@ class UserResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return UserResponseDto(
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
deletedAt: mapDateTime(json, r'deletedAt', r''),
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
deletedAt: mapDateTime(json, r'deletedAt', ''),
|
||||
email: mapValueOfType<String>(json, r'email')!,
|
||||
externalPath: mapValueOfType<String>(json, r'externalPath'),
|
||||
firstName: mapValueOfType<String>(json, r'firstName')!,
|
||||
@ -140,7 +140,7 @@ class UserResponseDto {
|
||||
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
||||
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
|
||||
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
@ -21,12 +21,12 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// num total
|
||||
// int total
|
||||
test('to test the property `total`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// num visible
|
||||
// int visible
|
||||
test('to test the property `visible`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
OPENAPI_GENEARTOR_VERSION=v6.6.0
|
||||
|
||||
function mobile {
|
||||
rm -rf ../mobile/openapi
|
||||
cd ./openapi-generator/templates/mobile/serialization/native
|
||||
wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache
|
||||
wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENEARTOR_VERSION/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache
|
||||
patch -u native_class.mustache <native_class.mustache.patch
|
||||
cd ../../../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./openapi-generator/templates/mobile
|
||||
@ -17,7 +18,7 @@ function mobile {
|
||||
function web {
|
||||
rm -rf ../web/src/api/open-api
|
||||
cd ./openapi-generator/templates/web
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/v6.0.1/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENEARTOR_VERSION/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
patch -u apiInner.mustache < apiInner.mustache.patch
|
||||
cd ../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ../web/src/api/open-api -t ./openapi-generator/templates/web --additional-properties=useSingleRequestParameter=true
|
||||
@ -26,7 +27,7 @@ function web {
|
||||
function cli {
|
||||
rm -rf ../cli/src/api/open-api
|
||||
cd ./openapi-generator/templates/cli
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/v6.6.0/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENEARTOR_VERSION/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
patch -u apiInner.mustache < apiInner.mustache.patch
|
||||
cd ../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ../cli/src/api/open-api -t ./openapi-generator/templates/cli --additional-properties=useSingleRequestParameter=true
|
||||
|
@ -5990,10 +5990,10 @@
|
||||
"type": "array"
|
||||
},
|
||||
"total": {
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"visible": {
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -38,7 +38,7 @@ class {{{classname}}} {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
|
||||
{{#vars}}
|
||||
{{#isMap}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isMap}}{{^isMap}}{{#isArray}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isArray}}{{^isArray}}other.{{{name}}} == {{{name}}}{{/isArray}}{{/isMap}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
|
||||
other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
|
||||
@override
|
||||
@ -66,7 +66,7 @@ class {{{classname}}} {
|
||||
{{/isNullable}}
|
||||
{{#isDateTime}}
|
||||
{{#pattern}}
|
||||
json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}')
|
||||
json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}'
|
||||
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
||||
: this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String();
|
||||
{{/pattern}}
|
||||
@ -76,7 +76,7 @@ class {{{classname}}} {
|
||||
{{/isDateTime}}
|
||||
{{#isDate}}
|
||||
{{#pattern}}
|
||||
json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}')
|
||||
json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}'
|
||||
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
||||
: _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc());
|
||||
{{/pattern}}
|
||||
@ -86,7 +86,7 @@ class {{{classname}}} {
|
||||
{{/isDate}}
|
||||
{{^isDateTime}}
|
||||
{{^isDate}}
|
||||
json[r'{{{baseName}}}'] = this.{{{name}}}{{#isArray}}{{#uniqueItems}}{{#isNullable}}!{{/isNullable}}.toList(growable: false){{/uniqueItems}}{{/isArray}};
|
||||
json[r'{{{baseName}}}'] = this.{{{name}}};
|
||||
{{/isDate}}
|
||||
{{/isDateTime}}
|
||||
{{#isNullable}}
|
||||
@ -117,10 +117,10 @@ class {{{classname}}} {
|
||||
return {{{classname}}}(
|
||||
{{#vars}}
|
||||
{{#isDateTime}}
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{/isDateTime}}
|
||||
{{#isDate}}
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{/isDate}}
|
||||
{{^isDateTime}}
|
||||
{{^isDate}}
|
||||
@ -189,8 +189,8 @@ class {{{classname}}} {
|
||||
{{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}},
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] is Iterable
|
||||
? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}
|
||||
? (json[r'{{{baseName}}}'] as {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}).cast<{{{items.datatype}}}>()
|
||||
: {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}},
|
||||
{{/isEnum}}
|
||||
{{/isArray}}
|
||||
@ -200,9 +200,9 @@ class {{{classname}}} {
|
||||
{{/isMap}}
|
||||
{{^isMap}}
|
||||
{{#isNumber}}
|
||||
{{{name}}}: {{#isNullable}}json[r'{{{baseName}}}'] == null
|
||||
{{{name}}}: json[r'{{{baseName}}}'] == null
|
||||
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
|
||||
: {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'),
|
||||
: {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()),
|
||||
{{/isNumber}}
|
||||
{{^isNumber}}
|
||||
{{^isEnum}}
|
||||
|
@ -3,8 +3,9 @@
|
||||
/* eslint-disable */
|
||||
{{>licenseInfo}}
|
||||
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
import type { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
{{#withNodeImports}}
|
||||
// URLSearchParams not necessarily used
|
||||
// @ts-ignore
|
||||
@ -146,12 +147,16 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
if ({{paramName}} !== undefined && {{paramName}} !== null) {
|
||||
{{! `val == null` covers for both `null` and `undefined`}}
|
||||
if ({{paramName}} != null) {
|
||||
{{#isString}}
|
||||
localVarHeaderParameter['{{baseName}}'] = String({{paramName}});
|
||||
{{/isString}}
|
||||
{{^isString}}
|
||||
localVarHeaderParameter['{{baseName}}'] = String(JSON.stringify({{paramName}}));
|
||||
{{! isString is falsy also for $ref that defines a string or enum type}}
|
||||
localVarHeaderParameter['{{baseName}}'] = typeof {{paramName}} === 'string'
|
||||
? {{paramName}}
|
||||
: JSON.stringify({{paramName}});
|
||||
{{/isString}}
|
||||
}
|
||||
{{/isArray}}
|
||||
@ -253,16 +258,30 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#allParams.0}}
|
||||
* @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters.
|
||||
{{/allParams.0}}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
{{/useSingleRequestParameter}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{/operation}}
|
||||
};
|
||||
};
|
||||
|
390
server/openapi-generator/templates/web/apiInner.mustache.orig
Normal file
390
server/openapi-generator/templates/web/apiInner.mustache.orig
Normal file
@ -0,0 +1,390 @@
|
||||
{{#withSeparateModelsAndApi}}
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
{{>licenseInfo}}
|
||||
|
||||
import type { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
{{#withNodeImports}}
|
||||
// URLSearchParams not necessarily used
|
||||
// @ts-ignore
|
||||
import { URL, URLSearchParams } from 'url';
|
||||
{{#multipartFormData}}
|
||||
import FormData from 'form-data'
|
||||
{{/multipartFormData}}
|
||||
{{/withNodeImports}}
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '{{apiRelativeToRoot}}common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '{{apiRelativeToRoot}}base';
|
||||
{{#imports}}
|
||||
// @ts-ignore
|
||||
import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
|
||||
{{/imports}}
|
||||
{{/withSeparateModelsAndApi}}
|
||||
{{^withSeparateModelsAndApi}}
|
||||
{{/withSeparateModelsAndApi}}
|
||||
{{#operations}}
|
||||
/**
|
||||
* {{classname}} - axios parameter creator{{#description}}
|
||||
* {{&description}}{{/description}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}AxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
// verify required parameter '{{paramName}}' is not null or undefined
|
||||
assertParamExists('{{nickname}}', '{{paramName}}', {{paramName}})
|
||||
{{/required}}
|
||||
{{/allParams}}
|
||||
const localVarPath = `{{{path}}}`{{#pathParams}}
|
||||
.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String({{paramName}}))){{/pathParams}};
|
||||
// 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: '{{httpMethod}}', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;{{#vendorExtensions}}{{#hasFormParams}}
|
||||
const localVarFormParams = new {{^multipartFormData}}URLSearchParams(){{/multipartFormData}}{{#multipartFormData}}((configuration && configuration.formDataCtor) || FormData)(){{/multipartFormData}};{{/hasFormParams}}{{/vendorExtensions}}
|
||||
|
||||
{{#authMethods}}
|
||||
// authentication {{name}} required
|
||||
{{#isApiKey}}
|
||||
{{#isKeyInHeader}}
|
||||
await setApiKeyToObject(localVarHeaderParameter, "{{keyParamName}}", configuration)
|
||||
{{/isKeyInHeader}}
|
||||
{{#isKeyInQuery}}
|
||||
await setApiKeyToObject(localVarQueryParameter, "{{keyParamName}}", configuration)
|
||||
{{/isKeyInQuery}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasicBasic}}
|
||||
// http basic authentication required
|
||||
setBasicAuthToObject(localVarRequestOptions, configuration)
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
{{/isBasicBearer}}
|
||||
{{#isOAuth}}
|
||||
// oauth required
|
||||
await setOAuthToObject(localVarHeaderParameter, "{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}], configuration)
|
||||
{{/isOAuth}}
|
||||
|
||||
{{/authMethods}}
|
||||
{{#queryParams}}
|
||||
{{#isArray}}
|
||||
if ({{paramName}}) {
|
||||
{{#isCollectionFormatMulti}}
|
||||
{{#uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = Array.from({{paramName}});
|
||||
{{/uniqueItems}}
|
||||
{{^uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}};
|
||||
{{/uniqueItems}}
|
||||
{{/isCollectionFormatMulti}}
|
||||
{{^isCollectionFormatMulti}}
|
||||
{{#uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = Array.from({{paramName}}).join(COLLECTION_FORMATS.{{collectionFormat}});
|
||||
{{/uniqueItems}}
|
||||
{{^uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}}.join(COLLECTION_FORMATS.{{collectionFormat}});
|
||||
{{/uniqueItems}}
|
||||
{{/isCollectionFormatMulti}}
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
if ({{paramName}} !== undefined) {
|
||||
{{#isDateTime}}
|
||||
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
|
||||
({{paramName}} as any).toISOString() :
|
||||
{{paramName}};
|
||||
{{/isDateTime}}
|
||||
{{^isDateTime}}
|
||||
{{#isDate}}
|
||||
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
|
||||
({{paramName}} as any).toISOString().substr(0,10) :
|
||||
{{paramName}};
|
||||
{{/isDate}}
|
||||
{{^isDate}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}};
|
||||
{{/isDate}}
|
||||
{{/isDateTime}}
|
||||
}
|
||||
{{/isArray}}
|
||||
|
||||
{{/queryParams}}
|
||||
{{#headerParams}}
|
||||
{{#isArray}}
|
||||
if ({{paramName}}) {
|
||||
{{#uniqueItems}}
|
||||
let mapped = Array.from({{paramName}}).map(value => (<any>"{{{dataType}}}" !== "Set<string>") ? JSON.stringify(value) : (value || ""));
|
||||
{{/uniqueItems}}
|
||||
{{^uniqueItems}}
|
||||
let mapped = {{paramName}}.map(value => (<any>"{{{dataType}}}" !== "Array<string>") ? JSON.stringify(value) : (value || ""));
|
||||
{{/uniqueItems}}
|
||||
localVarHeaderParameter['{{baseName}}'] = mapped.join(COLLECTION_FORMATS["{{collectionFormat}}"]);
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
{{! `val == null` covers for both `null` and `undefined`}}
|
||||
if ({{paramName}} != null) {
|
||||
{{#isString}}
|
||||
localVarHeaderParameter['{{baseName}}'] = String({{paramName}});
|
||||
{{/isString}}
|
||||
{{^isString}}
|
||||
{{! isString is falsy also for $ref that defines a string or enum type}}
|
||||
localVarHeaderParameter['{{baseName}}'] = typeof {{paramName}} === 'string'
|
||||
? {{paramName}}
|
||||
: JSON.stringify({{paramName}});
|
||||
{{/isString}}
|
||||
}
|
||||
{{/isArray}}
|
||||
|
||||
{{/headerParams}}
|
||||
{{#vendorExtensions}}
|
||||
{{#formParams}}
|
||||
{{#isArray}}
|
||||
if ({{paramName}}) {
|
||||
{{#isCollectionFormatMulti}}
|
||||
{{paramName}}.forEach((element) => {
|
||||
localVarFormParams.{{#multipartFormData}}append{{/multipartFormData}}{{^multipartFormData}}set{{/multipartFormData}}('{{baseName}}', element as any);
|
||||
})
|
||||
{{/isCollectionFormatMulti}}
|
||||
{{^isCollectionFormatMulti}}
|
||||
localVarFormParams.{{#multipartFormData}}append{{/multipartFormData}}{{^multipartFormData}}set{{/multipartFormData}}('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS.{{collectionFormat}}));
|
||||
{{/isCollectionFormatMulti}}
|
||||
}{{/isArray}}
|
||||
{{^isArray}}
|
||||
if ({{paramName}} !== undefined) { {{^multipartFormData}}
|
||||
localVarFormParams.set('{{baseName}}', {{paramName}} as any);{{/multipartFormData}}{{#multipartFormData}}{{#isPrimitiveType}}
|
||||
localVarFormParams.append('{{baseName}}', {{paramName}} as any);{{/isPrimitiveType}}{{^isPrimitiveType}}
|
||||
localVarFormParams.append('{{baseName}}', new Blob([JSON.stringify({{paramName}})], { type: "application/json", }));{{/isPrimitiveType}}{{/multipartFormData}}
|
||||
}{{/isArray}}
|
||||
{{/formParams}}{{/vendorExtensions}}
|
||||
{{#vendorExtensions}}{{#hasFormParams}}{{^multipartFormData}}
|
||||
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';{{/multipartFormData}}{{#multipartFormData}}
|
||||
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';{{/multipartFormData}}
|
||||
{{/hasFormParams}}{{/vendorExtensions}}
|
||||
{{#bodyParam}}
|
||||
{{^consumes}}
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
{{/consumes}}
|
||||
{{#consumes.0}}
|
||||
localVarHeaderParameter['Content-Type'] = '{{{mediaType}}}';
|
||||
{{/consumes.0}}
|
||||
|
||||
{{/bodyParam}}
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions,{{#hasFormParams}}{{#multipartFormData}} ...(localVarFormParams as any).getHeaders?.(),{{/multipartFormData}}{{/hasFormParams}} ...options.headers};
|
||||
{{#hasFormParams}}
|
||||
localVarRequestOptions.data = localVarFormParams{{#vendorExtensions}}{{^multipartFormData}}.toString(){{/multipartFormData}}{{/vendorExtensions}};
|
||||
{{/hasFormParams}}
|
||||
{{#bodyParam}}
|
||||
localVarRequestOptions.data = serializeDataIfNeeded({{paramName}}, localVarRequestOptions, configuration)
|
||||
{{/bodyParam}}
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
{{/operation}}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* {{classname}} - functional programming interface{{#description}}
|
||||
* {{{.}}}{{/description}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}Fp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = {{classname}}AxiosParamCreator(configuration)
|
||||
return {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
{{/operation}}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* {{classname}} - factory interface{{#description}}
|
||||
* {{&description}}{{/description}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}Factory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = {{classname}}Fp(configuration)
|
||||
return {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#allParams.0}}
|
||||
* @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters.
|
||||
{{/allParams.0}}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
{{/useSingleRequestParameter}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{/operation}}
|
||||
};
|
||||
};
|
||||
|
||||
{{#withInterfaces}}
|
||||
/**
|
||||
* {{classname}} - interface{{#description}}
|
||||
* {{&description}}{{/description}}
|
||||
* @export
|
||||
* @interface {{classname}}
|
||||
*/
|
||||
export interface {{classname}}Interface {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}Interface
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
|
||||
{{/withInterfaces}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#operation}}
|
||||
{{#allParams.0}}
|
||||
/**
|
||||
* Request parameters for {{nickname}} operation in {{classname}}.
|
||||
* @export
|
||||
* @interface {{classname}}{{operationIdCamelCase}}Request
|
||||
*/
|
||||
export interface {{classname}}{{operationIdCamelCase}}Request {
|
||||
{{#allParams}}
|
||||
/**
|
||||
* {{description}}
|
||||
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
|
||||
* @memberof {{classname}}{{operationIdCamelCase}}
|
||||
*/
|
||||
readonly {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}
|
||||
{{^-last}}
|
||||
|
||||
{{/-last}}
|
||||
{{/allParams}}
|
||||
}
|
||||
|
||||
{{/allParams.0}}
|
||||
{{/operation}}
|
||||
{{/useSingleRequestParameter}}
|
||||
/**
|
||||
* {{classname}} - object-oriented interface{{#description}}
|
||||
* {{{.}}}{{/description}}
|
||||
* @export
|
||||
* @class {{classname}}
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
{{#withInterfaces}}
|
||||
export class {{classname}} extends BaseAPI implements {{classname}}Interface {
|
||||
{{/withInterfaces}}
|
||||
{{^withInterfaces}}
|
||||
export class {{classname}} extends BaseAPI {
|
||||
{{/withInterfaces}}
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#allParams.0}}
|
||||
* @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters.
|
||||
{{/allParams.0}}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
{{/useSingleRequestParameter}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig) {
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig) {
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^-last}}
|
||||
|
||||
{{/-last}}
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
@ -1,4 +1,5 @@
|
||||
import { AssetFaceEntity, PersonEntity } from '@app/infra/entities';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Transform, Type } from 'class-transformer';
|
||||
import { IsArray, IsBoolean, IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
|
||||
import { toBoolean, ValidateUUID } from '../domain.util';
|
||||
@ -82,8 +83,12 @@ export class PersonResponseDto {
|
||||
}
|
||||
|
||||
export class PeopleResponseDto {
|
||||
@ApiProperty({ type: 'integer' })
|
||||
total!: number;
|
||||
|
||||
@ApiProperty({ type: 'integer' })
|
||||
visible!: number;
|
||||
|
||||
people!: PersonResponseDto[];
|
||||
}
|
||||
|
||||
|
596
web/src/api/open-api/api.ts
generated
596
web/src/api/open-api/api.ts
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user