@haex-space/vault-sdk 4.6.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client-CcNhK76M.d.mts → client--CgEtJ4G.d.ts} +51 -3
- package/dist/{client-DIvNHfx-.d.ts → client-BlUizM-l.d.mts} +51 -3
- package/dist/index.d.mts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +51 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +51 -1
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +51 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +51 -1
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.js +51 -1
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +51 -1
- 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 +51 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +51 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-snPkjDCj.d.mts → types-3iifP-Q1.d.mts} +2 -0
- package/dist/{types-snPkjDCj.d.ts → types-3iifP-Q1.d.ts} +2 -0
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +51 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +51 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-P_6DqTHl.mjs';
|
|
2
|
-
import { a as ExtensionManifest } from './types-
|
|
2
|
+
import { a as ExtensionManifest } from './types-3iifP-Q1.mjs';
|
|
3
3
|
|
|
4
4
|
interface ReadManifestOptions {
|
|
5
5
|
/** Root directory of the project */
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-P_6DqTHl.js';
|
|
2
|
-
import { a as ExtensionManifest } from './types-
|
|
2
|
+
import { a as ExtensionManifest } from './types-3iifP-Q1.js';
|
|
3
3
|
|
|
4
4
|
interface ReadManifestOptions {
|
|
5
5
|
/** Root directory of the project */
|
package/dist/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StorageAPI } from './client-
|
|
1
|
+
import { S as StorageAPI } from './client-BlUizM-l.mjs';
|
|
2
2
|
import { HaexVaultSdk } from './index.mjs';
|
|
3
3
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
4
4
|
import { HaexHubConfig, ExtensionInfo, ApplicationContext } from './index.mjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StorageAPI } from './client
|
|
1
|
+
import { S as StorageAPI } from './client--CgEtJ4G.js';
|
|
2
2
|
import { HaexVaultSdk } from './index.js';
|
|
3
3
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
4
4
|
import { HaexHubConfig, ExtensionInfo, ApplicationContext } from './index.js';
|
package/dist/react.js
CHANGED
|
@@ -807,6 +807,12 @@ var MAIL_COMMANDS = {
|
|
|
807
807
|
fetchMessage: "extension_mail_fetch_message",
|
|
808
808
|
/** Fetch a single attachment's bytes (base64) by part index */
|
|
809
809
|
fetchAttachment: "extension_mail_fetch_attachment",
|
|
810
|
+
/** Search a mailbox on the server by criteria; answers UIDs, newest first */
|
|
811
|
+
search: "extension_mail_search",
|
|
812
|
+
/** CREATE a mailbox (reports whether it was already there) */
|
|
813
|
+
createMailbox: "extension_mail_create_mailbox",
|
|
814
|
+
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
815
|
+
deleteMessages: "extension_mail_delete_messages",
|
|
810
816
|
/** Set or unset IMAP flags on a UID set */
|
|
811
817
|
setFlags: "extension_mail_set_flags",
|
|
812
818
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -2108,6 +2114,45 @@ var MailAPI = class {
|
|
|
2108
2114
|
partIndex
|
|
2109
2115
|
});
|
|
2110
2116
|
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Search a whole mailbox on the server. Answers the UIDs of the newest `limit` hits (1 to 1000;
|
|
2119
|
+
* all that fit one answer when omitted), newest first, and the number of all hits. Fetch their
|
|
2120
|
+
* envelopes with `fetchEnvelopesAsync` and a `uidList` range.
|
|
2121
|
+
*/
|
|
2122
|
+
async searchMessagesAsync(imap, mailbox, criteria, limit) {
|
|
2123
|
+
return this.client.request(MAIL_COMMANDS.search, {
|
|
2124
|
+
imap,
|
|
2125
|
+
mailbox,
|
|
2126
|
+
criteria,
|
|
2127
|
+
limit
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Create a mailbox. Resolves to `false`, not an error, when it already existed. The name may
|
|
2132
|
+
* contain the server's hierarchy delimiter; `*` and `%` are not allowed.
|
|
2133
|
+
*/
|
|
2134
|
+
async createMailboxAsync(imap, mailbox) {
|
|
2135
|
+
const { created } = await this.client.request(
|
|
2136
|
+
MAIL_COMMANDS.createMailbox,
|
|
2137
|
+
{ imap, mailbox }
|
|
2138
|
+
);
|
|
2139
|
+
return created;
|
|
2140
|
+
}
|
|
2141
|
+
/**
|
|
2142
|
+
* Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
|
|
2143
|
+
* other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,
|
|
2144
|
+
* before anything is marked. If the expunge fails after marking, the messages stay in the
|
|
2145
|
+
* mailbox flagged `\Deleted` and the call rejects; do not show them as deleted. At most 1000 UIDs
|
|
2146
|
+
* per call. For a message that can still be recovered, use `moveMessagesAsync` into the trash
|
|
2147
|
+
* instead.
|
|
2148
|
+
*/
|
|
2149
|
+
async deleteMessagesAsync(imap, mailbox, uids) {
|
|
2150
|
+
return this.client.request(MAIL_COMMANDS.deleteMessages, {
|
|
2151
|
+
imap,
|
|
2152
|
+
mailbox,
|
|
2153
|
+
uids
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2111
2156
|
/**
|
|
2112
2157
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
2113
2158
|
* mark messages as read; `add=false` removes the flag(s).
|
|
@@ -3046,6 +3091,11 @@ var PermissionWaiterRegistry = class {
|
|
|
3046
3091
|
for (const callback of [...set]) callback(decision);
|
|
3047
3092
|
}
|
|
3048
3093
|
};
|
|
3094
|
+
function promptedKey(error) {
|
|
3095
|
+
const details = error.details ?? {};
|
|
3096
|
+
const field = (name) => typeof details[name] === "string" ? details[name] : error[name];
|
|
3097
|
+
return permissionKey(field("resourceType"), field("action"), field("target"));
|
|
3098
|
+
}
|
|
3049
3099
|
function toDeniedError(error) {
|
|
3050
3100
|
return { ...error, code: 1002 /* DENIED */ };
|
|
3051
3101
|
}
|
|
@@ -3058,7 +3108,7 @@ async function withPermissionRetry(send, registry, log, timeoutMs = PERMISSION_D
|
|
|
3058
3108
|
if (!isPermissionPromptError(error) || attempt >= MAX_PERMISSION_PROMPTS) {
|
|
3059
3109
|
throw error;
|
|
3060
3110
|
}
|
|
3061
|
-
const key =
|
|
3111
|
+
const key = promptedKey(error);
|
|
3062
3112
|
const times = asked.get(key) ?? 0;
|
|
3063
3113
|
if (times >= MAX_PERMISSION_RETRIES) throw error;
|
|
3064
3114
|
asked.set(key, times + 1);
|