@futo-org/backups-orchestrator-ui 1.11.2 → 1.11.4
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/integrations/immich/ImmichBackupsPage.svelte +16 -3
- package/dist/components/integrations/immich/ImmichBackupsPage.svelte.d.ts +2 -0
- package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +16 -4
- package/dist/components/integrations/immich/ImmichManageBackupPage.svelte.d.ts +9 -0
- package/dist/components/test/ImmichTestUi.svelte +7 -1
- package/dist/events.js +1 -1
- package/dist/fetch-client.d.ts +1 -1
- package/dist/fetch-client.js +51 -51
- package/dist/i18n.d.ts +1 -3
- package/dist/i18n.js +5 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/providers.d.ts +2 -1
- package/dist/providers.js +3 -1
- package/dist/services/job.service.js +2 -2
- package/dist/services/session.service.js +1 -1
- package/package.json +5 -7
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
3
|
import UpsellPage from "../../onboarding/upsell/UpsellPage.svelte";
|
|
4
|
-
import ImmichManageBackupPage
|
|
4
|
+
import ImmichManageBackupPage, {
|
|
5
|
+
type BackupsPageLayout,
|
|
6
|
+
} from "./ImmichManageBackupPage.svelte";
|
|
5
7
|
import ImmichOnboardingSetupFlow from "./ImmichOnboardingSetupFlow.svelte";
|
|
6
8
|
|
|
7
9
|
type Question = {
|
|
@@ -11,6 +13,7 @@
|
|
|
11
13
|
|
|
12
14
|
type Props = {
|
|
13
15
|
questions: Question[];
|
|
16
|
+
layout: BackupsPageLayout;
|
|
14
17
|
onConfigure: () => void;
|
|
15
18
|
onViewAttempts: () => void;
|
|
16
19
|
onViewSnapshots: () => void;
|
|
@@ -18,6 +21,7 @@
|
|
|
18
21
|
|
|
19
22
|
const {
|
|
20
23
|
questions,
|
|
24
|
+
layout,
|
|
21
25
|
onConfigure,
|
|
22
26
|
onViewAttempts,
|
|
23
27
|
onViewSnapshots,
|
|
@@ -26,8 +30,17 @@
|
|
|
26
30
|
|
|
27
31
|
<ImmichOnboardingSetupFlow>
|
|
28
32
|
{#snippet fallback(onStart)}
|
|
29
|
-
|
|
33
|
+
{#snippet upsell()}
|
|
34
|
+
<UpsellPage {questions} onGetStarted={onStart} />
|
|
35
|
+
{/snippet}
|
|
36
|
+
|
|
37
|
+
{@render layout({ actions: [], children: upsell })}
|
|
30
38
|
{/snippet}
|
|
31
39
|
|
|
32
|
-
<ImmichManageBackupPage
|
|
40
|
+
<ImmichManageBackupPage
|
|
41
|
+
{layout}
|
|
42
|
+
{onConfigure}
|
|
43
|
+
{onViewAttempts}
|
|
44
|
+
{onViewSnapshots}
|
|
45
|
+
/>
|
|
33
46
|
</ImmichOnboardingSetupFlow>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
+
import { type BackupsPageLayout } from "./ImmichManageBackupPage.svelte";
|
|
2
3
|
type Question = {
|
|
3
4
|
title: string;
|
|
4
5
|
answer: string | Snippet;
|
|
5
6
|
};
|
|
6
7
|
type Props = {
|
|
7
8
|
questions: Question[];
|
|
9
|
+
layout: BackupsPageLayout;
|
|
8
10
|
onConfigure: () => void;
|
|
9
11
|
onViewAttempts: () => void;
|
|
10
12
|
onViewSnapshots: () => void;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { ActionItem } from "@immich/ui";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
export type BackupsPageLayout = Snippet<
|
|
6
|
+
[{ actions: ActionItem[]; children: Snippet }]
|
|
7
|
+
>;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
1
10
|
<script lang="ts">
|
|
2
11
|
import BackendsList from "../../backends/BackendsList.svelte";
|
|
3
12
|
import BackupTaskMonitor from "../../backups/BackupTaskMonitor.svelte";
|
|
4
13
|
import RepositoryRunHistory from "../../backups/run-history/RepositoryRunHistory.svelte";
|
|
5
14
|
import RepositorySnapshotsList from "../../backups/snapshots-list/RepositorySnapshotsList.svelte";
|
|
6
|
-
import PageLayout from "../../ui/PageLayout.svelte";
|
|
7
15
|
import OnEvents from "../../util/OnEvents.svelte";
|
|
8
16
|
import {
|
|
9
17
|
getBackupPageActions,
|
|
@@ -16,12 +24,14 @@
|
|
|
16
24
|
import { t } from "svelte-i18n-lingui";
|
|
17
25
|
|
|
18
26
|
type Props = {
|
|
27
|
+
layout: BackupsPageLayout;
|
|
19
28
|
onConfigure: () => void;
|
|
20
29
|
onViewAttempts: () => void;
|
|
21
30
|
onViewSnapshots: () => void;
|
|
22
31
|
};
|
|
23
32
|
|
|
24
|
-
const { onConfigure, onViewAttempts, onViewSnapshots }: Props =
|
|
33
|
+
const { layout, onConfigure, onViewAttempts, onViewSnapshots }: Props =
|
|
34
|
+
$props();
|
|
25
35
|
|
|
26
36
|
const backup = useImmichBackupStatus();
|
|
27
37
|
|
|
@@ -35,7 +45,7 @@
|
|
|
35
45
|
<OnEvents {...useImmichBackupStatusEventHandler()} />
|
|
36
46
|
<BackupTaskMonitor />
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
{#snippet content()}
|
|
39
49
|
<Container size="medium" center>
|
|
40
50
|
{#if repository && schedule}
|
|
41
51
|
<Stack class="mt-4" gap={6}>
|
|
@@ -79,4 +89,6 @@
|
|
|
79
89
|
</Stack>
|
|
80
90
|
{/if}
|
|
81
91
|
</Container>
|
|
82
|
-
|
|
92
|
+
{/snippet}
|
|
93
|
+
|
|
94
|
+
{@render layout({ actions: [ViewRecoveryKey, Configure], children: content })}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import type { ActionItem } from "@immich/ui";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
export type BackupsPageLayout = Snippet<[
|
|
4
|
+
{
|
|
5
|
+
actions: ActionItem[];
|
|
6
|
+
children: Snippet;
|
|
7
|
+
}
|
|
8
|
+
]>;
|
|
1
9
|
type Props = {
|
|
10
|
+
layout: BackupsPageLayout;
|
|
2
11
|
onConfigure: () => void;
|
|
3
12
|
onViewAttempts: () => void;
|
|
4
13
|
onViewSnapshots: () => void;
|
|
@@ -304,7 +304,13 @@
|
|
|
304
304
|
onConfigure={() => (route = "backup-settings")}
|
|
305
305
|
onViewAttempts={() => (route = "backup-attempts")}
|
|
306
306
|
onViewSnapshots={() => (route = "backup-snapshots")}
|
|
307
|
-
|
|
307
|
+
>
|
|
308
|
+
{#snippet layout({ actions, children })}
|
|
309
|
+
<PageLayout title="Backups" {actions}>
|
|
310
|
+
{@render children()}
|
|
311
|
+
</PageLayout>
|
|
312
|
+
{/snippet}
|
|
313
|
+
</ImmichBackupsPage>
|
|
308
314
|
{:else if route === "backup-settings"}
|
|
309
315
|
<PageLayout title="Backup settings" onBack={backToBackups}>
|
|
310
316
|
<ImmichBackupSettingsPage onUnconfigured={backToBackups} />
|
package/dist/events.js
CHANGED
|
@@ -11,7 +11,7 @@ export class SocketEvent extends Event {
|
|
|
11
11
|
}
|
|
12
12
|
function createSocket() {
|
|
13
13
|
socket = io(getProvider().baseUrl || undefined, {
|
|
14
|
-
path: '/api/
|
|
14
|
+
path: '/api/futo-backups/socket.io',
|
|
15
15
|
transports: ['websocket'],
|
|
16
16
|
autoConnect: false,
|
|
17
17
|
});
|
package/dist/fetch-client.d.ts
CHANGED
package/dist/fetch-client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* FUTO Backups
|
|
3
3
|
* 1.0.0
|
|
4
4
|
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
5
|
* See https://www.npmjs.com/package/oazapfts
|
|
@@ -16,7 +16,7 @@ export const servers = {};
|
|
|
16
16
|
* Connect a FUTO Backups account
|
|
17
17
|
*/
|
|
18
18
|
export function connectDeviceFlow(opts) {
|
|
19
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
19
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/auth/oidc/device", {
|
|
20
20
|
...opts
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ export function connectDeviceFlow(opts) {
|
|
|
24
24
|
* Sign in with FUTO Backups account
|
|
25
25
|
*/
|
|
26
26
|
export function sessionDeviceFlow(opts) {
|
|
27
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
27
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/auth/session/device", {
|
|
28
28
|
...opts
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
@@ -32,7 +32,7 @@ export function sessionDeviceFlow(opts) {
|
|
|
32
32
|
* Create session
|
|
33
33
|
*/
|
|
34
34
|
export function createSession(createSessionRequestDto, opts) {
|
|
35
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
35
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/auth/session", oazapfts.json({
|
|
36
36
|
...opts,
|
|
37
37
|
method: "POST",
|
|
38
38
|
body: createSessionRequestDto
|
|
@@ -42,7 +42,7 @@ export function createSession(createSessionRequestDto, opts) {
|
|
|
42
42
|
* Create a ticket
|
|
43
43
|
*/
|
|
44
44
|
export function createTicket(ticketCreateRequestDto, opts) {
|
|
45
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
45
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/auth/ticket", oazapfts.json({
|
|
46
46
|
...opts,
|
|
47
47
|
method: "POST",
|
|
48
48
|
body: ticketCreateRequestDto
|
|
@@ -52,7 +52,7 @@ export function createTicket(ticketCreateRequestDto, opts) {
|
|
|
52
52
|
* List backends
|
|
53
53
|
*/
|
|
54
54
|
export function getBackends(opts) {
|
|
55
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
55
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/backend", {
|
|
56
56
|
...opts
|
|
57
57
|
}));
|
|
58
58
|
}
|
|
@@ -60,7 +60,7 @@ export function getBackends(opts) {
|
|
|
60
60
|
* Create a local backend
|
|
61
61
|
*/
|
|
62
62
|
export function createLocalBackend(createLocalBackendRequestDto, opts) {
|
|
63
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
63
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/backend/local", oazapfts.json({
|
|
64
64
|
...opts,
|
|
65
65
|
method: "POST",
|
|
66
66
|
body: createLocalBackendRequestDto
|
|
@@ -70,7 +70,7 @@ export function createLocalBackend(createLocalBackendRequestDto, opts) {
|
|
|
70
70
|
* Get backups orchestrator configuration
|
|
71
71
|
*/
|
|
72
72
|
export function getConfig(opts) {
|
|
73
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
73
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/config", {
|
|
74
74
|
...opts
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
@@ -78,7 +78,7 @@ export function getConfig(opts) {
|
|
|
78
78
|
* Update backups orchestrator configuration
|
|
79
79
|
*/
|
|
80
80
|
export function updateConfig(configUpdateRequestDto, opts) {
|
|
81
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
81
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/config", oazapfts.json({
|
|
82
82
|
...opts,
|
|
83
83
|
method: "PUT",
|
|
84
84
|
body: configUpdateRequestDto
|
|
@@ -88,7 +88,7 @@ export function updateConfig(configUpdateRequestDto, opts) {
|
|
|
88
88
|
* Reset the backups orchestrator
|
|
89
89
|
*/
|
|
90
90
|
export function resetOrchestrator(opts) {
|
|
91
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
91
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/debug/reset", {
|
|
92
92
|
...opts,
|
|
93
93
|
method: "POST"
|
|
94
94
|
}));
|
|
@@ -97,7 +97,7 @@ export function resetOrchestrator(opts) {
|
|
|
97
97
|
* List files
|
|
98
98
|
*/
|
|
99
99
|
export function getFileListing({ path } = {}, opts) {
|
|
100
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
100
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/fs${QS.query(QS.explode({
|
|
101
101
|
path
|
|
102
102
|
}))}`, {
|
|
103
103
|
...opts
|
|
@@ -107,7 +107,7 @@ export function getFileListing({ path } = {}, opts) {
|
|
|
107
107
|
* Get backup integrations
|
|
108
108
|
*/
|
|
109
109
|
export function getIntegrations(opts) {
|
|
110
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
110
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/integrations", {
|
|
111
111
|
...opts
|
|
112
112
|
}));
|
|
113
113
|
}
|
|
@@ -115,7 +115,7 @@ export function getIntegrations(opts) {
|
|
|
115
115
|
* Get Immich backup status
|
|
116
116
|
*/
|
|
117
117
|
export function getImmichBackupStatus(opts) {
|
|
118
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
118
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/integrations/immich/status", {
|
|
119
119
|
...opts
|
|
120
120
|
}));
|
|
121
121
|
}
|
|
@@ -123,7 +123,7 @@ export function getImmichBackupStatus(opts) {
|
|
|
123
123
|
* Configure the Immich backup integration
|
|
124
124
|
*/
|
|
125
125
|
export function configureImmichIntegration(configureImmichIntegrationRequestDto, opts) {
|
|
126
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
126
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/integrations/immich", oazapfts.json({
|
|
127
127
|
...opts,
|
|
128
128
|
method: "POST",
|
|
129
129
|
body: configureImmichIntegrationRequestDto
|
|
@@ -133,7 +133,7 @@ export function configureImmichIntegration(configureImmichIntegrationRequestDto,
|
|
|
133
133
|
* Ignore the Immich database dump warning
|
|
134
134
|
*/
|
|
135
135
|
export function ignoreImmichDatabaseDumpWarning(opts) {
|
|
136
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
136
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/integrations/immich/database-dump/ignore-warning", {
|
|
137
137
|
...opts,
|
|
138
138
|
method: "POST"
|
|
139
139
|
}));
|
|
@@ -142,7 +142,7 @@ export function ignoreImmichDatabaseDumpWarning(opts) {
|
|
|
142
142
|
* Configure Immich database dumps
|
|
143
143
|
*/
|
|
144
144
|
export function configureImmichDatabaseDump(configureImmichDatabaseDumpRequestDto, opts) {
|
|
145
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
145
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/integrations/immich/database-dump", oazapfts.json({
|
|
146
146
|
...opts,
|
|
147
147
|
method: "POST",
|
|
148
148
|
body: configureImmichDatabaseDumpRequestDto
|
|
@@ -152,7 +152,7 @@ export function configureImmichDatabaseDump(configureImmichDatabaseDumpRequestDt
|
|
|
152
152
|
* Roll Immich back to a snapshot
|
|
153
153
|
*/
|
|
154
154
|
export function startImmichRollback(immichRollbackRequestDto, opts) {
|
|
155
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
155
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/integrations/immich/rollback", oazapfts.json({
|
|
156
156
|
...opts,
|
|
157
157
|
method: "POST",
|
|
158
158
|
body: immichRollbackRequestDto
|
|
@@ -162,7 +162,7 @@ export function startImmichRollback(immichRollbackRequestDto, opts) {
|
|
|
162
162
|
* List jobs
|
|
163
163
|
*/
|
|
164
164
|
export function getJobs(repositoryId, opts) {
|
|
165
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
165
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/jobs${QS.query(QS.explode({
|
|
166
166
|
repositoryId
|
|
167
167
|
}))}`, {
|
|
168
168
|
...opts
|
|
@@ -172,7 +172,7 @@ export function getJobs(repositoryId, opts) {
|
|
|
172
172
|
* Get a job
|
|
173
173
|
*/
|
|
174
174
|
export function getJob(id, opts) {
|
|
175
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
175
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/jobs/${encodeURIComponent(id)}`, {
|
|
176
176
|
...opts
|
|
177
177
|
}));
|
|
178
178
|
}
|
|
@@ -180,7 +180,7 @@ export function getJob(id, opts) {
|
|
|
180
180
|
* Cancel a job
|
|
181
181
|
*/
|
|
182
182
|
export function cancelJob(id, opts) {
|
|
183
|
-
return oazapfts.ok(oazapfts.fetchText(`/api/
|
|
183
|
+
return oazapfts.ok(oazapfts.fetchText(`/api/futo-backups/jobs/${encodeURIComponent(id)}`, {
|
|
184
184
|
...opts,
|
|
185
185
|
method: "DELETE"
|
|
186
186
|
}));
|
|
@@ -189,7 +189,7 @@ export function cancelJob(id, opts) {
|
|
|
189
189
|
* Download a job log
|
|
190
190
|
*/
|
|
191
191
|
export function downloadJobLog(id, opts) {
|
|
192
|
-
return oazapfts.ok(oazapfts.fetchBlob(`/api/
|
|
192
|
+
return oazapfts.ok(oazapfts.fetchBlob(`/api/futo-backups/jobs/${encodeURIComponent(id)}/download`, {
|
|
193
193
|
...opts
|
|
194
194
|
}));
|
|
195
195
|
}
|
|
@@ -197,7 +197,7 @@ export function downloadJobLog(id, opts) {
|
|
|
197
197
|
* Download a job support log
|
|
198
198
|
*/
|
|
199
199
|
export function downloadJobSupportLog(id, opts) {
|
|
200
|
-
return oazapfts.ok(oazapfts.fetchBlob(`/api/
|
|
200
|
+
return oazapfts.ok(oazapfts.fetchBlob(`/api/futo-backups/jobs/${encodeURIComponent(id)}/support-log/download`, {
|
|
201
201
|
...opts
|
|
202
202
|
}));
|
|
203
203
|
}
|
|
@@ -205,7 +205,7 @@ export function downloadJobSupportLog(id, opts) {
|
|
|
205
205
|
* Get backup onboarding status
|
|
206
206
|
*/
|
|
207
207
|
export function onboardingStatus(opts) {
|
|
208
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
208
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/onboarding", {
|
|
209
209
|
...opts
|
|
210
210
|
}));
|
|
211
211
|
}
|
|
@@ -213,7 +213,7 @@ export function onboardingStatus(opts) {
|
|
|
213
213
|
* Get the backup recovery key
|
|
214
214
|
*/
|
|
215
215
|
export function currentRecoveryKey(opts) {
|
|
216
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
216
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/onboarding/recovery-key", {
|
|
217
217
|
...opts
|
|
218
218
|
}));
|
|
219
219
|
}
|
|
@@ -221,7 +221,7 @@ export function currentRecoveryKey(opts) {
|
|
|
221
221
|
* Import a backup recovery key
|
|
222
222
|
*/
|
|
223
223
|
export function importRecoveryKey(importRecoveryKeyRequest, opts) {
|
|
224
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
224
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/onboarding/recovery-key", oazapfts.json({
|
|
225
225
|
...opts,
|
|
226
226
|
method: "PUT",
|
|
227
227
|
body: importRecoveryKeyRequest
|
|
@@ -231,7 +231,7 @@ export function importRecoveryKey(importRecoveryKeyRequest, opts) {
|
|
|
231
231
|
* Confirm the backup recovery key
|
|
232
232
|
*/
|
|
233
233
|
export function confirmRecoveryKey(opts) {
|
|
234
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
234
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/onboarding/recovery-key", {
|
|
235
235
|
...opts,
|
|
236
236
|
method: "POST"
|
|
237
237
|
}));
|
|
@@ -240,7 +240,7 @@ export function confirmRecoveryKey(opts) {
|
|
|
240
240
|
* Skip optional backup onboarding
|
|
241
241
|
*/
|
|
242
242
|
export function skipOnboardingExtraConfig(opts) {
|
|
243
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
243
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/onboarding/skip", {
|
|
244
244
|
...opts,
|
|
245
245
|
method: "POST"
|
|
246
246
|
}));
|
|
@@ -249,7 +249,7 @@ export function skipOnboardingExtraConfig(opts) {
|
|
|
249
249
|
* Enable FUTO Backups telemetry
|
|
250
250
|
*/
|
|
251
251
|
export function enableTelemetry(opts) {
|
|
252
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
252
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/onboarding/telemetry", {
|
|
253
253
|
...opts,
|
|
254
254
|
method: "POST"
|
|
255
255
|
}));
|
|
@@ -258,7 +258,7 @@ export function enableTelemetry(opts) {
|
|
|
258
258
|
* Report a startup error
|
|
259
259
|
*/
|
|
260
260
|
export function reportError(opts) {
|
|
261
|
-
return oazapfts.ok(oazapfts.fetchText("/api/
|
|
261
|
+
return oazapfts.ok(oazapfts.fetchText("/api/futo-backups/onboarding/report-error", {
|
|
262
262
|
...opts,
|
|
263
263
|
method: "POST"
|
|
264
264
|
}));
|
|
@@ -267,7 +267,7 @@ export function reportError(opts) {
|
|
|
267
267
|
* Create a new backup
|
|
268
268
|
*/
|
|
269
269
|
export function createRepository(repositoryCreateRequestDto, { backend } = {}, opts) {
|
|
270
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
270
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository${QS.query(QS.explode({
|
|
271
271
|
backend
|
|
272
272
|
}))}`, oazapfts.json({
|
|
273
273
|
...opts,
|
|
@@ -279,7 +279,7 @@ export function createRepository(repositoryCreateRequestDto, { backend } = {}, o
|
|
|
279
279
|
* List backups
|
|
280
280
|
*/
|
|
281
281
|
export function getRepositories(opts) {
|
|
282
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
282
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/repository", {
|
|
283
283
|
...opts
|
|
284
284
|
}));
|
|
285
285
|
}
|
|
@@ -287,7 +287,7 @@ export function getRepositories(opts) {
|
|
|
287
287
|
* List remote backups
|
|
288
288
|
*/
|
|
289
289
|
export function inspectRepositories({ backend } = {}, opts) {
|
|
290
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
290
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/inspect${QS.query(QS.explode({
|
|
291
291
|
backend
|
|
292
292
|
}))}`, {
|
|
293
293
|
...opts
|
|
@@ -297,7 +297,7 @@ export function inspectRepositories({ backend } = {}, opts) {
|
|
|
297
297
|
* Update a backup
|
|
298
298
|
*/
|
|
299
299
|
export function updateRepository(id, repositoryUpdateRequestDto, { backend } = {}, opts) {
|
|
300
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
300
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}${QS.query(QS.explode({
|
|
301
301
|
backend
|
|
302
302
|
}))}`, oazapfts.json({
|
|
303
303
|
...opts,
|
|
@@ -309,7 +309,7 @@ export function updateRepository(id, repositoryUpdateRequestDto, { backend } = {
|
|
|
309
309
|
* Remove a backup
|
|
310
310
|
*/
|
|
311
311
|
export function deleteRepository(id, opts) {
|
|
312
|
-
return oazapfts.ok(oazapfts.fetchText(`/api/
|
|
312
|
+
return oazapfts.ok(oazapfts.fetchText(`/api/futo-backups/repository/${encodeURIComponent(id)}`, {
|
|
313
313
|
...opts,
|
|
314
314
|
method: "DELETE"
|
|
315
315
|
}));
|
|
@@ -318,7 +318,7 @@ export function deleteRepository(id, opts) {
|
|
|
318
318
|
* Start a backup
|
|
319
319
|
*/
|
|
320
320
|
export function createBackup(id, opts) {
|
|
321
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
321
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}`, {
|
|
322
322
|
...opts,
|
|
323
323
|
method: "POST"
|
|
324
324
|
}));
|
|
@@ -327,7 +327,7 @@ export function createBackup(id, opts) {
|
|
|
327
327
|
* Sync a remote deletion
|
|
328
328
|
*/
|
|
329
329
|
export function syncRepositoryDeletion(id, opts) {
|
|
330
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
330
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/sync-deletion`, {
|
|
331
331
|
...opts,
|
|
332
332
|
method: "POST"
|
|
333
333
|
}));
|
|
@@ -336,7 +336,7 @@ export function syncRepositoryDeletion(id, opts) {
|
|
|
336
336
|
* Check a repository import
|
|
337
337
|
*/
|
|
338
338
|
export function checkImportRepository(id, backend, opts) {
|
|
339
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
339
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/import${QS.query(QS.explode({
|
|
340
340
|
backend
|
|
341
341
|
}))}`, {
|
|
342
342
|
...opts
|
|
@@ -346,7 +346,7 @@ export function checkImportRepository(id, backend, opts) {
|
|
|
346
346
|
* Import a repository
|
|
347
347
|
*/
|
|
348
348
|
export function importRepository(id, backend, opts) {
|
|
349
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
349
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/import${QS.query(QS.explode({
|
|
350
350
|
backend
|
|
351
351
|
}))}`, {
|
|
352
352
|
...opts,
|
|
@@ -357,7 +357,7 @@ export function importRepository(id, backend, opts) {
|
|
|
357
357
|
* Change the primary backend
|
|
358
358
|
*/
|
|
359
359
|
export function reconfigureRepositoryPrimaryBackend(id, repositoryPrimaryBackendReconfigureRequestDto, opts) {
|
|
360
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
360
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/backend`, oazapfts.json({
|
|
361
361
|
...opts,
|
|
362
362
|
method: "PUT",
|
|
363
363
|
body: repositoryPrimaryBackendReconfigureRequestDto
|
|
@@ -367,7 +367,7 @@ export function reconfigureRepositoryPrimaryBackend(id, repositoryPrimaryBackend
|
|
|
367
367
|
* List snapshots
|
|
368
368
|
*/
|
|
369
369
|
export function getSnapshots(id, opts) {
|
|
370
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
370
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/snapshots`, {
|
|
371
371
|
...opts
|
|
372
372
|
}));
|
|
373
373
|
}
|
|
@@ -375,7 +375,7 @@ export function getSnapshots(id, opts) {
|
|
|
375
375
|
* Prune a repository
|
|
376
376
|
*/
|
|
377
377
|
export function pruneRepository(id, opts) {
|
|
378
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
378
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/snapshots/prune`, {
|
|
379
379
|
...opts,
|
|
380
380
|
method: "POST"
|
|
381
381
|
}));
|
|
@@ -384,7 +384,7 @@ export function pruneRepository(id, opts) {
|
|
|
384
384
|
* Restore a snapshot
|
|
385
385
|
*/
|
|
386
386
|
export function restoreSnapshot(id, snapshot, repositorySnapshotRestoreRequestDto, opts) {
|
|
387
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
387
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}`, oazapfts.json({
|
|
388
388
|
...opts,
|
|
389
389
|
method: "POST",
|
|
390
390
|
body: repositorySnapshotRestoreRequestDto
|
|
@@ -394,7 +394,7 @@ export function restoreSnapshot(id, snapshot, repositorySnapshotRestoreRequestDt
|
|
|
394
394
|
* Delete a snapshot
|
|
395
395
|
*/
|
|
396
396
|
export function forgetSnapshot(id, snapshot, opts) {
|
|
397
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
397
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}`, {
|
|
398
398
|
...opts,
|
|
399
399
|
method: "DELETE"
|
|
400
400
|
}));
|
|
@@ -403,7 +403,7 @@ export function forgetSnapshot(id, snapshot, opts) {
|
|
|
403
403
|
* Restore from snapshot
|
|
404
404
|
*/
|
|
405
405
|
export function restoreFromPoint(id, snapshot, backend, repositorySnapshotRestoreFromPointRequestDto, opts) {
|
|
406
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
406
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}/restore-from-point${QS.query(QS.explode({
|
|
407
407
|
backend
|
|
408
408
|
}))}`, oazapfts.json({
|
|
409
409
|
...opts,
|
|
@@ -415,7 +415,7 @@ export function restoreFromPoint(id, snapshot, backend, repositorySnapshotRestor
|
|
|
415
415
|
* List snapshot files
|
|
416
416
|
*/
|
|
417
417
|
export function getSnapshotListing(id, snapshot, { path } = {}, opts) {
|
|
418
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
418
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/repository/${encodeURIComponent(id)}/snapshots/${encodeURIComponent(snapshot)}/listing${QS.query(QS.explode({
|
|
419
419
|
path
|
|
420
420
|
}))}`, {
|
|
421
421
|
...opts
|
|
@@ -425,7 +425,7 @@ export function getSnapshotListing(id, snapshot, { path } = {}, opts) {
|
|
|
425
425
|
* Create a schedule
|
|
426
426
|
*/
|
|
427
427
|
export function createSchedule(scheduleCreateRequestDto, opts) {
|
|
428
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
428
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/schedule", oazapfts.json({
|
|
429
429
|
...opts,
|
|
430
430
|
method: "POST",
|
|
431
431
|
body: scheduleCreateRequestDto
|
|
@@ -435,7 +435,7 @@ export function createSchedule(scheduleCreateRequestDto, opts) {
|
|
|
435
435
|
* List schedules
|
|
436
436
|
*/
|
|
437
437
|
export function getSchedules(opts) {
|
|
438
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
438
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/schedule", {
|
|
439
439
|
...opts
|
|
440
440
|
}));
|
|
441
441
|
}
|
|
@@ -443,7 +443,7 @@ export function getSchedules(opts) {
|
|
|
443
443
|
* Update a schedule
|
|
444
444
|
*/
|
|
445
445
|
export function updateSchedule(id, scheduleUpdateRequestDto, opts) {
|
|
446
|
-
return oazapfts.ok(oazapfts.fetchJson(`/api/
|
|
446
|
+
return oazapfts.ok(oazapfts.fetchJson(`/api/futo-backups/schedule/${encodeURIComponent(id)}`, oazapfts.json({
|
|
447
447
|
...opts,
|
|
448
448
|
method: "PATCH",
|
|
449
449
|
body: scheduleUpdateRequestDto
|
|
@@ -453,7 +453,7 @@ export function updateSchedule(id, scheduleUpdateRequestDto, opts) {
|
|
|
453
453
|
* Delete a schedule
|
|
454
454
|
*/
|
|
455
455
|
export function removeSchedule(id, opts) {
|
|
456
|
-
return oazapfts.ok(oazapfts.fetchText(`/api/
|
|
456
|
+
return oazapfts.ok(oazapfts.fetchText(`/api/futo-backups/schedule/${encodeURIComponent(id)}`, {
|
|
457
457
|
...opts,
|
|
458
458
|
method: "DELETE"
|
|
459
459
|
}));
|
|
@@ -462,7 +462,7 @@ export function removeSchedule(id, opts) {
|
|
|
462
462
|
* Get support mode
|
|
463
463
|
*/
|
|
464
464
|
export function getSupportMode(opts) {
|
|
465
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
465
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/support-mode", {
|
|
466
466
|
...opts
|
|
467
467
|
}));
|
|
468
468
|
}
|
|
@@ -470,7 +470,7 @@ export function getSupportMode(opts) {
|
|
|
470
470
|
* Update support mode
|
|
471
471
|
*/
|
|
472
472
|
export function updateSupportMode(supportModeUpdateRequestDto, opts) {
|
|
473
|
-
return oazapfts.ok(oazapfts.fetchJson("/api/
|
|
473
|
+
return oazapfts.ok(oazapfts.fetchJson("/api/futo-backups/support-mode", oazapfts.json({
|
|
474
474
|
...opts,
|
|
475
475
|
method: "PUT",
|
|
476
476
|
body: supportModeUpdateRequestDto
|
package/dist/i18n.d.ts
CHANGED
package/dist/i18n.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { locale } from 'svelte-i18n-lingui';
|
|
1
2
|
import { messages as defaultMessages } from './locales/en';
|
|
2
|
-
export { messages as defaultMessages } from './locales/en';
|
|
3
3
|
const loaders = {
|
|
4
4
|
'en-XA': () => import('./locales/en-XA'),
|
|
5
5
|
};
|
|
6
|
-
export const
|
|
6
|
+
export const setYuccaLanguage = async (lang) => {
|
|
7
7
|
const loader = loaders[lang];
|
|
8
8
|
if (!loader) {
|
|
9
|
-
|
|
9
|
+
locale.set('en', defaultMessages);
|
|
10
|
+
return;
|
|
10
11
|
}
|
|
11
12
|
const { messages } = await loader();
|
|
12
|
-
|
|
13
|
+
locale.set(lang, messages);
|
|
13
14
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -37,4 +37,4 @@ export * from './services/schedule.service';
|
|
|
37
37
|
export * from './services/snapshot.service';
|
|
38
38
|
export { events, SocketEvent } from './events';
|
|
39
39
|
export { queryClient } from './query-client';
|
|
40
|
-
export {
|
|
40
|
+
export { setYuccaLanguage } from './i18n';
|
package/dist/index.js
CHANGED
|
@@ -37,4 +37,4 @@ export * from './services/schedule.service';
|
|
|
37
37
|
export * from './services/snapshot.service';
|
|
38
38
|
export { events, SocketEvent } from './events';
|
|
39
39
|
export { queryClient } from './query-client';
|
|
40
|
-
export {
|
|
40
|
+
export { setYuccaLanguage } from './i18n';
|
package/dist/providers.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export type YuccaProvider = {
|
|
|
9
9
|
export type YuccaOptions = {
|
|
10
10
|
api: YuccaApi;
|
|
11
11
|
baseUrl?: string;
|
|
12
|
+
language: string;
|
|
12
13
|
};
|
|
13
|
-
export declare const configureYucca: ({ api, baseUrl, }: YuccaOptions) => YuccaProvider;
|
|
14
|
+
export declare const configureYucca: ({ api, baseUrl, language, }: YuccaOptions) => YuccaProvider;
|
|
14
15
|
export declare const getProvider: () => YuccaProvider;
|
|
15
16
|
export {};
|
package/dist/providers.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as yuccaApiClient from '@futo-org/backups-api-client';
|
|
2
2
|
import * as orchestrationApiClient from './fetch-client';
|
|
3
|
+
import { setYuccaLanguage } from './i18n';
|
|
3
4
|
const clients = {
|
|
4
5
|
orchestrator: orchestrationApiClient,
|
|
5
6
|
customer: yuccaApiClient,
|
|
6
7
|
};
|
|
7
8
|
const KEY = '__yucca_provider__';
|
|
8
|
-
export const configureYucca = ({ api, baseUrl, }) => {
|
|
9
|
+
export const configureYucca = ({ api, baseUrl, language, }) => {
|
|
9
10
|
const client = clients[api];
|
|
10
11
|
if (baseUrl !== undefined) {
|
|
11
12
|
client.defaults.baseUrl = baseUrl;
|
|
@@ -16,6 +17,7 @@ export const configureYucca = ({ api, baseUrl, }) => {
|
|
|
16
17
|
getRepositories: client.getRepositories,
|
|
17
18
|
};
|
|
18
19
|
globalThis[KEY] = provider;
|
|
20
|
+
void setYuccaLanguage(language);
|
|
19
21
|
return provider;
|
|
20
22
|
};
|
|
21
23
|
export const getProvider = () => {
|
|
@@ -148,11 +148,11 @@ export const getJobActions = (job, t) => {
|
|
|
148
148
|
};
|
|
149
149
|
const DownloadLog = {
|
|
150
150
|
title: t(msg `Download Full Log`),
|
|
151
|
-
onAction: () => window.open(`${getProvider().baseUrl}/api/
|
|
151
|
+
onAction: () => window.open(`${getProvider().baseUrl}/api/futo-backups/jobs/${job.id}/download`, '_blank'),
|
|
152
152
|
};
|
|
153
153
|
const DownloadSupportLog = {
|
|
154
154
|
title: t(msg `Download Support Log`),
|
|
155
|
-
onAction: () => window.open(`${getProvider().baseUrl}/api/
|
|
155
|
+
onAction: () => window.open(`${getProvider().baseUrl}/api/futo-backups/jobs/${job.id}/support-log/download`, '_blank'),
|
|
156
156
|
$if: () => Boolean(job.outcome?.support),
|
|
157
157
|
};
|
|
158
158
|
return { ViewLog, DownloadLog, DownloadSupportLog };
|
|
@@ -5,7 +5,7 @@ import { handleError } from '../utils/handle-error';
|
|
|
5
5
|
import { createMutation } from '@tanstack/svelte-query';
|
|
6
6
|
import { gt } from 'svelte-i18n-lingui';
|
|
7
7
|
export const startDeviceFlow = (kind, onEvent) => {
|
|
8
|
-
const source = new EventSource(`${getProvider().baseUrl}/api/
|
|
8
|
+
const source = new EventSource(`${getProvider().baseUrl}/api/futo-backups/auth/${kind}/device`, { withCredentials: true });
|
|
9
9
|
source.addEventListener('message', (event) => {
|
|
10
10
|
onEvent(JSON.parse(event.data));
|
|
11
11
|
});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@futo-org/backups-orchestrator-ui",
|
|
3
3
|
"repository": "https://github.com/futo-org/backups",
|
|
4
4
|
"description": "Backups orchestrator (UI library)",
|
|
5
|
-
"version": "1.11.
|
|
5
|
+
"version": "1.11.4",
|
|
6
6
|
"license": "Source First License 1.1",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -27,14 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@immich/ui": "^0.90.0",
|
|
30
|
-
"
|
|
31
|
-
"svelte": "^5.0.0",
|
|
32
|
-
"svelte-i18n-lingui": "^0.2.2"
|
|
30
|
+
"svelte": "^5.0.0"
|
|
33
31
|
},
|
|
34
32
|
"devDependencies": {
|
|
35
33
|
"@immich/ui": "^0.90.0",
|
|
36
34
|
"@lingui/cli": "^5.8.0",
|
|
37
|
-
"@lingui/core": "^5.8.0",
|
|
38
35
|
"@playwright/test": "1.63.0",
|
|
39
36
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
40
37
|
"@sveltejs/kit": "^2.70.3",
|
|
@@ -51,7 +48,6 @@
|
|
|
51
48
|
"publint": "^0.3.25",
|
|
52
49
|
"svelte": "^5.57.1",
|
|
53
50
|
"svelte-check": "^4.7.6",
|
|
54
|
-
"svelte-i18n-lingui": "^0.2.2",
|
|
55
51
|
"tailwindcss": "^4.1.18",
|
|
56
52
|
"typescript": "~6.0.3",
|
|
57
53
|
"vite": "^8.3.2",
|
|
@@ -62,6 +58,7 @@
|
|
|
62
58
|
"svelte"
|
|
63
59
|
],
|
|
64
60
|
"dependencies": {
|
|
61
|
+
"@lingui/core": "^5.8.0",
|
|
65
62
|
"@material-symbols/svg-400": "^0.48.1",
|
|
66
63
|
"@mdi/js": "^7.4.47",
|
|
67
64
|
"@oazapfts/runtime": "^1.2.0",
|
|
@@ -71,7 +68,8 @@
|
|
|
71
68
|
"lodash.debounce": "^4.0.8",
|
|
72
69
|
"luxon": "^3.7.2",
|
|
73
70
|
"socket.io-client": "^4.8.3",
|
|
74
|
-
"
|
|
71
|
+
"svelte-i18n-lingui": "^0.2.2",
|
|
72
|
+
"@futo-org/backups-api-client": "^1.11.4"
|
|
75
73
|
},
|
|
76
74
|
"scripts": {
|
|
77
75
|
"dev": "vite dev --port 5174",
|