@haex-space/vault-sdk 4.1.0 → 4.2.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.
@@ -545,20 +545,54 @@ interface S3PublicConfig {
545
545
  bucket: string;
546
546
  }
547
547
  /**
548
- * Storage backend info (public, without credentials)
548
+ * A storage the extension may use, as the host lists it: names only, never
549
+ * credentials, endpoint or region.
549
550
  */
550
551
  interface StorageBackendInfo {
551
552
  id: string;
552
553
  /** Backend type (e.g., "s3") */
553
554
  type: string;
555
+ /** Name of the storage */
554
556
  name: string;
555
- enabled: boolean;
556
- createdAt: string;
557
- /** Public config without secrets (endpoint, bucket, region) */
557
+ /** Name of the provider the user gave the connection (e.g., "Hetzner") */
558
+ providerName: string;
559
+ /** Bucket of the storage */
560
+ bucket: string;
561
+ /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
562
+ enabled?: boolean;
563
+ /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
564
+ createdAt?: string;
565
+ /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
558
566
  config?: S3PublicConfig;
559
567
  }
560
568
  /**
561
- * S3-compatible backend configuration
569
+ * What an extension proposes for a new S3 storage. The host shows it to the
570
+ * user and asks for credentials in its own window; an extension never sends
571
+ * or sees them.
572
+ */
573
+ interface S3Proposal {
574
+ /** Custom endpoint URL (for non-AWS S3-compatible services); the host may ask for a permission for its host */
575
+ endpoint?: string;
576
+ /** Region; required unless `sameProviderAs` is given */
577
+ region?: string;
578
+ /** Bucket name */
579
+ bucket: string;
580
+ /** Use path-style URLs instead of virtual-hosted-style */
581
+ pathStyle?: boolean;
582
+ /** Credentials are entered by the host and are never accepted in a proposal. */
583
+ accessKeyId?: never;
584
+ /** Credentials are entered by the host and are never accepted in a proposal. */
585
+ secretAccessKey?: never;
586
+ /** Credentials are entered by the host and are never accepted in a proposal. */
587
+ sessionToken?: never;
588
+ }
589
+ /**
590
+ * S3-compatible backend configuration with credentials.
591
+ *
592
+ * @deprecated Credentials are entered in the host, never passed by an
593
+ * extension: holzi refuses a request that carries `accessKeyId`,
594
+ * `secretAccessKey` or `sessionToken`. Use {@link S3Proposal}. Removed in the
595
+ * next major version.
562
596
  */
