@futo-org/backups-orchestrator-ui 1.8.1 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/backups/BackupItem.svelte +11 -0
- package/dist/components/backups/BackupStatus.svelte +23 -7
- package/dist/components/backups/BackupStatus.svelte.d.ts +2 -2
- package/dist/components/backups/BackupTaskMonitor.svelte +2 -2
- package/dist/components/backups/dialogs/CancelJobModal.svelte +59 -0
- package/dist/components/backups/dialogs/CancelJobModal.svelte.d.ts +8 -0
- package/dist/components/backups/dialogs/RemoveDeletedRepositoryModal.svelte +39 -0
- package/dist/components/backups/dialogs/RemoveDeletedRepositoryModal.svelte.d.ts +6 -0
- package/dist/components/backups/dialogs/RestoreSnapshotModal.svelte +2 -2
- package/dist/components/backups/dialogs/SelectRepositoryModal.svelte +35 -17
- package/dist/components/backups/dialogs/ViewStatusModal.svelte +63 -70
- package/dist/components/backups/dialogs/ViewStatusModal.svelte.d.ts +1 -1
- package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +2 -7
- package/dist/components/backups/run-history/RepositoryRunHistory.svelte +10 -10
- package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte +43 -18
- package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte.d.ts +2 -2
- package/dist/components/backups/run-history/RepositoryRunHistoryPage.svelte +17 -16
- package/dist/components/backups/snapshots-list/RepositorySnapshotsList.svelte +2 -2
- package/dist/components/backups/snapshots-list/RepositorySnapshotsPage.svelte +2 -2
- package/dist/components/integrations/immich/ImmichBackupSettingsPage.svelte +2 -0
- package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +7 -3
- package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +0 -1
- package/dist/components/integrations/immich/settings/ImmichSettingsSchedule.svelte +0 -1
- package/dist/components/jobs/JobProgressLabel.svelte +35 -0
- package/dist/components/jobs/JobProgressLabel.svelte.d.ts +6 -0
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +4 -4
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +35 -20
- package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte.d.ts +1 -2
- package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +6 -1
- package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +7 -2
- package/dist/components/settings/GlobalSettings.svelte +2 -0
- package/dist/components/settings/SettingsSupportMode.svelte +154 -0
- package/dist/components/settings/SettingsSupportMode.svelte.d.ts +3 -0
- package/dist/components/test/dashboard/Dashboard.svelte +0 -3
- package/dist/components/util/RelativeTime.svelte +12 -11
- package/dist/components/util/RelativeTime.svelte.d.ts +1 -0
- package/dist/fetch-client.d.ts +111 -59
- package/dist/fetch-client.js +70 -49
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- package/dist/locales/en-XA.js +1 -1
- package/dist/locales/en-XA.po +222 -30
- package/dist/locales/en.js +1 -1
- package/dist/locales/en.po +223 -31
- package/dist/services/immich.integration.service.d.ts +6 -3
- package/dist/services/immich.integration.service.js +5 -4
- package/dist/services/job.service.d.ts +42 -0
- package/dist/services/job.service.js +159 -0
- package/dist/services/repository.service.d.ts +2 -2
- package/dist/services/repository.service.js +37 -2
- package/dist/services/snapshot.service.d.ts +5 -9
- package/dist/services/snapshot.service.js +2 -3
- package/dist/services/supportMode.service.d.ts +8 -0
- package/dist/services/supportMode.service.js +19 -0
- package/dist/utils/cron.d.ts +1 -0
- package/dist/utils/cron.js +18 -0
- package/dist/utils/now.d.ts +1 -0
- package/dist/utils/now.js +6 -0
- package/dist/utils/repository.d.ts +4 -0
- package/dist/utils/repository.js +15 -0
- package/dist/utils/supportMode.d.ts +2 -0
- package/dist/utils/supportMode.js +2 -0
- package/package.json +2 -2
- package/dist/components/test/dashboard/ActiveJobs.svelte +0 -393
- package/dist/components/test/dashboard/ActiveJobs.svelte.d.ts +0 -3
- package/dist/services/log.service.svelte.d.ts +0 -67
- package/dist/services/log.service.svelte.js +0 -123
- package/dist/services/runHistory.service.d.ts +0 -37
- package/dist/services/runHistory.service.js +0 -102
- package/dist/services/task.service.d.ts +0 -3
- package/dist/services/task.service.js +0 -21
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Accordion from "../ui/Accordion.svelte";
|
|
3
|
+
import OnEvents from "../util/OnEvents.svelte";
|
|
4
|
+
import {
|
|
5
|
+
maxSupportModeRuns,
|
|
6
|
+
refreshSupportMode,
|
|
7
|
+
useSupportMode,
|
|
8
|
+
useUpdateSupportMode,
|
|
9
|
+
} from "../../services/supportMode.service";
|
|
10
|
+
import {
|
|
11
|
+
Button,
|
|
12
|
+
Field,
|
|
13
|
+
HStack,
|
|
14
|
+
LoadingSpinner,
|
|
15
|
+
NumberInput,
|
|
16
|
+
Stack,
|
|
17
|
+
Switch,
|
|
18
|
+
Text,
|
|
19
|
+
} from "@immich/ui";
|
|
20
|
+
import { mdiLifebuoy } from "@mdi/js";
|
|
21
|
+
import { nextRunsDraft, toRunsDraft } from "../../utils/supportMode";
|
|
22
|
+
import { plural, t } from "svelte-i18n-lingui";
|
|
23
|
+
import { untrack } from "svelte";
|
|
24
|
+
|
|
25
|
+
const supportMode = useSupportMode();
|
|
26
|
+
const mutation = useUpdateSupportMode();
|
|
27
|
+
|
|
28
|
+
let runs = $state<number>();
|
|
29
|
+
let streamToFuto = $state(false);
|
|
30
|
+
let includePaths = $state(false);
|
|
31
|
+
let loaded = false;
|
|
32
|
+
let syncedRuns: number | undefined;
|
|
33
|
+
|
|
34
|
+
const load = () => {
|
|
35
|
+
if (!supportMode.data) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
runs = syncedRuns = toRunsDraft(supportMode.data.remainingRuns);
|
|
40
|
+
streamToFuto = supportMode.data.streamToFuto;
|
|
41
|
+
includePaths = supportMode.data.includePaths;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
$effect(() => {
|
|
45
|
+
const data = supportMode.data;
|
|
46
|
+
if (!data) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (!loaded) {
|
|
51
|
+
loaded = true;
|
|
52
|
+
untrack(load);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
runs = nextRunsDraft(
|
|
57
|
+
untrack(() => runs),
|
|
58
|
+
syncedRuns,
|
|
59
|
+
data.remainingRuns,
|
|
60
|
+
);
|
|
61
|
+
syncedRuns = toRunsDraft(data.remainingRuns);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const streamingAvailable = $derived(
|
|
65
|
+
supportMode.data?.streamingAvailable ?? false,
|
|
66
|
+
);
|
|
67
|
+
const remainingRuns = $derived(supportMode.data?.remainingRuns ?? 0);
|
|
68
|
+
|
|
69
|
+
const onSave = () => {
|
|
70
|
+
mutation.mutate({
|
|
71
|
+
remainingRuns: Math.min(
|
|
72
|
+
maxSupportModeRuns,
|
|
73
|
+
Math.max(0, Math.floor(runs ?? 0)),
|
|
74
|
+
),
|
|
75
|
+
streamToFuto: streamingAvailable && streamToFuto,
|
|
76
|
+
includePaths: streamingAvailable && streamToFuto && includePaths,
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<OnEvents onJobUpdate={refreshSupportMode} />
|
|
82
|
+
|
|
83
|
+
<Accordion
|
|
84
|
+
title={$t`Support mode`}
|
|
85
|
+
subtitle={$t`Record detailed logs to help FUTO support look into a problem.`}
|
|
86
|
+
icon={mdiLifebuoy}
|
|
87
|
+
>
|
|
88
|
+
<Stack gap={4} class="pt-2">
|
|
89
|
+
{#if supportMode.isLoading}
|
|
90
|
+
<LoadingSpinner />
|
|
91
|
+
{:else}
|
|
92
|
+
<div aria-live="polite">
|
|
93
|
+
<Text size="small" color="muted">
|
|
94
|
+
{#if remainingRuns > 0}
|
|
95
|
+
{$plural(remainingRuns, {
|
|
96
|
+
one: "Support mode is on for the next run.",
|
|
97
|
+
other: "Support mode is on for the next # runs.",
|
|
98
|
+
})}
|
|
99
|
+
{:else}
|
|
100
|
+
{$t`Support mode is off.`}
|
|
101
|
+
{/if}
|
|
102
|
+
</Text>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<Field
|
|
106
|
+
label={$t`Runs in support mode`}
|
|
107
|
+
description={$t`The next backups, cleanups and restores record detailed logs, which you can download from their history. Support mode turns itself off once they have run.`}
|
|
108
|
+
color="primary"
|
|
109
|
+
>
|
|
110
|
+
<NumberInput
|
|
111
|
+
bind:value={runs}
|
|
112
|
+
min={0}
|
|
113
|
+
max={maxSupportModeRuns}
|
|
114
|
+
step={1}
|
|
115
|
+
placeholder={$t`Off`}
|
|
116
|
+
/>
|
|
117
|
+
</Field>
|
|
118
|
+
|
|
119
|
+
{#if streamingAvailable}
|
|
120
|
+
<Field
|
|
121
|
+
label={$t`Send logs to FUTO`}
|
|
122
|
+
description={$t`Stream the detailed logs to FUTO while each run happens, so support can read them. Runs with a lot of files produce a lot of logs.`}
|
|
123
|
+
color="primary"
|
|
124
|
+
>
|
|
125
|
+
<Switch bind:checked={streamToFuto} />
|
|
126
|
+
</Field>
|
|
127
|
+
|
|
128
|
+
{#if streamToFuto}
|
|
129
|
+
<Field
|
|
130
|
+
label={$t`Include file names`}
|
|
131
|
+
description={$t`Send file and folder names as they are. When off, they are replaced with placeholders before they leave this server.`}
|
|
132
|
+
color="primary"
|
|
133
|
+
>
|
|
134
|
+
<Switch bind:checked={includePaths} />
|
|
135
|
+
</Field>
|
|
136
|
+
{/if}
|
|
137
|
+
{/if}
|
|
138
|
+
|
|
139
|
+
<HStack gap={2} class="justify-end">
|
|
140
|
+
<Button
|
|
141
|
+
shape="round"
|
|
142
|
+
color="secondary"
|
|
143
|
+
disabled={mutation.isPending}
|
|
144
|
+
onclick={load}
|
|
145
|
+
>
|
|
146
|
+
{$t`Reset`}
|
|
147
|
+
</Button>
|
|
148
|
+
<Button shape="round" loading={mutation.isPending} onclick={onSave}>
|
|
149
|
+
{$t`Save`}
|
|
150
|
+
</Button>
|
|
151
|
+
</HStack>
|
|
152
|
+
{/if}
|
|
153
|
+
</Stack>
|
|
154
|
+
</Accordion>
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
useRepositoryEventHandler,
|
|
18
18
|
} from "../../../services/repository.service";
|
|
19
19
|
import OnEvents from "../../util/OnEvents.svelte";
|
|
20
|
-
import ActiveJobs from "./ActiveJobs.svelte";
|
|
21
20
|
import BackupHealth from "./BackupHealth.svelte";
|
|
22
21
|
import BackupStats from "./BackupStats.svelte";
|
|
23
22
|
import RecentBackups from "./RecentBackups.svelte";
|
|
@@ -64,8 +63,6 @@
|
|
|
64
63
|
|
|
65
64
|
<BackupStats repositories={query.data} />
|
|
66
65
|
|
|
67
|
-
<ActiveJobs />
|
|
68
|
-
|
|
69
66
|
<RecentBackups
|
|
70
67
|
repositories={query.data}
|
|
71
68
|
onNavigate={onNavigate ? () => onNavigate("backups") : undefined}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { now } from "../../utils/now";
|
|
2
3
|
import { DateTime } from "luxon";
|
|
3
|
-
import { onDestroy, onMount } from "svelte";
|
|
4
4
|
import { gt } from "svelte-i18n-lingui";
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
7
|
time: string;
|
|
8
|
+
absolute?: boolean;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const props: Props = $props();
|
|
11
12
|
|
|
12
|
-
const
|
|
13
|
+
const text = $derived.by(() => {
|
|
13
14
|
const time = DateTime.fromISO(props.time);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
let text = $state(format());
|
|
18
|
-
|
|
19
|
-
let interval: ReturnType<typeof setInterval>;
|
|
15
|
+
const base = DateTime.fromMillis($now);
|
|
16
|
+
return base.diff(time).as('minute') < 1 ? gt`a moment ago` : time.toRelative({ base });
|
|
17
|
+
});
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const timestamp = $derived(
|
|
20
|
+
DateTime.fromISO(props.time).toLocaleString(DateTime.DATETIME_MED),
|
|
21
|
+
);
|
|
23
22
|
</script>
|
|
24
23
|
|
|
25
|
-
{text}
|
|
24
|
+
<time datetime={props.time} title={props.absolute ? text : timestamp}
|
|
25
|
+
>{props.absolute ? timestamp : text}</time
|
|
26
|
+
>
|
package/dist/fetch-client.d.ts
CHANGED
|
@@ -147,16 +147,56 @@ export type ScheduleDto = {
|
|
|
147
147
|
lastRun?: string;
|
|
148
148
|
lastFinished?: string;
|
|
149
149
|
};
|
|
150
|
-
export type
|
|
151
|
-
export type
|
|
152
|
-
export type
|
|
150
|
+
export type YuccaJobName = "repository-backup" | "repository-prune" | "repository-restore" | "repository-restore-from-point" | "repository-snapshot-forget" | "repository-sync-metrics";
|
|
151
|
+
export type YuccaJobStatus = "queued" | "running" | "complete" | "warn" | "failed" | "cancelled" | "incomplete";
|
|
152
|
+
export type JobProgressDto = {
|
|
153
|
+
percentDone: number;
|
|
154
|
+
scanning: boolean;
|
|
155
|
+
estimatedEndAt?: string;
|
|
156
|
+
bytesDone?: number;
|
|
157
|
+
totalBytes?: number;
|
|
158
|
+
currentFiles: string[];
|
|
159
|
+
};
|
|
160
|
+
export type JobSummaryDto = {
|
|
161
|
+
"type": "backup";
|
|
162
|
+
filesNew: number;
|
|
163
|
+
filesChanged: number;
|
|
164
|
+
totalFilesProcessed: number;
|
|
165
|
+
totalBytesProcessed: number;
|
|
166
|
+
snapshotId?: string;
|
|
167
|
+
} | {
|
|
168
|
+
"type": "restore";
|
|
169
|
+
filesRestored: number;
|
|
170
|
+
filesSkipped: number;
|
|
171
|
+
bytesRestored: number;
|
|
172
|
+
} | {
|
|
173
|
+
"type": "prune";
|
|
174
|
+
kept: number;
|
|
175
|
+
removed: number;
|
|
176
|
+
};
|
|
177
|
+
export type JobSupportDto = {
|
|
178
|
+
/** Support code to share with FUTO when the logs were streamed */
|
|
179
|
+
sessionId?: string;
|
|
180
|
+
/** Log lines that could not be streamed in time */
|
|
181
|
+
droppedLines: number;
|
|
182
|
+
/** Log lines that could not be written to the local support log */
|
|
183
|
+
localDroppedLines: number;
|
|
184
|
+
};
|
|
185
|
+
export type JobOutcomeDto = {
|
|
186
|
+
errors: string[];
|
|
187
|
+
summary?: JobSummaryDto;
|
|
188
|
+
support?: JobSupportDto;
|
|
189
|
+
};
|
|
190
|
+
export type JobDto = {
|
|
153
191
|
id: string;
|
|
192
|
+
name: YuccaJobName;
|
|
154
193
|
repositoryId: string;
|
|
155
|
-
|
|
194
|
+
status: YuccaJobStatus;
|
|
195
|
+
queuedAt: string;
|
|
196
|
+
start?: string;
|
|
156
197
|
end?: string;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"type": RunType;
|
|
198
|
+
progress?: JobProgressDto;
|
|
199
|
+
outcome?: JobOutcomeDto;
|
|
160
200
|
};
|
|
161
201
|
export type ImmichDatabaseDumpConfigDto = {
|
|
162
202
|
enabled: boolean;
|
|
@@ -167,7 +207,7 @@ export type ImmichBackupStatusDto = {
|
|
|
167
207
|
repository?: LocalRepositoryDto;
|
|
168
208
|
backend?: BackendDto;
|
|
169
209
|
schedule?: ScheduleDto;
|
|
170
|
-
|
|
210
|
+
latestBackupJob?: JobDto;
|
|
171
211
|
databaseDump?: ImmichDatabaseDumpConfigDto;
|
|
172
212
|
databaseDumpWarningIgnored?: boolean;
|
|
173
213
|
};
|
|
@@ -195,6 +235,9 @@ export type ImmichRollbackRequestDto = {
|
|
|
195
235
|
snapshotId: string;
|
|
196
236
|
backupFileName?: string;
|
|
197
237
|
};
|
|
238
|
+
export type JobListResponseDto = {
|
|
239
|
+
jobs: JobDto[];
|
|
240
|
+
};
|
|
198
241
|
export type BootstrapStatus = "not-ready" | "ready" | "error";
|
|
199
242
|
export type TelemetryLevel = "full" | "none";
|
|
200
243
|
export type OnboardingStatusResponseDto = {
|
|
@@ -268,8 +311,12 @@ export type RepositoryUpdateRequestDto = {
|
|
|
268
311
|
export type RepositoryUpdateResponseDto = {
|
|
269
312
|
repository: LocalRepositoryDto;
|
|
270
313
|
};
|
|
271
|
-
export type
|
|
272
|
-
|
|
314
|
+
export type JobResponseDto = {
|
|
315
|
+
jobId: string;
|
|
316
|
+
};
|
|
317
|
+
export type RepositorySyncDeletionResponseDto = {
|
|
318
|
+
/** Whether the repository was deleted remotely and removed from this server */
|
|
319
|
+
deleted: boolean;
|
|
273
320
|
};
|
|
274
321
|
export type RepositoryCheckImportResponseDto = {
|
|
275
322
|
readable: boolean;
|
|
@@ -277,9 +324,6 @@ export type RepositoryCheckImportResponseDto = {
|
|
|
277
324
|
export type RepositoryPrimaryBackendReconfigureRequestDto = {
|
|
278
325
|
backendId: string;
|
|
279
326
|
};
|
|
280
|
-
export type RunHistoryResponseDto = {
|
|
281
|
-
runs: RunDto[];
|
|
282
|
-
};
|
|
283
327
|
export type ListSnapshotsResponseDto = {
|
|
284
328
|
snapshots: SnapshotDto[];
|
|
285
329
|
};
|
|
@@ -291,24 +335,6 @@ export type RepositorySnapshotRestoreFromPointRequestDto = {
|
|
|
291
335
|
yuccaConfig?: string;
|
|
292
336
|
include?: string[];
|
|
293
337
|
};
|
|
294
|
-
export type RunResponseDto = {
|
|
295
|
-
run: RunDto;
|
|
296
|
-
};
|
|
297
|
-
export type TaskType = "schedule" | "restore" | "backup" | "forget";
|
|
298
|
-
export type RunningTaskStatus = "incomplete" | "complete" | "warn" | "failed" | "cancelled";
|
|
299
|
-
export type ActiveScheduleItemDto = {
|
|
300
|
-
repositoryId: string;
|
|
301
|
-
status: RunningTaskStatus;
|
|
302
|
-
};
|
|
303
|
-
export type RunningTaskDto = {
|
|
304
|
-
parentId: string;
|
|
305
|
-
"type": TaskType;
|
|
306
|
-
logId?: string;
|
|
307
|
-
scheduleStatus?: ActiveScheduleItemDto[];
|
|
308
|
-
};
|
|
309
|
-
export type RunningTaskListResponse = {
|
|
310
|
-
tasks: RunningTaskDto[];
|
|
311
|
-
};
|
|
312
338
|
export type ScheduleCreateRequestDto = {
|
|
313
339
|
name: string;
|
|
314
340
|
paused?: boolean;
|
|
@@ -330,6 +356,24 @@ export type ScheduleUpdateRequestDto = {
|
|
|
330
356
|
export type ScheduleUpdateResponseDto = {
|
|
331
357
|
schedule: ScheduleDto;
|
|
332
358
|
};
|
|
359
|
+
export type SupportModeResponseDto = {
|
|
360
|
+
/** How many more backup, cleanup, restore and delete runs use verbose restic logging */
|
|
361
|
+
remainingRuns: number;
|
|
362
|
+
/** Stream those runs’ logs to FUTO; requires the support-log-streaming feature */
|
|
363
|
+
streamToFuto: boolean;
|
|
364
|
+
/** Send file paths as-is instead of redacted placeholders */
|
|
365
|
+
includePaths: boolean;
|
|
366
|
+
/** Whether this account may stream support logs to FUTO */
|
|
367
|
+
streamingAvailable: boolean;
|
|
368
|
+
};
|
|
369
|
+
export type SupportModeUpdateRequestDto = {
|
|
370
|
+
/** How many more backup, cleanup, restore and delete runs use verbose restic logging */
|
|
371
|
+
remainingRuns: number;
|
|
372
|
+
/** Stream those runs’ logs to FUTO; requires the support-log-streaming feature */
|
|
373
|
+
streamToFuto: boolean;
|
|
374
|
+
/** Send file paths as-is instead of redacted placeholders */
|
|
375
|
+
includePaths: boolean;
|
|
376
|
+
};
|
|
333
377
|
/**
|
|
334
378
|
* Connect a FUTO Backups account
|
|
335
379
|
*/
|
|
@@ -396,6 +440,26 @@ export declare function configureImmichDatabaseDump(configureImmichDatabaseDumpR
|
|
|
396
440
|
* Roll Immich back to a snapshot
|
|
397
441
|
*/
|
|
398
442
|
export declare function startImmichRollback(immichRollbackRequestDto: ImmichRollbackRequestDto, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
443
|
+
/**
|
|
444
|
+
* List jobs
|
|
445
|
+
*/
|
|
446
|
+
export declare function getJobs(repositoryId: string, opts?: Oazapfts.RequestOpts): Promise<JobListResponseDto>;
|
|
447
|
+
/**
|
|
448
|
+
* Get a job
|
|
449
|
+
*/
|
|
450
|
+
export declare function getJob(id: string, opts?: Oazapfts.RequestOpts): Promise<JobDto>;
|
|
451
|
+
/**
|
|
452
|
+
* Cancel a job
|
|
453
|
+
*/
|
|
454
|
+
export declare function cancelJob(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
455
|
+
/**
|
|
456
|
+
* Download a job log
|
|
457
|
+
*/
|
|
458
|
+
export declare function downloadJobLog(id: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
|
|
459
|
+
/**
|
|
460
|
+
* Download a job support log
|
|
461
|
+
*/
|
|
462
|
+
export declare function downloadJobSupportLog(id: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
|
|
399
463
|
/**
|
|
400
464
|
* Get backup onboarding status
|
|
401
465
|
*/
|
|
@@ -453,7 +517,11 @@ export declare function deleteRepository(id: string, opts?: Oazapfts.RequestOpts
|
|
|
453
517
|
/**
|
|
454
518
|
* Start a backup
|
|
455
519
|
*/
|
|
456
|
-
export declare function createBackup(id: string, opts?: Oazapfts.RequestOpts): Promise<
|
|
520
|
+
export declare function createBackup(id: string, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
521
|
+
/**
|
|
522
|
+
* Sync a remote deletion
|
|
523
|
+
*/
|
|
524
|
+
export declare function syncRepositoryDeletion(id: string, opts?: Oazapfts.RequestOpts): Promise<RepositorySyncDeletionResponseDto>;
|
|
457
525
|
/**
|
|
458
526
|
* Check a repository import
|
|
459
527
|
*/
|
|
@@ -466,10 +534,6 @@ export declare function importRepository(id: string, backend: string, opts?: Oaz
|
|
|
466
534
|
* Change the primary backend
|
|
467
535
|
*/
|
|
468
536
|
export declare function reconfigureRepositoryPrimaryBackend(id: string, repositoryPrimaryBackendReconfigureRequestDto: RepositoryPrimaryBackendReconfigureRequestDto, opts?: Oazapfts.RequestOpts): Promise<RepositoryCreateResponseDto>;
|
|
469
|
-
/**
|
|
470
|
-
* List backup runs
|
|
471
|
-
*/
|
|
472
|
-
export declare function getRunHistory(id: string, opts?: Oazapfts.RequestOpts): Promise<RunHistoryResponseDto>;
|
|
473
537
|
/**
|
|
474
538
|
* List snapshots
|
|
475
539
|
*/
|
|
@@ -477,11 +541,11 @@ export declare function getSnapshots(id: string, opts?: Oazapfts.RequestOpts): P
|
|
|
477
541
|
/**
|
|
478
542
|
* Prune a repository
|
|
479
543
|
*/
|
|
480
|
-
export declare function pruneRepository(id: string, opts?: Oazapfts.RequestOpts): Promise<
|
|
544
|
+
export declare function pruneRepository(id: string, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
481
545
|
/**
|
|
482
546
|
* Restore a snapshot
|
|
483
547
|
*/
|
|
484
|
-
export declare function restoreSnapshot(id: string, snapshot: string, repositorySnapshotRestoreRequestDto: RepositorySnapshotRestoreRequestDto, opts?: Oazapfts.RequestOpts): Promise<
|
|
548
|
+
export declare function restoreSnapshot(id: string, snapshot: string, repositorySnapshotRestoreRequestDto: RepositorySnapshotRestoreRequestDto, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
485
549
|
/**
|
|
486
550
|
* Delete a snapshot
|
|
487
551
|
*/
|
|
@@ -489,33 +553,13 @@ export declare function forgetSnapshot(id: string, snapshot: string, opts?: Oaza
|
|
|
489
553
|
/**
|
|
490
554
|
* Restore from snapshot
|
|
491
555
|
*/
|
|
492
|
-
export declare function restoreFromPoint(id: string, snapshot: string, backend: string, repositorySnapshotRestoreFromPointRequestDto: RepositorySnapshotRestoreFromPointRequestDto, opts?: Oazapfts.RequestOpts): Promise<
|
|
556
|
+
export declare function restoreFromPoint(id: string, snapshot: string, backend: string, repositorySnapshotRestoreFromPointRequestDto: RepositorySnapshotRestoreFromPointRequestDto, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
493
557
|
/**
|
|
494
558
|
* List snapshot files
|
|
495
559
|
*/
|
|
496
560
|
export declare function getSnapshotListing(id: string, snapshot: string, { path }?: {
|
|
497
561
|
path?: string;
|
|
498
562
|
}, opts?: Oazapfts.RequestOpts): Promise<FilesystemListingResponseDto>;
|
|
499
|
-
/**
|
|
500
|
-
* Get a run
|
|
501
|
-
*/
|
|
502
|
-
export declare function getRun(id: string, opts?: Oazapfts.RequestOpts): Promise<RunResponseDto>;
|
|
503
|
-
/**
|
|
504
|
-
* Download a run log
|
|
505
|
-
*/
|
|
506
|
-
export declare function downloadRunLog(id: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
|
|
507
|
-
/**
|
|
508
|
-
* Stream a run log
|
|
509
|
-
*/
|
|
510
|
-
export declare function logStreamSse(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
511
|
-
/**
|
|
512
|
-
* List running tasks
|
|
513
|
-
*/
|
|
514
|
-
export declare function getRunningTasks(opts?: Oazapfts.RequestOpts): Promise<RunningTaskListResponse>;
|
|
515
|
-
/**
|
|
516
|
-
* Cancel a task
|
|
517
|
-
*/
|
|
518
|
-
export declare function cancelTask(parentId: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
519
563
|
/**
|
|
520
564
|
* Create a schedule
|
|
521
565
|
*/
|
|
@@ -532,3 +576,11 @@ export declare function updateSchedule(id: string, scheduleUpdateRequestDto: Sch
|
|
|
532
576
|
* Delete a schedule
|
|
533
577
|
*/
|
|
534
578
|
export declare function removeSchedule(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
579
|
+
/**
|
|
580
|
+
* Get support mode
|
|
581
|
+
*/
|
|
582
|
+
export declare function getSupportMode(opts?: Oazapfts.RequestOpts): Promise<SupportModeResponseDto>;
|
|
583
|
+
/**
|
|
584
|
+
* Update support mode
|
|
585
|
+
*/
|
|
586
|
+
export declare function updateSupportMode(supportModeUpdateRequestDto: SupportModeUpdateRequestDto, opts?: Oazapfts.RequestOpts): Promise<SupportModeResponseDto>;
|
package/dist/fetch-client.js
CHANGED
|
@@ -158,6 +158,49 @@ export function startImmichRollback(immichRollbackRequestDto, opts) {
|
|
|
158
158
|
body: immichRollbackRequestDto
|
|
159
159
|
})));
|
|
160
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* List jobs
|
|
163
|
+
*/
|
|
164
|
+
export function getJobs(repositoryId, opts) {
|
|
165
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/jobs${QS.query(QS.explode({
|
|
166
|
+
repositoryId
|
|
167
|
+
}))}`, {
|
|
168
|
+
...opts
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get a job
|
|
173
|
+
*/
|
|
174
|
+
export function getJob(id, opts) {
|
|
175
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/jobs/${encodeURIComponent(id)}`, {
|
|
176
|
+
...opts
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Cancel a job
|
|
181
|
+
*/
|
|
182
|
+
export function cancelJob(id, opts) {
|
|
183
|
+
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/jobs/${encodeURIComponent(id)}`, {
|
|
184
|
+
...opts,
|
|
185
|
+
method: "DELETE"
|
|
186
|
+
}));
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Download a job log
|
|
190
|
+
*/
|
|
191
|
+
export function downloadJobLog(id, opts) {
|
|
192
|
+
return oazapfts.ok(oazapfts.fetchBlob(`/api/yucca/jobs/${encodeURIComponent(id)}/download`, {
|
|
193
|
+
...opts
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Download a job support log
|
|
198
|
+
*/
|
|
199
|
+
export function downloadJobSupportLog(id, opts) {
|
|
200
|
+
return oazapfts.ok(oazapfts.fetchBlob(`/api/yucca/jobs/${encodeURIComponent(id)}/support-log/download`, {
|
|
201
|
+
...opts
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
161
204
|
/**
|
|
162
205
|
* Get backup onboarding status
|
|
163
206
|
*/
|
|
@@ -280,6 +323,15 @@ export function createBackup(id, opts) {
|
|
|
280
323
|
method: "POST"
|
|
281
324
|
}));
|
|
282
325
|
}
|
|
326
|
+
/**
|
|
327
|
+
* Sync a remote deletion
|
|
328
|
+
*/
|
|
329
|
+
export function syncRepositoryDeletion(id, opts) {
|
|
330
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/sync-deletion`, {
|
|
331
|
+
...opts,
|
|
332
|
+
method: "POST"
|
|
333
|
+
}));
|
|
334
|
+
}
|
|
283
335
|
/**
|
|
284
336
|
* Check a repository import
|
|
285
337
|
*/
|
|
@@ -311,14 +363,6 @@ export function reconfigureRepositoryPrimaryBackend(id, repositoryPrimaryBackend
|
|
|
311
363
|
body: repositoryPrimaryBackendReconfigureRequestDto
|
|
312
364
|
})));
|
|
313
365
|
}
|
|
314
|
-
/**
|
|
315
|
-
* List backup runs
|
|
316
|
-
*/
|
|
317
|
-
export function getRunHistory(id, opts) {
|
|
318
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/runs`, {
|
|
319
|
-
...opts
|
|
320
|
-
}));
|
|
321
|
-
}
|
|
322
366
|
/**
|
|
323
367
|
* List snapshots
|
|
324
368
|
*/
|
|
@@ -377,47 +421,6 @@ export function getSnapshotListing(id, snapshot, { path } = {}, opts) {
|
|
|
377
421
|
...opts
|
|
378
422
|
}));
|
|
379
423
|
}
|
|
380
|
-
/**
|
|
381
|
-
* Get a run
|
|
382
|
-
*/
|
|
383
|
-
export function getRun(id, opts) {
|
|
384
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/logs/${encodeURIComponent(id)}`, {
|
|
385
|
-
...opts
|
|
386
|
-
}));
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Download a run log
|
|
390
|
-
*/
|
|
391
|
-
export function downloadRunLog(id, opts) {
|
|
392
|
-
return oazapfts.ok(oazapfts.fetchBlob(`/api/yucca/logs/${encodeURIComponent(id)}/download`, {
|
|
393
|
-
...opts
|
|
394
|
-
}));
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Stream a run log
|
|
398
|
-
*/
|
|
399
|
-
export function logStreamSse(id, opts) {
|
|
400
|
-
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/logs/${encodeURIComponent(id)}/stream`, {
|
|
401
|
-
...opts
|
|
402
|
-
}));
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* List running tasks
|
|
406
|
-
*/
|
|
407
|
-
export function getRunningTasks(opts) {
|
|
408
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/tasks", {
|
|
409
|
-
...opts
|
|
410
|
-
}));
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Cancel a task
|
|
414
|
-
*/
|
|
415
|
-
export function cancelTask(parentId, opts) {
|
|
416
|
-
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/tasks/${encodeURIComponent(parentId)}/cancel`, {
|
|
417
|
-
...opts,
|
|
418
|
-
method: "POST"
|
|
419
|
-
}));
|
|
420
|
-
}
|
|
421
424
|
/**
|
|
422
425
|
* Create a schedule
|
|
423
426
|
*/
|
|
@@ -455,3 +458,21 @@ export function removeSchedule(id, opts) {
|
|
|
455
458
|
method: "DELETE"
|
|
456
459
|
}));
|
|
457
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* Get support mode
|
|
463
|
+
*/
|
|
464
|
+
export function getSupportMode(opts) {
|
|
465
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/support-mode", {
|
|
466
|
+
...opts
|
|
467
|
+
}));
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Update support mode
|
|
471
|
+
*/
|
|
472
|
+
export function updateSupportMode(supportModeUpdateRequestDto, opts) {
|
|
473
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/support-mode", oazapfts.json({
|
|
474
|
+
...opts,
|
|
475
|
+
method: "PUT",
|
|
476
|
+
body: supportModeUpdateRequestDto
|
|
477
|
+
})));
|
|
478
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,14 +29,12 @@ export * as sdk from './fetch-client';
|
|
|
29
29
|
export * from './services/backend.service';
|
|
30
30
|
export * from './services/filesystem.service';
|
|
31
31
|
export * from './services/integrations.service';
|
|
32
|
-
export * from './services/
|
|
32
|
+
export * from './services/job.service';
|
|
33
33
|
export * from './services/metricsHistory.service';
|
|
34
34
|
export * from './services/onboarding.service';
|
|
35
35
|
export * from './services/repository.service';
|
|
36
|
-
export * from './services/runHistory.service';
|
|
37
36
|
export * from './services/schedule.service';
|
|
38
37
|
export * from './services/snapshot.service';
|
|
39
|
-
export * from './services/task.service';
|
|
40
38
|
export { events, SocketEvent } from './events';
|
|
41
39
|
export { queryClient } from './query-client';
|
|
42
40
|
export { defaultMessages, loadMessages } from './i18n';
|
package/dist/index.js
CHANGED
|
@@ -29,14 +29,12 @@ export * as sdk from './fetch-client';
|
|
|
29
29
|
export * from './services/backend.service';
|
|
30
30
|
export * from './services/filesystem.service';
|
|
31
31
|
export * from './services/integrations.service';
|
|
32
|
-
export * from './services/
|
|
32
|
+
export * from './services/job.service';
|
|
33
33
|
export * from './services/metricsHistory.service';
|
|
34
34
|
export * from './services/onboarding.service';
|
|
35
35
|
export * from './services/repository.service';
|
|
36
|
-
export * from './services/runHistory.service';
|
|
37
36
|
export * from './services/schedule.service';
|
|
38
37
|
export * from './services/snapshot.service';
|
|
39
|
-
export * from './services/task.service';
|
|
40
38
|
export { events, SocketEvent } from './events';
|
|
41
39
|
export { queryClient } from './query-client';
|
|
42
40
|
export { defaultMessages, loadMessages } from './i18n';
|