@haex-space/vault-sdk 4.3.0 → 4.5.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.
Files changed (44) hide show
  1. package/dist/cli/index.mjs.map +1 -1
  2. package/dist/{client-pppDo5Q3.d.ts → client-D4VYF0bP.d.mts} +200 -13
  3. package/dist/{client-CDox5_KH.d.mts → client-Dw2uH1EM.d.ts} +200 -13
  4. package/dist/haex_bundle_bg.wasm +0 -0
  5. package/dist/index.d.mts +33 -6
  6. package/dist/index.d.ts +33 -6
  7. package/dist/index.js +57 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +55 -2
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/node.d.mts +1 -1
  12. package/dist/node.d.ts +1 -1
  13. package/dist/node.mjs +1 -1
  14. package/dist/node.mjs.map +1 -1
  15. package/dist/nuxt.js +1 -1
  16. package/dist/nuxt.js.map +1 -1
  17. package/dist/nuxt.mjs.map +1 -1
  18. package/dist/react.d.mts +2 -2
  19. package/dist/react.d.ts +2 -2
  20. package/dist/react.js +54 -2
  21. package/dist/react.js.map +1 -1
  22. package/dist/react.mjs +53 -1
  23. package/dist/react.mjs.map +1 -1
  24. package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
  25. package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
  26. package/dist/runtime/nuxt.plugin.client.js +49 -0
  27. package/dist/runtime/nuxt.plugin.client.js.map +1 -1
  28. package/dist/runtime/nuxt.plugin.client.mjs +49 -0
  29. package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
  30. package/dist/svelte.d.mts +2 -2
  31. package/dist/svelte.d.ts +2 -2
  32. package/dist/svelte.js +54 -2
  33. package/dist/svelte.js.map +1 -1
  34. package/dist/svelte.mjs +53 -1
  35. package/dist/svelte.mjs.map +1 -1
  36. package/dist/{types-DoNvKiW_.d.mts → types-CYuW3glJ.d.mts} +5 -0
  37. package/dist/{types-DoNvKiW_.d.ts → types-CYuW3glJ.d.ts} +5 -0
  38. package/dist/vue.d.mts +2 -2
  39. package/dist/vue.d.ts +2 -2
  40. package/dist/vue.js +54 -2
  41. package/dist/vue.js.map +1 -1
  42. package/dist/vue.mjs +53 -1
  43. package/dist/vue.mjs.map +1 -1
  44. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { b as HaexHubEvent, c as EXTERNAL_EVENTS, D as DatabaseQueryResult, M as Migration, d as MigrationResult, W as WebRequestOptions, e as WebResponse, f as EventCallback, a as ExtensionManifest, H as HaexHubConfig, E as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, R as RequestOptions } from './types-DoNvKiW_.mjs';
1
+ import { b as HaexHubEvent, c as EXTERNAL_EVENTS, D as DatabaseQueryResult, M as Migration, d as MigrationResult, W as WebRequestOptions, e as WebResponse, f as EventCallback, a as ExtensionManifest, H as HaexHubConfig, E as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, R as RequestOptions } from './types-CYuW3glJ.js';
2
2
  import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
3
3
 
4
4
  /**
@@ -544,18 +544,25 @@ interface S3PublicConfig {
544
544
  /** Bucket name */
545
545
  bucket: string;
546
546
  }