563
597
  interface S3Config {
564
598
  /** Custom endpoint URL (for non-AWS S3-compatible services) */
@@ -567,37 +601,73 @@ interface S3Config {
567
601
  region: string;
568
602
  /** Bucket name */
569
603
  bucket: string;
570
- /** Access key ID */
571
- accessKeyId: string;
572
- /** Secret access key */
573
- secretAccessKey: string;
574
- /** Session token for temporary credentials (e.g., Supabase S3 with user JWT for RLS) */
604
+ /** @deprecated Entered in the host. */
605
+ accessKeyId?: string;
606
+ /** @deprecated Entered in the host. */
607
+ secretAccessKey?: string;
608
+ /** @deprecated Entered in the host. */
575
609
  sessionToken?: string;
576
610
  /** Use path-style URLs instead of virtual-hosted-style */
577
611
  pathStyle?: boolean;
578
612
  }
579
- /**
580
- * Request to add a new storage backend
581
- */
582
- interface AddBackendRequest {
583
- /** Display name for the backend */
613
+ interface AddBackendRequestBase {
614
+ /** Display name for the storage */
584
615
  name: string;
585
616
  /** Backend type (currently only "s3") */
586
617
  type: "s3";
587
- /** Configuration (structure depends on type) */
588
- config: S3Config | Record<string, unknown>;
589
618
  }
590
619
  /**
591
- * Request to update a storage backend
592
- * Only provided fields are updated. Credentials are preserved if not provided.
620
+ * Request to add a new storage on a new connection. The host asks the user to
621
+ * confirm it and enters credentials in its own window.
622
+ */
623
+ type AddBackendRequest = (AddBackendRequestBase & {
624
+ /** A credential-free proposal for a new connection; region is required. */
625
+ config: S3Proposal & {
626
+ region: string;
627
+ };
628
+ /** A new connection cannot reuse an existing provider. */
629
+ sameProviderAs?: never;
630
+ })
631
+ /**
632
+ * Request to add a bucket on an existing connection. Endpoint, region and
633
+ * addressing are taken from the referenced storage.
634
+ */
635
+ | (AddBackendRequestBase & {
636
+ /** With an existing provider, only the bucket may be proposed. */
637
+ config: {
638
+ bucket: string;
639
+ endpoint?: never;
640
+ region?: never;
641
+ pathStyle?: never;
642
+ accessKeyId?: never;
643
+ secretAccessKey?: never;
644
+ sessionToken?: never;
645
+ };
646
+ /** A storage the extension may read. */
647
+ sameProviderAs: string;
648
+ });
649
+ /**
650
+ * Request to change a storage. The host asks the user to confirm it; new
651
+ * credentials are entered only in the host's own window.
593
652
  */
594
653
  interface UpdateBackendRequest {
595
654
  /** Backend ID to update */
596
655
  backendId: string;
597
656
  /** New display name (optional) */
598
657
  name?: string;
599
- /** New configuration (optional) - only non-empty fields are updated */
600
- config?: Partial<S3Config> | Record<string, unknown>;
658
+ /**
659
+ * Only the bucket can be changed through the extension request. Credentials
660
+ * and connection details never cross the bridge.
661
+ */
662
+ config?: {
663
+ bucket?: string;
664
+ endpoint?: never;
665
+ region?: never;
666
+ pathStyle?: never;
667
+ accessKeyId?: never;
668
+ secretAccessKey?: never;
669
+ sessionToken?: never;
670
+ };
601
671
  }
602
672
  /**
603
673
  * Object info from list operation
@@ -672,14 +742,16 @@ declare class BackendManagement {
672
742
  */
673
743
  list(): Promise<StorageBackendInfo[]>;
674
744
  /**
675
- * Add a new storage backend
676
- * @param request - Backend configuration
745
+ * Propose a new storage. The host asks the user; credentials are entered
746
+ * only there. Resolves with the new storage, which the extension may then
747
+ * read and write.
748
+ * @param request - The proposal, without credentials
677
749
  * @returns Created backend info
678
750
  */
679
751
  add(request: AddBackendRequest): Promise<StorageBackendInfo>;
680
752
  /**
681
- * Update a storage backend
682
- * Only provided fields are updated. Credentials are preserved if not provided.
753
+ * Change a storage after the user confirms it in the host.
754
+ * Only provided fields are updated; new credentials are entered in the host.
683
755
  * @param request - Update request with backendId and fields to update
684
756
  * @returns Updated backend info
685
757
  */
@@ -1739,4 +1811,4 @@ declare class HaexVaultSdk {
1739
1811
  private log;
1740
1812
  }
1741
1813
 
1742
- export { PasswordsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MailMessage as G, HaexVaultSdk as H, type ImapConfig as I, type MailNewMessagesEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailboxInfo as N, type MessageEnvelope as O, type NotificationAction as P, type NotificationClickEvent as Q, type NotificationOptions as R, StorageAPI as S, NotificationsAPI as T, type OutgoingAttachment as U, type OutgoingMessage as V, type PasswordInput as W, type PasswordItemFull as X, type PasswordItemSummary as Y, type PasswordKeyValue as Z, type PasswordKeyValueInput as _, type ConnectionSecurity as a, type PendingAuthorization as a0, type PendingTransfer as a1, PermissionsAPI as a2, type AddBackendRequest as a3, type S3Config as a4, type S3PublicConfig as a5, RemoteStorageAPI as a6, type StorageBackendInfo as a7, type StorageObjectInfo as a8, type UpdateBackendRequest as a9, canExternalClientSendRequests as aA, isExternalClientConnected as aB, type RequestedExtension as aa, type SelectFileOptions as ab, type SelectFolderOptions as ac, type ServerInfo as ad, type ServerStatus as ae, type SessionAuthorization as af, type SharedSpace as ag, ShellAPI as ah, type ShellCreateOptions as ai, type ShellCreateResponse as aj, type ShellExitEvent as ak, type ShellOutputEvent as al, type SmtpConfig as am, type SpaceAccessTokenInfo as an, type SpaceAssignment as ao, type SpaceInvite as ap, type SpaceKeyGrantInfo as aq, type SpaceMember as ar, type SpaceMemberInfo as as, SpacesAPI as at, type SyncBackendInfo as au, TabAPI as av, type TransferDirection as aw, type TransferProgress as ax, type TransferState as ay, WebAPI as az, type DecryptedSpace as b, type DeepLink as c, type Device as d, type DeviceInfo as e, type DeviceType as f, DialogAPI as g, type DirEntry as h, type ExternalConnection as i, ExternalConnectionErrorCode as j, ExternalConnectionState as k, type ExternalRequest as l, type ExternalRequestEvent as m, type ExternalRequestHandler as n, type ExternalRequestPayload as o, type ExternalResponse as p, FilesystemAPI as q, type KnownPaths as r, LocalSendAPI as s, type LocalSendEvent as t, type FileInfo as u, type LocalSendSettings as v, type MailAccount as w, type MailAddress as x, type Attachment as y, type FetchRange as z };
1814
+ export { PasswordsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MailMessage as G, HaexVaultSdk as H, type ImapConfig as I, type MailNewMessagesEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailboxInfo as N, type MessageEnvelope as O, type NotificationAction as P, type NotificationClickEvent as Q, type NotificationOptions as R, StorageAPI as S, NotificationsAPI as T, type OutgoingAttachment as U, type OutgoingMessage as V, type PasswordInput as W, type PasswordItemFull as X, type PasswordItemSummary as Y, type PasswordKeyValue as Z, type PasswordKeyValueInput as _, type ConnectionSecurity as a, type PendingAuthorization as a0, type PendingTransfer as a1, PermissionsAPI as a2, type AddBackendRequest as a3, type S3Config as a4, type S3Proposal as a5, type S3PublicConfig as a6, RemoteStorageAPI as a7, type StorageBackendInfo as a8, type StorageObjectInfo as a9, WebAPI as aA, canExternalClientSendRequests as aB, isExternalClientConnected as aC, type UpdateBackendRequest as aa, type RequestedExtension as ab, type SelectFileOptions as ac, type SelectFolderOptions as ad, type ServerInfo as ae, type ServerStatus as af, type SessionAuthorization as ag, type SharedSpace as ah, ShellAPI as ai, type ShellCreateOptions as aj, type ShellCreateResponse as ak, type ShellExitEvent as al, type ShellOutputEvent as am, type SmtpConfig as an, type SpaceAccessTokenInfo as ao, type SpaceAssignment as ap, type SpaceInvite as aq, type SpaceKeyGrantInfo as ar, type SpaceMember as as, type SpaceMemberInfo as at, SpacesAPI as au, type SyncBackendInfo as av, TabAPI as aw, type TransferDirection as ax, type TransferProgress as ay, type TransferState as az, type DecryptedSpace as b, type DeepLink as c, type Device as d, type DeviceInfo as e, type DeviceType as f, DialogAPI as g, type DirEntry as h, type ExternalConnection as i, ExternalConnectionErrorCode as j, ExternalConnectionState as k, type ExternalRequest as l, type ExternalRequestEvent as m, type ExternalRequestHandler as n, type ExternalRequestPayload as o, type ExternalResponse as p, FilesystemAPI as q, type KnownPaths as r, LocalSendAPI as s, type LocalSendEvent as t, type FileInfo as u, type LocalSendSettings as v, type MailAccount as w, type MailAddress as x, type Attachment as y, type FetchRange as z };
@@ -545,20 +545,54 @@ interface S3PublicConfig {
545
545
  bucket: string;
546
546
  }
547
547
  /**
548
- * Storage backend info (public, without credentials)
548
+ * A storage the extension may use, as the host lists it: names only, never
549
+ * credentials, endpoint or region.
549
550
  */
550
551
  interface StorageBackendInfo {
551
552
  id: string;
552
553
  /** Backend type (e.g., "s3") */
553
554
  type: string;
555
+ /** Name of the storage */
554
556
  name: string;
555
- enabled: boolean;
556
- createdAt: string;
557
- /** Public config without secrets (endpoint, bucket, region) */
557
+ /** Name of the provider the user gave the connection (e.g., "Hetzner") */
558
+ providerName: string;
559
+ /** Bucket of the storage */
560
+ bucket: string;
561
+ /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
562
+ enabled?: boolean;
563
+ /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
564
+ createdAt?: string;
565
+ /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
558
566
  config?: S3PublicConfig;
559
567
  }
560
568
  /**
561
- * S3-compatible backend configuration
569
+ * What an extension proposes for a new S3 storage. The host shows it to the
570
+ * user and asks for credentials in its own window; an extension never sends
571
+ * or sees them.
572
+ */
573
+ interface S3Proposal {
574
+ /** Custom endpoint URL (for non-AWS S3-compatible services); the host may ask for a permission for its host */
575
+ endpoint?: string;
576
+ /** Region; required unless `sameProviderAs` is given */
577
+ region?: string;
578
+ /** Bucket name */
579
+ bucket: string;
580
+ /** Use path-style URLs instead of virtual-hosted-style */
581
+ pathStyle?: boolean;
582
+ /** Credentials are entered by the host and are never accepted in a proposal. */
583
+ accessKeyId?: never;
584
+ /** Credentials are entered by the host and are never accepted in a proposal. */
585
+ secretAccessKey?: never;
586
+ /** Credentials are entered by the host and are never accepted in a proposal. */
587
+ sessionToken?: never;
588
+ }
589
+ /**
590
+ * S3-compatible backend configuration with credentials.
591
+ *
592
+ * @deprecated Credentials are entered in the host, never passed by an
593
+ * extension: holzi refuses a request that carries `accessKeyId`,
594
+ * `secretAccessKey` or `sessionToken`. Use {@link S3Proposal}. Removed in the
595
+ * next major version.
562
596
  */
563
597
  interface S3Config {
564
598
  /** Custom endpoint URL (for non-AWS S3-compatible services) */
@@ -567,37 +601,73 @@ interface S3Config {
567
601
  region: string;
568
602
  /** Bucket name */
569
603
  bucket: string;
570
- /** Access key ID */
571
- accessKeyId: string;
572
- /** Secret access key */
573
- secretAccessKey: string;
574
- /** Session token for temporary credentials (e.g., Supabase S3 with user JWT for RLS) */
604
+ /** @deprecated Entered in the host. */
605
+ accessKeyId?: string;
606
+ /** @deprecated Entered in the host. */
607
+ secretAccessKey?: string;
608
+ /** @deprecated Entered in the host. */
575
609
  sessionToken?: string;
576
610
  /** Use path-style URLs instead of virtual-hosted-style */
577
611
  pathStyle?: boolean;
578
612
  }
579
- /**
580
- * Request to add a new storage backend
581
- */
582
- interface AddBackendRequest {
583
- /** Display name for the backend */
613
+ interface AddBackendRequestBase {
614
+ /** Display name for the storage */
584
615
  name: string;
585
616
  /** Backend type (currently only "s3") */
586
617
  type: "s3";
587
- /** Configuration (structure depends on type) */
588
- config: S3Config | Record<string, unknown>;
589
618
  }
590
619
  /**
591
- * Request to update a storage backend
592
- * Only provided fields are updated. Credentials are preserved if not provided.
620
+ * Request to add a new storage on a new connection. The host asks the user to
621
+ * confirm it and enters credentials in its own window.
622
+ */
623
+ type AddBackendRequest = (AddBackendRequestBase & {
624
+ /** A credential-free proposal for a new connection; region is required. */
625
+ config: S3Proposal & {
626
+ region: string;
627
+ };
628
+ /** A new connection cannot reuse an existing provider. */
629
+ sameProviderAs?: never;
630
+ })
631
+ /**
632
+ * Request to add a bucket on an existing connection. Endpoint, region and
633
+ * addressing are taken from the referenced storage.
634
+ */
635
+ | (AddBackendRequestBase & {
636
+ /** With an existing provider, only the bucket may be proposed. */
637
+ config: {
638
+ bucket: string;
639
+ endpoint?: never;
640
+ region?: never;
641
+ pathStyle?: never;
642
+ accessKeyId?: never;
643
+ secretAccessKey?: never;
644
+ sessionToken?: never;
645
+ };
646
+ /** A storage the extension may read. */
647
+ sameProviderAs: string;
648
+ });
649
+ /**
650
+ * Request to change a storage. The host asks the user to confirm it; new
651
+ * credentials are entered only in the host's own window.
593
652
  */
594
653
  interface UpdateBackendRequest {
595
654
  /** Backend ID to update */
596
655
  backendId: string;
597
656
  /** New display name (optional) */
598
657
  name?: string;
599
- /** New configuration (optional) - only non-empty fields are updated */
600
- config?: Partial<S3Config> | Record<string, unknown>;
658
+ /**
659
+ * Only the bucket can be changed through the extension request. Credentials
660
+ * and connection details never cross the bridge.
661
+ */
662
+ config?: {
663
+ bucket?: string;
664
+ endpoint?: never;
665
+ region?: never;
666
+ pathStyle?: never;
667
+ accessKeyId?: never;
668
+ secretAccessKey?: never;
669
+ sessionToken?: never;
670
+ };
601
671
  }
602
672
  /**
603
673
  * Object info from list operation
@@ -672,14 +742,16 @@ declare class BackendManagement {
672
742
  */
673
743
  list(): Promise<StorageBackendInfo[]>;
674
744
  /**
675
- * Add a new storage backend
676
- * @param request - Backend configuration
745
+ * Propose a new storage. The host asks the user; credentials are entered
746
+ * only there. Resolves with the new storage, which the extension may then
747
+ * read and write.
748
+ * @param request - The proposal, without credentials
677
749
  * @returns Created backend info
678
750
  */
679
751
  add(request: AddBackendRequest): Promise<StorageBackendInfo>;
680
752
  /**
681
- * Update a storage backend
682
- * Only provided fields are updated. Credentials are preserved if not provided.
753
+ * Change a storage after the user confirms it in the host.
754
+ * Only provided fields are updated; new credentials are entered in the host.
683
755
  * @param request - Update request with backendId and fields to update
684
756
  * @returns Updated backend info
685
757
  */
@@ -1739,4 +1811,4 @@ declare class HaexVaultSdk {
1739
1811
  private log;
1740
1812
  }
1741
1813
 
1742
- export { PasswordsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MailMessage as G, HaexVaultSdk as H, type ImapConfig as I, type MailNewMessagesEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailboxInfo as N, type MessageEnvelope as O, type NotificationAction as P, type NotificationClickEvent as Q, type NotificationOptions as R, StorageAPI as S, NotificationsAPI as T, type OutgoingAttachment as U, type OutgoingMessage as V, type PasswordInput as W, type PasswordItemFull as X, type PasswordItemSummary as Y, type PasswordKeyValue as Z, type PasswordKeyValueInput as _, type ConnectionSecurity as a, type PendingAuthorization as a0, type PendingTransfer as a1, PermissionsAPI as a2, type AddBackendRequest as a3, type S3Config as a4, type S3PublicConfig as a5, RemoteStorageAPI as a6, type StorageBackendInfo as a7, type StorageObjectInfo as a8, type UpdateBackendRequest as a9, canExternalClientSendRequests as aA, isExternalClientConnected as aB, type RequestedExtension as aa, type SelectFileOptions as ab, type SelectFolderOptions as ac, type ServerInfo as ad, type ServerStatus as ae, type SessionAuthorization as af, type SharedSpace as ag, ShellAPI as ah, type ShellCreateOptions as ai, type ShellCreateResponse as aj, type ShellExitEvent as ak, type ShellOutputEvent as al, type SmtpConfig as am, type SpaceAccessTokenInfo as an, type SpaceAssignment as ao, type SpaceInvite as ap, type SpaceKeyGrantInfo as aq, type SpaceMember as ar, type SpaceMemberInfo as as, SpacesAPI as at, type SyncBackendInfo as au, TabAPI as av, type TransferDirection as aw, type TransferProgress as ax, type TransferState as ay, WebAPI as az, type DecryptedSpace as b, type DeepLink as c, type Device as d, type DeviceInfo as e, type DeviceType as f, DialogAPI as g, type DirEntry as h, type ExternalConnection as i, ExternalConnectionErrorCode as j, ExternalConnectionState as k, type ExternalRequest as l, type ExternalRequestEvent as m, type ExternalRequestHandler as n, type ExternalRequestPayload as o, type ExternalResponse as p, FilesystemAPI as q, type KnownPaths as r, LocalSendAPI as s, type LocalSendEvent as t, type FileInfo as u, type LocalSendSettings as v, type MailAccount as w, type MailAddress as x, type Attachment as y, type FetchRange as z };
1814
+ export { PasswordsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MailMessage as G, HaexVaultSdk as H, type ImapConfig as I, type MailNewMessagesEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailboxInfo as N, type MessageEnvelope as O, type NotificationAction as P, type NotificationClickEvent as Q, type NotificationOptions as R, StorageAPI as S, NotificationsAPI as T, type OutgoingAttachment as U, type OutgoingMessage as V, type PasswordInput as W, type PasswordItemFull as X, type PasswordItemSummary as Y, type PasswordKeyValue as Z, type PasswordKeyValueInput as _, type ConnectionSecurity as a, type PendingAuthorization as a0, type PendingTransfer as a1, PermissionsAPI as a2, type AddBackendRequest as a3, type S3Config as a4, type S3Proposal as a5, type S3PublicConfig as a6, RemoteStorageAPI as a7, type StorageBackendInfo as a8, type StorageObjectInfo as a9, WebAPI as aA, canExternalClientSendRequests as aB, isExternalClientConnected as aC, type UpdateBackendRequest as aa, type RequestedExtension as ab, type SelectFileOptions as ac, type SelectFolderOptions as ad, type ServerInfo as ae, type ServerStatus as af, type SessionAuthorization as ag, type SharedSpace as ah, ShellAPI as ai, type ShellCreateOptions as aj, type ShellCreateResponse as ak, type ShellExitEvent as al, type ShellOutputEvent as am, type SmtpConfig as an, type SpaceAccessTokenInfo as ao, type SpaceAssignment as ap, type SpaceInvite as aq, type SpaceKeyGrantInfo as ar, type SpaceMember as as, type SpaceMemberInfo as at, SpacesAPI as au, type SyncBackendInfo as av, TabAPI as aw, type TransferDirection as ax, type TransferProgress as ay, type TransferState as az, type DecryptedSpace as b, type DeepLink as c, type Device as d, type DeviceInfo as e, type DeviceType as f, DialogAPI as g, type DirEntry as h, type ExternalConnection as i, ExternalConnectionErrorCode as j, ExternalConnectionState as k, type ExternalRequest as l, type ExternalRequestEvent as m, type ExternalRequestHandler as n, type ExternalRequestPayload as o, type ExternalResponse as p, FilesystemAPI as q, type KnownPaths as r, LocalSendAPI as s, type LocalSendEvent as t, type FileInfo as u, type LocalSendSettings as v, type MailAccount as w, type MailAddress as x, type Attachment as y, type FetchRange as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-Cx4ZyQFL.mjs';
2
- export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as ExternalAuthDecision, i as ExternalConnection, j as ExternalConnectionErrorCode, k as ExternalConnectionState, l as ExternalRequest, m as ExternalRequestEvent, n as ExternalRequestHandler, o as ExternalRequestPayload, p as ExternalResponse, F as FileStat, q as FilesystemAPI, I as ImapConfig, K as KnownPath, r as KnownPaths, L as LOCALSEND_EVENTS, s as LocalSendAPI, t as LocalSendEvent, u as LocalSendFileInfo, v as LocalSendSettings, M as MailAPI, w as MailAccount, x as MailAddress, y as MailAttachment, z as MailFetchRange, G as MailMessage, J as MailNewMessagesEvent, N as MailboxInfo, O as MessageEnvelope, P as NotificationAction, Q as NotificationClickEvent, R as NotificationOptions, T as NotificationsAPI, U as OutgoingAttachment, V as OutgoingMessage, W as PasswordInput, X as PasswordItemFull, Y as PasswordItemSummary, Z as PasswordKeyValue, _ as PasswordKeyValueInput, $ as PasswordsAPI, a0 as PendingAuthorization, a1 as PendingTransfer, a2 as PermissionsAPI, a3 as RemoteAddBackendRequest, a4 as RemoteS3Config, a5 as RemoteS3PublicConfig, a6 as RemoteStorageAPI, a7 as RemoteStorageBackendInfo, a8 as RemoteStorageObjectInfo, a9 as RemoteUpdateBackendRequest, aa as RequestedExtension, ab as SelectFileOptions, ac as SelectFolderOptions, ad as ServerInfo, ae as ServerStatus, af as SessionAuthorization, ag as SharedSpace, ah as ShellAPI, ai as ShellCreateOptions, aj as ShellCreateResponse, ak as ShellExitEvent, al as ShellOutputEvent, am as SmtpConfig, an as SpaceAccessTokenInfo, ao as SpaceAssignment, ap as SpaceInvite, aq as SpaceKeyGrantInfo, ar as SpaceMember, as as SpaceMemberInfo, at as SpacesAPI, au as SyncBackendInfo, av as TabAPI, aw as TransferDirection, ax as TransferProgress, ay as TransferState, az as WebAPI, aA as canExternalClientSendRequests, aB as isExternalClientConnected } from './client-Cx4ZyQFL.mjs';
1
+ import { H as HaexVaultSdk } from './client-7bZyiRwE.mjs';
2
+ export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as ExternalAuthDecision, i as ExternalConnection, j as ExternalConnectionErrorCode, k as ExternalConnectionState, l as ExternalRequest, m as ExternalRequestEvent, n as ExternalRequestHandler, o as ExternalRequestPayload, p as ExternalResponse, F as FileStat, q as FilesystemAPI, I as ImapConfig, K as KnownPath, r as KnownPaths, L as LOCALSEND_EVENTS, s as LocalSendAPI, t as LocalSendEvent, u as LocalSendFileInfo, v as LocalSendSettings, M as MailAPI, w as MailAccount, x as MailAddress, y as MailAttachment, z as MailFetchRange, G as MailMessage, J as MailNewMessagesEvent, N as MailboxInfo, O as MessageEnvelope, P as NotificationAction, Q as NotificationClickEvent, R as NotificationOptions, T as NotificationsAPI, U as OutgoingAttachment, V as OutgoingMessage, W as PasswordInput, X as PasswordItemFull, Y as PasswordItemSummary, Z as PasswordKeyValue, _ as PasswordKeyValueInput, $ as PasswordsAPI, a0 as PendingAuthorization, a1 as PendingTransfer, a2 as PermissionsAPI, a3 as RemoteAddBackendRequest, a4 as RemoteS3Config, a5 as RemoteS3Proposal, a6 as RemoteS3PublicConfig, a7 as RemoteStorageAPI, a8 as RemoteStorageBackendInfo, a9 as RemoteStorageObjectInfo, aa as RemoteUpdateBackendRequest, ab as RequestedExtension, ac as SelectFileOptions, ad as SelectFolderOptions, ae as ServerInfo, af as ServerStatus, ag as SessionAuthorization, ah as SharedSpace, ai as ShellAPI, aj as ShellCreateOptions, ak as ShellCreateResponse, al as ShellExitEvent, am as ShellOutputEvent, an as SmtpConfig, ao as SpaceAccessTokenInfo, ap as SpaceAssignment, aq as SpaceInvite, ar as SpaceKeyGrantInfo, as as SpaceMember, at as SpaceMemberInfo, au as SpacesAPI, av as SyncBackendInfo, aw as TabAPI, ax as TransferDirection, ay as TransferProgress, az as TransferState, aA as WebAPI, aB as canExternalClientSendRequests, aC as isExternalClientConnected } from './client-7bZyiRwE.mjs';
3
3
  import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-BwFKGH70.mjs';
4
4
  export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, E as ExtensionInfo, a as ExtensionManifest, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, I as IdentityClaim, B as MAIL_EVENTS, G as MailEvent, J as ManifestI18nEntry, N as NOTIFICATION_EVENTS, K as NotificationEvent, L as PermissionDeniedError, O as PermissionErrorBase, Q as PermissionErrorCode, T as PermissionPromptError, P as PermissionResponse, U as PermissionStatus, R as RequestOptions, V as SHELL_EVENTS, X as SearchQuery, Y as SearchRequestEvent, S as SearchResult, Z as ShellEvent, _ as SyncTablesUpdatedEvent, $ as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a0 as getTableName, a1 as isPermissionDeniedError, a2 as isPermissionError, a3 as isPermissionPromptError } from './types-BwFKGH70.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HaexVaultSdk } from './client-CD5QZi7F.js';
2
- export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as ExternalAuthDecision, i as ExternalConnection, j as ExternalConnectionErrorCode, k as ExternalConnectionState, l as ExternalRequest, m as ExternalRequestEvent, n as ExternalRequestHandler, o as ExternalRequestPayload, p as ExternalResponse, F as FileStat, q as FilesystemAPI, I as ImapConfig, K as KnownPath, r as KnownPaths, L as LOCALSEND_EVENTS, s as LocalSendAPI, t as LocalSendEvent, u as LocalSendFileInfo, v as LocalSendSettings, M as MailAPI, w as MailAccount, x as MailAddress, y as MailAttachment, z as MailFetchRange, G as MailMessage, J as MailNewMessagesEvent, N as MailboxInfo, O as MessageEnvelope, P as NotificationAction, Q as NotificationClickEvent, R as NotificationOptions, T as NotificationsAPI, U as OutgoingAttachment, V as OutgoingMessage, W as PasswordInput, X as PasswordItemFull, Y as PasswordItemSummary, Z as PasswordKeyValue, _ as PasswordKeyValueInput, $ as PasswordsAPI, a0 as PendingAuthorization, a1 as PendingTransfer, a2 as PermissionsAPI, a3 as RemoteAddBackendRequest, a4 as RemoteS3Config, a5 as RemoteS3PublicConfig, a6 as RemoteStorageAPI, a7 as RemoteStorageBackendInfo, a8 as RemoteStorageObjectInfo, a9 as RemoteUpdateBackendRequest, aa as RequestedExtension, ab as SelectFileOptions, ac as SelectFolderOptions, ad as ServerInfo, ae as ServerStatus, af as SessionAuthorization, ag as SharedSpace, ah as ShellAPI, ai as ShellCreateOptions, aj as ShellCreateResponse, ak as ShellExitEvent, al as ShellOutputEvent, am as SmtpConfig, an as SpaceAccessTokenInfo, ao as SpaceAssignment, ap as SpaceInvite, aq as SpaceKeyGrantInfo, ar as SpaceMember, as as SpaceMemberInfo, at as SpacesAPI, au as SyncBackendInfo, av as TabAPI, aw as TransferDirection, ax as TransferProgress, ay as TransferState, az as WebAPI, aA as canExternalClientSendRequests, aB as isExternalClientConnected } from './client-CD5QZi7F.js';
1
+ import { H as HaexVaultSdk } from './client-BPwsH1so.js';
2
+ export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, D as DatabaseAPI, b as DecryptedSpace, c as DeepLink, d as Device, e as DeviceInfo, f as DeviceType, g as DialogAPI, h as DirEntry, E as ExternalAuthDecision, i as ExternalConnection, j as ExternalConnectionErrorCode, k as ExternalConnectionState, l as ExternalRequest, m as ExternalRequestEvent, n as ExternalRequestHandler, o as ExternalRequestPayload, p as ExternalResponse, F as FileStat, q as FilesystemAPI, I as ImapConfig, K as KnownPath, r as KnownPaths, L as LOCALSEND_EVENTS, s as LocalSendAPI, t as LocalSendEvent, u as LocalSendFileInfo, v as LocalSendSettings, M as MailAPI, w as MailAccount, x as MailAddress, y as MailAttachment, z as MailFetchRange, G as MailMessage, J as MailNewMessagesEvent, N as MailboxInfo, O as MessageEnvelope, P as NotificationAction, Q as NotificationClickEvent, R as NotificationOptions, T as NotificationsAPI, U as OutgoingAttachment, V as OutgoingMessage, W as PasswordInput, X as PasswordItemFull, Y as PasswordItemSummary, Z as PasswordKeyValue, _ as PasswordKeyValueInput, $ as PasswordsAPI, a0 as PendingAuthorization, a1 as PendingTransfer, a2 as PermissionsAPI, a3 as RemoteAddBackendRequest, a4 as RemoteS3Config, a5 as RemoteS3Proposal, a6 as RemoteS3PublicConfig, a7 as RemoteStorageAPI, a8 as RemoteStorageBackendInfo, a9 as RemoteStorageObjectInfo, aa as RemoteUpdateBackendRequest, ab as RequestedExtension, ac as SelectFileOptions, ad as SelectFolderOptions, ae as ServerInfo, af as ServerStatus, ag as SessionAuthorization, ah as SharedSpace, ai as ShellAPI, aj as ShellCreateOptions, ak as ShellCreateResponse, al as ShellExitEvent, am as ShellOutputEvent, an as SmtpConfig, ao as SpaceAccessTokenInfo, ap as SpaceAssignment, aq as SpaceInvite, ar as SpaceKeyGrantInfo, as as SpaceMember, at as SpaceMemberInfo, au as SpacesAPI, av as SyncBackendInfo, aw as TabAPI, ax as TransferDirection, ay as TransferProgress, az as TransferState, aA as WebAPI, aB as canExternalClientSendRequests, aC as isExternalClientConnected } from './client-BPwsH1so.js';
3
3
  import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-BwFKGH70.js';
