@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
package/dist/svelte.mjs
CHANGED
|
@@ -417,6 +417,10 @@ var SHELL_EVENTS = {
|
|
|
417
417
|
/** Shell session has exited */
|
|
418
418
|
EXIT: "shell:exit"
|
|
419
419
|
};
|
|
420
|
+
var MAIL_EVENTS = {
|
|
421
|
+
/** A watched mailbox's UID high-water mark advanced — new mail arrived. */
|
|
422
|
+
NEW_MESSAGES: "mail:new-messages"
|
|
423
|
+
};
|
|
420
424
|
|
|
421
425
|
// src/types.ts
|
|
422
426
|
var DEFAULT_TIMEOUT = 3e4;
|
|
@@ -639,6 +643,8 @@ var SPACE_COMMANDS = {
|
|
|
639
643
|
unassign: "extension_space_unassign",
|
|
640
644
|
/** Get space assignments for a table */
|
|
641
645
|
getAssignments: "extension_space_get_assignments",
|
|
646
|
+
/** Get members of a shared space */
|
|
647
|
+
getMembers: "extension_space_get_members",
|
|
642
648
|
/** List all spaces the user is a member of (with decrypted names) */
|
|
643
649
|
list: "extension_space_list"};
|
|
644
650
|
|
|
@@ -689,7 +695,11 @@ var MAIL_COMMANDS = {
|
|
|
689
695
|
/** SMTP send. Returns the assigned Message-ID. */
|
|
690
696
|
sendMessage: "extension_mail_send_message",
|
|
691
697
|
/** Build RFC822 bytes without sending (for Drafts via APPEND) */
|
|
692
|
-
buildRfc822: "extension_mail_build_rfc822"
|
|
698
|
+
buildRfc822: "extension_mail_build_rfc822",
|
|
699
|
+
/** Start (or replace) a background poll watch for an account/mailbox */
|
|
700
|
+
startWatch: "extension_mail_start_watch",
|
|
701
|
+
/** Stop a background poll watch */
|
|
702
|
+
stopWatch: "extension_mail_stop_watch"
|
|
693
703
|
};
|
|
694
704
|
|
|
695
705
|
// src/commands/notifications.ts
|
|
@@ -1567,6 +1577,13 @@ var SpacesAPI = class {
|
|
|
1567
1577
|
async listSpacesAsync() {
|
|
1568
1578
|
return this.client.request(SPACE_COMMANDS.list);
|
|
1569
1579
|
}
|
|
1580
|
+
/**
|
|
1581
|
+
* List members of a shared space (DID + label), flagging the current user.
|
|
1582
|
+
* Used to resolve assignment authors to names and to detect own vs shared-in content.
|
|
1583
|
+
*/
|
|
1584
|
+
async getMembersAsync(spaceId) {
|
|
1585
|
+
return this.client.request(SPACE_COMMANDS.getMembers, { spaceId });
|
|
1586
|
+
}
|
|
1570
1587
|
};
|
|
1571
1588
|
|
|
1572
1589
|
// src/api/shell.ts
|
|
@@ -1787,6 +1804,41 @@ var MailAPI = class {
|
|
|
1787
1804
|
message
|
|
1788
1805
|
});
|
|
1789
1806
|
}
|
|
1807
|
+
/**
|
|
1808
|
+
* Start (or replace) a background poll watch for `accountId`/`mailboxName`.
|
|
1809
|
+
* The host resolves credentials itself from `accountId` — no `ImapConfig`
|
|
1810
|
+
* is passed in. Requires `mail` permission with action `poll` on the
|
|
1811
|
+
* account's IMAP host (prompted on first call, same as `fetch`/`send`).
|
|
1812
|
+
*
|
|
1813
|
+
* `intervalSeconds` is clamped host-side to [30, 3600]. Listen for
|
|
1814
|
+
* results via `onNewMessages`.
|
|
1815
|
+
*/
|
|
1816
|
+
async startWatchingAsync(accountId, mailboxName, intervalSeconds) {
|
|
1817
|
+
return this.client.request(MAIL_COMMANDS.startWatch, {
|
|
1818
|
+
accountId,
|
|
1819
|
+
mailboxName,
|
|
1820
|
+
intervalSeconds
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
/** Stop a background poll watch previously started with `startWatchingAsync`. */
|
|
1824
|
+
async stopWatchingAsync(accountId, mailboxName) {
|
|
1825
|
+
return this.client.request(MAIL_COMMANDS.stopWatch, {
|
|
1826
|
+
accountId,
|
|
1827
|
+
mailboxName
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Register a callback for new-mail notifications from any active watch.
|
|
1832
|
+
* `event.data` is a `MailNewMessagesEvent` — check `accountId`/`mailboxName`
|
|
1833
|
+
* before refreshing if watching more than one account.
|
|
1834
|
+
*/
|
|
1835
|
+
onNewMessages(callback) {
|
|
1836
|
+
this.client.on(MAIL_EVENTS.NEW_MESSAGES, callback);
|
|
1837
|
+
}
|
|
1838
|
+
/** Remove a new-mail callback registered with `onNewMessages`. */
|
|
1839
|
+
offNewMessages(callback) {
|
|
1840
|
+
this.client.off(MAIL_EVENTS.NEW_MESSAGES, callback);
|
|
1841
|
+
}
|
|
1790
1842
|
};
|
|
1791
1843
|
|
|
1792
1844
|
// src/api/notifications.ts
|
|
@@ -1989,6 +2041,7 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
1989
2041
|
EXTERNAL_EVENTS.REQUEST,
|
|
1990
2042
|
EXTERNAL_EVENTS.ACTION_REQUEST,
|
|
1991
2043
|
NOTIFICATION_EVENTS.CLICK,
|
|
2044
|
+
MAIL_EVENTS.NEW_MESSAGES,
|
|
1992
2045
|
...Object.values(LOCALSEND_EVENTS)
|
|
1993
2046
|
]) {
|
|
1994
2047
|
await forwardEvent(listen, log, onEvent, listenOptions, eventName);
|