@haex-space/vault-sdk 5.4.2 → 5.6.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/autofill.js +1 -1
- package/dist/autofill.js.map +1 -1
- package/dist/autofill.mjs +1 -1
- package/dist/autofill.mjs.map +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{client-HdPYJ_9t.d.mts → client-5T310pDa.d.mts} +157 -3
- package/dist/{client-CgngeKPm.d.ts → client-r56Io3Ns.d.ts} +157 -3
- package/dist/haex_bundle_bg.wasm +0 -0
- package/dist/index.d.mts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +70 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.mjs +1 -1
- package/dist/node.mjs.map +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/nuxt.js.map +1 -1
- package/dist/passgen.js +1 -1
- package/dist/passgen.js.map +1 -1
- package/dist/passgen.mjs +1 -1
- package/dist/passgen.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +79 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +78 -1
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.js +76 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +76 -0
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +79 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +78 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-CNxDNQgb.d.mts → types-keveJwPq.d.mts} +3 -0
- package/dist/{types-CNxDNQgb.d.ts → types-keveJwPq.d.ts} +3 -0
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +79 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +78 -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, a as ExtensionManifest, H as HaexHubConfig, E as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, R as RequestOptions } 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, a as ExtensionManifest, H as HaexHubConfig, E as ExtensionInfo, A as ApplicationContext, g as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, R as RequestOptions } from './types-keveJwPq.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -2196,6 +2196,21 @@ declare class MailAPI {
|
|
|
2196
2196
|
* contain the server's hierarchy delimiter; `*` and `%` are not allowed.
|
|
2197
2197
|
*/
|
|
2198
2198
|
createMailboxAsync(imap: ImapConfig, mailbox: string): Promise<boolean>;
|
|
2199
|
+
/**
|
|
2200
|
+
* Delete a mailbox. `mailbox` is the IMAP-encoded name (modified UTF-7), like in every other
|
|
2201
|
+
* call. `INBOX` can be neither deleted nor renamed; the host refuses it. Whether the mailbox's
|
|
2202
|
+
* messages and child mailboxes go with it, and whether a missing mailbox is an error, is up to
|
|
2203
|
+
* the server. Needs the same `fetch` permission as the other IMAP calls.
|
|
2204
|
+
*/
|
|
2205
|
+
deleteMailboxAsync(imap: ImapConfig, mailbox: string): Promise<void>;
|
|
2206
|
+
/**
|
|
2207
|
+
* Rename a mailbox from `from` to `to`, both IMAP-encoded names (modified UTF-7). `to` may
|
|
2208
|
+
* contain the server's hierarchy delimiter to move the mailbox in the tree; `*` and `%` are not
|
|
2209
|
+
* allowed. `INBOX` can be neither deleted nor renamed; the host refuses it. Whether child
|
|
2210
|
+
* mailboxes follow and whether an existing `to` is an error is up to the server. Needs the same
|
|
2211
|
+
* `fetch` permission as the other IMAP calls.
|
|
2212
|
+
*/
|
|
2213
|
+
renameMailboxAsync(imap: ImapConfig, from: string, to: string): Promise<void>;
|
|
2199
2214
|
/**
|
|
2200
2215
|
* Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
|
|
2201
2216
|
* other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,
|
|
@@ -2350,6 +2365,144 @@ declare class TabAPI {
|
|
|
2350
2365
|
requestAttention(active: boolean): Promise<void>;
|
|
2351
2366
|
}
|
|
2352
2367
|
|
|
2368
|
+
/**
|
|
2369
|
+
* What an extension hands the host for its window's header (holzi spec 090): three areas of
|
|
2370
|
+
* controls, drawn by the host in the header of the extension's own tab. The description replaces
|
|
2371
|
+
* the previous one whole; the host keeps nothing between page loads.
|
|
2372
|
+
*
|
|
2373
|
+
* Texts are shown as text, never as HTML. An `icon` is a path inside the extension's own bundle
|
|
2374
|
+
* (an installed extension) or additionally a `data:` URL (a development version); a picture is a
|
|
2375
|
+
* raster image or an SVG up to 256 KiB. The host refuses a description that breaks its limits (at
|
|
2376
|
+
* most 32 controls, 64 menu entries, 8 options; texts up to 120 characters) with error `3001`.
|
|
2377
|
+
*/
|
|
2378
|
+
/** How a control gives way when the header is too narrow. */
|
|
2379
|
+
type HeaderCollapseForm = "overflow" | "icon" | "shrink" | "keep";
|
|
2380
|
+
interface HeaderCollapse {
|
|
2381
|
+
/** 0 to 1000; the lowest collapses first. Without it the control collapses after every control that has one. */
|
|
2382
|
+
order?: number;
|
|
2383
|
+
/** `overflow` (default): into the overflow menu; `icon`: the picture alone; `shrink`: narrower; `keep`: stays as long as anything else can give way. */
|
|
2384
|
+
form?: HeaderCollapseForm;
|
|
2385
|
+
}
|
|
2386
|
+
/** The fields every control has. */
|
|
2387
|
+
interface HeaderControlBase {
|
|
2388
|
+
/** Unique in the description; comes back in the events. Up to 64 characters. */
|
|
2389
|
+
id: string;
|
|
2390
|
+
/** The accessible name; required for every type except `title` and `separator`. */
|
|
2391
|
+
label?: string;
|
|
2392
|
+
/** A path in the extension's bundle (or a `data:` URL in a development version). */
|
|
2393
|
+
icon?: string;
|
|
2394
|
+
/** Draw the picture in the header's text colour from its alpha channel. */
|
|
2395
|
+
monochrome?: boolean;
|
|
2396
|
+
/** Default is the label. */
|
|
2397
|
+
tooltip?: string;
|
|
2398
|
+
disabled?: boolean;
|
|
2399
|
+
collapse?: HeaderCollapse;
|
|
2400
|
+
}
|
|
2401
|
+
/** One entry of a `menu` control. */
|
|
2402
|
+
type HeaderMenuItem = {
|
|
2403
|
+
type: "item";
|
|
2404
|
+
id: string;
|
|
2405
|
+
label: string;
|
|
2406
|
+
icon?: string;
|
|
2407
|
+
disabled?: boolean;
|
|
2408
|
+
} | {
|
|
2409
|
+
type: "separator";
|
|
2410
|
+
};
|
|
2411
|
+
/** One option of a `choice` control. */
|
|
2412
|
+
interface HeaderOption {
|
|
2413
|
+
id: string;
|
|
2414
|
+
label: string;
|
|
2415
|
+
icon?: string;
|
|
2416
|
+
}
|
|
2417
|
+
/** One segment of a `breadcrumb` control. */
|
|
2418
|
+
interface HeaderSegment {
|
|
2419
|
+
id: string;
|
|
2420
|
+
label: string;
|
|
2421
|
+
}
|
|
2422
|
+
/** Event: `click`. */
|
|
2423
|
+
interface HeaderButton extends HeaderControlBase {
|
|
2424
|
+
type: "button";
|
|
2425
|
+
text?: string;
|
|
2426
|
+
}
|
|
2427
|
+
/** Event: `toggle` (the new state). */
|
|
2428
|
+
interface HeaderToggle extends HeaderControlBase {
|
|
2429
|
+
type: "toggle";
|
|
2430
|
+
pressed: boolean;
|
|
2431
|
+
text?: string;
|
|
2432
|
+
}
|
|
2433
|
+
/** Events: `input` (merged, at most every ~100 ms) and `submit` (Enter). */
|
|
2434
|
+
interface HeaderSearch extends HeaderControlBase {
|
|
2435
|
+
type: "search";
|
|
2436
|
+
value: string;
|
|
2437
|
+
placeholder?: string;
|
|
2438
|
+
}
|
|
2439
|
+
/** Event: `click` with the entry's id as `value`. */
|
|
2440
|
+
interface HeaderMenu extends HeaderControlBase {
|
|
2441
|
+
type: "menu";
|
|
2442
|
+
items: HeaderMenuItem[];
|
|
2443
|
+
text?: string;
|
|
2444
|
+
}
|
|
2445
|
+
/** Event: `select` with the option's id as `value`. */
|
|
2446
|
+
interface HeaderChoice extends HeaderControlBase {
|
|
2447
|
+
type: "choice";
|
|
2448
|
+
options: HeaderOption[];
|
|
2449
|
+
selected: string;
|
|
2450
|
+
}
|
|
2451
|
+
/** Events: `select` (the segment's id) and, when `editable`, `submit` (the typed path). */
|
|
2452
|
+
interface HeaderBreadcrumb extends HeaderControlBase {
|
|
2453
|
+
type: "breadcrumb";
|
|
2454
|
+
segments: HeaderSegment[];
|
|
2455
|
+
editable?: boolean;
|
|
2456
|
+
editValue?: string;
|
|
2457
|
+
}
|
|
2458
|
+
/** Text without an event; replaces the label. */
|
|
2459
|
+
interface HeaderTitle extends HeaderControlBase {
|
|
2460
|
+
type: "title";
|
|
2461
|
+
text: string;
|
|
2462
|
+
}
|
|
2463
|
+
interface HeaderSeparator extends HeaderControlBase {
|
|
2464
|
+
type: "separator";
|
|
2465
|
+
}
|
|
2466
|
+
type HeaderControl = HeaderButton | HeaderToggle | HeaderSearch | HeaderMenu | HeaderChoice | HeaderBreadcrumb | HeaderTitle | HeaderSeparator;
|
|
2467
|
+
/** The description of the header: three areas of controls. A missing area is empty. */
|
|
2468
|
+
interface HeaderDescription {
|
|
2469
|
+
start?: HeaderControl[];
|
|
2470
|
+
center?: HeaderControl[];
|
|
2471
|
+
end?: HeaderControl[];
|
|
2472
|
+
}
|
|
2473
|
+
type HeaderEventKind = "click" | "toggle" | "input" | "submit" | "select";
|
|
2474
|
+
/** What the extension is told when a control is used. */
|
|
2475
|
+
interface HeaderEvent {
|
|
2476
|
+
/** The control's id. */
|
|
2477
|
+
id: string;
|
|
2478
|
+
kind: HeaderEventKind;
|
|
2479
|
+
/** Text for `input`, `submit` and `select` (and a menu's `click`), a flag for `toggle`; absent for the `click` of a button. */
|
|
2480
|
+
value?: string | boolean;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
/**
|
|
2484
|
+
* The header of the host window that shows this extension.
|
|
2485
|
+
*
|
|
2486
|
+
* The host draws the description in the header of the extension's own tab (buttons, toggles, a
|
|
2487
|
+
* search field, menus, a breadcrumb), collapses it into an overflow menu when the window is
|
|
2488
|
+
* narrow, and tells the extension what the user did through `onEvent`. No permission is needed:
|
|
2489
|
+
* a call only changes the header of the calling frame's own tab. The header goes when the frame
|
|
2490
|
+
* reloads or closes.
|
|
2491
|
+
*/
|
|
2492
|
+
declare class HeaderAPI {
|
|
2493
|
+
private client;
|
|
2494
|
+
constructor(client: HaexVaultSdk);
|
|
2495
|
+
/**
|
|
2496
|
+
* Replace the header with `description`. Resolves `true` when the host applied it, and `false`
|
|
2497
|
+
* when the host has no header (haex-vault 2.x); the extension keeps running either way. Every
|
|
2498
|
+
* other error rejects, such as `3001` for a description the host refuses (the previous header
|
|
2499
|
+
* stays).
|
|
2500
|
+
*/
|
|
2501
|
+
set(description: HeaderDescription): Promise<boolean>;
|
|
2502
|
+
/** Listen for the user using a control of this extension's header. Returns an unsubscribe function. */
|
|
2503
|
+
onEvent(handler: (event: HeaderEvent) => void): () => void;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2353
2506
|
interface ConfirmOptions {
|
|
2354
2507
|
/** The question, up to 2000 characters. */
|
|
2355
2508
|
message: string;
|
|
@@ -2523,6 +2676,7 @@ declare class HaexVaultSdk {
|
|
|
2523
2676
|
readonly mail: MailAPI;
|
|
2524
2677
|
readonly notifications: NotificationsAPI;
|
|
2525
2678
|
readonly tab: TabAPI;
|
|
2679
|
+
readonly header: HeaderAPI;
|
|
2526
2680
|
readonly dialog: DialogAPI;
|
|
2527
2681
|
readonly openers: OpenersAPI;
|
|
2528
2682
|
/** Tools the extension offers to the agent of its host (holzi spec 018). */
|
|
@@ -2577,5 +2731,5 @@ declare class HaexVaultSdk {
|
|
|
2577
2731
|
private log;
|
|
2578
2732
|
}
|
|
2579
2733
|
|
|
2580
|
-
export { DatabaseAPI as D, HaexVaultSdk as H, FilesystemAPI as L,
|
|
2581
|
-
export type {
|
|
2734
|
+
export { DatabaseAPI as D, HaexVaultSdk as H, FilesystemAPI as L, HeaderAPI as M, StorageAPI as S, KnownPath as a5, LOCALSEND_EVENTS as a7, LocalSendAPI as a8, NotificationsAPI as aD, OpenersAPI as aF, PEER_ERROR_KINDS as aI, PasswordsAPI as aO, PeerError as aR, PeersAPI as a_, MailAPI as ac, ModelsAPI as az, PermissionsAPI as b1, RemoteStorageAPI as b9, TabAPI as bA, ToolsAPI as bD, WebAPI as bH, canExternalClientSendRequests as bI, isExternalClientConnected as bJ, ShellAPI as bm, SpacesAPI as by, ContactsAPI as i, DialogAPI as o, EncryptedFoldersAPI as t, ExternalConnectionErrorCode as x, ExternalConnectionState as y };
|
|
2735
|
+
export type { HeaderSearch as $, AuthorizedClient as A, BlockedClient as B, ConfirmOptions as C, EncryptedFolderAccess as E, ExternalRequestEvent as F, ExternalRequestHandler as G, ExternalRequestPayload as I, ExternalResponse as J, FileStat as K, HeaderBreadcrumb as N, HeaderButton as O, HeaderChoice as P, HeaderCollapse as Q, HeaderCollapseForm as R, HeaderControl as T, HeaderControlBase as U, HeaderDescription as V, HeaderEvent as W, HeaderEventKind as X, HeaderMenu as Y, HeaderMenuItem as Z, HeaderOption as _, ConnectionSecurity as a, PendingAuthorization as a$, HeaderSegment as a0, HeaderSeparator as a1, HeaderTitle as a2, HeaderToggle as a3, ImapConfig as a4, KnownPaths as a6, LocalSendEvent as a9, NotificationAction as aA, NotificationClickEvent as aB, NotificationOptions as aC, OpenRequest as aE, OutgoingAttachment as aG, OutgoingMessage as aH, PasswordInput as aJ, PasswordItemFull as aK, PasswordItemSummary as aL, PasswordKeyValue as aM, PasswordKeyValueInput as aN, PeerChannelClosed as aP, PeerChannelOpened as aQ, PeerErrorKind as aS, PeerErrorReason as aT, PeerEventMap as aU, PeerEventType as aV, PeerInviteStatus as aW, PeerJoined as aX, PeerMessage as aY, PeerVisibility as aZ, FileInfo as aa, LocalSendSettings as ab, MailAccount as ad, MailAddress as ae, Attachment as af, FetchRange as ag, MailFields as ah, MailMessage as ai, MailNewMessagesEvent as aj, MailSearchCriteria as ak, MailSearchResult as al, MailboxInfo as am, MessageEnvelope as an, ModelAccessRequest as ao, ModelEffort as ap, ModelJob as aq, ModelJobAttempt as ar, ModelJobCompletion as as, ModelJobErrorCode as at, ModelJobFormat as au, ModelJobImage as av, ModelJobProvenance as aw, ModelJobStep as ax, ModelPlace as ay, ContactDetail as b, PendingTransfer as b0, AddBackendRequest as b2, FolderBackendInfo as b3, S3BackendInfo as b4, S3Config as b5, S3Proposal as b6, S3PublicConfig as b7, SftpProposal as b8, ToolContext as bB, ToolHandler as bC, TransferDirection as bE, TransferProgress as bF, TransferState as bG, StorageBackendInfo as ba, StorageBackendType as bb, StorageObjectInfo as bc, UpdateBackendRequest as bd, WebDavProposal as be, RequestedExtension as bf, SelectFileOptions as bg, SelectFolderOptions as bh, ServerInfo as bi, ServerStatus as bj, SessionAuthorization as bk, SharedSpace as bl, ShellCreateOptions as bn, ShellCreateResponse as bo, ShellExitEvent as bp, ShellOutputEvent as bq, SmtpConfig as br, SpaceAccessTokenInfo as bs, SpaceAssignment as bt, SpaceInvite as bu, SpaceKeyGrantInfo as bv, SpaceMember as bw, SpaceMemberInfo as bx, SyncBackendInfo as bz, ContactHolziAddresses as c, ContactHolziDevice as d, ContactList as e, ContactListOptions as f, ContactSummary as g, ContactValue as h, DecryptedSpace as j, DeepLink as k, Device as l, DeviceInfo as m, DeviceType as n, DirEntry as p, EncryptedFolderChoice as q, EncryptedFolderEntry as r, EncryptedFolderProviderErrorKind as s, ExtensionModel as u, ExternalAuthDecision as v, ExternalConnection as w, ExternalRequest as z };
|
package/dist/haex_bundle_bg.wasm
CHANGED
|
Binary file
|
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 ConfirmOptions, a as ConnectionSecurity, b as ContactDetail, c as ContactHolziAddresses, d as ContactHolziDevice, e as ContactList, f as ContactListOptions, g as ContactSummary, h as ContactValue, i as ContactsAPI, D as DatabaseAPI, j as DecryptedSpace, k as DeepLink, l as Device, m as DeviceInfo, n as DeviceType, o as DialogAPI, p as DirEntry, E as EncryptedFolderAccess, q as EncryptedFolderChoice, r as EncryptedFolderEntry, s as EncryptedFolderProviderErrorKind, t as EncryptedFoldersAPI, u as ExtensionModel, v as ExternalAuthDecision, w as ExternalConnection, x as ExternalConnectionErrorCode, y as ExternalConnectionState, z as ExternalRequest, F as ExternalRequestEvent, G as ExternalRequestHandler, I as ExternalRequestPayload, J as ExternalResponse, K as FileStat, L as FilesystemAPI, M as
|
|
3
|
-
import { 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, E as ExtensionInfo, a as ExtensionManifest, 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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MODEL_JOB_EVENTS, K as MailEvent, L as ManifestI18nEntry, N as ManifestTool, O as ManifestToolEffect, Q as ModelJobEvent, T as NOTIFICATION_EVENTS, U as NotificationEvent, V as OPENER_EVENTS, X as OpenerEvent, Y as PEERS_EVENTS, Z as PeersEvent, _ as PermissionDeniedError, $ as PermissionErrorBase, a0 as PermissionErrorCode, a1 as PermissionPromptError, P as PermissionResponse, a2 as PermissionStatus, R as RequestOptions, a3 as SHELL_EVENTS, a4 as SearchQuery, a5 as SearchRequestEvent, S as SearchResult, a6 as ShellEvent, a7 as SyncTablesUpdatedEvent, a8 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a9 as getTableName, aa as isPermissionDeniedError, ab as isPermissionError, ac as isPermissionPromptError } from './types-
|
|
1
|
+
import { H as HaexVaultSdk } from './client-5T310pDa.mjs';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, b as ContactDetail, c as ContactHolziAddresses, d as ContactHolziDevice, e as ContactList, f as ContactListOptions, g as ContactSummary, h as ContactValue, i as ContactsAPI, D as DatabaseAPI, j as DecryptedSpace, k as DeepLink, l as Device, m as DeviceInfo, n as DeviceType, o as DialogAPI, p as DirEntry, E as EncryptedFolderAccess, q as EncryptedFolderChoice, r as EncryptedFolderEntry, s as EncryptedFolderProviderErrorKind, t as EncryptedFoldersAPI, u as ExtensionModel, v as ExternalAuthDecision, w as ExternalConnection, x as ExternalConnectionErrorCode, y as ExternalConnectionState, z as ExternalRequest, F as ExternalRequestEvent, G as ExternalRequestHandler, I as ExternalRequestPayload, J as ExternalResponse, K as FileStat, L as FilesystemAPI, M as HeaderAPI, N as HeaderBreadcrumb, O as HeaderButton, P as HeaderChoice, Q as HeaderCollapse, R as HeaderCollapseForm, T as HeaderControl, U as HeaderControlBase, V as HeaderDescription, W as HeaderEvent, X as HeaderEventKind, Y as HeaderMenu, Z as HeaderMenuItem, _ as HeaderOption, $ as HeaderSearch, a0 as HeaderSegment, a1 as HeaderSeparator, a2 as HeaderTitle, a3 as HeaderToggle, a4 as ImapConfig, a5 as KnownPath, a6 as KnownPaths, a7 as LOCALSEND_EVENTS, a8 as LocalSendAPI, a9 as LocalSendEvent, aa as LocalSendFileInfo, ab as LocalSendSettings, ac as MailAPI, ad as MailAccount, ae as MailAddress, af as MailAttachment, ag as MailFetchRange, ah as MailFields, ai as MailMessage, aj as MailNewMessagesEvent, ak as MailSearchCriteria, al as MailSearchResult, am as MailboxInfo, an as MessageEnvelope, ao as ModelAccessRequest, ap as ModelEffort, aq as ModelJob, ar as ModelJobAttempt, as as ModelJobCompletion, at as ModelJobErrorCode, au as ModelJobFormat, av as ModelJobImage, aw as ModelJobProvenance, ax as ModelJobStep, ay as ModelPlace, az as ModelsAPI, aA as NotificationAction, aB as NotificationClickEvent, aC as NotificationOptions, aD as NotificationsAPI, aE as OpenRequest, aF as OpenersAPI, aG as OutgoingAttachment, aH as OutgoingMessage, aI as PEER_ERROR_KINDS, aJ as PasswordInput, aK as PasswordItemFull, aL as PasswordItemSummary, aM as PasswordKeyValue, aN as PasswordKeyValueInput, aO as PasswordsAPI, aP as PeerChannelClosed, aQ as PeerChannelOpened, aR as PeerError, aS as PeerErrorKind, aT as PeerErrorReason, aU as PeerEventMap, aV as PeerEventType, aW as PeerInviteStatus, aX as PeerJoined, aY as PeerMessage, aZ as PeerVisibility, a_ as PeersAPI, a$ as PendingAuthorization, b0 as PendingTransfer, b1 as PermissionsAPI, b2 as RemoteAddBackendRequest, b3 as RemoteFolderBackendInfo, b4 as RemoteS3BackendInfo, b5 as RemoteS3Config, b6 as RemoteS3Proposal, b7 as RemoteS3PublicConfig, b8 as RemoteSftpProposal, b9 as RemoteStorageAPI, ba as RemoteStorageBackendInfo, bb as RemoteStorageBackendType, bc as RemoteStorageObjectInfo, bd as RemoteUpdateBackendRequest, be as RemoteWebDavProposal, bf as RequestedExtension, bg as SelectFileOptions, bh as SelectFolderOptions, bi as ServerInfo, bj as ServerStatus, bk as SessionAuthorization, bl as SharedSpace, bm as ShellAPI, bn as ShellCreateOptions, bo as ShellCreateResponse, bp as ShellExitEvent, bq as ShellOutputEvent, br as SmtpConfig, bs as SpaceAccessTokenInfo, bt as SpaceAssignment, bu as SpaceInvite, bv as SpaceKeyGrantInfo, bw as SpaceMember, bx as SpaceMemberInfo, by as SpacesAPI, bz as SyncBackendInfo, bA as TabAPI, bB as ToolContext, bC as ToolHandler, bD as ToolsAPI, bE as TransferDirection, bF as TransferProgress, bG as TransferState, bH as WebAPI, bI as canExternalClientSendRequests, bJ as isExternalClientConnected } from './client-5T310pDa.mjs';
|
|
3
|
+
import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-keveJwPq.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, E as ExtensionInfo, a as ExtensionManifest, 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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MODEL_JOB_EVENTS, K as MailEvent, L as ManifestI18nEntry, N as ManifestTool, O as ManifestToolEffect, Q as ModelJobEvent, T as NOTIFICATION_EVENTS, U as NotificationEvent, V as OPENER_EVENTS, X as OpenerEvent, Y as PEERS_EVENTS, Z as PeersEvent, _ as PermissionDeniedError, $ as PermissionErrorBase, a0 as PermissionErrorCode, a1 as PermissionPromptError, P as PermissionResponse, a2 as PermissionStatus, R as RequestOptions, a3 as SHELL_EVENTS, a4 as SearchQuery, a5 as SearchRequestEvent, S as SearchResult, a6 as ShellEvent, a7 as SyncTablesUpdatedEvent, a8 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a9 as getTableName, aa as isPermissionDeniedError, ab as isPermissionError, ac as isPermissionPromptError } from './types-keveJwPq.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-P_6DqTHl.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -208,7 +208,8 @@ type PeerCommand = (typeof PEER_COMMANDS)[keyof typeof PEER_COMMANDS];
|
|
|
208
208
|
* Mail Commands (IMAP fetch + SMTP send).
|
|
209
209
|
*
|
|
210
210
|
* Permissions are split protocol-wise: `fetch` covers all IMAP
|
|
211
|
-
* operations (list/read/search/flag/move/append
|
|
211
|
+
* operations (list/read/search/flag/move/append, create/delete/rename mailbox,
|
|
212
|
+
* delete messages), `send` covers SMTP, `poll`
|
|
212
213
|
* covers background new-mail watching (startWatch/stopWatch). Target
|
|
213
214
|
* matches mail-server hostnames; subdomain match is supported, so
|
|
214
215
|
* target="gmail.com" grants access to "imap.gmail.com" and
|
|
@@ -229,6 +230,10 @@ declare const MAIL_COMMANDS: {
|
|
|
229
230
|
readonly search: "extension_mail_search";
|
|
230
231
|
/** CREATE a mailbox (reports whether it was already there) */
|
|
231
232
|
readonly createMailbox: "extension_mail_create_mailbox";
|
|
233
|
+
/** DELETE a mailbox (never INBOX) */
|
|
234
|
+
readonly deleteMailbox: "extension_mail_delete_mailbox";
|
|
235
|
+
/** RENAME a mailbox (never INBOX) */
|
|
236
|
+
readonly renameMailbox: "extension_mail_rename_mailbox";
|
|
232
237
|
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
233
238
|
readonly deleteMessages: "extension_mail_delete_messages";
|
|
234
239
|
/** Set or unset IMAP flags on a UID set */
|
|
@@ -635,6 +640,8 @@ declare const EXTENSION_COMMANDS: {
|
|
|
635
640
|
readonly emitSyncTables: "extension_emit_sync_tables";
|
|
636
641
|
/** Ask the host to mark (or unmark) this extension's own tab as wanting attention */
|
|
637
642
|
readonly tabAttention: "extension_tab_attention";
|
|
643
|
+
/** Replace the header of this extension's own tab (holzi spec 090): `null` */
|
|
644
|
+
readonly headerSet: "extension_header_set";
|
|
638
645
|
/** Ask the user to confirm, in a dialog the host draws over this extension's tab */
|
|
639
646
|
readonly dialogConfirm: "extension_dialog_confirm";
|
|
640
647
|
/** Take the request the user gave this extension (holzi spec 063): `null` or `{ action, mail }` */
|
|
@@ -858,6 +865,7 @@ declare const TAURI_COMMANDS: {
|
|
|
858
865
|
readonly filterSyncTables: "extension_filter_sync_tables";
|
|
859
866
|
readonly emitSyncTables: "extension_emit_sync_tables";
|
|
860
867
|
readonly tabAttention: "extension_tab_attention";
|
|
868
|
+
readonly headerSet: "extension_header_set";
|
|
861
869
|
readonly dialogConfirm: "extension_dialog_confirm";
|
|
862
870
|
readonly openerTake: "extension_opener_take";
|
|
863
871
|
};
|
|
@@ -953,6 +961,8 @@ declare const TAURI_COMMANDS: {
|
|
|
953
961
|
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
954
962
|
readonly search: "extension_mail_search";
|
|
955
963
|
readonly createMailbox: "extension_mail_create_mailbox";
|
|
964
|
+
readonly deleteMailbox: "extension_mail_delete_mailbox";
|
|
965
|
+
readonly renameMailbox: "extension_mail_rename_mailbox";
|
|
956
966
|
readonly deleteMessages: "extension_mail_delete_messages";
|
|
957
967
|
readonly setFlags: "extension_mail_set_flags";
|
|
958
968
|
readonly moveMessages: "extension_mail_move_messages";
|
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 ConfirmOptions, a as ConnectionSecurity, b as ContactDetail, c as ContactHolziAddresses, d as ContactHolziDevice, e as ContactList, f as ContactListOptions, g as ContactSummary, h as ContactValue, i as ContactsAPI, D as DatabaseAPI, j as DecryptedSpace, k as DeepLink, l as Device, m as DeviceInfo, n as DeviceType, o as DialogAPI, p as DirEntry, E as EncryptedFolderAccess, q as EncryptedFolderChoice, r as EncryptedFolderEntry, s as EncryptedFolderProviderErrorKind, t as EncryptedFoldersAPI, u as ExtensionModel, v as ExternalAuthDecision, w as ExternalConnection, x as ExternalConnectionErrorCode, y as ExternalConnectionState, z as ExternalRequest, F as ExternalRequestEvent, G as ExternalRequestHandler, I as ExternalRequestPayload, J as ExternalResponse, K as FileStat, L as FilesystemAPI, M as
|
|
3
|
-
import { 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, E as ExtensionInfo, a as ExtensionManifest, 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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MODEL_JOB_EVENTS, K as MailEvent, L as ManifestI18nEntry, N as ManifestTool, O as ManifestToolEffect, Q as ModelJobEvent, T as NOTIFICATION_EVENTS, U as NotificationEvent, V as OPENER_EVENTS, X as OpenerEvent, Y as PEERS_EVENTS, Z as PeersEvent, _ as PermissionDeniedError, $ as PermissionErrorBase, a0 as PermissionErrorCode, a1 as PermissionPromptError, P as PermissionResponse, a2 as PermissionStatus, R as RequestOptions, a3 as SHELL_EVENTS, a4 as SearchQuery, a5 as SearchRequestEvent, S as SearchResult, a6 as ShellEvent, a7 as SyncTablesUpdatedEvent, a8 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a9 as getTableName, aa as isPermissionDeniedError, ab as isPermissionError, ac as isPermissionPromptError } from './types-
|
|
1
|
+
import { H as HaexVaultSdk } from './client-r56Io3Ns.js';
|
|
2
|
+
export { A as AuthorizedClient, B as BlockedClient, C as ConfirmOptions, a as ConnectionSecurity, b as ContactDetail, c as ContactHolziAddresses, d as ContactHolziDevice, e as ContactList, f as ContactListOptions, g as ContactSummary, h as ContactValue, i as ContactsAPI, D as DatabaseAPI, j as DecryptedSpace, k as DeepLink, l as Device, m as DeviceInfo, n as DeviceType, o as DialogAPI, p as DirEntry, E as EncryptedFolderAccess, q as EncryptedFolderChoice, r as EncryptedFolderEntry, s as EncryptedFolderProviderErrorKind, t as EncryptedFoldersAPI, u as ExtensionModel, v as ExternalAuthDecision, w as ExternalConnection, x as ExternalConnectionErrorCode, y as ExternalConnectionState, z as ExternalRequest, F as ExternalRequestEvent, G as ExternalRequestHandler, I as ExternalRequestPayload, J as ExternalResponse, K as FileStat, L as FilesystemAPI, M as HeaderAPI, N as HeaderBreadcrumb, O as HeaderButton, P as HeaderChoice, Q as HeaderCollapse, R as HeaderCollapseForm, T as HeaderControl, U as HeaderControlBase, V as HeaderDescription, W as HeaderEvent, X as HeaderEventKind, Y as HeaderMenu, Z as HeaderMenuItem, _ as HeaderOption, $ as HeaderSearch, a0 as HeaderSegment, a1 as HeaderSeparator, a2 as HeaderTitle, a3 as HeaderToggle, a4 as ImapConfig, a5 as KnownPath, a6 as KnownPaths, a7 as LOCALSEND_EVENTS, a8 as LocalSendAPI, a9 as LocalSendEvent, aa as LocalSendFileInfo, ab as LocalSendSettings, ac as MailAPI, ad as MailAccount, ae as MailAddress, af as MailAttachment, ag as MailFetchRange, ah as MailFields, ai as MailMessage, aj as MailNewMessagesEvent, ak as MailSearchCriteria, al as MailSearchResult, am as MailboxInfo, an as MessageEnvelope, ao as ModelAccessRequest, ap as ModelEffort, aq as ModelJob, ar as ModelJobAttempt, as as ModelJobCompletion, at as ModelJobErrorCode, au as ModelJobFormat, av as ModelJobImage, aw as ModelJobProvenance, ax as ModelJobStep, ay as ModelPlace, az as ModelsAPI, aA as NotificationAction, aB as NotificationClickEvent, aC as NotificationOptions, aD as NotificationsAPI, aE as OpenRequest, aF as OpenersAPI, aG as OutgoingAttachment, aH as OutgoingMessage, aI as PEER_ERROR_KINDS, aJ as PasswordInput, aK as PasswordItemFull, aL as PasswordItemSummary, aM as PasswordKeyValue, aN as PasswordKeyValueInput, aO as PasswordsAPI, aP as PeerChannelClosed, aQ as PeerChannelOpened, aR as PeerError, aS as PeerErrorKind, aT as PeerErrorReason, aU as PeerEventMap, aV as PeerEventType, aW as PeerInviteStatus, aX as PeerJoined, aY as PeerMessage, aZ as PeerVisibility, a_ as PeersAPI, a$ as PendingAuthorization, b0 as PendingTransfer, b1 as PermissionsAPI, b2 as RemoteAddBackendRequest, b3 as RemoteFolderBackendInfo, b4 as RemoteS3BackendInfo, b5 as RemoteS3Config, b6 as RemoteS3Proposal, b7 as RemoteS3PublicConfig, b8 as RemoteSftpProposal, b9 as RemoteStorageAPI, ba as RemoteStorageBackendInfo, bb as RemoteStorageBackendType, bc as RemoteStorageObjectInfo, bd as RemoteUpdateBackendRequest, be as RemoteWebDavProposal, bf as RequestedExtension, bg as SelectFileOptions, bh as SelectFolderOptions, bi as ServerInfo, bj as ServerStatus, bk as SessionAuthorization, bl as SharedSpace, bm as ShellAPI, bn as ShellCreateOptions, bo as ShellCreateResponse, bp as ShellExitEvent, bq as ShellOutputEvent, br as SmtpConfig, bs as SpaceAccessTokenInfo, bt as SpaceAssignment, bu as SpaceInvite, bv as SpaceKeyGrantInfo, bw as SpaceMember, bx as SpaceMemberInfo, by as SpacesAPI, bz as SyncBackendInfo, bA as TabAPI, bB as ToolContext, bC as ToolHandler, bD as ToolsAPI, bE as TransferDirection, bF as TransferProgress, bG as TransferState, bH as WebAPI, bI as canExternalClientSendRequests, bJ as isExternalClientConnected } from './client-r56Io3Ns.js';
|
|
3
|
+
import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-keveJwPq.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, E as ExtensionInfo, a as ExtensionManifest, 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, B as HostErrorCode, I as IdentityClaim, G as MAIL_EVENTS, J as MODEL_JOB_EVENTS, K as MailEvent, L as ManifestI18nEntry, N as ManifestTool, O as ManifestToolEffect, Q as ModelJobEvent, T as NOTIFICATION_EVENTS, U as NotificationEvent, V as OPENER_EVENTS, X as OpenerEvent, Y as PEERS_EVENTS, Z as PeersEvent, _ as PermissionDeniedError, $ as PermissionErrorBase, a0 as PermissionErrorCode, a1 as PermissionPromptError, P as PermissionResponse, a2 as PermissionStatus, R as RequestOptions, a3 as SHELL_EVENTS, a4 as SearchQuery, a5 as SearchRequestEvent, S as SearchResult, a6 as ShellEvent, a7 as SyncTablesUpdatedEvent, a8 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a9 as getTableName, aa as isPermissionDeniedError, ab as isPermissionError, ac as isPermissionPromptError } from './types-keveJwPq.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-P_6DqTHl.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
@@ -208,7 +208,8 @@ type PeerCommand = (typeof PEER_COMMANDS)[keyof typeof PEER_COMMANDS];
|
|
|
208
208
|
* Mail Commands (IMAP fetch + SMTP send).
|
|
209
209
|
*
|
|
210
210
|
* Permissions are split protocol-wise: `fetch` covers all IMAP
|
|
211
|
-
* operations (list/read/search/flag/move/append
|
|
211
|
+
* operations (list/read/search/flag/move/append, create/delete/rename mailbox,
|
|
212
|
+
* delete messages), `send` covers SMTP, `poll`
|
|
212
213
|
* covers background new-mail watching (startWatch/stopWatch). Target
|
|
213
214
|
* matches mail-server hostnames; subdomain match is supported, so
|
|
214
215
|
* target="gmail.com" grants access to "imap.gmail.com" and
|
|
@@ -229,6 +230,10 @@ declare const MAIL_COMMANDS: {
|
|
|
229
230
|
readonly search: "extension_mail_search";
|
|
230
231
|
/** CREATE a mailbox (reports whether it was already there) */
|
|
231
232
|
readonly createMailbox: "extension_mail_create_mailbox";
|
|
233
|
+
/** DELETE a mailbox (never INBOX) */
|
|
234
|
+
readonly deleteMailbox: "extension_mail_delete_mailbox";
|
|
235
|
+
/** RENAME a mailbox (never INBOX) */
|
|
236
|
+
readonly renameMailbox: "extension_mail_rename_mailbox";
|
|
232
237
|
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
233
238
|
readonly deleteMessages: "extension_mail_delete_messages";
|
|
234
239
|
/** Set or unset IMAP flags on a UID set */
|
|
@@ -635,6 +640,8 @@ declare const EXTENSION_COMMANDS: {
|
|
|
635
640
|
readonly emitSyncTables: "extension_emit_sync_tables";
|
|
636
641
|
/** Ask the host to mark (or unmark) this extension's own tab as wanting attention */
|
|
637
642
|
readonly tabAttention: "extension_tab_attention";
|
|
643
|
+
/** Replace the header of this extension's own tab (holzi spec 090): `null` */
|
|
644
|
+
readonly headerSet: "extension_header_set";
|
|
638
645
|
/** Ask the user to confirm, in a dialog the host draws over this extension's tab */
|
|
639
646
|
readonly dialogConfirm: "extension_dialog_confirm";
|
|
640
647
|
/** Take the request the user gave this extension (holzi spec 063): `null` or `{ action, mail }` */
|
|
@@ -858,6 +865,7 @@ declare const TAURI_COMMANDS: {
|
|
|
858
865
|
readonly filterSyncTables: "extension_filter_sync_tables";
|
|
859
866
|
readonly emitSyncTables: "extension_emit_sync_tables";
|
|
860
867
|
readonly tabAttention: "extension_tab_attention";
|
|
868
|
+
readonly headerSet: "extension_header_set";
|
|
861
869
|
readonly dialogConfirm: "extension_dialog_confirm";
|
|
862
870
|
readonly openerTake: "extension_opener_take";
|
|
863
871
|
};
|
|
@@ -953,6 +961,8 @@ declare const TAURI_COMMANDS: {
|
|
|
953
961
|
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
954
962
|
readonly search: "extension_mail_search";
|
|
955
963
|
readonly createMailbox: "extension_mail_create_mailbox";
|
|
964
|
+
readonly deleteMailbox: "extension_mail_delete_mailbox";
|
|
965
|
+
readonly renameMailbox: "extension_mail_rename_mailbox";
|
|
956
966
|
readonly deleteMessages: "extension_mail_delete_messages";
|
|
957
967
|
readonly setFlags: "extension_mail_set_flags";
|
|
958
968
|
readonly moveMessages: "extension_mail_move_messages";
|
package/dist/index.js
CHANGED
|
@@ -17,9 +17,9 @@ var __export = (target, all) => {
|
|
|
17
17
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
// node_modules/.pnpm/tsup@9.0.0_jiti@2.7.0_postcss@8.5.
|
|
20
|
+
// node_modules/.pnpm/tsup@9.0.0_jiti@2.7.0_postcss@8.5.33_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js
|
|
21
21
|
var init_cjs_shims = __esm({
|
|
22
|
-
"node_modules/.pnpm/tsup@9.0.0_jiti@2.7.0_postcss@8.5.
|
|
22
|
+
"node_modules/.pnpm/tsup@9.0.0_jiti@2.7.0_postcss@8.5.33_typescript@6.0.3_yaml@2.9.0/node_modules/tsup/assets/cjs_shims.js"() {
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -754,6 +754,9 @@ var HAEXTENSION_EVENTS = {
|
|
|
754
754
|
FILE_CHANGED: "filesync:file-changed",
|
|
755
755
|
/** Tables have been updated via sync (CRDT pull from server) */
|
|
756
756
|
SYNC_TABLES_UPDATED: "haextension:sync:tables-updated",
|
|
757
|
+
/** The user used a control of this extension's header (holzi spec 090): `{ id, kind, value? }`.
|
|
758
|
+
* Subscribe through `client.header.onEvent`. */
|
|
759
|
+
HEADER_EVENT: "haextension:header:event",
|
|
757
760
|
/** A runtime permission prompt was resolved (granted/denied) by the user.
|
|
758
761
|
* The SDK uses this to auto-retry the original request; extensions may also
|
|
759
762
|
* subscribe via `client.on(HAEXTENSION_EVENTS.PERMISSION_RESOLVED, ...)`. */
|
|
@@ -1058,6 +1061,8 @@ var EXTENSION_COMMANDS = {
|
|
|
1058
1061
|
emitSyncTables: "extension_emit_sync_tables",
|
|
1059
1062
|
/** Ask the host to mark (or unmark) this extension's own tab as wanting attention */
|
|
1060
1063
|
tabAttention: "extension_tab_attention",
|
|
1064
|
+
/** Replace the header of this extension's own tab (holzi spec 090): `null` */
|
|
1065
|
+
headerSet: "extension_header_set",
|
|
1061
1066
|
/** Ask the user to confirm, in a dialog the host draws over this extension's tab */
|
|
1062
1067
|
dialogConfirm: "extension_dialog_confirm",
|
|
1063
1068
|
/** Take the request the user gave this extension (holzi spec 063): `null` or `{ action, mail }` */
|
|
@@ -1266,6 +1271,10 @@ var MAIL_COMMANDS = {
|
|
|
1266
1271
|
search: "extension_mail_search",
|
|
1267
1272
|
/** CREATE a mailbox (reports whether it was already there) */
|
|
1268
1273
|
createMailbox: "extension_mail_create_mailbox",
|
|
1274
|
+
/** DELETE a mailbox (never INBOX) */
|
|
1275
|
+
deleteMailbox: "extension_mail_delete_mailbox",
|
|
1276
|
+
/** RENAME a mailbox (never INBOX) */
|
|
1277
|
+
renameMailbox: "extension_mail_rename_mailbox",
|
|
1269
1278
|
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
1270
1279
|
deleteMessages: "extension_mail_delete_messages",
|
|
1271
1280
|
/** Set or unset IMAP flags on a UID set */
|
|
@@ -2821,6 +2830,25 @@ var MailAPI = class {
|
|
|
2821
2830
|
);
|
|
2822
2831
|
return created;
|
|
2823
2832
|
}
|
|
2833
|
+
/**
|
|
2834
|
+
* Delete a mailbox. `mailbox` is the IMAP-encoded name (modified UTF-7), like in every other
|
|
2835
|
+
* call. `INBOX` can be neither deleted nor renamed; the host refuses it. Whether the mailbox's
|
|
2836
|
+
* messages and child mailboxes go with it, and whether a missing mailbox is an error, is up to
|
|
2837
|
+
* the server. Needs the same `fetch` permission as the other IMAP calls.
|
|
2838
|
+
*/
|
|
2839
|
+
async deleteMailboxAsync(imap, mailbox) {
|
|
2840
|
+
return this.client.request(MAIL_COMMANDS.deleteMailbox, { imap, mailbox });
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* Rename a mailbox from `from` to `to`, both IMAP-encoded names (modified UTF-7). `to` may
|
|
2844
|
+
* contain the server's hierarchy delimiter to move the mailbox in the tree; `*` and `%` are not
|
|
2845
|
+
* allowed. `INBOX` can be neither deleted nor renamed; the host refuses it. Whether child
|
|
2846
|
+
* mailboxes follow and whether an existing `to` is an error is up to the server. Needs the same
|
|
2847
|
+
* `fetch` permission as the other IMAP calls.
|
|
2848
|
+
*/
|
|
2849
|
+
async renameMailboxAsync(imap, from, to) {
|
|
2850
|
+
return this.client.request(MAIL_COMMANDS.renameMailbox, { imap, from, to });
|
|
2851
|
+
}
|
|
2824
2852
|
/**
|
|
2825
2853
|
* Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
|
|
2826
2854
|
* other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,
|
|
@@ -2981,6 +3009,44 @@ var TabAPI = class {
|
|
|
2981
3009
|
}
|
|
2982
3010
|
};
|
|
2983
3011
|
|
|
3012
|
+
// src/api/header.ts
|
|
3013
|
+
init_cjs_shims();
|
|
3014
|
+
var NOT_SUPPORTED2 = 8e3;
|
|
3015
|
+
function isUnknownMethod(error) {
|
|
3016
|
+
if (error?.code === NOT_SUPPORTED2) return true;
|
|
3017
|
+
const text = typeof error === "string" ? error : error?.message;
|
|
3018
|
+
return typeof text === "string" && /^Unknown method\b/.test(text);
|
|
3019
|
+
}
|
|
3020
|
+
var HeaderAPI = class {
|
|
3021
|
+
constructor(client) {
|
|
3022
|
+
this.client = client;
|
|
3023
|
+
}
|
|
3024
|
+
/**
|
|
3025
|
+
* Replace the header with `description`. Resolves `true` when the host applied it, and `false`
|
|
3026
|
+
* when the host has no header (haex-vault 2.x); the extension keeps running either way. Every
|
|
3027
|
+
* other error rejects, such as `3001` for a description the host refuses (the previous header
|
|
3028
|
+
* stays).
|
|
3029
|
+
*/
|
|
3030
|
+
async set(description) {
|
|
3031
|
+
try {
|
|
3032
|
+
await this.client.request(EXTENSION_COMMANDS.headerSet, { ...description });
|
|
3033
|
+
return true;
|
|
3034
|
+
} catch (error) {
|
|
3035
|
+
if (isUnknownMethod(error)) return false;
|
|
3036
|
+
throw error;
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
/** Listen for the user using a control of this extension's header. Returns an unsubscribe function. */
|
|
3040
|
+
onEvent(handler) {
|
|
3041
|
+
const wrapped = (event) => {
|
|
3042
|
+
const data = event.data;
|
|
3043
|
+
if (data) handler(data);
|
|
3044
|
+
};
|
|
3045
|
+
this.client.on(HAEXTENSION_EVENTS.HEADER_EVENT, wrapped);
|
|
3046
|
+
return () => this.client.off(HAEXTENSION_EVENTS.HEADER_EVENT, wrapped);
|
|
3047
|
+
}
|
|
3048
|
+
};
|
|
3049
|
+
|
|
2984
3050
|
// src/api/dialog.ts
|
|
2985
3051
|
init_cjs_shims();
|
|
2986
3052
|
var DialogAPI = class {
|
|
@@ -3931,6 +3997,7 @@ var HaexVaultSdk = class {
|
|
|
3931
3997
|
this.mail = new MailAPI(this);
|
|
3932
3998
|
this.notifications = new NotificationsAPI(this);
|
|
3933
3999
|
this.tab = new TabAPI(this);
|
|
4000
|
+
this.header = new HeaderAPI(this);
|
|
3934
4001
|
this.dialog = new DialogAPI(this);
|
|
3935
4002
|
this.openers = new OpenersAPI(this);
|
|
3936
4003
|
this.tools = new ToolsAPI({
|
|
@@ -4815,6 +4882,7 @@ exports.HAEXSPACE_MESSAGE_TYPES = HAEXSPACE_MESSAGE_TYPES;
|
|
|
4815
4882
|
exports.HAEXTENSION_EVENTS = HAEXTENSION_EVENTS;
|
|
4816
4883
|
exports.HaexVaultSdk = HaexVaultSdk;
|
|
4817
4884
|
exports.HaexVaultSdkError = HaexVaultSdkError;
|
|
4885
|
+
exports.HeaderAPI = HeaderAPI;
|
|
4818
4886
|
exports.HostErrorCode = HostErrorCode;
|
|
4819
4887
|
exports.KnownPath = KnownPath;
|
|
4820
4888
|
exports.LOCALSEND_EVENTS = LOCALSEND_EVENTS;
|