547
- /**
548
- * A storage the extension may use, as the host lists it: names only, never
549
- * credentials, endpoint or region.
550
- */
551
- interface StorageBackendInfo {
547
+ /** The protocol of a storage. */
548
+ type StorageBackendType = "s3" | "webdav" | "sftp";
549
+ interface StorageBackendInfoBase {
552
550
  id: string;
553
- /** Backend type (e.g., "s3") */
554
- type: string;
555
551
  /** Name of the storage */
556
552
  name: string;
557
553
  /** Name of the provider the user gave the connection (e.g., "Hetzner") */
558
554
  providerName: string;
555
+ }
556
+ /**
557
+ * A storage the extension may use, as the host lists it: names only, never
558
+ * credentials, endpoint, host, port, host key or region. An S3 storage names
559
+ * its bucket; a WebDAV or SFTP storage names its folder on the server (empty
560
+ * for the root). Check `type` before reading `bucket` or `folder`.
561
+ */
562
+ type StorageBackendInfo = S3BackendInfo | FolderBackendInfo;
563
+ /** An S3 storage, as the host lists it. */
564
+ interface S3BackendInfo extends StorageBackendInfoBase {
565
+ type: "s3";
559
566
  /** Bucket of the storage */
560
567
  bucket: string;
561
568
  /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
@@ -565,6 +572,51 @@ interface StorageBackendInfo {
565
572
  /** @deprecated Not sent by hosts that keep credentials to themselves (holzi). */
566
573
  config?: S3PublicConfig;
567
574
  }
575
+ /** A WebDAV or SFTP storage, as the host lists it. */
576
+ interface FolderBackendInfo extends StorageBackendInfoBase {
577
+ type: "webdav" | "sftp";
578
+ /** Folder of the storage on the server, without `/` at the start or end; empty for the root */
579
+ folder: string;
580
+ }
581
+ /** Fields that would carry a login; the host enters it in its own window and refuses them. */
582
+ interface NoLogin {
583
+ /** Entered by the host and never accepted in a proposal. */
584
+ username?: never;
585
+ /** Entered by the host and never accepted in a proposal. */
586
+ password?: never;
587
+ /** Entered by the host and never accepted in a proposal. */
588
+ privateKey?: never;
589
+ /** Entered by the host and never accepted in a proposal. */
590
+ passphrase?: never;
591
+ /** Confirmed by the user in the host and never accepted in a proposal. */
592
+ hostKey?: never;
593
+ /** Confirmed by the user in the host and never accepted in a proposal. */
594
+ fingerprint?: never;
595
+ }
596
+ /**
597
+ * What an extension proposes for a new WebDAV storage. The host asks for a
598
+ * permission for host and port of `url` (the port of the scheme when absent),
599
+ * shows the proposal to the user and asks for the login in its own window.
600
+ */
601
+ interface WebDavProposal extends NoLogin {
602
+ /** Address of the WebDAV server: `https`, or `http` only in the local network */
603
+ url: string;
604
+ /** Folder of the storage on the server; empty for the root */
605
+ folder: string;
606
+ }
607
+ /**
608
+ * What an extension proposes for a new SFTP storage. The host asks for a
609
+ * permission for `host:port`, shows the server's host key to the user to
610
+ * confirm, and asks for the login in its own window.
611
+ */
612
+ interface SftpProposal extends NoLogin {
613
+ /** Name or IP address of the server, without a scheme */
614
+ host: string;
615
+ /** Port of the server (1–65535); 22 when absent */
616
+ port?: number;
617
+ /** Folder of the storage on the server; empty for the root */
618
+ folder: string;
619
+ }
568
620
  /**
569
621
  * What an extension proposes for a new S3 storage. The host shows it to the
570
622
  * user and asks for credentials in its own window; an extension never sends
@@ -613,9 +665,13 @@ interface S3Config {
613
665
  interface AddBackendRequestBase {
614
666
  /** Display name for the storage */
615
667
  name: string;
616
- /** Backend type (currently only "s3") */
668
+ /** Backend type */
617
669
  type: "s3";
618
670
  }
671
+ interface AddFolderBackendRequestBase {
672
+ /** Display name for the storage */
673
+ name: string;
674
+ }
619
675
  /**
620
676
  * Request to add a new storage on a new connection. The host asks the user to
621
677
  * confirm it and enters credentials in its own window.
@@ -645,6 +701,31 @@ type AddBackendRequest = (AddBackendRequestBase & {
645
701
  };
646
702
  /** A storage the extension may read. */
647
703
  sameProviderAs: string;
704
+ })
705
+ /** Request to add a WebDAV storage on a new connection. */
706
+ | (AddFolderBackendRequestBase & {
707
+ type: "webdav";
708
+ config: WebDavProposal;
709
+ sameProviderAs?: never;
710
+ })
711
+ /** Request to add an SFTP storage on a new connection. */
712
+ | (AddFolderBackendRequestBase & {
713
+ type: "sftp";
714
+ config: SftpProposal;
715
+ sameProviderAs?: never;
716
+ })
717
+ /**
718
+ * Request to add a folder on the connection of an existing WebDAV or SFTP
719
+ * storage of the same type.
720
+ */
721
+ | (AddFolderBackendRequestBase & {
722
+ type: "webdav" | "sftp";
723
+ /** With an existing provider, only the folder may be proposed. */
724
+ config: {
725
+ folder: string;
726
+ } & NoLogin;
727
+ /** A storage of the same type the extension may read. */
728
+ sameProviderAs: string;
648
729
  });
649
730
  /**
650
731
  * Request to change a storage. The host asks the user to confirm it; new
@@ -656,11 +737,13 @@ interface UpdateBackendRequest {
656
737
  /** New display name (optional) */
657
738
  name?: string;
658
739
  /**
659
- * Only the bucket can be changed through the extension request. Credentials
660
- * and connection details never cross the bridge.
740
+ * Only the bucket (S3) or the folder (WebDAV, SFTP) can be changed through
741
+ * the extension request. Credentials and connection details never cross the
742
+ * bridge.
661
743
  */
