@futo-org/backups-orchestrator-ui 1.8.1 → 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.
Files changed (69) hide show
  1. package/dist/components/backups/BackupItem.svelte +11 -0
  2. package/dist/components/backups/BackupStatus.svelte +16 -6
  3. package/dist/components/backups/BackupStatus.svelte.d.ts +1 -2
  4. package/dist/components/backups/BackupTaskMonitor.svelte +2 -2
  5. package/dist/components/backups/dialogs/CancelJobModal.svelte +59 -0
  6. package/dist/components/backups/dialogs/CancelJobModal.svelte.d.ts +8 -0
  7. package/dist/components/backups/dialogs/RemoveDeletedRepositoryModal.svelte +39 -0
  8. package/dist/components/backups/dialogs/RemoveDeletedRepositoryModal.svelte.d.ts +6 -0
  9. package/dist/components/backups/dialogs/RestoreSnapshotModal.svelte +2 -2
  10. package/dist/components/backups/dialogs/SelectRepositoryModal.svelte +35 -17
  11. package/dist/components/backups/dialogs/ViewStatusModal.svelte +61 -62
  12. package/dist/components/backups/dialogs/ViewStatusModal.svelte.d.ts +1 -1
  13. package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +2 -7
  14. package/dist/components/backups/run-history/RepositoryRunHistory.svelte +10 -10
  15. package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte +43 -18
  16. package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte.d.ts +2 -2
  17. package/dist/components/backups/run-history/RepositoryRunHistoryPage.svelte +17 -16
  18. package/dist/components/backups/snapshots-list/RepositorySnapshotsList.svelte +2 -2
  19. package/dist/components/backups/snapshots-list/RepositorySnapshotsPage.svelte +2 -2
  20. package/dist/components/integrations/immich/ImmichBackupSettingsPage.svelte +2 -0
  21. package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +7 -3
  22. package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +0 -1
  23. package/dist/components/integrations/immich/settings/ImmichSettingsSchedule.svelte +0 -1
  24. package/dist/components/jobs/JobProgressLabel.svelte +30 -0
  25. package/dist/components/jobs/JobProgressLabel.svelte.d.ts +6 -0
  26. package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +4 -4
  27. package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +32 -20
  28. package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte.d.ts +1 -2
  29. package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +6 -1
  30. package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +7 -2
  31. package/dist/components/settings/GlobalSettings.svelte +2 -0
  32. package/dist/components/settings/SettingsSupportMode.svelte +154 -0
  33. package/dist/components/settings/SettingsSupportMode.svelte.d.ts +3 -0
  34. package/dist/components/test/dashboard/Dashboard.svelte +0 -3
  35. package/dist/components/util/RelativeTime.svelte +8 -1
  36. package/dist/components/util/RelativeTime.svelte.d.ts +1 -0
  37. package/dist/fetch-client.d.ts +110 -59
  38. package/dist/fetch-client.js +70 -49
  39. package/dist/index.d.ts +1 -3
  40. package/dist/index.js +1 -3
  41. package/dist/locales/en-XA.js +1 -1
  42. package/dist/locales/en-XA.po +209 -30
  43. package/dist/locales/en.js +1 -1
  44. package/dist/locales/en.po +210 -31
  45. package/dist/services/immich.integration.service.d.ts +6 -3
  46. package/dist/services/immich.integration.service.js +5 -4
  47. package/dist/services/job.service.d.ts +42 -0
  48. package/dist/services/job.service.js +146 -0
  49. package/dist/services/repository.service.d.ts +2 -2
  50. package/dist/services/repository.service.js +37 -2
  51. package/dist/services/snapshot.service.d.ts +5 -9
  52. package/dist/services/snapshot.service.js +2 -3
  53. package/dist/services/supportMode.service.d.ts +8 -0
  54. package/dist/services/supportMode.service.js +19 -0
  55. package/dist/utils/cron.d.ts +1 -0
  56. package/dist/utils/cron.js +18 -0
  57. package/dist/utils/repository.d.ts +4 -0
  58. package/dist/utils/repository.js +15 -0
  59. package/dist/utils/supportMode.d.ts +2 -0
  60. package/dist/utils/supportMode.js +2 -0
  61. package/package.json +2 -2
  62. package/dist/components/test/dashboard/ActiveJobs.svelte +0 -393
  63. package/dist/components/test/dashboard/ActiveJobs.svelte.d.ts +0 -3
  64. package/dist/services/log.service.svelte.d.ts +0 -67
  65. package/dist/services/log.service.svelte.js +0 -123
  66. package/dist/services/runHistory.service.d.ts +0 -37
  67. package/dist/services/runHistory.service.js +0 -102
  68. package/dist/services/task.service.d.ts +0 -3
  69. package/dist/services/task.service.js +0 -21
