@haex-space/vault-sdk 3.2.8 → 3.3.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-BW3ayV19.d.mts} +82 -2
- package/dist/{client-DaS2fAf-.d.mts → client-Cm23j1wm.d.ts} +82 -2
- package/dist/index.d.mts +30 -6
- package/dist/index.d.ts +30 -6
- package/dist/index.js +51 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -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 +46 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +46 -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 +46 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +46 -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 +46 -0
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +46 -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 +46 -0
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +46 -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.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1449,6 +1449,85 @@ declare class MailAPI {
|
|
|
1449
1449
|
buildRfc822Async(imapHost: string, message: OutgoingMessage): Promise<string>;
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
|
+
/**
|
|
1453
|
+
* A deep link into the calling extension. `path` is an extension-internal
|
|
1454
|
+
* route (e.g. "/event/abc-123" or "/inbox/msg/xyz").
|
|
1455
|
+
*
|
|
1456
|
+
* The notification carrying this link is pinned to the calling extension's
|
|
1457
|
+
* public key by the host. Clicks can only route to webviews with that same
|
|
1458
|
+
* public key — there is intentionally no `extensionId` field, so notifications
|
|
1459
|
+
* can never deep-link into a *different* extension.
|
|
1460
|
+
*/
|
|
1461
|
+
type DeepLink = {
|
|
1462
|
+
path: string;
|
|
1463
|
+
};
|
|
1464
|
+
/** An action button on a notification. */
|
|
1465
|
+
type NotificationAction = {
|
|
1466
|
+
/** Stable id, returned in the click event. */
|
|
1467
|
+
id: string;
|
|
1468
|
+
/** Button text (the caller localises it). */
|
|
1469
|
+
label: string;
|
|
1470
|
+
/** Where a click on this button routes. */
|
|
1471
|
+
deepLink: DeepLink;
|
|
1472
|
+
};
|
|
1473
|
+
type NotificationOptions = {
|
|
1474
|
+
title: string;
|
|
1475
|
+
body?: string;
|
|
1476
|
+
/** Optional icon override; default = the extension's manifest icon. */
|
|
1477
|
+
icon?: string;
|
|
1478
|
+
/** Click on the notification body → navigate here. */
|
|
1479
|
+
primary?: DeepLink;
|
|
1480
|
+
/**
|
|
1481
|
+
* Up to 3 action buttons (platform-dependent; extra buttons and, on some
|
|
1482
|
+
* platforms, all buttons degrade silently — the `primary` link still works).
|
|
1483
|
+
*/
|
|
1484
|
+
actions?: NotificationAction[];
|
|
1485
|
+
/** Dedupe key — showing again with the same tag replaces the previous one. */
|
|
1486
|
+
tag?: string;
|
|
1487
|
+
};
|
|
1488
|
+
/** Payload delivered to {@link NotificationsAPI.onClick} handlers. */
|
|
1489
|
+
type NotificationClickEvent = {
|
|
1490
|
+
/** Id of the clicked notification (the value returned by `show`). */
|
|
1491
|
+
notificationId: string;
|
|
1492
|
+
/** Id of the clicked action button, or undefined for a body click. */
|
|
1493
|
+
actionId?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Resolved deep-link path for the click (the `primary` path for a body
|
|
1496
|
+
* click, or the action's `deepLink.path`), if one was set.
|
|
1497
|
+
*/
|
|
1498
|
+
path?: string;
|
|
1499
|
+
};
|
|
1500
|
+
/**
|
|
1501
|
+
* Generic OS notifications, bridged through the host vault.
|
|
1502
|
+
*
|
|
1503
|
+
* Permission model: requires the `notifications` permission with action
|
|
1504
|
+
* `show`. The host assigns and pins the extension's public key on every
|
|
1505
|
+
* `show()` — the extension never supplies or sees its key here.
|
|
1506
|
+
*
|
|
1507
|
+
* Platform reality (the notification itself always shows; routing varies):
|
|
1508
|
+
* - Click → deep-link routing and action buttons depend on the host's OS
|
|
1509
|
+
* notification backend. Where the backend reports no click, the body and
|
|
1510
|
+
* buttons simply don't route; the notification is still displayed.
|
|
1511
|
+
*/
|
|
1512
|
+
declare class NotificationsAPI {
|
|
1513
|
+
private client;
|
|
1514
|
+
constructor(client: HaexVaultSdk);
|
|
1515
|
+
/** Show a notification. Returns its id so it can be dismissed later. */
|
|
1516
|
+
show(opts: NotificationOptions): Promise<{
|
|
1517
|
+
id: string;
|
|
1518
|
+
}>;
|
|
1519
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
1520
|
+
dismiss(id: string): Promise<void>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Listen for clicks on this extension's notifications. Useful when the
|
|
1523
|
+
* extension is already open and wants to react in-app (e.g. router.push the
|
|
1524
|
+
* `path`) instead of relying on the host to focus the webview.
|
|
1525
|
+
*
|
|
1526
|
+
* Returns an unsubscribe function.
|
|
1527
|
+
*/
|
|
1528
|
+
onClick(handler: (e: NotificationClickEvent) => void): () => void;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1452
1531
|
/**
|
|
1453
1532
|
* HaexVault Client
|
|
1454
1533
|
*
|
|
@@ -1494,6 +1573,7 @@ declare class HaexVaultSdk {
|
|
|
1494
1573
|
readonly shell: ShellAPI;
|
|
1495
1574
|
readonly passwords: PasswordsAPI;
|
|
1496
1575
|
readonly mail: MailAPI;
|
|
1576
|
+
readonly notifications: NotificationsAPI;
|
|
1497
1577
|
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1498
1578
|
readonly actions: {
|
|
1499
1579
|
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
@@ -1542,4 +1622,4 @@ declare class HaexVaultSdk {
|
|
|
1542
1622
|
private log;
|
|
1543
1623
|
}
|
|
1544
1624
|
|
|
1545
|
-
export {
|
|
1625
|
+
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.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1449,6 +1449,85 @@ declare class MailAPI {
|
|
|
1449
1449
|
buildRfc822Async(imapHost: string, message: OutgoingMessage): Promise<string>;
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
|
+
/**
|
|
1453
|
+
* A deep link into the calling extension. `path` is an extension-internal
|
|
1454
|
+
* route (e.g. "/event/abc-123" or "/inbox/msg/xyz").
|
|
1455
|
+
*
|
|
1456
|
+
* The notification carrying this link is pinned to the calling extension's
|
|
1457
|
+
* public key by the host. Clicks can only route to webviews with that same
|
|
1458
|
+
* public key — there is intentionally no `extensionId` field, so notifications
|
|
1459
|
+
* can never deep-link into a *different* extension.
|
|
1460
|
+
*/
|
|
1461
|
+
type DeepLink = {
|
|
1462
|
+
path: string;
|
|
1463
|
+
};
|
|
1464
|
+
/** An action button on a notification. */
|
|
1465
|
+
type NotificationAction = {
|
|
1466
|
+
/** Stable id, returned in the click event. */
|
|
1467
|
+
id: string;
|
|
1468
|
+
/** Button text (the caller localises it). */
|
|
1469
|
+
label: string;
|
|
1470
|
+
/** Where a click on this button routes. */
|
|
1471
|
+
deepLink: DeepLink;
|
|
1472
|
+
};
|
|
1473
|
+
type NotificationOptions = {
|
|
1474
|
+
title: string;
|
|
1475
|
+
body?: string;
|
|
1476
|
+
/** Optional icon override; default = the extension's manifest icon. */
|
|
1477
|
+
icon?: string;
|
|
1478
|
+
/** Click on the notification body → navigate here. */
|
|
1479
|
+
primary?: DeepLink;
|
|
1480
|
+
/**
|
|
1481
|
+
* Up to 3 action buttons (platform-dependent; extra buttons and, on some
|
|
1482
|
+
* platforms, all buttons degrade silently — the `primary` link still works).
|
|
1483
|
+
*/
|
|
1484
|
+
actions?: NotificationAction[];
|
|
1485
|
+
/** Dedupe key — showing again with the same tag replaces the previous one. */
|
|
1486
|
+
tag?: string;
|
|
1487
|
+
};
|
|
1488
|
+
/** Payload delivered to {@link NotificationsAPI.onClick} handlers. */
|
|
1489
|
+
type NotificationClickEvent = {
|
|
1490
|
+
/** Id of the clicked notification (the value returned by `show`). */
|
|
1491
|
+
notificationId: string;
|
|
1492
|
+
/** Id of the clicked action button, or undefined for a body click. */
|
|
1493
|
+
actionId?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Resolved deep-link path for the click (the `primary` path for a body
|
|
1496
|
+
* click, or the action's `deepLink.path`), if one was set.
|
|
1497
|
+
*/
|
|
1498
|
+
path?: string;
|
|
1499
|
+
};
|
|
1500
|
+
/**
|
|
1501
|
+
* Generic OS notifications, bridged through the host vault.
|
|
1502
|
+
*
|
|
1503
|
+
* Permission model: requires the `notifications` permission with action
|
|
1504
|
+
* `show`. The host assigns and pins the extension's public key on every
|
|
1505
|
+
* `show()` — the extension never supplies or sees its key here.
|
|
1506
|
+
*
|
|
1507
|
+
* Platform reality (the notification itself always shows; routing varies):
|
|
1508
|
+
* - Click → deep-link routing and action buttons depend on the host's OS
|
|
1509
|
+
* notification backend. Where the backend reports no click, the body and
|
|
1510
|
+
* buttons simply don't route; the notification is still displayed.
|
|
1511
|
+
*/
|
|
1512
|
+
declare class NotificationsAPI {
|
|
1513
|
+
private client;
|
|
1514
|
+
constructor(client: HaexVaultSdk);
|
|
1515
|
+
/** Show a notification. Returns its id so it can be dismissed later. */
|
|
1516
|
+
show(opts: NotificationOptions): Promise<{
|
|
1517
|
+
id: string;
|
|
1518
|
+
}>;
|
|
1519
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
1520
|
+
dismiss(id: string): Promise<void>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Listen for clicks on this extension's notifications. Useful when the
|
|
1523
|
+
* extension is already open and wants to react in-app (e.g. router.push the
|
|
1524
|
+
* `path`) instead of relying on the host to focus the webview.
|
|
1525
|
+
*
|
|
1526
|
+
* Returns an unsubscribe function.
|
|
1527
|
+
*/
|
|
1528
|
+
onClick(handler: (e: NotificationClickEvent) => void): () => void;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1452
1531
|
/**
|
|
1453
1532
|
* HaexVault Client
|
|
1454
1533
|
*
|
|
@@ -1494,6 +1573,7 @@ declare class HaexVaultSdk {
|
|
|
1494
1573
|
readonly shell: ShellAPI;
|
|
1495
1574
|
readonly passwords: PasswordsAPI;
|
|
1496
1575
|
readonly mail: MailAPI;
|
|
1576
|
+
readonly notifications: NotificationsAPI;
|
|
1497
1577
|
/** Unified action system - register handlers that work for both Bridge and AI requests */
|
|
1498
1578
|
readonly actions: {
|
|
1499
1579
|
register: (action: string, handler: ExternalRequestHandler) => (() => void);
|
|
@@ -1542,4 +1622,4 @@ declare class HaexVaultSdk {
|
|
|
1542
1622
|
private log;
|
|
1543
1623
|
}
|
|
1544
1624
|
|
|
1545
|
-
export {
|
|
1625
|
+
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-BW3ayV19.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-BW3ayV19.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
|
|
|
@@ -135,6 +135,26 @@ declare const MAIL_COMMANDS: {
|
|
|
135
135
|
};
|
|
136
136
|
type MailCommand = (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS];
|
|
137
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Notifications Commands
|
|
140
|
+
*
|
|
141
|
+
* Generic OS-notification bridge. Extensions can't fire OS notifications
|
|
142
|
+
* themselves (no host privileges), so they go through the vault. Every
|
|
143
|
+
* notification is pinned to the calling extension's public key by the host;
|
|
144
|
+
* deep-link clicks can only route back to a webview with that same key.
|
|
145
|
+
*
|
|
146
|
+
* Permission: `notifications` resource, action `show`, target `*`.
|
|
147
|
+
*
|
|
148
|
+
* Naming convention: `extension_notifications_<action>`
|
|
149
|
+
*/
|
|
150
|
+
declare const NOTIFICATION_COMMANDS: {
|
|
151
|
+
/** Show an OS notification. Returns the assigned notification id. */
|
|
152
|
+
readonly show: "extension_notifications_show";
|
|
153
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
154
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
155
|
+
};
|
|
156
|
+
type NotificationCommand = (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
157
|
+
|
|
138
158
|
/**
|
|
139
159
|
* Sync Server API Types
|
|
140
160
|
*
|
|
@@ -771,8 +791,12 @@ declare const TAURI_COMMANDS: {
|
|
|
771
791
|
readonly sendMessage: "extension_mail_send_message";
|
|
772
792
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
773
793
|
};
|
|
794
|
+
readonly notifications: {
|
|
795
|
+
readonly show: "extension_notifications_show";
|
|
796
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
797
|
+
};
|
|
774
798
|
};
|
|
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];
|
|
799
|
+
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
800
|
|
|
777
801
|
interface VerifyResult {
|
|
778
802
|
valid: boolean;
|
|
@@ -1093,4 +1117,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1093
1117
|
|
|
1094
1118
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1095
1119
|
|
|
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 };
|
|
1120
|
+
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-Cm23j1wm.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-Cm23j1wm.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
|
|
|
@@ -135,6 +135,26 @@ declare const MAIL_COMMANDS: {
|
|
|
135
135
|
};
|
|
136
136
|
type MailCommand = (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS];
|
|
137
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Notifications Commands
|
|
140
|
+
*
|
|
141
|
+
* Generic OS-notification bridge. Extensions can't fire OS notifications
|
|
142
|
+
* themselves (no host privileges), so they go through the vault. Every
|
|
143
|
+
* notification is pinned to the calling extension's public key by the host;
|
|
144
|
+
* deep-link clicks can only route back to a webview with that same key.
|
|
145
|
+
*
|
|
146
|
+
* Permission: `notifications` resource, action `show`, target `*`.
|
|
147
|
+
*
|
|
148
|
+
* Naming convention: `extension_notifications_<action>`
|
|
149
|
+
*/
|
|
150
|
+
declare const NOTIFICATION_COMMANDS: {
|
|
151
|
+
/** Show an OS notification. Returns the assigned notification id. */
|
|
152
|
+
readonly show: "extension_notifications_show";
|
|
153
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
154
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
155
|
+
};
|
|
156
|
+
type NotificationCommand = (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
157
|
+
|
|
138
158
|
/**
|
|
139
159
|
* Sync Server API Types
|
|
140
160
|
*
|
|
@@ -771,8 +791,12 @@ declare const TAURI_COMMANDS: {
|
|
|
771
791
|
readonly sendMessage: "extension_mail_send_message";
|
|
772
792
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
773
793
|
};
|
|
794
|
+
readonly notifications: {
|
|
795
|
+
readonly show: "extension_notifications_show";
|
|
796
|
+
readonly dismiss: "extension_notifications_dismiss";
|
|
797
|
+
};
|
|
774
798
|
};
|
|
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];
|
|
799
|
+
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
800
|
|
|
777
801
|
interface VerifyResult {
|
|
778
802
|
valid: boolean;
|
|
@@ -1093,4 +1117,4 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1093
1117
|
|
|
1094
1118
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1095
1119
|
|
|
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 };
|
|
1120
|
+
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",
|
|
@@ -1087,6 +1091,14 @@ var MAIL_COMMANDS = {
|
|
|
1087
1091
|
buildRfc822: "extension_mail_build_rfc822"
|
|
1088
1092
|
};
|
|
1089
1093
|
|
|
1094
|
+
// src/commands/notifications.ts
|
|
1095
|
+
var NOTIFICATION_COMMANDS = {
|
|
1096
|
+
/** Show an OS notification. Returns the assigned notification id. */
|
|
1097
|
+
show: "extension_notifications_show",
|
|
1098
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
1099
|
+
dismiss: "extension_notifications_dismiss"
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1090
1102
|
// src/commands/index.ts
|
|
1091
1103
|
var TAURI_COMMANDS = {
|
|
1092
1104
|
database: DATABASE_COMMANDS,
|
|
@@ -1101,7 +1113,8 @@ var TAURI_COMMANDS = {
|
|
|
1101
1113
|
spaces: SPACE_COMMANDS,
|
|
1102
1114
|
shell: SHELL_COMMANDS,
|
|
1103
1115
|
passwords: PASSWORD_COMMANDS,
|
|
1104
|
-
mail: MAIL_COMMANDS
|
|
1116
|
+
mail: MAIL_COMMANDS,
|
|
1117
|
+
notifications: NOTIFICATION_COMMANDS
|
|
1105
1118
|
};
|
|
1106
1119
|
|
|
1107
1120
|
// src/api/storage.ts
|
|
@@ -2187,6 +2200,38 @@ var MailAPI = class {
|
|
|
2187
2200
|
}
|
|
2188
2201
|
};
|
|
2189
2202
|
|
|
2203
|
+
// src/api/notifications.ts
|
|
2204
|
+
var NotificationsAPI = class {
|
|
2205
|
+
constructor(client) {
|
|
2206
|
+
this.client = client;
|
|
2207
|
+
}
|
|
2208
|
+
/** Show a notification. Returns its id so it can be dismissed later. */
|
|
2209
|
+
async show(opts) {
|
|
2210
|
+
return this.client.request(NOTIFICATION_COMMANDS.show, {
|
|
2211
|
+
options: opts
|
|
2212
|
+
});
|
|
2213
|
+
}
|
|
2214
|
+
/** Dismiss a previously shown notification (only own notifications). */
|
|
2215
|
+
async dismiss(id) {
|
|
2216
|
+
return this.client.request(NOTIFICATION_COMMANDS.dismiss, { id });
|
|
2217
|
+
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Listen for clicks on this extension's notifications. Useful when the
|
|
2220
|
+
* extension is already open and wants to react in-app (e.g. router.push the
|
|
2221
|
+
* `path`) instead of relying on the host to focus the webview.
|
|
2222
|
+
*
|
|
2223
|
+
* Returns an unsubscribe function.
|
|
2224
|
+
*/
|
|
2225
|
+
onClick(handler) {
|
|
2226
|
+
const wrapped = (event) => {
|
|
2227
|
+
const data = event.data;
|
|
2228
|
+
if (data) handler(data);
|
|
2229
|
+
};
|
|
2230
|
+
this.client.on(NOTIFICATION_EVENTS.CLICK, wrapped);
|
|
2231
|
+
return () => this.client.off(NOTIFICATION_EVENTS.CLICK, wrapped);
|
|
2232
|
+
}
|
|
2233
|
+
};
|
|
2234
|
+
|
|
2190
2235
|
// src/client/tableName.ts
|
|
2191
2236
|
function validatePublicKey(publicKey) {
|
|
2192
2237
|
if (!publicKey || typeof publicKey !== "string" || publicKey.trim() === "") {
|
|
@@ -2354,6 +2399,7 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
2354
2399
|
HAEXTENSION_EVENTS.PERMISSION_RESOLVED,
|
|
2355
2400
|
EXTERNAL_EVENTS.REQUEST,
|
|
2356
2401
|
EXTERNAL_EVENTS.ACTION_REQUEST,
|
|
2402
|
+
NOTIFICATION_EVENTS.CLICK,
|
|
2357
2403
|
...Object.values(LOCALSEND_EVENTS)
|
|
2358
2404
|
]) {
|
|
2359
2405
|
await forwardEvent(listen, log, onEvent, listenOptions, eventName);
|
|
@@ -2829,6 +2875,7 @@ var HaexVaultSdk = class {
|
|
|
2829
2875
|
this.shell = new ShellAPI(this);
|
|
2830
2876
|
this.passwords = new PasswordsAPI(this);
|
|
2831
2877
|
this.mail = new MailAPI(this);
|
|
2878
|
+
this.notifications = new NotificationsAPI(this);
|
|
2832
2879
|
installConsoleForwarding(this.config.debug);
|
|
2833
2880
|
this.on(HAEXTENSION_EVENTS.PERMISSION_RESOLVED, (event) => {
|
|
2834
2881
|
const data = event.data;
|
|
@@ -3784,6 +3831,9 @@ exports.LOCALSEND_EVENTS = LOCALSEND_EVENTS;
|
|
|
3784
3831
|
exports.LocalSendAPI = LocalSendAPI;
|
|
3785
3832
|
exports.MAIL_COMMANDS = MAIL_COMMANDS;
|
|
3786
3833
|
exports.MailAPI = MailAPI;
|
|
3834
|
+
exports.NOTIFICATION_COMMANDS = NOTIFICATION_COMMANDS;
|
|
3835
|
+
exports.NOTIFICATION_EVENTS = NOTIFICATION_EVENTS;
|
|
3836
|
+
exports.NotificationsAPI = NotificationsAPI;
|
|
3787
3837
|
exports.PASSWORD_COMMANDS = PASSWORD_COMMANDS;
|
|
3788
3838
|
exports.PasswordsAPI = PasswordsAPI;
|
|
3789
3839
|
exports.PermissionErrorCode = PermissionErrorCode;
|