662
744
  config?: {
663
745
  bucket?: string;
746
+ folder?: string;
664
747
  endpoint?: never;
665
748
  region?: never;
666
749
  pathStyle?: never;
@@ -681,7 +764,8 @@ interface StorageObjectInfo {
681
764
  lastModified?: string;
682
765
  }
683
766
  /**
684
- * Remote Storage API for S3-compatible (and future WebDAV, FTP) backends.
767
+ * Remote Storage API for S3-compatible, WebDAV and SFTP backends. Object calls
768
+ * work alike on every type.
685
769
  *
686
770
  * This API provides access to external storage backends configured centrally
687
771
  * in haex-vault. Extensions can upload/download files without CORS issues.
@@ -1490,6 +1574,108 @@ declare class PasswordsAPI {
1490
1574
  deleteAsync(itemId: string): Promise<void>;
1491
1575
  }
1492
1576
 
1577
+ /**
1578
+ * Types for the host's address book.
1579
+ *
1580
+ * Mirrors the answers of `src-tauri/src/extensions/contacts.rs` in holzi. The
1581
+ * extension's view is scoped by its `contacts` permissions: a contact outside
1582
+ * them answers exactly like a missing one (`PermissionErrorCode.DENIED`).
1583
+ */
1584
+ /** What lists and searches return of a contact. */
1585
+ interface ContactSummary {
1586
+ id: string;
1587
+ displayName: string;
1588
+ organization?: string;
1589
+ phones: string[];
1590
+ emails: string[];
1591
+ /** Group names. */
1592
+ groups: string[];
1593
+ /** Hash of the photo; its bytes come from `photoAsync`. */
1594
+ photo?: string;
1595
+ }
1596
+ /**
1597
+ * One value of a contact: a phone number, an address, a custom field, … The
1598
+ * set of kinds is open; a kind the extension does not know is passed through.
1599
+ */
1600
+ interface ContactValue {
1601
+ id: string;
1602
+ kind: string;
1603
+ label: string;
1604
+ value: string;
1605
+ }
1606
+ /** A device of a vault, from its Visitenkarte. */
1607
+ interface ContactHolziDevice {
1608
+ /** Hex. */
1609
+ devicePubkey: string;
1610
+ /** The iroh endpoint id, hex. */
1611
+ endpointId: string;
1612
+ irohRelay?: string;
1613
+ }
1614
+ /** The confirmed holzi addresses of a contact, from its Visitenkarte. */
1615
+ interface ContactHolziAddresses {
1616
+ /** The vault identity, hex. */
1617
+ vault: string;
1618
+ /** The vault identity as `npub1…`. */
1619
+ npub: string;
1620
+ devices: ContactHolziDevice[];
1621
+ nostrRelays: string[];
1622
+ }
1623
+ /** Everything of a contact an extension may read. */
1624
+ interface ContactDetail {
1625
+ id: string;
1626
+ displayName: string;
1627
+ givenName?: string;
1628
+ familyName?: string;
1629
+ middleName?: string;
1630
+ namePrefix?: string;
1631
+ nameSuffix?: string;
1632
+ nickname?: string;
1633
+ organization?: string;
1634
+ jobTitle?: string;
1635
+ note?: string;
1636
+ values: ContactValue[];
1637
+ /** Group names. */
1638
+ groups: string[];
1639
+ photo?: string;
1640
+ holziAddresses?: ContactHolziAddresses;
1641
+ updatedAt: string;
1642
+ }
1643
+ interface ContactListOptions {
1644
+ /** Only the contacts of the group with this name. */
1645
+ group?: string;
1646
+ offset?: number;
1647
+ /** At most this many; the host's default is 100, its maximum 1000. */
1648
+ limit?: number;
1649
+ }
1650
+ interface ContactList {
1651
+ contacts: ContactSummary[];
1652
+ /** All contacts in scope (of the group), not only this page. */
1653
+ total: number;
1654
+ }
1655
+
1656
+ /**
1657
+ * Read access to the host's address book, scoped by the extension's
1658
+ * `contacts` permissions (`action` = `read`, `target` = a group name or "*").
1659
+ * Extensions cannot change contacts. A contact outside the scope answers like
1660
+ * a missing one, so an extension never learns whether it exists.
1661
+ */
1662
+ declare class ContactsAPI {
1663
+ private client;
1664
+ constructor(client: HaexVaultSdk);
1665
+ /** One page of the contacts in scope, optionally of one group. */
1666
+ listAsync(options?: ContactListOptions): Promise<ContactList>;
1667
+ /** One contact with all its values. */
1668
+ readAsync(id: string): Promise<ContactDetail>;
1669
+ /**
1670
+ * The contacts in scope whose name, organization, phone number or e-mail
1671
+ * address contains `query`, regardless of case and accents. The host's
1672
+ * default limit is 20, its maximum 200.
1673
+ */
1674
+ searchAsync(query: string, limit?: number): Promise<ContactSummary[]>;
1675
+ /** The JPEG of a photo a readable contact uses, by its hash. */
1676
+ photoAsync(hash: string): Promise<Uint8Array>;
1677
+ }
1678
+
1493
1679
  /**
1494
1680
  * Mail types — IMAP fetch + SMTP send.
1495
1681
  *
@@ -1919,6 +2105,7 @@ declare class HaexVaultSdk {
1919
2105
  readonly spaces: SpacesAPI;
1920
2106
  readonly shell: ShellAPI;
1921
2107
  readonly passwords: PasswordsAPI;
2108
+ readonly contacts: ContactsAPI;
1922
2109
  readonly mail: MailAPI;
1923
2110
  readonly notifications: NotificationsAPI;
1924
2111
  readonly tab: TabAPI;
@@ -1975,4 +2162,4 @@ declare class HaexVaultSdk {
1975
2162
  private log;
1976
2163
  }
1977
2164
 
1978
- export { type PasswordInput as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type EncryptedFolderAccess as E, type FileStat as F, type LocalSendSettings as G, HaexVaultSdk as H, type ImapConfig as I, type MailAccount as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type MailAddress as N, type Attachment as O, type FetchRange as P, type MailMessage as Q, type MailNewMessagesEvent as R, StorageAPI as S, type MailboxInfo as T, type MessageEnvelope as U, type NotificationAction as V, type NotificationClickEvent as W, type NotificationOptions as X, NotificationsAPI as Y, type OutgoingAttachment as Z, type OutgoingMessage as _, type ConnectionSecurity as a, type PasswordItemFull as a0, type PasswordItemSummary as a1, type PasswordKeyValue as a2, type PasswordKeyValueInput as a3, PasswordsAPI as a4, type PendingAuthorization as a5, type PendingTransfer as a6, PermissionsAPI as a7, type AddBackendRequest as a8, type S3Config as a9, type SyncBackendInfo as aA, TabAPI as aB, type ToolContext as aC, type ToolHandler as aD, ToolsAPI as aE, type TransferDirection as aF, type TransferProgress as aG, type TransferState as aH, WebAPI as aI, canExternalClientSendRequests as aJ, isExternalClientConnected as aK, type S3Proposal as aa, type S3PublicConfig as ab, RemoteStorageAPI as ac, type StorageBackendInfo as ad, type StorageObjectInfo as ae, type UpdateBackendRequest as af, type RequestedExtension as ag, type SelectFileOptions as ah, type SelectFolderOptions as ai, type ServerInfo as aj, type ServerStatus as ak, type SessionAuthorization as al, type SharedSpace as am, ShellAPI as an, type ShellCreateOptions as ao, type ShellCreateResponse as ap, type ShellExitEvent as aq, type ShellOutputEvent as ar, type SmtpConfig as as, type SpaceAccessTokenInfo as at, type SpaceAssignment as au, type SpaceInvite as av, type SpaceKeyGrantInfo as aw, type SpaceMember as ax, type SpaceMemberInfo as ay, SpacesAPI 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 EncryptedFolderChoice as i, type EncryptedFolderEntry as j, type EncryptedFolderProviderErrorKind as k, EncryptedFoldersAPI as l, type ExternalAuthDecision as m, type ExternalConnection as n, ExternalConnectionErrorCode as o, ExternalConnectionState as p, type ExternalRequest as q, type ExternalRequestEvent as r, type ExternalRequestHandler as s, type ExternalRequestPayload as t, type ExternalResponse as u, FilesystemAPI as v, type KnownPaths as w, LocalSendAPI as x, type LocalSendEvent as y, type FileInfo as z };
2165
+ export { type MailboxInfo as $, type AuthorizedClient as A, type BlockedClient as B, type ConfirmOptions as C, DatabaseAPI as D, type EncryptedFolderAccess as E, type ExternalRequestHandler as F, type ExternalRequestPayload as G, HaexVaultSdk as H, type ExternalResponse as I, type FileStat as J, FilesystemAPI as K, type ImapConfig as L, KnownPath as M, type KnownPaths as N, LOCALSEND_EVENTS as O, LocalSendAPI as P, type LocalSendEvent as Q, type FileInfo as R, StorageAPI as S, type LocalSendSettings as T, MailAPI as U, type MailAccount as V, type MailAddress as W, type Attachment as X, type FetchRange as Y, type MailMessage as Z, type MailNewMessagesEvent as _, type ConnectionSecurity as a, type MessageEnvelope as a0, type NotificationAction as a1, type NotificationClickEvent as a2, type NotificationOptions as a3, NotificationsAPI as a4, type OutgoingAttachment as a5, type OutgoingMessage as a6, type PasswordInput as a7, type PasswordItemFull as a8, type PasswordItemSummary as a9, ShellAPI as aA, type ShellCreateOptions as aB, type ShellCreateResponse as aC, type ShellExitEvent as aD, type ShellOutputEvent as aE, type SmtpConfig as aF, type SpaceAccessTokenInfo as aG, type SpaceAssignment as aH, type SpaceInvite as aI, type SpaceKeyGrantInfo as aJ, type SpaceMember as aK, type SpaceMemberInfo as aL, SpacesAPI as aM, type SyncBackendInfo as aN, TabAPI as aO, type ToolContext as aP, type ToolHandler as aQ, ToolsAPI as aR, type TransferDirection as aS, type TransferProgress as aT, type TransferState as aU, WebAPI as aV, canExternalClientSendRequests as aW, isExternalClientConnected as aX, type PasswordKeyValue as aa, type PasswordKeyValueInput as ab, PasswordsAPI as ac, type PendingAuthorization as ad, type PendingTransfer as ae, PermissionsAPI as af, type AddBackendRequest as ag, type FolderBackendInfo as ah, type S3BackendInfo as ai, type S3Config as aj, type S3Proposal as ak, type S3PublicConfig as al, type SftpProposal as am, RemoteStorageAPI as an, type StorageBackendInfo as ao, type StorageBackendType as ap, type StorageObjectInfo as aq, type UpdateBackendRequest as ar, type WebDavProposal as as, type RequestedExtension as at, type SelectFileOptions as au, type SelectFolderOptions as av, type ServerInfo as aw, type ServerStatus as ax, type SessionAuthorization as ay, type SharedSpace as az, type ContactDetail as b, type ContactHolziAddresses as c, type ContactHolziDevice as d, type ContactList as e, type ContactListOptions as f, type ContactSummary as g, type ContactValue as h, ContactsAPI as i, type DecryptedSpace as j, type DeepLink as k, type Device as l, type DeviceInfo as m, type DeviceType as n, DialogAPI as o, type DirEntry as p, type EncryptedFolderChoice as q, type EncryptedFolderEntry as r, type EncryptedFolderProviderErrorKind as s, EncryptedFoldersAPI as t, type ExternalAuthDecision as u, type ExternalConnection as v, ExternalConnectionErrorCode as w, ExternalConnectionState as x, type ExternalRequest as y, type ExternalRequestEvent as z };
Binary file
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultSdk } from './client-CDox5_KH.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 EncryptedFolderAccess, i as EncryptedFolderChoice, j as EncryptedFolderEntry, k as EncryptedFolderProviderErrorKind, l as EncryptedFoldersAPI, m as ExternalAuthDecision, n as ExternalConnection, o as ExternalConnectionErrorCode, p as ExternalConnectionState, q as ExternalRequest, r as ExternalRequestEvent, s as ExternalRequestHandler, t as ExternalRequestPayload, u as ExternalResponse, F as FileStat, v as FilesystemAPI, I as ImapConfig, K as KnownPath, w as KnownPaths, L as LOCALSEND_EVENTS, x as LocalSendAPI, y as LocalSendEvent, z as LocalSendFileInfo, G as LocalSendSettings, M as MailAPI, J as MailAccount, N as MailAddress, O as MailAttachment, P as MailFetchRange, Q as MailMessage, R as MailNewMessagesEvent, T as MailboxInfo, U as MessageEnvelope, V as NotificationAction, W as NotificationClickEvent, X as NotificationOptions, Y as NotificationsAPI, Z as OutgoingAttachment, _ as OutgoingMessage, $ as PasswordInput, a0 as PasswordItemFull, a1 as PasswordItemSummary, a2 as PasswordKeyValue, a3 as PasswordKeyValueInput, a4 as PasswordsAPI, a5 as PendingAuthorization, a6 as PendingTransfer, a7 as PermissionsAPI, a8 as RemoteAddBackendRequest, a9 as RemoteS3Config, aa as RemoteS3Proposal, ab as RemoteS3PublicConfig, ac as RemoteStorageAPI, ad as RemoteStorageBackendInfo, ae as RemoteStorageObjectInfo, af as RemoteUpdateBackendRequest, ag as RequestedExtension, ah as SelectFileOptions, ai as SelectFolderOptions, aj as ServerInfo, ak as ServerStatus, al as SessionAuthorization, am as SharedSpace, an as ShellAPI, ao as ShellCreateOptions, ap as ShellCreateResponse, aq as ShellExitEvent, ar as ShellOutputEvent, as as SmtpConfig, at as SpaceAccessTokenInfo, au as SpaceAssignment, av as SpaceInvite, aw as SpaceKeyGrantInfo, ax as SpaceMember, ay as SpaceMemberInfo, az as SpacesAPI, aA as SyncBackendInfo, aB as TabAPI, aC as ToolContext, aD as ToolHandler, aE as ToolsAPI, aF as TransferDirection, aG as TransferProgress, aH as TransferState, aI as WebAPI, aJ as canExternalClientSendRequests, aK as isExternalClientConnected } from './client-CDox5_KH.mjs';
3
- import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-DoNvKiW_.mjs';
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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MailEvent, K as ManifestI18nEntry, L as ManifestTool, N as ManifestToolEffect, O as NOTIFICATION_EVENTS, Q as NotificationEvent, T as PermissionDeniedError, U as PermissionErrorBase, V as PermissionErrorCode, X as PermissionPromptError, P as PermissionResponse, Y as PermissionStatus, R as RequestOptions, Z as SHELL_EVENTS, _ as SearchQuery, $ as SearchRequestEvent, S as SearchResult, a0 as ShellEvent, a1 as SyncTablesUpdatedEvent, a2 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a3 as getTableName, a4 as isPermissionDeniedError, a5 as isPermissionError, a6 as isPermissionPromptError } from './types-DoNvKiW_.mjs';
1
+ import { H as HaexVaultSdk } from './client-D4VYF0bP.mjs';
2
+ export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, b as ContactDetail, c as ContactHolziAddresses, d as ContactHolziDevice, e as ContactList, f as ContactListOptions, g as ContactSummary, h as ContactValue, i as ContactsAPI, D as DatabaseAPI, j as DecryptedSpace, k as DeepLink, l as Device, m as DeviceInfo, n as DeviceType, o as DialogAPI, p as DirEntry, E as EncryptedFolderAccess, q as EncryptedFolderChoice, r as EncryptedFolderEntry, s as EncryptedFolderProviderErrorKind, t as EncryptedFoldersAPI, u as ExternalAuthDecision, v as ExternalConnection, w as ExternalConnectionErrorCode, x as ExternalConnectionState, y as ExternalRequest, z as ExternalRequestEvent, F as ExternalRequestHandler, G as ExternalRequestPayload, I as ExternalResponse, J as FileStat, K as FilesystemAPI, L as ImapConfig, M as KnownPath, N as KnownPaths, O as LOCALSEND_EVENTS, P as LocalSendAPI, Q as LocalSendEvent, R as LocalSendFileInfo, T as LocalSendSettings, U as MailAPI, V as MailAccount, W as MailAddress, X as MailAttachment, Y as MailFetchRange, Z as MailMessage, _ as MailNewMessagesEvent, $ as MailboxInfo, a0 as MessageEnvelope, a1 as NotificationAction, a2 as NotificationClickEvent, a3 as NotificationOptions, a4 as NotificationsAPI, a5 as OutgoingAttachment, a6 as OutgoingMessage, a7 as PasswordInput, a8 as PasswordItemFull, a9 as PasswordItemSummary, aa as PasswordKeyValue, ab as PasswordKeyValueInput, ac as PasswordsAPI, ad as PendingAuthorization, ae as PendingTransfer, af as PermissionsAPI, ag as RemoteAddBackendRequest, ah as RemoteFolderBackendInfo, ai as RemoteS3BackendInfo, aj as RemoteS3Config, ak as RemoteS3Proposal, al as RemoteS3PublicConfig, am as RemoteSftpProposal, an as RemoteStorageAPI, ao as RemoteStorageBackendInfo, ap as RemoteStorageBackendType, aq as RemoteStorageObjectInfo, ar as RemoteUpdateBackendRequest, as as RemoteWebDavProposal, at as RequestedExtension, au as SelectFileOptions, av as SelectFolderOptions, aw as ServerInfo, ax as ServerStatus, ay as SessionAuthorization, az as SharedSpace, aA as ShellAPI, aB as ShellCreateOptions, aC as ShellCreateResponse, aD as ShellExitEvent, aE as ShellOutputEvent, aF as SmtpConfig, aG as SpaceAccessTokenInfo, aH as SpaceAssignment, aI as SpaceInvite, aJ as SpaceKeyGrantInfo, aK as SpaceMember, aL as SpaceMemberInfo, aM as SpacesAPI, aN as SyncBackendInfo, aO as TabAPI, aP as ToolContext, aQ as ToolHandler, aR as ToolsAPI, aS as TransferDirection, aT as TransferProgress, aU as TransferState, aV as WebAPI, aW as canExternalClientSendRequests, aX as isExternalClientConnected } from './client-D4VYF0bP.mjs';
3
+ import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-CYuW3glJ.mjs';
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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MailEvent, K as ManifestI18nEntry, L as ManifestTool, N as ManifestToolEffect, O as NOTIFICATION_EVENTS, Q as NotificationEvent, T as PermissionDeniedError, U as PermissionErrorBase, V as PermissionErrorCode, X as PermissionPromptError, P as PermissionResponse, Y as PermissionStatus, R as RequestOptions, Z as SHELL_EVENTS, _ as SearchQuery, $ as SearchRequestEvent, S as SearchResult, a0 as ShellEvent, a1 as SyncTablesUpdatedEvent, a2 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a3 as getTableName, a4 as isPermissionDeniedError, a5 as isPermissionError, a6 as isPermissionPromptError } from './types-CYuW3glJ.mjs';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
6
6
  import 'drizzle-orm/sqlite-proxy';
7
7
 
@@ -129,6 +129,27 @@ declare const PASSWORD_COMMANDS: {
129
129
  };
130
130
  type PasswordCommand = (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS];
131
131
 
132
+ /**
133
+ * Contacts Commands
134
+ *
135
+ * Commands for the host's address book. Extensions only read; they are scoped
136
+ * by their `contacts` permissions (`action` = `read`, `target` = a group name
137
+ * or "*").
138
+ *
139
+ * Naming convention: `extension_contacts_<action>`
140
+ */
141
+ declare const CONTACT_COMMANDS: {
142
+ /** Contacts in scope, a page at a time, optionally of one group */
143
+ readonly list: "extension_contacts_list";
144
+ /** One contact with all its values, by id */
145
+ readonly read: "extension_contacts_read";
146
+ /** Contacts in scope whose name, organization, phone or e-mail matches */
147
+ readonly search: "extension_contacts_search";
148
+ /** The JPEG of a contact's photo, by its hash */
149
+ readonly photo: "extension_contacts_photo";
150
+ };
151
+ type ContactCommand = (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS];
152
+
132
153
  /**
133
154
  * Mail Commands (IMAP fetch + SMTP send).
134
155
  *
@@ -839,6 +860,12 @@ declare const TAURI_COMMANDS: {
839
860
  readonly update: "extension_password_update";
840
861
  readonly delete: "extension_password_delete";
841
862
  };
863
+ readonly contacts: {
864
+ readonly list: "extension_contacts_list";
865
+ readonly read: "extension_contacts_read";
866
+ readonly search: "extension_contacts_search";
867
+ readonly photo: "extension_contacts_photo";
868
+ };
842
869
  readonly mail: {
843
870
  readonly listMailboxes: "extension_mail_list_mailboxes";
844
871
  readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
@@ -857,7 +884,7 @@ declare const TAURI_COMMANDS: {
857
884
  readonly dismiss: "extension_notifications_dismiss";
858
885
  };
859
886
  };
860
- type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
887
+ type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
861
888
 
862
889
  /**
863
890
  * Crypto utilities for Vault Key Management
@@ -1124,4 +1151,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
1124
1151
 
1125
1152
  declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
1126
1153
 
1127
- export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, ENCRYPTED_FOLDER_COMMANDS, type EncryptedFolderCommand, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
1154
+ export { type AuthUser, CONTACT_COMMANDS, COSE_ALGORITHM, type ContactCommand, type CoseAlgorithm, type CreateSpaceRequest, ENCRYPTED_FOLDER_COMMANDS, type EncryptedFolderCommand, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { H as HaexVaultSdk } from './client-pppDo5Q3.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 EncryptedFolderAccess, i as EncryptedFolderChoice, j as EncryptedFolderEntry, k as EncryptedFolderProviderErrorKind, l as EncryptedFoldersAPI, m as ExternalAuthDecision, n as ExternalConnection, o as ExternalConnectionErrorCode, p as ExternalConnectionState, q as ExternalRequest, r as ExternalRequestEvent, s as ExternalRequestHandler, t as ExternalRequestPayload, u as ExternalResponse, F as FileStat, v as FilesystemAPI, I as ImapConfig, K as KnownPath, w as KnownPaths, L as LOCALSEND_EVENTS, x as LocalSendAPI, y as LocalSendEvent, z as LocalSendFileInfo, G as LocalSendSettings, M as MailAPI, J as MailAccount, N as MailAddress, O as MailAttachment, P as MailFetchRange, Q as MailMessage, R as MailNewMessagesEvent, T as MailboxInfo, U as MessageEnvelope, V as NotificationAction, W as NotificationClickEvent, X as NotificationOptions, Y as NotificationsAPI, Z as OutgoingAttachment, _ as OutgoingMessage, $ as PasswordInput, a0 as PasswordItemFull, a1 as PasswordItemSummary, a2 as PasswordKeyValue, a3 as PasswordKeyValueInput, a4 as PasswordsAPI, a5 as PendingAuthorization, a6 as PendingTransfer, a7 as PermissionsAPI, a8 as RemoteAddBackendRequest, a9 as RemoteS3Config, aa as RemoteS3Proposal, ab as RemoteS3PublicConfig, ac as RemoteStorageAPI, ad as RemoteStorageBackendInfo, ae as RemoteStorageObjectInfo, af as RemoteUpdateBackendRequest, ag as RequestedExtension, ah as SelectFileOptions, ai as SelectFolderOptions, aj as ServerInfo, ak as ServerStatus, al as SessionAuthorization, am as SharedSpace, an as ShellAPI, ao as ShellCreateOptions, ap as ShellCreateResponse, aq as ShellExitEvent, ar as ShellOutputEvent, as as SmtpConfig, at as SpaceAccessTokenInfo, au as SpaceAssignment, av as SpaceInvite, aw as SpaceKeyGrantInfo, ax as SpaceMember, ay as SpaceMemberInfo, az as SpacesAPI, aA as SyncBackendInfo, aB as TabAPI, aC as ToolContext, aD as ToolHandler, aE as ToolsAPI, aF as TransferDirection, aG as TransferProgress, aH as TransferState, aI as WebAPI, aJ as canExternalClientSendRequests, aK as isExternalClientConnected } from './client-pppDo5Q3.js';
3
- import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-DoNvKiW_.js';
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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MailEvent, K as ManifestI18nEntry, L as ManifestTool, N as ManifestToolEffect, O as NOTIFICATION_EVENTS, Q as NotificationEvent, T as PermissionDeniedError, U as PermissionErrorBase, V as PermissionErrorCode, X as PermissionPromptError, P as PermissionResponse, Y as PermissionStatus, R as RequestOptions, Z as SHELL_EVENTS, _ as SearchQuery, $ as SearchRequestEvent, S as SearchResult, a0 as ShellEvent, a1 as SyncTablesUpdatedEvent, a2 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a3 as getTableName, a4 as isPermissionDeniedError, a5 as isPermissionError, a6 as isPermissionPromptError } from './types-DoNvKiW_.js';
1
+ import { H as HaexVaultSdk } from './client-Dw2uH1EM.js';
2
+ export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, b as ContactDetail, c as ContactHolziAddresses, d as ContactHolziDevice, e as ContactList, f as ContactListOptions, g as ContactSummary, h as ContactValue, i as ContactsAPI, D as DatabaseAPI, j as DecryptedSpace, k as DeepLink, l as Device, m as DeviceInfo, n as DeviceType, o as DialogAPI, p as DirEntry, E as EncryptedFolderAccess, q as EncryptedFolderChoice, r as EncryptedFolderEntry, s as EncryptedFolderProviderErrorKind, t as EncryptedFoldersAPI, u as ExternalAuthDecision, v as ExternalConnection, w as ExternalConnectionErrorCode, x as ExternalConnectionState, y as ExternalRequest, z as ExternalRequestEvent, F as ExternalRequestHandler, G as ExternalRequestPayload, I as ExternalResponse, J as FileStat, K as FilesystemAPI, L as ImapConfig, M as KnownPath, N as KnownPaths, O as LOCALSEND_EVENTS, P as LocalSendAPI, Q as LocalSendEvent, R as LocalSendFileInfo, T as LocalSendSettings, U as MailAPI, V as MailAccount, W as MailAddress, X as MailAttachment, Y as MailFetchRange, Z as MailMessage, _ as MailNewMessagesEvent, $ as MailboxInfo, a0 as MessageEnvelope, a1 as NotificationAction, a2 as NotificationClickEvent, a3 as NotificationOptions, a4 as NotificationsAPI, a5 as OutgoingAttachment, a6 as OutgoingMessage, a7 as PasswordInput, a8 as PasswordItemFull, a9 as PasswordItemSummary, aa as PasswordKeyValue, ab as PasswordKeyValueInput, ac as PasswordsAPI, ad as PendingAuthorization, ae as PendingTransfer, af as PermissionsAPI, ag as RemoteAddBackendRequest, ah as RemoteFolderBackendInfo, ai as RemoteS3BackendInfo, aj as RemoteS3Config, ak as RemoteS3Proposal, al as RemoteS3PublicConfig, am as RemoteSftpProposal, an as RemoteStorageAPI, ao as RemoteStorageBackendInfo, ap as RemoteStorageBackendType, aq as RemoteStorageObjectInfo, ar as RemoteUpdateBackendRequest, as as RemoteWebDavProposal, at as RequestedExtension, au as SelectFileOptions, av as SelectFolderOptions, aw as ServerInfo, ax as ServerStatus, ay as SessionAuthorization, az as SharedSpace, aA as ShellAPI, aB as ShellCreateOptions, aC as ShellCreateResponse, aD as ShellExitEvent, aE as ShellOutputEvent, aF as SmtpConfig, aG as SpaceAccessTokenInfo, aH as SpaceAssignment, aI as SpaceInvite, aJ as SpaceKeyGrantInfo, aK as SpaceMember, aL as SpaceMemberInfo, aM as SpacesAPI, aN as SyncBackendInfo, aO as TabAPI, aP as ToolContext, aQ as ToolHandler, aR as ToolsAPI, aS as TransferDirection, aT as TransferProgress, aU as TransferState, aV as WebAPI, aW as canExternalClientSendRequests, aX as isExternalClientConnected } from './client-Dw2uH1EM.js';
3
+ import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-CYuW3glJ.js';
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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MailEvent, K as ManifestI18nEntry, L as ManifestTool, N as ManifestToolEffect, O as NOTIFICATION_EVENTS, Q as NotificationEvent, T as PermissionDeniedError, U as PermissionErrorBase, V as PermissionErrorCode, X as PermissionPromptError, P as PermissionResponse, Y as PermissionStatus, R as RequestOptions, Z as SHELL_EVENTS, _ as SearchQuery, $ as SearchRequestEvent, S as SearchResult, a0 as ShellEvent, a1 as SyncTablesUpdatedEvent, a2 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a3 as getTableName, a4 as isPermissionDeniedError, a5 as isPermissionError, a6 as isPermissionPromptError } from './types-CYuW3glJ.js';
5
5
  export { H as HaextensionConfig } from './config-D_HXjsEV.js';
6
6
  import 'drizzle-orm/sqlite-proxy';
7
7
 
@@ -129,6 +129,27 @@ declare const PASSWORD_COMMANDS: {
129
129
  };
130
130
  type PasswordCommand = (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS];
131
131
 
132
+ /**
133
+ * Contacts Commands
134
+ *
135
+ * Commands for the host's address book. Extensions only read; they are scoped
136
+ * by their `contacts` permissions (`action` = `read`, `target` = a group name
137
+ * or "*").
138
+ *
139
+ * Naming convention: `extension_contacts_<action>`
140
+ */
141
+ declare const CONTACT_COMMANDS: {
142
+ /** Contacts in scope, a page at a time, optionally of one group */
143
+ readonly list: "extension_contacts_list";
144
+ /** One contact with all its values, by id */
145
+ readonly read: "extension_contacts_read";
146
+ /** Contacts in scope whose name, organization, phone or e-mail matches */
147
+ readonly search: "extension_contacts_search";
148
+ /** The JPEG of a contact's photo, by its hash */
149
+ readonly photo: "extension_contacts_photo";
150
+ };
151
+ type ContactCommand = (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS];
152
+
132
153
  /**
133
154
  * Mail Commands (IMAP fetch + SMTP send).
134
155
  *
@@ -839,6 +860,12 @@ declare const TAURI_COMMANDS: {
839
860
  readonly update: "extension_password_update";
840
861
  readonly delete: "extension_password_delete";
841
862
  };
863
+ readonly contacts: {
864
+ readonly list: "extension_contacts_list";
865
+ readonly read: "extension_contacts_read";
866
+ readonly search: "extension_contacts_search";
867
+ readonly photo: "extension_contacts_photo";
868
+ };
842
869
  readonly mail: {
843
870
  readonly listMailboxes: "extension_mail_list_mailboxes";
844
871
  readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
@@ -857,7 +884,7 @@ declare const TAURI_COMMANDS: {
857
884
  readonly dismiss: "extension_notifications_dismiss";
858
885
  };
859
886
  };
860
- type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
887
+ type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
861
888
 
862
889
  /**
863
890
  * Crypto utilities for Vault Key Management
@@ -1124,4 +1151,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
1124
1151
 
1125
1152
  declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
1126
1153
 
1127
- export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, ENCRYPTED_FOLDER_COMMANDS, type EncryptedFolderCommand, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
1154
+ export { type AuthUser, CONTACT_COMMANDS, COSE_ALGORITHM, type ContactCommand, type CoseAlgorithm, type CreateSpaceRequest, ENCRYPTED_FOLDER_COMMANDS, type EncryptedFolderCommand, type ExportedPasskeyKeyPair, type ExportedUserKeypair, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, NOTIFICATION_COMMANDS, type NotificationCommand, PASSWORD_COMMANDS, type PasskeyKeyPair, type PasswordCommand, type RegisterKeypairRequest, SIGNING_ALGO, SPACE_COMMANDS, type SealedData, type SignableRecord, SignedClaimPresentation, type SpaceCommand, type StorageConfig, type ErrorResponse as SyncServerErrorResponse, type ServerInfo as SyncServerInfo, type LoginRequest as SyncServerLoginRequest, type LoginResponse as SyncServerLoginResponse, type RefreshRequest as SyncServerRefreshRequest, TAURI_COMMANDS, type TauriCommand, type UserKeypair, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
package/dist/index.js CHANGED
@@ -12,9 +12,9 @@ var __export = (target, all) => {
12
12
  __defProp(target, name, { get: all[name], enumerable: true });
13
13
  };
14
14
 
15
- // node_modules/.pnpm/tsup@8.5.1_jiti@2.7.0_postcss@8.5.29_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js
15
+ // node_modules/.pnpm/tsup@8.5.1_jiti@2.7.0_postcss@8.5.30_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js
16
16
  var init_cjs_shims = __esm({
17
- "node_modules/.pnpm/tsup@8.5.1_jiti@2.7.0_postcss@8.5.29_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js"() {
17
+ "node_modules/.pnpm/tsup@8.5.1_jiti@2.7.0_postcss@8.5.30_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js"() {
18
18
  }
19
19
  });
20
20
 
@@ -1175,6 +1175,19 @@ var PASSWORD_COMMANDS = {
1175
1175
  delete: "extension_password_delete"
1176
1176
  };
1177
1177
 
1178
+ // src/commands/contacts.ts
1179
+ init_cjs_shims();
1180
+ var CONTACT_COMMANDS = {
1181
+ /** Contacts in scope, a page at a time, optionally of one group */
1182
+ list: "extension_contacts_list",
1183
+ /** One contact with all its values, by id */
1184
+ read: "extension_contacts_read",
1185
+ /** Contacts in scope whose name, organization, phone or e-mail matches */
1186
+ search: "extension_contacts_search",
1187
+ /** The JPEG of a contact's photo, by its hash */
1188
+ photo: "extension_contacts_photo"
1189
+ };
1190
+
1178
1191
  // src/commands/mail.ts
