@xmtp/wasm-bindings 1.2.3 → 1.2.4
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 +109 -107
- package/dist/bindings_wasm.js +257 -244
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +87 -86
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -215,42 +215,46 @@ function debugString(val) {
|
|
|
215
215
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
216
216
|
return className;
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
function _assertClass(instance, klass) {
|
|
220
|
-
if (!(instance instanceof klass)) {
|
|
221
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
218
|
/**
|
|
225
219
|
* @param {string} host
|
|
226
|
-
* @param {
|
|
227
|
-
* @
|
|
228
|
-
* @param {string | null} [db_path]
|
|
229
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
230
|
-
* @param {string | null} [device_sync_server_url]
|
|
231
|
-
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
232
|
-
* @param {LogOptions | null} [log_options]
|
|
233
|
-
* @param {boolean | null} [allow_offline]
|
|
234
|
-
* @returns {Promise<Client>}
|
|
220
|
+
* @param {Identifier} accountIdentifier
|
|
221
|
+
* @returns {Promise<string | undefined>}
|
|
235
222
|
*/
|
|
236
|
-
export function
|
|
223
|
+
export function getInboxIdForIdentifier(host, accountIdentifier) {
|
|
237
224
|
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
225
|
const len0 = WASM_VECTOR_LEN;
|
|
239
|
-
const
|
|
240
|
-
const len1 = WASM_VECTOR_LEN;
|
|
241
|
-
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
242
|
-
var len2 = WASM_VECTOR_LEN;
|
|
243
|
-
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
244
|
-
var len3 = WASM_VECTOR_LEN;
|
|
245
|
-
let ptr4 = 0;
|
|
246
|
-
if (!isLikeNone(log_options)) {
|
|
247
|
-
_assertClass(log_options, LogOptions);
|
|
248
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
249
|
-
}
|
|
250
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0);
|
|
226
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, accountIdentifier);
|
|
251
227
|
return ret;
|
|
252
228
|
}
|
|
253
229
|
|
|
230
|
+
function takeFromExternrefTable0(idx) {
|
|
231
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
232
|
+
wasm.__externref_table_dealloc(idx);
|
|
233
|
+
return value;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* @param {Identifier} accountIdentifier
|
|
237
|
+
* @returns {string}
|
|
238
|
+
*/
|
|
239
|
+
export function generateInboxId(accountIdentifier) {
|
|
240
|
+
let deferred2_0;
|
|
241
|
+
let deferred2_1;
|
|
242
|
+
try {
|
|
243
|
+
const ret = wasm.generateInboxId(accountIdentifier);
|
|
244
|
+
var ptr1 = ret[0];
|
|
245
|
+
var len1 = ret[1];
|
|
246
|
+
if (ret[3]) {
|
|
247
|
+
ptr1 = 0; len1 = 0;
|
|
248
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
249
|
+
}
|
|
250
|
+
deferred2_0 = ptr1;
|
|
251
|
+
deferred2_1 = len1;
|
|
252
|
+
return getStringFromWasm0(ptr1, len1);
|
|
253
|
+
} finally {
|
|
254
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
254
258
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
255
259
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
256
260
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -261,10 +265,10 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
261
265
|
return ptr;
|
|
262
266
|
}
|
|
263
267
|
|
|
264
|
-
function
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
+
function _assertClass(instance, klass) {
|
|
269
|
+
if (!(instance instanceof klass)) {
|
|
270
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
271
|
+
}
|
|
268
272
|
}
|
|
269
273
|
/**
|
|
270
274
|
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
@@ -324,6 +328,20 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
324
328
|
WASM_VECTOR_LEN = arg.length;
|
|
325
329
|
return ptr;
|
|
326
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* @param {string} host
|
|
333
|
+
* @param {string[]} inbox_ids
|
|
334
|
+
* @returns {Promise<InboxState[]>}
|
|
335
|
+
*/
|
|
336
|
+
export function inboxStateFromInboxIds(host, inbox_ids) {
|
|
337
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
338
|
+
const len0 = WASM_VECTOR_LEN;
|
|
339
|
+
const ptr1 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
340
|
+
const len1 = WASM_VECTOR_LEN;
|
|
341
|
+
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1);
|
|
342
|
+
return ret;
|
|
343
|
+
}
|
|
344
|
+
|
|
327
345
|
/**
|
|
328
346
|
* @param {string} signature_text
|
|
329
347
|
* @param {Uint8Array} signature_bytes
|
|
@@ -371,37 +389,32 @@ export function applySignatureRequest(host, signature_request) {
|
|
|
371
389
|
|
|
372
390
|
/**
|
|
373
391
|
* @param {string} host
|
|
374
|
-
* @param {
|
|
375
|
-
* @
|
|
392
|
+
* @param {string} inbox_id
|
|
393
|
+
* @param {Identifier} account_identifier
|
|
394
|
+
* @param {string | null} [db_path]
|
|
395
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
396
|
+
* @param {string | null} [device_sync_server_url]
|
|
397
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
398
|
+
* @param {LogOptions | null} [log_options]
|
|
399
|
+
* @param {boolean | null} [allow_offline]
|
|
400
|
+
* @returns {Promise<Client>}
|
|
376
401
|
*/
|
|
377
|
-
export function
|
|
402
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline) {
|
|
378
403
|
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
379
404
|
const len0 = WASM_VECTOR_LEN;
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
let deferred2_1;
|
|
391
|
-
try {
|
|
392
|
-
const ret = wasm.generateInboxId(accountIdentifier);
|
|
393
|
-
var ptr1 = ret[0];
|
|
394
|
-
var len1 = ret[1];
|
|
395
|
-
if (ret[3]) {
|
|
396
|
-
ptr1 = 0; len1 = 0;
|
|
397
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
398
|
-
}
|
|
399
|
-
deferred2_0 = ptr1;
|
|
400
|
-
deferred2_1 = len1;
|
|
401
|
-
return getStringFromWasm0(ptr1, len1);
|
|
402
|
-
} finally {
|
|
403
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
405
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
+
const len1 = WASM_VECTOR_LEN;
|
|
407
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
408
|
+
var len2 = WASM_VECTOR_LEN;
|
|
409
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
410
|
+
var len3 = WASM_VECTOR_LEN;
|
|
411
|
+
let ptr4 = 0;
|
|
412
|
+
if (!isLikeNone(log_options)) {
|
|
413
|
+
_assertClass(log_options, LogOptions);
|
|
414
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
404
415
|
}
|
|
416
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0);
|
|
417
|
+
return ret;
|
|
405
418
|
}
|
|
406
419
|
|
|
407
420
|
function __wbg_adapter_50(arg0, arg1) {
|
|
@@ -413,15 +426,15 @@ function __wbg_adapter_53(arg0, arg1) {
|
|
|
413
426
|
}
|
|
414
427
|
|
|
415
428
|
function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
416
|
-
wasm.
|
|
429
|
+
wasm.closure4617_externref_shim(arg0, arg1, arg2);
|
|
417
430
|
}
|
|
418
431
|
|
|
419
432
|
function __wbg_adapter_59(arg0, arg1) {
|
|
420
433
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h232599d7dcf89d52(arg0, arg1);
|
|
421
434
|
}
|
|
422
435
|
|
|
423
|
-
function
|
|
424
|
-
wasm.
|
|
436
|
+
function __wbg_adapter_781(arg0, arg1, arg2, arg3) {
|
|
437
|
+
wasm.closure5593_externref_shim(arg0, arg1, arg2, arg3);
|
|
425
438
|
}
|
|
426
439
|
|
|
427
440
|
/**
|
|
@@ -725,147 +738,24 @@ export class Client {
|
|
|
725
738
|
wasm.__wbg_client_free(ptr, 0);
|
|
726
739
|
}
|
|
727
740
|
/**
|
|
728
|
-
* @
|
|
729
|
-
*/
|
|
730
|
-
get accountIdentifier() {
|
|
731
|
-
const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
|
|
732
|
-
return ret;
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* @returns {string}
|
|
736
|
-
*/
|
|
737
|
-
get inboxId() {
|
|
738
|
-
let deferred1_0;
|
|
739
|
-
let deferred1_1;
|
|
740
|
-
try {
|
|
741
|
-
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
742
|
-
deferred1_0 = ret[0];
|
|
743
|
-
deferred1_1 = ret[1];
|
|
744
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
745
|
-
} finally {
|
|
746
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
/**
|
|
750
|
-
* @returns {boolean}
|
|
751
|
-
*/
|
|
752
|
-
get isRegistered() {
|
|
753
|
-
const ret = wasm.client_isRegistered(this.__wbg_ptr);
|
|
754
|
-
return ret !== 0;
|
|
755
|
-
}
|
|
756
|
-
/**
|
|
757
|
-
* @returns {string}
|
|
758
|
-
*/
|
|
759
|
-
get installationId() {
|
|
760
|
-
let deferred1_0;
|
|
761
|
-
let deferred1_1;
|
|
762
|
-
try {
|
|
763
|
-
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
764
|
-
deferred1_0 = ret[0];
|
|
765
|
-
deferred1_1 = ret[1];
|
|
766
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
767
|
-
} finally {
|
|
768
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* @returns {Uint8Array}
|
|
773
|
-
*/
|
|
774
|
-
get installationIdBytes() {
|
|
775
|
-
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
776
|
-
return ret;
|
|
777
|
-
}
|
|
778
|
-
/**
|
|
779
|
-
* Output booleans should be zipped with the index of input identifiers
|
|
780
|
-
* @param {Identifier[]} account_identifiers
|
|
781
|
-
* @returns {Promise<any>}
|
|
782
|
-
*/
|
|
783
|
-
canMessage(account_identifiers) {
|
|
784
|
-
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
785
|
-
const len0 = WASM_VECTOR_LEN;
|
|
786
|
-
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
787
|
-
return ret;
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
741
|
+
* @param {Consent[]} records
|
|
790
742
|
* @returns {Promise<void>}
|
|
791
743
|
*/
|
|
792
|
-
|
|
793
|
-
const
|
|
794
|
-
return ret;
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* @param {Identifier} identifier
|
|
798
|
-
* @returns {Promise<string | undefined>}
|
|
799
|
-
*/
|
|
800
|
-
findInboxIdByIdentifier(identifier) {
|
|
801
|
-
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
802
|
-
return ret;
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
* @param {string[]} inbox_ids
|
|
806
|
-
* @param {boolean} refresh_from_network
|
|
807
|
-
* @returns {Promise<InboxState[]>}
|
|
808
|
-
*/
|
|
809
|
-
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
810
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
744
|
+
setConsentStates(records) {
|
|
745
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
811
746
|
const len0 = WASM_VECTOR_LEN;
|
|
812
|
-
const ret = wasm.
|
|
813
|
-
return ret;
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* @returns {Conversations}
|
|
817
|
-
*/
|
|
818
|
-
conversations() {
|
|
819
|
-
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
820
|
-
return Conversations.__wrap(ret);
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
* @returns {Promise<number>}
|
|
824
|
-
*/
|
|
825
|
-
syncPreferences() {
|
|
826
|
-
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
747
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
827
748
|
return ret;
|
|
828
749
|
}
|
|
829
750
|
/**
|
|
830
|
-
* @
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
834
|
-
return ApiStats.__wrap(ret);
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
* @returns {IdentityStats}
|
|
838
|
-
*/
|
|
839
|
-
apiIdentityStatistics() {
|
|
840
|
-
const ret = wasm.client_apiIdentityStatistics(this.__wbg_ptr);
|
|
841
|
-
return IdentityStats.__wrap(ret);
|
|
842
|
-
}
|
|
843
|
-
/**
|
|
844
|
-
* @returns {string}
|
|
845
|
-
*/
|
|
846
|
-
apiAggregateStatistics() {
|
|
847
|
-
let deferred1_0;
|
|
848
|
-
let deferred1_1;
|
|
849
|
-
try {
|
|
850
|
-
const ret = wasm.client_apiAggregateStatistics(this.__wbg_ptr);
|
|
851
|
-
deferred1_0 = ret[0];
|
|
852
|
-
deferred1_1 = ret[1];
|
|
853
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
854
|
-
} finally {
|
|
855
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
clearAllStatistics() {
|
|
859
|
-
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
860
|
-
}
|
|
861
|
-
/**
|
|
862
|
-
* @param {string} server_url
|
|
863
|
-
* @returns {Promise<string>}
|
|
751
|
+
* @param {ConsentEntityType} entity_type
|
|
752
|
+
* @param {string} entity
|
|
753
|
+
* @returns {Promise<ConsentState>}
|
|
864
754
|
*/
|
|
865
|
-
|
|
866
|
-
const ptr0 = passStringToWasm0(
|
|
755
|
+
getConsentState(entity_type, entity) {
|
|
756
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
867
757
|
const len0 = WASM_VECTOR_LEN;
|
|
868
|
-
const ret = wasm.
|
|
758
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
869
759
|
return ret;
|
|
870
760
|
}
|
|
871
761
|
/**
|
|
@@ -1003,24 +893,147 @@ export class Client {
|
|
|
1003
893
|
}
|
|
1004
894
|
}
|
|
1005
895
|
/**
|
|
1006
|
-
* @
|
|
896
|
+
* @returns {Identifier}
|
|
897
|
+
*/
|
|
898
|
+
get accountIdentifier() {
|
|
899
|
+
const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
|
|
900
|
+
return ret;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* @returns {string}
|
|
904
|
+
*/
|
|
905
|
+
get inboxId() {
|
|
906
|
+
let deferred1_0;
|
|
907
|
+
let deferred1_1;
|
|
908
|
+
try {
|
|
909
|
+
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
910
|
+
deferred1_0 = ret[0];
|
|
911
|
+
deferred1_1 = ret[1];
|
|
912
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
913
|
+
} finally {
|
|
914
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* @returns {boolean}
|
|
919
|
+
*/
|
|
920
|
+
get isRegistered() {
|
|
921
|
+
const ret = wasm.client_isRegistered(this.__wbg_ptr);
|
|
922
|
+
return ret !== 0;
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* @returns {string}
|
|
926
|
+
*/
|
|
927
|
+
get installationId() {
|
|
928
|
+
let deferred1_0;
|
|
929
|
+
let deferred1_1;
|
|
930
|
+
try {
|
|
931
|
+
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
932
|
+
deferred1_0 = ret[0];
|
|
933
|
+
deferred1_1 = ret[1];
|
|
934
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
935
|
+
} finally {
|
|
936
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* @returns {Uint8Array}
|
|
941
|
+
*/
|
|
942
|
+
get installationIdBytes() {
|
|
943
|
+
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
944
|
+
return ret;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Output booleans should be zipped with the index of input identifiers
|
|
948
|
+
* @param {Identifier[]} account_identifiers
|
|
949
|
+
* @returns {Promise<any>}
|
|
950
|
+
*/
|
|
951
|
+
canMessage(account_identifiers) {
|
|
952
|
+
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
953
|
+
const len0 = WASM_VECTOR_LEN;
|
|
954
|
+
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
955
|
+
return ret;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
1007
958
|
* @returns {Promise<void>}
|
|
1008
959
|
*/
|
|
1009
|
-
|
|
1010
|
-
const
|
|
960
|
+
sendSyncRequest() {
|
|
961
|
+
const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
|
|
962
|
+
return ret;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* @param {Identifier} identifier
|
|
966
|
+
* @returns {Promise<string | undefined>}
|
|
967
|
+
*/
|
|
968
|
+
findInboxIdByIdentifier(identifier) {
|
|
969
|
+
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
970
|
+
return ret;
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* @param {string[]} inbox_ids
|
|
974
|
+
* @param {boolean} refresh_from_network
|
|
975
|
+
* @returns {Promise<InboxState[]>}
|
|
976
|
+
*/
|
|
977
|
+
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
978
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1011
979
|
const len0 = WASM_VECTOR_LEN;
|
|
1012
|
-
const ret = wasm.
|
|
980
|
+
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
1013
981
|
return ret;
|
|
1014
982
|
}
|
|
1015
983
|
/**
|
|
1016
|
-
* @
|
|
1017
|
-
* @param {string} entity
|
|
1018
|
-
* @returns {Promise<ConsentState>}
|
|
984
|
+
* @returns {Conversations}
|
|
1019
985
|
*/
|
|
1020
|
-
|
|
1021
|
-
const
|
|
986
|
+
conversations() {
|
|
987
|
+
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
988
|
+
return Conversations.__wrap(ret);
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* @returns {Promise<number>}
|
|
992
|
+
*/
|
|
993
|
+
syncPreferences() {
|
|
994
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
995
|
+
return ret;
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* @returns {ApiStats}
|
|
999
|
+
*/
|
|
1000
|
+
apiStatistics() {
|
|
1001
|
+
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
1002
|
+
return ApiStats.__wrap(ret);
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
* @returns {IdentityStats}
|
|
1006
|
+
*/
|
|
1007
|
+
apiIdentityStatistics() {
|
|
1008
|
+
const ret = wasm.client_apiIdentityStatistics(this.__wbg_ptr);
|
|
1009
|
+
return IdentityStats.__wrap(ret);
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* @returns {string}
|
|
1013
|
+
*/
|
|
1014
|
+
apiAggregateStatistics() {
|
|
1015
|
+
let deferred1_0;
|
|
1016
|
+
let deferred1_1;
|
|
1017
|
+
try {
|
|
1018
|
+
const ret = wasm.client_apiAggregateStatistics(this.__wbg_ptr);
|
|
1019
|
+
deferred1_0 = ret[0];
|
|
1020
|
+
deferred1_1 = ret[1];
|
|
1021
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1022
|
+
} finally {
|
|
1023
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
clearAllStatistics() {
|
|
1027
|
+
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* @param {string} server_url
|
|
1031
|
+
* @returns {Promise<string>}
|
|
1032
|
+
*/
|
|
1033
|
+
uploadDebugArchive(server_url) {
|
|
1034
|
+
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1022
1035
|
const len0 = WASM_VECTOR_LEN;
|
|
1023
|
-
const ret = wasm.
|
|
1036
|
+
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
1024
1037
|
return ret;
|
|
1025
1038
|
}
|
|
1026
1039
|
}
|
|
@@ -1159,7 +1172,7 @@ export class ContentTypeId {
|
|
|
1159
1172
|
set authorityId(arg0) {
|
|
1160
1173
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1161
1174
|
const len0 = WASM_VECTOR_LEN;
|
|
1162
|
-
wasm.
|
|
1175
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
1163
1176
|
}
|
|
1164
1177
|
/**
|
|
1165
1178
|
* @returns {string}
|
|
@@ -1253,6 +1266,25 @@ export class Conversation {
|
|
|
1253
1266
|
const ptr = this.__destroy_into_raw();
|
|
1254
1267
|
wasm.__wbg_conversation_free(ptr, 0);
|
|
1255
1268
|
}
|
|
1269
|
+
/**
|
|
1270
|
+
* @returns {ConsentState}
|
|
1271
|
+
*/
|
|
1272
|
+
consentState() {
|
|
1273
|
+
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1274
|
+
if (ret[2]) {
|
|
1275
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1276
|
+
}
|
|
1277
|
+
return ret[0];
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* @param {ConsentState} state
|
|
1281
|
+
*/
|
|
1282
|
+
updateConsentState(state) {
|
|
1283
|
+
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1284
|
+
if (ret[1]) {
|
|
1285
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1256
1288
|
/**
|
|
1257
1289
|
* @returns {string}
|
|
1258
1290
|
*/
|
|
@@ -1747,25 +1779,6 @@ export class Conversation {
|
|
|
1747
1779
|
const ret = wasm.conversation_findDuplicateDms(this.__wbg_ptr);
|
|
1748
1780
|
return ret;
|
|
1749
1781
|
}
|
|
1750
|
-
/**
|
|
1751
|
-
* @returns {ConsentState}
|
|
1752
|
-
*/
|
|
1753
|
-
consentState() {
|
|
1754
|
-
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1755
|
-
if (ret[2]) {
|
|
1756
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1757
|
-
}
|
|
1758
|
-
return ret[0];
|
|
1759
|
-
}
|
|
1760
|
-
/**
|
|
1761
|
-
* @param {ConsentState} state
|
|
1762
|
-
*/
|
|
1763
|
-
updateConsentState(state) {
|
|
1764
|
-
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1765
|
-
if (ret[1]) {
|
|
1766
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
1782
|
}
|
|
1770
1783
|
|
|
1771
1784
|
const ConversationDebugInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2529,7 +2542,7 @@ export class GroupMember {
|
|
|
2529
2542
|
set inboxId(arg0) {
|
|
2530
2543
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2531
2544
|
const len0 = WASM_VECTOR_LEN;
|
|
2532
|
-
wasm.
|
|
2545
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2533
2546
|
}
|
|
2534
2547
|
/**
|
|
2535
2548
|
* @returns {Identifier[]}
|
|
@@ -2890,7 +2903,7 @@ export class InboxState {
|
|
|
2890
2903
|
set inboxId(arg0) {
|
|
2891
2904
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2892
2905
|
const len0 = WASM_VECTOR_LEN;
|
|
2893
|
-
wasm.
|
|
2906
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
2894
2907
|
}
|
|
2895
2908
|
/**
|
|
2896
2909
|
* @returns {Identifier}
|
|
@@ -3210,7 +3223,7 @@ export class KeyPackageStatus {
|
|
|
3210
3223
|
* @returns {Lifetime | undefined}
|
|
3211
3224
|
*/
|
|
3212
3225
|
get lifetime() {
|
|
3213
|
-
const ret = wasm.
|
|
3226
|
+
const ret = wasm.__wbg_get_keypackagestatus_lifetime(this.__wbg_ptr);
|
|
3214
3227
|
return ret === 0 ? undefined : Lifetime.__wrap(ret);
|
|
3215
3228
|
}
|
|
3216
3229
|
/**
|
|
@@ -4341,7 +4354,7 @@ export class Reaction {
|
|
|
4341
4354
|
set reference(arg0) {
|
|
4342
4355
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4343
4356
|
const len0 = WASM_VECTOR_LEN;
|
|
4344
|
-
wasm.
|
|
4357
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
4345
4358
|
}
|
|
4346
4359
|
/**
|
|
4347
4360
|
* @returns {string}
|
|
@@ -4364,7 +4377,7 @@ export class Reaction {
|
|
|
4364
4377
|
set referenceInboxId(arg0) {
|
|
4365
4378
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4366
4379
|
const len0 = WASM_VECTOR_LEN;
|
|
4367
|
-
wasm.
|
|
4380
|
+
wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
|
|
4368
4381
|
}
|
|
4369
4382
|
/**
|
|
4370
4383
|
* @returns {ReactionAction}
|
|
@@ -5259,7 +5272,7 @@ function __wbg_get_imports() {
|
|
|
5259
5272
|
const a = state0.a;
|
|
5260
5273
|
state0.a = 0;
|
|
5261
5274
|
try {
|
|
5262
|
-
return
|
|
5275
|
+
return __wbg_adapter_781(a, state0.b, arg0, arg1);
|
|
5263
5276
|
} finally {
|
|
5264
5277
|
state0.a = a;
|
|
5265
5278
|
}
|
|
@@ -5371,19 +5384,19 @@ function __wbg_get_imports() {
|
|
|
5371
5384
|
const ret = arg0.now();
|
|
5372
5385
|
return ret;
|
|
5373
5386
|
};
|
|
5374
|
-
imports.wbg.
|
|
5387
|
+
imports.wbg.__wbg_onconsentupdate_bdad0347f9b3b676 = function(arg0, arg1) {
|
|
5375
5388
|
arg0.on_consent_update(arg1);
|
|
5376
5389
|
};
|
|
5377
|
-
imports.wbg.
|
|
5390
|
+
imports.wbg.__wbg_onconversation_1d2a1e90cdf73ceb = function(arg0, arg1) {
|
|
5378
5391
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
5379
5392
|
};
|
|
5380
|
-
imports.wbg.
|
|
5393
|
+
imports.wbg.__wbg_onerror_240a4f4ca7d674b4 = function(arg0, arg1) {
|
|
5381
5394
|
arg0.on_error(arg1);
|
|
5382
5395
|
};
|
|
5383
|
-
imports.wbg.
|
|
5396
|
+
imports.wbg.__wbg_onmessage_a8e6380c450aba32 = function(arg0, arg1) {
|
|
5384
5397
|
arg0.on_message(Message.__wrap(arg1));
|
|
5385
5398
|
};
|
|
5386
|
-
imports.wbg.
|
|
5399
|
+
imports.wbg.__wbg_onuserpreferenceupdate_4fef83cc66360f3a = function(arg0, arg1, arg2) {
|
|
5387
5400
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
5388
5401
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
5389
5402
|
arg0.on_user_preference_update(v0);
|
|
@@ -5674,20 +5687,20 @@ function __wbg_get_imports() {
|
|
|
5674
5687
|
const ret = false;
|
|
5675
5688
|
return ret;
|
|
5676
5689
|
};
|
|
5677
|
-
imports.wbg.
|
|
5678
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5690
|
+
imports.wbg.__wbindgen_closure_wrapper17770 = function(arg0, arg1, arg2) {
|
|
5691
|
+
const ret = makeMutClosure(arg0, arg1, 4254, __wbg_adapter_50);
|
|
5679
5692
|
return ret;
|
|
5680
5693
|
};
|
|
5681
|
-
imports.wbg.
|
|
5682
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5694
|
+
imports.wbg.__wbindgen_closure_wrapper17930 = function(arg0, arg1, arg2) {
|
|
5695
|
+
const ret = makeMutClosure(arg0, arg1, 4312, __wbg_adapter_53);
|
|
5683
5696
|
return ret;
|
|
5684
5697
|
};
|
|
5685
|
-
imports.wbg.
|
|
5686
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5698
|
+
imports.wbg.__wbindgen_closure_wrapper21038 = function(arg0, arg1, arg2) {
|
|
5699
|
+
const ret = makeMutClosure(arg0, arg1, 4618, __wbg_adapter_56);
|
|
5687
5700
|
return ret;
|
|
5688
5701
|
};
|
|
5689
|
-
imports.wbg.
|
|
5690
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
5702
|
+
imports.wbg.__wbindgen_closure_wrapper21148 = function(arg0, arg1, arg2) {
|
|
5703
|
+
const ret = makeMutClosure(arg0, arg1, 4629, __wbg_adapter_59);
|
|
5691
5704
|
return ret;
|
|
5692
5705
|
};
|
|
5693
5706
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|