@synopackageland/sdk 0.9.4 → 0.9.6

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.
@@ -63,12 +63,15 @@ export interface PortalStatus {
63
63
  canManage: boolean;
64
64
  controlPanel: boolean;
65
65
  defaultAlias: string;
66
+ entry?: 'registered' | 'unregistered' | 'cleanup-required';
66
67
  }
67
68
  export interface PortalAccess {
68
69
  messages: Record<string, string>;
69
70
  status(): Promise<PortalStatus>;
70
71
  apply(alias: string): Promise<PortalStatus>;
71
72
  disable(): Promise<PortalStatus>;
73
+ register?(): Promise<PortalStatus>;
74
+ unregister?(): Promise<PortalStatus>;
72
75
  openControlPanel(): void;
73
76
  mountPanel(element: HTMLElement): {
74
77
  refresh(): Promise<void>;
@@ -31,6 +31,7 @@ export declare const saveCatalogs: Record<import("..").UiLocale, {
31
31
  denied: string;
32
32
  permission: string;
33
33
  missing: string;
34
+ appPrivilege: string;
34
35
  session: string;
35
36
  conflict: string;
36
37
  space: string;
@@ -75,6 +76,7 @@ export declare function saveCopy(locale?: string): {
75
76
  denied: string;
76
77
  permission: string;
77
78
  missing: string;
79
+ appPrivilege: string;
78
80
  session: string;
79
81
  conflict: string;
80
82
  space: string;
@@ -119,6 +121,7 @@ export declare function saveError(error: unknown, copy?: {
119
121
  denied: string;
120
122
  permission: string;
121
123
  missing: string;
124
+ appPrivilege: string;
122
125
  session: string;
123
126
  conflict: string;
124
127
  space: string;
@@ -114,6 +114,12 @@ export declare const protocolCodes: {
114
114
  readonly retryable: false;
115
115
  readonly httpStatus: 500;
116
116
  };
117
+ /** DSM did not accept the Application Portal change; status portal says whether the entry needs another removal. */
118
+ readonly PORTAL_FAILED: {
119
+ readonly kind: "refusal";
120
+ readonly retryable: true;
121
+ readonly httpStatus: 502;
122
+ };
117
123
  /** The destination volume is full. */
118
124
  readonly NO_SPACE: {
119
125
  readonly kind: "refusal";
@@ -338,7 +344,7 @@ export declare const protocolCodes: {
338
344
  };
339
345
  };
340
346
  export type ProtocolCode = keyof typeof protocolCodes;
341
- 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" | "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";
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";
342
348
  export type OutcomeCode = "OPERATION_CANCELED" | "CANCEL_REQUESTED" | "CLEANUP_PENDING";
343
349
  export type ReasonCode = "grant-revoked" | "destination-replaced" | "integration-disabled" | "validation-denied" | "scope-changed" | "storage-error" | "operation-canceled-by-user" | "operation-deadline-exceeded";
344
350
  export type ClientCode = "EXECUTOR_UNAVAILABLE" | "EXECUTOR_TIMEOUT" | "EXECUTOR_TOO_LARGE" | "EXECUTOR_PROTOCOL";
@@ -473,6 +479,12 @@ export interface FilesWriteParams {
473
479
  name: string;
474
480
  conflict?: "fail" | "overwrite" | "rename";
475
481
  }
482
+ /** portal.register: Administrator: register the policy's Application Portal entry in DSM's app.d (DSM before 7.2 refuses the web-config resource of unsigned packages). Since 0.9.6. */
483
+ export interface PortalRegisterParams {
484
+ }
485
+ /** 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
+ export interface PortalUnregisterParams {
487
+ }
476
488
  /** root.run: Administrator: run a root operation pinned by digest in the policy. Since 0.9.0. */
477
489
  export interface RootRunParams {
478
490
  name: string;
@@ -503,6 +515,8 @@ export interface ProtocolParams {
503
515
  "files.taskCancel": FilesTaskCancelParams;
504
516
  "files.taskStatus": FilesTaskStatusParams;
505
517
  "files.write": FilesWriteParams;
518
+ "portal.register": PortalRegisterParams;
519
+ "portal.unregister": PortalUnregisterParams;
506
520
  "root.run": RootRunParams;
507
521
  "status": StatusParams;
508
522
  }
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .app-shell[data-v-05f63ca5]{height:100%;min-width:0;grid-template-rows:minmax(0,1fr)}.app-shell[data-v-05f63ca5]>div{min-height:0}.app-shell[data-v-05f63ca5] main{display:flex;flex-direction:column;overflow:hidden}.app-page[data-v-05f63ca5]{flex:1 1 auto;min-height:0;overflow-y:auto}.app-page-content[data-v-05f63ca5]{padding-bottom:var(--ui-space-6, 24px)}.file-browser[data-v-0b21604d]{min-width:0;color:var(--ui-text)}.file-toolbar[data-v-0b21604d]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px);margin-block:var(--ui-space-3, 12px)}.file-location[data-v-0b21604d]{flex-wrap:nowrap;align-items:center;gap:var(--ui-space-1, 4px)}.file-path[data-v-0b21604d]{flex:1;min-width:0;margin-inline-start:var(--ui-space-2, 8px)}.file-columns[data-v-0b21604d]{display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,3fr);gap:var(--ui-space-3, 12px);height:clamp(240px,60vh,400px)}.file-tree[data-v-0b21604d]{min-width:0;overflow:auto;border-inline-end:1px solid var(--ui-border)}.file-content[data-v-0b21604d]{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto}.file-empty[data-v-0b21604d]{display:flex;flex-direction:column;align-items:center;gap:var(--ui-space-2, 8px);padding-block:var(--ui-space-6, 24px);color:var(--ui-text-muted)}.file-name[data-v-0b21604d]{display:inline-flex;border-radius:var(--ui-radius-sm, 4px);outline:none;align-items:center;gap:var(--ui-space-2, 8px);overflow-wrap:anywhere}.file-icon[data-v-0b21604d]{flex:none;color:var(--ui-text-muted)}.file-tree[data-v-0b21604d] [data-tree-node][data-selected]{color:var(--ui-text)}.file-name[data-v-0b21604d]:focus-visible{box-shadow:0 0 0 2px var(--ui-focus-ring)}.file-bytes[data-v-0b21604d]{font-variant-numeric:tabular-nums}.file-selection[data-v-0b21604d]{overflow-wrap:anywhere}@media(max-width:600px){.file-columns[data-v-0b21604d]{grid-template-columns:minmax(0,1fr);height:auto}.file-content[data-v-0b21604d] th:nth-child(2),.file-content[data-v-0b21604d] td:nth-child(2),.file-content[data-v-0b21604d] th:nth-child(3),.file-content[data-v-0b21604d] td:nth-child(3){display:none}.file-tree[data-v-0b21604d]{height:clamp(96px,25vh,180px);border-inline-end:0;border-bottom:1px solid var(--ui-border)}.file-content[data-v-0b21604d]{height:clamp(200px,45vh,360px)}}.nas-picker-content[data-v-535a0e54]{max-height:65vh;overflow:auto}.save-message[data-v-535a0e54]{--ui-text-secondary:var(--ui-text)}.save-consent[data-v-535a0e54]{color:var(--ui-text);margin-block:0 var(--ui-space-4,16px)}.files-actions[data-v-699931fa]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px)}.files-path[data-v-699931fa]{overflow-wrap:anywhere}.identity-login[data-v-f7afcf5e]{max-width:36rem;margin-inline:auto;padding:var(--ui-space-4, 16px);overflow:auto;max-height:100%;color:var(--ui-text);font-family:var(--ui-font-sans);font-size:13px;line-height:1.5}.identity-login p[data-v-f7afcf5e]{margin-block:var(--ui-space-4, 16px);overflow-wrap:anywhere}.integration-jobs[data-v-7954713f]{overflow-wrap:anywhere;min-width:0}.bg-schedules[data-v-7954713f]{margin-block-start:var(--ui-space-6,24px);min-width:0;overflow-wrap:anywhere}.bg-schedules .integration-jobs[data-v-7954713f]{display:grid;gap:var(--ui-space-4,16px);padding-inline-start:var(--ui-space-5,20px)}.bg-schedules .integration-jobs li[data-v-7954713f]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ui-space-2,8px);min-width:0}.bg-schedules p[data-v-7954713f],.bg-schedules li>span[data-v-7954713f]{min-width:0;max-width:100%}.bg-schedules h3[data-v-7954713f]{font-size:15px;font-weight:600}.bg-schedule-form[data-v-7954713f]{margin-block:var(--ui-space-4,16px)}.delegate-panel[data-v-d79ee942]{min-width:0;overflow-wrap:anywhere}h3[data-v-d79ee942]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.section-heading[data-v-d79ee942]{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.records[data-v-d79ee942]{list-style:none;padding:0;margin:0}.records li[data-v-d79ee942]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px);padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.records li>div[data-v-d79ee942],.records li>span[data-v-d79ee942],.destination[data-v-d79ee942]{min-width:0;max-width:100%;overflow-wrap:anywhere}.records p[data-v-d79ee942]{margin:var(--ui-space-2,8px) 0 0}.background-save-panel[data-v-c38db985]{min-width:0;overflow-wrap:anywhere}.save-message[data-v-c38db985]{--ui-text-secondary:var(--ui-text)}h3[data-v-c38db985]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.save-actions[data-v-c38db985],.save-records li[data-v-c38db985]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.save-actions[data-v-c38db985]{justify-content:flex-start}.save-records[data-v-c38db985]{list-style:none;margin:0;padding:0}.save-records li[data-v-c38db985]{padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.save-records li>div[data-v-c38db985]{min-width:0;max-width:100%}.save-records p[data-v-c38db985]{margin:var(--ui-space-2,8px) 0}.authorization-view[data-v-e16b5f7d]{display:flex;flex-direction:column;gap:12px}.authorization-body[data-v-e16b5f7d]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text);text-wrap:pretty}.authorization-status[data-v-e16b5f7d],.authorization-failed[data-v-e16b5f7d]{color:var(--ui-text)}.authorization-content[data-v-e16b5f7d]{display:flex;flex-direction:column;height:100%;min-height:0}.authorization-content[data-v-e16b5f7d] .app-shell{flex:1;min-height:0;height:auto}.authorization-setting[data-v-f031e7c7]{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.authorization-revoke-body[data-v-f031e7c7]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text)}.authorization-state[data-v-f031e7c7]{display:inline-flex;align-items:center;gap:6px;color:var(--ui-text)}
1
+ .app-shell[data-v-05f63ca5]{height:100%;min-width:0;grid-template-rows:minmax(0,1fr)}.app-shell[data-v-05f63ca5]>div{min-height:0}.app-shell[data-v-05f63ca5] main{display:flex;flex-direction:column;overflow:hidden}.app-page[data-v-05f63ca5]{flex:1 1 auto;min-height:0;overflow-y:auto}.app-page-content[data-v-05f63ca5]{padding-bottom:var(--ui-space-6, 24px)}.file-browser[data-v-94161ba0]{min-width:0;color:var(--ui-text)}.file-toolbar[data-v-94161ba0]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px);margin-block:var(--ui-space-3, 12px)}.file-location[data-v-94161ba0]{flex-wrap:nowrap;align-items:center;gap:var(--ui-space-1, 4px)}.file-path[data-v-94161ba0]{flex:1;min-width:0;margin-inline-start:var(--ui-space-2, 8px)}.file-columns[data-v-94161ba0]{display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,3fr);gap:var(--ui-space-3, 12px);height:clamp(240px,60vh,400px)}.file-tree[data-v-94161ba0]{min-width:0;overflow:auto;border-inline-end:1px solid var(--ui-border)}.file-content[data-v-94161ba0]{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto}.file-empty[data-v-94161ba0]{display:flex;flex-direction:column;align-items:center;gap:var(--ui-space-2, 8px);padding-block:var(--ui-space-6, 24px);color:var(--ui-text-muted)}.file-name[data-v-94161ba0]{display:inline-flex;align-items:center;gap:var(--ui-space-2, 8px);overflow-wrap:anywhere}.file-bytes[data-v-94161ba0]{font-variant-numeric:tabular-nums}.file-selection[data-v-94161ba0]{overflow-wrap:anywhere}@media(max-width:600px){.file-columns[data-v-94161ba0]{grid-template-columns:minmax(0,1fr);height:auto}.file-content[data-v-94161ba0] th:nth-child(2),.file-content[data-v-94161ba0] td:nth-child(2),.file-content[data-v-94161ba0] th:nth-child(3),.file-content[data-v-94161ba0] td:nth-child(3){display:none}.file-tree[data-v-94161ba0]{height:clamp(96px,25vh,180px);border-inline-end:0;border-bottom:1px solid var(--ui-border)}.file-content[data-v-94161ba0]{height:clamp(200px,45vh,360px)}}.nas-picker-content[data-v-535a0e54]{max-height:65vh;overflow:auto}.save-message[data-v-535a0e54]{--ui-text-secondary:var(--ui-text)}.save-consent[data-v-535a0e54]{color:var(--ui-text);margin-block:0 var(--ui-space-4,16px)}.files-actions[data-v-699931fa]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px)}.files-path[data-v-699931fa]{overflow-wrap:anywhere}.identity-login[data-v-f7afcf5e]{max-width:36rem;margin-inline:auto;padding:var(--ui-space-4, 16px);overflow:auto;max-height:100%;color:var(--ui-text);font-family:var(--ui-font-sans);font-size:13px;line-height:1.5}.identity-login p[data-v-f7afcf5e]{margin-block:var(--ui-space-4, 16px);overflow-wrap:anywhere}.integration-jobs[data-v-7954713f]{overflow-wrap:anywhere;min-width:0}.bg-schedules[data-v-7954713f]{margin-block-start:var(--ui-space-6,24px);min-width:0;overflow-wrap:anywhere}.bg-schedules .integration-jobs[data-v-7954713f]{display:grid;gap:var(--ui-space-4,16px);padding-inline-start:var(--ui-space-5,20px)}.bg-schedules .integration-jobs li[data-v-7954713f]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ui-space-2,8px);min-width:0}.bg-schedules p[data-v-7954713f],.bg-schedules li>span[data-v-7954713f]{min-width:0;max-width:100%}.bg-schedules h3[data-v-7954713f]{font-size:15px;font-weight:600}.bg-schedule-form[data-v-7954713f]{margin-block:var(--ui-space-4,16px)}.delegate-panel[data-v-d79ee942]{min-width:0;overflow-wrap:anywhere}h3[data-v-d79ee942]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.section-heading[data-v-d79ee942]{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.records[data-v-d79ee942]{list-style:none;padding:0;margin:0}.records li[data-v-d79ee942]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px);padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.records li>div[data-v-d79ee942],.records li>span[data-v-d79ee942],.destination[data-v-d79ee942]{min-width:0;max-width:100%;overflow-wrap:anywhere}.records p[data-v-d79ee942]{margin:var(--ui-space-2,8px) 0 0}.background-save-panel[data-v-c38db985]{min-width:0;overflow-wrap:anywhere}.save-message[data-v-c38db985]{--ui-text-secondary:var(--ui-text)}h3[data-v-c38db985]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.save-actions[data-v-c38db985],.save-records li[data-v-c38db985]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.save-actions[data-v-c38db985]{justify-content:flex-start}.save-records[data-v-c38db985]{list-style:none;margin:0;padding:0}.save-records li[data-v-c38db985]{padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.save-records li>div[data-v-c38db985]{min-width:0;max-width:100%}.save-records p[data-v-c38db985]{margin:var(--ui-space-2,8px) 0}.authorization-view[data-v-e16b5f7d]{display:flex;flex-direction:column;gap:12px}.authorization-body[data-v-e16b5f7d]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text);text-wrap:pretty}.authorization-status[data-v-e16b5f7d],.authorization-failed[data-v-e16b5f7d]{color:var(--ui-text)}.authorization-content[data-v-e16b5f7d]{display:flex;flex-direction:column;height:100%;min-height:0}.authorization-content[data-v-e16b5f7d] .app-shell{flex:1;min-height:0;height:auto}.authorization-setting[data-v-f031e7c7]{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.authorization-revoke-body[data-v-f031e7c7]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text)}.authorization-state[data-v-f031e7c7]{display:inline-flex;align-items:center;gap:6px;color:var(--ui-text)}