@synopackageland/sdk 0.9.8 → 0.10.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/README.md +133 -1
- package/dist/i18n/background/de.json +0 -1
- package/dist/i18n/background/en.json +0 -1
- package/dist/i18n/background/es.json +0 -1
- package/dist/i18n/background/fr.json +0 -1
- package/dist/i18n/background/it.json +0 -1
- package/dist/i18n/background/ja.json +2 -3
- package/dist/i18n/background/ko.json +0 -1
- package/dist/i18n/background/zh-CN.json +0 -1
- package/dist/i18n/background/zh-TW.json +0 -1
- package/dist/i18n/bridge/de.json +6 -0
- package/dist/i18n/bridge/en.json +6 -0
- package/dist/i18n/bridge/es.json +6 -0
- package/dist/i18n/bridge/fr.json +6 -0
- package/dist/i18n/bridge/it.json +6 -0
- package/dist/i18n/bridge/ja.json +6 -0
- package/dist/i18n/bridge/ko.json +6 -0
- package/dist/i18n/bridge/zh-CN.json +6 -0
- package/dist/i18n/bridge/zh-TW.json +6 -0
- package/dist/i18n/delegate/de.json +10 -2
- package/dist/i18n/delegate/en.json +10 -2
- package/dist/i18n/delegate/es.json +10 -2
- package/dist/i18n/delegate/fr.json +10 -2
- package/dist/i18n/delegate/it.json +10 -2
- package/dist/i18n/delegate/ja.json +10 -2
- package/dist/i18n/delegate/ko.json +10 -2
- package/dist/i18n/delegate/zh-CN.json +10 -2
- package/dist/i18n/delegate/zh-TW.json +10 -2
- package/dist/i18n/files/de.json +1 -0
- package/dist/i18n/files/en.json +1 -0
- package/dist/i18n/files/es.json +1 -0
- package/dist/i18n/files/fr.json +1 -0
- package/dist/i18n/files/it.json +1 -0
- package/dist/i18n/files/ja.json +1 -0
- package/dist/i18n/files/ko.json +1 -0
- package/dist/i18n/files/zh-CN.json +1 -0
- package/dist/i18n/files/zh-TW.json +1 -0
- package/dist/i18n/identity/de.json +2 -0
- package/dist/i18n/identity/en.json +2 -0
- package/dist/i18n/identity/es.json +2 -0
- package/dist/i18n/identity/fr.json +2 -0
- package/dist/i18n/identity/it.json +2 -0
- package/dist/i18n/identity/ja.json +2 -0
- package/dist/i18n/identity/ko.json +2 -0
- package/dist/i18n/identity/zh-CN.json +2 -0
- package/dist/i18n/identity/zh-TW.json +2 -0
- package/dist/i18n/portal/de.json +21 -0
- package/dist/i18n/portal/en.json +21 -0
- package/dist/i18n/portal/es.json +21 -0
- package/dist/i18n/portal/fr.json +21 -0
- package/dist/i18n/portal/it.json +21 -0
- package/dist/i18n/portal/ja.json +21 -0
- package/dist/i18n/portal/ko.json +21 -0
- package/dist/i18n/portal/zh-CN.json +21 -0
- package/dist/i18n/portal/zh-TW.json +21 -0
- package/dist/i18n/save/de.json +12 -2
- package/dist/i18n/save/en.json +12 -2
- package/dist/i18n/save/es.json +12 -2
- package/dist/i18n/save/fr.json +12 -2
- package/dist/i18n/save/it.json +12 -2
- package/dist/i18n/save/ja.json +12 -2
- package/dist/i18n/save/ko.json +12 -2
- package/dist/i18n/save/zh-CN.json +12 -2
- package/dist/i18n/save/zh-TW.json +12 -2
- package/dist/i18n/shell/de.json +5 -1
- package/dist/i18n/shell/en.json +5 -1
- package/dist/i18n/shell/es.json +5 -1
- package/dist/i18n/shell/fr.json +5 -1
- package/dist/i18n/shell/it.json +5 -1
- package/dist/i18n/shell/ja.json +5 -1
- package/dist/i18n/shell/ko.json +5 -1
- package/dist/i18n/shell/zh-CN.json +5 -1
- package/dist/i18n/shell/zh-TW.json +5 -1
- package/dist/index.js +2820 -2206
- package/dist/src/background/BackgroundPanel.vue.d.ts +4 -1
- package/dist/src/background/i18n.d.ts +0 -1
- package/dist/src/background/picker-provider.d.ts +1 -1
- package/dist/src/bridge/i18n.d.ts +5 -0
- package/dist/src/context.d.ts +26 -2
- package/dist/src/delegate/BackgroundSavePanel.vue.d.ts +6 -1
- package/dist/src/delegate/DelegatePanel.vue.d.ts +3 -1
- package/dist/src/delegate/ExecutorSettings.vue.d.ts +4 -1
- package/dist/src/delegate/copy.d.ts +18 -2
- package/dist/src/delegate/root.d.ts +40 -0
- package/dist/src/delegate/save-copy.d.ts +34 -4
- package/dist/src/i18n.d.ts +2 -0
- package/dist/src/identity/i18n.d.ts +2 -0
- package/dist/src/index.d.ts +8 -2
- package/dist/src/nas/NasPicker.vue.d.ts +3 -0
- package/dist/src/nas/locale.d.ts +1 -0
- package/dist/src/nas/provider.d.ts +2 -2
- package/dist/src/portal/access.d.ts +16 -0
- package/dist/src/portal/i18n.d.ts +3 -0
- package/dist/src/protocol/v1.d.ts +49 -4
- package/dist/src/shell/AppShell.vue.d.ts +31 -10
- package/dist/src/shell/app-pages.d.ts +37 -0
- package/dist/src/shell/i18n.d.ts +4 -0
- package/dist/src/shell/pages.d.ts +7 -2
- package/dist/src/shell/slot-content.d.ts +2 -0
- package/dist/src/standalone.d.ts +5 -0
- package/dist/src/vue.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/vue.js +1966 -1581
- package/package.json +4 -4
- package/spec/protocol/v1/README.md +154 -3
- package/spec/protocol/v1/errors.json +36 -4
- package/spec/protocol/v1/schema/root.jobs.get.json +19 -0
- package/spec/protocol/v1/schema/root.jobs.list.json +11 -0
- package/spec/protocol/v1/schema/root.jobs.stop.json +19 -0
- package/spec/protocol/v1/schema/root.run.json +6 -2
- package/spec/protocol/v1/schema/root.start.json +23 -0
- package/spec/protocol/v1/vectors/files.jsonl +11 -0
|
@@ -2,6 +2,9 @@ import type { Context } from '../context';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
ctx: Pick<Context, 'call' | 'locale'>;
|
|
4
4
|
};
|
|
5
|
-
declare
|
|
5
|
+
declare function refresh(): Promise<void>;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
7
|
+
refresh: typeof refresh;
|
|
8
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
9
|
declare const _default: typeof __VLS_export;
|
|
7
10
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Context } from '../context';
|
|
2
2
|
import type { NasProvider } from '../nas/contract';
|
|
3
|
-
export declare function createBackgroundPickerProvider(ctx: Pick<Context, 'call'>): NasProvider;
|
|
3
|
+
export declare function createBackgroundPickerProvider(ctx: Pick<Context, 'call' | 'requestTimeout'>): NasProvider;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const bridgeCatalogs: Record<string, Record<string, string>>;
|
|
2
|
+
/** The text of a code the bridge runtime adds (app_unavailable, and the
|
|
3
|
+
* services' limit_exceeded, read_failed, identity_unavailable) in a DSM or
|
|
4
|
+
* BCP-47 language; undefined for any other code. */
|
|
5
|
+
export declare function bridgeErrorCopy(e: unknown, locale: string): string | undefined;
|
package/dist/src/context.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface PortalAccess {
|
|
|
73
73
|
register?(): Promise<PortalStatus>;
|
|
74
74
|
unregister?(): Promise<PortalStatus>;
|
|
75
75
|
openControlPanel(): void;
|
|
76
|
-
mountPanel(element: HTMLElement): {
|
|
76
|
+
mountPanel?(element: HTMLElement): {
|
|
77
77
|
refresh(): Promise<void>;
|
|
78
78
|
dispose(): void;
|
|
79
79
|
};
|
|
@@ -90,7 +90,13 @@ export interface AuthorizationAccess {
|
|
|
90
90
|
request(): Promise<AuthorizationStatus>;
|
|
91
91
|
revoke(): Promise<AuthorizationStatus>;
|
|
92
92
|
}
|
|
93
|
+
export declare const DEFAULT_REQUEST_TIMEOUT = 60000;
|
|
94
|
+
export declare function clientTimeout(requestTimeout?: number): number;
|
|
95
|
+
export interface CallOptions {
|
|
96
|
+
signal?: AbortSignal;
|
|
97
|
+
}
|
|
93
98
|
export interface Context {
|
|
99
|
+
requestTimeout?: number;
|
|
94
100
|
authorization?: AuthorizationAccess;
|
|
95
101
|
delegate?: import('./delegate/long-running').BackgroundSaveFacade;
|
|
96
102
|
files?: {
|
|
@@ -98,17 +104,35 @@ export interface Context {
|
|
|
98
104
|
token?: () => string | undefined;
|
|
99
105
|
};
|
|
100
106
|
displayName?: string;
|
|
107
|
+
appIcon?: string;
|
|
108
|
+
fullPage?: boolean;
|
|
101
109
|
executor?: import('./delegate/executor-setup').ExecutorSetup;
|
|
102
110
|
user?: {
|
|
103
111
|
readonly name: string;
|
|
104
112
|
readonly isAdmin: boolean;
|
|
105
113
|
};
|
|
106
114
|
portal?: PortalAccess;
|
|
107
|
-
call<T = unknown>(method: string, params?: Record<string, unknown
|
|
115
|
+
call<T = unknown>(method: string, params?: Record<string, unknown>, options?: CallOptions): Promise<T>;
|
|
108
116
|
reopen(fn: () => void): () => void;
|
|
109
117
|
locale: string;
|
|
118
|
+
lang?: string;
|
|
119
|
+
t?: (key: string, params?: Record<string, unknown>) => string;
|
|
120
|
+
appWindow?: unknown;
|
|
110
121
|
host: HostAdapter;
|
|
111
122
|
}
|
|
123
|
+
/** What tells a full page apart: the launch, or the host when an older CLI omits it. */
|
|
124
|
+
export type LaunchContext = {
|
|
125
|
+
fullPage: boolean;
|
|
126
|
+
host?: Pick<HostAdapter, 'platform'>;
|
|
127
|
+
} | {
|
|
128
|
+
fullPage?: boolean;
|
|
129
|
+
host: Pick<HostAdapter, 'platform'>;
|
|
130
|
+
};
|
|
131
|
+
/** What AppShell reads: the launch, the brand, the signed-in account and, with app-root, the window to bring to the front. */
|
|
132
|
+
export type ShellContext = LaunchContext & Pick<Context, 'displayName' | 'appIcon' | 'user'> & {
|
|
133
|
+
host?: Partial<Pick<HostAdapter, 'activateWindow'>>;
|
|
134
|
+
};
|
|
135
|
+
export declare function isFullPage(ctx: LaunchContext): boolean;
|
|
112
136
|
export interface AppStatus {
|
|
113
137
|
package: string;
|
|
114
138
|
version: string;
|
|
@@ -7,9 +7,14 @@ type __VLS_Props = {
|
|
|
7
7
|
picker?: {
|
|
8
8
|
provider: NasProvider;
|
|
9
9
|
keys: string[];
|
|
10
|
+
labels?: Record<string, string>;
|
|
10
11
|
};
|
|
12
|
+
pickerErrorText?: (error: unknown) => string | undefined;
|
|
13
|
+
sampleSave?: boolean;
|
|
11
14
|
};
|
|
12
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
16
|
+
refresh: () => Promise<void>;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
18
|
authorized: (grant: DestinationGrant) => any;
|
|
14
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
20
|
onAuthorized?: ((grant: DestinationGrant) => any) | undefined;
|
|
@@ -2,6 +2,8 @@ import type { Context } from '../context';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
ctx: Pick<Context, 'call' | 'locale'>;
|
|
4
4
|
};
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
6
|
+
refresh: () => Promise<void>;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
8
|
declare const _default: typeof __VLS_export;
|
|
7
9
|
export default _default;
|
|
@@ -4,7 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
locale?: string;
|
|
5
5
|
ctx?: Pick<Context, 'call'>;
|
|
6
6
|
};
|
|
7
|
-
declare
|
|
7
|
+
declare function refresh(): Promise<void>;
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
9
|
+
refresh: typeof refresh;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
11
|
confirmed: () => any;
|
|
9
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
13
|
onConfirmed?: (() => any) | undefined;
|
|
@@ -15,7 +15,6 @@ export declare const delegateCatalogs: Record<import("..").UiLocale, {
|
|
|
15
15
|
blocked: string;
|
|
16
16
|
loading: string;
|
|
17
17
|
details: string;
|
|
18
|
-
refresh: string;
|
|
19
18
|
revoke: string;
|
|
20
19
|
cancel: string;
|
|
21
20
|
noDelegations: string;
|
|
@@ -49,6 +48,15 @@ export declare const delegateCatalogs: Record<import("..").UiLocale, {
|
|
|
49
48
|
scopeChangeHelp: string;
|
|
50
49
|
confirmScope: string;
|
|
51
50
|
waiting_executor: string;
|
|
51
|
+
status: string;
|
|
52
|
+
statusReady: string;
|
|
53
|
+
statusNeeds: string;
|
|
54
|
+
statusScope: string;
|
|
55
|
+
statusBlocked: string;
|
|
56
|
+
statusConfirming: string;
|
|
57
|
+
hintPassword: string;
|
|
58
|
+
hintUnchanged: string;
|
|
59
|
+
retry: string;
|
|
52
60
|
}>;
|
|
53
61
|
export declare function delegateCopy(locale?: string): {
|
|
54
62
|
title: string;
|
|
@@ -65,7 +73,6 @@ export declare function delegateCopy(locale?: string): {
|
|
|
65
73
|
blocked: string;
|
|
66
74
|
loading: string;
|
|
67
75
|
details: string;
|
|
68
|
-
refresh: string;
|
|
69
76
|
revoke: string;
|
|
70
77
|
cancel: string;
|
|
71
78
|
noDelegations: string;
|
|
@@ -99,5 +106,14 @@ export declare function delegateCopy(locale?: string): {
|
|
|
99
106
|
scopeChangeHelp: string;
|
|
100
107
|
confirmScope: string;
|
|
101
108
|
waiting_executor: string;
|
|
109
|
+
status: string;
|
|
110
|
+
statusReady: string;
|
|
111
|
+
statusNeeds: string;
|
|
112
|
+
statusScope: string;
|
|
113
|
+
statusBlocked: string;
|
|
114
|
+
statusConfirming: string;
|
|
115
|
+
hintPassword: string;
|
|
116
|
+
hintUnchanged: string;
|
|
117
|
+
retry: string;
|
|
102
118
|
};
|
|
103
119
|
export declare function errorCopy(error: unknown, copy: DelegateCopy): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { RootJobsGetParams } from '../protocol/v1';
|
|
2
|
+
export type RootRunResult = {
|
|
3
|
+
request_id: string;
|
|
4
|
+
exit_code: number;
|
|
5
|
+
stderr: string;
|
|
6
|
+
} & ({
|
|
7
|
+
output: string;
|
|
8
|
+
} | {
|
|
9
|
+
staging: string;
|
|
10
|
+
size: number;
|
|
11
|
+
});
|
|
12
|
+
export type RootJobState = 'running' | 'stopping' | 'succeeded' | 'failed' | 'canceled' | 'timed-out' | 'interrupted';
|
|
13
|
+
export type RootJobRef = RootJobsGetParams;
|
|
14
|
+
export interface RootJobProgress {
|
|
15
|
+
percent?: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
phase?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface RootJob {
|
|
20
|
+
job_id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
state: RootJobState;
|
|
23
|
+
requested_by: string;
|
|
24
|
+
started_at: string;
|
|
25
|
+
ended_at?: string;
|
|
26
|
+
exit_code?: number;
|
|
27
|
+
cancel_reason?: string;
|
|
28
|
+
progress?: RootJobProgress;
|
|
29
|
+
result?: unknown;
|
|
30
|
+
output: string;
|
|
31
|
+
}
|
|
32
|
+
export type RootStartResult = {
|
|
33
|
+
job_id: string;
|
|
34
|
+
state: 'running';
|
|
35
|
+
};
|
|
36
|
+
export type RootJobSummary = Omit<RootJob, 'progress' | 'result' | 'output'> & {
|
|
37
|
+
progress?: {
|
|
38
|
+
percent?: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -10,7 +10,6 @@ export declare const saveCatalogs: Record<import("..").UiLocale, {
|
|
|
10
10
|
choose: string;
|
|
11
11
|
needs: string;
|
|
12
12
|
cancel: string;
|
|
13
|
-
refresh: string;
|
|
14
13
|
disable: string;
|
|
15
14
|
enable: string;
|
|
16
15
|
disableHelp: string;
|
|
@@ -30,8 +29,10 @@ export declare const saveCatalogs: Record<import("..").UiLocale, {
|
|
|
30
29
|
loading: string;
|
|
31
30
|
denied: string;
|
|
32
31
|
permission: string;
|
|
32
|
+
permissionSelect: string;
|
|
33
33
|
missing: string;
|
|
34
34
|
appPrivilege: string;
|
|
35
|
+
appPrivilegeSelect: string;
|
|
35
36
|
session: string;
|
|
36
37
|
conflict: string;
|
|
37
38
|
space: string;
|
|
@@ -42,6 +43,15 @@ export declare const saveCatalogs: Record<import("..").UiLocale, {
|
|
|
42
43
|
reselect: string;
|
|
43
44
|
example: string;
|
|
44
45
|
exampleHelp: string;
|
|
46
|
+
statusEnabled: string;
|
|
47
|
+
statusDisabled: string;
|
|
48
|
+
statusNeedsScope: string;
|
|
49
|
+
status: string;
|
|
50
|
+
file: string;
|
|
51
|
+
size: string;
|
|
52
|
+
location: string;
|
|
53
|
+
openFolder: string;
|
|
54
|
+
retry: string;
|
|
45
55
|
}>;
|
|
46
56
|
export declare function saveCopy(locale?: string): {
|
|
47
57
|
title: string;
|
|
@@ -55,7 +65,6 @@ export declare function saveCopy(locale?: string): {
|
|
|
55
65
|
choose: string;
|
|
56
66
|
needs: string;
|
|
57
67
|
cancel: string;
|
|
58
|
-
refresh: string;
|
|
59
68
|
disable: string;
|
|
60
69
|
enable: string;
|
|
61
70
|
disableHelp: string;
|
|
@@ -75,8 +84,10 @@ export declare function saveCopy(locale?: string): {
|
|
|
75
84
|
loading: string;
|
|
76
85
|
denied: string;
|
|
77
86
|
permission: string;
|
|
87
|
+
permissionSelect: string;
|
|
78
88
|
missing: string;
|
|
79
89
|
appPrivilege: string;
|
|
90
|
+
appPrivilegeSelect: string;
|
|
80
91
|
session: string;
|
|
81
92
|
conflict: string;
|
|
82
93
|
space: string;
|
|
@@ -87,6 +98,15 @@ export declare function saveCopy(locale?: string): {
|
|
|
87
98
|
reselect: string;
|
|
88
99
|
example: string;
|
|
89
100
|
exampleHelp: string;
|
|
101
|
+
statusEnabled: string;
|
|
102
|
+
statusDisabled: string;
|
|
103
|
+
statusNeedsScope: string;
|
|
104
|
+
status: string;
|
|
105
|
+
file: string;
|
|
106
|
+
size: string;
|
|
107
|
+
location: string;
|
|
108
|
+
openFolder: string;
|
|
109
|
+
retry: string;
|
|
90
110
|
};
|
|
91
111
|
export declare function saveError(error: unknown, copy?: {
|
|
92
112
|
title: string;
|
|
@@ -100,7 +120,6 @@ export declare function saveError(error: unknown, copy?: {
|
|
|
100
120
|
choose: string;
|
|
101
121
|
needs: string;
|
|
102
122
|
cancel: string;
|
|
103
|
-
refresh: string;
|
|
104
123
|
disable: string;
|
|
105
124
|
enable: string;
|
|
106
125
|
disableHelp: string;
|
|
@@ -120,8 +139,10 @@ export declare function saveError(error: unknown, copy?: {
|
|
|
120
139
|
loading: string;
|
|
121
140
|
denied: string;
|
|
122
141
|
permission: string;
|
|
142
|
+
permissionSelect: string;
|
|
123
143
|
missing: string;
|
|
124
144
|
appPrivilege: string;
|
|
145
|
+
appPrivilegeSelect: string;
|
|
125
146
|
session: string;
|
|
126
147
|
conflict: string;
|
|
127
148
|
space: string;
|
|
@@ -132,4 +153,13 @@ export declare function saveError(error: unknown, copy?: {
|
|
|
132
153
|
reselect: string;
|
|
133
154
|
example: string;
|
|
134
155
|
exampleHelp: string;
|
|
135
|
-
|
|
156
|
+
statusEnabled: string;
|
|
157
|
+
statusDisabled: string;
|
|
158
|
+
statusNeedsScope: string;
|
|
159
|
+
status: string;
|
|
160
|
+
file: string;
|
|
161
|
+
size: string;
|
|
162
|
+
location: string;
|
|
163
|
+
openFolder: string;
|
|
164
|
+
retry: string;
|
|
165
|
+
}, situation?: 'save' | 'select'): string;
|
package/dist/src/i18n.d.ts
CHANGED
|
@@ -22,3 +22,5 @@ export type Message = string | {
|
|
|
22
22
|
/** Fills {key} placeholders from values; a placeholder without a value stays
|
|
23
23
|
* visible. Plural forms are chosen by values.count in the given locale. */
|
|
24
24
|
export declare function format(message: Message, values: Record<string, string | number>, locale?: string): string;
|
|
25
|
+
/** The colon between a label and its value: full-width in Chinese and Japanese. */
|
|
26
|
+
export declare function labelSeparator(locale: string): string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export type * from './context';
|
|
2
|
+
export { DEFAULT_REQUEST_TIMEOUT, clientTimeout, isFullPage } from './context';
|
|
3
|
+
export { createStandaloneHost, createStandaloneContext } from './standalone';
|
|
2
4
|
export type * from './delegate/long-running';
|
|
3
5
|
export type * from './delegate/executor-setup';
|
|
6
|
+
export type * from './delegate/root';
|
|
4
7
|
export type * from './nas/contract';
|
|
5
8
|
export type { AppSaveJob } from './delegate/facade';
|
|
6
9
|
export type { FileTransport } from './files/transfers';
|
|
@@ -11,8 +14,8 @@ export { FILE_STATION_APP, fileStationPath, openFolderInFileStation, openFileInF
|
|
|
11
14
|
export { createBackgroundPickerProvider } from './background/picker-provider';
|
|
12
15
|
export { scopedPicker } from './delegate/scoped-picker';
|
|
13
16
|
export { requestKey } from './background/request-key';
|
|
14
|
-
export { shellPages, activePage, type ShellPage, type ShellFeatureFlags } from './shell/pages';
|
|
15
|
-
export { uiLocale, uiLocales, catalogs, mergeCatalogs, format, type Message, type UiLocale } from './i18n';
|
|
17
|
+
export { shellPages, activePage, type ShellPage, type ShellFeatureFlags, type PageRef } from './shell/pages';
|
|
18
|
+
export { uiLocale, uiLocales, catalogs, mergeCatalogs, format, labelSeparator, type Message, type UiLocale } from './i18n';
|
|
16
19
|
export { nasCopy, nasErrorCopy, nasCatalogs, type NasCopy } from './nas/locale';
|
|
17
20
|
export { shellCopy, shellCatalogs, type ShellCopy } from './shell/i18n';
|
|
18
21
|
export { identityCopy, identityCatalogs, type IdentityCopy, type IdentityNotice } from './identity/i18n';
|
|
@@ -20,5 +23,8 @@ export { backgroundCopy, backgroundErrorCopy, backgroundCatalogs, type Backgroun
|
|
|
20
23
|
export { delegateCopy, errorCopy, delegateCatalogs, type DelegateCopy } from './delegate/copy';
|
|
21
24
|
export { saveCopy, saveError, saveCatalogs } from './delegate/save-copy';
|
|
22
25
|
export { authorizationCopy, authorizationCatalogs } from './authorization/i18n';
|
|
26
|
+
export { portalMessages, portalCatalogs } from './portal/i18n';
|
|
27
|
+
export { bridgeErrorCopy, bridgeCatalogs } from './bridge/i18n';
|
|
28
|
+
export { createPortalAccess, type PortalOptions } from './portal/access';
|
|
23
29
|
export * from './protocol/v1';
|
|
24
30
|
export { encodeRequest, decodeResponse, type ProtocolAuth, type ProtocolResponse } from './protocol/codec';
|
|
@@ -8,15 +8,18 @@ type __VLS_Props = {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
description?: string;
|
|
10
10
|
destination?: DestinationSelection;
|
|
11
|
+
errorText?: (error: unknown) => string | undefined;
|
|
11
12
|
};
|
|
12
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
14
|
selected: (path: string) => any;
|
|
14
15
|
"update:open": (value: boolean) => any;
|
|
15
16
|
authorized: (grant: DestinationGrant) => any;
|
|
17
|
+
refused: (error: unknown) => any;
|
|
16
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
19
|
onSelected?: ((path: string) => any) | undefined;
|
|
18
20
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
19
21
|
onAuthorized?: ((grant: DestinationGrant) => any) | undefined;
|
|
22
|
+
onRefused?: ((error: unknown) => any) | undefined;
|
|
20
23
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
24
|
declare const _default: typeof __VLS_export;
|
|
22
25
|
export default _default;
|
package/dist/src/nas/locale.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Context } from '../context';
|
|
2
2
|
import type { NasProvider } from './contract';
|
|
3
|
-
export declare function createNasProvider(ctx: Pick<Context, 'call' | 'files'>): NasProvider;
|
|
3
|
+
export declare function createNasProvider(ctx: Pick<Context, 'call' | 'files' | 'requestTimeout'>): NasProvider;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PortalAccess } from '../context';
|
|
2
|
+
export interface PortalOptions {
|
|
3
|
+
appId: string;
|
|
4
|
+
defaultAlias: string;
|
|
5
|
+
locale: string;
|
|
6
|
+
location: {
|
|
7
|
+
protocol: string;
|
|
8
|
+
host: string;
|
|
9
|
+
};
|
|
10
|
+
call(method: 'portal.status' | 'portal.register' | 'portal.unregister', params: Record<string, never>): Promise<unknown>;
|
|
11
|
+
send(api: string, method: string, version: number, params: Record<string, unknown>): Promise<unknown>;
|
|
12
|
+
isAdmin(): boolean;
|
|
13
|
+
launch(app: string, params: Record<string, string>): void;
|
|
14
|
+
entry?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function createPortalAccess(options: PortalOptions): PortalAccess;
|
|
@@ -108,12 +108,36 @@ export declare const protocolCodes: {
|
|
|
108
108
|
readonly retryable: true;
|
|
109
109
|
readonly httpStatus: 502;
|
|
110
110
|
};
|
|
111
|
-
/** The root
|
|
111
|
+
/** The root program could not run, ended by a signal, or its output could not be kept. */
|
|
112
112
|
readonly ROOT_FAILED: {
|
|
113
113
|
readonly kind: "refusal";
|
|
114
114
|
readonly retryable: false;
|
|
115
115
|
readonly httpStatus: 500;
|
|
116
116
|
};
|
|
117
|
+
/** The root program ran past its policy timeout and was killed. */
|
|
118
|
+
readonly ROOT_TIMEOUT: {
|
|
119
|
+
readonly kind: "refusal";
|
|
120
|
+
readonly retryable: true;
|
|
121
|
+
readonly httpStatus: 504;
|
|
122
|
+
};
|
|
123
|
+
/** The package already runs as many root programs as it may. */
|
|
124
|
+
readonly ROOT_BUSY: {
|
|
125
|
+
readonly kind: "refusal";
|
|
126
|
+
readonly retryable: true;
|
|
127
|
+
readonly httpStatus: 429;
|
|
128
|
+
};
|
|
129
|
+
/** Root output waiting in the staging folder already fills its quota. */
|
|
130
|
+
readonly ROOT_STAGING_FULL: {
|
|
131
|
+
readonly kind: "refusal";
|
|
132
|
+
readonly retryable: true;
|
|
133
|
+
readonly httpStatus: 507;
|
|
134
|
+
};
|
|
135
|
+
/** No root job of the package has this job_id. */
|
|
136
|
+
readonly ROOT_JOB_NOT_FOUND: {
|
|
137
|
+
readonly kind: "refusal";
|
|
138
|
+
readonly retryable: false;
|
|
139
|
+
readonly httpStatus: 404;
|
|
140
|
+
};
|
|
117
141
|
/** DSM did not accept the Application Portal change; status portal says whether the entry needs another removal. */
|
|
118
142
|
readonly PORTAL_FAILED: {
|
|
119
143
|
readonly kind: "refusal";
|
|
@@ -246,7 +270,7 @@ export declare const protocolCodes: {
|
|
|
246
270
|
readonly retryable: true;
|
|
247
271
|
readonly httpStatus: 429;
|
|
248
272
|
};
|
|
249
|
-
/** The file is larger than max_bytes. */
|
|
273
|
+
/** The file is larger than max_bytes, or root output is larger than its policy max_output. */
|
|
250
274
|
readonly "limit-exceeded": {
|
|
251
275
|
readonly kind: "refusal";
|
|
252
276
|
readonly retryable: false;
|
|
@@ -344,7 +368,7 @@ export declare const protocolCodes: {
|
|
|
344
368
|
};
|
|
345
369
|
};
|
|
346
370
|
export type ProtocolCode = keyof typeof protocolCodes;
|
|
347
|
-
export type RefusalCode = "AUTH_DENIED" | "INELIGIBLE" | "APP_DENIED" | "ADMIN_REQUIRED" | "DELEGATION_DENIED" | "SCOPE_DENIED" | "POLICY_DENIED" | "PEER_DENIED" | "PERMISSION_DENIED" | "UNKNOWN_OP" | "INVALID_REQUEST" | "REQUEST_TOO_LARGE" | "EXECUTOR_PAUSED" | "STORAGE_ERROR" | "INTERNAL" | "WRITE_FAILED" | "READ_FAILED" | "DSM_FAILED" | "ROOT_FAILED" | "PORTAL_FAILED" | "NO_SPACE" | "SCOPE_APPROVAL_STALE" | "IDENTITY_CHANGED" | "needs-scope-confirmation" | "disabled" | "invalid-destination" | "invalid-size" | "operation-conflict" | "operation-not-found" | "destination-exists" | "invalid-path" | "path-too-deep" | "destination-not-directory" | "name-too-long" | "not-found" | "not-a-file" | "recursive-required" | "recycle-bin-disabled" | "task-not-found" | "too-many-tasks" | "queue-full" | "limit-exceeded";
|
|
371
|
+
export type RefusalCode = "AUTH_DENIED" | "INELIGIBLE" | "APP_DENIED" | "ADMIN_REQUIRED" | "DELEGATION_DENIED" | "SCOPE_DENIED" | "POLICY_DENIED" | "PEER_DENIED" | "PERMISSION_DENIED" | "UNKNOWN_OP" | "INVALID_REQUEST" | "REQUEST_TOO_LARGE" | "EXECUTOR_PAUSED" | "STORAGE_ERROR" | "INTERNAL" | "WRITE_FAILED" | "READ_FAILED" | "DSM_FAILED" | "ROOT_FAILED" | "ROOT_TIMEOUT" | "ROOT_BUSY" | "ROOT_STAGING_FULL" | "ROOT_JOB_NOT_FOUND" | "PORTAL_FAILED" | "NO_SPACE" | "SCOPE_APPROVAL_STALE" | "IDENTITY_CHANGED" | "needs-scope-confirmation" | "disabled" | "invalid-destination" | "invalid-size" | "operation-conflict" | "operation-not-found" | "destination-exists" | "invalid-path" | "path-too-deep" | "destination-not-directory" | "name-too-long" | "not-found" | "not-a-file" | "recursive-required" | "recycle-bin-disabled" | "task-not-found" | "too-many-tasks" | "queue-full" | "limit-exceeded";
|
|
348
372
|
export type OutcomeCode = "OPERATION_CANCELED" | "CANCEL_REQUESTED" | "CLEANUP_PENDING";
|
|
349
373
|
export type ReasonCode = "grant-revoked" | "destination-replaced" | "integration-disabled" | "validation-denied" | "scope-changed" | "storage-error" | "operation-canceled-by-user" | "operation-deadline-exceeded";
|
|
350
374
|
export type ClientCode = "EXECUTOR_UNAVAILABLE" | "EXECUTOR_TIMEOUT" | "EXECUTOR_TOO_LARGE" | "EXECUTOR_PROTOCOL";
|
|
@@ -485,9 +509,26 @@ export interface PortalRegisterParams {
|
|
|
485
509
|
/** portal.unregister: Administrator: remove the App's Application Portal entry, its saved alias and every nginx conf DSM generated for it. Since 0.9.6. */
|
|
486
510
|
export interface PortalUnregisterParams {
|
|
487
511
|
}
|
|
488
|
-
/** root.
|
|
512
|
+
/** root.jobs.get: Administrator whom Application Privileges allow to use the App: one root job with its state, latest progress and result. Since 0.10.0. */
|
|
513
|
+
export interface RootJobsGetParams {
|
|
514
|
+
job_id: string;
|
|
515
|
+
}
|
|
516
|
+
/** root.jobs.list: Administrator whom Application Privileges allow to use the App: list the package's root jobs, newest first. Since 0.10.0. */
|
|
517
|
+
export interface RootJobsListParams {
|
|
518
|
+
}
|
|
519
|
+
/** root.jobs.stop: Administrator whom Application Privileges allow to use the App: ask a running root job to cancel; it is killed after its grace. Since 0.10.0. */
|
|
520
|
+
export interface RootJobsStopParams {
|
|
521
|
+
job_id: string;
|
|
522
|
+
}
|
|
523
|
+
/** root.run: Administrator whom Application Privileges allow to use the App: run a root program pinned by digest in the policy. Params reach the program on stdin as JSON, checked against the entry's schema; the reply carries its exit code, stderr and output, or a staging file for large output. Since 0.9.0. */
|
|
489
524
|
export interface RootRunParams {
|
|
490
525
|
name: string;
|
|
526
|
+
params?: Record<string, unknown>;
|
|
527
|
+
}
|
|
528
|
+
/** root.start: Administrator whom Application Privileges allow to use the App: start a root job, a pinned program with job limits, in the background. Params reach it on stdin; it reports progress on fd 5 and is told to cancel on fd 4. Since 0.10.0. */
|
|
529
|
+
export interface RootStartParams {
|
|
530
|
+
name: string;
|
|
531
|
+
params?: Record<string, unknown>;
|
|
491
532
|
}
|
|
492
533
|
/** status: Executor readiness, protocol version, digests and the folder scope selection. Since 0.9.0. */
|
|
493
534
|
export interface StatusParams {
|
|
@@ -517,7 +558,11 @@ export interface ProtocolParams {
|
|
|
517
558
|
"files.write": FilesWriteParams;
|
|
518
559
|
"portal.register": PortalRegisterParams;
|
|
519
560
|
"portal.unregister": PortalUnregisterParams;
|
|
561
|
+
"root.jobs.get": RootJobsGetParams;
|
|
562
|
+
"root.jobs.list": RootJobsListParams;
|
|
563
|
+
"root.jobs.stop": RootJobsStopParams;
|
|
520
564
|
"root.run": RootRunParams;
|
|
565
|
+
"root.start": RootStartParams;
|
|
521
566
|
"status": StatusParams;
|
|
522
567
|
}
|
|
523
568
|
export type ProtocolOp = keyof ProtocolParams;
|
|
@@ -1,20 +1,41 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WideLayout } from '@synopackageland/ui';
|
|
2
|
+
import { type ShellContext } from '../context';
|
|
3
|
+
import { type AppShellDenied, type AppShellPageEntry } from './app-pages';
|
|
2
4
|
type __VLS_Props = {
|
|
3
5
|
locale: string;
|
|
4
|
-
modelValue:
|
|
5
|
-
pages: readonly
|
|
6
|
+
modelValue: string;
|
|
7
|
+
pages: readonly AppShellPageEntry[];
|
|
6
8
|
description?: string;
|
|
9
|
+
ctx?: ShellContext;
|
|
10
|
+
wideLayout?: WideLayout;
|
|
11
|
+
sidebarStorageKey?: string;
|
|
12
|
+
brandName?: string;
|
|
13
|
+
brandIcon?: string;
|
|
14
|
+
keepScroll?: boolean;
|
|
15
|
+
pageWidth?: 'fill' | 'readable' | (string & {});
|
|
16
|
+
denied?: boolean | AppShellDenied;
|
|
17
|
+
appRoot?: boolean;
|
|
7
18
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
19
|
+
type __VLS_Slots = {
|
|
20
|
+
default?: (scope: {
|
|
21
|
+
page: string;
|
|
22
|
+
}) => unknown;
|
|
23
|
+
actions?: (scope: {
|
|
24
|
+
page: string;
|
|
25
|
+
}) => unknown;
|
|
26
|
+
toolbar?: (scope: {
|
|
27
|
+
page: string;
|
|
28
|
+
}) => unknown;
|
|
29
|
+
notices?: (scope: {
|
|
30
|
+
page: string;
|
|
31
|
+
}) => unknown;
|
|
32
|
+
'sidebar-footer'?: () => unknown;
|
|
33
|
+
denied?: () => unknown;
|
|
13
34
|
};
|
|
14
35
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
-
"update:modelValue": (value:
|
|
36
|
+
"update:modelValue": (value: string) => any;
|
|
16
37
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
"onUpdate:modelValue"?: ((value:
|
|
38
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
39
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { AppSidebarGroup } from '@synopackageland/ui';
|
|
3
|
+
import type { ShellCopy } from './i18n';
|
|
4
|
+
import type { ShellPage } from './pages';
|
|
5
|
+
export interface AppShellPage {
|
|
6
|
+
id: string;
|
|
7
|
+
/** Sidebar label and page title, already in the App's language. */
|
|
8
|
+
title: string;
|
|
9
|
+
icon?: Component;
|
|
10
|
+
/** Pages that share a label sit together under it, in first-seen order. */
|
|
11
|
+
group?: string;
|
|
12
|
+
badge?: string | number;
|
|
13
|
+
/** Rendered for this page; without one the default slot renders it. */
|
|
14
|
+
component?: Component;
|
|
15
|
+
/** Reachable through v-model but not listed in the sidebar. */
|
|
16
|
+
hidden?: boolean;
|
|
17
|
+
/** Replaces the shell's description for this page. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** false: the page draws its own header. */
|
|
20
|
+
header?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The body fills the height under the header and the page does not scroll:
|
|
23
|
+
* the content scrolls itself (a treemap, a table paged by height, a log).
|
|
24
|
+
*/
|
|
25
|
+
fill?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export type AppShellPageEntry = ShellPage | AppShellPage;
|
|
28
|
+
/** The page a denied shell shows; each field falls back to the shell's own words. */
|
|
29
|
+
export interface AppShellDenied {
|
|
30
|
+
title?: string;
|
|
31
|
+
/** The default body; the denied slot replaces it. */
|
|
32
|
+
message?: string;
|
|
33
|
+
/** false: the denied slot draws its own header. */
|
|
34
|
+
header?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function resolvePages(entries: readonly AppShellPageEntry[], copy: ShellCopy): AppShellPage[];
|
|
37
|
+
export declare function sidebarGroups(pages: readonly AppShellPage[]): AppSidebarGroup[];
|
package/dist/src/shell/i18n.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ export type ShellCopy = typeof en;
|
|
|
3
3
|
export declare const shellCatalogs: Record<import("..").UiLocale, {
|
|
4
4
|
status: string;
|
|
5
5
|
background: string;
|
|
6
|
+
administrator: string;
|
|
7
|
+
dsmUser: string;
|
|
8
|
+
deniedTitle: string;
|
|
9
|
+
deniedMessage: string;
|
|
6
10
|
}>;
|
|
7
11
|
export declare function shellCopy(locale: string): ShellCopy;
|
|
@@ -3,5 +3,10 @@ export interface ShellFeatureFlags {
|
|
|
3
3
|
background?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare function shellPages(features: ShellFeatureFlags): ShellPage[];
|
|
6
|
-
/**
|
|
7
|
-
export
|
|
6
|
+
/** A page id, or an App's page with an id that may be left out of the sidebar. */
|
|
7
|
+
export type PageRef<T extends string = string> = T | {
|
|
8
|
+
readonly id: T;
|
|
9
|
+
readonly hidden?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** Keeps a selection that still exists; otherwise the first page the sidebar shows wins. */
|
|
12
|
+
export declare function activePage<T extends string>(current: string | undefined, pages: readonly PageRef<T>[]): T;
|