@haex-space/vault-sdk 4.4.0 → 4.5.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/cli/index.mjs.map +1 -1
- package/dist/{client-BCUfRZvU.d.mts → client-D4VYF0bP.d.mts} +105 -2
- package/dist/{client-C44dqakd.d.ts → client-Dw2uH1EM.d.ts} +105 -2
- package/dist/haex_bundle_bg.wasm +0 -0
- package/dist/index.d.mts +33 -6
- package/dist/index.d.ts +33 -6
- package/dist/index.js +57 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/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/nuxt.mjs.map +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +54 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +53 -1
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +49 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +49 -0
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +54 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +53 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-DoNvKiW_.d.mts → types-CYuW3glJ.d.mts} +5 -0
- package/dist/{types-DoNvKiW_.d.ts → types-CYuW3glJ.d.ts} +5 -0
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +54 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +53 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as nuxt_app from 'nuxt/app';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
-
import { H as HaexVaultSdk } from '../client-
|
|
4
|
-
import { A as ApplicationContext } from '../types-
|
|
3
|
+
import { H as HaexVaultSdk } from '../client-D4VYF0bP.mjs';
|
|
4
|
+
import { A as ApplicationContext } from '../types-CYuW3glJ.mjs';
|
|
5
5
|
import 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
|
|
7
7
|
declare const _default: nuxt_app.Plugin<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as nuxt_app from 'nuxt/app';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
-
import { H as HaexVaultSdk } from '../client-
|
|
4
|
-
import { A as ApplicationContext } from '../types-
|
|
3
|
+
import { H as HaexVaultSdk } from '../client-Dw2uH1EM.js';
|
|
4
|
+
import { A as ApplicationContext } from '../types-CYuW3glJ.js';
|
|
5
5
|
import 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
|
|
7
7
|
declare const _default: nuxt_app.Plugin<{
|
|
@@ -316,6 +316,18 @@ var PASSWORD_COMMANDS = {
|
|
|
316
316
|
delete: "extension_password_delete"
|
|
317
317
|
};
|
|
318
318
|
|
|
319
|
+
// src/commands/contacts.ts
|
|
320
|
+
var CONTACT_COMMANDS = {
|
|
321
|
+
/** Contacts in scope, a page at a time, optionally of one group */
|
|
322
|
+
list: "extension_contacts_list",
|
|
323
|
+
/** One contact with all its values, by id */
|
|
324
|
+
read: "extension_contacts_read",
|
|
325
|
+
/** Contacts in scope whose name, organization, phone or e-mail matches */
|
|
326
|
+
search: "extension_contacts_search",
|
|
327
|
+
/** The JPEG of a contact's photo, by its hash */
|
|
328
|
+
photo: "extension_contacts_photo"
|
|
329
|
+
};
|
|
330
|
+
|
|
319
331
|
// src/commands/mail.ts
|
|
320
332
|
var MAIL_COMMANDS = {
|
|
321
333
|
/** LIST mailboxes + optional STATUS counts */
|
|
@@ -1489,6 +1501,42 @@ var PasswordsAPI = class {
|
|
|
1489
1501
|
}
|
|
1490
1502
|
};
|
|
1491
1503
|
|
|
1504
|
+
// src/api/contacts.ts
|
|
1505
|
+
var ContactsAPI = class {
|
|
1506
|
+
constructor(client) {
|
|
1507
|
+
this.client = client;
|
|
1508
|
+
}
|
|
1509
|
+
/** One page of the contacts in scope, optionally of one group. */
|
|
1510
|
+
async listAsync(options = {}) {
|
|
1511
|
+
return this.client.request(CONTACT_COMMANDS.list, {
|
|
1512
|
+
...options
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
/** One contact with all its values. */
|
|
1516
|
+
async readAsync(id) {
|
|
1517
|
+
return this.client.request(CONTACT_COMMANDS.read, { id });
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* The contacts in scope whose name, organization, phone number or e-mail
|
|
1521
|
+
* address contains `query`, regardless of case and accents. The host's
|
|
1522
|
+
* default limit is 20, its maximum 200.
|
|
1523
|
+
*/
|
|
1524
|
+
async searchAsync(query, limit) {
|
|
1525
|
+
const answer = await this.client.request(
|
|
1526
|
+
CONTACT_COMMANDS.search,
|
|
1527
|
+
limit === void 0 ? { query } : { query, limit }
|
|
1528
|
+
);
|
|
1529
|
+
return answer.contacts;
|
|
1530
|
+
}
|
|
1531
|
+
/** The JPEG of a photo a readable contact uses, by its hash. */
|
|
1532
|
+
async photoAsync(hash) {
|
|
1533
|
+
const base64 = await this.client.request(CONTACT_COMMANDS.photo, {
|
|
1534
|
+
hash
|
|
1535
|
+
});
|
|
1536
|
+
return base64ToArrayBuffer(base64);
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1492
1540
|
// src/api/mail.ts
|
|
1493
1541
|
var MailAPI = class {
|
|
1494
1542
|
constructor(client) {
|
|
@@ -2632,6 +2680,7 @@ var HaexVaultSdk = class {
|
|
|
2632
2680
|
this.spaces = new SpacesAPI(this);
|
|
2633
2681
|
this.shell = new ShellAPI(this);
|
|
2634
2682
|
this.passwords = new PasswordsAPI(this);
|
|
2683
|
+
this.contacts = new ContactsAPI(this);
|
|
2635
2684
|
this.mail = new MailAPI(this);
|
|
2636
2685
|
this.notifications = new NotificationsAPI(this);
|
|
2637
2686
|
this.tab = new TabAPI(this);
|