@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
|
@@ -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-DQZCRfC-.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -983,6 +983,14 @@ interface SpaceMemberInfo {
|
|
|
983
983
|
invitedBy: string | null;
|
|
984
984
|
joinedAt: string;
|
|
985
985
|
}
|
|
986
|
+
interface SpaceMember {
|
|
987
|
+
/** DID of this member (did:key:z...) */
|
|
988
|
+
did: string;
|
|
989
|
+
/** Display label (identity name) */
|
|
990
|
+
label: string;
|
|
991
|
+
/** True if this member is one of the current vault's own identities */
|
|
992
|
+
isSelf: boolean;
|
|
993
|
+
}
|
|
986
994
|
interface SpaceKeyGrantInfo {
|
|
987
995
|
spaceId: string;
|
|
988
996
|
generation: number;
|
|
@@ -1047,6 +1055,8 @@ interface SpaceAssignment {
|
|
|
1047
1055
|
type?: string;
|
|
1048
1056
|
/** Optional display label (e.g. "Personal", "Team Q1") */
|
|
1049
1057
|
label?: string;
|
|
1058
|
+
/** DID of the member who created this assignment (did:key:z...). Undefined for local/legacy rows. */
|
|
1059
|
+
authoredByDid?: string;
|
|
1050
1060
|
}
|
|
1051
1061
|
/**
|
|
1052
1062
|
* Spaces API for managing row-to-space assignments.
|
|
@@ -1113,6 +1123,11 @@ declare class SpacesAPI {
|
|
|
1113
1123
|
* Returns spaces with decrypted names (decryption happens vault-side).
|
|
1114
1124
|
*/
|
|
1115
1125
|
listSpacesAsync(): Promise<DecryptedSpace[]>;
|
|
1126
|
+
/**
|
|
1127
|
+
* List members of a shared space (DID + label), flagging the current user.
|
|
1128
|
+
* Used to resolve assignment authors to names and to detect own vs shared-in content.
|
|
1129
|
+
*/
|
|
1130
|
+
getMembersAsync(spaceId: string): Promise<SpaceMember[]>;
|
|
1116
1131
|
}
|
|
1117
1132
|
|
|
1118
1133
|
interface ShellCreateOptions {
|
|
@@ -1318,6 +1333,12 @@ interface MailAccount {
|
|
|
1318
1333
|
imap: ImapConfig;
|
|
1319
1334
|
smtp?: SmtpConfig;
|
|
1320
1335
|
}
|
|
1336
|
+
/** Payload of `MAIL_EVENTS.NEW_MESSAGES`, emitted by a background poll watch. */
|
|
1337
|
+
interface MailNewMessagesEvent {
|
|
1338
|
+
accountId: string;
|
|
1339
|
+
mailboxName: string;
|
|
1340
|
+
newCount: number;
|
|
1341
|
+
}
|
|
1321
1342
|
interface MailAddress {
|
|
1322
1343
|
name?: string;
|
|
1323
1344
|
email: string;
|
|
@@ -1404,6 +1425,8 @@ interface OutgoingMessage {
|
|
|
1404
1425
|
* - All IMAP operations require `mail` permission with action `fetch`
|
|
1405
1426
|
* on `imap.host`.
|
|
1406
1427
|
* - SMTP send requires `mail` permission with action `send` on `smtp.host`.
|
|
1428
|
+
* - Background watching requires `mail` permission with action `poll`
|
|
1429
|
+
* on the account's IMAP host.
|
|
1407
1430
|
* - target="gmail.com" matches "imap.gmail.com" / "smtp.gmail.com".
|
|
1408
1431
|
*
|
|
1409
1432
|
* Credentials live with the caller (typically loaded from
|
|
@@ -1457,6 +1480,26 @@ declare class MailAPI {
|
|
|
1457
1480
|
* this is a fetch operation (no SMTP host involved).
|
|
1458
1481
|
*/
|
|
1459
1482
|
buildRfc822Async(imapHost: string, message: OutgoingMessage): Promise<string>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Start (or replace) a background poll watch for `accountId`/`mailboxName`.
|
|
1485
|
+
* The host resolves credentials itself from `accountId` — no `ImapConfig`
|
|
1486
|
+
* is passed in. Requires `mail` permission with action `poll` on the
|
|
1487
|
+
* account's IMAP host (prompted on first call, same as `fetch`/`send`).
|
|
1488
|
+
*
|
|
1489
|
+
* `intervalSeconds` is clamped host-side to [30, 3600]. Listen for
|
|
1490
|
+
* results via `onNewMessages`.
|
|
1491
|
+
*/
|
|
1492
|
+
startWatchingAsync(accountId: string, mailboxName: string, intervalSeconds: number): Promise<void>;
|
|
1493
|
+
/** Stop a background poll watch previously started with `startWatchingAsync`. */
|
|
1494
|
+
stopWatchingAsync(accountId: string, mailboxName: string): Promise<void>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Register a callback for new-mail notifications from any active watch.
|
|
1497
|
+
* `event.data` is a `MailNewMessagesEvent` — check `accountId`/`mailboxName`
|
|
1498
|
+
* before refreshing if watching more than one account.
|
|
1499
|
+
*/
|
|
1500
|
+
onNewMessages(callback: EventCallback): void;
|
|
1501
|
+
/** Remove a new-mail callback registered with `onNewMessages`. */
|
|
1502
|
+
offNewMessages(callback: EventCallback): void;
|
|
1460
1503
|
}
|
|
1461
1504
|
|
|
1462
1505
|
/**
|
|
@@ -1632,4 +1675,4 @@ declare class HaexVaultSdk {
|
|
|
1632
1675
|
private log;
|
|
1633
1676
|
}
|
|
1634
1677
|
|
|
1635
|
-
export {
|
|
1678
|
+
export { type PendingTransfer 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 MailboxInfo as G, HaexVaultSdk as H, type ImapConfig as I, type MessageEnvelope as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type NotificationAction as N, type NotificationClickEvent as O, type NotificationOptions as P, NotificationsAPI as Q, type OutgoingAttachment as R, StorageAPI as S, type OutgoingMessage as T, type PasswordInput as U, type PasswordItemFull as V, type PasswordItemSummary as W, type PasswordKeyValue as X, type PasswordKeyValueInput as Y, PasswordsAPI as Z, type PendingAuthorization as _, type DecryptedSpace as a, PermissionsAPI as a0, type AddBackendRequest as a1, type S3Config as a2, type S3PublicConfig as a3, RemoteStorageAPI as a4, type StorageBackendInfo as a5, type StorageObjectInfo as a6, type UpdateBackendRequest as a7, type RequestedExtension as a8, type SelectFileOptions as a9, type SelectFolderOptions as aa, type ServerInfo as ab, type ServerStatus as ac, type SessionAuthorization as ad, type SharedSpace as ae, ShellAPI as af, type ShellCreateOptions as ag, type ShellCreateResponse as ah, type ShellExitEvent as ai, type ShellOutputEvent as aj, type SmtpConfig as ak, type SpaceAccessTokenInfo as al, type SpaceAssignment as am, type SpaceInvite as an, type SpaceKeyGrantInfo as ao, type SpaceMember as ap, type SpaceMemberInfo as aq, SpacesAPI as ar, type SyncBackendInfo as as, type TransferDirection as at, type TransferProgress as au, type TransferState as av, WebAPI as aw, canExternalClientSendRequests as ax, isExternalClientConnected as ay, 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 MailNewMessagesEvent 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-DQZCRfC-.mjs';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -983,6 +983,14 @@ interface SpaceMemberInfo {
|
|
|
983
983
|
invitedBy: string | null;
|
|
984
984
|
joinedAt: string;
|
|
985
985
|
}
|
|
986
|
+
interface SpaceMember {
|
|
987
|
+
/** DID of this member (did:key:z...) */
|
|
988
|
+
did: string;
|
|
989
|
+
/** Display label (identity name) */
|
|
990
|
+
label: string;
|
|
991
|
+
/** True if this member is one of the current vault's own identities */
|
|
992
|
+
isSelf: boolean;
|
|
993
|
+
}
|
|
986
994
|
interface SpaceKeyGrantInfo {
|
|
987
995
|
spaceId: string;
|
|
988
996
|
generation: number;
|
|
@@ -1047,6 +1055,8 @@ interface SpaceAssignment {
|
|
|
1047
1055
|
type?: string;
|
|
1048
1056
|
/** Optional display label (e.g. "Personal", "Team Q1") */
|
|
1049
1057
|
label?: string;
|
|
1058
|
+
/** DID of the member who created this assignment (did:key:z...). Undefined for local/legacy rows. */
|
|
1059
|
+
authoredByDid?: string;
|
|
1050
1060
|
}
|
|
1051
1061
|
/**
|
|
1052
1062
|
* Spaces API for managing row-to-space assignments.
|
|
@@ -1113,6 +1123,11 @@ declare class SpacesAPI {
|
|
|
1113
1123
|
* Returns spaces with decrypted names (decryption happens vault-side).
|
|
1114
1124
|
*/
|
|
1115
1125
|
listSpacesAsync(): Promise<DecryptedSpace[]>;
|
|
1126
|
+
/**
|
|
1127
|
+
* List members of a shared space (DID + label), flagging the current user.
|
|
1128
|
+
* Used to resolve assignment authors to names and to detect own vs shared-in content.
|
|
1129
|
+
*/
|
|
1130
|
+
getMembersAsync(spaceId: string): Promise<SpaceMember[]>;
|
|
1116
1131
|
}
|
|
1117
1132
|
|
|
1118
1133
|
interface ShellCreateOptions {
|
|
@@ -1318,6 +1333,12 @@ interface MailAccount {
|
|
|
1318
1333
|
imap: ImapConfig;
|
|
1319
1334
|
smtp?: SmtpConfig;
|
|
1320
1335
|
}
|
|
1336
|
+
/** Payload of `MAIL_EVENTS.NEW_MESSAGES`, emitted by a background poll watch. */
|
|
1337
|
+
interface MailNewMessagesEvent {
|
|
1338
|
+
accountId: string;
|
|
1339
|
+
mailboxName: string;
|
|
1340
|
+
newCount: number;
|
|
1341
|
+
}
|
|
1321
1342
|
interface MailAddress {
|
|
1322
1343
|
name?: string;
|
|
1323
1344
|
email: string;
|
|
@@ -1404,6 +1425,8 @@ interface OutgoingMessage {
|
|
|
1404
1425
|
* - All IMAP operations require `mail` permission with action `fetch`
|
|
1405
1426
|
* on `imap.host`.
|
|
1406
1427
|
* - SMTP send requires `mail` permission with action `send` on `smtp.host`.
|
|
1428
|
+
* - Background watching requires `mail` permission with action `poll`
|
|
1429
|
+
* on the account's IMAP host.
|
|
1407
1430
|
* - target="gmail.com" matches "imap.gmail.com" / "smtp.gmail.com".
|
|
1408
1431
|
*
|
|
1409
1432
|
* Credentials live with the caller (typically loaded from
|
|
@@ -1457,6 +1480,26 @@ declare class MailAPI {
|
|
|
1457
1480
|
* this is a fetch operation (no SMTP host involved).
|
|
1458
1481
|
*/
|
|
1459
1482
|
buildRfc822Async(imapHost: string, message: OutgoingMessage): Promise<string>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Start (or replace) a background poll watch for `accountId`/`mailboxName`.
|
|
1485
|
+
* The host resolves credentials itself from `accountId` — no `ImapConfig`
|
|
1486
|
+
* is passed in. Requires `mail` permission with action `poll` on the
|
|
1487
|
+
* account's IMAP host (prompted on first call, same as `fetch`/`send`).
|
|
1488
|
+
*
|
|
1489
|
+
* `intervalSeconds` is clamped host-side to [30, 3600]. Listen for
|
|
1490
|
+
* results via `onNewMessages`.
|
|
1491
|
+
*/
|
|
1492
|
+
startWatchingAsync(accountId: string, mailboxName: string, intervalSeconds: number): Promise<void>;
|
|
1493
|
+
/** Stop a background poll watch previously started with `startWatchingAsync`. */
|
|
1494
|
+
stopWatchingAsync(accountId: string, mailboxName: string): Promise<void>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Register a callback for new-mail notifications from any active watch.
|
|
1497
|
+
* `event.data` is a `MailNewMessagesEvent` — check `accountId`/`mailboxName`
|
|
1498
|
+
* before refreshing if watching more than one account.
|
|
1499
|
+
*/
|
|
1500
|
+
onNewMessages(callback: EventCallback): void;
|
|
1501
|
+
/** Remove a new-mail callback registered with `onNewMessages`. */
|
|
1502
|
+
offNewMessages(callback: EventCallback): void;
|
|
1460
1503
|
}
|
|
1461
1504
|
|
|
1462
1505
|
/**
|
|
@@ -1632,4 +1675,4 @@ declare class HaexVaultSdk {
|
|
|
1632
1675
|
private log;
|
|
1633
1676
|
}
|
|
1634
1677
|
|
|
1635
|
-
export {
|
|
1678
|
+
export { type PendingTransfer 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 MailboxInfo as G, HaexVaultSdk as H, type ImapConfig as I, type MessageEnvelope as J, KnownPath as K, LOCALSEND_EVENTS as L, MailAPI as M, type NotificationAction as N, type NotificationClickEvent as O, type NotificationOptions as P, NotificationsAPI as Q, type OutgoingAttachment as R, StorageAPI as S, type OutgoingMessage as T, type PasswordInput as U, type PasswordItemFull as V, type PasswordItemSummary as W, type PasswordKeyValue as X, type PasswordKeyValueInput as Y, PasswordsAPI as Z, type PendingAuthorization as _, type DecryptedSpace as a, PermissionsAPI as a0, type AddBackendRequest as a1, type S3Config as a2, type S3PublicConfig as a3, RemoteStorageAPI as a4, type StorageBackendInfo as a5, type StorageObjectInfo as a6, type UpdateBackendRequest as a7, type RequestedExtension as a8, type SelectFileOptions as a9, type SelectFolderOptions as aa, type ServerInfo as ab, type ServerStatus as ac, type SessionAuthorization as ad, type SharedSpace as ae, ShellAPI as af, type ShellCreateOptions as ag, type ShellCreateResponse as ah, type ShellExitEvent as ai, type ShellOutputEvent as aj, type SmtpConfig as ak, type SpaceAccessTokenInfo as al, type SpaceAssignment as am, type SpaceInvite as an, type SpaceKeyGrantInfo as ao, type SpaceMember as ap, type SpaceMemberInfo as aq, SpacesAPI as ar, type SyncBackendInfo as as, type TransferDirection as at, type TransferProgress as au, type TransferState as av, WebAPI as aw, canExternalClientSendRequests as ax, isExternalClientConnected as ay, 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 MailNewMessagesEvent 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 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
|
|
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, N as NOTIFICATION_EVENTS,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-Dn4AbXbT.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 MailNewMessagesEvent, G as MailboxInfo, J as MessageEnvelope, N as NotificationAction, O as NotificationClickEvent, P as NotificationOptions, Q as NotificationsAPI, R as OutgoingAttachment, T as OutgoingMessage, U as PasswordInput, V as PasswordItemFull, W as PasswordItemSummary, X as PasswordKeyValue, Y as PasswordKeyValueInput, Z as PasswordsAPI, _ as PendingAuthorization, $ as PendingTransfer, a0 as PermissionsAPI, a1 as RemoteAddBackendRequest, a2 as RemoteS3Config, a3 as RemoteS3PublicConfig, a4 as RemoteStorageAPI, a5 as RemoteStorageBackendInfo, a6 as RemoteStorageObjectInfo, a7 as RemoteUpdateBackendRequest, a8 as RequestedExtension, a9 as SelectFileOptions, aa as SelectFolderOptions, ab as ServerInfo, ac as ServerStatus, ad as SessionAuthorization, ae as SharedSpace, af as ShellAPI, ag as ShellCreateOptions, ah as ShellCreateResponse, ai as ShellExitEvent, aj as ShellOutputEvent, ak as SmtpConfig, al as SpaceAccessTokenInfo, am as SpaceAssignment, an as SpaceInvite, ao as SpaceKeyGrantInfo, ap as SpaceMember, aq as SpaceMemberInfo, ar as SpacesAPI, as as SyncBackendInfo, at as TransferDirection, au as TransferProgress, av as TransferState, aw as WebAPI, ax as canExternalClientSendRequests, ay as isExternalClientConnected } from './client-Dn4AbXbT.mjs';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-DQZCRfC-.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 MAIL_EVENTS, G as MailEvent, J as ManifestI18nEntry, N as NOTIFICATION_EVENTS, K as NotificationEvent, L as PermissionDeniedError, O as PermissionErrorBase, Q as PermissionErrorCode, R as PermissionPromptError, P as PermissionResponse, T as PermissionStatus, U as SHELL_EVENTS, V as SearchQuery, X as SearchRequestEvent, S as SearchResult, Y as ShellEvent, Z as SyncTablesUpdatedEvent, _ as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, $ as getTableName, a0 as isPermissionDeniedError, a1 as isPermissionError, a2 as isPermissionPromptError } from './types-DQZCRfC-.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -108,7 +108,8 @@ type PasswordCommand = (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS
|
|
|
108
108
|
* Mail Commands (IMAP fetch + SMTP send).
|
|
109
109
|
*
|
|
110
110
|
* Permissions are split protocol-wise: `fetch` covers all IMAP
|
|
111
|
-
* operations (list/read/flag/move/append), `send` covers SMTP
|
|
111
|
+
* operations (list/read/flag/move/append), `send` covers SMTP, `poll`
|
|
112
|
+
* covers background new-mail watching (startWatch/stopWatch). Target
|
|
112
113
|
* matches mail-server hostnames; subdomain match is supported, so
|
|
113
114
|
* target="gmail.com" grants access to "imap.gmail.com" and
|
|
114
115
|
* "smtp.gmail.com".
|
|
@@ -134,6 +135,10 @@ declare const MAIL_COMMANDS: {
|
|
|
134
135
|
readonly sendMessage: "extension_mail_send_message";
|
|
135
136
|
/** Build RFC822 bytes without sending (for Drafts via APPEND) */
|
|
136
137
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
138
|
+
/** Start (or replace) a background poll watch for an account/mailbox */
|
|
139
|
+
readonly startWatch: "extension_mail_start_watch";
|
|
140
|
+
/** Stop a background poll watch */
|
|
141
|
+
readonly stopWatch: "extension_mail_stop_watch";
|
|
137
142
|
};
|
|
138
143
|
type MailCommand = (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS];
|
|
139
144
|
|
|
@@ -614,6 +619,8 @@ declare const SPACE_COMMANDS: {
|
|
|
614
619
|
readonly unassign: "extension_space_unassign";
|
|
615
620
|
/** Get space assignments for a table */
|
|
616
621
|
readonly getAssignments: "extension_space_get_assignments";
|
|
622
|
+
/** Get members of a shared space */
|
|
623
|
+
readonly getMembers: "extension_space_get_members";
|
|
617
624
|
/** List all spaces the user is a member of (with decrypted names) */
|
|
618
625
|
readonly list: "extension_space_list";
|
|
619
626
|
/** Create a new shared space */
|
|
@@ -765,6 +772,7 @@ declare const TAURI_COMMANDS: {
|
|
|
765
772
|
readonly assign: "extension_space_assign";
|
|
766
773
|
readonly unassign: "extension_space_unassign";
|
|
767
774
|
readonly getAssignments: "extension_space_get_assignments";
|
|
775
|
+
readonly getMembers: "extension_space_get_members";
|
|
768
776
|
readonly list: "extension_space_list";
|
|
769
777
|
readonly create: "extension_space_create";
|
|
770
778
|
readonly listBackends: "extension_space_list_backends";
|
|
@@ -793,6 +801,8 @@ declare const TAURI_COMMANDS: {
|
|
|
793
801
|
readonly appendMessage: "extension_mail_append_message";
|
|
794
802
|
readonly sendMessage: "extension_mail_send_message";
|
|
795
803
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
804
|
+
readonly startWatch: "extension_mail_start_watch";
|
|
805
|
+
readonly stopWatch: "extension_mail_stop_watch";
|
|
796
806
|
};
|
|
797
807
|
readonly notifications: {
|
|
798
808
|
readonly show: "extension_notifications_show";
|
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 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
|
|
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, N as NOTIFICATION_EVENTS,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-DH4Km77u.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 MailNewMessagesEvent, G as MailboxInfo, J as MessageEnvelope, N as NotificationAction, O as NotificationClickEvent, P as NotificationOptions, Q as NotificationsAPI, R as OutgoingAttachment, T as OutgoingMessage, U as PasswordInput, V as PasswordItemFull, W as PasswordItemSummary, X as PasswordKeyValue, Y as PasswordKeyValueInput, Z as PasswordsAPI, _ as PendingAuthorization, $ as PendingTransfer, a0 as PermissionsAPI, a1 as RemoteAddBackendRequest, a2 as RemoteS3Config, a3 as RemoteS3PublicConfig, a4 as RemoteStorageAPI, a5 as RemoteStorageBackendInfo, a6 as RemoteStorageObjectInfo, a7 as RemoteUpdateBackendRequest, a8 as RequestedExtension, a9 as SelectFileOptions, aa as SelectFolderOptions, ab as ServerInfo, ac as ServerStatus, ad as SessionAuthorization, ae as SharedSpace, af as ShellAPI, ag as ShellCreateOptions, ah as ShellCreateResponse, ai as ShellExitEvent, aj as ShellOutputEvent, ak as SmtpConfig, al as SpaceAccessTokenInfo, am as SpaceAssignment, an as SpaceInvite, ao as SpaceKeyGrantInfo, ap as SpaceMember, aq as SpaceMemberInfo, ar as SpacesAPI, as as SyncBackendInfo, at as TransferDirection, au as TransferProgress, av as TransferState, aw as WebAPI, ax as canExternalClientSendRequests, ay as isExternalClientConnected } from './client-DH4Km77u.js';
|
|
3
|
+
import { E as ExtensionManifest, h as SignedClaimPresentation, H as HaexHubConfig } from './types-DQZCRfC-.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 MAIL_EVENTS, G as MailEvent, J as ManifestI18nEntry, N as NOTIFICATION_EVENTS, K as NotificationEvent, L as PermissionDeniedError, O as PermissionErrorBase, Q as PermissionErrorCode, R as PermissionPromptError, P as PermissionResponse, T as PermissionStatus, U as SHELL_EVENTS, V as SearchQuery, X as SearchRequestEvent, S as SearchResult, Y as ShellEvent, Z as SyncTablesUpdatedEvent, _ as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, $ as getTableName, a0 as isPermissionDeniedError, a1 as isPermissionError, a2 as isPermissionPromptError } from './types-DQZCRfC-.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -108,7 +108,8 @@ type PasswordCommand = (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS
|
|
|
108
108
|
* Mail Commands (IMAP fetch + SMTP send).
|
|
109
109
|
*
|
|
110
110
|
* Permissions are split protocol-wise: `fetch` covers all IMAP
|
|
111
|
-
* operations (list/read/flag/move/append), `send` covers SMTP
|
|
111
|
+
* operations (list/read/flag/move/append), `send` covers SMTP, `poll`
|
|
112
|
+
* covers background new-mail watching (startWatch/stopWatch). Target
|
|
112
113
|
* matches mail-server hostnames; subdomain match is supported, so
|
|
113
114
|
* target="gmail.com" grants access to "imap.gmail.com" and
|
|
114
115
|
* "smtp.gmail.com".
|
|
@@ -134,6 +135,10 @@ declare const MAIL_COMMANDS: {
|
|
|
134
135
|
readonly sendMessage: "extension_mail_send_message";
|
|
135
136
|
/** Build RFC822 bytes without sending (for Drafts via APPEND) */
|
|
136
137
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
138
|
+
/** Start (or replace) a background poll watch for an account/mailbox */
|
|
139
|
+
readonly startWatch: "extension_mail_start_watch";
|
|
140
|
+
/** Stop a background poll watch */
|
|
141
|
+
readonly stopWatch: "extension_mail_stop_watch";
|
|
137
142
|
};
|
|
138
143
|
type MailCommand = (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS];
|
|
139
144
|
|
|
@@ -614,6 +619,8 @@ declare const SPACE_COMMANDS: {
|
|
|
614
619
|
readonly unassign: "extension_space_unassign";
|
|
615
620
|
/** Get space assignments for a table */
|
|
616
621
|
readonly getAssignments: "extension_space_get_assignments";
|
|
622
|
+
/** Get members of a shared space */
|
|
623
|
+
readonly getMembers: "extension_space_get_members";
|
|
617
624
|
/** List all spaces the user is a member of (with decrypted names) */
|
|
618
625
|
readonly list: "extension_space_list";
|
|
619
626
|
/** Create a new shared space */
|
|
@@ -765,6 +772,7 @@ declare const TAURI_COMMANDS: {
|
|
|
765
772
|
readonly assign: "extension_space_assign";
|
|
766
773
|
readonly unassign: "extension_space_unassign";
|
|
767
774
|
readonly getAssignments: "extension_space_get_assignments";
|
|
775
|
+
readonly getMembers: "extension_space_get_members";
|
|
768
776
|
readonly list: "extension_space_list";
|
|
769
777
|
readonly create: "extension_space_create";
|
|
770
778
|
readonly listBackends: "extension_space_list_backends";
|
|
@@ -793,6 +801,8 @@ declare const TAURI_COMMANDS: {
|
|
|
793
801
|
readonly appendMessage: "extension_mail_append_message";
|
|
794
802
|
readonly sendMessage: "extension_mail_send_message";
|
|
795
803
|
readonly buildRfc822: "extension_mail_build_rfc822";
|
|
804
|
+
readonly startWatch: "extension_mail_start_watch";
|
|
805
|
+
readonly stopWatch: "extension_mail_stop_watch";
|
|
796
806
|
};
|
|
797
807
|
readonly notifications: {
|
|
798
808
|
readonly show: "extension_notifications_show";
|
package/dist/index.js
CHANGED
|
@@ -735,6 +735,10 @@ var SHELL_EVENTS = {
|
|
|
735
735
|
/** Shell session has exited */
|
|
736
736
|
EXIT: "shell:exit"
|
|
737
737
|
};
|
|
738
|
+
var MAIL_EVENTS = {
|
|
739
|
+
/** A watched mailbox's UID high-water mark advanced — new mail arrived. */
|
|
740
|
+
NEW_MESSAGES: "mail:new-messages"
|
|
741
|
+
};
|
|
738
742
|
|
|
739
743
|
// src/types.ts
|
|
740
744
|
var DEFAULT_TIMEOUT = 3e4;
|
|
@@ -1035,6 +1039,8 @@ var SPACE_COMMANDS = {
|
|
|
1035
1039
|
unassign: "extension_space_unassign",
|
|
1036
1040
|
/** Get space assignments for a table */
|
|
1037
1041
|
getAssignments: "extension_space_get_assignments",
|
|
1042
|
+
/** Get members of a shared space */
|
|
1043
|
+
getMembers: "extension_space_get_members",
|
|
1038
1044
|
/** List all spaces the user is a member of (with decrypted names) */
|
|
1039
1045
|
list: "extension_space_list",
|
|
1040
1046
|
/** Create a new shared space */
|
|
@@ -1090,7 +1096,11 @@ var MAIL_COMMANDS = {
|
|
|
1090
1096
|
/** SMTP send. Returns the assigned Message-ID. */
|
|
1091
1097
|
sendMessage: "extension_mail_send_message",
|
|
1092
1098
|
/** Build RFC822 bytes without sending (for Drafts via APPEND) */
|
|
1093
|
-
buildRfc822: "extension_mail_build_rfc822"
|
|
1099
|
+
buildRfc822: "extension_mail_build_rfc822",
|
|
1100
|
+
/** Start (or replace) a background poll watch for an account/mailbox */
|
|
1101
|
+
startWatch: "extension_mail_start_watch",
|
|
1102
|
+
/** Stop a background poll watch */
|
|
1103
|
+
stopWatch: "extension_mail_stop_watch"
|
|
1094
1104
|
};
|
|
1095
1105
|
|
|
1096
1106
|
// src/commands/notifications.ts
|
|
@@ -1995,6 +2005,13 @@ var SpacesAPI = class {
|
|
|
1995
2005
|
async listSpacesAsync() {
|
|
1996
2006
|
return this.client.request(SPACE_COMMANDS.list);
|
|
1997
2007
|
}
|
|
2008
|
+
/**
|
|
2009
|
+
* List members of a shared space (DID + label), flagging the current user.
|
|
2010
|
+
* Used to resolve assignment authors to names and to detect own vs shared-in content.
|
|
2011
|
+
*/
|
|
2012
|
+
async getMembersAsync(spaceId) {
|
|
2013
|
+
return this.client.request(SPACE_COMMANDS.getMembers, { spaceId });
|
|
2014
|
+
}
|
|
1998
2015
|
};
|
|
1999
2016
|
|
|
2000
2017
|
// src/api/shell.ts
|
|
@@ -2215,6 +2232,41 @@ var MailAPI = class {
|
|
|
2215
2232
|
message
|
|
2216
2233
|
});
|
|
2217
2234
|
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Start (or replace) a background poll watch for `accountId`/`mailboxName`.
|
|
2237
|
+
* The host resolves credentials itself from `accountId` — no `ImapConfig`
|
|
2238
|
+
* is passed in. Requires `mail` permission with action `poll` on the
|
|
2239
|
+
* account's IMAP host (prompted on first call, same as `fetch`/`send`).
|
|
2240
|
+
*
|
|
2241
|
+
* `intervalSeconds` is clamped host-side to [30, 3600]. Listen for
|
|
2242
|
+
* results via `onNewMessages`.
|
|
2243
|
+
*/
|
|
2244
|
+
async startWatchingAsync(accountId, mailboxName, intervalSeconds) {
|
|
2245
|
+
return this.client.request(MAIL_COMMANDS.startWatch, {
|
|
2246
|
+
accountId,
|
|
2247
|
+
mailboxName,
|
|
2248
|
+
intervalSeconds
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
/** Stop a background poll watch previously started with `startWatchingAsync`. */
|
|
2252
|
+
async stopWatchingAsync(accountId, mailboxName) {
|
|
2253
|
+
return this.client.request(MAIL_COMMANDS.stopWatch, {
|
|
2254
|
+
accountId,
|
|
2255
|
+
mailboxName
|
|
2256
|
+
});
|
|
2257
|
+
}
|
|
2258
|
+
/**
|
|
2259
|
+
* Register a callback for new-mail notifications from any active watch.
|
|
2260
|
+
* `event.data` is a `MailNewMessagesEvent` — check `accountId`/`mailboxName`
|
|
2261
|
+
* before refreshing if watching more than one account.
|
|
2262
|
+
*/
|
|
2263
|
+
onNewMessages(callback) {
|
|
2264
|
+
this.client.on(MAIL_EVENTS.NEW_MESSAGES, callback);
|
|
2265
|
+
}
|
|
2266
|
+
/** Remove a new-mail callback registered with `onNewMessages`. */
|
|
2267
|
+
offNewMessages(callback) {
|
|
2268
|
+
this.client.off(MAIL_EVENTS.NEW_MESSAGES, callback);
|
|
2269
|
+
}
|
|
2218
2270
|
};
|
|
2219
2271
|
|
|
2220
2272
|
// src/api/notifications.ts
|
|
@@ -2417,6 +2469,7 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
2417
2469
|
EXTERNAL_EVENTS.REQUEST,
|
|
2418
2470
|
EXTERNAL_EVENTS.ACTION_REQUEST,
|
|
2419
2471
|
NOTIFICATION_EVENTS.CLICK,
|
|
2472
|
+
MAIL_EVENTS.NEW_MESSAGES,
|
|
2420
2473
|
...Object.values(LOCALSEND_EVENTS)
|
|
2421
2474
|
]) {
|
|
2422
2475
|
await forwardEvent(listen, log, onEvent, listenOptions, eventName);
|
|
@@ -3847,6 +3900,7 @@ exports.KnownPath = KnownPath;
|
|
|
3847
3900
|
exports.LOCALSEND_EVENTS = LOCALSEND_EVENTS;
|
|
3848
3901
|
exports.LocalSendAPI = LocalSendAPI;
|
|
3849
3902
|
exports.MAIL_COMMANDS = MAIL_COMMANDS;
|
|
3903
|
+
exports.MAIL_EVENTS = MAIL_EVENTS;
|
|
3850
3904
|
exports.MailAPI = MailAPI;
|
|
3851
3905
|
exports.NOTIFICATION_COMMANDS = NOTIFICATION_COMMANDS;
|
|
3852
3906
|
exports.NOTIFICATION_EVENTS = NOTIFICATION_EVENTS;
|