4
4
  export { A as ApplicationContext, C as ClaimRequirement, i as ContextChangedEvent, j as DEFAULT_TIMEOUT, k as DatabaseColumnInfo, l as DatabaseExecuteParams, m as DatabasePermission, g as DatabasePermissionRequest, n as DatabaseQueryParams, D as DatabaseQueryResult, o as DatabaseTableInfo, c as EXTERNAL_EVENTS, p as ErrorCode, f as EventCallback, E as ExtensionInfo, a as ExtensionManifest, q as ExtensionRuntimeMode, r as ExternalEvent, F as FileChangeEvent, s as FileChangePayload, t as FileChangeType, u as FilteredSyncTablesResult, v as HAEXTENSION_EVENTS, b as HaexHubEvent, w as HaexHubRequest, x as HaexHubResponse, y as HaexVaultSdkError, z as HaextensionEvent, I as IdentityClaim, B as MAIL_EVENTS, G as MailEvent, J as ManifestI18nEntry, N as NOTIFICATION_EVENTS, K as NotificationEvent, L as PermissionDeniedError, O as PermissionErrorBase, Q as PermissionErrorCode, T as PermissionPromptError, P as PermissionResponse, U as PermissionStatus, R as RequestOptions, V as SHELL_EVENTS, X as SearchQuery, Y as SearchRequestEvent, S as SearchResult, Z as ShellEvent, _ as SyncTablesUpdatedEvent, $ as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a0 as getTableName, a1 as isPermissionDeniedError, a2 as isPermissionError, a3 as isPermissionPromptError } from './types-BwFKGH70.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
