@xmtp/wasm-bindings 1.0.0 → 1.1.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/bindings_wasm.d.ts +55 -53
- package/dist/bindings_wasm.js +78 -67
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +51 -50
- package/package.json +1 -1
package/dist/bindings_wasm.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export function decodeMultiRemoteAttachment(bytes: Uint8Array): MultiRemoteAttac
|
|
|
5
5
|
export function encodeReaction(reaction: Reaction): Uint8Array;
|
|
6
6
|
export function decodeReaction(bytes: Uint8Array): Reaction;
|
|
7
7
|
export function verifySignedWithPublicKey(signature_text: string, signature_bytes: Uint8Array, public_key: Uint8Array): void;
|
|
8
|
+
export function createClient(host: string, inbox_id: string, account_identifier: Identifier, db_path?: string | null, encryption_key?: Uint8Array | null, history_sync_url?: string | null, log_options?: LogOptions | null): Promise<Client>;
|
|
8
9
|
export function getInboxIdForIdentifier(host: string, accountIdentifier: Identifier): Promise<string | undefined>;
|
|
9
10
|
export function generateInboxId(accountIdentifier: Identifier): string;
|
|
10
|
-
export function createClient(host: string, inbox_id: string, account_identifier: Identifier, db_path?: string | null, encryption_key?: Uint8Array | null, history_sync_url?: string | null, log_options?: LogOptions | null): Promise<Client>;
|
|
11
11
|
export enum ConsentEntityType {
|
|
12
12
|
GroupId = 0,
|
|
13
13
|
InboxId = 1,
|
|
@@ -131,8 +131,6 @@ export class Client {
|
|
|
131
131
|
applySignatureRequests(): Promise<void>;
|
|
132
132
|
signWithInstallationKey(signature_text: string): Uint8Array;
|
|
133
133
|
verifySignedWithInstallationKey(signature_text: string, signature_bytes: Uint8Array): void;
|
|
134
|
-
setConsentStates(records: Consent[]): Promise<void>;
|
|
135
|
-
getConsentState(entity_type: ConsentEntityType, entity: string): Promise<ConsentState>;
|
|
136
134
|
/**
|
|
137
135
|
* Output booleans should be zipped with the index of input identifiers
|
|
138
136
|
*/
|
|
@@ -141,6 +139,7 @@ export class Client {
|
|
|
141
139
|
sendHistorySyncRequest(): Promise<void>;
|
|
142
140
|
sendConsentSyncRequest(): Promise<void>;
|
|
143
141
|
findInboxIdByIdentifier(identifier: Identifier): Promise<string | undefined>;
|
|
142
|
+
inboxStateFromInboxIds(inbox_ids: string[], refresh_from_network: boolean): Promise<InboxState[]>;
|
|
144
143
|
conversations(): Conversations;
|
|
145
144
|
/**
|
|
146
145
|
*
|
|
@@ -152,6 +151,8 @@ export class Client {
|
|
|
152
151
|
*/
|
|
153
152
|
inboxState(refresh_from_network: boolean): Promise<InboxState>;
|
|
154
153
|
getLatestInboxState(inbox_id: string): Promise<InboxState>;
|
|
154
|
+
setConsentStates(records: Consent[]): Promise<void>;
|
|
155
|
+
getConsentState(entity_type: ConsentEntityType, entity: string): Promise<ConsentState>;
|
|
155
156
|
readonly accountIdentifier: Identifier;
|
|
156
157
|
readonly inboxId: string;
|
|
157
158
|
readonly isRegistered: boolean;
|
|
@@ -647,6 +648,53 @@ export interface InitOutput {
|
|
|
647
648
|
readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
648
649
|
readonly __wbg_set_reaction_reference: (a: number, b: number, c: number) => void;
|
|
649
650
|
readonly __wbg_get_reaction_reference: (a: number) => [number, number];
|
|
651
|
+
readonly __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
652
|
+
readonly streamcloser_end: (a: number) => void;
|
|
653
|
+
readonly streamcloser_endAndWait: (a: number) => any;
|
|
654
|
+
readonly streamcloser_waitForReady: (a: number) => any;
|
|
655
|
+
readonly streamcloser_isClosed: (a: number) => number;
|
|
656
|
+
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
657
|
+
readonly __wbg_logoptions_free: (a: number, b: number) => void;
|
|
658
|
+
readonly __wbg_get_logoptions_structured: (a: number) => number;
|
|
659
|
+
readonly __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
660
|
+
readonly __wbg_get_logoptions_performance: (a: number) => number;
|
|
661
|
+
readonly __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
662
|
+
readonly __wbg_get_logoptions_level: (a: number) => number;
|
|
663
|
+
readonly __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
664
|
+
readonly logoptions_new: (a: number, b: number, c: number) => number;
|
|
665
|
+
readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
666
|
+
readonly client_accountIdentifier: (a: number) => any;
|
|
667
|
+
readonly client_inboxId: (a: number) => [number, number];
|
|
668
|
+
readonly client_isRegistered: (a: number) => number;
|
|
669
|
+
readonly client_installationId: (a: number) => [number, number];
|
|
670
|
+
readonly client_installationIdBytes: (a: number) => any;
|
|
671
|
+
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
672
|
+
readonly client_registerIdentity: (a: number) => any;
|
|
673
|
+
readonly client_sendHistorySyncRequest: (a: number) => any;
|
|
674
|
+
readonly client_sendConsentSyncRequest: (a: number) => any;
|
|
675
|
+
readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
|
|
676
|
+
readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
|
|
677
|
+
readonly client_conversations: (a: number) => number;
|
|
678
|
+
readonly __wbg_installation_free: (a: number, b: number) => void;
|
|
679
|
+
readonly __wbg_get_installation_bytes: (a: number) => any;
|
|
680
|
+
readonly __wbg_set_installation_bytes: (a: number, b: any) => void;
|
|
681
|
+
readonly __wbg_get_installation_id: (a: number) => [number, number];
|
|
682
|
+
readonly __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
683
|
+
readonly __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
684
|
+
readonly __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
685
|
+
readonly installation_new: (a: any, b: number, c: number, d: number, e: bigint) => number;
|
|
686
|
+
readonly __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
687
|
+
readonly __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
688
|
+
readonly __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
689
|
+
readonly __wbg_get_inboxstate_recoveryIdentifier: (a: number) => any;
|
|
690
|
+
readonly __wbg_set_inboxstate_recoveryIdentifier: (a: number, b: any) => void;
|
|
691
|
+
readonly __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
692
|
+
readonly __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
693
|
+
readonly __wbg_get_inboxstate_accountIdentifiers: (a: number) => [number, number];
|
|
694
|
+
readonly __wbg_set_inboxstate_accountIdentifiers: (a: number, b: number, c: number) => void;
|
|
695
|
+
readonly inboxstate_new: (a: number, b: number, c: any, d: number, e: number, f: number, g: number) => number;
|
|
696
|
+
readonly client_inboxState: (a: number, b: number) => any;
|
|
697
|
+
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
650
698
|
readonly __wbg_consent_free: (a: number, b: number) => void;
|
|
651
699
|
readonly __wbg_get_consent_entityType: (a: number) => number;
|
|
652
700
|
readonly __wbg_set_consent_entityType: (a: number, b: number) => void;
|
|
@@ -680,11 +728,6 @@ export interface InitOutput {
|
|
|
680
728
|
readonly __wbg_grouppermissions_free: (a: number, b: number) => void;
|
|
681
729
|
readonly grouppermissions_policyType: (a: number) => [number, number, number];
|
|
682
730
|
readonly grouppermissions_policySet: (a: number) => [number, number, number];
|
|
683
|
-
readonly __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
684
|
-
readonly streamcloser_end: (a: number) => void;
|
|
685
|
-
readonly streamcloser_endAndWait: (a: number) => any;
|
|
686
|
-
readonly streamcloser_waitForReady: (a: number) => any;
|
|
687
|
-
readonly streamcloser_isClosed: (a: number) => number;
|
|
688
731
|
readonly __wbg_listconversationsoptions_free: (a: number, b: number) => void;
|
|
689
732
|
readonly __wbg_get_listconversationsoptions_consentStates: (a: number) => [number, number];
|
|
690
733
|
readonly __wbg_set_listconversationsoptions_consentStates: (a: number, b: number, c: number) => void;
|
|
@@ -823,47 +866,6 @@ export interface InitOutput {
|
|
|
823
866
|
readonly __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
824
867
|
readonly __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
825
868
|
readonly __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
826
|
-
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
827
|
-
readonly __wbg_logoptions_free: (a: number, b: number) => void;
|
|
828
|
-
readonly __wbg_get_logoptions_structured: (a: number) => number;
|
|
829
|
-
readonly __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
830
|
-
readonly __wbg_get_logoptions_performance: (a: number) => number;
|
|
831
|
-
readonly __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
832
|
-
readonly __wbg_get_logoptions_level: (a: number) => number;
|
|
833
|
-
readonly __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
834
|
-
readonly logoptions_new: (a: number, b: number, c: number) => number;
|
|
835
|
-
readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
836
|
-
readonly client_accountIdentifier: (a: number) => any;
|
|
837
|
-
readonly client_inboxId: (a: number) => [number, number];
|
|
838
|
-
readonly client_isRegistered: (a: number) => number;
|
|
839
|
-
readonly client_installationId: (a: number) => [number, number];
|
|
840
|
-
readonly client_installationIdBytes: (a: number) => any;
|
|
841
|
-
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
842
|
-
readonly client_registerIdentity: (a: number) => any;
|
|
843
|
-
readonly client_sendHistorySyncRequest: (a: number) => any;
|
|
844
|
-
readonly client_sendConsentSyncRequest: (a: number) => any;
|
|
845
|
-
readonly client_findInboxIdByIdentifier: (a: number, b: any) => any;
|
|
846
|
-
readonly client_conversations: (a: number) => number;
|
|
847
|
-
readonly __wbg_installation_free: (a: number, b: number) => void;
|
|
848
|
-
readonly __wbg_get_installation_bytes: (a: number) => any;
|
|
849
|
-
readonly __wbg_set_installation_bytes: (a: number, b: any) => void;
|
|
850
|
-
readonly __wbg_get_installation_id: (a: number) => [number, number];
|
|
851
|
-
readonly __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
852
|
-
readonly __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
853
|
-
readonly __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
854
|
-
readonly installation_new: (a: any, b: number, c: number, d: number, e: bigint) => number;
|
|
855
|
-
readonly __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
856
|
-
readonly __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
857
|
-
readonly __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
858
|
-
readonly __wbg_get_inboxstate_recoveryIdentifier: (a: number) => any;
|
|
859
|
-
readonly __wbg_set_inboxstate_recoveryIdentifier: (a: number, b: any) => void;
|
|
860
|
-
readonly __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
861
|
-
readonly __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
862
|
-
readonly __wbg_get_inboxstate_accountIdentifiers: (a: number) => [number, number];
|
|
863
|
-
readonly __wbg_set_inboxstate_accountIdentifiers: (a: number, b: number, c: number) => void;
|
|
864
|
-
readonly inboxstate_new: (a: number, b: number, c: any, d: number, e: number, f: number, g: number) => number;
|
|
865
|
-
readonly client_inboxState: (a: number, b: number) => any;
|
|
866
|
-
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
867
869
|
readonly rust_sqlite_wasm_shim_localtime_js: (a: bigint, b: number) => void;
|
|
868
870
|
readonly rust_sqlite_wasm_shim_tzset_js: (a: number, b: number, c: number, d: number) => void;
|
|
869
871
|
readonly rust_sqlite_wasm_shim_emscripten_get_now: () => number;
|
|
@@ -893,10 +895,10 @@ export interface InitOutput {
|
|
|
893
895
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
894
896
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
895
897
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
896
|
-
readonly
|
|
897
|
-
readonly
|
|
898
|
-
readonly
|
|
899
|
-
readonly
|
|
898
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd11fcf7148e8db56: (a: number, b: number) => void;
|
|
899
|
+
readonly closure3810_externref_shim: (a: number, b: number, c: any) => void;
|
|
900
|
+
readonly closure4805_externref_shim: (a: number, b: number, c: any, d: number, e: any) => number;
|
|
901
|
+
readonly closure4804_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
900
902
|
readonly __wbindgen_start: () => void;
|
|
901
903
|
}
|
|
902
904
|
|
package/dist/bindings_wasm.js
CHANGED
|
@@ -301,6 +301,34 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
/**
|
|
305
|
+
* @param {string} host
|
|
306
|
+
* @param {string} inbox_id
|
|
307
|
+
* @param {Identifier} account_identifier
|
|
308
|
+
* @param {string | null} [db_path]
|
|
309
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
310
|
+
* @param {string | null} [history_sync_url]
|
|
311
|
+
* @param {LogOptions | null} [log_options]
|
|
312
|
+
* @returns {Promise<Client>}
|
|
313
|
+
*/
|
|
314
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, history_sync_url, log_options) {
|
|
315
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
316
|
+
const len0 = WASM_VECTOR_LEN;
|
|
317
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
318
|
+
const len1 = WASM_VECTOR_LEN;
|
|
319
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
+
var len2 = WASM_VECTOR_LEN;
|
|
321
|
+
var ptr3 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
322
|
+
var len3 = WASM_VECTOR_LEN;
|
|
323
|
+
let ptr4 = 0;
|
|
324
|
+
if (!isLikeNone(log_options)) {
|
|
325
|
+
_assertClass(log_options, LogOptions);
|
|
326
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
327
|
+
}
|
|
328
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, ptr4);
|
|
329
|
+
return ret;
|
|
330
|
+
}
|
|
331
|
+
|
|
304
332
|
function passArray8ToWasm0(arg, malloc) {
|
|
305
333
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
306
334
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -342,49 +370,21 @@ export function generateInboxId(accountIdentifier) {
|
|
|
342
370
|
}
|
|
343
371
|
}
|
|
344
372
|
|
|
345
|
-
/**
|
|
346
|
-
* @param {string} host
|
|
347
|
-
* @param {string} inbox_id
|
|
348
|
-
* @param {Identifier} account_identifier
|
|
349
|
-
* @param {string | null} [db_path]
|
|
350
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
351
|
-
* @param {string | null} [history_sync_url]
|
|
352
|
-
* @param {LogOptions | null} [log_options]
|
|
353
|
-
* @returns {Promise<Client>}
|
|
354
|
-
*/
|
|
355
|
-
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, history_sync_url, log_options) {
|
|
356
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
357
|
-
const len0 = WASM_VECTOR_LEN;
|
|
358
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
359
|
-
const len1 = WASM_VECTOR_LEN;
|
|
360
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
361
|
-
var len2 = WASM_VECTOR_LEN;
|
|
362
|
-
var ptr3 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
363
|
-
var len3 = WASM_VECTOR_LEN;
|
|
364
|
-
let ptr4 = 0;
|
|
365
|
-
if (!isLikeNone(log_options)) {
|
|
366
|
-
_assertClass(log_options, LogOptions);
|
|
367
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
368
|
-
}
|
|
369
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, ptr4);
|
|
370
|
-
return ret;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
373
|
function __wbg_adapter_48(arg0, arg1) {
|
|
374
|
-
wasm.
|
|
374
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd11fcf7148e8db56(arg0, arg1);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
function __wbg_adapter_51(arg0, arg1, arg2) {
|
|
378
|
-
wasm.
|
|
378
|
+
wasm.closure3810_externref_shim(arg0, arg1, arg2);
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
function
|
|
382
|
-
const ret = wasm.
|
|
381
|
+
function __wbg_adapter_599(arg0, arg1, arg2, arg3, arg4) {
|
|
382
|
+
const ret = wasm.closure4805_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
383
383
|
return ret !== 0;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
function
|
|
387
|
-
wasm.
|
|
386
|
+
function __wbg_adapter_700(arg0, arg1, arg2, arg3) {
|
|
387
|
+
wasm.closure4804_externref_shim(arg0, arg1, arg2, arg3);
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
/**
|
|
@@ -673,27 +673,6 @@ export class Client {
|
|
|
673
673
|
throw takeFromExternrefTable0(ret[0]);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
/**
|
|
677
|
-
* @param {Consent[]} records
|
|
678
|
-
* @returns {Promise<void>}
|
|
679
|
-
*/
|
|
680
|
-
setConsentStates(records) {
|
|
681
|
-
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
682
|
-
const len0 = WASM_VECTOR_LEN;
|
|
683
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
684
|
-
return ret;
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* @param {ConsentEntityType} entity_type
|
|
688
|
-
* @param {string} entity
|
|
689
|
-
* @returns {Promise<ConsentState>}
|
|
690
|
-
*/
|
|
691
|
-
getConsentState(entity_type, entity) {
|
|
692
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
693
|
-
const len0 = WASM_VECTOR_LEN;
|
|
694
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
695
|
-
return ret;
|
|
696
|
-
}
|
|
697
676
|
/**
|
|
698
677
|
* @returns {Identifier}
|
|
699
678
|
*/
|
|
@@ -785,6 +764,17 @@ export class Client {
|
|
|
785
764
|
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
786
765
|
return ret;
|
|
787
766
|
}
|
|
767
|
+
/**
|
|
768
|
+
* @param {string[]} inbox_ids
|
|
769
|
+
* @param {boolean} refresh_from_network
|
|
770
|
+
* @returns {Promise<InboxState[]>}
|
|
771
|
+
*/
|
|
772
|
+
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
773
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
774
|
+
const len0 = WASM_VECTOR_LEN;
|
|
775
|
+
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
776
|
+
return ret;
|
|
777
|
+
}
|
|
788
778
|
/**
|
|
789
779
|
* @returns {Conversations}
|
|
790
780
|
*/
|
|
@@ -816,6 +806,27 @@ export class Client {
|
|
|
816
806
|
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
817
807
|
return ret;
|
|
818
808
|
}
|
|
809
|
+
/**
|
|
810
|
+
* @param {Consent[]} records
|
|
811
|
+
* @returns {Promise<void>}
|
|
812
|
+
*/
|
|
813
|
+
setConsentStates(records) {
|
|
814
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
815
|
+
const len0 = WASM_VECTOR_LEN;
|
|
816
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
817
|
+
return ret;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* @param {ConsentEntityType} entity_type
|
|
821
|
+
* @param {string} entity
|
|
822
|
+
* @returns {Promise<ConsentState>}
|
|
823
|
+
*/
|
|
824
|
+
getConsentState(entity_type, entity) {
|
|
825
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
826
|
+
const len0 = WASM_VECTOR_LEN;
|
|
827
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
828
|
+
return ret;
|
|
829
|
+
}
|
|
819
830
|
}
|
|
820
831
|
|
|
821
832
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -4398,7 +4409,7 @@ function __wbg_get_imports() {
|
|
|
4398
4409
|
const a = state0.a;
|
|
4399
4410
|
state0.a = 0;
|
|
4400
4411
|
try {
|
|
4401
|
-
return
|
|
4412
|
+
return __wbg_adapter_599(a, state0.b, arg0, arg1, arg2);
|
|
4402
4413
|
} finally {
|
|
4403
4414
|
state0.a = a;
|
|
4404
4415
|
}
|
|
@@ -4428,7 +4439,7 @@ function __wbg_get_imports() {
|
|
|
4428
4439
|
const a = state0.a;
|
|
4429
4440
|
state0.a = 0;
|
|
4430
4441
|
try {
|
|
4431
|
-
return
|
|
4442
|
+
return __wbg_adapter_599(a, state0.b, arg0, arg1, arg2);
|
|
4432
4443
|
} finally {
|
|
4433
4444
|
state0.a = a;
|
|
4434
4445
|
}
|
|
@@ -4716,7 +4727,7 @@ function __wbg_get_imports() {
|
|
|
4716
4727
|
const a = state0.a;
|
|
4717
4728
|
state0.a = 0;
|
|
4718
4729
|
try {
|
|
4719
|
-
return
|
|
4730
|
+
return __wbg_adapter_700(a, state0.b, arg0, arg1);
|
|
4720
4731
|
} finally {
|
|
4721
4732
|
state0.a = a;
|
|
4722
4733
|
}
|
|
@@ -4823,19 +4834,19 @@ function __wbg_get_imports() {
|
|
|
4823
4834
|
const ret = arg0.now();
|
|
4824
4835
|
return ret;
|
|
4825
4836
|
};
|
|
4826
|
-
imports.wbg.
|
|
4837
|
+
imports.wbg.__wbg_onconsentupdate_dc598c8259919fe7 = function(arg0, arg1) {
|
|
4827
4838
|
arg0.on_consent_update(arg1);
|
|
4828
4839
|
};
|
|
4829
|
-
imports.wbg.
|
|
4840
|
+
imports.wbg.__wbg_onconversation_4d340d430077aea8 = function(arg0, arg1) {
|
|
4830
4841
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
4831
4842
|
};
|
|
4832
|
-
imports.wbg.
|
|
4843
|
+
imports.wbg.__wbg_onerror_95b1a1c12727db75 = function(arg0, arg1) {
|
|
4833
4844
|
arg0.on_error(arg1);
|
|
4834
4845
|
};
|
|
4835
|
-
imports.wbg.
|
|
4846
|
+
imports.wbg.__wbg_onmessage_183b7388984e8b76 = function(arg0, arg1) {
|
|
4836
4847
|
arg0.on_message(Message.__wrap(arg1));
|
|
4837
4848
|
};
|
|
4838
|
-
imports.wbg.
|
|
4849
|
+
imports.wbg.__wbg_onuserpreferenceupdate_9c134ed10b961697 = function(arg0, arg1, arg2) {
|
|
4839
4850
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
4840
4851
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
4841
4852
|
arg0.on_user_preference_update(v0);
|
|
@@ -5119,12 +5130,12 @@ function __wbg_get_imports() {
|
|
|
5119
5130
|
const ret = false;
|
|
5120
5131
|
return ret;
|
|
5121
5132
|
};
|
|
5122
|
-
imports.wbg.
|
|
5123
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5133
|
+
imports.wbg.__wbindgen_closure_wrapper16356 = function(arg0, arg1, arg2) {
|
|
5134
|
+
const ret = makeMutClosure(arg0, arg1, 3740, __wbg_adapter_48);
|
|
5124
5135
|
return ret;
|
|
5125
5136
|
};
|
|
5126
|
-
imports.wbg.
|
|
5127
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5137
|
+
imports.wbg.__wbindgen_closure_wrapper16635 = function(arg0, arg1, arg2) {
|
|
5138
|
+
const ret = makeMutClosure(arg0, arg1, 3811, __wbg_adapter_51);
|
|
5128
5139
|
return ret;
|
|
5129
5140
|
};
|
|
5130
5141
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|
|
@@ -108,6 +108,53 @@ export const client_signWithInstallationKey: (a: number, b: number, c: number) =
|
|
|
108
108
|
export const client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
109
109
|
export const __wbg_set_reaction_reference: (a: number, b: number, c: number) => void;
|
|
110
110
|
export const __wbg_get_reaction_reference: (a: number) => [number, number];
|
|
111
|
+
export const __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
112
|
+
export const streamcloser_end: (a: number) => void;
|
|
113
|
+
export const streamcloser_endAndWait: (a: number) => any;
|
|
114
|
+
export const streamcloser_waitForReady: (a: number) => any;
|
|
115
|
+
export const streamcloser_isClosed: (a: number) => number;
|
|
116
|
+
export const __wbg_client_free: (a: number, b: number) => void;
|
|
117
|
+
export const __wbg_logoptions_free: (a: number, b: number) => void;
|
|
118
|
+
export const __wbg_get_logoptions_structured: (a: number) => number;
|
|
119
|
+
export const __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
120
|
+
export const __wbg_get_logoptions_performance: (a: number) => number;
|
|
121
|
+
export const __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
122
|
+
export const __wbg_get_logoptions_level: (a: number) => number;
|
|
123
|
+
export const __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
124
|
+
export const logoptions_new: (a: number, b: number, c: number) => number;
|
|
125
|
+
export const createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
126
|
+
export const client_accountIdentifier: (a: number) => any;
|
|
127
|
+
export const client_inboxId: (a: number) => [number, number];
|
|
128
|
+
export const client_isRegistered: (a: number) => number;
|
|
129
|
+
export const client_installationId: (a: number) => [number, number];
|
|
130
|
+
export const client_installationIdBytes: (a: number) => any;
|
|
131
|
+
export const client_canMessage: (a: number, b: number, c: number) => any;
|
|
132
|
+
export const client_registerIdentity: (a: number) => any;
|
|
133
|
+
export const client_sendHistorySyncRequest: (a: number) => any;
|
|
134
|
+
export const client_sendConsentSyncRequest: (a: number) => any;
|
|
135
|
+
export const client_findInboxIdByIdentifier: (a: number, b: any) => any;
|
|
136
|
+
export const client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any;
|
|
137
|
+
export const client_conversations: (a: number) => number;
|
|
138
|
+
export const __wbg_installation_free: (a: number, b: number) => void;
|
|
139
|
+
export const __wbg_get_installation_bytes: (a: number) => any;
|
|
140
|
+
export const __wbg_set_installation_bytes: (a: number, b: any) => void;
|
|
141
|
+
export const __wbg_get_installation_id: (a: number) => [number, number];
|
|
142
|
+
export const __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
143
|
+
export const __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
144
|
+
export const __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
145
|
+
export const installation_new: (a: any, b: number, c: number, d: number, e: bigint) => number;
|
|
146
|
+
export const __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
147
|
+
export const __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
148
|
+
export const __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
149
|
+
export const __wbg_get_inboxstate_recoveryIdentifier: (a: number) => any;
|
|
150
|
+
export const __wbg_set_inboxstate_recoveryIdentifier: (a: number, b: any) => void;
|
|
151
|
+
export const __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
152
|
+
export const __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
153
|
+
export const __wbg_get_inboxstate_accountIdentifiers: (a: number) => [number, number];
|
|
154
|
+
export const __wbg_set_inboxstate_accountIdentifiers: (a: number, b: number, c: number) => void;
|
|
155
|
+
export const inboxstate_new: (a: number, b: number, c: any, d: number, e: number, f: number, g: number) => number;
|
|
156
|
+
export const client_inboxState: (a: number, b: number) => any;
|
|
157
|
+
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
111
158
|
export const __wbg_consent_free: (a: number, b: number) => void;
|
|
112
159
|
export const __wbg_get_consent_entityType: (a: number) => number;
|
|
113
160
|
export const __wbg_set_consent_entityType: (a: number, b: number) => void;
|
|
@@ -141,11 +188,6 @@ export const permissionpolicyset_new: (a: number, b: number, c: number, d: numbe
|
|
|
141
188
|
export const __wbg_grouppermissions_free: (a: number, b: number) => void;
|
|
142
189
|
export const grouppermissions_policyType: (a: number) => [number, number, number];
|
|
143
190
|
export const grouppermissions_policySet: (a: number) => [number, number, number];
|
|
144
|
-
export const __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
145
|
-
export const streamcloser_end: (a: number) => void;
|
|
146
|
-
export const streamcloser_endAndWait: (a: number) => any;
|
|
147
|
-
export const streamcloser_waitForReady: (a: number) => any;
|
|
148
|
-
export const streamcloser_isClosed: (a: number) => number;
|
|
149
191
|
export const __wbg_listconversationsoptions_free: (a: number, b: number) => void;
|
|
150
192
|
export const __wbg_get_listconversationsoptions_consentStates: (a: number) => [number, number];
|
|
151
193
|
export const __wbg_set_listconversationsoptions_consentStates: (a: number, b: number, c: number) => void;
|
|
@@ -284,47 +326,6 @@ export const __wbg_get_creategroupoptions_messageDisappearingSettings: (a: numbe
|
|
|
284
326
|
export const __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
285
327
|
export const __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
286
328
|
export const __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
287
|
-
export const __wbg_client_free: (a: number, b: number) => void;
|
|
288
|
-
export const __wbg_logoptions_free: (a: number, b: number) => void;
|
|
289
|
-
export const __wbg_get_logoptions_structured: (a: number) => number;
|
|
290
|
-
export const __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
291
|
-
export const __wbg_get_logoptions_performance: (a: number) => number;
|
|
292
|
-
export const __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
293
|
-
export const __wbg_get_logoptions_level: (a: number) => number;
|
|
294
|
-
export const __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
295
|
-
export const logoptions_new: (a: number, b: number, c: number) => number;
|
|
296
|
-
export const createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
297
|
-
export const client_accountIdentifier: (a: number) => any;
|
|
298
|
-
export const client_inboxId: (a: number) => [number, number];
|
|
299
|
-
export const client_isRegistered: (a: number) => number;
|
|
300
|
-
export const client_installationId: (a: number) => [number, number];
|
|
301
|
-
export const client_installationIdBytes: (a: number) => any;
|
|
302
|
-
export const client_canMessage: (a: number, b: number, c: number) => any;
|
|
303
|
-
export const client_registerIdentity: (a: number) => any;
|
|
304
|
-
export const client_sendHistorySyncRequest: (a: number) => any;
|
|
305
|
-
export const client_sendConsentSyncRequest: (a: number) => any;
|
|
306
|
-
export const client_findInboxIdByIdentifier: (a: number, b: any) => any;
|
|
307
|
-
export const client_conversations: (a: number) => number;
|
|
308
|
-
export const __wbg_installation_free: (a: number, b: number) => void;
|
|
309
|
-
export const __wbg_get_installation_bytes: (a: number) => any;
|
|
310
|
-
export const __wbg_set_installation_bytes: (a: number, b: any) => void;
|
|
311
|
-
export const __wbg_get_installation_id: (a: number) => [number, number];
|
|
312
|
-
export const __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
313
|
-
export const __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
314
|
-
export const __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
315
|
-
export const installation_new: (a: any, b: number, c: number, d: number, e: bigint) => number;
|
|
316
|
-
export const __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
317
|
-
export const __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
318
|
-
export const __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
319
|
-
export const __wbg_get_inboxstate_recoveryIdentifier: (a: number) => any;
|
|
320
|
-
export const __wbg_set_inboxstate_recoveryIdentifier: (a: number, b: any) => void;
|
|
321
|
-
export const __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
322
|
-
export const __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
323
|
-
export const __wbg_get_inboxstate_accountIdentifiers: (a: number) => [number, number];
|
|
324
|
-
export const __wbg_set_inboxstate_accountIdentifiers: (a: number, b: number, c: number) => void;
|
|
325
|
-
export const inboxstate_new: (a: number, b: number, c: any, d: number, e: number, f: number, g: number) => number;
|
|
326
|
-
export const client_inboxState: (a: number, b: number) => any;
|
|
327
|
-
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
328
329
|
export const rust_sqlite_wasm_shim_localtime_js: (a: bigint, b: number) => void;
|
|
329
330
|
export const rust_sqlite_wasm_shim_tzset_js: (a: number, b: number, c: number, d: number) => void;
|
|
330
331
|
export const rust_sqlite_wasm_shim_emscripten_get_now: () => number;
|
|
@@ -354,8 +355,8 @@ export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
|
354
355
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
355
356
|
export const __wbindgen_export_7: WebAssembly.Table;
|
|
356
357
|
export const __externref_table_dealloc: (a: number) => void;
|
|
357
|
-
export const
|
|
358
|
-
export const
|
|
359
|
-
export const
|
|
360
|
-
export const
|
|
358
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd11fcf7148e8db56: (a: number, b: number) => void;
|
|
359
|
+
export const closure3810_externref_shim: (a: number, b: number, c: any) => void;
|
|
360
|
+
export const closure4805_externref_shim: (a: number, b: number, c: any, d: number, e: any) => number;
|
|
361
|
+
export const closure4804_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
361
362
|
export const __wbindgen_start: () => void;
|