Compare commits

..

33 Commits

Author SHA1 Message Date
izzy bd01b5931b chore: remove open-api/typescript-sdk 2026-06-01 14:34:14 +01:00
izzy 8de96382be chore: clarify comment 2026-06-01 12:47:46 +01:00
izzy 2b0f253015 chore: clean up comments 2026-06-01 12:17:31 +01:00
izzy 0da6aba203 chore: use peer deps 2026-06-01 11:22:05 +01:00
izzy a5a0a0b687 Merge branch 'fix/devcontainer-buildcache' into feat/yucca-integration 2026-06-01 10:27:19 +01:00
izzy 490c8e2321 fix(devcontainer): update build cache volume 2026-06-01 10:23:29 +01:00
izzy 30d1fb73d0 chore: strip devcontainer changes 2026-06-01 10:09:23 +01:00
izzy cf6cbfdcd6 Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-06-01 10:04:33 +01:00
izzy 676831f052 chore: drop registry 2026-06-01 09:53:30 +01:00
izzy 3a53b5f807 Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-05-20 11:45:22 +01:00
izzy 0cec4f3bd8 Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-05-18 16:53:16 +01:00
izzy a41aa623da chore: oapi 2026-05-18 16:32:30 +01:00
izzy cb87a39b3a Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-05-18 16:32:16 +01:00
izzy 820653d59e chore: bump packages 2026-05-18 15:28:06 +01:00
izzy 64adfa6cc3 feat: auto select latest db backup
Signed-off-by: izzy <me@insrt.uk>
2026-05-18 12:44:01 +01:00
izzy 3465ed5c6b refactor: new package name
Signed-off-by: izzy <me@insrt.uk>
2026-05-18 12:01:50 +01:00
izzy 9d17e51e54 fix: point to real component 2026-05-08 14:27:42 +01:00
izzy 8d5f447d45 chore: change registry 2026-05-08 14:21:47 +01:00
izzy 6dd9eaff73 chore: remove subm 2026-05-08 14:10:21 +01:00
izzy b54fe0bb3b Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-05-08 14:00:20 +01:00
izzy 173a6afda8 chore: wip 2026-05-08 13:51:52 +01:00
izzy 998d82643c chore: new UI 2026-05-08 12:30:04 +01:00
izzy f3ce407e9c chore: bump dependency 2026-04-22 14:07:52 +01:00
izzy 4b4308650c chore: bump deps. 2026-04-20 12:41:52 +01:00
izzy 425abe510a Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-04-20 10:55:40 +01:00
izzy 4ded06dbb7 test: web e2e tests 2026-04-20 10:46:48 +01:00
izzy 5f5d3ea0ba Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-04-16 14:41:49 +01:00
izzy fa828dddc9 chore: bump packages
Signed-off-by: izzy <me@insrt.uk>
2026-04-16 14:40:40 +01:00
izzy 21d0821ed2 chore: bump version 2026-04-16 12:19:04 +01:00
izzy 75025bb6be Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-04-16 12:04:38 +01:00
izzy dd1712656d chore: bump package depends 2026-04-16 11:58:20 +01:00
izzy 33605efd0e chore: use persistent config storage 2026-04-16 11:19:31 +01:00
izzy 77f9e87bd3 feat: yucca integration 2026-04-15 15:17:19 +01:00
118 changed files with 12587 additions and 3134 deletions
-12
View File
@@ -1,12 +0,0 @@
{
"permissions": {
"allow": [
"Bash(sudo chown:*)",
"Read(//usr/lib/**)",
"Bash(extism-js --version)",
"Read(//home/min/**)",
"Read(//usr/local/**)",
"Read(//LUNA/**)"
]
}
}
+1
View File
@@ -26,6 +26,7 @@
"devDependencies": {
"@eslint/js": "^10.0.0",
"@faker-js/faker": "^10.1.0",
"@futo-org/backups-orchestrator-ui": "0.1.72",
"@immich/cli": "workspace:*",
"@immich/e2e-auth-server": "workspace:*",
"@immich/sdk": "workspace:*",
@@ -0,0 +1,385 @@
import * as sdk from '@futo-org/backups-orchestrator-ui/sdk';
import { LoginResponseDto, StorageFolder } from '@immich/sdk';
import { io, Socket } from 'socket.io-client';
import { createUserDto } from 'src/fixtures';
import { errorDto } from 'src/responses';
import { app, asBearerAuth, baseUrl, utils } from 'src/utils';
import request from 'supertest';
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
describe('/yucca', () => {
let admin: LoginResponseDto;
let nonAdmin: LoginResponseDto;
let requestOpts: any;
let filename: string;
let socket: Socket;
let libraryId: string;
beforeAll(async () => {
sdk.defaults.baseUrl = baseUrl;
await utils.resetDatabase();
admin = await utils.adminSetup();
nonAdmin = await utils.userSetup(admin.accessToken, createUserDto.user1);
requestOpts = { headers: asBearerAuth(admin.accessToken) };
await utils.resetBackups(admin.accessToken);
await sdk.resetOrchestrator(requestOpts);
socket = io(baseUrl, {
path: '/api/yucca/socket.io',
transports: ['websocket'],
extraHeaders: asBearerAuth(admin.accessToken),
});
socket.onAny(console.info);
});
afterAll(async () => {
socket.close();
// "resetDatabase" does not reinit the module config, trigger an update / clean up
if (libraryId) {
await utils.deleteLibrary(admin.accessToken, libraryId);
}
});
const waitForMessage = (type: string) => {
return new Promise((resolve) => {
const listener = (msg: string) => {
const payload = JSON.parse(msg);
if (payload.type !== type) {
return;
}
resolve(payload);
socket.offAny(listener);
};
socket.onAny(listener);
});
};
describe('Orchestration Module', async () => {
it('works', async () => {
await expect(sdk.onboardingStatus(requestOpts)).resolves.toEqual(
expect.objectContaining({
hasOnboardedKey: false,
hasBackend: false,
hasBackup: false,
hasSchedule: false,
hasSkippedExtraConfig: false,
}),
);
});
it('is inaccessible without admin', async () => {
await expect(sdk.onboardingStatus({ headers: asBearerAuth(nonAdmin.accessToken) })).rejects.toEqual(
expect.objectContaining({ data: errorDto.forbidden }),
);
});
it('is inaccessible without logging in', async () => {
await expect(sdk.onboardingStatus()).rejects.toEqual(expect.objectContaining({ data: errorDto.unauthorized }));
});
});
describe.sequential('Local Backup', async () => {
beforeAll(async () => {
await sdk.importRecoveryKey(
{
recoveryKey: '0'.repeat(64),
},
requestOpts,
);
});
it.sequential('configures a local backend', async () => {
await utils.mkdir('/local-backend');
await sdk.createLocalBackend(
{
path: '/local-backend',
},
requestOpts,
);
});
it.sequential('configures Immich backup', async () => {
const event = waitForMessage('IntegrationUpdate');
await sdk.configureImmichIntegration(
{
name: 'Immich',
worm: false,
cron: '0 3 * * *',
backupConfiguration: true,
dataFolders: [StorageFolder.Backups, StorageFolder.Upload],
libraries: 'all',
},
requestOpts,
);
await event;
await expect(sdk.getIntegrations(requestOpts)).resolves.toEqual(
expect.objectContaining({
immichIntegration: expect.objectContaining({
configuration: {
backupConfiguration: true,
dataFolders: ['backups', 'upload'],
libraries: 'all',
},
}),
immichState: {
dataFolders: expect.arrayContaining(Object.values(StorageFolder)),
dataPath: '/data',
libraries: [],
},
}),
);
});
it.sequential('updates configuration', async () => {
await utils.mkdir('/test');
({ id: libraryId } = await utils.createLibrary(admin.accessToken, {
ownerId: admin.userId,
name: 'My Library',
importPaths: ['/test'],
}));
await expect(sdk.getIntegrations(requestOpts)).resolves.toEqual(
expect.objectContaining({
immichIntegration: expect.any(Object),
immichState: expect.objectContaining({
libraries: expect.arrayContaining([
expect.objectContaining({
name: 'My Library',
importPaths: ['/test'],
}),
]),
}),
}),
);
});
it.sequential('creates a snapshot', async () => {
const event = waitForMessage('TaskEnd');
const {
repositories: [{ id }],
} = await sdk.getRepositories(requestOpts);
filename = await utils.createBackup(admin.accessToken);
await sdk.createBackup(id, requestOpts);
await event;
const {
snapshots: [{ id: snapshotId }],
} = await sdk.getSnapshots(id, requestOpts);
await expect(sdk.getSnapshotListing(id, snapshotId, {}, requestOpts)).resolves.toMatchInlineSnapshot(`
{
"items": [
{
"isDirectory": true,
"path": "/data",
},
{
"isDirectory": true,
"path": "/test",
},
{
"isDirectory": true,
"path": "/yucca",
},
],
"parent": "/",
"path": "/",
}
`);
await expect(sdk.getSnapshotListing(id, snapshotId, { path: '/data' }, requestOpts)).resolves
.toMatchInlineSnapshot(`
{
"items": [
{
"isDirectory": true,
"path": "/data/backups",
},
{
"isDirectory": true,
"path": "/data/upload",
},
],
"parent": "/",
"path": "/data",
}
`);
await expect(sdk.getSnapshotListing(id, snapshotId, { path: '/data/backups' }, requestOpts)).resolves.toEqual(
expect.objectContaining({
items: [
{
isDirectory: false,
path: '/data/backups/.immich',
},
{
isDirectory: false,
path: expect.stringContaining('/data/backups/immich-db-backup-'),
},
],
parent: '/data',
path: '/data/backups',
}),
);
});
});
describe.sequential('Restore Local Backup', async () => {
let cookie: string;
beforeAll(async () => {
await sdk.resetOrchestrator(requestOpts);
await utils.resetDatabase();
socket.disconnect();
await utils.disconnectDatabase();
});
afterAll(async () => {
await utils.connectDatabase();
});
it.sequential(
'restores backup',
async () => {
const { status, headers } = await request(app).post('/admin/database-backups/start-restore').send();
expect(status).toBe(201);
cookie = headers['set-cookie'][0].split(';')[0];
await expect
.poll(
async () => {
const { status, body } = await request(app).get('/server/config');
expect(status).toBe(200);
return body.maintenanceMode;
},
{
interval: 500,
timeout: 10_000,
},
)
.toBeTruthy();
const maintenanceRequestOpts = {
headers: {
cookie,
},
};
await expect(sdk.getSchedules(maintenanceRequestOpts)).resolves.toEqual({ schedules: [] });
await sdk.importRecoveryKey(
{
recoveryKey: '0'.repeat(64),
},
maintenanceRequestOpts,
);
const {
backend: { id: backendId },
} = await sdk.createLocalBackend(
{
path: '/local-backend',
},
maintenanceRequestOpts,
);
const {
repositories: [
{
id: repositoryId,
snapshots: [{ id: snapshotId }],
},
],
} = await sdk.inspectRepositories(maintenanceRequestOpts);
socket = io(baseUrl, {
path: '/api/yucca/socket.io',
transports: ['websocket'],
extraHeaders: {
cookie,
},
});
const event = waitForMessage('TaskEnd');
await sdk.restoreFromPoint(
repositoryId,
snapshotId,
backendId,
{
yuccaConfig: '/yucca',
include: ['/data'],
},
maintenanceRequestOpts,
);
await event;
socket.disconnect();
const { status: restoreStatus } = await request(app).post('/admin/maintenance').set('Cookie', cookie).send({
action: 'restore_database',
restoreBackupFilename: filename,
});
expect(restoreStatus).toBe(201);
await expect
.poll(
async () => {
const { status, body } = await request(app).get('/server/config');
expect(status).toBe(200);
return body.maintenanceMode;
},
{
interval: 500,
timeout: 10_000,
},
)
.toBeTruthy();
const { status: status2, body } = await request(app).get('/admin/maintenance/status');
expect(status2).toBe(200);
expect(body).toEqual(
expect.objectContaining({
active: true,
action: 'restore_database',
}),
);
await expect
.poll(
async () => {
const { status, body } = await request(app).get('/server/config');
expect(status).toBe(200);
return body.maintenanceMode;
},
{
interval: 500,
timeout: 60_000,
},
)
.toBeFalsy();
await expect(sdk.getSchedules(requestOpts)).resolves.toEqual({
schedules: expect.arrayContaining([expect.objectContaining({ id: expect.any(String) })]),
});
},
60_000,
);
});
});
@@ -95,6 +95,7 @@ test.describe('Database Backups', () => {
await page.waitForURL('/maintenance**');
}
await page.getByRole('button', { name: 'Database Backup' }).click();
await page.getByRole('button', { name: 'Next' }).click();
await page.getByRole('button', { name: 'Restore', exact: true }).click();
await page.getByRole('dialog').getByRole('button', { name: 'Restore' }).click();
@@ -0,0 +1,141 @@
import { LoginResponseDto, confirmRecoveryKey, importRecoveryKey, resetOrchestrator } from '@immich/sdk';
import { expect, test } from '@playwright/test';
import { io, type Socket } from 'socket.io-client';
import { asBearerAuth, baseUrl, utils } from 'src/utils';
test.describe.configure({ mode: 'serial' });
test.describe('Yucca Backups', () => {
let admin: LoginResponseDto;
let socket: Socket;
const waitForTaskEnd = () =>
new Promise<void>((resolve) => {
const listener = (msg: string) => {
try {
const payload = JSON.parse(msg);
if (payload.type === 'TaskEnd') {
socket.offAny(listener);
resolve();
}
} catch {
// no-op
}
};
socket.onAny(listener);
});
test.beforeAll(async () => {
utils.initSdk();
await utils.resetDatabase();
admin = await utils.adminSetup();
const headers = asBearerAuth(admin.accessToken);
await resetOrchestrator({ headers });
await importRecoveryKey({ importRecoveryKeyRequest: { recoveryKey: '0'.repeat(64) } }, { headers });
await confirmRecoveryKey({ headers });
await utils.mkdir('/local-backend');
socket = io(baseUrl, {
path: '/api/yucca/socket.io',
transports: ['websocket'],
extraHeaders: headers,
forceNew: true,
});
await new Promise<void>((resolve) => socket.on('connect', () => resolve()));
});
test.afterAll(async () => {
socket?.close();
});
test('onboarding configures a local backend', async ({ context, page }) => {
test.setTimeout(30_000);
await utils.setAuthCookies(context, admin.accessToken);
await page.goto('/backups');
const dialog = page.getByRole('dialog');
await expect(dialog.filter({ hasText: 'Backup options' })).toBeVisible();
await dialog.getByText('Local Folder').click();
await expect(dialog.filter({ hasText: 'Create local backend' })).toBeVisible();
await dialog.getByLabel('Path').fill('/local-backend');
await dialog.getByRole('button', { name: 'Save' }).click();
await expect(dialog.filter({ hasText: 'Configure Your Immich Backup' })).toBeVisible();
await dialog.getByRole('button', { name: 'Save' }).click();
await expect(dialog).toHaveCount(0);
await expect(page.getByRole('link', { name: 'Repositories' })).toBeVisible();
});
test('manually triggers a backup and waits for completion', async ({ context, page }) => {
test.setTimeout(60_000);
await utils.setAuthCookies(context, admin.accessToken);
await page.goto('/backups/repositories');
const backupNow = page.getByRole('button', { name: 'Backup Now' });
await expect(backupNow).toBeVisible();
const taskEnd = waitForTaskEnd();
await backupNow.click();
await expect(page.getByRole('dialog').filter({ hasText: 'Log Output' })).toBeVisible();
await taskEnd;
});
test('resets immich and restores from the local yucca backup', async ({ context, page }) => {
test.setTimeout(120_000);
await utils.setAuthCookies(context, admin.accessToken);
await utils.resetBackups(admin.accessToken);
await utils.createBackup(admin.accessToken);
await resetOrchestrator({ headers: asBearerAuth(admin.accessToken) });
await utils.resetDatabase();
await page.goto('/');
await page.getByRole('button', { name: 'Restore from backup' }).click();
try {
await page.waitForURL('/maintenance**');
} catch {
await page.goto('/maintenance');
await page.waitForURL('/maintenance**');
}
await page.getByRole('button', { name: 'FUTO Backups' }).click();
const dialog = page.getByRole('dialog');
await expect(dialog.filter({ hasText: 'Import recovery key' })).toBeVisible();
await dialog.getByLabel('Recovery Key').fill('0'.repeat(64));
await dialog.getByRole('button', { name: 'Save' }).click();
await expect(dialog.filter({ hasText: 'Where would you like to restore from?' })).toBeVisible();
await dialog.getByText('Local Folder').click();
await expect(dialog.filter({ hasText: 'Create local backend' })).toBeVisible();
await dialog.getByLabel('Path').fill('/local-backend');
await dialog.getByRole('button', { name: 'Save' }).click();
await expect(dialog.filter({ hasText: 'Select Restore Point' })).toBeVisible();
await dialog.getByRole('button', { name: 'Select' }).first().click();
await expect(dialog.filter({ hasText: /Restore from/ })).toBeVisible();
await dialog.getByRole('button', { name: 'Restore' }).first().click();
await expect(dialog.filter({ hasText: 'Confirm restore from snapshot' })).toBeVisible();
await dialog.getByRole('button', { name: 'Restore' }).click();
await expect(dialog.filter({ hasText: 'Restoring' })).toBeVisible();
await expect(dialog.filter({ hasText: 'Restoring' })).toBeHidden({ timeout: 60_000 });
await page.getByRole('button', { name: 'Next' }).click();
await page.getByRole('button', { name: 'Restore', exact: true }).click();
await page.getByRole('dialog').getByRole('button', { name: 'Restore' }).click();
await page.waitForURL('/maintenance?**');
await page.waitForURL('/photos', { timeout: 90_000 });
});
});
+7
View File
@@ -30,6 +30,7 @@ import {
createUserAdmin,
deleteAssets,
deleteDatabaseBackup,
deleteLibrary,
getAssetInfo,
getConfig,
getConfigDefaults,
@@ -460,6 +461,8 @@ export const utils = {
updateLibrary: (accessToken: string, id: string, dto: UpdateLibraryDto) =>
updateLibrary({ id, updateLibraryDto: dto }, { headers: asBearerAuth(accessToken) }),
deleteLibrary: (accessToken: string, id: string) => deleteLibrary({ id }, { headers: asBearerAuth(accessToken) }),
createPartner: (accessToken: string, id: string) =>
createPartner({ partnerCreateDto: { sharedWithId: id } }, { headers: asBearerAuth(accessToken) }),
@@ -563,6 +566,10 @@ export const utils = {
return executeCommand('docker', ['exec', 'immich-e2e-server', 'mv', source, dest]).promise;
},
async mkdir(path: string) {
return executeCommand('docker', ['exec', 'immich-e2e-server', 'mkdir', '-p', path]).promise;
},
createBackup: async (accessToken: string) => {
await utils.createJob(accessToken, {
name: ManualJobName.BackupDatabase,
+5
View File
@@ -1478,6 +1478,7 @@
"maintenance_end_error": "Failed to end maintenance mode.",
"maintenance_logged_in_as": "Currently logged in as {user}",
"maintenance_restore_from_backup": "Restore From Backup",
"maintenance_restore_latest_backup_description": "We'll restore your database from the most recent backup. You can also pick a different one.",
"maintenance_restore_library": "Restore Your Library",
"maintenance_restore_library_confirm": "If this looks correct, continue to restoring a backup!",
"maintenance_restore_library_description": "Restoring Database",
@@ -1490,6 +1491,10 @@
"maintenance_restore_library_hint_regenerate_later": "You can regenerate these later in settings",
"maintenance_restore_library_hint_storage_template_missing_files": "Using storage template? You may be missing files",
"maintenance_restore_library_loading": "Loading integrity checks and heuristics…",
"maintenance_restore_loading_backups": "Loading backups…",
"maintenance_restore_no_backups": "There are no database backups.",
"maintenance_restore_select_another": "Select another backup",
"maintenance_restore_upload_backup": "Upload a backup",
"maintenance_task_backup": "Creating a backup of the existing database…",
"maintenance_task_migrations": "Running database migrations…",
"maintenance_task_restore": "Restoring the chosen backup…",
-1
View File
@@ -11,7 +11,6 @@ url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linu
url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz"
[tools."aqua:flutter/flutter"."platforms.linux-x64"]
checksum = "blake3:a0facd8901488686e69ecd64fa3e450c4086f4787162c6a5663411b4de0d0245"
url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz"
[tools."aqua:flutter/flutter"."platforms.linux-x64-musl"]
+89 -3
View File
@@ -118,6 +118,7 @@ Class | Method | HTTP request | Description
*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
*AuthApi* | [**oidcDeviceFlow**](doc//AuthApi.md#oidcdeviceflow) | **GET** /yucca/auth/oidc/device |
*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
@@ -136,6 +137,8 @@ Class | Method | HTTP request | Description
*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
*BackendApi* | [**createLocalBackend**](doc//BackendApi.md#createlocalbackend) | **POST** /yucca/backend/local |
*BackendApi* | [**getBackends**](doc//BackendApi.md#getbackends) | **GET** /yucca/backend |
*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
@@ -144,6 +147,7 @@ Class | Method | HTTP request | Description
*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
*DevelopmentApi* | [**resetOrchestrator**](doc//DevelopmentApi.md#resetorchestrator) | **POST** /yucca/debug/reset |
*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
@@ -154,6 +158,9 @@ Class | Method | HTTP request | Description
*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
*FilesystemApi* | [**getFileListing**](doc//FilesystemApi.md#getfilelisting) | **GET** /yucca/fs |
*IntegrationsApi* | [**configureImmichIntegration**](doc//IntegrationsApi.md#configureimmichintegration) | **POST** /yucca/integrations/immich |
*IntegrationsApi* | [**getIntegrations**](doc//IntegrationsApi.md#getintegrations) | **GET** /yucca/integrations |
*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
@@ -188,6 +195,11 @@ Class | Method | HTTP request | Description
*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
*OnboardingApi* | [**confirmRecoveryKey**](doc//OnboardingApi.md#confirmrecoverykey) | **POST** /yucca/onboarding/recovery-key |
*OnboardingApi* | [**currentRecoveryKey**](doc//OnboardingApi.md#currentrecoverykey) | **GET** /yucca/onboarding/recovery-key |
*OnboardingApi* | [**importRecoveryKey**](doc//OnboardingApi.md#importrecoverykey) | **PUT** /yucca/onboarding/recovery-key |
*OnboardingApi* | [**onboardingStatus**](doc//OnboardingApi.md#onboardingstatus) | **GET** /yucca/onboarding |
*OnboardingApi* | [**skipOnboardingExtraConfig**](doc//OnboardingApi.md#skiponboardingextraconfig) | **POST** /yucca/onboarding/skip |
*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
@@ -206,13 +218,35 @@ Class | Method | HTTP request | Description
*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
*RepositoryApi* | [**checkImportRepository**](doc//RepositoryApi.md#checkimportrepository) | **GET** /yucca/repository/{id}/import |
*RepositoryApi* | [**createBackup**](doc//RepositoryApi.md#createbackup) | **POST** /yucca/repository/{id} |
*RepositoryApi* | [**createRepository**](doc//RepositoryApi.md#createrepository) | **POST** /yucca/repository |
*RepositoryApi* | [**deleteRepository**](doc//RepositoryApi.md#deleterepository) | **DELETE** /yucca/repository/{id} |
*RepositoryApi* | [**forgetSnapshot**](doc//RepositoryApi.md#forgetsnapshot) | **DELETE** /yucca/repository/{id}/snapshots/{snapshot} |
*RepositoryApi* | [**getRepositories**](doc//RepositoryApi.md#getrepositories) | **GET** /yucca/repository |
*RepositoryApi* | [**getRunHistory**](doc//RepositoryApi.md#getrunhistory) | **GET** /yucca/repository/{id}/runs |
*RepositoryApi* | [**getSnapshotListing**](doc//RepositoryApi.md#getsnapshotlisting) | **GET** /yucca/repository/{id}/snapshots/{snapshot}/listing |
*RepositoryApi* | [**getSnapshots**](doc//RepositoryApi.md#getsnapshots) | **GET** /yucca/repository/{id}/snapshots |
*RepositoryApi* | [**importRepository**](doc//RepositoryApi.md#importrepository) | **POST** /yucca/repository/{id}/import |
*RepositoryApi* | [**inspectRepositories**](doc//RepositoryApi.md#inspectrepositories) | **GET** /yucca/repository/inspect |
*RepositoryApi* | [**pruneRepository**](doc//RepositoryApi.md#prunerepository) | **POST** /yucca/repository/{id}/snapshots/prune |
*RepositoryApi* | [**restoreFromPoint**](doc//RepositoryApi.md#restorefrompoint) | **POST** /yucca/repository/{id}/snapshots/{snapshot}/restore-from-point |
*RepositoryApi* | [**restoreSnapshot**](doc//RepositoryApi.md#restoresnapshot) | **POST** /yucca/repository/{id}/snapshots/{snapshot} |
*RepositoryApi* | [**updateRepository**](doc//RepositoryApi.md#updaterepository) | **PATCH** /yucca/repository/{id} |
*RunHistoryApi* | [**getRun**](doc//RunHistoryApi.md#getrun) | **GET** /yucca/logs/{id} |
*RunHistoryApi* | [**logStreamSse**](doc//RunHistoryApi.md#logstreamsse) | **GET** /yucca/logs/{id}/stream |
*RunningTasksApi* | [**cancelTask**](doc//RunningTasksApi.md#canceltask) | **POST** /yucca/tasks/{parentId}/cancel |
*RunningTasksApi* | [**getRunningTasks**](doc//RunningTasksApi.md#getrunningtasks) | **GET** /yucca/tasks |
*ScheduleApi* | [**createSchedule**](doc//ScheduleApi.md#createschedule) | **POST** /yucca/schedule |
*ScheduleApi* | [**getSchedules**](doc//ScheduleApi.md#getschedules) | **GET** /yucca/schedule |
*ScheduleApi* | [**removeSchedule**](doc//ScheduleApi.md#removeschedule) | **DELETE** /yucca/schedule/{id} |
*ScheduleApi* | [**updateSchedule**](doc//ScheduleApi.md#updateschedule) | **PATCH** /yucca/schedule/{id} |
*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
@@ -323,6 +357,7 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [ActiveScheduleItemDto](doc//ActiveScheduleItemDto.md)
- [ActivityCreateDto](doc//ActivityCreateDto.md)
- [ActivityResponseDto](doc//ActivityResponseDto.md)
- [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md)
@@ -389,6 +424,10 @@ Class | Method | HTTP request | Description
- [AudioCodec](doc//AudioCodec.md)
- [AuthStatusResponseDto](doc//AuthStatusResponseDto.md)
- [AvatarUpdate](doc//AvatarUpdate.md)
- [BackendDto](doc//BackendDto.md)
- [BackendResponseDto](doc//BackendResponseDto.md)
- [BackendType](doc//BackendType.md)
- [BackendsResponseDto](doc//BackendsResponseDto.md)
- [BulkIdErrorReason](doc//BulkIdErrorReason.md)
- [BulkIdResponseDto](doc//BulkIdResponseDto.md)
- [BulkIdsDto](doc//BulkIdsDto.md)
@@ -398,15 +437,20 @@ Class | Method | HTTP request | Description
- [CastUpdate](doc//CastUpdate.md)
- [ChangePasswordDto](doc//ChangePasswordDto.md)
- [Colorspace](doc//Colorspace.md)
- [ConfigureImmichIntegrationRequestDto](doc//ConfigureImmichIntegrationRequestDto.md)
- [ConfigureImmichIntegrationRequestDtoLibraries](doc//ConfigureImmichIntegrationRequestDtoLibraries.md)
- [ContributorCountResponseDto](doc//ContributorCountResponseDto.md)
- [CreateAlbumDto](doc//CreateAlbumDto.md)
- [CreateLibraryDto](doc//CreateLibraryDto.md)
- [CreateLocalBackendRequestDto](doc//CreateLocalBackendRequestDto.md)
- [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md)
- [CropParameters](doc//CropParameters.md)
- [CurrentRecoveryKeyResponse](doc//CurrentRecoveryKeyResponse.md)
- [DatabaseBackupConfig](doc//DatabaseBackupConfig.md)
- [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md)
- [DatabaseBackupDto](doc//DatabaseBackupDto.md)
- [DatabaseBackupListResponseDto](doc//DatabaseBackupListResponseDto.md)
- [DeviceFlowResponseDto](doc//DeviceFlowResponseDto.md)
- [DownloadArchiveDto](doc//DownloadArchiveDto.md)
- [DownloadArchiveInfo](doc//DownloadArchiveInfo.md)
- [DownloadInfoDto](doc//DownloadInfoDto.md)
@@ -422,16 +466,28 @@ Class | Method | HTTP request | Description
- [ExifResponseDto](doc//ExifResponseDto.md)
- [FaceDto](doc//FaceDto.md)
- [FacialRecognitionConfig](doc//FacialRecognitionConfig.md)
- [FilesystemListingItemDto](doc//FilesystemListingItemDto.md)
- [FilesystemListingResponseDto](doc//FilesystemListingResponseDto.md)
- [FoldersResponse](doc//FoldersResponse.md)
- [FoldersUpdate](doc//FoldersUpdate.md)
- [ImageFormat](doc//ImageFormat.md)
- [ImmichIntegrationConfigurationDto](doc//ImmichIntegrationConfigurationDto.md)
- [ImmichIntegrationDto](doc//ImmichIntegrationDto.md)
- [ImmichLibraryDto](doc//ImmichLibraryDto.md)
- [ImmichStateDto](doc//ImmichStateDto.md)
- [ImportRecoveryKeyRequest](doc//ImportRecoveryKeyRequest.md)
- [InspectedLocalRepositoryDto](doc//InspectedLocalRepositoryDto.md)
- [IntegrationsResponseDto](doc//IntegrationsResponseDto.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)
- [ListSnapshotsResponseDto](doc//ListSnapshotsResponseDto.md)
- [LocalRepositoryDto](doc//LocalRepositoryDto.md)
- [LogLevel](doc//LogLevel.md)
- [LogResponseDto](doc//LogResponseDto.md)
- [LoginCredentialDto](doc//LoginCredentialDto.md)
- [LoginResponseDto](doc//LoginResponseDto.md)
- [LogoutResponseDto](doc//LogoutResponseDto.md)
@@ -472,6 +528,7 @@ Class | Method | HTTP request | Description
- [OnThisDayDto](doc//OnThisDayDto.md)
- [OnboardingDto](doc//OnboardingDto.md)
- [OnboardingResponseDto](doc//OnboardingResponseDto.md)
- [OnboardingStatusResponseDto](doc//OnboardingStatusResponseDto.md)
- [PartnerCreateDto](doc//PartnerCreateDto.md)
- [PartnerDirection](doc//PartnerDirection.md)
- [PartnerResponseDto](doc//PartnerResponseDto.md)
@@ -492,8 +549,6 @@ Class | Method | HTTP request | Description
- [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)
@@ -513,8 +568,35 @@ Class | Method | HTTP request | Description
- [RatingsUpdate](doc//RatingsUpdate.md)
- [ReactionLevel](doc//ReactionLevel.md)
- [ReactionType](doc//ReactionType.md)
- [RepositoryBackendDto](doc//RepositoryBackendDto.md)
- [RepositoryBackendsDto](doc//RepositoryBackendsDto.md)
- [RepositoryCheckImportResponseDto](doc//RepositoryCheckImportResponseDto.md)
- [RepositoryConfigurationDto](doc//RepositoryConfigurationDto.md)
- [RepositoryCreateRequestDto](doc//RepositoryCreateRequestDto.md)
- [RepositoryCreateResponseDto](doc//RepositoryCreateResponseDto.md)
- [RepositoryInspectResponseDto](doc//RepositoryInspectResponseDto.md)
- [RepositoryListResponseDto](doc//RepositoryListResponseDto.md)
- [RepositoryMetricsDto](doc//RepositoryMetricsDto.md)
- [RepositorySnapshotRestoreFromPointRequestDto](doc//RepositorySnapshotRestoreFromPointRequestDto.md)
- [RepositorySnapshotRestoreRequestDto](doc//RepositorySnapshotRestoreRequestDto.md)
- [RepositoryUpdateRequestDto](doc//RepositoryUpdateRequestDto.md)
- [RepositoryUpdateResponseDto](doc//RepositoryUpdateResponseDto.md)
- [RetentionPolicyDto](doc//RetentionPolicyDto.md)
- [ReverseGeocodingStateResponseDto](doc//ReverseGeocodingStateResponseDto.md)
- [RotateParameters](doc//RotateParameters.md)
- [RunDto](doc//RunDto.md)
- [RunHistoryResponseDto](doc//RunHistoryResponseDto.md)
- [RunResponseDto](doc//RunResponseDto.md)
- [RunStatus](doc//RunStatus.md)
- [RunType](doc//RunType.md)
- [RunningTaskDto](doc//RunningTaskDto.md)
- [RunningTaskListResponse](doc//RunningTaskListResponse.md)
- [ScheduleCreateRequestDto](doc//ScheduleCreateRequestDto.md)
- [ScheduleCreateResponseDto](doc//ScheduleCreateResponseDto.md)
- [ScheduleDto](doc//ScheduleDto.md)
- [ScheduleListResponseDto](doc//ScheduleListResponseDto.md)
- [ScheduleUpdateRequestDto](doc//ScheduleUpdateRequestDto.md)
- [ScheduleUpdateResponseDto](doc//ScheduleUpdateResponseDto.md)
- [SearchAlbumResponseDto](doc//SearchAlbumResponseDto.md)
- [SearchAssetResponseDto](doc//SearchAssetResponseDto.md)
- [SearchExploreItem](doc//SearchExploreItem.md)
@@ -549,6 +631,8 @@ Class | Method | HTTP request | Description
- [SharedLinksUpdate](doc//SharedLinksUpdate.md)
- [SignUpDto](doc//SignUpDto.md)
- [SmartSearchDto](doc//SmartSearchDto.md)
- [SnapshotDto](doc//SnapshotDto.md)
- [SnapshotSummaryDto](doc//SnapshotSummaryDto.md)
- [SourceType](doc//SourceType.md)
- [StackCreateDto](doc//StackCreateDto.md)
- [StackResponseDto](doc//StackResponseDto.md)
@@ -633,6 +717,8 @@ Class | Method | HTTP request | Description
- [TagUpsertDto](doc//TagUpsertDto.md)
- [TagsResponse](doc//TagsResponse.md)
- [TagsUpdate](doc//TagsUpdate.md)
- [TaskStatus](doc//TaskStatus.md)
- [TaskType](doc//TaskType.md)
- [TemplateDto](doc//TemplateDto.md)
- [TemplateResponseDto](doc//TemplateResponseDto.md)
- [TestEmailResponseDto](doc//TestEmailResponseDto.md)
+64 -2
View File
@@ -34,13 +34,18 @@ part 'api/api_keys_api.dart';
part 'api/activities_api.dart';
part 'api/albums_api.dart';
part 'api/assets_api.dart';
part 'api/auth_api.dart';
part 'api/authentication_api.dart';
part 'api/authentication_admin_api.dart';
part 'api/backend_api.dart';
part 'api/database_backups_admin_api.dart';
part 'api/deprecated_api.dart';
part 'api/development_api.dart';
part 'api/download_api.dart';
part 'api/duplicates_api.dart';
part 'api/faces_api.dart';
part 'api/filesystem_api.dart';
part 'api/integrations_api.dart';
part 'api/jobs_api.dart';
part 'api/libraries_api.dart';
part 'api/maintenance_admin_api.dart';
@@ -48,10 +53,15 @@ part 'api/map_api.dart';
part 'api/memories_api.dart';
part 'api/notifications_api.dart';
part 'api/notifications_admin_api.dart';
part 'api/onboarding_api.dart';
part 'api/partners_api.dart';
part 'api/people_api.dart';
part 'api/plugins_api.dart';
part 'api/queues_api.dart';
part 'api/repository_api.dart';
part 'api/run_history_api.dart';
part 'api/running_tasks_api.dart';
part 'api/schedule_api.dart';
part 'api/search_api.dart';
part 'api/server_api.dart';
part 'api/sessions_api.dart';
@@ -68,6 +78,7 @@ part 'api/users_admin_api.dart';
part 'api/views_api.dart';
part 'api/workflows_api.dart';
part 'model/active_schedule_item_dto.dart';
part 'model/activity_create_dto.dart';
part 'model/activity_response_dto.dart';
part 'model/activity_statistics_response_dto.dart';
@@ -134,6 +145,10 @@ part 'model/asset_visibility.dart';
part 'model/audio_codec.dart';
part 'model/auth_status_response_dto.dart';
part 'model/avatar_update.dart';
part 'model/backend_dto.dart';
part 'model/backend_response_dto.dart';
part 'model/backend_type.dart';
part 'model/backends_response_dto.dart';
part 'model/bulk_id_error_reason.dart';
part 'model/bulk_id_response_dto.dart';
part 'model/bulk_ids_dto.dart';
@@ -143,15 +158,20 @@ part 'model/cast_response.dart';
part 'model/cast_update.dart';
part 'model/change_password_dto.dart';
part 'model/colorspace.dart';
part 'model/configure_immich_integration_request_dto.dart';
part 'model/configure_immich_integration_request_dto_libraries.dart';
part 'model/contributor_count_response_dto.dart';
part 'model/create_album_dto.dart';
part 'model/create_library_dto.dart';
part 'model/create_local_backend_request_dto.dart';
part 'model/create_profile_image_response_dto.dart';
part 'model/crop_parameters.dart';
part 'model/current_recovery_key_response.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/device_flow_response_dto.dart';
part 'model/download_archive_dto.dart';
part 'model/download_archive_info.dart';
part 'model/download_info_dto.dart';
@@ -167,16 +187,28 @@ part 'model/email_notifications_update.dart';
part 'model/exif_response_dto.dart';
part 'model/face_dto.dart';
part 'model/facial_recognition_config.dart';
part 'model/filesystem_listing_item_dto.dart';
part 'model/filesystem_listing_response_dto.dart';
part 'model/folders_response.dart';
part 'model/folders_update.dart';
part 'model/image_format.dart';
part 'model/immich_integration_configuration_dto.dart';
part 'model/immich_integration_dto.dart';
part 'model/immich_library_dto.dart';
part 'model/immich_state_dto.dart';
part 'model/import_recovery_key_request.dart';
part 'model/inspected_local_repository_dto.dart';
part 'model/integrations_response_dto.dart';
part 'model/job_create_dto.dart';
part 'model/job_name.dart';
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/list_snapshots_response_dto.dart';
part 'model/local_repository_dto.dart';
part 'model/log_level.dart';
part 'model/log_response_dto.dart';
part 'model/login_credential_dto.dart';
part 'model/login_response_dto.dart';
part 'model/logout_response_dto.dart';
@@ -217,6 +249,7 @@ part 'model/ocr_config.dart';
part 'model/on_this_day_dto.dart';
part 'model/onboarding_dto.dart';
part 'model/onboarding_response_dto.dart';
part 'model/onboarding_status_response_dto.dart';
part 'model/partner_create_dto.dart';
part 'model/partner_direction.dart';
part 'model/partner_response_dto.dart';
@@ -237,8 +270,6 @@ part 'model/pin_code_setup_dto.dart';
part 'model/places_response_dto.dart';
part 'model/plugin_method_response_dto.dart';
part 'model/plugin_response_dto.dart';
part 'model/plugin_template_response_dto.dart';
part 'model/plugin_template_step_response_dto.dart';
part 'model/purchase_response.dart';
part 'model/purchase_update.dart';
part 'model/queue_command.dart';
@@ -258,8 +289,35 @@ part 'model/ratings_response.dart';
part 'model/ratings_update.dart';
part 'model/reaction_level.dart';
part 'model/reaction_type.dart';
part 'model/repository_backend_dto.dart';
part 'model/repository_backends_dto.dart';
part 'model/repository_check_import_response_dto.dart';
part 'model/repository_configuration_dto.dart';
part 'model/repository_create_request_dto.dart';
part 'model/repository_create_response_dto.dart';
part 'model/repository_inspect_response_dto.dart';
part 'model/repository_list_response_dto.dart';
part 'model/repository_metrics_dto.dart';
part 'model/repository_snapshot_restore_from_point_request_dto.dart';
part 'model/repository_snapshot_restore_request_dto.dart';
part 'model/repository_update_request_dto.dart';
part 'model/repository_update_response_dto.dart';
part 'model/retention_policy_dto.dart';
part 'model/reverse_geocoding_state_response_dto.dart';
part 'model/rotate_parameters.dart';
part 'model/run_dto.dart';
part 'model/run_history_response_dto.dart';
part 'model/run_response_dto.dart';
part 'model/run_status.dart';
part 'model/run_type.dart';
part 'model/running_task_dto.dart';
part 'model/running_task_list_response.dart';
part 'model/schedule_create_request_dto.dart';
part 'model/schedule_create_response_dto.dart';
part 'model/schedule_dto.dart';
part 'model/schedule_list_response_dto.dart';
part 'model/schedule_update_request_dto.dart';
part 'model/schedule_update_response_dto.dart';
part 'model/search_album_response_dto.dart';
part 'model/search_asset_response_dto.dart';
part 'model/search_explore_item.dart';
@@ -294,6 +352,8 @@ part 'model/shared_links_response.dart';
part 'model/shared_links_update.dart';
part 'model/sign_up_dto.dart';
part 'model/smart_search_dto.dart';
part 'model/snapshot_dto.dart';
part 'model/snapshot_summary_dto.dart';
part 'model/source_type.dart';
part 'model/stack_create_dto.dart';
part 'model/stack_response_dto.dart';
@@ -378,6 +438,8 @@ part 'model/tag_update_dto.dart';
part 'model/tag_upsert_dto.dart';
part 'model/tags_response.dart';
part 'model/tags_update.dart';
part 'model/task_status.dart';
part 'model/task_type.dart';
part 'model/template_dto.dart';
part 'model/template_response_dto.dart';
part 'model/test_email_response_dto.dart';
+59
View File
@@ -0,0 +1,59 @@
//
// 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 AuthApi {
AuthApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /yucca/auth/oidc/device' operation and returns the [Response].
Future<Response> oidcDeviceFlowWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/auth/oidc/device';
// 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,
);
}
Future<DeviceFlowResponseDto?> oidcDeviceFlow() async {
final response = await oidcDeviceFlowWithHttpInfo();
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), 'DeviceFlowResponseDto',) as DeviceFlowResponseDto;
}
return null;
}
}
+106
View File
@@ -0,0 +1,106 @@
//
// 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 BackendApi {
BackendApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /yucca/backend/local' operation and returns the [Response].
/// Parameters:
///
/// * [CreateLocalBackendRequestDto] createLocalBackendRequestDto (required):
Future<Response> createLocalBackendWithHttpInfo(CreateLocalBackendRequestDto createLocalBackendRequestDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/backend/local';
// ignore: prefer_final_locals
Object? postBody = createLocalBackendRequestDto;
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,
);
}
/// Parameters:
///
/// * [CreateLocalBackendRequestDto] createLocalBackendRequestDto (required):
Future<BackendResponseDto?> createLocalBackend(CreateLocalBackendRequestDto createLocalBackendRequestDto,) async {
final response = await createLocalBackendWithHttpInfo(createLocalBackendRequestDto,);
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), 'BackendResponseDto',) as BackendResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/backend' operation and returns the [Response].
Future<Response> getBackendsWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/backend';
// 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,
);
}
Future<BackendsResponseDto?> getBackends() async {
final response = await getBackendsWithHttpInfo();
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), 'BackendsResponseDto',) as BackendsResponseDto;
}
return null;
}
}
+51
View File
@@ -0,0 +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 DevelopmentApi {
DevelopmentApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /yucca/debug/reset' operation and returns the [Response].
Future<Response> resetOrchestratorWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/debug/reset';
// 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,
);
}
Future<void> resetOrchestrator() async {
final response = await resetOrchestratorWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+69
View File
@@ -0,0 +1,69 @@
//
// 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 FilesystemApi {
FilesystemApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /yucca/fs' operation and returns the [Response].
/// Parameters:
///
/// * [String] path:
Future<Response> getFileListingWithHttpInfo({ String? path, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/fs';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (path != null) {
queryParams.addAll(_queryParams('', 'path', path));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] path:
Future<FilesystemListingResponseDto?> getFileListing({ String? path, }) async {
final response = await getFileListingWithHttpInfo( path: 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) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FilesystemListingResponseDto',) as FilesystemListingResponseDto;
}
return null;
}
}
+98
View File
@@ -0,0 +1,98 @@
//
// 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 IntegrationsApi {
IntegrationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /yucca/integrations/immich' operation and returns the [Response].
/// Parameters:
///
/// * [ConfigureImmichIntegrationRequestDto] configureImmichIntegrationRequestDto (required):
Future<Response> configureImmichIntegrationWithHttpInfo(ConfigureImmichIntegrationRequestDto configureImmichIntegrationRequestDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/integrations/immich';
// ignore: prefer_final_locals
Object? postBody = configureImmichIntegrationRequestDto;
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,
);
}
/// Parameters:
///
/// * [ConfigureImmichIntegrationRequestDto] configureImmichIntegrationRequestDto (required):
Future<void> configureImmichIntegration(ConfigureImmichIntegrationRequestDto configureImmichIntegrationRequestDto,) async {
final response = await configureImmichIntegrationWithHttpInfo(configureImmichIntegrationRequestDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /yucca/integrations' operation and returns the [Response].
Future<Response> getIntegrationsWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/integrations';
// 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,
);
}
Future<IntegrationsResponseDto?> getIntegrations() async {
final response = await getIntegrationsWithHttpInfo();
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), 'IntegrationsResponseDto',) as IntegrationsResponseDto;
}
return null;
}
}
+205
View File
@@ -0,0 +1,205 @@
//
// 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 OnboardingApi {
OnboardingApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /yucca/onboarding/recovery-key' operation and returns the [Response].
Future<Response> confirmRecoveryKeyWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/onboarding/recovery-key';
// 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,
);
}
Future<void> confirmRecoveryKey() async {
final response = await confirmRecoveryKeyWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /yucca/onboarding/recovery-key' operation and returns the [Response].
Future<Response> currentRecoveryKeyWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/onboarding/recovery-key';
// 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,
);
}
Future<CurrentRecoveryKeyResponse?> currentRecoveryKey() async {
final response = await currentRecoveryKeyWithHttpInfo();
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), 'CurrentRecoveryKeyResponse',) as CurrentRecoveryKeyResponse;
}
return null;
}
/// Performs an HTTP 'PUT /yucca/onboarding/recovery-key' operation and returns the [Response].
/// Parameters:
///
/// * [ImportRecoveryKeyRequest] importRecoveryKeyRequest (required):
Future<Response> importRecoveryKeyWithHttpInfo(ImportRecoveryKeyRequest importRecoveryKeyRequest,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/onboarding/recovery-key';
// ignore: prefer_final_locals
Object? postBody = importRecoveryKeyRequest;
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,
);
}
/// Parameters:
///
/// * [ImportRecoveryKeyRequest] importRecoveryKeyRequest (required):
Future<void> importRecoveryKey(ImportRecoveryKeyRequest importRecoveryKeyRequest,) async {
final response = await importRecoveryKeyWithHttpInfo(importRecoveryKeyRequest,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /yucca/onboarding' operation and returns the [Response].
Future<Response> onboardingStatusWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/onboarding';
// 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,
);
}
Future<OnboardingStatusResponseDto?> onboardingStatus() async {
final response = await onboardingStatusWithHttpInfo();
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), 'OnboardingStatusResponseDto',) as OnboardingStatusResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/onboarding/skip' operation and returns the [Response].
Future<Response> skipOnboardingExtraConfigWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/onboarding/skip';
// 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,
);
}
Future<void> skipOnboardingExtraConfig() async {
final response = await skipOnboardingExtraConfigWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+789
View File
@@ -0,0 +1,789 @@
//
// 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 RepositoryApi {
RepositoryApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /yucca/repository/{id}/import' operation and returns the [Response].
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
Future<Response> checkImportRepositoryWithHttpInfo(String backend, String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/import'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'backend', backend));
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
Future<RepositoryCheckImportResponseDto?> checkImportRepository(String backend, String id,) async {
final response = await checkImportRepositoryWithHttpInfo(backend, 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), 'RepositoryCheckImportResponseDto',) as RepositoryCheckImportResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/repository/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> createBackupWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<LogResponseDto?> createBackup(String id,) async {
final response = await createBackupWithHttpInfo(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), 'LogResponseDto',) as LogResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/repository' operation and returns the [Response].
/// Parameters:
///
/// * [RepositoryCreateRequestDto] repositoryCreateRequestDto (required):
///
/// * [String] backend:
Future<Response> createRepositoryWithHttpInfo(RepositoryCreateRequestDto repositoryCreateRequestDto, { String? backend, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository';
// ignore: prefer_final_locals
Object? postBody = repositoryCreateRequestDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (backend != null) {
queryParams.addAll(_queryParams('', 'backend', backend));
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [RepositoryCreateRequestDto] repositoryCreateRequestDto (required):
///
/// * [String] backend:
Future<RepositoryCreateResponseDto?> createRepository(RepositoryCreateRequestDto repositoryCreateRequestDto, { String? backend, }) async {
final response = await createRepositoryWithHttpInfo(repositoryCreateRequestDto, backend: backend, );
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), 'RepositoryCreateResponseDto',) as RepositoryCreateResponseDto;
}
return null;
}
/// Performs an HTTP 'DELETE /yucca/repository/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteRepositoryWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<void> deleteRepository(String id,) async {
final response = await deleteRepositoryWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'DELETE /yucca/repository/{id}/snapshots/{snapshot}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
Future<Response> forgetSnapshotWithHttpInfo(String id, String snapshot,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}'
.replaceAll('{id}', id)
.replaceAll('{snapshot}', snapshot);
// 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,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
Future<ListSnapshotsResponseDto?> forgetSnapshot(String id, String snapshot,) async {
final response = await forgetSnapshotWithHttpInfo(id, snapshot,);
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), 'ListSnapshotsResponseDto',) as ListSnapshotsResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/repository' operation and returns the [Response].
Future<Response> getRepositoriesWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository';
// 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,
);
}
Future<RepositoryListResponseDto?> getRepositories() async {
final response = await getRepositoriesWithHttpInfo();
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), 'RepositoryListResponseDto',) as RepositoryListResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/repository/{id}/runs' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getRunHistoryWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/runs'
.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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<RunHistoryResponseDto?> getRunHistory(String id,) async {
final response = await getRunHistoryWithHttpInfo(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), 'RunHistoryResponseDto',) as RunHistoryResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/repository/{id}/snapshots/{snapshot}/listing' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [String] path:
Future<Response> getSnapshotListingWithHttpInfo(String id, String snapshot, { String? path, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}/listing'
.replaceAll('{id}', id)
.replaceAll('{snapshot}', snapshot);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (path != null) {
queryParams.addAll(_queryParams('', 'path', path));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [String] path:
Future<FilesystemListingResponseDto?> getSnapshotListing(String id, String snapshot, { String? path, }) async {
final response = await getSnapshotListingWithHttpInfo(id, snapshot, path: 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) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FilesystemListingResponseDto',) as FilesystemListingResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/repository/{id}/snapshots' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getSnapshotsWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/snapshots'
.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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<ListSnapshotsResponseDto?> getSnapshots(String id,) async {
final response = await getSnapshotsWithHttpInfo(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), 'ListSnapshotsResponseDto',) as ListSnapshotsResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/repository/{id}/import' operation and returns the [Response].
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
Future<Response> importRepositoryWithHttpInfo(String backend, String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/import'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'backend', backend));
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
Future<RepositoryCreateResponseDto?> importRepository(String backend, String id,) async {
final response = await importRepositoryWithHttpInfo(backend, 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), 'RepositoryCreateResponseDto',) as RepositoryCreateResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/repository/inspect' operation and returns the [Response].
Future<Response> inspectRepositoriesWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/inspect';
// 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,
);
}
Future<RepositoryInspectResponseDto?> inspectRepositories() async {
final response = await inspectRepositoriesWithHttpInfo();
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), 'RepositoryInspectResponseDto',) as RepositoryInspectResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/repository/{id}/snapshots/prune' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> pruneRepositoryWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/snapshots/prune'
.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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<LogResponseDto?> pruneRepository(String id,) async {
final response = await pruneRepositoryWithHttpInfo(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), 'LogResponseDto',) as LogResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/repository/{id}/snapshots/{snapshot}/restore-from-point' operation and returns the [Response].
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [RepositorySnapshotRestoreFromPointRequestDto] repositorySnapshotRestoreFromPointRequestDto (required):
Future<Response> restoreFromPointWithHttpInfo(String backend, String id, String snapshot, RepositorySnapshotRestoreFromPointRequestDto repositorySnapshotRestoreFromPointRequestDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}/restore-from-point'
.replaceAll('{id}', id)
.replaceAll('{snapshot}', snapshot);
// ignore: prefer_final_locals
Object? postBody = repositorySnapshotRestoreFromPointRequestDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'backend', backend));
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [RepositorySnapshotRestoreFromPointRequestDto] repositorySnapshotRestoreFromPointRequestDto (required):
Future<LogResponseDto?> restoreFromPoint(String backend, String id, String snapshot, RepositorySnapshotRestoreFromPointRequestDto repositorySnapshotRestoreFromPointRequestDto,) async {
final response = await restoreFromPointWithHttpInfo(backend, id, snapshot, repositorySnapshotRestoreFromPointRequestDto,);
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), 'LogResponseDto',) as LogResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /yucca/repository/{id}/snapshots/{snapshot}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [RepositorySnapshotRestoreRequestDto] repositorySnapshotRestoreRequestDto (required):
Future<Response> restoreSnapshotWithHttpInfo(String id, String snapshot, RepositorySnapshotRestoreRequestDto repositorySnapshotRestoreRequestDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}'
.replaceAll('{id}', id)
.replaceAll('{snapshot}', snapshot);
// ignore: prefer_final_locals
Object? postBody = repositorySnapshotRestoreRequestDto;
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,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [RepositorySnapshotRestoreRequestDto] repositorySnapshotRestoreRequestDto (required):
Future<LogResponseDto?> restoreSnapshot(String id, String snapshot, RepositorySnapshotRestoreRequestDto repositorySnapshotRestoreRequestDto,) async {
final response = await restoreSnapshotWithHttpInfo(id, snapshot, repositorySnapshotRestoreRequestDto,);
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), 'LogResponseDto',) as LogResponseDto;
}
return null;
}
/// Performs an HTTP 'PATCH /yucca/repository/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [RepositoryUpdateRequestDto] repositoryUpdateRequestDto (required):
///
/// * [String] backend:
Future<Response> updateRepositoryWithHttpInfo(String id, RepositoryUpdateRequestDto repositoryUpdateRequestDto, { String? backend, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/repository/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = repositoryUpdateRequestDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (backend != null) {
queryParams.addAll(_queryParams('', 'backend', backend));
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'PATCH',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [RepositoryUpdateRequestDto] repositoryUpdateRequestDto (required):
///
/// * [String] backend:
Future<RepositoryUpdateResponseDto?> updateRepository(String id, RepositoryUpdateRequestDto repositoryUpdateRequestDto, { String? backend, }) async {
final response = await updateRepositoryWithHttpInfo(id, repositoryUpdateRequestDto, backend: backend, );
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), 'RepositoryUpdateResponseDto',) as RepositoryUpdateResponseDto;
}
return null;
}
}
+106
View File
@@ -0,0 +1,106 @@
//
// 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 RunHistoryApi {
RunHistoryApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /yucca/logs/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> getRunWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/logs/{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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<RunResponseDto?> getRun(String id,) async {
final response = await getRunWithHttpInfo(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), 'RunResponseDto',) as RunResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/logs/{id}/stream' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> logStreamSseWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/logs/{id}/stream'
.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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<void> logStreamSse(String id,) async {
final response = await logStreamSseWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 RunningTasksApi {
RunningTasksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /yucca/tasks/{parentId}/cancel' operation and returns the [Response].
/// Parameters:
///
/// * [String] parentId (required):
Future<Response> cancelTaskWithHttpInfo(String parentId,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/tasks/{parentId}/cancel'
.replaceAll('{parentId}', parentId);
// 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,
);
}
/// Parameters:
///
/// * [String] parentId (required):
Future<void> cancelTask(String parentId,) async {
final response = await cancelTaskWithHttpInfo(parentId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /yucca/tasks' operation and returns the [Response].
Future<Response> getRunningTasksWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/tasks';
// 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,
);
}
Future<RunningTaskListResponse?> getRunningTasks() async {
final response = await getRunningTasksWithHttpInfo();
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), 'RunningTaskListResponse',) as RunningTaskListResponse;
}
return null;
}
}
+198
View File
@@ -0,0 +1,198 @@
//
// 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 ScheduleApi {
ScheduleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /yucca/schedule' operation and returns the [Response].
/// Parameters:
///
/// * [ScheduleCreateRequestDto] scheduleCreateRequestDto (required):
Future<Response> createScheduleWithHttpInfo(ScheduleCreateRequestDto scheduleCreateRequestDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/schedule';
// ignore: prefer_final_locals
Object? postBody = scheduleCreateRequestDto;
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,
);
}
/// Parameters:
///
/// * [ScheduleCreateRequestDto] scheduleCreateRequestDto (required):
Future<ScheduleCreateResponseDto?> createSchedule(ScheduleCreateRequestDto scheduleCreateRequestDto,) async {
final response = await createScheduleWithHttpInfo(scheduleCreateRequestDto,);
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), 'ScheduleCreateResponseDto',) as ScheduleCreateResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /yucca/schedule' operation and returns the [Response].
Future<Response> getSchedulesWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/schedule';
// 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,
);
}
Future<ScheduleListResponseDto?> getSchedules() async {
final response = await getSchedulesWithHttpInfo();
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), 'ScheduleListResponseDto',) as ScheduleListResponseDto;
}
return null;
}
/// Performs an HTTP 'DELETE /yucca/schedule/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> removeScheduleWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/schedule/{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,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<void> removeSchedule(String id,) async {
final response = await removeScheduleWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'PATCH /yucca/schedule/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [ScheduleUpdateRequestDto] scheduleUpdateRequestDto (required):
Future<Response> updateScheduleWithHttpInfo(String id, ScheduleUpdateRequestDto scheduleUpdateRequestDto,) async {
// ignore: prefer_const_declarations
final apiPath = r'/yucca/schedule/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = scheduleUpdateRequestDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
apiPath,
'PATCH',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [ScheduleUpdateRequestDto] scheduleUpdateRequestDto (required):
Future<ScheduleUpdateResponseDto?> updateSchedule(String id, ScheduleUpdateRequestDto scheduleUpdateRequestDto,) async {
final response = await updateScheduleWithHttpInfo(id, scheduleUpdateRequestDto,);
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), 'ScheduleUpdateResponseDto',) as ScheduleUpdateResponseDto;
}
return null;
}
}
+125 -22
View File
@@ -13,7 +13,7 @@ part of openapi.api;
class ApiClient {
ApiClient({this.basePath = '/api', this.authentication,});
String basePath;
final String basePath;
final Authentication? authentication;
var _client = Client();
@@ -44,9 +44,8 @@ class ApiClient {
Object? body,
Map<String, String> headerParams,
Map<String, String> formParams,
String? contentType, {
Future<void>? abortTrigger,
}) async {
String? contentType,
) async {
await authentication?.applyToParams(queryParams, headerParams);
headerParams.addAll(_defaultHeaderMap);
@@ -64,7 +63,7 @@ class ApiClient {
body is MultipartFile && (contentType == null ||
!contentType.toLowerCase().startsWith('multipart/form-data'))
) {
final request = AbortableStreamedRequest(method, uri, abortTrigger: abortTrigger);
final request = StreamedRequest(method, uri);
request.headers.addAll(headerParams);
request.contentLength = body.length;
body.finalize().listen(
@@ -79,7 +78,7 @@ class ApiClient {
}
if (body is MultipartRequest) {
final request = AbortableMultipartRequest(method, uri, abortTrigger: abortTrigger);
final request = MultipartRequest(method, uri);
request.fields.addAll(body.fields);
request.files.addAll(body.files);
request.headers.addAll(body.headers);
@@ -93,19 +92,14 @@ class ApiClient {
: await serializeAsync(body);
final nullableHeaderParams = headerParams.isEmpty ? null : headerParams;
final request = AbortableRequest(method, uri, abortTrigger: abortTrigger);
if (nullableHeaderParams != null) {
request.headers.addAll(nullableHeaderParams);
switch(method) {
case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,);
case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,);
case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,);
case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,);
case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,);
case 'GET': return await _client.get(uri, headers: nullableHeaderParams,);
}
if (msgBody is String) {
request.body = msgBody;
} else if (msgBody is List<int>) {
request.bodyBytes = msgBody;
} else if (msgBody is Map<String, String>) {
request.bodyFields = msgBody;
}
final response = await _client.send(request);
return Response.fromStream(response);
} on SocketException catch (error, trace) {
throw ApiException.withInner(
HttpStatus.badRequest,
@@ -142,6 +136,11 @@ class ApiClient {
trace,
);
}
throw ApiException(
HttpStatus.badRequest,
'Invalid HTTP operation: $method $path',
);
}
Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) =>
@@ -183,6 +182,8 @@ class ApiClient {
return valueString == 'true' || valueString == '1';
case 'DateTime':
return value is DateTime ? value : DateTime.tryParse(value);
case 'ActiveScheduleItemDto':
return ActiveScheduleItemDto.fromJson(value);
case 'ActivityCreateDto':
return ActivityCreateDto.fromJson(value);
case 'ActivityResponseDto':
@@ -315,6 +316,14 @@ class ApiClient {
return AuthStatusResponseDto.fromJson(value);
case 'AvatarUpdate':
return AvatarUpdate.fromJson(value);
case 'BackendDto':
return BackendDto.fromJson(value);
case 'BackendResponseDto':
return BackendResponseDto.fromJson(value);
case 'BackendType':
return BackendTypeTypeTransformer().decode(value);
case 'BackendsResponseDto':
return BackendsResponseDto.fromJson(value);
case 'BulkIdErrorReason':
return BulkIdErrorReasonTypeTransformer().decode(value);
case 'BulkIdResponseDto':
@@ -333,16 +342,24 @@ class ApiClient {
return ChangePasswordDto.fromJson(value);
case 'Colorspace':
return ColorspaceTypeTransformer().decode(value);
case 'ConfigureImmichIntegrationRequestDto':
return ConfigureImmichIntegrationRequestDto.fromJson(value);
case 'ConfigureImmichIntegrationRequestDtoLibraries':
return ConfigureImmichIntegrationRequestDtoLibraries.fromJson(value);
case 'ContributorCountResponseDto':
return ContributorCountResponseDto.fromJson(value);
case 'CreateAlbumDto':
return CreateAlbumDto.fromJson(value);
case 'CreateLibraryDto':
return CreateLibraryDto.fromJson(value);
case 'CreateLocalBackendRequestDto':
return CreateLocalBackendRequestDto.fromJson(value);
case 'CreateProfileImageResponseDto':
return CreateProfileImageResponseDto.fromJson(value);
case 'CropParameters':
return CropParameters.fromJson(value);
case 'CurrentRecoveryKeyResponse':
return CurrentRecoveryKeyResponse.fromJson(value);
case 'DatabaseBackupConfig':
return DatabaseBackupConfig.fromJson(value);
case 'DatabaseBackupDeleteDto':
@@ -351,6 +368,8 @@ class ApiClient {
return DatabaseBackupDto.fromJson(value);
case 'DatabaseBackupListResponseDto':
return DatabaseBackupListResponseDto.fromJson(value);
case 'DeviceFlowResponseDto':
return DeviceFlowResponseDto.fromJson(value);
case 'DownloadArchiveDto':
return DownloadArchiveDto.fromJson(value);
case 'DownloadArchiveInfo':
@@ -381,12 +400,30 @@ class ApiClient {
return FaceDto.fromJson(value);
case 'FacialRecognitionConfig':
return FacialRecognitionConfig.fromJson(value);
case 'FilesystemListingItemDto':
return FilesystemListingItemDto.fromJson(value);
case 'FilesystemListingResponseDto':
return FilesystemListingResponseDto.fromJson(value);
case 'FoldersResponse':
return FoldersResponse.fromJson(value);
case 'FoldersUpdate':
return FoldersUpdate.fromJson(value);
case 'ImageFormat':
return ImageFormatTypeTransformer().decode(value);
case 'ImmichIntegrationConfigurationDto':
return ImmichIntegrationConfigurationDto.fromJson(value);
case 'ImmichIntegrationDto':
return ImmichIntegrationDto.fromJson(value);
case 'ImmichLibraryDto':
return ImmichLibraryDto.fromJson(value);
case 'ImmichStateDto':
return ImmichStateDto.fromJson(value);
case 'ImportRecoveryKeyRequest':
return ImportRecoveryKeyRequest.fromJson(value);
case 'InspectedLocalRepositoryDto':
return InspectedLocalRepositoryDto.fromJson(value);
case 'IntegrationsResponseDto':
return IntegrationsResponseDto.fromJson(value);
case 'JobCreateDto':
return JobCreateDto.fromJson(value);
case 'JobName':
@@ -399,8 +436,14 @@ class ApiClient {
return LibraryStatsResponseDto.fromJson(value);
case 'LicenseKeyDto':
return LicenseKeyDto.fromJson(value);
case 'ListSnapshotsResponseDto':
return ListSnapshotsResponseDto.fromJson(value);
case 'LocalRepositoryDto':
return LocalRepositoryDto.fromJson(value);
case 'LogLevel':
return LogLevelTypeTransformer().decode(value);
case 'LogResponseDto':
return LogResponseDto.fromJson(value);
case 'LoginCredentialDto':
return LoginCredentialDto.fromJson(value);
case 'LoginResponseDto':
@@ -481,6 +524,8 @@ class ApiClient {
return OnboardingDto.fromJson(value);
case 'OnboardingResponseDto':
return OnboardingResponseDto.fromJson(value);
case 'OnboardingStatusResponseDto':
return OnboardingStatusResponseDto.fromJson(value);
case 'PartnerCreateDto':
return PartnerCreateDto.fromJson(value);
case 'PartnerDirection':
@@ -521,10 +566,6 @@ class ApiClient {
return PluginMethodResponseDto.fromJson(value);
case 'PluginResponseDto':
return PluginResponseDto.fromJson(value);
case 'PluginTemplateResponseDto':
return PluginTemplateResponseDto.fromJson(value);
case 'PluginTemplateStepResponseDto':
return PluginTemplateStepResponseDto.fromJson(value);
case 'PurchaseResponse':
return PurchaseResponse.fromJson(value);
case 'PurchaseUpdate':
@@ -563,10 +604,64 @@ class ApiClient {
return ReactionLevelTypeTransformer().decode(value);
case 'ReactionType':
return ReactionTypeTypeTransformer().decode(value);
case 'RepositoryBackendDto':
return RepositoryBackendDto.fromJson(value);
case 'RepositoryBackendsDto':
return RepositoryBackendsDto.fromJson(value);
case 'RepositoryCheckImportResponseDto':
return RepositoryCheckImportResponseDto.fromJson(value);
case 'RepositoryConfigurationDto':
return RepositoryConfigurationDto.fromJson(value);
case 'RepositoryCreateRequestDto':
return RepositoryCreateRequestDto.fromJson(value);
case 'RepositoryCreateResponseDto':
return RepositoryCreateResponseDto.fromJson(value);
case 'RepositoryInspectResponseDto':
return RepositoryInspectResponseDto.fromJson(value);
case 'RepositoryListResponseDto':
return RepositoryListResponseDto.fromJson(value);
case 'RepositoryMetricsDto':
return RepositoryMetricsDto.fromJson(value);
case 'RepositorySnapshotRestoreFromPointRequestDto':
return RepositorySnapshotRestoreFromPointRequestDto.fromJson(value);
case 'RepositorySnapshotRestoreRequestDto':
return RepositorySnapshotRestoreRequestDto.fromJson(value);
case 'RepositoryUpdateRequestDto':
return RepositoryUpdateRequestDto.fromJson(value);
case 'RepositoryUpdateResponseDto':
return RepositoryUpdateResponseDto.fromJson(value);
case 'RetentionPolicyDto':
return RetentionPolicyDto.fromJson(value);
case 'ReverseGeocodingStateResponseDto':
return ReverseGeocodingStateResponseDto.fromJson(value);
case 'RotateParameters':
return RotateParameters.fromJson(value);
case 'RunDto':
return RunDto.fromJson(value);
case 'RunHistoryResponseDto':
return RunHistoryResponseDto.fromJson(value);
case 'RunResponseDto':
return RunResponseDto.fromJson(value);
case 'RunStatus':
return RunStatusTypeTransformer().decode(value);
case 'RunType':
return RunTypeTypeTransformer().decode(value);
case 'RunningTaskDto':
return RunningTaskDto.fromJson(value);
case 'RunningTaskListResponse':
return RunningTaskListResponse.fromJson(value);
case 'ScheduleCreateRequestDto':
return ScheduleCreateRequestDto.fromJson(value);
case 'ScheduleCreateResponseDto':
return ScheduleCreateResponseDto.fromJson(value);
case 'ScheduleDto':
return ScheduleDto.fromJson(value);
case 'ScheduleListResponseDto':
return ScheduleListResponseDto.fromJson(value);
case 'ScheduleUpdateRequestDto':
return ScheduleUpdateRequestDto.fromJson(value);
case 'ScheduleUpdateResponseDto':
return ScheduleUpdateResponseDto.fromJson(value);
case 'SearchAlbumResponseDto':
return SearchAlbumResponseDto.fromJson(value);
case 'SearchAssetResponseDto':
@@ -635,6 +730,10 @@ class ApiClient {
return SignUpDto.fromJson(value);
case 'SmartSearchDto':
return SmartSearchDto.fromJson(value);
case 'SnapshotDto':
return SnapshotDto.fromJson(value);
case 'SnapshotSummaryDto':
return SnapshotSummaryDto.fromJson(value);
case 'SourceType':
return SourceTypeTypeTransformer().decode(value);
case 'StackCreateDto':
@@ -803,6 +902,10 @@ class ApiClient {
return TagsResponse.fromJson(value);
case 'TagsUpdate':
return TagsUpdate.fromJson(value);
case 'TaskStatus':
return TaskStatusTypeTransformer().decode(value);
case 'TaskType':
return TaskTypeTypeTransformer().decode(value);
case 'TemplateDto':
return TemplateDto.fromJson(value);
case 'TemplateResponseDto':
+15
View File
@@ -94,6 +94,9 @@ String parameterToString(dynamic value) {
if (value is AudioCodec) {
return AudioCodecTypeTransformer().encode(value).toString();
}
if (value is BackendType) {
return BackendTypeTypeTransformer().encode(value).toString();
}
if (value is BulkIdErrorReason) {
return BulkIdErrorReasonTypeTransformer().encode(value).toString();
}
@@ -157,6 +160,12 @@ String parameterToString(dynamic value) {
if (value is ReactionType) {
return ReactionTypeTypeTransformer().encode(value).toString();
}
if (value is RunStatus) {
return RunStatusTypeTransformer().encode(value).toString();
}
if (value is RunType) {
return RunTypeTypeTransformer().encode(value).toString();
}
if (value is SearchSuggestionType) {
return SearchSuggestionTypeTypeTransformer().encode(value).toString();
}
@@ -175,6 +184,12 @@ String parameterToString(dynamic value) {
if (value is SyncRequestType) {
return SyncRequestTypeTypeTransformer().encode(value).toString();
}
if (value is TaskStatus) {
return TaskStatusTypeTransformer().encode(value).toString();
}
if (value is TaskType) {
return TaskTypeTypeTransformer().encode(value).toString();
}
if (value is ToneMapping) {
return ToneMappingTypeTransformer().encode(value).toString();
}
+107
View File
@@ -0,0 +1,107 @@
//
// 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 ActiveScheduleItemDto {
/// Returns a new [ActiveScheduleItemDto] instance.
ActiveScheduleItemDto({
required this.repositoryId,
required this.status,
});
String repositoryId;
TaskStatus status;
@override
bool operator ==(Object other) => identical(this, other) || other is ActiveScheduleItemDto &&
other.repositoryId == repositoryId &&
other.status == status;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(repositoryId.hashCode) +
(status.hashCode);
@override
String toString() => 'ActiveScheduleItemDto[repositoryId=$repositoryId, status=$status]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'repositoryId'] = this.repositoryId;
json[r'status'] = this.status;
return json;
}
/// Returns a new [ActiveScheduleItemDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ActiveScheduleItemDto? fromJson(dynamic value) {
upgradeDto(value, "ActiveScheduleItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ActiveScheduleItemDto(
repositoryId: mapValueOfType<String>(json, r'repositoryId')!,
status: TaskStatus.fromJson(json[r'status'])!,
);
}
return null;
}
static List<ActiveScheduleItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ActiveScheduleItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ActiveScheduleItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ActiveScheduleItemDto> mapFromJson(dynamic json) {
final map = <String, ActiveScheduleItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ActiveScheduleItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ActiveScheduleItemDto-objects as value to a dart map
static Map<String, List<ActiveScheduleItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ActiveScheduleItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ActiveScheduleItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'repositoryId',
'status',
};
}
+132
View File
@@ -0,0 +1,132 @@
//
// 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 BackendDto {
/// Returns a new [BackendDto] instance.
BackendDto({
this.error,
required this.id,
required this.isOnline,
required this.type,
});
///
/// 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? error;
String id;
bool isOnline;
BackendType type;
@override
bool operator ==(Object other) => identical(this, other) || other is BackendDto &&
other.error == error &&
other.id == id &&
other.isOnline == isOnline &&
other.type == type;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(error == null ? 0 : error!.hashCode) +
(id.hashCode) +
(isOnline.hashCode) +
(type.hashCode);
@override
String toString() => 'BackendDto[error=$error, id=$id, isOnline=$isOnline, type=$type]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.error != null) {
json[r'error'] = this.error;
} else {
// json[r'error'] = null;
}
json[r'id'] = this.id;
json[r'isOnline'] = this.isOnline;
json[r'type'] = this.type;
return json;
}
/// Returns a new [BackendDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static BackendDto? fromJson(dynamic value) {
upgradeDto(value, "BackendDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return BackendDto(
error: mapValueOfType<String>(json, r'error'),
id: mapValueOfType<String>(json, r'id')!,
isOnline: mapValueOfType<bool>(json, r'isOnline')!,
type: BackendType.fromJson(json[r'type'])!,
);
}
return null;
}
static List<BackendDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <BackendDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = BackendDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, BackendDto> mapFromJson(dynamic json) {
final map = <String, BackendDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = BackendDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of BackendDto-objects as value to a dart map
static Map<String, List<BackendDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<BackendDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = BackendDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'isOnline',
'type',
};
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 BackendResponseDto {
/// Returns a new [BackendResponseDto] instance.
BackendResponseDto({
required this.backend,
});
BackendDto backend;
@override
bool operator ==(Object other) => identical(this, other) || other is BackendResponseDto &&
other.backend == backend;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backend.hashCode);
@override
String toString() => 'BackendResponseDto[backend=$backend]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backend'] = this.backend;
return json;
}
/// Returns a new [BackendResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static BackendResponseDto? fromJson(dynamic value) {
upgradeDto(value, "BackendResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return BackendResponseDto(
backend: BackendDto.fromJson(json[r'backend'])!,
);
}
return null;
}
static List<BackendResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <BackendResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = BackendResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, BackendResponseDto> mapFromJson(dynamic json) {
final map = <String, BackendResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = BackendResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of BackendResponseDto-objects as value to a dart map
static Map<String, List<BackendResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<BackendResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = BackendResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backend',
};
}
+88
View File
@@ -0,0 +1,88 @@
//
// 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 BackendType {
/// Instantiate a new enum with the provided [value].
const BackendType._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const yucca = BackendType._(r'yucca');
static const local = BackendType._(r'local');
static const s3 = BackendType._(r's3');
/// List of all possible values in this [enum][BackendType].
static const values = <BackendType>[
yucca,
local,
s3,
];
static BackendType? fromJson(dynamic value) => BackendTypeTypeTransformer().decode(value);
static List<BackendType> listFromJson(dynamic json, {bool growable = false,}) {
final result = <BackendType>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = BackendType.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [BackendType] to String,
/// and [decode] dynamic data back to [BackendType].
class BackendTypeTypeTransformer {
factory BackendTypeTypeTransformer() => _instance ??= const BackendTypeTypeTransformer._();
const BackendTypeTypeTransformer._();
String encode(BackendType data) => data.value;
/// Decodes a [dynamic value][data] to a BackendType.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
BackendType? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'yucca': return BackendType.yucca;
case r'local': return BackendType.local;
case r's3': return BackendType.s3;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [BackendTypeTypeTransformer] instance.
static BackendTypeTypeTransformer? _instance;
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 BackendsResponseDto {
/// Returns a new [BackendsResponseDto] instance.
BackendsResponseDto({
this.backends = const [],
});
List<BackendDto> backends;
@override
bool operator ==(Object other) => identical(this, other) || other is BackendsResponseDto &&
_deepEquality.equals(other.backends, backends);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backends.hashCode);
@override
String toString() => 'BackendsResponseDto[backends=$backends]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backends'] = this.backends;
return json;
}
/// Returns a new [BackendsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static BackendsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "BackendsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return BackendsResponseDto(
backends: BackendDto.listFromJson(json[r'backends']),
);
}
return null;
}
static List<BackendsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <BackendsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = BackendsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, BackendsResponseDto> mapFromJson(dynamic json) {
final map = <String, BackendsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = BackendsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of BackendsResponseDto-objects as value to a dart map
static Map<String, List<BackendsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<BackendsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = BackendsResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backends',
};
}
@@ -0,0 +1,152 @@
//
// 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 ConfigureImmichIntegrationRequestDto {
/// Returns a new [ConfigureImmichIntegrationRequestDto] instance.
ConfigureImmichIntegrationRequestDto({
required this.backupConfiguration,
required this.cron,
this.dataFolders = const [],
required this.libraries,
required this.name,
this.retentionPolicy,
required this.worm,
});
bool backupConfiguration;
String cron;
List<String> dataFolders;
ConfigureImmichIntegrationRequestDtoLibraries libraries;
String name;
RetentionPolicyDto? retentionPolicy;
bool worm;
@override
bool operator ==(Object other) => identical(this, other) || other is ConfigureImmichIntegrationRequestDto &&
other.backupConfiguration == backupConfiguration &&
other.cron == cron &&
_deepEquality.equals(other.dataFolders, dataFolders) &&
other.libraries == libraries &&
other.name == name &&
other.retentionPolicy == retentionPolicy &&
other.worm == worm;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backupConfiguration.hashCode) +
(cron.hashCode) +
(dataFolders.hashCode) +
(libraries.hashCode) +
(name.hashCode) +
(retentionPolicy == null ? 0 : retentionPolicy!.hashCode) +
(worm.hashCode);
@override
String toString() => 'ConfigureImmichIntegrationRequestDto[backupConfiguration=$backupConfiguration, cron=$cron, dataFolders=$dataFolders, libraries=$libraries, name=$name, retentionPolicy=$retentionPolicy, worm=$worm]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backupConfiguration'] = this.backupConfiguration;
json[r'cron'] = this.cron;
json[r'dataFolders'] = this.dataFolders;
json[r'libraries'] = this.libraries;
json[r'name'] = this.name;
if (this.retentionPolicy != null) {
json[r'retentionPolicy'] = this.retentionPolicy;
} else {
// json[r'retentionPolicy'] = null;
}
json[r'worm'] = this.worm;
return json;
}
/// Returns a new [ConfigureImmichIntegrationRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ConfigureImmichIntegrationRequestDto? fromJson(dynamic value) {
upgradeDto(value, "ConfigureImmichIntegrationRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ConfigureImmichIntegrationRequestDto(
backupConfiguration: mapValueOfType<bool>(json, r'backupConfiguration')!,
cron: mapValueOfType<String>(json, r'cron')!,
dataFolders: json[r'dataFolders'] is Iterable
? (json[r'dataFolders'] as Iterable).cast<String>().toList(growable: false)
: const [],
libraries: ConfigureImmichIntegrationRequestDtoLibraries.fromJson(json[r'libraries'])!,
name: mapValueOfType<String>(json, r'name')!,
retentionPolicy: RetentionPolicyDto.fromJson(json[r'retentionPolicy']),
worm: mapValueOfType<bool>(json, r'worm')!,
);
}
return null;
}
static List<ConfigureImmichIntegrationRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ConfigureImmichIntegrationRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ConfigureImmichIntegrationRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ConfigureImmichIntegrationRequestDto> mapFromJson(dynamic json) {
final map = <String, ConfigureImmichIntegrationRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ConfigureImmichIntegrationRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ConfigureImmichIntegrationRequestDto-objects as value to a dart map
static Map<String, List<ConfigureImmichIntegrationRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ConfigureImmichIntegrationRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ConfigureImmichIntegrationRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backupConfiguration',
'cron',
'dataFolders',
'libraries',
'name',
'worm',
};
}
@@ -0,0 +1,91 @@
//
// 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 ConfigureImmichIntegrationRequestDtoLibraries {
/// Returns a new [ConfigureImmichIntegrationRequestDtoLibraries] instance.
ConfigureImmichIntegrationRequestDtoLibraries({
});
@override
bool operator ==(Object other) => identical(this, other) || other is ConfigureImmichIntegrationRequestDtoLibraries &&
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
@override
String toString() => 'ConfigureImmichIntegrationRequestDtoLibraries[]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
return json;
}
/// Returns a new [ConfigureImmichIntegrationRequestDtoLibraries] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ConfigureImmichIntegrationRequestDtoLibraries? fromJson(dynamic value) {
upgradeDto(value, "ConfigureImmichIntegrationRequestDtoLibraries");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ConfigureImmichIntegrationRequestDtoLibraries(
);
}
return null;
}
static List<ConfigureImmichIntegrationRequestDtoLibraries> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ConfigureImmichIntegrationRequestDtoLibraries>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ConfigureImmichIntegrationRequestDtoLibraries.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ConfigureImmichIntegrationRequestDtoLibraries> mapFromJson(dynamic json) {
final map = <String, ConfigureImmichIntegrationRequestDtoLibraries>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ConfigureImmichIntegrationRequestDtoLibraries.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ConfigureImmichIntegrationRequestDtoLibraries-objects as value to a dart map
static Map<String, List<ConfigureImmichIntegrationRequestDtoLibraries>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ConfigureImmichIntegrationRequestDtoLibraries>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ConfigureImmichIntegrationRequestDtoLibraries.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
@@ -0,0 +1,99 @@
//
// 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 CreateLocalBackendRequestDto {
/// Returns a new [CreateLocalBackendRequestDto] instance.
CreateLocalBackendRequestDto({
required this.path,
});
String path;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateLocalBackendRequestDto &&
other.path == path;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(path.hashCode);
@override
String toString() => 'CreateLocalBackendRequestDto[path=$path]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'path'] = this.path;
return json;
}
/// Returns a new [CreateLocalBackendRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateLocalBackendRequestDto? fromJson(dynamic value) {
upgradeDto(value, "CreateLocalBackendRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return CreateLocalBackendRequestDto(
path: mapValueOfType<String>(json, r'path')!,
);
}
return null;
}
static List<CreateLocalBackendRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateLocalBackendRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CreateLocalBackendRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CreateLocalBackendRequestDto> mapFromJson(dynamic json) {
final map = <String, CreateLocalBackendRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateLocalBackendRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CreateLocalBackendRequestDto-objects as value to a dart map
static Map<String, List<CreateLocalBackendRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateLocalBackendRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = CreateLocalBackendRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'path',
};
}
@@ -0,0 +1,99 @@
//
// 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 CurrentRecoveryKeyResponse {
/// Returns a new [CurrentRecoveryKeyResponse] instance.
CurrentRecoveryKeyResponse({
required this.recoveryKey,
});
String recoveryKey;
@override
bool operator ==(Object other) => identical(this, other) || other is CurrentRecoveryKeyResponse &&
other.recoveryKey == recoveryKey;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(recoveryKey.hashCode);
@override
String toString() => 'CurrentRecoveryKeyResponse[recoveryKey=$recoveryKey]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'recoveryKey'] = this.recoveryKey;
return json;
}
/// Returns a new [CurrentRecoveryKeyResponse] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CurrentRecoveryKeyResponse? fromJson(dynamic value) {
upgradeDto(value, "CurrentRecoveryKeyResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
return CurrentRecoveryKeyResponse(
recoveryKey: mapValueOfType<String>(json, r'recoveryKey')!,
);
}
return null;
}
static List<CurrentRecoveryKeyResponse> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CurrentRecoveryKeyResponse>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CurrentRecoveryKeyResponse.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CurrentRecoveryKeyResponse> mapFromJson(dynamic json) {
final map = <String, CurrentRecoveryKeyResponse>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CurrentRecoveryKeyResponse.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CurrentRecoveryKeyResponse-objects as value to a dart map
static Map<String, List<CurrentRecoveryKeyResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CurrentRecoveryKeyResponse>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = CurrentRecoveryKeyResponse.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'recoveryKey',
};
}
+107
View File
@@ -0,0 +1,107 @@
//
// 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 DeviceFlowResponseDto {
/// Returns a new [DeviceFlowResponseDto] instance.
DeviceFlowResponseDto({
required this.userCode,
required this.verificationUri,
});
String userCode;
String verificationUri;
@override
bool operator ==(Object other) => identical(this, other) || other is DeviceFlowResponseDto &&
other.userCode == userCode &&
other.verificationUri == verificationUri;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(userCode.hashCode) +
(verificationUri.hashCode);
@override
String toString() => 'DeviceFlowResponseDto[userCode=$userCode, verificationUri=$verificationUri]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'userCode'] = this.userCode;
json[r'verificationUri'] = this.verificationUri;
return json;
}
/// Returns a new [DeviceFlowResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DeviceFlowResponseDto? fromJson(dynamic value) {
upgradeDto(value, "DeviceFlowResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return DeviceFlowResponseDto(
userCode: mapValueOfType<String>(json, r'userCode')!,
verificationUri: mapValueOfType<String>(json, r'verificationUri')!,
);
}
return null;
}
static List<DeviceFlowResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeviceFlowResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DeviceFlowResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DeviceFlowResponseDto> mapFromJson(dynamic json) {
final map = <String, DeviceFlowResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeviceFlowResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DeviceFlowResponseDto-objects as value to a dart map
static Map<String, List<DeviceFlowResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DeviceFlowResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DeviceFlowResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'userCode',
'verificationUri',
};
}
+107
View File
@@ -0,0 +1,107 @@
//
// 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 FilesystemListingItemDto {
/// Returns a new [FilesystemListingItemDto] instance.
FilesystemListingItemDto({
required this.isDirectory,
required this.path,
});
bool isDirectory;
String path;
@override
bool operator ==(Object other) => identical(this, other) || other is FilesystemListingItemDto &&
other.isDirectory == isDirectory &&
other.path == path;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(isDirectory.hashCode) +
(path.hashCode);
@override
String toString() => 'FilesystemListingItemDto[isDirectory=$isDirectory, path=$path]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'isDirectory'] = this.isDirectory;
json[r'path'] = this.path;
return json;
}
/// Returns a new [FilesystemListingItemDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FilesystemListingItemDto? fromJson(dynamic value) {
upgradeDto(value, "FilesystemListingItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return FilesystemListingItemDto(
isDirectory: mapValueOfType<bool>(json, r'isDirectory')!,
path: mapValueOfType<String>(json, r'path')!,
);
}
return null;
}
static List<FilesystemListingItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <FilesystemListingItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = FilesystemListingItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, FilesystemListingItemDto> mapFromJson(dynamic json) {
final map = <String, FilesystemListingItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = FilesystemListingItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of FilesystemListingItemDto-objects as value to a dart map
static Map<String, List<FilesystemListingItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<FilesystemListingItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = FilesystemListingItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'isDirectory',
'path',
};
}
@@ -0,0 +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;
class FilesystemListingResponseDto {
/// Returns a new [FilesystemListingResponseDto] instance.
FilesystemListingResponseDto({
this.items = const [],
required this.parent,
required this.path,
});
List<FilesystemListingItemDto> items;
String parent;
String path;
@override
bool operator ==(Object other) => identical(this, other) || other is FilesystemListingResponseDto &&
_deepEquality.equals(other.items, items) &&
other.parent == parent &&
other.path == path;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(items.hashCode) +
(parent.hashCode) +
(path.hashCode);
@override
String toString() => 'FilesystemListingResponseDto[items=$items, parent=$parent, path=$path]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'items'] = this.items;
json[r'parent'] = this.parent;
json[r'path'] = this.path;
return json;
}
/// Returns a new [FilesystemListingResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FilesystemListingResponseDto? fromJson(dynamic value) {
upgradeDto(value, "FilesystemListingResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return FilesystemListingResponseDto(
items: FilesystemListingItemDto.listFromJson(json[r'items']),
parent: mapValueOfType<String>(json, r'parent')!,
path: mapValueOfType<String>(json, r'path')!,
);
}
return null;
}
static List<FilesystemListingResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <FilesystemListingResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = FilesystemListingResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, FilesystemListingResponseDto> mapFromJson(dynamic json) {
final map = <String, FilesystemListingResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = FilesystemListingResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of FilesystemListingResponseDto-objects as value to a dart map
static Map<String, List<FilesystemListingResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<FilesystemListingResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = FilesystemListingResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'items',
'parent',
'path',
};
}
@@ -0,0 +1,117 @@
//
// 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 ImmichIntegrationConfigurationDto {
/// Returns a new [ImmichIntegrationConfigurationDto] instance.
ImmichIntegrationConfigurationDto({
required this.backupConfiguration,
this.dataFolders = const [],
required this.libraries,
});
bool backupConfiguration;
List<String> dataFolders;
ConfigureImmichIntegrationRequestDtoLibraries libraries;
@override
bool operator ==(Object other) => identical(this, other) || other is ImmichIntegrationConfigurationDto &&
other.backupConfiguration == backupConfiguration &&
_deepEquality.equals(other.dataFolders, dataFolders) &&
other.libraries == libraries;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backupConfiguration.hashCode) +
(dataFolders.hashCode) +
(libraries.hashCode);
@override
String toString() => 'ImmichIntegrationConfigurationDto[backupConfiguration=$backupConfiguration, dataFolders=$dataFolders, libraries=$libraries]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backupConfiguration'] = this.backupConfiguration;
json[r'dataFolders'] = this.dataFolders;
json[r'libraries'] = this.libraries;
return json;
}
/// Returns a new [ImmichIntegrationConfigurationDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ImmichIntegrationConfigurationDto? fromJson(dynamic value) {
upgradeDto(value, "ImmichIntegrationConfigurationDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ImmichIntegrationConfigurationDto(
backupConfiguration: mapValueOfType<bool>(json, r'backupConfiguration')!,
dataFolders: json[r'dataFolders'] is Iterable
? (json[r'dataFolders'] as Iterable).cast<String>().toList(growable: false)
: const [],
libraries: ConfigureImmichIntegrationRequestDtoLibraries.fromJson(json[r'libraries'])!,
);
}
return null;
}
static List<ImmichIntegrationConfigurationDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ImmichIntegrationConfigurationDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ImmichIntegrationConfigurationDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ImmichIntegrationConfigurationDto> mapFromJson(dynamic json) {
final map = <String, ImmichIntegrationConfigurationDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ImmichIntegrationConfigurationDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ImmichIntegrationConfigurationDto-objects as value to a dart map
static Map<String, List<ImmichIntegrationConfigurationDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ImmichIntegrationConfigurationDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ImmichIntegrationConfigurationDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backupConfiguration',
'dataFolders',
'libraries',
};
}
+115
View File
@@ -0,0 +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;
class ImmichIntegrationDto {
/// Returns a new [ImmichIntegrationDto] instance.
ImmichIntegrationDto({
required this.configuration,
required this.id,
required this.scheduleId,
});
ImmichIntegrationConfigurationDto configuration;
String id;
String scheduleId;
@override
bool operator ==(Object other) => identical(this, other) || other is ImmichIntegrationDto &&
other.configuration == configuration &&
other.id == id &&
other.scheduleId == scheduleId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(configuration.hashCode) +
(id.hashCode) +
(scheduleId.hashCode);
@override
String toString() => 'ImmichIntegrationDto[configuration=$configuration, id=$id, scheduleId=$scheduleId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'configuration'] = this.configuration;
json[r'id'] = this.id;
json[r'scheduleId'] = this.scheduleId;
return json;
}
/// Returns a new [ImmichIntegrationDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ImmichIntegrationDto? fromJson(dynamic value) {
upgradeDto(value, "ImmichIntegrationDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ImmichIntegrationDto(
configuration: ImmichIntegrationConfigurationDto.fromJson(json[r'configuration'])!,
id: mapValueOfType<String>(json, r'id')!,
scheduleId: mapValueOfType<String>(json, r'scheduleId')!,
);
}
return null;
}
static List<ImmichIntegrationDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ImmichIntegrationDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ImmichIntegrationDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ImmichIntegrationDto> mapFromJson(dynamic json) {
final map = <String, ImmichIntegrationDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ImmichIntegrationDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ImmichIntegrationDto-objects as value to a dart map
static Map<String, List<ImmichIntegrationDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ImmichIntegrationDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ImmichIntegrationDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'configuration',
'id',
'scheduleId',
};
}
+127
View File
@@ -0,0 +1,127 @@
//
// 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 ImmichLibraryDto {
/// Returns a new [ImmichLibraryDto] instance.
ImmichLibraryDto({
this.exclusionPatterns = const [],
required this.id,
this.importPaths = const [],
required this.name,
});
List<String> exclusionPatterns;
String id;
List<String> importPaths;
String name;
@override
bool operator ==(Object other) => identical(this, other) || other is ImmichLibraryDto &&
_deepEquality.equals(other.exclusionPatterns, exclusionPatterns) &&
other.id == id &&
_deepEquality.equals(other.importPaths, importPaths) &&
other.name == name;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(exclusionPatterns.hashCode) +
(id.hashCode) +
(importPaths.hashCode) +
(name.hashCode);
@override
String toString() => 'ImmichLibraryDto[exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, name=$name]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'exclusionPatterns'] = this.exclusionPatterns;
json[r'id'] = this.id;
json[r'importPaths'] = this.importPaths;
json[r'name'] = this.name;
return json;
}
/// Returns a new [ImmichLibraryDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ImmichLibraryDto? fromJson(dynamic value) {
upgradeDto(value, "ImmichLibraryDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ImmichLibraryDto(
exclusionPatterns: json[r'exclusionPatterns'] is Iterable
? (json[r'exclusionPatterns'] as Iterable).cast<String>().toList(growable: false)
: const [],
id: mapValueOfType<String>(json, r'id')!,
importPaths: json[r'importPaths'] is Iterable
? (json[r'importPaths'] as Iterable).cast<String>().toList(growable: false)
: const [],
name: mapValueOfType<String>(json, r'name')!,
);
}
return null;
}
static List<ImmichLibraryDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ImmichLibraryDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ImmichLibraryDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ImmichLibraryDto> mapFromJson(dynamic json) {
final map = <String, ImmichLibraryDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ImmichLibraryDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ImmichLibraryDto-objects as value to a dart map
static Map<String, List<ImmichLibraryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ImmichLibraryDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ImmichLibraryDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'exclusionPatterns',
'id',
'importPaths',
'name',
};
}
+117
View File
@@ -0,0 +1,117 @@
//
// 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 ImmichStateDto {
/// Returns a new [ImmichStateDto] instance.
ImmichStateDto({
this.dataFolders = const [],
required this.dataPath,
this.libraries = const [],
});
List<String> dataFolders;
String dataPath;
List<ImmichLibraryDto> libraries;
@override
bool operator ==(Object other) => identical(this, other) || other is ImmichStateDto &&
_deepEquality.equals(other.dataFolders, dataFolders) &&
other.dataPath == dataPath &&
_deepEquality.equals(other.libraries, libraries);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(dataFolders.hashCode) +
(dataPath.hashCode) +
(libraries.hashCode);
@override
String toString() => 'ImmichStateDto[dataFolders=$dataFolders, dataPath=$dataPath, libraries=$libraries]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'dataFolders'] = this.dataFolders;
json[r'dataPath'] = this.dataPath;
json[r'libraries'] = this.libraries;
return json;
}
/// Returns a new [ImmichStateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ImmichStateDto? fromJson(dynamic value) {
upgradeDto(value, "ImmichStateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ImmichStateDto(
dataFolders: json[r'dataFolders'] is Iterable
? (json[r'dataFolders'] as Iterable).cast<String>().toList(growable: false)
: const [],
dataPath: mapValueOfType<String>(json, r'dataPath')!,
libraries: ImmichLibraryDto.listFromJson(json[r'libraries']),
);
}
return null;
}
static List<ImmichStateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ImmichStateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ImmichStateDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ImmichStateDto> mapFromJson(dynamic json) {
final map = <String, ImmichStateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ImmichStateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ImmichStateDto-objects as value to a dart map
static Map<String, List<ImmichStateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ImmichStateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ImmichStateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'dataFolders',
'dataPath',
'libraries',
};
}
@@ -0,0 +1,99 @@
//
// 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 ImportRecoveryKeyRequest {
/// Returns a new [ImportRecoveryKeyRequest] instance.
ImportRecoveryKeyRequest({
required this.recoveryKey,
});
String recoveryKey;
@override
bool operator ==(Object other) => identical(this, other) || other is ImportRecoveryKeyRequest &&
other.recoveryKey == recoveryKey;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(recoveryKey.hashCode);
@override
String toString() => 'ImportRecoveryKeyRequest[recoveryKey=$recoveryKey]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'recoveryKey'] = this.recoveryKey;
return json;
}
/// Returns a new [ImportRecoveryKeyRequest] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ImportRecoveryKeyRequest? fromJson(dynamic value) {
upgradeDto(value, "ImportRecoveryKeyRequest");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ImportRecoveryKeyRequest(
recoveryKey: mapValueOfType<String>(json, r'recoveryKey')!,
);
}
return null;
}
static List<ImportRecoveryKeyRequest> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ImportRecoveryKeyRequest>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ImportRecoveryKeyRequest.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ImportRecoveryKeyRequest> mapFromJson(dynamic json) {
final map = <String, ImportRecoveryKeyRequest>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ImportRecoveryKeyRequest.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ImportRecoveryKeyRequest-objects as value to a dart map
static Map<String, List<ImportRecoveryKeyRequest>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ImportRecoveryKeyRequest>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ImportRecoveryKeyRequest.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'recoveryKey',
};
}
@@ -0,0 +1,165 @@
//
// 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 InspectedLocalRepositoryDto {
/// Returns a new [InspectedLocalRepositoryDto] instance.
InspectedLocalRepositoryDto({
this.backends,
this.configuration,
required this.id,
required this.metrics,
required this.name,
this.snapshots = const [],
required this.worm,
});
///
/// 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.
///
RepositoryBackendsDto? backends;
///
/// 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.
///
RepositoryConfigurationDto? configuration;
String id;
RepositoryMetricsDto metrics;
String name;
List<SnapshotDto> snapshots;
bool worm;
@override
bool operator ==(Object other) => identical(this, other) || other is InspectedLocalRepositoryDto &&
other.backends == backends &&
other.configuration == configuration &&
other.id == id &&
other.metrics == metrics &&
other.name == name &&
_deepEquality.equals(other.snapshots, snapshots) &&
other.worm == worm;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backends == null ? 0 : backends!.hashCode) +
(configuration == null ? 0 : configuration!.hashCode) +
(id.hashCode) +
(metrics.hashCode) +
(name.hashCode) +
(snapshots.hashCode) +
(worm.hashCode);
@override
String toString() => 'InspectedLocalRepositoryDto[backends=$backends, configuration=$configuration, id=$id, metrics=$metrics, name=$name, snapshots=$snapshots, worm=$worm]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.backends != null) {
json[r'backends'] = this.backends;
} else {
// json[r'backends'] = null;
}
if (this.configuration != null) {
json[r'configuration'] = this.configuration;
} else {
// json[r'configuration'] = null;
}
json[r'id'] = this.id;
json[r'metrics'] = this.metrics;
json[r'name'] = this.name;
json[r'snapshots'] = this.snapshots;
json[r'worm'] = this.worm;
return json;
}
/// Returns a new [InspectedLocalRepositoryDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static InspectedLocalRepositoryDto? fromJson(dynamic value) {
upgradeDto(value, "InspectedLocalRepositoryDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return InspectedLocalRepositoryDto(
backends: RepositoryBackendsDto.fromJson(json[r'backends']),
configuration: RepositoryConfigurationDto.fromJson(json[r'configuration']),
id: mapValueOfType<String>(json, r'id')!,
metrics: RepositoryMetricsDto.fromJson(json[r'metrics'])!,
name: mapValueOfType<String>(json, r'name')!,
snapshots: SnapshotDto.listFromJson(json[r'snapshots']),
worm: mapValueOfType<bool>(json, r'worm')!,
);
}
return null;
}
static List<InspectedLocalRepositoryDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <InspectedLocalRepositoryDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = InspectedLocalRepositoryDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, InspectedLocalRepositoryDto> mapFromJson(dynamic json) {
final map = <String, InspectedLocalRepositoryDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = InspectedLocalRepositoryDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of InspectedLocalRepositoryDto-objects as value to a dart map
static Map<String, List<InspectedLocalRepositoryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<InspectedLocalRepositoryDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = InspectedLocalRepositoryDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'metrics',
'name',
'snapshots',
'worm',
};
}
+125
View File
@@ -0,0 +1,125 @@
//
// 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 IntegrationsResponseDto {
/// Returns a new [IntegrationsResponseDto] instance.
IntegrationsResponseDto({
this.immichIntegration,
this.immichState,
});
///
/// 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.
///
ImmichIntegrationDto? immichIntegration;
///
/// 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.
///
ImmichStateDto? immichState;
@override
bool operator ==(Object other) => identical(this, other) || other is IntegrationsResponseDto &&
other.immichIntegration == immichIntegration &&
other.immichState == immichState;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(immichIntegration == null ? 0 : immichIntegration!.hashCode) +
(immichState == null ? 0 : immichState!.hashCode);
@override
String toString() => 'IntegrationsResponseDto[immichIntegration=$immichIntegration, immichState=$immichState]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.immichIntegration != null) {
json[r'immichIntegration'] = this.immichIntegration;
} else {
// json[r'immichIntegration'] = null;
}
if (this.immichState != null) {
json[r'immichState'] = this.immichState;
} else {
// json[r'immichState'] = null;
}
return json;
}
/// Returns a new [IntegrationsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static IntegrationsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "IntegrationsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return IntegrationsResponseDto(
immichIntegration: ImmichIntegrationDto.fromJson(json[r'immichIntegration']),
immichState: ImmichStateDto.fromJson(json[r'immichState']),
);
}
return null;
}
static List<IntegrationsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <IntegrationsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = IntegrationsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, IntegrationsResponseDto> mapFromJson(dynamic json) {
final map = <String, IntegrationsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = IntegrationsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of IntegrationsResponseDto-objects as value to a dart map
static Map<String, List<IntegrationsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<IntegrationsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = IntegrationsResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
@@ -0,0 +1,99 @@
//
// 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 ListSnapshotsResponseDto {
/// Returns a new [ListSnapshotsResponseDto] instance.
ListSnapshotsResponseDto({
this.snapshots = const [],
});
List<SnapshotDto> snapshots;
@override
bool operator ==(Object other) => identical(this, other) || other is ListSnapshotsResponseDto &&
_deepEquality.equals(other.snapshots, snapshots);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(snapshots.hashCode);
@override
String toString() => 'ListSnapshotsResponseDto[snapshots=$snapshots]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'snapshots'] = this.snapshots;
return json;
}
/// Returns a new [ListSnapshotsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ListSnapshotsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ListSnapshotsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ListSnapshotsResponseDto(
snapshots: SnapshotDto.listFromJson(json[r'snapshots']),
);
}
return null;
}
static List<ListSnapshotsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ListSnapshotsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ListSnapshotsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ListSnapshotsResponseDto> mapFromJson(dynamic json) {
final map = <String, ListSnapshotsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ListSnapshotsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ListSnapshotsResponseDto-objects as value to a dart map
static Map<String, List<ListSnapshotsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ListSnapshotsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ListSnapshotsResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'snapshots',
};
}
+157
View File
@@ -0,0 +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 LocalRepositoryDto {
/// Returns a new [LocalRepositoryDto] instance.
LocalRepositoryDto({
this.backends,
this.configuration,
required this.id,
required this.metrics,
required this.name,
required this.worm,
});
///
/// 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.
///
RepositoryBackendsDto? backends;
///
/// 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.
///
RepositoryConfigurationDto? configuration;
String id;
RepositoryMetricsDto metrics;
String name;
bool worm;
@override
bool operator ==(Object other) => identical(this, other) || other is LocalRepositoryDto &&
other.backends == backends &&
other.configuration == configuration &&
other.id == id &&
other.metrics == metrics &&
other.name == name &&
other.worm == worm;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backends == null ? 0 : backends!.hashCode) +
(configuration == null ? 0 : configuration!.hashCode) +
(id.hashCode) +
(metrics.hashCode) +
(name.hashCode) +
(worm.hashCode);
@override
String toString() => 'LocalRepositoryDto[backends=$backends, configuration=$configuration, id=$id, metrics=$metrics, name=$name, worm=$worm]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.backends != null) {
json[r'backends'] = this.backends;
} else {
// json[r'backends'] = null;
}
if (this.configuration != null) {
json[r'configuration'] = this.configuration;
} else {
// json[r'configuration'] = null;
}
json[r'id'] = this.id;
json[r'metrics'] = this.metrics;
json[r'name'] = this.name;
json[r'worm'] = this.worm;
return json;
}
/// Returns a new [LocalRepositoryDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LocalRepositoryDto? fromJson(dynamic value) {
upgradeDto(value, "LocalRepositoryDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return LocalRepositoryDto(
backends: RepositoryBackendsDto.fromJson(json[r'backends']),
configuration: RepositoryConfigurationDto.fromJson(json[r'configuration']),
id: mapValueOfType<String>(json, r'id')!,
metrics: RepositoryMetricsDto.fromJson(json[r'metrics'])!,
name: mapValueOfType<String>(json, r'name')!,
worm: mapValueOfType<bool>(json, r'worm')!,
);
}
return null;
}
static List<LocalRepositoryDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <LocalRepositoryDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = LocalRepositoryDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, LocalRepositoryDto> mapFromJson(dynamic json) {
final map = <String, LocalRepositoryDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LocalRepositoryDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of LocalRepositoryDto-objects as value to a dart map
static Map<String, List<LocalRepositoryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LocalRepositoryDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = LocalRepositoryDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'metrics',
'name',
'worm',
};
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 LogResponseDto {
/// Returns a new [LogResponseDto] instance.
LogResponseDto({
required this.logId,
});
String logId;
@override
bool operator ==(Object other) => identical(this, other) || other is LogResponseDto &&
other.logId == logId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(logId.hashCode);
@override
String toString() => 'LogResponseDto[logId=$logId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'logId'] = this.logId;
return json;
}
/// Returns a new [LogResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LogResponseDto? fromJson(dynamic value) {
upgradeDto(value, "LogResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return LogResponseDto(
logId: mapValueOfType<String>(json, r'logId')!,
);
}
return null;
}
static List<LogResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <LogResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = LogResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, LogResponseDto> mapFromJson(dynamic json) {
final map = <String, LogResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LogResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of LogResponseDto-objects as value to a dart map
static Map<String, List<LogResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LogResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = LogResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'logId',
};
}
@@ -0,0 +1,131 @@
//
// 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 OnboardingStatusResponseDto {
/// Returns a new [OnboardingStatusResponseDto] instance.
OnboardingStatusResponseDto({
required this.hasBackend,
required this.hasBackup,
required this.hasOnboardedKey,
required this.hasSchedule,
required this.hasSkippedExtraConfig,
});
bool hasBackend;
bool hasBackup;
bool hasOnboardedKey;
bool hasSchedule;
bool hasSkippedExtraConfig;
@override
bool operator ==(Object other) => identical(this, other) || other is OnboardingStatusResponseDto &&
other.hasBackend == hasBackend &&
other.hasBackup == hasBackup &&
other.hasOnboardedKey == hasOnboardedKey &&
other.hasSchedule == hasSchedule &&
other.hasSkippedExtraConfig == hasSkippedExtraConfig;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(hasBackend.hashCode) +
(hasBackup.hashCode) +
(hasOnboardedKey.hashCode) +
(hasSchedule.hashCode) +
(hasSkippedExtraConfig.hashCode);
@override
String toString() => 'OnboardingStatusResponseDto[hasBackend=$hasBackend, hasBackup=$hasBackup, hasOnboardedKey=$hasOnboardedKey, hasSchedule=$hasSchedule, hasSkippedExtraConfig=$hasSkippedExtraConfig]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'hasBackend'] = this.hasBackend;
json[r'hasBackup'] = this.hasBackup;
json[r'hasOnboardedKey'] = this.hasOnboardedKey;
json[r'hasSchedule'] = this.hasSchedule;
json[r'hasSkippedExtraConfig'] = this.hasSkippedExtraConfig;
return json;
}
/// Returns a new [OnboardingStatusResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static OnboardingStatusResponseDto? fromJson(dynamic value) {
upgradeDto(value, "OnboardingStatusResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return OnboardingStatusResponseDto(
hasBackend: mapValueOfType<bool>(json, r'hasBackend')!,
hasBackup: mapValueOfType<bool>(json, r'hasBackup')!,
hasOnboardedKey: mapValueOfType<bool>(json, r'hasOnboardedKey')!,
hasSchedule: mapValueOfType<bool>(json, r'hasSchedule')!,
hasSkippedExtraConfig: mapValueOfType<bool>(json, r'hasSkippedExtraConfig')!,
);
}
return null;
}
static List<OnboardingStatusResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <OnboardingStatusResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = OnboardingStatusResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, OnboardingStatusResponseDto> mapFromJson(dynamic json) {
final map = <String, OnboardingStatusResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = OnboardingStatusResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of OnboardingStatusResponseDto-objects as value to a dart map
static Map<String, List<OnboardingStatusResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<OnboardingStatusResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = OnboardingStatusResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'hasBackend',
'hasBackup',
'hasOnboardedKey',
'hasSchedule',
'hasSkippedExtraConfig',
};
}
+115
View File
@@ -0,0 +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;
class RepositoryBackendDto {
/// Returns a new [RepositoryBackendDto] instance.
RepositoryBackendDto({
required this.id,
required this.online,
required this.type,
});
String id;
bool online;
BackendType type;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryBackendDto &&
other.id == id &&
other.online == online &&
other.type == type;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(online.hashCode) +
(type.hashCode);
@override
String toString() => 'RepositoryBackendDto[id=$id, online=$online, type=$type]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'online'] = this.online;
json[r'type'] = this.type;
return json;
}
/// Returns a new [RepositoryBackendDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryBackendDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryBackendDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryBackendDto(
id: mapValueOfType<String>(json, r'id')!,
online: mapValueOfType<bool>(json, r'online')!,
type: BackendType.fromJson(json[r'type'])!,
);
}
return null;
}
static List<RepositoryBackendDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryBackendDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryBackendDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryBackendDto> mapFromJson(dynamic json) {
final map = <String, RepositoryBackendDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryBackendDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryBackendDto-objects as value to a dart map
static Map<String, List<RepositoryBackendDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryBackendDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryBackendDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'online',
'type',
};
}
+107
View File
@@ -0,0 +1,107 @@
//
// 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 RepositoryBackendsDto {
/// Returns a new [RepositoryBackendsDto] instance.
RepositoryBackendsDto({
required this.primary,
this.secondary = const [],
});
RepositoryBackendDto primary;
List<RepositoryBackendDto> secondary;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryBackendsDto &&
other.primary == primary &&
_deepEquality.equals(other.secondary, secondary);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(primary.hashCode) +
(secondary.hashCode);
@override
String toString() => 'RepositoryBackendsDto[primary=$primary, secondary=$secondary]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'primary'] = this.primary;
json[r'secondary'] = this.secondary;
return json;
}
/// Returns a new [RepositoryBackendsDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryBackendsDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryBackendsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryBackendsDto(
primary: RepositoryBackendDto.fromJson(json[r'primary'])!,
secondary: RepositoryBackendDto.listFromJson(json[r'secondary']),
);
}
return null;
}
static List<RepositoryBackendsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryBackendsDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryBackendsDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryBackendsDto> mapFromJson(dynamic json) {
final map = <String, RepositoryBackendsDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryBackendsDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryBackendsDto-objects as value to a dart map
static Map<String, List<RepositoryBackendsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryBackendsDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryBackendsDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'primary',
'secondary',
};
}
@@ -0,0 +1,99 @@
//
// 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 RepositoryCheckImportResponseDto {
/// Returns a new [RepositoryCheckImportResponseDto] instance.
RepositoryCheckImportResponseDto({
required this.readable,
});
bool readable;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryCheckImportResponseDto &&
other.readable == readable;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(readable.hashCode);
@override
String toString() => 'RepositoryCheckImportResponseDto[readable=$readable]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'readable'] = this.readable;
return json;
}
/// Returns a new [RepositoryCheckImportResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryCheckImportResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryCheckImportResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryCheckImportResponseDto(
readable: mapValueOfType<bool>(json, r'readable')!,
);
}
return null;
}
static List<RepositoryCheckImportResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryCheckImportResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryCheckImportResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryCheckImportResponseDto> mapFromJson(dynamic json) {
final map = <String, RepositoryCheckImportResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryCheckImportResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryCheckImportResponseDto-objects as value to a dart map
static Map<String, List<RepositoryCheckImportResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryCheckImportResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryCheckImportResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'readable',
};
}
+112
View File
@@ -0,0 +1,112 @@
//
// 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 RepositoryConfigurationDto {
/// Returns a new [RepositoryConfigurationDto] instance.
RepositoryConfigurationDto({
this.paths = const [],
this.retentionPolicy,
});
List<String> paths;
RetentionPolicyDto? retentionPolicy;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryConfigurationDto &&
_deepEquality.equals(other.paths, paths) &&
other.retentionPolicy == retentionPolicy;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(paths.hashCode) +
(retentionPolicy == null ? 0 : retentionPolicy!.hashCode);
@override
String toString() => 'RepositoryConfigurationDto[paths=$paths, retentionPolicy=$retentionPolicy]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'paths'] = this.paths;
if (this.retentionPolicy != null) {
json[r'retentionPolicy'] = this.retentionPolicy;
} else {
// json[r'retentionPolicy'] = null;
}
return json;
}
/// Returns a new [RepositoryConfigurationDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryConfigurationDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryConfigurationDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryConfigurationDto(
paths: json[r'paths'] is Iterable
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
: const [],
retentionPolicy: RetentionPolicyDto.fromJson(json[r'retentionPolicy']),
);
}
return null;
}
static List<RepositoryConfigurationDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryConfigurationDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryConfigurationDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryConfigurationDto> mapFromJson(dynamic json) {
final map = <String, RepositoryConfigurationDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryConfigurationDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryConfigurationDto-objects as value to a dart map
static Map<String, List<RepositoryConfigurationDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryConfigurationDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryConfigurationDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'paths',
};
}
@@ -0,0 +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 RepositoryCreateRequestDto {
/// Returns a new [RepositoryCreateRequestDto] instance.
RepositoryCreateRequestDto({
required this.name,
this.paths = const [],
required this.worm,
});
String name;
List<String> paths;
bool worm;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryCreateRequestDto &&
other.name == name &&
_deepEquality.equals(other.paths, paths) &&
other.worm == worm;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(name.hashCode) +
(paths.hashCode) +
(worm.hashCode);
@override
String toString() => 'RepositoryCreateRequestDto[name=$name, paths=$paths, worm=$worm]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'name'] = this.name;
json[r'paths'] = this.paths;
json[r'worm'] = this.worm;
return json;
}
/// Returns a new [RepositoryCreateRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryCreateRequestDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryCreateRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryCreateRequestDto(
name: mapValueOfType<String>(json, r'name')!,
paths: json[r'paths'] is Iterable
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
: const [],
worm: mapValueOfType<bool>(json, r'worm')!,
);
}
return null;
}
static List<RepositoryCreateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryCreateRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryCreateRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryCreateRequestDto> mapFromJson(dynamic json) {
final map = <String, RepositoryCreateRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryCreateRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryCreateRequestDto-objects as value to a dart map
static Map<String, List<RepositoryCreateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryCreateRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryCreateRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'name',
'worm',
};
}
@@ -0,0 +1,99 @@
//
// 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 RepositoryCreateResponseDto {
/// Returns a new [RepositoryCreateResponseDto] instance.
RepositoryCreateResponseDto({
required this.repository,
});
LocalRepositoryDto repository;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryCreateResponseDto &&
other.repository == repository;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(repository.hashCode);
@override
String toString() => 'RepositoryCreateResponseDto[repository=$repository]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'repository'] = this.repository;
return json;
}
/// Returns a new [RepositoryCreateResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryCreateResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryCreateResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryCreateResponseDto(
repository: LocalRepositoryDto.fromJson(json[r'repository'])!,
);
}
return null;
}
static List<RepositoryCreateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryCreateResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryCreateResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryCreateResponseDto> mapFromJson(dynamic json) {
final map = <String, RepositoryCreateResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryCreateResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryCreateResponseDto-objects as value to a dart map
static Map<String, List<RepositoryCreateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryCreateResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryCreateResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'repository',
};
}
@@ -0,0 +1,99 @@
//
// 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 RepositoryInspectResponseDto {
/// Returns a new [RepositoryInspectResponseDto] instance.
RepositoryInspectResponseDto({
this.repositories = const [],
});
List<InspectedLocalRepositoryDto> repositories;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryInspectResponseDto &&
_deepEquality.equals(other.repositories, repositories);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(repositories.hashCode);
@override
String toString() => 'RepositoryInspectResponseDto[repositories=$repositories]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'repositories'] = this.repositories;
return json;
}
/// Returns a new [RepositoryInspectResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryInspectResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryInspectResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryInspectResponseDto(
repositories: InspectedLocalRepositoryDto.listFromJson(json[r'repositories']),
);
}
return null;
}
static List<RepositoryInspectResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryInspectResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryInspectResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryInspectResponseDto> mapFromJson(dynamic json) {
final map = <String, RepositoryInspectResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryInspectResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryInspectResponseDto-objects as value to a dart map
static Map<String, List<RepositoryInspectResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryInspectResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryInspectResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'repositories',
};
}
@@ -0,0 +1,99 @@
//
// 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 RepositoryListResponseDto {
/// Returns a new [RepositoryListResponseDto] instance.
RepositoryListResponseDto({
this.repositories = const [],
});
List<LocalRepositoryDto> repositories;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryListResponseDto &&
_deepEquality.equals(other.repositories, repositories);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(repositories.hashCode);
@override
String toString() => 'RepositoryListResponseDto[repositories=$repositories]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'repositories'] = this.repositories;
return json;
}
/// Returns a new [RepositoryListResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryListResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryListResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryListResponseDto(
repositories: LocalRepositoryDto.listFromJson(json[r'repositories']),
);
}
return null;
}
static List<RepositoryListResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryListResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryListResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryListResponseDto> mapFromJson(dynamic json) {
final map = <String, RepositoryListResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryListResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryListResponseDto-objects as value to a dart map
static Map<String, List<RepositoryListResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryListResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryListResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'repositories',
};
}
+150
View File
@@ -0,0 +1,150 @@
//
// 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 RepositoryMetricsDto {
/// Returns a new [RepositoryMetricsDto] instance.
RepositoryMetricsDto({
this.lastBackup,
this.lastBackupDuration,
this.lastSuccessfulBackup,
required this.sizeBytes,
});
///
/// 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? lastBackup;
///
/// 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.
///
num? lastBackupDuration;
///
/// 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? lastSuccessfulBackup;
num sizeBytes;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryMetricsDto &&
other.lastBackup == lastBackup &&
other.lastBackupDuration == lastBackupDuration &&
other.lastSuccessfulBackup == lastSuccessfulBackup &&
other.sizeBytes == sizeBytes;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(lastBackup == null ? 0 : lastBackup!.hashCode) +
(lastBackupDuration == null ? 0 : lastBackupDuration!.hashCode) +
(lastSuccessfulBackup == null ? 0 : lastSuccessfulBackup!.hashCode) +
(sizeBytes.hashCode);
@override
String toString() => 'RepositoryMetricsDto[lastBackup=$lastBackup, lastBackupDuration=$lastBackupDuration, lastSuccessfulBackup=$lastSuccessfulBackup, sizeBytes=$sizeBytes]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.lastBackup != null) {
json[r'lastBackup'] = this.lastBackup;
} else {
// json[r'lastBackup'] = null;
}
if (this.lastBackupDuration != null) {
json[r'lastBackupDuration'] = this.lastBackupDuration;
} else {
// json[r'lastBackupDuration'] = null;
}
if (this.lastSuccessfulBackup != null) {
json[r'lastSuccessfulBackup'] = this.lastSuccessfulBackup;
} else {
// json[r'lastSuccessfulBackup'] = null;
}
json[r'sizeBytes'] = this.sizeBytes;
return json;
}
/// Returns a new [RepositoryMetricsDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryMetricsDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryMetricsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryMetricsDto(
lastBackup: mapValueOfType<String>(json, r'lastBackup'),
lastBackupDuration: num.parse('${json[r'lastBackupDuration']}'),
lastSuccessfulBackup: mapValueOfType<String>(json, r'lastSuccessfulBackup'),
sizeBytes: num.parse('${json[r'sizeBytes']}'),
);
}
return null;
}
static List<RepositoryMetricsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryMetricsDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryMetricsDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryMetricsDto> mapFromJson(dynamic json) {
final map = <String, RepositoryMetricsDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryMetricsDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryMetricsDto-objects as value to a dart map
static Map<String, List<RepositoryMetricsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryMetricsDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryMetricsDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'sizeBytes',
};
}
@@ -0,0 +1,117 @@
//
// 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 RepositorySnapshotRestoreFromPointRequestDto {
/// Returns a new [RepositorySnapshotRestoreFromPointRequestDto] instance.
RepositorySnapshotRestoreFromPointRequestDto({
this.include = const [],
this.yuccaConfig,
});
List<String> include;
///
/// 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? yuccaConfig;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositorySnapshotRestoreFromPointRequestDto &&
_deepEquality.equals(other.include, include) &&
other.yuccaConfig == yuccaConfig;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(include.hashCode) +
(yuccaConfig == null ? 0 : yuccaConfig!.hashCode);
@override
String toString() => 'RepositorySnapshotRestoreFromPointRequestDto[include=$include, yuccaConfig=$yuccaConfig]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'include'] = this.include;
if (this.yuccaConfig != null) {
json[r'yuccaConfig'] = this.yuccaConfig;
} else {
// json[r'yuccaConfig'] = null;
}
return json;
}
/// Returns a new [RepositorySnapshotRestoreFromPointRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositorySnapshotRestoreFromPointRequestDto? fromJson(dynamic value) {
upgradeDto(value, "RepositorySnapshotRestoreFromPointRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositorySnapshotRestoreFromPointRequestDto(
include: json[r'include'] is Iterable
? (json[r'include'] as Iterable).cast<String>().toList(growable: false)
: const [],
yuccaConfig: mapValueOfType<String>(json, r'yuccaConfig'),
);
}
return null;
}
static List<RepositorySnapshotRestoreFromPointRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositorySnapshotRestoreFromPointRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositorySnapshotRestoreFromPointRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositorySnapshotRestoreFromPointRequestDto> mapFromJson(dynamic json) {
final map = <String, RepositorySnapshotRestoreFromPointRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositorySnapshotRestoreFromPointRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositorySnapshotRestoreFromPointRequestDto-objects as value to a dart map
static Map<String, List<RepositorySnapshotRestoreFromPointRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositorySnapshotRestoreFromPointRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositorySnapshotRestoreFromPointRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
@@ -0,0 +1,117 @@
//
// 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 RepositorySnapshotRestoreRequestDto {
/// Returns a new [RepositorySnapshotRestoreRequestDto] instance.
RepositorySnapshotRestoreRequestDto({
this.include = const [],
this.target,
});
List<String> include;
///
/// 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? target;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositorySnapshotRestoreRequestDto &&
_deepEquality.equals(other.include, include) &&
other.target == target;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(include.hashCode) +
(target == null ? 0 : target!.hashCode);
@override
String toString() => 'RepositorySnapshotRestoreRequestDto[include=$include, target=$target]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'include'] = this.include;
if (this.target != null) {
json[r'target'] = this.target;
} else {
// json[r'target'] = null;
}
return json;
}
/// Returns a new [RepositorySnapshotRestoreRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositorySnapshotRestoreRequestDto? fromJson(dynamic value) {
upgradeDto(value, "RepositorySnapshotRestoreRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositorySnapshotRestoreRequestDto(
include: json[r'include'] is Iterable
? (json[r'include'] as Iterable).cast<String>().toList(growable: false)
: const [],
target: mapValueOfType<String>(json, r'target'),
);
}
return null;
}
static List<RepositorySnapshotRestoreRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositorySnapshotRestoreRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositorySnapshotRestoreRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositorySnapshotRestoreRequestDto> mapFromJson(dynamic json) {
final map = <String, RepositorySnapshotRestoreRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositorySnapshotRestoreRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositorySnapshotRestoreRequestDto-objects as value to a dart map
static Map<String, List<RepositorySnapshotRestoreRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositorySnapshotRestoreRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositorySnapshotRestoreRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
@@ -0,0 +1,128 @@
//
// 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 RepositoryUpdateRequestDto {
/// Returns a new [RepositoryUpdateRequestDto] instance.
RepositoryUpdateRequestDto({
this.name,
this.paths = const [],
this.retentionPolicy,
});
///
/// 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? name;
List<String> paths;
RetentionPolicyDto? retentionPolicy;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryUpdateRequestDto &&
other.name == name &&
_deepEquality.equals(other.paths, paths) &&
other.retentionPolicy == retentionPolicy;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(name == null ? 0 : name!.hashCode) +
(paths.hashCode) +
(retentionPolicy == null ? 0 : retentionPolicy!.hashCode);
@override
String toString() => 'RepositoryUpdateRequestDto[name=$name, paths=$paths, retentionPolicy=$retentionPolicy]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.name != null) {
json[r'name'] = this.name;
} else {
// json[r'name'] = null;
}
json[r'paths'] = this.paths;
if (this.retentionPolicy != null) {
json[r'retentionPolicy'] = this.retentionPolicy;
} else {
// json[r'retentionPolicy'] = null;
}
return json;
}
/// Returns a new [RepositoryUpdateRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryUpdateRequestDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryUpdateRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryUpdateRequestDto(
name: mapValueOfType<String>(json, r'name'),
paths: json[r'paths'] is Iterable
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
: const [],
retentionPolicy: RetentionPolicyDto.fromJson(json[r'retentionPolicy']),
);
}
return null;
}
static List<RepositoryUpdateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryUpdateRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryUpdateRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryUpdateRequestDto> mapFromJson(dynamic json) {
final map = <String, RepositoryUpdateRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryUpdateRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryUpdateRequestDto-objects as value to a dart map
static Map<String, List<RepositoryUpdateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryUpdateRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryUpdateRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
@@ -0,0 +1,99 @@
//
// 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 RepositoryUpdateResponseDto {
/// Returns a new [RepositoryUpdateResponseDto] instance.
RepositoryUpdateResponseDto({
required this.repository,
});
LocalRepositoryDto repository;
@override
bool operator ==(Object other) => identical(this, other) || other is RepositoryUpdateResponseDto &&
other.repository == repository;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(repository.hashCode);
@override
String toString() => 'RepositoryUpdateResponseDto[repository=$repository]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'repository'] = this.repository;
return json;
}
/// Returns a new [RepositoryUpdateResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RepositoryUpdateResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RepositoryUpdateResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RepositoryUpdateResponseDto(
repository: LocalRepositoryDto.fromJson(json[r'repository'])!,
);
}
return null;
}
static List<RepositoryUpdateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RepositoryUpdateResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RepositoryUpdateResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RepositoryUpdateResponseDto> mapFromJson(dynamic json) {
final map = <String, RepositoryUpdateResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RepositoryUpdateResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RepositoryUpdateResponseDto-objects as value to a dart map
static Map<String, List<RepositoryUpdateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RepositoryUpdateResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RepositoryUpdateResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'repository',
};
}
+210
View File
@@ -0,0 +1,210 @@
//
// 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 RetentionPolicyDto {
/// Returns a new [RetentionPolicyDto] instance.
RetentionPolicyDto({
this.keepLast,
this.keepWithin,
this.keepWithinDaily,
this.keepWithinHourly,
this.keepWithinMonthly,
this.keepWithinWeekly,
this.keepWithinYearly,
});
///
/// 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.
///
num? keepLast;
///
/// 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? keepWithin;
///
/// 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? keepWithinDaily;
///
/// 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? keepWithinHourly;
///
/// 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? keepWithinMonthly;
///
/// 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? keepWithinWeekly;
///
/// 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? keepWithinYearly;
@override
bool operator ==(Object other) => identical(this, other) || other is RetentionPolicyDto &&
other.keepLast == keepLast &&
other.keepWithin == keepWithin &&
other.keepWithinDaily == keepWithinDaily &&
other.keepWithinHourly == keepWithinHourly &&
other.keepWithinMonthly == keepWithinMonthly &&
other.keepWithinWeekly == keepWithinWeekly &&
other.keepWithinYearly == keepWithinYearly;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(keepLast == null ? 0 : keepLast!.hashCode) +
(keepWithin == null ? 0 : keepWithin!.hashCode) +
(keepWithinDaily == null ? 0 : keepWithinDaily!.hashCode) +
(keepWithinHourly == null ? 0 : keepWithinHourly!.hashCode) +
(keepWithinMonthly == null ? 0 : keepWithinMonthly!.hashCode) +
(keepWithinWeekly == null ? 0 : keepWithinWeekly!.hashCode) +
(keepWithinYearly == null ? 0 : keepWithinYearly!.hashCode);
@override
String toString() => 'RetentionPolicyDto[keepLast=$keepLast, keepWithin=$keepWithin, keepWithinDaily=$keepWithinDaily, keepWithinHourly=$keepWithinHourly, keepWithinMonthly=$keepWithinMonthly, keepWithinWeekly=$keepWithinWeekly, keepWithinYearly=$keepWithinYearly]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.keepLast != null) {
json[r'keepLast'] = this.keepLast;
} else {
// json[r'keepLast'] = null;
}
if (this.keepWithin != null) {
json[r'keepWithin'] = this.keepWithin;
} else {
// json[r'keepWithin'] = null;
}
if (this.keepWithinDaily != null) {
json[r'keepWithinDaily'] = this.keepWithinDaily;
} else {
// json[r'keepWithinDaily'] = null;
}
if (this.keepWithinHourly != null) {
json[r'keepWithinHourly'] = this.keepWithinHourly;
} else {
// json[r'keepWithinHourly'] = null;
}
if (this.keepWithinMonthly != null) {
json[r'keepWithinMonthly'] = this.keepWithinMonthly;
} else {
// json[r'keepWithinMonthly'] = null;
}
if (this.keepWithinWeekly != null) {
json[r'keepWithinWeekly'] = this.keepWithinWeekly;
} else {
// json[r'keepWithinWeekly'] = null;
}
if (this.keepWithinYearly != null) {
json[r'keepWithinYearly'] = this.keepWithinYearly;
} else {
// json[r'keepWithinYearly'] = null;
}
return json;
}
/// Returns a new [RetentionPolicyDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RetentionPolicyDto? fromJson(dynamic value) {
upgradeDto(value, "RetentionPolicyDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RetentionPolicyDto(
keepLast: num.parse('${json[r'keepLast']}'),
keepWithin: mapValueOfType<String>(json, r'keepWithin'),
keepWithinDaily: mapValueOfType<String>(json, r'keepWithinDaily'),
keepWithinHourly: mapValueOfType<String>(json, r'keepWithinHourly'),
keepWithinMonthly: mapValueOfType<String>(json, r'keepWithinMonthly'),
keepWithinWeekly: mapValueOfType<String>(json, r'keepWithinWeekly'),
keepWithinYearly: mapValueOfType<String>(json, r'keepWithinYearly'),
);
}
return null;
}
static List<RetentionPolicyDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RetentionPolicyDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RetentionPolicyDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RetentionPolicyDto> mapFromJson(dynamic json) {
final map = <String, RetentionPolicyDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RetentionPolicyDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RetentionPolicyDto-objects as value to a dart map
static Map<String, List<RetentionPolicyDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RetentionPolicyDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RetentionPolicyDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
+147
View File
@@ -0,0 +1,147 @@
//
// 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 RunDto {
/// Returns a new [RunDto] instance.
RunDto({
required this.end,
required this.id,
required this.logFilePath,
required this.repositoryId,
required this.start,
required this.status,
required this.type,
});
String end;
String id;
String logFilePath;
String repositoryId;
String start;
RunStatus status;
RunType type;
@override
bool operator ==(Object other) => identical(this, other) || other is RunDto &&
other.end == end &&
other.id == id &&
other.logFilePath == logFilePath &&
other.repositoryId == repositoryId &&
other.start == start &&
other.status == status &&
other.type == type;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(end.hashCode) +
(id.hashCode) +
(logFilePath.hashCode) +
(repositoryId.hashCode) +
(start.hashCode) +
(status.hashCode) +
(type.hashCode);
@override
String toString() => 'RunDto[end=$end, id=$id, logFilePath=$logFilePath, repositoryId=$repositoryId, start=$start, status=$status, type=$type]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'end'] = this.end;
json[r'id'] = this.id;
json[r'logFilePath'] = this.logFilePath;
json[r'repositoryId'] = this.repositoryId;
json[r'start'] = this.start;
json[r'status'] = this.status;
json[r'type'] = this.type;
return json;
}
/// Returns a new [RunDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RunDto? fromJson(dynamic value) {
upgradeDto(value, "RunDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RunDto(
end: mapValueOfType<String>(json, r'end')!,
id: mapValueOfType<String>(json, r'id')!,
logFilePath: mapValueOfType<String>(json, r'logFilePath')!,
repositoryId: mapValueOfType<String>(json, r'repositoryId')!,
start: mapValueOfType<String>(json, r'start')!,
status: RunStatus.fromJson(json[r'status'])!,
type: RunType.fromJson(json[r'type'])!,
);
}
return null;
}
static List<RunDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RunDto> mapFromJson(dynamic json) {
final map = <String, RunDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RunDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RunDto-objects as value to a dart map
static Map<String, List<RunDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RunDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RunDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'end',
'id',
'logFilePath',
'repositoryId',
'start',
'status',
'type',
};
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 RunHistoryResponseDto {
/// Returns a new [RunHistoryResponseDto] instance.
RunHistoryResponseDto({
this.runs = const [],
});
List<RunDto> runs;
@override
bool operator ==(Object other) => identical(this, other) || other is RunHistoryResponseDto &&
_deepEquality.equals(other.runs, runs);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(runs.hashCode);
@override
String toString() => 'RunHistoryResponseDto[runs=$runs]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'runs'] = this.runs;
return json;
}
/// Returns a new [RunHistoryResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RunHistoryResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RunHistoryResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RunHistoryResponseDto(
runs: RunDto.listFromJson(json[r'runs']),
);
}
return null;
}
static List<RunHistoryResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunHistoryResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunHistoryResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RunHistoryResponseDto> mapFromJson(dynamic json) {
final map = <String, RunHistoryResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RunHistoryResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RunHistoryResponseDto-objects as value to a dart map
static Map<String, List<RunHistoryResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RunHistoryResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RunHistoryResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'runs',
};
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 RunResponseDto {
/// Returns a new [RunResponseDto] instance.
RunResponseDto({
required this.run,
});
RunDto run;
@override
bool operator ==(Object other) => identical(this, other) || other is RunResponseDto &&
other.run == run;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(run.hashCode);
@override
String toString() => 'RunResponseDto[run=$run]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'run'] = this.run;
return json;
}
/// Returns a new [RunResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RunResponseDto? fromJson(dynamic value) {
upgradeDto(value, "RunResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RunResponseDto(
run: RunDto.fromJson(json[r'run'])!,
);
}
return null;
}
static List<RunResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RunResponseDto> mapFromJson(dynamic json) {
final map = <String, RunResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RunResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RunResponseDto-objects as value to a dart map
static Map<String, List<RunResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RunResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RunResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'run',
};
}
+88
View File
@@ -0,0 +1,88 @@
//
// 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 RunStatus {
/// Instantiate a new enum with the provided [value].
const RunStatus._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const incomplete = RunStatus._(r'incomplete');
static const complete = RunStatus._(r'complete');
static const failed = RunStatus._(r'failed');
/// List of all possible values in this [enum][RunStatus].
static const values = <RunStatus>[
incomplete,
complete,
failed,
];
static RunStatus? fromJson(dynamic value) => RunStatusTypeTransformer().decode(value);
static List<RunStatus> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunStatus>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunStatus.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [RunStatus] to String,
/// and [decode] dynamic data back to [RunStatus].
class RunStatusTypeTransformer {
factory RunStatusTypeTransformer() => _instance ??= const RunStatusTypeTransformer._();
const RunStatusTypeTransformer._();
String encode(RunStatus data) => data.value;
/// Decodes a [dynamic value][data] to a RunStatus.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
RunStatus? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'incomplete': return RunStatus.incomplete;
case r'complete': return RunStatus.complete;
case r'failed': return RunStatus.failed;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [RunStatusTypeTransformer] instance.
static RunStatusTypeTransformer? _instance;
}
+91
View File
@@ -0,0 +1,91 @@
//
// 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 RunType {
/// Instantiate a new enum with the provided [value].
const RunType._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const schedule = RunType._(r'schedule');
static const restore = RunType._(r'restore');
static const backup = RunType._(r'backup');
static const forget = RunType._(r'forget');
/// List of all possible values in this [enum][RunType].
static const values = <RunType>[
schedule,
restore,
backup,
forget,
];
static RunType? fromJson(dynamic value) => RunTypeTypeTransformer().decode(value);
static List<RunType> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunType>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunType.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [RunType] to String,
/// and [decode] dynamic data back to [RunType].
class RunTypeTypeTransformer {
factory RunTypeTypeTransformer() => _instance ??= const RunTypeTypeTransformer._();
const RunTypeTypeTransformer._();
String encode(RunType data) => data.value;
/// Decodes a [dynamic value][data] to a RunType.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
RunType? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'schedule': return RunType.schedule;
case r'restore': return RunType.restore;
case r'backup': return RunType.backup;
case r'forget': return RunType.forget;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [RunTypeTypeTransformer] instance.
static RunTypeTypeTransformer? _instance;
}
+131
View File
@@ -0,0 +1,131 @@
//
// 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 RunningTaskDto {
/// Returns a new [RunningTaskDto] instance.
RunningTaskDto({
this.logId,
required this.parentId,
this.scheduleStatus = const [],
required this.type,
});
///
/// 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? logId;
String parentId;
List<ActiveScheduleItemDto> scheduleStatus;
TaskType type;
@override
bool operator ==(Object other) => identical(this, other) || other is RunningTaskDto &&
other.logId == logId &&
other.parentId == parentId &&
_deepEquality.equals(other.scheduleStatus, scheduleStatus) &&
other.type == type;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(logId == null ? 0 : logId!.hashCode) +
(parentId.hashCode) +
(scheduleStatus.hashCode) +
(type.hashCode);
@override
String toString() => 'RunningTaskDto[logId=$logId, parentId=$parentId, scheduleStatus=$scheduleStatus, type=$type]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.logId != null) {
json[r'logId'] = this.logId;
} else {
// json[r'logId'] = null;
}
json[r'parentId'] = this.parentId;
json[r'scheduleStatus'] = this.scheduleStatus;
json[r'type'] = this.type;
return json;
}
/// Returns a new [RunningTaskDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RunningTaskDto? fromJson(dynamic value) {
upgradeDto(value, "RunningTaskDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RunningTaskDto(
logId: mapValueOfType<String>(json, r'logId'),
parentId: mapValueOfType<String>(json, r'parentId')!,
scheduleStatus: ActiveScheduleItemDto.listFromJson(json[r'scheduleStatus']),
type: TaskType.fromJson(json[r'type'])!,
);
}
return null;
}
static List<RunningTaskDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunningTaskDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunningTaskDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RunningTaskDto> mapFromJson(dynamic json) {
final map = <String, RunningTaskDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RunningTaskDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RunningTaskDto-objects as value to a dart map
static Map<String, List<RunningTaskDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RunningTaskDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RunningTaskDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'parentId',
'type',
};
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 RunningTaskListResponse {
/// Returns a new [RunningTaskListResponse] instance.
RunningTaskListResponse({
this.tasks = const [],
});
List<RunningTaskDto> tasks;
@override
bool operator ==(Object other) => identical(this, other) || other is RunningTaskListResponse &&
_deepEquality.equals(other.tasks, tasks);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(tasks.hashCode);
@override
String toString() => 'RunningTaskListResponse[tasks=$tasks]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'tasks'] = this.tasks;
return json;
}
/// Returns a new [RunningTaskListResponse] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RunningTaskListResponse? fromJson(dynamic value) {
upgradeDto(value, "RunningTaskListResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
return RunningTaskListResponse(
tasks: RunningTaskDto.listFromJson(json[r'tasks']),
);
}
return null;
}
static List<RunningTaskListResponse> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RunningTaskListResponse>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RunningTaskListResponse.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RunningTaskListResponse> mapFromJson(dynamic json) {
final map = <String, RunningTaskListResponse>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RunningTaskListResponse.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RunningTaskListResponse-objects as value to a dart map
static Map<String, List<RunningTaskListResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RunningTaskListResponse>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = RunningTaskListResponse.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'tasks',
};
}
+117
View File
@@ -0,0 +1,117 @@
//
// 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 ScheduleCreateRequestDto {
/// Returns a new [ScheduleCreateRequestDto] instance.
ScheduleCreateRequestDto({
required this.cron,
required this.name,
this.repositories = const [],
});
String cron;
String name;
List<String> repositories;
@override
bool operator ==(Object other) => identical(this, other) || other is ScheduleCreateRequestDto &&
other.cron == cron &&
other.name == name &&
_deepEquality.equals(other.repositories, repositories);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(cron.hashCode) +
(name.hashCode) +
(repositories.hashCode);
@override
String toString() => 'ScheduleCreateRequestDto[cron=$cron, name=$name, repositories=$repositories]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'cron'] = this.cron;
json[r'name'] = this.name;
json[r'repositories'] = this.repositories;
return json;
}
/// Returns a new [ScheduleCreateRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ScheduleCreateRequestDto? fromJson(dynamic value) {
upgradeDto(value, "ScheduleCreateRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ScheduleCreateRequestDto(
cron: mapValueOfType<String>(json, r'cron')!,
name: mapValueOfType<String>(json, r'name')!,
repositories: json[r'repositories'] is Iterable
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<ScheduleCreateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ScheduleCreateRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ScheduleCreateRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ScheduleCreateRequestDto> mapFromJson(dynamic json) {
final map = <String, ScheduleCreateRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ScheduleCreateRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ScheduleCreateRequestDto-objects as value to a dart map
static Map<String, List<ScheduleCreateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ScheduleCreateRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ScheduleCreateRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'cron',
'name',
'repositories',
};
}
@@ -0,0 +1,99 @@
//
// 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 ScheduleCreateResponseDto {
/// Returns a new [ScheduleCreateResponseDto] instance.
ScheduleCreateResponseDto({
required this.schedule,
});
ScheduleDto schedule;
@override
bool operator ==(Object other) => identical(this, other) || other is ScheduleCreateResponseDto &&
other.schedule == schedule;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(schedule.hashCode);
@override
String toString() => 'ScheduleCreateResponseDto[schedule=$schedule]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'schedule'] = this.schedule;
return json;
}
/// Returns a new [ScheduleCreateResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ScheduleCreateResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ScheduleCreateResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ScheduleCreateResponseDto(
schedule: ScheduleDto.fromJson(json[r'schedule'])!,
);
}
return null;
}
static List<ScheduleCreateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ScheduleCreateResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ScheduleCreateResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ScheduleCreateResponseDto> mapFromJson(dynamic json) {
final map = <String, ScheduleCreateResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ScheduleCreateResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ScheduleCreateResponseDto-objects as value to a dart map
static Map<String, List<ScheduleCreateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ScheduleCreateResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ScheduleCreateResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'schedule',
};
}
+167
View File
@@ -0,0 +1,167 @@
//
// 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 ScheduleDto {
/// Returns a new [ScheduleDto] instance.
ScheduleDto({
required this.cron,
required this.id,
this.lastFinished,
this.lastRun,
required this.name,
required this.paused,
this.repositories = const [],
});
String cron;
String id;
///
/// 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? lastFinished;
///
/// 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? lastRun;
String name;
bool paused;
List<String> repositories;
@override
bool operator ==(Object other) => identical(this, other) || other is ScheduleDto &&
other.cron == cron &&
other.id == id &&
other.lastFinished == lastFinished &&
other.lastRun == lastRun &&
other.name == name &&
other.paused == paused &&
_deepEquality.equals(other.repositories, repositories);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(cron.hashCode) +
(id.hashCode) +
(lastFinished == null ? 0 : lastFinished!.hashCode) +
(lastRun == null ? 0 : lastRun!.hashCode) +
(name.hashCode) +
(paused.hashCode) +
(repositories.hashCode);
@override
String toString() => 'ScheduleDto[cron=$cron, id=$id, lastFinished=$lastFinished, lastRun=$lastRun, name=$name, paused=$paused, repositories=$repositories]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'cron'] = this.cron;
json[r'id'] = this.id;
if (this.lastFinished != null) {
json[r'lastFinished'] = this.lastFinished;
} else {
// json[r'lastFinished'] = null;
}
if (this.lastRun != null) {
json[r'lastRun'] = this.lastRun;
} else {
// json[r'lastRun'] = null;
}
json[r'name'] = this.name;
json[r'paused'] = this.paused;
json[r'repositories'] = this.repositories;
return json;
}
/// Returns a new [ScheduleDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ScheduleDto? fromJson(dynamic value) {
upgradeDto(value, "ScheduleDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ScheduleDto(
cron: mapValueOfType<String>(json, r'cron')!,
id: mapValueOfType<String>(json, r'id')!,
lastFinished: mapValueOfType<String>(json, r'lastFinished'),
lastRun: mapValueOfType<String>(json, r'lastRun'),
name: mapValueOfType<String>(json, r'name')!,
paused: mapValueOfType<bool>(json, r'paused')!,
repositories: json[r'repositories'] is Iterable
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<ScheduleDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ScheduleDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ScheduleDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ScheduleDto> mapFromJson(dynamic json) {
final map = <String, ScheduleDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ScheduleDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ScheduleDto-objects as value to a dart map
static Map<String, List<ScheduleDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ScheduleDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ScheduleDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'cron',
'id',
'name',
'paused',
'repositories',
};
}
+99
View File
@@ -0,0 +1,99 @@
//
// 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 ScheduleListResponseDto {
/// Returns a new [ScheduleListResponseDto] instance.
ScheduleListResponseDto({
this.schedules = const [],
});
List<ScheduleDto> schedules;
@override
bool operator ==(Object other) => identical(this, other) || other is ScheduleListResponseDto &&
_deepEquality.equals(other.schedules, schedules);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(schedules.hashCode);
@override
String toString() => 'ScheduleListResponseDto[schedules=$schedules]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'schedules'] = this.schedules;
return json;
}
/// Returns a new [ScheduleListResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ScheduleListResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ScheduleListResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ScheduleListResponseDto(
schedules: ScheduleDto.listFromJson(json[r'schedules']),
);
}
return null;
}
static List<ScheduleListResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ScheduleListResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ScheduleListResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ScheduleListResponseDto> mapFromJson(dynamic json) {
final map = <String, ScheduleListResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ScheduleListResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ScheduleListResponseDto-objects as value to a dart map
static Map<String, List<ScheduleListResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ScheduleListResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ScheduleListResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'schedules',
};
}
+151
View File
@@ -0,0 +1,151 @@
//
// 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 ScheduleUpdateRequestDto {
/// Returns a new [ScheduleUpdateRequestDto] instance.
ScheduleUpdateRequestDto({
this.cron,
this.name,
this.paused,
this.repositories = const [],
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? cron;
///
/// 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? name;
///
/// 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.
///
bool? paused;
List<String> repositories;
@override
bool operator ==(Object other) => identical(this, other) || other is ScheduleUpdateRequestDto &&
other.cron == cron &&
other.name == name &&
other.paused == paused &&
_deepEquality.equals(other.repositories, repositories);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(cron == null ? 0 : cron!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(paused == null ? 0 : paused!.hashCode) +
(repositories.hashCode);
@override
String toString() => 'ScheduleUpdateRequestDto[cron=$cron, name=$name, paused=$paused, repositories=$repositories]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.cron != null) {
json[r'cron'] = this.cron;
} else {
// json[r'cron'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
// json[r'name'] = null;
}
if (this.paused != null) {
json[r'paused'] = this.paused;
} else {
// json[r'paused'] = null;
}
json[r'repositories'] = this.repositories;
return json;
}
/// Returns a new [ScheduleUpdateRequestDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ScheduleUpdateRequestDto? fromJson(dynamic value) {
upgradeDto(value, "ScheduleUpdateRequestDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ScheduleUpdateRequestDto(
cron: mapValueOfType<String>(json, r'cron'),
name: mapValueOfType<String>(json, r'name'),
paused: mapValueOfType<bool>(json, r'paused'),
repositories: json[r'repositories'] is Iterable
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<ScheduleUpdateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ScheduleUpdateRequestDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ScheduleUpdateRequestDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ScheduleUpdateRequestDto> mapFromJson(dynamic json) {
final map = <String, ScheduleUpdateRequestDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ScheduleUpdateRequestDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ScheduleUpdateRequestDto-objects as value to a dart map
static Map<String, List<ScheduleUpdateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ScheduleUpdateRequestDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ScheduleUpdateRequestDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
@@ -0,0 +1,99 @@
//
// 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 ScheduleUpdateResponseDto {
/// Returns a new [ScheduleUpdateResponseDto] instance.
ScheduleUpdateResponseDto({
required this.schedule,
});
ScheduleDto schedule;
@override
bool operator ==(Object other) => identical(this, other) || other is ScheduleUpdateResponseDto &&
other.schedule == schedule;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(schedule.hashCode);
@override
String toString() => 'ScheduleUpdateResponseDto[schedule=$schedule]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'schedule'] = this.schedule;
return json;
}
/// Returns a new [ScheduleUpdateResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ScheduleUpdateResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ScheduleUpdateResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return ScheduleUpdateResponseDto(
schedule: ScheduleDto.fromJson(json[r'schedule'])!,
);
}
return null;
}
static List<ScheduleUpdateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ScheduleUpdateResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ScheduleUpdateResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ScheduleUpdateResponseDto> mapFromJson(dynamic json) {
final map = <String, ScheduleUpdateResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ScheduleUpdateResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ScheduleUpdateResponseDto-objects as value to a dart map
static Map<String, List<ScheduleUpdateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ScheduleUpdateResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ScheduleUpdateResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'schedule',
};
}
+134
View File
@@ -0,0 +1,134 @@
//
// 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 SnapshotDto {
/// Returns a new [SnapshotDto] instance.
SnapshotDto({
required this.id,
this.paths = const [],
this.summary,
required this.time,
});
String id;
List<String> paths;
///
/// 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.
///
SnapshotSummaryDto? summary;
String time;
@override
bool operator ==(Object other) => identical(this, other) || other is SnapshotDto &&
other.id == id &&
_deepEquality.equals(other.paths, paths) &&
other.summary == summary &&
other.time == time;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(paths.hashCode) +
(summary == null ? 0 : summary!.hashCode) +
(time.hashCode);
@override
String toString() => 'SnapshotDto[id=$id, paths=$paths, summary=$summary, time=$time]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'paths'] = this.paths;
if (this.summary != null) {
json[r'summary'] = this.summary;
} else {
// json[r'summary'] = null;
}
json[r'time'] = this.time;
return json;
}
/// Returns a new [SnapshotDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SnapshotDto? fromJson(dynamic value) {
upgradeDto(value, "SnapshotDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return SnapshotDto(
id: mapValueOfType<String>(json, r'id')!,
paths: json[r'paths'] is Iterable
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
: const [],
summary: SnapshotSummaryDto.fromJson(json[r'summary']),
time: mapValueOfType<String>(json, r'time')!,
);
}
return null;
}
static List<SnapshotDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SnapshotDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SnapshotDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SnapshotDto> mapFromJson(dynamic json) {
final map = <String, SnapshotDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SnapshotDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SnapshotDto-objects as value to a dart map
static Map<String, List<SnapshotDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SnapshotDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SnapshotDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'paths',
'time',
};
}
+139
View File
@@ -0,0 +1,139 @@
//
// 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 SnapshotSummaryDto {
/// Returns a new [SnapshotSummaryDto] instance.
SnapshotSummaryDto({
required this.dataAdded,
required this.filesChanged,
required this.filesNew,
required this.filesUnmodified,
required this.totalBytes,
required this.totalFiles,
});
num dataAdded;
num filesChanged;
num filesNew;
num filesUnmodified;
num totalBytes;
num totalFiles;
@override
bool operator ==(Object other) => identical(this, other) || other is SnapshotSummaryDto &&
other.dataAdded == dataAdded &&
other.filesChanged == filesChanged &&
other.filesNew == filesNew &&
other.filesUnmodified == filesUnmodified &&
other.totalBytes == totalBytes &&
other.totalFiles == totalFiles;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(dataAdded.hashCode) +
(filesChanged.hashCode) +
(filesNew.hashCode) +
(filesUnmodified.hashCode) +
(totalBytes.hashCode) +
(totalFiles.hashCode);
@override
String toString() => 'SnapshotSummaryDto[dataAdded=$dataAdded, filesChanged=$filesChanged, filesNew=$filesNew, filesUnmodified=$filesUnmodified, totalBytes=$totalBytes, totalFiles=$totalFiles]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'dataAdded'] = this.dataAdded;
json[r'filesChanged'] = this.filesChanged;
json[r'filesNew'] = this.filesNew;
json[r'filesUnmodified'] = this.filesUnmodified;
json[r'totalBytes'] = this.totalBytes;
json[r'totalFiles'] = this.totalFiles;
return json;
}
/// Returns a new [SnapshotSummaryDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SnapshotSummaryDto? fromJson(dynamic value) {
upgradeDto(value, "SnapshotSummaryDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return SnapshotSummaryDto(
dataAdded: num.parse('${json[r'dataAdded']}'),
filesChanged: num.parse('${json[r'filesChanged']}'),
filesNew: num.parse('${json[r'filesNew']}'),
filesUnmodified: num.parse('${json[r'filesUnmodified']}'),
totalBytes: num.parse('${json[r'totalBytes']}'),
totalFiles: num.parse('${json[r'totalFiles']}'),
);
}
return null;
}
static List<SnapshotSummaryDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SnapshotSummaryDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SnapshotSummaryDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SnapshotSummaryDto> mapFromJson(dynamic json) {
final map = <String, SnapshotSummaryDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SnapshotSummaryDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SnapshotSummaryDto-objects as value to a dart map
static Map<String, List<SnapshotSummaryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SnapshotSummaryDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SnapshotSummaryDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'dataAdded',
'filesChanged',
'filesNew',
'filesUnmodified',
'totalBytes',
'totalFiles',
};
}
+88
View File
@@ -0,0 +1,88 @@
//
// 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 TaskStatus {
/// Instantiate a new enum with the provided [value].
const TaskStatus._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const incomplete = TaskStatus._(r'incomplete');
static const complete = TaskStatus._(r'complete');
static const failed = TaskStatus._(r'failed');
/// List of all possible values in this [enum][TaskStatus].
static const values = <TaskStatus>[
incomplete,
complete,
failed,
];
static TaskStatus? fromJson(dynamic value) => TaskStatusTypeTransformer().decode(value);
static List<TaskStatus> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TaskStatus>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TaskStatus.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [TaskStatus] to String,
/// and [decode] dynamic data back to [TaskStatus].
class TaskStatusTypeTransformer {
factory TaskStatusTypeTransformer() => _instance ??= const TaskStatusTypeTransformer._();
const TaskStatusTypeTransformer._();
String encode(TaskStatus data) => data.value;
/// Decodes a [dynamic value][data] to a TaskStatus.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
TaskStatus? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'incomplete': return TaskStatus.incomplete;
case r'complete': return TaskStatus.complete;
case r'failed': return TaskStatus.failed;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [TaskStatusTypeTransformer] instance.
static TaskStatusTypeTransformer? _instance;
}
+91
View File
@@ -0,0 +1,91 @@
//
// 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 TaskType {
/// Instantiate a new enum with the provided [value].
const TaskType._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const schedule = TaskType._(r'schedule');
static const restore = TaskType._(r'restore');
static const backup = TaskType._(r'backup');
static const forget = TaskType._(r'forget');
/// List of all possible values in this [enum][TaskType].
static const values = <TaskType>[
schedule,
restore,
backup,
forget,
];
static TaskType? fromJson(dynamic value) => TaskTypeTypeTransformer().decode(value);
static List<TaskType> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TaskType>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TaskType.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [TaskType] to String,
/// and [decode] dynamic data back to [TaskType].
class TaskTypeTypeTransformer {
factory TaskTypeTypeTransformer() => _instance ??= const TaskTypeTypeTransformer._();
const TaskTypeTypeTransformer._();
String encode(TaskType data) => data.value;
/// Decodes a [dynamic value][data] to a TaskType.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
TaskType? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'schedule': return TaskType.schedule;
case r'restore': return TaskType.restore;
case r'backup': return TaskType.backup;
case r'forget': return TaskType.forget;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [TaskTypeTypeTransformer] instance.
static TaskTypeTypeTransformer? _instance;
}
File diff suppressed because it is too large Load Diff
-1771
View File
File diff suppressed because it is too large Load Diff
-25
View File
@@ -1,25 +0,0 @@
export declare enum WorkflowTrigger {
AssetCreate = "AssetCreate",
PersonRecognized = "PersonRecognized"
}
export declare enum WorkflowType {
AssetV1 = "AssetV1",
AssetPersonV1 = "AssetPersonV1"
}
export declare enum AssetType {
Image = "IMAGE",
Video = "VIDEO",
Audio = "AUDIO",
Other = "OTHER"
}
export declare enum AssetStatus {
Active = "active",
Trashed = "trashed",
Deleted = "deleted"
}
export declare enum AssetVisibility {
Archive = "archive",
Timeline = "timeline",
Hidden = "hidden",
Locked = "locked"
}
-22
View File
@@ -1,22 +0,0 @@
import { getAllAlbums, type AlbumResponseDto, type BulkIdResponseDto, type CreateAlbumDto } from '@immich/sdk';
declare module 'extism:host' {
interface user {
searchAlbums(ptr: PTR): I64;
createAlbum(ptr: PTR): I64;
addAssetsToAlbum(ptr: PTR): I64;
addAssetsToAlbums(ptr: PTR): I64;
}
}
type AlbumsToAssets = {
assetIds: string[];
albumIds: string[];
};
type QueryParams<T extends (...args: any) => any> = Parameters<T>[0];
type AlbumSearchDto = QueryParams<typeof getAllAlbums>;
export declare const hostFunctions: (authToken: string) => {
searchAlbums: (dto: AlbumSearchDto) => AlbumResponseDto[];
createAlbum: (dto: CreateAlbumDto) => AlbumResponseDto;
addAssetsToAlbum: (albumId: string, assetIds: string[]) => BulkIdResponseDto[];
addAssetsToAlbums: ({ assetIds, albumIds }: AlbumsToAssets) => unknown;
};
export {};
-3
View File
@@ -1,3 +0,0 @@
export * from './host-functions.js';
export * from './sdk.js';
export * from './types.js';
-870
View File
@@ -1,870 +0,0 @@
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
// ../../node_modules/.pnpm/@oazapfts+runtime@1.2.0/node_modules/@oazapfts/runtime/util.js
var a = [encodeURIComponent, encodeURIComponent];
function d(e, t2 = ",") {
const o2 = (n, r) => {
const c = e[r % e.length];
return typeof n > "u" ? "" : typeof n == "object" ? Array.isArray(n) ? n.map(c).join(t2) : Object.entries(n).reduce(
(i, f) => [...i, ...f],
[]
).map(c).join(t2) : c(l(n));
};
return (n, ...r) => n.reduce((c, u, i) => `${c}${u}${o2(r[i], i)}`, "");
}
function R(e = ",") {
return (t2, o2 = a) => Object.entries(t2).filter(([, n]) => n !== void 0).map(([n, r]) => d(o2, e)`${n}=${r}`).join("&");
}
function j(...e) {
return e.filter(Boolean).map((t2, o2) => o2 === 0 ? t2 : t2.replace(/^\/+/, "")).map((t2, o2, n) => o2 === n.length - 1 ? t2 : t2.replace(/\/+$/, "")).join("/");
}
function l(e) {
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : String(e);
}
// ../../node_modules/.pnpm/@oazapfts+runtime@1.2.0/node_modules/@oazapfts/runtime/query.js
var A = R();
var O = R("|");
var g = R("%20");
// ../../node_modules/.pnpm/@oazapfts+runtime@1.2.0/node_modules/@oazapfts/runtime/headers.js
function o(e, r) {
const n = t(e);
return t(r).forEach((i, s2) => {
n.set(s2, i);
}), n;
}
function t(e) {
return e && !(e instanceof Headers) && !Array.isArray(e) ? new Headers(
Object.fromEntries(
Object.entries(e).filter(([, r]) => r != null).map(([r, n]) => [r, String(n)])
)
) : new Headers(e);
}
// ../../node_modules/.pnpm/@oazapfts+runtime@1.2.0/node_modules/@oazapfts/runtime/index.js
function D(a2 = {}) {
async function r(e, n) {
const t2 = await p(e, n);
let s2;
try {
s2 = await t2.text();
} catch {
}
return {
status: t2.status,
headers: t2.headers,
contentType: t2.headers.get("content-type"),
data: s2
};
}
async function i(e, n = {}) {
const { status: t2, headers: s2, contentType: u, data: c } = await r(e, {
...n,
headers: o(
{
Accept: "application/json"
},
n.headers
)
});
return (u ? u.includes("json") : false) ? {
status: t2,
headers: s2,
data: c ? JSON.parse(c) : null
} : { status: t2, headers: s2, data: c };
}
async function f(e, n = {}) {
const t2 = await p(e, n);
let s2;
try {
s2 = await t2.blob();
} catch {
}
return { status: t2.status, headers: t2.headers, data: s2 };
}
async function p(e, n = {}) {
const {
baseUrl: t2,
fetch: s2,
...u
} = {
...a2,
...n,
headers: o(a2.headers, n.headers)
}, c = j(t2, e);
return await (s2 || fetch)(c, u);
}
return {
ok: y,
fetchText: r,
fetchJson: i,
fetchBlob: f,
mergeHeaders: o,
json({ body: e, headers: n, ...t2 }) {
return {
...t2,
...e != null && { body: JSON.stringify(e) },
headers: o(
{
"Content-Type": "application/json"
},
n
)
};
},
form({ body: e, headers: n, ...t2 }) {
return {
...t2,
...e != null && { body: A(e) },
headers: o(
{
"Content-Type": "application/x-www-form-urlencoded"
},
n
)
};
},
multipart({ body: e, headers: n, ...t2 }) {
if (e == null)
return { ...t2, body: e, headers: t(n) };
const s2 = new (t2.FormData || t2.formDataConstructor || a2.FormData || a2.formDataConstructor || FormData)(), u = (c, o2) => {
typeof o2 == "string" || o2 instanceof Blob ? s2.append(c, o2) : typeof o2 == "number" || typeof o2 == "boolean" ? s2.append(c, String(o2)) : s2.append(
c,
new Blob([JSON.stringify(o2)], { type: "application/json" })
);
};
return Object.entries(e).forEach(([c, o2]) => {
Array.isArray(o2) ? o2.forEach((m) => u(c, m)) : u(c, o2);
}), {
...t2,
body: s2,
headers: t(n)
};
}
};
}
var j2 = [200, 201, 202, 204];
async function y(a2) {
const r = await a2;
if (j2.some((i) => i == r.status)) return r.data;
throw new l2(r.status, r.data, r.headers);
}
var l2 = class extends Error {
constructor(r, i, f) {
super(`Error: ${r}`);
__publicField(this, "status");
__publicField(this, "data");
__publicField(this, "headers");
this.status = r, this.data = i, this.headers = f;
}
};
// ../sdk/build/fetch-client.js
var defaults = {
headers: {},
baseUrl: "/api"
};
var oazapfts = D(defaults);
var ReactionLevel;
(function(ReactionLevel2) {
ReactionLevel2["Album"] = "album";
ReactionLevel2["Asset"] = "asset";
})(ReactionLevel || (ReactionLevel = {}));
var ReactionType;
(function(ReactionType2) {
ReactionType2["Comment"] = "comment";
ReactionType2["Like"] = "like";
})(ReactionType || (ReactionType = {}));
var UserAvatarColor;
(function(UserAvatarColor2) {
UserAvatarColor2["Primary"] = "primary";
UserAvatarColor2["Pink"] = "pink";
UserAvatarColor2["Red"] = "red";
UserAvatarColor2["Yellow"] = "yellow";
UserAvatarColor2["Blue"] = "blue";
UserAvatarColor2["Green"] = "green";
UserAvatarColor2["Purple"] = "purple";
UserAvatarColor2["Orange"] = "orange";
UserAvatarColor2["Gray"] = "gray";
UserAvatarColor2["Amber"] = "amber";
})(UserAvatarColor || (UserAvatarColor = {}));
var MaintenanceAction;
(function(MaintenanceAction2) {
MaintenanceAction2["Start"] = "start";
MaintenanceAction2["End"] = "end";
MaintenanceAction2["SelectDatabaseRestore"] = "select_database_restore";
MaintenanceAction2["RestoreDatabase"] = "restore_database";
})(MaintenanceAction || (MaintenanceAction = {}));
var StorageFolder;
(function(StorageFolder2) {
StorageFolder2["EncodedVideo"] = "encoded-video";
StorageFolder2["Library"] = "library";
StorageFolder2["Upload"] = "upload";
StorageFolder2["Profile"] = "profile";
StorageFolder2["Thumbs"] = "thumbs";
StorageFolder2["Backups"] = "backups";
})(StorageFolder || (StorageFolder = {}));
var NotificationLevel;
(function(NotificationLevel2) {
NotificationLevel2["Success"] = "success";
NotificationLevel2["Error"] = "error";
NotificationLevel2["Warning"] = "warning";
NotificationLevel2["Info"] = "info";
})(NotificationLevel || (NotificationLevel = {}));
var NotificationType;
(function(NotificationType2) {
NotificationType2["JobFailed"] = "JobFailed";
NotificationType2["BackupFailed"] = "BackupFailed";
NotificationType2["SystemMessage"] = "SystemMessage";
NotificationType2["AlbumInvite"] = "AlbumInvite";
NotificationType2["AlbumUpdate"] = "AlbumUpdate";
NotificationType2["Custom"] = "Custom";
})(NotificationType || (NotificationType = {}));
var UserStatus;
(function(UserStatus2) {
UserStatus2["Active"] = "active";
UserStatus2["Removing"] = "removing";
UserStatus2["Deleted"] = "deleted";
})(UserStatus || (UserStatus = {}));
var AssetOrder;
(function(AssetOrder2) {
AssetOrder2["Asc"] = "asc";
AssetOrder2["Desc"] = "desc";
})(AssetOrder || (AssetOrder = {}));
var AssetVisibility;
(function(AssetVisibility2) {
AssetVisibility2["Archive"] = "archive";
AssetVisibility2["Timeline"] = "timeline";
AssetVisibility2["Hidden"] = "hidden";
AssetVisibility2["Locked"] = "locked";
})(AssetVisibility || (AssetVisibility = {}));
var AlbumUserRole;
(function(AlbumUserRole2) {
AlbumUserRole2["Editor"] = "editor";
AlbumUserRole2["Owner"] = "owner";
AlbumUserRole2["Viewer"] = "viewer";
})(AlbumUserRole || (AlbumUserRole = {}));
var BulkIdErrorReason;
(function(BulkIdErrorReason2) {
BulkIdErrorReason2["Duplicate"] = "duplicate";
BulkIdErrorReason2["NoPermission"] = "no_permission";
BulkIdErrorReason2["NotFound"] = "not_found";
BulkIdErrorReason2["Unknown"] = "unknown";
BulkIdErrorReason2["Validation"] = "validation";
})(BulkIdErrorReason || (BulkIdErrorReason = {}));
var Permission;
(function(Permission2) {
Permission2["All"] = "all";
Permission2["ActivityCreate"] = "activity.create";
Permission2["ActivityRead"] = "activity.read";
Permission2["ActivityUpdate"] = "activity.update";
Permission2["ActivityDelete"] = "activity.delete";
Permission2["ActivityStatistics"] = "activity.statistics";
Permission2["ApiKeyCreate"] = "apiKey.create";
Permission2["ApiKeyRead"] = "apiKey.read";
Permission2["ApiKeyUpdate"] = "apiKey.update";
Permission2["ApiKeyDelete"] = "apiKey.delete";
Permission2["AssetRead"] = "asset.read";
Permission2["AssetUpdate"] = "asset.update";
Permission2["AssetDelete"] = "asset.delete";
Permission2["AssetStatistics"] = "asset.statistics";
Permission2["AssetShare"] = "asset.share";
Permission2["AssetView"] = "asset.view";
Permission2["AssetDownload"] = "asset.download";
Permission2["AssetUpload"] = "asset.upload";
Permission2["AssetCopy"] = "asset.copy";
Permission2["AssetDerive"] = "asset.derive";
Permission2["AssetEditGet"] = "asset.edit.get";
Permission2["AssetEditCreate"] = "asset.edit.create";
Permission2["AssetEditDelete"] = "asset.edit.delete";
Permission2["AlbumCreate"] = "album.create";
Permission2["AlbumRead"] = "album.read";
Permission2["AlbumUpdate"] = "album.update";
Permission2["AlbumDelete"] = "album.delete";
Permission2["AlbumStatistics"] = "album.statistics";
Permission2["AlbumShare"] = "album.share";
Permission2["AlbumDownload"] = "album.download";
Permission2["AlbumAssetCreate"] = "albumAsset.create";
Permission2["AlbumAssetDelete"] = "albumAsset.delete";
Permission2["AlbumUserCreate"] = "albumUser.create";
Permission2["AlbumUserUpdate"] = "albumUser.update";
Permission2["AlbumUserDelete"] = "albumUser.delete";
Permission2["AuthChangePassword"] = "auth.changePassword";
Permission2["AuthDeviceDelete"] = "authDevice.delete";
Permission2["ArchiveRead"] = "archive.read";
Permission2["BackupList"] = "backup.list";
Permission2["BackupDownload"] = "backup.download";
Permission2["BackupUpload"] = "backup.upload";
Permission2["BackupDelete"] = "backup.delete";
Permission2["DuplicateRead"] = "duplicate.read";
Permission2["DuplicateDelete"] = "duplicate.delete";
Permission2["FaceCreate"] = "face.create";
Permission2["FaceRead"] = "face.read";
Permission2["FaceUpdate"] = "face.update";
Permission2["FaceDelete"] = "face.delete";
Permission2["FolderRead"] = "folder.read";
Permission2["JobCreate"] = "job.create";
Permission2["JobRead"] = "job.read";
Permission2["LibraryCreate"] = "library.create";
Permission2["LibraryRead"] = "library.read";
Permission2["LibraryUpdate"] = "library.update";
Permission2["LibraryDelete"] = "library.delete";
Permission2["LibraryStatistics"] = "library.statistics";
Permission2["TimelineRead"] = "timeline.read";
Permission2["TimelineDownload"] = "timeline.download";
Permission2["Maintenance"] = "maintenance";
Permission2["MapRead"] = "map.read";
Permission2["MapSearch"] = "map.search";
Permission2["MemoryCreate"] = "memory.create";
Permission2["MemoryRead"] = "memory.read";
Permission2["MemoryUpdate"] = "memory.update";
Permission2["MemoryDelete"] = "memory.delete";
Permission2["MemoryStatistics"] = "memory.statistics";
Permission2["MemoryAssetCreate"] = "memoryAsset.create";
Permission2["MemoryAssetDelete"] = "memoryAsset.delete";
Permission2["NotificationCreate"] = "notification.create";
Permission2["NotificationRead"] = "notification.read";
Permission2["NotificationUpdate"] = "notification.update";
Permission2["NotificationDelete"] = "notification.delete";
Permission2["PartnerCreate"] = "partner.create";
Permission2["PartnerRead"] = "partner.read";
Permission2["PartnerUpdate"] = "partner.update";
Permission2["PartnerDelete"] = "partner.delete";
Permission2["PersonCreate"] = "person.create";
Permission2["PersonRead"] = "person.read";
Permission2["PersonUpdate"] = "person.update";
Permission2["PersonDelete"] = "person.delete";
Permission2["PersonStatistics"] = "person.statistics";
Permission2["PersonMerge"] = "person.merge";
Permission2["PersonReassign"] = "person.reassign";
Permission2["PinCodeCreate"] = "pinCode.create";
Permission2["PinCodeUpdate"] = "pinCode.update";
Permission2["PinCodeDelete"] = "pinCode.delete";
Permission2["PluginCreate"] = "plugin.create";
Permission2["PluginRead"] = "plugin.read";
Permission2["PluginUpdate"] = "plugin.update";
Permission2["PluginDelete"] = "plugin.delete";
Permission2["ServerAbout"] = "server.about";
Permission2["ServerApkLinks"] = "server.apkLinks";
Permission2["ServerStorage"] = "server.storage";
Permission2["ServerStatistics"] = "server.statistics";
Permission2["ServerVersionCheck"] = "server.versionCheck";
Permission2["ServerLicenseRead"] = "serverLicense.read";
Permission2["ServerLicenseUpdate"] = "serverLicense.update";
Permission2["ServerLicenseDelete"] = "serverLicense.delete";
Permission2["SessionCreate"] = "session.create";
Permission2["SessionRead"] = "session.read";
Permission2["SessionUpdate"] = "session.update";
Permission2["SessionDelete"] = "session.delete";
Permission2["SessionLock"] = "session.lock";
Permission2["SharedLinkCreate"] = "sharedLink.create";
Permission2["SharedLinkRead"] = "sharedLink.read";
Permission2["SharedLinkUpdate"] = "sharedLink.update";
Permission2["SharedLinkDelete"] = "sharedLink.delete";
Permission2["StackCreate"] = "stack.create";
Permission2["StackRead"] = "stack.read";
Permission2["StackUpdate"] = "stack.update";
Permission2["StackDelete"] = "stack.delete";
Permission2["SyncStream"] = "sync.stream";
Permission2["SyncCheckpointRead"] = "syncCheckpoint.read";
Permission2["SyncCheckpointUpdate"] = "syncCheckpoint.update";
Permission2["SyncCheckpointDelete"] = "syncCheckpoint.delete";
Permission2["SystemConfigRead"] = "systemConfig.read";
Permission2["SystemConfigUpdate"] = "systemConfig.update";
Permission2["SystemMetadataRead"] = "systemMetadata.read";
Permission2["SystemMetadataUpdate"] = "systemMetadata.update";
Permission2["TagCreate"] = "tag.create";
Permission2["TagRead"] = "tag.read";
Permission2["TagUpdate"] = "tag.update";
Permission2["TagDelete"] = "tag.delete";
Permission2["TagAsset"] = "tag.asset";
Permission2["UserRead"] = "user.read";
Permission2["UserUpdate"] = "user.update";
Permission2["UserLicenseCreate"] = "userLicense.create";
Permission2["UserLicenseRead"] = "userLicense.read";
Permission2["UserLicenseUpdate"] = "userLicense.update";
Permission2["UserLicenseDelete"] = "userLicense.delete";
Permission2["UserOnboardingRead"] = "userOnboarding.read";
Permission2["UserOnboardingUpdate"] = "userOnboarding.update";
Permission2["UserOnboardingDelete"] = "userOnboarding.delete";
Permission2["UserPreferenceRead"] = "userPreference.read";
Permission2["UserPreferenceUpdate"] = "userPreference.update";
Permission2["UserProfileImageCreate"] = "userProfileImage.create";
Permission2["UserProfileImageRead"] = "userProfileImage.read";
Permission2["UserProfileImageUpdate"] = "userProfileImage.update";
Permission2["UserProfileImageDelete"] = "userProfileImage.delete";
Permission2["QueueRead"] = "queue.read";
Permission2["QueueUpdate"] = "queue.update";
Permission2["QueueJobCreate"] = "queueJob.create";
Permission2["QueueJobRead"] = "queueJob.read";
Permission2["QueueJobUpdate"] = "queueJob.update";
Permission2["QueueJobDelete"] = "queueJob.delete";
Permission2["WorkflowCreate"] = "workflow.create";
Permission2["WorkflowRead"] = "workflow.read";
Permission2["WorkflowUpdate"] = "workflow.update";
Permission2["WorkflowDelete"] = "workflow.delete";
Permission2["AdminUserCreate"] = "adminUser.create";
Permission2["AdminUserRead"] = "adminUser.read";
Permission2["AdminUserUpdate"] = "adminUser.update";
Permission2["AdminUserDelete"] = "adminUser.delete";
Permission2["AdminSessionRead"] = "adminSession.read";
Permission2["AdminAuthUnlinkAll"] = "adminAuth.unlinkAll";
})(Permission || (Permission = {}));
var AssetMediaStatus;
(function(AssetMediaStatus2) {
AssetMediaStatus2["Created"] = "created";
AssetMediaStatus2["Duplicate"] = "duplicate";
})(AssetMediaStatus || (AssetMediaStatus = {}));
var AssetUploadAction;
(function(AssetUploadAction2) {
AssetUploadAction2["Accept"] = "accept";
AssetUploadAction2["Reject"] = "reject";
})(AssetUploadAction || (AssetUploadAction = {}));
var AssetRejectReason;
(function(AssetRejectReason2) {
AssetRejectReason2["Duplicate"] = "duplicate";
AssetRejectReason2["UnsupportedFormat"] = "unsupported-format";
})(AssetRejectReason || (AssetRejectReason = {}));
var AssetJobName;
(function(AssetJobName2) {
AssetJobName2["RefreshFaces"] = "refresh-faces";
AssetJobName2["RefreshMetadata"] = "refresh-metadata";
AssetJobName2["RegenerateThumbnail"] = "regenerate-thumbnail";
AssetJobName2["TranscodeVideo"] = "transcode-video";
})(AssetJobName || (AssetJobName = {}));
var AssetTypeEnum;
(function(AssetTypeEnum2) {
AssetTypeEnum2["Image"] = "IMAGE";
AssetTypeEnum2["Video"] = "VIDEO";
AssetTypeEnum2["Audio"] = "AUDIO";
AssetTypeEnum2["Other"] = "OTHER";
})(AssetTypeEnum || (AssetTypeEnum = {}));
var AssetEditAction;
(function(AssetEditAction2) {
AssetEditAction2["Crop"] = "crop";
AssetEditAction2["Rotate"] = "rotate";
AssetEditAction2["Mirror"] = "mirror";
})(AssetEditAction || (AssetEditAction = {}));
var MirrorAxis;
(function(MirrorAxis2) {
MirrorAxis2["Horizontal"] = "horizontal";
MirrorAxis2["Vertical"] = "vertical";
})(MirrorAxis || (MirrorAxis = {}));
var AssetMediaSize;
(function(AssetMediaSize2) {
AssetMediaSize2["Original"] = "original";
AssetMediaSize2["Fullsize"] = "fullsize";
AssetMediaSize2["Preview"] = "preview";
AssetMediaSize2["Thumbnail"] = "thumbnail";
})(AssetMediaSize || (AssetMediaSize = {}));
var SourceType;
(function(SourceType2) {
SourceType2["MachineLearning"] = "machine-learning";
SourceType2["Exif"] = "exif";
SourceType2["Manual"] = "manual";
})(SourceType || (SourceType = {}));
var ManualJobName;
(function(ManualJobName2) {
ManualJobName2["PersonCleanup"] = "person-cleanup";
ManualJobName2["TagCleanup"] = "tag-cleanup";
ManualJobName2["UserCleanup"] = "user-cleanup";
ManualJobName2["MemoryCleanup"] = "memory-cleanup";
ManualJobName2["MemoryCreate"] = "memory-create";
ManualJobName2["BackupDatabase"] = "backup-database";
})(ManualJobName || (ManualJobName = {}));
var QueueName;
(function(QueueName2) {
QueueName2["ThumbnailGeneration"] = "thumbnailGeneration";
QueueName2["MetadataExtraction"] = "metadataExtraction";
QueueName2["VideoConversion"] = "videoConversion";
QueueName2["FaceDetection"] = "faceDetection";
QueueName2["FacialRecognition"] = "facialRecognition";
QueueName2["SmartSearch"] = "smartSearch";
QueueName2["DuplicateDetection"] = "duplicateDetection";
QueueName2["BackgroundTask"] = "backgroundTask";
QueueName2["StorageTemplateMigration"] = "storageTemplateMigration";
QueueName2["Migration"] = "migration";
QueueName2["Search"] = "search";
QueueName2["Sidecar"] = "sidecar";
QueueName2["Library"] = "library";
QueueName2["Notifications"] = "notifications";
QueueName2["BackupDatabase"] = "backupDatabase";
QueueName2["Ocr"] = "ocr";
QueueName2["Workflow"] = "workflow";
QueueName2["Editor"] = "editor";
})(QueueName || (QueueName = {}));
var QueueCommand;
(function(QueueCommand2) {
QueueCommand2["Start"] = "start";
QueueCommand2["Pause"] = "pause";
QueueCommand2["Resume"] = "resume";
QueueCommand2["Empty"] = "empty";
QueueCommand2["ClearFailed"] = "clear-failed";
})(QueueCommand || (QueueCommand = {}));
var MemorySearchOrder;
(function(MemorySearchOrder2) {
MemorySearchOrder2["Asc"] = "asc";
MemorySearchOrder2["Desc"] = "desc";
MemorySearchOrder2["Random"] = "random";
})(MemorySearchOrder || (MemorySearchOrder = {}));
var MemoryType;
(function(MemoryType2) {
MemoryType2["OnThisDay"] = "on_this_day";
})(MemoryType || (MemoryType = {}));
var PartnerDirection;
(function(PartnerDirection2) {
PartnerDirection2["SharedBy"] = "shared-by";
PartnerDirection2["SharedWith"] = "shared-with";
})(PartnerDirection || (PartnerDirection = {}));
var WorkflowType;
(function(WorkflowType2) {
WorkflowType2["AssetV1"] = "AssetV1";
WorkflowType2["AssetPersonV1"] = "AssetPersonV1";
})(WorkflowType || (WorkflowType = {}));
var WorkflowTrigger;
(function(WorkflowTrigger3) {
WorkflowTrigger3["AssetCreate"] = "AssetCreate";
WorkflowTrigger3["AssetMetadataExtraction"] = "AssetMetadataExtraction";
WorkflowTrigger3["PersonRecognized"] = "PersonRecognized";
})(WorkflowTrigger || (WorkflowTrigger = {}));
var QueueJobStatus;
(function(QueueJobStatus2) {
QueueJobStatus2["Active"] = "active";
QueueJobStatus2["Failed"] = "failed";
QueueJobStatus2["Completed"] = "completed";
QueueJobStatus2["Delayed"] = "delayed";
QueueJobStatus2["Waiting"] = "waiting";
QueueJobStatus2["Paused"] = "paused";
})(QueueJobStatus || (QueueJobStatus = {}));
var JobName;
(function(JobName2) {
JobName2["AssetDelete"] = "AssetDelete";
JobName2["AssetDeleteCheck"] = "AssetDeleteCheck";
JobName2["AssetDetectFacesQueueAll"] = "AssetDetectFacesQueueAll";
JobName2["AssetDetectFaces"] = "AssetDetectFaces";
JobName2["AssetDetectDuplicatesQueueAll"] = "AssetDetectDuplicatesQueueAll";
JobName2["AssetDetectDuplicates"] = "AssetDetectDuplicates";
JobName2["AssetEditThumbnailGeneration"] = "AssetEditThumbnailGeneration";
JobName2["AssetEncodeVideoQueueAll"] = "AssetEncodeVideoQueueAll";
JobName2["AssetEncodeVideo"] = "AssetEncodeVideo";
JobName2["AssetEmptyTrash"] = "AssetEmptyTrash";
JobName2["AssetExtractMetadataQueueAll"] = "AssetExtractMetadataQueueAll";
JobName2["AssetExtractMetadata"] = "AssetExtractMetadata";
JobName2["AssetFileMigration"] = "AssetFileMigration";
JobName2["AssetGenerateThumbnailsQueueAll"] = "AssetGenerateThumbnailsQueueAll";
JobName2["AssetGenerateThumbnails"] = "AssetGenerateThumbnails";
JobName2["AuditTableCleanup"] = "AuditTableCleanup";
JobName2["DatabaseBackup"] = "DatabaseBackup";
JobName2["FacialRecognitionQueueAll"] = "FacialRecognitionQueueAll";
JobName2["FacialRecognition"] = "FacialRecognition";
JobName2["FileDelete"] = "FileDelete";
JobName2["FileMigrationQueueAll"] = "FileMigrationQueueAll";
JobName2["LibraryDeleteCheck"] = "LibraryDeleteCheck";
JobName2["LibraryDelete"] = "LibraryDelete";
JobName2["LibraryRemoveAsset"] = "LibraryRemoveAsset";
JobName2["LibraryScanAssetsQueueAll"] = "LibraryScanAssetsQueueAll";
JobName2["LibrarySyncAssets"] = "LibrarySyncAssets";
JobName2["LibrarySyncFilesQueueAll"] = "LibrarySyncFilesQueueAll";
JobName2["LibrarySyncFiles"] = "LibrarySyncFiles";
JobName2["LibraryScanQueueAll"] = "LibraryScanQueueAll";
JobName2["MemoryCleanup"] = "MemoryCleanup";
JobName2["MemoryGenerate"] = "MemoryGenerate";
JobName2["NotificationsCleanup"] = "NotificationsCleanup";
JobName2["NotifyUserSignup"] = "NotifyUserSignup";
JobName2["NotifyAlbumInvite"] = "NotifyAlbumInvite";
JobName2["NotifyAlbumUpdate"] = "NotifyAlbumUpdate";
JobName2["UserDelete"] = "UserDelete";
JobName2["UserDeleteCheck"] = "UserDeleteCheck";
JobName2["UserSyncUsage"] = "UserSyncUsage";
JobName2["PersonCleanup"] = "PersonCleanup";
JobName2["PersonFileMigration"] = "PersonFileMigration";
JobName2["PersonGenerateThumbnail"] = "PersonGenerateThumbnail";
JobName2["SessionCleanup"] = "SessionCleanup";
JobName2["SendMail"] = "SendMail";
JobName2["SidecarQueueAll"] = "SidecarQueueAll";
JobName2["SidecarCheck"] = "SidecarCheck";
JobName2["SidecarWrite"] = "SidecarWrite";
JobName2["SmartSearchQueueAll"] = "SmartSearchQueueAll";
JobName2["SmartSearch"] = "SmartSearch";
JobName2["StorageTemplateMigration"] = "StorageTemplateMigration";
JobName2["StorageTemplateMigrationSingle"] = "StorageTemplateMigrationSingle";
JobName2["TagCleanup"] = "TagCleanup";
JobName2["VersionCheck"] = "VersionCheck";
JobName2["OcrQueueAll"] = "OcrQueueAll";
JobName2["Ocr"] = "Ocr";
JobName2["WorkflowAssetTrigger"] = "WorkflowAssetTrigger";
})(JobName || (JobName = {}));
var SearchSuggestionType;
(function(SearchSuggestionType2) {
SearchSuggestionType2["Country"] = "country";
SearchSuggestionType2["State"] = "state";
SearchSuggestionType2["City"] = "city";
SearchSuggestionType2["CameraMake"] = "camera-make";
SearchSuggestionType2["CameraModel"] = "camera-model";
SearchSuggestionType2["CameraLensModel"] = "camera-lens-model";
})(SearchSuggestionType || (SearchSuggestionType = {}));
var SharedLinkType;
(function(SharedLinkType2) {
SharedLinkType2["Album"] = "ALBUM";
SharedLinkType2["Individual"] = "INDIVIDUAL";
})(SharedLinkType || (SharedLinkType = {}));
var AssetIdErrorReason;
(function(AssetIdErrorReason2) {
AssetIdErrorReason2["Duplicate"] = "duplicate";
AssetIdErrorReason2["NoPermission"] = "no_permission";
AssetIdErrorReason2["NotFound"] = "not_found";
})(AssetIdErrorReason || (AssetIdErrorReason = {}));
var SyncEntityType;
(function(SyncEntityType2) {
SyncEntityType2["AuthUserV1"] = "AuthUserV1";
SyncEntityType2["UserV1"] = "UserV1";
SyncEntityType2["UserDeleteV1"] = "UserDeleteV1";
SyncEntityType2["AssetV1"] = "AssetV1";
SyncEntityType2["AssetV2"] = "AssetV2";
SyncEntityType2["AssetDeleteV1"] = "AssetDeleteV1";
SyncEntityType2["AssetExifV1"] = "AssetExifV1";
SyncEntityType2["AssetEditV1"] = "AssetEditV1";
SyncEntityType2["AssetEditDeleteV1"] = "AssetEditDeleteV1";
SyncEntityType2["AssetMetadataV1"] = "AssetMetadataV1";
SyncEntityType2["AssetMetadataDeleteV1"] = "AssetMetadataDeleteV1";
SyncEntityType2["PartnerV1"] = "PartnerV1";
SyncEntityType2["PartnerDeleteV1"] = "PartnerDeleteV1";
SyncEntityType2["PartnerAssetV1"] = "PartnerAssetV1";
SyncEntityType2["PartnerAssetV2"] = "PartnerAssetV2";
SyncEntityType2["PartnerAssetBackfillV1"] = "PartnerAssetBackfillV1";
SyncEntityType2["PartnerAssetBackfillV2"] = "PartnerAssetBackfillV2";
SyncEntityType2["PartnerAssetDeleteV1"] = "PartnerAssetDeleteV1";
SyncEntityType2["PartnerAssetExifV1"] = "PartnerAssetExifV1";
SyncEntityType2["PartnerAssetExifBackfillV1"] = "PartnerAssetExifBackfillV1";
SyncEntityType2["PartnerStackBackfillV1"] = "PartnerStackBackfillV1";
SyncEntityType2["PartnerStackDeleteV1"] = "PartnerStackDeleteV1";
SyncEntityType2["PartnerStackV1"] = "PartnerStackV1";
SyncEntityType2["AlbumV1"] = "AlbumV1";
SyncEntityType2["AlbumV2"] = "AlbumV2";
SyncEntityType2["AlbumDeleteV1"] = "AlbumDeleteV1";
SyncEntityType2["AlbumUserV1"] = "AlbumUserV1";
SyncEntityType2["AlbumUserBackfillV1"] = "AlbumUserBackfillV1";
SyncEntityType2["AlbumUserDeleteV1"] = "AlbumUserDeleteV1";
SyncEntityType2["AlbumAssetCreateV1"] = "AlbumAssetCreateV1";
SyncEntityType2["AlbumAssetCreateV2"] = "AlbumAssetCreateV2";
SyncEntityType2["AlbumAssetUpdateV1"] = "AlbumAssetUpdateV1";
SyncEntityType2["AlbumAssetUpdateV2"] = "AlbumAssetUpdateV2";
SyncEntityType2["AlbumAssetBackfillV1"] = "AlbumAssetBackfillV1";
SyncEntityType2["AlbumAssetBackfillV2"] = "AlbumAssetBackfillV2";
SyncEntityType2["AlbumAssetExifCreateV1"] = "AlbumAssetExifCreateV1";
SyncEntityType2["AlbumAssetExifUpdateV1"] = "AlbumAssetExifUpdateV1";
SyncEntityType2["AlbumAssetExifBackfillV1"] = "AlbumAssetExifBackfillV1";
SyncEntityType2["AlbumToAssetV1"] = "AlbumToAssetV1";
SyncEntityType2["AlbumToAssetDeleteV1"] = "AlbumToAssetDeleteV1";
SyncEntityType2["AlbumToAssetBackfillV1"] = "AlbumToAssetBackfillV1";
SyncEntityType2["MemoryV1"] = "MemoryV1";
SyncEntityType2["MemoryDeleteV1"] = "MemoryDeleteV1";
SyncEntityType2["MemoryToAssetV1"] = "MemoryToAssetV1";
SyncEntityType2["MemoryToAssetDeleteV1"] = "MemoryToAssetDeleteV1";
SyncEntityType2["StackV1"] = "StackV1";
SyncEntityType2["StackDeleteV1"] = "StackDeleteV1";
SyncEntityType2["PersonV1"] = "PersonV1";
SyncEntityType2["PersonDeleteV1"] = "PersonDeleteV1";
SyncEntityType2["AssetFaceV1"] = "AssetFaceV1";
SyncEntityType2["AssetFaceV2"] = "AssetFaceV2";
SyncEntityType2["AssetFaceDeleteV1"] = "AssetFaceDeleteV1";
SyncEntityType2["UserMetadataV1"] = "UserMetadataV1";
SyncEntityType2["UserMetadataDeleteV1"] = "UserMetadataDeleteV1";
SyncEntityType2["SyncAckV1"] = "SyncAckV1";
SyncEntityType2["SyncResetV1"] = "SyncResetV1";
SyncEntityType2["SyncCompleteV1"] = "SyncCompleteV1";
})(SyncEntityType || (SyncEntityType = {}));
var SyncRequestType;
(function(SyncRequestType2) {
SyncRequestType2["AlbumsV1"] = "AlbumsV1";
SyncRequestType2["AlbumsV2"] = "AlbumsV2";
SyncRequestType2["AlbumUsersV1"] = "AlbumUsersV1";
SyncRequestType2["AlbumToAssetsV1"] = "AlbumToAssetsV1";
SyncRequestType2["AlbumAssetsV1"] = "AlbumAssetsV1";
SyncRequestType2["AlbumAssetsV2"] = "AlbumAssetsV2";
SyncRequestType2["AlbumAssetExifsV1"] = "AlbumAssetExifsV1";
SyncRequestType2["AssetsV1"] = "AssetsV1";
SyncRequestType2["AssetsV2"] = "AssetsV2";
SyncRequestType2["AssetExifsV1"] = "AssetExifsV1";
SyncRequestType2["AssetEditsV1"] = "AssetEditsV1";
SyncRequestType2["AssetMetadataV1"] = "AssetMetadataV1";
SyncRequestType2["AuthUsersV1"] = "AuthUsersV1";
SyncRequestType2["MemoriesV1"] = "MemoriesV1";
SyncRequestType2["MemoryToAssetsV1"] = "MemoryToAssetsV1";
SyncRequestType2["PartnersV1"] = "PartnersV1";
SyncRequestType2["PartnerAssetsV1"] = "PartnerAssetsV1";
SyncRequestType2["PartnerAssetsV2"] = "PartnerAssetsV2";
SyncRequestType2["PartnerAssetExifsV1"] = "PartnerAssetExifsV1";
SyncRequestType2["PartnerStacksV1"] = "PartnerStacksV1";
SyncRequestType2["StacksV1"] = "StacksV1";
SyncRequestType2["UsersV1"] = "UsersV1";
SyncRequestType2["PeopleV1"] = "PeopleV1";
SyncRequestType2["AssetFacesV1"] = "AssetFacesV1";
SyncRequestType2["AssetFacesV2"] = "AssetFacesV2";
SyncRequestType2["UserMetadataV1"] = "UserMetadataV1";
})(SyncRequestType || (SyncRequestType = {}));
var TranscodeHWAccel;
(function(TranscodeHWAccel2) {
TranscodeHWAccel2["Nvenc"] = "nvenc";
TranscodeHWAccel2["Qsv"] = "qsv";
TranscodeHWAccel2["Vaapi"] = "vaapi";
TranscodeHWAccel2["Rkmpp"] = "rkmpp";
TranscodeHWAccel2["Disabled"] = "disabled";
})(TranscodeHWAccel || (TranscodeHWAccel = {}));
var AudioCodec;
(function(AudioCodec2) {
AudioCodec2["Mp3"] = "mp3";
AudioCodec2["Aac"] = "aac";
AudioCodec2["Opus"] = "opus";
AudioCodec2["PcmS16Le"] = "pcm_s16le";
})(AudioCodec || (AudioCodec = {}));
var VideoContainer;
(function(VideoContainer2) {
VideoContainer2["Mov"] = "mov";
VideoContainer2["Mp4"] = "mp4";
VideoContainer2["Ogg"] = "ogg";
VideoContainer2["Webm"] = "webm";
})(VideoContainer || (VideoContainer = {}));
var VideoCodec;
(function(VideoCodec2) {
VideoCodec2["H264"] = "h264";
VideoCodec2["Hevc"] = "hevc";
VideoCodec2["Vp9"] = "vp9";
VideoCodec2["Av1"] = "av1";
})(VideoCodec || (VideoCodec = {}));
var CQMode;
(function(CQMode2) {
CQMode2["Auto"] = "auto";
CQMode2["Cqp"] = "cqp";
CQMode2["Icq"] = "icq";
})(CQMode || (CQMode = {}));
var ToneMapping;
(function(ToneMapping2) {
ToneMapping2["Hable"] = "hable";
ToneMapping2["Mobius"] = "mobius";
ToneMapping2["Reinhard"] = "reinhard";
ToneMapping2["Disabled"] = "disabled";
})(ToneMapping || (ToneMapping = {}));
var TranscodePolicy;
(function(TranscodePolicy2) {
TranscodePolicy2["All"] = "all";
TranscodePolicy2["Optimal"] = "optimal";
TranscodePolicy2["Bitrate"] = "bitrate";
TranscodePolicy2["Required"] = "required";
TranscodePolicy2["Disabled"] = "disabled";
})(TranscodePolicy || (TranscodePolicy = {}));
var Colorspace;
(function(Colorspace2) {
Colorspace2["Srgb"] = "srgb";
Colorspace2["P3"] = "p3";
})(Colorspace || (Colorspace = {}));
var ImageFormat;
(function(ImageFormat2) {
ImageFormat2["Jpeg"] = "jpeg";
ImageFormat2["Webp"] = "webp";
})(ImageFormat || (ImageFormat = {}));
var LogLevel;
(function(LogLevel2) {
LogLevel2["Verbose"] = "verbose";
LogLevel2["Debug"] = "debug";
LogLevel2["Log"] = "log";
LogLevel2["Warn"] = "warn";
LogLevel2["Error"] = "error";
LogLevel2["Fatal"] = "fatal";
})(LogLevel || (LogLevel = {}));
var OAuthTokenEndpointAuthMethod;
(function(OAuthTokenEndpointAuthMethod2) {
OAuthTokenEndpointAuthMethod2["ClientSecretPost"] = "client_secret_post";
OAuthTokenEndpointAuthMethod2["ClientSecretBasic"] = "client_secret_basic";
})(OAuthTokenEndpointAuthMethod || (OAuthTokenEndpointAuthMethod = {}));
var AssetOrderBy;
(function(AssetOrderBy2) {
AssetOrderBy2["TakenAt"] = "takenAt";
AssetOrderBy2["CreatedAt"] = "createdAt";
})(AssetOrderBy || (AssetOrderBy = {}));
var UserMetadataKey;
(function(UserMetadataKey2) {
UserMetadataKey2["Preferences"] = "preferences";
UserMetadataKey2["License"] = "license";
UserMetadataKey2["Onboarding"] = "onboarding";
})(UserMetadataKey || (UserMetadataKey = {}));
// src/host-functions.ts
var hostFunctions = (authToken) => {
const host = Host.getFunctions();
const call = (name, authToken2, args) => {
const pointer1 = Memory.fromString(JSON.stringify({ authToken: authToken2, args }));
const fn = host[name];
const handler = Memory.find(fn(pointer1.offset));
try {
const result = JSON.parse(handler.readString());
if (result.success) {
return result.response;
}
throw new Error(
`Failed to call host function "${String(name)}", received ${result.status} - ${JSON.stringify(result.message)}`
);
} finally {
handler.free();
pointer1.free();
}
};
return {
// album
searchAlbums: (dto) => call("searchAlbums", authToken, [
dto
]),
createAlbum: (dto) => call("createAlbum", authToken, [dto]),
addAssetsToAlbum: (albumId, assetIds) => call(
"addAssetsToAlbum",
authToken,
[albumId, { ids: assetIds }]
),
addAssetsToAlbums: ({ assetIds, albumIds }) => call("addAssetsToAlbums", authToken, [{ albumIds, assetIds }])
};
};
// src/sdk.ts
var wrapper = (fn) => {
const input = Host.inputString();
try {
const payload = JSON.parse(input);
const event = {
...payload,
functions: hostFunctions(payload.workflow.authToken)
};
const eventConfigBefore = JSON.stringify(event.config);
console.debug(
`Inputs: trigger=${event.trigger}, event=${event.type}, config=${eventConfigBefore}`
);
const response = fn(event) ?? {};
const eventConfigAfter = JSON.stringify(event.config);
if (!response.config && eventConfigBefore !== eventConfigAfter) {
response.config = event.config;
}
console.debug(
`Outputs: workflow=${JSON.stringify(response.workflow)}, changes=${JSON.stringify(response.changes)}, data=${JSON.stringify(response.data)}, config=${JSON.stringify(response.config)}`
);
const output = JSON.stringify(response);
Host.outputString(output);
} catch (error) {
console.error(`Unhandled plugin exception: ${error.message || error}`);
throw error;
}
};
// src/types.ts
var WorkflowTrigger2 = /* @__PURE__ */ ((WorkflowTrigger3) => {
WorkflowTrigger3["AssetCreate"] = "AssetCreate";
WorkflowTrigger3["AssetMetadataExtraction"] = "AssetMetadataExtraction";
WorkflowTrigger3["PersonRecognized"] = "PersonRecognized";
return WorkflowTrigger3;
})(WorkflowTrigger2 || {});
export {
WorkflowTrigger2 as WorkflowTrigger,
hostFunctions,
wrapper
};
-6
View File
@@ -1,6 +0,0 @@
import type { WorkflowType } from '@immich/sdk';
import { hostFunctions } from './host-functions.js';
import type { ConfigValue, WorkflowEventPayload, WorkflowResponse } from './types.js';
export declare const wrapper: <T extends WorkflowType = WorkflowType, TConfig extends ConfigValue = ConfigValue>(fn: (payload: WorkflowEventPayload<T, TConfig> & {
functions: ReturnType<typeof hostFunctions>;
}) => WorkflowResponse<T> | undefined) => void;
-105
View File
@@ -1,105 +0,0 @@
import type { AssetTypeEnum, AssetVisibility, WorkflowType } from '@immich/sdk';
type DeepPartial<T> = T extends Date ? T : T extends Record<string, unknown> ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : T extends Array<infer R> ? DeepPartial<R>[] : T;
export type WorkflowEventMap = {
[WorkflowType.AssetV1]: AssetV1;
[WorkflowType.AssetPersonV1]: AssetPersonV1;
};
export type WorkflowEventData<T extends WorkflowType> = WorkflowEventMap[T];
export declare enum WorkflowTrigger {
AssetCreate = "AssetCreate",
AssetMetadataExtraction = "AssetMetadataExtraction",
PersonRecognized = "PersonRecognized"
}
export type WorkflowEventPayload<T extends WorkflowType = WorkflowType, TConfig = WorkflowStepConfig> = {
trigger: WorkflowTrigger;
type: T;
data: WorkflowEventData<T>;
config: TConfig;
workflow: {
id: string;
authToken: string;
stepId: string;
debug?: boolean;
};
};
export type WorkflowChanges<T extends WorkflowType = WorkflowType> = DeepPartial<WorkflowEventData<T>>;
export type WorkflowResponse<T extends WorkflowType = WorkflowType> = {
workflow?: {
continue?: boolean;
};
changes?: WorkflowChanges<T>;
data?: Record<string, unknown>;
config?: WorkflowStepConfig;
};
export type WorkflowStepConfig = {
[key: string]: ConfigValue;
};
export type ConfigValue = string | number | boolean | null | ConfigValue[] | {
[key: string]: ConfigValue;
};
export type AssetV1 = {
asset: {
id: string;
ownerId: string;
type: AssetTypeEnum;
originalPath: string;
fileCreatedAt: string;
fileModifiedAt: string;
isFavorite: boolean;
checksum: Buffer;
livePhotoVideoId: string | null;
updatedAt: string;
createdAt: string;
originalFileName: string;
isOffline: boolean;
libraryId: string | null;
isExternal: boolean;
deletedAt: string | null;
localDateTime: string;
stackId: string | null;
duplicateId: string | null;
visibility: AssetVisibility;
isEdited: boolean;
exifInfo: {
make: string | null;
model: string | null;
exifImageWidth: number | null;
exifImageHeight: number | null;
fileSizeInByte: number | null;
orientation: string | null;
dateTimeOriginal: string | null;
modifyDate: string | null;
lensModel: string | null;
fNumber: number | null;
focalLength: number | null;
iso: number | null;
latitude: number | null;
longitude: number | null;
city: string | null;
state: string | null;
country: string | null;
description: string | null;
fps: number | null;
exposureTime: string | null;
livePhotoCID: string | null;
timeZone: string | null;
projectionType: string | null;
profileDescription: string | null;
colorspace: string | null;
bitsPerSample: number | null;
autoStackId: string | null;
rating: number | null;
tags: string[] | null;
updatedAt: string | null;
} | null;
};
};
export type AssetPersonV1 = AssetV1 & {
person: {
id: string;
name: string;
};
};
export {};
+612
View File
@@ -2767,6 +2767,236 @@ export type WorkflowShareResponseDto = {
/** Workflow trigger type */
trigger: WorkflowTrigger;
};
export type DeviceFlowResponseDto = {
userCode: string;
verificationUri: string;
};
export type BackendDto = {
error?: string;
id: string;
isOnline: boolean;
"type": BackendType;
};
export type BackendsResponseDto = {
backends: BackendDto[];
};
export type CreateLocalBackendRequestDto = {
path: string;
};
export type BackendResponseDto = {
backend: BackendDto;
};
export type FilesystemListingItemDto = {
isDirectory: boolean;
path: string;
};
export type FilesystemListingResponseDto = {
items: FilesystemListingItemDto[];
parent: string;
path: string;
};
export type ImmichIntegrationConfigurationDto = {
backupConfiguration: boolean;
dataFolders: string[];
libraries: "all" | string[];
};
export type ImmichIntegrationDto = {
configuration: ImmichIntegrationConfigurationDto;
id: string;
scheduleId: string;
};
export type ImmichLibraryDto = {
exclusionPatterns: string[];
id: string;
importPaths: string[];
name: string;
};
export type ImmichStateDto = {
dataFolders: string[];
dataPath: string;
libraries: ImmichLibraryDto[];
};
export type IntegrationsResponseDto = {
immichIntegration?: ImmichIntegrationDto;
immichState?: ImmichStateDto;
};
export type RetentionPolicyDto = {
keepLast?: number;
keepWithin?: string;
keepWithinDaily?: string;
keepWithinHourly?: string;
keepWithinMonthly?: string;
keepWithinWeekly?: string;
keepWithinYearly?: string;
};
export type ConfigureImmichIntegrationRequestDto = {
backupConfiguration: boolean;
cron: string;
dataFolders: string[];
libraries: "all" | string[];
name: string;
retentionPolicy?: (RetentionPolicyDto) | null;
worm: boolean;
};
export type RunDto = {
end: string;
id: string;
logFilePath: string;
repositoryId: string;
start: string;
status: RunStatus;
"type": RunType;
};
export type RunResponseDto = {
run: RunDto;
};
export type OnboardingStatusResponseDto = {
hasBackend: boolean;
hasBackup: boolean;
hasOnboardedKey: boolean;
hasSchedule: boolean;
hasSkippedExtraConfig: boolean;
};
export type CurrentRecoveryKeyResponse = {
recoveryKey: string;
};
export type ImportRecoveryKeyRequest = {
recoveryKey: string;
};
export type RepositoryBackendDto = {
id: string;
online: boolean;
"type": BackendType;
};
export type RepositoryBackendsDto = {
primary: RepositoryBackendDto;
secondary: RepositoryBackendDto[];
};
export type RepositoryConfigurationDto = {
paths: string[];
retentionPolicy?: (RetentionPolicyDto) | null;
};
export type RepositoryMetricsDto = {
lastBackup?: string;
lastBackupDuration?: number;
lastSuccessfulBackup?: string;
sizeBytes: number;
};
export type LocalRepositoryDto = {
backends?: RepositoryBackendsDto;
configuration?: RepositoryConfigurationDto;
id: string;
metrics: RepositoryMetricsDto;
name: string;
worm: boolean;
};
export type RepositoryListResponseDto = {
repositories: LocalRepositoryDto[];
};
export type RepositoryCreateRequestDto = {
name: string;
paths?: string[];
worm: boolean;
};
export type RepositoryCreateResponseDto = {
repository: LocalRepositoryDto;
};
export type SnapshotSummaryDto = {
dataAdded: number;
filesChanged: number;
filesNew: number;
filesUnmodified: number;
totalBytes: number;
totalFiles: number;
};
export type SnapshotDto = {
id: string;
paths: string[];
summary?: SnapshotSummaryDto;
time: string;
};
export type InspectedLocalRepositoryDto = {
backends?: RepositoryBackendsDto;
configuration?: RepositoryConfigurationDto;
id: string;
metrics: RepositoryMetricsDto;
name: string;
snapshots: SnapshotDto[];
worm: boolean;
};
export type RepositoryInspectResponseDto = {
repositories: InspectedLocalRepositoryDto[];
};
export type RepositoryUpdateRequestDto = {
name?: string;
paths?: string[];
retentionPolicy?: (RetentionPolicyDto) | null;
};
export type RepositoryUpdateResponseDto = {
repository: LocalRepositoryDto;
};
export type LogResponseDto = {
logId: string;
};
export type RepositoryCheckImportResponseDto = {
readable: boolean;
};
export type RunHistoryResponseDto = {
runs: RunDto[];
};
export type ListSnapshotsResponseDto = {
snapshots: SnapshotDto[];
};
export type RepositorySnapshotRestoreRequestDto = {
include?: string[];
target?: string;
};
export type RepositorySnapshotRestoreFromPointRequestDto = {
include?: string[];
yuccaConfig?: string;
};
export type ScheduleDto = {
cron: string;
id: string;
lastFinished?: string;
lastRun?: string;
name: string;
paused: boolean;
repositories: string[];
};
export type ScheduleListResponseDto = {
schedules: ScheduleDto[];
};
export type ScheduleCreateRequestDto = {
cron: string;
name: string;
repositories: string[];
};
export type ScheduleCreateResponseDto = {
schedule: ScheduleDto;
};
export type ScheduleUpdateRequestDto = {
cron?: string;
name?: string;
paused?: boolean;
repositories?: string[];
};
export type ScheduleUpdateResponseDto = {
schedule: ScheduleDto;
};
export type ActiveScheduleItemDto = {
repositoryId: string;
status: TaskStatus;
};
export type RunningTaskDto = {
logId?: string;
parentId: string;
scheduleStatus?: ActiveScheduleItemDto[];
"type": TaskType;
};
export type RunningTaskListResponse = {
tasks: RunningTaskDto[];
};
export type LicenseResponseDto = UserLicense;
export type SyncAckV1 = {};
export type SyncAlbumDeleteV1 = {
@@ -6752,6 +6982,361 @@ export function getWorkflowForShare({ id }: {
...opts
}));
}
export function oidcDeviceFlow(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: DeviceFlowResponseDto;
}>("/yucca/auth/oidc/device", {
...opts
}));
}
export function getBackends(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: BackendsResponseDto;
}>("/yucca/backend", {
...opts
}));
}
export function createLocalBackend({ createLocalBackendRequestDto }: {
createLocalBackendRequestDto: CreateLocalBackendRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: BackendResponseDto;
}>("/yucca/backend/local", oazapfts.json({
...opts,
method: "POST",
body: createLocalBackendRequestDto
})));
}
export function resetOrchestrator(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/yucca/debug/reset", {
...opts,
method: "POST"
}));
}
export function getFileListing({ path }: {
path?: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: FilesystemListingResponseDto;
}>(`/yucca/fs${QS.query(QS.explode({
path
}))}`, {
...opts
}));
}
export function getIntegrations(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: IntegrationsResponseDto;
}>("/yucca/integrations", {
...opts
}));
}
export function configureImmichIntegration({ configureImmichIntegrationRequestDto }: {
configureImmichIntegrationRequestDto: ConfigureImmichIntegrationRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/yucca/integrations/immich", oazapfts.json({
...opts,
method: "POST",
body: configureImmichIntegrationRequestDto
})));
}
export function getRun({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RunResponseDto;
}>(`/yucca/logs/${encodeURIComponent(id)}`, {
...opts
}));
}
export function logStreamSse({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/yucca/logs/${encodeURIComponent(id)}/stream`, {
...opts
}));
}
export function onboardingStatus(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: OnboardingStatusResponseDto;
}>("/yucca/onboarding", {
...opts
}));
}
export function currentRecoveryKey(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: CurrentRecoveryKeyResponse;
}>("/yucca/onboarding/recovery-key", {
...opts
}));
}
export function confirmRecoveryKey(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/yucca/onboarding/recovery-key", {
...opts,
method: "POST"
}));
}
export function importRecoveryKey({ importRecoveryKeyRequest }: {
importRecoveryKeyRequest: ImportRecoveryKeyRequest;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/yucca/onboarding/recovery-key", oazapfts.json({
...opts,
method: "PUT",
body: importRecoveryKeyRequest
})));
}
export function skipOnboardingExtraConfig(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/yucca/onboarding/skip", {
...opts,
method: "POST"
}));
}
export function getRepositories(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RepositoryListResponseDto;
}>("/yucca/repository", {
...opts
}));
}
export function createRepository({ backend, repositoryCreateRequestDto }: {
backend?: string;
repositoryCreateRequestDto: RepositoryCreateRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RepositoryCreateResponseDto;
}>(`/yucca/repository${QS.query(QS.explode({
backend
}))}`, oazapfts.json({
...opts,
method: "POST",
body: repositoryCreateRequestDto
})));
}
export function inspectRepositories(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RepositoryInspectResponseDto;
}>("/yucca/repository/inspect", {
...opts
}));
}
export function deleteRepository({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/yucca/repository/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
}
export function updateRepository({ backend, id, repositoryUpdateRequestDto }: {
backend?: string;
id: string;
repositoryUpdateRequestDto: RepositoryUpdateRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RepositoryUpdateResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}${QS.query(QS.explode({
backend
}))}`, oazapfts.json({
...opts,
method: "PATCH",
body: repositoryUpdateRequestDto
})));
}
export function createBackup({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LogResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}`, {
...opts,
method: "POST"
}));
}
export function checkImportRepository({ backend, id }: {
backend: string;
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RepositoryCheckImportResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/import${QS.query(QS.explode({
backend
}))}`, {
...opts
}));
}
export function importRepository({ backend, id }: {
backend: string;
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RepositoryCreateResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/import${QS.query(QS.explode({
backend
}))}`, {
...opts,
method: "POST"
}));
}
export function getRunHistory({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RunHistoryResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/runs`, {
...opts
}));
}
export function getSnapshots({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ListSnapshotsResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/snapshots`, {
...opts
}));
}
export function pruneRepository({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LogResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/snapshots/prune`, {
...opts,
method: "POST"
}));
}
export function forgetSnapshot({ id, snapshot }: {
id: string;
snapshot: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ListSnapshotsResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}`, {
...opts,
method: "DELETE"
}));
}
export function restoreSnapshot({ id, snapshot, repositorySnapshotRestoreRequestDto }: {
id: string;
snapshot: string;
repositorySnapshotRestoreRequestDto: RepositorySnapshotRestoreRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LogResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}`, oazapfts.json({
...opts,
method: "POST",
body: repositorySnapshotRestoreRequestDto
})));
}
export function getSnapshotListing({ id, path, snapshot }: {
id: string;
path?: string;
snapshot: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: FilesystemListingResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}/listing${QS.query(QS.explode({
path
}))}`, {
...opts
}));
}
export function restoreFromPoint({ backend, id, snapshot, repositorySnapshotRestoreFromPointRequestDto }: {
backend: string;
id: string;
snapshot: string;
repositorySnapshotRestoreFromPointRequestDto: RepositorySnapshotRestoreFromPointRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: LogResponseDto;
}>(`/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}/restore-from-point${QS.query(QS.explode({
backend
}))}`, oazapfts.json({
...opts,
method: "POST",
body: repositorySnapshotRestoreFromPointRequestDto
})));
}
export function getSchedules(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ScheduleListResponseDto;
}>("/yucca/schedule", {
...opts
}));
}
export function createSchedule({ scheduleCreateRequestDto }: {
scheduleCreateRequestDto: ScheduleCreateRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ScheduleCreateResponseDto;
}>("/yucca/schedule", oazapfts.json({
...opts,
method: "POST",
body: scheduleCreateRequestDto
})));
}
export function removeSchedule({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/yucca/schedule/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
}
export function updateSchedule({ id, scheduleUpdateRequestDto }: {
id: string;
scheduleUpdateRequestDto: ScheduleUpdateRequestDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ScheduleUpdateResponseDto;
}>(`/yucca/schedule/${encodeURIComponent(id)}`, oazapfts.json({
...opts,
method: "PATCH",
body: scheduleUpdateRequestDto
})));
}
export function getRunningTasks(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: RunningTaskListResponse;
}>("/yucca/tasks", {
...opts
}));
}
export function cancelTask({ parentId }: {
parentId: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/yucca/tasks/${encodeURIComponent(parentId)}/cancel`, {
...opts,
method: "POST"
}));
}
export enum ReactionLevel {
Album = "album",
Asset = "asset"
@@ -7320,6 +7905,33 @@ export enum AssetOrderBy {
TakenAt = "takenAt",
CreatedAt = "createdAt"
}
export enum BackendType {
Yucca = "yucca",
Local = "local",
S3 = "s3"
}
export enum RunStatus {
Incomplete = "incomplete",
Complete = "complete",
Failed = "failed"
}
export enum RunType {
Schedule = "schedule",
Restore = "restore",
Backup = "backup",
Forget = "forget"
}
export enum TaskStatus {
Incomplete = "incomplete",
Complete = "complete",
Failed = "failed"
}
export enum TaskType {
Schedule = "schedule",
Restore = "restore",
Backup = "backup",
Forget = "forget"
}
export enum UserMetadataKey {
Preferences = "preferences",
License = "license",
+425 -84
View File
File diff suppressed because it is too large Load Diff
+22 -21
View File
@@ -8,6 +8,7 @@ packages:
- web
- .github
- packages/*
dedupePeerDependents: false
ignoredBuiltDependencies:
- '@nestjs/core'
- '@parcel/watcher'
@@ -24,47 +25,47 @@ ignoredBuiltDependencies:
- protobufjs
- ssh2
- utimes
injectWorkspacePackages: true
onlyBuiltDependencies:
- sharp
- '@tailwindcss/oxide'
- bcrypt
- better-sqlite3
- sharp
overrides:
canvas: 3.2.3
sharp: ^0.34.5
# pending docusaurus 3.10.1
webpackbar: ^7.0.0
packageExtensions:
nestjs-kysely:
'@immich/ui':
dependencies:
tslib: '*'
nestjs-otel:
dependencies:
tslib: '*'
tailwindcss: '>=4.1'
'@nestjs/swagger':
peerDependencies:
typescript: '*'
'@photo-sphere-viewer/equirectangular-video-adapter':
dependencies:
three: '*'
'@photo-sphere-viewer/video-plugin':
dependencies:
three: '*'
sharp:
dependencies:
node-addon-api: '*'
node-gyp: '*'
'@immich/ui':
dependencies:
tailwindcss: '>=4.1'
tailwind-variants:
dependencies:
tailwindcss: '>=4.1'
bcrypt:
dependencies:
node-addon-api: '*'
node-gyp: '*'
'@nestjs/swagger':
peerDependencies:
typescript: '*'
dedupePeerDependents: false
nestjs-kysely:
dependencies:
tslib: '*'
nestjs-otel:
dependencies:
tslib: '*'
sharp:
dependencies:
node-addon-api: '*'
node-gyp: '*'
tailwind-variants:
dependencies:
tailwindcss: '>=4.1'
preferWorkspacePackages: true
injectWorkspacePackages: true
shamefullyHoist: false
verifyDepsBeforeRun: install
+3
View File
@@ -113,6 +113,9 @@ ENV IMMICH_SOURCE_REF=${BUILD_SOURCE_REF}
ENV IMMICH_SOURCE_COMMIT=${BUILD_SOURCE_COMMIT}
ENV IMMICH_SOURCE_URL=https://github.com/immich-app/immich/commit/${BUILD_SOURCE_COMMIT}
# TODO[YUCCA]: pin restic & put in correct place
RUN apt-get update && apt-get install -y restic
VOLUME /data
EXPOSE 2283
ENTRYPOINT ["tini", "--", "/bin/bash", "-c"]
+2 -1
View File
@@ -27,9 +27,10 @@ ENTRYPOINT ["tini", "--", "/bin/bash", "-c"]
FROM dev AS dev-container-server
# TODO[YUCCA]: pin restic & put in correct place
RUN apt-get update --allow-releaseinfo-change && \
apt-get install inetutils-ping openjdk-21-jre-headless \
vim nano curl \
vim nano curl restic \
-y --no-install-recommends --fix-missing
RUN mkdir -p /workspaces && \
+1
View File
@@ -37,6 +37,7 @@
},
"dependencies": {
"@extism/extism": "2.0.0-rc13",
"@futo-org/backups-orchestrator-api": "0.1.72",
"@immich/plugin-sdk": "workspace:*",
"@immich/sql-tools": "^0.5.1",
"@nestjs/bullmq": "^11.0.1",
+34 -3
View File
@@ -1,3 +1,4 @@
import { OrchestrationApiModule } from '@futo-org/backups-orchestrator-api/dist';
import { BullModule } from '@nestjs/bullmq';
import { Inject, Module, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core';
@@ -20,6 +21,7 @@ import { ErrorInterceptor } from 'src/middleware/error.interceptor';
import { FileUploadInterceptor } from 'src/middleware/file-upload.interceptor';
import { GlobalExceptionFilter } from 'src/middleware/global-exception.filter';
import { LoggingInterceptor } from 'src/middleware/logging.interceptor';
import { YuccaAdminGuard } from 'src/middleware/yucca-admin.guard';
import { repositories } from 'src/repositories';
import { AppRepository } from 'src/repositories/app.repository';
import { ConfigRepository } from 'src/repositories/config.repository';
@@ -50,11 +52,19 @@ const commonMiddleware = [
{ provide: APP_INTERCEPTOR, useClass: ErrorInterceptor },
];
const apiMiddleware = [FileUploadInterceptor, ...commonMiddleware, { provide: APP_GUARD, useClass: AuthGuard }];
const apiMiddleware = [
FileUploadInterceptor,
...commonMiddleware,
{ provide: APP_GUARD, useClass: YuccaAdminGuard },
{ provide: APP_GUARD, useClass: AuthGuard },
];
const configRepository = new ConfigRepository();
const { bull, cls, database, otel } = configRepository.getEnv();
// TODO[YUCCA]: use IMMICH_ENV
const isYuccaDevelopmentMode = true;
const commonImports = [
ClsModule.forRoot(cls.config),
KyselyModule.forRoot(getKyselyConfig(database.config)),
@@ -102,14 +112,35 @@ export class BaseModule implements OnModuleInit, OnModuleDestroy {
}
@Module({
imports: [...bullImports, ...commonImports, ScheduleModule.forRoot()],
imports: [
...bullImports,
...commonImports,
ScheduleModule.forRoot(),
OrchestrationApiModule.forRoot({
yuccaProductionApi: 'https://staging.fubar.computer', // TODO[YUCCA]: load from futo.cloud -> .well-known file
statePath: '/data/yucca', // TODO[YUCCA]: point to {immich_data_location}/yucca
requireWsAuth: true,
requireLock: true,
developmentMode: isYuccaDevelopmentMode,
}),
],
controllers: [...controllers],
providers: [...common, ...apiMiddleware, { provide: IWorker, useValue: ImmichWorker.Api }],
})
export class ApiModule extends BaseModule {}
@Module({
imports: [...commonImports],
imports: [
...commonImports,
OrchestrationApiModule.forRoot({
yuccaProductionApi: 'https://staging.fubar.computer', // TODO[YUCCA]: load from futo.cloud -> .well-known file
statePath: '/data/yucca', // TODO[YUCCA]: point to {immich_data_location}/yucca
externalBaseUrl: 'https://my.immich.app',
requireWsAuth: true,
requireLock: true,
developmentMode: isYuccaDevelopmentMode,
}),
],
controllers: [MaintenanceWorkerController],
providers: [
ConfigRepository,
+1
View File
@@ -920,6 +920,7 @@ export enum DatabaseLock {
MaintenanceOperation = 621,
MemoryCreation = 777,
VersionCheck = 800,
YuccaModuleConfig = 900,
}
export enum MaintenanceAction {
+1 -1
View File
@@ -125,7 +125,7 @@ class Workers {
}
onError(name: ImmichWorker, error: Error) {
console.error(`${name} worker error: ${error}, stack: ${error.stack}`);
console.error(`${name} worker error: ${JSON.stringify(error)}, stack: ${error.stack}`);
}
onExit(name: ImmichWorker, exitCode: number | null) {
@@ -41,16 +41,18 @@ export class MaintenanceAuthGuard implements CanActivate {
}
async canActivate(context: ExecutionContext): Promise<boolean> {
const request = context.switchToHttp().getRequest<MaintenanceAuthRequest>();
const targets = [context.getHandler()];
const options = this.reflector.getAllAndOverride<{ _emptyObject: never } | undefined>(
MetadataKey.AuthRoute,
targets,
);
if (!options) {
if (!options && !request.path.startsWith('/api/yucca')) {
return true;
}
const request = context.switchToHttp().getRequest<MaintenanceAuthRequest>();
request.auth = await this.service.authenticate(request.headers);
return true;
@@ -39,6 +39,10 @@ describe(MaintenanceWorkerService.name, () => {
strict: false,
});
const eventsGatewayMock = {
setAuthFn: vitest.fn(),
};
sut = new MaintenanceWorkerService(
mocks.logger as never,
mocks.app,
@@ -50,6 +54,7 @@ describe(MaintenanceWorkerService.name, () => {
mocks.process,
mocks.database as never,
databaseBackupServiceMock,
eventsGatewayMock as never,
);
sut.mock({
@@ -1,3 +1,4 @@
import { EventsGateway } from '@futo-org/backups-orchestrator-api/dist';
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { parse } from 'cookie';
import { NextFunction, Request, Response } from 'express';
@@ -55,6 +56,7 @@ export class MaintenanceWorkerService {
private processRepository: ProcessRepository,
private databaseRepository: DatabaseRepository,
private databaseBackupService: DatabaseBackupService,
private readonly eventsGateway: EventsGateway,
) {
this.logger.setContext(this.constructor.name);
}
@@ -77,6 +79,14 @@ export class MaintenanceWorkerService {
StorageCore.setMediaLocation(this.detectMediaLocation());
this.eventsGateway.setAuthFn(async (client) => {
await this.authenticate(client.request.headers);
return {
user: { isAdmin: true },
};
});
this.maintenanceWebsocketRepository.setAuthFn(async (client) => this.authenticate(client.request.headers));
this.maintenanceWebsocketRepository.setStatusUpdateFn((status) => (this.#status = status));
@@ -0,0 +1,23 @@
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { AuthRequest } from 'src/middleware/auth.guard';
import { AuthService } from 'src/services/auth.service';
@Injectable()
export class YuccaAdminGuard implements CanActivate {
constructor(private authService: AuthService) {}
async canActivate(context: ExecutionContext): Promise<boolean> {
const request = context.switchToHttp().getRequest<AuthRequest>();
if (!request.path.startsWith('/api/yucca')) {
return true;
}
request.user = await this.authService.authenticate({
headers: request.headers,
queryParams: request.query as Record<string, string>,
metadata: { adminRoute: true, sharedLinkRoute: false, uri: request.path },
});
return true;
}
}
@@ -1,3 +1,4 @@
import { GatewayEvent as YuccaGatewayEvent } from '@futo-org/backups-orchestrator-api/dist/events/events.gateway';
import { Injectable } from '@nestjs/common';
import { ModuleRef, Reflector } from '@nestjs/core';
import _ from 'lodash';
@@ -67,6 +68,10 @@ type EventMap = {
/** job finishes with error */
JobError: [JobErrorEvent];
LibraryCreate: [];
LibraryUpdate: [];
LibraryDelete: [];
// queue events
QueueStart: [QueueStartEvent];
@@ -94,6 +99,8 @@ type EventMap = {
// websocket events
WebsocketConnect: [{ userId: string }];
YuccaEvent: [YuccaGatewayEvent];
};
export type AppRestartEvent = {
@@ -16,7 +16,7 @@ import { AppRestartEvent, ArgsOf, EventRepository } from 'src/repositories/event
import { LoggingRepository } from 'src/repositories/logging.repository';
import { handlePromiseError } from 'src/utils/misc';
export const serverEvents = ['ConfigUpdate', 'AppRestart'] as const;
export const serverEvents = ['ConfigUpdate', 'AppRestart', 'YuccaEvent'] as const;
export type ServerEvents = (typeof serverEvents)[number];
export interface ClientEventMap {

Some files were not shown because too many files have changed in this diff Show More