package/dist/index.js CHANGED
@@ -1793,26 +1793,32 @@ var BackendManagement = class {
1793
1793
  );
1794
1794
  }
1795
1795
  /**
1796
- * Add a new storage backend
1797
- * @param request - Backend configuration
1796
+ * Propose a new storage. The host asks the user; credentials are entered
1797
+ * only there. Resolves with the new storage, which the extension may then
1798
+ * read and write.
1799
+ * @param request - The proposal, without credentials
1798
1800
  * @returns Created backend info
1799
1801
  */
1800
1802
  async add(request) {
1801
1803
  return this.client.request(
1802
1804
  REMOTE_STORAGE_COMMANDS.addBackend,
1803
- { request }
1805
+ { request },
1806
+ // No deadline: the host waits for the user's answer in its dialog.
1807
+ { timeout: null }
1804
1808
  );
1805
1809
  }
1806
1810
  /**
1807
- * Update a storage backend
1808
- * Only provided fields are updated. Credentials are preserved if not provided.
1811
+ * Change a storage after the user confirms it in the host.
1812
+ * Only provided fields are updated; new credentials are entered in the host.
1809
1813
  * @param request - Update request with backendId and fields to update
1810
1814
  * @returns Updated backend info
1811
1815
  */
1812
1816
  async update(request) {
1813
1817
  return this.client.request(
1814
1818
  REMOTE_STORAGE_COMMANDS.updateBackend,
1815
- { request }
1819
+ { request },
1820
+ // No deadline: the host waits for the user's answer in its dialog.
1821
+ { timeout: null }
1816
1822
  );
1817
1823
  }
1818
1824
  /**
@@ -1820,18 +1826,22 @@ var BackendManagement = class {
1820
1826
  * @param backendId - Backend ID to remove
1821
1827
  */
1822
1828
  async remove(backendId) {
1823
- await this.client.request(REMOTE_STORAGE_COMMANDS.removeBackend, {
1824
- backendId
1825
- });
1829
+ await this.client.request(
1830
+ REMOTE_STORAGE_COMMANDS.removeBackend,
1831
+ { backendId },
1832
+ { timeout: null }
1833
+ );
1826
1834
  }
1827
1835
  /**
1828
1836
  * Test connection to a storage backend
1829
1837
  * @param backendId - Backend ID to test
1830
1838
  */
1831
1839
  async test(backendId) {
1832
- await this.client.request(REMOTE_STORAGE_COMMANDS.testBackend, {
1833
- backendId
1834
- });
1840
+ await this.client.request(
1841
+ REMOTE_STORAGE_COMMANDS.testBackend,
1842
+ { backendId },
1843
+ { timeout: null }
1844
+ );
1835
1845
  }
1836
1846
  };
1837
1847