1179
1192
  init_cjs_shims();
1180
1193
  var MAIL_COMMANDS = {
@@ -1226,6 +1239,7 @@ var TAURI_COMMANDS = {
1226
1239
  spaces: SPACE_COMMANDS,
1227
1240
  shell: SHELL_COMMANDS,
1228
1241
  passwords: PASSWORD_COMMANDS,
1242
+ contacts: CONTACT_COMMANDS,
1229
1243
  mail: MAIL_COMMANDS,
1230
1244
  notifications: NOTIFICATION_COMMANDS
1231
1245
  };
@@ -2364,6 +2378,44 @@ var PasswordsAPI = class {
2364
2378
  }
2365
2379
  };
2366
2380
 
2381
+ // src/api/contacts.ts
2382
+ init_cjs_shims();
2383
+ init_vaultKey();
2384
+ var ContactsAPI = class {
2385
+ constructor(client) {
2386
+ this.client = client;
2387
+ }
2388
+ /** One page of the contacts in scope, optionally of one group. */
2389
+ async listAsync(options = {}) {
2390
+ return this.client.request(CONTACT_COMMANDS.list, {
2391
+ ...options
2392
+ });
2393
+ }
2394
+ /** One contact with all its values. */
2395
+ async readAsync(id) {
2396
+ return this.client.request(CONTACT_COMMANDS.read, { id });
2397
+ }
2398
+ /**
2399
+ * The contacts in scope whose name, organization, phone number or e-mail
2400
+ * address contains `query`, regardless of case and accents. The host's
2401
+ * default limit is 20, its maximum 200.
2402
+ */
2403
+ async searchAsync(query, limit) {
2404
+ const answer = await this.client.request(
2405
+ CONTACT_COMMANDS.search,
2406
+ limit === void 0 ? { query } : { query, limit }
2407
+ );
2408
+ return answer.contacts;
2409
+ }
2410
+ /** The JPEG of a photo a readable contact uses, by its hash. */
2411
+ async photoAsync(hash) {
2412
+ const base64 = await this.client.request(CONTACT_COMMANDS.photo, {
2413
+ hash
2414
+ });
2415
+ return base64ToArrayBuffer(base64);
2416
+ }
2417
+ };
2418
+
2367
2419
  // src/api/mail.ts
2368
2420
  init_cjs_shims();
2369
2421
  var MailAPI = class {
@@ -3430,6 +3482,7 @@ var HaexVaultSdk = class {
3430
3482
  this.spaces = new SpacesAPI(this);
3431
3483
  this.shell = new ShellAPI(this);
3432
3484
  this.passwords = new PasswordsAPI(this);
3485
+ this.contacts = new ContactsAPI(this);
3433
3486
  this.mail = new MailAPI(this);
3434
3487
  this.notifications = new NotificationsAPI(this);
3435
3488
  this.tab = new TabAPI(this);
@@ -4299,7 +4352,9 @@ function createHaexVaultSdk(config = {}) {
4299
4352
  return new HaexVaultSdk(config);
4300
4353
  }
4301
4354
 
4355
+ exports.CONTACT_COMMANDS = CONTACT_COMMANDS;
4302
4356
  exports.COSE_ALGORITHM = COSE_ALGORITHM;
4357
+ exports.ContactsAPI = ContactsAPI;
4303
4358
  exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
4304
4359
  exports.DatabaseAPI = DatabaseAPI;
4305
4360
  exports.DialogAPI = DialogAPI;