mirror of
https://github.com/immich-app/immich.git
synced 2026-05-31 03:45:19 -04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fe48d21c2 | |||
| e35610d0a7 |
@@ -95,6 +95,7 @@ describe('/server', () => {
|
||||
major: expect.any(Number),
|
||||
minor: expect.any(Number),
|
||||
patch: expect.any(Number),
|
||||
prerelease: null,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -21,18 +21,18 @@ describe('/system-config', () => {
|
||||
const response1 = await request(app)
|
||||
.put('/system-config')
|
||||
.set('Authorization', `Bearer ${admin.accessToken}`)
|
||||
.send({ ...config, newVersionCheck: { enabled: false } });
|
||||
.send({ ...config, newVersionCheck: { enabled: false, channel: 'stable' } });
|
||||
|
||||
expect(response1.status).toBe(200);
|
||||
expect(response1.body).toEqual({ ...config, newVersionCheck: { enabled: false } });
|
||||
expect(response1.body).toEqual({ ...config, newVersionCheck: { enabled: false, channel: 'stable' } });
|
||||
|
||||
const response2 = await request(app)
|
||||
.put('/system-config')
|
||||
.set('Authorization', `Bearer ${admin.accessToken}`)
|
||||
.send({ ...config, newVersionCheck: { enabled: true } });
|
||||
.send({ ...config, newVersionCheck: { enabled: true, channel: 'stable' } });
|
||||
|
||||
expect(response2.status).toBe(200);
|
||||
expect(response2.body).toEqual({ ...config, newVersionCheck: { enabled: true } });
|
||||
expect(response2.body).toEqual({ ...config, newVersionCheck: { enabled: true, channel: 'stable' } });
|
||||
});
|
||||
|
||||
it('should reject an invalid config entry', async () => {
|
||||
|
||||
+4
-1
@@ -305,6 +305,8 @@
|
||||
"refreshing_all_libraries": "Refreshing all libraries",
|
||||
"registration": "Admin Registration",
|
||||
"registration_description": "Since you are the first user on the system, you will be assigned as the Admin and are responsible for administrative tasks, and additional users will be created by you.",
|
||||
"release_channel_release_candidate": "Release candidate",
|
||||
"release_channel_stable": "Stable",
|
||||
"remove_failed_jobs": "Remove failed jobs",
|
||||
"require_password_change_on_login": "Require user to change password on first login",
|
||||
"reset_settings_to_default": "Reset settings to default",
|
||||
@@ -442,6 +444,8 @@
|
||||
"user_settings_description": "Manage user settings",
|
||||
"user_successfully_removed": "User {email} has been successfully removed.",
|
||||
"users_page_description": "Admin users page",
|
||||
"version_check_channel": "Release channel",
|
||||
"version_check_channel_description": "Pick the release channel you want to get version announcements for",
|
||||
"version_check_enabled_description": "Enable version check",
|
||||
"version_check_implications": "The version check feature relies on periodic communication with {server}",
|
||||
"version_check_settings": "Version Check",
|
||||
@@ -2233,7 +2237,6 @@
|
||||
"slideshow_repeat": "Repeat slideshow",
|
||||
"slideshow_repeat_description": "Loop back to beginning when slideshow ends",
|
||||
"slideshow_settings": "Slideshow settings",
|
||||
"smart_album": "Smart album",
|
||||
"sort_albums_by": "Sort albums by...",
|
||||
"sort_created": "Date created",
|
||||
"sort_items": "Number of items",
|
||||
|
||||
@@ -64,7 +64,6 @@ class TextRecognizer(InferenceModel):
|
||||
rec_batch_num=max_batch_size if max_batch_size else 6,
|
||||
rec_img_shape=(3, 48, 320),
|
||||
lang_type=self.language,
|
||||
model_root_dir=self.cache_dir,
|
||||
)
|
||||
)
|
||||
return session
|
||||
|
||||
@@ -1028,12 +1028,7 @@ class TestOcr:
|
||||
text_recognizer.load()
|
||||
|
||||
rapid_recognizer.assert_called_once_with(
|
||||
OcrOptions(
|
||||
session=ort_session.return_value,
|
||||
rec_batch_num=6,
|
||||
rec_img_shape=(3, 48, 320),
|
||||
model_root_dir=text_recognizer.cache_dir,
|
||||
)
|
||||
OcrOptions(session=ort_session.return_value, rec_batch_num=6, rec_img_shape=(3, 48, 320))
|
||||
)
|
||||
|
||||
def test_set_custom_max_batch_size(self, ort_session: mock.Mock, path: mock.Mock, mocker: MockerFixture) -> None:
|
||||
@@ -1046,12 +1041,7 @@ class TestOcr:
|
||||
text_recognizer.load()
|
||||
|
||||
rapid_recognizer.assert_called_once_with(
|
||||
OcrOptions(
|
||||
session=ort_session.return_value,
|
||||
rec_batch_num=4,
|
||||
rec_img_shape=(3, 48, 320),
|
||||
model_root_dir=text_recognizer.cache_dir,
|
||||
)
|
||||
OcrOptions(session=ort_session.return_value, rec_batch_num=4, rec_img_shape=(3, 48, 320))
|
||||
)
|
||||
|
||||
def test_ignore_other_custom_max_batch_size(
|
||||
@@ -1066,12 +1056,7 @@ class TestOcr:
|
||||
text_recognizer.load()
|
||||
|
||||
rapid_recognizer.assert_called_once_with(
|
||||
OcrOptions(
|
||||
session=ort_session.return_value,
|
||||
rec_batch_num=6,
|
||||
rec_img_shape=(3, 48, 320),
|
||||
model_root_dir=text_recognizer.cache_dir,
|
||||
)
|
||||
OcrOptions(session=ort_session.return_value, rec_batch_num=6, rec_img_shape=(3, 48, 320))
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ lockfile = true
|
||||
|
||||
[tasks.plugins]
|
||||
run = [
|
||||
"pnpm --filter @immich/sdk --filter @immich/plugin-sdk --filter @immich/plugin-core install --frozen-lockfile",
|
||||
"pnpm --filter @immich/sdk --filter @immich/plugin-sdk --filter @immich/plugin-core build",
|
||||
"pnpm --filter @immich/plugin-sdk --filter @immich/plugin-core install --frozen-lockfile",
|
||||
"pnpm --filter @immich/plugin-sdk --filter @immich/plugin-core build",
|
||||
]
|
||||
|
||||
[tasks.open-api-typescript]
|
||||
@@ -66,11 +66,8 @@ run = [
|
||||
]
|
||||
|
||||
[tasks.open-api-dart]
|
||||
dir = "open-api/dart-generator"
|
||||
run = [
|
||||
"dart pub get",
|
||||
"dart run bin/generate.dart --spec ../immich-openapi-specs.json --out ../../mobile/openapi",
|
||||
]
|
||||
dir = "open-api"
|
||||
run = "bash ./bin/generate-dart-sdk.sh"
|
||||
|
||||
[tasks.open-api]
|
||||
env = { SHARP_IGNORE_GLOBAL_LIBVIPS = true }
|
||||
@@ -111,7 +108,7 @@ depends = "//:plugins"
|
||||
dir = "docker"
|
||||
interactive = true
|
||||
env = { COMPOSE_BAKE = true }
|
||||
run = "docker compose -f ./docker-compose.prod.yml up --build --remove-orphans"
|
||||
run = "docker compose -f ./docker-compose.prod.yml up --remove-orphans"
|
||||
depends_post = "//:prod-down"
|
||||
|
||||
[tasks.prod-scale]
|
||||
|
||||
@@ -143,8 +143,13 @@ class AppConfig {
|
||||
})
|
||||
as T;
|
||||
|
||||
factory AppConfig.fromEntries(Map<MetadataKey<Object>, Object> overrides) =>
|
||||
overrides.entries.fold(const AppConfig(), (config, entry) => config.write(entry.key, entry.value));
|
||||
factory AppConfig.fromEntries(Map<MetadataKey<Object>, Object> entries) {
|
||||
var config = const AppConfig();
|
||||
for (final MapEntry(key: key, value: value) in entries.entries) {
|
||||
config = config.write(key, value);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
AppConfig write<T extends Object>(MetadataKey<T> key, T value) {
|
||||
return switch (key) {
|
||||
|
||||
@@ -7,6 +7,13 @@ import 'package:immich_mobile/domain/models/log.model.dart';
|
||||
import 'package:immich_mobile/domain/models/timeline.model.dart';
|
||||
import 'package:immich_mobile/providers/album/album_sort_by_options.provider.dart';
|
||||
|
||||
enum MetadataScope {
|
||||
user, // keys with this scope are deleted on logout
|
||||
system;
|
||||
|
||||
const MetadataScope();
|
||||
}
|
||||
|
||||
enum MetadataKey<T extends Object> {
|
||||
// Theme
|
||||
themePrimaryColor<ImmichColorPreset>(codec: _EnumCodec(ImmichColorPreset.values)),
|
||||
@@ -25,11 +32,14 @@ enum MetadataKey<T extends Object> {
|
||||
viewerTapToNavigate<bool>(),
|
||||
|
||||
// Network
|
||||
networkAutoEndpointSwitching<bool>(),
|
||||
networkPreferredWifiName<String>(),
|
||||
networkLocalEndpoint<String>(),
|
||||
networkExternalEndpointList<List<String>>(codec: _ListCodec(_PrimitiveCodec.string)),
|
||||
networkCustomHeaders<Map<String, String>>(codec: _MapCodec(_PrimitiveCodec.string, _PrimitiveCodec.string)),
|
||||
networkAutoEndpointSwitching<bool>(scope: .system),
|
||||
networkPreferredWifiName<String>(scope: .system),
|
||||
networkLocalEndpoint<String>(scope: .system),
|
||||
networkExternalEndpointList<List<String>>(scope: .system, codec: _ListCodec(_PrimitiveCodec.string)),
|
||||
networkCustomHeaders<Map<String, String>>(
|
||||
scope: .system,
|
||||
codec: _MapCodec(_PrimitiveCodec.string, _PrimitiveCodec.string),
|
||||
),
|
||||
|
||||
// Album
|
||||
albumSortMode<AlbumSortMode>(codec: _EnumCodec(AlbumSortMode.values)),
|
||||
@@ -50,7 +60,7 @@ enum MetadataKey<T extends Object> {
|
||||
timelineStorageIndicator<bool>(),
|
||||
|
||||
// Log
|
||||
logLevel<LogLevel>(codec: _EnumCodec(LogLevel.values)),
|
||||
logLevel<LogLevel>(scope: .system, codec: _EnumCodec(LogLevel.values)),
|
||||
|
||||
// Map
|
||||
mapShowFavoriteOnly<bool>(),
|
||||
@@ -73,9 +83,10 @@ enum MetadataKey<T extends Object> {
|
||||
slideshowLook<SlideshowLook>(codec: _EnumCodec(SlideshowLook.values)),
|
||||
slideshowDirection<SlideshowDirection>(codec: _EnumCodec(SlideshowDirection.values));
|
||||
|
||||
final MetadataScope scope;
|
||||
final _MetadataCodec<T>? _codecOverride;
|
||||
|
||||
const MetadataKey({_MetadataCodec<T>? codec}) : _codecOverride = codec;
|
||||
const MetadataKey({this.scope = .user, _MetadataCodec<T>? codec}) : _codecOverride = codec;
|
||||
|
||||
_MetadataCodec<T> get _codec => _codecOverride ?? _MetadataCodec.forType(T);
|
||||
|
||||
|
||||
@@ -57,8 +57,12 @@ class SyncStreamService {
|
||||
Future<bool> sync() async {
|
||||
_logger.info("Remote sync request for user");
|
||||
final serverVersion = await _api.serverInfoApi.getServerVersion();
|
||||
if (serverVersion == null) {
|
||||
_logger.severe("Cannot perform sync: unable to determine server version");
|
||||
return false;
|
||||
}
|
||||
|
||||
final serverSemVer = SemVer(major: serverVersion.major, minor: serverVersion.minor, patch: serverVersion.patch);
|
||||
final serverSemVer = SemVer(major: serverVersion.major, minor: serverVersion.minor, patch: serverVersion.patch_);
|
||||
|
||||
final value = Store.get(StoreKey.syncMigrationStatus, "[]");
|
||||
final migrations = (jsonDecode(value) as List).cast<String>();
|
||||
|
||||
@@ -64,10 +64,10 @@ extension on api.AssetVisibility {
|
||||
|
||||
extension on api.AssetTypeEnum {
|
||||
AssetType toAssetType() => switch (this) {
|
||||
api.AssetTypeEnum.image => AssetType.image,
|
||||
api.AssetTypeEnum.video => AssetType.video,
|
||||
api.AssetTypeEnum.audio => AssetType.audio,
|
||||
api.AssetTypeEnum.other => AssetType.other,
|
||||
api.AssetTypeEnum.IMAGE => AssetType.image,
|
||||
api.AssetTypeEnum.VIDEO => AssetType.video,
|
||||
api.AssetTypeEnum.AUDIO => AssetType.audio,
|
||||
api.AssetTypeEnum.OTHER => AssetType.other,
|
||||
_ => throw Exception('Unknown AssetType value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,33 +34,21 @@ class MetadataRepository extends DriftDatabaseRepository {
|
||||
|
||||
Future<void> refresh() async => _applyOverrides(await _db.select(_db.metadataEntity).get());
|
||||
|
||||
Future<void> clear(Iterable<MetadataKey> keys) async {
|
||||
if (keys.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
final names = keys.map((key) => key.name).toList();
|
||||
await (_db.delete(_db.metadataEntity)..where((row) => row.key.isIn(names))).go();
|
||||
|
||||
for (final key in keys) {
|
||||
_appConfig = _appConfig.write(key, defaultConfig.read(key));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> write<T extends Object, U extends T>(MetadataKey<T> key, U value) async {
|
||||
if (value == _appConfig.read(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (value == defaultConfig.read(key)) {
|
||||
return clear([key]);
|
||||
await (_db.delete(_db.metadataEntity)..where((t) => t.key.equals(key.name))).go();
|
||||
} else {
|
||||
await _db
|
||||
.into(_db.metadataEntity)
|
||||
.insertOnConflictUpdate(
|
||||
MetadataEntityCompanion.insert(key: key.name, value: key.encode(value), updatedAt: Value(DateTime.now())),
|
||||
);
|
||||
}
|
||||
|
||||
await _db
|
||||
.into(_db.metadataEntity)
|
||||
.insertOnConflictUpdate(
|
||||
MetadataEntityCompanion.insert(key: key.name, value: key.encode(value), updatedAt: Value(DateTime.now())),
|
||||
);
|
||||
_appConfig = _appConfig.write(key, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,60 +11,59 @@ class SearchApiRepository extends ApiRepository {
|
||||
Future<SearchResponseDto?> search(SearchFilter filter, int page) {
|
||||
AssetTypeEnum? type;
|
||||
if (filter.mediaType.index == AssetType.image.index) {
|
||||
type = AssetTypeEnum.image;
|
||||
type = AssetTypeEnum.IMAGE;
|
||||
} else if (filter.mediaType.index == AssetType.video.index) {
|
||||
type = AssetTypeEnum.video;
|
||||
type = AssetTypeEnum.VIDEO;
|
||||
}
|
||||
|
||||
if ((filter.context != null && filter.context!.isNotEmpty) ||
|
||||
(filter.assetId != null && filter.assetId!.isNotEmpty)) {
|
||||
return _api.searchSmart(
|
||||
SmartSearchDto(
|
||||
query: filter.context.toOptional(),
|
||||
queryAssetId: filter.assetId.toOptional(),
|
||||
language: filter.language.toOptional(),
|
||||
country: filter.location.country.toOptional(),
|
||||
state: filter.location.state.toOptional(),
|
||||
city: filter.location.city.toOptional(),
|
||||
make: filter.camera.make.toOptional(),
|
||||
model: filter.camera.model.toOptional(),
|
||||
takenAfter: filter.date.takenAfter.toOptional(),
|
||||
takenBefore: filter.date.takenBefore.toOptional(),
|
||||
visibility: (filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline).toOptional(),
|
||||
rating: filter.rating.rating.toOptional(),
|
||||
isFavorite: (filter.display.isFavorite ? true : null).toOptional(),
|
||||
isNotInAlbum: (filter.display.isNotInAlbum ? true : null).toOptional(),
|
||||
personIds: filter.people.map((e) => e.id).toList().toOptional(),
|
||||
tagIds: filter.tagIds.toOptional(),
|
||||
type: type.toOptional(),
|
||||
page: page.toOptional(),
|
||||
size: 100.toOptional(),
|
||||
query: filter.context,
|
||||
queryAssetId: filter.assetId,
|
||||
language: filter.language,
|
||||
country: filter.location.country,
|
||||
state: filter.location.state,
|
||||
city: filter.location.city,
|
||||
make: filter.camera.make,
|
||||
model: filter.camera.model,
|
||||
takenAfter: filter.date.takenAfter,
|
||||
takenBefore: filter.date.takenBefore,
|
||||
visibility: filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline,
|
||||
rating: filter.rating.rating,
|
||||
isFavorite: filter.display.isFavorite ? true : null,
|
||||
isNotInAlbum: filter.display.isNotInAlbum ? true : null,
|
||||
personIds: filter.people.map((e) => e.id).toList(),
|
||||
tagIds: filter.tagIds,
|
||||
type: type,
|
||||
page: page,
|
||||
size: 100,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return _api.searchAssets(
|
||||
MetadataSearchDto(
|
||||
originalFileName: (filter.filename != null && filter.filename!.isNotEmpty ? filter.filename : null).toOptional(),
|
||||
country: filter.location.country.toOptional(),
|
||||
description: (filter.description != null && filter.description!.isNotEmpty ? filter.description : null)
|
||||
.toOptional(),
|
||||
ocr: (filter.ocr != null && filter.ocr!.isNotEmpty ? filter.ocr : null).toOptional(),
|
||||
state: filter.location.state.toOptional(),
|
||||
city: filter.location.city.toOptional(),
|
||||
make: filter.camera.make.toOptional(),
|
||||
model: filter.camera.model.toOptional(),
|
||||
takenAfter: filter.date.takenAfter.toOptional(),
|
||||
takenBefore: filter.date.takenBefore.toOptional(),
|
||||
visibility: (filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline).toOptional(),
|
||||
rating: filter.rating.rating.toOptional(),
|
||||
isFavorite: (filter.display.isFavorite ? true : null).toOptional(),
|
||||
isNotInAlbum: (filter.display.isNotInAlbum ? true : null).toOptional(),
|
||||
personIds: filter.people.map((e) => e.id).toList().toOptional(),
|
||||
tagIds: filter.tagIds.toOptional(),
|
||||
type: type.toOptional(),
|
||||
page: page.toOptional(),
|
||||
size: 1000.toOptional(),
|
||||
originalFileName: filter.filename != null && filter.filename!.isNotEmpty ? filter.filename : null,
|
||||
country: filter.location.country,
|
||||
description: filter.description != null && filter.description!.isNotEmpty ? filter.description : null,
|
||||
ocr: filter.ocr != null && filter.ocr!.isNotEmpty ? filter.ocr : null,
|
||||
state: filter.location.state,
|
||||
city: filter.location.city,
|
||||
make: filter.camera.make,
|
||||
model: filter.camera.model,
|
||||
takenAfter: filter.date.takenAfter,
|
||||
takenBefore: filter.date.takenBefore,
|
||||
visibility: filter.display.isArchive ? AssetVisibility.archive : AssetVisibility.timeline,
|
||||
rating: filter.rating.rating,
|
||||
isFavorite: filter.display.isFavorite ? true : null,
|
||||
isNotInAlbum: filter.display.isNotInAlbum ? true : null,
|
||||
personIds: filter.people.map((e) => e.id).toList(),
|
||||
tagIds: filter.tagIds,
|
||||
type: type,
|
||||
page: page,
|
||||
size: 1000,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -75,5 +74,5 @@ class SearchApiRepository extends ApiRepository {
|
||||
String? state,
|
||||
String? make,
|
||||
String? model,
|
||||
}) => _api.getSearchSuggestions(type: type, country: country, state: state, make: make, model: model);
|
||||
}) => _api.getSearchSuggestions(type, country: country, state: state, make: make, model: model);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class SyncApiRepository {
|
||||
}
|
||||
|
||||
Future<void> deleteSyncAck(List<SyncEntityType> types) {
|
||||
return _api.syncApi.deleteSyncAck(SyncAckDeleteDto(types: types.toOptional()));
|
||||
return _api.syncApi.deleteSyncAck(SyncAckDeleteDto(types: types));
|
||||
}
|
||||
|
||||
Future<void> streamChanges(
|
||||
|
||||
@@ -885,10 +885,10 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
||||
|
||||
extension on AssetTypeEnum {
|
||||
AssetType toAssetType() => switch (this) {
|
||||
AssetTypeEnum.image => AssetType.image,
|
||||
AssetTypeEnum.video => AssetType.video,
|
||||
AssetTypeEnum.audio => AssetType.audio,
|
||||
AssetTypeEnum.other => AssetType.other,
|
||||
AssetTypeEnum.IMAGE => AssetType.image,
|
||||
AssetTypeEnum.VIDEO => AssetType.video,
|
||||
AssetTypeEnum.AUDIO => AssetType.audio,
|
||||
AssetTypeEnum.OTHER => AssetType.other,
|
||||
_ => throw Exception('Unknown AssetType value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class TagsApiRepository extends ApiRepository {
|
||||
|
||||
Future<int> bulkTagAssets(List<String> assetIds, List<String> tagIds) async {
|
||||
final response = await _api.bulkTagAssets(TagBulkAssetsDto(assetIds: assetIds, tagIds: tagIds));
|
||||
return response.count;
|
||||
return response?.count ?? 0;
|
||||
}
|
||||
|
||||
Future<List<TagResponseDto>?> upsertTags(List<String> tags) async {
|
||||
|
||||
@@ -12,6 +12,9 @@ class UserApiRepository extends ApiRepository {
|
||||
|
||||
Future<UserDto?> getMyUser() async {
|
||||
final (adminDto, preferenceDto) = await (_api.getMyUser(), _api.getMyPreferences()).wait;
|
||||
if (adminDto == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return UserConverter.fromAdminDto(adminDto, preferenceDto);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ import 'package:immich_mobile/utils/cache/widgets_binding.dart';
|
||||
import 'package:immich_mobile/utils/debug_print.dart';
|
||||
import 'package:immich_mobile/utils/licenses.dart';
|
||||
import 'package:immich_mobile/utils/migration.dart';
|
||||
import 'package:immich_mobile/utils/openapi_compat.dart';
|
||||
import 'package:immich_mobile/wm_executor.dart';
|
||||
import 'package:immich_ui/immich_ui.dart';
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
@@ -50,8 +49,6 @@ import 'package:timezone/data/latest.dart';
|
||||
void main() async {
|
||||
try {
|
||||
ImmichWidgetsBinding();
|
||||
// Register backward-compat back-fills before any API response is parsed.
|
||||
configureOpenApiCompat();
|
||||
unawaited(BackgroundWorkerLockService(BackgroundWorkerLockApi()).lock());
|
||||
await EasyLocalization.ensureInitialized();
|
||||
final (drift, _) = await Bootstrap.initDomain();
|
||||
|
||||
@@ -2,16 +2,12 @@ import 'package:immich_mobile/utils/semver.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
class ServerVersion extends SemVer {
|
||||
const ServerVersion({required super.major, required super.minor, required super.patch});
|
||||
const ServerVersion({required super.major, required super.minor, required super.patch, super.prerelease});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ServerVersion(major: $major, minor: $minor, patch: $patch)';
|
||||
}
|
||||
ServerVersion.fromDto(ServerVersionResponseDto dto)
|
||||
: super(major: dto.major, minor: dto.minor, patch: dto.patch_, prerelease: dto.prerelease);
|
||||
|
||||
ServerVersion.fromDto(ServerVersionResponseDto dto) : super(major: dto.major, minor: dto.minor, patch: dto.patch);
|
||||
|
||||
bool isAtLeast({int major = 0, int minor = 0, int patch = 0}) {
|
||||
return this >= SemVer(major: major, minor: minor, patch: patch);
|
||||
bool isAtLeast({int major = 0, int minor = 0, int patch = 0, int? prerelease}) {
|
||||
return this >= SemVer(major: major, minor: minor, patch: patch, prerelease: prerelease);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,11 +71,11 @@ class SharedLink {
|
||||
key = dto.key,
|
||||
showMetadata = dto.showMetadata,
|
||||
slug = dto.slug,
|
||||
type = dto.type == SharedLinkType.album ? SharedLinkSource.album : SharedLinkSource.individual,
|
||||
title = dto.type == SharedLinkType.album
|
||||
type = dto.type == SharedLinkType.ALBUM ? SharedLinkSource.album : SharedLinkSource.individual,
|
||||
title = dto.type == SharedLinkType.ALBUM
|
||||
? dto.album?.albumName.toUpperCase() ?? "UNKNOWN SHARE"
|
||||
: "INDIVIDUAL SHARE",
|
||||
thumbAssetId = dto.type == SharedLinkType.album
|
||||
thumbAssetId = dto.type == SharedLinkType.ALBUM
|
||||
? dto.album?.albumThumbnailAssetId
|
||||
: dto.assets.isNotEmpty
|
||||
? dto.assets[0].id
|
||||
|
||||
@@ -45,16 +45,16 @@ class _DriftEditImagePageState extends ConsumerState<DriftEditImagePage> with Ti
|
||||
}
|
||||
|
||||
if (editorState.flipHorizontal) {
|
||||
edits.add(const MirrorEdit(MirrorParameters(axis: MirrorAxis.horizontal)));
|
||||
edits.add(MirrorEdit(MirrorParameters(axis: MirrorAxis.horizontal)));
|
||||
}
|
||||
|
||||
if (editorState.flipVertical) {
|
||||
edits.add(const MirrorEdit(MirrorParameters(axis: MirrorAxis.vertical)));
|
||||
edits.add(MirrorEdit(MirrorParameters(axis: MirrorAxis.vertical)));
|
||||
}
|
||||
|
||||
final normalizedRotation = (editorState.rotationAngle % 360 + 360) % 360;
|
||||
if (normalizedRotation != 0) {
|
||||
edits.add(RotateEdit(RotateParameters(angle: normalizedRotation.toDouble())));
|
||||
edits.add(RotateEdit(RotateParameters(angle: normalizedRotation)));
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -15,7 +15,7 @@ class ActivityApiRepository extends ApiRepository {
|
||||
ActivityApiRepository(this._api);
|
||||
|
||||
Future<List<Activity>> getAll(String albumId, {String? assetId}) async {
|
||||
final response = await checkNull(_api.getActivities(albumId: albumId, assetId: assetId));
|
||||
final response = await checkNull(_api.getActivities(albumId, assetId: assetId));
|
||||
return response.map(_toActivity).toList();
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ class ActivityApiRepository extends ApiRepository {
|
||||
final dto = ActivityCreateDto(
|
||||
albumId: albumId,
|
||||
type: type == ActivityType.comment ? ReactionType.comment : ReactionType.like,
|
||||
assetId: assetId.toOptional(),
|
||||
comment: comment.toOptional(),
|
||||
assetId: assetId,
|
||||
comment: comment,
|
||||
);
|
||||
final response = await checkNull(_api.createActivity(dto));
|
||||
return _toActivity(response);
|
||||
@@ -35,7 +35,7 @@ class ActivityApiRepository extends ApiRepository {
|
||||
}
|
||||
|
||||
Future<ActivityStats> getStats(String albumId, {String? assetId}) async {
|
||||
final response = await checkNull(_api.getActivityStatistics(albumId: albumId, assetId: assetId));
|
||||
final response = await checkNull(_api.getActivityStatistics(albumId, assetId: assetId));
|
||||
return ActivityStats(comments: response.comments);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class AssetApiRepository extends ApiRepository {
|
||||
AssetApiRepository(this._api, this._stacksApi, this._trashApi);
|
||||
|
||||
Future<void> delete(List<String> ids, bool force) async {
|
||||
return _api.deleteAssets(AssetBulkDeleteDto(ids: ids, force: force.toOptional()));
|
||||
return _api.deleteAssets(AssetBulkDeleteDto(ids: ids, force: force));
|
||||
}
|
||||
|
||||
Future<void> restoreTrash(List<String> ids) async {
|
||||
@@ -33,12 +33,12 @@ class AssetApiRepository extends ApiRepository {
|
||||
|
||||
Future<int> emptyTrash() async {
|
||||
final response = await _trashApi.emptyTrash();
|
||||
return response.count;
|
||||
return response?.count ?? 0;
|
||||
}
|
||||
|
||||
Future<int> restoreAllTrash() async {
|
||||
final response = await _trashApi.restoreTrash();
|
||||
return response.count;
|
||||
return response?.count ?? 0;
|
||||
}
|
||||
|
||||
Future<void> updateVisibility(List<String> ids, AssetVisibilityEnum visibility) async {
|
||||
@@ -46,17 +46,15 @@ class AssetApiRepository extends ApiRepository {
|
||||
}
|
||||
|
||||
Future<void> updateFavorite(List<String> ids, bool isFavorite) async {
|
||||
return _api.updateAssets(AssetBulkUpdateDto(ids: ids, isFavorite: isFavorite.toOptional()));
|
||||
return _api.updateAssets(AssetBulkUpdateDto(ids: ids, isFavorite: isFavorite));
|
||||
}
|
||||
|
||||
Future<void> updateLocation(List<String> ids, LatLng location) async {
|
||||
return _api.updateAssets(
|
||||
AssetBulkUpdateDto(ids: ids, latitude: location.latitude.toOptional(), longitude: location.longitude.toOptional()),
|
||||
);
|
||||
return _api.updateAssets(AssetBulkUpdateDto(ids: ids, latitude: location.latitude, longitude: location.longitude));
|
||||
}
|
||||
|
||||
Future<void> updateDateTime(List<String> ids, DateTime dateTime) async {
|
||||
return _api.updateAssets(AssetBulkUpdateDto(ids: ids, dateTimeOriginal: dateTime.toIso8601String().toOptional()));
|
||||
return _api.updateAssets(AssetBulkUpdateDto(ids: ids, dateTimeOriginal: dateTime.toIso8601String()));
|
||||
}
|
||||
|
||||
Future<StackResponse> stack(List<String> ids) async {
|
||||
@@ -88,11 +86,11 @@ class AssetApiRepository extends ApiRepository {
|
||||
}
|
||||
|
||||
Future<void> updateDescription(String assetId, String description) {
|
||||
return _api.updateAsset(assetId, UpdateAssetDto(description: description.toOptional()));
|
||||
return _api.updateAsset(assetId, UpdateAssetDto(description: description));
|
||||
}
|
||||
|
||||
Future<void> updateRating(String assetId, int rating) {
|
||||
return _api.updateAsset(assetId, UpdateAssetDto(rating: rating.toOptional()));
|
||||
return _api.updateAsset(assetId, UpdateAssetDto(rating: rating));
|
||||
}
|
||||
|
||||
Future<AssetEditsResponseDto?> editAsset(String assetId, List<AssetEdit> edits) {
|
||||
|
||||
@@ -13,7 +13,7 @@ class AuthApiRepository extends ApiRepository {
|
||||
AuthApiRepository(this._apiService);
|
||||
|
||||
Future<void> changePassword(String newPassword) async {
|
||||
await _apiService.usersApi.updateMyUser(UserUpdateMeDto(password: newPassword.toOptional()));
|
||||
await _apiService.usersApi.updateMyUser(UserUpdateMeDto(password: newPassword));
|
||||
}
|
||||
|
||||
Future<LoginResponse> login(String email, String password) async {
|
||||
@@ -46,7 +46,7 @@ class AuthApiRepository extends ApiRepository {
|
||||
|
||||
Future<bool> unlockPinCode(String pinCode) async {
|
||||
try {
|
||||
await _apiService.authenticationApi.unlockAuthSession(SessionUnlockDto(pinCode: pinCode.toOptional()));
|
||||
await _apiService.authenticationApi.unlockAuthSession(SessionUnlockDto(pinCode: pinCode));
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
|
||||
@@ -22,9 +22,7 @@ class DriftAlbumApiRepository extends ApiRepository {
|
||||
String? description,
|
||||
}) async {
|
||||
final responseDto = await checkNull(
|
||||
_api.createAlbum(
|
||||
CreateAlbumDto(albumName: name, description: description.toOptional(), assetIds: assetIds.toList().toOptional()),
|
||||
),
|
||||
_api.createAlbum(CreateAlbumDto(albumName: name, description: description, assetIds: assetIds.toList())),
|
||||
);
|
||||
|
||||
return responseDto.toRemoteAlbum(owner);
|
||||
@@ -75,11 +73,11 @@ class DriftAlbumApiRepository extends ApiRepository {
|
||||
_api.updateAlbumInfo(
|
||||
albumId,
|
||||
UpdateAlbumDto(
|
||||
albumName: name.toOptional(),
|
||||
description: description.toOptional(),
|
||||
albumThumbnailAssetId: thumbnailAssetId.toOptional(),
|
||||
isActivityEnabled: isActivityEnabled.toOptional(),
|
||||
order: apiOrder.toOptional(),
|
||||
albumName: name,
|
||||
description: description,
|
||||
albumThumbnailAssetId: thumbnailAssetId,
|
||||
isActivityEnabled: isActivityEnabled,
|
||||
order: apiOrder,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -101,9 +99,7 @@ class DriftAlbumApiRepository extends ApiRepository {
|
||||
}
|
||||
|
||||
Future<bool> setActivityStatus(String albumId, bool isEnabled) async {
|
||||
final response = await checkNull(
|
||||
_api.updateAlbumInfo(albumId, UpdateAlbumDto(isActivityEnabled: isEnabled.toOptional())),
|
||||
);
|
||||
final response = await checkNull(_api.updateAlbumInfo(albumId, UpdateAlbumDto(isActivityEnabled: isEnabled)));
|
||||
return response.isActivityEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class FolderApiRepository extends ApiRepository {
|
||||
Future<List<String>> getAllUniquePaths() async {
|
||||
try {
|
||||
final list = await _api.getUniqueOriginalPaths();
|
||||
return list;
|
||||
return list ?? [];
|
||||
} catch (e, stack) {
|
||||
_log.severe("Failed to fetch unique original links", e, stack);
|
||||
return [];
|
||||
@@ -26,8 +26,8 @@ class FolderApiRepository extends ApiRepository {
|
||||
|
||||
Future<List<RemoteAssetExif>> getAssetsForPath(String? path) async {
|
||||
try {
|
||||
final list = await _api.getAssetsByOriginalPath(path: path ?? '/');
|
||||
return list.map((e) => e.toDtoWithExif()).toList();
|
||||
final list = await _api.getAssetsByOriginalPath(path ?? '/');
|
||||
return list != null ? list.map((e) => e.toDtoWithExif()).toList() : [];
|
||||
} catch (e, stack) {
|
||||
_log.severe("Failed to fetch Assets by original path", e, stack);
|
||||
return [];
|
||||
|
||||
@@ -16,9 +16,7 @@ class PartnerApiRepository extends ApiRepository {
|
||||
|
||||
Future<List<UserDto>> getAll(Direction direction) async {
|
||||
final response = await checkNull(
|
||||
_api.getPartners(
|
||||
direction: direction == Direction.sharedByMe ? PartnerDirection.sharedBy : PartnerDirection.sharedWith,
|
||||
),
|
||||
_api.getPartners(direction == Direction.sharedByMe ? PartnerDirection.by : PartnerDirection.with_),
|
||||
);
|
||||
return response.map(UserConverter.fromPartnerDto).toList();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class PersonApiRepository extends ApiRepository {
|
||||
|
||||
Future<PersonDto> update(String id, {String? name, DateTime? birthday}) async {
|
||||
final birthdayUtc = birthday == null ? null : DateTime.utc(birthday.year, birthday.month, birthday.day);
|
||||
final dto = PersonUpdateDto(name: name.toOptional(), birthDate: birthdayUtc.toOptional());
|
||||
final dto = PersonUpdateDto(name: name, birthDate: birthdayUtc);
|
||||
final response = await checkNull(_api.updatePerson(id, dto));
|
||||
return _toPerson(response);
|
||||
}
|
||||
|
||||
@@ -15,13 +15,7 @@ class SessionsAPIRepository extends ApiRepository {
|
||||
|
||||
Future<SessionCreateResponse> createSession(String deviceType, String deviceOS, {int? duration}) async {
|
||||
final dto = await checkNull(
|
||||
_api.createSession(
|
||||
SessionCreateDto(
|
||||
deviceType: deviceType.toOptional(),
|
||||
deviceOs: deviceOS.toOptional(),
|
||||
duration: duration.toOptional(),
|
||||
),
|
||||
),
|
||||
_api.createSession(SessionCreateDto(deviceType: deviceType, deviceOS: deviceOS, duration: duration)),
|
||||
);
|
||||
|
||||
return SessionCreateResponse(
|
||||
|
||||
@@ -47,7 +47,7 @@ class AuthGuard extends AutoRouteGuard {
|
||||
_validateInFlight = true;
|
||||
try {
|
||||
final res = await _apiService.authenticationApi.validateAccessToken();
|
||||
if (res.authStatus != true) {
|
||||
if (res == null || res.authStatus != true) {
|
||||
// Token may have changed during validation (user logged out + logged in
|
||||
// again); only act if it still applies to the current session.
|
||||
if (Store.tryGet(StoreKey.accessToken) != token) {
|
||||
|
||||
@@ -24,6 +24,11 @@ class LockedGuard extends AutoRouteGuard {
|
||||
void onNavigation(NavigationResolver resolver, StackRouter router) async {
|
||||
final authStatus = await _apiService.authenticationApi.getAuthStatus();
|
||||
|
||||
if (authStatus == null) {
|
||||
resolver.next(false);
|
||||
return;
|
||||
}
|
||||
|
||||
/// Check if a pincode has been created but this user. Show the form to create if not exist
|
||||
if (!authStatus.pinCode) {
|
||||
unawaited(router.push(PinAuthRoute(createPinCode: true)));
|
||||
@@ -50,7 +55,7 @@ class LockedGuard extends AutoRouteGuard {
|
||||
return;
|
||||
}
|
||||
|
||||
await _apiService.authenticationApi.unlockAuthSession(SessionUnlockDto(pinCode: securePinCode.toOptional()));
|
||||
await _apiService.authenticationApi.unlockAuthSession(SessionUnlockDto(pinCode: securePinCode));
|
||||
|
||||
resolver.next(true);
|
||||
} on PlatformException catch (error) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'package:logging/logging.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
class ApiService {
|
||||
final ApiClient _apiClient = ApiClient(basePath: '');
|
||||
late ApiClient _apiClient;
|
||||
|
||||
late UsersApi usersApi;
|
||||
late AuthenticationApi authenticationApi;
|
||||
@@ -54,7 +54,7 @@ class ApiService {
|
||||
}
|
||||
|
||||
setEndpoint(String endpoint) {
|
||||
_apiClient.basePath = endpoint;
|
||||
_apiClient = ApiClient(basePath: endpoint);
|
||||
_apiClient.client = NetworkRepository.client;
|
||||
usersApi = UsersApi(_apiClient);
|
||||
authenticationApi = AuthenticationApi(_apiClient);
|
||||
|
||||
@@ -110,7 +110,7 @@ class AuthService {
|
||||
/// - Authentication repository data
|
||||
/// - Current user information
|
||||
/// - Access token
|
||||
/// - Server-specific endpoint configuration
|
||||
/// - Asset ETag
|
||||
///
|
||||
/// All deletions are executed in parallel using [Future.wait].
|
||||
Future<void> clearLocalData() async {
|
||||
@@ -120,12 +120,6 @@ class AuthService {
|
||||
_authRepository.clearLocalData(),
|
||||
Store.delete(StoreKey.currentUser),
|
||||
Store.delete(StoreKey.accessToken),
|
||||
MetadataRepository.instance.clear(const [
|
||||
.networkAutoEndpointSwitching,
|
||||
.networkPreferredWifiName,
|
||||
.networkLocalEndpoint,
|
||||
.networkExternalEndpointList,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class MapService with ErrorLoggerMixin {
|
||||
fileCreatedBefore: fileCreatedBefore,
|
||||
);
|
||||
|
||||
return markers.map(MapMarker.fromDto);
|
||||
return markers?.map(MapMarker.fromDto) ?? [];
|
||||
},
|
||||
defaultValue: [],
|
||||
errorMessage: "Failed to get map markers",
|
||||
|
||||
@@ -18,10 +18,10 @@ class OAuthService {
|
||||
log.info("Starting OAuth flow with redirect URI: $redirectUri");
|
||||
|
||||
final dto = await _apiService.oAuthApi.startOAuth(
|
||||
OAuthConfigDto(redirectUri: redirectUri, state: state.toOptional(), codeChallenge: codeChallenge.toOptional()),
|
||||
OAuthConfigDto(redirectUri: redirectUri, state: state, codeChallenge: codeChallenge),
|
||||
);
|
||||
|
||||
final authUrl = dto.url;
|
||||
final authUrl = dto?.url;
|
||||
log.info('Received Authorization URL: $authUrl');
|
||||
|
||||
return authUrl;
|
||||
@@ -37,7 +37,7 @@ class OAuthService {
|
||||
}
|
||||
|
||||
return await _apiService.oAuthApi.finishOAuth(
|
||||
OAuthCallbackDto(url: result, state: state.toOptional(), codeVerifier: codeVerifier.toOptional()),
|
||||
OAuthCallbackDto(url: result, state: state, codeVerifier: codeVerifier),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,9 @@ class ServerInfoService {
|
||||
Future<ServerDiskInfo?> getDiskInfo() async {
|
||||
try {
|
||||
final dto = await _apiService.serverInfoApi.getStorage();
|
||||
return ServerDiskInfo.fromDto(dto);
|
||||
if (dto != null) {
|
||||
return ServerDiskInfo.fromDto(dto);
|
||||
}
|
||||
} catch (e) {
|
||||
dPrint(() => "Error [getDiskInfo] ${e.toString()}");
|
||||
}
|
||||
@@ -27,7 +29,9 @@ class ServerInfoService {
|
||||
Future<ServerVersion?> getServerVersion() async {
|
||||
try {
|
||||
final dto = await _apiService.serverInfoApi.getServerVersion();
|
||||
return ServerVersion.fromDto(dto);
|
||||
if (dto != null) {
|
||||
return ServerVersion.fromDto(dto);
|
||||
}
|
||||
} catch (e) {
|
||||
dPrint(() => "Error [getServerVersion] ${e.toString()}");
|
||||
}
|
||||
@@ -37,7 +41,9 @@ class ServerInfoService {
|
||||
Future<ServerFeatures?> getServerFeatures() async {
|
||||
try {
|
||||
final dto = await _apiService.serverInfoApi.getServerFeatures();
|
||||
return ServerFeatures.fromDto(dto);
|
||||
if (dto != null) {
|
||||
return ServerFeatures.fromDto(dto);
|
||||
}
|
||||
} catch (e) {
|
||||
dPrint(() => "Error [getServerFeatures] ${e.toString()}");
|
||||
}
|
||||
@@ -47,7 +53,9 @@ class ServerInfoService {
|
||||
Future<ServerConfig?> getServerConfig() async {
|
||||
try {
|
||||
final dto = await _apiService.serverInfoApi.getServerConfig();
|
||||
return ServerConfig.fromDto(dto);
|
||||
if (dto != null) {
|
||||
return ServerConfig.fromDto(dto);
|
||||
}
|
||||
} catch (e) {
|
||||
dPrint(() => "Error [getServerConfig] ${e.toString()}");
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class SharedLinkService {
|
||||
Future<AsyncValue<List<SharedLink>>> getAllSharedLinks() async {
|
||||
try {
|
||||
final list = await _apiService.sharedLinksApi.getAllSharedLinks();
|
||||
return AsyncData(list.map(SharedLink.fromDto).toList());
|
||||
return list != null ? AsyncData(list.map(SharedLink.fromDto).toList()) : const AsyncData([]);
|
||||
} catch (e, stack) {
|
||||
_log.severe("Failed to fetch shared links", e, stack);
|
||||
return AsyncError(e, stack);
|
||||
@@ -43,37 +43,39 @@ class SharedLinkService {
|
||||
DateTime? expiresAt,
|
||||
}) async {
|
||||
try {
|
||||
final type = albumId != null ? SharedLinkType.album : SharedLinkType.individual;
|
||||
final type = albumId != null ? SharedLinkType.ALBUM : SharedLinkType.INDIVIDUAL;
|
||||
SharedLinkCreateDto? dto;
|
||||
if (type == SharedLinkType.album) {
|
||||
if (type == SharedLinkType.ALBUM) {
|
||||
dto = SharedLinkCreateDto(
|
||||
type: type,
|
||||
albumId: albumId.toOptional(),
|
||||
showMetadata: showMeta.toOptional(),
|
||||
allowDownload: allowDownload.toOptional(),
|
||||
allowUpload: allowUpload.toOptional(),
|
||||
expiresAt: expiresAt.toOptional(),
|
||||
description: description.toOptional(),
|
||||
password: password.toOptional(),
|
||||
slug: slug.toOptional(),
|
||||
albumId: albumId,
|
||||
showMetadata: showMeta,
|
||||
allowDownload: allowDownload,
|
||||
allowUpload: allowUpload,
|
||||
expiresAt: expiresAt,
|
||||
description: description,
|
||||
password: password,
|
||||
slug: slug,
|
||||
);
|
||||
} else if (assetIds != null) {
|
||||
dto = SharedLinkCreateDto(
|
||||
type: type,
|
||||
showMetadata: showMeta.toOptional(),
|
||||
allowDownload: allowDownload.toOptional(),
|
||||
allowUpload: allowUpload.toOptional(),
|
||||
expiresAt: expiresAt.toOptional(),
|
||||
description: description.toOptional(),
|
||||
password: password.toOptional(),
|
||||
slug: slug.toOptional(),
|
||||
assetIds: assetIds.toOptional(),
|
||||
showMetadata: showMeta,
|
||||
allowDownload: allowDownload,
|
||||
allowUpload: allowUpload,
|
||||
expiresAt: expiresAt,
|
||||
description: description,
|
||||
password: password,
|
||||
slug: slug,
|
||||
assetIds: assetIds,
|
||||
);
|
||||
}
|
||||
|
||||
if (dto != null) {
|
||||
final responseDto = await _apiService.sharedLinksApi.createSharedLink(dto);
|
||||
return SharedLink.fromDto(responseDto);
|
||||
if (responseDto != null) {
|
||||
return SharedLink.fromDto(responseDto);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
_log.severe("Failed to create shared link", e);
|
||||
@@ -96,17 +98,19 @@ class SharedLinkService {
|
||||
final responseDto = await _apiService.sharedLinksApi.updateSharedLink(
|
||||
id,
|
||||
SharedLinkEditDto(
|
||||
showMetadata: showMeta.toOptional(),
|
||||
allowDownload: allowDownload.toOptional(),
|
||||
allowUpload: allowUpload.toOptional(),
|
||||
expiresAt: expiresAt.toOptional(),
|
||||
description: description.toOptional(),
|
||||
password: password.toOptional(),
|
||||
slug: slug.toOptional(),
|
||||
changeExpiryTime: changeExpiry.toOptional(),
|
||||
showMetadata: showMeta,
|
||||
allowDownload: allowDownload,
|
||||
allowUpload: allowUpload,
|
||||
expiresAt: expiresAt,
|
||||
description: description,
|
||||
password: password,
|
||||
slug: slug,
|
||||
changeExpiryTime: changeExpiry,
|
||||
),
|
||||
);
|
||||
return SharedLink.fromDto(responseDto);
|
||||
if (responseDto != null) {
|
||||
return SharedLink.fromDto(responseDto);
|
||||
}
|
||||
} catch (e) {
|
||||
_log.severe("Failed to update shared link id - $id", e);
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
/// Registers backward-compatibility back-fills so the generated client tolerates
|
||||
/// responses from older Immich servers (fields newer DTOs expect but older
|
||||
/// servers omit). Call once at startup, before any API request.
|
||||
///
|
||||
/// The mechanism ([ApiCompat]) lives in the generated client; the rules live
|
||||
/// here because the defaults are app/server-version knowledge. Keyed by DTO
|
||||
/// type, so a renamed or removed DTO is a compile error. Static-only rule lists
|
||||
/// are `const`; lists using a DTO's `toJson()` or `DateTime.now()` are built at
|
||||
/// startup.
|
||||
void configureOpenApiCompat() {
|
||||
ApiCompat.configure({
|
||||
UserPreferencesResponseDto: [
|
||||
const .new('download.includeEmbeddedVideos', false),
|
||||
.new('folders', const FoldersResponse(enabled: false, sidebarWeb: false).toJson()),
|
||||
.new('memories', const MemoriesResponse(enabled: true, duration: 5).toJson()),
|
||||
.new('ratings', const RatingsResponse(enabled: false).toJson()),
|
||||
.new('people', const PeopleResponse(enabled: true, sidebarWeb: false).toJson()),
|
||||
.new('tags', const TagsResponse(enabled: false, sidebarWeb: false).toJson()),
|
||||
.new('sharedLinks', const SharedLinksResponse(enabled: true, sidebarWeb: false).toJson()),
|
||||
.new('cast', const CastResponse(gCastEnabled: false).toJson()),
|
||||
const .new('albums', {'defaultAssetOrder': 'desc'}),
|
||||
],
|
||||
ServerConfigDto: const [
|
||||
.new('mapLightStyleUrl', 'https://tiles.immich.cloud/v1/style/light.json'),
|
||||
.new('mapDarkStyleUrl', 'https://tiles.immich.cloud/v1/style/dark.json'),
|
||||
],
|
||||
UserResponseDto: [.new('profileChangedAt', DateTime.now().toIso8601String())],
|
||||
AssetResponseDto: [
|
||||
const .new('visibility', 'timeline'),
|
||||
.new('createdAt', DateTime.now().toIso8601String()),
|
||||
const .new('isEdited', false),
|
||||
],
|
||||
UserAdminResponseDto: [.new('profileChangedAt', DateTime.now().toIso8601String())],
|
||||
LoginResponseDto: const [.new('isOnboarded', false)],
|
||||
SyncUserV1: [.new('profileChangedAt', DateTime.now().toIso8601String()), const .new('hasProfileImage', false)],
|
||||
SyncAssetV1: const [.new('isEdited', false)],
|
||||
ServerFeaturesDto: const [.new('ocr', false)],
|
||||
MemoriesResponse: const [.new('duration', 5)],
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
dynamic upgradeDto(dynamic value, String targetType) {
|
||||
switch (targetType) {
|
||||
case 'UserPreferencesResponseDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'download.includeEmbeddedVideos', false);
|
||||
addDefault(value, 'folders', FoldersResponse(enabled: false, sidebarWeb: false).toJson());
|
||||
addDefault(value, 'memories', MemoriesResponse(enabled: true, duration: 5).toJson());
|
||||
addDefault(value, 'ratings', RatingsResponse(enabled: false).toJson());
|
||||
addDefault(value, 'people', PeopleResponse(enabled: true, sidebarWeb: false).toJson());
|
||||
addDefault(value, 'tags', TagsResponse(enabled: false, sidebarWeb: false).toJson());
|
||||
addDefault(value, 'sharedLinks', SharedLinksResponse(enabled: true, sidebarWeb: false).toJson());
|
||||
addDefault(value, 'cast', CastResponse(gCastEnabled: false).toJson());
|
||||
addDefault(value, 'albums', {'defaultAssetOrder': 'desc'});
|
||||
}
|
||||
break;
|
||||
case 'ServerConfigDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'mapLightStyleUrl', 'https://tiles.immich.cloud/v1/style/light.json');
|
||||
addDefault(value, 'mapDarkStyleUrl', 'https://tiles.immich.cloud/v1/style/dark.json');
|
||||
}
|
||||
case 'UserResponseDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String());
|
||||
}
|
||||
break;
|
||||
case 'AssetResponseDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'visibility', 'timeline');
|
||||
addDefault(value, 'createdAt', DateTime.now().toIso8601String());
|
||||
addDefault(value, 'isEdited', false);
|
||||
}
|
||||
break;
|
||||
case 'UserAdminResponseDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String());
|
||||
}
|
||||
break;
|
||||
case 'LoginResponseDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'isOnboarded', false);
|
||||
}
|
||||
break;
|
||||
case 'SyncUserV1':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String());
|
||||
addDefault(value, 'hasProfileImage', false);
|
||||
}
|
||||
case 'SyncAssetV1':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'isEdited', false);
|
||||
}
|
||||
case 'ServerFeaturesDto':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'ocr', false);
|
||||
}
|
||||
break;
|
||||
case 'MemoriesResponse':
|
||||
if (value is Map) {
|
||||
addDefault(value, 'duration', 5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
addDefault(dynamic value, String keys, dynamic defaultValue) {
|
||||
// Loop through the keys and assign the default value if the key is not present
|
||||
List<String> keyList = keys.split('.');
|
||||
dynamic current = value;
|
||||
|
||||
for (int i = 0; i < keyList.length - 1; i++) {
|
||||
if (current[keyList[i]] == null) {
|
||||
current[keyList[i]] = {};
|
||||
}
|
||||
current = current[keyList[i]];
|
||||
}
|
||||
|
||||
if (current[keyList.last] == null) {
|
||||
current[keyList.last] = defaultValue;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,42 @@
|
||||
enum SemVerType { major, minor, patch }
|
||||
enum SemVerType { major, minor, patch, prerelease }
|
||||
|
||||
class SemVer {
|
||||
final int major;
|
||||
final int minor;
|
||||
final int patch;
|
||||
final int? prerelease;
|
||||
|
||||
const SemVer({required this.major, required this.minor, required this.patch});
|
||||
const SemVer({required this.major, required this.minor, required this.patch, this.prerelease});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '$major.$minor.$patch';
|
||||
return '$major.$minor.$patch${prerelease == null ? '' : '-rc.$prerelease'}';
|
||||
}
|
||||
|
||||
SemVer copyWith({int? major, int? minor, int? patch}) {
|
||||
return SemVer(major: major ?? this.major, minor: minor ?? this.minor, patch: patch ?? this.patch);
|
||||
SemVer copyWith({int? major, int? minor, int? patch, int? prerelease}) {
|
||||
return SemVer(
|
||||
major: major ?? this.major,
|
||||
minor: minor ?? this.minor,
|
||||
patch: patch ?? this.patch,
|
||||
prerelease: prerelease ?? this.prerelease,
|
||||
);
|
||||
}
|
||||
|
||||
static final _pattern = RegExp(r'^v?(\d+)\.(\d+)\.(\d+)(?:-rc\.(\d+))?(?:[-+].*)?$', caseSensitive: false);
|
||||
|
||||
factory SemVer.fromString(String version) {
|
||||
if (version.toLowerCase().startsWith("v")) {
|
||||
version = version.substring(1);
|
||||
}
|
||||
|
||||
final parts = version.split("-")[0].split('.');
|
||||
if (parts.length != 3) {
|
||||
final match = _pattern.firstMatch(version);
|
||||
if (match == null) {
|
||||
throw FormatException('Invalid semantic version string: $version');
|
||||
}
|
||||
|
||||
try {
|
||||
return SemVer(major: int.parse(parts[0]), minor: int.parse(parts[1]), patch: int.parse(parts[2]));
|
||||
} catch (e) {
|
||||
throw FormatException('Invalid semantic version string: $version');
|
||||
}
|
||||
final prerelease = match.group(4);
|
||||
return SemVer(
|
||||
major: int.parse(match.group(1)!),
|
||||
minor: int.parse(match.group(2)!),
|
||||
patch: int.parse(match.group(3)!),
|
||||
prerelease: prerelease == null ? null : int.parse(prerelease),
|
||||
);
|
||||
}
|
||||
|
||||
bool operator >(SemVer other) {
|
||||
@@ -40,7 +46,10 @@ class SemVer {
|
||||
if (minor != other.minor) {
|
||||
return minor > other.minor;
|
||||
}
|
||||
return patch > other.patch;
|
||||
if (patch != other.patch) {
|
||||
return patch > other.patch;
|
||||
}
|
||||
return _comparePrerelease(other) > 0;
|
||||
}
|
||||
|
||||
bool operator <(SemVer other) {
|
||||
@@ -50,7 +59,23 @@ class SemVer {
|
||||
if (minor != other.minor) {
|
||||
return minor < other.minor;
|
||||
}
|
||||
return patch < other.patch;
|
||||
if (patch != other.patch) {
|
||||
return patch < other.patch;
|
||||
}
|
||||
return _comparePrerelease(other) < 0;
|
||||
}
|
||||
|
||||
int _comparePrerelease(SemVer other) {
|
||||
if (prerelease == other.prerelease) {
|
||||
return 0;
|
||||
}
|
||||
if (prerelease == null) {
|
||||
return 1;
|
||||
}
|
||||
if (other.prerelease == null) {
|
||||
return -1;
|
||||
}
|
||||
return prerelease!.compareTo(other.prerelease!);
|
||||
}
|
||||
|
||||
bool operator >=(SemVer other) {
|
||||
@@ -67,7 +92,11 @@ class SemVer {
|
||||
return true;
|
||||
}
|
||||
|
||||
return other is SemVer && other.major == major && other.minor == minor && other.patch == patch;
|
||||
return other is SemVer &&
|
||||
other.major == major &&
|
||||
other.minor == minor &&
|
||||
other.patch == patch &&
|
||||
other.prerelease == prerelease;
|
||||
}
|
||||
|
||||
SemVerType? differenceType(SemVer other) {
|
||||
@@ -80,10 +109,13 @@ class SemVer {
|
||||
if (patch != other.patch) {
|
||||
return SemVerType.patch;
|
||||
}
|
||||
if (prerelease != other.prerelease) {
|
||||
return SemVerType.prerelease;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => major.hashCode ^ minor.hashCode ^ patch.hashCode;
|
||||
int get hashCode => major.hashCode ^ minor.hashCode ^ patch.hashCode ^ prerelease.hashCode;
|
||||
}
|
||||
|
||||
@@ -50,9 +50,7 @@ class AppBarServerInfo extends HookConsumerWidget {
|
||||
divider,
|
||||
_ServerInfoItem(
|
||||
label: "server_version".tr(),
|
||||
text: serverInfoState.serverVersion.major > 0
|
||||
? "${serverInfoState.serverVersion.major}.${serverInfoState.serverVersion.minor}.${serverInfoState.serverVersion.patch}"
|
||||
: "--",
|
||||
text: serverInfoState.serverVersion.major > 0 ? "${serverInfoState.serverVersion}" : "--",
|
||||
),
|
||||
divider,
|
||||
_ServerInfoItem(label: "server_info_box_server_url".tr(), text: getServerUrl() ?? '--', tooltip: true),
|
||||
@@ -60,9 +58,7 @@ class AppBarServerInfo extends HookConsumerWidget {
|
||||
divider,
|
||||
_ServerInfoItem(
|
||||
label: "latest_version".tr(),
|
||||
text: serverInfoState.latestVersion!.major > 0
|
||||
? "${serverInfoState.latestVersion!.major}.${serverInfoState.latestVersion!.minor}.${serverInfoState.latestVersion!.patch}"
|
||||
: "--",
|
||||
text: serverInfoState.latestVersion!.major > 0 ? "${serverInfoState.latestVersion!}" : "--",
|
||||
tooltip: true,
|
||||
icon: serverInfoState.versionStatus == VersionStatus.serverOutOfDate
|
||||
? const Icon(Icons.info, color: Color.fromARGB(255, 243, 188, 106), size: 12)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# See https://dart.dev/guides/libraries/private-files
|
||||
|
||||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
|
||||
# Except for application packages
|
||||
pubspec.lock
|
||||
|
||||
doc/api/
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# Mac
|
||||
.DS_Store
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1 @@
|
||||
7.8.0
|
||||
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
#
|
||||
# https://docs.travis-ci.com/user/languages/dart/
|
||||
#
|
||||
language: dart
|
||||
dart:
|
||||
# Install a specific stable release
|
||||
- "2.12"
|
||||
install:
|
||||
- pub get
|
||||
|
||||
script:
|
||||
- pub run test
|
||||
Generated
+707
@@ -0,0 +1,707 @@
|
||||
# openapi
|
||||
Immich API
|
||||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 3.0.0
|
||||
- Generator version: 7.8.0
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
Dart 2.12 or later
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
### Github
|
||||
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
|
||||
```
|
||||
dependencies:
|
||||
openapi:
|
||||
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
```
|
||||
|
||||
### Local
|
||||
To use the package in your local drive, add the following dependency to your pubspec.yaml
|
||||
```
|
||||
dependencies:
|
||||
openapi:
|
||||
path: /path/to/openapi
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
TODO
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```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 = APIKeysApi();
|
||||
final apiKeyCreateDto = ApiKeyCreateDto(); // ApiKeyCreateDto |
|
||||
|
||||
try {
|
||||
final result = api_instance.createApiKey(apiKeyCreateDto);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling APIKeysApi->createApiKey: $e\n');
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to */api*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | Create an API key
|
||||
*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | Delete an API key
|
||||
*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | Retrieve an API key
|
||||
*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | List all API keys
|
||||
*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | Retrieve the current API key
|
||||
*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key
|
||||
*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | Create an activity
|
||||
*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | Delete an activity
|
||||
*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | List all activities
|
||||
*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | Retrieve activity statistics
|
||||
*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | Add assets to an album
|
||||
*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | Add assets to albums
|
||||
*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | Share album with users
|
||||
*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | Create an album
|
||||
*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | Delete an album
|
||||
*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | Retrieve an album
|
||||
*AlbumsApi* | [**getAlbumMapMarkers**](doc//AlbumsApi.md#getalbummapmarkers) | **GET** /albums/{id}/map-markers | Retrieve album map markers
|
||||
*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | Retrieve album statistics
|
||||
*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | List all albums
|
||||
*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | Remove assets from an album
|
||||
*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | Remove user from album
|
||||
*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | Update an album
|
||||
*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | Update user role
|
||||
*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | Check bulk upload
|
||||
*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | Copy asset
|
||||
*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | Delete asset metadata by key
|
||||
*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | Delete assets
|
||||
*AssetsApi* | [**deleteBulkAssetMetadata**](doc//AssetsApi.md#deletebulkassetmetadata) | **DELETE** /assets/metadata | Delete asset metadata
|
||||
*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | Download original asset
|
||||
*AssetsApi* | [**editAsset**](doc//AssetsApi.md#editasset) | **PUT** /assets/{id}/edits | Apply edits to an existing asset
|
||||
*AssetsApi* | [**getAssetEdits**](doc//AssetsApi.md#getassetedits) | **GET** /assets/{id}/edits | Retrieve edits for an existing asset
|
||||
*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | Retrieve an asset
|
||||
*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | Get asset metadata
|
||||
*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | Retrieve asset metadata by key
|
||||
*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | Retrieve asset OCR data
|
||||
*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | Get asset statistics
|
||||
*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | Play asset video
|
||||
*AssetsApi* | [**removeAssetEdits**](doc//AssetsApi.md#removeassetedits) | **DELETE** /assets/{id}/edits | Remove edits from an existing asset
|
||||
*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | Run an asset job
|
||||
*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | Update an asset
|
||||
*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | Update asset metadata
|
||||
*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | Update assets
|
||||
*AssetsApi* | [**updateBulkAssetMetadata**](doc//AssetsApi.md#updatebulkassetmetadata) | **PUT** /assets/metadata | Upsert asset metadata
|
||||
*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | Upload asset
|
||||
*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | View asset thumbnail
|
||||
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password
|
||||
*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | Change pin code
|
||||
*AuthenticationApi* | [**finishOAuth**](doc//AuthenticationApi.md#finishoauth) | **POST** /oauth/callback | Finish OAuth
|
||||
*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | Retrieve auth status
|
||||
*AuthenticationApi* | [**linkOAuthAccount**](doc//AuthenticationApi.md#linkoauthaccount) | **POST** /oauth/link | Link OAuth account
|
||||
*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | Lock auth session
|
||||
*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | Login
|
||||
*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | Logout
|
||||
*AuthenticationApi* | [**logoutOAuth**](doc//AuthenticationApi.md#logoutoauth) | **POST** /oauth/backchannel-logout | Backchannel OAuth logout
|
||||
*AuthenticationApi* | [**redirectOAuthToMobile**](doc//AuthenticationApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | Redirect OAuth to mobile
|
||||
*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | Reset pin code
|
||||
*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | Setup pin code
|
||||
*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | Register admin
|
||||
*AuthenticationApi* | [**startOAuth**](doc//AuthenticationApi.md#startoauth) | **POST** /oauth/authorize | Start OAuth
|
||||
*AuthenticationApi* | [**unlinkOAuthAccount**](doc//AuthenticationApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | Unlink OAuth account
|
||||
*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | Unlock auth session
|
||||
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token
|
||||
*AuthenticationAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthenticationAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | Unlink all OAuth accounts
|
||||
*DatabaseBackupsAdminApi* | [**deleteDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#deletedatabasebackup) | **DELETE** /admin/database-backups | Delete database backup
|
||||
*DatabaseBackupsAdminApi* | [**downloadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#downloaddatabasebackup) | **GET** /admin/database-backups/{filename} | Download database backup
|
||||
*DatabaseBackupsAdminApi* | [**listDatabaseBackups**](doc//DatabaseBackupsAdminApi.md#listdatabasebackups) | **GET** /admin/database-backups | List database backups
|
||||
*DatabaseBackupsAdminApi* | [**startDatabaseRestoreFlow**](doc//DatabaseBackupsAdminApi.md#startdatabaserestoreflow) | **POST** /admin/database-backups/start-restore | Start database backup restore flow
|
||||
*DatabaseBackupsAdminApi* | [**uploadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#uploaddatabasebackup) | **POST** /admin/database-backups/upload | Upload database backup
|
||||
*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner
|
||||
*DeprecatedApi* | [**getQueuesLegacy**](doc//DeprecatedApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status
|
||||
*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs
|
||||
*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive
|
||||
*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information
|
||||
*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Dismiss a duplicate group
|
||||
*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates
|
||||
*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates
|
||||
*DuplicatesApi* | [**resolveDuplicates**](doc//DuplicatesApi.md#resolveduplicates) | **POST** /duplicates/resolve | Resolve duplicate groups
|
||||
*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | Create a face
|
||||
*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | Delete a face
|
||||
*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | Retrieve faces for asset
|
||||
*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | Re-assign a face to another person
|
||||
*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | Create a manual job
|
||||
*JobsApi* | [**getQueuesLegacy**](doc//JobsApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status
|
||||
*JobsApi* | [**runQueueCommandLegacy**](doc//JobsApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs
|
||||
*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | Create a library
|
||||
*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | Delete a library
|
||||
*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | Retrieve libraries
|
||||
*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | Retrieve a library
|
||||
*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | Retrieve library statistics
|
||||
*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | Scan a library
|
||||
*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library
|
||||
*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | Validate library settings
|
||||
*MaintenanceAdminApi* | [**detectPriorInstall**](doc//MaintenanceAdminApi.md#detectpriorinstall) | **GET** /admin/maintenance/detect-install | Detect existing install
|
||||
*MaintenanceAdminApi* | [**getMaintenanceStatus**](doc//MaintenanceAdminApi.md#getmaintenancestatus) | **GET** /admin/maintenance/status | Get maintenance mode status
|
||||
*MaintenanceAdminApi* | [**maintenanceLogin**](doc//MaintenanceAdminApi.md#maintenancelogin) | **POST** /admin/maintenance/login | Log into maintenance mode
|
||||
*MaintenanceAdminApi* | [**setMaintenanceMode**](doc//MaintenanceAdminApi.md#setmaintenancemode) | **POST** /admin/maintenance | Set maintenance mode
|
||||
*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | Retrieve map markers
|
||||
*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | Reverse geocode coordinates
|
||||
*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | Add assets to a memory
|
||||
*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | Create a memory
|
||||
*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | Delete a memory
|
||||
*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | Retrieve a memory
|
||||
*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | Retrieve memories statistics
|
||||
*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | Remove assets from a memory
|
||||
*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | Retrieve memories
|
||||
*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | Update a memory
|
||||
*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | Delete a notification
|
||||
*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | Delete notifications
|
||||
*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | Get a notification
|
||||
*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | Retrieve notifications
|
||||
*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | Update a notification
|
||||
*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | Update notifications
|
||||
*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | Create a notification
|
||||
*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | Render email template
|
||||
*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | Send test email
|
||||
*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | Create a partner
|
||||
*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner
|
||||
*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | Retrieve partners
|
||||
*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | Remove a partner
|
||||
*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | Update a partner
|
||||
*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | Create a person
|
||||
*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | Delete people
|
||||
*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | Delete person
|
||||
*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | Get all people
|
||||
*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | Get a person
|
||||
*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | Get person statistics
|
||||
*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | Get person thumbnail
|
||||
*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | Merge people
|
||||
*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | Reassign faces
|
||||
*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | Update people
|
||||
*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | Update person
|
||||
*PluginsApi* | [**getPlugin**](doc//PluginsApi.md#getplugin) | **GET** /plugins/{id} | Retrieve a plugin
|
||||
*PluginsApi* | [**searchPluginMethods**](doc//PluginsApi.md#searchpluginmethods) | **GET** /plugins/methods | Retrieve plugin methods
|
||||
*PluginsApi* | [**searchPluginTemplates**](doc//PluginsApi.md#searchplugintemplates) | **GET** /plugins/templates | Retrieve workflow templates
|
||||
*PluginsApi* | [**searchPlugins**](doc//PluginsApi.md#searchplugins) | **GET** /plugins | List all plugins
|
||||
*QueuesApi* | [**emptyQueue**](doc//QueuesApi.md#emptyqueue) | **DELETE** /queues/{name}/jobs | Empty a queue
|
||||
*QueuesApi* | [**getQueue**](doc//QueuesApi.md#getqueue) | **GET** /queues/{name} | Retrieve a queue
|
||||
*QueuesApi* | [**getQueueJobs**](doc//QueuesApi.md#getqueuejobs) | **GET** /queues/{name}/jobs | Retrieve queue jobs
|
||||
*QueuesApi* | [**getQueues**](doc//QueuesApi.md#getqueues) | **GET** /queues | List all queues
|
||||
*QueuesApi* | [**updateQueue**](doc//QueuesApi.md#updatequeue) | **PUT** /queues/{name} | Update a queue
|
||||
*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | Retrieve assets by city
|
||||
*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | Retrieve explore data
|
||||
*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | Retrieve search suggestions
|
||||
*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | Search asset statistics
|
||||
*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | Search assets by metadata
|
||||
*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | Search large assets
|
||||
*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | Search people
|
||||
*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | Search places
|
||||
*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | Search random assets
|
||||
*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | Smart asset search
|
||||
*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | Delete server product key
|
||||
*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | Get server information
|
||||
*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | Get APK links
|
||||
*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | Get config
|
||||
*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | Get features
|
||||
*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | Get product key
|
||||
*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | Get statistics
|
||||
*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version
|
||||
*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | Get storage
|
||||
*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | Get supported media types
|
||||
*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | Get version check status
|
||||
*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | Get version history
|
||||
*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping
|
||||
*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | Set server product key
|
||||
*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | Create a session
|
||||
*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | Delete all sessions
|
||||
*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | Delete a session
|
||||
*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | Retrieve sessions
|
||||
*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | Lock a session
|
||||
*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | Update a session
|
||||
*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | Add assets to a shared link
|
||||
*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | Create a shared link
|
||||
*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | Retrieve all shared links
|
||||
*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | Retrieve current shared link
|
||||
*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | Retrieve a shared link
|
||||
*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | Delete a shared link
|
||||
*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | Remove assets from a shared link
|
||||
*SharedLinksApi* | [**sharedLinkLogin**](doc//SharedLinksApi.md#sharedlinklogin) | **POST** /shared-links/login | Shared link login
|
||||
*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | Update a shared link
|
||||
*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | Create a stack
|
||||
*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | Delete a stack
|
||||
*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | Delete stacks
|
||||
*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | Retrieve a stack
|
||||
*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | Remove an asset from a stack
|
||||
*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | Retrieve stacks
|
||||
*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack
|
||||
*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | Delete acknowledgements
|
||||
*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | Retrieve acknowledgements
|
||||
*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | Stream sync changes
|
||||
*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | Acknowledge changes
|
||||
*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | Get system configuration
|
||||
*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | Get system configuration defaults
|
||||
*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | Get storage template options
|
||||
*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | Update system configuration
|
||||
*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | Retrieve admin onboarding
|
||||
*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | Retrieve reverse geocoding state
|
||||
*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | Retrieve version check state
|
||||
*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | Update admin onboarding
|
||||
*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | Tag assets
|
||||
*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | Create a tag
|
||||
*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | Delete a tag
|
||||
*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | Retrieve tags
|
||||
*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | Retrieve a tag
|
||||
*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | Tag assets
|
||||
*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | Untag assets
|
||||
*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | Update a tag
|
||||
*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | Upsert tags
|
||||
*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | Get time bucket
|
||||
*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | Get time buckets
|
||||
*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | Empty trash
|
||||
*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | Restore assets
|
||||
*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | Restore trash
|
||||
*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | Create user profile image
|
||||
*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | Delete user profile image
|
||||
*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | Delete user product key
|
||||
*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | Delete user onboarding
|
||||
*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | Get my preferences
|
||||
*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | Get current user
|
||||
*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | Retrieve user profile image
|
||||
*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | Retrieve a user
|
||||
*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | Retrieve user product key
|
||||
*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | Retrieve user onboarding
|
||||
*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | Get all users
|
||||
*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | Set user product key
|
||||
*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | Update user onboarding
|
||||
*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences
|
||||
*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | Update current user
|
||||
*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | Create a user
|
||||
*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | Delete a user
|
||||
*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | Retrieve a user
|
||||
*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | Retrieve user preferences
|
||||
*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | Retrieve user sessions
|
||||
*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | Retrieve user statistics
|
||||
*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | Restore a deleted user
|
||||
*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | Search users
|
||||
*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user
|
||||
*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences
|
||||
*ViewsApi* | [**getAssetsByOriginalPath**](doc//ViewsApi.md#getassetsbyoriginalpath) | **GET** /view/folder | Retrieve assets by original path
|
||||
*ViewsApi* | [**getUniqueOriginalPaths**](doc//ViewsApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | Retrieve unique paths
|
||||
*WorkflowsApi* | [**createWorkflow**](doc//WorkflowsApi.md#createworkflow) | **POST** /workflows | Create a workflow
|
||||
*WorkflowsApi* | [**deleteWorkflow**](doc//WorkflowsApi.md#deleteworkflow) | **DELETE** /workflows/{id} | Delete a workflow
|
||||
*WorkflowsApi* | [**getWorkflow**](doc//WorkflowsApi.md#getworkflow) | **GET** /workflows/{id} | Retrieve a workflow
|
||||
*WorkflowsApi* | [**getWorkflowForShare**](doc//WorkflowsApi.md#getworkflowforshare) | **GET** /workflows/{id}/share | Retrieve a workflow
|
||||
*WorkflowsApi* | [**getWorkflowTriggers**](doc//WorkflowsApi.md#getworkflowtriggers) | **GET** /workflows/triggers | List all workflow triggers
|
||||
*WorkflowsApi* | [**searchWorkflows**](doc//WorkflowsApi.md#searchworkflows) | **GET** /workflows | List all workflows
|
||||
*WorkflowsApi* | [**updateWorkflow**](doc//WorkflowsApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [ActivityCreateDto](doc//ActivityCreateDto.md)
|
||||
- [ActivityResponseDto](doc//ActivityResponseDto.md)
|
||||
- [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md)
|
||||
- [AddUsersDto](doc//AddUsersDto.md)
|
||||
- [AdminOnboardingUpdateDto](doc//AdminOnboardingUpdateDto.md)
|
||||
- [AlbumResponseDto](doc//AlbumResponseDto.md)
|
||||
- [AlbumStatisticsResponseDto](doc//AlbumStatisticsResponseDto.md)
|
||||
- [AlbumUserAddDto](doc//AlbumUserAddDto.md)
|
||||
- [AlbumUserCreateDto](doc//AlbumUserCreateDto.md)
|
||||
- [AlbumUserResponseDto](doc//AlbumUserResponseDto.md)
|
||||
- [AlbumUserRole](doc//AlbumUserRole.md)
|
||||
- [AlbumsAddAssetsDto](doc//AlbumsAddAssetsDto.md)
|
||||
- [AlbumsAddAssetsResponseDto](doc//AlbumsAddAssetsResponseDto.md)
|
||||
- [AlbumsResponse](doc//AlbumsResponse.md)
|
||||
- [AlbumsUpdate](doc//AlbumsUpdate.md)
|
||||
- [ApiKeyCreateDto](doc//ApiKeyCreateDto.md)
|
||||
- [ApiKeyCreateResponseDto](doc//ApiKeyCreateResponseDto.md)
|
||||
- [ApiKeyResponseDto](doc//ApiKeyResponseDto.md)
|
||||
- [ApiKeyUpdateDto](doc//ApiKeyUpdateDto.md)
|
||||
- [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md)
|
||||
- [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md)
|
||||
- [AssetBulkUploadCheckDto](doc//AssetBulkUploadCheckDto.md)
|
||||
- [AssetBulkUploadCheckItem](doc//AssetBulkUploadCheckItem.md)
|
||||
- [AssetBulkUploadCheckResponseDto](doc//AssetBulkUploadCheckResponseDto.md)
|
||||
- [AssetBulkUploadCheckResult](doc//AssetBulkUploadCheckResult.md)
|
||||
- [AssetCopyDto](doc//AssetCopyDto.md)
|
||||
- [AssetEditAction](doc//AssetEditAction.md)
|
||||
- [AssetEditActionItemDto](doc//AssetEditActionItemDto.md)
|
||||
- [AssetEditActionItemDtoParameters](doc//AssetEditActionItemDtoParameters.md)
|
||||
- [AssetEditActionItemResponseDto](doc//AssetEditActionItemResponseDto.md)
|
||||
- [AssetEditsCreateDto](doc//AssetEditsCreateDto.md)
|
||||
- [AssetEditsResponseDto](doc//AssetEditsResponseDto.md)
|
||||
- [AssetFaceCreateDto](doc//AssetFaceCreateDto.md)
|
||||
- [AssetFaceDeleteDto](doc//AssetFaceDeleteDto.md)
|
||||
- [AssetFaceResponseDto](doc//AssetFaceResponseDto.md)
|
||||
- [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md)
|
||||
- [AssetFaceUpdateItem](doc//AssetFaceUpdateItem.md)
|
||||
- [AssetIdErrorReason](doc//AssetIdErrorReason.md)
|
||||
- [AssetIdsDto](doc//AssetIdsDto.md)
|
||||
- [AssetIdsResponseDto](doc//AssetIdsResponseDto.md)
|
||||
- [AssetJobName](doc//AssetJobName.md)
|
||||
- [AssetJobsDto](doc//AssetJobsDto.md)
|
||||
- [AssetMediaResponseDto](doc//AssetMediaResponseDto.md)
|
||||
- [AssetMediaSize](doc//AssetMediaSize.md)
|
||||
- [AssetMediaStatus](doc//AssetMediaStatus.md)
|
||||
- [AssetMetadataBulkDeleteDto](doc//AssetMetadataBulkDeleteDto.md)
|
||||
- [AssetMetadataBulkDeleteItemDto](doc//AssetMetadataBulkDeleteItemDto.md)
|
||||
- [AssetMetadataBulkResponseDto](doc//AssetMetadataBulkResponseDto.md)
|
||||
- [AssetMetadataBulkUpsertDto](doc//AssetMetadataBulkUpsertDto.md)
|
||||
- [AssetMetadataBulkUpsertItemDto](doc//AssetMetadataBulkUpsertItemDto.md)
|
||||
- [AssetMetadataResponseDto](doc//AssetMetadataResponseDto.md)
|
||||
- [AssetMetadataUpsertDto](doc//AssetMetadataUpsertDto.md)
|
||||
- [AssetMetadataUpsertItemDto](doc//AssetMetadataUpsertItemDto.md)
|
||||
- [AssetOcrResponseDto](doc//AssetOcrResponseDto.md)
|
||||
- [AssetOrder](doc//AssetOrder.md)
|
||||
- [AssetOrderBy](doc//AssetOrderBy.md)
|
||||
- [AssetRejectReason](doc//AssetRejectReason.md)
|
||||
- [AssetResponseDto](doc//AssetResponseDto.md)
|
||||
- [AssetStackResponseDto](doc//AssetStackResponseDto.md)
|
||||
- [AssetStatsResponseDto](doc//AssetStatsResponseDto.md)
|
||||
- [AssetTypeEnum](doc//AssetTypeEnum.md)
|
||||
- [AssetUploadAction](doc//AssetUploadAction.md)
|
||||
- [AssetVisibility](doc//AssetVisibility.md)
|
||||
- [AudioCodec](doc//AudioCodec.md)
|
||||
- [AuthStatusResponseDto](doc//AuthStatusResponseDto.md)
|
||||
- [AvatarUpdate](doc//AvatarUpdate.md)
|
||||
- [BulkIdErrorReason](doc//BulkIdErrorReason.md)
|
||||
- [BulkIdResponseDto](doc//BulkIdResponseDto.md)
|
||||
- [BulkIdsDto](doc//BulkIdsDto.md)
|
||||
- [CLIPConfig](doc//CLIPConfig.md)
|
||||
- [CQMode](doc//CQMode.md)
|
||||
- [CastResponse](doc//CastResponse.md)
|
||||
- [CastUpdate](doc//CastUpdate.md)
|
||||
- [ChangePasswordDto](doc//ChangePasswordDto.md)
|
||||
- [Colorspace](doc//Colorspace.md)
|
||||
- [ContributorCountResponseDto](doc//ContributorCountResponseDto.md)
|
||||
- [CreateAlbumDto](doc//CreateAlbumDto.md)
|
||||
- [CreateLibraryDto](doc//CreateLibraryDto.md)
|
||||
- [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md)
|
||||
- [CropParameters](doc//CropParameters.md)
|
||||
- [DatabaseBackupConfig](doc//DatabaseBackupConfig.md)
|
||||
- [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md)
|
||||
- [DatabaseBackupDto](doc//DatabaseBackupDto.md)
|
||||
- [DatabaseBackupListResponseDto](doc//DatabaseBackupListResponseDto.md)
|
||||
- [DownloadArchiveDto](doc//DownloadArchiveDto.md)
|
||||
- [DownloadArchiveInfo](doc//DownloadArchiveInfo.md)
|
||||
- [DownloadInfoDto](doc//DownloadInfoDto.md)
|
||||
- [DownloadResponse](doc//DownloadResponse.md)
|
||||
- [DownloadResponseDto](doc//DownloadResponseDto.md)
|
||||
- [DownloadUpdate](doc//DownloadUpdate.md)
|
||||
- [DuplicateDetectionConfig](doc//DuplicateDetectionConfig.md)
|
||||
- [DuplicateResolveDto](doc//DuplicateResolveDto.md)
|
||||
- [DuplicateResolveGroupDto](doc//DuplicateResolveGroupDto.md)
|
||||
- [DuplicateResponseDto](doc//DuplicateResponseDto.md)
|
||||
- [EmailNotificationsResponse](doc//EmailNotificationsResponse.md)
|
||||
- [EmailNotificationsUpdate](doc//EmailNotificationsUpdate.md)
|
||||
- [ExifResponseDto](doc//ExifResponseDto.md)
|
||||
- [FaceDto](doc//FaceDto.md)
|
||||
- [FacialRecognitionConfig](doc//FacialRecognitionConfig.md)
|
||||
- [FoldersResponse](doc//FoldersResponse.md)
|
||||
- [FoldersUpdate](doc//FoldersUpdate.md)
|
||||
- [ImageFormat](doc//ImageFormat.md)
|
||||
- [JobCreateDto](doc//JobCreateDto.md)
|
||||
- [JobName](doc//JobName.md)
|
||||
- [JobSettingsDto](doc//JobSettingsDto.md)
|
||||
- [LibraryResponseDto](doc//LibraryResponseDto.md)
|
||||
- [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md)
|
||||
- [LicenseKeyDto](doc//LicenseKeyDto.md)
|
||||
- [LogLevel](doc//LogLevel.md)
|
||||
- [LoginCredentialDto](doc//LoginCredentialDto.md)
|
||||
- [LoginResponseDto](doc//LoginResponseDto.md)
|
||||
- [LogoutResponseDto](doc//LogoutResponseDto.md)
|
||||
- [MachineLearningAvailabilityChecksDto](doc//MachineLearningAvailabilityChecksDto.md)
|
||||
- [MaintenanceAction](doc//MaintenanceAction.md)
|
||||
- [MaintenanceAuthDto](doc//MaintenanceAuthDto.md)
|
||||
- [MaintenanceDetectInstallResponseDto](doc//MaintenanceDetectInstallResponseDto.md)
|
||||
- [MaintenanceDetectInstallStorageFolderDto](doc//MaintenanceDetectInstallStorageFolderDto.md)
|
||||
- [MaintenanceLoginDto](doc//MaintenanceLoginDto.md)
|
||||
- [MaintenanceStatusResponseDto](doc//MaintenanceStatusResponseDto.md)
|
||||
- [ManualJobName](doc//ManualJobName.md)
|
||||
- [MapMarkerResponseDto](doc//MapMarkerResponseDto.md)
|
||||
- [MapReverseGeocodeResponseDto](doc//MapReverseGeocodeResponseDto.md)
|
||||
- [MemoriesResponse](doc//MemoriesResponse.md)
|
||||
- [MemoriesUpdate](doc//MemoriesUpdate.md)
|
||||
- [MemoryCreateDto](doc//MemoryCreateDto.md)
|
||||
- [MemoryResponseDto](doc//MemoryResponseDto.md)
|
||||
- [MemorySearchOrder](doc//MemorySearchOrder.md)
|
||||
- [MemoryStatisticsResponseDto](doc//MemoryStatisticsResponseDto.md)
|
||||
- [MemoryType](doc//MemoryType.md)
|
||||
- [MemoryUpdateDto](doc//MemoryUpdateDto.md)
|
||||
- [MergePersonDto](doc//MergePersonDto.md)
|
||||
- [MetadataSearchDto](doc//MetadataSearchDto.md)
|
||||
- [MirrorAxis](doc//MirrorAxis.md)
|
||||
- [MirrorParameters](doc//MirrorParameters.md)
|
||||
- [NotificationCreateDto](doc//NotificationCreateDto.md)
|
||||
- [NotificationDeleteAllDto](doc//NotificationDeleteAllDto.md)
|
||||
- [NotificationDto](doc//NotificationDto.md)
|
||||
- [NotificationLevel](doc//NotificationLevel.md)
|
||||
- [NotificationType](doc//NotificationType.md)
|
||||
- [NotificationUpdateAllDto](doc//NotificationUpdateAllDto.md)
|
||||
- [NotificationUpdateDto](doc//NotificationUpdateDto.md)
|
||||
- [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md)
|
||||
- [OAuthCallbackDto](doc//OAuthCallbackDto.md)
|
||||
- [OAuthConfigDto](doc//OAuthConfigDto.md)
|
||||
- [OAuthTokenEndpointAuthMethod](doc//OAuthTokenEndpointAuthMethod.md)
|
||||
- [OcrConfig](doc//OcrConfig.md)
|
||||
- [OnThisDayDto](doc//OnThisDayDto.md)
|
||||
- [OnboardingDto](doc//OnboardingDto.md)
|
||||
- [OnboardingResponseDto](doc//OnboardingResponseDto.md)
|
||||
- [PartnerCreateDto](doc//PartnerCreateDto.md)
|
||||
- [PartnerDirection](doc//PartnerDirection.md)
|
||||
- [PartnerResponseDto](doc//PartnerResponseDto.md)
|
||||
- [PartnerUpdateDto](doc//PartnerUpdateDto.md)
|
||||
- [PeopleResponse](doc//PeopleResponse.md)
|
||||
- [PeopleResponseDto](doc//PeopleResponseDto.md)
|
||||
- [PeopleUpdate](doc//PeopleUpdate.md)
|
||||
- [PeopleUpdateDto](doc//PeopleUpdateDto.md)
|
||||
- [PeopleUpdateItem](doc//PeopleUpdateItem.md)
|
||||
- [Permission](doc//Permission.md)
|
||||
- [PersonCreateDto](doc//PersonCreateDto.md)
|
||||
- [PersonResponseDto](doc//PersonResponseDto.md)
|
||||
- [PersonStatisticsResponseDto](doc//PersonStatisticsResponseDto.md)
|
||||
- [PersonUpdateDto](doc//PersonUpdateDto.md)
|
||||
- [PinCodeChangeDto](doc//PinCodeChangeDto.md)
|
||||
- [PinCodeResetDto](doc//PinCodeResetDto.md)
|
||||
- [PinCodeSetupDto](doc//PinCodeSetupDto.md)
|
||||
- [PlacesResponseDto](doc//PlacesResponseDto.md)
|
||||
- [PluginMethodResponseDto](doc//PluginMethodResponseDto.md)
|
||||
- [PluginResponseDto](doc//PluginResponseDto.md)
|
||||
- [PluginTemplateResponseDto](doc//PluginTemplateResponseDto.md)
|
||||
- [PluginTemplateStepResponseDto](doc//PluginTemplateStepResponseDto.md)
|
||||
- [PurchaseResponse](doc//PurchaseResponse.md)
|
||||
- [PurchaseUpdate](doc//PurchaseUpdate.md)
|
||||
- [QueueCommand](doc//QueueCommand.md)
|
||||
- [QueueCommandDto](doc//QueueCommandDto.md)
|
||||
- [QueueDeleteDto](doc//QueueDeleteDto.md)
|
||||
- [QueueJobResponseDto](doc//QueueJobResponseDto.md)
|
||||
- [QueueJobStatus](doc//QueueJobStatus.md)
|
||||
- [QueueName](doc//QueueName.md)
|
||||
- [QueueResponseDto](doc//QueueResponseDto.md)
|
||||
- [QueueResponseLegacyDto](doc//QueueResponseLegacyDto.md)
|
||||
- [QueueStatisticsDto](doc//QueueStatisticsDto.md)
|
||||
- [QueueStatusLegacyDto](doc//QueueStatusLegacyDto.md)
|
||||
- [QueueUpdateDto](doc//QueueUpdateDto.md)
|
||||
- [QueuesResponseLegacyDto](doc//QueuesResponseLegacyDto.md)
|
||||
- [RandomSearchDto](doc//RandomSearchDto.md)
|
||||
- [RatingsResponse](doc//RatingsResponse.md)
|
||||
- [RatingsUpdate](doc//RatingsUpdate.md)
|
||||
- [ReactionLevel](doc//ReactionLevel.md)
|
||||
- [ReactionType](doc//ReactionType.md)
|
||||
- [ReleaseChannel](doc//ReleaseChannel.md)
|
||||
- [ReleaseEventV1](doc//ReleaseEventV1.md)
|
||||
- [ReleaseType](doc//ReleaseType.md)
|
||||
- [ReverseGeocodingStateResponseDto](doc//ReverseGeocodingStateResponseDto.md)
|
||||
- [RotateParameters](doc//RotateParameters.md)
|
||||
- [SearchAlbumResponseDto](doc//SearchAlbumResponseDto.md)
|
||||
- [SearchAssetResponseDto](doc//SearchAssetResponseDto.md)
|
||||
- [SearchExploreItem](doc//SearchExploreItem.md)
|
||||
- [SearchExploreResponseDto](doc//SearchExploreResponseDto.md)
|
||||
- [SearchFacetCountResponseDto](doc//SearchFacetCountResponseDto.md)
|
||||
- [SearchFacetResponseDto](doc//SearchFacetResponseDto.md)
|
||||
- [SearchResponseDto](doc//SearchResponseDto.md)
|
||||
- [SearchStatisticsResponseDto](doc//SearchStatisticsResponseDto.md)
|
||||
- [SearchSuggestionType](doc//SearchSuggestionType.md)
|
||||
- [ServerAboutResponseDto](doc//ServerAboutResponseDto.md)
|
||||
- [ServerApkLinksDto](doc//ServerApkLinksDto.md)
|
||||
- [ServerConfigDto](doc//ServerConfigDto.md)
|
||||
- [ServerFeaturesDto](doc//ServerFeaturesDto.md)
|
||||
- [ServerMediaTypesResponseDto](doc//ServerMediaTypesResponseDto.md)
|
||||
- [ServerPingResponse](doc//ServerPingResponse.md)
|
||||
- [ServerStatsResponseDto](doc//ServerStatsResponseDto.md)
|
||||
- [ServerStorageResponseDto](doc//ServerStorageResponseDto.md)
|
||||
- [ServerVersionHistoryResponseDto](doc//ServerVersionHistoryResponseDto.md)
|
||||
- [ServerVersionResponseDto](doc//ServerVersionResponseDto.md)
|
||||
- [SessionCreateDto](doc//SessionCreateDto.md)
|
||||
- [SessionCreateResponseDto](doc//SessionCreateResponseDto.md)
|
||||
- [SessionResponseDto](doc//SessionResponseDto.md)
|
||||
- [SessionUnlockDto](doc//SessionUnlockDto.md)
|
||||
- [SessionUpdateDto](doc//SessionUpdateDto.md)
|
||||
- [SetMaintenanceModeDto](doc//SetMaintenanceModeDto.md)
|
||||
- [SharedLinkCreateDto](doc//SharedLinkCreateDto.md)
|
||||
- [SharedLinkEditDto](doc//SharedLinkEditDto.md)
|
||||
- [SharedLinkLoginDto](doc//SharedLinkLoginDto.md)
|
||||
- [SharedLinkResponseDto](doc//SharedLinkResponseDto.md)
|
||||
- [SharedLinkType](doc//SharedLinkType.md)
|
||||
- [SharedLinksResponse](doc//SharedLinksResponse.md)
|
||||
- [SharedLinksUpdate](doc//SharedLinksUpdate.md)
|
||||
- [SignUpDto](doc//SignUpDto.md)
|
||||
- [SmartSearchDto](doc//SmartSearchDto.md)
|
||||
- [SourceType](doc//SourceType.md)
|
||||
- [StackCreateDto](doc//StackCreateDto.md)
|
||||
- [StackResponseDto](doc//StackResponseDto.md)
|
||||
- [StackUpdateDto](doc//StackUpdateDto.md)
|
||||
- [StatisticsSearchDto](doc//StatisticsSearchDto.md)
|
||||
- [StorageFolder](doc//StorageFolder.md)
|
||||
- [SyncAckDeleteDto](doc//SyncAckDeleteDto.md)
|
||||
- [SyncAckDto](doc//SyncAckDto.md)
|
||||
- [SyncAckSetDto](doc//SyncAckSetDto.md)
|
||||
- [SyncAlbumDeleteV1](doc//SyncAlbumDeleteV1.md)
|
||||
- [SyncAlbumToAssetDeleteV1](doc//SyncAlbumToAssetDeleteV1.md)
|
||||
- [SyncAlbumToAssetV1](doc//SyncAlbumToAssetV1.md)
|
||||
- [SyncAlbumUserDeleteV1](doc//SyncAlbumUserDeleteV1.md)
|
||||
- [SyncAlbumUserV1](doc//SyncAlbumUserV1.md)
|
||||
- [SyncAlbumV1](doc//SyncAlbumV1.md)
|
||||
- [SyncAlbumV2](doc//SyncAlbumV2.md)
|
||||
- [SyncAssetDeleteV1](doc//SyncAssetDeleteV1.md)
|
||||
- [SyncAssetEditDeleteV1](doc//SyncAssetEditDeleteV1.md)
|
||||
- [SyncAssetEditV1](doc//SyncAssetEditV1.md)
|
||||
- [SyncAssetExifV1](doc//SyncAssetExifV1.md)
|
||||
- [SyncAssetFaceDeleteV1](doc//SyncAssetFaceDeleteV1.md)
|
||||
- [SyncAssetFaceV1](doc//SyncAssetFaceV1.md)
|
||||
- [SyncAssetFaceV2](doc//SyncAssetFaceV2.md)
|
||||
- [SyncAssetMetadataDeleteV1](doc//SyncAssetMetadataDeleteV1.md)
|
||||
- [SyncAssetMetadataV1](doc//SyncAssetMetadataV1.md)
|
||||
- [SyncAssetV1](doc//SyncAssetV1.md)
|
||||
- [SyncAssetV2](doc//SyncAssetV2.md)
|
||||
- [SyncAuthUserV1](doc//SyncAuthUserV1.md)
|
||||
- [SyncEntityType](doc//SyncEntityType.md)
|
||||
- [SyncMemoryAssetDeleteV1](doc//SyncMemoryAssetDeleteV1.md)
|
||||
- [SyncMemoryAssetV1](doc//SyncMemoryAssetV1.md)
|
||||
- [SyncMemoryDeleteV1](doc//SyncMemoryDeleteV1.md)
|
||||
- [SyncMemoryV1](doc//SyncMemoryV1.md)
|
||||
- [SyncPartnerDeleteV1](doc//SyncPartnerDeleteV1.md)
|
||||
- [SyncPartnerV1](doc//SyncPartnerV1.md)
|
||||
- [SyncPersonDeleteV1](doc//SyncPersonDeleteV1.md)
|
||||
- [SyncPersonV1](doc//SyncPersonV1.md)
|
||||
- [SyncRequestType](doc//SyncRequestType.md)
|
||||
- [SyncStackDeleteV1](doc//SyncStackDeleteV1.md)
|
||||
- [SyncStackV1](doc//SyncStackV1.md)
|
||||
- [SyncStreamDto](doc//SyncStreamDto.md)
|
||||
- [SyncUserDeleteV1](doc//SyncUserDeleteV1.md)
|
||||
- [SyncUserMetadataDeleteV1](doc//SyncUserMetadataDeleteV1.md)
|
||||
- [SyncUserMetadataV1](doc//SyncUserMetadataV1.md)
|
||||
- [SyncUserV1](doc//SyncUserV1.md)
|
||||
- [SystemConfigBackupsDto](doc//SystemConfigBackupsDto.md)
|
||||
- [SystemConfigDto](doc//SystemConfigDto.md)
|
||||
- [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md)
|
||||
- [SystemConfigFacesDto](doc//SystemConfigFacesDto.md)
|
||||
- [SystemConfigGeneratedFullsizeImageDto](doc//SystemConfigGeneratedFullsizeImageDto.md)
|
||||
- [SystemConfigGeneratedImageDto](doc//SystemConfigGeneratedImageDto.md)
|
||||
- [SystemConfigImageDto](doc//SystemConfigImageDto.md)
|
||||
- [SystemConfigJobDto](doc//SystemConfigJobDto.md)
|
||||
- [SystemConfigLibraryDto](doc//SystemConfigLibraryDto.md)
|
||||
- [SystemConfigLibraryScanDto](doc//SystemConfigLibraryScanDto.md)
|
||||
- [SystemConfigLibraryWatchDto](doc//SystemConfigLibraryWatchDto.md)
|
||||
- [SystemConfigLoggingDto](doc//SystemConfigLoggingDto.md)
|
||||
- [SystemConfigMachineLearningDto](doc//SystemConfigMachineLearningDto.md)
|
||||
- [SystemConfigMapDto](doc//SystemConfigMapDto.md)
|
||||
- [SystemConfigMetadataDto](doc//SystemConfigMetadataDto.md)
|
||||
- [SystemConfigNewVersionCheckDto](doc//SystemConfigNewVersionCheckDto.md)
|
||||
- [SystemConfigNightlyTasksDto](doc//SystemConfigNightlyTasksDto.md)
|
||||
- [SystemConfigNotificationsDto](doc//SystemConfigNotificationsDto.md)
|
||||
- [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md)
|
||||
- [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md)
|
||||
- [SystemConfigReverseGeocodingDto](doc//SystemConfigReverseGeocodingDto.md)
|
||||
- [SystemConfigServerDto](doc//SystemConfigServerDto.md)
|
||||
- [SystemConfigSmtpDto](doc//SystemConfigSmtpDto.md)
|
||||
- [SystemConfigSmtpTransportDto](doc//SystemConfigSmtpTransportDto.md)
|
||||
- [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md)
|
||||
- [SystemConfigTemplateEmailsDto](doc//SystemConfigTemplateEmailsDto.md)
|
||||
- [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md)
|
||||
- [SystemConfigTemplatesDto](doc//SystemConfigTemplatesDto.md)
|
||||
- [SystemConfigThemeDto](doc//SystemConfigThemeDto.md)
|
||||
- [SystemConfigTrashDto](doc//SystemConfigTrashDto.md)
|
||||
- [SystemConfigUserDto](doc//SystemConfigUserDto.md)
|
||||
- [TagBulkAssetsDto](doc//TagBulkAssetsDto.md)
|
||||
- [TagBulkAssetsResponseDto](doc//TagBulkAssetsResponseDto.md)
|
||||
- [TagCreateDto](doc//TagCreateDto.md)
|
||||
- [TagResponseDto](doc//TagResponseDto.md)
|
||||
- [TagUpdateDto](doc//TagUpdateDto.md)
|
||||
- [TagUpsertDto](doc//TagUpsertDto.md)
|
||||
- [TagsResponse](doc//TagsResponse.md)
|
||||
- [TagsUpdate](doc//TagsUpdate.md)
|
||||
- [TemplateDto](doc//TemplateDto.md)
|
||||
- [TemplateResponseDto](doc//TemplateResponseDto.md)
|
||||
- [TestEmailResponseDto](doc//TestEmailResponseDto.md)
|
||||
- [TimeBucketAssetResponseDto](doc//TimeBucketAssetResponseDto.md)
|
||||
- [TimeBucketsResponseDto](doc//TimeBucketsResponseDto.md)
|
||||
- [ToneMapping](doc//ToneMapping.md)
|
||||
- [TranscodeHWAccel](doc//TranscodeHWAccel.md)
|
||||
- [TranscodePolicy](doc//TranscodePolicy.md)
|
||||
- [TrashResponseDto](doc//TrashResponseDto.md)
|
||||
- [UpdateAlbumDto](doc//UpdateAlbumDto.md)
|
||||
- [UpdateAlbumUserDto](doc//UpdateAlbumUserDto.md)
|
||||
- [UpdateAssetDto](doc//UpdateAssetDto.md)
|
||||
- [UpdateLibraryDto](doc//UpdateLibraryDto.md)
|
||||
- [UsageByUserDto](doc//UsageByUserDto.md)
|
||||
- [UserAdminCreateDto](doc//UserAdminCreateDto.md)
|
||||
- [UserAdminDeleteDto](doc//UserAdminDeleteDto.md)
|
||||
- [UserAdminResponseDto](doc//UserAdminResponseDto.md)
|
||||
- [UserAdminUpdateDto](doc//UserAdminUpdateDto.md)
|
||||
- [UserAvatarColor](doc//UserAvatarColor.md)
|
||||
- [UserLicense](doc//UserLicense.md)
|
||||
- [UserMetadataKey](doc//UserMetadataKey.md)
|
||||
- [UserPreferencesResponseDto](doc//UserPreferencesResponseDto.md)
|
||||
- [UserPreferencesUpdateDto](doc//UserPreferencesUpdateDto.md)
|
||||
- [UserResponseDto](doc//UserResponseDto.md)
|
||||
- [UserStatus](doc//UserStatus.md)
|
||||
- [UserUpdateMeDto](doc//UserUpdateMeDto.md)
|
||||
- [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md)
|
||||
- [ValidateLibraryDto](doc//ValidateLibraryDto.md)
|
||||
- [ValidateLibraryImportPathResponseDto](doc//ValidateLibraryImportPathResponseDto.md)
|
||||
- [ValidateLibraryResponseDto](doc//ValidateLibraryResponseDto.md)
|
||||
- [VersionCheckStateResponseDto](doc//VersionCheckStateResponseDto.md)
|
||||
- [VideoCodec](doc//VideoCodec.md)
|
||||
- [VideoContainer](doc//VideoContainer.md)
|
||||
- [WorkflowCreateDto](doc//WorkflowCreateDto.md)
|
||||
- [WorkflowResponseDto](doc//WorkflowResponseDto.md)
|
||||
- [WorkflowShareResponseDto](doc//WorkflowShareResponseDto.md)
|
||||
- [WorkflowShareStepDto](doc//WorkflowShareStepDto.md)
|
||||
- [WorkflowStepDto](doc//WorkflowStepDto.md)
|
||||
- [WorkflowTrigger](doc//WorkflowTrigger.md)
|
||||
- [WorkflowTriggerResponseDto](doc//WorkflowTriggerResponseDto.md)
|
||||
- [WorkflowType](doc//WorkflowType.md)
|
||||
- [WorkflowUpdateDto](doc//WorkflowUpdateDto.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
### bearer
|
||||
|
||||
- **Type**: HTTP Bearer authentication
|
||||
|
||||
### cookie
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: immich_access_token
|
||||
- **Location**:
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-api-key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
Generated
+69
-57
@@ -1,5 +1,8 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
@@ -10,23 +13,61 @@ library openapi.api;
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:immich_mobile/utils/openapi_patching.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
part 'api_client.dart';
|
||||
part 'api_compat.dart';
|
||||
part 'api_exception.dart';
|
||||
part 'api_helper.dart';
|
||||
part 'api_state.dart';
|
||||
part 'api_version.dart';
|
||||
part 'optional.dart';
|
||||
part 'auth/api_key_auth.dart';
|
||||
part 'api_exception.dart';
|
||||
part 'auth/authentication.dart';
|
||||
part 'auth/http_bearer_auth.dart';
|
||||
part 'auth/api_key_auth.dart';
|
||||
part 'auth/oauth.dart';
|
||||
part 'auth/http_basic_auth.dart';
|
||||
part 'auth/http_bearer_auth.dart';
|
||||
|
||||
part 'api/api_keys_api.dart';
|
||||
part 'api/activities_api.dart';
|
||||
part 'api/albums_api.dart';
|
||||
part 'api/assets_api.dart';
|
||||
part 'api/authentication_api.dart';
|
||||
part 'api/authentication_admin_api.dart';
|
||||
part 'api/database_backups_admin_api.dart';
|
||||
part 'api/deprecated_api.dart';
|
||||
part 'api/download_api.dart';
|
||||
part 'api/duplicates_api.dart';
|
||||
part 'api/faces_api.dart';
|
||||
part 'api/jobs_api.dart';
|
||||
part 'api/libraries_api.dart';
|
||||
part 'api/maintenance_admin_api.dart';
|
||||
part 'api/map_api.dart';
|
||||
part 'api/memories_api.dart';
|
||||
part 'api/notifications_api.dart';
|
||||
part 'api/notifications_admin_api.dart';
|
||||
part 'api/partners_api.dart';
|
||||
part 'api/people_api.dart';
|
||||
part 'api/plugins_api.dart';
|
||||
part 'api/queues_api.dart';
|
||||
part 'api/search_api.dart';
|
||||
part 'api/server_api.dart';
|
||||
part 'api/sessions_api.dart';
|
||||
part 'api/shared_links_api.dart';
|
||||
part 'api/stacks_api.dart';
|
||||
part 'api/sync_api.dart';
|
||||
part 'api/system_config_api.dart';
|
||||
part 'api/system_metadata_api.dart';
|
||||
part 'api/tags_api.dart';
|
||||
part 'api/timeline_api.dart';
|
||||
part 'api/trash_api.dart';
|
||||
part 'api/users_api.dart';
|
||||
part 'api/users_admin_api.dart';
|
||||
part 'api/views_api.dart';
|
||||
part 'api/workflows_api.dart';
|
||||
|
||||
part 'model/activity_create_dto.dart';
|
||||
part 'model/activity_response_dto.dart';
|
||||
part 'model/activity_statistics_response_dto.dart';
|
||||
@@ -55,6 +96,7 @@ part 'model/asset_bulk_upload_check_result.dart';
|
||||
part 'model/asset_copy_dto.dart';
|
||||
part 'model/asset_edit_action.dart';
|
||||
part 'model/asset_edit_action_item_dto.dart';
|
||||
part 'model/asset_edit_action_item_dto_parameters.dart';
|
||||
part 'model/asset_edit_action_item_response_dto.dart';
|
||||
part 'model/asset_edits_create_dto.dart';
|
||||
part 'model/asset_edits_response_dto.dart';
|
||||
@@ -68,7 +110,6 @@ part 'model/asset_ids_dto.dart';
|
||||
part 'model/asset_ids_response_dto.dart';
|
||||
part 'model/asset_job_name.dart';
|
||||
part 'model/asset_jobs_dto.dart';
|
||||
part 'model/asset_media_create_dto.dart';
|
||||
part 'model/asset_media_response_dto.dart';
|
||||
part 'model/asset_media_size.dart';
|
||||
part 'model/asset_media_status.dart';
|
||||
@@ -96,23 +137,21 @@ part 'model/avatar_update.dart';
|
||||
part 'model/bulk_id_error_reason.dart';
|
||||
part 'model/bulk_id_response_dto.dart';
|
||||
part 'model/bulk_ids_dto.dart';
|
||||
part 'model/clip_config.dart';
|
||||
part 'model/cq_mode.dart';
|
||||
part 'model/cast_response.dart';
|
||||
part 'model/cast_update.dart';
|
||||
part 'model/change_password_dto.dart';
|
||||
part 'model/clip_config.dart';
|
||||
part 'model/colorspace.dart';
|
||||
part 'model/contributor_count_response_dto.dart';
|
||||
part 'model/cq_mode.dart';
|
||||
part 'model/create_album_dto.dart';
|
||||
part 'model/create_library_dto.dart';
|
||||
part 'model/create_profile_image_dto.dart';
|
||||
part 'model/create_profile_image_response_dto.dart';
|
||||
part 'model/crop_parameters.dart';
|
||||
part 'model/database_backup_config.dart';
|
||||
part 'model/database_backup_delete_dto.dart';
|
||||
part 'model/database_backup_dto.dart';
|
||||
part 'model/database_backup_list_response_dto.dart';
|
||||
part 'model/database_backup_upload_dto.dart';
|
||||
part 'model/download_archive_dto.dart';
|
||||
part 'model/download_archive_info.dart';
|
||||
part 'model/download_info_dto.dart';
|
||||
@@ -137,7 +176,6 @@ part 'model/job_settings_dto.dart';
|
||||
part 'model/library_response_dto.dart';
|
||||
part 'model/library_stats_response_dto.dart';
|
||||
part 'model/license_key_dto.dart';
|
||||
part 'model/license_response_dto.dart';
|
||||
part 'model/log_level.dart';
|
||||
part 'model/login_credential_dto.dart';
|
||||
part 'model/login_response_dto.dart';
|
||||
@@ -172,7 +210,6 @@ part 'model/notification_type.dart';
|
||||
part 'model/notification_update_all_dto.dart';
|
||||
part 'model/notification_update_dto.dart';
|
||||
part 'model/o_auth_authorize_response_dto.dart';
|
||||
part 'model/o_auth_backchannel_logout_dto.dart';
|
||||
part 'model/o_auth_callback_dto.dart';
|
||||
part 'model/o_auth_config_dto.dart';
|
||||
part 'model/o_auth_token_endpoint_auth_method.dart';
|
||||
@@ -221,6 +258,9 @@ part 'model/ratings_response.dart';
|
||||
part 'model/ratings_update.dart';
|
||||
part 'model/reaction_level.dart';
|
||||
part 'model/reaction_type.dart';
|
||||
part 'model/release_channel.dart';
|
||||
part 'model/release_event_v1.dart';
|
||||
part 'model/release_type.dart';
|
||||
part 'model/reverse_geocoding_state_response_dto.dart';
|
||||
part 'model/rotate_parameters.dart';
|
||||
part 'model/search_album_response_dto.dart';
|
||||
@@ -266,7 +306,6 @@ part 'model/storage_folder.dart';
|
||||
part 'model/sync_ack_delete_dto.dart';
|
||||
part 'model/sync_ack_dto.dart';
|
||||
part 'model/sync_ack_set_dto.dart';
|
||||
part 'model/sync_ack_v1.dart';
|
||||
part 'model/sync_album_delete_v1.dart';
|
||||
part 'model/sync_album_to_asset_delete_v1.dart';
|
||||
part 'model/sync_album_to_asset_v1.dart';
|
||||
@@ -286,7 +325,6 @@ part 'model/sync_asset_metadata_v1.dart';
|
||||
part 'model/sync_asset_v1.dart';
|
||||
part 'model/sync_asset_v2.dart';
|
||||
part 'model/sync_auth_user_v1.dart';
|
||||
part 'model/sync_complete_v1.dart';
|
||||
part 'model/sync_entity_type.dart';
|
||||
part 'model/sync_memory_asset_delete_v1.dart';
|
||||
part 'model/sync_memory_asset_v1.dart';
|
||||
@@ -297,7 +335,6 @@ part 'model/sync_partner_v1.dart';
|
||||
part 'model/sync_person_delete_v1.dart';
|
||||
part 'model/sync_person_v1.dart';
|
||||
part 'model/sync_request_type.dart';
|
||||
part 'model/sync_reset_v1.dart';
|
||||
part 'model/sync_stack_delete_v1.dart';
|
||||
part 'model/sync_stack_v1.dart';
|
||||
part 'model/sync_stream_dto.dart';
|
||||
@@ -386,43 +423,18 @@ part 'model/workflow_trigger.dart';
|
||||
part 'model/workflow_trigger_response_dto.dart';
|
||||
part 'model/workflow_type.dart';
|
||||
part 'model/workflow_update_dto.dart';
|
||||
part 'api/activities_api.dart';
|
||||
part 'api/albums_api.dart';
|
||||
part 'api/api_keys_api.dart';
|
||||
part 'api/assets_api.dart';
|
||||
part 'api/authentication_admin_api.dart';
|
||||
part 'api/authentication_api.dart';
|
||||
part 'api/database_backups_admin_api.dart';
|
||||
part 'api/download_api.dart';
|
||||
part 'api/duplicates_api.dart';
|
||||
part 'api/faces_api.dart';
|
||||
part 'api/jobs_api.dart';
|
||||
part 'api/libraries_api.dart';
|
||||
part 'api/maintenance_admin_api.dart';
|
||||
part 'api/map_api.dart';
|
||||
part 'api/memories_api.dart';
|
||||
part 'api/notifications_admin_api.dart';
|
||||
part 'api/notifications_api.dart';
|
||||
part 'api/partners_api.dart';
|
||||
part 'api/people_api.dart';
|
||||
part 'api/plugins_api.dart';
|
||||
part 'api/queues_api.dart';
|
||||
part 'api/search_api.dart';
|
||||
part 'api/server_api.dart';
|
||||
part 'api/sessions_api.dart';
|
||||
part 'api/shared_links_api.dart';
|
||||
part 'api/stacks_api.dart';
|
||||
part 'api/sync_api.dart';
|
||||
part 'api/system_config_api.dart';
|
||||
part 'api/system_metadata_api.dart';
|
||||
part 'api/tags_api.dart';
|
||||
part 'api/timeline_api.dart';
|
||||
part 'api/trash_api.dart';
|
||||
part 'api/users_admin_api.dart';
|
||||
part 'api/users_api.dart';
|
||||
part 'api/views_api.dart';
|
||||
part 'api/workflows_api.dart';
|
||||
|
||||
/// The process-wide default [ApiClient]; every `XxxApi()` uses it when
|
||||
/// constructed without an explicit client.
|
||||
final defaultApiClient = ApiClient();
|
||||
|
||||
/// An [ApiClient] instance that uses the default values obtained from
|
||||
/// the OpenAPI specification file.
|
||||
var defaultApiClient = ApiClient();
|
||||
|
||||
const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'};
|
||||
const _dateEpochMarker = 'epoch';
|
||||
const _deepEquality = DeepCollectionEquality();
|
||||
final _dateFormatter = DateFormat('yyyy-MM-dd');
|
||||
final _regList = RegExp(r'^List<(.*)>$');
|
||||
final _regSet = RegExp(r'^Set<(.*)>$');
|
||||
final _regMap = RegExp(r'^Map<String,(.*)>$');
|
||||
|
||||
bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/';
|
||||
|
||||
+190
-165
@@ -1,52 +1,158 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 ActivitiesApi {
|
||||
ActivitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getActivitiesAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getActivitiesState = .stable;
|
||||
|
||||
static const ApiVersion createActivityAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createActivityState = .stable;
|
||||
|
||||
static const ApiVersion getActivityStatisticsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getActivityStatisticsState = .stable;
|
||||
|
||||
static const ApiVersion deleteActivityAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteActivityState = .stable;
|
||||
|
||||
/// List all activities
|
||||
/// Create an activity
|
||||
///
|
||||
/// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Create a like or a comment for an album, or an asset in an album.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getActivitiesWithHttpInfo({
|
||||
required String albumId,
|
||||
String? assetId,
|
||||
ReactionLevel? level,
|
||||
ReactionType? type,
|
||||
String? userId,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ActivityCreateDto] activityCreateDto (required):
|
||||
Future<Response> createActivityWithHttpInfo(ActivityCreateDto activityCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/activities';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = activityCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create an activity
|
||||
///
|
||||
/// Create a like or a comment for an album, or an asset in an album.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ActivityCreateDto] activityCreateDto (required):
|
||||
Future<ActivityResponseDto?> createActivity(ActivityCreateDto activityCreateDto,) async {
|
||||
final response = await createActivityWithHttpInfo(activityCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityResponseDto',) as ActivityResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete an activity
|
||||
///
|
||||
/// Removes a like or comment from a given album or asset in an album.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteActivityWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/activities/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'albumId', albumId));
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete an activity
|
||||
///
|
||||
/// Removes a like or comment from a given album or asset in an album.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteActivity(String id,) async {
|
||||
final response = await deleteActivityWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// List all activities
|
||||
///
|
||||
/// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// Album ID
|
||||
///
|
||||
/// * [String] assetId:
|
||||
/// Asset ID (if activity is for an asset)
|
||||
///
|
||||
/// * [ReactionLevel] level:
|
||||
///
|
||||
/// * [ReactionType] type:
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// Filter by user ID
|
||||
Future<Response> getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/activities';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'albumId', albumId));
|
||||
if (assetId != null) {
|
||||
queryParams.addAll(_queryParams('', 'assetId', assetId));
|
||||
}
|
||||
@@ -62,15 +168,15 @@ class ActivitiesApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -78,118 +184,78 @@ class ActivitiesApi {
|
||||
///
|
||||
/// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<ActivityResponseDto>> getActivities({
|
||||
required String albumId,
|
||||
String? assetId,
|
||||
ReactionLevel? level,
|
||||
ReactionType? type,
|
||||
String? userId,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getActivitiesWithHttpInfo(
|
||||
albumId: albumId,
|
||||
assetId: assetId,
|
||||
level: level,
|
||||
type: type,
|
||||
userId: userId,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// Album ID
|
||||
///
|
||||
/// * [String] assetId:
|
||||
/// Asset ID (if activity is for an asset)
|
||||
///
|
||||
/// * [ReactionLevel] level:
|
||||
///
|
||||
/// * [ReactionType] type:
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// Filter by user ID
|
||||
Future<List<ActivityResponseDto>?> getActivities(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, }) async {
|
||||
final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, level: level, type: type, userId: userId, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<ActivityResponseDto>') as List)
|
||||
.cast<ActivityResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<ActivityResponseDto>') as List)
|
||||
.cast<ActivityResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create an activity
|
||||
///
|
||||
/// Create a like or a comment for an album, or an asset in an album.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createActivityWithHttpInfo(ActivityCreateDto activityCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/activities';
|
||||
|
||||
Object? postBody = activityCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create an activity
|
||||
///
|
||||
/// Create a like or a comment for an album, or an asset in an album.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ActivityResponseDto> createActivity(ActivityCreateDto activityCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createActivityWithHttpInfo(activityCreateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ActivityResponseDto')
|
||||
as ActivityResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve activity statistics
|
||||
///
|
||||
/// Returns the number of likes and comments for a given album or asset in an album.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getActivityStatisticsWithHttpInfo({
|
||||
required String albumId,
|
||||
String? assetId,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// Album ID
|
||||
///
|
||||
/// * [String] assetId:
|
||||
/// Asset ID (if activity is for an asset)
|
||||
Future<Response> getActivityStatisticsWithHttpInfo(String albumId, { String? assetId, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/activities/statistics';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'albumId', albumId));
|
||||
queryParams.addAll(_queryParams('', 'albumId', albumId));
|
||||
if (assetId != null) {
|
||||
queryParams.addAll(_queryParams('', 'assetId', assetId));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -197,66 +263,25 @@ class ActivitiesApi {
|
||||
///
|
||||
/// Returns the number of likes and comments for a given album or asset in an album.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ActivityStatisticsResponseDto> getActivityStatistics({
|
||||
required String albumId,
|
||||
String? assetId,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getActivityStatisticsWithHttpInfo(
|
||||
albumId: albumId,
|
||||
assetId: assetId,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// Album ID
|
||||
///
|
||||
/// * [String] assetId:
|
||||
/// Asset ID (if activity is for an asset)
|
||||
Future<ActivityStatisticsResponseDto?> getActivityStatistics(String albumId, { String? assetId, }) async {
|
||||
final response = await getActivityStatisticsWithHttpInfo(albumId, assetId: assetId, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ActivityStatisticsResponseDto')
|
||||
as ActivityStatisticsResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Delete an activity
|
||||
///
|
||||
/// Removes a like or comment from a given album or asset in an album.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteActivityWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/activities/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete an activity
|
||||
///
|
||||
/// Removes a like or comment from a given album or asset in an album.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteActivity(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteActivityWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityStatisticsResponseDto',) as ActivityStatisticsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+611
-554
File diff suppressed because it is too large
Load Diff
Generated
+229
-209
@@ -1,112 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 ApiKeysApi {
|
||||
ApiKeysApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
class APIKeysApi {
|
||||
APIKeysApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getApiKeysAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getApiKeysState = .stable;
|
||||
|
||||
static const ApiVersion createApiKeyAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createApiKeyState = .stable;
|
||||
|
||||
static const ApiVersion getMyApiKeyAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getMyApiKeyState = .stable;
|
||||
|
||||
static const ApiVersion deleteApiKeyAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteApiKeyState = .stable;
|
||||
|
||||
static const ApiVersion getApiKeyAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getApiKeyState = .stable;
|
||||
|
||||
static const ApiVersion updateApiKeyAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateApiKeyState = .stable;
|
||||
|
||||
/// List all API keys
|
||||
///
|
||||
/// Retrieve all API keys of the current user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getApiKeysWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/api-keys';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all API keys
|
||||
///
|
||||
/// Retrieve all API keys of the current user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<ApiKeyResponseDto>> getApiKeys({Future<void>? abortTrigger}) async {
|
||||
final response = await getApiKeysWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<ApiKeyResponseDto>') as List)
|
||||
.cast<ApiKeyResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create an API key
|
||||
///
|
||||
/// Creates a new API key. It will be limited to the permissions specified.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createApiKeyWithHttpInfo(ApiKeyCreateDto apiKeyCreateDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ApiKeyCreateDto] apiKeyCreateDto (required):
|
||||
Future<Response> createApiKeyWithHttpInfo(ApiKeyCreateDto apiKeyCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/api-keys';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = apiKeyCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -114,29 +54,191 @@ class ApiKeysApi {
|
||||
///
|
||||
/// Creates a new API key. It will be limited to the permissions specified.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ApiKeyCreateResponseDto> createApiKey(ApiKeyCreateDto apiKeyCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createApiKeyWithHttpInfo(apiKeyCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ApiKeyCreateDto] apiKeyCreateDto (required):
|
||||
Future<ApiKeyCreateResponseDto?> createApiKey(ApiKeyCreateDto apiKeyCreateDto,) async {
|
||||
final response = await createApiKeyWithHttpInfo(apiKeyCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ApiKeyCreateResponseDto')
|
||||
as ApiKeyCreateResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyCreateResponseDto',) as ApiKeyCreateResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete an API key
|
||||
///
|
||||
/// Deletes an API key identified by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteApiKeyWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/api-keys/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete an API key
|
||||
///
|
||||
/// Deletes an API key identified by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteApiKey(String id,) async {
|
||||
final response = await deleteApiKeyWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve an API key
|
||||
///
|
||||
/// Retrieve an API key by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getApiKeyWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/api-keys/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve an API key
|
||||
///
|
||||
/// Retrieve an API key by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<ApiKeyResponseDto?> getApiKey(String id,) async {
|
||||
final response = await getApiKeyWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// List all API keys
|
||||
///
|
||||
/// Retrieve all API keys of the current user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getApiKeysWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/api-keys';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all API keys
|
||||
///
|
||||
/// Retrieve all API keys of the current user.
|
||||
Future<List<ApiKeyResponseDto>?> getApiKeys() async {
|
||||
final response = await getApiKeysWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<ApiKeyResponseDto>') as List)
|
||||
.cast<ApiKeyResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve the current API key
|
||||
///
|
||||
/// Retrieve the API key that is used to access this endpoint.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getMyApiKeyWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getMyApiKeyWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/api-keys/me';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -145,155 +247,70 @@ class ApiKeysApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve the current API key
|
||||
///
|
||||
/// Retrieve the API key that is used to access this endpoint.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ApiKeyResponseDto> getMyApiKey({Future<void>? abortTrigger}) async {
|
||||
final response = await getMyApiKeyWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<ApiKeyResponseDto?> getMyApiKey() async {
|
||||
final response = await getMyApiKeyWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ApiKeyResponseDto')
|
||||
as ApiKeyResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Delete an API key
|
||||
///
|
||||
/// Deletes an API key identified by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteApiKeyWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/api-keys/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete an API key
|
||||
///
|
||||
/// Deletes an API key identified by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteApiKey(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteApiKeyWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve an API key
|
||||
///
|
||||
/// Retrieve an API key by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getApiKeyWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/api-keys/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve an API key
|
||||
///
|
||||
/// Retrieve an API key by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ApiKeyResponseDto> getApiKey(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getApiKeyWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ApiKeyResponseDto')
|
||||
as ApiKeyResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update an API key
|
||||
///
|
||||
/// Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateApiKeyWithHttpInfo(
|
||||
String id,
|
||||
ApiKeyUpdateDto apiKeyUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/api-keys/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [ApiKeyUpdateDto] apiKeyUpdateDto (required):
|
||||
Future<Response> updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/api-keys/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = apiKeyUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -301,20 +318,23 @@ class ApiKeysApi {
|
||||
///
|
||||
/// Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ApiKeyResponseDto> updateApiKey(
|
||||
String id,
|
||||
ApiKeyUpdateDto apiKeyUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [ApiKeyUpdateDto] apiKeyUpdateDto (required):
|
||||
Future<ApiKeyResponseDto?> updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto,) async {
|
||||
final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ApiKeyResponseDto')
|
||||
as ApiKeyResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1291
-1143
File diff suppressed because it is too large
Load Diff
+16
-13
@@ -1,26 +1,31 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 AuthenticationAdminApi {
|
||||
AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion unlinkAllOAuthAccountsAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState unlinkAllOAuthAccountsAdminState = .stable;
|
||||
|
||||
/// Unlink all OAuth accounts
|
||||
///
|
||||
/// Unlinks all OAuth accounts associated with user accounts in the system.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> unlinkAllOAuthAccountsAdminWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> unlinkAllOAuthAccountsAdminWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/auth/unlink-all';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -29,25 +34,23 @@ class AuthenticationAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Unlink all OAuth accounts
|
||||
///
|
||||
/// Unlinks all OAuth accounts associated with user accounts in the system.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> unlinkAllOAuthAccountsAdmin({Future<void>? abortTrigger}) async {
|
||||
final response = await unlinkAllOAuthAccountsAdminWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<void> unlinkAllOAuthAccountsAdmin() async {
|
||||
final response = await unlinkAllOAuthAccountsAdminWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
+632
-613
File diff suppressed because it is too large
Load Diff
+117
-108
@@ -1,62 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 DatabaseBackupsAdminApi {
|
||||
DatabaseBackupsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deleteDatabaseBackupAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState deleteDatabaseBackupState = .alpha;
|
||||
|
||||
static const ApiVersion listDatabaseBackupsAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState listDatabaseBackupsState = .alpha;
|
||||
|
||||
static const ApiVersion startDatabaseRestoreFlowAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState startDatabaseRestoreFlowState = .alpha;
|
||||
|
||||
static const ApiVersion uploadDatabaseBackupAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState uploadDatabaseBackupState = .alpha;
|
||||
|
||||
static const ApiVersion downloadDatabaseBackupAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState downloadDatabaseBackupState = .alpha;
|
||||
|
||||
/// Delete database backup
|
||||
///
|
||||
/// Delete a backup by its filename
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteDatabaseBackupWithHttpInfo(
|
||||
DatabaseBackupDeleteDto databaseBackupDeleteDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required):
|
||||
Future<Response> deleteDatabaseBackupWithHttpInfo(DatabaseBackupDeleteDto databaseBackupDeleteDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/database-backups';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = databaseBackupDeleteDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,27 +54,83 @@ class DatabaseBackupsAdminApi {
|
||||
///
|
||||
/// Delete a backup by its filename
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<void> deleteDatabaseBackup(
|
||||
DatabaseBackupDeleteDto databaseBackupDeleteDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await deleteDatabaseBackupWithHttpInfo(databaseBackupDeleteDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required):
|
||||
Future<void> deleteDatabaseBackup(DatabaseBackupDeleteDto databaseBackupDeleteDto,) async {
|
||||
final response = await deleteDatabaseBackupWithHttpInfo(databaseBackupDeleteDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Download database backup
|
||||
///
|
||||
/// Downloads the database backup file
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] filename (required):
|
||||
Future<Response> downloadDatabaseBackupWithHttpInfo(String filename,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/database-backups/{filename}'
|
||||
.replaceAll('{filename}', filename);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Download database backup
|
||||
///
|
||||
/// Downloads the database backup file
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] filename (required):
|
||||
Future<MultipartFile?> downloadDatabaseBackup(String filename,) async {
|
||||
final response = await downloadDatabaseBackupWithHttpInfo(filename,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// List database backups
|
||||
///
|
||||
/// Get the list of the successful and failed backups
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> listDatabaseBackupsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> listDatabaseBackupsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/database-backups';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -93,45 +139,46 @@ class DatabaseBackupsAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// List database backups
|
||||
///
|
||||
/// Get the list of the successful and failed backups
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<DatabaseBackupListResponseDto> listDatabaseBackups({Future<void>? abortTrigger}) async {
|
||||
final response = await listDatabaseBackupsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<DatabaseBackupListResponseDto?> listDatabaseBackups() async {
|
||||
final response = await listDatabaseBackupsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'DatabaseBackupListResponseDto')
|
||||
as DatabaseBackupListResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DatabaseBackupListResponseDto',) as DatabaseBackupListResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Start database backup restore flow
|
||||
///
|
||||
/// Put Immich into maintenance mode to restore a backup (Immich must not be configured)
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> startDatabaseRestoreFlowWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> startDatabaseRestoreFlowWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/database-backups/start-restore';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -140,25 +187,23 @@ class DatabaseBackupsAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Start database backup restore flow
|
||||
///
|
||||
/// Put Immich into maintenance mode to restore a backup (Immich must not be configured)
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<void> startDatabaseRestoreFlow({Future<void>? abortTrigger}) async {
|
||||
final response = await startDatabaseRestoreFlowWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<void> startDatabaseRestoreFlow() async {
|
||||
final response = await startDatabaseRestoreFlowWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -168,19 +213,24 @@ class DatabaseBackupsAdminApi {
|
||||
///
|
||||
/// Uploads .sql/.sql.gz file to restore backup from
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> uploadDatabaseBackupWithHttpInfo({MultipartFile? file, Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MultipartFile] file:
|
||||
/// Database backup file
|
||||
Future<Response> uploadDatabaseBackupWithHttpInfo({ MultipartFile? file, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/database-backups/upload';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'multipart/form-data'];
|
||||
const contentTypes = <String>['multipart/form-data'];
|
||||
|
||||
bool hasFields = false;
|
||||
final mp = MultipartRequest('POST', Uri.parse(apiPath));
|
||||
@@ -195,13 +245,12 @@ class DatabaseBackupsAdminApi {
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -209,54 +258,14 @@ class DatabaseBackupsAdminApi {
|
||||
///
|
||||
/// Uploads .sql/.sql.gz file to restore backup from
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<void> uploadDatabaseBackup({MultipartFile? file, Future<void>? abortTrigger}) async {
|
||||
final response = await uploadDatabaseBackupWithHttpInfo(file: file, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MultipartFile] file:
|
||||
/// Database backup file
|
||||
Future<void> uploadDatabaseBackup({ MultipartFile? file, }) async {
|
||||
final response = await uploadDatabaseBackupWithHttpInfo( file: file, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Download database backup
|
||||
///
|
||||
/// Downloads the database backup file
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> downloadDatabaseBackupWithHttpInfo(String filename, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/database-backups/{filename}'.replaceAll('{filename}', filename);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Download database backup
|
||||
///
|
||||
/// Downloads the database backup file
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<Uint8List> downloadDatabaseBackup(String filename, {Future<void>? abortTrigger}) async {
|
||||
final response = await downloadDatabaseBackupWithHttpInfo(filename, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
return response.bodyBytes;
|
||||
}
|
||||
}
|
||||
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 DeprecatedApi {
|
||||
DeprecatedApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Create a partner
|
||||
///
|
||||
/// Create a new partner to share assets with.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> createPartnerDeprecatedWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/partners/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a partner
|
||||
///
|
||||
/// Create a new partner to share assets with.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<PartnerResponseDto?> createPartnerDeprecated(String id,) async {
|
||||
final response = await createPartnerDeprecatedWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve queue counts and status
|
||||
///
|
||||
/// Retrieve the counts of the current queue, as well as the current status.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getQueuesLegacyWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/jobs';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve queue counts and status
|
||||
///
|
||||
/// Retrieve the counts of the current queue, as well as the current status.
|
||||
Future<QueuesResponseLegacyDto?> getQueuesLegacy() async {
|
||||
final response = await getQueuesLegacyWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Run jobs
|
||||
///
|
||||
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueCommandDto] queueCommandDto (required):
|
||||
Future<Response> runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/jobs/{name}'
|
||||
.replaceAll('{name}', name.toString());
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = queueCommandDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Run jobs
|
||||
///
|
||||
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueCommandDto] queueCommandDto (required):
|
||||
Future<QueueResponseLegacyDto?> runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto,) async {
|
||||
final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Generated
+71
-62
@@ -1,35 +1,39 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 DownloadApi {
|
||||
DownloadApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion downloadArchiveAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState downloadArchiveState = .stable;
|
||||
|
||||
static const ApiVersion getDownloadInfoAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getDownloadInfoState = .stable;
|
||||
|
||||
/// Download asset archive
|
||||
///
|
||||
/// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the "getDownloadInfo" endpoint.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> downloadArchiveWithHttpInfo(
|
||||
DownloadArchiveDto downloadArchiveDto, {
|
||||
String? key,
|
||||
String? slug,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DownloadArchiveDto] downloadArchiveDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<Response> downloadArchiveWithHttpInfo(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/download/archive';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = downloadArchiveDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -43,58 +47,64 @@ class DownloadApi {
|
||||
queryParams.addAll(_queryParams('', 'slug', slug));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Download asset archive
|
||||
///
|
||||
/// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the "getDownloadInfo" endpoint.
|
||||
/// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<Uint8List> downloadArchive(
|
||||
DownloadArchiveDto downloadArchiveDto, {
|
||||
String? key,
|
||||
String? slug,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await downloadArchiveWithHttpInfo(
|
||||
downloadArchiveDto,
|
||||
key: key,
|
||||
slug: slug,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DownloadArchiveDto] downloadArchiveDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<MultipartFile?> downloadArchive(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, }) async {
|
||||
final response = await downloadArchiveWithHttpInfo(downloadArchiveDto, key: key, slug: slug, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
return response.bodyBytes;
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve download information
|
||||
///
|
||||
/// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getDownloadInfoWithHttpInfo(
|
||||
DownloadInfoDto downloadInfoDto, {
|
||||
String? key,
|
||||
String? slug,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DownloadInfoDto] downloadInfoDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<Response> getDownloadInfoWithHttpInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/download/info';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = downloadInfoDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -108,17 +118,17 @@ class DownloadApi {
|
||||
queryParams.addAll(_queryParams('', 'slug', slug));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -126,26 +136,25 @@ class DownloadApi {
|
||||
///
|
||||
/// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<DownloadResponseDto> getDownloadInfo(
|
||||
DownloadInfoDto downloadInfoDto, {
|
||||
String? key,
|
||||
String? slug,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getDownloadInfoWithHttpInfo(
|
||||
downloadInfoDto,
|
||||
key: key,
|
||||
slug: slug,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DownloadInfoDto] downloadInfoDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<DownloadResponseDto?> getDownloadInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, }) async {
|
||||
final response = await getDownloadInfoWithHttpInfo(downloadInfoDto, key: key, slug: slug, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'DownloadResponseDto')
|
||||
as DownloadResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DownloadResponseDto',) as DownloadResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+104
-92
@@ -1,55 +1,101 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 DuplicatesApi {
|
||||
DuplicatesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deleteDuplicatesAddedIn = .new(1, 0, 0);
|
||||
/// Dismiss a duplicate group
|
||||
///
|
||||
/// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteDuplicateWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/duplicates/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
static const ApiState deleteDuplicatesState = .stable;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
static const ApiVersion getAssetDuplicatesAddedIn = .new(1, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState getAssetDuplicatesState = .stable;
|
||||
const contentTypes = <String>[];
|
||||
|
||||
static const ApiVersion resolveDuplicatesAddedIn = .new(3, 0, 0);
|
||||
|
||||
static const ApiState resolveDuplicatesState = .alpha;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion deleteDuplicateAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteDuplicateState = .stable;
|
||||
/// Dismiss a duplicate group
|
||||
///
|
||||
/// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteDuplicate(String id,) async {
|
||||
final response = await deleteDuplicateWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete duplicates
|
||||
///
|
||||
/// Delete multiple duplicate assets specified by their IDs.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteDuplicatesWithHttpInfo(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> deleteDuplicatesWithHttpInfo(BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/duplicates';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,9 +103,11 @@ class DuplicatesApi {
|
||||
///
|
||||
/// Delete multiple duplicate assets specified by their IDs.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteDuplicates(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteDuplicatesWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<void> deleteDuplicates(BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await deleteDuplicatesWithHttpInfo(bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -69,12 +117,12 @@ class DuplicatesApi {
|
||||
///
|
||||
/// Retrieve a list of duplicate assets available to the authenticated user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAssetDuplicatesWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getAssetDuplicatesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/duplicates';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -83,67 +131,70 @@ class DuplicatesApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve duplicates
|
||||
///
|
||||
/// Retrieve a list of duplicate assets available to the authenticated user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<DuplicateResponseDto>> getAssetDuplicates({Future<void>? abortTrigger}) async {
|
||||
final response = await getAssetDuplicatesWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<List<DuplicateResponseDto>?> getAssetDuplicates() async {
|
||||
final response = await getAssetDuplicatesWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<DuplicateResponseDto>') as List)
|
||||
.cast<DuplicateResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<DuplicateResponseDto>') as List)
|
||||
.cast<DuplicateResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Resolve duplicate groups
|
||||
///
|
||||
/// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> resolveDuplicatesWithHttpInfo(
|
||||
DuplicateResolveDto duplicateResolveDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DuplicateResolveDto] duplicateResolveDto (required):
|
||||
Future<Response> resolveDuplicatesWithHttpInfo(DuplicateResolveDto duplicateResolveDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/duplicates/resolve';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = duplicateResolveDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -151,63 +202,24 @@ class DuplicatesApi {
|
||||
///
|
||||
/// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<List<BulkIdResponseDto>> resolveDuplicates(
|
||||
DuplicateResolveDto duplicateResolveDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await resolveDuplicatesWithHttpInfo(duplicateResolveDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DuplicateResolveDto] duplicateResolveDto (required):
|
||||
Future<List<BulkIdResponseDto>?> resolveDuplicates(DuplicateResolveDto duplicateResolveDto,) async {
|
||||
final response = await resolveDuplicatesWithHttpInfo(duplicateResolveDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Dismiss a duplicate group
|
||||
///
|
||||
/// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteDuplicateWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/duplicates/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Dismiss a duplicate group
|
||||
///
|
||||
/// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteDuplicate(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteDuplicateWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+135
-103
@@ -1,106 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 FacesApi {
|
||||
FacesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getFacesAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getFacesState = .stable;
|
||||
|
||||
static const ApiVersion createFaceAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createFaceState = .stable;
|
||||
|
||||
static const ApiVersion deleteFaceAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteFaceState = .stable;
|
||||
|
||||
static const ApiVersion reassignFacesByIdAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState reassignFacesByIdState = .stable;
|
||||
|
||||
/// Retrieve faces for asset
|
||||
///
|
||||
/// Retrieve all faces belonging to an asset.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getFacesWithHttpInfo({required String id, Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/faces';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve faces for asset
|
||||
///
|
||||
/// Retrieve all faces belonging to an asset.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<AssetFaceResponseDto>> getFaces({required String id, Future<void>? abortTrigger}) async {
|
||||
final response = await getFacesWithHttpInfo(id: id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<AssetFaceResponseDto>') as List)
|
||||
.cast<AssetFaceResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a face
|
||||
///
|
||||
/// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AssetFaceCreateDto] assetFaceCreateDto (required):
|
||||
Future<Response> createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/faces';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = assetFaceCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -108,9 +54,11 @@ class FacesApi {
|
||||
///
|
||||
/// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> createFace(AssetFaceCreateDto assetFaceCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createFaceWithHttpInfo(assetFaceCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AssetFaceCreateDto] assetFaceCreateDto (required):
|
||||
Future<void> createFace(AssetFaceCreateDto assetFaceCreateDto,) async {
|
||||
final response = await createFaceWithHttpInfo(assetFaceCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -120,33 +68,36 @@ class FacesApi {
|
||||
///
|
||||
/// Delete a face identified by the id. Optionally can be force deleted.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteFaceWithHttpInfo(
|
||||
String id,
|
||||
AssetFaceDeleteDto assetFaceDeleteDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/faces/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetFaceDeleteDto] assetFaceDeleteDto (required):
|
||||
Future<Response> deleteFaceWithHttpInfo(String id, AssetFaceDeleteDto assetFaceDeleteDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/faces/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = assetFaceDeleteDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -154,41 +105,115 @@ class FacesApi {
|
||||
///
|
||||
/// Delete a face identified by the id. Optionally can be force deleted.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetFaceDeleteDto] assetFaceDeleteDto (required):
|
||||
Future<void> deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto,) async {
|
||||
final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve faces for asset
|
||||
///
|
||||
/// Retrieve all faces belonging to an asset.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
/// Face ID
|
||||
Future<Response> getFacesWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/faces';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve faces for asset
|
||||
///
|
||||
/// Retrieve all faces belonging to an asset.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
/// Face ID
|
||||
Future<List<AssetFaceResponseDto>?> getFaces(String id,) async {
|
||||
final response = await getFacesWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AssetFaceResponseDto>') as List)
|
||||
.cast<AssetFaceResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Re-assign a face to another person
|
||||
///
|
||||
/// Re-assign the face provided in the body to the person identified by the id in the path parameter.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> reassignFacesByIdWithHttpInfo(String id, FaceDto faceDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/faces/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [FaceDto] faceDto (required):
|
||||
Future<Response> reassignFacesByIdWithHttpInfo(String id, FaceDto faceDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/faces/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = faceDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -196,16 +221,23 @@ class FacesApi {
|
||||
///
|
||||
/// Re-assign the face provided in the body to the person identified by the id in the path parameter.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PersonResponseDto> reassignFacesById(String id, FaceDto faceDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await reassignFacesByIdWithHttpInfo(id, faceDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [FaceDto] faceDto (required):
|
||||
Future<PersonResponseDto?> reassignFacesById(String id, FaceDto faceDto,) async {
|
||||
final response = await reassignFacesByIdWithHttpInfo(id, faceDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PersonResponseDto')
|
||||
as PersonResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+90
-88
@@ -1,39 +1,79 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 JobsApi {
|
||||
JobsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getQueuesLegacyAddedIn = .new(1, 0, 0);
|
||||
/// Create a manual job
|
||||
///
|
||||
/// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [JobCreateDto] jobCreateDto (required):
|
||||
Future<Response> createJobWithHttpInfo(JobCreateDto jobCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/jobs';
|
||||
|
||||
static const ApiVersion getQueuesLegacyDeprecatedIn = .new(2, 4, 0);
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = jobCreateDto;
|
||||
|
||||
static const ApiState getQueuesLegacyState = .deprecated;
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiVersion createJobAddedIn = .new(1, 0, 0);
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
static const ApiState createJobState = .stable;
|
||||
|
||||
static const ApiVersion runQueueCommandLegacyAddedIn = .new(1, 0, 0);
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion runQueueCommandLegacyDeprecatedIn = .new(2, 4, 0);
|
||||
|
||||
static const ApiState runQueueCommandLegacyState = .deprecated;
|
||||
/// Create a manual job
|
||||
///
|
||||
/// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [JobCreateDto] jobCreateDto (required):
|
||||
Future<void> createJob(JobCreateDto jobCreateDto,) async {
|
||||
final response = await createJobWithHttpInfo(jobCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve queue counts and status
|
||||
///
|
||||
/// Retrieve the counts of the current queue, as well as the current status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@Deprecated('Deprecated by the Immich server API since v2.4.0.')
|
||||
Future<Response> getQueuesLegacyWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getQueuesLegacyWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/jobs';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -42,110 +82,70 @@ class JobsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve queue counts and status
|
||||
///
|
||||
/// Retrieve the counts of the current queue, as well as the current status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
@Deprecated('Deprecated by the Immich server API since v2.4.0.')
|
||||
Future<QueuesResponseLegacyDto> getQueuesLegacy({Future<void>? abortTrigger}) async {
|
||||
final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<QueuesResponseLegacyDto?> getQueuesLegacy() async {
|
||||
final response = await getQueuesLegacyWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'QueuesResponseLegacyDto')
|
||||
as QueuesResponseLegacyDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a manual job
|
||||
///
|
||||
/// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createJobWithHttpInfo(JobCreateDto jobCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/jobs';
|
||||
|
||||
Object? postBody = jobCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a manual job
|
||||
///
|
||||
/// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> createJob(JobCreateDto jobCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createJobWithHttpInfo(jobCreateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Run jobs
|
||||
///
|
||||
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@Deprecated('Deprecated by the Immich server API since v2.4.0.')
|
||||
Future<Response> runQueueCommandLegacyWithHttpInfo(
|
||||
QueueName name,
|
||||
QueueCommandDto queueCommandDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/jobs/{name}'.replaceAll('{name}', parameterToString(name));
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueCommandDto] queueCommandDto (required):
|
||||
Future<Response> runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/jobs/{name}'
|
||||
.replaceAll('{name}', name.toString());
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = queueCommandDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -153,21 +153,23 @@ class JobsApi {
|
||||
///
|
||||
/// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
@Deprecated('Deprecated by the Immich server API since v2.4.0.')
|
||||
Future<QueueResponseLegacyDto> runQueueCommandLegacy(
|
||||
QueueName name,
|
||||
QueueCommandDto queueCommandDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueCommandDto] queueCommandDto (required):
|
||||
Future<QueueResponseLegacyDto?> runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto,) async {
|
||||
final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'QueueResponseLegacyDto')
|
||||
as QueueResponseLegacyDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+281
-247
@@ -1,120 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 LibrariesApi {
|
||||
LibrariesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getAllLibrariesAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getAllLibrariesState = .stable;
|
||||
|
||||
static const ApiVersion createLibraryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createLibraryState = .stable;
|
||||
|
||||
static const ApiVersion deleteLibraryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteLibraryState = .stable;
|
||||
|
||||
static const ApiVersion getLibraryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getLibraryState = .stable;
|
||||
|
||||
static const ApiVersion updateLibraryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateLibraryState = .stable;
|
||||
|
||||
static const ApiVersion scanLibraryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState scanLibraryState = .stable;
|
||||
|
||||
static const ApiVersion getLibraryStatisticsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getLibraryStatisticsState = .stable;
|
||||
|
||||
static const ApiVersion validateAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState validateState = .stable;
|
||||
|
||||
/// Retrieve libraries
|
||||
///
|
||||
/// Retrieve a list of external libraries.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAllLibrariesWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/libraries';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve libraries
|
||||
///
|
||||
/// Retrieve a list of external libraries.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<LibraryResponseDto>> getAllLibraries({Future<void>? abortTrigger}) async {
|
||||
final response = await getAllLibrariesWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<LibraryResponseDto>') as List)
|
||||
.cast<LibraryResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a library
|
||||
///
|
||||
/// Create a new external library.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createLibraryWithHttpInfo(CreateLibraryDto createLibraryDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [CreateLibraryDto] createLibraryDto (required):
|
||||
Future<Response> createLibraryWithHttpInfo(CreateLibraryDto createLibraryDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = createLibraryDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -122,29 +54,39 @@ class LibrariesApi {
|
||||
///
|
||||
/// Create a new external library.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<LibraryResponseDto> createLibrary(CreateLibraryDto createLibraryDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createLibraryWithHttpInfo(createLibraryDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [CreateLibraryDto] createLibraryDto (required):
|
||||
Future<LibraryResponseDto?> createLibrary(CreateLibraryDto createLibraryDto,) async {
|
||||
final response = await createLibraryWithHttpInfo(createLibraryDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'LibraryResponseDto')
|
||||
as LibraryResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete a library
|
||||
///
|
||||
/// Delete an external library by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteLibraryWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/libraries/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteLibraryWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -153,15 +95,15 @@ class LibrariesApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -169,24 +111,26 @@ class LibrariesApi {
|
||||
///
|
||||
/// Delete an external library by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteLibrary(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteLibraryWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteLibrary(String id,) async {
|
||||
final response = await deleteLibraryWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a library
|
||||
/// Retrieve libraries
|
||||
///
|
||||
/// Retrieve an external library by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Retrieve a list of external libraries.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getLibraryWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/libraries/{id}'.replaceAll('{id}', id);
|
||||
Future<Response> getAllLibrariesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -195,15 +139,71 @@ class LibrariesApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve libraries
|
||||
///
|
||||
/// Retrieve a list of external libraries.
|
||||
Future<List<LibraryResponseDto>?> getAllLibraries() async {
|
||||
final response = await getAllLibrariesWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<LibraryResponseDto>') as List)
|
||||
.cast<LibraryResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve a library
|
||||
///
|
||||
/// Retrieve an external library by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getLibraryWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -211,50 +211,164 @@ class LibrariesApi {
|
||||
///
|
||||
/// Retrieve an external library by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<LibraryResponseDto> getLibrary(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getLibraryWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<LibraryResponseDto?> getLibrary(String id,) async {
|
||||
final response = await getLibraryWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'LibraryResponseDto')
|
||||
as LibraryResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve library statistics
|
||||
///
|
||||
/// Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getLibraryStatisticsWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries/{id}/statistics'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve library statistics
|
||||
///
|
||||
/// Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<LibraryStatsResponseDto?> getLibraryStatistics(String id,) async {
|
||||
final response = await getLibraryStatisticsWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryStatsResponseDto',) as LibraryStatsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Scan a library
|
||||
///
|
||||
/// Queue a scan for the external library to find and import new assets.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> scanLibraryWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries/{id}/scan'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Scan a library
|
||||
///
|
||||
/// Queue a scan for the external library to find and import new assets.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> scanLibrary(String id,) async {
|
||||
final response = await scanLibraryWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Update a library
|
||||
///
|
||||
/// Update an existing external library.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateLibraryWithHttpInfo(
|
||||
String id,
|
||||
UpdateLibraryDto updateLibraryDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/libraries/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UpdateLibraryDto] updateLibraryDto (required):
|
||||
Future<Response> updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = updateLibraryDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -262,143 +376,60 @@ class LibrariesApi {
|
||||
///
|
||||
/// Update an existing external library.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<LibraryResponseDto> updateLibrary(
|
||||
String id,
|
||||
UpdateLibraryDto updateLibraryDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UpdateLibraryDto] updateLibraryDto (required):
|
||||
Future<LibraryResponseDto?> updateLibrary(String id, UpdateLibraryDto updateLibraryDto,) async {
|
||||
final response = await updateLibraryWithHttpInfo(id, updateLibraryDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'LibraryResponseDto')
|
||||
as LibraryResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Scan a library
|
||||
///
|
||||
/// Queue a scan for the external library to find and import new assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> scanLibraryWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/libraries/{id}/scan'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Scan a library
|
||||
///
|
||||
/// Queue a scan for the external library to find and import new assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> scanLibrary(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await scanLibraryWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve library statistics
|
||||
///
|
||||
/// Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getLibraryStatisticsWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/libraries/{id}/statistics'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve library statistics
|
||||
///
|
||||
/// Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<LibraryStatsResponseDto> getLibraryStatistics(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getLibraryStatisticsWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'LibraryStatsResponseDto')
|
||||
as LibraryStatsResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Validate library settings
|
||||
///
|
||||
/// Validate the settings of an external library.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> validateWithHttpInfo(
|
||||
String id,
|
||||
ValidateLibraryDto validateLibraryDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/libraries/{id}/validate'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [ValidateLibraryDto] validateLibraryDto (required):
|
||||
Future<Response> validateWithHttpInfo(String id, ValidateLibraryDto validateLibraryDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/libraries/{id}/validate'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = validateLibraryDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -406,20 +437,23 @@ class LibrariesApi {
|
||||
///
|
||||
/// Validate the settings of an external library.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ValidateLibraryResponseDto> validate(
|
||||
String id,
|
||||
ValidateLibraryDto validateLibraryDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await validateWithHttpInfo(id, validateLibraryDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [ValidateLibraryDto] validateLibraryDto (required):
|
||||
Future<ValidateLibraryResponseDto?> validate(String id, ValidateLibraryDto validateLibraryDto,) async {
|
||||
final response = await validateWithHttpInfo(id, validateLibraryDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ValidateLibraryResponseDto')
|
||||
as ValidateLibraryResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValidateLibraryResponseDto',) as ValidateLibraryResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+112
-111
@@ -1,83 +1,31 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 MaintenanceAdminApi {
|
||||
MaintenanceAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion setMaintenanceModeAddedIn = .new(2, 3, 0);
|
||||
|
||||
static const ApiState setMaintenanceModeState = .alpha;
|
||||
|
||||
static const ApiVersion detectPriorInstallAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState detectPriorInstallState = .alpha;
|
||||
|
||||
static const ApiVersion maintenanceLoginAddedIn = .new(2, 3, 0);
|
||||
|
||||
static const ApiState maintenanceLoginState = .alpha;
|
||||
|
||||
static const ApiVersion getMaintenanceStatusAddedIn = .new(2, 5, 0);
|
||||
|
||||
static const ApiState getMaintenanceStatusState = .alpha;
|
||||
|
||||
/// Set maintenance mode
|
||||
///
|
||||
/// Put Immich into or take it out of maintenance mode
|
||||
///
|
||||
/// Available since server v2.3.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> setMaintenanceModeWithHttpInfo(
|
||||
SetMaintenanceModeDto setMaintenanceModeDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/admin/maintenance';
|
||||
|
||||
Object? postBody = setMaintenanceModeDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Set maintenance mode
|
||||
///
|
||||
/// Put Immich into or take it out of maintenance mode
|
||||
///
|
||||
/// Available since server v2.3.0.
|
||||
Future<void> setMaintenanceMode(SetMaintenanceModeDto setMaintenanceModeDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await setMaintenanceModeWithHttpInfo(setMaintenanceModeDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Detect existing install
|
||||
///
|
||||
/// Collect integrity checks and other heuristics about local data.
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> detectPriorInstallWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> detectPriorInstallWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/maintenance/detect-install';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -86,65 +34,115 @@ class MaintenanceAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Detect existing install
|
||||
///
|
||||
/// Collect integrity checks and other heuristics about local data.
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<MaintenanceDetectInstallResponseDto> detectPriorInstall({Future<void>? abortTrigger}) async {
|
||||
final response = await detectPriorInstallWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<MaintenanceDetectInstallResponseDto?> detectPriorInstall() async {
|
||||
final response = await detectPriorInstallWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MaintenanceDetectInstallResponseDto')
|
||||
as MaintenanceDetectInstallResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceDetectInstallResponseDto',) as MaintenanceDetectInstallResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get maintenance mode status
|
||||
///
|
||||
/// Fetch information about the currently running maintenance action.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getMaintenanceStatusWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/maintenance/status';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get maintenance mode status
|
||||
///
|
||||
/// Fetch information about the currently running maintenance action.
|
||||
Future<MaintenanceStatusResponseDto?> getMaintenanceStatus() async {
|
||||
final response = await getMaintenanceStatusWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceStatusResponseDto',) as MaintenanceStatusResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Log into maintenance mode
|
||||
///
|
||||
/// Login with maintenance token or cookie to receive current information and perform further actions.
|
||||
///
|
||||
/// Available since server v2.3.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> maintenanceLoginWithHttpInfo(
|
||||
MaintenanceLoginDto maintenanceLoginDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MaintenanceLoginDto] maintenanceLoginDto (required):
|
||||
Future<Response> maintenanceLoginWithHttpInfo(MaintenanceLoginDto maintenanceLoginDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/maintenance/login';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = maintenanceLoginDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -152,66 +150,69 @@ class MaintenanceAdminApi {
|
||||
///
|
||||
/// Login with maintenance token or cookie to receive current information and perform further actions.
|
||||
///
|
||||
/// Available since server v2.3.0.
|
||||
Future<MaintenanceAuthDto> maintenanceLogin(
|
||||
MaintenanceLoginDto maintenanceLoginDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await maintenanceLoginWithHttpInfo(maintenanceLoginDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MaintenanceLoginDto] maintenanceLoginDto (required):
|
||||
Future<MaintenanceAuthDto?> maintenanceLogin(MaintenanceLoginDto maintenanceLoginDto,) async {
|
||||
final response = await maintenanceLoginWithHttpInfo(maintenanceLoginDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MaintenanceAuthDto')
|
||||
as MaintenanceAuthDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceAuthDto',) as MaintenanceAuthDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get maintenance mode status
|
||||
/// Set maintenance mode
|
||||
///
|
||||
/// Fetch information about the currently running maintenance action.
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
/// Put Immich into or take it out of maintenance mode
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getMaintenanceStatusWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/maintenance/status';
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SetMaintenanceModeDto] setMaintenanceModeDto (required):
|
||||
Future<Response> setMaintenanceModeWithHttpInfo(SetMaintenanceModeDto setMaintenanceModeDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/maintenance';
|
||||
|
||||
Object? postBody;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = setMaintenanceModeDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get maintenance mode status
|
||||
/// Set maintenance mode
|
||||
///
|
||||
/// Fetch information about the currently running maintenance action.
|
||||
/// Put Immich into or take it out of maintenance mode
|
||||
///
|
||||
/// Available since server v2.5.0.
|
||||
Future<MaintenanceStatusResponseDto> getMaintenanceStatus({Future<void>? abortTrigger}) async {
|
||||
final response = await getMaintenanceStatusWithHttpInfo(abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SetMaintenanceModeDto] setMaintenanceModeDto (required):
|
||||
Future<void> setMaintenanceMode(SetMaintenanceModeDto setMaintenanceModeDto,) async {
|
||||
final response = await setMaintenanceModeWithHttpInfo(setMaintenanceModeDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MaintenanceStatusResponseDto')
|
||||
as MaintenanceStatusResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+95
-66
@@ -1,38 +1,51 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 MapApi {
|
||||
MapApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getMapMarkersAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getMapMarkersState = .stable;
|
||||
|
||||
static const ApiVersion reverseGeocodeAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState reverseGeocodeState = .stable;
|
||||
|
||||
/// Retrieve map markers
|
||||
///
|
||||
/// Retrieve a list of latitude and longitude coordinates for every asset with location data.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getMapMarkersWithHttpInfo({
|
||||
DateTime? fileCreatedAfter,
|
||||
DateTime? fileCreatedBefore,
|
||||
bool? isArchived,
|
||||
bool? isFavorite,
|
||||
bool? withPartners,
|
||||
bool? withSharedAlbums,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DateTime] fileCreatedAfter:
|
||||
/// Filter assets created after this date
|
||||
///
|
||||
/// * [DateTime] fileCreatedBefore:
|
||||
/// Filter assets created before this date
|
||||
///
|
||||
/// * [bool] isArchived:
|
||||
/// Filter by archived status
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status
|
||||
///
|
||||
/// * [bool] withPartners:
|
||||
/// Include partner assets
|
||||
///
|
||||
/// * [bool] withSharedAlbums:
|
||||
/// Include shared album assets
|
||||
Future<Response> getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/map/markers';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -60,15 +73,15 @@ class MapApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -76,71 +89,81 @@ class MapApi {
|
||||
///
|
||||
/// Retrieve a list of latitude and longitude coordinates for every asset with location data.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<MapMarkerResponseDto>> getMapMarkers({
|
||||
DateTime? fileCreatedAfter,
|
||||
DateTime? fileCreatedBefore,
|
||||
bool? isArchived,
|
||||
bool? isFavorite,
|
||||
bool? withPartners,
|
||||
bool? withSharedAlbums,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getMapMarkersWithHttpInfo(
|
||||
fileCreatedAfter: fileCreatedAfter,
|
||||
fileCreatedBefore: fileCreatedBefore,
|
||||
isArchived: isArchived,
|
||||
isFavorite: isFavorite,
|
||||
withPartners: withPartners,
|
||||
withSharedAlbums: withSharedAlbums,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DateTime] fileCreatedAfter:
|
||||
/// Filter assets created after this date
|
||||
///
|
||||
/// * [DateTime] fileCreatedBefore:
|
||||
/// Filter assets created before this date
|
||||
///
|
||||
/// * [bool] isArchived:
|
||||
/// Filter by archived status
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status
|
||||
///
|
||||
/// * [bool] withPartners:
|
||||
/// Include partner assets
|
||||
///
|
||||
/// * [bool] withSharedAlbums:
|
||||
/// Include shared album assets
|
||||
Future<List<MapMarkerResponseDto>?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async {
|
||||
final response = await getMapMarkersWithHttpInfo( fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<MapMarkerResponseDto>') as List)
|
||||
.cast<MapMarkerResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<MapMarkerResponseDto>') as List)
|
||||
.cast<MapMarkerResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Reverse geocode coordinates
|
||||
///
|
||||
/// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> reverseGeocodeWithHttpInfo({
|
||||
required double lat,
|
||||
required double lon,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [double] lat (required):
|
||||
/// Latitude (-90 to 90)
|
||||
///
|
||||
/// * [double] lon (required):
|
||||
/// Longitude (-180 to 180)
|
||||
Future<Response> reverseGeocodeWithHttpInfo(double lat, double lon,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/map/reverse-geocode';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'lat', lat));
|
||||
queryParams.addAll(_queryParams('', 'lon', lon));
|
||||
queryParams.addAll(_queryParams('', 'lat', lat));
|
||||
queryParams.addAll(_queryParams('', 'lon', lon));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -148,22 +171,28 @@ class MapApi {
|
||||
///
|
||||
/// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<MapReverseGeocodeResponseDto>> reverseGeocode({
|
||||
required double lat,
|
||||
required double lon,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await reverseGeocodeWithHttpInfo(lat: lat, lon: lon, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [double] lat (required):
|
||||
/// Latitude (-90 to 90)
|
||||
///
|
||||
/// * [double] lon (required):
|
||||
/// Longitude (-180 to 180)
|
||||
Future<List<MapReverseGeocodeResponseDto>?> reverseGeocode(double lat, double lon,) async {
|
||||
final response = await reverseGeocodeWithHttpInfo(lat, lon,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<MapReverseGeocodeResponseDto>') as List)
|
||||
.cast<MapReverseGeocodeResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<MapReverseGeocodeResponseDto>') as List)
|
||||
.cast<MapReverseGeocodeResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+388
-334
@@ -1,163 +1,116 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 MemoriesApi {
|
||||
MemoriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion searchMemoriesAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState searchMemoriesState = .stable;
|
||||
|
||||
static const ApiVersion createMemoryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createMemoryState = .stable;
|
||||
|
||||
static const ApiVersion memoriesStatisticsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState memoriesStatisticsState = .stable;
|
||||
|
||||
static const ApiVersion deleteMemoryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteMemoryState = .stable;
|
||||
|
||||
static const ApiVersion getMemoryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getMemoryState = .stable;
|
||||
|
||||
static const ApiVersion updateMemoryAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateMemoryState = .stable;
|
||||
|
||||
static const ApiVersion removeMemoryAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState removeMemoryAssetsState = .stable;
|
||||
|
||||
static const ApiVersion addMemoryAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState addMemoryAssetsState = .stable;
|
||||
|
||||
/// Retrieve memories
|
||||
/// Add assets to a memory
|
||||
///
|
||||
/// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Add a list of asset IDs to a specific memory.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchMemoriesWithHttpInfo({
|
||||
DateTime? for$,
|
||||
bool? isSaved,
|
||||
bool? isTrashed,
|
||||
MemorySearchOrder? order,
|
||||
int? size,
|
||||
MemoryType? type,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/memories';
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> addMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (for$ != null) {
|
||||
queryParams.addAll(_queryParams('', 'for', for$));
|
||||
}
|
||||
if (isSaved != null) {
|
||||
queryParams.addAll(_queryParams('', 'isSaved', isSaved));
|
||||
}
|
||||
if (isTrashed != null) {
|
||||
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
|
||||
}
|
||||
if (order != null) {
|
||||
queryParams.addAll(_queryParams('', 'order', order));
|
||||
}
|
||||
if (size != null) {
|
||||
queryParams.addAll(_queryParams('', 'size', size));
|
||||
}
|
||||
if (type != null) {
|
||||
queryParams.addAll(_queryParams('', 'type', type));
|
||||
}
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve memories
|
||||
/// Add assets to a memory
|
||||
///
|
||||
/// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
/// Add a list of asset IDs to a specific memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<MemoryResponseDto>> searchMemories({
|
||||
DateTime? for$,
|
||||
bool? isSaved,
|
||||
bool? isTrashed,
|
||||
MemorySearchOrder? order,
|
||||
int? size,
|
||||
MemoryType? type,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await searchMemoriesWithHttpInfo(
|
||||
for$: for$,
|
||||
isSaved: isSaved,
|
||||
isTrashed: isTrashed,
|
||||
order: order,
|
||||
size: size,
|
||||
type: type,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<List<BulkIdResponseDto>?> addMemoryAssets(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await addMemoryAssetsWithHttpInfo(id, bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<MemoryResponseDto>') as List)
|
||||
.cast<MemoryResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a memory
|
||||
///
|
||||
/// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createMemoryWithHttpInfo(MemoryCreateDto memoryCreateDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MemoryCreateDto] memoryCreateDto (required):
|
||||
Future<Response> createMemoryWithHttpInfo(MemoryCreateDto memoryCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = memoryCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -165,45 +118,166 @@ class MemoriesApi {
|
||||
///
|
||||
/// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<MemoryResponseDto> createMemory(MemoryCreateDto memoryCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createMemoryWithHttpInfo(memoryCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MemoryCreateDto] memoryCreateDto (required):
|
||||
Future<MemoryResponseDto?> createMemory(MemoryCreateDto memoryCreateDto,) async {
|
||||
final response = await createMemoryWithHttpInfo(memoryCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MemoryResponseDto')
|
||||
as MemoryResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve memories statistics
|
||||
/// Delete a memory
|
||||
///
|
||||
/// Retrieve statistics about memories, such as total count and other relevant metrics.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Delete a specific memory by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> memoriesStatisticsWithHttpInfo({
|
||||
DateTime? for$,
|
||||
bool? isSaved,
|
||||
bool? isTrashed,
|
||||
MemorySearchOrder? order,
|
||||
int? size,
|
||||
MemoryType? type,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/memories/statistics';
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteMemoryWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (for$ != null) {
|
||||
queryParams.addAll(_queryParams('', 'for', for$));
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a memory
|
||||
///
|
||||
/// Delete a specific memory by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteMemory(String id,) async {
|
||||
final response = await deleteMemoryWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a memory
|
||||
///
|
||||
/// Retrieve a specific memory by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getMemoryWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a memory
|
||||
///
|
||||
/// Retrieve a specific memory by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<MemoryResponseDto?> getMemory(String id,) async {
|
||||
final response = await getMemoryWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve memories statistics
|
||||
///
|
||||
/// Retrieve statistics about memories, such as total count and other relevant metrics.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DateTime] for_:
|
||||
/// Filter by date
|
||||
///
|
||||
/// * [bool] isSaved:
|
||||
/// Filter by saved status
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Include trashed memories
|
||||
///
|
||||
/// * [MemorySearchOrder] order:
|
||||
///
|
||||
/// * [int] size:
|
||||
/// Number of memories to return
|
||||
///
|
||||
/// * [MemoryType] type:
|
||||
Future<Response> memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories/statistics';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (for_ != null) {
|
||||
queryParams.addAll(_queryParams('', 'for', for_));
|
||||
}
|
||||
if (isSaved != null) {
|
||||
queryParams.addAll(_queryParams('', 'isSaved', isSaved));
|
||||
@@ -223,15 +297,15 @@ class MemoriesApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -239,155 +313,242 @@ class MemoriesApi {
|
||||
///
|
||||
/// Retrieve statistics about memories, such as total count and other relevant metrics.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<MemoryStatisticsResponseDto> memoriesStatistics({
|
||||
DateTime? for$,
|
||||
bool? isSaved,
|
||||
bool? isTrashed,
|
||||
MemorySearchOrder? order,
|
||||
int? size,
|
||||
MemoryType? type,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await memoriesStatisticsWithHttpInfo(
|
||||
for$: for$,
|
||||
isSaved: isSaved,
|
||||
isTrashed: isTrashed,
|
||||
order: order,
|
||||
size: size,
|
||||
type: type,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DateTime] for_:
|
||||
/// Filter by date
|
||||
///
|
||||
/// * [bool] isSaved:
|
||||
/// Filter by saved status
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Include trashed memories
|
||||
///
|
||||
/// * [MemorySearchOrder] order:
|
||||
///
|
||||
/// * [int] size:
|
||||
/// Number of memories to return
|
||||
///
|
||||
/// * [MemoryType] type:
|
||||
Future<MemoryStatisticsResponseDto?> memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
|
||||
final response = await memoriesStatisticsWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MemoryStatisticsResponseDto')
|
||||
as MemoryStatisticsResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryStatisticsResponseDto',) as MemoryStatisticsResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete a memory
|
||||
/// Remove assets from a memory
|
||||
///
|
||||
/// Delete a specific memory by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Remove a list of asset IDs from a specific memory.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteMemoryWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/memories/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> removeMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove assets from a memory
|
||||
///
|
||||
/// Remove a list of asset IDs from a specific memory.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<List<BulkIdResponseDto>?> removeMemoryAssets(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await removeMemoryAssetsWithHttpInfo(id, bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve memories
|
||||
///
|
||||
/// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DateTime] for_:
|
||||
/// Filter by date
|
||||
///
|
||||
/// * [bool] isSaved:
|
||||
/// Filter by saved status
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Include trashed memories
|
||||
///
|
||||
/// * [MemorySearchOrder] order:
|
||||
///
|
||||
/// * [int] size:
|
||||
/// Number of memories to return
|
||||
///
|
||||
/// * [MemoryType] type:
|
||||
Future<Response> searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (for_ != null) {
|
||||
queryParams.addAll(_queryParams('', 'for', for_));
|
||||
}
|
||||
if (isSaved != null) {
|
||||
queryParams.addAll(_queryParams('', 'isSaved', isSaved));
|
||||
}
|
||||
if (isTrashed != null) {
|
||||
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
|
||||
}
|
||||
if (order != null) {
|
||||
queryParams.addAll(_queryParams('', 'order', order));
|
||||
}
|
||||
if (size != null) {
|
||||
queryParams.addAll(_queryParams('', 'size', size));
|
||||
}
|
||||
if (type != null) {
|
||||
queryParams.addAll(_queryParams('', 'type', type));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a memory
|
||||
/// Retrieve memories
|
||||
///
|
||||
/// Delete a specific memory by its ID.
|
||||
/// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteMemory(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteMemoryWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a memory
|
||||
///
|
||||
/// Retrieve a specific memory by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getMemoryWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/memories/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a memory
|
||||
///
|
||||
/// Retrieve a specific memory by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<MemoryResponseDto> getMemory(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getMemoryWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [DateTime] for_:
|
||||
/// Filter by date
|
||||
///
|
||||
/// * [bool] isSaved:
|
||||
/// Filter by saved status
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Include trashed memories
|
||||
///
|
||||
/// * [MemorySearchOrder] order:
|
||||
///
|
||||
/// * [int] size:
|
||||
/// Number of memories to return
|
||||
///
|
||||
/// * [MemoryType] type:
|
||||
Future<List<MemoryResponseDto>?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async {
|
||||
final response = await searchMemoriesWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MemoryResponseDto')
|
||||
as MemoryResponseDto;
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<MemoryResponseDto>') as List)
|
||||
.cast<MemoryResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a memory
|
||||
///
|
||||
/// Update an existing memory by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateMemoryWithHttpInfo(
|
||||
String id,
|
||||
MemoryUpdateDto memoryUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/memories/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [MemoryUpdateDto] memoryUpdateDto (required):
|
||||
Future<Response> updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/memories/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = memoryUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -395,130 +556,23 @@ class MemoriesApi {
|
||||
///
|
||||
/// Update an existing memory by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<MemoryResponseDto> updateMemory(
|
||||
String id,
|
||||
MemoryUpdateDto memoryUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [MemoryUpdateDto] memoryUpdateDto (required):
|
||||
Future<MemoryResponseDto?> updateMemory(String id, MemoryUpdateDto memoryUpdateDto,) async {
|
||||
final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'MemoryResponseDto')
|
||||
as MemoryResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Remove assets from a memory
|
||||
///
|
||||
/// Remove a list of asset IDs from a specific memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> removeMemoryAssetsWithHttpInfo(
|
||||
String id,
|
||||
BulkIdsDto bulkIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/memories/{id}/assets'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove assets from a memory
|
||||
///
|
||||
/// Remove a list of asset IDs from a specific memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<BulkIdResponseDto>> removeMemoryAssets(
|
||||
String id,
|
||||
BulkIdsDto bulkIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await removeMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Add assets to a memory
|
||||
///
|
||||
/// Add a list of asset IDs to a specific memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> addMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/memories/{id}/assets'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Add assets to a memory
|
||||
///
|
||||
/// Add a list of asset IDs to a specific memory.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<BulkIdResponseDto>> addMemoryAssets(
|
||||
String id,
|
||||
BulkIdsDto bulkIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await addMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+78
-68
@@ -1,54 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 NotificationsAdminApi {
|
||||
NotificationsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion createNotificationAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createNotificationState = .stable;
|
||||
|
||||
static const ApiVersion getNotificationTemplateAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getNotificationTemplateAdminState = .stable;
|
||||
|
||||
static const ApiVersion sendTestEmailAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState sendTestEmailAdminState = .stable;
|
||||
|
||||
/// Create a notification
|
||||
///
|
||||
/// Create a new notification for a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createNotificationWithHttpInfo(
|
||||
NotificationCreateDto notificationCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [NotificationCreateDto] notificationCreateDto (required):
|
||||
Future<Response> createNotificationWithHttpInfo(NotificationCreateDto notificationCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/notifications';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = notificationCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -56,52 +54,58 @@ class NotificationsAdminApi {
|
||||
///
|
||||
/// Create a new notification for a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<NotificationDto> createNotification(
|
||||
NotificationCreateDto notificationCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await createNotificationWithHttpInfo(notificationCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [NotificationCreateDto] notificationCreateDto (required):
|
||||
Future<NotificationDto?> createNotification(NotificationCreateDto notificationCreateDto,) async {
|
||||
final response = await createNotificationWithHttpInfo(notificationCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'NotificationDto') as NotificationDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Render email template
|
||||
///
|
||||
/// Retrieve a preview of the provided email template.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getNotificationTemplateAdminWithHttpInfo(
|
||||
String name,
|
||||
TemplateDto templateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/admin/notifications/templates/{name}'.replaceAll('{name}', name);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] name (required):
|
||||
///
|
||||
/// * [TemplateDto] templateDto (required):
|
||||
Future<Response> getNotificationTemplateAdminWithHttpInfo(String name, TemplateDto templateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/notifications/templates/{name}'
|
||||
.replaceAll('{name}', name);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = templateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -109,53 +113,57 @@ class NotificationsAdminApi {
|
||||
///
|
||||
/// Retrieve a preview of the provided email template.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TemplateResponseDto> getNotificationTemplateAdmin(
|
||||
String name,
|
||||
TemplateDto templateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getNotificationTemplateAdminWithHttpInfo(name, templateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] name (required):
|
||||
///
|
||||
/// * [TemplateDto] templateDto (required):
|
||||
Future<TemplateResponseDto?> getNotificationTemplateAdmin(String name, TemplateDto templateDto,) async {
|
||||
final response = await getNotificationTemplateAdminWithHttpInfo(name, templateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TemplateResponseDto')
|
||||
as TemplateResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TemplateResponseDto',) as TemplateResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Send test email
|
||||
///
|
||||
/// Send a test email using the provided SMTP configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> sendTestEmailAdminWithHttpInfo(
|
||||
SystemConfigSmtpDto systemConfigSmtpDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigSmtpDto] systemConfigSmtpDto (required):
|
||||
Future<Response> sendTestEmailAdminWithHttpInfo(SystemConfigSmtpDto systemConfigSmtpDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/notifications/test-email';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = systemConfigSmtpDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -163,19 +171,21 @@ class NotificationsAdminApi {
|
||||
///
|
||||
/// Send a test email using the provided SMTP configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TestEmailResponseDto> sendTestEmailAdmin(
|
||||
SystemConfigSmtpDto systemConfigSmtpDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await sendTestEmailAdminWithHttpInfo(systemConfigSmtpDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigSmtpDto] systemConfigSmtpDto (required):
|
||||
Future<TestEmailResponseDto?> sendTestEmailAdmin(SystemConfigSmtpDto systemConfigSmtpDto,) async {
|
||||
final response = await sendTestEmailAdminWithHttpInfo(systemConfigSmtpDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TestEmailResponseDto')
|
||||
as TestEmailResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TestEmailResponseDto',) as TestEmailResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+236
-218
@@ -1,66 +1,101 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 NotificationsApi {
|
||||
NotificationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deleteNotificationsAddedIn = .new(1, 0, 0);
|
||||
/// Delete a notification
|
||||
///
|
||||
/// Delete a specific notification.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteNotificationWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/notifications/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
static const ApiState deleteNotificationsState = .stable;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
static const ApiVersion getNotificationsAddedIn = .new(1, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState getNotificationsState = .stable;
|
||||
const contentTypes = <String>[];
|
||||
|
||||
static const ApiVersion updateNotificationsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateNotificationsState = .stable;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion deleteNotificationAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteNotificationState = .stable;
|
||||
|
||||
static const ApiVersion getNotificationAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getNotificationState = .stable;
|
||||
|
||||
static const ApiVersion updateNotificationAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateNotificationState = .stable;
|
||||
/// Delete a notification
|
||||
///
|
||||
/// Delete a specific notification.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteNotification(String id,) async {
|
||||
final response = await deleteNotificationWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete notifications
|
||||
///
|
||||
/// Delete a list of notifications at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteNotificationsWithHttpInfo(
|
||||
NotificationDeleteAllDto notificationDeleteAllDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [NotificationDeleteAllDto] notificationDeleteAllDto (required):
|
||||
Future<Response> deleteNotificationsWithHttpInfo(NotificationDeleteAllDto notificationDeleteAllDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/notifications';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = notificationDeleteAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -68,33 +103,95 @@ class NotificationsApi {
|
||||
///
|
||||
/// Delete a list of notifications at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteNotifications(
|
||||
NotificationDeleteAllDto notificationDeleteAllDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await deleteNotificationsWithHttpInfo(notificationDeleteAllDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [NotificationDeleteAllDto] notificationDeleteAllDto (required):
|
||||
Future<void> deleteNotifications(NotificationDeleteAllDto notificationDeleteAllDto,) async {
|
||||
final response = await deleteNotificationsWithHttpInfo(notificationDeleteAllDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a notification
|
||||
///
|
||||
/// Retrieve a specific notification identified by id.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getNotificationWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/notifications/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get a notification
|
||||
///
|
||||
/// Retrieve a specific notification identified by id.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<NotificationDto?> getNotification(String id,) async {
|
||||
final response = await getNotificationWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve notifications
|
||||
///
|
||||
/// Retrieve a list of notifications.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getNotificationsWithHttpInfo({
|
||||
String? id,
|
||||
NotificationLevel? level,
|
||||
NotificationType? type,
|
||||
bool? unread,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Filter by notification ID
|
||||
///
|
||||
/// * [NotificationLevel] level:
|
||||
///
|
||||
/// * [NotificationType] type:
|
||||
///
|
||||
/// * [bool] unread:
|
||||
/// Filter by unread status
|
||||
Future<Response> getNotificationsWithHttpInfo({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/notifications';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -116,15 +213,15 @@ class NotificationsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -132,200 +229,69 @@ class NotificationsApi {
|
||||
///
|
||||
/// Retrieve a list of notifications.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<NotificationDto>> getNotifications({
|
||||
String? id,
|
||||
NotificationLevel? level,
|
||||
NotificationType? type,
|
||||
bool? unread,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getNotificationsWithHttpInfo(
|
||||
id: id,
|
||||
level: level,
|
||||
type: type,
|
||||
unread: unread,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Filter by notification ID
|
||||
///
|
||||
/// * [NotificationLevel] level:
|
||||
///
|
||||
/// * [NotificationType] type:
|
||||
///
|
||||
/// * [bool] unread:
|
||||
/// Filter by unread status
|
||||
Future<List<NotificationDto>?> getNotifications({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, }) async {
|
||||
final response = await getNotificationsWithHttpInfo( id: id, level: level, type: type, unread: unread, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<NotificationDto>') as List)
|
||||
.cast<NotificationDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<NotificationDto>') as List)
|
||||
.cast<NotificationDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Update notifications
|
||||
///
|
||||
/// Update a list of notifications. Allows to bulk-set the read status of notifications.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateNotificationsWithHttpInfo(
|
||||
NotificationUpdateAllDto notificationUpdateAllDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/notifications';
|
||||
|
||||
Object? postBody = notificationUpdateAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update notifications
|
||||
///
|
||||
/// Update a list of notifications. Allows to bulk-set the read status of notifications.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> updateNotifications(
|
||||
NotificationUpdateAllDto notificationUpdateAllDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateNotificationsWithHttpInfo(notificationUpdateAllDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete a notification
|
||||
///
|
||||
/// Delete a specific notification.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteNotificationWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/notifications/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a notification
|
||||
///
|
||||
/// Delete a specific notification.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteNotification(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteNotificationWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a notification
|
||||
///
|
||||
/// Retrieve a specific notification identified by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getNotificationWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/notifications/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get a notification
|
||||
///
|
||||
/// Retrieve a specific notification identified by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<NotificationDto> getNotification(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getNotificationWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'NotificationDto') as NotificationDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a notification
|
||||
///
|
||||
/// Update a specific notification to set its read status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateNotificationWithHttpInfo(
|
||||
String id,
|
||||
NotificationUpdateDto notificationUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/notifications/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [NotificationUpdateDto] notificationUpdateDto (required):
|
||||
Future<Response> updateNotificationWithHttpInfo(String id, NotificationUpdateDto notificationUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/notifications/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = notificationUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -333,19 +299,71 @@ class NotificationsApi {
|
||||
///
|
||||
/// Update a specific notification to set its read status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<NotificationDto> updateNotification(
|
||||
String id,
|
||||
NotificationUpdateDto notificationUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateNotificationWithHttpInfo(id, notificationUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [NotificationUpdateDto] notificationUpdateDto (required):
|
||||
Future<NotificationDto?> updateNotification(String id, NotificationUpdateDto notificationUpdateDto,) async {
|
||||
final response = await updateNotificationWithHttpInfo(id, notificationUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'NotificationDto') as NotificationDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update notifications
|
||||
///
|
||||
/// Update a list of notifications. Allows to bulk-set the read status of notifications.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [NotificationUpdateAllDto] notificationUpdateAllDto (required):
|
||||
Future<Response> updateNotificationsWithHttpInfo(NotificationUpdateAllDto notificationUpdateAllDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/notifications';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = notificationUpdateAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update notifications
|
||||
///
|
||||
/// Update a list of notifications. Allows to bulk-set the read status of notifications.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [NotificationUpdateAllDto] notificationUpdateAllDto (required):
|
||||
Future<void> updateNotifications(NotificationUpdateAllDto notificationUpdateAllDto,) async {
|
||||
final response = await updateNotificationsWithHttpInfo(notificationUpdateAllDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+170
-146
@@ -1,115 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 PartnersApi {
|
||||
PartnersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getPartnersAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getPartnersState = .stable;
|
||||
|
||||
static const ApiVersion createPartnerAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createPartnerState = .stable;
|
||||
|
||||
static const ApiVersion removePartnerAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState removePartnerState = .stable;
|
||||
|
||||
static const ApiVersion createPartnerDeprecatedAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiVersion createPartnerDeprecatedDeprecatedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createPartnerDeprecatedState = .deprecated;
|
||||
|
||||
static const ApiVersion updatePartnerAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updatePartnerState = .stable;
|
||||
|
||||
/// Retrieve partners
|
||||
///
|
||||
/// Retrieve a list of partners with whom assets are shared.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getPartnersWithHttpInfo({required PartnerDirection direction, Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/partners';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'direction', direction));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve partners
|
||||
///
|
||||
/// Retrieve a list of partners with whom assets are shared.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<PartnerResponseDto>> getPartners({
|
||||
required PartnerDirection direction,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getPartnersWithHttpInfo(direction: direction, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<PartnerResponseDto>') as List)
|
||||
.cast<PartnerResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a partner
|
||||
///
|
||||
/// Create a new partner to share assets with.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createPartnerWithHttpInfo(PartnerCreateDto partnerCreateDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PartnerCreateDto] partnerCreateDto (required):
|
||||
Future<Response> createPartnerWithHttpInfo(PartnerCreateDto partnerCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/partners';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = partnerCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -117,29 +54,39 @@ class PartnersApi {
|
||||
///
|
||||
/// Create a new partner to share assets with.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PartnerResponseDto> createPartner(PartnerCreateDto partnerCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createPartnerWithHttpInfo(partnerCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PartnerCreateDto] partnerCreateDto (required):
|
||||
Future<PartnerResponseDto?> createPartner(PartnerCreateDto partnerCreateDto,) async {
|
||||
final response = await createPartnerWithHttpInfo(partnerCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PartnerResponseDto')
|
||||
as PartnerResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Remove a partner
|
||||
/// Create a partner
|
||||
///
|
||||
/// Stop sharing assets with a partner.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Create a new partner to share assets with.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> removePartnerWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/partners/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> createPartnerDeprecatedWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/partners/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -148,41 +95,116 @@ class PartnersApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove a partner
|
||||
///
|
||||
/// Stop sharing assets with a partner.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> removePartner(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await removePartnerWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a partner
|
||||
///
|
||||
/// Create a new partner to share assets with.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<PartnerResponseDto?> createPartnerDeprecated(String id,) async {
|
||||
final response = await createPartnerDeprecatedWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve partners
|
||||
///
|
||||
/// Retrieve a list of partners with whom assets are shared.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@Deprecated('Deprecated by the Immich server API since v1.0.0.')
|
||||
Future<Response> createPartnerDeprecatedWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/partners/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PartnerDirection] direction (required):
|
||||
Future<Response> getPartnersWithHttpInfo(PartnerDirection direction,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/partners';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'direction', direction));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve partners
|
||||
///
|
||||
/// Retrieve a list of partners with whom assets are shared.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PartnerDirection] direction (required):
|
||||
Future<List<PartnerResponseDto>?> getPartners(PartnerDirection direction,) async {
|
||||
final response = await getPartnersWithHttpInfo(direction,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<PartnerResponseDto>') as List)
|
||||
.cast<PartnerResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Remove a partner
|
||||
///
|
||||
/// Stop sharing assets with a partner.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> removePartnerWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/partners/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -191,67 +213,66 @@ class PartnersApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a partner
|
||||
/// Remove a partner
|
||||
///
|
||||
/// Create a new partner to share assets with.
|
||||
/// Stop sharing assets with a partner.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
@Deprecated('Deprecated by the Immich server API since v1.0.0.')
|
||||
Future<PartnerResponseDto> createPartnerDeprecated(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> removePartner(String id,) async {
|
||||
final response = await removePartnerWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PartnerResponseDto')
|
||||
as PartnerResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Update a partner
|
||||
///
|
||||
/// Specify whether a partner's assets should appear in the user's timeline.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updatePartnerWithHttpInfo(
|
||||
String id,
|
||||
PartnerUpdateDto partnerUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/partners/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [PartnerUpdateDto] partnerUpdateDto (required):
|
||||
Future<Response> updatePartnerWithHttpInfo(String id, PartnerUpdateDto partnerUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/partners/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = partnerUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -259,20 +280,23 @@ class PartnersApi {
|
||||
///
|
||||
/// Specify whether a partner's assets should appear in the user's timeline.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PartnerResponseDto> updatePartner(
|
||||
String id,
|
||||
PartnerUpdateDto partnerUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updatePartnerWithHttpInfo(id, partnerUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [PartnerUpdateDto] partnerUpdateDto (required):
|
||||
Future<PartnerResponseDto?> updatePartner(String id, PartnerUpdateDto partnerUpdateDto,) async {
|
||||
final response = await updatePartnerWithHttpInfo(id, partnerUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PartnerResponseDto')
|
||||
as PartnerResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+374
-309
@@ -1,83 +1,108 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 PeopleApi {
|
||||
PeopleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deletePeopleAddedIn = .new(1, 0, 0);
|
||||
/// Create a person
|
||||
///
|
||||
/// Create a new person that can have multiple faces assigned to them.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PersonCreateDto] personCreateDto (required):
|
||||
Future<Response> createPersonWithHttpInfo(PersonCreateDto personCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people';
|
||||
|
||||
static const ApiState deletePeopleState = .stable;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = personCreateDto;
|
||||
|
||||
static const ApiVersion getAllPeopleAddedIn = .new(1, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState getAllPeopleState = .stable;
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
static const ApiVersion createPersonAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createPersonState = .stable;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion updatePeopleAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updatePeopleState = .stable;
|
||||
|
||||
static const ApiVersion deletePersonAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deletePersonState = .stable;
|
||||
|
||||
static const ApiVersion getPersonAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getPersonState = .stable;
|
||||
|
||||
static const ApiVersion updatePersonAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updatePersonState = .stable;
|
||||
|
||||
static const ApiVersion mergePersonAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState mergePersonState = .stable;
|
||||
|
||||
static const ApiVersion reassignFacesAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState reassignFacesState = .stable;
|
||||
|
||||
static const ApiVersion getPersonStatisticsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getPersonStatisticsState = .stable;
|
||||
|
||||
static const ApiVersion getPersonThumbnailAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getPersonThumbnailState = .stable;
|
||||
/// Create a person
|
||||
///
|
||||
/// Create a new person that can have multiple faces assigned to them.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PersonCreateDto] personCreateDto (required):
|
||||
Future<PersonResponseDto?> createPerson(PersonCreateDto personCreateDto,) async {
|
||||
final response = await createPersonWithHttpInfo(personCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete people
|
||||
///
|
||||
/// Bulk delete a list of people at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deletePeopleWithHttpInfo(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> deletePeopleWithHttpInfo(BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -85,9 +110,60 @@ class PeopleApi {
|
||||
///
|
||||
/// Bulk delete a list of people at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deletePeople(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await deletePeopleWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<void> deletePeople(BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await deletePeopleWithHttpInfo(bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete person
|
||||
///
|
||||
/// Delete an individual person.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deletePersonWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete person
|
||||
///
|
||||
/// Delete an individual person.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deletePerson(String id,) async {
|
||||
final response = await deletePersonWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -97,19 +173,29 @@ class PeopleApi {
|
||||
///
|
||||
/// Retrieve a list of all people.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAllPeopleWithHttpInfo({
|
||||
String? closestAssetId,
|
||||
String? closestPersonId,
|
||||
int? page,
|
||||
int? size,
|
||||
bool? withHidden,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] closestAssetId:
|
||||
/// Closest asset ID for similarity search
|
||||
///
|
||||
/// * [String] closestPersonId:
|
||||
/// Closest person ID for similarity search
|
||||
///
|
||||
/// * [int] page:
|
||||
/// Page number for pagination
|
||||
///
|
||||
/// * [int] size:
|
||||
/// Number of items per page
|
||||
///
|
||||
/// * [bool] withHidden:
|
||||
/// Include hidden people
|
||||
Future<Response> getAllPeopleWithHttpInfo({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -134,15 +220,15 @@ class PeopleApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -150,139 +236,52 @@ class PeopleApi {
|
||||
///
|
||||
/// Retrieve a list of all people.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PeopleResponseDto> getAllPeople({
|
||||
String? closestAssetId,
|
||||
String? closestPersonId,
|
||||
int? page,
|
||||
int? size,
|
||||
bool? withHidden,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getAllPeopleWithHttpInfo(
|
||||
closestAssetId: closestAssetId,
|
||||
closestPersonId: closestPersonId,
|
||||
page: page,
|
||||
size: size,
|
||||
withHidden: withHidden,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] closestAssetId:
|
||||
/// Closest asset ID for similarity search
|
||||
///
|
||||
/// * [String] closestPersonId:
|
||||
/// Closest person ID for similarity search
|
||||
///
|
||||
/// * [int] page:
|
||||
/// Page number for pagination
|
||||
///
|
||||
/// * [int] size:
|
||||
/// Number of items per page
|
||||
///
|
||||
/// * [bool] withHidden:
|
||||
/// Include hidden people
|
||||
Future<PeopleResponseDto?> getAllPeople({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, }) async {
|
||||
final response = await getAllPeopleWithHttpInfo( closestAssetId: closestAssetId, closestPersonId: closestPersonId, page: page, size: size, withHidden: withHidden, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PeopleResponseDto')
|
||||
as PeopleResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PeopleResponseDto',) as PeopleResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a person
|
||||
/// Get a person
|
||||
///
|
||||
/// Create a new person that can have multiple faces assigned to them.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Retrieve a person by id.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createPersonWithHttpInfo(PersonCreateDto personCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/people';
|
||||
|
||||
Object? postBody = personCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a person
|
||||
///
|
||||
/// Create a new person that can have multiple faces assigned to them.
|
||||
/// Parameters:
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PersonResponseDto> createPerson(PersonCreateDto personCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createPersonWithHttpInfo(personCreateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PersonResponseDto')
|
||||
as PersonResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Update people
|
||||
///
|
||||
/// Bulk update multiple people at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updatePeopleWithHttpInfo(PeopleUpdateDto peopleUpdateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/people';
|
||||
|
||||
Object? postBody = peopleUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update people
|
||||
///
|
||||
/// Bulk update multiple people at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<BulkIdResponseDto>> updatePeople(PeopleUpdateDto peopleUpdateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await updatePeopleWithHttpInfo(peopleUpdateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Delete person
|
||||
///
|
||||
/// Delete an individual person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deletePersonWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/people/{id}'.replaceAll('{id}', id);
|
||||
/// * [String] id (required):
|
||||
Future<Response> getPersonWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -291,40 +290,55 @@ class PeopleApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete person
|
||||
///
|
||||
/// Delete an individual person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deletePerson(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deletePersonWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a person
|
||||
///
|
||||
/// Retrieve a person by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<PersonResponseDto?> getPerson(String id,) async {
|
||||
final response = await getPersonWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get person statistics
|
||||
///
|
||||
/// Retrieve statistics about a specific person.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getPersonWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/people/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getPersonStatisticsWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}/statistics'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -333,121 +347,131 @@ class PeopleApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get a person
|
||||
/// Get person statistics
|
||||
///
|
||||
/// Retrieve a person by id.
|
||||
/// Retrieve statistics about a specific person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PersonResponseDto> getPerson(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getPersonWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<PersonStatisticsResponseDto?> getPersonStatistics(String id,) async {
|
||||
final response = await getPersonStatisticsWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PersonResponseDto')
|
||||
as PersonResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonStatisticsResponseDto',) as PersonStatisticsResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update person
|
||||
/// Get person thumbnail
|
||||
///
|
||||
/// Update an individual person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Retrieve the thumbnail file for a person.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updatePersonWithHttpInfo(
|
||||
String id,
|
||||
PersonUpdateDto personUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/people/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getPersonThumbnailWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}/thumbnail'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = personUpdateDto;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update person
|
||||
/// Get person thumbnail
|
||||
///
|
||||
/// Update an individual person.
|
||||
/// Retrieve the thumbnail file for a person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PersonResponseDto> updatePerson(
|
||||
String id,
|
||||
PersonUpdateDto personUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<MultipartFile?> getPersonThumbnail(String id,) async {
|
||||
final response = await getPersonThumbnailWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PersonResponseDto')
|
||||
as PersonResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Merge people
|
||||
///
|
||||
/// Merge a list of people into the person specified in the path parameter.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> mergePersonWithHttpInfo(
|
||||
String id,
|
||||
MergePersonDto mergePersonDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/people/{id}/merge'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [MergePersonDto] mergePersonDto (required):
|
||||
Future<Response> mergePersonWithHttpInfo(String id, MergePersonDto mergePersonDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}/merge'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = mergePersonDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -455,56 +479,63 @@ class PeopleApi {
|
||||
///
|
||||
/// Merge a list of people into the person specified in the path parameter.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<BulkIdResponseDto>> mergePerson(
|
||||
String id,
|
||||
MergePersonDto mergePersonDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await mergePersonWithHttpInfo(id, mergePersonDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [MergePersonDto] mergePersonDto (required):
|
||||
Future<List<BulkIdResponseDto>?> mergePerson(String id, MergePersonDto mergePersonDto,) async {
|
||||
final response = await mergePersonWithHttpInfo(id, mergePersonDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Reassign faces
|
||||
///
|
||||
/// Bulk reassign a list of faces to a different person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> reassignFacesWithHttpInfo(
|
||||
String id,
|
||||
AssetFaceUpdateDto assetFaceUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/people/{id}/reassign'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetFaceUpdateDto] assetFaceUpdateDto (required):
|
||||
Future<Response> reassignFacesWithHttpInfo(String id, AssetFaceUpdateDto assetFaceUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}/reassign'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = assetFaceUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -512,112 +543,146 @@ class PeopleApi {
|
||||
///
|
||||
/// Bulk reassign a list of faces to a different person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<PersonResponseDto>> reassignFaces(
|
||||
String id,
|
||||
AssetFaceUpdateDto assetFaceUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await reassignFacesWithHttpInfo(id, assetFaceUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetFaceUpdateDto] assetFaceUpdateDto (required):
|
||||
Future<List<PersonResponseDto>?> reassignFaces(String id, AssetFaceUpdateDto assetFaceUpdateDto,) async {
|
||||
final response = await reassignFacesWithHttpInfo(id, assetFaceUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<PersonResponseDto>') as List)
|
||||
.cast<PersonResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<PersonResponseDto>') as List)
|
||||
.cast<PersonResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get person statistics
|
||||
/// Update people
|
||||
///
|
||||
/// Retrieve statistics about a specific person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Bulk update multiple people at once.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getPersonStatisticsWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/people/{id}/statistics'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PeopleUpdateDto] peopleUpdateDto (required):
|
||||
Future<Response> updatePeopleWithHttpInfo(PeopleUpdateDto peopleUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people';
|
||||
|
||||
Object? postBody;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = peopleUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get person statistics
|
||||
/// Update people
|
||||
///
|
||||
/// Retrieve statistics about a specific person.
|
||||
/// Bulk update multiple people at once.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<PersonStatisticsResponseDto> getPersonStatistics(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getPersonStatisticsWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [PeopleUpdateDto] peopleUpdateDto (required):
|
||||
Future<List<BulkIdResponseDto>?> updatePeople(PeopleUpdateDto peopleUpdateDto,) async {
|
||||
final response = await updatePeopleWithHttpInfo(peopleUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PersonStatisticsResponseDto')
|
||||
as PersonStatisticsResponseDto;
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get person thumbnail
|
||||
/// Update person
|
||||
///
|
||||
/// Retrieve the thumbnail file for a person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Update an individual person.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getPersonThumbnailWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/people/{id}/thumbnail'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [PersonUpdateDto] personUpdateDto (required):
|
||||
Future<Response> updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/people/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = personUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get person thumbnail
|
||||
/// Update person
|
||||
///
|
||||
/// Retrieve the thumbnail file for a person.
|
||||
/// Update an individual person.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<Uint8List> getPersonThumbnail(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getPersonThumbnailWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [PersonUpdateDto] personUpdateDto (required):
|
||||
Future<PersonResponseDto?> updatePerson(String id, PersonUpdateDto personUpdateDto,) async {
|
||||
final response = await updatePersonWithHttpInfo(id, personUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
return response.bodyBytes;
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+187
-151
@@ -1,141 +1,114 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 PluginsApi {
|
||||
PluginsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion searchPluginsAddedIn = .new(3, 0, 0);
|
||||
|
||||
static const ApiState searchPluginsState = .added;
|
||||
|
||||
static const ApiVersion searchPluginMethodsAddedIn = .new(3, 0, 0);
|
||||
|
||||
static const ApiState searchPluginMethodsState = .added;
|
||||
|
||||
static const ApiVersion searchPluginTemplatesAddedIn = .new(3, 0, 0);
|
||||
|
||||
static const ApiState searchPluginTemplatesState = .added;
|
||||
|
||||
static const ApiVersion getPluginAddedIn = .new(3, 0, 0);
|
||||
|
||||
static const ApiState getPluginState = .added;
|
||||
|
||||
/// List all plugins
|
||||
/// Retrieve a plugin
|
||||
///
|
||||
/// Retrieve a list of plugins available to the authenticated user.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
/// Retrieve information about a specific plugin by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchPluginsWithHttpInfo({
|
||||
String? description,
|
||||
bool? enabled,
|
||||
String? id,
|
||||
String? name,
|
||||
String? title,
|
||||
String? version,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/plugins';
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getPluginWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/plugins/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (description != null) {
|
||||
queryParams.addAll(_queryParams('', 'description', description));
|
||||
}
|
||||
if (enabled != null) {
|
||||
queryParams.addAll(_queryParams('', 'enabled', enabled));
|
||||
}
|
||||
if (id != null) {
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
}
|
||||
if (name != null) {
|
||||
queryParams.addAll(_queryParams('', 'name', name));
|
||||
}
|
||||
if (title != null) {
|
||||
queryParams.addAll(_queryParams('', 'title', title));
|
||||
}
|
||||
if (version != null) {
|
||||
queryParams.addAll(_queryParams('', 'version', version));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all plugins
|
||||
/// Retrieve a plugin
|
||||
///
|
||||
/// Retrieve a list of plugins available to the authenticated user.
|
||||
/// Retrieve information about a specific plugin by its ID.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<List<PluginResponseDto>> searchPlugins({
|
||||
String? description,
|
||||
bool? enabled,
|
||||
String? id,
|
||||
String? name,
|
||||
String? title,
|
||||
String? version,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await searchPluginsWithHttpInfo(
|
||||
description: description,
|
||||
enabled: enabled,
|
||||
id: id,
|
||||
name: name,
|
||||
title: title,
|
||||
version: version,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<PluginResponseDto?> getPlugin(String id,) async {
|
||||
final response = await getPluginWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<PluginResponseDto>') as List)
|
||||
.cast<PluginResponseDto>()
|
||||
.toList(growable: false);
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PluginResponseDto',) as PluginResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve plugin methods
|
||||
///
|
||||
/// Retrieve a list of plugin methods
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchPluginMethodsWithHttpInfo({
|
||||
String? description,
|
||||
bool? enabled,
|
||||
String? id,
|
||||
String? name,
|
||||
String? pluginName,
|
||||
String? pluginVersion,
|
||||
String? title,
|
||||
WorkflowTrigger? trigger,
|
||||
WorkflowType? type,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] description:
|
||||
///
|
||||
/// * [bool] enabled:
|
||||
/// Whether the plugin method is enabled
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Plugin method ID
|
||||
///
|
||||
/// * [String] name:
|
||||
///
|
||||
/// * [String] pluginName:
|
||||
/// Plugin name
|
||||
///
|
||||
/// * [String] pluginVersion:
|
||||
/// Plugin version
|
||||
///
|
||||
/// * [String] title:
|
||||
///
|
||||
/// * [WorkflowTrigger] trigger:
|
||||
/// Workflow trigger
|
||||
///
|
||||
/// * [WorkflowType] type:
|
||||
/// Workflow types
|
||||
Future<Response> searchPluginMethodsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/plugins/methods';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -172,15 +145,15 @@ class PluginsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -188,53 +161,59 @@ class PluginsApi {
|
||||
///
|
||||
/// Retrieve a list of plugin methods
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<List<PluginMethodResponseDto>> searchPluginMethods({
|
||||
String? description,
|
||||
bool? enabled,
|
||||
String? id,
|
||||
String? name,
|
||||
String? pluginName,
|
||||
String? pluginVersion,
|
||||
String? title,
|
||||
WorkflowTrigger? trigger,
|
||||
WorkflowType? type,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await searchPluginMethodsWithHttpInfo(
|
||||
description: description,
|
||||
enabled: enabled,
|
||||
id: id,
|
||||
name: name,
|
||||
pluginName: pluginName,
|
||||
pluginVersion: pluginVersion,
|
||||
title: title,
|
||||
trigger: trigger,
|
||||
type: type,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] description:
|
||||
///
|
||||
/// * [bool] enabled:
|
||||
/// Whether the plugin method is enabled
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Plugin method ID
|
||||
///
|
||||
/// * [String] name:
|
||||
///
|
||||
/// * [String] pluginName:
|
||||
/// Plugin name
|
||||
///
|
||||
/// * [String] pluginVersion:
|
||||
/// Plugin version
|
||||
///
|
||||
/// * [String] title:
|
||||
///
|
||||
/// * [WorkflowTrigger] trigger:
|
||||
/// Workflow trigger
|
||||
///
|
||||
/// * [WorkflowType] type:
|
||||
/// Workflow types
|
||||
Future<List<PluginMethodResponseDto>?> searchPluginMethods({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, }) async {
|
||||
final response = await searchPluginMethodsWithHttpInfo( description: description, enabled: enabled, id: id, name: name, pluginName: pluginName, pluginVersion: pluginVersion, title: title, trigger: trigger, type: type, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<PluginMethodResponseDto>') as List)
|
||||
.cast<PluginMethodResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<PluginMethodResponseDto>') as List)
|
||||
.cast<PluginMethodResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve workflow templates
|
||||
///
|
||||
/// Retrieve workflow templates provided by installed plugins
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchPluginTemplatesWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> searchPluginTemplatesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/plugins/templates';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -243,81 +222,138 @@ class PluginsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve workflow templates
|
||||
///
|
||||
/// Retrieve workflow templates provided by installed plugins
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<List<PluginTemplateResponseDto>> searchPluginTemplates({Future<void>? abortTrigger}) async {
|
||||
final response = await searchPluginTemplatesWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<List<PluginTemplateResponseDto>?> searchPluginTemplates() async {
|
||||
final response = await searchPluginTemplatesWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<PluginTemplateResponseDto>') as List)
|
||||
.cast<PluginTemplateResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<PluginTemplateResponseDto>') as List)
|
||||
.cast<PluginTemplateResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve a plugin
|
||||
/// List all plugins
|
||||
///
|
||||
/// Retrieve information about a specific plugin by its ID.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
/// Retrieve a list of plugins available to the authenticated user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getPluginWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/plugins/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] description:
|
||||
///
|
||||
/// * [bool] enabled:
|
||||
/// Whether the plugin is enabled
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Plugin ID
|
||||
///
|
||||
/// * [String] name:
|
||||
///
|
||||
/// * [String] title:
|
||||
///
|
||||
/// * [String] version:
|
||||
Future<Response> searchPluginsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? title, String? version, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/plugins';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (description != null) {
|
||||
queryParams.addAll(_queryParams('', 'description', description));
|
||||
}
|
||||
if (enabled != null) {
|
||||
queryParams.addAll(_queryParams('', 'enabled', enabled));
|
||||
}
|
||||
if (id != null) {
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
}
|
||||
if (name != null) {
|
||||
queryParams.addAll(_queryParams('', 'name', name));
|
||||
}
|
||||
if (title != null) {
|
||||
queryParams.addAll(_queryParams('', 'title', title));
|
||||
}
|
||||
if (version != null) {
|
||||
queryParams.addAll(_queryParams('', 'version', version));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a plugin
|
||||
/// List all plugins
|
||||
///
|
||||
/// Retrieve information about a specific plugin by its ID.
|
||||
/// Retrieve a list of plugins available to the authenticated user.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<PluginResponseDto> getPlugin(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getPluginWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] description:
|
||||
///
|
||||
/// * [bool] enabled:
|
||||
/// Whether the plugin is enabled
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Plugin ID
|
||||
///
|
||||
/// * [String] name:
|
||||
///
|
||||
/// * [String] title:
|
||||
///
|
||||
/// * [String] version:
|
||||
Future<List<PluginResponseDto>?> searchPlugins({ String? description, bool? enabled, String? id, String? name, String? title, String? version, }) async {
|
||||
final response = await searchPluginsWithHttpInfo( description: description, enabled: enabled, id: id, name: name, title: title, version: version, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'PluginResponseDto')
|
||||
as PluginResponseDto;
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<PluginResponseDto>') as List)
|
||||
.cast<PluginResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+229
-206
@@ -1,214 +1,55 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 QueuesApi {
|
||||
QueuesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getQueuesAddedIn = .new(2, 4, 0);
|
||||
|
||||
static const ApiState getQueuesState = .alpha;
|
||||
|
||||
static const ApiVersion getQueueAddedIn = .new(2, 4, 0);
|
||||
|
||||
static const ApiState getQueueState = .alpha;
|
||||
|
||||
static const ApiVersion updateQueueAddedIn = .new(2, 4, 0);
|
||||
|
||||
static const ApiState updateQueueState = .alpha;
|
||||
|
||||
static const ApiVersion emptyQueueAddedIn = .new(2, 4, 0);
|
||||
|
||||
static const ApiState emptyQueueState = .alpha;
|
||||
|
||||
static const ApiVersion getQueueJobsAddedIn = .new(2, 4, 0);
|
||||
|
||||
static const ApiState getQueueJobsState = .alpha;
|
||||
|
||||
/// List all queues
|
||||
///
|
||||
/// Retrieves a list of queues.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getQueuesWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/queues';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all queues
|
||||
///
|
||||
/// Retrieves a list of queues.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
Future<List<QueueResponseDto>> getQueues({Future<void>? abortTrigger}) async {
|
||||
final response = await getQueuesWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<QueueResponseDto>') as List)
|
||||
.cast<QueueResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Retrieve a queue
|
||||
///
|
||||
/// Retrieves a specific queue by its name.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getQueueWithHttpInfo(QueueName name, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/queues/{name}'.replaceAll('{name}', parameterToString(name));
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a queue
|
||||
///
|
||||
/// Retrieves a specific queue by its name.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
Future<QueueResponseDto> getQueue(QueueName name, {Future<void>? abortTrigger}) async {
|
||||
final response = await getQueueWithHttpInfo(name, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'QueueResponseDto')
|
||||
as QueueResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Update a queue
|
||||
///
|
||||
/// Change the paused status of a specific queue.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateQueueWithHttpInfo(
|
||||
QueueName name,
|
||||
QueueUpdateDto queueUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/queues/{name}'.replaceAll('{name}', parameterToString(name));
|
||||
|
||||
Object? postBody = queueUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update a queue
|
||||
///
|
||||
/// Change the paused status of a specific queue.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
Future<QueueResponseDto> updateQueue(
|
||||
QueueName name,
|
||||
QueueUpdateDto queueUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateQueueWithHttpInfo(name, queueUpdateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'QueueResponseDto')
|
||||
as QueueResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Empty a queue
|
||||
///
|
||||
/// Removes all jobs from the specified queue.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> emptyQueueWithHttpInfo(
|
||||
QueueName name,
|
||||
QueueDeleteDto queueDeleteDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/queues/{name}/jobs'.replaceAll('{name}', parameterToString(name));
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueDeleteDto] queueDeleteDto (required):
|
||||
Future<Response> emptyQueueWithHttpInfo(QueueName name, QueueDeleteDto queueDeleteDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/queues/{name}/jobs'
|
||||
.replaceAll('{name}', name.toString());
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = queueDeleteDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -216,28 +57,93 @@ class QueuesApi {
|
||||
///
|
||||
/// Removes all jobs from the specified queue.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
Future<void> emptyQueue(QueueName name, QueueDeleteDto queueDeleteDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await emptyQueueWithHttpInfo(name, queueDeleteDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueDeleteDto] queueDeleteDto (required):
|
||||
Future<void> emptyQueue(QueueName name, QueueDeleteDto queueDeleteDto,) async {
|
||||
final response = await emptyQueueWithHttpInfo(name, queueDeleteDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a queue
|
||||
///
|
||||
/// Retrieves a specific queue by its name.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
Future<Response> getQueueWithHttpInfo(QueueName name,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/queues/{name}'
|
||||
.replaceAll('{name}', name.toString());
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a queue
|
||||
///
|
||||
/// Retrieves a specific queue by its name.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
Future<QueueResponseDto?> getQueue(QueueName name,) async {
|
||||
final response = await getQueueWithHttpInfo(name,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve queue jobs
|
||||
///
|
||||
/// Retrieves a list of queue jobs from the specified queue.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getQueueJobsWithHttpInfo(
|
||||
QueueName name, {
|
||||
List<QueueJobStatus>? status,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/queues/{name}/jobs'.replaceAll('{name}', parameterToString(name));
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [List<QueueJobStatus>] status:
|
||||
/// Filter jobs by status
|
||||
Future<Response> getQueueJobsWithHttpInfo(QueueName name, { List<QueueJobStatus>? status, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/queues/{name}/jobs'
|
||||
.replaceAll('{name}', name.toString());
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -250,15 +156,15 @@ class QueuesApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -266,22 +172,139 @@ class QueuesApi {
|
||||
///
|
||||
/// Retrieves a list of queue jobs from the specified queue.
|
||||
///
|
||||
/// Available since server v2.4.0.
|
||||
Future<List<QueueJobResponseDto>> getQueueJobs(
|
||||
QueueName name, {
|
||||
List<QueueJobStatus>? status,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getQueueJobsWithHttpInfo(name, status: status, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [List<QueueJobStatus>] status:
|
||||
/// Filter jobs by status
|
||||
Future<List<QueueJobResponseDto>?> getQueueJobs(QueueName name, { List<QueueJobStatus>? status, }) async {
|
||||
final response = await getQueueJobsWithHttpInfo(name, status: status, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<QueueJobResponseDto>') as List)
|
||||
.cast<QueueJobResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<QueueJobResponseDto>') as List)
|
||||
.cast<QueueJobResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// List all queues
|
||||
///
|
||||
/// Retrieves a list of queues.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getQueuesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/queues';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all queues
|
||||
///
|
||||
/// Retrieves a list of queues.
|
||||
Future<List<QueueResponseDto>?> getQueues() async {
|
||||
final response = await getQueuesWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<QueueResponseDto>') as List)
|
||||
.cast<QueueResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a queue
|
||||
///
|
||||
/// Change the paused status of a specific queue.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueUpdateDto] queueUpdateDto (required):
|
||||
Future<Response> updateQueueWithHttpInfo(QueueName name, QueueUpdateDto queueUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/queues/{name}'
|
||||
.replaceAll('{name}', name.toString());
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = queueUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update a queue
|
||||
///
|
||||
/// Change the paused status of a specific queue.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [QueueName] name (required):
|
||||
///
|
||||
/// * [QueueUpdateDto] queueUpdateDto (required):
|
||||
Future<QueueResponseDto?> updateQueue(QueueName name, QueueUpdateDto queueUpdateDto,) async {
|
||||
final response = await updateQueueWithHttpInfo(name, queueUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+566
-432
File diff suppressed because it is too large
Load Diff
Generated
+446
-472
File diff suppressed because it is too large
Load Diff
Generated
+215
-204
@@ -1,154 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 SessionsApi {
|
||||
SessionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deleteAllSessionsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteAllSessionsState = .stable;
|
||||
|
||||
static const ApiVersion getSessionsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getSessionsState = .stable;
|
||||
|
||||
static const ApiVersion createSessionAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createSessionState = .stable;
|
||||
|
||||
static const ApiVersion deleteSessionAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteSessionState = .stable;
|
||||
|
||||
static const ApiVersion updateSessionAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateSessionState = .stable;
|
||||
|
||||
static const ApiVersion lockSessionAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState lockSessionState = .stable;
|
||||
|
||||
/// Delete all sessions
|
||||
///
|
||||
/// Delete all sessions for the user. This will not delete the current session.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteAllSessionsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/sessions';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete all sessions
|
||||
///
|
||||
/// Delete all sessions for the user. This will not delete the current session.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteAllSessions({Future<void>? abortTrigger}) async {
|
||||
final response = await deleteAllSessionsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve sessions
|
||||
///
|
||||
/// Retrieve a list of sessions for the user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getSessionsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/sessions';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve sessions
|
||||
///
|
||||
/// Retrieve a list of sessions for the user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<SessionResponseDto>> getSessions({Future<void>? abortTrigger}) async {
|
||||
final response = await getSessionsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<SessionResponseDto>') as List)
|
||||
.cast<SessionResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a session
|
||||
///
|
||||
/// Create a session as a child to the current session. This endpoint is used for casting.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createSessionWithHttpInfo(SessionCreateDto sessionCreateDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SessionCreateDto] sessionCreateDto (required):
|
||||
Future<Response> createSessionWithHttpInfo(SessionCreateDto sessionCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sessions';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = sessionCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -156,32 +54,34 @@ class SessionsApi {
|
||||
///
|
||||
/// Create a session as a child to the current session. This endpoint is used for casting.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SessionCreateResponseDto> createSession(
|
||||
SessionCreateDto sessionCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await createSessionWithHttpInfo(sessionCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SessionCreateDto] sessionCreateDto (required):
|
||||
Future<SessionCreateResponseDto?> createSession(SessionCreateDto sessionCreateDto,) async {
|
||||
final response = await createSessionWithHttpInfo(sessionCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SessionCreateResponseDto')
|
||||
as SessionCreateResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionCreateResponseDto',) as SessionCreateResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete a session
|
||||
/// Delete all sessions
|
||||
///
|
||||
/// Delete a specific session by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Delete all sessions for the user. This will not delete the current session.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteSessionWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/sessions/{id}'.replaceAll('{id}', id);
|
||||
Future<Response> deleteAllSessionsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sessions';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -190,15 +90,60 @@ class SessionsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete all sessions
|
||||
///
|
||||
/// Delete all sessions for the user. This will not delete the current session.
|
||||
Future<void> deleteAllSessions() async {
|
||||
final response = await deleteAllSessionsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete a session
|
||||
///
|
||||
/// Delete a specific session by id.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteSessionWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sessions/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -206,9 +151,111 @@ class SessionsApi {
|
||||
///
|
||||
/// Delete a specific session by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteSession(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteSessionWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteSession(String id,) async {
|
||||
final response = await deleteSessionWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve sessions
|
||||
///
|
||||
/// Retrieve a list of sessions for the user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getSessionsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sessions';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve sessions
|
||||
///
|
||||
/// Retrieve a list of sessions for the user.
|
||||
Future<List<SessionResponseDto>?> getSessions() async {
|
||||
final response = await getSessionsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<SessionResponseDto>') as List)
|
||||
.cast<SessionResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Lock a session
|
||||
///
|
||||
/// Lock a specific session by id.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> lockSessionWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sessions/{id}/lock'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Lock a session
|
||||
///
|
||||
/// Lock a specific session by id.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> lockSession(String id,) async {
|
||||
final response = await lockSessionWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -218,33 +265,36 @@ class SessionsApi {
|
||||
///
|
||||
/// Update a specific session identified by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateSessionWithHttpInfo(
|
||||
String id,
|
||||
SessionUpdateDto sessionUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/sessions/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [SessionUpdateDto] sessionUpdateDto (required):
|
||||
Future<Response> updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sessions/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = sessionUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -252,62 +302,23 @@ class SessionsApi {
|
||||
///
|
||||
/// Update a specific session identified by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SessionResponseDto> updateSession(
|
||||
String id,
|
||||
SessionUpdateDto sessionUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [SessionUpdateDto] sessionUpdateDto (required):
|
||||
Future<SessionResponseDto?> updateSession(String id, SessionUpdateDto sessionUpdateDto,) async {
|
||||
final response = await updateSessionWithHttpInfo(id, sessionUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SessionResponseDto')
|
||||
as SessionResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Lock a session
|
||||
///
|
||||
/// Lock a specific session by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> lockSessionWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/sessions/{id}/lock'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Lock a session
|
||||
///
|
||||
/// Lock a specific session by id.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> lockSession(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await lockSessionWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionResponseDto',) as SessionResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+408
-366
@@ -1,58 +1,159 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 SharedLinksApi {
|
||||
SharedLinksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getAllSharedLinksAddedIn = .new(1, 0, 0);
|
||||
/// Add assets to a shared link
|
||||
///
|
||||
/// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetIdsDto] assetIdsDto (required):
|
||||
Future<Response> addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
static const ApiState getAllSharedLinksState = .stable;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = assetIdsDto;
|
||||
|
||||
static const ApiVersion createSharedLinkAddedIn = .new(1, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState createSharedLinkState = .stable;
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
static const ApiVersion sharedLinkLoginAddedIn = .new(2, 6, 0);
|
||||
|
||||
static const ApiState sharedLinkLoginState = .beta;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion getMySharedLinkAddedIn = .new(1, 0, 0);
|
||||
/// Add assets to a shared link
|
||||
///
|
||||
/// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetIdsDto] assetIdsDto (required):
|
||||
Future<List<AssetIdsResponseDto>?> addSharedLinkAssets(String id, AssetIdsDto assetIdsDto,) async {
|
||||
final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AssetIdsResponseDto>') as List)
|
||||
.cast<AssetIdsResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
static const ApiState getMySharedLinkState = .stable;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static const ApiVersion removeSharedLinkAddedIn = .new(1, 0, 0);
|
||||
/// Create a shared link
|
||||
///
|
||||
/// Create a new shared link.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SharedLinkCreateDto] sharedLinkCreateDto (required):
|
||||
Future<Response> createSharedLinkWithHttpInfo(SharedLinkCreateDto sharedLinkCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links';
|
||||
|
||||
static const ApiState removeSharedLinkState = .stable;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = sharedLinkCreateDto;
|
||||
|
||||
static const ApiVersion getSharedLinkByIdAddedIn = .new(1, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState getSharedLinkByIdState = .stable;
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
static const ApiVersion updateSharedLinkAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateSharedLinkState = .stable;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion removeSharedLinkAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState removeSharedLinkAssetsState = .stable;
|
||||
|
||||
static const ApiVersion addSharedLinkAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState addSharedLinkAssetsState = .stable;
|
||||
/// Create a shared link
|
||||
///
|
||||
/// Create a new shared link.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SharedLinkCreateDto] sharedLinkCreateDto (required):
|
||||
Future<SharedLinkResponseDto?> createSharedLink(SharedLinkCreateDto sharedLinkCreateDto,) async {
|
||||
final response = await createSharedLinkWithHttpInfo(sharedLinkCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve all shared links
|
||||
///
|
||||
/// Retrieve a list of all shared links.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAllSharedLinksWithHttpInfo({String? albumId, String? id, Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId:
|
||||
/// Filter by album ID
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Filter by shared link ID
|
||||
Future<Response> getAllSharedLinksWithHttpInfo({ String? albumId, String? id, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -68,15 +169,15 @@ class SharedLinksApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -84,93 +185,286 @@ class SharedLinksApi {
|
||||
///
|
||||
/// Retrieve a list of all shared links.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<SharedLinkResponseDto>> getAllSharedLinks({
|
||||
String? albumId,
|
||||
String? id,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getAllSharedLinksWithHttpInfo(albumId: albumId, id: id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId:
|
||||
/// Filter by album ID
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Filter by shared link ID
|
||||
Future<List<SharedLinkResponseDto>?> getAllSharedLinks({ String? albumId, String? id, }) async {
|
||||
final response = await getAllSharedLinksWithHttpInfo( albumId: albumId, id: id, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<SharedLinkResponseDto>') as List)
|
||||
.cast<SharedLinkResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<SharedLinkResponseDto>') as List)
|
||||
.cast<SharedLinkResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a shared link
|
||||
/// Retrieve current shared link
|
||||
///
|
||||
/// Create a new shared link.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Retrieve the current shared link associated with authentication method.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createSharedLinkWithHttpInfo(
|
||||
SharedLinkCreateDto sharedLinkCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/shared-links';
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<Response> getMySharedLinkWithHttpInfo({ String? key, String? slug, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/me';
|
||||
|
||||
Object? postBody = sharedLinkCreateDto;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
if (key != null) {
|
||||
queryParams.addAll(_queryParams('', 'key', key));
|
||||
}
|
||||
if (slug != null) {
|
||||
queryParams.addAll(_queryParams('', 'slug', slug));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a shared link
|
||||
/// Retrieve current shared link
|
||||
///
|
||||
/// Create a new shared link.
|
||||
/// Retrieve the current shared link associated with authentication method.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SharedLinkResponseDto> createSharedLink(
|
||||
SharedLinkCreateDto sharedLinkCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await createSharedLinkWithHttpInfo(sharedLinkCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<SharedLinkResponseDto?> getMySharedLink({ String? key, String? slug, }) async {
|
||||
final response = await getMySharedLinkWithHttpInfo( key: key, slug: slug, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SharedLinkResponseDto')
|
||||
as SharedLinkResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve a shared link
|
||||
///
|
||||
/// Retrieve a specific shared link by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getSharedLinkByIdWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a shared link
|
||||
///
|
||||
/// Retrieve a specific shared link by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<SharedLinkResponseDto?> getSharedLinkById(String id,) async {
|
||||
final response = await getSharedLinkByIdWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete a shared link
|
||||
///
|
||||
/// Delete a specific shared link by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> removeSharedLinkWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a shared link
|
||||
///
|
||||
/// Delete a specific shared link by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> removeSharedLink(String id,) async {
|
||||
final response = await removeSharedLinkWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Remove assets from a shared link
|
||||
///
|
||||
/// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetIdsDto] assetIdsDto (required):
|
||||
Future<Response> removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = assetIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove assets from a shared link
|
||||
///
|
||||
/// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AssetIdsDto] assetIdsDto (required):
|
||||
Future<List<AssetIdsResponseDto>?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto,) async {
|
||||
final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AssetIdsResponseDto>') as List)
|
||||
.cast<AssetIdsResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Shared link login
|
||||
///
|
||||
/// Login to a password protected shared link
|
||||
///
|
||||
/// Available since server v2.6.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> sharedLinkLoginWithHttpInfo(
|
||||
SharedLinkLoginDto sharedLinkLoginDto, {
|
||||
String? key,
|
||||
String? slug,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SharedLinkLoginDto] sharedLinkLoginDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<Response> sharedLinkLoginWithHttpInfo(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/login';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = sharedLinkLoginDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -184,17 +478,17 @@ class SharedLinksApi {
|
||||
queryParams.addAll(_queryParams('', 'slug', slug));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -202,203 +496,62 @@ class SharedLinksApi {
|
||||
///
|
||||
/// Login to a password protected shared link
|
||||
///
|
||||
/// Available since server v2.6.0.
|
||||
Future<SharedLinkResponseDto> sharedLinkLogin(
|
||||
SharedLinkLoginDto sharedLinkLoginDto, {
|
||||
String? key,
|
||||
String? slug,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await sharedLinkLoginWithHttpInfo(
|
||||
sharedLinkLoginDto,
|
||||
key: key,
|
||||
slug: slug,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SharedLinkLoginDto] sharedLinkLoginDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [String] slug:
|
||||
Future<SharedLinkResponseDto?> sharedLinkLogin(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, }) async {
|
||||
final response = await sharedLinkLoginWithHttpInfo(sharedLinkLoginDto, key: key, slug: slug, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SharedLinkResponseDto')
|
||||
as SharedLinkResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Retrieve current shared link
|
||||
///
|
||||
/// Retrieve the current shared link associated with authentication method.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getMySharedLinkWithHttpInfo({String? key, String? slug, Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/shared-links/me';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (key != null) {
|
||||
queryParams.addAll(_queryParams('', 'key', key));
|
||||
}
|
||||
if (slug != null) {
|
||||
queryParams.addAll(_queryParams('', 'slug', slug));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve current shared link
|
||||
///
|
||||
/// Retrieve the current shared link associated with authentication method.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SharedLinkResponseDto> getMySharedLink({String? key, String? slug, Future<void>? abortTrigger}) async {
|
||||
final response = await getMySharedLinkWithHttpInfo(key: key, slug: slug, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SharedLinkResponseDto')
|
||||
as SharedLinkResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Delete a shared link
|
||||
///
|
||||
/// Delete a specific shared link by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> removeSharedLinkWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/shared-links/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a shared link
|
||||
///
|
||||
/// Delete a specific shared link by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> removeSharedLink(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await removeSharedLinkWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a shared link
|
||||
///
|
||||
/// Retrieve a specific shared link by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getSharedLinkByIdWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/shared-links/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a shared link
|
||||
///
|
||||
/// Retrieve a specific shared link by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SharedLinkResponseDto> getSharedLinkById(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getSharedLinkByIdWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SharedLinkResponseDto')
|
||||
as SharedLinkResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a shared link
|
||||
///
|
||||
/// Update an existing shared link by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateSharedLinkWithHttpInfo(
|
||||
String id,
|
||||
SharedLinkEditDto sharedLinkEditDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/shared-links/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [SharedLinkEditDto] sharedLinkEditDto (required):
|
||||
Future<Response> updateSharedLinkWithHttpInfo(String id, SharedLinkEditDto sharedLinkEditDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/shared-links/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = sharedLinkEditDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PATCH',
|
||||
'PATCH',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -406,134 +559,23 @@ class SharedLinksApi {
|
||||
///
|
||||
/// Update an existing shared link by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SharedLinkResponseDto> updateSharedLink(
|
||||
String id,
|
||||
SharedLinkEditDto sharedLinkEditDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateSharedLinkWithHttpInfo(id, sharedLinkEditDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [SharedLinkEditDto] sharedLinkEditDto (required):
|
||||
Future<SharedLinkResponseDto?> updateSharedLink(String id, SharedLinkEditDto sharedLinkEditDto,) async {
|
||||
final response = await updateSharedLinkWithHttpInfo(id, sharedLinkEditDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SharedLinkResponseDto')
|
||||
as SharedLinkResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Remove assets from a shared link
|
||||
///
|
||||
/// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> removeSharedLinkAssetsWithHttpInfo(
|
||||
String id,
|
||||
AssetIdsDto assetIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/shared-links/{id}/assets'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = assetIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove assets from a shared link
|
||||
///
|
||||
/// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<AssetIdsResponseDto>> removeSharedLinkAssets(
|
||||
String id,
|
||||
AssetIdsDto assetIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<AssetIdsResponseDto>') as List)
|
||||
.cast<AssetIdsResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Add assets to a shared link
|
||||
///
|
||||
/// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> addSharedLinkAssetsWithHttpInfo(
|
||||
String id,
|
||||
AssetIdsDto assetIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/shared-links/{id}/assets'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = assetIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Add assets to a shared link
|
||||
///
|
||||
/// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<AssetIdsResponseDto>> addSharedLinkAssets(
|
||||
String id,
|
||||
AssetIdsDto assetIdsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<AssetIdsResponseDto>') as List)
|
||||
.cast<AssetIdsResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+277
-230
@@ -1,67 +1,157 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 StacksApi {
|
||||
StacksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deleteStacksAddedIn = .new(1, 0, 0);
|
||||
/// Create a stack
|
||||
///
|
||||
/// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [StackCreateDto] stackCreateDto (required):
|
||||
Future<Response> createStackWithHttpInfo(StackCreateDto stackCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks';
|
||||
|
||||
static const ApiState deleteStacksState = .stable;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = stackCreateDto;
|
||||
|
||||
static const ApiVersion searchStacksAddedIn = .new(1, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState searchStacksState = .stable;
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
static const ApiVersion createStackAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createStackState = .stable;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion deleteStackAddedIn = .new(1, 0, 0);
|
||||
/// Create a stack
|
||||
///
|
||||
/// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [StackCreateDto] stackCreateDto (required):
|
||||
Future<StackResponseDto?> createStack(StackCreateDto stackCreateDto,) async {
|
||||
final response = await createStackWithHttpInfo(stackCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static const ApiState deleteStackState = .stable;
|
||||
/// Delete a stack
|
||||
///
|
||||
/// Delete a specific stack by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteStackWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
static const ApiVersion getStackAddedIn = .new(1, 0, 0);
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
static const ApiState getStackState = .stable;
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiVersion updateStackAddedIn = .new(1, 0, 0);
|
||||
const contentTypes = <String>[];
|
||||
|
||||
static const ApiState updateStackState = .stable;
|
||||
|
||||
static const ApiVersion removeAssetFromStackAddedIn = .new(1, 0, 0);
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiState removeAssetFromStackState = .stable;
|
||||
/// Delete a stack
|
||||
///
|
||||
/// Delete a specific stack by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteStack(String id,) async {
|
||||
final response = await deleteStackWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete stacks
|
||||
///
|
||||
/// Delete multiple stacks by providing a list of stack IDs.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteStacksWithHttpInfo(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> deleteStacksWithHttpInfo(BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,9 +159,122 @@ class StacksApi {
|
||||
///
|
||||
/// Delete multiple stacks by providing a list of stack IDs.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteStacks(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteStacksWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<void> deleteStacks(BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await deleteStacksWithHttpInfo(bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a stack
|
||||
///
|
||||
/// Retrieve a specific stack by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getStackWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a stack
|
||||
///
|
||||
/// Retrieve a specific stack by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<StackResponseDto?> getStack(String id,) async {
|
||||
final response = await getStackWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Remove an asset from a stack
|
||||
///
|
||||
/// Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] assetId (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> removeAssetFromStackWithHttpInfo(String assetId, String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks/{id}/assets/{assetId}'
|
||||
.replaceAll('{assetId}', assetId)
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove an asset from a stack
|
||||
///
|
||||
/// Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] assetId (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> removeAssetFromStack(String assetId, String id,) async {
|
||||
final response = await removeAssetFromStackWithHttpInfo(assetId, id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -81,12 +284,17 @@ class StacksApi {
|
||||
///
|
||||
/// Retrieve a list of stacks.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchStacksWithHttpInfo({String? primaryAssetId, Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] primaryAssetId:
|
||||
/// Filter by primary asset ID
|
||||
Future<Response> searchStacksWithHttpInfo({ String? primaryAssetId, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -99,15 +307,15 @@ class StacksApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -115,188 +323,62 @@ class StacksApi {
|
||||
///
|
||||
/// Retrieve a list of stacks.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<StackResponseDto>> searchStacks({String? primaryAssetId, Future<void>? abortTrigger}) async {
|
||||
final response = await searchStacksWithHttpInfo(primaryAssetId: primaryAssetId, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] primaryAssetId:
|
||||
/// Filter by primary asset ID
|
||||
Future<List<StackResponseDto>?> searchStacks({ String? primaryAssetId, }) async {
|
||||
final response = await searchStacksWithHttpInfo( primaryAssetId: primaryAssetId, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<StackResponseDto>') as List)
|
||||
.cast<StackResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<StackResponseDto>') as List)
|
||||
.cast<StackResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a stack
|
||||
///
|
||||
/// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createStackWithHttpInfo(StackCreateDto stackCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/stacks';
|
||||
|
||||
Object? postBody = stackCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a stack
|
||||
///
|
||||
/// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<StackResponseDto> createStack(StackCreateDto stackCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createStackWithHttpInfo(stackCreateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'StackResponseDto')
|
||||
as StackResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Delete a stack
|
||||
///
|
||||
/// Delete a specific stack by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteStackWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/stacks/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a stack
|
||||
///
|
||||
/// Delete a specific stack by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteStack(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteStackWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a stack
|
||||
///
|
||||
/// Retrieve a specific stack by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getStackWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/stacks/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a stack
|
||||
///
|
||||
/// Retrieve a specific stack by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<StackResponseDto> getStack(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getStackWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'StackResponseDto')
|
||||
as StackResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a stack
|
||||
///
|
||||
/// Update an existing stack by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateStackWithHttpInfo(
|
||||
String id,
|
||||
StackUpdateDto stackUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/stacks/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [StackUpdateDto] stackUpdateDto (required):
|
||||
Future<Response> updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/stacks/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = stackUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -304,58 +386,23 @@ class StacksApi {
|
||||
///
|
||||
/// Update an existing stack by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<StackResponseDto> updateStack(String id, StackUpdateDto stackUpdateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [StackUpdateDto] stackUpdateDto (required):
|
||||
Future<StackResponseDto?> updateStack(String id, StackUpdateDto stackUpdateDto,) async {
|
||||
final response = await updateStackWithHttpInfo(id, stackUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'StackResponseDto')
|
||||
as StackResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Remove an asset from a stack
|
||||
///
|
||||
/// Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> removeAssetFromStackWithHttpInfo(String assetId, String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/stacks/{id}/assets/{assetId}'.replaceAll('{assetId}', assetId).replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove an asset from a stack
|
||||
///
|
||||
/// Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> removeAssetFromStack(String assetId, String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await removeAssetFromStackWithHttpInfo(assetId, id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+102
-89
@@ -1,55 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 SyncApi {
|
||||
SyncApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion deleteSyncAckAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteSyncAckState = .stable;
|
||||
|
||||
static const ApiVersion getSyncAckAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getSyncAckState = .stable;
|
||||
|
||||
static const ApiVersion sendSyncAckAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState sendSyncAckState = .stable;
|
||||
|
||||
static const ApiVersion getSyncStreamAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getSyncStreamState = .stable;
|
||||
|
||||
/// Delete acknowledgements
|
||||
///
|
||||
/// Delete specific synchronization acknowledgments.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteSyncAckWithHttpInfo(SyncAckDeleteDto syncAckDeleteDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SyncAckDeleteDto] syncAckDeleteDto (required):
|
||||
Future<Response> deleteSyncAckWithHttpInfo(SyncAckDeleteDto syncAckDeleteDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sync/ack';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = syncAckDeleteDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,9 +54,11 @@ class SyncApi {
|
||||
///
|
||||
/// Delete specific synchronization acknowledgments.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteSyncAck(SyncAckDeleteDto syncAckDeleteDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteSyncAckWithHttpInfo(syncAckDeleteDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SyncAckDeleteDto] syncAckDeleteDto (required):
|
||||
Future<void> deleteSyncAck(SyncAckDeleteDto syncAckDeleteDto,) async {
|
||||
final response = await deleteSyncAckWithHttpInfo(syncAckDeleteDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -69,12 +68,12 @@ class SyncApi {
|
||||
///
|
||||
/// Retrieve the synchronization acknowledgments for the current session.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getSyncAckWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getSyncAckWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sync/ack';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -83,106 +82,70 @@ class SyncApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve acknowledgements
|
||||
///
|
||||
/// Retrieve the synchronization acknowledgments for the current session.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<SyncAckDto>> getSyncAck({Future<void>? abortTrigger}) async {
|
||||
final response = await getSyncAckWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<List<SyncAckDto>?> getSyncAck() async {
|
||||
final response = await getSyncAckWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<SyncAckDto>') as List).cast<SyncAckDto>().toList(
|
||||
growable: false,
|
||||
);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Acknowledge changes
|
||||
///
|
||||
/// Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> sendSyncAckWithHttpInfo(SyncAckSetDto syncAckSetDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/sync/ack';
|
||||
|
||||
Object? postBody = syncAckSetDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Acknowledge changes
|
||||
///
|
||||
/// Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> sendSyncAck(SyncAckSetDto syncAckSetDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await sendSyncAckWithHttpInfo(syncAckSetDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<SyncAckDto>') as List)
|
||||
.cast<SyncAckDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Stream sync changes
|
||||
///
|
||||
/// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getSyncStreamWithHttpInfo(SyncStreamDto syncStreamDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SyncStreamDto] syncStreamDto (required):
|
||||
Future<Response> getSyncStreamWithHttpInfo(SyncStreamDto syncStreamDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sync/stream';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = syncStreamDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -190,9 +153,59 @@ class SyncApi {
|
||||
///
|
||||
/// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> getSyncStream(SyncStreamDto syncStreamDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await getSyncStreamWithHttpInfo(syncStreamDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SyncStreamDto] syncStreamDto (required):
|
||||
Future<void> getSyncStream(SyncStreamDto syncStreamDto,) async {
|
||||
final response = await getSyncStreamWithHttpInfo(syncStreamDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Acknowledge changes
|
||||
///
|
||||
/// Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SyncAckSetDto] syncAckSetDto (required):
|
||||
Future<Response> sendSyncAckWithHttpInfo(SyncAckSetDto syncAckSetDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/sync/ack';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = syncAckSetDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Acknowledge changes
|
||||
///
|
||||
/// Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SyncAckSetDto] syncAckSetDto (required):
|
||||
Future<void> sendSyncAck(SyncAckSetDto syncAckSetDto,) async {
|
||||
final response = await sendSyncAckWithHttpInfo(syncAckSetDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
+139
-131
@@ -1,38 +1,31 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 SystemConfigApi {
|
||||
SystemConfigApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getConfigAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getConfigState = .stable;
|
||||
|
||||
static const ApiVersion updateConfigAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateConfigState = .stable;
|
||||
|
||||
static const ApiVersion getConfigDefaultsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getConfigDefaultsState = .stable;
|
||||
|
||||
static const ApiVersion getStorageTemplateOptionsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getStorageTemplateOptionsState = .stable;
|
||||
|
||||
/// Get system configuration
|
||||
///
|
||||
/// Retrieve the current system configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getConfigWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getConfigWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-config';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -41,61 +34,163 @@ class SystemConfigApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get system configuration
|
||||
///
|
||||
/// Retrieve the current system configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SystemConfigDto> getConfig({Future<void>? abortTrigger}) async {
|
||||
final response = await getConfigWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<SystemConfigDto?> getConfig() async {
|
||||
final response = await getConfigWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SystemConfigDto') as SystemConfigDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get system configuration defaults
|
||||
///
|
||||
/// Retrieve the default values for the system configuration.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getConfigDefaultsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-config/defaults';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get system configuration defaults
|
||||
///
|
||||
/// Retrieve the default values for the system configuration.
|
||||
Future<SystemConfigDto?> getConfigDefaults() async {
|
||||
final response = await getConfigDefaultsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get storage template options
|
||||
///
|
||||
/// Retrieve exemplary storage template options.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getStorageTemplateOptionsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-config/storage-template-options';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get storage template options
|
||||
///
|
||||
/// Retrieve exemplary storage template options.
|
||||
Future<SystemConfigTemplateStorageOptionDto?> getStorageTemplateOptions() async {
|
||||
final response = await getStorageTemplateOptionsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigTemplateStorageOptionDto',) as SystemConfigTemplateStorageOptionDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update system configuration
|
||||
///
|
||||
/// Update the system configuration with a new system configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateConfigWithHttpInfo(SystemConfigDto systemConfigDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigDto] systemConfigDto (required):
|
||||
Future<Response> updateConfigWithHttpInfo(SystemConfigDto systemConfigDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-config';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = systemConfigDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -103,108 +198,21 @@ class SystemConfigApi {
|
||||
///
|
||||
/// Update the system configuration with a new system configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SystemConfigDto> updateConfig(SystemConfigDto systemConfigDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await updateConfigWithHttpInfo(systemConfigDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [SystemConfigDto] systemConfigDto (required):
|
||||
Future<SystemConfigDto?> updateConfig(SystemConfigDto systemConfigDto,) async {
|
||||
final response = await updateConfigWithHttpInfo(systemConfigDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SystemConfigDto') as SystemConfigDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Get system configuration defaults
|
||||
///
|
||||
/// Retrieve the default values for the system configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getConfigDefaultsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/system-config/defaults';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get system configuration defaults
|
||||
///
|
||||
/// Retrieve the default values for the system configuration.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SystemConfigDto> getConfigDefaults({Future<void>? abortTrigger}) async {
|
||||
final response = await getConfigDefaultsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SystemConfigDto') as SystemConfigDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Get storage template options
|
||||
///
|
||||
/// Retrieve exemplary storage template options.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getStorageTemplateOptionsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/system-config/storage-template-options';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get storage template options
|
||||
///
|
||||
/// Retrieve exemplary storage template options.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<SystemConfigTemplateStorageOptionDto> getStorageTemplateOptions({Future<void>? abortTrigger}) async {
|
||||
final response = await getStorageTemplateOptionsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'SystemConfigTemplateStorageOptionDto')
|
||||
as SystemConfigTemplateStorageOptionDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+133
-137
@@ -1,38 +1,31 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 SystemMetadataApi {
|
||||
SystemMetadataApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getAdminOnboardingAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getAdminOnboardingState = .stable;
|
||||
|
||||
static const ApiVersion updateAdminOnboardingAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateAdminOnboardingState = .stable;
|
||||
|
||||
static const ApiVersion getReverseGeocodingStateAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getReverseGeocodingStateState = .stable;
|
||||
|
||||
static const ApiVersion getVersionCheckStateAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getVersionCheckStateState = .stable;
|
||||
|
||||
/// Retrieve admin onboarding
|
||||
///
|
||||
/// Retrieve the current admin onboarding status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAdminOnboardingWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getAdminOnboardingWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-metadata/admin-onboarding';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -41,65 +34,163 @@ class SystemMetadataApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve admin onboarding
|
||||
///
|
||||
/// Retrieve the current admin onboarding status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<AdminOnboardingUpdateDto> getAdminOnboarding({Future<void>? abortTrigger}) async {
|
||||
final response = await getAdminOnboardingWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<AdminOnboardingUpdateDto?> getAdminOnboarding() async {
|
||||
final response = await getAdminOnboardingWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'AdminOnboardingUpdateDto')
|
||||
as AdminOnboardingUpdateDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AdminOnboardingUpdateDto',) as AdminOnboardingUpdateDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve reverse geocoding state
|
||||
///
|
||||
/// Retrieve the current state of the reverse geocoding import.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getReverseGeocodingStateWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-metadata/reverse-geocoding-state';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve reverse geocoding state
|
||||
///
|
||||
/// Retrieve the current state of the reverse geocoding import.
|
||||
Future<ReverseGeocodingStateResponseDto?> getReverseGeocodingState() async {
|
||||
final response = await getReverseGeocodingStateWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ReverseGeocodingStateResponseDto',) as ReverseGeocodingStateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve version check state
|
||||
///
|
||||
/// Retrieve the current state of the version check process.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getVersionCheckStateWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-metadata/version-check-state';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve version check state
|
||||
///
|
||||
/// Retrieve the current state of the version check process.
|
||||
Future<VersionCheckStateResponseDto?> getVersionCheckState() async {
|
||||
final response = await getVersionCheckStateWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update admin onboarding
|
||||
///
|
||||
/// Update the admin onboarding status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateAdminOnboardingWithHttpInfo(
|
||||
AdminOnboardingUpdateDto adminOnboardingUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required):
|
||||
Future<Response> updateAdminOnboardingWithHttpInfo(AdminOnboardingUpdateDto adminOnboardingUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/system-metadata/admin-onboarding';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = adminOnboardingUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -107,108 +198,13 @@ class SystemMetadataApi {
|
||||
///
|
||||
/// Update the admin onboarding status.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> updateAdminOnboarding(
|
||||
AdminOnboardingUpdateDto adminOnboardingUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateAdminOnboardingWithHttpInfo(adminOnboardingUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required):
|
||||
Future<void> updateAdminOnboarding(AdminOnboardingUpdateDto adminOnboardingUpdateDto,) async {
|
||||
final response = await updateAdminOnboardingWithHttpInfo(adminOnboardingUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve reverse geocoding state
|
||||
///
|
||||
/// Retrieve the current state of the reverse geocoding import.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getReverseGeocodingStateWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/system-metadata/reverse-geocoding-state';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve reverse geocoding state
|
||||
///
|
||||
/// Retrieve the current state of the reverse geocoding import.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<ReverseGeocodingStateResponseDto> getReverseGeocodingState({Future<void>? abortTrigger}) async {
|
||||
final response = await getReverseGeocodingStateWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'ReverseGeocodingStateResponseDto')
|
||||
as ReverseGeocodingStateResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Retrieve version check state
|
||||
///
|
||||
/// Retrieve the current state of the version check process.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getVersionCheckStateWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/system-metadata/version-check-state';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve version check state
|
||||
///
|
||||
/// Retrieve the current state of the version check process.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<VersionCheckStateResponseDto> getVersionCheckState({Future<void>? abortTrigger}) async {
|
||||
final response = await getVersionCheckStateWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'VersionCheckStateResponseDto')
|
||||
as VersionCheckStateResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+361
-297
@@ -1,219 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 TagsApi {
|
||||
TagsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getAllTagsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getAllTagsState = .stable;
|
||||
|
||||
static const ApiVersion createTagAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createTagState = .stable;
|
||||
|
||||
static const ApiVersion upsertTagsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState upsertTagsState = .stable;
|
||||
|
||||
static const ApiVersion bulkTagAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState bulkTagAssetsState = .stable;
|
||||
|
||||
static const ApiVersion deleteTagAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteTagState = .stable;
|
||||
|
||||
static const ApiVersion getTagByIdAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getTagByIdState = .stable;
|
||||
|
||||
static const ApiVersion updateTagAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateTagState = .stable;
|
||||
|
||||
static const ApiVersion untagAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState untagAssetsState = .stable;
|
||||
|
||||
static const ApiVersion tagAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState tagAssetsState = .stable;
|
||||
|
||||
/// Retrieve tags
|
||||
///
|
||||
/// Retrieve a list of all tags.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAllTagsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve tags
|
||||
///
|
||||
/// Retrieve a list of all tags.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<TagResponseDto>> getAllTags({Future<void>? abortTrigger}) async {
|
||||
final response = await getAllTagsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<TagResponseDto>') as List)
|
||||
.cast<TagResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a tag
|
||||
///
|
||||
/// Create a new tag by providing a name and optional color.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createTagWithHttpInfo(TagCreateDto tagCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags';
|
||||
|
||||
Object? postBody = tagCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a tag
|
||||
///
|
||||
/// Create a new tag by providing a name and optional color.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TagResponseDto> createTag(TagCreateDto tagCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createTagWithHttpInfo(tagCreateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TagResponseDto') as TagResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Upsert tags
|
||||
///
|
||||
/// Create or update multiple tags in a single request.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> upsertTagsWithHttpInfo(TagUpsertDto tagUpsertDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags';
|
||||
|
||||
Object? postBody = tagUpsertDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Upsert tags
|
||||
///
|
||||
/// Create or update multiple tags in a single request.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<TagResponseDto>> upsertTags(TagUpsertDto tagUpsertDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await upsertTagsWithHttpInfo(tagUpsertDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<TagResponseDto>') as List)
|
||||
.cast<TagResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Tag assets
|
||||
///
|
||||
/// Add multiple tags to multiple assets in a single request.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> bulkTagAssetsWithHttpInfo(TagBulkAssetsDto tagBulkAssetsDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [TagBulkAssetsDto] tagBulkAssetsDto (required):
|
||||
Future<Response> bulkTagAssetsWithHttpInfo(TagBulkAssetsDto tagBulkAssetsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags/assets';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = tagBulkAssetsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -221,32 +54,95 @@ class TagsApi {
|
||||
///
|
||||
/// Add multiple tags to multiple assets in a single request.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TagBulkAssetsResponseDto> bulkTagAssets(
|
||||
TagBulkAssetsDto tagBulkAssetsDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await bulkTagAssetsWithHttpInfo(tagBulkAssetsDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [TagBulkAssetsDto] tagBulkAssetsDto (required):
|
||||
Future<TagBulkAssetsResponseDto?> bulkTagAssets(TagBulkAssetsDto tagBulkAssetsDto,) async {
|
||||
final response = await bulkTagAssetsWithHttpInfo(tagBulkAssetsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TagBulkAssetsResponseDto')
|
||||
as TagBulkAssetsResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagBulkAssetsResponseDto',) as TagBulkAssetsResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a tag
|
||||
///
|
||||
/// Create a new tag by providing a name and optional color.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [TagCreateDto] tagCreateDto (required):
|
||||
Future<Response> createTagWithHttpInfo(TagCreateDto tagCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = tagCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a tag
|
||||
///
|
||||
/// Create a new tag by providing a name and optional color.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [TagCreateDto] tagCreateDto (required):
|
||||
Future<TagResponseDto?> createTag(TagCreateDto tagCreateDto,) async {
|
||||
final response = await createTagWithHttpInfo(tagCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete a tag
|
||||
///
|
||||
/// Delete a specific tag by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteTagWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteTagWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -255,15 +151,15 @@ class TagsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -271,24 +167,26 @@ class TagsApi {
|
||||
///
|
||||
/// Delete a specific tag by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<void> deleteTag(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteTagWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteTag(String id,) async {
|
||||
final response = await deleteTagWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a tag
|
||||
/// Retrieve tags
|
||||
///
|
||||
/// Retrieve a specific tag by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Retrieve a list of all tags.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getTagByIdWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags/{id}'.replaceAll('{id}', id);
|
||||
Future<Response> getAllTagsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -297,15 +195,71 @@ class TagsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve tags
|
||||
///
|
||||
/// Retrieve a list of all tags.
|
||||
Future<List<TagResponseDto>?> getAllTags() async {
|
||||
final response = await getAllTagsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<TagResponseDto>') as List)
|
||||
.cast<TagResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve a tag
|
||||
///
|
||||
/// Retrieve a specific tag by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getTagByIdWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -313,45 +267,186 @@ class TagsApi {
|
||||
///
|
||||
/// Retrieve a specific tag by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TagResponseDto> getTagById(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getTagByIdWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<TagResponseDto?> getTagById(String id,) async {
|
||||
final response = await getTagByIdWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TagResponseDto') as TagResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Tag assets
|
||||
///
|
||||
/// Add a tag to all the specified assets.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> tagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Tag assets
|
||||
///
|
||||
/// Add a tag to all the specified assets.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<List<BulkIdResponseDto>?> tagAssets(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await tagAssetsWithHttpInfo(id, bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Untag assets
|
||||
///
|
||||
/// Remove a tag from all the specified assets.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> untagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Untag assets
|
||||
///
|
||||
/// Remove a tag from all the specified assets.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<List<BulkIdResponseDto>?> untagAssets(String id, BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await untagAssetsWithHttpInfo(id, bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a tag
|
||||
///
|
||||
/// Update an existing tag identified by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [TagUpdateDto] tagUpdateDto (required):
|
||||
Future<Response> updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = tagUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -359,113 +454,82 @@ class TagsApi {
|
||||
///
|
||||
/// Update an existing tag identified by its ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TagResponseDto> updateTag(String id, TagUpdateDto tagUpdateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [TagUpdateDto] tagUpdateDto (required):
|
||||
Future<TagResponseDto?> updateTag(String id, TagUpdateDto tagUpdateDto,) async {
|
||||
final response = await updateTagWithHttpInfo(id, tagUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TagResponseDto') as TagResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Untag assets
|
||||
/// Upsert tags
|
||||
///
|
||||
/// Remove a tag from all the specified assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Create or update multiple tags in a single request.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> untagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags/{id}/assets'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [TagUpsertDto] tagUpsertDto (required):
|
||||
Future<Response> upsertTagsWithHttpInfo(TagUpsertDto tagUpsertDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/tags';
|
||||
|
||||
Object? postBody = bulkIdsDto;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = tagUpsertDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Untag assets
|
||||
/// Upsert tags
|
||||
///
|
||||
/// Remove a tag from all the specified assets.
|
||||
/// Create or update multiple tags in a single request.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<BulkIdResponseDto>> untagAssets(String id, BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await untagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [TagUpsertDto] tagUpsertDto (required):
|
||||
Future<List<TagResponseDto>?> upsertTags(TagUpsertDto tagUpsertDto,) async {
|
||||
final response = await upsertTagsWithHttpInfo(tagUpsertDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<TagResponseDto>') as List)
|
||||
.cast<TagResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Tag assets
|
||||
///
|
||||
/// Add a tag to all the specified assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> tagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/tags/{id}/assets'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Tag assets
|
||||
///
|
||||
/// Add a tag to all the specified assets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<BulkIdResponseDto>> tagAssets(String id, BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await tagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<BulkIdResponseDto>') as List)
|
||||
.cast<BulkIdResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+222
-137
@@ -1,48 +1,79 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 TimelineApi {
|
||||
TimelineApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getTimeBucketAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getTimeBucketState = .internal;
|
||||
|
||||
static const ApiVersion getTimeBucketsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getTimeBucketsState = .internal;
|
||||
|
||||
/// Get time bucket
|
||||
///
|
||||
/// Retrieve a string of all asset ids in a given time bucket.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getTimeBucketWithHttpInfo({
|
||||
String? albumId,
|
||||
String? bbox,
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
String? key,
|
||||
AssetOrder? order,
|
||||
AssetOrderBy? orderBy,
|
||||
String? personId,
|
||||
String? slug,
|
||||
String? tagId,
|
||||
required String timeBucket,
|
||||
String? userId,
|
||||
AssetVisibility? visibility,
|
||||
bool? withCoordinates,
|
||||
bool? withPartners,
|
||||
bool? withStacked,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] timeBucket (required):
|
||||
/// Time bucket identifier in YYYY-MM-DD format
|
||||
///
|
||||
/// * [String] albumId:
|
||||
/// Filter assets belonging to a specific album
|
||||
///
|
||||
/// * [String] bbox:
|
||||
/// Bounding box coordinates as west,south,east,north (WGS84)
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [AssetOrder] order:
|
||||
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
///
|
||||
/// * [AssetOrderBy] orderBy:
|
||||
/// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
///
|
||||
/// * [String] personId:
|
||||
/// Filter assets containing a specific person (face recognition)
|
||||
///
|
||||
/// * [String] slug:
|
||||
///
|
||||
/// * [String] tagId:
|
||||
/// Filter assets with a specific tag
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// Filter assets by specific user ID
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
///
|
||||
/// * [bool] withCoordinates:
|
||||
/// Include location data in the response
|
||||
///
|
||||
/// * [bool] withPartners:
|
||||
/// Include assets shared by partners
|
||||
///
|
||||
/// * [bool] withStacked:
|
||||
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
Future<Response> getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/timeline/bucket';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -79,7 +110,7 @@ class TimelineApi {
|
||||
if (tagId != null) {
|
||||
queryParams.addAll(_queryParams('', 'tagId', tagId));
|
||||
}
|
||||
queryParams.addAll(_queryParams('', 'timeBucket', timeBucket));
|
||||
queryParams.addAll(_queryParams('', 'timeBucket', timeBucket));
|
||||
if (userId != null) {
|
||||
queryParams.addAll(_queryParams('', 'userId', userId));
|
||||
}
|
||||
@@ -98,15 +129,15 @@ class TimelineApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -114,82 +145,123 @@ class TimelineApi {
|
||||
///
|
||||
/// Retrieve a string of all asset ids in a given time bucket.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TimeBucketAssetResponseDto> getTimeBucket({
|
||||
String? albumId,
|
||||
String? bbox,
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
String? key,
|
||||
AssetOrder? order,
|
||||
AssetOrderBy? orderBy,
|
||||
String? personId,
|
||||
String? slug,
|
||||
String? tagId,
|
||||
required String timeBucket,
|
||||
String? userId,
|
||||
AssetVisibility? visibility,
|
||||
bool? withCoordinates,
|
||||
bool? withPartners,
|
||||
bool? withStacked,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getTimeBucketWithHttpInfo(
|
||||
albumId: albumId,
|
||||
bbox: bbox,
|
||||
isFavorite: isFavorite,
|
||||
isTrashed: isTrashed,
|
||||
key: key,
|
||||
order: order,
|
||||
orderBy: orderBy,
|
||||
personId: personId,
|
||||
slug: slug,
|
||||
tagId: tagId,
|
||||
timeBucket: timeBucket,
|
||||
userId: userId,
|
||||
visibility: visibility,
|
||||
withCoordinates: withCoordinates,
|
||||
withPartners: withPartners,
|
||||
withStacked: withStacked,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] timeBucket (required):
|
||||
/// Time bucket identifier in YYYY-MM-DD format
|
||||
///
|
||||
/// * [String] albumId:
|
||||
/// Filter assets belonging to a specific album
|
||||
///
|
||||
/// * [String] bbox:
|
||||
/// Bounding box coordinates as west,south,east,north (WGS84)
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [AssetOrder] order:
|
||||
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
///
|
||||
/// * [AssetOrderBy] orderBy:
|
||||
/// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
///
|
||||
/// * [String] personId:
|
||||
/// Filter assets containing a specific person (face recognition)
|
||||
///
|
||||
/// * [String] slug:
|
||||
///
|
||||
/// * [String] tagId:
|
||||
/// Filter assets with a specific tag
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// Filter assets by specific user ID
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
///
|
||||
/// * [bool] withCoordinates:
|
||||
/// Include location data in the response
|
||||
///
|
||||
/// * [bool] withPartners:
|
||||
/// Include assets shared by partners
|
||||
///
|
||||
/// * [bool] withStacked:
|
||||
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
Future<TimeBucketAssetResponseDto?> getTimeBucket(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
|
||||
final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TimeBucketAssetResponseDto')
|
||||
as TimeBucketAssetResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeBucketAssetResponseDto',) as TimeBucketAssetResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get time buckets
|
||||
///
|
||||
/// Retrieve a list of all minimal time buckets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getTimeBucketsWithHttpInfo({
|
||||
String? albumId,
|
||||
String? bbox,
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
String? key,
|
||||
AssetOrder? order,
|
||||
AssetOrderBy? orderBy,
|
||||
String? personId,
|
||||
String? slug,
|
||||
String? tagId,
|
||||
String? userId,
|
||||
AssetVisibility? visibility,
|
||||
bool? withCoordinates,
|
||||
bool? withPartners,
|
||||
bool? withStacked,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId:
|
||||
/// Filter assets belonging to a specific album
|
||||
///
|
||||
/// * [String] bbox:
|
||||
/// Bounding box coordinates as west,south,east,north (WGS84)
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [AssetOrder] order:
|
||||
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
///
|
||||
/// * [AssetOrderBy] orderBy:
|
||||
/// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
///
|
||||
/// * [String] personId:
|
||||
/// Filter assets containing a specific person (face recognition)
|
||||
///
|
||||
/// * [String] slug:
|
||||
///
|
||||
/// * [String] tagId:
|
||||
/// Filter assets with a specific tag
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// Filter assets by specific user ID
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
///
|
||||
/// * [bool] withCoordinates:
|
||||
/// Include location data in the response
|
||||
///
|
||||
/// * [bool] withPartners:
|
||||
/// Include assets shared by partners
|
||||
///
|
||||
/// * [bool] withStacked:
|
||||
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
Future<Response> getTimeBucketsWithHttpInfo({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/timeline/buckets';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -244,15 +316,15 @@ class TimelineApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -260,52 +332,65 @@ class TimelineApi {
|
||||
///
|
||||
/// Retrieve a list of all minimal time buckets.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<TimeBucketsResponseDto>> getTimeBuckets({
|
||||
String? albumId,
|
||||
String? bbox,
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
String? key,
|
||||
AssetOrder? order,
|
||||
AssetOrderBy? orderBy,
|
||||
String? personId,
|
||||
String? slug,
|
||||
String? tagId,
|
||||
String? userId,
|
||||
AssetVisibility? visibility,
|
||||
bool? withCoordinates,
|
||||
bool? withPartners,
|
||||
bool? withStacked,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getTimeBucketsWithHttpInfo(
|
||||
albumId: albumId,
|
||||
bbox: bbox,
|
||||
isFavorite: isFavorite,
|
||||
isTrashed: isTrashed,
|
||||
key: key,
|
||||
order: order,
|
||||
orderBy: orderBy,
|
||||
personId: personId,
|
||||
slug: slug,
|
||||
tagId: tagId,
|
||||
userId: userId,
|
||||
visibility: visibility,
|
||||
withCoordinates: withCoordinates,
|
||||
withPartners: withPartners,
|
||||
withStacked: withStacked,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId:
|
||||
/// Filter assets belonging to a specific album
|
||||
///
|
||||
/// * [String] bbox:
|
||||
/// Bounding box coordinates as west,south,east,north (WGS84)
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
///
|
||||
/// * [String] key:
|
||||
///
|
||||
/// * [AssetOrder] order:
|
||||
/// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
///
|
||||
/// * [AssetOrderBy] orderBy:
|
||||
/// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
///
|
||||
/// * [String] personId:
|
||||
/// Filter assets containing a specific person (face recognition)
|
||||
///
|
||||
/// * [String] slug:
|
||||
///
|
||||
/// * [String] tagId:
|
||||
/// Filter assets with a specific tag
|
||||
///
|
||||
/// * [String] userId:
|
||||
/// Filter assets by specific user ID
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
/// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
///
|
||||
/// * [bool] withCoordinates:
|
||||
/// Include location data in the response
|
||||
///
|
||||
/// * [bool] withPartners:
|
||||
/// Include assets shared by partners
|
||||
///
|
||||
/// * [bool] withStacked:
|
||||
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
Future<List<TimeBucketsResponseDto>?> getTimeBuckets({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, }) async {
|
||||
final response = await getTimeBucketsWithHttpInfo( albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<TimeBucketsResponseDto>') as List)
|
||||
.cast<TimeBucketsResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<TimeBucketsResponseDto>') as List)
|
||||
.cast<TimeBucketsResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+91
-83
@@ -1,34 +1,31 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 TrashApi {
|
||||
TrashApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion emptyTrashAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState emptyTrashState = .stable;
|
||||
|
||||
static const ApiVersion restoreTrashAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState restoreTrashState = .stable;
|
||||
|
||||
static const ApiVersion restoreAssetsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState restoreAssetsState = .stable;
|
||||
|
||||
/// Empty trash
|
||||
///
|
||||
/// Permanently delete all items in the trash.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> emptyTrashWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> emptyTrashWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/trash/empty';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -37,109 +34,67 @@ class TrashApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Empty trash
|
||||
///
|
||||
/// Permanently delete all items in the trash.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TrashResponseDto> emptyTrash({Future<void>? abortTrigger}) async {
|
||||
final response = await emptyTrashWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<TrashResponseDto?> emptyTrash() async {
|
||||
final response = await emptyTrashWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TrashResponseDto')
|
||||
as TrashResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Restore trash
|
||||
///
|
||||
/// Restore all items in the trash.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> restoreTrashWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/trash/restore';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Restore trash
|
||||
///
|
||||
/// Restore all items in the trash.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TrashResponseDto> restoreTrash({Future<void>? abortTrigger}) async {
|
||||
final response = await restoreTrashWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TrashResponseDto')
|
||||
as TrashResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Restore assets
|
||||
///
|
||||
/// Restore specific assets from the trash.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> restoreAssetsWithHttpInfo(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<Response> restoreAssetsWithHttpInfo(BulkIdsDto bulkIdsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/trash/restore/assets';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = bulkIdsDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -147,16 +102,69 @@ class TrashApi {
|
||||
///
|
||||
/// Restore specific assets from the trash.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<TrashResponseDto> restoreAssets(BulkIdsDto bulkIdsDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await restoreAssetsWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<TrashResponseDto?> restoreAssets(BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await restoreAssetsWithHttpInfo(bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'TrashResponseDto')
|
||||
as TrashResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Restore trash
|
||||
///
|
||||
/// Restore all items in the trash.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> restoreTrashWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/trash/restore';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Restore trash
|
||||
///
|
||||
/// Restore all items in the trash.
|
||||
Future<TrashResponseDto?> restoreTrash() async {
|
||||
final response = await restoreTrashWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+416
-367
@@ -1,142 +1,52 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 UsersAdminApi {
|
||||
UsersAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion searchUsersAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState searchUsersAdminState = .stable;
|
||||
|
||||
static const ApiVersion createUserAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState createUserAdminState = .stable;
|
||||
|
||||
static const ApiVersion deleteUserAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState deleteUserAdminState = .stable;
|
||||
|
||||
static const ApiVersion getUserAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getUserAdminState = .stable;
|
||||
|
||||
static const ApiVersion updateUserAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateUserAdminState = .stable;
|
||||
|
||||
static const ApiVersion getUserPreferencesAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getUserPreferencesAdminState = .stable;
|
||||
|
||||
static const ApiVersion updateUserPreferencesAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState updateUserPreferencesAdminState = .stable;
|
||||
|
||||
static const ApiVersion restoreUserAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState restoreUserAdminState = .stable;
|
||||
|
||||
static const ApiVersion getUserSessionsAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getUserSessionsAdminState = .stable;
|
||||
|
||||
static const ApiVersion getUserStatisticsAdminAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getUserStatisticsAdminState = .stable;
|
||||
|
||||
/// Search users
|
||||
///
|
||||
/// Search for users.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchUsersAdminWithHttpInfo({String? id, bool? withDeleted, Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/users';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (id != null) {
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
}
|
||||
if (withDeleted != null) {
|
||||
queryParams.addAll(_queryParams('', 'withDeleted', withDeleted));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Search users
|
||||
///
|
||||
/// Search for users.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<UserAdminResponseDto>> searchUsersAdmin({
|
||||
String? id,
|
||||
bool? withDeleted,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await searchUsersAdminWithHttpInfo(id: id, withDeleted: withDeleted, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<UserAdminResponseDto>') as List)
|
||||
.cast<UserAdminResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a user
|
||||
///
|
||||
/// Create a new user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createUserAdminWithHttpInfo(
|
||||
UserAdminCreateDto userAdminCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [UserAdminCreateDto] userAdminCreateDto (required):
|
||||
Future<Response> createUserAdminWithHttpInfo(UserAdminCreateDto userAdminCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = userAdminCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -144,53 +54,58 @@ class UsersAdminApi {
|
||||
///
|
||||
/// Create a new user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserAdminResponseDto> createUserAdmin(
|
||||
UserAdminCreateDto userAdminCreateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await createUserAdminWithHttpInfo(userAdminCreateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [UserAdminCreateDto] userAdminCreateDto (required):
|
||||
Future<UserAdminResponseDto?> createUserAdmin(UserAdminCreateDto userAdminCreateDto,) async {
|
||||
final response = await createUserAdminWithHttpInfo(userAdminCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserAdminResponseDto')
|
||||
as UserAdminResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete a user
|
||||
///
|
||||
/// Delete a user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteUserAdminWithHttpInfo(
|
||||
String id,
|
||||
UserAdminDeleteDto userAdminDeleteDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/admin/users/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UserAdminDeleteDto] userAdminDeleteDto (required):
|
||||
Future<Response> deleteUserAdminWithHttpInfo(String id, UserAdminDeleteDto userAdminDeleteDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = userAdminDeleteDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -198,33 +113,41 @@ class UsersAdminApi {
|
||||
///
|
||||
/// Delete a user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserAdminResponseDto> deleteUserAdmin(
|
||||
String id,
|
||||
UserAdminDeleteDto userAdminDeleteDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await deleteUserAdminWithHttpInfo(id, userAdminDeleteDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UserAdminDeleteDto] userAdminDeleteDto (required):
|
||||
Future<UserAdminResponseDto?> deleteUserAdmin(String id, UserAdminDeleteDto userAdminDeleteDto,) async {
|
||||
final response = await deleteUserAdminWithHttpInfo(id, userAdminDeleteDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserAdminResponseDto')
|
||||
as UserAdminResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve a user
|
||||
///
|
||||
/// Retrieve a specific user by their ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getUserAdminWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/users/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getUserAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -233,15 +156,15 @@ class UsersAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -249,84 +172,39 @@ class UsersAdminApi {
|
||||
///
|
||||
/// Retrieve a specific user by their ID.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserAdminResponseDto> getUserAdmin(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getUserAdminWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<UserAdminResponseDto?> getUserAdmin(String id,) async {
|
||||
final response = await getUserAdminWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserAdminResponseDto')
|
||||
as UserAdminResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Update a user
|
||||
///
|
||||
/// Update an existing user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateUserAdminWithHttpInfo(
|
||||
String id,
|
||||
UserAdminUpdateDto userAdminUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/admin/users/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = userAdminUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update a user
|
||||
///
|
||||
/// Update an existing user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserAdminResponseDto> updateUserAdmin(
|
||||
String id,
|
||||
UserAdminUpdateDto userAdminUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserAdminResponseDto')
|
||||
as UserAdminResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve user preferences
|
||||
///
|
||||
/// Retrieve the preferences of a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getUserPreferencesAdminWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/users/{id}/preferences'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getUserPreferencesAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}/preferences'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -335,15 +213,15 @@ class UsersAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -351,88 +229,39 @@ class UsersAdminApi {
|
||||
///
|
||||
/// Retrieve the preferences of a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserPreferencesResponseDto> getUserPreferencesAdmin(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getUserPreferencesAdminWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<UserPreferencesResponseDto?> getUserPreferencesAdmin(String id,) async {
|
||||
final response = await getUserPreferencesAdminWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserPreferencesResponseDto')
|
||||
as UserPreferencesResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update user preferences
|
||||
/// Retrieve user sessions
|
||||
///
|
||||
/// Update the preferences of a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
/// Retrieve all sessions for a specific user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateUserPreferencesAdminWithHttpInfo(
|
||||
String id,
|
||||
UserPreferencesUpdateDto userPreferencesUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/admin/users/{id}/preferences'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody = userPreferencesUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update user preferences
|
||||
///
|
||||
/// Update the preferences of a specific user.
|
||||
/// Parameters:
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserPreferencesResponseDto> updateUserPreferencesAdmin(
|
||||
String id,
|
||||
UserPreferencesUpdateDto userPreferencesUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateUserPreferencesAdminWithHttpInfo(
|
||||
id,
|
||||
userPreferencesUpdateDto,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserPreferencesResponseDto')
|
||||
as UserPreferencesResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Restore a deleted user
|
||||
///
|
||||
/// Restore a previously deleted user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> restoreUserAdminWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/users/{id}/restore'.replaceAll('{id}', id);
|
||||
/// * [String] id (required):
|
||||
Future<Response> getUserSessionsAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}/sessions'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -441,62 +270,15 @@ class UsersAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Restore a deleted user
|
||||
///
|
||||
/// Restore a previously deleted user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<UserAdminResponseDto> restoreUserAdmin(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await restoreUserAdminWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'UserAdminResponseDto')
|
||||
as UserAdminResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Retrieve user sessions
|
||||
///
|
||||
/// Retrieve all sessions for a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getUserSessionsAdminWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/admin/users/{id}/sessions'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -504,37 +286,50 @@ class UsersAdminApi {
|
||||
///
|
||||
/// Retrieve all sessions for a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<SessionResponseDto>> getUserSessionsAdmin(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getUserSessionsAdminWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<List<SessionResponseDto>?> getUserSessionsAdmin(String id,) async {
|
||||
final response = await getUserSessionsAdminWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<SessionResponseDto>') as List)
|
||||
.cast<SessionResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<SessionResponseDto>') as List)
|
||||
.cast<SessionResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve user statistics
|
||||
///
|
||||
/// Retrieve asset statistics for a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getUserStatisticsAdminWithHttpInfo(
|
||||
String id, {
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
AssetVisibility? visibility,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/admin/users/{id}/statistics'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Filter by trash status
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
Future<Response> getUserStatisticsAdminWithHttpInfo(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}/statistics'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -553,15 +348,15 @@ class UsersAdminApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -569,28 +364,282 @@ class UsersAdminApi {
|
||||
///
|
||||
/// Retrieve asset statistics for a specific user.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<AssetStatsResponseDto> getUserStatisticsAdmin(
|
||||
String id, {
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
AssetVisibility? visibility,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await getUserStatisticsAdminWithHttpInfo(
|
||||
id,
|
||||
isFavorite: isFavorite,
|
||||
isTrashed: isTrashed,
|
||||
visibility: visibility,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
/// Filter by favorite status
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
/// Filter by trash status
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
Future<AssetStatsResponseDto?> getUserStatisticsAdmin(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, }) async {
|
||||
final response = await getUserStatisticsAdminWithHttpInfo(id, isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'AssetStatsResponseDto')
|
||||
as AssetStatsResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetStatsResponseDto',) as AssetStatsResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Restore a deleted user
|
||||
///
|
||||
/// Restore a previously deleted user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> restoreUserAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}/restore'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Restore a deleted user
|
||||
///
|
||||
/// Restore a previously deleted user.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<UserAdminResponseDto?> restoreUserAdmin(String id,) async {
|
||||
final response = await restoreUserAdminWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Search users
|
||||
///
|
||||
/// Search for users.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
/// User ID filter
|
||||
///
|
||||
/// * [bool] withDeleted:
|
||||
/// Include deleted users
|
||||
Future<Response> searchUsersAdminWithHttpInfo({ String? id, bool? withDeleted, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (id != null) {
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
}
|
||||
if (withDeleted != null) {
|
||||
queryParams.addAll(_queryParams('', 'withDeleted', withDeleted));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Search users
|
||||
///
|
||||
/// Search for users.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
/// User ID filter
|
||||
///
|
||||
/// * [bool] withDeleted:
|
||||
/// Include deleted users
|
||||
Future<List<UserAdminResponseDto>?> searchUsersAdmin({ String? id, bool? withDeleted, }) async {
|
||||
final response = await searchUsersAdminWithHttpInfo( id: id, withDeleted: withDeleted, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<UserAdminResponseDto>') as List)
|
||||
.cast<UserAdminResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a user
|
||||
///
|
||||
/// Update an existing user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UserAdminUpdateDto] userAdminUpdateDto (required):
|
||||
Future<Response> updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = userAdminUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update a user
|
||||
///
|
||||
/// Update an existing user.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UserAdminUpdateDto] userAdminUpdateDto (required):
|
||||
Future<UserAdminResponseDto?> updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto,) async {
|
||||
final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update user preferences
|
||||
///
|
||||
/// Update the preferences of a specific user.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required):
|
||||
Future<Response> updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}/preferences'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = userPreferencesUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Update user preferences
|
||||
///
|
||||
/// Update the preferences of a specific user.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required):
|
||||
Future<UserPreferencesResponseDto?> updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto,) async {
|
||||
final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+678
-662
File diff suppressed because it is too large
Load Diff
Generated
+47
-34
@@ -1,49 +1,54 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 ViewsApi {
|
||||
ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion getAssetsByOriginalPathAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getAssetsByOriginalPathState = .stable;
|
||||
|
||||
static const ApiVersion getUniqueOriginalPathsAddedIn = .new(1, 0, 0);
|
||||
|
||||
static const ApiState getUniqueOriginalPathsState = .stable;
|
||||
|
||||
/// Retrieve assets by original path
|
||||
///
|
||||
/// Retrieve assets that are children of a specific folder.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getAssetsByOriginalPathWithHttpInfo({required String path, Future<void>? abortTrigger}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] path (required):
|
||||
Future<Response> getAssetsByOriginalPathWithHttpInfo(String path,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/view/folder';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'path', path));
|
||||
queryParams.addAll(_queryParams('', 'path', path));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,31 +56,37 @@ class ViewsApi {
|
||||
///
|
||||
/// Retrieve assets that are children of a specific folder.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<AssetResponseDto>> getAssetsByOriginalPath({required String path, Future<void>? abortTrigger}) async {
|
||||
final response = await getAssetsByOriginalPathWithHttpInfo(path: path, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] path (required):
|
||||
Future<List<AssetResponseDto>?> getAssetsByOriginalPath(String path,) async {
|
||||
final response = await getAssetsByOriginalPathWithHttpInfo(path,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<AssetResponseDto>') as List)
|
||||
.cast<AssetResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AssetResponseDto>') as List)
|
||||
.cast<AssetResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve unique paths
|
||||
///
|
||||
/// Retrieve a list of unique folder paths from asset original paths.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getUniqueOriginalPathsWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
Future<Response> getUniqueOriginalPathsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/view/folder/unique-paths';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -84,34 +95,36 @@ class ViewsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve unique paths
|
||||
///
|
||||
/// Retrieve a list of unique folder paths from asset original paths.
|
||||
///
|
||||
/// Available since server v1.0.0.
|
||||
Future<List<String>> getUniqueOriginalPaths({Future<void>? abortTrigger}) async {
|
||||
final response = await getUniqueOriginalPathsWithHttpInfo(abortTrigger: abortTrigger);
|
||||
Future<List<String>?> getUniqueOriginalPaths() async {
|
||||
final response = await getUniqueOriginalPathsWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<String>') as List).cast<String>().toList(
|
||||
growable: false,
|
||||
);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<String>') as List)
|
||||
.cast<String>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+340
-300
@@ -1,57 +1,318 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 WorkflowsApi {
|
||||
WorkflowsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
static const ApiVersion searchWorkflowsAddedIn = .new(3, 0, 0);
|
||||
/// Create a workflow
|
||||
///
|
||||
/// Create a new workflow, the workflow can also be created with empty filters and actions.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [WorkflowCreateDto] workflowCreateDto (required):
|
||||
Future<Response> createWorkflowWithHttpInfo(WorkflowCreateDto workflowCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows';
|
||||
|
||||
static const ApiState searchWorkflowsState = .added;
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = workflowCreateDto;
|
||||
|
||||
static const ApiVersion createWorkflowAddedIn = .new(3, 0, 0);
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiState createWorkflowState = .added;
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
static const ApiVersion getWorkflowTriggersAddedIn = .new(3, 0, 0);
|
||||
|
||||
static const ApiState getWorkflowTriggersState = .added;
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiVersion deleteWorkflowAddedIn = .new(3, 0, 0);
|
||||
/// Create a workflow
|
||||
///
|
||||
/// Create a new workflow, the workflow can also be created with empty filters and actions.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [WorkflowCreateDto] workflowCreateDto (required):
|
||||
Future<WorkflowResponseDto?> createWorkflow(WorkflowCreateDto workflowCreateDto,) async {
|
||||
final response = await createWorkflowWithHttpInfo(workflowCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static const ApiState deleteWorkflowState = .added;
|
||||
/// Delete a workflow
|
||||
///
|
||||
/// Delete a workflow by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteWorkflowWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
static const ApiVersion getWorkflowAddedIn = .new(3, 0, 0);
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
static const ApiState getWorkflowState = .added;
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
static const ApiVersion updateWorkflowAddedIn = .new(3, 0, 0);
|
||||
const contentTypes = <String>[];
|
||||
|
||||
static const ApiState updateWorkflowState = .added;
|
||||
|
||||
static const ApiVersion getWorkflowForShareAddedIn = .new(3, 0, 0);
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
static const ApiState getWorkflowForShareState = .added;
|
||||
/// Delete a workflow
|
||||
///
|
||||
/// Delete a workflow by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteWorkflow(String id,) async {
|
||||
final response = await deleteWorkflowWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve information about a specific workflow by its ID.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getWorkflowWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve information about a specific workflow by its ID.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<WorkflowResponseDto?> getWorkflow(String id,) async {
|
||||
final response = await getWorkflowWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve a workflow details without ids, default values, etc.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getWorkflowForShareWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows/{id}/share'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve a workflow details without ids, default values, etc.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<WorkflowShareResponseDto?> getWorkflowForShare(String id,) async {
|
||||
final response = await getWorkflowForShareWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowShareResponseDto',) as WorkflowShareResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// List all workflow triggers
|
||||
///
|
||||
/// Retrieve a list of all available workflow triggers.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getWorkflowTriggersWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows/triggers';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all workflow triggers
|
||||
///
|
||||
/// Retrieve a list of all available workflow triggers.
|
||||
Future<List<WorkflowTriggerResponseDto>?> getWorkflowTriggers() async {
|
||||
final response = await getWorkflowTriggersWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<WorkflowTriggerResponseDto>') as List)
|
||||
.cast<WorkflowTriggerResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// List all workflows
|
||||
///
|
||||
/// Retrieve a list of workflows available to the authenticated user.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchWorkflowsWithHttpInfo({
|
||||
String? description,
|
||||
bool? enabled,
|
||||
String? id,
|
||||
String? name,
|
||||
WorkflowTrigger? trigger,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] description:
|
||||
/// Workflow description
|
||||
///
|
||||
/// * [bool] enabled:
|
||||
/// Workflow enabled
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Workflow ID
|
||||
///
|
||||
/// * [String] name:
|
||||
/// Workflow name
|
||||
///
|
||||
/// * [WorkflowTrigger] trigger:
|
||||
/// Workflow trigger type
|
||||
Future<Response> searchWorkflowsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
@@ -76,15 +337,15 @@ class WorkflowsApi {
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,251 +353,74 @@ class WorkflowsApi {
|
||||
///
|
||||
/// Retrieve a list of workflows available to the authenticated user.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<List<WorkflowResponseDto>> searchWorkflows({
|
||||
String? description,
|
||||
bool? enabled,
|
||||
String? id,
|
||||
String? name,
|
||||
WorkflowTrigger? trigger,
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await searchWorkflowsWithHttpInfo(
|
||||
description: description,
|
||||
enabled: enabled,
|
||||
id: id,
|
||||
name: name,
|
||||
trigger: trigger,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] description:
|
||||
/// Workflow description
|
||||
///
|
||||
/// * [bool] enabled:
|
||||
/// Workflow enabled
|
||||
///
|
||||
/// * [String] id:
|
||||
/// Workflow ID
|
||||
///
|
||||
/// * [String] name:
|
||||
/// Workflow name
|
||||
///
|
||||
/// * [WorkflowTrigger] trigger:
|
||||
/// Workflow trigger type
|
||||
Future<List<WorkflowResponseDto>?> searchWorkflows({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, }) async {
|
||||
final response = await searchWorkflowsWithHttpInfo( description: description, enabled: enabled, id: id, name: name, trigger: trigger, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<WorkflowResponseDto>') as List)
|
||||
.cast<WorkflowResponseDto>()
|
||||
.toList(growable: false);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<WorkflowResponseDto>') as List)
|
||||
.cast<WorkflowResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Create a workflow
|
||||
///
|
||||
/// Create a new workflow, the workflow can also be created with empty filters and actions.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> createWorkflowWithHttpInfo(WorkflowCreateDto workflowCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/workflows';
|
||||
|
||||
Object? postBody = workflowCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a workflow
|
||||
///
|
||||
/// Create a new workflow, the workflow can also be created with empty filters and actions.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<WorkflowResponseDto> createWorkflow(WorkflowCreateDto workflowCreateDto, {Future<void>? abortTrigger}) async {
|
||||
final response = await createWorkflowWithHttpInfo(workflowCreateDto, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'WorkflowResponseDto')
|
||||
as WorkflowResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// List all workflow triggers
|
||||
///
|
||||
/// Retrieve a list of all available workflow triggers.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getWorkflowTriggersWithHttpInfo({Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/workflows/triggers';
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// List all workflow triggers
|
||||
///
|
||||
/// Retrieve a list of all available workflow triggers.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<List<WorkflowTriggerResponseDto>> getWorkflowTriggers({Future<void>? abortTrigger}) async {
|
||||
final response = await getWorkflowTriggersWithHttpInfo(abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, r'List<WorkflowTriggerResponseDto>') as List)
|
||||
.cast<WorkflowTriggerResponseDto>()
|
||||
.toList(growable: false);
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Delete a workflow
|
||||
///
|
||||
/// Delete a workflow by its ID.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> deleteWorkflowWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/workflows/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a workflow
|
||||
///
|
||||
/// Delete a workflow by its ID.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<void> deleteWorkflow(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await deleteWorkflowWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve information about a specific workflow by its ID.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getWorkflowWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/workflows/{id}'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve information about a specific workflow by its ID.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<WorkflowResponseDto> getWorkflow(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getWorkflowWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'WorkflowResponseDto')
|
||||
as WorkflowResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Update a workflow
|
||||
///
|
||||
/// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> updateWorkflowWithHttpInfo(
|
||||
String id,
|
||||
WorkflowUpdateDto workflowUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final apiPath = r'/workflows/{id}'.replaceAll('{id}', id);
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [WorkflowUpdateDto] workflowUpdateDto (required):
|
||||
Future<Response> updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/workflows/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = workflowUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[r'application/json'];
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'PUT',
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -344,67 +428,23 @@ class WorkflowsApi {
|
||||
///
|
||||
/// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<WorkflowResponseDto> updateWorkflow(
|
||||
String id,
|
||||
WorkflowUpdateDto workflowUpdateDto, {
|
||||
Future<void>? abortTrigger,
|
||||
}) async {
|
||||
final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger);
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [WorkflowUpdateDto] workflowUpdateDto (required):
|
||||
Future<WorkflowResponseDto?> updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto,) async {
|
||||
final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'WorkflowResponseDto')
|
||||
as WorkflowResponseDto;
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto;
|
||||
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve a workflow details without ids, default values, etc.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> getWorkflowForShareWithHttpInfo(String id, {Future<void>? abortTrigger}) async {
|
||||
final apiPath = r'/workflows/{id}/share'.replaceAll('{id}', id);
|
||||
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
r'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
/// Retrieve a workflow
|
||||
///
|
||||
/// Retrieve a workflow details without ids, default values, etc.
|
||||
///
|
||||
/// Available since server v3.0.0.
|
||||
Future<WorkflowShareResponseDto> getWorkflowForShare(String id, {Future<void>? abortTrigger}) async {
|
||||
final response = await getWorkflowForShareWithHttpInfo(id, abortTrigger: abortTrigger);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), r'WorkflowShareResponseDto')
|
||||
as WorkflowShareResponseDto;
|
||||
}
|
||||
throw ApiException(response.statusCode, r'Unexpected empty response body');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+863
-841
File diff suppressed because it is too large
Load Diff
Generated
-90
@@ -1,90 +0,0 @@
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// Backward-compatibility mechanism. The generated client owns this hook but
|
||||
// knows NO rules; the host app supplies them at startup, so the dependency
|
||||
// flows app -> client only (this file has no app imports).
|
||||
part of openapi.api;
|
||||
|
||||
/// One backward-compatibility default: when the wire JSON omits [path]
|
||||
/// (dot-separated, e.g. `'download.includeEmbeddedVideos'`), fill it with
|
||||
/// [value] before the DTO is parsed.
|
||||
///
|
||||
/// The constructor is `const`, so rule sets built entirely from static values
|
||||
/// can be `const`; sets that need a DTO's `toJson()` or `DateTime.now()` are
|
||||
/// plain (those values are computed when the rule set is built at startup).
|
||||
final class JsonDefault {
|
||||
/// The dot-separated wire path to back-fill.
|
||||
final String path;
|
||||
|
||||
/// The value to set when [path] is absent or null.
|
||||
final Object? value;
|
||||
|
||||
const JsonDefault(this.path, this.value);
|
||||
}
|
||||
|
||||
/// Registry of per-DTO backward-compatibility defaults, keyed by the DTO [Type]
|
||||
/// for compile-time safety.
|
||||
///
|
||||
/// Newer DTOs may declare fields that older servers don't send. Each model's
|
||||
/// `fromJson` calls [upgrade] with its own type before parsing; the host app's
|
||||
/// registered defaults fill any missing fields so deserialization tolerates
|
||||
/// older servers.
|
||||
///
|
||||
/// Configured once at startup, keyed by DTO type so a renamed/removed DTO is a
|
||||
/// compile error. Static-only entries can be `const` lists:
|
||||
///
|
||||
/// ```dart
|
||||
/// ApiCompat.configure({
|
||||
/// AssetResponseDto: const [
|
||||
/// JsonDefault('visibility', 'timeline'),
|
||||
/// JsonDefault('isEdited', false),
|
||||
/// ],
|
||||
/// });
|
||||
/// ```
|
||||
abstract final class ApiCompat {
|
||||
ApiCompat._();
|
||||
|
||||
static Map<Type, List<JsonDefault>> _defaults = const <Type, List<JsonDefault>>{};
|
||||
|
||||
/// Install the backward-compat rule set (replaces any previous one).
|
||||
static void configure(Map<Type, List<JsonDefault>> defaults) {
|
||||
_defaults = defaults;
|
||||
}
|
||||
|
||||
/// Clear all rules. Intended for test isolation.
|
||||
static void reset() {
|
||||
_defaults = const <Type, List<JsonDefault>>{};
|
||||
}
|
||||
|
||||
/// Apply the registered defaults for DTO type [T] to [json], if any. Called
|
||||
/// by every generated `fromJson`; a no-op when [json] is not a map or no
|
||||
/// rules are registered for [T].
|
||||
static void upgrade<T>(Object? json) {
|
||||
if (json is! Map<String, dynamic>) return;
|
||||
final defaults = _defaults[T];
|
||||
if (defaults == null) return;
|
||||
for (final entry in defaults) {
|
||||
_putDefault(json, entry.path, entry.value);
|
||||
}
|
||||
}
|
||||
|
||||
/// Set [keyPath] (dot-separated) to [value] only when currently absent/null,
|
||||
/// creating intermediate maps as needed.
|
||||
static void _putDefault(Map<String, dynamic> json, String keyPath, Object? value) {
|
||||
final keys = keyPath.split('.');
|
||||
var node = json;
|
||||
for (var i = 0; i < keys.length - 1; i++) {
|
||||
final existing = node[keys[i]];
|
||||
if (existing is Map<String, dynamic>) {
|
||||
node = existing;
|
||||
} else {
|
||||
final created = <String, dynamic>{};
|
||||
node[keys[i]] = created;
|
||||
node = created;
|
||||
}
|
||||
}
|
||||
if (node[keys.last] == null) {
|
||||
node[keys.last] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+13
-19
@@ -1,30 +1,24 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// Thrown when an API call fails: a non-2xx HTTP status, a transport error, or
|
||||
/// a (de)serialization failure.
|
||||
///
|
||||
/// [code] is the HTTP status code (or a transport-level sentinel such as
|
||||
/// [HttpStatus.badRequest]) and [message] is a human-readable description.
|
||||
class ApiException implements Exception {
|
||||
ApiException(this.code, [this.message])
|
||||
: innerException = null,
|
||||
stackTrace = null;
|
||||
ApiException(this.code, this.message);
|
||||
|
||||
ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace);
|
||||
|
||||
/// HTTP status code, or a transport sentinel for non-HTTP failures.
|
||||
final int code;
|
||||
|
||||
/// Human-readable failure description; may be the decoded response body.
|
||||
final String? message;
|
||||
|
||||
/// The originating exception for transport / deserialization failures.
|
||||
final Object? innerException;
|
||||
|
||||
/// The stack trace captured when [innerException] was caught.
|
||||
final StackTrace? stackTrace;
|
||||
int code = 0;
|
||||
String? message;
|
||||
Exception? innerException;
|
||||
StackTrace? stackTrace;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
Generated
+215
-55
@@ -1,10 +1,15 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// A single `name=value` query-string entry. Both halves are URL-encoded by
|
||||
/// [toString], so multi-valued params (`?k=a&k=b`) are modeled as repeated
|
||||
/// [QueryParam]s rather than a `Map`.
|
||||
class QueryParam {
|
||||
const QueryParam(this.name, this.value);
|
||||
|
||||
@@ -15,42 +20,34 @@ class QueryParam {
|
||||
String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}';
|
||||
}
|
||||
|
||||
/// Delimiters for the non-`multi` array [collectionFormat]s.
|
||||
const _delimiters = <String, String>{'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'};
|
||||
|
||||
/// Shared deep-equality used by generated model `==` operators so that `List`,
|
||||
/// `Set`, and `Map` fields compare by structure rather than identity.
|
||||
const _deepEquality = DeepCollectionEquality();
|
||||
|
||||
/// Expands a parameter [value] into zero or more [QueryParam]s under the given
|
||||
/// [collectionFormat] (`'multi'`, `'csv'`, `'ssv'`, `'tsv'`, `'pipes'`).
|
||||
///
|
||||
/// A `null` value yields no params (the key is omitted); a `List` either repeats
|
||||
/// the key (`multi`) or joins with the format delimiter; any other value is
|
||||
/// stringified via [parameterToString].
|
||||
Iterable<QueryParam> _queryParams(String collectionFormat, String name, dynamic value) {
|
||||
// Ported from the Java version.
|
||||
Iterable<QueryParam> _queryParams(String collectionFormat, String name, dynamic value,) {
|
||||
// Assertions to run in debug mode only.
|
||||
assert(name.isNotEmpty, 'Parameter cannot be an empty string.');
|
||||
|
||||
final params = <QueryParam>[];
|
||||
|
||||
if (value is List) {
|
||||
if (collectionFormat == 'multi') {
|
||||
return value.map((dynamic v) => QueryParam(name, parameterToString(v)));
|
||||
return value.map((dynamic v) => QueryParam(name, parameterToString(v)),);
|
||||
}
|
||||
final format = collectionFormat.isEmpty ? 'csv' : collectionFormat;
|
||||
final delimiter = _delimiters[format] ?? ',';
|
||||
return [QueryParam(name, value.map<String>(parameterToString).join(delimiter))];
|
||||
|
||||
// Default collection format is 'csv'.
|
||||
if (collectionFormat.isEmpty) {
|
||||
collectionFormat = 'csv'; // ignore: parameter_assignments
|
||||
}
|
||||
|
||||
final delimiter = _delimiters[collectionFormat] ?? ',';
|
||||
|
||||
params.add(QueryParam(name, value.map<dynamic>(parameterToString).join(delimiter),));
|
||||
} else if (value != null) {
|
||||
params.add(QueryParam(name, parameterToString(value)));
|
||||
}
|
||||
if (value != null) {
|
||||
return [QueryParam(name, parameterToString(value))];
|
||||
}
|
||||
return const [];
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
/// Formats a single parameter [value] for use in a path, query, header, or form
|
||||
/// field.
|
||||
///
|
||||
/// `null` becomes the empty string, `DateTime` is emitted as a UTC ISO-8601
|
||||
/// string, generated enums delegate to their `toJson()` (the raw wire value),
|
||||
/// and everything else uses [Object.toString].
|
||||
/// Format the given parameter object into a [String].
|
||||
String parameterToString(dynamic value) {
|
||||
if (value == null) {
|
||||
return '';
|
||||
@@ -58,40 +55,203 @@ String parameterToString(dynamic value) {
|
||||
if (value is DateTime) {
|
||||
return value.toUtc().toIso8601String();
|
||||
}
|
||||
// Every generated enum is a Dart `enum` exposing `Object toJson()` returning
|
||||
// its raw wire value; this keeps the helper free of per-enum branches.
|
||||
if (value is Enum) {
|
||||
return (value as dynamic).toJson().toString();
|
||||
if (value is AlbumUserRole) {
|
||||
return AlbumUserRoleTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetEditAction) {
|
||||
return AssetEditActionTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetIdErrorReason) {
|
||||
return AssetIdErrorReasonTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetJobName) {
|
||||
return AssetJobNameTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetMediaSize) {
|
||||
return AssetMediaSizeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetMediaStatus) {
|
||||
return AssetMediaStatusTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetOrder) {
|
||||
return AssetOrderTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetOrderBy) {
|
||||
return AssetOrderByTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetRejectReason) {
|
||||
return AssetRejectReasonTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetTypeEnum) {
|
||||
return AssetTypeEnumTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetUploadAction) {
|
||||
return AssetUploadActionTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AssetVisibility) {
|
||||
return AssetVisibilityTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is AudioCodec) {
|
||||
return AudioCodecTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is BulkIdErrorReason) {
|
||||
return BulkIdErrorReasonTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is CQMode) {
|
||||
return CQModeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is Colorspace) {
|
||||
return ColorspaceTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ImageFormat) {
|
||||
return ImageFormatTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is JobName) {
|
||||
return JobNameTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is LogLevel) {
|
||||
return LogLevelTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MaintenanceAction) {
|
||||
return MaintenanceActionTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ManualJobName) {
|
||||
return ManualJobNameTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MemorySearchOrder) {
|
||||
return MemorySearchOrderTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MemoryType) {
|
||||
return MemoryTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MirrorAxis) {
|
||||
return MirrorAxisTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is NotificationLevel) {
|
||||
return NotificationLevelTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is NotificationType) {
|
||||
return NotificationTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is OAuthTokenEndpointAuthMethod) {
|
||||
return OAuthTokenEndpointAuthMethodTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is PartnerDirection) {
|
||||
return PartnerDirectionTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is Permission) {
|
||||
return PermissionTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is QueueCommand) {
|
||||
return QueueCommandTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is QueueJobStatus) {
|
||||
return QueueJobStatusTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is QueueName) {
|
||||
return QueueNameTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ReactionLevel) {
|
||||
return ReactionLevelTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ReactionType) {
|
||||
return ReactionTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ReleaseChannel) {
|
||||
return ReleaseChannelTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ReleaseType) {
|
||||
return ReleaseTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SearchSuggestionType) {
|
||||
return SearchSuggestionTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SharedLinkType) {
|
||||
return SharedLinkTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SourceType) {
|
||||
return SourceTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is StorageFolder) {
|
||||
return StorageFolderTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SyncEntityType) {
|
||||
return SyncEntityTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SyncRequestType) {
|
||||
return SyncRequestTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ToneMapping) {
|
||||
return ToneMappingTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is TranscodeHWAccel) {
|
||||
return TranscodeHWAccelTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is TranscodePolicy) {
|
||||
return TranscodePolicyTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is UserAvatarColor) {
|
||||
return UserAvatarColorTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is UserMetadataKey) {
|
||||
return UserMetadataKeyTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is UserStatus) {
|
||||
return UserStatusTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is VideoCodec) {
|
||||
return VideoCodecTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is VideoContainer) {
|
||||
return VideoContainerTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is WorkflowTrigger) {
|
||||
return WorkflowTriggerTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is WorkflowType) {
|
||||
return WorkflowTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
/// Decodes a response body as UTF-8 when the headers declare JSON, otherwise
|
||||
/// returns the body as already decoded by `package:http`.
|
||||
/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json'
|
||||
/// content type. Otherwise, returns the decoded body as decoded by dart:http package.
|
||||
Future<String> _decodeBodyBytes(Response response) async {
|
||||
final contentType = response.headers['content-type'];
|
||||
return contentType != null && contentType.toLowerCase().startsWith('application/json')
|
||||
? (response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes))
|
||||
: response.body;
|
||||
? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes)
|
||||
: response.body;
|
||||
}
|
||||
|
||||
/// Parses a JSON scalar into a [DateTime]: an ISO-8601 string or epoch
|
||||
/// milliseconds (`int`). Returns `null` when [value] is absent or unparseable.
|
||||
DateTime? _dateTimeFromJson(Object? value) {
|
||||
return switch (value) {
|
||||
DateTime() => value,
|
||||
String() => DateTime.tryParse(value),
|
||||
int() => DateTime.fromMillisecondsSinceEpoch(value, isUtc: true),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
/// Widens a JSON number to `double`, tolerating an integer wire value. Returns
|
||||
/// `null` when [value] is not a number.
|
||||
double? _toDouble(Object? value) => (value as num?)?.toDouble();
|
||||
|
||||
/// Returns the value at [key] of [map] when it is a [T], else `null`.
|
||||
/// Returns a valid [T] value found at the specified Map [key], null otherwise.
|
||||
T? mapValueOfType<T>(dynamic map, String key) {
|
||||
final dynamic value = map is Map ? map[key] : null;
|
||||
return value is T ? value : null;
|
||||
}
|
||||
|
||||
/// Returns a valid Map<K, V> found at the specified Map [key], null otherwise.
|
||||
Map<K, V>? mapCastOfType<K, V>(dynamic map, String key) {
|
||||
final dynamic value = map is Map ? map[key] : null;
|
||||
return value is Map ? value.cast<K, V>() : null;
|
||||
}
|
||||
|
||||
/// Returns a valid [DateTime] found at the specified Map [key], null otherwise.
|
||||
DateTime? mapDateTime(dynamic map, String key, [String? pattern]) {
|
||||
final dynamic value = map is Map ? map[key] : null;
|
||||
if (value != null) {
|
||||
int? millis;
|
||||
if (value is int) {
|
||||
millis = value;
|
||||
} else if (value is String) {
|
||||
if (_isEpochMarker(pattern)) {
|
||||
millis = int.tryParse(value);
|
||||
} else {
|
||||
return DateTime.tryParse(value);
|
||||
}
|
||||
}
|
||||
if (millis != null) {
|
||||
return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Generated
-8
@@ -1,8 +0,0 @@
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
part of openapi.api;
|
||||
|
||||
/// Lifecycle state of an endpoint or DTO field, from the spec's
|
||||
/// `x-immich-state` / `x-immich-history`. Surfaced on the inlined `*State`
|
||||
/// metadata (e.g. `AssetResponseDto.isEditedState == ApiState.beta`).
|
||||
enum ApiState { added, alpha, beta, stable, updated, deprecated, internal }
|
||||
Generated
-81
@@ -1,81 +0,0 @@
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// Self-contained version type for server-capability gating. Intentionally has
|
||||
// no dependency on the host app: the generated client is a lower layer and
|
||||
// must not reach up into application utilities.
|
||||
part of openapi.api;
|
||||
|
||||
/// An Immich server API version, used to gate endpoints and DTO fields that
|
||||
/// were added or deprecated at a particular release.
|
||||
///
|
||||
/// Version metadata is derived at generation time from the spec's
|
||||
/// `x-immich-history` and emitted as `const ApiVersion(...)` literals on the
|
||||
/// `*Meta` types, so comparisons are const-friendly and cheap:
|
||||
///
|
||||
/// ```dart
|
||||
/// if (ApiVersion.parse(server.version) >= AssetResponseDtoMeta.isEditedAddedIn) {
|
||||
/// // safe to read `isEdited`
|
||||
/// }
|
||||
/// ```
|
||||
final class ApiVersion implements Comparable<ApiVersion> {
|
||||
const ApiVersion(this.major, this.minor, this.patch);
|
||||
|
||||
final int major;
|
||||
final int minor;
|
||||
final int patch;
|
||||
|
||||
/// Parses `"v2.6.0"`, `"2.6.0"`, or a bare `"v1"`/`"2"` (missing components
|
||||
/// default to zero). Returns `null` when the string is not a version.
|
||||
static ApiVersion? tryParse(String value) {
|
||||
final core = value.trim().replaceFirst(RegExp(r'^v', caseSensitive: false), '').split(RegExp(r'[-+]')).first;
|
||||
if (core.isEmpty) return null;
|
||||
final parts = core.split('.');
|
||||
final nums = <int>[];
|
||||
for (final part in parts) {
|
||||
final n = int.tryParse(part);
|
||||
if (n == null) return null;
|
||||
nums.add(n);
|
||||
}
|
||||
return ApiVersion(
|
||||
nums.isNotEmpty ? nums[0] : 0,
|
||||
nums.length > 1 ? nums[1] : 0,
|
||||
nums.length > 2 ? nums[2] : 0,
|
||||
);
|
||||
}
|
||||
|
||||
/// Like [tryParse] but throws [FormatException] on a malformed string.
|
||||
factory ApiVersion.parse(String value) =>
|
||||
tryParse(value) ?? (throw FormatException('Invalid API version', value));
|
||||
|
||||
@override
|
||||
int compareTo(ApiVersion other) {
|
||||
final byMajor = major.compareTo(other.major);
|
||||
if (byMajor != 0) return byMajor;
|
||||
final byMinor = minor.compareTo(other.minor);
|
||||
if (byMinor != 0) return byMinor;
|
||||
return patch.compareTo(other.patch);
|
||||
}
|
||||
|
||||
bool operator >(ApiVersion other) => compareTo(other) > 0;
|
||||
bool operator >=(ApiVersion other) => compareTo(other) >= 0;
|
||||
bool operator <(ApiVersion other) => compareTo(other) < 0;
|
||||
bool operator <=(ApiVersion other) => compareTo(other) <= 0;
|
||||
|
||||
/// Whether this version (typically the connected server's) is new enough to
|
||||
/// support a [feature] introduced at the given version. Reads naturally:
|
||||
///
|
||||
/// ```dart
|
||||
/// if (serverVersion.supports(AssetResponseDto.isEditedAddedIn)) { ... }
|
||||
/// ```
|
||||
bool supports(ApiVersion feature) => this >= feature;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is ApiVersion && other.major == major && other.minor == minor && other.patch == patch;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(major, minor, patch);
|
||||
|
||||
@override
|
||||
String toString() => '$major.$minor.$patch';
|
||||
}
|
||||
+14
-8
@@ -1,9 +1,15 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// API-key authentication, applied to a query param, header, or cookie
|
||||
/// depending on [location] (`'query'`, `'header'`, or `'cookie'`).
|
||||
class ApiKeyAuth implements Authentication {
|
||||
ApiKeyAuth(this.location, this.paramName);
|
||||
|
||||
@@ -14,21 +20,21 @@ class ApiKeyAuth implements Authentication {
|
||||
String apiKey = '';
|
||||
|
||||
@override
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) async {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey';
|
||||
if (paramValue.isEmpty) return;
|
||||
|
||||
switch (location) {
|
||||
case 'query':
|
||||
if (paramValue.isNotEmpty) {
|
||||
if (location == 'query') {
|
||||
queryParams.add(QueryParam(paramName, paramValue));
|
||||
case 'header':
|
||||
} else if (location == 'header') {
|
||||
headerParams[paramName] = paramValue;
|
||||
case 'cookie':
|
||||
} else if (location == 'cookie') {
|
||||
headerParams.update(
|
||||
'Cookie',
|
||||
(existingCookie) => '$existingCookie; $paramName=$paramValue',
|
||||
ifAbsent: () => '$paramName=$paramValue',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-1
@@ -1,8 +1,15 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// Applies credentials to an outgoing request's query and header params.
|
||||
// ignore: one_member_abstracts
|
||||
abstract class Authentication {
|
||||
/// Apply authentication settings to header and query params.
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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 HttpBasicAuth implements Authentication {
|
||||
HttpBasicAuth({this.username = '', this.password = ''});
|
||||
|
||||
String username;
|
||||
String password;
|
||||
|
||||
@override
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
if (username.isNotEmpty && password.isNotEmpty) {
|
||||
final credentials = '$username:$password';
|
||||
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
|
||||
}
|
||||
}
|
||||
}
|
||||
+27
-15
@@ -1,21 +1,25 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// Supplies a bearer token, either as a literal `String` or lazily via a
|
||||
/// `String Function()` resolved on each request.
|
||||
typedef HttpBearerAuthProvider = String Function();
|
||||
|
||||
/// HTTP bearer-token authentication, applied as an `Authorization: Bearer ...`
|
||||
/// header.
|
||||
class HttpBearerAuth implements Authentication {
|
||||
HttpBearerAuth();
|
||||
|
||||
Object? _accessToken;
|
||||
dynamic _accessToken;
|
||||
|
||||
Object? get accessToken => _accessToken;
|
||||
dynamic get accessToken => _accessToken;
|
||||
|
||||
set accessToken(Object? accessToken) {
|
||||
set accessToken(dynamic accessToken) {
|
||||
if (accessToken is! String && accessToken is! HttpBearerAuthProvider) {
|
||||
throw ArgumentError('accessToken value must be either a String or a String Function().');
|
||||
}
|
||||
@@ -23,14 +27,22 @@ class HttpBearerAuth implements Authentication {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) async {
|
||||
final token = _accessToken;
|
||||
final accessToken = switch (token) {
|
||||
String() => token,
|
||||
HttpBearerAuthProvider() => token(),
|
||||
_ => null,
|
||||
};
|
||||
if (accessToken != null && accessToken.isNotEmpty) {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
if (_accessToken == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String accessToken;
|
||||
|
||||
if (_accessToken is String) {
|
||||
accessToken = _accessToken;
|
||||
} else if (_accessToken is HttpBearerAuthProvider) {
|
||||
accessToken = _accessToken!();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (accessToken.isNotEmpty) {
|
||||
headerParams['Authorization'] = 'Bearer $accessToken';
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+9
-3
@@ -1,16 +1,22 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// OAuth bearer-token authentication, applied as an `Authorization: Bearer ...`
|
||||
/// header.
|
||||
class OAuth implements Authentication {
|
||||
OAuth({this.accessToken = ''});
|
||||
|
||||
String accessToken;
|
||||
|
||||
@override
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) async {
|
||||
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
|
||||
if (accessToken.isNotEmpty) {
|
||||
headerParams['Authorization'] = 'Bearer $accessToken';
|
||||
}
|
||||
|
||||
+114
-51
@@ -1,81 +1,144 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
/// Activity create
|
||||
final class ActivityCreateDto {
|
||||
const ActivityCreateDto({
|
||||
class ActivityCreateDto {
|
||||
/// Returns a new [ActivityCreateDto] instance.
|
||||
ActivityCreateDto({
|
||||
required this.albumId,
|
||||
this.assetId = const Optional.absent(),
|
||||
this.comment = const Optional.absent(),
|
||||
this.assetId,
|
||||
this.comment,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
/// Album ID
|
||||
final String albumId;
|
||||
String albumId;
|
||||
|
||||
/// Asset ID (if activity is for an asset)
|
||||
final Optional<String> assetId;
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? assetId;
|
||||
|
||||
/// Comment text (required if type is comment)
|
||||
final Optional<String> comment;
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? comment;
|
||||
|
||||
final ReactionType type;
|
||||
ReactionType type;
|
||||
|
||||
static ActivityCreateDto? fromJson(dynamic value) {
|
||||
ApiCompat.upgrade<ActivityCreateDto>(value);
|
||||
if (value is! Map) return null;
|
||||
final json = value.cast<String, dynamic>();
|
||||
return .new(
|
||||
albumId: json[r'albumId'] as String,
|
||||
assetId: json.containsKey(r'assetId') ? Optional.present(json[r'assetId'] as String) : const Optional.absent(),
|
||||
comment: json.containsKey(r'comment') ? Optional.present(json[r'comment'] as String) : const Optional.absent(),
|
||||
type: (ReactionType.fromJson(json[r'type']))!,
|
||||
);
|
||||
}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ActivityCreateDto &&
|
||||
other.albumId == albumId &&
|
||||
other.assetId == assetId &&
|
||||
other.comment == comment &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(albumId.hashCode) +
|
||||
(assetId == null ? 0 : assetId!.hashCode) +
|
||||
(comment == null ? 0 : comment!.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ActivityCreateDto[albumId=$albumId, assetId=$assetId, comment=$comment, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'albumId'] = albumId;
|
||||
if (assetId case Present(:final value)) {
|
||||
json[r'assetId'] = value;
|
||||
json[r'albumId'] = this.albumId;
|
||||
if (this.assetId != null) {
|
||||
json[r'assetId'] = this.assetId;
|
||||
} else {
|
||||
// json[r'assetId'] = null;
|
||||
}
|
||||
if (comment case Present(:final value)) {
|
||||
json[r'comment'] = value;
|
||||
if (this.comment != null) {
|
||||
json[r'comment'] = this.comment;
|
||||
} else {
|
||||
// json[r'comment'] = null;
|
||||
}
|
||||
json[r'type'] = type.toJson();
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
||||
ActivityCreateDto copyWith({
|
||||
String? albumId,
|
||||
Optional<String>? assetId,
|
||||
Optional<String>? comment,
|
||||
ReactionType? type,
|
||||
}) {
|
||||
return .new(
|
||||
albumId: albumId ?? this.albumId,
|
||||
assetId: assetId ?? this.assetId,
|
||||
comment: comment ?? this.comment,
|
||||
type: type ?? this.type,
|
||||
);
|
||||
/// Returns a new [ActivityCreateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActivityCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActivityCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ActivityCreateDto(
|
||||
albumId: mapValueOfType<String>(json, r'albumId')!,
|
||||
assetId: mapValueOfType<String>(json, r'assetId'),
|
||||
comment: mapValueOfType<String>(json, r'comment'),
|
||||
type: ReactionType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other is ActivityCreateDto &&
|
||||
albumId == other.albumId &&
|
||||
assetId == other.assetId &&
|
||||
comment == other.comment &&
|
||||
type == other.type);
|
||||
static List<ActivityCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ActivityCreateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ActivityCreateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hashAll([albumId, assetId, comment, type]);
|
||||
static Map<String, ActivityCreateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ActivityCreateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ActivityCreateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'ActivityCreateDto(albumId=$albumId, assetId=$assetId, comment=$comment, type=$type)';
|
||||
// maps a json object with a list of ActivityCreateDto-objects as value to a dart map
|
||||
static Map<String, List<ActivityCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ActivityCreateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ActivityCreateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'albumId',
|
||||
'type',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+114
-62
@@ -1,9 +1,18 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
final class ActivityResponseDto {
|
||||
const ActivityResponseDto({
|
||||
class ActivityResponseDto {
|
||||
/// Returns a new [ActivityResponseDto] instance.
|
||||
ActivityResponseDto({
|
||||
required this.assetId,
|
||||
this.comment,
|
||||
required this.createdAt,
|
||||
@@ -13,88 +22,131 @@ final class ActivityResponseDto {
|
||||
});
|
||||
|
||||
/// Asset ID (if activity is for an asset)
|
||||
final String? assetId;
|
||||
String? assetId;
|
||||
|
||||
/// Comment text (for comment activities)
|
||||
final String? comment;
|
||||
String? comment;
|
||||
|
||||
/// Creation date
|
||||
final DateTime createdAt;
|
||||
DateTime createdAt;
|
||||
|
||||
/// Activity ID
|
||||
final String id;
|
||||
String id;
|
||||
|
||||
final ReactionType type;
|
||||
ReactionType type;
|
||||
|
||||
final UserResponseDto user;
|
||||
UserResponseDto user;
|
||||
|
||||
static const _undefined = Object();
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ActivityResponseDto &&
|
||||
other.assetId == assetId &&
|
||||
other.comment == comment &&
|
||||
other.createdAt == createdAt &&
|
||||
other.id == id &&
|
||||
other.type == type &&
|
||||
other.user == user;
|
||||
|
||||
static ActivityResponseDto? fromJson(dynamic value) {
|
||||
ApiCompat.upgrade<ActivityResponseDto>(value);
|
||||
if (value is! Map) return null;
|
||||
final json = value.cast<String, dynamic>();
|
||||
return .new(
|
||||
assetId: (json[r'assetId'] as String?),
|
||||
comment: (json[r'comment'] as String?),
|
||||
createdAt: DateTime.parse(json[r'createdAt'] as String),
|
||||
id: json[r'id'] as String,
|
||||
type: (ReactionType.fromJson(json[r'type']))!,
|
||||
user: (UserResponseDto.fromJson(json[r'user']))!,
|
||||
);
|
||||
}
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(assetId == null ? 0 : assetId!.hashCode) +
|
||||
(comment == null ? 0 : comment!.hashCode) +
|
||||
(createdAt.hashCode) +
|
||||
(id.hashCode) +
|
||||
(type.hashCode) +
|
||||
(user.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ActivityResponseDto[assetId=$assetId, comment=$comment, createdAt=$createdAt, id=$id, type=$type, user=$user]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (assetId != null) {
|
||||
json[r'assetId'] = assetId!;
|
||||
if (this.assetId != null) {
|
||||
json[r'assetId'] = this.assetId;
|
||||
} else {
|
||||
// json[r'assetId'] = null;
|
||||
}
|
||||
if (comment != null) {
|
||||
json[r'comment'] = comment!;
|
||||
if (this.comment != null) {
|
||||
json[r'comment'] = this.comment;
|
||||
} else {
|
||||
// json[r'comment'] = null;
|
||||
}
|
||||
json[r'createdAt'] = createdAt.toUtc().toIso8601String();
|
||||
json[r'id'] = id;
|
||||
json[r'type'] = type.toJson();
|
||||
json[r'user'] = user.toJson();
|
||||
json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')
|
||||
? this.createdAt.millisecondsSinceEpoch
|
||||
: this.createdAt.toUtc().toIso8601String();
|
||||
json[r'id'] = this.id;
|
||||
json[r'type'] = this.type;
|
||||
json[r'user'] = this.user;
|
||||
return json;
|
||||
}
|
||||
|
||||
ActivityResponseDto copyWith({
|
||||
Object? assetId = _undefined,
|
||||
Object? comment = _undefined,
|
||||
DateTime? createdAt,
|
||||
String? id,
|
||||
ReactionType? type,
|
||||
UserResponseDto? user,
|
||||
}) {
|
||||
return .new(
|
||||
assetId: identical(assetId, _undefined) ? this.assetId : assetId as String?,
|
||||
comment: identical(comment, _undefined) ? this.comment : comment as String?,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
id: id ?? this.id,
|
||||
type: type ?? this.type,
|
||||
user: user ?? this.user,
|
||||
);
|
||||
/// Returns a new [ActivityResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActivityResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActivityResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ActivityResponseDto(
|
||||
assetId: mapValueOfType<String>(json, r'assetId'),
|
||||
comment: mapValueOfType<String>(json, r'comment'),
|
||||
createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
type: ReactionType.fromJson(json[r'type'])!,
|
||||
user: UserResponseDto.fromJson(json[r'user'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other is ActivityResponseDto &&
|
||||
assetId == other.assetId &&
|
||||
comment == other.comment &&
|
||||
createdAt == other.createdAt &&
|
||||
id == other.id &&
|
||||
type == other.type &&
|
||||
user == other.user);
|
||||
static List<ActivityResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ActivityResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ActivityResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hashAll([assetId, comment, createdAt, id, type, user]);
|
||||
static Map<String, ActivityResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ActivityResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ActivityResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'ActivityResponseDto(assetId=$assetId, comment=$comment, createdAt=$createdAt, id=$id, type=$type, user=$user)';
|
||||
// maps a json object with a list of ActivityResponseDto-objects as value to a dart map
|
||||
static Map<String, List<ActivityResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ActivityResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ActivityResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'assetId',
|
||||
'createdAt',
|
||||
'id',
|
||||
'type',
|
||||
'user',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+93
-23
@@ -1,45 +1,115 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
final class ActivityStatisticsResponseDto {
|
||||
const ActivityStatisticsResponseDto({required this.comments, required this.likes});
|
||||
class ActivityStatisticsResponseDto {
|
||||
/// Returns a new [ActivityStatisticsResponseDto] instance.
|
||||
ActivityStatisticsResponseDto({
|
||||
required this.comments,
|
||||
required this.likes,
|
||||
});
|
||||
|
||||
/// Number of comments
|
||||
final int comments;
|
||||
///
|
||||
/// Minimum value: 0
|
||||
/// Maximum value: 9007199254740991
|
||||
int comments;
|
||||
|
||||
/// Number of likes
|
||||
final int likes;
|
||||
///
|
||||
/// Minimum value: 0
|
||||
/// Maximum value: 9007199254740991
|
||||
int likes;
|
||||
|
||||
static ActivityStatisticsResponseDto? fromJson(dynamic value) {
|
||||
ApiCompat.upgrade<ActivityStatisticsResponseDto>(value);
|
||||
if (value is! Map) return null;
|
||||
final json = value.cast<String, dynamic>();
|
||||
return .new(comments: json[r'comments'] as int, likes: json[r'likes'] as int);
|
||||
}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ActivityStatisticsResponseDto &&
|
||||
other.comments == comments &&
|
||||
other.likes == likes;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(comments.hashCode) +
|
||||
(likes.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ActivityStatisticsResponseDto[comments=$comments, likes=$likes]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'comments'] = comments;
|
||||
json[r'likes'] = likes;
|
||||
json[r'comments'] = this.comments;
|
||||
json[r'likes'] = this.likes;
|
||||
return json;
|
||||
}
|
||||
|
||||
ActivityStatisticsResponseDto copyWith({int? comments, int? likes}) {
|
||||
return .new(comments: comments ?? this.comments, likes: likes ?? this.likes);
|
||||
/// Returns a new [ActivityStatisticsResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActivityStatisticsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActivityStatisticsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ActivityStatisticsResponseDto(
|
||||
comments: mapValueOfType<int>(json, r'comments')!,
|
||||
likes: mapValueOfType<int>(json, r'likes')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other is ActivityStatisticsResponseDto && comments == other.comments && likes == other.likes);
|
||||
static List<ActivityStatisticsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ActivityStatisticsResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ActivityStatisticsResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hashAll([comments, likes]);
|
||||
static Map<String, ActivityStatisticsResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ActivityStatisticsResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ActivityStatisticsResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'ActivityStatisticsResponseDto(comments=$comments, likes=$likes)';
|
||||
// maps a json object with a list of ActivityStatisticsResponseDto-objects as value to a dart map
|
||||
static Map<String, List<ActivityStatisticsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ActivityStatisticsResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ActivityStatisticsResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'comments',
|
||||
'likes',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+80
-25
@@ -1,45 +1,100 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
final class AddUsersDto {
|
||||
const AddUsersDto({required this.albumUsers});
|
||||
class AddUsersDto {
|
||||
/// Returns a new [AddUsersDto] instance.
|
||||
AddUsersDto({
|
||||
this.albumUsers = const [],
|
||||
});
|
||||
|
||||
/// Album users to add
|
||||
final List<AlbumUserAddDto> albumUsers;
|
||||
List<AlbumUserAddDto> albumUsers;
|
||||
|
||||
static AddUsersDto? fromJson(dynamic value) {
|
||||
ApiCompat.upgrade<AddUsersDto>(value);
|
||||
if (value is! Map) return null;
|
||||
final json = value.cast<String, dynamic>();
|
||||
return .new(
|
||||
albumUsers: ((json[r'albumUsers'] as List?)
|
||||
?.map(($e) => (AlbumUserAddDto.fromJson($e))!)
|
||||
.toList(growable: false))!,
|
||||
);
|
||||
}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AddUsersDto &&
|
||||
_deepEquality.equals(other.albumUsers, albumUsers);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(albumUsers.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AddUsersDto[albumUsers=$albumUsers]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'albumUsers'] = albumUsers.map(($e) => $e.toJson()).toList(growable: false);
|
||||
json[r'albumUsers'] = this.albumUsers;
|
||||
return json;
|
||||
}
|
||||
|
||||
AddUsersDto copyWith({List<AlbumUserAddDto>? albumUsers}) {
|
||||
return .new(albumUsers: albumUsers ?? this.albumUsers);
|
||||
/// Returns a new [AddUsersDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AddUsersDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AddUsersDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AddUsersDto(
|
||||
albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other is AddUsersDto && const DeepCollectionEquality().equals(albumUsers, other.albumUsers));
|
||||
static List<AddUsersDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AddUsersDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AddUsersDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hashAll([const DeepCollectionEquality().hash(albumUsers)]);
|
||||
static Map<String, AddUsersDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AddUsersDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AddUsersDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'AddUsersDto(albumUsers=$albumUsers)';
|
||||
// maps a json object with a list of AddUsersDto-objects as value to a dart map
|
||||
static Map<String, List<AddUsersDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AddUsersDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AddUsersDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'albumUsers',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+80
-20
@@ -1,40 +1,100 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// 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;
|
||||
|
||||
final class AdminOnboardingUpdateDto {
|
||||
const AdminOnboardingUpdateDto({required this.isOnboarded});
|
||||
class AdminOnboardingUpdateDto {
|
||||
/// Returns a new [AdminOnboardingUpdateDto] instance.
|
||||
AdminOnboardingUpdateDto({
|
||||
required this.isOnboarded,
|
||||
});
|
||||
|
||||
/// Is admin onboarded
|
||||
final bool isOnboarded;
|
||||
bool isOnboarded;
|
||||
|
||||
static AdminOnboardingUpdateDto? fromJson(dynamic value) {
|
||||
ApiCompat.upgrade<AdminOnboardingUpdateDto>(value);
|
||||
if (value is! Map) return null;
|
||||
final json = value.cast<String, dynamic>();
|
||||
return .new(isOnboarded: json[r'isOnboarded'] as bool);
|
||||
}
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AdminOnboardingUpdateDto &&
|
||||
other.isOnboarded == isOnboarded;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(isOnboarded.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AdminOnboardingUpdateDto[isOnboarded=$isOnboarded]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'isOnboarded'] = isOnboarded;
|
||||
json[r'isOnboarded'] = this.isOnboarded;
|
||||
return json;
|
||||
}
|
||||
|
||||
AdminOnboardingUpdateDto copyWith({bool? isOnboarded}) {
|
||||
return .new(isOnboarded: isOnboarded ?? this.isOnboarded);
|
||||
/// Returns a new [AdminOnboardingUpdateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AdminOnboardingUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AdminOnboardingUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AdminOnboardingUpdateDto(
|
||||
isOnboarded: mapValueOfType<bool>(json, r'isOnboarded')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other is AdminOnboardingUpdateDto && isOnboarded == other.isOnboarded);
|
||||
static List<AdminOnboardingUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AdminOnboardingUpdateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AdminOnboardingUpdateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hashAll([isOnboarded]);
|
||||
static Map<String, AdminOnboardingUpdateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AdminOnboardingUpdateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AdminOnboardingUpdateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'AdminOnboardingUpdateDto(isOnboarded=$isOnboarded)';
|
||||
// maps a json object with a list of AdminOnboardingUpdateDto-objects as value to a dart map
|
||||
static Map<String, List<AdminOnboardingUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AdminOnboardingUpdateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AdminOnboardingUpdateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'isOnboarded',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user