@@ -1,393 +0,0 @@
1
- <script lang="ts">
2
- import type { SocketEvent } from "../../../events";
3
- import type { RunningTaskDto } from "../../../fetch-client";
4
- import {
5
- handleCancelTask,
6
- handleGetRunningTasks,
7
- } from "../../../services/task.service";
8
- import { useRepositories } from "../../../services/repository.service";
9
- import { useSchedules } from "../../../services/schedule.service";
10
- import {
11
- createLogObserver,
12
- type LogStatus,
13
- } from "../../../services/log.service.svelte";
14
- import {
15
- Badge,
16
- Button,
17
- Card,
18
- CardBody,
19
- HStack,
20
- Icon,
21
- modalManager,
22
- ProgressBar,
23
- Text,
24
- } from "@immich/ui";
25
- import {
26
- mdiAlertCircleOutline,
27
- mdiCheckCircleOutline,
28
- mdiClockOutline,
29
- mdiLoading,
30
- mdiStopCircleOutline,
31
- mdiTextBoxOutline,
32
- } from "@mdi/js";
33
- import { onDestroy, onMount } from "svelte";
34
- import { SvelteMap } from "svelte/reactivity";
35
- import OnEvents from "../../util/OnEvents.svelte";
36
- import RelativeTime from "../../util/RelativeTime.svelte";
37
- import ViewStatusModal from "../../backups/dialogs/ViewStatusModal.svelte";
38
-
39
- const LINGER_MS = 3000;
40
- const FADE_MS = 600;
41
-
42
- type LiveTask = RunningTaskDto & {
43
- startedAt: string;
44
- completedAt?: string;
45
- fading?: boolean;
46
- };
47
-
48
- let tasks = new SvelteMap<string, LiveTask>();
49
-
50
- const repositoriesQuery = useRepositories();
51
- const schedulesQuery = useSchedules();
52
-
53
- const logObservers = new Map<string, ReturnType<typeof createLogObserver>>();
54
- const timers = new Map<string, ReturnType<typeof setTimeout>[]>();
55
-
56
- const getRepoName = (id: string) =>
57
- repositoriesQuery.data?.find((repository) => repository.id === id)?.name ??
58
- id;
59
- const getScheduleName = (id: string) =>
60
- schedulesQuery.data?.find((schedule) => schedule.id === id)?.name ?? id;
61
-
62
- const ensureLogObserver = (logId: string) => {
63
- if (!logObservers.has(logId)) {
64
- logObservers.set(logId, createLogObserver(logId));
65
- }
66
-
67
- return logObservers.get(logId)!;
68
- };
69
-
70
- $effect(() => {
71
- for (const task of tasks.values()) {
72
- if (task.logId && !task.completedAt) {
73
- ensureLogObserver(task.logId);
74
- }
75
- }
76
- });
77
-
78
- const getLogStatus = (logId?: string): LogStatus | undefined => {
79
- if (!logId) return undefined;
80
- return logObservers.get(logId)?.status;
81
- };
82
-
83
- const taskName = (task: LiveTask) =>
84
- task.type === "schedule"
85
- ? getScheduleName(task.parentId)
86
- : getRepoName(task.parentId);
87
-
88
- const hasFailedItems = (task: LiveTask) =>
89
- task.scheduleStatus?.some((item) => item.status === "failed") ?? false;
90
-
91
- const hasWarnItems = (task: LiveTask) =>
92
- task.scheduleStatus?.some((item) => item.status === "warn") ?? false;
93
-
94
- const statusColor = (task: LiveTask) =>
95
- !task.completedAt
96
- ? "var(--immich-ui-warning-500)"
97
- : hasFailedItems(task)
98
- ? "var(--immich-ui-danger-500)"
99
- : hasWarnItems(task)
100
- ? "var(--immich-ui-warning-500)"
101
- : "var(--immich-ui-success-500)";
102
-
103
- onMount(async () => {
104
- const taskData = await handleGetRunningTasks();
105
-
106
- const now = new Date().toISOString();
107
- for (const task of taskData.tasks) {
108
- tasks.set(task.parentId, { ...task, startedAt: now });
109
- }
110
- });
111
-
112
- onDestroy(() => {
113
- for (const observer of logObservers.values()) {
114
- observer.destroy();
115
- }
116
- for (const bucket of timers.values()) {
117
- for (const timer of bucket) clearTimeout(timer);
118
- }
119
- });
120
-
121
- const onTaskStart = (event: SocketEvent<{ task: RunningTaskDto }>) => {
122
- const task = event.data.task;
123
- tasks.set(task.parentId, {
124
- ...task,
125
- startedAt: new Date().toISOString(),
126
- });
127
- };
128
-
129
- const onTaskUpdate = (
130
- event: SocketEvent<{ parentId: string; task: Partial<RunningTaskDto> }>,
131
- ) => {
132
- const existing = tasks.get(event.data.parentId);
133
- if (existing) {
134
- tasks.set(event.data.parentId, { ...existing, ...event.data.task });
135
- }
136
- };
137
-
138
- const onTaskEnd = (event: SocketEvent<{ parentId: string }>) => {
139
- const id = event.data.parentId;
140
- const existing = tasks.get(id);
141
- if (!existing) return;
142
-
143
- if (existing.logId && logObservers.has(existing.logId)) {
144
- logObservers.get(existing.logId)!.destroy();
145
- logObservers.delete(existing.logId);
146
- }
147
-
148
- tasks.set(id, { ...existing, completedAt: new Date().toISOString() });
149
-
150
- const lingerTimer = setTimeout(() => {
151
- const task = tasks.get(id);
152
- if (task) {
153
- tasks.set(id, { ...task, fading: true });
154
- }
155
- const fadeTimer = setTimeout(() => tasks.delete(id), FADE_MS);
156
- bucket.push(fadeTimer);
157
- }, LINGER_MS);
158
- const bucket = [lingerTimer];
159
- timers.set(id, bucket);
160
- };
161
-
162
- const shouldDisplay = (task: LiveTask) => {
163
- if (
164
- task.type === "backup" &&
165
- tasks
166
- .values()
167
- .some((entry) =>
168
- entry.scheduleStatus?.some(
169
- (item) => item.repositoryId === task.parentId,
170
- ),
171
- )
172
- ) {
173
- return false;
174
- }
175
- return true;
176
- };
177
-
178
- const openLog = (logId: string) => {
179
- modalManager.open(ViewStatusModal, { logId });
180
- };
181
-
182
- const onCancel = (parentId: string) => handleCancelTask(parentId);
183
- </script>
184
-
185
- <OnEvents {onTaskStart} {onTaskUpdate} {onTaskEnd} />
186
-
187
- {#snippet logButton(logId: string | undefined)}
188
- {#if logId}
189
- <Button size="tiny" variant="ghost" onclick={() => openLog(logId)}>
190
- <Icon icon={mdiTextBoxOutline} size="14" />
191
- Log
192
- </Button>
193
- {/if}
194
- {/snippet}
195
-
196
- {#snippet scheduleItems(task: LiveTask, compact: boolean)}
197
- {#if task.scheduleStatus}
198
- <div class="flex flex-col gap-2 pl-7">
199
- {#each task.scheduleStatus as item (item.repositoryId)}
200
- {@const subTask = compact ? undefined : tasks.get(item.repositoryId)}
201
- {@const subLog =
202
- !compact && subTask?.logId ? getLogStatus(subTask.logId) : undefined}
203
- <div class="flex flex-col gap-1">
204
- <HStack class="items-center justify-between">
205
- <HStack class="items-center gap-2">
206
- {#if item.status === "complete"}
207
- <Icon
208
- icon={mdiCheckCircleOutline}
209
- size="16"
210
- class="text-green-500"
211
- />
212
- {:else if item.status === "failed"}
213
- <Icon
214
- icon={mdiAlertCircleOutline}
215
- size="16"
216
- class="text-danger-500"
217
- />
218
- {:else if item.status === "warn"}
219
- <Icon
220
- icon={mdiCheckCircleOutline}
221
- size="16"
222
- class="text-warning-500"
223
- />
224
- {:else if subLog && subLog.progress > 0}
225
- <Icon
226
- icon={mdiLoading}
227
- size="16"
228
- class="animate-spin opacity-60"
229
- />
230
- {:else}
231
- <Icon icon={mdiClockOutline} size="16" class="opacity-40" />
232
- {/if}
233
- <Text
234
- size="small"
235
- color={item.status === "incomplete" &&
236
- !(subLog && subLog.progress > 0)
237
- ? "secondary"
238
- : undefined}
239
- >
240
- {getRepoName(item.repositoryId)}
241
- </Text>
242
- {#if item.status === "complete"}
243
- <Badge size="tiny" color="success">Done</Badge>
244
- {:else if item.status === "failed"}
245
- <Badge size="tiny" color="danger">Failed</Badge>
246
- {:else if item.status === "warn"}
247
- <Badge size="tiny" color="warning">Warnings</Badge>
248
- {:else if subLog && subLog.progress > 0}
249
- <Badge size="tiny" color="warning"
250
- >{Math.round(subLog.progress * 100)}%</Badge
251
- >
252
- {:else}
253
- <Badge size="tiny">Queued</Badge>
254
- {/if}
255
- </HStack>
256
- {#if !compact}
257
- <HStack class="items-center gap-2">
258
- {@render logButton(subTask?.logId)}
259
- {#if subTask && !subTask.completedAt}
260
- <Button
261
- size="tiny"
262
- variant="ghost"
263
- color="danger"
264
- onclick={() => onCancel(item.repositoryId)}
265
- >
266
- <Icon icon={mdiStopCircleOutline} size="14" />
267
- Cancel
268
- </Button>
269
- {/if}
270
- </HStack>
271
- {/if}
272
- </HStack>
273
- {#if !compact && subLog && subLog.progress > 0}
274
- <div class="pl-6">
275
- <ProgressBar progress={subLog.progress} size="small" />
276
- </div>
277
- {/if}
278
- </div>
279
- {/each}
280
- </div>
281
- {/if}
282
- {/snippet}
283
-
284
- {#each tasks.values() as task (task.parentId)}
285
- {#if shouldDisplay(task)}
286
- <div class="task-card" class:task-card-fading={task.fading}>
287
- <Card style="background: color-mix(in oklch, {statusColor(task)}, transparent 92%);">
288
- <CardBody class="flex flex-col gap-3">
289
- <HStack class="items-center justify-between">
290
- <HStack class="items-center gap-3">
291
- {#if task.completedAt}
292
- <Icon
293
- icon={hasFailedItems(task)
294
- ? mdiAlertCircleOutline
295
- : mdiCheckCircleOutline}
296
- size="18"
297
- class={hasFailedItems(task)
298
- ? "text-danger-500"
299
- : "text-green-500"}
300
- />
301
- {:else}
302
- <Icon
303
- icon={mdiLoading}
304
- size="18"
305
- class="animate-spin opacity-60"
306
- />
307
- {/if}
308
- <Text>
309
- {#if task.completedAt}
310
- {#if task.type === "schedule"}Finished schedule{:else if task.type === "forget"}Finished pruning{:else}Finished
311
- backup{/if}
312
- {:else if task.type === "schedule"}Running schedule{:else if task.type === "forget"}Pruning{:else}Backing
313
- up{/if}
314
- — <strong>{taskName(task)}</strong>
315
- </Text>
316
- {#if !task.completedAt && task.type === "backup"}
317
- {@const log = getLogStatus(task.logId)}
318
- {#if log && log.progress > 0}
319
- <Badge size="tiny" color="warning"
320
- >{Math.round(log.progress * 100)}%</Badge
321
- >
322
- {/if}
323
- {/if}
324
- </HStack>
325
- <HStack class="items-center gap-2">
326
- <Text color="secondary" size="tiny">
327
- {#if task.completedAt}
328
- <RelativeTime time={task.completedAt} />
329
- {:else}
330
- Started <RelativeTime time={task.startedAt} />
331
- {/if}
332
- </Text>
333
- {@render logButton(task.logId)}
334
- {#if !task.completedAt}
335
- <Button
336
- size="tiny"
337
- variant="ghost"
338
- color="danger"
339
- onclick={() => onCancel(task.parentId)}
340
- >
341
- <Icon icon={mdiStopCircleOutline} size="14" />
342
- Cancel
343
- </Button>
344
- {/if}
345
- </HStack>
346
- </HStack>
347
-
348
- {#if task.type === "schedule" && task.scheduleStatus}
349
- {#if task.completedAt}
350
- {@render scheduleItems(task, true)}
351
- {:else}
352
- {@render scheduleItems(task, false)}
353
- {/if}
354
- {/if}
355
-
356
- {#if !task.completedAt && task.type === "backup"}
357
- {@const log = getLogStatus(task.logId)}
358
- {#if log && log.progress > 0}
359
- <ProgressBar progress={log.progress} size="small" />
360
- {/if}
361
- {/if}
362
- </CardBody>
363
- </Card>
364
- </div>
365
- {/if}
366
- {/each}
367
-
368
- <style>
369
- .task-card {
370
- opacity: 1;
371
- transform: translateY(0);
372
- transition-property: opacity, transform;
373
- transition-duration: 600ms;
374
- transition-timing-function: ease-out;
375
- animation: task-enter 300ms ease-out;
376
- }
377
-
378
- .task-card-fading {
379
- opacity: 0;
380
- transform: translateY(-8px);
381
- }
382
-
383
- @keyframes task-enter {
384
- from {
385
- opacity: 0;
386
- transform: translateY(8px);
387
- }
388
- to {
389
- opacity: 1;
390
- transform: translateY(0);
391
- }
392
- }
393
- </style>
@@ -1,3 +0,0 @@
1
- declare const ActiveJobs: import("svelte").Component<Record<string, never>, {}, "">;
2
- type ActiveJobs = ReturnType<typeof ActiveJobs>;
3
- export default ActiveJobs;
@@ -1,67 +0,0 @@
1
- type SummaryEvent = {
2
- message_type: 'summary';
3
- files_new?: number;
4
- files_changed?: number;
5
- files_unmodified?: number;
6
- data_added?: number;
7
- total_files_processed?: number;
8
- total_bytes_processed?: number;
9
- total_duration?: number;
10
- snapshot_id?: string;
11
- files_restored?: number;
12
- files_skipped?: number;
13
- files_deleted?: number;
14
- total_files?: number;
15
- bytes_restored?: number;
16
- bytes_skipped?: number;
17
- total_bytes?: number;
18
- seconds_elapsed?: number;
19
- };
20
- type LogEvent = SummaryEvent | {
21
- message_type: 'error';
22
- error?: string | {
23
- message: string;
24
- };
25
- message?: string;
26
- during?: string;
27
- item?: string;
28
- } | {
29
- message_type: 'exit_error';
30
- code: number;
31
- message: string;
32
- } | {
33
- message_type: 'raw';
34
- message: string;
35
- } | {
36
- message_type: 'yucca_prune_kept';
37
- id: string;
38
- time: string;
39
- } | {
40
- message_type: 'yucca_prune_removed';
41
- id: string;
42
- time: string;
43
- } | {
44
- message_type: 'status';
45
- percent_done: number;
46
- seconds_remaining?: number;
47
- current_files?: string[];
48
- bytes_done?: number;
49
- total_bytes?: number;
50
- };
51
- export type LogStatus = {
52
- progress: number;
53
- text: string;
54
- currentFiles: string[];
55
- };
56
- export declare function createLogObserver(logId: string): {
57
- readonly status: LogStatus;
58
- readonly errors: string[];
59
- readonly events: LogEvent[];
60
- readonly summary: SummaryEvent | undefined;
61
- readonly pruned: {
62
- kept: number;
63
- removed: number;
64
- };
65
- destroy(): void;
66
- };
67
- export {};
@@ -1,123 +0,0 @@
1
- import { getProvider } from '../providers';
2
- import { formatDuration } from '../utils/format';
3
- import debounce from 'lodash.debounce';
4
- import { gt } from 'svelte-i18n-lingui';
5
- const formatErrorEvent = (event) => {
6
- const text = (typeof event.error === 'string' ? event.error : event.error?.message) ??
7
- event.message ??
8
- gt `Unknown error`;
9
- const context = [event.during, event.item].filter(Boolean).join(' ');
10
- return context ? `${context}: ${text}` : text;
11
- };
12
- export function createLogObserver(logId) {
13
- const state = $state({
14
- status: {
15
- progress: 0,
16
- text: '',
17
- currentFiles: [],
18
- },
19
- errors: [],
20
- events: [],
21
- summary: undefined,
22
- pruned: { kept: 0, removed: 0 },
23
- });
24
- const buffer = [];
25
- const flush = debounce(() => {
26
- state.status = { ...state.status };
27
- state.errors = [...state.errors];
28
- state.events = buffer.slice();
29
- }, 50, { maxWait: 100 });
30
- const onEvent = (event) => {
31
- if (event.message_type !== 'status') {
32
- buffer.unshift(event);
33
- buffer.splice(50);
34
- }
35
- switch (event.message_type) {
36
- case 'status': {
37
- state.status = {
38
- progress: event.percent_done,
39
- text: event.seconds_remaining &&
40
- (event.bytes_done && event.total_bytes
41
- ? event.bytes_done < event.total_bytes
42
- : event.percent_done < 100)
43
- ? gt({
44
- message: 'About {duration} remaining',
45
- values: {
46
- duration: formatDuration(event.seconds_remaining * 1000),
47
- },
48
- })
49
- : gt `Nearly done.`,
50
- currentFiles: event.current_files ?? [],
51
- };
52
- flush();
53
- break;
54
- }
55
- case 'summary': {
56
- state.summary = event;
57
- state.status = {
58
- progress: 1,
59
- text: '',
60
- currentFiles: [],
61
- };
62
- flush();
63
- flush.flush();
64
- break;
65
- }
66
- case 'error': {
67
- state.errors.push(formatErrorEvent(event));
68
- flush();
69
- flush.flush();
70
- break;
71
- }
72
- case 'exit_error': {
73
- state.errors.push(`restic exited with code ${event.code}: ${event.message}`);
74
- flush();
75
- flush.flush();
76
- break;
77
- }
78
- case 'raw': {
79
- state.errors.push(event.message);
80
- flush();
81
- flush.flush();
82
- break;
83
- }
84
- case 'yucca_prune_kept': {
85
- state.pruned.kept++;
86
- flush();
87
- break;
88
- }
89
- case 'yucca_prune_removed': {
90
- state.pruned.removed++;
91
- flush();
92
- break;
93
- }
94
- default: {
95
- flush();
96
- break;
97
- }
98
- }
99
- };
100
- const source = new EventSource(`${getProvider().baseUrl}/api/yucca/logs/${logId}/stream`);
101
- source.addEventListener('message', ({ data }) => onEvent(JSON.parse(data)));
102
- return {
103
- get status() {
104
- return state.status;
105
- },
106
- get errors() {
107
- return state.errors;
108
- },
109
- get events() {
110
- return state.events;
111
- },
112
- get summary() {
113
- return state.summary;
114
- },
115
- get pruned() {
116
- return state.pruned;
117
- },
118
- destroy() {
119
- flush.cancel();
120
- source.close();
121
- },
122
- };
123
- }
@@ -1,37 +0,0 @@
1
- import { sdk } from '..';
2
- import { SocketEvent } from '../events';
3
- import { type RunDto } from '../fetch-client';
4
- import { type ActionItem } from '@immich/ui';
5
- import { gt } from 'svelte-i18n-lingui';
6
- export declare const runHistoryKeys: {
7
- byRepository: (id: string) => readonly ["runHistory", string];
8
- };
9
- export declare const runKeys: {
10
- byId: (id: string) => readonly ["run", string];
11
- };
12
- export declare const useRunHistory: (repositoryId: () => string | undefined) => import("@tanstack/svelte-query").CreateQueryResult<sdk.RunDto[], Error>;
13
- export declare const useRun: (logId: string) => import("@tanstack/svelte-query").CreateQueryResult<sdk.RunDto, Error>;
14
- export declare const useRunEventHandler: () => {
15
- onRunCreate(event: SocketEvent<{
16
- run: RunDto;
17
- }>): void;
18
- onRunUpdate(event: SocketEvent<{
19
- runId: string;
20
- repositoryId: string;
21
- run: Partial<RunDto>;
22
- }>): void;
23
- };
24
- export declare const useBackupTaskMonitor: () => {
25
- onRunCreate(event: SocketEvent<{
26
- run: RunDto;
27
- }>): void;
28
- onRunUpdate(event: SocketEvent<{
29
- runId: string;
30
- run: Partial<RunDto>;
31
- }>): void;
32
- };
33
- export declare const handleGetRunHistory: (id: string) => Promise<sdk.RunHistoryResponseDto>;
34
- export declare const getRunActions: (run: RunDto, t: typeof gt) => {
35
- ViewLog: ActionItem;
36
- DownloadLog: ActionItem;
37
- };