@synopackageland/sdk 0.10.2 → 0.10.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.
Files changed (58) hide show
  1. package/README.md +77 -5
  2. package/dist/i18n/background/zh-CN.json +7 -7
  3. package/dist/i18n/bridge/de.json +3 -1
  4. package/dist/i18n/bridge/en.json +3 -1
  5. package/dist/i18n/bridge/es.json +3 -1
  6. package/dist/i18n/bridge/fr.json +3 -1
  7. package/dist/i18n/bridge/it.json +3 -1
  8. package/dist/i18n/bridge/ja.json +3 -1
  9. package/dist/i18n/bridge/ko.json +3 -1
  10. package/dist/i18n/bridge/zh-CN.json +3 -1
  11. package/dist/i18n/bridge/zh-TW.json +3 -1
  12. package/dist/i18n/delegate/de.json +5 -3
  13. package/dist/i18n/delegate/en.json +5 -3
  14. package/dist/i18n/delegate/es.json +5 -3
  15. package/dist/i18n/delegate/fr.json +5 -3
  16. package/dist/i18n/delegate/it.json +5 -3
  17. package/dist/i18n/delegate/ja.json +5 -3
  18. package/dist/i18n/delegate/ko.json +5 -3
  19. package/dist/i18n/delegate/zh-CN.json +5 -3
  20. package/dist/i18n/delegate/zh-TW.json +5 -3
  21. package/dist/i18n/identity/zh-CN.json +5 -5
  22. package/dist/i18n/save/de.json +16 -17
  23. package/dist/i18n/save/en.json +16 -17
  24. package/dist/i18n/save/es.json +16 -17
  25. package/dist/i18n/save/fr.json +16 -17
  26. package/dist/i18n/save/it.json +16 -17
  27. package/dist/i18n/save/ja.json +16 -17
  28. package/dist/i18n/save/ko.json +16 -17
  29. package/dist/i18n/save/zh-CN.json +16 -17
  30. package/dist/i18n/save/zh-TW.json +16 -17
  31. package/dist/index.js +2334 -2296
  32. package/dist/native.js +350 -0
  33. package/dist/src/delegate/BackgroundSavePanel.vue.d.ts +3 -0
  34. package/dist/src/delegate/BackgroundSaveSettings.vue.d.ts +42 -0
  35. package/dist/src/delegate/ExecutorSettings.vue.d.ts +1 -2
  36. package/dist/src/delegate/SaveOperations.vue.d.ts +23 -0
  37. package/dist/src/delegate/copy.d.ts +10 -6
  38. package/dist/src/delegate/executor-setup.d.ts +2 -0
  39. package/dist/src/delegate/save-copy.d.ts +33 -36
  40. package/dist/src/delegate/use-executor-setup.d.ts +5 -1
  41. package/dist/src/delegate/use-scope-approval.d.ts +50 -0
  42. package/dist/src/dsm/file-station.d.ts +1 -1
  43. package/dist/src/native/authorization-runtime.d.ts +2 -0
  44. package/dist/src/native/dsm-version.d.ts +6 -0
  45. package/dist/src/native/root-runtime.d.ts +34 -0
  46. package/dist/src/native.d.ts +2 -0
  47. package/dist/src/protocol/v1.d.ts +20 -2
  48. package/dist/src/shell/AppShell.vue.d.ts +3 -0
  49. package/dist/src/shell/PageActions.vue.d.ts +13 -0
  50. package/dist/src/shell/app-pages.d.ts +2 -0
  51. package/dist/src/shell/page-actions.d.ts +3 -0
  52. package/dist/src/vue.d.ts +3 -0
  53. package/dist/style.css +1 -1
  54. package/dist/vue.js +2128 -1809
  55. package/package.json +7 -3
  56. package/spec/protocol/v1/README.md +99 -5
  57. package/spec/protocol/v1/errors.json +24 -0
  58. package/spec/protocol/v1/timeouts.json +21 -0
