@haex-space/vault-sdk 3.5.1 → 3.7.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-DCoY4f3Q.d.mts → client-DH4Km77u.d.ts} +45 -2
- package/dist/{client-mcuC3gP5.d.ts → client-Dn4AbXbT.d.mts} +45 -2
- package/dist/index.d.mts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +55 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -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 +54 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +54 -1
- 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 +54 -1
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +54 -1
- 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 +54 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +54 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-fHuxbqa4.d.mts → types-DQZCRfC-.d.mts} +9 -1
- package/dist/{types-fHuxbqa4.d.ts → types-DQZCRfC-.d.ts} +9 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +54 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +54 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,14 @@ declare const SHELL_EVENTS: {
|
|
|
57
57
|
readonly EXIT: "shell:exit";
|
|
58
58
|
};
|
|
59
59
|
type ShellEvent = typeof SHELL_EVENTS[keyof typeof SHELL_EVENTS];
|
|
60
|
+
/**
|
|
61
|
+
* Events for background mail-poll watches (`mail.startWatchingAsync`).
|
|
62
|
+
*/
|
|
63
|
+
declare const MAIL_EVENTS: {
|
|
64
|
+
/** A watched mailbox's UID high-water mark advanced — new mail arrived. */
|
|
65
|
+
readonly NEW_MESSAGES: "mail:new-messages";
|
|
66
|
+
};
|
|
67
|
+
type MailEvent = typeof MAIL_EVENTS[keyof typeof MAIL_EVENTS];
|
|
60
68
|
|
|
61
69
|
declare const DEFAULT_TIMEOUT = 30000;
|
|
62
70
|
declare const TABLE_SEPARATOR = "__";
|
|
@@ -407,4 +415,4 @@ declare class HaexVaultSdkError extends Error {
|
|
|
407
415
|
};
|
|
408
416
|
}
|
|
409
417
|
|
|
410
|
-
export {
|
|
418
|
+
export { getTableName as $, type ApplicationContext as A, MAIL_EVENTS as B, type ClaimRequirement as C, type DatabaseQueryResult as D, type ExtensionManifest as E, type FileChangeEvent as F, type MailEvent as G, type HaexHubConfig as H, type IdentityClaim as I, type ManifestI18nEntry as J, type NotificationEvent as K, type PermissionDeniedError as L, type Migration as M, NOTIFICATION_EVENTS as N, type PermissionErrorBase as O, type PermissionResponse as P, PermissionErrorCode as Q, type PermissionPromptError as R, type SearchResult as S, PermissionStatus as T, SHELL_EVENTS as U, type SearchQuery as V, type WebRequestOptions as W, type SearchRequestEvent as X, type ShellEvent as Y, type SyncTablesUpdatedEvent as Z, TABLE_SEPARATOR as _, type ExtensionInfo as a, isPermissionDeniedError as a0, isPermissionError as a1, isPermissionPromptError as a2, type HaexHubEvent as b, EXTERNAL_EVENTS as c, type MigrationResult as d, type WebResponse as e, type EventCallback as f, type DatabasePermissionRequest as g, type SignedClaimPresentation as h, type ContextChangedEvent as i, DEFAULT_TIMEOUT as j, type DatabaseColumnInfo as k, type DatabaseExecuteParams as l, type DatabasePermission as m, type DatabaseQueryParams as n, type DatabaseTableInfo as o, ErrorCode as p, type ExtensionRuntimeMode as q, type ExternalEvent as r, type FileChangePayload as s, type FileChangeType as t, type FilteredSyncTablesResult as u, HAEXTENSION_EVENTS as v, type HaexHubRequest as w, type HaexHubResponse as x, HaexVaultSdkError as y, type HaextensionEvent as z };
|
|
@@ -57,6 +57,14 @@ declare const SHELL_EVENTS: {
|
|
|
57
57
|
readonly EXIT: "shell:exit";
|
|
58
58
|
};
|
|
59
59
|
type ShellEvent = typeof SHELL_EVENTS[keyof typeof SHELL_EVENTS];
|
|
60
|
+
/**
|
|
61
|
+
* Events for background mail-poll watches (`mail.startWatchingAsync`).
|
|
62
|
+
*/
|
|
63
|
+
declare const MAIL_EVENTS: {
|
|
64
|
+
/** A watched mailbox's UID high-water mark advanced — new mail arrived. */
|
|
65
|
+
readonly NEW_MESSAGES: "mail:new-messages";
|
|
66
|
+
};
|
|
67
|
+
type MailEvent = typeof MAIL_EVENTS[keyof typeof MAIL_EVENTS];
|
|
60
68
|
|
|
61
69
|
declare const DEFAULT_TIMEOUT = 30000;
|
|
62
70
|
declare const TABLE_SEPARATOR = "__";
|
|
@@ -407,4 +415,4 @@ declare class HaexVaultSdkError extends Error {
|
|
|
407
415
|
};
|
|
408
416
|
}
|
|
409
417
|
|
|
410
|
-
export {
|
|
418
|
+
export { getTableName as $, type ApplicationContext as A, MAIL_EVENTS as B, type ClaimRequirement as C, type DatabaseQueryResult as D, type ExtensionManifest as E, type FileChangeEvent as F, type MailEvent as G, type HaexHubConfig as H, type IdentityClaim as I, type ManifestI18nEntry as J, type NotificationEvent as K, type PermissionDeniedError as L, type Migration as M, NOTIFICATION_EVENTS as N, type PermissionErrorBase as O, type PermissionResponse as P, PermissionErrorCode as Q, type PermissionPromptError as R, type SearchResult as S, PermissionStatus as T, SHELL_EVENTS as U, type SearchQuery as V, type WebRequestOptions as W, type SearchRequestEvent as X, type ShellEvent as Y, type SyncTablesUpdatedEvent as Z, TABLE_SEPARATOR as _, type ExtensionInfo as a, isPermissionDeniedError as a0, isPermissionError as a1, isPermissionPromptError as a2, type HaexHubEvent as b, EXTERNAL_EVENTS as c, type MigrationResult as d, type WebResponse as e, type EventCallback as f, type DatabasePermissionRequest as g, type SignedClaimPresentation as h, type ContextChangedEvent as i, DEFAULT_TIMEOUT as j, type DatabaseColumnInfo as k, type DatabaseExecuteParams as l, type DatabasePermission as m, type DatabaseQueryParams as n, type DatabaseTableInfo as o, ErrorCode as p, type ExtensionRuntimeMode as q, type ExternalEvent as r, type FileChangePayload as s, type FileChangeType as t, type FilteredSyncTablesResult as u, HAEXTENSION_EVENTS as v, type HaexHubRequest as w, type HaexHubResponse as x, HaexVaultSdkError as y, type HaextensionEvent as z };
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-Dn4AbXbT.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-DQZCRfC-.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexVault SDK
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultSdk, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultSdk, S as StorageAPI } from './client-DH4Km77u.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-DQZCRfC-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexVault SDK
|
package/dist/vue.js
CHANGED
|
@@ -419,6 +419,10 @@ var SHELL_EVENTS = {
|
|
|
419
419
|
/** Shell session has exited */
|
|
420
420
|
EXIT: "shell:exit"
|
|
421
421
|
};
|
|
422
|
+
var MAIL_EVENTS = {
|
|
423
|
+
/** A watched mailbox's UID high-water mark advanced — new mail arrived. */
|
|
424
|
+
NEW_MESSAGES: "mail:new-messages"
|
|
425
|
+
};
|
|
422
426
|
|
|
423
427
|
// src/types.ts
|
|
424
428
|
var DEFAULT_TIMEOUT = 3e4;
|
|
@@ -641,6 +645,8 @@ var SPACE_COMMANDS = {
|
|
|
641
645
|
unassign: "extension_space_unassign",
|
|
642
646
|
/** Get space assignments for a table */
|
|
643
647
|
getAssignments: "extension_space_get_assignments",
|
|
648
|
+
/** Get members of a shared space */
|
|
649
|
+
getMembers: "extension_space_get_members",
|
|
644
650
|
/** List all spaces the user is a member of (with decrypted names) */
|
|
645
651
|
list: "extension_space_list"};
|
|
646
652
|
|
|
@@ -691,7 +697,11 @@ var MAIL_COMMANDS = {
|
|
|
691
697
|
/** SMTP send. Returns the assigned Message-ID. */
|
|
692
698
|
sendMessage: "extension_mail_send_message",
|
|
693
699
|
/** Build RFC822 bytes without sending (for Drafts via APPEND) */
|
|
694
|
-
buildRfc822: "extension_mail_build_rfc822"
|
|
700
|
+
buildRfc822: "extension_mail_build_rfc822",
|
|
701
|
+
/** Start (or replace) a background poll watch for an account/mailbox */
|
|
702
|
+
startWatch: "extension_mail_start_watch",
|
|
703
|
+
/** Stop a background poll watch */
|
|
704
|
+
stopWatch: "extension_mail_stop_watch"
|
|
695
705
|
};
|
|
696
706
|
|
|
697
707
|
// src/commands/notifications.ts
|
|
@@ -1569,6 +1579,13 @@ var SpacesAPI = class {
|
|
|
1569
1579
|
async listSpacesAsync() {
|
|
1570
1580
|
return this.client.request(SPACE_COMMANDS.list);
|
|
1571
1581
|
}
|
|
1582
|
+
/**
|
|
1583
|
+
* List members of a shared space (DID + label), flagging the current user.
|
|
1584
|
+
* Used to resolve assignment authors to names and to detect own vs shared-in content.
|
|
1585
|
+
*/
|
|
1586
|
+
async getMembersAsync(spaceId) {
|
|
1587
|
+
return this.client.request(SPACE_COMMANDS.getMembers, { spaceId });
|
|
1588
|
+
}
|
|
1572
1589
|
};
|
|
1573
1590
|
|
|
1574
1591
|
// src/api/shell.ts
|
|
@@ -1789,6 +1806,41 @@ var MailAPI = class {
|
|
|
1789
1806
|
message
|
|
1790
1807
|
});
|
|
1791
1808
|
}
|
|
1809
|
+
/**
|
|
1810
|
+
* Start (or replace) a background poll watch for `accountId`/`mailboxName`.
|
|
1811
|
+
* The host resolves credentials itself from `accountId` — no `ImapConfig`
|
|
1812
|
+
* is passed in. Requires `mail` permission with action `poll` on the
|
|
1813
|
+
* account's IMAP host (prompted on first call, same as `fetch`/`send`).
|
|
1814
|
+
*
|
|
1815
|
+
* `intervalSeconds` is clamped host-side to [30, 3600]. Listen for
|
|
1816
|
+
* results via `onNewMessages`.
|
|
1817
|
+
*/
|
|
1818
|
+
async startWatchingAsync(accountId, mailboxName, intervalSeconds) {
|
|
1819
|
+
return this.client.request(MAIL_COMMANDS.startWatch, {
|
|
1820
|
+
accountId,
|
|
1821
|
+
mailboxName,
|
|
1822
|
+
intervalSeconds
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
/** Stop a background poll watch previously started with `startWatchingAsync`. */
|
|
1826
|
+
async stopWatchingAsync(accountId, mailboxName) {
|
|
1827
|
+
return this.client.request(MAIL_COMMANDS.stopWatch, {
|
|
1828
|
+
accountId,
|
|
1829
|
+
mailboxName
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Register a callback for new-mail notifications from any active watch.
|
|
1834
|
+
* `event.data` is a `MailNewMessagesEvent` — check `accountId`/`mailboxName`
|
|
1835
|
+
* before refreshing if watching more than one account.
|
|
1836
|
+
*/
|
|
1837
|
+
onNewMessages(callback) {
|
|
1838
|
+
this.client.on(MAIL_EVENTS.NEW_MESSAGES, callback);
|
|
1839
|
+
}
|
|
1840
|
+
/** Remove a new-mail callback registered with `onNewMessages`. */
|
|
1841
|
+
offNewMessages(callback) {
|
|
1842
|
+
this.client.off(MAIL_EVENTS.NEW_MESSAGES, callback);
|
|
1843
|
+
}
|
|
1792
1844
|
};
|
|
1793
1845
|
|
|
1794
1846
|
// src/api/notifications.ts
|
|
@@ -1991,6 +2043,7 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
1991
2043
|
EXTERNAL_EVENTS.REQUEST,
|
|
1992
2044
|
EXTERNAL_EVENTS.ACTION_REQUEST,
|
|
1993
2045
|
NOTIFICATION_EVENTS.CLICK,
|
|
2046
|
+
MAIL_EVENTS.NEW_MESSAGES,
|
|
1994
2047
|
...Object.values(LOCALSEND_EVENTS)
|
|
1995
2048
|
]) {
|
|
1996
2049
|
await forwardEvent(listen, log, onEvent, listenOptions, eventName);
|