Compare commits

...

41 Commits

Author SHA1 Message Date
izzy 5ded6f89b7 Merge remote-tracking branch 'origin/main' into feat/yucca-integration 2026-06-17 15:19:40 +01:00
izzy bd781bdca8 chore: bump library to 0.3.1 2026-06-17 15:13:01 +01:00
izzy 71207ec7dc chore: use configured media location
refactor: move detect location to common util
2026-06-17 11:09:10 +01:00
izzy 88048548f6 docs: label TODO[YUCCA] comments 2026-06-17 11:00:14 +01:00
izzy 21f6b0a407 Merge remote-tracking branch 'origin/main' into feat/yucca-integration
Signed-off-by: izzy <me@insrt.uk>
2026-06-16 13:26:04 +01:00
izzy 68dd701f20 refactor: merge YuccaAdminGuard into AuthGuard
Signed-off-by: izzy <me@insrt.uk>
2026-06-16 13:13:23 +01:00
izzy c44882f8c1 chore: bump restic to 0.19.0
Signed-off-by: izzy <me@insrt.uk>
2026-06-16 13:08:32 +01:00
izzy 42e10c6ea9 chore: install restic through mise
Signed-off-by: izzy <me@insrt.uk>
2026-06-09 14:43:49 +02:00
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
112 changed files with 12630 additions and 325 deletions
+9
View File
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "2.17.0",
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c",
"integrity": "sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c"
}
}
}
+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.3.1",
"@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.mkFolder('/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.mkFolder('/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.mkFolder('/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 });
});
});
+3
View File
@@ -30,6 +30,7 @@ import {
createUserAdmin,
deleteAssets,
deleteDatabaseBackup,
deleteLibrary,
getAssetInfo,
getConfig,
getConfigDefaults,
@@ -461,6 +462,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) }),
+5
View File
@@ -1511,6 +1511,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",
@@ -1523,6 +1524,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…",
+32
View File
@@ -337,6 +337,38 @@ checksum = "sha256:b3ddff2c2bf87d3996fadf074bac58cd2259f718a17912a04ae930e3775b3
url = "https://github.com/pnpm/pnpm/releases/download/v11.5.2/pnpm-win32-x64.zip"
provenance = "github-attestations"
[[tools.restic]]
version = "0.19.0"
backend = "aqua:restic/restic"
[tools.restic."platforms.linux-arm64"]
checksum = "sha256:e522ce6bf748d753fee8093e8ec59359972cf5b6bc65fc7c7cf38ae952351d91"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_linux_arm64.bz2"
[tools.restic."platforms.linux-arm64-musl"]
checksum = "sha256:e522ce6bf748d753fee8093e8ec59359972cf5b6bc65fc7c7cf38ae952351d91"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_linux_arm64.bz2"
[tools.restic."platforms.linux-x64"]
checksum = "sha256:13176fe6d89d4357947a2cd107218ab2873a5f9d8e1ac2d4cd1c8e07e6839c21"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_linux_amd64.bz2"
[tools.restic."platforms.linux-x64-musl"]
checksum = "sha256:13176fe6d89d4357947a2cd107218ab2873a5f9d8e1ac2d4cd1c8e07e6839c21"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_linux_amd64.bz2"
[tools.restic."platforms.macos-arm64"]
checksum = "sha256:1475397bf759ef4be16a77b19dec650bdbfec00d2cacd82005553411cdd37997"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_darwin_arm64.bz2"
[tools.restic."platforms.macos-x64"]
checksum = "sha256:c9d9a71234bc0955fdba6da93cc9375f8793ec1e1cbce77a91014d536a969148"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_darwin_amd64.bz2"
[tools.restic."platforms.windows-x64"]
checksum = "sha256:6fa4219a70b1b5d1c429bb106a7f97f3d2a5aab74494db2e490b625edc486d8f"
url = "https://github.com/restic/restic/releases/download/v0.19.0/restic_0.19.0_windows_amd64.zip"
[[tools.terragrunt]]
version = "1.0.3"
backend = "aqua:gruntwork-io/terragrunt"
+1
View File
@@ -23,6 +23,7 @@ opentofu = "1.11.6"
"github:extism/cli" = "1.6.3"
"github:webassembly/binaryen" = "version_124"
"github:extism/js-pdk" = "1.6.0"
restic = "0.19.0"
java = "21.0.2"
[tools."github:jellyfin/jellyfin-ffmpeg"]
+90 -1
View File
@@ -3,7 +3,7 @@ Immich API
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 3.0.0-rc.1
- API version: 3.0.0-rc.0
- Generator version: 7.22.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
@@ -122,6 +122,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
@@ -140,6 +141,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
@@ -162,6 +165,7 @@ Class | Method | HTTP request | Description
*DeprecatedApi* | [**updateUserAdmin**](doc//DeprecatedApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user
*DeprecatedApi* | [**updateUserPreferencesAdmin**](doc//DeprecatedApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences
*DeprecatedApi* | [**updateWorkflow**](doc//DeprecatedApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow
*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
@@ -172,6 +176,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
@@ -211,6 +218,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
@@ -236,6 +248,29 @@ Class | Method | HTTP request | Description
*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
@@ -348,6 +383,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)
@@ -414,6 +450,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)
@@ -426,15 +466,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)
@@ -450,9 +495,18 @@ 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)
- [IntegrityReport](doc//IntegrityReport.md)
- [IntegrityReportResponseDto](doc//IntegrityReportResponseDto.md)
- [IntegrityReportResponseDtoItemsInner](doc//IntegrityReportResponseDtoItemsInner.md)
@@ -463,7 +517,10 @@ Class | Method | HTTP request | Description
- [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)
@@ -504,6 +561,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)
@@ -548,8 +606,35 @@ Class | Method | HTTP request | Description
- [ReleaseChannel](doc//ReleaseChannel.md)
- [ReleaseEventV1](doc//ReleaseEventV1.md)
- [ReleaseType](doc//ReleaseType.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)
@@ -584,6 +669,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)
@@ -674,6 +761,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
View File
@@ -35,13 +35,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';
@@ -49,10 +54,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';
@@ -69,6 +79,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';
@@ -135,6 +146,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';
@@ -147,15 +162,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';
@@ -171,9 +191,18 @@ 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/integrity_report.dart';
part 'model/integrity_report_response_dto.dart';
part 'model/integrity_report_response_dto_items_inner.dart';
@@ -184,7 +213,10 @@ 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';
@@ -225,6 +257,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';
@@ -269,8 +302,35 @@ part 'model/reaction_type.dart';
part 'model/release_channel.dart';
part 'model/release_event_v1.dart';
part 'model/release_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';
@@ -305,6 +365,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';
@@ -395,6 +457,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';
+60
View File
@@ -0,0 +1,60 @@
//
// 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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<DeviceFlowResponseDto?> oidcDeviceFlow({ Future<void>? abortTrigger, }) async {
final response = await oidcDeviceFlowWithHttpInfo(abortTrigger: abortTrigger,);
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;
}
}
+108
View File
@@ -0,0 +1,108 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class 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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [CreateLocalBackendRequestDto] createLocalBackendRequestDto (required):
Future<BackendResponseDto?> createLocalBackend(CreateLocalBackendRequestDto createLocalBackendRequestDto, { Future<void>? abortTrigger, }) async {
final response = await createLocalBackendWithHttpInfo(createLocalBackendRequestDto, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<BackendsResponseDto?> getBackends({ Future<void>? abortTrigger, }) async {
final response = await getBackendsWithHttpInfo(abortTrigger: abortTrigger,);
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;
}
}
+52
View File
@@ -0,0 +1,52 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class 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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<void> resetOrchestrator({ Future<void>? abortTrigger, }) async {
final response = await resetOrchestratorWithHttpInfo(abortTrigger: abortTrigger,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+70
View File
@@ -0,0 +1,70 @@
//
// 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, Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] path:
Future<FilesystemListingResponseDto?> getFileListing({ String? path, Future<void>? abortTrigger, }) async {
final response = await getFileListingWithHttpInfo(path: path, abortTrigger: abortTrigger,);
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;
}
}
+100
View File
@@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [ConfigureImmichIntegrationRequestDto] configureImmichIntegrationRequestDto (required):
Future<void> configureImmichIntegration(ConfigureImmichIntegrationRequestDto configureImmichIntegrationRequestDto, { Future<void>? abortTrigger, }) async {
final response = await configureImmichIntegrationWithHttpInfo(configureImmichIntegrationRequestDto, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<IntegrationsResponseDto?> getIntegrations({ Future<void>? abortTrigger, }) async {
final response = await getIntegrationsWithHttpInfo(abortTrigger: abortTrigger,);
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;
}
}
+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 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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<void> confirmRecoveryKey({ Future<void>? abortTrigger, }) async {
final response = await confirmRecoveryKeyWithHttpInfo(abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<CurrentRecoveryKeyResponse?> currentRecoveryKey({ Future<void>? abortTrigger, }) async {
final response = await currentRecoveryKeyWithHttpInfo(abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [ImportRecoveryKeyRequest] importRecoveryKeyRequest (required):
Future<void> importRecoveryKey(ImportRecoveryKeyRequest importRecoveryKeyRequest, { Future<void>? abortTrigger, }) async {
final response = await importRecoveryKeyWithHttpInfo(importRecoveryKeyRequest, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<OnboardingStatusResponseDto?> onboardingStatus({ Future<void>? abortTrigger, }) async {
final response = await onboardingStatusWithHttpInfo(abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<void> skipOnboardingExtraConfig({ Future<void>? abortTrigger, }) async {
final response = await skipOnboardingExtraConfigWithHttpInfo(abortTrigger: abortTrigger,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+804
View File
@@ -0,0 +1,804 @@
//
// 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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
Future<RepositoryCheckImportResponseDto?> checkImportRepository(String backend, String id, { Future<void>? abortTrigger, }) async {
final response = await checkImportRepositoryWithHttpInfo(backend, id, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<LogResponseDto?> createBackup(String id, { Future<void>? abortTrigger, }) async {
final response = await createBackupWithHttpInfo(id, abortTrigger: abortTrigger,);
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, Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [RepositoryCreateRequestDto] repositoryCreateRequestDto (required):
///
/// * [String] backend:
Future<RepositoryCreateResponseDto?> createRepository(RepositoryCreateRequestDto repositoryCreateRequestDto, { String? backend, Future<void>? abortTrigger, }) async {
final response = await createRepositoryWithHttpInfo(repositoryCreateRequestDto, backend: backend, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<void> deleteRepository(String id, { Future<void>? abortTrigger, }) async {
final response = await deleteRepositoryWithHttpInfo(id, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
Future<ListSnapshotsResponseDto?> forgetSnapshot(String id, String snapshot, { Future<void>? abortTrigger, }) async {
final response = await forgetSnapshotWithHttpInfo(id, snapshot, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<RepositoryListResponseDto?> getRepositories({ Future<void>? abortTrigger, }) async {
final response = await getRepositoriesWithHttpInfo(abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<RunHistoryResponseDto?> getRunHistory(String id, { Future<void>? abortTrigger, }) async {
final response = await getRunHistoryWithHttpInfo(id, abortTrigger: abortTrigger,);
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, Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [String] path:
Future<FilesystemListingResponseDto?> getSnapshotListing(String id, String snapshot, { String? path, Future<void>? abortTrigger, }) async {
final response = await getSnapshotListingWithHttpInfo(id, snapshot, path: path, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<ListSnapshotsResponseDto?> getSnapshots(String id, { Future<void>? abortTrigger, }) async {
final response = await getSnapshotsWithHttpInfo(id, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
Future<RepositoryCreateResponseDto?> importRepository(String backend, String id, { Future<void>? abortTrigger, }) async {
final response = await importRepositoryWithHttpInfo(backend, id, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<RepositoryInspectResponseDto?> inspectRepositories({ Future<void>? abortTrigger, }) async {
final response = await inspectRepositoriesWithHttpInfo(abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<LogResponseDto?> pruneRepository(String id, { Future<void>? abortTrigger, }) async {
final response = await pruneRepositoryWithHttpInfo(id, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] backend (required):
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [RepositorySnapshotRestoreFromPointRequestDto] repositorySnapshotRestoreFromPointRequestDto (required):
Future<LogResponseDto?> restoreFromPoint(String backend, String id, String snapshot, RepositorySnapshotRestoreFromPointRequestDto repositorySnapshotRestoreFromPointRequestDto, { Future<void>? abortTrigger, }) async {
final response = await restoreFromPointWithHttpInfo(backend, id, snapshot, repositorySnapshotRestoreFromPointRequestDto, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] snapshot (required):
///
/// * [RepositorySnapshotRestoreRequestDto] repositorySnapshotRestoreRequestDto (required):
Future<LogResponseDto?> restoreSnapshot(String id, String snapshot, RepositorySnapshotRestoreRequestDto repositorySnapshotRestoreRequestDto, { Future<void>? abortTrigger, }) async {
final response = await restoreSnapshotWithHttpInfo(id, snapshot, repositorySnapshotRestoreRequestDto, abortTrigger: abortTrigger,);
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, Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [RepositoryUpdateRequestDto] repositoryUpdateRequestDto (required):
///
/// * [String] backend:
Future<RepositoryUpdateResponseDto?> updateRepository(String id, RepositoryUpdateRequestDto repositoryUpdateRequestDto, { String? backend, Future<void>? abortTrigger, }) async {
final response = await updateRepositoryWithHttpInfo(id, repositoryUpdateRequestDto, backend: backend, abortTrigger: abortTrigger,);
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;
}
}
+108
View File
@@ -0,0 +1,108 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class 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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<RunResponseDto?> getRun(String id, { Future<void>? abortTrigger, }) async {
final response = await getRunWithHttpInfo(id, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<void> logStreamSse(String id, { Future<void>? abortTrigger, }) async {
final response = await logStreamSseWithHttpInfo(id, abortTrigger: abortTrigger,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+101
View File
@@ -0,0 +1,101 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class 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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] parentId (required):
Future<void> cancelTask(String parentId, { Future<void>? abortTrigger, }) async {
final response = await cancelTaskWithHttpInfo(parentId, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<RunningTaskListResponse?> getRunningTasks({ Future<void>? abortTrigger, }) async {
final response = await getRunningTasksWithHttpInfo(abortTrigger: abortTrigger,);
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;
}
}
+202
View File
@@ -0,0 +1,202 @@
//
// 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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [ScheduleCreateRequestDto] scheduleCreateRequestDto (required):
Future<ScheduleCreateResponseDto?> createSchedule(ScheduleCreateRequestDto scheduleCreateRequestDto, { Future<void>? abortTrigger, }) async {
final response = await createScheduleWithHttpInfo(scheduleCreateRequestDto, abortTrigger: abortTrigger,);
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({ Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
Future<ScheduleListResponseDto?> getSchedules({ Future<void>? abortTrigger, }) async {
final response = await getSchedulesWithHttpInfo(abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<void> removeSchedule(String id, { Future<void>? abortTrigger, }) async {
final response = await removeScheduleWithHttpInfo(id, abortTrigger: abortTrigger,);
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, { Future<void>? abortTrigger, }) 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,
abortTrigger: abortTrigger,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [ScheduleUpdateRequestDto] scheduleUpdateRequestDto (required):
Future<ScheduleUpdateResponseDto?> updateSchedule(String id, ScheduleUpdateRequestDto scheduleUpdateRequestDto, { Future<void>? abortTrigger, }) async {
final response = await updateScheduleWithHttpInfo(id, scheduleUpdateRequestDto, abortTrigger: abortTrigger,);
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;
}
}
+108
View File
@@ -183,6 +183,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 +317,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':
@@ -339,16 +349,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':
@@ -357,6 +375,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':
@@ -387,12 +407,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 'IntegrityReport':
return IntegrityReportTypeTransformer().decode(value);
case 'IntegrityReportResponseDto':
@@ -413,8 +451,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':
@@ -495,6 +539,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':
@@ -583,10 +629,64 @@ class ApiClient {
return ReleaseEventV1.fromJson(value);
case 'ReleaseType':
return ReleaseTypeTypeTransformer().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':
@@ -655,6 +755,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':
@@ -835,6 +939,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();
}
@@ -169,6 +172,12 @@ String parameterToString(dynamic value) {
if (value is ReleaseType) {
return ReleaseTypeTypeTransformer().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();
}
@@ -187,6 +196,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',
};
}
+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 BackendDto {
/// Returns a new [BackendDto] instance.
BackendDto({
this.error = const Optional.absent(),
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.
///
Optional<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.isPresent) {
final value = this.error.value;
json[r'error'] = value;
}
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: json.containsKey(r'error') ? Optional.present(mapValueOfType<String>(json, r'error')) : const Optional.absent(),
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,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 ConfigureImmichIntegrationRequestDto {
/// Returns a new [ConfigureImmichIntegrationRequestDto] instance.
ConfigureImmichIntegrationRequestDto({
required this.backupConfiguration,
required this.cron,
this.dataFolders = const [],
required this.libraries,
required this.name,
this.retentionPolicy = const Optional.absent(),
required this.worm,
});
bool backupConfiguration;
String cron;
List<String> dataFolders;
ConfigureImmichIntegrationRequestDtoLibraries libraries;
String name;
Optional<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.isPresent) {
final value = this.retentionPolicy.value;
json[r'retentionPolicy'] = value;
}
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: json.containsKey(r'retentionPolicy') ? Optional.present(RetentionPolicyDto.fromJson(json[r'retentionPolicy'])) : const Optional.absent(),
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,163 @@
//
// 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 = const Optional.absent(),
this.configuration = const Optional.absent(),
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.
///
Optional<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.
///
Optional<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.isPresent) {
final value = this.backends.value;
json[r'backends'] = value;
}
if (this.configuration.isPresent) {
final value = this.configuration.value;
json[r'configuration'] = value;
}
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: json.containsKey(r'backends') ? Optional.present(RepositoryBackendsDto.fromJson(json[r'backends'])) : const Optional.absent(),
configuration: json.containsKey(r'configuration') ? Optional.present(RepositoryConfigurationDto.fromJson(json[r'configuration'])) : const Optional.absent(),
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',
};
}
+123
View File
@@ -0,0 +1,123 @@
//
// 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 = const Optional.absent(),
this.immichState = const Optional.absent(),
});
///
/// 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.
///
Optional<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.
///
Optional<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.isPresent) {
final value = this.immichIntegration.value;
json[r'immichIntegration'] = value;
}
if (this.immichState.isPresent) {
final value = this.immichState.value;
json[r'immichState'] = value;
}
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: json.containsKey(r'immichIntegration') ? Optional.present(ImmichIntegrationDto.fromJson(json[r'immichIntegration'])) : const Optional.absent(),
immichState: json.containsKey(r'immichState') ? Optional.present(ImmichStateDto.fromJson(json[r'immichState'])) : const Optional.absent(),
);
}
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',
};
}
+155
View File
@@ -0,0 +1,155 @@
//
// 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 = const Optional.absent(),
this.configuration = const Optional.absent(),
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.
///
Optional<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.
///
Optional<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.isPresent) {
final value = this.backends.value;
json[r'backends'] = value;
}
if (this.configuration.isPresent) {
final value = this.configuration.value;
json[r'configuration'] = value;
}
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: json.containsKey(r'backends') ? Optional.present(RepositoryBackendsDto.fromJson(json[r'backends'])) : const Optional.absent(),
configuration: json.containsKey(r'configuration') ? Optional.present(RepositoryConfigurationDto.fromJson(json[r'configuration'])) : const Optional.absent(),
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',
};
}
+111
View File
@@ -0,0 +1,111 @@
//
// 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 = const Optional.absent(),
});
List<String> paths;
Optional<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.isPresent) {
final value = this.retentionPolicy.value;
json[r'retentionPolicy'] = value;
}
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: json.containsKey(r'retentionPolicy') ? Optional.present(RetentionPolicyDto.fromJson(json[r'retentionPolicy'])) : const Optional.absent(),
);
}
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,119 @@
//
// 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 Optional.present(const []),
required this.worm,
});
String name;
Optional<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;
if (this.paths.isPresent) {
final value = this.paths.value;
json[r'paths'] = value;
}
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.containsKey(r'paths') ? Optional.present(json[r'paths'] is Iterable
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
: const []) : const Optional.absent(),
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',
};
}
+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 RepositoryMetricsDto {
/// Returns a new [RepositoryMetricsDto] instance.
RepositoryMetricsDto({
this.lastBackup = const Optional.absent(),
this.lastBackupDuration = const Optional.absent(),
this.lastSuccessfulBackup = const Optional.absent(),
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.
///
Optional<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.
///
Optional<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.
///
Optional<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.isPresent) {
final value = this.lastBackup.value;
json[r'lastBackup'] = value;
}
if (this.lastBackupDuration.isPresent) {
final value = this.lastBackupDuration.value;
json[r'lastBackupDuration'] = value;
}
if (this.lastSuccessfulBackup.isPresent) {
final value = this.lastSuccessfulBackup.value;
json[r'lastSuccessfulBackup'] = value;
}
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: json.containsKey(r'lastBackup') ? Optional.present(mapValueOfType<String>(json, r'lastBackup')) : const Optional.absent(),
lastBackupDuration: json.containsKey(r'lastBackupDuration') ? Optional.present(json[r'lastBackupDuration'] == null ? null : num.parse('${json[r'lastBackupDuration']}')) : const Optional.absent(),
lastSuccessfulBackup: json.containsKey(r'lastSuccessfulBackup') ? Optional.present(mapValueOfType<String>(json, r'lastSuccessfulBackup')) : const Optional.absent(),
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,119 @@
//
// 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 Optional.present(const []),
this.yuccaConfig = const Optional.absent(),
});
Optional<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.
///
Optional<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>{};
if (this.include.isPresent) {
final value = this.include.value;
json[r'include'] = value;
}
if (this.yuccaConfig.isPresent) {
final value = this.yuccaConfig.value;
json[r'yuccaConfig'] = value;
}
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.containsKey(r'include') ? Optional.present(json[r'include'] is Iterable
? (json[r'include'] as Iterable).cast<String>().toList(growable: false)
: const []) : const Optional.absent(),
yuccaConfig: json.containsKey(r'yuccaConfig') ? Optional.present(mapValueOfType<String>(json, r'yuccaConfig')) : const Optional.absent(),
);
}
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,119 @@
//
// 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 Optional.present(const []),
this.target = const Optional.absent(),
});
Optional<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.
///
Optional<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>{};
if (this.include.isPresent) {
final value = this.include.value;
json[r'include'] = value;
}
if (this.target.isPresent) {
final value = this.target.value;
json[r'target'] = value;
}
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.containsKey(r'include') ? Optional.present(json[r'include'] is Iterable
? (json[r'include'] as Iterable).cast<String>().toList(growable: false)
: const []) : const Optional.absent(),
target: json.containsKey(r'target') ? Optional.present(mapValueOfType<String>(json, r'target')) : const Optional.absent(),
);
}
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,129 @@
//
// 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 = const Optional.absent(),
this.paths = const Optional.present(const []),
this.retentionPolicy = const Optional.absent(),
});
///
/// 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.
///
Optional<String?> name;
Optional<List<String>?> paths;
Optional<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.isPresent) {
final value = this.name.value;
json[r'name'] = value;
}
if (this.paths.isPresent) {
final value = this.paths.value;
json[r'paths'] = value;
}
if (this.retentionPolicy.isPresent) {
final value = this.retentionPolicy.value;
json[r'retentionPolicy'] = value;
}
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: json.containsKey(r'name') ? Optional.present(mapValueOfType<String>(json, r'name')) : const Optional.absent(),
paths: json.containsKey(r'paths') ? Optional.present(json[r'paths'] is Iterable
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
: const []) : const Optional.absent(),
retentionPolicy: json.containsKey(r'retentionPolicy') ? Optional.present(RetentionPolicyDto.fromJson(json[r'retentionPolicy'])) : const Optional.absent(),
);
}
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',
};
}
+203
View File
@@ -0,0 +1,203 @@
//
// 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 = const Optional.absent(),
this.keepWithin = const Optional.absent(),
this.keepWithinDaily = const Optional.absent(),
this.keepWithinHourly = const Optional.absent(),
this.keepWithinMonthly = const Optional.absent(),
this.keepWithinWeekly = const Optional.absent(),
this.keepWithinYearly = const Optional.absent(),
});
///
/// 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.
///
Optional<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.
///
Optional<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.
///
Optional<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.
///
Optional<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.
///
Optional<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.
///
Optional<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.
///
Optional<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.isPresent) {
final value = this.keepLast.value;
json[r'keepLast'] = value;
}
if (this.keepWithin.isPresent) {
final value = this.keepWithin.value;
json[r'keepWithin'] = value;
}
if (this.keepWithinDaily.isPresent) {
final value = this.keepWithinDaily.value;
json[r'keepWithinDaily'] = value;
}
if (this.keepWithinHourly.isPresent) {
final value = this.keepWithinHourly.value;
json[r'keepWithinHourly'] = value;
}
if (this.keepWithinMonthly.isPresent) {
final value = this.keepWithinMonthly.value;
json[r'keepWithinMonthly'] = value;
}
if (this.keepWithinWeekly.isPresent) {
final value = this.keepWithinWeekly.value;
json[r'keepWithinWeekly'] = value;
}
if (this.keepWithinYearly.isPresent) {
final value = this.keepWithinYearly.value;
json[r'keepWithinYearly'] = value;
}
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: json.containsKey(r'keepLast') ? Optional.present(json[r'keepLast'] == null ? null : num.parse('${json[r'keepLast']}')) : const Optional.absent(),
keepWithin: json.containsKey(r'keepWithin') ? Optional.present(mapValueOfType<String>(json, r'keepWithin')) : const Optional.absent(),
keepWithinDaily: json.containsKey(r'keepWithinDaily') ? Optional.present(mapValueOfType<String>(json, r'keepWithinDaily')) : const Optional.absent(),
keepWithinHourly: json.containsKey(r'keepWithinHourly') ? Optional.present(mapValueOfType<String>(json, r'keepWithinHourly')) : const Optional.absent(),
keepWithinMonthly: json.containsKey(r'keepWithinMonthly') ? Optional.present(mapValueOfType<String>(json, r'keepWithinMonthly')) : const Optional.absent(),
keepWithinWeekly: json.containsKey(r'keepWithinWeekly') ? Optional.present(mapValueOfType<String>(json, r'keepWithinWeekly')) : const Optional.absent(),
keepWithinYearly: json.containsKey(r'keepWithinYearly') ? Optional.present(mapValueOfType<String>(json, r'keepWithinYearly')) : const Optional.absent(),
);
}
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;
}
+133
View File
@@ -0,0 +1,133 @@
//
// 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 = const Optional.absent(),
required this.parentId,
this.scheduleStatus = const Optional.present(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.
///
Optional<String?> logId;
String parentId;
Optional<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.isPresent) {
final value = this.logId.value;
json[r'logId'] = value;
}
json[r'parentId'] = this.parentId;
if (this.scheduleStatus.isPresent) {
final value = this.scheduleStatus.value;
json[r'scheduleStatus'] = value;
}
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: json.containsKey(r'logId') ? Optional.present(mapValueOfType<String>(json, r'logId')) : const Optional.absent(),
parentId: mapValueOfType<String>(json, r'parentId')!,
scheduleStatus: json.containsKey(r'scheduleStatus') ? Optional.present(ActiveScheduleItemDto.listFromJson(json[r'scheduleStatus'])) : const Optional.absent(),
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',
};
}
+165
View File
@@ -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 ScheduleDto {
/// Returns a new [ScheduleDto] instance.
ScheduleDto({
required this.cron,
required this.id,
this.lastFinished = const Optional.absent(),
this.lastRun = const Optional.absent(),
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.
///
Optional<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.
///
Optional<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.isPresent) {
final value = this.lastFinished.value;
json[r'lastFinished'] = value;
}
if (this.lastRun.isPresent) {
final value = this.lastRun.value;
json[r'lastRun'] = value;
}
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: json.containsKey(r'lastFinished') ? Optional.present(mapValueOfType<String>(json, r'lastFinished')) : const Optional.absent(),
lastRun: json.containsKey(r'lastRun') ? Optional.present(mapValueOfType<String>(json, r'lastRun')) : const Optional.absent(),
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 = const Optional.absent(),
this.name = const Optional.absent(),
this.paused = const Optional.absent(),
this.repositories = const Optional.present(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.
///
Optional<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.
///
Optional<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.
///
Optional<bool?> paused;
Optional<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.isPresent) {
final value = this.cron.value;
json[r'cron'] = value;
}
if (this.name.isPresent) {
final value = this.name.value;
json[r'name'] = value;
}
if (this.paused.isPresent) {
final value = this.paused.value;
json[r'paused'] = value;
}
if (this.repositories.isPresent) {
final value = this.repositories.value;
json[r'repositories'] = value;
}
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: json.containsKey(r'cron') ? Optional.present(mapValueOfType<String>(json, r'cron')) : const Optional.absent(),
name: json.containsKey(r'name') ? Optional.present(mapValueOfType<String>(json, r'name')) : const Optional.absent(),
paused: json.containsKey(r'paused') ? Optional.present(mapValueOfType<bool>(json, r'paused')) : const Optional.absent(),
repositories: json.containsKey(r'repositories') ? Optional.present(json[r'repositories'] is Iterable
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
: const []) : const Optional.absent(),
);
}
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',
};
}
+133
View File
@@ -0,0 +1,133 @@
//
// 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 = const Optional.absent(),
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.
///
Optional<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.isPresent) {
final value = this.summary.value;
json[r'summary'] = value;
}
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: json.containsKey(r'summary') ? Optional.present(SnapshotSummaryDto.fromJson(json[r'summary'])) : const Optional.absent(),
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
+612
View File
@@ -2834,6 +2834,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 ReleaseEventV1 = {
/** When the server last checked for a latest version. As an ISO timestamp */
@@ -7053,6 +7283,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"
@@ -7656,6 +8241,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 ReleaseType {
Major = "major",
Premajor = "premajor",
+422 -90
View File
File diff suppressed because it is too large Load Diff
+26 -22
View File
@@ -14,6 +14,7 @@ allowBuilds:
'@scarf/scarf': false
'@swc/core': false
bcrypt: true
better-sqlite3: true
canvas: false
core-js: false
cpu-features: false
@@ -27,43 +28,46 @@ allowBuilds:
'@tailwindcss/oxide': true
core-js-pure: false
postman-code-generators: false
dedupePeerDependents: false
injectWorkspacePackages: true
minimumReleaseAgeExclude:
- '@futo-org/backups-api-client@0.3.1'
- '@futo-org/backups-orchestrator-ui@0.3.1'
- '@futo-org/backups-orchestrator-api@0.3.1'
- '@immich/ui@0.81.1'
overrides:
canvas: 3.2.3
sharp: ^0.34.5
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
minimumReleaseAgeExclude:
- '@immich/ui@0.81.1'
+7 -3
View File
@@ -52,7 +52,7 @@ RUN --mount=type=cache,id=pnpm-cli,target=/buildcache/pnpm-store \
pnpm --filter @immich/sdk --filter @immich/cli build && \
pnpm --filter @immich/cli --prod --no-optional deploy /output/cli-pruned
FROM builder AS plugins
FROM builder AS tools
ARG TARGETPLATFORM
@@ -60,12 +60,14 @@ COPY --from=ghcr.io/jdx/mise:2026.6.10@sha256:f57ac375a262f52f8ac3f9101348dbff21
WORKDIR /app
COPY ./mise.toml ./mise.toml
COPY ./packages/plugin-core/mise.toml ./packages/plugin-core/
ENV MISE_TRUSTED_CONFIG_PATHS=/app/mise.toml
ENV MISE_DATA_DIR=/buildcache/mise
ENV MISE_DISABLE_TOOLS=flutter
RUN --mount=type=cache,id=mise-tools-${TARGETPLATFORM},target=/buildcache/mise \
mise install
mise install && \
cp "$(mise which restic)" /usr/local/bin/restic
FROM tools AS plugins
COPY ./packages/sdk ./packages/sdk/
COPY ./packages/plugin-core ./packages/plugin-core/
@@ -113,6 +115,8 @@ 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}
COPY --from=tools /usr/local/bin/restic /usr/local/bin/restic
VOLUME /data
EXPOSE 2283
ENTRYPOINT ["tini", "--", "/bin/bash", "-c"]
+1
View File
@@ -37,6 +37,7 @@
},
"dependencies": {
"@extism/extism": "2.0.0-rc13",
"@futo-org/backups-orchestrator-api": "0.3.1",
"@immich/plugin-sdk": "workspace:*",
"@immich/sql-tools": "^0.5.1",
"@nestjs/bullmq": "^11.0.1",
+33 -4
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';
@@ -6,10 +7,12 @@ import { ClsModule } from 'nestjs-cls';
import { KyselyModule } from 'nestjs-kysely';
import { OpenTelemetryModule } from 'nestjs-otel';
import { ZodSerializerInterceptor, ZodValidationPipe } from 'nestjs-zod';
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { commandsAndQuestions } from 'src/commands';
import { IWorker } from 'src/constants';
import { controllers } from 'src/controllers';
import { ImmichWorker } from 'src/enum';
import { /* ImmichEnvironment, */ ImmichWorker } from 'src/enum';
import { MaintenanceAuthGuard } from 'src/maintenance/maintenance-auth.guard';
import { MaintenanceHealthRepository } from 'src/maintenance/maintenance-health.repository';
import { MaintenanceWebsocketRepository } from 'src/maintenance/maintenance-websocket.repository';
@@ -39,6 +42,7 @@ import { DatabaseBackupService } from 'src/services/database-backup.service';
import { QueueService } from 'src/services/queue.service';
import { getKyselyConfig } from 'src/utils/database';
import { configureUserAgent } from 'src/utils/fetch';
import { detectMediaLocation } from 'src/utils/storage';
const common = [...repositories, ...services, GlobalExceptionFilter];
@@ -53,7 +57,11 @@ const commonMiddleware = [
const apiMiddleware = [FileUploadInterceptor, ...commonMiddleware, { provide: APP_GUARD, useClass: AuthGuard }];
const configRepository = new ConfigRepository();
const { bull, cls, database, otel } = configRepository.getEnv();
const { bull, cls, database, /* environment, */ otel, storage } = configRepository.getEnv();
// const isYuccaDevelopmentMode = environment === ImmichEnvironment.Development;
const isYuccaDevelopmentMode = true; // TODO[YUCCA]: for testing
const yuccaStatePath = join(detectMediaLocation(storage.mediaLocation, existsSync), 'yucca');
const commonImports = [
ClsModule.forRoot(cls.config),
@@ -102,14 +110,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]: remove to load from futo.cloud/.well-known
statePath: yuccaStatePath,
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]: remove to load from futo.cloud/.well-known
statePath: yuccaStatePath,
externalBaseUrl: 'https://my.immich.app',
requireWsAuth: true,
requireLock: true,
developmentMode: isYuccaDevelopmentMode,
}),
],
controllers: [MaintenanceWorkerController],
providers: [
ConfigRepository,
+1
View File
@@ -955,6 +955,7 @@ export enum DatabaseLock {
IntegrityCheck = 67,
VersionCheck = 800,
HlsSessionCleanup = 850,
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';
@@ -32,6 +33,7 @@ import { MaintenanceModeState } from 'src/types';
import { getConfig } from 'src/utils/config';
import { createMaintenanceLoginUrl, detectPriorInstall } from 'src/utils/maintenance';
import { getExternalDomain } from 'src/utils/misc';
import { detectMediaLocation } from 'src/utils/storage';
/**
* This service is available inside of maintenance mode to manage maintenance mode
@@ -55,6 +57,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 +80,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));
@@ -158,30 +169,9 @@ export class MaintenanceWorkerService {
};
}
/**
* {@link _StorageService.detectMediaLocation}
*/
detectMediaLocation(): string {
const envData = this.configRepository.getEnv();
if (envData.storage.mediaLocation) {
return envData.storage.mediaLocation;
}
const targets: string[] = [];
const candidates = ['/data', '/usr/src/app/upload'];
for (const candidate of candidates) {
const exists = this.storageRepository.existsSync(candidate);
if (exists) {
targets.push(candidate);
}
}
if (targets.length === 1) {
return targets[0];
}
return '/usr/src/app/upload';
return detectMediaLocation(envData.storage.mediaLocation, (path) => this.storageRepository.existsSync(path));
}
private get secret() {
+11 -1
View File
@@ -86,6 +86,17 @@ export class AuthGuard implements CanActivate {
}
async canActivate(context: ExecutionContext): Promise<boolean> {
const request = context.switchToHttp().getRequest<AuthRequest>();
if (request.path.startsWith('/api/yucca')) {
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;
}
const targets = [context.getHandler()];
const options = this.reflector.getAllAndOverride<AuthenticatedOptions | undefined>(MetadataKey.AuthRoute, targets);
if (!options) {
@@ -97,7 +108,6 @@ export class AuthGuard implements CanActivate {
sharedLink: sharedLinkRoute,
permission,
} = { sharedLink: false, admin: false, ...options };
const request = context.switchToHttp().getRequest<AuthRequest>();
request.user = await this.authService.authenticate({
headers: request.headers,
@@ -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];
@@ -102,6 +107,8 @@ type EventMap = {
// websocket events
WebsocketConnect: [{ userId: string }];
YuccaEvent: [YuccaGatewayEvent];
};
export type AppRestartEvent = {
@@ -19,6 +19,7 @@ import { handlePromiseError } from 'src/utils/misc';
export const serverEvents = [
'ConfigUpdate',
'AppRestart',
'YuccaEvent',
'HlsSegmentRequest',
'HlsSegmentResult',
'HlsHeartbeat',
+2
View File
@@ -49,6 +49,7 @@ import { VersionService } from 'src/services/version.service';
import { ViewService } from 'src/services/view.service';
import { WorkflowExecutionService } from 'src/services/workflow-execution.service';
import { WorkflowService } from 'src/services/workflow.service';
import { YuccaService } from 'src/services/yucca.service';
export const services = [
ApiKeyService,
@@ -102,4 +103,5 @@ export const services = [
ViewService,
WorkflowExecutionService,
WorkflowService,
YuccaService,
];
+5
View File
@@ -242,6 +242,8 @@ export class LibraryService extends BaseService {
'**/.stfolder/**',
],
});
await this.eventRepository.emit('LibraryCreate');
return mapLibrary(library);
}
@@ -343,6 +345,7 @@ export class LibraryService extends BaseService {
}
const library = await this.libraryRepository.update(id, dto);
await this.eventRepository.emit('LibraryUpdate');
return mapLibrary(library);
}
@@ -355,6 +358,8 @@ export class LibraryService extends BaseService {
await this.libraryRepository.softDelete(id);
await this.jobRepository.queue({ name: JobName.LibraryDelete, data: { id } });
await this.eventRepository.emit('LibraryDelete');
}
@OnJob({ name: JobName.LibraryDelete, queue: QueueName.Library })
+2 -19
View File
@@ -15,6 +15,7 @@ import {
import { BaseService } from 'src/services/base.service';
import { JobOf, SystemFlags } from 'src/types';
import { ImmichStartupError } from 'src/utils/misc';
import { detectMediaLocation } from 'src/utils/storage';
const docsMessage = `Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information.`;
@@ -22,25 +23,7 @@ const docsMessage = `Please see https://docs.immich.app/administration/system-in
export class StorageService extends BaseService {
private detectMediaLocation(): string {
const envData = this.configRepository.getEnv();
if (envData.storage.mediaLocation) {
return envData.storage.mediaLocation;
}
const targets: string[] = [];
const candidates = ['/data', '/usr/src/app/upload'];
for (const candidate of candidates) {
const exists = this.storageRepository.existsSync(candidate);
if (exists) {
targets.push(candidate);
}
}
if (targets.length === 1) {
return targets[0];
}
return '/usr/src/app/upload';
return detectMediaLocation(envData.storage.mediaLocation, (path) => this.storageRepository.existsSync(path));
}
@OnEvent({ name: 'AppBootstrap', priority: BootstrapEventPriority.StorageService })
+113
View File
@@ -0,0 +1,113 @@
import { EventsGateway, ModuleConfigRepository } from '@futo-org/backups-orchestrator-api/dist';
import { GatewayEvent } from '@futo-org/backups-orchestrator-api/dist/events/events.gateway';
import { Injectable, OnModuleDestroy, OnModuleInit, Optional } from '@nestjs/common';
import { SystemConfig } from 'src/config';
import { StorageCore } from 'src/cores/storage.core';
import { OnEvent } from 'src/decorators';
import { DatabaseLock, ImmichWorker, StorageFolder } from 'src/enum';
import { DatabaseRepository } from 'src/repositories/database.repository';
import { ArgOf, EventRepository } from 'src/repositories/event.repository';
import { LibraryRepository } from 'src/repositories/library.repository';
import { LoggingRepository } from 'src/repositories/logging.repository';
import { WebsocketRepository } from 'src/repositories/websocket.repository';
import { AuthService } from 'src/services/auth.service';
import { getExternalDomain } from 'src/utils/misc';
@Injectable()
export class YuccaService implements OnModuleInit, OnModuleDestroy {
private lock = false;
constructor(
private readonly logger: LoggingRepository,
private readonly databaseRepository: DatabaseRepository,
private readonly libraryRepository: LibraryRepository,
private readonly authService: AuthService,
private readonly eventRepository: EventRepository,
private readonly websocketRepository: WebsocketRepository,
@Optional() private readonly moduleConfig: ModuleConfigRepository,
@Optional() private readonly eventsGateway: EventsGateway,
) {
this.onInternalEvent = this.onInternalEvent.bind(this);
}
onModuleInit() {
if (this.eventsGateway) {
this.eventsGateway.setAuthFn(async (client) =>
this.authService.authenticate({
headers: client.request.headers,
queryParams: {},
metadata: { adminRoute: true, sharedLinkRoute: false, uri: '/api/yucca/socket.io' },
}),
);
this.eventsGateway.on(this.onInternalEvent);
}
}
onModuleDestroy() {
if (this.eventsGateway) {
this.eventsGateway.off(this.onInternalEvent);
}
}
private updateSystemConfig({ server }: SystemConfig) {
this.moduleConfig.update({
externalBaseUrl: getExternalDomain(server),
});
}
private async updateLibraryConfig() {
const libraries = await this.libraryRepository.getAll();
this.moduleConfig.update({
immichIntegration: {
dataPath: StorageCore.getMediaLocation(),
dataFolders: Object.values(StorageFolder),
libraries: libraries
.filter((library) => !library.deletedAt)
.map(({ id, name, importPaths, exclusionPatterns }) => ({ id, name, importPaths, exclusionPatterns })),
},
});
}
@OnEvent({ name: 'ConfigInit', workers: [ImmichWorker.Api] })
async onConfigInit({ newConfig }: ArgOf<'ConfigInit'>) {
this.updateSystemConfig(newConfig);
void this.updateLibraryConfig();
this.lock = await this.databaseRepository.tryLock(DatabaseLock.YuccaModuleConfig);
if (this.lock) {
this.moduleConfig.acquireLock();
}
}
@OnEvent({ name: 'ConfigUpdate', workers: [ImmichWorker.Api], server: true })
onConfigUpdate({ newConfig }: ArgOf<'ConfigUpdate'>) {
void this.updateSystemConfig(newConfig);
}
@OnEvent({ name: 'LibraryCreate', workers: [ImmichWorker.Api], server: true })
onLibraryCreate() {
void this.updateLibraryConfig();
}
@OnEvent({ name: 'LibraryUpdate', workers: [ImmichWorker.Api], server: true })
onLibraryUpdate() {
void this.updateLibraryConfig();
}
@OnEvent({ name: 'LibraryDelete', workers: [ImmichWorker.Api], server: true })
onLibraryDelete() {
void this.updateLibraryConfig();
}
@OnEvent({ name: 'YuccaEvent', workers: [ImmichWorker.Api], server: true })
onYuccaEvent(event: GatewayEvent) {
this.eventsGateway.emit(event);
}
onInternalEvent(event: GatewayEvent) {
this.websocketRepository.serverSend('YuccaEvent', event);
}
}
+20
View File
@@ -0,0 +1,20 @@
export const detectMediaLocation = (mediaLocation: string | undefined, exists: (path: string) => boolean): string => {
if (mediaLocation) {
return mediaLocation;
}
const targets: string[] = [];
const candidates = ['/data', '/usr/src/app/upload'];
for (const candidate of candidates) {
if (exists(candidate)) {
targets.push(candidate);
}
}
if (targets.length === 1) {
return targets[0];
}
return '/usr/src/app/upload';
};
+1
View File
@@ -25,6 +25,7 @@
},
"dependencies": {
"@formatjs/icu-messageformat-parser": "^3.0.0",
"@futo-org/backups-orchestrator-ui": "0.3.1",
"@immich/justified-layout-wasm": "^0.4.3",
"@immich/sdk": "workspace:*",
"@immich/ui": "^0.81.1",
@@ -0,0 +1,119 @@
<script lang="ts">
import { BackupFileStatus } from '$lib/constants';
import { locale } from '$lib/stores/preferences.store';
import { getBytesWithUnit } from '$lib/utils/byte-units';
import { Card, CardBody, HStack, Icon, Stack, Text } from '@immich/ui';
import { mdiAlertCircle, mdiCheckCircle, mdiDatabaseRefreshOutline } from '@mdi/js';
import { DateTime } from 'luxon';
import type { Snippet } from 'svelte';
import { t } from 'svelte-i18n';
type Props = {
filename: string;
filesize: number;
expectedVersion: string;
timezone?: string;
showFullDate?: boolean;
class?: string;
actions?: Snippet;
};
const {
filename,
filesize,
expectedVersion,
timezone,
showFullDate = false,
class: className,
actions,
}: Props = $props();
const filesizeText = $derived(getBytesWithUnit(filesize, 1));
const backupDateTime = $derived.by(() => {
const dateMatch = filename.match(/\d+T\d+/);
if (dateMatch) {
return DateTime.fromFormat(dateMatch[0], "yyyyMMdd'T'HHmmss", { zone: timezone }).toLocal();
}
return null;
});
const dateDisplay = $derived(
backupDateTime?.toLocaleString(showFullDate ? DateTime.DATETIME_MED : DateTime.TIME_SIMPLE),
);
const relativeTime = $derived(backupDateTime?.toRelative({ locale: $locale }));
const version = $derived(filename.match(/-v(.*)-/)?.[1]);
const status = $derived.by(() => {
if (!version) {
return BackupFileStatus.UnknownVersion;
}
if (version !== expectedVersion) {
return BackupFileStatus.DifferentVersion;
}
return BackupFileStatus.OK;
});
</script>
<Card class={`dark:bg-dark-900 ${className ?? ''}`}>
<CardBody class="px-6 pt-3 pb-4">
<Stack gap={3} class="min-w-0 grow">
<div class={actions ? 'flex items-center justify-between gap-3' : ''}>
<HStack gap={2} class="min-w-0">
{#if status === BackupFileStatus.OK}
<Icon icon={mdiCheckCircle} size="18" class="text-success" />
{:else if status === BackupFileStatus.DifferentVersion}
<Icon icon={mdiAlertCircle} size="18" class="text-warning" />
{:else}
<Icon icon={mdiAlertCircle} size="18" class="text-danger" />
{/if}
{#if dateDisplay}
<Text class="font-medium" size="small">{dateDisplay}</Text>
{:else}
<Text class="font-medium" size="small">{$t('unknown_date')}</Text>
{/if}
{#if relativeTime}
<div class="flex items-center gap-2">
<div class="size-1 bg-light-500"></div>
<Text size="tiny" color="muted">{relativeTime}</Text>
</div>
{/if}
</HStack>
{#if actions}
<HStack gap={1}>
{@render actions()}
</HStack>
{/if}
</div>
<HStack>
<Icon icon={mdiDatabaseRefreshOutline} size="16" color="gray" />
<Text size="small" class="font-mono break-all">{filename}</Text>
</HStack>
{#if status === BackupFileStatus.UnknownVersion}
<Text size="small" color="danger">
{$t('admin.maintenance_restore_backup_unknown_version')}
</Text>
{:else if status === BackupFileStatus.DifferentVersion}
<Text size="small" color="warning">
{$t('admin.maintenance_restore_backup_different_version')}
</Text>
{/if}
<HStack gap={8}>
<div class="flex gap-1">
<Text size="tiny" color="muted">{$t('version')}:</Text>
<Text size="tiny" fontWeight="medium">{version ? `v${version}` : $t('unknown')}</Text>
</div>
<div class="flex gap-1">
<Text size="tiny" color="muted">{$t('size')}:</Text>
<Text size="tiny" fontWeight="medium">{filesizeText[0]} {filesizeText[1]}</Text>
</div>
</HStack>
</Stack>
</CardBody>
</Card>

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