package/dist/native.js ADDED
@@ -0,0 +1,350 @@
1
+ function t(e) {
2
+ return ["103", "104", "dsm_103", "dsm_104"].indexOf(String(e)) >= 0;
3
+ }
4
+ const r = `function createRootAccess(options) {
5
+ var API = "SYNO.Core.TaskScheduler";
6
+ var POLL_MS = 500, MAX_POLL_MS = 1000, RUN_LIMIT_MS = 10 * 60 * 1000;
7
+ // The task an authorize just read back as exactly ours, for the run that follows.
8
+ var byOp = {}, running = {}, verified = {};
9
+ // spec/scheduler/v1: the id each task name was last listed with.
10
+ var listed = {};
11
+ var legacy = null, probe = null;
12
+ var versionUnsupported = ${t.toString()};
13
+ options.tasks.forEach(function (task) { byOp[task.op] = task; });
14
+
15
+ function now() { return options.now ? options.now() : Date.now(); }
16
+ function report(task, state, started) {
17
+ if (typeof options.progress !== "function") return;
18
+ try { options.progress({ op: task.op, state: state, elapsedMs: now() - started }); } catch (error) {}
19
+ }
20
+ function pause(interval, deadline) {
21
+ return options.wait(Math.max(0, Math.min(interval, deadline - now())));
22
+ }
23
+ function fail(code) {
24
+ var error = new Error(code);
25
+ error.code = code;
26
+ return error;
27
+ }
28
+ function begin(op) {
29
+ if (!Object.prototype.hasOwnProperty.call(byOp, op)) return Promise.reject(fail("root_unknown_op"));
30
+ if (options.user().admin !== true) return Promise.reject(fail("admin_required"));
31
+ return Promise.resolve(byOp[op]);
32
+ }
33
+ function readOutput(task) {
34
+ return task.output ? options.call("root.output", { op: task.op }) : Promise.resolve(null);
35
+ }
36
+ function listTasks() {
37
+ if (legacy === false) return options.send(API, "list", 3, { start: 0, limit: 500 });
38
+ if (legacy === true) return legacyList();
39
+ if (!probe) {
40
+ probe = options.send(API, "list", 3, { start: 0, limit: 500 }).then(function (data) {
41
+ legacy = false;
42
+ return data;
43
+ }, function (error) {
44
+ if (!error || !versionUnsupported(error.code)) {
45
+ probe = null;
46
+ throw error;
47
+ }
48
+ legacy = true;
49
+ return legacyList();
50
+ });
51
+ }
52
+ return probe;
53
+ }
54
+ function legacyList() {
55
+ return options.send(API, "list", 2, { offset: 0, limit: 500 }).then(function (data) {
56
+ // Refuse a truncated snapshot: a same-named task could lie outside it.
57
+ if (!data || !Array.isArray(data.tasks) || data.tasks.length > 500
58
+ || !(typeof data.total === "number" && isFinite(data.total) && Math.floor(data.total) === data.total) || data.total !== data.tasks.length) throw fail("root_bad_response");
59
+ return data;
60
+ });
61
+ }
62
+ function readTask(ref) {
63
+ return options.send(API, "get", legacy ? 3 : 4, ref);
64
+ }
65
+ function createTask(params) {
66
+ return options.send(legacy ? API : API + ".Root", "create", legacy ? 3 : 4, params);
67
+ }
68
+ function deleteTask(ref) {
69
+ return options.send(API, "delete", 2, { tasks: [ref] });
70
+ }
71
+ function runTask(ref) {
72
+ return options.send(API, "run", 2, { tasks: [ref] });
73
+ }
74
+ // spec/scheduler/v1: Task Scheduler names repeat, so a list finds the id and
75
+ // refuses a duplicate; get judges the task. cached: a step that deletes
76
+ // nothing may get the id an earlier list showed, and lists again when that
77
+ // get answers 4801 or another task.
78
+ function locate(task, cached) {
79
+ if (cached && listed[task.name] !== undefined) return Promise.resolve({ id: listed[task.name], real_owner: "root", cached: true });
80
+ return listTasks().then(function (data) {
81
+ if (!data || !Array.isArray(data.tasks)) throw fail("root_bad_response");
82
+ var named = data.tasks.filter(function (summary) { return summary && summary.name === task.name; });
83
+ delete listed[task.name];
84
+ if (named.length === 0) return null;
85
+ if (named.length > 1) return { duplicate: true };
86
+ listed[task.name] = named[0].id;
87
+ return { id: named[0].id, real_owner: named[0].real_owner };
88
+ });
89
+ }
90
+ function find(task, cached) {
91
+ return locate(task, cached).then(function (located) {
92
+ if (!located) return { state: "missing" };
93
+ if (located.duplicate) return { state: "conflict" };
94
+ var ref = { id: located.id, real_owner: located.real_owner };
95
+ return readTask(ref).then(function (detail) {
96
+ if (located.cached && (!detail || String(detail.id) !== String(ref.id) || detail.name !== task.name)) return { relist: true };
97
+ var script = detail && detail.extra && detail.extra.script;
98
+ if (!detail || String(detail.id) !== String(ref.id) || detail.name !== task.name
99
+ || detail.owner !== "root" || detail.real_owner !== "root" || detail.enable !== false || detail.type !== "script" || typeof script !== "string") {
100
+ return { state: "conflict" };
101
+ }
102
+ if (script === task.script) return { state: "ready", ref: ref };
103
+ if (script.indexOf(task.header) === 0) return { state: "outdated", ref: ref };
104
+ return { state: "conflict" };
105
+ }, function (error) {
106
+ if (!located.cached || ["4801", "dsm_4801"].indexOf(String(error && error.code)) < 0) throw error;
107
+ return { relist: true };
108
+ }).then(function (found) {
109
+ if (!found.relist) return found;
110
+ delete listed[task.name];
111
+ return find(task, false);
112
+ });
113
+ });
114
+ }
115
+ function definition(task, user) {
116
+ var hours = [];
117
+ for (var h = 1; h <= 23; h++) hours.push(h);
118
+ return {
119
+ name: task.name,
120
+ real_owner: user,
121
+ owner: "root",
122
+ enable: false,
123
+ type: "script",
124
+ schedule: {
125
+ date_type: 0, week_day: "0,1,2,3,4,5,6", repeat_date: 1001, monthly_week: [], hour: 0, minute: 0,
126
+ repeat_hour: 0, repeat_min: 0, last_work_hour: 0,
127
+ repeat_min_store_config: [1, 5, 10, 15, 20, 30], repeat_hour_store_config: hours
128
+ },
129
+ extra: { notify_enable: false, script: task.script, notify_mail: "", notify_if_error: false }
130
+ };
131
+ }
132
+ function newest(history) {
133
+ if (!Array.isArray(history)) throw fail("root_bad_response");
134
+ return history.reduce(function (latest, entry) {
135
+ return entry && (!latest || Number(entry.timestamp) > Number(latest.timestamp)) ? entry : latest;
136
+ }, null);
137
+ }
138
+ function history(ref) {
139
+ return options.send(API, "get_history_status_list", 1, { id: ref.id }).then(newest);
140
+ }
141
+ function waitForRun(task, ref, before, started, deadline, interval) {
142
+ return history(ref).then(function (latest) {
143
+ var fresh = latest && (!before || latest.timestamp !== before.timestamp);
144
+ if (fresh && latest.exit_type !== "running" && latest.stop_time) {
145
+ if (latest.exit_code !== 0) throw fail("root_task_failed");
146
+ return;
147
+ }
148
+ report(task, fresh ? "running" : "queued", started);
149
+ if (now() >= deadline) throw fail("root_timeout");
150
+ return pause(interval, deadline).then(function () {
151
+ return waitForRun(task, ref, before, started, deadline, Math.min(interval * 2, MAX_POLL_MS));
152
+ });
153
+ });
154
+ }
155
+
156
+ function validTime(value) {
157
+ if (typeof value !== "string" || !/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/.test(value)) return false;
158
+ var normalized = value.replace(" ", "T") + "Z";
159
+ var date = new Date(normalized);
160
+ return !isNaN(date.getTime()) && date.toISOString().slice(0, 19) === normalized.slice(0, 19);
161
+ }
162
+ function bounded(call, deadline) {
163
+ // A poll count alone cannot bound a stalled DSM callback. Discard late replies.
164
+ return new Promise(function (resolve, reject) {
165
+ var remaining = deadline - now();
166
+ if (remaining <= 0) { reject(fail("root_timeout")); return; }
167
+ var timer = setTimeout(function () { reject(fail("root_timeout")); }, remaining);
168
+ Promise.resolve().then(call).then(function (value) {
169
+ clearTimeout(timer);
170
+ if (now() >= deadline) reject(fail("root_timeout"));
171
+ else resolve(value);
172
+ }, function (error) { clearTimeout(timer); reject(error); });
173
+ });
174
+ }
175
+ function legacyHistory(ref, deadline) {
176
+ return bounded(function () { return options.send(API, "view", 1, { id: ref.id }); }, deadline).then(function (records) {
177
+ // DSM 7.1 omits data entirely when a task has never run.
178
+ if (records === undefined) records = [];
179
+ if (!Array.isArray(records) || records.length > 500) throw fail("root_bad_response");
180
+ var seen = {};
181
+ records.forEach(function (record) {
182
+ if (!record || !validTime(record.start_time) || typeof record.stop_time !== "string"
183
+ || (record.stop_time && (!validTime(record.stop_time) || record.stop_time < record.start_time))
184
+ || typeof record.exit_type !== "string" || !(typeof record.exit_code === "number" && isFinite(record.exit_code) && Math.floor(record.exit_code) === record.exit_code)
185
+ || seen[record.start_time]) throw fail("root_bad_response");
186
+ seen[record.start_time] = true;
187
+ });
188
+ return records;
189
+ });
190
+ }
191
+ function waitForLegacyRun(task, ref, before, started, deadline, interval) {
192
+ return legacyHistory(ref, deadline).then(function (records) {
193
+ var previous = before.map(function (record) { return record.start_time; });
194
+ var newestBefore = previous.slice().sort().pop();
195
+ var fresh = records.filter(function (record) { return previous.indexOf(record.start_time) === -1; });
196
+ if (fresh.length > 1) throw fail("root_bad_response");
197
+ var latest = fresh[0];
198
+ if (latest && (!newestBefore || latest.start_time > newestBefore) && latest.stop_time) {
199
+ if (latest.exit_code !== 0 || latest.exit_type !== "normal") throw fail("root_task_failed");
200
+ return;
201
+ }
202
+ report(task, latest ? "running" : "queued", started);
203
+ if (now() >= deadline) throw fail("root_timeout");
204
+ return pause(interval, deadline).then(function () {
205
+ return waitForLegacyRun(task, ref, before, started, deadline, Math.min(interval * 2, MAX_POLL_MS));
206
+ });
207
+ });
208
+ }
209
+ function execute(task, verified) {
210
+ var started = now(), deadline = started + RUN_LIMIT_MS;
211
+ if (!legacy) {
212
+ return history(verified.ref).then(function (before) {
213
+ return runTask(verified.ref).then(function () { return waitForRun(task, verified.ref, before, started, deadline, POLL_MS); });
214
+ });
215
+ }
216
+ return legacyHistory(verified.ref, deadline).then(function (before) {
217
+ if (before.some(function (record) { return !record.stop_time || record.exit_type === "running"; })) throw fail("root_not_ready");
218
+ // Mutating calls are sent exactly once, never retried with another profile.
219
+ return bounded(function () { return runTask(verified.ref); }, deadline).then(function () {
220
+ return waitForLegacyRun(task, verified.ref, before, started, deadline, POLL_MS);
221
+ });
222
+ }).then(function () {
223
+ return bounded(function () { return find(task, true); }, deadline).then(function (after) {
224
+ if (after.state !== "ready" || String(after.ref.id) !== String(verified.ref.id)) throw fail("root_verify_failed");
225
+ });
226
+ });
227
+ }
228
+ function verify(op) {
229
+ var ref = verified[op];
230
+ delete verified[op];
231
+ return ref && op !== "helper_repair" ? Promise.resolve({ state: "ready", ref: ref }) : find(byOp[op], true);
232
+ }
233
+ function performRun(op) {
234
+ return begin(op).then(function (task) {
235
+ return verify(op).then(function (found) {
236
+ if (found.state !== "ready") throw fail("root_not_ready");
237
+ var consent = op === "helper_repair" ? options.confirmPassword() : Promise.resolve({ confirmed: true });
238
+ return consent.then(function (confirmation) {
239
+ if (!confirmation || confirmation.confirmed !== true) throw fail("root_cancelled");
240
+ return op === "helper_repair" ? begin(op).then(function (task) { return find(task, true); }) : found;
241
+ }).then(function (verified) {
242
+ if (verified.state !== "ready") throw fail("root_not_ready");
243
+ return execute(task, verified);
244
+ });
245
+ }).then(function () { return readOutput(task); });
246
+ });
247
+ }
248
+
249
+ return {
250
+ state: function (op) {
251
+ return begin(op).then(function (task) { return find(task, true); }).then(function (found) { return found.state; });
252
+ },
253
+ authorize: function (op) {
254
+ delete verified[op];
255
+ return begin(op).then(function (task) {
256
+ return find(task).then(function (found) {
257
+ if (found.state === "ready") { verified[op] = found.ref; return "ready"; }
258
+ if (found.state === "conflict") throw fail("root_conflict");
259
+ return options.confirmPassword().then(function (confirmation) {
260
+ if (!confirmation || confirmation.confirmed !== true) return "cancelled";
261
+ if (!legacy && (typeof confirmation.token !== "string" || !confirmation.token)) throw fail("root_verify_failed");
262
+ var params = definition(task, options.user().name);
263
+ if (!legacy) params.SynoConfirmPWToken = confirmation.token;
264
+ // Re-read after the legacy client-side dialog before replacing a task.
265
+ var checked = legacy ? begin(op).then(find) : Promise.resolve(found);
266
+ return checked.then(function (current) {
267
+ if (current.state === "conflict") throw fail("root_conflict");
268
+ if (current.state === "ready") return;
269
+ var replaced = current.state === "outdated" ? deleteTask(current.ref) : Promise.resolve();
270
+ return replaced.then(function () { return createTask(params); });
271
+ }).then(function () {
272
+ return find(task);
273
+ }).then(function (after) {
274
+ if (after.state !== "ready") throw fail("root_verify_failed");
275
+ verified[op] = after.ref;
276
+ return "ready";
277
+ });
278
+ });
279
+ });
280
+ });
281
+ },
282
+ run: function (op) {
283
+ if (!Object.prototype.hasOwnProperty.call(byOp, op)) return Promise.reject(fail("root_unknown_op"));
284
+ if (options.user().admin !== true) return Promise.reject(fail("admin_required"));
285
+ if (running[op]) return running[op];
286
+ var pending = performRun(op).then(function (value) {
287
+ delete running[op];
288
+ return value;
289
+ }, function (error) { delete running[op]; throw error; });
290
+ running[op] = pending;
291
+ return pending;
292
+ },
293
+ remove: function (op) {
294
+ delete verified[op];
295
+ return begin(op).then(function (task) {
296
+ return find(task).then(function (found) {
297
+ if (found.state === "missing") return "missing";
298
+ if (found.state === "conflict") throw fail("root_conflict");
299
+ return deleteTask(found.ref).then(function () {
300
+ return find(task);
301
+ }).then(function (after) {
302
+ if (after.state !== "missing") throw fail("root_verify_failed");
303
+ return "missing";
304
+ });
305
+ });
306
+ });
307
+ },
308
+ output: function (op) {
309
+ return begin(op).then(readOutput);
310
+ }
311
+ };
312
+ }`, n = `function createAuthorizationAccess(options) {
313
+ var busy = null;
314
+ function fail(code) { var error = new Error(code); error.code = code; return error; }
315
+ function status() { return options.call("authorization.status").then(function (d) {
316
+ if (!d || d.command !== "authorization" || d.schema_version !== 1 || ["ready","authorization_required","not_admin","session_expired","unavailable"].indexOf(d.state) < 0) throw fail("authorization_bad_response");
317
+ // upgrade_reapproval is a reason-only tombstone: it can only explain a pending request.
318
+ if (d.reason === "upgrade_reapproval" && d.state !== "authorization_required") throw fail("authorization_bad_response");
319
+ return d;
320
+ }); }
321
+ function plan(method) { return options.call(method).then(function (p) {
322
+ if (!p || p.command !== "authorization" || p.schema_version !== 1 || p.phase !== "plan" || !Array.isArray(p.operations) || p.operations.length === 0 || p.operations.length > options.tasks.length) throw fail("authorization_bad_response");
323
+ var seen = {};
324
+ p.operations.forEach(function (op) { if (seen[op] || !options.tasks.some(function (t) { return t.op === op; })) throw fail("authorization_bad_response"); seen[op] = true; });
325
+ return p;
326
+ }); }
327
+ // The backend's grant decides: a task still waiting at the window's limit, or
328
+ // one signalled after it wrote the grant, has still authorized the package.
329
+ function settled(e) {
330
+ if (!e || (e.code !== "root_timeout" && e.code !== "root_task_failed")) throw e;
331
+ return status().then(function (d) { if (d.state !== "ready") throw e; });
332
+ }
333
+ function exclusive(fn) { if (busy) return busy; busy = Promise.resolve().then(fn).then(function (s) { busy = null; return s; },function (e) { busy = null; throw e; });return busy; }
334
+ function authorize(ops,run) { return ops.reduce(function (previous,op) { return previous.then(function () {
335
+ return options.root.authorize(op).then(function (state) { if (state !== "ready") throw fail("root_cancelled"); return run ? options.root.run(op).catch(settled) : null; });
336
+ }); },Promise.resolve()); }
337
+ return {canManage:function () {return !!options.user && options.user().admin === true;},status:status,request:function () { return exclusive(function () {
338
+ return plan("authorization.request").then(function (p) { return authorize(p.operations,p.run === true); }).then(status,function (e) { if (e.code === "root_cancelled") return status();throw e; });
339
+ }); },revoke:function () { return exclusive(function () {
340
+ return plan("authorization.revoke").then(function (p) {
341
+ if (p.withdraw === true && typeof options.withdraw !== "function") throw fail("authorization_bad_response");
342
+ var disabled = p.withdraw === true ? options.withdraw() : p.disable === true ? authorize(["helper_disable"],true) : Promise.resolve();
343
+ return disabled.then(function () { return p.purge === true ? authorize(["helper_purge"],true) : null; }).then(function () { return p.operations.reduce(function (previous,op) {return previous.then(function () {return options.root.remove(op);});},Promise.resolve()); });
344
+ }).then(status,function (e) { if (e.code === "root_cancelled") return status();throw e; });
345
+ }); }};
346
+ }`;
347
+ export {
348
+ n as AUTHORIZATION_RUNTIME,
349
+ r as ROOT_RUNTIME
350
+ };
@@ -1,14 +1,17 @@
1
+ import type { Context } from '../context';
1
2
  import type { BackgroundSaveFacade, DestinationGrant } from './long-running';
