@synopackageland/sdk 0.0.0-stage → 0.9.1
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/LICENSE +21 -0
- package/README.md +34 -2
- package/dist/i18n/authorization/de.json +37 -0
- package/dist/i18n/authorization/en.json +37 -0
- package/dist/i18n/authorization/es.json +37 -0
- package/dist/i18n/authorization/fr.json +37 -0
- package/dist/i18n/authorization/it.json +37 -0
- package/dist/i18n/authorization/ja.json +37 -0
- package/dist/i18n/authorization/ko.json +37 -0
- package/dist/i18n/authorization/zh-CN.json +37 -0
- package/dist/i18n/authorization/zh-TW.json +37 -0
- package/dist/i18n/background/de.json +75 -0
- package/dist/i18n/background/en.json +75 -0
- package/dist/i18n/background/es.json +75 -0
- package/dist/i18n/background/fr.json +75 -0
- package/dist/i18n/background/it.json +75 -0
- package/dist/i18n/background/ja.json +75 -0
- package/dist/i18n/background/ko.json +75 -0
- package/dist/i18n/background/zh-CN.json +75 -0
- package/dist/i18n/background/zh-TW.json +75 -0
- package/dist/i18n/delegate/de.json +49 -0
- package/dist/i18n/delegate/en.json +49 -0
- package/dist/i18n/delegate/es.json +49 -0
- package/dist/i18n/delegate/fr.json +49 -0
- package/dist/i18n/delegate/it.json +49 -0
- package/dist/i18n/delegate/ja.json +49 -0
- package/dist/i18n/delegate/ko.json +49 -0
- package/dist/i18n/delegate/zh-CN.json +49 -0
- package/dist/i18n/delegate/zh-TW.json +49 -0
- package/dist/i18n/files/de.json +41 -0
- package/dist/i18n/files/en.json +41 -0
- package/dist/i18n/files/es.json +41 -0
- package/dist/i18n/files/fr.json +41 -0
- package/dist/i18n/files/it.json +41 -0
- package/dist/i18n/files/ja.json +41 -0
- package/dist/i18n/files/ko.json +41 -0
- package/dist/i18n/files/zh-CN.json +41 -0
- package/dist/i18n/files/zh-TW.json +41 -0
- package/dist/i18n/identity/de.json +27 -0
- package/dist/i18n/identity/en.json +27 -0
- package/dist/i18n/identity/es.json +27 -0
- package/dist/i18n/identity/fr.json +27 -0
- package/dist/i18n/identity/it.json +27 -0
- package/dist/i18n/identity/ja.json +27 -0
- package/dist/i18n/identity/ko.json +27 -0
- package/dist/i18n/identity/zh-CN.json +27 -0
- package/dist/i18n/identity/zh-TW.json +27 -0
- package/dist/i18n/save/de.json +42 -0
- package/dist/i18n/save/en.json +42 -0
- package/dist/i18n/save/es.json +42 -0
- package/dist/i18n/save/fr.json +42 -0
- package/dist/i18n/save/it.json +42 -0
- package/dist/i18n/save/ja.json +42 -0
- package/dist/i18n/save/ko.json +42 -0
- package/dist/i18n/save/zh-CN.json +42 -0
- package/dist/i18n/save/zh-TW.json +42 -0
- package/dist/i18n/shell/de.json +4 -0
- package/dist/i18n/shell/en.json +4 -0
- package/dist/i18n/shell/es.json +4 -0
- package/dist/i18n/shell/fr.json +4 -0
- package/dist/i18n/shell/it.json +4 -0
- package/dist/i18n/shell/ja.json +4 -0
- package/dist/i18n/shell/ko.json +4 -0
- package/dist/i18n/shell/zh-CN.json +4 -0
- package/dist/i18n/shell/zh-TW.json +4 -0
- package/dist/index.js +2627 -0
- package/dist/src/authorization/AuthorizationGate.vue.d.ts +22 -0
- package/dist/src/authorization/i18n.d.ts +3 -0
- package/dist/src/background/BackgroundPanel.vue.d.ts +7 -0
- package/dist/src/background/i18n.d.ts +79 -0
- package/dist/src/background/picker-provider.d.ts +3 -0
- package/dist/src/background/request-key.d.ts +1 -0
- package/dist/src/context.d.ts +114 -0
- package/dist/src/delegate/BackgroundSavePanel.vue.d.ts +18 -0
- package/dist/src/delegate/DelegatePanel.vue.d.ts +7 -0
- package/dist/src/delegate/ExecutorSettings.vue.d.ts +13 -0
- package/dist/src/delegate/copy.d.ts +101 -0
- package/dist/src/delegate/executor-setup.d.ts +16 -0
- package/dist/src/delegate/facade.d.ts +8 -0
- package/dist/src/delegate/long-running.d.ts +74 -0
- package/dist/src/delegate/save-copy.d.ts +126 -0
- package/dist/src/delegate/scoped-picker.d.ts +3 -0
- package/dist/src/delegate/use-executor-setup.d.ts +4 -0
- package/dist/src/files/FileBrowser.vue.d.ts +17 -0
- package/dist/src/files/FilesPage.vue.d.ts +7 -0
- package/dist/src/files/transfers.d.ts +9 -0
- package/dist/src/i18n.d.ts +7 -0
- package/dist/src/identity/LoginPage.vue.d.ts +8 -0
- package/dist/src/identity/i18n.d.ts +31 -0
- package/dist/src/identity/session.d.ts +20 -0
- package/dist/src/index.d.ts +24 -0
- package/dist/src/nas/NasPicker.vue.d.ts +22 -0
- package/dist/src/nas/contract.d.ts +27 -0
- package/dist/src/nas/i18n.d.ts +2 -0
- package/dist/src/nas/locale.d.ts +45 -0
- package/dist/src/nas/provider.d.ts +3 -0
- package/dist/src/nas/use-request.d.ts +6 -0
- package/dist/src/portal/PortalSettings.vue.d.ts +7 -0
- package/dist/src/protocol/codec.d.ts +17 -0
- package/dist/src/protocol/v1.d.ts +518 -0
- package/dist/src/shell/AppShell.vue.d.ts +26 -0
- package/dist/src/shell/i18n.d.ts +7 -0
- package/dist/src/shell/pages.d.ts +7 -0
- package/dist/src/vue.d.ts +15 -0
- package/dist/style.css +1 -0
- package/dist/vue.js +2331 -0
- package/package.json +64 -4
- package/spec/protocol/v1/README.md +112 -0
- package/spec/protocol/v1/errors.json +454 -0
- package/spec/protocol/v1/schema/delegate.audit.json +11 -0
- package/spec/protocol/v1/schema/delegate.create.json +49 -0
- package/spec/protocol/v1/schema/delegate.disable.json +11 -0
- package/spec/protocol/v1/schema/delegate.enable.json +11 -0
- package/spec/protocol/v1/schema/delegate.list.json +11 -0
- package/spec/protocol/v1/schema/delegate.revoke.json +23 -0
- package/spec/protocol/v1/schema/files.cancelOperation.json +24 -0
- package/spec/protocol/v1/schema/files.checkPermission.json +30 -0
- package/spec/protocol/v1/schema/files.copy.json +42 -0
- package/spec/protocol/v1/schema/files.createFolder.json +38 -0
- package/spec/protocol/v1/schema/files.delete.json +36 -0
- package/spec/protocol/v1/schema/files.info.json +30 -0
- package/spec/protocol/v1/schema/files.list.json +30 -0
- package/spec/protocol/v1/schema/files.move.json +42 -0
- package/spec/protocol/v1/schema/files.moveFromStaging.json +47 -0
- package/spec/protocol/v1/schema/files.operationStatus.json +24 -0
- package/spec/protocol/v1/schema/files.read.json +35 -0
- package/spec/protocol/v1/schema/files.rename.json +35 -0
- package/spec/protocol/v1/schema/files.taskCancel.json +29 -0
- package/spec/protocol/v1/schema/files.taskStatus.json +29 -0
- package/spec/protocol/v1/schema/files.write.json +46 -0
- package/spec/protocol/v1/schema/root.run.json +19 -0
- package/spec/protocol/v1/schema/status.json +11 -0
- package/spec/protocol/v1/vectors/delegate.jsonl +16 -0
- package/spec/protocol/v1/vectors/envelope.jsonl +11 -0
- package/spec/protocol/v1/vectors/files.jsonl +10 -0
- package/spec/protocol/v1/vectors/status.jsonl +2 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import en from '../../i18n/identity/en.json';
|
|
2
|
+
export type IdentityCopy = typeof en;
|
|
3
|
+
export type IdentityNotice = '' | keyof IdentityCopy['notices'];
|
|
4
|
+
export declare const identityCatalogs: Record<import("..").UiLocale, {
|
|
5
|
+
title: string;
|
|
6
|
+
intro: string;
|
|
7
|
+
httpsTitle: string;
|
|
8
|
+
failedTitle: string;
|
|
9
|
+
account: string;
|
|
10
|
+
password: string;
|
|
11
|
+
otpPrompt: string;
|
|
12
|
+
otp: string;
|
|
13
|
+
signingIn: string;
|
|
14
|
+
verify: string;
|
|
15
|
+
signIn: string;
|
|
16
|
+
otherAccount: string;
|
|
17
|
+
continueDSM: string;
|
|
18
|
+
errors: {
|
|
19
|
+
rate_limited: string;
|
|
20
|
+
https_required: string;
|
|
21
|
+
auth_unavailable: string;
|
|
22
|
+
session_required: string;
|
|
23
|
+
failed: string;
|
|
24
|
+
};
|
|
25
|
+
notices: {
|
|
26
|
+
expired: string;
|
|
27
|
+
revalidate: string;
|
|
28
|
+
unavailable: string;
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
export declare function identityCopy(locale: string): IdentityCopy;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Context } from '../context';
|
|
2
|
+
import type { IdentityNotice } from './i18n';
|
|
3
|
+
export interface SessionSubject {
|
|
4
|
+
user: string;
|
|
5
|
+
uid: string;
|
|
6
|
+
expiresAt: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function createSession(ctx: Context): {
|
|
9
|
+
enabled: import("vue").Ref<boolean, boolean>;
|
|
10
|
+
ready: import("vue").Ref<boolean, boolean>;
|
|
11
|
+
subject: import("vue").Ref<SessionSubject | undefined, SessionSubject | undefined>;
|
|
12
|
+
notice: import("vue").Ref<IdentityNotice, IdentityNotice>;
|
|
13
|
+
start: () => Promise<void>;
|
|
14
|
+
call: <T = unknown>(method: string, params?: Record<string, unknown>) => Promise<T>;
|
|
15
|
+
login: (account: string, password: string, otp: string) => Promise<void>;
|
|
16
|
+
bootstrap: () => Promise<void>;
|
|
17
|
+
logout: () => Promise<void>;
|
|
18
|
+
dispose: () => void;
|
|
19
|
+
};
|
|
20
|
+
export type IdentitySession = ReturnType<typeof createSession>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type * from './context';
|
|
2
|
+
export type * from './delegate/long-running';
|
|
3
|
+
export type * from './delegate/executor-setup';
|
|
4
|
+
export type * from './nas/contract';
|
|
5
|
+
export type { AppSaveJob } from './delegate/facade';
|
|
6
|
+
export type { FileTransport } from './files/transfers';
|
|
7
|
+
export { createBackgroundSaveFacade } from './delegate/facade';
|
|
8
|
+
export { createNasProvider } from './nas/provider';
|
|
9
|
+
export { createFileTransfers } from './files/transfers';
|
|
10
|
+
export { createBackgroundPickerProvider } from './background/picker-provider';
|
|
11
|
+
export { scopedPicker } from './delegate/scoped-picker';
|
|
12
|
+
export { requestKey } from './background/request-key';
|
|
13
|
+
export { shellPages, activePage, type ShellPage, type ShellFeatureFlags } from './shell/pages';
|
|
14
|
+
export { uiLocale, uiLocales, catalogs, type UiLocale } from './i18n';
|
|
15
|
+
export { nasCopy, nasErrorCopy, nasCatalogs, type NasCopy } from './nas/locale';
|
|
16
|
+
export { format } from './nas/i18n';
|
|
17
|
+
export { shellCopy, shellCatalogs, type ShellCopy } from './shell/i18n';
|
|
18
|
+
export { identityCopy, identityCatalogs, type IdentityCopy, type IdentityNotice } from './identity/i18n';
|
|
19
|
+
export { backgroundCopy, backgroundErrorCopy, backgroundCatalogs, type BackgroundCopy } from './background/i18n';
|
|
20
|
+
export { delegateCopy, errorCopy, delegateCatalogs, type DelegateCopy } from './delegate/copy';
|
|
21
|
+
export { saveCopy, saveError, saveCatalogs } from './delegate/save-copy';
|
|
22
|
+
export { authorizationCopy, authorizationCatalogs } from './authorization/i18n';
|
|
23
|
+
export * from './protocol/v1';
|
|
24
|
+
export { encodeRequest, decodeResponse, type ProtocolAuth, type ProtocolResponse } from './protocol/codec';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NasProvider } from './contract';
|
|
2
|
+
import type { DestinationGrant, DestinationSelection } from '../delegate/long-running';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
locale: string;
|
|
6
|
+
provider: NasProvider;
|
|
7
|
+
mode: 'folder' | 'file';
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
destination?: DestinationSelection;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
selected: (path: string) => any;
|
|
14
|
+
"update:open": (value: boolean) => any;
|
|
15
|
+
authorized: (grant: DestinationGrant) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onSelected?: ((path: string) => any) | undefined;
|
|
18
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
19
|
+
onAuthorized?: ((grant: DestinationGrant) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface NasEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
path: string;
|
|
4
|
+
isDir: boolean;
|
|
5
|
+
bytes?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface NasPage {
|
|
8
|
+
entries: NasEntry[];
|
|
9
|
+
total: number;
|
|
10
|
+
offset: number;
|
|
11
|
+
nextOffset?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ListOptions {
|
|
14
|
+
offset?: number;
|
|
15
|
+
limit?: number;
|
|
16
|
+
sortBy?: 'name' | 'size' | 'type' | 'mtime';
|
|
17
|
+
sortDirection?: 'ASC' | 'DESC';
|
|
18
|
+
}
|
|
19
|
+
export interface NasProvider {
|
|
20
|
+
download?(path: string): void;
|
|
21
|
+
upload?(parent: string, file: File, signal: AbortSignal): Promise<void>;
|
|
22
|
+
shares(offset: number, signal: AbortSignal): Promise<NasPage>;
|
|
23
|
+
list(path: string, options: ListOptions, signal: AbortSignal): Promise<NasPage>;
|
|
24
|
+
info(path: string, signal: AbortSignal): Promise<NasEntry>;
|
|
25
|
+
createFolder(parent: string, name: string, signal: AbortSignal): Promise<void>;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import en from '../../i18n/files/en.json';
|
|
2
|
+
export type NasCopy = typeof en;
|
|
3
|
+
export declare const nasCatalogs: Record<import("..").UiLocale, {
|
|
4
|
+
title: string;
|
|
5
|
+
ownPermissions: string;
|
|
6
|
+
choose: string;
|
|
7
|
+
confirm: string;
|
|
8
|
+
refresh: string;
|
|
9
|
+
loading: string;
|
|
10
|
+
emptyFolder: string;
|
|
11
|
+
roots: string;
|
|
12
|
+
back: string;
|
|
13
|
+
select: string;
|
|
14
|
+
open: string;
|
|
15
|
+
selected: string;
|
|
16
|
+
cancel: string;
|
|
17
|
+
close: string;
|
|
18
|
+
loadMore: string;
|
|
19
|
+
errorSession: string;
|
|
20
|
+
errorDenied: string;
|
|
21
|
+
errorNotFound: string;
|
|
22
|
+
errorConflict: string;
|
|
23
|
+
errorUncertain: string;
|
|
24
|
+
errorInvalid: string;
|
|
25
|
+
errorUnavailable: string;
|
|
26
|
+
errorCanceled: string;
|
|
27
|
+
errorTimeout: string;
|
|
28
|
+
metadata: string;
|
|
29
|
+
fileKind: string;
|
|
30
|
+
directoryKind: string;
|
|
31
|
+
nameColumn: string;
|
|
32
|
+
kindColumn: string;
|
|
33
|
+
sizeColumn: string;
|
|
34
|
+
selectAction: string;
|
|
35
|
+
chooseFile: string;
|
|
36
|
+
expand: string;
|
|
37
|
+
collapse: string;
|
|
38
|
+
upload: string;
|
|
39
|
+
download: string;
|
|
40
|
+
uploaded: string;
|
|
41
|
+
errorDSM: string;
|
|
42
|
+
errorUploadSize: string;
|
|
43
|
+
}>;
|
|
44
|
+
export declare function nasCopy(locale: string): NasCopy;
|
|
45
|
+
export declare function nasErrorCopy(error: unknown, copy: NasCopy): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PortalAccess } from '../context';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
portal: PortalAccess;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ProtocolOp, type ProtocolParams, type RefusalCode } from './v1';
|
|
2
|
+
export interface ProtocolAuth {
|
|
3
|
+
dsm_cookie: string;
|
|
4
|
+
dsm_synotoken: string;
|
|
5
|
+
}
|
|
6
|
+
export type ProtocolResponse = {
|
|
7
|
+
ok: true;
|
|
8
|
+
result: Record<string, unknown>;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
code: RefusalCode;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
/** The request line for the executor socket. A present auth is always sent, even when empty. */
|
|
15
|
+
export declare function encodeRequest<Op extends ProtocolOp>(op: Op, params: ProtocolParams[Op], auth?: ProtocolAuth): string;
|
|
16
|
+
/** Parse one response line. Match refusals on code, never on message. */
|
|
17
|
+
export declare function decodeResponse(line: string): ProtocolResponse;
|