@haex-space/vault-sdk 4.5.0 → 4.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/README.md +40 -0
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{client-Dw2uH1EM.d.ts → client-DS-j-fHu.d.mts} +179 -2
- package/dist/{client-D4VYF0bP.d.mts → client-DkVe1o-u.d.ts} +179 -2
- package/dist/{config-D_HXjsEV.d.mts → config-P_6DqTHl.d.mts} +2 -1
- package/dist/{config-D_HXjsEV.d.ts → config-P_6DqTHl.d.ts} +2 -1
- package/dist/index.d.mts +42 -8
- package/dist/index.d.ts +42 -8
- package/dist/index.js +143 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -5
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +4 -3
- package/dist/node.d.ts +4 -3
- package/dist/node.mjs +1 -1
- package/dist/node.mjs.map +1 -1
- package/dist/nuxt.d.mts +2 -1
- package/dist/nuxt.d.ts +2 -1
- package/dist/nuxt.js +1 -1
- package/dist/nuxt.js.map +1 -1
- package/dist/react.d.mts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.js +139 -5
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +138 -4
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +4 -3
- package/dist/runtime/nuxt.plugin.client.d.ts +4 -3
- package/dist/runtime/nuxt.plugin.client.js +128 -1
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +128 -1
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +3 -2
- package/dist/svelte.d.ts +3 -2
- package/dist/svelte.js +139 -5
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +138 -4
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-CYuW3glJ.d.mts → types-snPkjDCj.d.mts} +10 -1
- package/dist/{types-CYuW3glJ.d.ts → types-snPkjDCj.d.ts} +10 -1
- package/dist/vite.d.mts +2 -1
- package/dist/vite.d.ts +2 -1
- package/dist/vue.d.mts +3 -2
- package/dist/vue.d.ts +3 -2
- package/dist/vue.js +139 -5
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +138 -4
- package/dist/vue.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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-snPkjDCj.js';
|
|
2
2
|
import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1676,6 +1676,133 @@ declare class ContactsAPI {
|
|
|
1676
1676
|
photoAsync(hash: string): Promise<Uint8Array>;
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
+
/**
|
|
1680
|
+
* Types of model jobs (holzi spec 055, `contracts/job-format.md` and `contracts/bridge.md`).
|
|
1681
|
+
*/
|
|
1682
|
+
/** Where a model runs. Outside this device the user consents before anything is sent. */
|
|
1683
|
+
type ModelPlace = "this_device" | "network" | "cloud";
|
|
1684
|
+
/** The effort a step wishes for; the host caps it at what the user allowed. */
|
|
1685
|
+
type ModelEffort = "none" | "low" | "medium" | "high";
|
|
1686
|
+
/** A model the user allowed to this extension. */
|
|
1687
|
+
interface ExtensionModel {
|
|
1688
|
+
/** The host's model id, only to show and recognise it. */
|
|
1689
|
+
id: string;
|
|
1690
|
+
name: string;
|
|
1691
|
+
/** The display name of the provider. */
|
|
1692
|
+
provider: string;
|
|
1693
|
+
place: ModelPlace;
|
|
1694
|
+
capabilities: {
|
|
1695
|
+
image: boolean;
|
|
1696
|
+
/** `levels`: low, medium and high take effect; `managed`: the model decides itself. */
|
|
1697
|
+
effort: "none" | "managed" | "levels";
|
|
1698
|
+
};
|
|
1699
|
+
/** The highest effort the user allowed. */
|
|
1700
|
+
maxEffort: ModelEffort;
|
|
1701
|
+
}
|
|
1702
|
+
/** An image as Base64, at most 25 MiB raw; at most 8 per job. */
|
|
1703
|
+
interface ModelJobImage {
|
|
1704
|
+
mimeType: "image/jpeg" | "image/png" | "image/webp";
|
|
1705
|
+
data: string;
|
|
1706
|
+
}
|
|
1707
|
+
/** The format a step's answer must have; `schema` is the host's JSON Schema subset. */
|
|
1708
|
+
interface ModelJobFormat {
|
|
1709
|
+
name: string;
|
|
1710
|
+
version: number;
|
|
1711
|
+
schema: Record<string, unknown>;
|
|
1712
|
+
}
|
|
1713
|
+
interface ModelJobStep {
|
|
1714
|
+
/** `[a-z][a-z0-9_-]{0,31}`, unique in the job. */
|
|
1715
|
+
id: string;
|
|
1716
|
+
/** Always `text`; `image` exactly when the step has images. */
|
|
1717
|
+
needs: ("text" | "image")[];
|
|
1718
|
+
/** The extension's instruction to the model, at most 16 KiB. */
|
|
1719
|
+
instruction: string;
|
|
1720
|
+
input: {
|
|
1721
|
+
text?: string;
|
|
1722
|
+
images?: ModelJobImage[];
|
|
1723
|
+
/** A part of an earlier step's result, by JSON Pointer (RFC 6901); empty means all of it. */
|
|
1724
|
+
from?: {
|
|
1725
|
+
step: string;
|
|
1726
|
+
pointer: string;
|
|
1727
|
+
};
|
|
1728
|
+
};
|
|
1729
|
+
format: ModelJobFormat;
|
|
1730
|
+
effort?: ModelEffort;
|
|
1731
|
+
/** Up to the host's limit (default 4096, at most 16384). */
|
|
1732
|
+
maxOutputTokens?: number;
|
|
1733
|
+
}
|
|
1734
|
+
/** One to four steps; a later step can build on an earlier one with `from`. */
|
|
1735
|
+
interface ModelJob {
|
|
1736
|
+
steps: ModelJobStep[];
|
|
1737
|
+
}
|
|
1738
|
+
/** One model the host tried for a step. */
|
|
1739
|
+
interface ModelJobAttempt {
|
|
1740
|
+
model: string;
|
|
1741
|
+
place: ModelPlace;
|
|
1742
|
+
effort: ModelEffort | "managed";
|
|
1743
|
+
outcome: "used" | "unusable" | "unavailable" | "timeout";
|
|
1744
|
+
reason?: string;
|
|
1745
|
+
}
|
|
1746
|
+
/** What produced a step's result. */
|
|
1747
|
+
interface ModelJobProvenance {
|
|
1748
|
+
stepId: string;
|
|
1749
|
+
formatName: string;
|
|
1750
|
+
formatVersion: number;
|
|
1751
|
+
attempts: ModelJobAttempt[];
|
|
1752
|
+
}
|
|
1753
|
+
type ModelJobErrorCode = "unusable" | "unavailable" | "timeout" | "cancelled" | "consent_denied" | "no_capable_model";
|
|
1754
|
+
/** The end of a job, as the event `haextension:model-job:completed` carries it. */
|
|
1755
|
+
interface ModelJobCompletion {
|
|
1756
|
+
jobId: string;
|
|
1757
|
+
status: "completed" | "failed" | "cancelled";
|
|
1758
|
+
/** Each step's checked result, and the last one's as `final`. */
|
|
1759
|
+
result?: {
|
|
1760
|
+
steps: {
|
|
1761
|
+
id: string;
|
|
1762
|
+
result: unknown;
|
|
1763
|
+
}[];
|
|
1764
|
+
final: unknown;
|
|
1765
|
+
};
|
|
1766
|
+
provenance: ModelJobProvenance[];
|
|
1767
|
+
error?: {
|
|
1768
|
+
code: ModelJobErrorCode;
|
|
1769
|
+
message: string;
|
|
1770
|
+
stepId?: string;
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* Jobs on the host's language and vision models (holzi spec 055), instead of bringing own access
|
|
1776
|
+
* and keys. The extension describes each step with its instruction, input and the format of the
|
|
1777
|
+
* answer; the host picks a model the user allowed for this extension, caps the effort, drops
|
|
1778
|
+
* broken output and returns only a result that fits the format.
|
|
1779
|
+
*
|
|
1780
|
+
* The user decides at run time: the first job asks which model the extension may use and up to
|
|
1781
|
+
* which effort, and before data goes to a destination outside this device it asks for consent.
|
|
1782
|
+
* The SDK waits for these answers and starts the job again, like for every other permission.
|
|
1783
|
+
*/
|
|
1784
|
+
declare class ModelsAPI {
|
|
1785
|
+
private client;
|
|
1786
|
+
constructor(client: HaexVaultSdk);
|
|
1787
|
+
/** The models the user allowed to this extension; empty without any. */
|
|
1788
|
+
listAsync(): Promise<ExtensionModel[]>;
|
|
1789
|
+
/** Starts a job; its end comes as {@link onCompleted}. Use {@link runAsync} to await it. */
|
|
1790
|
+
startAsync(job: ModelJob): Promise<{
|
|
1791
|
+
jobId: string;
|
|
1792
|
+
}>;
|
|
1793
|
+
/** Cancels a running job of this frame; `false` when it is unknown or already ended. */
|
|
1794
|
+
cancelAsync(jobId: string): Promise<boolean>;
|
|
1795
|
+
/** Listens for the end of this frame's jobs. Returns an unsubscribe function. */
|
|
1796
|
+
onCompleted(handler: (completion: ModelJobCompletion) => void): () => void;
|
|
1797
|
+
/**
|
|
1798
|
+
* Starts a job and resolves with its end: `completed` with the result, or `failed` or
|
|
1799
|
+
* `cancelled` with the error. Errors of the start itself (an invalid job, a refused model or
|
|
1800
|
+
* consent, no fitting model) reject. The end can arrive before the start answers; it is kept
|
|
1801
|
+
* until then.
|
|
1802
|
+
*/
|
|
1803
|
+
runAsync(job: ModelJob): Promise<ModelJobCompletion>;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1679
1806
|
/**
|
|
1680
1807
|
* Mail types — IMAP fetch + SMTP send.
|
|
1681
1808
|
*
|
|
@@ -1766,6 +1893,34 @@ type FetchRange = {
|
|
|
1766
1893
|
type: "uidList";
|
|
1767
1894
|
uids: number[];
|
|
1768
1895
|
};
|
|
1896
|
+
/**
|
|
1897
|
+
* Criteria of `MailAPI.searchMessagesAsync`. All given criteria must hold. Texts are matched
|
|
1898
|
+
* ignoring case, are at most 200 characters long, not blank and contain no control characters;
|
|
1899
|
+
* leave a criterion out instead of passing `""`. Dates must name real days. At least one
|
|
1900
|
+
* criterion is required. This is not an IMAP expression: the host builds the command itself.
|
|
1901
|
+
*/
|
|
1902
|
+
interface MailSearchCriteria {
|
|
1903
|
+
/** Header and body text. */
|
|
1904
|
+
text?: string;
|
|
1905
|
+
from?: string;
|
|
1906
|
+
to?: string;
|
|
1907
|
+
subject?: string;
|
|
1908
|
+
/** `YYYY-MM-DD`, inclusive. */
|
|
1909
|
+
since?: string;
|
|
1910
|
+
/** `YYYY-MM-DD`, exclusive. */
|
|
1911
|
+
before?: string;
|
|
1912
|
+
/** `true` for unread, `false` for read messages. */
|
|
1913
|
+
unseen?: boolean;
|
|
1914
|
+
/** `true` for flagged, `false` for not flagged messages. */
|
|
1915
|
+
flagged?: boolean;
|
|
1916
|
+
}
|
|
1917
|
+
/** The newest hits of a search and the number of all hits. */
|
|
1918
|
+
interface MailSearchResult {
|
|
1919
|
+
/** UIDs of the newest hits, newest (highest UID) first. */
|
|
1920
|
+
uids: number[];
|
|
1921
|
+
/** How many messages matched in all. */
|
|
1922
|
+
total: number;
|
|
1923
|
+
}
|
|
1769
1924
|
interface OutgoingAttachment {
|
|
1770
1925
|
filename: string;
|
|
1771
1926
|
contentType: string;
|
|
@@ -1831,6 +1986,26 @@ declare class MailAPI {
|
|
|
1831
1986
|
* viewing or downloading.
|
|
1832
1987
|
*/
|
|
1833
1988
|
fetchAttachmentAsync(imap: ImapConfig, mailbox: string, uid: number, partIndex: number): Promise<string>;
|
|
1989
|
+
/**
|
|
1990
|
+
* Search a whole mailbox on the server. Answers the UIDs of the newest `limit` hits (1 to 1000;
|
|
1991
|
+
* all that fit one answer when omitted), newest first, and the number of all hits. Fetch their
|
|
1992
|
+
* envelopes with `fetchEnvelopesAsync` and a `uidList` range.
|
|
1993
|
+
*/
|
|
1994
|
+
searchMessagesAsync(imap: ImapConfig, mailbox: string, criteria: MailSearchCriteria, limit?: number): Promise<MailSearchResult>;
|
|
1995
|
+
/**
|
|
1996
|
+
* Create a mailbox. Resolves to `false`, not an error, when it already existed. The name may
|
|
1997
|
+
* contain the server's hierarchy delimiter; `*` and `%` are not allowed.
|
|
1998
|
+
*/
|
|
1999
|
+
createMailboxAsync(imap: ImapConfig, mailbox: string): Promise<boolean>;
|
|
2000
|
+
/**
|
|
2001
|
+
* Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
|
|
2002
|
+
* other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,
|
|
2003
|
+
* before anything is marked. If the expunge fails after marking, the messages stay in the
|
|
2004
|
+
* mailbox flagged `\Deleted` and the call rejects; do not show them as deleted. At most 1000 UIDs
|
|
2005
|
+
* per call. For a message that can still be recovered, use `moveMessagesAsync` into the trash
|
|
2006
|
+
* instead.
|
|
2007
|
+
*/
|
|
2008
|
+
deleteMessagesAsync(imap: ImapConfig, mailbox: string, uids: number[]): Promise<void>;
|
|
1834
2009
|
/**
|
|
1835
2010
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
1836
2011
|
* mark messages as read; `add=false` removes the flag(s).
|
|
@@ -2106,6 +2281,7 @@ declare class HaexVaultSdk {
|
|
|
2106
2281
|
readonly shell: ShellAPI;
|
|
2107
2282
|
readonly passwords: PasswordsAPI;
|
|
2108
2283
|
readonly contacts: ContactsAPI;
|
|
2284
|
+
readonly models: ModelsAPI;
|
|
2109
2285
|
readonly mail: MailAPI;
|
|
2110
2286
|
readonly notifications: NotificationsAPI;
|
|
2111
2287
|
readonly tab: TabAPI;
|
|
@@ -2162,4 +2338,5 @@ declare class HaexVaultSdk {
|
|
|
2162
2338
|
private log;
|
|
2163
2339
|
}
|
|
2164
2340
|
|
|
2165
|
-
export {
|
|
2341
|
+
export { DatabaseAPI as D, HaexVaultSdk as H, FilesystemAPI as L, KnownPath as N, LOCALSEND_EVENTS as P, LocalSendAPI as Q, StorageAPI as S, MailAPI as V, RemoteStorageAPI as aB, ShellAPI as aO, SpacesAPI as a_, ModelsAPI as ae, NotificationsAPI as ai, PasswordsAPI as aq, PermissionsAPI as at, TabAPI as b0, ToolsAPI as b3, WebAPI as b7, canExternalClientSendRequests as b8, isExternalClientConnected as b9, ContactsAPI as i, DialogAPI as o, EncryptedFoldersAPI as t, ExternalConnectionErrorCode as x, ExternalConnectionState as y };
|
|
2342
|
+
export type { MailNewMessagesEvent 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, ImapConfig as M, KnownPaths as O, LocalSendEvent as R, FileInfo as T, LocalSendSettings as U, MailAccount as W, MailAddress as X, Attachment as Y, FetchRange as Z, MailMessage as _, ConnectionSecurity as a, SyncBackendInfo as a$, MailSearchCriteria as a0, MailSearchResult as a1, MailboxInfo as a2, MessageEnvelope as a3, ModelEffort as a4, ModelJob as a5, ModelJobAttempt as a6, ModelJobCompletion as a7, ModelJobErrorCode as a8, ModelJobFormat as a9, SftpProposal as aA, StorageBackendInfo as aC, StorageBackendType as aD, StorageObjectInfo as aE, UpdateBackendRequest as aF, WebDavProposal as aG, RequestedExtension as aH, SelectFileOptions as aI, SelectFolderOptions as aJ, ServerInfo as aK, ServerStatus as aL, SessionAuthorization as aM, SharedSpace as aN, ShellCreateOptions as aP, ShellCreateResponse as aQ, ShellExitEvent as aR, ShellOutputEvent as aS, SmtpConfig as aT, SpaceAccessTokenInfo as aU, SpaceAssignment as aV, SpaceInvite as aW, SpaceKeyGrantInfo as aX, SpaceMember as aY, SpaceMemberInfo as aZ, ModelJobImage as aa, ModelJobProvenance as ab, ModelJobStep as ac, ModelPlace as ad, NotificationAction as af, NotificationClickEvent as ag, NotificationOptions as ah, OutgoingAttachment as aj, OutgoingMessage as ak, PasswordInput as al, PasswordItemFull as am, PasswordItemSummary as an, PasswordKeyValue as ao, PasswordKeyValueInput as ap, PendingAuthorization as ar, PendingTransfer as as, AddBackendRequest as au, FolderBackendInfo as av, S3BackendInfo as aw, S3Config as ax, S3Proposal as ay, S3PublicConfig as az, ContactDetail as b, ToolContext as b1, ToolHandler as b2, TransferDirection as b4, TransferProgress as b5, TransferState as b6, 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 };
|
|
@@ -30,4 +30,5 @@ declare function readHaextensionConfig(rootDir?: string): HaextensionConfig | nu
|
|
|
30
30
|
*/
|
|
31
31
|
declare function getExtensionDir(rootDir?: string): string;
|
|
32
32
|
|
|
33
|
-
export {
|
|
33
|
+
export { getExtensionDir as g, readHaextensionConfig as r };
|
|
34
|
+
export type { HaextensionConfig as H };
|
|
@@ -30,4 +30,5 @@ declare function readHaextensionConfig(rootDir?: string): HaextensionConfig | nu
|
|
|
30
30
|
*/
|
|
31
31
|
declare function getExtensionDir(rootDir?: string): string;
|
|
32
32
|
|
|
33
|
-
export {
|
|
33
|
+
export { getExtensionDir as g, readHaextensionConfig as r };
|
|
34
|
+
export type { HaextensionConfig as H };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
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
|
|
5
|
-
export { H as HaextensionConfig } from './config-
|
|
1
|
+
import { H as HaexVaultSdk } from './client-DS-j-fHu.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 ImapConfig, N as KnownPath, O as KnownPaths, P as LOCALSEND_EVENTS, Q as LocalSendAPI, R as LocalSendEvent, T as LocalSendFileInfo, U as LocalSendSettings, V as MailAPI, W as MailAccount, X as MailAddress, Y as MailAttachment, Z as MailFetchRange, _ as MailMessage, $ as MailNewMessagesEvent, a0 as MailSearchCriteria, a1 as MailSearchResult, a2 as MailboxInfo, a3 as MessageEnvelope, a4 as ModelEffort, a5 as ModelJob, a6 as ModelJobAttempt, a7 as ModelJobCompletion, a8 as ModelJobErrorCode, a9 as ModelJobFormat, aa as ModelJobImage, ab as ModelJobProvenance, ac as ModelJobStep, ad as ModelPlace, ae as ModelsAPI, af as NotificationAction, ag as NotificationClickEvent, ah as NotificationOptions, ai as NotificationsAPI, aj as OutgoingAttachment, ak as OutgoingMessage, al as PasswordInput, am as PasswordItemFull, an as PasswordItemSummary, ao as PasswordKeyValue, ap as PasswordKeyValueInput, aq as PasswordsAPI, ar as PendingAuthorization, as as PendingTransfer, at as PermissionsAPI, au as RemoteAddBackendRequest, av as RemoteFolderBackendInfo, aw as RemoteS3BackendInfo, ax as RemoteS3Config, ay as RemoteS3Proposal, az as RemoteS3PublicConfig, aA as RemoteSftpProposal, aB as RemoteStorageAPI, aC as RemoteStorageBackendInfo, aD as RemoteStorageBackendType, aE as RemoteStorageObjectInfo, aF as RemoteUpdateBackendRequest, aG as RemoteWebDavProposal, aH as RequestedExtension, aI as SelectFileOptions, aJ as SelectFolderOptions, aK as ServerInfo, aL as ServerStatus, aM as SessionAuthorization, aN as SharedSpace, aO as ShellAPI, aP as ShellCreateOptions, aQ as ShellCreateResponse, aR as ShellExitEvent, aS as ShellOutputEvent, aT as SmtpConfig, aU as SpaceAccessTokenInfo, aV as SpaceAssignment, aW as SpaceInvite, aX as SpaceKeyGrantInfo, aY as SpaceMember, aZ as SpaceMemberInfo, a_ as SpacesAPI, a$ as SyncBackendInfo, b0 as TabAPI, b1 as ToolContext, b2 as ToolHandler, b3 as ToolsAPI, b4 as TransferDirection, b5 as TransferProgress, b6 as TransferState, b7 as WebAPI, b8 as canExternalClientSendRequests, b9 as isExternalClientConnected } from './client-DS-j-fHu.mjs';
|
|
3
|
+
import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-snPkjDCj.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 PermissionDeniedError, X as PermissionErrorBase, Y as PermissionErrorCode, Z as PermissionPromptError, P as PermissionResponse, _ as PermissionStatus, R as RequestOptions, $ as SHELL_EVENTS, a0 as SearchQuery, a1 as SearchRequestEvent, S as SearchResult, a2 as ShellEvent, a3 as SyncTablesUpdatedEvent, a4 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a5 as getTableName, a6 as isPermissionDeniedError, a7 as isPermissionError, a8 as isPermissionPromptError } from './types-snPkjDCj.mjs';
|
|
5
|
+
export { H as HaextensionConfig } from './config-P_6DqTHl.mjs';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -150,11 +150,30 @@ declare const CONTACT_COMMANDS: {
|
|
|
150
150
|
};
|
|
151
151
|
type ContactCommand = (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS];
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Model Commands
|
|
155
|
+
*
|
|
156
|
+
* Commands for jobs on the host's language and vision models (holzi spec 055). The extension
|
|
157
|
+
* describes the job; the host picks a model the user allowed, checks the answer against the
|
|
158
|
+
* job's format and sends the result as `haextension:model-job:completed`.
|
|
159
|
+
*
|
|
160
|
+
* Naming convention: `extension_model_<action>`
|
|
161
|
+
*/
|
|
162
|
+
declare const MODEL_COMMANDS: {
|
|
163
|
+
/** The models the user allowed to this extension, without addresses or keys */
|
|
164
|
+
readonly list: "extension_model_list";
|
|
165
|
+
/** Starts a job; the result follows as an event */
|
|
166
|
+
readonly start: "extension_model_job_start";
|
|
167
|
+
/** Cancels a running job of this frame */
|
|
168
|
+
readonly cancel: "extension_model_job_cancel";
|
|
169
|
+
};
|
|
170
|
+
type ModelCommand = (typeof MODEL_COMMANDS)[keyof typeof MODEL_COMMANDS];
|
|
171
|
+
|
|
153
172
|
/**
|
|
154
173
|
* Mail Commands (IMAP fetch + SMTP send).
|
|
155
174
|
*
|
|
156
175
|
* Permissions are split protocol-wise: `fetch` covers all IMAP
|
|
157
|
-
* operations (list/read/flag/move/append), `send` covers SMTP, `poll`
|
|
176
|
+
* operations (list/read/search/flag/move/append/create/delete), `send` covers SMTP, `poll`
|
|
158
177
|
* covers background new-mail watching (startWatch/stopWatch). Target
|
|
159
178
|
* matches mail-server hostnames; subdomain match is supported, so
|
|
160
179
|
* target="gmail.com" grants access to "imap.gmail.com" and
|
|
@@ -171,6 +190,12 @@ declare const MAIL_COMMANDS: {
|
|
|
171
190
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
172
191
|
/** Fetch a single attachment's bytes (base64) by part index */
|
|
173
192
|
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
193
|
+
/** Search a mailbox on the server by criteria; answers UIDs, newest first */
|
|
194
|
+
readonly search: "extension_mail_search";
|
|
195
|
+
/** CREATE a mailbox (reports whether it was already there) */
|
|
196
|
+
readonly createMailbox: "extension_mail_create_mailbox";
|
|
197
|
+
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
198
|
+
readonly deleteMessages: "extension_mail_delete_messages";
|
|
174
199
|
/** Set or unset IMAP flags on a UID set */
|
|
175
200
|
readonly setFlags: "extension_mail_set_flags";
|
|
176
201
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -866,11 +891,19 @@ declare const TAURI_COMMANDS: {
|
|
|
866
891
|
readonly search: "extension_contacts_search";
|
|
867
892
|
readonly photo: "extension_contacts_photo";
|
|
868
893
|
};
|
|
894
|
+
readonly models: {
|
|
895
|
+
readonly list: "extension_model_list";
|
|
896
|
+
readonly start: "extension_model_job_start";
|
|
897
|
+
readonly cancel: "extension_model_job_cancel";
|
|
898
|
+
};
|
|
869
899
|
readonly mail: {
|
|
870
900
|
readonly listMailboxes: "extension_mail_list_mailboxes";
|
|
871
901
|
readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
|
|
872
902
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
873
903
|
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
904
|
+
readonly search: "extension_mail_search";
|
|
905
|
+
readonly createMailbox: "extension_mail_create_mailbox";
|
|
906
|
+
readonly deleteMessages: "extension_mail_delete_messages";
|
|
874
907
|
readonly setFlags: "extension_mail_set_flags";
|
|
875
908
|
readonly moveMessages: "extension_mail_move_messages";
|
|
876
909
|
readonly appendMessage: "extension_mail_append_message";
|
|
@@ -884,7 +917,7 @@ declare const TAURI_COMMANDS: {
|
|
|
884
917
|
readonly dismiss: "extension_notifications_dismiss";
|
|
885
918
|
};
|
|
886
919
|
};
|
|
887
|
-
type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
920
|
+
type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS] | (typeof MODEL_COMMANDS)[keyof typeof MODEL_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
888
921
|
|
|
889
922
|
/**
|
|
890
923
|
* Crypto utilities for Vault Key Management
|
|
@@ -1151,4 +1184,5 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1151
1184
|
|
|
1152
1185
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1153
1186
|
|
|
1154
|
-
export {
|
|
1187
|
+
export { CONTACT_COMMANDS, COSE_ALGORITHM, ENCRYPTED_FOLDER_COMMANDS, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, MODEL_COMMANDS, NOTIFICATION_COMMANDS, PASSWORD_COMMANDS, SIGNING_ALGO, SPACE_COMMANDS, SignedClaimPresentation, TAURI_COMMANDS, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
|
1188
|
+
export type { AuthUser, ContactCommand, CoseAlgorithm, CreateSpaceRequest, EncryptedFolderCommand, ExportedPasskeyKeyPair, ExportedUserKeypair, HaexspaceMessageType, InviteMemberRequest, MailCommand, ModelCommand, NotificationCommand, PasskeyKeyPair, PasswordCommand, RegisterKeypairRequest, SealedData, SignableRecord, SpaceCommand, StorageConfig, ErrorResponse as SyncServerErrorResponse, ServerInfo as SyncServerInfo, LoginRequest as SyncServerLoginRequest, LoginResponse as SyncServerLoginResponse, RefreshRequest as SyncServerRefreshRequest, TauriCommand, UserKeypair };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
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
|
|
5
|
-
export { H as HaextensionConfig } from './config-
|
|
1
|
+
import { H as HaexVaultSdk } from './client-DkVe1o-u.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 ImapConfig, N as KnownPath, O as KnownPaths, P as LOCALSEND_EVENTS, Q as LocalSendAPI, R as LocalSendEvent, T as LocalSendFileInfo, U as LocalSendSettings, V as MailAPI, W as MailAccount, X as MailAddress, Y as MailAttachment, Z as MailFetchRange, _ as MailMessage, $ as MailNewMessagesEvent, a0 as MailSearchCriteria, a1 as MailSearchResult, a2 as MailboxInfo, a3 as MessageEnvelope, a4 as ModelEffort, a5 as ModelJob, a6 as ModelJobAttempt, a7 as ModelJobCompletion, a8 as ModelJobErrorCode, a9 as ModelJobFormat, aa as ModelJobImage, ab as ModelJobProvenance, ac as ModelJobStep, ad as ModelPlace, ae as ModelsAPI, af as NotificationAction, ag as NotificationClickEvent, ah as NotificationOptions, ai as NotificationsAPI, aj as OutgoingAttachment, ak as OutgoingMessage, al as PasswordInput, am as PasswordItemFull, an as PasswordItemSummary, ao as PasswordKeyValue, ap as PasswordKeyValueInput, aq as PasswordsAPI, ar as PendingAuthorization, as as PendingTransfer, at as PermissionsAPI, au as RemoteAddBackendRequest, av as RemoteFolderBackendInfo, aw as RemoteS3BackendInfo, ax as RemoteS3Config, ay as RemoteS3Proposal, az as RemoteS3PublicConfig, aA as RemoteSftpProposal, aB as RemoteStorageAPI, aC as RemoteStorageBackendInfo, aD as RemoteStorageBackendType, aE as RemoteStorageObjectInfo, aF as RemoteUpdateBackendRequest, aG as RemoteWebDavProposal, aH as RequestedExtension, aI as SelectFileOptions, aJ as SelectFolderOptions, aK as ServerInfo, aL as ServerStatus, aM as SessionAuthorization, aN as SharedSpace, aO as ShellAPI, aP as ShellCreateOptions, aQ as ShellCreateResponse, aR as ShellExitEvent, aS as ShellOutputEvent, aT as SmtpConfig, aU as SpaceAccessTokenInfo, aV as SpaceAssignment, aW as SpaceInvite, aX as SpaceKeyGrantInfo, aY as SpaceMember, aZ as SpaceMemberInfo, a_ as SpacesAPI, a$ as SyncBackendInfo, b0 as TabAPI, b1 as ToolContext, b2 as ToolHandler, b3 as ToolsAPI, b4 as TransferDirection, b5 as TransferProgress, b6 as TransferState, b7 as WebAPI, b8 as canExternalClientSendRequests, b9 as isExternalClientConnected } from './client-DkVe1o-u.js';
|
|
3
|
+
import { h as SignedClaimPresentation, H as HaexHubConfig } from './types-snPkjDCj.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 PermissionDeniedError, X as PermissionErrorBase, Y as PermissionErrorCode, Z as PermissionPromptError, P as PermissionResponse, _ as PermissionStatus, R as RequestOptions, $ as SHELL_EVENTS, a0 as SearchQuery, a1 as SearchRequestEvent, S as SearchResult, a2 as ShellEvent, a3 as SyncTablesUpdatedEvent, a4 as TABLE_SEPARATOR, W as WebRequestOptions, e as WebResponse, a5 as getTableName, a6 as isPermissionDeniedError, a7 as isPermissionError, a8 as isPermissionPromptError } from './types-snPkjDCj.js';
|
|
5
|
+
export { H as HaextensionConfig } from './config-P_6DqTHl.js';
|
|
6
6
|
import 'drizzle-orm/sqlite-proxy';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -150,11 +150,30 @@ declare const CONTACT_COMMANDS: {
|
|
|
150
150
|
};
|
|
151
151
|
type ContactCommand = (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS];
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Model Commands
|
|
155
|
+
*
|
|
156
|
+
* Commands for jobs on the host's language and vision models (holzi spec 055). The extension
|
|
157
|
+
* describes the job; the host picks a model the user allowed, checks the answer against the
|
|
158
|
+
* job's format and sends the result as `haextension:model-job:completed`.
|
|
159
|
+
*
|
|
160
|
+
* Naming convention: `extension_model_<action>`
|
|
161
|
+
*/
|
|
162
|
+
declare const MODEL_COMMANDS: {
|
|
163
|
+
/** The models the user allowed to this extension, without addresses or keys */
|
|
164
|
+
readonly list: "extension_model_list";
|
|
165
|
+
/** Starts a job; the result follows as an event */
|
|
166
|
+
readonly start: "extension_model_job_start";
|
|
167
|
+
/** Cancels a running job of this frame */
|
|
168
|
+
readonly cancel: "extension_model_job_cancel";
|
|
169
|
+
};
|
|
170
|
+
type ModelCommand = (typeof MODEL_COMMANDS)[keyof typeof MODEL_COMMANDS];
|
|
171
|
+
|
|
153
172
|
/**
|
|
154
173
|
* Mail Commands (IMAP fetch + SMTP send).
|
|
155
174
|
*
|
|
156
175
|
* Permissions are split protocol-wise: `fetch` covers all IMAP
|
|
157
|
-
* operations (list/read/flag/move/append), `send` covers SMTP, `poll`
|
|
176
|
+
* operations (list/read/search/flag/move/append/create/delete), `send` covers SMTP, `poll`
|
|
158
177
|
* covers background new-mail watching (startWatch/stopWatch). Target
|
|
159
178
|
* matches mail-server hostnames; subdomain match is supported, so
|
|
160
179
|
* target="gmail.com" grants access to "imap.gmail.com" and
|
|
@@ -171,6 +190,12 @@ declare const MAIL_COMMANDS: {
|
|
|
171
190
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
172
191
|
/** Fetch a single attachment's bytes (base64) by part index */
|
|
173
192
|
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
193
|
+
/** Search a mailbox on the server by criteria; answers UIDs, newest first */
|
|
194
|
+
readonly search: "extension_mail_search";
|
|
195
|
+
/** CREATE a mailbox (reports whether it was already there) */
|
|
196
|
+
readonly createMailbox: "extension_mail_create_mailbox";
|
|
197
|
+
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
198
|
+
readonly deleteMessages: "extension_mail_delete_messages";
|
|
174
199
|
/** Set or unset IMAP flags on a UID set */
|
|
175
200
|
readonly setFlags: "extension_mail_set_flags";
|
|
176
201
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -866,11 +891,19 @@ declare const TAURI_COMMANDS: {
|
|
|
866
891
|
readonly search: "extension_contacts_search";
|
|
867
892
|
readonly photo: "extension_contacts_photo";
|
|
868
893
|
};
|
|
894
|
+
readonly models: {
|
|
895
|
+
readonly list: "extension_model_list";
|
|
896
|
+
readonly start: "extension_model_job_start";
|
|
897
|
+
readonly cancel: "extension_model_job_cancel";
|
|
898
|
+
};
|
|
869
899
|
readonly mail: {
|
|
870
900
|
readonly listMailboxes: "extension_mail_list_mailboxes";
|
|
871
901
|
readonly fetchEnvelopes: "extension_mail_fetch_envelopes";
|
|
872
902
|
readonly fetchMessage: "extension_mail_fetch_message";
|
|
873
903
|
readonly fetchAttachment: "extension_mail_fetch_attachment";
|
|
904
|
+
readonly search: "extension_mail_search";
|
|
905
|
+
readonly createMailbox: "extension_mail_create_mailbox";
|
|
906
|
+
readonly deleteMessages: "extension_mail_delete_messages";
|
|
874
907
|
readonly setFlags: "extension_mail_set_flags";
|
|
875
908
|
readonly moveMessages: "extension_mail_move_messages";
|
|
876
909
|
readonly appendMessage: "extension_mail_append_message";
|
|
@@ -884,7 +917,7 @@ declare const TAURI_COMMANDS: {
|
|
|
884
917
|
readonly dismiss: "extension_notifications_dismiss";
|
|
885
918
|
};
|
|
886
919
|
};
|
|
887
|
-
type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
920
|
+
type TauriCommand = (typeof DATABASE_COMMANDS)[keyof typeof DATABASE_COMMANDS] | (typeof PERMISSIONS_COMMANDS)[keyof typeof PERMISSIONS_COMMANDS] | (typeof WEB_COMMANDS)[keyof typeof WEB_COMMANDS] | (typeof WEB_STORAGE_COMMANDS)[keyof typeof WEB_STORAGE_COMMANDS] | (typeof FILESYSTEM_COMMANDS)[keyof typeof FILESYSTEM_COMMANDS] | (typeof EXTERNAL_BRIDGE_COMMANDS)[keyof typeof EXTERNAL_BRIDGE_COMMANDS] | (typeof EXTENSION_COMMANDS)[keyof typeof EXTENSION_COMMANDS] | (typeof REMOTE_STORAGE_COMMANDS)[keyof typeof REMOTE_STORAGE_COMMANDS] | (typeof ENCRYPTED_FOLDER_COMMANDS)[keyof typeof ENCRYPTED_FOLDER_COMMANDS] | (typeof LOCALSEND_COMMANDS)[keyof typeof LOCALSEND_COMMANDS] | (typeof SPACE_COMMANDS)[keyof typeof SPACE_COMMANDS] | (typeof SHELL_COMMANDS)[keyof typeof SHELL_COMMANDS] | (typeof PASSWORD_COMMANDS)[keyof typeof PASSWORD_COMMANDS] | (typeof CONTACT_COMMANDS)[keyof typeof CONTACT_COMMANDS] | (typeof MODEL_COMMANDS)[keyof typeof MODEL_COMMANDS] | (typeof MAIL_COMMANDS)[keyof typeof MAIL_COMMANDS] | (typeof NOTIFICATION_COMMANDS)[keyof typeof NOTIFICATION_COMMANDS];
|
|
888
921
|
|
|
889
922
|
/**
|
|
890
923
|
* Crypto utilities for Vault Key Management
|
|
@@ -1151,4 +1184,5 @@ declare function exportKeyPairAsync(keyPair: PasskeyKeyPair): Promise<ExportedPa
|
|
|
1151
1184
|
|
|
1152
1185
|
declare function createHaexVaultSdk(config?: HaexHubConfig): HaexVaultSdk;
|
|
1153
1186
|
|
|
1154
|
-
export {
|
|
1187
|
+
export { CONTACT_COMMANDS, COSE_ALGORITHM, ENCRYPTED_FOLDER_COMMANDS, HAEXSPACE_MESSAGE_TYPES, HaexHubConfig, HaexVaultSdk, KEY_AGREEMENT_ALGO, MAIL_COMMANDS, MODEL_COMMANDS, NOTIFICATION_COMMANDS, PASSWORD_COMMANDS, SIGNING_ALGO, SPACE_COMMANDS, SignedClaimPresentation, TAURI_COMMANDS, arrayBufferToBase64, base58btcDecode, base58btcEncode, base64ToArrayBuffer, createHaexVaultSdk, decryptCrdtData, decryptPrivateKeyAsync, decryptSpaceNameAsync, decryptString, decryptVaultKey, decryptVaultName, decryptWithPrivateKeyAsync, deriveKeyFromPassword, didKeyToPublicKeyAsync, encryptCrdtData, encryptPrivateKeyAsync, encryptSpaceNameAsync, encryptString, encryptVaultKey, encryptWithPublicKeyAsync, exportKeyPairAsync, exportPrivateKeyAsync, exportPublicKeyAsync, exportPublicKeyCoseAsync, exportUserKeypairAsync, generateCredentialId, generateIdentityAsync, generatePasskeyPairAsync, generateSpaceKey, generateUserKeypairAsync, generateVaultKey, importPrivateKeyAsync, importPrivateKeyForKeyAgreementAsync, importPublicKeyAsync, importPublicKeyForKeyAgreementAsync, importUserPrivateKeyAsync, importUserPublicKeyAsync, installBaseTag, installCookiePolyfill, installHistoryPolyfill, installLocalStoragePolyfill, installPolyfills, installSessionStoragePolyfill, publicKeyToDidKeyAsync, signClaimPresentationAsync, signRecordAsync, signSpaceChallengeAsync, signWithPasskeyAsync, unwrapKey, verifyClaimPresentationAsync, verifyRecordSignatureAsync, verifySpaceChallengeAsync, verifyWithPasskeyAsync, wrapKey };
|
|
1188
|
+
export type { AuthUser, ContactCommand, CoseAlgorithm, CreateSpaceRequest, EncryptedFolderCommand, ExportedPasskeyKeyPair, ExportedUserKeypair, HaexspaceMessageType, InviteMemberRequest, MailCommand, ModelCommand, NotificationCommand, PasskeyKeyPair, PasswordCommand, RegisterKeypairRequest, SealedData, SignableRecord, SpaceCommand, StorageConfig, ErrorResponse as SyncServerErrorResponse, ServerInfo as SyncServerInfo, LoginRequest as SyncServerLoginRequest, LoginResponse as SyncServerLoginResponse, RefreshRequest as SyncServerRefreshRequest, TauriCommand, UserKeypair };
|