2
3
  import type { NasProvider } from '../nas/contract';
3
4
  type __VLS_Props = {
4
5
  sdk: BackgroundSaveFacade;
5
6
  admin: boolean;
6
7
  locale: string;
8
+ title?: string;
7
9
  picker?: {
8
10
  provider: NasProvider;
9
11
  keys: string[];
10
12
  labels?: Record<string, string>;
11
13
  };
14
+ ctx?: Pick<Context, 'call'>;
12
15
  pickerErrorText?: (error: unknown) => string | undefined;
13
16
  sampleSave?: boolean;
14
17
  };
@@ -0,0 +1,42 @@
1
+ import type { Context } from '../context';
2
+ import type { BackgroundSaveFacade, DestinationGrant, DestinationState } from './long-running';
3
+ import type { NasProvider } from '../nas/contract';
4
+ type __VLS_Props = {
5
+ sdk: BackgroundSaveFacade;
6
+ admin: boolean;
7
+ locale: string;
8
+ picker?: {
9
+ provider: NasProvider;
10
+ keys: string[];
11
+ labels?: Record<string, string>;
12
+ };
13
+ ctx?: Pick<Context, 'call'>;
14
+ title?: string;
15
+ pickerErrorText?: (error: unknown) => string | undefined;
16
+ };
17
+ declare var __VLS_164: {
18
+ busy: boolean;
19
+ run: (work: () => Promise<unknown>) => Promise<void>;
20
+ };
21
+ type __VLS_Slots = {} & {
22
+ operations?: (props: typeof __VLS_164) => any;
23
+ };
24
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
25
+ refresh: () => Promise<void>;
26
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ confirmed: () => any;
28
+ authorized: (grant: DestinationGrant) => any;
29
+ destinations: (states: DestinationState[]) => any;
30
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
31
+ onConfirmed?: (() => any) | undefined;
32
+ onAuthorized?: ((grant: DestinationGrant) => any) | undefined;
33
+ onDestinations?: ((states: DestinationState[]) => any) | undefined;
34
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -4,9 +4,8 @@ type __VLS_Props = {
4
4
  locale?: string;
5
5
  ctx?: Pick<Context, 'call'>;
6
6
  };
