@futo-org/backups-orchestrator-ui 1.8.0 → 1.9.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 +16 -6
- package/dist/components/backups/BackupStatus.svelte.d.ts +1 -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 +61 -62
- 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 +30 -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 +32 -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 +8 -1
- package/dist/components/util/RelativeTime.svelte.d.ts +1 -0
- package/dist/fetch-client.d.ts +110 -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 +209 -30
- package/dist/locales/en.js +1 -1
- package/dist/locales/en.po +210 -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 +146 -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/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}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
7
|
time: string;
|
|
8
|
+
absolute?: boolean;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const props: Props = $props();
|
|
@@ -16,10 +17,16 @@
|
|
|
16
17
|
|
|
17
18
|
let text = $state(format());
|
|
18
19
|
|
|
20
|
+
const timestamp = $derived(
|
|
21
|
+
DateTime.fromISO(props.time).toLocaleString(DateTime.DATETIME_MED),
|
|
22
|
+
);
|
|
23
|
+
|
|
19
24
|
let interval: ReturnType<typeof setInterval>;
|
|
20
25
|
|
|
21
26
|
onMount(() => (interval = setInterval(() => (text = format()), 1000)));
|
|
22
27
|
onDestroy(() => clearInterval(interval));
|
|
23
28
|
</script>
|
|
24
29
|
|
|
25
|
-
{text}
|
|
30
|
+
<time datetime={props.time} title={props.absolute ? text : timestamp}
|
|
31
|
+
>{props.absolute ? timestamp : text}</time
|
|
32
|
+
>
|
package/dist/fetch-client.d.ts
CHANGED
|
@@ -147,16 +147,55 @@ 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 JobName = "repository-backup" | "repository-prune" | "repository-restore" | "repository-restore-from-point" | "repository-snapshot-forget" | "repository-sync-metrics";
|
|
151
|
+
export type JobStatus = "queued" | "running" | "complete" | "warn" | "failed" | "cancelled" | "incomplete";
|
|
152
|
+
export type JobProgressDto = {
|
|
153
|
+
percentDone: number;
|
|
154
|
+
secondsRemaining?: number;
|
|
155
|
+
bytesDone?: number;
|
|
156
|
+
totalBytes?: number;
|
|
157
|
+
currentFiles: string[];
|
|
158
|
+
};
|
|
159
|
+
export type JobSummaryDto = {
|
|
160
|
+
"type": "backup";
|
|
161
|
+
filesNew: number;
|
|
162
|
+
filesChanged: number;
|
|
163
|
+
totalFilesProcessed: number;
|
|
164
|
+
totalBytesProcessed: number;
|
|
165
|
+
snapshotId?: string;
|
|
166
|
+
} | {
|
|
167
|
+
"type": "restore";
|
|
168
|
+
filesRestored: number;
|
|
169
|
+
filesSkipped: number;
|
|
170
|
+
bytesRestored: number;
|
|
171
|
+
} | {
|
|
172
|
+
"type": "prune";
|
|
173
|
+
kept: number;
|
|
174
|
+
removed: number;
|
|
175
|
+
};
|
|
176
|
+
export type JobSupportDto = {
|
|
177
|
+
/** Support code to share with FUTO when the logs were streamed */
|
|
178
|
+
sessionId?: string;
|
|
179
|
+
/** Log lines that could not be streamed in time */
|
|
180
|
+
droppedLines: number;
|
|
181
|
+
/** Log lines that could not be written to the local support log */
|
|
182
|
+
localDroppedLines: number;
|
|
183
|
+
};
|
|
184
|
+
export type JobOutcomeDto = {
|
|
185
|
+
errors: string[];
|
|
186
|
+
summary?: JobSummaryDto;
|
|
187
|
+
support?: JobSupportDto;
|
|
188
|
+
};
|
|
189
|
+
export type JobDto = {
|
|
153
190
|
id: string;
|
|
191
|
+
name: JobName;
|
|
154
192
|
repositoryId: string;
|
|
155
|
-
|
|
193
|
+
status: JobStatus;
|
|
194
|
+
queuedAt: string;
|
|
195
|
+
start?: string;
|
|
156
196
|
end?: string;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"type": RunType;
|
|
197
|
+
progress?: JobProgressDto;
|
|
198
|
+
outcome?: JobOutcomeDto;
|
|
160
199
|
};
|
|
161
200
|
export type ImmichDatabaseDumpConfigDto = {
|
|
162
201
|
enabled: boolean;
|
|
@@ -167,7 +206,7 @@ export type ImmichBackupStatusDto = {
|
|
|
167
206
|
repository?: LocalRepositoryDto;
|
|
168
207
|
backend?: BackendDto;
|
|
169
208
|
schedule?: ScheduleDto;
|
|
170
|
-
|
|
209
|
+
latestBackupJob?: JobDto;
|
|
171
210
|
databaseDump?: ImmichDatabaseDumpConfigDto;
|
|
172
211
|
databaseDumpWarningIgnored?: boolean;
|
|
173
212
|
};
|
|
@@ -195,6 +234,9 @@ export type ImmichRollbackRequestDto = {
|
|
|
195
234
|
snapshotId: string;
|
|
196
235
|
backupFileName?: string;
|
|
197
236
|
};
|
|
237
|
+
export type JobListResponseDto = {
|
|
238
|
+
jobs: JobDto[];
|
|
239
|
+
};
|
|
198
240
|
export type BootstrapStatus = "not-ready" | "ready" | "error";
|
|
199
241
|
export type TelemetryLevel = "full" | "none";
|
|
200
242
|
export type OnboardingStatusResponseDto = {
|
|
@@ -268,8 +310,12 @@ export type RepositoryUpdateRequestDto = {
|
|
|
268
310
|
export type RepositoryUpdateResponseDto = {
|
|
269
311
|
repository: LocalRepositoryDto;
|
|
270
312
|
};
|
|
271
|
-
export type
|
|
272
|
-
|
|
313
|
+
export type JobResponseDto = {
|
|
314
|
+
jobId: string;
|
|
315
|
+
};
|
|
316
|
+
export type RepositorySyncDeletionResponseDto = {
|
|
317
|
+
/** Whether the repository was deleted remotely and removed from this server */
|
|
318
|
+
deleted: boolean;
|
|
273
319
|
};
|
|
274
320
|
export type RepositoryCheckImportResponseDto = {
|
|
275
321
|
readable: boolean;
|
|
@@ -277,9 +323,6 @@ export type RepositoryCheckImportResponseDto = {
|
|
|
277
323
|
export type RepositoryPrimaryBackendReconfigureRequestDto = {
|
|
278
324
|
backendId: string;
|
|
279
325
|
};
|
|
280
|
-
export type RunHistoryResponseDto = {
|
|
281
|
-
runs: RunDto[];
|
|
282
|
-
};
|
|
283
326
|
export type ListSnapshotsResponseDto = {
|
|
284
327
|
snapshots: SnapshotDto[];
|
|
285
328
|
};
|
|
@@ -291,24 +334,6 @@ export type RepositorySnapshotRestoreFromPointRequestDto = {
|
|
|
291
334
|
yuccaConfig?: string;
|
|
292
335
|
include?: string[];
|
|
293
336
|
};
|
|
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
337
|
export type ScheduleCreateRequestDto = {
|
|
313
338
|
name: string;
|
|
314
339
|
paused?: boolean;
|
|
@@ -330,6 +355,24 @@ export type ScheduleUpdateRequestDto = {
|
|
|
330
355
|
export type ScheduleUpdateResponseDto = {
|
|
331
356
|
schedule: ScheduleDto;
|
|
332
357
|
};
|
|
358
|
+
export type SupportModeResponseDto = {
|
|
359
|
+
/** How many more backup, cleanup, restore and delete runs use verbose restic logging */
|
|
360
|
+
remainingRuns: number;
|
|
361
|
+
/** Stream those runs’ logs to FUTO; requires the support-log-streaming feature */
|
|
362
|
+
streamToFuto: boolean;
|
|
363
|
+
/** Send file paths as-is instead of redacted placeholders */
|
|
364
|
+
includePaths: boolean;
|
|
365
|
+
/** Whether this account may stream support logs to FUTO */
|
|
366
|
+
streamingAvailable: boolean;
|
|
367
|
+
};
|
|
368
|
+
export type SupportModeUpdateRequestDto = {
|
|
369
|
+
/** How many more backup, cleanup, restore and delete runs use verbose restic logging */
|
|
370
|
+
remainingRuns: number;
|
|
371
|
+
/** Stream those runs’ logs to FUTO; requires the support-log-streaming feature */
|
|
372
|
+
streamToFuto: boolean;
|
|
373
|
+
/** Send file paths as-is instead of redacted placeholders */
|
|
374
|
+
includePaths: boolean;
|
|
375
|
+
};
|
|
333
376
|
/**
|
|
334
377
|
* Connect a FUTO Backups account
|
|
335
378
|
*/
|
|
@@ -396,6 +439,26 @@ export declare function configureImmichDatabaseDump(configureImmichDatabaseDumpR
|
|
|
396
439
|
* Roll Immich back to a snapshot
|
|
397
440
|
*/
|
|
398
441
|
export declare function startImmichRollback(immichRollbackRequestDto: ImmichRollbackRequestDto, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
442
|
+
/**
|
|
443
|
+
* List jobs
|
|
444
|
+
*/
|
|
445
|
+
export declare function getJobs(repositoryId: string, opts?: Oazapfts.RequestOpts): Promise<JobListResponseDto>;
|
|
446
|
+
/**
|
|
447
|
+
* Get a job
|
|
448
|
+
*/
|
|
449
|
+
export declare function getJob(id: string, opts?: Oazapfts.RequestOpts): Promise<JobDto>;
|
|
450
|
+
/**
|
|
451
|
+
* Cancel a job
|
|
452
|
+
*/
|
|
453
|
+
export declare function cancelJob(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
454
|
+
/**
|
|
455
|
+
* Download a job log
|
|
456
|
+
*/
|
|
457
|
+
export declare function downloadJobLog(id: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
|
|
458
|
+
/**
|
|
459
|
+
* Download a job support log
|
|
460
|
+
*/
|
|
461
|
+
export declare function downloadJobSupportLog(id: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
|
|
399
462
|
/**
|
|
400
463
|
* Get backup onboarding status
|
|
401
464
|
*/
|
|
@@ -453,7 +516,11 @@ export declare function deleteRepository(id: string, opts?: Oazapfts.RequestOpts
|
|
|
453
516
|
/**
|
|
454
517
|
* Start a backup
|
|
455
518
|
*/
|
|
456
|
-
export declare function createBackup(id: string, opts?: Oazapfts.RequestOpts): Promise<
|
|
519
|
+
export declare function createBackup(id: string, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
520
|
+
/**
|
|
521
|
+
* Sync a remote deletion
|
|
522
|
+
*/
|
|
523
|
+
export declare function syncRepositoryDeletion(id: string, opts?: Oazapfts.RequestOpts): Promise<RepositorySyncDeletionResponseDto>;
|
|
457
524
|
/**
|
|
458
525
|
* Check a repository import
|
|
459
526
|
*/
|
|
@@ -466,10 +533,6 @@ export declare function importRepository(id: string, backend: string, opts?: Oaz
|
|
|
466
533
|
* Change the primary backend
|
|
467
534
|
*/
|
|
468
535
|
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
536
|
/**
|
|
474
537
|
* List snapshots
|
|
475
538
|
*/
|
|
@@ -477,11 +540,11 @@ export declare function getSnapshots(id: string, opts?: Oazapfts.RequestOpts): P
|
|
|
477
540
|
/**
|
|
478
541
|
* Prune a repository
|
|
479
542
|
*/
|
|
480
|
-
export declare function pruneRepository(id: string, opts?: Oazapfts.RequestOpts): Promise<
|
|
543
|
+
export declare function pruneRepository(id: string, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
481
544
|
/**
|
|
482
545
|
* Restore a snapshot
|
|
483
546
|
*/
|
|
484
|
-
export declare function restoreSnapshot(id: string, snapshot: string, repositorySnapshotRestoreRequestDto: RepositorySnapshotRestoreRequestDto, opts?: Oazapfts.RequestOpts): Promise<
|
|
547
|
+
export declare function restoreSnapshot(id: string, snapshot: string, repositorySnapshotRestoreRequestDto: RepositorySnapshotRestoreRequestDto, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
485
548
|
/**
|
|
486
549
|
* Delete a snapshot
|
|
487
550
|
*/
|
|
@@ -489,33 +552,13 @@ export declare function forgetSnapshot(id: string, snapshot: string, opts?: Oaza
|
|
|
489
552
|
/**
|
|
490
553
|
* Restore from snapshot
|
|
491
554
|
*/
|
|
492
|
-
export declare function restoreFromPoint(id: string, snapshot: string, backend: string, repositorySnapshotRestoreFromPointRequestDto: RepositorySnapshotRestoreFromPointRequestDto, opts?: Oazapfts.RequestOpts): Promise<
|
|
555
|
+
export declare function restoreFromPoint(id: string, snapshot: string, backend: string, repositorySnapshotRestoreFromPointRequestDto: RepositorySnapshotRestoreFromPointRequestDto, opts?: Oazapfts.RequestOpts): Promise<JobResponseDto>;
|
|
493
556
|
/**
|
|
494
557
|
* List snapshot files
|
|
495
558
|
*/
|
|
496
559
|
export declare function getSnapshotListing(id: string, snapshot: string, { path }?: {
|
|
497
560
|
path?: string;
|
|
498
561
|
}, 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
562
|
/**
|
|
520
563
|
* Create a schedule
|
|
521
564
|
*/
|
|
@@ -532,3 +575,11 @@ export declare function updateSchedule(id: string, scheduleUpdateRequestDto: Sch
|
|
|
532
575
|
* Delete a schedule
|
|
533
576
|
*/
|
|
534
577
|
export declare function removeSchedule(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
578
|
+
/**
|
|
579
|
+
* Get support mode
|
|
580
|
+
*/
|
|
581
|
+
export declare function getSupportMode(opts?: Oazapfts.RequestOpts): Promise<SupportModeResponseDto>;
|
|
582
|
+
/**
|
|
583
|
+
* Update support mode
|
|
584
|
+
*/
|
|
585
|
+
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';
|