@futo-org/backups-orchestrator-ui 0.48.0 → 0.50.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/fetch-client.d.ts +146 -1
- package/dist/fetch-client.js +144 -0
- package/package.json +22 -22
package/dist/fetch-client.d.ts
CHANGED
|
@@ -91,10 +91,11 @@ export type IntegrationsResponseDto = {
|
|
|
91
91
|
immichState?: ImmichStateDto;
|
|
92
92
|
immichIntegration?: ImmichIntegrationDto;
|
|
93
93
|
};
|
|
94
|
+
export type BackupStatus = "incomplete" | "complete" | "warn" | "failed" | "cancelled";
|
|
94
95
|
export type RepositoryMetricsDto = {
|
|
95
96
|
lastStarted?: string | null;
|
|
96
97
|
lastBackup?: string | null;
|
|
97
|
-
lastBackupStatus?: (
|
|
98
|
+
lastBackupStatus?: (BackupStatus) | null;
|
|
98
99
|
lastBackupDuration?: number | null;
|
|
99
100
|
sizeBytes: number;
|
|
100
101
|
};
|
|
@@ -327,61 +328,205 @@ export type ScheduleUpdateRequestDto = {
|
|
|
327
328
|
export type ScheduleUpdateResponseDto = {
|
|
328
329
|
schedule: ScheduleDto;
|
|
329
330
|
};
|
|
331
|
+
/**
|
|
332
|
+
* Connect a FUTO Backups account
|
|
333
|
+
*/
|
|
330
334
|
export declare function connectDeviceFlow(opts?: Oazapfts.RequestOpts): Promise<DeviceFlowEventDto>;
|
|
335
|
+
/**
|
|
336
|
+
* Sign in with FUTO Backups account
|
|
337
|
+
*/
|
|
331
338
|
export declare function sessionDeviceFlow(opts?: Oazapfts.RequestOpts): Promise<DeviceFlowEventDto>;
|
|
339
|
+
/**
|
|
340
|
+
* Create session
|
|
341
|
+
*/
|
|
332
342
|
export declare function createSession(createSessionRequestDto: CreateSessionRequestDto, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
343
|
+
/**
|
|
344
|
+
* Create a ticket
|
|
345
|
+
*/
|
|
333
346
|
export declare function createTicket(ticketCreateRequestDto: TicketCreateRequestDto, opts?: Oazapfts.RequestOpts): Promise<TicketCreateResponseDto>;
|
|
347
|
+
/**
|
|
348
|
+
* List backends
|
|
349
|
+
*/
|
|
334
350
|
export declare function getBackends(opts?: Oazapfts.RequestOpts): Promise<BackendsResponseDto>;
|
|
351
|
+
/**
|
|
352
|
+
* Create a local backend
|
|
353
|
+
*/
|
|
335
354
|
export declare function createLocalBackend(createLocalBackendRequestDto: CreateLocalBackendRequestDto, opts?: Oazapfts.RequestOpts): Promise<BackendResponseDto>;
|
|
355
|
+
/**
|
|
356
|
+
* Get backups orchestrator configuration
|
|
357
|
+
*/
|
|
336
358
|
export declare function getConfig(opts?: Oazapfts.RequestOpts): Promise<ConfigResponseDto>;
|
|
359
|
+
/**
|
|
360
|
+
* Update backups orchestrator configuration
|
|
361
|
+
*/
|
|
337
362
|
export declare function updateConfig(configUpdateRequestDto: ConfigUpdateRequestDto, opts?: Oazapfts.RequestOpts): Promise<ConfigResponseDto>;
|
|
363
|
+
/**
|
|
364
|
+
* Reset the backups orchestrator
|
|
365
|
+
*/
|
|
338
366
|
export declare function resetOrchestrator(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
367
|
+
/**
|
|
368
|
+
* List files
|
|
369
|
+
*/
|
|
339
370
|
export declare function getFileListing({ path }?: {
|
|
340
371
|
path?: string;
|
|
341
372
|
}, opts?: Oazapfts.RequestOpts): Promise<FilesystemListingResponseDto>;
|
|
373
|
+
/**
|
|
374
|
+
* Get backup integrations
|
|
375
|
+
*/
|
|
342
376
|
export declare function getIntegrations(opts?: Oazapfts.RequestOpts): Promise<IntegrationsResponseDto>;
|
|
377
|
+
/**
|
|
378
|
+
* Get Immich backup status
|
|
379
|
+
*/
|
|
343
380
|
export declare function getImmichBackupStatus(opts?: Oazapfts.RequestOpts): Promise<ImmichBackupStatusDto>;
|
|
381
|
+
/**
|
|
382
|
+
* Configure the Immich backup integration
|
|
383
|
+
*/
|
|
344
384
|
export declare function configureImmichIntegration(configureImmichIntegrationRequestDto: ConfigureImmichIntegrationRequestDto, opts?: Oazapfts.RequestOpts): Promise<ConfigureImmichIntegrationResponseDto>;
|
|
385
|
+
/**
|
|
386
|
+
* Ignore the Immich database dump warning
|
|
387
|
+
*/
|
|
345
388
|
export declare function ignoreImmichDatabaseDumpWarning(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
389
|
+
/**
|
|
390
|
+
* Configure Immich database dumps
|
|
391
|
+
*/
|
|
346
392
|
export declare function configureImmichDatabaseDump(configureImmichDatabaseDumpRequestDto: ConfigureImmichDatabaseDumpRequestDto, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
393
|
+
/**
|
|
394
|
+
* Roll Immich back to a snapshot
|
|
395
|
+
*/
|
|
347
396
|
export declare function startImmichRollback(immichRollbackRequestDto: ImmichRollbackRequestDto, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
397
|
+
/**
|
|
398
|
+
* Get backup onboarding status
|
|
399
|
+
*/
|
|
348
400
|
export declare function onboardingStatus(opts?: Oazapfts.RequestOpts): Promise<OnboardingStatusResponseDto>;
|
|
401
|
+
/**
|
|
402
|
+
* Get the backup recovery key
|
|
403
|
+
*/
|
|
349
404
|
export declare function currentRecoveryKey(opts?: Oazapfts.RequestOpts): Promise<CurrentRecoveryKeyResponse>;
|
|
405
|
+
/**
|
|
406
|
+
* Import a backup recovery key
|
|
407
|
+
*/
|
|
350
408
|
export declare function importRecoveryKey(importRecoveryKeyRequest: ImportRecoveryKeyRequest, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
409
|
+
/**
|
|
410
|
+
* Confirm the backup recovery key
|
|
411
|
+
*/
|
|
351
412
|
export declare function confirmRecoveryKey(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
413
|
+
/**
|
|
414
|
+
* Skip optional backup onboarding
|
|
415
|
+
*/
|
|
352
416
|
export declare function skipOnboardingExtraConfig(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
417
|
+
/**
|
|
418
|
+
* Enable FUTO Backups telemetry
|
|
419
|
+
*/
|
|
353
420
|
export declare function enableTelemetry(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
421
|
+
/**
|
|
422
|
+
* Report a startup error
|
|
423
|
+
*/
|
|
354
424
|
export declare function reportError(opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
425
|
+
/**
|
|
426
|
+
* Create a new backup
|
|
427
|
+
*/
|
|
355
428
|
export declare function createRepository(repositoryCreateRequestDto: RepositoryCreateRequestDto, { backend }?: {
|
|
356
429
|
backend?: string;
|
|
357
430
|
}, opts?: Oazapfts.RequestOpts): Promise<RepositoryCreateResponseDto>;
|
|
431
|
+
/**
|
|
432
|
+
* List backups
|
|
433
|
+
*/
|
|
358
434
|
export declare function getRepositories(opts?: Oazapfts.RequestOpts): Promise<RepositoryListResponseDto>;
|
|
435
|
+
/**
|
|
436
|
+
* List remote backups
|
|
437
|
+
*/
|
|
359
438
|
export declare function inspectRepositories({ backend }?: {
|
|
360
439
|
backend?: string;
|
|
361
440
|
}, opts?: Oazapfts.RequestOpts): Promise<RepositoryInspectResponseDto>;
|
|
441
|
+
/**
|
|
442
|
+
* Update a backup
|
|
443
|
+
*/
|
|
362
444
|
export declare function updateRepository(id: string, repositoryUpdateRequestDto: RepositoryUpdateRequestDto, { backend }?: {
|
|
363
445
|
backend?: string;
|
|
364
446
|
}, opts?: Oazapfts.RequestOpts): Promise<RepositoryUpdateResponseDto>;
|
|
447
|
+
/**
|
|
448
|
+
* Remove a backup
|
|
449
|
+
*/
|
|
365
450
|
export declare function deleteRepository(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
451
|
+
/**
|
|
452
|
+
* Start a backup
|
|
453
|
+
*/
|
|
366
454
|
export declare function createBackup(id: string, opts?: Oazapfts.RequestOpts): Promise<LogResponseDto>;
|
|
455
|
+
/**
|
|
456
|
+
* Check a repository import
|
|
457
|
+
*/
|
|
367
458
|
export declare function checkImportRepository(id: string, backend: string, opts?: Oazapfts.RequestOpts): Promise<RepositoryCheckImportResponseDto>;
|
|
459
|
+
/**
|
|
460
|
+
* Import a repository
|
|
461
|
+
*/
|
|
368
462
|
export declare function importRepository(id: string, backend: string, opts?: Oazapfts.RequestOpts): Promise<RepositoryCreateResponseDto>;
|
|
463
|
+
/**
|
|
464
|
+
* Change the primary backend
|
|
465
|
+
*/
|
|
369
466
|
export declare function reconfigureRepositoryPrimaryBackend(id: string, repositoryPrimaryBackendReconfigureRequestDto: RepositoryPrimaryBackendReconfigureRequestDto, opts?: Oazapfts.RequestOpts): Promise<RepositoryCreateResponseDto>;
|
|
467
|
+
/**
|
|
468
|
+
* List backup runs
|
|
469
|
+
*/
|
|
370
470
|
export declare function getRunHistory(id: string, opts?: Oazapfts.RequestOpts): Promise<RunHistoryResponseDto>;
|
|
471
|
+
/**
|
|
472
|
+
* List snapshots
|
|
473
|
+
*/
|
|
371
474
|
export declare function getSnapshots(id: string, opts?: Oazapfts.RequestOpts): Promise<ListSnapshotsResponseDto>;
|
|
475
|
+
/**
|
|
476
|
+
* Prune a repository
|
|
477
|
+
*/
|
|
372
478
|
export declare function pruneRepository(id: string, opts?: Oazapfts.RequestOpts): Promise<LogResponseDto>;
|
|
479
|
+
/**
|
|
480
|
+
* Restore a snapshot
|
|
481
|
+
*/
|
|
373
482
|
export declare function restoreSnapshot(id: string, snapshot: string, repositorySnapshotRestoreRequestDto: RepositorySnapshotRestoreRequestDto, opts?: Oazapfts.RequestOpts): Promise<LogResponseDto>;
|
|
483
|
+
/**
|
|
484
|
+
* Delete a snapshot
|
|
485
|
+
*/
|
|
374
486
|
export declare function forgetSnapshot(id: string, snapshot: string, opts?: Oazapfts.RequestOpts): Promise<ListSnapshotsResponseDto>;
|
|
487
|
+
/**
|
|
488
|
+
* Restore from snapshot
|
|
489
|
+
*/
|
|
375
490
|
export declare function restoreFromPoint(id: string, snapshot: string, backend: string, repositorySnapshotRestoreFromPointRequestDto: RepositorySnapshotRestoreFromPointRequestDto, opts?: Oazapfts.RequestOpts): Promise<LogResponseDto>;
|
|
491
|
+
/**
|
|
492
|
+
* List snapshot files
|
|
493
|
+
*/
|
|
376
494
|
export declare function getSnapshotListing(id: string, snapshot: string, { path }?: {
|
|
377
495
|
path?: string;
|
|
378
496
|
}, opts?: Oazapfts.RequestOpts): Promise<FilesystemListingResponseDto>;
|
|
497
|
+
/**
|
|
498
|
+
* Get a run
|
|
499
|
+
*/
|
|
379
500
|
export declare function getRun(id: string, opts?: Oazapfts.RequestOpts): Promise<RunResponseDto>;
|
|
501
|
+
/**
|
|
502
|
+
* Download a run log
|
|
503
|
+
*/
|
|
380
504
|
export declare function downloadRunLog(id: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
|
|
505
|
+
/**
|
|
506
|
+
* Stream a run log
|
|
507
|
+
*/
|
|
381
508
|
export declare function logStreamSse(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
509
|
+
/**
|
|
510
|
+
* List running tasks
|
|
511
|
+
*/
|
|
382
512
|
export declare function getRunningTasks(opts?: Oazapfts.RequestOpts): Promise<RunningTaskListResponse>;
|
|
513
|
+
/**
|
|
514
|
+
* Cancel a task
|
|
515
|
+
*/
|
|
383
516
|
export declare function cancelTask(parentId: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
|
517
|
+
/**
|
|
518
|
+
* Create a schedule
|
|
519
|
+
*/
|
|
384
520
|
export declare function createSchedule(scheduleCreateRequestDto: ScheduleCreateRequestDto, opts?: Oazapfts.RequestOpts): Promise<ScheduleCreateResponseDto>;
|
|
521
|
+
/**
|
|
522
|
+
* List schedules
|
|
523
|
+
*/
|
|
385
524
|
export declare function getSchedules(opts?: Oazapfts.RequestOpts): Promise<ScheduleListResponseDto>;
|
|
525
|
+
/**
|
|
526
|
+
* Update a schedule
|
|
527
|
+
*/
|
|
386
528
|
export declare function updateSchedule(id: string, scheduleUpdateRequestDto: ScheduleUpdateRequestDto, opts?: Oazapfts.RequestOpts): Promise<ScheduleUpdateResponseDto>;
|
|
529
|
+
/**
|
|
530
|
+
* Delete a schedule
|
|
531
|
+
*/
|
|
387
532
|
export declare function removeSchedule(id: string, opts?: Oazapfts.RequestOpts): Promise<never>;
|
package/dist/fetch-client.js
CHANGED
|
@@ -12,16 +12,25 @@ export const defaults = {
|
|
|
12
12
|
};
|
|
13
13
|
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
14
|
export const servers = {};
|
|
15
|
+
/**
|
|
16
|
+
* Connect a FUTO Backups account
|
|
17
|
+
*/
|
|
15
18
|
export function connectDeviceFlow(opts) {
|
|
16
19
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/auth/oidc/device", {
|
|
17
20
|
...opts
|
|
18
21
|
}));
|
|
19
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Sign in with FUTO Backups account
|
|
25
|
+
*/
|
|
20
26
|
export function sessionDeviceFlow(opts) {
|
|
21
27
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/auth/session/device", {
|
|
22
28
|
...opts
|
|
23
29
|
}));
|
|
24
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Create session
|
|
33
|
+
*/
|
|
25
34
|
export function createSession(createSessionRequestDto, opts) {
|
|
26
35
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/auth/session", oazapfts.json({
|
|
27
36
|
...opts,
|
|
@@ -29,6 +38,9 @@ export function createSession(createSessionRequestDto, opts) {
|
|
|
29
38
|
body: createSessionRequestDto
|
|
30
39
|
})));
|
|
31
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a ticket
|
|
43
|
+
*/
|
|
32
44
|
export function createTicket(ticketCreateRequestDto, opts) {
|
|
33
45
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/auth/ticket", oazapfts.json({
|
|
34
46
|
...opts,
|
|
@@ -36,11 +48,17 @@ export function createTicket(ticketCreateRequestDto, opts) {
|
|
|
36
48
|
body: ticketCreateRequestDto
|
|
37
49
|
})));
|
|
38
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* List backends
|
|
53
|
+
*/
|
|
39
54
|
export function getBackends(opts) {
|
|
40
55
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/backend", {
|
|
41
56
|
...opts
|
|
42
57
|
}));
|
|
43
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Create a local backend
|
|
61
|
+
*/
|
|
44
62
|
export function createLocalBackend(createLocalBackendRequestDto, opts) {
|
|
45
63
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/backend/local", oazapfts.json({
|
|
46
64
|
...opts,
|
|
@@ -48,11 +66,17 @@ export function createLocalBackend(createLocalBackendRequestDto, opts) {
|
|
|
48
66
|
body: createLocalBackendRequestDto
|
|
49
67
|
})));
|
|
50
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Get backups orchestrator configuration
|
|
71
|
+
*/
|
|
51
72
|
export function getConfig(opts) {
|
|
52
73
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/config", {
|
|
53
74
|
...opts
|
|
54
75
|
}));
|
|
55
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Update backups orchestrator configuration
|
|
79
|
+
*/
|
|
56
80
|
export function updateConfig(configUpdateRequestDto, opts) {
|
|
57
81
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/config", oazapfts.json({
|
|
58
82
|
...opts,
|
|
@@ -60,12 +84,18 @@ export function updateConfig(configUpdateRequestDto, opts) {
|
|
|
60
84
|
body: configUpdateRequestDto
|
|
61
85
|
})));
|
|
62
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Reset the backups orchestrator
|
|
89
|
+
*/
|
|
63
90
|
export function resetOrchestrator(opts) {
|
|
64
91
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/debug/reset", {
|
|
65
92
|
...opts,
|
|
66
93
|
method: "POST"
|
|
67
94
|
}));
|
|
68
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* List files
|
|
98
|
+
*/
|
|
69
99
|
export function getFileListing({ path } = {}, opts) {
|
|
70
100
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/fs${QS.query(QS.explode({
|
|
71
101
|
path
|
|
@@ -73,16 +103,25 @@ export function getFileListing({ path } = {}, opts) {
|
|
|
73
103
|
...opts
|
|
74
104
|
}));
|
|
75
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Get backup integrations
|
|
108
|
+
*/
|
|
76
109
|
export function getIntegrations(opts) {
|
|
77
110
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/integrations", {
|
|
78
111
|
...opts
|
|
79
112
|
}));
|
|
80
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Get Immich backup status
|
|
116
|
+
*/
|
|
81
117
|
export function getImmichBackupStatus(opts) {
|
|
82
118
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/integrations/immich/status", {
|
|
83
119
|
...opts
|
|
84
120
|
}));
|
|
85
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Configure the Immich backup integration
|
|
124
|
+
*/
|
|
86
125
|
export function configureImmichIntegration(configureImmichIntegrationRequestDto, opts) {
|
|
87
126
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/integrations/immich", oazapfts.json({
|
|
88
127
|
...opts,
|
|
@@ -90,12 +129,18 @@ export function configureImmichIntegration(configureImmichIntegrationRequestDto,
|
|
|
90
129
|
body: configureImmichIntegrationRequestDto
|
|
91
130
|
})));
|
|
92
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Ignore the Immich database dump warning
|
|
134
|
+
*/
|
|
93
135
|
export function ignoreImmichDatabaseDumpWarning(opts) {
|
|
94
136
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/integrations/immich/database-dump/ignore-warning", {
|
|
95
137
|
...opts,
|
|
96
138
|
method: "POST"
|
|
97
139
|
}));
|
|
98
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Configure Immich database dumps
|
|
143
|
+
*/
|
|
99
144
|
export function configureImmichDatabaseDump(configureImmichDatabaseDumpRequestDto, opts) {
|
|
100
145
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/integrations/immich/database-dump", oazapfts.json({
|
|
101
146
|
...opts,
|
|
@@ -103,6 +148,9 @@ export function configureImmichDatabaseDump(configureImmichDatabaseDumpRequestDt
|
|
|
103
148
|
body: configureImmichDatabaseDumpRequestDto
|
|
104
149
|
})));
|
|
105
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Roll Immich back to a snapshot
|
|
153
|
+
*/
|
|
106
154
|
export function startImmichRollback(immichRollbackRequestDto, opts) {
|
|
107
155
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/integrations/immich/rollback", oazapfts.json({
|
|
108
156
|
...opts,
|
|
@@ -110,16 +158,25 @@ export function startImmichRollback(immichRollbackRequestDto, opts) {
|
|
|
110
158
|
body: immichRollbackRequestDto
|
|
111
159
|
})));
|
|
112
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Get backup onboarding status
|
|
163
|
+
*/
|
|
113
164
|
export function onboardingStatus(opts) {
|
|
114
165
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/onboarding", {
|
|
115
166
|
...opts
|
|
116
167
|
}));
|
|
117
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Get the backup recovery key
|
|
171
|
+
*/
|
|
118
172
|
export function currentRecoveryKey(opts) {
|
|
119
173
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/onboarding/recovery-key", {
|
|
120
174
|
...opts
|
|
121
175
|
}));
|
|
122
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Import a backup recovery key
|
|
179
|
+
*/
|
|
123
180
|
export function importRecoveryKey(importRecoveryKeyRequest, opts) {
|
|
124
181
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/onboarding/recovery-key", oazapfts.json({
|
|
125
182
|
...opts,
|
|
@@ -127,30 +184,45 @@ export function importRecoveryKey(importRecoveryKeyRequest, opts) {
|
|
|
127
184
|
body: importRecoveryKeyRequest
|
|
128
185
|
})));
|
|
129
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Confirm the backup recovery key
|
|
189
|
+
*/
|
|
130
190
|
export function confirmRecoveryKey(opts) {
|
|
131
191
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/onboarding/recovery-key", {
|
|
132
192
|
...opts,
|
|
133
193
|
method: "POST"
|
|
134
194
|
}));
|
|
135
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Skip optional backup onboarding
|
|
198
|
+
*/
|
|
136
199
|
export function skipOnboardingExtraConfig(opts) {
|
|
137
200
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/onboarding/skip", {
|
|
138
201
|
...opts,
|
|
139
202
|
method: "POST"
|
|
140
203
|
}));
|
|
141
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Enable FUTO Backups telemetry
|
|
207
|
+
*/
|
|
142
208
|
export function enableTelemetry(opts) {
|
|
143
209
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/onboarding/telemetry", {
|
|
144
210
|
...opts,
|
|
145
211
|
method: "POST"
|
|
146
212
|
}));
|
|
147
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Report a startup error
|
|
216
|
+
*/
|
|
148
217
|
export function reportError(opts) {
|
|
149
218
|
return oazapfts.ok(oazapfts.fetchText("/api/yucca/onboarding/report-error", {
|
|
150
219
|
...opts,
|
|
151
220
|
method: "POST"
|
|
152
221
|
}));
|
|
153
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Create a new backup
|
|
225
|
+
*/
|
|
154
226
|
export function createRepository(repositoryCreateRequestDto, { backend } = {}, opts) {
|
|
155
227
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository${QS.query(QS.explode({
|
|
156
228
|
backend
|
|
@@ -160,11 +232,17 @@ export function createRepository(repositoryCreateRequestDto, { backend } = {}, o
|
|
|
160
232
|
body: repositoryCreateRequestDto
|
|
161
233
|
})));
|
|
162
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* List backups
|
|
237
|
+
*/
|
|
163
238
|
export function getRepositories(opts) {
|
|
164
239
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/repository", {
|
|
165
240
|
...opts
|
|
166
241
|
}));
|
|
167
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* List remote backups
|
|
245
|
+
*/
|
|
168
246
|
export function inspectRepositories({ backend } = {}, opts) {
|
|
169
247
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/inspect${QS.query(QS.explode({
|
|
170
248
|
backend
|
|
@@ -172,6 +250,9 @@ export function inspectRepositories({ backend } = {}, opts) {
|
|
|
172
250
|
...opts
|
|
173
251
|
}));
|
|
174
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Update a backup
|
|
255
|
+
*/
|
|
175
256
|
export function updateRepository(id, repositoryUpdateRequestDto, { backend } = {}, opts) {
|
|
176
257
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}${QS.query(QS.explode({
|
|
177
258
|
backend
|
|
@@ -181,18 +262,27 @@ export function updateRepository(id, repositoryUpdateRequestDto, { backend } = {
|
|
|
181
262
|
body: repositoryUpdateRequestDto
|
|
182
263
|
})));
|
|
183
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Remove a backup
|
|
267
|
+
*/
|
|
184
268
|
export function deleteRepository(id, opts) {
|
|
185
269
|
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/repository/${encodeURIComponent(id)}`, {
|
|
186
270
|
...opts,
|
|
187
271
|
method: "DELETE"
|
|
188
272
|
}));
|
|
189
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* Start a backup
|
|
276
|
+
*/
|
|
190
277
|
export function createBackup(id, opts) {
|
|
191
278
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}`, {
|
|
192
279
|
...opts,
|
|
193
280
|
method: "POST"
|
|
194
281
|
}));
|
|
195
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Check a repository import
|
|
285
|
+
*/
|
|
196
286
|
export function checkImportRepository(id, backend, opts) {
|
|
197
287
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/import${QS.query(QS.explode({
|
|
198
288
|
backend
|
|
@@ -200,6 +290,9 @@ export function checkImportRepository(id, backend, opts) {
|
|
|
200
290
|
...opts
|
|
201
291
|
}));
|
|
202
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Import a repository
|
|
295
|
+
*/
|
|
203
296
|
export function importRepository(id, backend, opts) {
|
|
204
297
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/import${QS.query(QS.explode({
|
|
205
298
|
backend
|
|
@@ -208,6 +301,9 @@ export function importRepository(id, backend, opts) {
|
|
|
208
301
|
method: "POST"
|
|
209
302
|
}));
|
|
210
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* Change the primary backend
|
|
306
|
+
*/
|
|
211
307
|
export function reconfigureRepositoryPrimaryBackend(id, repositoryPrimaryBackendReconfigureRequestDto, opts) {
|
|
212
308
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/backend`, oazapfts.json({
|
|
213
309
|
...opts,
|
|
@@ -215,22 +311,34 @@ export function reconfigureRepositoryPrimaryBackend(id, repositoryPrimaryBackend
|
|
|
215
311
|
body: repositoryPrimaryBackendReconfigureRequestDto
|
|
216
312
|
})));
|
|
217
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* List backup runs
|
|
316
|
+
*/
|
|
218
317
|
export function getRunHistory(id, opts) {
|
|
219
318
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/runs`, {
|
|
220
319
|
...opts
|
|
221
320
|
}));
|
|
222
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* List snapshots
|
|
324
|
+
*/
|
|
223
325
|
export function getSnapshots(id, opts) {
|
|
224
326
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/snapshots`, {
|
|
225
327
|
...opts
|
|
226
328
|
}));
|
|
227
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* Prune a repository
|
|
332
|
+
*/
|
|
228
333
|
export function pruneRepository(id, opts) {
|
|
229
334
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/snapshots/prune`, {
|
|
230
335
|
...opts,
|
|
231
336
|
method: "POST"
|
|
232
337
|
}));
|
|
233
338
|
}
|
|
339
|
+
/**
|
|
340
|
+
* Restore a snapshot
|
|
341
|
+
*/
|
|
234
342
|
export function restoreSnapshot(id, snapshot, repositorySnapshotRestoreRequestDto, opts) {
|
|
235
343
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}`, oazapfts.json({
|
|
236
344
|
...opts,
|
|
@@ -238,12 +346,18 @@ export function restoreSnapshot(id, snapshot, repositorySnapshotRestoreRequestDt
|
|
|
238
346
|
body: repositorySnapshotRestoreRequestDto
|
|
239
347
|
})));
|
|
240
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Delete a snapshot
|
|
351
|
+
*/
|
|
241
352
|
export function forgetSnapshot(id, snapshot, opts) {
|
|
242
353
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}`, {
|
|
243
354
|
...opts,
|
|
244
355
|
method: "DELETE"
|
|
245
356
|
}));
|
|
246
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* Restore from snapshot
|
|
360
|
+
*/
|
|
247
361
|
export function restoreFromPoint(id, snapshot, backend, repositorySnapshotRestoreFromPointRequestDto, opts) {
|
|
248
362
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}/restore-from-point${QS.query(QS.explode({
|
|
249
363
|
backend
|
|
@@ -253,6 +367,9 @@ export function restoreFromPoint(id, snapshot, backend, repositorySnapshotRestor
|
|
|
253
367
|
body: repositorySnapshotRestoreFromPointRequestDto
|
|
254
368
|
})));
|
|
255
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
* List snapshot files
|
|
372
|
+
*/
|
|
256
373
|
export function getSnapshotListing(id, snapshot, { path } = {}, opts) {
|
|
257
374
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}/listing${QS.query(QS.explode({
|
|
258
375
|
path
|
|
@@ -260,32 +377,50 @@ export function getSnapshotListing(id, snapshot, { path } = {}, opts) {
|
|
|
260
377
|
...opts
|
|
261
378
|
}));
|
|
262
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* Get a run
|
|
382
|
+
*/
|
|
263
383
|
export function getRun(id, opts) {
|
|
264
384
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/logs/${encodeURIComponent(id)}`, {
|
|
265
385
|
...opts
|
|
266
386
|
}));
|
|
267
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* Download a run log
|
|
390
|
+
*/
|
|
268
391
|
export function downloadRunLog(id, opts) {
|
|
269
392
|
return oazapfts.ok(oazapfts.fetchBlob(`/api/yucca/logs/${encodeURIComponent(id)}/download`, {
|
|
270
393
|
...opts
|
|
271
394
|
}));
|
|
272
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Stream a run log
|
|
398
|
+
*/
|
|
273
399
|
export function logStreamSse(id, opts) {
|
|
274
400
|
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/logs/${encodeURIComponent(id)}/stream`, {
|
|
275
401
|
...opts
|
|
276
402
|
}));
|
|
277
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* List running tasks
|
|
406
|
+
*/
|
|
278
407
|
export function getRunningTasks(opts) {
|
|
279
408
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/tasks", {
|
|
280
409
|
...opts
|
|
281
410
|
}));
|
|
282
411
|
}
|
|
412
|
+
/**
|
|
413
|
+
* Cancel a task
|
|
414
|
+
*/
|
|
283
415
|
export function cancelTask(parentId, opts) {
|
|
284
416
|
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/tasks/${encodeURIComponent(parentId)}/cancel`, {
|
|
285
417
|
...opts,
|
|
286
418
|
method: "POST"
|
|
287
419
|
}));
|
|
288
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* Create a schedule
|
|
423
|
+
*/
|
|
289
424
|
export function createSchedule(scheduleCreateRequestDto, opts) {
|
|
290
425
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/schedule", oazapfts.json({
|
|
291
426
|
...opts,
|
|
@@ -293,11 +428,17 @@ export function createSchedule(scheduleCreateRequestDto, opts) {
|
|
|
293
428
|
body: scheduleCreateRequestDto
|
|
294
429
|
})));
|
|
295
430
|
}
|
|
431
|
+
/**
|
|
432
|
+
* List schedules
|
|
433
|
+
*/
|
|
296
434
|
export function getSchedules(opts) {
|
|
297
435
|
return oazapfts.ok(oazapfts.fetchJson("/api/yucca/schedule", {
|
|
298
436
|
...opts
|
|
299
437
|
}));
|
|
300
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Update a schedule
|
|
441
|
+
*/
|
|
301
442
|
export function updateSchedule(id, scheduleUpdateRequestDto, opts) {
|
|
302
443
|
return oazapfts.ok(oazapfts.fetchJson(`/api/yucca/schedule/${encodeURIComponent(id)}`, oazapfts.json({
|
|
303
444
|
...opts,
|
|
@@ -305,6 +446,9 @@ export function updateSchedule(id, scheduleUpdateRequestDto, opts) {
|
|
|
305
446
|
body: scheduleUpdateRequestDto
|
|
306
447
|
})));
|
|
307
448
|
}
|
|
449
|
+
/**
|
|
450
|
+
* Delete a schedule
|
|
451
|
+
*/
|
|
308
452
|
export function removeSchedule(id, opts) {
|
|
309
453
|
return oazapfts.ok(oazapfts.fetchText(`/api/yucca/schedule/${encodeURIComponent(id)}`, {
|
|
310
454
|
...opts,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@futo-org/backups-orchestrator-ui",
|
|
3
3
|
"repository": "https://github.com/immich-app/yucca",
|
|
4
4
|
"description": "Backups orchestrator (UI library)",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.50.0",
|
|
6
6
|
"license": "Source First License 1.1",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -33,28 +33,28 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@lingui/cli": "^5.8.0",
|
|
35
35
|
"@lingui/core": "^5.8.0",
|
|
36
|
-
"@playwright/test": "1.
|
|
37
|
-
"@sveltejs/adapter-auto": "^7.0.
|
|
38
|
-
"@sveltejs/kit": "^2.
|
|
39
|
-
"@sveltejs/package": "^2.5.
|
|
40
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
36
|
+
"@playwright/test": "1.63.0",
|
|
37
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
38
|
+
"@sveltejs/kit": "^2.70.3",
|
|
39
|
+
"@sveltejs/package": "^2.5.8",
|
|
40
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
41
41
|
"@tailwindcss/vite": "^4.1.18",
|
|
42
42
|
"@types/d3": "^7.4.3",
|
|
43
43
|
"@types/lodash.debounce": "^4.0.9",
|
|
44
|
-
"@types/luxon": "^3.7.
|
|
45
|
-
"@vitest/browser-playwright": "^
|
|
46
|
-
"oazapfts": "^7.0
|
|
47
|
-
"playwright": "1.
|
|
48
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
49
|
-
"publint": "^0.3.
|
|
50
|
-
"svelte": "^5.
|
|
51
|
-
"svelte-check": "^4.
|
|
44
|
+
"@types/luxon": "^3.7.6",
|
|
45
|
+
"@vitest/browser-playwright": "^5.0.0",
|
|
46
|
+
"oazapfts": "^7.5.0",
|
|
47
|
+
"playwright": "1.63.0",
|
|
48
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
49
|
+
"publint": "^0.3.25",
|
|
50
|
+
"svelte": "^5.57.1",
|
|
51
|
+
"svelte-check": "^4.7.6",
|
|
52
52
|
"svelte-i18n-lingui": "^0.2.2",
|
|
53
53
|
"tailwindcss": "^4.1.18",
|
|
54
|
-
"typescript": "
|
|
55
|
-
"vite": "^
|
|
56
|
-
"vitest": "^
|
|
57
|
-
"vitest-browser-svelte": "^
|
|
54
|
+
"typescript": "~6.0.3",
|
|
55
|
+
"vite": "^8.3.2",
|
|
56
|
+
"vitest": "^5.0.0",
|
|
57
|
+
"vitest-browser-svelte": "^3.1.0"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
60
60
|
"svelte"
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@immich/ui": "^0.89.0",
|
|
64
64
|
"@mdi/js": "^7.4.47",
|
|
65
|
-
"@oazapfts/runtime": "^1.
|
|
66
|
-
"@tanstack/svelte-query": "^6.1
|
|
65
|
+
"@oazapfts/runtime": "^1.2.0",
|
|
66
|
+
"@tanstack/svelte-query": "^6.3.1",
|
|
67
67
|
"cron-validate": "^1.5.3",
|
|
68
|
-
"cronstrue": "^3.
|
|
68
|
+
"cronstrue": "^3.27.0",
|
|
69
69
|
"lodash.debounce": "^4.0.8",
|
|
70
70
|
"luxon": "^3.7.2",
|
|
71
71
|
"socket.io-client": "^4.8.3",
|
|
72
|
-
"@futo-org/backups-api-client": "^0.
|
|
72
|
+
"@futo-org/backups-api-client": "^0.50.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"dev": "vite dev --port 5174",
|