@haex-space/vault-sdk 3.2.8 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client-BBD-YsPv.d.ts → client--_QYySP0.d.ts} +90 -2
- package/dist/{client-DaS2fAf-.d.mts → client-C9FyPkqp.d.mts} +90 -2
- package/dist/index.d.mts +33 -6
- package/dist/index.d.ts +33 -6
- package/dist/index.js +68 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +66 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +63 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +63 -0
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +63 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +63 -0
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +63 -0
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +63 -0
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-Cji-mUN0.d.mts → types-fHuxbqa4.d.mts} +9 -1
- package/dist/{types-Cji-mUN0.d.ts → types-fHuxbqa4.d.ts} +9 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +63 -0
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +63 -0
- package/dist/vue.mjs.map +1 -1
- 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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } from './types-
|
|
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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } from './types-fHuxbqa4.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1426,6 +1426,14 @@ declare class MailAPI {
|
|
|
1426
1426
|
fetchEnvelopesAsync(imap: ImapConfig, mailbox: string, range: FetchRange): Promise<MessageEnvelope[]>;
|
|
1427
1427
|
/** Fetch a full message (envelope + body + attachment metadata) by UID. */
|
|
1428
1428
|
fetchMessageAsync(imap: ImapConfig, mailbox: string, uid: number): Promise<MailMessage>;
|
|
1429
|
+
/**
|
|
1430
|
+
* Fetch a single attachment's raw bytes by its `partIndex` (from the
|
|
1431
|
+
* `attachments` array of a fetched `MailMessage`), returned as a
|
|
1432
|
+
* standard-alphabet base64 string. The base64 form drops straight into
|
|
1433
|
+
* `OutgoingAttachment.data` when forwarding, and decodes to bytes for
|
|
1434
|
+
* viewing or downloading.
|
|
1435
|
+
*/
|
|
1436
|
+
fetchAttachmentAsync(imap: ImapConfig, mailbox: string, uid: number, partIndex: number): Promise<string>;
|
|
1429
1437
|
/**
|
|
1430
1438
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
1431
1439
|
* mark messages as read; `add=false` removes the flag(s).
|
|
@@ -1449,6 +1457,85 @@ declare class MailAPI {
|
|
|
1449
1457
|
buildRfc822Async(imapHost: string, message: OutgoingMessage): Promise<string>;
|
|
1450
1458
|
}
|
|
1451
1459
|
|
|
1460
|
+
/**
|
|
1461
|
+
* A deep link into the calling extension. `path` is an extension-internal
|
|
1462
|
+
* route (e.g. "/event/abc-123" or "/inbox/msg/xyz").
|
|
1463
|
+
*
|
|
1464
|
+
* The notification carrying this link is pinned to the calling extension's
|
|
1465
|
+
* public key by the host. Clicks can only route to webviews with that same
|
|
1466
|
+
* public key — there is intentionally no `extensionId` field, so notifications
|
|
1467
|
+
* can never deep-link into a *different* extension.
|
|
1468
|
+
*/
|
|
1469
|
+
type DeepLink = {
|
|
1470
|
+
path: string;
|
|
1471
|
+
};
|
|
1472
|
+
/** An action button on a notification. */
|
|
1473
|
+
type NotificationAction = {
|
|
1474
|
+
/** Stable id, returned in the click event. */
|
|
1475
|
+
id: string;
|
|
1476
|
+
/** Button text (the caller localises it). */
|
|
1477
|
+
label: string;
|
|
1478
|
+
/** Where a click on this button routes. */
|
|
1479
|
+
deepLink: DeepLink;
|
|
1480
|
+
};
|
|
1481
|
+
type NotificationOptions = {
|
|
1482
|
+
title: string;
|
|
1483
|
+
body?: string;
|
|
1484
|
+
/** Optional icon override; default = the extension's manifest icon. */
|
|
1485
|
+
icon?: string;
|
|
1486
|
+
/** Click on the notification body → navigate here. */
|
|
1487
|
+
primary?: DeepLink;
|
|
1488
|
+
/**
|
|
1489
|
+
* Up to 3 action buttons (platform-dependent; extra buttons and, on some
|
|
1490
|
+
* platforms, all buttons degrade silently — the `primary` link still works).
|
|
1491
|
+
*/
|
|
1492
|
+
actions?: NotificationAction[];
|
|
1493
|
+
/** Dedupe key — showing again with the same tag replaces the previous one. */
|
|
1494
|
+
tag?: string;
|
|
1495
|
+
};
|
|
1496
|
+
/** Payload delivered to {@link NotificationsAPI.onClick} handlers. */
|
|
1497
|
+
type NotificationClickEvent = {
|
|
1498
|
+
/** Id of the clicked notification (the value returned by `show`). */
|
|
1499
|
+
notificationId: string;
|
|
1500
|
+
/** Id of the clicked action button, or undefined for a body click. */
|
|
1501
|
+
actionId?: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Resolved deep-link path for the click (the `primary` path for a body
|
|
1504
|
+
* click, or the action's `deepLink.path`), if one was set.
|
|
1505
|
+
*/
|
|
1506
|
+
path?: string;
|
|
1507
|
+
};
|
|
1508
|
+
/**
|
|
1509
|
+
* Generic OS notifications, bridged through the host vault.
|
|
1510
|
+
*
|
|
1511
|
+
* Permission model: requires the `notifications` permission with action
|
|
1512
|
+
* `show`. The host assigns and pins the extension's public key on every
|
|
1513
|
+
* `show()` — the extension never supplies or sees its key here.
|
|
1514
|
+
*
|
|
1515
|
+
* Platform reality (the notification itself always shows; routing varies):
|
|
1516
|
+
* - Click → deep-link routing and action buttons depend on the host's OS
|
|
1517
|
+
* notification backend. Where the backend reports no click, the body and
|
|
1518
|
+
* buttons simply don't route; the notification is still displayed.
|
|
1519
|
+
*/
|
|
1520
|
+
declare class NotificationsAPI {
|
|
1521
|
+
private client;
|
|
1522
|
+
constructor(client: HaexVaultSdk);
|
|
1523
|
+
/** Show a notification. Returns its id so it can be dismissed later. */
|
|
1524
|
+
show(opts: NotificationOptions): Promise<{
|
|
1525
|
+
id: string;
|
|
1526
|
+
}>;
|
|
1527
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
1528
|
+
dismiss(id: string): Promise<void>;
|
|
1529
|
+
/**
|
|
1530
|
+
* Listen for clicks on this extension's notifications. Useful when the
|
|
1531
|
+
* extension is already open and wants to react in-app (e.g. router.push the
|
|
1532
|
+
* `path`) instead of relying on the host to focus the webview.
|
|
1533
|
+
*
|
|
1534
|
+
* Returns an unsubscribe function.
|
|
1535
|
+
*/
|
|
1536
|
+
onClick(handler: (e: NotificationClickEvent) => void): () => void;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1452
1539
|
/**
|
|
1453
1540
|
* HaexVault Client
|
|
1454
1541
|
*
|
|
@@ -1494,6 +1581,7 @@ declare class HaexVaultSdk {
|
|
|
1494
1581
|
readonly shell: ShellAPI;
|
|
1495
1582
|
readonly passwords: PasswordsAPI;
|
|
1496
1583
|
readonly mail: MailAPI;
|
|
1584
|
+
readonly notifications: NotificationsAPI;
|
|
1497
1585
|
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1498
1586
|
readonly actions: {
|
|
1499
1587
|
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
@@ -1542,4 +1630,4 @@ declare class HaexVaultSdk {
|
|
|
1542
1630
|
private log;
|
|
1543
1631
|
}
|
|
1544
1632
|
|
|
1545
|
-
export {
|
|
1633
|
+
export { PermissionsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConnectionSecurity as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MessageEnvelope as G, HaexVaultSdk as H, type ImapConfig as I, type NotificationClickEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type NotificationAction as N, type NotificationOptions as O, NotificationsAPI as P, type OutgoingAttachment as Q, type OutgoingMessage as R, StorageAPI as S, type PasswordInput as T, type PasswordItemFull as U, type PasswordItemSummary as V, type PasswordKeyValue as W, type PasswordKeyValueInput as X, PasswordsAPI as Y, type PendingAuthorization as Z, type PendingTransfer as _, type DecryptedSpace as a, type AddBackendRequest as a0, type S3Config as a1, type S3PublicConfig as a2, RemoteStorageAPI as a3, type StorageBackendInfo as a4, type StorageObjectInfo as a5, type UpdateBackendRequest as a6, type RequestedExtension as a7, type SelectFileOptions as a8, type SelectFolderOptions as a9, type ServerInfo as aa, type ServerStatus as ab, type SessionAuthorization as ac, type SharedSpace as ad, ShellAPI as ae, type ShellCreateOptions as af, type ShellCreateResponse as ag, type ShellExitEvent as ah, type ShellOutputEvent as ai, type SmtpConfig as aj, type SpaceAccessTokenInfo as ak, type SpaceAssignment as al, type SpaceInvite as am, type SpaceKeyGrantInfo as an, type SpaceMemberInfo as ao, SpacesAPI as ap, type SyncBackendInfo as aq, type TransferDirection as ar, type TransferProgress as as, type TransferState as at, WebAPI as au, canExternalClientSendRequests as av, isExternalClientConnected as aw, type DeepLink as b, type Device as c, type DeviceInfo as d, type DeviceType as e, type DirEntry as f, type ExternalConnection as g, ExternalConnectionErrorCode as h, ExternalConnectionState as i, type ExternalRequest as j, type ExternalRequestEvent as k, type ExternalRequestHandler as l, type ExternalRequestPayload as m, type ExternalResponse as n, FilesystemAPI as o, type KnownPaths as p, LocalSendAPI as q, type LocalSendEvent as r, type FileInfo as s, type LocalSendSettings as t, type MailAccount as u, type MailAddress as v, type Attachment as w, type FetchRange as x, type MailMessage as y, type MailboxInfo as z };
|
|
@@ -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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } from './types-
|
|
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, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult } from './types-fHuxbqa4.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1426,6 +1426,14 @@ declare class MailAPI {
|
|
|
1426
1426
|
fetchEnvelopesAsync(imap: ImapConfig, mailbox: string, range: FetchRange): Promise<MessageEnvelope[]>;
|
|
1427
1427
|
/** Fetch a full message (envelope + body + attachment metadata) by UID. */
|
|
1428
1428
|
fetchMessageAsync(imap: ImapConfig, mailbox: string, uid: number): Promise<MailMessage>;
|
|
1429
|
+
/**
|
|
1430
|
+
* Fetch a single attachment's raw bytes by its `partIndex` (from the
|
|
1431
|
+
* `attachments` array of a fetched `MailMessage`), returned as a
|
|
1432
|
+
* standard-alphabet base64 string. The base64 form drops straight into
|
|
1433
|
+
* `OutgoingAttachment.data` when forwarding, and decodes to bytes for
|
|
1434
|
+
* viewing or downloading.
|
|
1435
|
+
*/
|
|
1436
|
+
fetchAttachmentAsync(imap: ImapConfig, mailbox: string, uid: number, partIndex: number): Promise<string>;
|
|
1429
1437
|
/**
|
|
1430
1438
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
1431
1439
|
* mark messages as read; `add=false` removes the flag(s).
|
|
@@ -1449,6 +1457,85 @@ declare class MailAPI {
|
|
|
1449
1457
|
buildRfc822Async(imapHost: string, message: OutgoingMessage): Promise<string>;
|
|
1450
1458
|
}
|
|
1451
1459
|
|
|
1460
|
+
/**
|
|
1461
|
+
* A deep link into the calling extension. `path` is an extension-internal
|
|
1462
|
+
* route (e.g. "/event/abc-123" or "/inbox/msg/xyz").
|
|
1463
|
+
*
|
|
1464
|
+
* The notification carrying this link is pinned to the calling extension's
|
|
1465
|
+
* public key by the host. Clicks can only route to webviews with that same
|
|
1466
|
+
* public key — there is intentionally no `extensionId` field, so notifications
|
|
1467
|
+
* can never deep-link into a *different* extension.
|
|
1468
|
+
*/
|
|
1469
|
+
type DeepLink = {
|
|
1470
|
+
path: string;
|
|
1471
|
+
};
|
|
1472
|
+
/** An action button on a notification. */
|
|
1473
|
+
type NotificationAction = {
|
|
1474
|
+
/** Stable id, returned in the click event. */
|
|
1475
|
+
id: string;
|
|
1476
|
+
/** Button text (the caller localises it). */
|
|
1477
|
+
label: string;
|
|
1478
|
+
/** Where a click on this button routes. */
|
|
1479
|
+
deepLink: DeepLink;
|
|
1480
|
+
};
|
|
1481
|
+
type NotificationOptions = {
|
|
1482
|
+
title: string;
|
|
1483
|
+
body?: string;
|
|
1484
|
+
/** Optional icon override; default = the extension's manifest icon. */
|
|
1485
|
+
icon?: string;
|
|
1486
|
+
/** Click on the notification body → navigate here. */
|
|
1487
|
+
primary?: DeepLink;
|
|
1488
|
+
/**
|
|
1489
|
+
* Up to 3 action buttons (platform-dependent; extra buttons and, on some
|
|
1490
|
+
* platforms, all buttons degrade silently — the `primary` link still works).
|
|
1491
|
+
*/
|
|
1492
|
+
actions?: NotificationAction[];
|
|
1493
|
+
/** Dedupe key — showing again with the same tag replaces the previous one. */
|
|
1494
|
+
tag?: string;
|
|
1495
|
+
};
|
|
1496
|
+
/** Payload delivered to {@link NotificationsAPI.onClick} handlers. */
|
|
1497
|
+
type NotificationClickEvent = {
|
|
1498
|
+
/** Id of the clicked notification (the value returned by `show`). */
|
|
1499
|
+
notificationId: string;
|
|
1500
|
+
/** Id of the clicked action button, or undefined for a body click. */
|
|
1501
|
+
actionId?: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Resolved deep-link path for the click (the `primary` path for a body
|
|
1504
|
+
* click, or the action's `deepLink.path`), if one was set.
|
|
1505
|
+
*/
|
|
1506
|
+
path?: string;
|
|
1507
|
+
};
|
|
1508
|
+
/**
|
|
1509
|
+
* Generic OS notifications, bridged through the host vault.
|
|
1510
|
+
*
|
|
1511
|
+
* Permission model: requires the `notifications` permission with action
|
|
1512
|
+
* `show`. The host assigns and pins the extension's public key on every
|
|
1513
|
+
* `show()` — the extension never supplies or sees its key here.
|
|
1514
|
+
*
|
|
1515
|
+
* Platform reality (the notification itself always shows; routing varies):
|
|
1516
|
+
* - Click → deep-link routing and action buttons depend on the host's OS
|
|
1517
|
+
* notification backend. Where the backend reports no click, the body and
|
|
1518
|
+
* buttons simply don't route; the notification is still displayed.
|
|
1519
|
+
*/
|
|
1520
|
+
declare class NotificationsAPI {
|
|
1521
|
+
private client;
|
|
1522
|
+
constructor(client: HaexVaultSdk);
|
|
1523
|
+
/** Show a notification. Returns its id so it can be dismissed later. */
|
|
1524
|
+
show(opts: NotificationOptions): Promise<{
|
|
1525
|
+
id: string;
|
|
1526
|
+
}>;
|
|
1527
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
1528
|
+
dismiss(id: string): Promise<void>;
|
|
1529
|
+
/**
|
|
1530
|
+
* Listen for clicks on this extension's notifications. Useful when the
|
|
1531
|
+
* extension is already open and wants to react in-app (e.g. router.push the
|
|
1532
|
+
* `path`) instead of relying on the host to focus the webview.
|
|
1533
|
+
*
|
|
1534
|
+
* Returns an unsubscribe function.
|
|
1535
|
+
*/
|
|
1536
|
+
onClick(handler: (e: NotificationClickEvent) => void): () => void;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1452
1539
|
/**
|
|
1453
1540
|
* HaexVault Client
|
|
1454
1541
|
*
|
|
@@ -1494,6 +1581,7 @@ declare class HaexVaultSdk {
|
|
|
1494
1581
|
readonly shell: ShellAPI;
|
|
1495
1582
|
readonly passwords: PasswordsAPI;
|
|
1496
1583
|
readonly mail: MailAPI;
|
|
1584
|
+
readonly notifications: NotificationsAPI;
|
|
1497
1585
|
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1498
1586
|
readonly actions: {
|
|
1499
1587
|
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
@@ -1542,4 +1630,4 @@ declare class HaexVaultSdk {
|
|
|
1542
1630
|
private log;
|
|
1543
1631
|
}
|
|
1544
1632
|
|
|
1545
|
-
export {
|
|
1633
|
+
export { PermissionsAPI as $, type AuthorizedClient as A, type BlockedClient as B, type ConnectionSecurity as C, DatabaseAPI as D, type ExternalAuthDecision as E, type FileStat as F, type MessageEnvelope as G, HaexVaultSdk as H, type ImapConfig as I, type NotificationClickEvent as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type NotificationAction as N, type NotificationOptions as O, NotificationsAPI as P, type OutgoingAttachment as Q, type OutgoingMessage as R, StorageAPI as S, type PasswordInput as T, type PasswordItemFull as U, type PasswordItemSummary as V, type PasswordKeyValue as W, type PasswordKeyValueInput as X, PasswordsAPI as Y, type PendingAuthorization as Z, type PendingTransfer as _, type DecryptedSpace as a, type AddBackendRequest as a0, type S3Config as a1, type S3PublicConfig as a2, RemoteStorageAPI as a3, type StorageBackendInfo as a4, type StorageObjectInfo as a5, type UpdateBackendRequest as a6, type RequestedExtension as a7, type SelectFileOptions as a8, type SelectFolderOptions as a9, type ServerInfo as aa, type ServerStatus as ab, type SessionAuthorization as ac, type SharedSpace as ad, ShellAPI as ae, type ShellCreateOptions as af, type ShellCreateResponse as ag, type ShellExitEvent as ah, type ShellOutputEvent as ai, type SmtpConfig as aj, type SpaceAccessTokenInfo as ak, type SpaceAssignment as al, type SpaceInvite as am, type SpaceKeyGrantInfo as an, type SpaceMemberInfo as ao, SpacesAPI as ap, type SyncBackendInfo as aq, type TransferDirection as ar, type TransferProgress as as, type TransferState as at, WebAPI as au, canExternalClientSendRequests as av, isExternalClientConnected as aw, type DeepLink as b, type Device as c, type DeviceInfo as d, type DeviceType as e, type DirEntry as f, type ExternalConnection as g, ExternalConnectionErrorCode as h, ExternalConnectionState as i, type ExternalRequest as j, type ExternalRequestEvent as k, type ExternalRequestHandler as l, type ExternalRequestPayload as m, type ExternalResponse as n, FilesystemAPI as o, type KnownPaths as p, LocalSendAPI as q, type LocalSendEvent as r, type FileInfo as s, type LocalSendSettings as t, type MailAccount as u, type MailAddress as v, type Attachment as w, type FetchRange as x, type MailMessage as y, type MailboxInfo as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client-
|
|
2
|
-
export { A as AuthorizedClient, B as BlockedClient, C as ConnectionSecurity, D as DatabaseAPI, a as DecryptedSpace, b as
|
|
3
|
-
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-
|
|
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, a as ExtensionInfo, 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 ManifestI18nEntry, G as
|
|
1
|
+
import { H as HaexVaultSdk } from './client-C9FyPkqp.mjs';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, C as ConnectionSecurity, D as DatabaseAPI, a as DecryptedSpace, b as DeepLink, c as Device, d as DeviceInfo, e as DeviceType, f as DirEntry, E as ExternalAuthDecision, g as ExternalConnection, h as ExternalConnectionErrorCode, i as ExternalConnectionState, j as ExternalRequest, k as ExternalRequestEvent, l as ExternalRequestHandler, m as ExternalRequestPayload, n as ExternalResponse, F as FileStat, o as FilesystemAPI, I as ImapConfig, K as KnownPath, p as KnownPaths, L as LOCALSEND_EVENTS, q as LocalSendAPI, r as LocalSendEvent, s as LocalSendFileInfo, t as LocalSendSettings, M as MailAPI, u as MailAccount, v as MailAddress, w as MailAttachment, x as MailFetchRange, y as MailMessage, z as MailboxInfo, G as MessageEnvelope, N as NotificationAction, J as NotificationClickEvent, O as NotificationOptions, P as NotificationsAPI, Q as OutgoingAttachment, R as OutgoingMessage, T as PasswordInput, U as PasswordItemFull, V as PasswordItemSummary, W as PasswordKeyValue, X as PasswordKeyValueInput, Y as PasswordsAPI, Z as PendingAuthorization, _ as PendingTransfer, $ as PermissionsAPI, a0 as RemoteAddBackendRequest, a1 as RemoteS3Config, a2 as RemoteS3PublicConfig, a3 as RemoteStorageAPI, a4 as RemoteStorageBackendInfo, a5 as RemoteStorageObjectInfo, a6 as RemoteUpdateBackendRequest, a7 as RequestedExtension, a8 as SelectFileOptions, a9 as SelectFolderOptions, aa as ServerInfo, ab as ServerStatus, ac as SessionAuthorization, ad as SharedSpace, ae as ShellAPI, af as ShellCreateOptions, ag as ShellCreateResponse, ah as ShellExitEvent, ai as ShellOutputEvent, aj as SmtpConfig, ak as SpaceAccessTokenInfo, al as SpaceAssignment, am as SpaceInvite, an as SpaceKeyGrantInfo, ao as SpaceMemberInfo, ap as SpacesAPI, aq as SyncBackendInfo, ar as TransferDirection, as as TransferProgress, at as TransferState, au as WebAPI, av as canExternalClientSendRequests, aw as isExternalClientConnected } from './client-C9FyPkqp.mjs';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-fHuxbqa4.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, a as ExtensionInfo, 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 ManifestI18nEntry, N as NOTIFICATION_EVENTS, G as NotificationEvent, J as PermissionDeniedError, K as PermissionErrorBase, L as PermissionErrorCode, O as PermissionPromptError, P as PermissionResponse, Q as PermissionStatus, R as SHELL_EVENTS, T as SearchQuery, U as SearchRequestEvent, S as SearchResult, V as ShellEvent, X as SyncTablesUpdatedEvent, Y as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, Z as getTableName, _ as isPermissionDeniedError, $ as isPermissionError, a0 as isPermissionPromptError } from './types-fHuxbqa4.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -122,6 +122,8 @@ declare const MAIL_COMMANDS: {
|
|
|
122
122
|
readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
|
|
123
123
|
/** Full message fetch (envelope + body + attachment metadata) */
|
|
124
124
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
125
|
+
/** Fetch a single attachment's bytes (base64) by part index */
|
|
126
|
+
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
125
127
|
/** Set or unset IMAP flags on a UID set */
|
|
126
128
|
readonly setFlags: "extension_mail_set_flags";
|
|
127
129
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -135,6 +137,26 @@ declare const MAIL_COMMANDS: {
|
|
|
135
137
|
};
|
|
136
138
|
type MailCommand = (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS];
|
|
137
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Notifications Commands
|
|
142
|
+
*
|
|
143
|
+
* Generic OS-notification bridge. Extensions can't fire OS notifications
|
|
144
|
+
* themselves (no host privileges), so they go through the vault. Every
|
|
145
|
+
* notification is pinned to the calling extension's public key by the host;
|
|
146
|
+
* deep-link clicks can only route back to a webview with that same key.
|
|
147
|
+
*
|
|
148
|
+
* Permission: `notifications` resource, action `show`, target `*`.
|
|
149
|
+
*
|
|
150
|
+
* Naming convention: `extension_notifications_<action>`
|
|
151
|
+
*/
|
|
152
|
+
declare const NOTIFICATION_COMMANDS: {
|
|
153
|
+
/** Show an OS notification. Returns the assigned notification id. */
|
|
154
|
+
readonly show: "extension_notifications_show";
|
|
155
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
156
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
157
|
+
};
|
|
158
|
+
type NotificationCommand = (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
159
|
+
|
|
138
160
|
/**
|
|
139
161
|
* Sync Server API Types
|
|
140
162
|
*
|
|
@@ -765,14 +787,19 @@ declare const TAURI_COMMANDS: {
|
|
|
765
787
|
readonly listMailboxes: "extension_mail_list_mailboxes";
|
|
766
788
|
readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
|
|
767
789
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
790
|
+
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
768
791
|
readonly setFlags: "extension_mail_set_flags";
|
|
769
792
|
readonly moveMessages: "extension_mail_move_messages";
|
|
770
793
|
readonly appendMessage: "extension_mail_append_message";
|
|
771
794
|
readonly sendMessage: "extension_mail_send_message";
|
|
772
795
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
773
796
|
};
|
|
797
|
+
readonly notifications: {
|
|
798
|
+
readonly show: "extension_notifications_show";
|
|
799
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
800
|
+
};
|
|
774
801
|
};
|
|
775
|
-
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 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];
|
|
802
|
+
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 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];
|
|
776
803
|
|
|
777
804
|
interface VerifyResult {
|
|
778
805
|
valid: boolean;
|
|
@@ -1093,4 +1120,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1093
1120
|
|
|
1094
1121
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1095
1122
|
|
|
1096
|
-
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, 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, type VerifyResult, type ZipFileEntry, 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, hexToBytes, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, sortObjectKeysRecursively, unwrapKey, verifyClaimPresentationAsync, verifyExtensionSignature, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
|
1123
|
+
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, 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, type VerifyResult, type ZipFileEntry, 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, hexToBytes, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, sortObjectKeysRecursively, unwrapKey, verifyClaimPresentationAsync, verifyExtensionSignature, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client
|
|
2
|
-
export { A as AuthorizedClient, B as BlockedClient, C as ConnectionSecurity, D as DatabaseAPI, a as DecryptedSpace, b as
|
|
3
|
-
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-
|
|
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, a as ExtensionInfo, 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 ManifestI18nEntry, G as
|
|
1
|
+
import { H as HaexVaultSdk } from './client--_QYySP0.js';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, C as ConnectionSecurity, D as DatabaseAPI, a as DecryptedSpace, b as DeepLink, c as Device, d as DeviceInfo, e as DeviceType, f as DirEntry, E as ExternalAuthDecision, g as ExternalConnection, h as ExternalConnectionErrorCode, i as ExternalConnectionState, j as ExternalRequest, k as ExternalRequestEvent, l as ExternalRequestHandler, m as ExternalRequestPayload, n as ExternalResponse, F as FileStat, o as FilesystemAPI, I as ImapConfig, K as KnownPath, p as KnownPaths, L as LOCALSEND_EVENTS, q as LocalSendAPI, r as LocalSendEvent, s as LocalSendFileInfo, t as LocalSendSettings, M as MailAPI, u as MailAccount, v as MailAddress, w as MailAttachment, x as MailFetchRange, y as MailMessage, z as MailboxInfo, G as MessageEnvelope, N as NotificationAction, J as NotificationClickEvent, O as NotificationOptions, P as NotificationsAPI, Q as OutgoingAttachment, R as OutgoingMessage, T as PasswordInput, U as PasswordItemFull, V as PasswordItemSummary, W as PasswordKeyValue, X as PasswordKeyValueInput, Y as PasswordsAPI, Z as PendingAuthorization, _ as PendingTransfer, $ as PermissionsAPI, a0 as RemoteAddBackendRequest, a1 as RemoteS3Config, a2 as RemoteS3PublicConfig, a3 as RemoteStorageAPI, a4 as RemoteStorageBackendInfo, a5 as RemoteStorageObjectInfo, a6 as RemoteUpdateBackendRequest, a7 as RequestedExtension, a8 as SelectFileOptions, a9 as SelectFolderOptions, aa as ServerInfo, ab as ServerStatus, ac as SessionAuthorization, ad as SharedSpace, ae as ShellAPI, af as ShellCreateOptions, ag as ShellCreateResponse, ah as ShellExitEvent, ai as ShellOutputEvent, aj as SmtpConfig, ak as SpaceAccessTokenInfo, al as SpaceAssignment, am as SpaceInvite, an as SpaceKeyGrantInfo, ao as SpaceMemberInfo, ap as SpacesAPI, aq as SyncBackendInfo, ar as TransferDirection, as as TransferProgress, at as TransferState, au as WebAPI, av as canExternalClientSendRequests, aw as isExternalClientConnected } from './client--_QYySP0.js';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-fHuxbqa4.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, a as ExtensionInfo, 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 ManifestI18nEntry, N as NOTIFICATION_EVENTS, G as NotificationEvent, J as PermissionDeniedError, K as PermissionErrorBase, L as PermissionErrorCode, O as PermissionPromptError, P as PermissionResponse, Q as PermissionStatus, R as SHELL_EVENTS, T as SearchQuery, U as SearchRequestEvent, S as SearchResult, V as ShellEvent, X as SyncTablesUpdatedEvent, Y as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, Z as getTableName, _ as isPermissionDeniedError, $ as isPermissionError, a0 as isPermissionPromptError } from './types-fHuxbqa4.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -122,6 +122,8 @@ declare const MAIL_COMMANDS: {
|
|
|
122
122
|
readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
|
|
123
123
|
/** Full message fetch (envelope + body + attachment metadata) */
|
|
124
124
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
125
|
+
/** Fetch a single attachment's bytes (base64) by part index */
|
|
126
|
+
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
125
127
|
/** Set or unset IMAP flags on a UID set */
|
|
126
128
|
readonly setFlags: "extension_mail_set_flags";
|
|
127
129
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -135,6 +137,26 @@ declare const MAIL_COMMANDS: {
|
|
|
135
137
|
};
|
|
136
138
|
type MailCommand = (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS];
|
|
137
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Notifications Commands
|
|
142
|
+
*
|
|
143
|
+
* Generic OS-notification bridge. Extensions can't fire OS notifications
|
|
144
|
+
* themselves (no host privileges), so they go through the vault. Every
|
|
145
|
+
* notification is pinned to the calling extension's public key by the host;
|
|
146
|
+
* deep-link clicks can only route back to a webview with that same key.
|
|
147
|
+
*
|
|
148
|
+
* Permission: `notifications` resource, action `show`, target `*`.
|
|
149
|
+
*
|
|
150
|
+
* Naming convention: `extension_notifications_<action>`
|
|
151
|
+
*/
|
|
152
|
+
declare const NOTIFICATION_COMMANDS: {
|
|
153
|
+
/** Show an OS notification. Returns the assigned notification id. */
|
|
154
|
+
readonly show: "extension_notifications_show";
|
|
155
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
156
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
157
|
+
};
|
|
158
|
+
type NotificationCommand = (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
159
|
+
|
|
138
160
|
/**
|
|
139
161
|
* Sync Server API Types
|
|
140
162
|
*
|
|
@@ -765,14 +787,19 @@ declare const TAURI_COMMANDS: {
|
|
|
765
787
|
readonly listMailboxes: "extension_mail_list_mailboxes";
|
|
766
788
|
readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
|
|
767
789
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
790
|
+
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
768
791
|
readonly setFlags: "extension_mail_set_flags";
|
|
769
792
|
readonly moveMessages: "extension_mail_move_messages";
|
|
770
793
|
readonly appendMessage: "extension_mail_append_message";
|
|
771
794
|
readonly sendMessage: "extension_mail_send_message";
|
|
772
795
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
773
796
|
};
|
|
797
|
+
readonly notifications: {
|
|
798
|
+
readonly show: "extension_notifications_show";
|
|
799
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
800
|
+
};
|
|
774
801
|
};
|
|
775
|
-
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 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];
|
|
802
|
+
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 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];
|
|
776
803
|
|
|
777
804
|
interface VerifyResult {
|
|
778
805
|
valid: boolean;
|
|
@@ -1093,4 +1120,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1093
1120
|
|
|
1094
1121
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1095
1122
|
|
|
1096
|
-
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, type HaexspaceMessageType, type InviteMemberRequest, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, type MailCommand, 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, type VerifyResult, type ZipFileEntry, 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, hexToBytes, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, sortObjectKeysRecursively, unwrapKey, verifyClaimPresentationAsync, verifyExtensionSignature, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
|
1123
|
+
export { type AuthUser, COSE_ALGORITHM, type CoseAlgorithm, type CreateSpaceRequest, type ExportedPasskeyKeyPair, type ExportedUserKeypair, ExtensionManifest, 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, type VerifyResult, type ZipFileEntry, 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, hexToBytes, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, sortObjectKeysRecursively, unwrapKey, verifyClaimPresentationAsync, verifyExtensionSignature, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
package/dist/index.js
CHANGED
|
@@ -717,6 +717,10 @@ var HAEXTENSION_EVENTS = {
|
|
|
717
717
|
* subscribe via `client.on(HAEXTENSION_EVENTS.PERMISSION_RESOLVED, ...)`. */
|
|
718
718
|
PERMISSION_RESOLVED: "extension:permission-resolved"
|
|
719
719
|
};
|
|
720
|
+
var NOTIFICATION_EVENTS = {
|
|
721
|
+
/** A click on one of this extension's notifications (body or action button). */
|
|
722
|
+
CLICK: "haextension:notification:click"
|
|
723
|
+
};
|
|
720
724
|
var EXTERNAL_EVENTS = {
|
|
721
725
|
/** External request from authorized client */
|
|
722
726
|
REQUEST: "haextension:external:request",
|
|
@@ -1075,6 +1079,8 @@ var MAIL_COMMANDS = {
|
|
|
1075
1079
|
fetchEnvelopes: "extension_mail_fetch_envelopes",
|
|
1076
1080
|
/** Full message fetch (envelope + body + attachment metadata) */
|
|
1077
1081
|
fetchMessage: "extension_mail_fetch_message",
|
|
1082
|
+
/** Fetch a single attachment's bytes (base64) by part index */
|
|
1083
|
+
fetchAttachment: "extension_mail_fetch_attachment",
|
|
1078
1084
|
/** Set or unset IMAP flags on a UID set */
|
|
1079
1085
|
setFlags: "extension_mail_set_flags",
|
|
1080
1086
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -1087,6 +1093,14 @@ var MAIL_COMMANDS = {
|
|
|
1087
1093
|
buildRfc822: "extension_mail_build_rfc822"
|
|
1088
1094
|
};
|
|
1089
1095
|
|
|
1096
|
+
// src/commands/notifications.ts
|
|
1097
|
+
var NOTIFICATION_COMMANDS = {
|
|
1098
|
+
/** Show an OS notification. Returns the assigned notification id. */
|
|
1099
|
+
show: "extension_notifications_show",
|
|
1100
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
1101
|
+
dismiss: "extension_notifications_dismiss"
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1090
1104
|
// src/commands/index.ts
|
|
1091
1105
|
var TAURI_COMMANDS = {
|
|
1092
1106
|
database: DATABASE_COMMANDS,
|
|
@@ -1101,7 +1115,8 @@ var TAURI_COMMANDS = {
|
|
|
1101
1115
|
spaces: SPACE_COMMANDS,
|
|
1102
1116
|
shell: SHELL_COMMANDS,
|
|
1103
1117
|
passwords: PASSWORD_COMMANDS,
|
|
1104
|
-
mail: MAIL_COMMANDS
|
|
1118
|
+
mail: MAIL_COMMANDS,
|
|
1119
|
+
notifications: NOTIFICATION_COMMANDS
|
|
1105
1120
|
};
|
|
1106
1121
|
|
|
1107
1122
|
// src/api/storage.ts
|
|
@@ -2132,6 +2147,21 @@ var MailAPI = class {
|
|
|
2132
2147
|
uid
|
|
2133
2148
|
});
|
|
2134
2149
|
}
|
|
2150
|
+
/**
|
|
2151
|
+
* Fetch a single attachment's raw bytes by its `partIndex` (from the
|
|
2152
|
+
* `attachments` array of a fetched `MailMessage`), returned as a
|
|
2153
|
+
* standard-alphabet base64 string. The base64 form drops straight into
|
|
2154
|
+
* `OutgoingAttachment.data` when forwarding, and decodes to bytes for
|
|
2155
|
+
* viewing or downloading.
|
|
2156
|
+
*/
|
|
2157
|
+
async fetchAttachmentAsync(imap, mailbox, uid, partIndex) {
|
|
2158
|
+
return this.client.request(MAIL_COMMANDS.fetchAttachment, {
|
|
2159
|
+
imap,
|
|
2160
|
+
mailbox,
|
|
2161
|
+
uid,
|
|
2162
|
+
partIndex
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2135
2165
|
/**
|
|
2136
2166
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
2137
2167
|
* mark messages as read; `add=false` removes the flag(s).
|
|
@@ -2187,6 +2217,38 @@ var MailAPI = class {
|
|
|
2187
2217
|
}
|
|
2188
2218
|
};
|
|
2189
2219
|
|
|
2220
|
+
// src/api/notifications.ts
|
|
2221
|
+
var NotificationsAPI = class {
|
|
2222
|
+
constructor(client) {
|
|
2223
|
+
this.client = client;
|
|
2224
|
+
}
|
|
2225
|
+
/** Show a notification. Returns its id so it can be dismissed later. */
|
|
2226
|
+
async show(opts) {
|
|
2227
|
+
return this.client.request(NOTIFICATION_COMMANDS.show, {
|
|
2228
|
+
options: opts
|
|
2229
|
+
});
|
|
2230
|
+
}
|
|
2231
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
2232
|
+
async dismiss(id) {
|
|
2233
|
+
return this.client.request(NOTIFICATION_COMMANDS.dismiss, { id });
|
|
2234
|
+
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Listen for clicks on this extension's notifications. Useful when the
|
|
2237
|
+
* extension is already open and wants to react in-app (e.g. router.push the
|
|
2238
|
+
* `path`) instead of relying on the host to focus the webview.
|
|
2239
|
+
*
|
|
2240
|
+
* Returns an unsubscribe function.
|
|
2241
|
+
*/
|
|
2242
|
+
onClick(handler) {
|
|
2243
|
+
const wrapped = (event) => {
|
|
2244
|
+
const data = event.data;
|
|
2245
|
+
if (data) handler(data);
|
|
2246
|
+
};
|
|
2247
|
+
this.client.on(NOTIFICATION_EVENTS.CLICK, wrapped);
|
|
2248
|
+
return () => this.client.off(NOTIFICATION_EVENTS.CLICK, wrapped);
|
|
2249
|
+
}
|
|
2250
|
+
};
|
|
2251
|
+
|
|
2190
2252
|
// src/client/tableName.ts
|
|
2191
2253
|
function validatePublicKey(publicKey) {
|
|
2192
2254
|
if (!publicKey || typeof publicKey !== "string" || publicKey.trim() === "") {
|
|
@@ -2354,6 +2416,7 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
2354
2416
|
HAEXTENSION_EVENTS.PERMISSION_RESOLVED,
|
|
2355
2417
|
EXTERNAL_EVENTS.REQUEST,
|
|
2356
2418
|
EXTERNAL_EVENTS.ACTION_REQUEST,
|
|
2419
|
+
NOTIFICATION_EVENTS.CLICK,
|
|
2357
2420
|
...Object.values(LOCALSEND_EVENTS)
|
|
2358
2421
|
]) {
|
|
2359
2422
|
await forwardEvent(listen, log, onEvent, listenOptions, eventName);
|
|
@@ -2829,6 +2892,7 @@ var HaexVaultSdk = class {
|
|
|
2829
2892
|
this.shell = new ShellAPI(this);
|
|
2830
2893
|
this.passwords = new PasswordsAPI(this);
|
|
2831
2894
|
this.mail = new MailAPI(this);
|
|
2895
|
+
this.notifications = new NotificationsAPI(this);
|
|
2832
2896
|
installConsoleForwarding(this.config.debug);
|
|
2833
2897
|
this.on(HAEXTENSION_EVENTS.PERMISSION_RESOLVED, (event) => {
|
|
2834
2898
|
const data = event.data;
|
|
@@ -3784,6 +3848,9 @@ exports.LOCALSEND_EVENTS = LOCALSEND_EVENTS;
|
|
|
3784
3848
|
exports.LocalSendAPI = LocalSendAPI;
|
|
3785
3849
|
exports.MAIL_COMMANDS = MAIL_COMMANDS;
|
|
3786
3850
|
exports.MailAPI = MailAPI;
|
|
3851
|
+
exports.NOTIFICATION_COMMANDS = NOTIFICATION_COMMANDS;
|
|
3852
|
+
exports.NOTIFICATION_EVENTS = NOTIFICATION_EVENTS;
|
|
3853
|
+
exports.NotificationsAPI = NotificationsAPI;
|
|
3787
3854
|
exports.PASSWORD_COMMANDS = PASSWORD_COMMANDS;
|
|
3788
3855
|
exports.PasswordsAPI = PasswordsAPI;
|
|
3789
3856
|
exports.PermissionErrorCode = PermissionErrorCode;
|