7
- declare function refresh(): Promise<void>;
8
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
9
- refresh: typeof refresh;
8
+ refresh: () => Promise<void>;
10
9
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
10
  confirmed: () => any;
12
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -0,0 +1,23 @@
1
+ import type { BackgroundSaveFacade } from './long-running';
2
+ type __VLS_Props = {
3
+ sdk: BackgroundSaveFacade;
4
+ locale: string;
5
+ };
6
+ declare var __VLS_22: {
7
+ busy: boolean;
8
+ run: (work: () => Promise<unknown>) => Promise<void>;
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_22) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
14
+ refresh: () => Promise<void>;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -36,6 +36,9 @@ export declare const delegateCatalogs: Record<import("..").UiLocale, {
36
36
  pending: string;
37
37
  error: string;
38
38
  setupError: string;
39
+ passwordRejected: string;
40
+ passwordRequired: string;
41
+ passwordConfirmFailed: string;
39
42
  confirmingHelp: string;
40
43
  denied: string;
41
44
  session: string;
@@ -52,8 +55,6 @@ export declare const delegateCatalogs: Record<import("..").UiLocale, {
52
55
  preselection: string;
53
56
  preselectionHelp: string;
54
57
  scopeMismatch: string;
55
- scopeChangeHelp: string;
56
- confirmScope: string;
57
58
  waiting_executor: string;
58
59
  status: string;
59
60
  statusReady: string;
@@ -61,8 +62,9 @@ export declare const delegateCatalogs: Record<import("..").UiLocale, {
61
62
  statusScope: string;
62
63
  statusBlocked: string;
63
64
  statusConfirming: string;
65
+ statusUnreachable: string;
66
+ statusStarting: string;
64
67
  hintPassword: string;
65
- hintUnchanged: string;
66
68
  retry: string;
67
69
  }>;
68
70
  export declare function delegateCopy(locale?: string): {
@@ -101,6 +103,9 @@ export declare function delegateCopy(locale?: string): {
101
103
  pending: string;
102
104
  error: string;
103
105
  setupError: string;
106
+ passwordRejected: string;
107
+ passwordRequired: string;
108
+ passwordConfirmFailed: string;
104
109
  confirmingHelp: string;
105
110
  denied: string;
106
111
  session: string;
@@ -117,8 +122,6 @@ export declare function delegateCopy(locale?: string): {
117
122
  preselection: string;
118
123
  preselectionHelp: string;
119
124
  scopeMismatch: string;
120
- scopeChangeHelp: string;
121
- confirmScope: string;
122
125
  waiting_executor: string;
123
126
  status: string;
124
127
  statusReady: string;
@@ -126,8 +129,9 @@ export declare function delegateCopy(locale?: string): {
126
129
  statusScope: string;
127
130
  statusBlocked: string;
128
131
  statusConfirming: string;
132
+ statusUnreachable: string;
133
+ statusStarting: string;
129
134
  hintPassword: string;
130
- hintUnchanged: string;
131
135
  retry: string;
132
136
  };
133
137
  export declare function errorCopy(error: unknown, copy: DelegateCopy): string;
@@ -2,6 +2,8 @@ export type CapabilityState = 'unsupported' | 'needs-admin-approval' | 'ready' |
2
2
  export interface CapabilityStatus {
3
3
  state: CapabilityState;
4
4
  reason?: string;
5
+ code?: string;
6
+ outcome?: string;
5
7
  requested?: {
6
8
  scope: string;
7
9
  generation: number;