@xmtp/wasm-bindings 1.6.1-rc1 → 1.6.1-rc4
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 +648 -637
- package/dist/bindings_wasm.js +1088 -1040
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +529 -525
- package/dist/version.json +3 -3
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -229,6 +229,23 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
229
229
|
return real;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
233
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
234
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
235
|
+
WASM_VECTOR_LEN = arg.length;
|
|
236
|
+
return ptr;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
240
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
241
|
+
for (let i = 0; i < array.length; i++) {
|
|
242
|
+
const add = addToExternrefTable0(array[i]);
|
|
243
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
244
|
+
}
|
|
245
|
+
WASM_VECTOR_LEN = array.length;
|
|
246
|
+
return ptr;
|
|
247
|
+
}
|
|
248
|
+
|
|
232
249
|
function _assertClass(instance, klass) {
|
|
233
250
|
if (!(instance instanceof klass)) {
|
|
234
251
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -240,70 +257,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
240
257
|
wasm.__externref_table_dealloc(idx);
|
|
241
258
|
return value;
|
|
242
259
|
}
|
|
243
|
-
/**
|
|
244
|
-
* @param {Reaction} reaction
|
|
245
|
-
* @returns {Uint8Array}
|
|
246
|
-
*/
|
|
247
|
-
export function encodeReaction(reaction) {
|
|
248
|
-
_assertClass(reaction, Reaction);
|
|
249
|
-
var ptr0 = reaction.__destroy_into_raw();
|
|
250
|
-
const ret = wasm.encodeReaction(ptr0);
|
|
251
|
-
if (ret[2]) {
|
|
252
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
253
|
-
}
|
|
254
|
-
return takeFromExternrefTable0(ret[0]);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* @param {Uint8Array} bytes
|
|
259
|
-
* @returns {Reaction}
|
|
260
|
-
*/
|
|
261
|
-
export function decodeReaction(bytes) {
|
|
262
|
-
const ret = wasm.decodeReaction(bytes);
|
|
263
|
-
if (ret[2]) {
|
|
264
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
265
|
-
}
|
|
266
|
-
return Reaction.__wrap(ret[0]);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* @param {string} v3_host
|
|
271
|
-
* @param {string | null | undefined} gateway_host
|
|
272
|
-
* @param {Identifier} accountIdentifier
|
|
273
|
-
* @returns {Promise<string | undefined>}
|
|
274
|
-
*/
|
|
275
|
-
export function getInboxIdForIdentifier(v3_host, gateway_host, accountIdentifier) {
|
|
276
|
-
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
277
|
-
const len0 = WASM_VECTOR_LEN;
|
|
278
|
-
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
279
|
-
var len1 = WASM_VECTOR_LEN;
|
|
280
|
-
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
|
|
281
|
-
return ret;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* @param {Identifier} accountIdentifier
|
|
286
|
-
* @returns {string}
|
|
287
|
-
*/
|
|
288
|
-
export function generateInboxId(accountIdentifier) {
|
|
289
|
-
let deferred2_0;
|
|
290
|
-
let deferred2_1;
|
|
291
|
-
try {
|
|
292
|
-
const ret = wasm.generateInboxId(accountIdentifier);
|
|
293
|
-
var ptr1 = ret[0];
|
|
294
|
-
var len1 = ret[1];
|
|
295
|
-
if (ret[3]) {
|
|
296
|
-
ptr1 = 0; len1 = 0;
|
|
297
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
298
|
-
}
|
|
299
|
-
deferred2_0 = ptr1;
|
|
300
|
-
deferred2_1 = len1;
|
|
301
|
-
return getStringFromWasm0(ptr1, len1);
|
|
302
|
-
} finally {
|
|
303
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
260
|
/**
|
|
308
261
|
* @param {string} signature_text
|
|
309
262
|
* @param {Uint8Array} signature_bytes
|
|
@@ -318,15 +271,6 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
318
271
|
}
|
|
319
272
|
}
|
|
320
273
|
|
|
321
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
322
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
323
|
-
for (let i = 0; i < array.length; i++) {
|
|
324
|
-
const add = addToExternrefTable0(array[i]);
|
|
325
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
326
|
-
}
|
|
327
|
-
WASM_VECTOR_LEN = array.length;
|
|
328
|
-
return ptr;
|
|
329
|
-
}
|
|
330
274
|
/**
|
|
331
275
|
* @param {string} v3_host
|
|
332
276
|
* @param {string | null | undefined} gateway_host
|
|
@@ -367,12 +311,58 @@ export function applySignatureRequest(v3_host, gateway_host, signature_request)
|
|
|
367
311
|
return ret;
|
|
368
312
|
}
|
|
369
313
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
314
|
+
/**
|
|
315
|
+
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
316
|
+
* @returns {Uint8Array}
|
|
317
|
+
*/
|
|
318
|
+
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
319
|
+
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
320
|
+
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
321
|
+
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
322
|
+
if (ret[2]) {
|
|
323
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
324
|
+
}
|
|
325
|
+
return takeFromExternrefTable0(ret[0]);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @param {Uint8Array} bytes
|
|
330
|
+
* @returns {MultiRemoteAttachment}
|
|
331
|
+
*/
|
|
332
|
+
export function decodeMultiRemoteAttachment(bytes) {
|
|
333
|
+
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
334
|
+
if (ret[2]) {
|
|
335
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
336
|
+
}
|
|
337
|
+
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @param {Reaction} reaction
|
|
342
|
+
* @returns {Uint8Array}
|
|
343
|
+
*/
|
|
344
|
+
export function encodeReaction(reaction) {
|
|
345
|
+
_assertClass(reaction, Reaction);
|
|
346
|
+
var ptr0 = reaction.__destroy_into_raw();
|
|
347
|
+
const ret = wasm.encodeReaction(ptr0);
|
|
348
|
+
if (ret[2]) {
|
|
349
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
350
|
+
}
|
|
351
|
+
return takeFromExternrefTable0(ret[0]);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @param {Uint8Array} bytes
|
|
356
|
+
* @returns {Reaction}
|
|
357
|
+
*/
|
|
358
|
+
export function decodeReaction(bytes) {
|
|
359
|
+
const ret = wasm.decodeReaction(bytes);
|
|
360
|
+
if (ret[2]) {
|
|
361
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
362
|
+
}
|
|
363
|
+
return Reaction.__wrap(ret[0]);
|
|
375
364
|
}
|
|
365
|
+
|
|
376
366
|
/**
|
|
377
367
|
* @param {string} host
|
|
378
368
|
* @param {string} inbox_id
|
|
@@ -410,32 +400,6 @@ export function createClient(host, inbox_id, account_identifier, db_path, encryp
|
|
|
410
400
|
return ret;
|
|
411
401
|
}
|
|
412
402
|
|
|
413
|
-
/**
|
|
414
|
-
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
415
|
-
* @returns {Uint8Array}
|
|
416
|
-
*/
|
|
417
|
-
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
418
|
-
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
419
|
-
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
420
|
-
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
421
|
-
if (ret[2]) {
|
|
422
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
423
|
-
}
|
|
424
|
-
return takeFromExternrefTable0(ret[0]);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* @param {Uint8Array} bytes
|
|
429
|
-
* @returns {MultiRemoteAttachment}
|
|
430
|
-
*/
|
|
431
|
-
export function decodeMultiRemoteAttachment(bytes) {
|
|
432
|
-
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
433
|
-
if (ret[2]) {
|
|
434
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
435
|
-
}
|
|
436
|
-
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
403
|
/**
|
|
440
404
|
* @param {string} v3_host
|
|
441
405
|
* @param {string | null | undefined} gateway_host
|
|
@@ -453,6 +417,44 @@ export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
|
|
|
453
417
|
return ret;
|
|
454
418
|
}
|
|
455
419
|
|
|
420
|
+
/**
|
|
421
|
+
* @param {string} v3_host
|
|
422
|
+
* @param {string | null | undefined} gateway_host
|
|
423
|
+
* @param {Identifier} accountIdentifier
|
|
424
|
+
* @returns {Promise<string | undefined>}
|
|
425
|
+
*/
|
|
426
|
+
export function getInboxIdForIdentifier(v3_host, gateway_host, accountIdentifier) {
|
|
427
|
+
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
428
|
+
const len0 = WASM_VECTOR_LEN;
|
|
429
|
+
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
430
|
+
var len1 = WASM_VECTOR_LEN;
|
|
431
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
|
|
432
|
+
return ret;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* @param {Identifier} accountIdentifier
|
|
437
|
+
* @returns {string}
|
|
438
|
+
*/
|
|
439
|
+
export function generateInboxId(accountIdentifier) {
|
|
440
|
+
let deferred2_0;
|
|
441
|
+
let deferred2_1;
|
|
442
|
+
try {
|
|
443
|
+
const ret = wasm.generateInboxId(accountIdentifier);
|
|
444
|
+
var ptr1 = ret[0];
|
|
445
|
+
var len1 = ret[1];
|
|
446
|
+
if (ret[3]) {
|
|
447
|
+
ptr1 = 0; len1 = 0;
|
|
448
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
449
|
+
}
|
|
450
|
+
deferred2_0 = ptr1;
|
|
451
|
+
deferred2_1 = len1;
|
|
452
|
+
return getStringFromWasm0(ptr1, len1);
|
|
453
|
+
} finally {
|
|
454
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
456
458
|
/**
|
|
457
459
|
* Entry point invoked by JavaScript in a worker.
|
|
458
460
|
* @param {number} ptr
|
|
@@ -464,24 +466,24 @@ export function task_worker_entry_point(ptr) {
|
|
|
464
466
|
}
|
|
465
467
|
}
|
|
466
468
|
|
|
467
|
-
function
|
|
468
|
-
wasm.
|
|
469
|
+
function __wbg_adapter_12(arg0, arg1) {
|
|
470
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h135d62b0906d3413(arg0, arg1);
|
|
469
471
|
}
|
|
470
472
|
|
|
471
|
-
function
|
|
472
|
-
wasm.
|
|
473
|
+
function __wbg_adapter_23(arg0, arg1) {
|
|
474
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb3fd7a1e3a7fa14d(arg0, arg1);
|
|
473
475
|
}
|
|
474
476
|
|
|
475
|
-
function
|
|
476
|
-
wasm.
|
|
477
|
+
function __wbg_adapter_26(arg0, arg1) {
|
|
478
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h849ef726e44c1bb5(arg0, arg1);
|
|
477
479
|
}
|
|
478
480
|
|
|
479
|
-
function
|
|
480
|
-
wasm.
|
|
481
|
+
function __wbg_adapter_29(arg0, arg1, arg2) {
|
|
482
|
+
wasm.closure7228_externref_shim(arg0, arg1, arg2);
|
|
481
483
|
}
|
|
482
484
|
|
|
483
|
-
function
|
|
484
|
-
wasm.
|
|
485
|
+
function __wbg_adapter_899(arg0, arg1, arg2, arg3) {
|
|
486
|
+
wasm.closure8189_externref_shim(arg0, arg1, arg2, arg3);
|
|
485
487
|
}
|
|
486
488
|
|
|
487
489
|
/**
|
|
@@ -556,6 +558,13 @@ export const GroupPermissionsOptions = Object.freeze({
|
|
|
556
558
|
AdminOnly: 1, "1": "AdminOnly",
|
|
557
559
|
CustomPolicy: 2, "2": "CustomPolicy",
|
|
558
560
|
});
|
|
561
|
+
/**
|
|
562
|
+
* @enum {0 | 1}
|
|
563
|
+
*/
|
|
564
|
+
export const ListConversationsOrderBy = Object.freeze({
|
|
565
|
+
CreatedAt: 0, "0": "CreatedAt",
|
|
566
|
+
LastActivity: 1, "1": "LastActivity",
|
|
567
|
+
});
|
|
559
568
|
/**
|
|
560
569
|
* @enum {0 | 1 | 2 | 3 | 4}
|
|
561
570
|
*/
|
|
@@ -914,6 +923,38 @@ export class Client {
|
|
|
914
923
|
const ptr = this.__destroy_into_raw();
|
|
915
924
|
wasm.__wbg_client_free(ptr, 0);
|
|
916
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* @param {SignatureRequestHandle} signature_request
|
|
928
|
+
* @returns {Promise<void>}
|
|
929
|
+
*/
|
|
930
|
+
registerIdentity(signature_request) {
|
|
931
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
932
|
+
var ptr0 = signature_request.__destroy_into_raw();
|
|
933
|
+
const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
|
|
934
|
+
return ret;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* @param {SignatureRequestHandle} signature_request
|
|
938
|
+
* @returns {Promise<void>}
|
|
939
|
+
*/
|
|
940
|
+
applySignatureRequest(signature_request) {
|
|
941
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
942
|
+
const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
|
|
943
|
+
return ret;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* @param {string} signature_text
|
|
947
|
+
* @returns {Uint8Array}
|
|
948
|
+
*/
|
|
949
|
+
signWithInstallationKey(signature_text) {
|
|
950
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
951
|
+
const len0 = WASM_VECTOR_LEN;
|
|
952
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
953
|
+
if (ret[2]) {
|
|
954
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
955
|
+
}
|
|
956
|
+
return takeFromExternrefTable0(ret[0]);
|
|
957
|
+
}
|
|
917
958
|
/**
|
|
918
959
|
* @returns {SignatureRequestHandle | undefined}
|
|
919
960
|
*/
|
|
@@ -941,15 +982,20 @@ export class Client {
|
|
|
941
982
|
return ret;
|
|
942
983
|
}
|
|
943
984
|
/**
|
|
944
|
-
* @
|
|
985
|
+
* @param {string} signature_text
|
|
986
|
+
* @param {Uint8Array} signature_bytes
|
|
945
987
|
*/
|
|
946
|
-
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
988
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
989
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
990
|
+
const len0 = WASM_VECTOR_LEN;
|
|
991
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
992
|
+
if (ret[1]) {
|
|
993
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* @param {Uint8Array[]} installation_ids
|
|
998
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
953
999
|
*/
|
|
954
1000
|
revokeInstallationsSignatureRequest(installation_ids) {
|
|
955
1001
|
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
@@ -966,57 +1012,10 @@ export class Client {
|
|
|
966
1012
|
return ret;
|
|
967
1013
|
}
|
|
968
1014
|
/**
|
|
969
|
-
* @
|
|
970
|
-
* @returns {Promise<void>}
|
|
971
|
-
*/
|
|
972
|
-
applySignatureRequest(signature_request) {
|
|
973
|
-
_assertClass(signature_request, SignatureRequestHandle);
|
|
974
|
-
const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
|
|
975
|
-
return ret;
|
|
976
|
-
}
|
|
977
|
-
/**
|
|
978
|
-
* @param {SignatureRequestHandle} signature_request
|
|
979
|
-
* @returns {Promise<void>}
|
|
980
|
-
*/
|
|
981
|
-
registerIdentity(signature_request) {
|
|
982
|
-
_assertClass(signature_request, SignatureRequestHandle);
|
|
983
|
-
var ptr0 = signature_request.__destroy_into_raw();
|
|
984
|
-
const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
|
|
985
|
-
return ret;
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* @param {string} signature_text
|
|
989
|
-
* @returns {Uint8Array}
|
|
990
|
-
*/
|
|
991
|
-
signWithInstallationKey(signature_text) {
|
|
992
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
993
|
-
const len0 = WASM_VECTOR_LEN;
|
|
994
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
995
|
-
if (ret[2]) {
|
|
996
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
997
|
-
}
|
|
998
|
-
return takeFromExternrefTable0(ret[0]);
|
|
999
|
-
}
|
|
1000
|
-
/**
|
|
1001
|
-
* @param {string} signature_text
|
|
1002
|
-
* @param {Uint8Array} signature_bytes
|
|
1003
|
-
*/
|
|
1004
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
1005
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1006
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1007
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
1008
|
-
if (ret[1]) {
|
|
1009
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
/**
|
|
1013
|
-
* @param {Consent[]} records
|
|
1014
|
-
* @returns {Promise<void>}
|
|
1015
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
1015
1016
|
*/
|
|
1016
|
-
|
|
1017
|
-
const
|
|
1018
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1019
|
-
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
1017
|
+
revokeAllOtherInstallationsSignatureRequest() {
|
|
1018
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
|
|
1020
1019
|
return ret;
|
|
1021
1020
|
}
|
|
1022
1021
|
/**
|
|
@@ -1031,20 +1030,23 @@ export class Client {
|
|
|
1031
1030
|
return ret;
|
|
1032
1031
|
}
|
|
1033
1032
|
/**
|
|
1034
|
-
* @
|
|
1033
|
+
* @param {Consent[]} records
|
|
1034
|
+
* @returns {Promise<void>}
|
|
1035
1035
|
*/
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1036
|
+
setConsentStates(records) {
|
|
1037
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
1038
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1039
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
1038
1040
|
return ret;
|
|
1039
1041
|
}
|
|
1040
1042
|
/**
|
|
1041
1043
|
* @returns {string}
|
|
1042
1044
|
*/
|
|
1043
|
-
get
|
|
1045
|
+
get appVersion() {
|
|
1044
1046
|
let deferred1_0;
|
|
1045
1047
|
let deferred1_1;
|
|
1046
1048
|
try {
|
|
1047
|
-
const ret = wasm.
|
|
1049
|
+
const ret = wasm.client_appVersion(this.__wbg_ptr);
|
|
1048
1050
|
deferred1_0 = ret[0];
|
|
1049
1051
|
deferred1_1 = ret[1];
|
|
1050
1052
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1052,6 +1054,24 @@ export class Client {
|
|
|
1052
1054
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1053
1055
|
}
|
|
1054
1056
|
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Output booleans should be zipped with the index of input identifiers
|
|
1059
|
+
* @param {Identifier[]} account_identifiers
|
|
1060
|
+
* @returns {Promise<any>}
|
|
1061
|
+
*/
|
|
1062
|
+
canMessage(account_identifiers) {
|
|
1063
|
+
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1064
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1065
|
+
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
1066
|
+
return ret;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* @returns {Conversations}
|
|
1070
|
+
*/
|
|
1071
|
+
conversations() {
|
|
1072
|
+
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
1073
|
+
return Conversations.__wrap(ret);
|
|
1074
|
+
}
|
|
1055
1075
|
/**
|
|
1056
1076
|
* @returns {boolean}
|
|
1057
1077
|
*/
|
|
@@ -1060,35 +1080,33 @@ export class Client {
|
|
|
1060
1080
|
return ret !== 0;
|
|
1061
1081
|
}
|
|
1062
1082
|
/**
|
|
1063
|
-
* @returns {
|
|
1083
|
+
* @returns {ApiStats}
|
|
1064
1084
|
*/
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
try {
|
|
1069
|
-
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
1070
|
-
deferred1_0 = ret[0];
|
|
1071
|
-
deferred1_1 = ret[1];
|
|
1072
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1073
|
-
} finally {
|
|
1074
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1075
|
-
}
|
|
1085
|
+
apiStatistics() {
|
|
1086
|
+
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
1087
|
+
return ApiStats.__wrap(ret);
|
|
1076
1088
|
}
|
|
1077
1089
|
/**
|
|
1078
|
-
* @
|
|
1090
|
+
* @param {Uint8Array} message_id
|
|
1091
|
+
* @returns {number}
|
|
1079
1092
|
*/
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1093
|
+
deleteMessage(message_id) {
|
|
1094
|
+
const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
|
|
1095
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1096
|
+
const ret = wasm.client_deleteMessage(this.__wbg_ptr, ptr0, len0);
|
|
1097
|
+
if (ret[2]) {
|
|
1098
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1099
|
+
}
|
|
1100
|
+
return ret[0] >>> 0;
|
|
1083
1101
|
}
|
|
1084
1102
|
/**
|
|
1085
1103
|
* @returns {string}
|
|
1086
1104
|
*/
|
|
1087
|
-
get
|
|
1105
|
+
get installationId() {
|
|
1088
1106
|
let deferred1_0;
|
|
1089
1107
|
let deferred1_1;
|
|
1090
1108
|
try {
|
|
1091
|
-
const ret = wasm.
|
|
1109
|
+
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
1092
1110
|
deferred1_0 = ret[0];
|
|
1093
1111
|
deferred1_1 = ret[1];
|
|
1094
1112
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1112,62 +1130,55 @@ export class Client {
|
|
|
1112
1130
|
}
|
|
1113
1131
|
}
|
|
1114
1132
|
/**
|
|
1115
|
-
*
|
|
1116
|
-
* @
|
|
1117
|
-
* @returns {Promise<any>}
|
|
1133
|
+
* @param {Uint8Array} message_id
|
|
1134
|
+
* @returns {Promise<DecodedMessage>}
|
|
1118
1135
|
*/
|
|
1119
|
-
|
|
1120
|
-
const ptr0 =
|
|
1136
|
+
messageV2(message_id) {
|
|
1137
|
+
const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
|
|
1121
1138
|
const len0 = WASM_VECTOR_LEN;
|
|
1122
|
-
const ret = wasm.
|
|
1139
|
+
const ret = wasm.client_messageV2(this.__wbg_ptr, ptr0, len0);
|
|
1123
1140
|
return ret;
|
|
1124
1141
|
}
|
|
1125
1142
|
/**
|
|
1126
|
-
* @returns {Promise<
|
|
1143
|
+
* @returns {Promise<GroupSyncSummary>}
|
|
1127
1144
|
*/
|
|
1128
|
-
|
|
1129
|
-
const ret = wasm.
|
|
1145
|
+
syncPreferences() {
|
|
1146
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
1130
1147
|
return ret;
|
|
1131
1148
|
}
|
|
1132
1149
|
/**
|
|
1133
|
-
* @
|
|
1134
|
-
* @returns {Promise<string | undefined>}
|
|
1150
|
+
* @returns {Promise<void>}
|
|
1135
1151
|
*/
|
|
1136
|
-
|
|
1137
|
-
const ret = wasm.
|
|
1152
|
+
sendSyncRequest() {
|
|
1153
|
+
const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
|
|
1138
1154
|
return ret;
|
|
1139
1155
|
}
|
|
1140
1156
|
/**
|
|
1141
|
-
* @
|
|
1142
|
-
* @param {boolean} refresh_from_network
|
|
1143
|
-
* @returns {Promise<InboxState[]>}
|
|
1157
|
+
* @returns {Identifier}
|
|
1144
1158
|
*/
|
|
1145
|
-
|
|
1146
|
-
const
|
|
1147
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1148
|
-
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
1159
|
+
get accountIdentifier() {
|
|
1160
|
+
const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
|
|
1149
1161
|
return ret;
|
|
1150
1162
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
*/
|
|
1154
|
-
conversations() {
|
|
1155
|
-
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
1156
|
-
return Conversations.__wrap(ret);
|
|
1163
|
+
clearAllStatistics() {
|
|
1164
|
+
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
1157
1165
|
}
|
|
1158
1166
|
/**
|
|
1159
|
-
* @
|
|
1167
|
+
* @param {string} server_url
|
|
1168
|
+
* @returns {Promise<string>}
|
|
1160
1169
|
*/
|
|
1161
|
-
|
|
1162
|
-
const
|
|
1170
|
+
uploadDebugArchive(server_url) {
|
|
1171
|
+
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1172
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1173
|
+
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
1163
1174
|
return ret;
|
|
1164
1175
|
}
|
|
1165
1176
|
/**
|
|
1166
|
-
* @returns {
|
|
1177
|
+
* @returns {Uint8Array}
|
|
1167
1178
|
*/
|
|
1168
|
-
|
|
1169
|
-
const ret = wasm.
|
|
1170
|
-
return
|
|
1179
|
+
get installationIdBytes() {
|
|
1180
|
+
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
1181
|
+
return ret;
|
|
1171
1182
|
}
|
|
1172
1183
|
/**
|
|
1173
1184
|
* @returns {IdentityStats}
|
|
@@ -1191,41 +1202,39 @@ export class Client {
|
|
|
1191
1202
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1192
1203
|
}
|
|
1193
1204
|
}
|
|
1194
|
-
clearAllStatistics() {
|
|
1195
|
-
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
1196
|
-
}
|
|
1197
1205
|
/**
|
|
1198
|
-
* @param {string}
|
|
1199
|
-
* @
|
|
1206
|
+
* @param {string[]} inbox_ids
|
|
1207
|
+
* @param {boolean} refresh_from_network
|
|
1208
|
+
* @returns {Promise<InboxState[]>}
|
|
1200
1209
|
*/
|
|
1201
|
-
|
|
1202
|
-
const ptr0 =
|
|
1210
|
+
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
1211
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1203
1212
|
const len0 = WASM_VECTOR_LEN;
|
|
1204
|
-
const ret = wasm.
|
|
1213
|
+
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
1205
1214
|
return ret;
|
|
1206
1215
|
}
|
|
1207
1216
|
/**
|
|
1208
|
-
* @param {
|
|
1209
|
-
* @returns {
|
|
1217
|
+
* @param {Identifier} identifier
|
|
1218
|
+
* @returns {Promise<string | undefined>}
|
|
1210
1219
|
*/
|
|
1211
|
-
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
const ret = wasm.client_deleteMessage(this.__wbg_ptr, ptr0, len0);
|
|
1215
|
-
if (ret[2]) {
|
|
1216
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1217
|
-
}
|
|
1218
|
-
return ret[0] >>> 0;
|
|
1220
|
+
findInboxIdByIdentifier(identifier) {
|
|
1221
|
+
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
1222
|
+
return ret;
|
|
1219
1223
|
}
|
|
1220
1224
|
/**
|
|
1221
|
-
* @
|
|
1222
|
-
* @returns {Promise<DecodedMessage>}
|
|
1225
|
+
* @returns {string}
|
|
1223
1226
|
*/
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1227
|
+
get inboxId() {
|
|
1228
|
+
let deferred1_0;
|
|
1229
|
+
let deferred1_1;
|
|
1230
|
+
try {
|
|
1231
|
+
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
1232
|
+
deferred1_0 = ret[0];
|
|
1233
|
+
deferred1_1 = ret[1];
|
|
1234
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1235
|
+
} finally {
|
|
1236
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1237
|
+
}
|
|
1229
1238
|
}
|
|
1230
1239
|
/**
|
|
1231
1240
|
*
|
|
@@ -1383,6 +1392,22 @@ export class ContentTypeId {
|
|
|
1383
1392
|
const ptr = this.__destroy_into_raw();
|
|
1384
1393
|
wasm.__wbg_contenttypeid_free(ptr, 0);
|
|
1385
1394
|
}
|
|
1395
|
+
/**
|
|
1396
|
+
* @param {string} authority_id
|
|
1397
|
+
* @param {string} type_id
|
|
1398
|
+
* @param {number} version_major
|
|
1399
|
+
* @param {number} version_minor
|
|
1400
|
+
*/
|
|
1401
|
+
constructor(authority_id, type_id, version_major, version_minor) {
|
|
1402
|
+
const ptr0 = passStringToWasm0(authority_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1403
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1404
|
+
const ptr1 = passStringToWasm0(type_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1405
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1406
|
+
const ret = wasm.contenttypeid_new(ptr0, len0, ptr1, len1, version_major, version_minor);
|
|
1407
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1408
|
+
ContentTypeIdFinalization.register(this, this.__wbg_ptr, this);
|
|
1409
|
+
return this;
|
|
1410
|
+
}
|
|
1386
1411
|
/**
|
|
1387
1412
|
* @returns {string}
|
|
1388
1413
|
*/
|
|
@@ -1404,7 +1429,7 @@ export class ContentTypeId {
|
|
|
1404
1429
|
set authorityId(arg0) {
|
|
1405
1430
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1406
1431
|
const len0 = WASM_VECTOR_LEN;
|
|
1407
|
-
wasm.
|
|
1432
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
1408
1433
|
}
|
|
1409
1434
|
/**
|
|
1410
1435
|
* @returns {string}
|
|
@@ -1455,22 +1480,6 @@ export class ContentTypeId {
|
|
|
1455
1480
|
set versionMinor(arg0) {
|
|
1456
1481
|
wasm.__wbg_set_contenttypeid_versionMinor(this.__wbg_ptr, arg0);
|
|
1457
1482
|
}
|
|
1458
|
-
/**
|
|
1459
|
-
* @param {string} authority_id
|
|
1460
|
-
* @param {string} type_id
|
|
1461
|
-
* @param {number} version_major
|
|
1462
|
-
* @param {number} version_minor
|
|
1463
|
-
*/
|
|
1464
|
-
constructor(authority_id, type_id, version_major, version_minor) {
|
|
1465
|
-
const ptr0 = passStringToWasm0(authority_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1466
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1467
|
-
const ptr1 = passStringToWasm0(type_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1468
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1469
|
-
const ret = wasm.contenttypeid_new(ptr0, len0, ptr1, len1, version_major, version_minor);
|
|
1470
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1471
|
-
ContentTypeIdFinalization.register(this, this.__wbg_ptr, this);
|
|
1472
|
-
return this;
|
|
1473
|
-
}
|
|
1474
1483
|
}
|
|
1475
1484
|
if (Symbol.dispose) ContentTypeId.prototype[Symbol.dispose] = ContentTypeId.prototype.free;
|
|
1476
1485
|
|
|
@@ -1519,74 +1528,77 @@ export class Conversation {
|
|
|
1519
1528
|
}
|
|
1520
1529
|
}
|
|
1521
1530
|
/**
|
|
1522
|
-
* @returns {string}
|
|
1531
|
+
* @returns {string[]}
|
|
1523
1532
|
*/
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
const ret = wasm.conversation_id(this.__wbg_ptr);
|
|
1529
|
-
deferred1_0 = ret[0];
|
|
1530
|
-
deferred1_1 = ret[1];
|
|
1531
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1532
|
-
} finally {
|
|
1533
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1533
|
+
adminList() {
|
|
1534
|
+
const ret = wasm.conversation_adminList(this.__wbg_ptr);
|
|
1535
|
+
if (ret[3]) {
|
|
1536
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1534
1537
|
}
|
|
1538
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1539
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1540
|
+
return v1;
|
|
1535
1541
|
}
|
|
1536
1542
|
/**
|
|
1537
|
-
* @
|
|
1538
|
-
* @param {SendMessageOpts} opts
|
|
1539
|
-
* @returns {Promise<string>}
|
|
1543
|
+
* @returns {Promise<any>}
|
|
1540
1544
|
*/
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
var ptr0 = encoded_content.__destroy_into_raw();
|
|
1544
|
-
_assertClass(opts, SendMessageOpts);
|
|
1545
|
-
var ptr1 = opts.__destroy_into_raw();
|
|
1546
|
-
const ret = wasm.conversation_send(this.__wbg_ptr, ptr0, ptr1);
|
|
1545
|
+
getDebugInfo() {
|
|
1546
|
+
const ret = wasm.conversation_getDebugInfo(this.__wbg_ptr);
|
|
1547
1547
|
return ret;
|
|
1548
1548
|
}
|
|
1549
1549
|
/**
|
|
1550
|
-
* send a message without immediately publishing to the delivery service.
|
|
1551
|
-
* @param {EncodedContent} encoded_content
|
|
1552
|
-
* @param {SendMessageOpts} opts
|
|
1553
1550
|
* @returns {string}
|
|
1554
1551
|
*/
|
|
1555
|
-
|
|
1556
|
-
let
|
|
1557
|
-
let
|
|
1552
|
+
groupName() {
|
|
1553
|
+
let deferred2_0;
|
|
1554
|
+
let deferred2_1;
|
|
1558
1555
|
try {
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1561
|
-
|
|
1562
|
-
var ptr1 = opts.__destroy_into_raw();
|
|
1563
|
-
const ret = wasm.conversation_sendOptimistic(this.__wbg_ptr, ptr0, ptr1);
|
|
1564
|
-
var ptr3 = ret[0];
|
|
1565
|
-
var len3 = ret[1];
|
|
1556
|
+
const ret = wasm.conversation_groupName(this.__wbg_ptr);
|
|
1557
|
+
var ptr1 = ret[0];
|
|
1558
|
+
var len1 = ret[1];
|
|
1566
1559
|
if (ret[3]) {
|
|
1567
|
-
|
|
1560
|
+
ptr1 = 0; len1 = 0;
|
|
1568
1561
|
throw takeFromExternrefTable0(ret[2]);
|
|
1569
1562
|
}
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
return getStringFromWasm0(
|
|
1563
|
+
deferred2_0 = ptr1;
|
|
1564
|
+
deferred2_1 = len1;
|
|
1565
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1573
1566
|
} finally {
|
|
1574
|
-
wasm.__wbindgen_free(
|
|
1567
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1575
1568
|
}
|
|
1576
1569
|
}
|
|
1577
1570
|
/**
|
|
1578
|
-
*
|
|
1571
|
+
* @param {Identifier[]} account_identifiers
|
|
1579
1572
|
* @returns {Promise<void>}
|
|
1580
1573
|
*/
|
|
1581
|
-
|
|
1582
|
-
const
|
|
1574
|
+
addMembers(account_identifiers) {
|
|
1575
|
+
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1576
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1577
|
+
const ret = wasm.conversation_addMembers(this.__wbg_ptr, ptr0, len0);
|
|
1583
1578
|
return ret;
|
|
1584
1579
|
}
|
|
1585
1580
|
/**
|
|
1581
|
+
* @returns {Promise<any>}
|
|
1582
|
+
*/
|
|
1583
|
+
listMembers() {
|
|
1584
|
+
const ret = wasm.conversation_listMembers(this.__wbg_ptr);
|
|
1585
|
+
return ret;
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* @param {string} inbox_id
|
|
1586
1589
|
* @returns {Promise<void>}
|
|
1587
1590
|
*/
|
|
1588
|
-
|
|
1589
|
-
const
|
|
1591
|
+
removeAdmin(inbox_id) {
|
|
1592
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1593
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1594
|
+
const ret = wasm.conversation_removeAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1595
|
+
return ret;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* @returns {bigint}
|
|
1599
|
+
*/
|
|
1600
|
+
createdAtNs() {
|
|
1601
|
+
const ret = wasm.conversation_createdAtNs(this.__wbg_ptr);
|
|
1590
1602
|
return ret;
|
|
1591
1603
|
}
|
|
1592
1604
|
/**
|
|
@@ -1603,75 +1615,35 @@ export class Conversation {
|
|
|
1603
1615
|
return ret;
|
|
1604
1616
|
}
|
|
1605
1617
|
/**
|
|
1606
|
-
* @
|
|
1607
|
-
* @returns {Promise<bigint>}
|
|
1618
|
+
* @returns {any}
|
|
1608
1619
|
*/
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
if (
|
|
1612
|
-
|
|
1613
|
-
ptr0 = opts.__destroy_into_raw();
|
|
1620
|
+
getHmacKeys() {
|
|
1621
|
+
const ret = wasm.conversation_getHmacKeys(this.__wbg_ptr);
|
|
1622
|
+
if (ret[2]) {
|
|
1623
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1614
1624
|
}
|
|
1615
|
-
|
|
1616
|
-
return ret;
|
|
1625
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1617
1626
|
}
|
|
1618
1627
|
/**
|
|
1619
1628
|
* @param {ListMessagesOptions | null} [opts]
|
|
1620
|
-
* @returns {Promise<
|
|
1629
|
+
* @returns {Promise<bigint>}
|
|
1621
1630
|
*/
|
|
1622
|
-
|
|
1631
|
+
countMessages(opts) {
|
|
1623
1632
|
let ptr0 = 0;
|
|
1624
1633
|
if (!isLikeNone(opts)) {
|
|
1625
1634
|
_assertClass(opts, ListMessagesOptions);
|
|
1626
1635
|
ptr0 = opts.__destroy_into_raw();
|
|
1627
1636
|
}
|
|
1628
|
-
const ret = wasm.
|
|
1637
|
+
const ret = wasm.conversation_countMessages(this.__wbg_ptr, ptr0);
|
|
1629
1638
|
return ret;
|
|
1630
1639
|
}
|
|
1631
1640
|
/**
|
|
1632
|
-
* @returns {Promise<
|
|
1641
|
+
* @returns {Promise<GroupMetadata>}
|
|
1633
1642
|
*/
|
|
1634
|
-
|
|
1635
|
-
const ret = wasm.
|
|
1643
|
+
groupMetadata() {
|
|
1644
|
+
const ret = wasm.conversation_groupMetadata(this.__wbg_ptr);
|
|
1636
1645
|
return ret;
|
|
1637
1646
|
}
|
|
1638
|
-
/**
|
|
1639
|
-
* @returns {string[]}
|
|
1640
|
-
*/
|
|
1641
|
-
adminList() {
|
|
1642
|
-
const ret = wasm.conversation_adminList(this.__wbg_ptr);
|
|
1643
|
-
if (ret[3]) {
|
|
1644
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1645
|
-
}
|
|
1646
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1647
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1648
|
-
return v1;
|
|
1649
|
-
}
|
|
1650
|
-
/**
|
|
1651
|
-
* @returns {string[]}
|
|
1652
|
-
*/
|
|
1653
|
-
superAdminList() {
|
|
1654
|
-
const ret = wasm.conversation_superAdminList(this.__wbg_ptr);
|
|
1655
|
-
if (ret[3]) {
|
|
1656
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1657
|
-
}
|
|
1658
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1659
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1660
|
-
return v1;
|
|
1661
|
-
}
|
|
1662
|
-
/**
|
|
1663
|
-
* @param {string} inbox_id
|
|
1664
|
-
* @returns {boolean}
|
|
1665
|
-
*/
|
|
1666
|
-
isAdmin(inbox_id) {
|
|
1667
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1668
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1669
|
-
const ret = wasm.conversation_isAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1670
|
-
if (ret[2]) {
|
|
1671
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1672
|
-
}
|
|
1673
|
-
return ret[0] !== 0;
|
|
1674
|
-
}
|
|
1675
1647
|
/**
|
|
1676
1648
|
* @param {string} inbox_id
|
|
1677
1649
|
* @returns {boolean}
|
|
@@ -1689,30 +1661,10 @@ export class Conversation {
|
|
|
1689
1661
|
* @param {Identifier[]} account_identifiers
|
|
1690
1662
|
* @returns {Promise<void>}
|
|
1691
1663
|
*/
|
|
1692
|
-
|
|
1664
|
+
removeMembers(account_identifiers) {
|
|
1693
1665
|
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1694
1666
|
const len0 = WASM_VECTOR_LEN;
|
|
1695
|
-
const ret = wasm.
|
|
1696
|
-
return ret;
|
|
1697
|
-
}
|
|
1698
|
-
/**
|
|
1699
|
-
* @param {string} inbox_id
|
|
1700
|
-
* @returns {Promise<void>}
|
|
1701
|
-
*/
|
|
1702
|
-
addAdmin(inbox_id) {
|
|
1703
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1704
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1705
|
-
const ret = wasm.conversation_addAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1706
|
-
return ret;
|
|
1707
|
-
}
|
|
1708
|
-
/**
|
|
1709
|
-
* @param {string} inbox_id
|
|
1710
|
-
* @returns {Promise<void>}
|
|
1711
|
-
*/
|
|
1712
|
-
removeAdmin(inbox_id) {
|
|
1713
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1714
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1715
|
-
const ret = wasm.conversation_removeAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1667
|
+
const ret = wasm.conversation_removeMembers(this.__wbg_ptr, ptr0, len0);
|
|
1716
1668
|
return ret;
|
|
1717
1669
|
}
|
|
1718
1670
|
/**
|
|
@@ -1726,73 +1678,41 @@ export class Conversation {
|
|
|
1726
1678
|
return ret;
|
|
1727
1679
|
}
|
|
1728
1680
|
/**
|
|
1729
|
-
*
|
|
1730
|
-
* @
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1734
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1735
|
-
const ret = wasm.conversation_removeSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1736
|
-
return ret;
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* @returns {GroupPermissions}
|
|
1681
|
+
* send a message without immediately publishing to the delivery service.
|
|
1682
|
+
* @param {EncodedContent} encoded_content
|
|
1683
|
+
* @param {SendMessageOpts} opts
|
|
1684
|
+
* @returns {string}
|
|
1740
1685
|
*/
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1686
|
+
sendOptimistic(encoded_content, opts) {
|
|
1687
|
+
let deferred4_0;
|
|
1688
|
+
let deferred4_1;
|
|
1689
|
+
try {
|
|
1690
|
+
_assertClass(encoded_content, EncodedContent);
|
|
1691
|
+
var ptr0 = encoded_content.__destroy_into_raw();
|
|
1692
|
+
_assertClass(opts, SendMessageOpts);
|
|
1693
|
+
var ptr1 = opts.__destroy_into_raw();
|
|
1694
|
+
const ret = wasm.conversation_sendOptimistic(this.__wbg_ptr, ptr0, ptr1);
|
|
1695
|
+
var ptr3 = ret[0];
|
|
1696
|
+
var len3 = ret[1];
|
|
1697
|
+
if (ret[3]) {
|
|
1698
|
+
ptr3 = 0; len3 = 0;
|
|
1699
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1700
|
+
}
|
|
1701
|
+
deferred4_0 = ptr3;
|
|
1702
|
+
deferred4_1 = len3;
|
|
1703
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1704
|
+
} finally {
|
|
1705
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1745
1706
|
}
|
|
1746
|
-
return GroupPermissions.__wrap(ret[0]);
|
|
1747
|
-
}
|
|
1748
|
-
/**
|
|
1749
|
-
* @param {string[]} inbox_ids
|
|
1750
|
-
* @returns {Promise<void>}
|
|
1751
|
-
*/
|
|
1752
|
-
addMembersByInboxId(inbox_ids) {
|
|
1753
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1754
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1755
|
-
const ret = wasm.conversation_addMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1756
|
-
return ret;
|
|
1757
|
-
}
|
|
1758
|
-
/**
|
|
1759
|
-
* @param {Identifier[]} account_identifiers
|
|
1760
|
-
* @returns {Promise<void>}
|
|
1761
|
-
*/
|
|
1762
|
-
removeMembers(account_identifiers) {
|
|
1763
|
-
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1764
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1765
|
-
const ret = wasm.conversation_removeMembers(this.__wbg_ptr, ptr0, len0);
|
|
1766
|
-
return ret;
|
|
1767
|
-
}
|
|
1768
|
-
/**
|
|
1769
|
-
* @param {string[]} inbox_ids
|
|
1770
|
-
* @returns {Promise<void>}
|
|
1771
|
-
*/
|
|
1772
|
-
removeMembersByInboxId(inbox_ids) {
|
|
1773
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1774
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1775
|
-
const ret = wasm.conversation_removeMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1776
|
-
return ret;
|
|
1777
|
-
}
|
|
1778
|
-
/**
|
|
1779
|
-
* @param {string} group_name
|
|
1780
|
-
* @returns {Promise<void>}
|
|
1781
|
-
*/
|
|
1782
|
-
updateGroupName(group_name) {
|
|
1783
|
-
const ptr0 = passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1784
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1785
|
-
const ret = wasm.conversation_updateGroupName(this.__wbg_ptr, ptr0, len0);
|
|
1786
|
-
return ret;
|
|
1787
1707
|
}
|
|
1788
1708
|
/**
|
|
1789
1709
|
* @returns {string}
|
|
1790
1710
|
*/
|
|
1791
|
-
|
|
1711
|
+
dmPeerInboxId() {
|
|
1792
1712
|
let deferred2_0;
|
|
1793
1713
|
let deferred2_1;
|
|
1794
1714
|
try {
|
|
1795
|
-
const ret = wasm.
|
|
1715
|
+
const ret = wasm.conversation_dmPeerInboxId(this.__wbg_ptr);
|
|
1796
1716
|
var ptr1 = ret[0];
|
|
1797
1717
|
var len1 = ret[1];
|
|
1798
1718
|
if (ret[3]) {
|
|
@@ -1807,23 +1727,33 @@ export class Conversation {
|
|
|
1807
1727
|
}
|
|
1808
1728
|
}
|
|
1809
1729
|
/**
|
|
1810
|
-
*
|
|
1730
|
+
* Publish all unpublished messages
|
|
1811
1731
|
* @returns {Promise<void>}
|
|
1812
1732
|
*/
|
|
1813
|
-
|
|
1814
|
-
const
|
|
1815
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1816
|
-
const ret = wasm.conversation_updateGroupImageUrlSquare(this.__wbg_ptr, ptr0, len0);
|
|
1733
|
+
publishMessages() {
|
|
1734
|
+
const ret = wasm.conversation_publishMessages(this.__wbg_ptr);
|
|
1817
1735
|
return ret;
|
|
1818
1736
|
}
|
|
1737
|
+
/**
|
|
1738
|
+
* @returns {string[]}
|
|
1739
|
+
*/
|
|
1740
|
+
superAdminList() {
|
|
1741
|
+
const ret = wasm.conversation_superAdminList(this.__wbg_ptr);
|
|
1742
|
+
if (ret[3]) {
|
|
1743
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1744
|
+
}
|
|
1745
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1746
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1747
|
+
return v1;
|
|
1748
|
+
}
|
|
1819
1749
|
/**
|
|
1820
1750
|
* @returns {string}
|
|
1821
1751
|
*/
|
|
1822
|
-
|
|
1752
|
+
addedByInboxId() {
|
|
1823
1753
|
let deferred2_0;
|
|
1824
1754
|
let deferred2_1;
|
|
1825
1755
|
try {
|
|
1826
|
-
const ret = wasm.
|
|
1756
|
+
const ret = wasm.conversation_addedByInboxId(this.__wbg_ptr);
|
|
1827
1757
|
var ptr1 = ret[0];
|
|
1828
1758
|
var len1 = ret[1];
|
|
1829
1759
|
if (ret[3]) {
|
|
@@ -1838,13 +1768,16 @@ export class Conversation {
|
|
|
1838
1768
|
}
|
|
1839
1769
|
}
|
|
1840
1770
|
/**
|
|
1841
|
-
* @param {
|
|
1842
|
-
* @returns {Promise<
|
|
1771
|
+
* @param {ListMessagesOptions | null} [opts]
|
|
1772
|
+
* @returns {Promise<DecodedMessage[]>}
|
|
1843
1773
|
*/
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1774
|
+
findMessagesV2(opts) {
|
|
1775
|
+
let ptr0 = 0;
|
|
1776
|
+
if (!isLikeNone(opts)) {
|
|
1777
|
+
_assertClass(opts, ListMessagesOptions);
|
|
1778
|
+
ptr0 = opts.__destroy_into_raw();
|
|
1779
|
+
}
|
|
1780
|
+
const ret = wasm.conversation_findMessagesV2(this.__wbg_ptr, ptr0);
|
|
1848
1781
|
return ret;
|
|
1849
1782
|
}
|
|
1850
1783
|
/**
|
|
@@ -1869,32 +1802,31 @@ export class Conversation {
|
|
|
1869
1802
|
}
|
|
1870
1803
|
}
|
|
1871
1804
|
/**
|
|
1872
|
-
* @
|
|
1873
|
-
* @returns {StreamCloser}
|
|
1805
|
+
* @returns {GroupPermissions}
|
|
1874
1806
|
*/
|
|
1875
|
-
|
|
1876
|
-
const ret = wasm.
|
|
1807
|
+
groupPermissions() {
|
|
1808
|
+
const ret = wasm.conversation_groupPermissions(this.__wbg_ptr);
|
|
1877
1809
|
if (ret[2]) {
|
|
1878
1810
|
throw takeFromExternrefTable0(ret[1]);
|
|
1879
1811
|
}
|
|
1880
|
-
return
|
|
1812
|
+
return GroupPermissions.__wrap(ret[0]);
|
|
1881
1813
|
}
|
|
1882
1814
|
/**
|
|
1883
|
-
* @
|
|
1815
|
+
* @param {string} group_name
|
|
1816
|
+
* @returns {Promise<void>}
|
|
1884
1817
|
*/
|
|
1885
|
-
|
|
1886
|
-
const
|
|
1818
|
+
updateGroupName(group_name) {
|
|
1819
|
+
const ptr0 = passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1820
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1821
|
+
const ret = wasm.conversation_updateGroupName(this.__wbg_ptr, ptr0, len0);
|
|
1887
1822
|
return ret;
|
|
1888
1823
|
}
|
|
1889
1824
|
/**
|
|
1890
|
-
* @returns {
|
|
1825
|
+
* @returns {Promise<Conversation[]>}
|
|
1891
1826
|
*/
|
|
1892
|
-
|
|
1893
|
-
const ret = wasm.
|
|
1894
|
-
|
|
1895
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1896
|
-
}
|
|
1897
|
-
return ret[0] !== 0;
|
|
1827
|
+
findDuplicateDms() {
|
|
1828
|
+
const ret = wasm.conversation_findDuplicateDms(this.__wbg_ptr);
|
|
1829
|
+
return ret;
|
|
1898
1830
|
}
|
|
1899
1831
|
/**
|
|
1900
1832
|
* @returns {string | undefined}
|
|
@@ -1912,41 +1844,30 @@ export class Conversation {
|
|
|
1912
1844
|
return v1;
|
|
1913
1845
|
}
|
|
1914
1846
|
/**
|
|
1915
|
-
* @
|
|
1847
|
+
* @param {string} inbox_id
|
|
1848
|
+
* @returns {Promise<void>}
|
|
1916
1849
|
*/
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
var ptr1 = ret[0];
|
|
1923
|
-
var len1 = ret[1];
|
|
1924
|
-
if (ret[3]) {
|
|
1925
|
-
ptr1 = 0; len1 = 0;
|
|
1926
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1927
|
-
}
|
|
1928
|
-
deferred2_0 = ptr1;
|
|
1929
|
-
deferred2_1 = len1;
|
|
1930
|
-
return getStringFromWasm0(ptr1, len1);
|
|
1931
|
-
} finally {
|
|
1932
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1933
|
-
}
|
|
1850
|
+
removeSuperAdmin(inbox_id) {
|
|
1851
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1852
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1853
|
+
const ret = wasm.conversation_removeSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1854
|
+
return ret;
|
|
1934
1855
|
}
|
|
1935
1856
|
/**
|
|
1936
|
-
* @returns {Promise<
|
|
1857
|
+
* @returns {Promise<any>}
|
|
1937
1858
|
*/
|
|
1938
|
-
|
|
1939
|
-
const ret = wasm.
|
|
1859
|
+
getLastReadTimes() {
|
|
1860
|
+
const ret = wasm.conversation_getLastReadTimes(this.__wbg_ptr);
|
|
1940
1861
|
return ret;
|
|
1941
1862
|
}
|
|
1942
1863
|
/**
|
|
1943
1864
|
* @returns {string}
|
|
1944
1865
|
*/
|
|
1945
|
-
|
|
1866
|
+
groupImageUrlSquare() {
|
|
1946
1867
|
let deferred2_0;
|
|
1947
1868
|
let deferred2_1;
|
|
1948
1869
|
try {
|
|
1949
|
-
const ret = wasm.
|
|
1870
|
+
const ret = wasm.conversation_groupImageUrlSquare(this.__wbg_ptr);
|
|
1950
1871
|
var ptr1 = ret[0];
|
|
1951
1872
|
var len1 = ret[1];
|
|
1952
1873
|
if (ret[3]) {
|
|
@@ -1960,6 +1881,26 @@ export class Conversation {
|
|
|
1960
1881
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1961
1882
|
}
|
|
1962
1883
|
}
|
|
1884
|
+
/**
|
|
1885
|
+
* @param {string[]} inbox_ids
|
|
1886
|
+
* @returns {Promise<void>}
|
|
1887
|
+
*/
|
|
1888
|
+
addMembersByInboxId(inbox_ids) {
|
|
1889
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1890
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1891
|
+
const ret = wasm.conversation_addMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1892
|
+
return ret;
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* @param {string} group_description
|
|
1896
|
+
* @returns {Promise<void>}
|
|
1897
|
+
*/
|
|
1898
|
+
updateGroupDescription(group_description) {
|
|
1899
|
+
const ptr0 = passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1900
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1901
|
+
const ret = wasm.conversation_updateGroupDescription(this.__wbg_ptr, ptr0, len0);
|
|
1902
|
+
return ret;
|
|
1903
|
+
}
|
|
1963
1904
|
/**
|
|
1964
1905
|
* @param {PermissionUpdateType} permission_update_type
|
|
1965
1906
|
* @param {PermissionPolicy} permission_policy_option
|
|
@@ -1970,86 +1911,154 @@ export class Conversation {
|
|
|
1970
1911
|
const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permission_update_type, permission_policy_option, isLikeNone(metadata_field) ? 5 : metadata_field);
|
|
1971
1912
|
return ret;
|
|
1972
1913
|
}
|
|
1914
|
+
/**
|
|
1915
|
+
* @param {string[]} inbox_ids
|
|
1916
|
+
* @returns {Promise<void>}
|
|
1917
|
+
*/
|
|
1918
|
+
removeMembersByInboxId(inbox_ids) {
|
|
1919
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1920
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1921
|
+
const ret = wasm.conversation_removeMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1922
|
+
return ret;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* @param {ListMessagesOptions | null} [opts]
|
|
1926
|
+
* @returns {Promise<MessageWithReactions[]>}
|
|
1927
|
+
*/
|
|
1928
|
+
findMessagesWithReactions(opts) {
|
|
1929
|
+
let ptr0 = 0;
|
|
1930
|
+
if (!isLikeNone(opts)) {
|
|
1931
|
+
_assertClass(opts, ListMessagesOptions);
|
|
1932
|
+
ptr0 = opts.__destroy_into_raw();
|
|
1933
|
+
}
|
|
1934
|
+
const ret = wasm.conversation_findMessagesWithReactions(this.__wbg_ptr, ptr0);
|
|
1935
|
+
return ret;
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* @returns {MessageDisappearingSettings | undefined}
|
|
1939
|
+
*/
|
|
1940
|
+
messageDisappearingSettings() {
|
|
1941
|
+
const ret = wasm.conversation_messageDisappearingSettings(this.__wbg_ptr);
|
|
1942
|
+
if (ret[2]) {
|
|
1943
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1944
|
+
}
|
|
1945
|
+
return ret[0] === 0 ? undefined : MessageDisappearingSettings.__wrap(ret[0]);
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* @param {string} group_image_url_square
|
|
1949
|
+
* @returns {Promise<void>}
|
|
1950
|
+
*/
|
|
1951
|
+
updateGroupImageUrlSquare(group_image_url_square) {
|
|
1952
|
+
const ptr0 = passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1953
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1954
|
+
const ret = wasm.conversation_updateGroupImageUrlSquare(this.__wbg_ptr, ptr0, len0);
|
|
1955
|
+
return ret;
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* @returns {string}
|
|
1959
|
+
*/
|
|
1960
|
+
id() {
|
|
1961
|
+
let deferred1_0;
|
|
1962
|
+
let deferred1_1;
|
|
1963
|
+
try {
|
|
1964
|
+
const ret = wasm.conversation_id(this.__wbg_ptr);
|
|
1965
|
+
deferred1_0 = ret[0];
|
|
1966
|
+
deferred1_1 = ret[1];
|
|
1967
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1968
|
+
} finally {
|
|
1969
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
/**
|
|
1973
|
+
* @returns {boolean}
|
|
1974
|
+
*/
|
|
1975
|
+
isMessageDisappearingEnabled() {
|
|
1976
|
+
const ret = wasm.conversation_isMessageDisappearingEnabled(this.__wbg_ptr);
|
|
1977
|
+
if (ret[2]) {
|
|
1978
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1979
|
+
}
|
|
1980
|
+
return ret[0] !== 0;
|
|
1981
|
+
}
|
|
1982
|
+
/**
|
|
1983
|
+
* @returns {Promise<void>}
|
|
1984
|
+
*/
|
|
1985
|
+
removeMessageDisappearingSettings() {
|
|
1986
|
+
const ret = wasm.conversation_removeMessageDisappearingSettings(this.__wbg_ptr);
|
|
1987
|
+
return ret;
|
|
1988
|
+
}
|
|
1973
1989
|
/**
|
|
1974
1990
|
* @param {MessageDisappearingSettings} settings
|
|
1975
1991
|
* @returns {Promise<void>}
|
|
1976
1992
|
*/
|
|
1977
|
-
updateMessageDisappearingSettings(settings) {
|
|
1978
|
-
_assertClass(settings, MessageDisappearingSettings);
|
|
1979
|
-
var ptr0 = settings.__destroy_into_raw();
|
|
1980
|
-
const ret = wasm.conversation_updateMessageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
1993
|
+
updateMessageDisappearingSettings(settings) {
|
|
1994
|
+
_assertClass(settings, MessageDisappearingSettings);
|
|
1995
|
+
var ptr0 = settings.__destroy_into_raw();
|
|
1996
|
+
const ret = wasm.conversation_updateMessageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
1997
|
+
return ret;
|
|
1998
|
+
}
|
|
1999
|
+
/**
|
|
2000
|
+
* @param {EncodedContent} encoded_content
|
|
2001
|
+
* @param {SendMessageOpts} opts
|
|
2002
|
+
* @returns {Promise<string>}
|
|
2003
|
+
*/
|
|
2004
|
+
send(encoded_content, opts) {
|
|
2005
|
+
_assertClass(encoded_content, EncodedContent);
|
|
2006
|
+
var ptr0 = encoded_content.__destroy_into_raw();
|
|
2007
|
+
_assertClass(opts, SendMessageOpts);
|
|
2008
|
+
var ptr1 = opts.__destroy_into_raw();
|
|
2009
|
+
const ret = wasm.conversation_send(this.__wbg_ptr, ptr0, ptr1);
|
|
1981
2010
|
return ret;
|
|
1982
2011
|
}
|
|
1983
2012
|
/**
|
|
1984
2013
|
* @returns {Promise<void>}
|
|
1985
2014
|
*/
|
|
1986
|
-
|
|
1987
|
-
const ret = wasm.
|
|
2015
|
+
sync() {
|
|
2016
|
+
const ret = wasm.conversation_sync(this.__wbg_ptr);
|
|
1988
2017
|
return ret;
|
|
1989
2018
|
}
|
|
1990
2019
|
/**
|
|
1991
|
-
* @
|
|
2020
|
+
* @param {any} callback
|
|
2021
|
+
* @returns {StreamCloser}
|
|
1992
2022
|
*/
|
|
1993
|
-
|
|
1994
|
-
const ret = wasm.
|
|
2023
|
+
stream(callback) {
|
|
2024
|
+
const ret = wasm.conversation_stream(this.__wbg_ptr, callback);
|
|
1995
2025
|
if (ret[2]) {
|
|
1996
2026
|
throw takeFromExternrefTable0(ret[1]);
|
|
1997
2027
|
}
|
|
1998
|
-
return
|
|
2028
|
+
return StreamCloser.__wrap(ret[0]);
|
|
1999
2029
|
}
|
|
2000
2030
|
/**
|
|
2031
|
+
* @param {string} inbox_id
|
|
2001
2032
|
* @returns {boolean}
|
|
2002
2033
|
*/
|
|
2003
|
-
|
|
2004
|
-
const
|
|
2034
|
+
isAdmin(inbox_id) {
|
|
2035
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2036
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2037
|
+
const ret = wasm.conversation_isAdmin(this.__wbg_ptr, ptr0, len0);
|
|
2005
2038
|
if (ret[2]) {
|
|
2006
2039
|
throw takeFromExternrefTable0(ret[1]);
|
|
2007
2040
|
}
|
|
2008
2041
|
return ret[0] !== 0;
|
|
2009
2042
|
}
|
|
2010
2043
|
/**
|
|
2011
|
-
* @
|
|
2012
|
-
|
|
2013
|
-
getHmacKeys() {
|
|
2014
|
-
const ret = wasm.conversation_getHmacKeys(this.__wbg_ptr);
|
|
2015
|
-
if (ret[2]) {
|
|
2016
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2017
|
-
}
|
|
2018
|
-
return takeFromExternrefTable0(ret[0]);
|
|
2019
|
-
}
|
|
2020
|
-
/**
|
|
2021
|
-
* @returns {Promise<any>}
|
|
2022
|
-
*/
|
|
2023
|
-
getDebugInfo() {
|
|
2024
|
-
const ret = wasm.conversation_getDebugInfo(this.__wbg_ptr);
|
|
2025
|
-
return ret;
|
|
2026
|
-
}
|
|
2027
|
-
/**
|
|
2028
|
-
* @returns {Promise<Conversation[]>}
|
|
2044
|
+
* @param {string} inbox_id
|
|
2045
|
+
* @returns {Promise<void>}
|
|
2029
2046
|
*/
|
|
2030
|
-
|
|
2031
|
-
const
|
|
2047
|
+
addAdmin(inbox_id) {
|
|
2048
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2049
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2050
|
+
const ret = wasm.conversation_addAdmin(this.__wbg_ptr, ptr0, len0);
|
|
2032
2051
|
return ret;
|
|
2033
2052
|
}
|
|
2034
2053
|
/**
|
|
2035
|
-
* @
|
|
2036
|
-
* @returns {Promise<DecodedMessage[]>}
|
|
2054
|
+
* @returns {boolean}
|
|
2037
2055
|
*/
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
if (
|
|
2041
|
-
|
|
2042
|
-
ptr0 = opts.__destroy_into_raw();
|
|
2056
|
+
isActive() {
|
|
2057
|
+
const ret = wasm.conversation_isActive(this.__wbg_ptr);
|
|
2058
|
+
if (ret[2]) {
|
|
2059
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2043
2060
|
}
|
|
2044
|
-
|
|
2045
|
-
return ret;
|
|
2046
|
-
}
|
|
2047
|
-
/**
|
|
2048
|
-
* @returns {Promise<any>}
|
|
2049
|
-
*/
|
|
2050
|
-
getLastReadTimes() {
|
|
2051
|
-
const ret = wasm.conversation_getLastReadTimes(this.__wbg_ptr);
|
|
2052
|
-
return ret;
|
|
2061
|
+
return ret[0] !== 0;
|
|
2053
2062
|
}
|
|
2054
2063
|
}
|
|
2055
2064
|
if (Symbol.dispose) Conversation.prototype[Symbol.dispose] = Conversation.prototype.free;
|
|
@@ -2316,22 +2325,6 @@ export class Conversations {
|
|
|
2316
2325
|
const ptr = this.__destroy_into_raw();
|
|
2317
2326
|
wasm.__wbg_conversations_free(ptr, 0);
|
|
2318
2327
|
}
|
|
2319
|
-
/**
|
|
2320
|
-
* @param {CreateGroupOptions | null} [options]
|
|
2321
|
-
* @returns {Conversation}
|
|
2322
|
-
*/
|
|
2323
|
-
createGroupOptimistic(options) {
|
|
2324
|
-
let ptr0 = 0;
|
|
2325
|
-
if (!isLikeNone(options)) {
|
|
2326
|
-
_assertClass(options, CreateGroupOptions);
|
|
2327
|
-
ptr0 = options.__destroy_into_raw();
|
|
2328
|
-
}
|
|
2329
|
-
const ret = wasm.conversations_createGroupOptimistic(this.__wbg_ptr, ptr0);
|
|
2330
|
-
if (ret[2]) {
|
|
2331
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2332
|
-
}
|
|
2333
|
-
return Conversation.__wrap(ret[0]);
|
|
2334
|
-
}
|
|
2335
2328
|
/**
|
|
2336
2329
|
* @param {Identifier[]} account_identifiers
|
|
2337
2330
|
* @param {CreateGroupOptions | null} [options]
|
|
@@ -2349,50 +2342,25 @@ export class Conversations {
|
|
|
2349
2342
|
return ret;
|
|
2350
2343
|
}
|
|
2351
2344
|
/**
|
|
2352
|
-
* @
|
|
2353
|
-
* @param {CreateGroupOptions | null} [options]
|
|
2354
|
-
* @returns {Promise<Conversation>}
|
|
2355
|
-
*/
|
|
2356
|
-
createGroupByInboxIds(inbox_ids, options) {
|
|
2357
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
2358
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2359
|
-
let ptr1 = 0;
|
|
2360
|
-
if (!isLikeNone(options)) {
|
|
2361
|
-
_assertClass(options, CreateGroupOptions);
|
|
2362
|
-
ptr1 = options.__destroy_into_raw();
|
|
2363
|
-
}
|
|
2364
|
-
const ret = wasm.conversations_createGroupByInboxIds(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
2365
|
-
return ret;
|
|
2366
|
-
}
|
|
2367
|
-
/**
|
|
2368
|
-
* @param {Identifier} account_identifier
|
|
2369
|
-
* @param {CreateDMOptions | null} [options]
|
|
2370
|
-
* @returns {Promise<Conversation>}
|
|
2345
|
+
* @returns {any}
|
|
2371
2346
|
*/
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
if (
|
|
2375
|
-
|
|
2376
|
-
ptr0 = options.__destroy_into_raw();
|
|
2347
|
+
getHmacKeys() {
|
|
2348
|
+
const ret = wasm.conversations_getHmacKeys(this.__wbg_ptr);
|
|
2349
|
+
if (ret[2]) {
|
|
2350
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2377
2351
|
}
|
|
2378
|
-
|
|
2379
|
-
return ret;
|
|
2352
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2380
2353
|
}
|
|
2381
2354
|
/**
|
|
2382
|
-
* @param {
|
|
2383
|
-
* @
|
|
2384
|
-
* @returns {Promise<Conversation>}
|
|
2355
|
+
* @param {any} callback
|
|
2356
|
+
* @returns {StreamCloser}
|
|
2385
2357
|
*/
|
|
2386
|
-
|
|
2387
|
-
const
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
if (!isLikeNone(options)) {
|
|
2391
|
-
_assertClass(options, CreateDMOptions);
|
|
2392
|
-
ptr1 = options.__destroy_into_raw();
|
|
2358
|
+
streamConsent(callback) {
|
|
2359
|
+
const ret = wasm.conversations_streamConsent(this.__wbg_ptr, callback);
|
|
2360
|
+
if (ret[2]) {
|
|
2361
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2393
2362
|
}
|
|
2394
|
-
|
|
2395
|
-
return ret;
|
|
2363
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2396
2364
|
}
|
|
2397
2365
|
/**
|
|
2398
2366
|
* @param {string} group_id
|
|
@@ -2408,17 +2376,18 @@ export class Conversations {
|
|
|
2408
2376
|
return Conversation.__wrap(ret[0]);
|
|
2409
2377
|
}
|
|
2410
2378
|
/**
|
|
2411
|
-
* @param {
|
|
2412
|
-
* @
|
|
2379
|
+
* @param {Identifier} account_identifier
|
|
2380
|
+
* @param {CreateDMOptions | null} [options]
|
|
2381
|
+
* @returns {Promise<Conversation>}
|
|
2413
2382
|
*/
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2383
|
+
createDm(account_identifier, options) {
|
|
2384
|
+
let ptr0 = 0;
|
|
2385
|
+
if (!isLikeNone(options)) {
|
|
2386
|
+
_assertClass(options, CreateDMOptions);
|
|
2387
|
+
ptr0 = options.__destroy_into_raw();
|
|
2420
2388
|
}
|
|
2421
|
-
|
|
2389
|
+
const ret = wasm.conversations_createDm(this.__wbg_ptr, account_identifier, ptr0);
|
|
2390
|
+
return ret;
|
|
2422
2391
|
}
|
|
2423
2392
|
/**
|
|
2424
2393
|
* @param {string} message_id
|
|
@@ -2434,11 +2403,30 @@ export class Conversations {
|
|
|
2434
2403
|
return Message.__wrap(ret[0]);
|
|
2435
2404
|
}
|
|
2436
2405
|
/**
|
|
2437
|
-
* @
|
|
2406
|
+
* @param {any} callback
|
|
2407
|
+
* @returns {StreamCloser}
|
|
2438
2408
|
*/
|
|
2439
|
-
|
|
2440
|
-
const ret = wasm.
|
|
2441
|
-
|
|
2409
|
+
streamPreferences(callback) {
|
|
2410
|
+
const ret = wasm.conversations_streamPreferences(this.__wbg_ptr, callback);
|
|
2411
|
+
if (ret[2]) {
|
|
2412
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2413
|
+
}
|
|
2414
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2415
|
+
}
|
|
2416
|
+
/**
|
|
2417
|
+
* @param {any} callback
|
|
2418
|
+
* @param {ConversationType | null} [conversation_type]
|
|
2419
|
+
* @param {any[] | null} [consent_states]
|
|
2420
|
+
* @returns {StreamCloser}
|
|
2421
|
+
*/
|
|
2422
|
+
streamAllMessages(callback, conversation_type, consent_states) {
|
|
2423
|
+
var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
|
|
2424
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2425
|
+
const ret = wasm.conversations_streamAllMessages(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type, ptr0, len0);
|
|
2426
|
+
if (ret[2]) {
|
|
2427
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2428
|
+
}
|
|
2429
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2442
2430
|
}
|
|
2443
2431
|
/**
|
|
2444
2432
|
* @param {any[] | null} [consent_states]
|
|
@@ -2451,30 +2439,60 @@ export class Conversations {
|
|
|
2451
2439
|
return ret;
|
|
2452
2440
|
}
|
|
2453
2441
|
/**
|
|
2454
|
-
* @param {
|
|
2455
|
-
* @returns {
|
|
2442
|
+
* @param {CreateGroupOptions | null} [options]
|
|
2443
|
+
* @returns {Conversation}
|
|
2456
2444
|
*/
|
|
2457
|
-
|
|
2445
|
+
createGroupOptimistic(options) {
|
|
2458
2446
|
let ptr0 = 0;
|
|
2459
|
-
if (!isLikeNone(
|
|
2460
|
-
_assertClass(
|
|
2461
|
-
ptr0 =
|
|
2447
|
+
if (!isLikeNone(options)) {
|
|
2448
|
+
_assertClass(options, CreateGroupOptions);
|
|
2449
|
+
ptr0 = options.__destroy_into_raw();
|
|
2462
2450
|
}
|
|
2463
|
-
const ret = wasm.
|
|
2451
|
+
const ret = wasm.conversations_createGroupOptimistic(this.__wbg_ptr, ptr0);
|
|
2464
2452
|
if (ret[2]) {
|
|
2465
2453
|
throw takeFromExternrefTable0(ret[1]);
|
|
2466
2454
|
}
|
|
2467
|
-
return
|
|
2455
|
+
return Conversation.__wrap(ret[0]);
|
|
2468
2456
|
}
|
|
2469
2457
|
/**
|
|
2470
|
-
* @
|
|
2458
|
+
* @param {any} callback
|
|
2459
|
+
* @returns {StreamCloser}
|
|
2471
2460
|
*/
|
|
2472
|
-
|
|
2473
|
-
const ret = wasm.
|
|
2461
|
+
streamMessageDeletions(callback) {
|
|
2462
|
+
const ret = wasm.conversations_streamMessageDeletions(this.__wbg_ptr, callback);
|
|
2474
2463
|
if (ret[2]) {
|
|
2475
2464
|
throw takeFromExternrefTable0(ret[1]);
|
|
2476
2465
|
}
|
|
2477
|
-
return
|
|
2466
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* @param {string[]} inbox_ids
|
|
2470
|
+
* @param {CreateGroupOptions | null} [options]
|
|
2471
|
+
* @returns {Promise<Conversation>}
|
|
2472
|
+
*/
|
|
2473
|
+
createGroupByInboxIds(inbox_ids, options) {
|
|
2474
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
2475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2476
|
+
let ptr1 = 0;
|
|
2477
|
+
if (!isLikeNone(options)) {
|
|
2478
|
+
_assertClass(options, CreateGroupOptions);
|
|
2479
|
+
ptr1 = options.__destroy_into_raw();
|
|
2480
|
+
}
|
|
2481
|
+
const ret = wasm.conversations_createGroupByInboxIds(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
2482
|
+
return ret;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* @param {string} target_inbox_id
|
|
2486
|
+
* @returns {Conversation}
|
|
2487
|
+
*/
|
|
2488
|
+
findDmByTargetInboxId(target_inbox_id) {
|
|
2489
|
+
const ptr0 = passStringToWasm0(target_inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2490
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2491
|
+
const ret = wasm.conversations_findDmByTargetInboxId(this.__wbg_ptr, ptr0, len0);
|
|
2492
|
+
if (ret[2]) {
|
|
2493
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2494
|
+
}
|
|
2495
|
+
return Conversation.__wrap(ret[0]);
|
|
2478
2496
|
}
|
|
2479
2497
|
/**
|
|
2480
2498
|
* Returns a 'ReadableStream' of Conversations
|
|
@@ -2486,49 +2504,51 @@ export class Conversations {
|
|
|
2486
2504
|
return ret;
|
|
2487
2505
|
}
|
|
2488
2506
|
/**
|
|
2489
|
-
* @param {
|
|
2490
|
-
* @param {
|
|
2491
|
-
* @returns {
|
|
2507
|
+
* @param {string} inbox_id
|
|
2508
|
+
* @param {CreateDMOptions | null} [options]
|
|
2509
|
+
* @returns {Promise<Conversation>}
|
|
2510
|
+
*/
|
|
2511
|
+
createDmByInboxId(inbox_id, options) {
|
|
2512
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2513
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2514
|
+
let ptr1 = 0;
|
|
2515
|
+
if (!isLikeNone(options)) {
|
|
2516
|
+
_assertClass(options, CreateDMOptions);
|
|
2517
|
+
ptr1 = options.__destroy_into_raw();
|
|
2518
|
+
}
|
|
2519
|
+
const ret = wasm.conversations_createDmByInboxId(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
2520
|
+
return ret;
|
|
2521
|
+
}
|
|
2522
|
+
/**
|
|
2523
|
+
* @param {ListConversationsOptions | null} [opts]
|
|
2524
|
+
* @returns {Array<any>}
|
|
2492
2525
|
*/
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
if (
|
|
2496
|
-
|
|
2526
|
+
list(opts) {
|
|
2527
|
+
let ptr0 = 0;
|
|
2528
|
+
if (!isLikeNone(opts)) {
|
|
2529
|
+
_assertClass(opts, ListConversationsOptions);
|
|
2530
|
+
ptr0 = opts.__destroy_into_raw();
|
|
2497
2531
|
}
|
|
2498
|
-
|
|
2499
|
-
}
|
|
2500
|
-
/**
|
|
2501
|
-
* @param {any} callback
|
|
2502
|
-
* @param {ConversationType | null} [conversation_type]
|
|
2503
|
-
* @param {any[] | null} [consent_states]
|
|
2504
|
-
* @returns {StreamCloser}
|
|
2505
|
-
*/
|
|
2506
|
-
streamAllMessages(callback, conversation_type, consent_states) {
|
|
2507
|
-
var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
|
|
2508
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2509
|
-
const ret = wasm.conversations_streamAllMessages(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type, ptr0, len0);
|
|
2532
|
+
const ret = wasm.conversations_list(this.__wbg_ptr, ptr0);
|
|
2510
2533
|
if (ret[2]) {
|
|
2511
2534
|
throw takeFromExternrefTable0(ret[1]);
|
|
2512
2535
|
}
|
|
2513
|
-
return
|
|
2536
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2514
2537
|
}
|
|
2515
2538
|
/**
|
|
2516
|
-
* @
|
|
2517
|
-
* @returns {StreamCloser}
|
|
2539
|
+
* @returns {Promise<void>}
|
|
2518
2540
|
*/
|
|
2519
|
-
|
|
2520
|
-
const ret = wasm.
|
|
2521
|
-
|
|
2522
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2523
|
-
}
|
|
2524
|
-
return StreamCloser.__wrap(ret[0]);
|
|
2541
|
+
sync() {
|
|
2542
|
+
const ret = wasm.conversations_sync(this.__wbg_ptr);
|
|
2543
|
+
return ret;
|
|
2525
2544
|
}
|
|
2526
2545
|
/**
|
|
2527
2546
|
* @param {any} callback
|
|
2547
|
+
* @param {ConversationType | null} [conversation_type]
|
|
2528
2548
|
* @returns {StreamCloser}
|
|
2529
2549
|
*/
|
|
2530
|
-
|
|
2531
|
-
const ret = wasm.
|
|
2550
|
+
stream(callback, conversation_type) {
|
|
2551
|
+
const ret = wasm.conversations_stream(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type);
|
|
2532
2552
|
if (ret[2]) {
|
|
2533
2553
|
throw takeFromExternrefTable0(ret[1]);
|
|
2534
2554
|
}
|
|
@@ -2554,6 +2574,20 @@ export class CreateDMOptions {
|
|
|
2554
2574
|
const ptr = this.__destroy_into_raw();
|
|
2555
2575
|
wasm.__wbg_createdmoptions_free(ptr, 0);
|
|
2556
2576
|
}
|
|
2577
|
+
/**
|
|
2578
|
+
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2579
|
+
*/
|
|
2580
|
+
constructor(message_disappearing_settings) {
|
|
2581
|
+
let ptr0 = 0;
|
|
2582
|
+
if (!isLikeNone(message_disappearing_settings)) {
|
|
2583
|
+
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2584
|
+
ptr0 = message_disappearing_settings.__destroy_into_raw();
|
|
2585
|
+
}
|
|
2586
|
+
const ret = wasm.createdmoptions_new(ptr0);
|
|
2587
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2588
|
+
CreateDMOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2589
|
+
return this;
|
|
2590
|
+
}
|
|
2557
2591
|
/**
|
|
2558
2592
|
* @returns {MessageDisappearingSettings | undefined}
|
|
2559
2593
|
*/
|
|
@@ -2572,20 +2606,6 @@ export class CreateDMOptions {
|
|
|
2572
2606
|
}
|
|
2573
2607
|
wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
2574
2608
|
}
|
|
2575
|
-
/**
|
|
2576
|
-
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2577
|
-
*/
|
|
2578
|
-
constructor(message_disappearing_settings) {
|
|
2579
|
-
let ptr0 = 0;
|
|
2580
|
-
if (!isLikeNone(message_disappearing_settings)) {
|
|
2581
|
-
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2582
|
-
ptr0 = message_disappearing_settings.__destroy_into_raw();
|
|
2583
|
-
}
|
|
2584
|
-
const ret = wasm.createdmoptions_new(ptr0);
|
|
2585
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2586
|
-
CreateDMOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2587
|
-
return this;
|
|
2588
|
-
}
|
|
2589
2609
|
}
|
|
2590
2610
|
if (Symbol.dispose) CreateDMOptions.prototype[Symbol.dispose] = CreateDMOptions.prototype.free;
|
|
2591
2611
|
|
|
@@ -2606,6 +2626,36 @@ export class CreateGroupOptions {
|
|
|
2606
2626
|
const ptr = this.__destroy_into_raw();
|
|
2607
2627
|
wasm.__wbg_creategroupoptions_free(ptr, 0);
|
|
2608
2628
|
}
|
|
2629
|
+
/**
|
|
2630
|
+
* @param {GroupPermissionsOptions | null} [permissions]
|
|
2631
|
+
* @param {string | null} [group_name]
|
|
2632
|
+
* @param {string | null} [group_image_url_square]
|
|
2633
|
+
* @param {string | null} [group_description]
|
|
2634
|
+
* @param {PermissionPolicySet | null} [custom_permission_policy_set]
|
|
2635
|
+
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2636
|
+
*/
|
|
2637
|
+
constructor(permissions, group_name, group_image_url_square, group_description, custom_permission_policy_set, message_disappearing_settings) {
|
|
2638
|
+
var ptr0 = isLikeNone(group_name) ? 0 : passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2639
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2640
|
+
var ptr1 = isLikeNone(group_image_url_square) ? 0 : passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2641
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2642
|
+
var ptr2 = isLikeNone(group_description) ? 0 : passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2643
|
+
var len2 = WASM_VECTOR_LEN;
|
|
2644
|
+
let ptr3 = 0;
|
|
2645
|
+
if (!isLikeNone(custom_permission_policy_set)) {
|
|
2646
|
+
_assertClass(custom_permission_policy_set, PermissionPolicySet);
|
|
2647
|
+
ptr3 = custom_permission_policy_set.__destroy_into_raw();
|
|
2648
|
+
}
|
|
2649
|
+
let ptr4 = 0;
|
|
2650
|
+
if (!isLikeNone(message_disappearing_settings)) {
|
|
2651
|
+
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2652
|
+
ptr4 = message_disappearing_settings.__destroy_into_raw();
|
|
2653
|
+
}
|
|
2654
|
+
const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4);
|
|
2655
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2656
|
+
CreateGroupOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2657
|
+
return this;
|
|
2658
|
+
}
|
|
2609
2659
|
/**
|
|
2610
2660
|
* @returns {GroupPermissionsOptions | undefined}
|
|
2611
2661
|
*/
|
|
@@ -2715,36 +2765,6 @@ export class CreateGroupOptions {
|
|
|
2715
2765
|
}
|
|
2716
2766
|
wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
2717
2767
|
}
|
|
2718
|
-
/**
|
|
2719
|
-
* @param {GroupPermissionsOptions | null} [permissions]
|
|
2720
|
-
* @param {string | null} [group_name]
|
|
2721
|
-
* @param {string | null} [group_image_url_square]
|
|
2722
|
-
* @param {string | null} [group_description]
|
|
2723
|
-
* @param {PermissionPolicySet | null} [custom_permission_policy_set]
|
|
2724
|
-
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2725
|
-
*/
|
|
2726
|
-
constructor(permissions, group_name, group_image_url_square, group_description, custom_permission_policy_set, message_disappearing_settings) {
|
|
2727
|
-
var ptr0 = isLikeNone(group_name) ? 0 : passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2728
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2729
|
-
var ptr1 = isLikeNone(group_image_url_square) ? 0 : passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2730
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2731
|
-
var ptr2 = isLikeNone(group_description) ? 0 : passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2732
|
-
var len2 = WASM_VECTOR_LEN;
|
|
2733
|
-
let ptr3 = 0;
|
|
2734
|
-
if (!isLikeNone(custom_permission_policy_set)) {
|
|
2735
|
-
_assertClass(custom_permission_policy_set, PermissionPolicySet);
|
|
2736
|
-
ptr3 = custom_permission_policy_set.__destroy_into_raw();
|
|
2737
|
-
}
|
|
2738
|
-
let ptr4 = 0;
|
|
2739
|
-
if (!isLikeNone(message_disappearing_settings)) {
|
|
2740
|
-
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2741
|
-
ptr4 = message_disappearing_settings.__destroy_into_raw();
|
|
2742
|
-
}
|
|
2743
|
-
const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4);
|
|
2744
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2745
|
-
CreateGroupOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2746
|
-
return this;
|
|
2747
|
-
}
|
|
2748
2768
|
}
|
|
2749
2769
|
if (Symbol.dispose) CreateGroupOptions.prototype[Symbol.dispose] = CreateGroupOptions.prototype.free;
|
|
2750
2770
|
|
|
@@ -3001,6 +3021,13 @@ export class DecodedMessageContent {
|
|
|
3001
3021
|
const ptr = this.__destroy_into_raw();
|
|
3002
3022
|
wasm.__wbg_decodedmessagecontent_free(ptr, 0);
|
|
3003
3023
|
}
|
|
3024
|
+
/**
|
|
3025
|
+
* @returns {ReactionPayload | undefined}
|
|
3026
|
+
*/
|
|
3027
|
+
asReaction() {
|
|
3028
|
+
const ret = wasm.decodedmessagecontent_asReaction(this.__wbg_ptr);
|
|
3029
|
+
return ret === 0 ? undefined : ReactionPayload.__wrap(ret);
|
|
3030
|
+
}
|
|
3004
3031
|
/**
|
|
3005
3032
|
* @returns {PayloadType}
|
|
3006
3033
|
*/
|
|
@@ -3009,32 +3036,25 @@ export class DecodedMessageContent {
|
|
|
3009
3036
|
return ret;
|
|
3010
3037
|
}
|
|
3011
3038
|
/**
|
|
3012
|
-
* @returns {
|
|
3013
|
-
*/
|
|
3014
|
-
asText() {
|
|
3015
|
-
const ret = wasm.decodedmessagecontent_asText(this.__wbg_ptr);
|
|
3016
|
-
return ret === 0 ? undefined : TextContent.__wrap(ret);
|
|
3017
|
-
}
|
|
3018
|
-
/**
|
|
3019
|
-
* @returns {EnrichedReply | undefined}
|
|
3039
|
+
* @returns {Attachment | undefined}
|
|
3020
3040
|
*/
|
|
3021
|
-
|
|
3022
|
-
const ret = wasm.
|
|
3023
|
-
return ret === 0 ? undefined :
|
|
3041
|
+
asAttachment() {
|
|
3042
|
+
const ret = wasm.decodedmessagecontent_asAttachment(this.__wbg_ptr);
|
|
3043
|
+
return ret === 0 ? undefined : Attachment.__wrap(ret);
|
|
3024
3044
|
}
|
|
3025
3045
|
/**
|
|
3026
|
-
* @returns {
|
|
3046
|
+
* @returns {ReadReceipt | undefined}
|
|
3027
3047
|
*/
|
|
3028
|
-
|
|
3029
|
-
const ret = wasm.
|
|
3030
|
-
return ret === 0 ? undefined :
|
|
3048
|
+
asReadReceipt() {
|
|
3049
|
+
const ret = wasm.decodedmessagecontent_asReadReceipt(this.__wbg_ptr);
|
|
3050
|
+
return ret === 0 ? undefined : ReadReceipt.__wrap(ret);
|
|
3031
3051
|
}
|
|
3032
3052
|
/**
|
|
3033
|
-
* @returns {
|
|
3053
|
+
* @returns {GroupUpdated | undefined}
|
|
3034
3054
|
*/
|
|
3035
|
-
|
|
3036
|
-
const ret = wasm.
|
|
3037
|
-
return ret === 0 ? undefined :
|
|
3055
|
+
asGroupUpdated() {
|
|
3056
|
+
const ret = wasm.decodedmessagecontent_asGroupUpdated(this.__wbg_ptr);
|
|
3057
|
+
return ret === 0 ? undefined : GroupUpdated.__wrap(ret);
|
|
3038
3058
|
}
|
|
3039
3059
|
/**
|
|
3040
3060
|
* @returns {RemoteAttachment | undefined}
|
|
@@ -3044,11 +3064,14 @@ export class DecodedMessageContent {
|
|
|
3044
3064
|
return ret === 0 ? undefined : RemoteAttachment.__wrap(ret);
|
|
3045
3065
|
}
|
|
3046
3066
|
/**
|
|
3047
|
-
* @returns {
|
|
3067
|
+
* @returns {any}
|
|
3048
3068
|
*/
|
|
3049
|
-
|
|
3050
|
-
const ret = wasm.
|
|
3051
|
-
|
|
3069
|
+
asWalletSendCalls() {
|
|
3070
|
+
const ret = wasm.decodedmessagecontent_asWalletSendCalls(this.__wbg_ptr);
|
|
3071
|
+
if (ret[2]) {
|
|
3072
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3073
|
+
}
|
|
3074
|
+
return takeFromExternrefTable0(ret[0]);
|
|
3052
3075
|
}
|
|
3053
3076
|
/**
|
|
3054
3077
|
* @returns {TransactionReference | undefined}
|
|
@@ -3058,28 +3081,25 @@ export class DecodedMessageContent {
|
|
|
3058
3081
|
return ret === 0 ? undefined : TransactionReference.__wrap(ret);
|
|
3059
3082
|
}
|
|
3060
3083
|
/**
|
|
3061
|
-
* @returns {
|
|
3084
|
+
* @returns {MultiRemoteAttachment | undefined}
|
|
3062
3085
|
*/
|
|
3063
|
-
|
|
3064
|
-
const ret = wasm.
|
|
3065
|
-
return ret === 0 ? undefined :
|
|
3086
|
+
asMultiRemoteAttachment() {
|
|
3087
|
+
const ret = wasm.decodedmessagecontent_asMultiRemoteAttachment(this.__wbg_ptr);
|
|
3088
|
+
return ret === 0 ? undefined : MultiRemoteAttachment.__wrap(ret);
|
|
3066
3089
|
}
|
|
3067
3090
|
/**
|
|
3068
|
-
* @returns {
|
|
3091
|
+
* @returns {TextContent | undefined}
|
|
3069
3092
|
*/
|
|
3070
|
-
|
|
3071
|
-
const ret = wasm.
|
|
3072
|
-
return ret === 0 ? undefined :
|
|
3093
|
+
asText() {
|
|
3094
|
+
const ret = wasm.decodedmessagecontent_asText(this.__wbg_ptr);
|
|
3095
|
+
return ret === 0 ? undefined : TextContent.__wrap(ret);
|
|
3073
3096
|
}
|
|
3074
3097
|
/**
|
|
3075
|
-
* @returns {
|
|
3098
|
+
* @returns {EnrichedReply | undefined}
|
|
3076
3099
|
*/
|
|
3077
|
-
|
|
3078
|
-
const ret = wasm.
|
|
3079
|
-
|
|
3080
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
3081
|
-
}
|
|
3082
|
-
return takeFromExternrefTable0(ret[0]);
|
|
3100
|
+
asReply() {
|
|
3101
|
+
const ret = wasm.decodedmessagecontent_asReply(this.__wbg_ptr);
|
|
3102
|
+
return ret === 0 ? undefined : EnrichedReply.__wrap(ret);
|
|
3083
3103
|
}
|
|
3084
3104
|
/**
|
|
3085
3105
|
* @returns {EncodedContent | undefined}
|
|
@@ -3116,6 +3136,26 @@ export class EncodedContent {
|
|
|
3116
3136
|
const ptr = this.__destroy_into_raw();
|
|
3117
3137
|
wasm.__wbg_encodedcontent_free(ptr, 0);
|
|
3118
3138
|
}
|
|
3139
|
+
/**
|
|
3140
|
+
* @param {ContentTypeId | null | undefined} type
|
|
3141
|
+
* @param {any} parameters
|
|
3142
|
+
* @param {string | null | undefined} fallback
|
|
3143
|
+
* @param {number | null | undefined} compression
|
|
3144
|
+
* @param {Uint8Array} content
|
|
3145
|
+
*/
|
|
3146
|
+
constructor(type, parameters, fallback, compression, content) {
|
|
3147
|
+
let ptr0 = 0;
|
|
3148
|
+
if (!isLikeNone(type)) {
|
|
3149
|
+
_assertClass(type, ContentTypeId);
|
|
3150
|
+
ptr0 = type.__destroy_into_raw();
|
|
3151
|
+
}
|
|
3152
|
+
var ptr1 = isLikeNone(fallback) ? 0 : passStringToWasm0(fallback, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3153
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3154
|
+
const ret = wasm.encodedcontent_new(ptr0, parameters, ptr1, len1, isLikeNone(compression) ? 0x100000001 : (compression) >> 0, content);
|
|
3155
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3156
|
+
EncodedContentFinalization.register(this, this.__wbg_ptr, this);
|
|
3157
|
+
return this;
|
|
3158
|
+
}
|
|
3119
3159
|
/**
|
|
3120
3160
|
* @returns {ContentTypeId | undefined}
|
|
3121
3161
|
*/
|
|
@@ -3189,29 +3229,9 @@ export class EncodedContent {
|
|
|
3189
3229
|
}
|
|
3190
3230
|
/**
|
|
3191
3231
|
* @param {Uint8Array} arg0
|
|
3192
|
-
*/
|
|
3193
|
-
set content(arg0) {
|
|
3194
|
-
wasm.__wbg_set_encodedcontent_content(this.__wbg_ptr, arg0);
|
|
3195
|
-
}
|
|
3196
|
-
/**
|
|
3197
|
-
* @param {ContentTypeId | null | undefined} type
|
|
3198
|
-
* @param {any} parameters
|
|
3199
|
-
* @param {string | null | undefined} fallback
|
|
3200
|
-
* @param {number | null | undefined} compression
|
|
3201
|
-
* @param {Uint8Array} content
|
|
3202
|
-
*/
|
|
3203
|
-
constructor(type, parameters, fallback, compression, content) {
|
|
3204
|
-
let ptr0 = 0;
|
|
3205
|
-
if (!isLikeNone(type)) {
|
|
3206
|
-
_assertClass(type, ContentTypeId);
|
|
3207
|
-
ptr0 = type.__destroy_into_raw();
|
|
3208
|
-
}
|
|
3209
|
-
var ptr1 = isLikeNone(fallback) ? 0 : passStringToWasm0(fallback, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3210
|
-
var len1 = WASM_VECTOR_LEN;
|
|
3211
|
-
const ret = wasm.encodedcontent_new(ptr0, parameters, ptr1, len1, isLikeNone(compression) ? 0x100000001 : (compression) >> 0, content);
|
|
3212
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3213
|
-
EncodedContentFinalization.register(this, this.__wbg_ptr, this);
|
|
3214
|
-
return this;
|
|
3232
|
+
*/
|
|
3233
|
+
set content(arg0) {
|
|
3234
|
+
wasm.__wbg_set_encodedcontent_content(this.__wbg_ptr, arg0);
|
|
3215
3235
|
}
|
|
3216
3236
|
}
|
|
3217
3237
|
if (Symbol.dispose) EncodedContent.prototype[Symbol.dispose] = EncodedContent.prototype.free;
|
|
@@ -3241,6 +3261,13 @@ export class EnrichedReply {
|
|
|
3241
3261
|
const ptr = this.__destroy_into_raw();
|
|
3242
3262
|
wasm.__wbg_enrichedreply_free(ptr, 0);
|
|
3243
3263
|
}
|
|
3264
|
+
/**
|
|
3265
|
+
* @returns {DecodedMessage | undefined}
|
|
3266
|
+
*/
|
|
3267
|
+
get inReplyTo() {
|
|
3268
|
+
const ret = wasm.enrichedreply_inReplyTo(this.__wbg_ptr);
|
|
3269
|
+
return ret === 0 ? undefined : DecodedMessage.__wrap(ret);
|
|
3270
|
+
}
|
|
3244
3271
|
/**
|
|
3245
3272
|
* @returns {string}
|
|
3246
3273
|
*/
|
|
@@ -3263,13 +3290,6 @@ export class EnrichedReply {
|
|
|
3263
3290
|
const ret = wasm.enrichedreply_content(this.__wbg_ptr);
|
|
3264
3291
|
return DecodedMessageContent.__wrap(ret);
|
|
3265
3292
|
}
|
|
3266
|
-
/**
|
|
3267
|
-
* @returns {DecodedMessage | undefined}
|
|
3268
|
-
*/
|
|
3269
|
-
get inReplyTo() {
|
|
3270
|
-
const ret = wasm.enrichedreply_inReplyTo(this.__wbg_ptr);
|
|
3271
|
-
return ret === 0 ? undefined : DecodedMessage.__wrap(ret);
|
|
3272
|
-
}
|
|
3273
3293
|
}
|
|
3274
3294
|
if (Symbol.dispose) EnrichedReply.prototype[Symbol.dispose] = EnrichedReply.prototype.free;
|
|
3275
3295
|
|
|
@@ -3290,6 +3310,25 @@ export class GroupMember {
|
|
|
3290
3310
|
const ptr = this.__destroy_into_raw();
|
|
3291
3311
|
wasm.__wbg_groupmember_free(ptr, 0);
|
|
3292
3312
|
}
|
|
3313
|
+
/**
|
|
3314
|
+
* @param {string} inboxId
|
|
3315
|
+
* @param {Identifier[]} accountIdentifiers
|
|
3316
|
+
* @param {string[]} installationIds
|
|
3317
|
+
* @param {PermissionLevel} permissionLevel
|
|
3318
|
+
* @param {ConsentState} consentState
|
|
3319
|
+
*/
|
|
3320
|
+
constructor(inboxId, accountIdentifiers, installationIds, permissionLevel, consentState) {
|
|
3321
|
+
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3322
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3323
|
+
const ptr1 = passArrayJsValueToWasm0(accountIdentifiers, wasm.__wbindgen_malloc);
|
|
3324
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3325
|
+
const ptr2 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
3326
|
+
const len2 = WASM_VECTOR_LEN;
|
|
3327
|
+
const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permissionLevel, consentState);
|
|
3328
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3329
|
+
GroupMemberFinalization.register(this, this.__wbg_ptr, this);
|
|
3330
|
+
return this;
|
|
3331
|
+
}
|
|
3293
3332
|
/**
|
|
3294
3333
|
* @returns {string}
|
|
3295
3334
|
*/
|
|
@@ -3311,7 +3350,7 @@ export class GroupMember {
|
|
|
3311
3350
|
set inboxId(arg0) {
|
|
3312
3351
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3313
3352
|
const len0 = WASM_VECTOR_LEN;
|
|
3314
|
-
wasm.
|
|
3353
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
3315
3354
|
}
|
|
3316
3355
|
/**
|
|
3317
3356
|
* @returns {Identifier[]}
|
|
@@ -3373,25 +3412,6 @@ export class GroupMember {
|
|
|
3373
3412
|
set consentState(arg0) {
|
|
3374
3413
|
wasm.__wbg_set_groupmember_consentState(this.__wbg_ptr, arg0);
|
|
3375
3414
|
}
|
|
3376
|
-
/**
|
|
3377
|
-
* @param {string} inboxId
|
|
3378
|
-
* @param {Identifier[]} accountIdentifiers
|
|
3379
|
-
* @param {string[]} installationIds
|
|
3380
|
-
* @param {PermissionLevel} permissionLevel
|
|
3381
|
-
* @param {ConsentState} consentState
|
|
3382
|
-
*/
|
|
3383
|
-
constructor(inboxId, accountIdentifiers, installationIds, permissionLevel, consentState) {
|
|
3384
|
-
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3385
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3386
|
-
const ptr1 = passArrayJsValueToWasm0(accountIdentifiers, wasm.__wbindgen_malloc);
|
|
3387
|
-
const len1 = WASM_VECTOR_LEN;
|
|
3388
|
-
const ptr2 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
3389
|
-
const len2 = WASM_VECTOR_LEN;
|
|
3390
|
-
const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permissionLevel, consentState);
|
|
3391
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3392
|
-
GroupMemberFinalization.register(this, this.__wbg_ptr, this);
|
|
3393
|
-
return this;
|
|
3394
|
-
}
|
|
3395
3415
|
}
|
|
3396
3416
|
if (Symbol.dispose) GroupMember.prototype[Symbol.dispose] = GroupMember.prototype.free;
|
|
3397
3417
|
|
|
@@ -3479,24 +3499,24 @@ export class GroupPermissions {
|
|
|
3479
3499
|
wasm.__wbg_grouppermissions_free(ptr, 0);
|
|
3480
3500
|
}
|
|
3481
3501
|
/**
|
|
3482
|
-
* @returns {
|
|
3502
|
+
* @returns {PermissionPolicySet}
|
|
3483
3503
|
*/
|
|
3484
|
-
|
|
3485
|
-
const ret = wasm.
|
|
3504
|
+
policySet() {
|
|
3505
|
+
const ret = wasm.grouppermissions_policySet(this.__wbg_ptr);
|
|
3486
3506
|
if (ret[2]) {
|
|
3487
3507
|
throw takeFromExternrefTable0(ret[1]);
|
|
3488
3508
|
}
|
|
3489
|
-
return ret[0];
|
|
3509
|
+
return PermissionPolicySet.__wrap(ret[0]);
|
|
3490
3510
|
}
|
|
3491
3511
|
/**
|
|
3492
|
-
* @returns {
|
|
3512
|
+
* @returns {GroupPermissionsOptions}
|
|
3493
3513
|
*/
|
|
3494
|
-
|
|
3495
|
-
const ret = wasm.
|
|
3514
|
+
policyType() {
|
|
3515
|
+
const ret = wasm.grouppermissions_policyType(this.__wbg_ptr);
|
|
3496
3516
|
if (ret[2]) {
|
|
3497
3517
|
throw takeFromExternrefTable0(ret[1]);
|
|
3498
3518
|
}
|
|
3499
|
-
return
|
|
3519
|
+
return ret[0];
|
|
3500
3520
|
}
|
|
3501
3521
|
}
|
|
3502
3522
|
if (Symbol.dispose) GroupPermissions.prototype[Symbol.dispose] = GroupPermissions.prototype.free;
|
|
@@ -3526,6 +3546,16 @@ export class GroupSyncSummary {
|
|
|
3526
3546
|
const ptr = this.__destroy_into_raw();
|
|
3527
3547
|
wasm.__wbg_groupsyncsummary_free(ptr, 0);
|
|
3528
3548
|
}
|
|
3549
|
+
/**
|
|
3550
|
+
* @param {number} num_eligible
|
|
3551
|
+
* @param {number} num_synced
|
|
3552
|
+
*/
|
|
3553
|
+
constructor(num_eligible, num_synced) {
|
|
3554
|
+
const ret = wasm.groupsyncsummary_new(num_eligible, num_synced);
|
|
3555
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3556
|
+
GroupSyncSummaryFinalization.register(this, this.__wbg_ptr, this);
|
|
3557
|
+
return this;
|
|
3558
|
+
}
|
|
3529
3559
|
/**
|
|
3530
3560
|
* @returns {number}
|
|
3531
3561
|
*/
|
|
@@ -3552,16 +3582,6 @@ export class GroupSyncSummary {
|
|
|
3552
3582
|
set numSynced(arg0) {
|
|
3553
3583
|
wasm.__wbg_set_groupsyncsummary_numSynced(this.__wbg_ptr, arg0);
|
|
3554
3584
|
}
|
|
3555
|
-
/**
|
|
3556
|
-
* @param {number} num_eligible
|
|
3557
|
-
* @param {number} num_synced
|
|
3558
|
-
*/
|
|
3559
|
-
constructor(num_eligible, num_synced) {
|
|
3560
|
-
const ret = wasm.groupsyncsummary_new(num_eligible, num_synced);
|
|
3561
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3562
|
-
GroupSyncSummaryFinalization.register(this, this.__wbg_ptr, this);
|
|
3563
|
-
return this;
|
|
3564
|
-
}
|
|
3565
3585
|
}
|
|
3566
3586
|
if (Symbol.dispose) GroupSyncSummary.prototype[Symbol.dispose] = GroupSyncSummary.prototype.free;
|
|
3567
3587
|
|
|
@@ -3611,7 +3631,7 @@ export class GroupUpdated {
|
|
|
3611
3631
|
set initiatedByInboxId(arg0) {
|
|
3612
3632
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3613
3633
|
const len0 = WASM_VECTOR_LEN;
|
|
3614
|
-
wasm.
|
|
3634
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
3615
3635
|
}
|
|
3616
3636
|
/**
|
|
3617
3637
|
* @returns {Inbox[]}
|
|
@@ -3850,7 +3870,7 @@ export class Inbox {
|
|
|
3850
3870
|
set inboxId(arg0) {
|
|
3851
3871
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3852
3872
|
const len0 = WASM_VECTOR_LEN;
|
|
3853
|
-
wasm.
|
|
3873
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
3854
3874
|
}
|
|
3855
3875
|
}
|
|
3856
3876
|
if (Symbol.dispose) Inbox.prototype[Symbol.dispose] = Inbox.prototype.free;
|
|
@@ -3880,6 +3900,24 @@ export class InboxState {
|
|
|
3880
3900
|
const ptr = this.__destroy_into_raw();
|
|
3881
3901
|
wasm.__wbg_inboxstate_free(ptr, 0);
|
|
3882
3902
|
}
|
|
3903
|
+
/**
|
|
3904
|
+
* @param {string} inbox_id
|
|
3905
|
+
* @param {Identifier} recovery_identifier
|
|
3906
|
+
* @param {Installation[]} installations
|
|
3907
|
+
* @param {Identifier[]} account_identifiers
|
|
3908
|
+
*/
|
|
3909
|
+
constructor(inbox_id, recovery_identifier, installations, account_identifiers) {
|
|
3910
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3911
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3912
|
+
const ptr1 = passArrayJsValueToWasm0(installations, wasm.__wbindgen_malloc);
|
|
3913
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3914
|
+
const ptr2 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
3915
|
+
const len2 = WASM_VECTOR_LEN;
|
|
3916
|
+
const ret = wasm.inboxstate_new(ptr0, len0, recovery_identifier, ptr1, len1, ptr2, len2);
|
|
3917
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3918
|
+
InboxStateFinalization.register(this, this.__wbg_ptr, this);
|
|
3919
|
+
return this;
|
|
3920
|
+
}
|
|
3883
3921
|
/**
|
|
3884
3922
|
* @returns {string}
|
|
3885
3923
|
*/
|
|
@@ -3901,7 +3939,7 @@ export class InboxState {
|
|
|
3901
3939
|
set inboxId(arg0) {
|
|
3902
3940
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3903
3941
|
const len0 = WASM_VECTOR_LEN;
|
|
3904
|
-
wasm.
|
|
3942
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
3905
3943
|
}
|
|
3906
3944
|
/**
|
|
3907
3945
|
* @returns {Identifier}
|
|
@@ -3950,24 +3988,6 @@ export class InboxState {
|
|
|
3950
3988
|
const len0 = WASM_VECTOR_LEN;
|
|
3951
3989
|
wasm.__wbg_set_inboxstate_accountIdentifiers(this.__wbg_ptr, ptr0, len0);
|
|
3952
3990
|
}
|
|
3953
|
-
/**
|
|
3954
|
-
* @param {string} inbox_id
|
|
3955
|
-
* @param {Identifier} recovery_identifier
|
|
3956
|
-
* @param {Installation[]} installations
|
|
3957
|
-
* @param {Identifier[]} account_identifiers
|
|
3958
|
-
*/
|
|
3959
|
-
constructor(inbox_id, recovery_identifier, installations, account_identifiers) {
|
|
3960
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3961
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3962
|
-
const ptr1 = passArrayJsValueToWasm0(installations, wasm.__wbindgen_malloc);
|
|
3963
|
-
const len1 = WASM_VECTOR_LEN;
|
|
3964
|
-
const ptr2 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
3965
|
-
const len2 = WASM_VECTOR_LEN;
|
|
3966
|
-
const ret = wasm.inboxstate_new(ptr0, len0, recovery_identifier, ptr1, len1, ptr2, len2);
|
|
3967
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3968
|
-
InboxStateFinalization.register(this, this.__wbg_ptr, this);
|
|
3969
|
-
return this;
|
|
3970
|
-
}
|
|
3971
3991
|
}
|
|
3972
3992
|
if (Symbol.dispose) InboxState.prototype[Symbol.dispose] = InboxState.prototype.free;
|
|
3973
3993
|
|
|
@@ -4003,6 +4023,19 @@ export class Installation {
|
|
|
4003
4023
|
const ptr = this.__destroy_into_raw();
|
|
4004
4024
|
wasm.__wbg_installation_free(ptr, 0);
|
|
4005
4025
|
}
|
|
4026
|
+
/**
|
|
4027
|
+
* @param {Uint8Array} bytes
|
|
4028
|
+
* @param {string} id
|
|
4029
|
+
* @param {bigint | null} [client_timestamp_ns]
|
|
4030
|
+
*/
|
|
4031
|
+
constructor(bytes, id, client_timestamp_ns) {
|
|
4032
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4033
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4034
|
+
const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
|
|
4035
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4036
|
+
InstallationFinalization.register(this, this.__wbg_ptr, this);
|
|
4037
|
+
return this;
|
|
4038
|
+
}
|
|
4006
4039
|
/**
|
|
4007
4040
|
* @returns {Uint8Array}
|
|
4008
4041
|
*/
|
|
@@ -4052,19 +4085,6 @@ export class Installation {
|
|
|
4052
4085
|
set clientTimestampNs(arg0) {
|
|
4053
4086
|
wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
4054
4087
|
}
|
|
4055
|
-
/**
|
|
4056
|
-
* @param {Uint8Array} bytes
|
|
4057
|
-
* @param {string} id
|
|
4058
|
-
* @param {bigint | null} [client_timestamp_ns]
|
|
4059
|
-
*/
|
|
4060
|
-
constructor(bytes, id, client_timestamp_ns) {
|
|
4061
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4062
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4063
|
-
const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
|
|
4064
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4065
|
-
InstallationFinalization.register(this, this.__wbg_ptr, this);
|
|
4066
|
-
return this;
|
|
4067
|
-
}
|
|
4068
4088
|
}
|
|
4069
4089
|
if (Symbol.dispose) Installation.prototype[Symbol.dispose] = Installation.prototype.free;
|
|
4070
4090
|
|
|
@@ -4085,13 +4105,6 @@ export class IntoUnderlyingByteSource {
|
|
|
4085
4105
|
const ptr = this.__destroy_into_raw();
|
|
4086
4106
|
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
4087
4107
|
}
|
|
4088
|
-
/**
|
|
4089
|
-
* @returns {ReadableStreamType}
|
|
4090
|
-
*/
|
|
4091
|
-
get type() {
|
|
4092
|
-
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
4093
|
-
return __wbindgen_enum_ReadableStreamType[ret];
|
|
4094
|
-
}
|
|
4095
4108
|
/**
|
|
4096
4109
|
* @returns {number}
|
|
4097
4110
|
*/
|
|
@@ -4099,6 +4112,14 @@ export class IntoUnderlyingByteSource {
|
|
|
4099
4112
|
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
4100
4113
|
return ret >>> 0;
|
|
4101
4114
|
}
|
|
4115
|
+
/**
|
|
4116
|
+
* @param {ReadableByteStreamController} controller
|
|
4117
|
+
* @returns {Promise<any>}
|
|
4118
|
+
*/
|
|
4119
|
+
pull(controller) {
|
|
4120
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
4121
|
+
return ret;
|
|
4122
|
+
}
|
|
4102
4123
|
/**
|
|
4103
4124
|
* @param {ReadableByteStreamController} controller
|
|
4104
4125
|
*/
|
|
@@ -4106,12 +4127,11 @@ export class IntoUnderlyingByteSource {
|
|
|
4106
4127
|
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
4107
4128
|
}
|
|
4108
4129
|
/**
|
|
4109
|
-
* @
|
|
4110
|
-
* @returns {Promise<any>}
|
|
4130
|
+
* @returns {ReadableStreamType}
|
|
4111
4131
|
*/
|
|
4112
|
-
|
|
4113
|
-
const ret = wasm.
|
|
4114
|
-
return ret;
|
|
4132
|
+
get type() {
|
|
4133
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
4134
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
4115
4135
|
}
|
|
4116
4136
|
cancel() {
|
|
4117
4137
|
const ptr = this.__destroy_into_raw();
|
|
@@ -4138,11 +4158,12 @@ export class IntoUnderlyingSink {
|
|
|
4138
4158
|
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
4139
4159
|
}
|
|
4140
4160
|
/**
|
|
4141
|
-
* @param {any}
|
|
4161
|
+
* @param {any} reason
|
|
4142
4162
|
* @returns {Promise<any>}
|
|
4143
4163
|
*/
|
|
4144
|
-
|
|
4145
|
-
const
|
|
4164
|
+
abort(reason) {
|
|
4165
|
+
const ptr = this.__destroy_into_raw();
|
|
4166
|
+
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
4146
4167
|
return ret;
|
|
4147
4168
|
}
|
|
4148
4169
|
/**
|
|
@@ -4154,12 +4175,11 @@ export class IntoUnderlyingSink {
|
|
|
4154
4175
|
return ret;
|
|
4155
4176
|
}
|
|
4156
4177
|
/**
|
|
4157
|
-
* @param {any}
|
|
4178
|
+
* @param {any} chunk
|
|
4158
4179
|
* @returns {Promise<any>}
|
|
4159
4180
|
*/
|
|
4160
|
-
|
|
4161
|
-
const
|
|
4162
|
-
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
4181
|
+
write(chunk) {
|
|
4182
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
4163
4183
|
return ret;
|
|
4164
4184
|
}
|
|
4165
4185
|
}
|
|
@@ -4226,7 +4246,7 @@ export class KeyPackageStatus {
|
|
|
4226
4246
|
* @returns {Lifetime | undefined}
|
|
4227
4247
|
*/
|
|
4228
4248
|
get lifetime() {
|
|
4229
|
-
const ret = wasm.
|
|
4249
|
+
const ret = wasm.__wbg_get_keypackagestatus_lifetime(this.__wbg_ptr);
|
|
4230
4250
|
return ret === 0 ? undefined : Lifetime.__wrap(ret);
|
|
4231
4251
|
}
|
|
4232
4252
|
/**
|
|
@@ -4238,7 +4258,7 @@ export class KeyPackageStatus {
|
|
|
4238
4258
|
_assertClass(arg0, Lifetime);
|
|
4239
4259
|
ptr0 = arg0.__destroy_into_raw();
|
|
4240
4260
|
}
|
|
4241
|
-
wasm.
|
|
4261
|
+
wasm.__wbg_set_keypackagestatus_lifetime(this.__wbg_ptr, ptr0);
|
|
4242
4262
|
}
|
|
4243
4263
|
/**
|
|
4244
4264
|
* @returns {string | undefined}
|
|
@@ -4292,14 +4312,14 @@ export class Lifetime {
|
|
|
4292
4312
|
* @returns {bigint}
|
|
4293
4313
|
*/
|
|
4294
4314
|
get not_before() {
|
|
4295
|
-
const ret = wasm.
|
|
4315
|
+
const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
|
|
4296
4316
|
return BigInt.asUintN(64, ret);
|
|
4297
4317
|
}
|
|
4298
4318
|
/**
|
|
4299
4319
|
* @param {bigint} arg0
|
|
4300
4320
|
*/
|
|
4301
4321
|
set not_before(arg0) {
|
|
4302
|
-
wasm.
|
|
4322
|
+
wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
|
|
4303
4323
|
}
|
|
4304
4324
|
/**
|
|
4305
4325
|
* @returns {bigint}
|
|
@@ -4378,7 +4398,7 @@ export class ListConversationsOptions {
|
|
|
4378
4398
|
* @param {bigint | null} [arg0]
|
|
4379
4399
|
*/
|
|
4380
4400
|
set createdAfterNs(arg0) {
|
|
4381
|
-
wasm.
|
|
4401
|
+
wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
4382
4402
|
}
|
|
4383
4403
|
/**
|
|
4384
4404
|
* @returns {bigint | undefined}
|
|
@@ -4406,6 +4426,19 @@ export class ListConversationsOptions {
|
|
|
4406
4426
|
set includeDuplicateDms(arg0) {
|
|
4407
4427
|
wasm.__wbg_set_listconversationsoptions_includeDuplicateDms(this.__wbg_ptr, isLikeNone(arg0) ? 0xFFFFFF : arg0 ? 1 : 0);
|
|
4408
4428
|
}
|
|
4429
|
+
/**
|
|
4430
|
+
* @returns {ListConversationsOrderBy | undefined}
|
|
4431
|
+
*/
|
|
4432
|
+
get orderBy() {
|
|
4433
|
+
const ret = wasm.__wbg_get_listconversationsoptions_orderBy(this.__wbg_ptr);
|
|
4434
|
+
return ret === 2 ? undefined : ret;
|
|
4435
|
+
}
|
|
4436
|
+
/**
|
|
4437
|
+
* @param {ListConversationsOrderBy | null} [arg0]
|
|
4438
|
+
*/
|
|
4439
|
+
set orderBy(arg0) {
|
|
4440
|
+
wasm.__wbg_set_listconversationsoptions_orderBy(this.__wbg_ptr, isLikeNone(arg0) ? 2 : arg0);
|
|
4441
|
+
}
|
|
4409
4442
|
/**
|
|
4410
4443
|
* @returns {bigint | undefined}
|
|
4411
4444
|
*/
|
|
@@ -4426,11 +4459,12 @@ export class ListConversationsOptions {
|
|
|
4426
4459
|
* @param {bigint | null} [created_before_ns]
|
|
4427
4460
|
* @param {boolean | null} [include_duplicate_dms]
|
|
4428
4461
|
* @param {bigint | null} [limit]
|
|
4462
|
+
* @param {ListConversationsOrderBy | null} [order_by]
|
|
4429
4463
|
*/
|
|
4430
|
-
constructor(consent_states, conversation_type, created_after_ns, created_before_ns, include_duplicate_dms, limit) {
|
|
4464
|
+
constructor(consent_states, conversation_type, created_after_ns, created_before_ns, include_duplicate_dms, limit, order_by) {
|
|
4431
4465
|
var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
|
|
4432
4466
|
var len0 = WASM_VECTOR_LEN;
|
|
4433
|
-
const ret = wasm.listconversationsoptions_new(ptr0, len0, isLikeNone(conversation_type) ? 4 : conversation_type, !isLikeNone(created_after_ns), isLikeNone(created_after_ns) ? BigInt(0) : created_after_ns, !isLikeNone(created_before_ns), isLikeNone(created_before_ns) ? BigInt(0) : created_before_ns, isLikeNone(include_duplicate_dms) ? 0xFFFFFF : include_duplicate_dms ? 1 : 0, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit);
|
|
4467
|
+
const ret = wasm.listconversationsoptions_new(ptr0, len0, isLikeNone(conversation_type) ? 4 : conversation_type, !isLikeNone(created_after_ns), isLikeNone(created_after_ns) ? BigInt(0) : created_after_ns, !isLikeNone(created_before_ns), isLikeNone(created_before_ns) ? BigInt(0) : created_before_ns, isLikeNone(include_duplicate_dms) ? 0xFFFFFF : include_duplicate_dms ? 1 : 0, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit, isLikeNone(order_by) ? 2 : order_by);
|
|
4434
4468
|
this.__wbg_ptr = ret >>> 0;
|
|
4435
4469
|
ListConversationsOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4436
4470
|
return this;
|
|
@@ -4455,6 +4489,29 @@ export class ListMessagesOptions {
|
|
|
4455
4489
|
const ptr = this.__destroy_into_raw();
|
|
4456
4490
|
wasm.__wbg_listmessagesoptions_free(ptr, 0);
|
|
4457
4491
|
}
|
|
4492
|
+
/**
|
|
4493
|
+
* @param {bigint | null} [sent_before_ns]
|
|
4494
|
+
* @param {bigint | null} [sent_after_ns]
|
|
4495
|
+
* @param {bigint | null} [limit]
|
|
4496
|
+
* @param {DeliveryStatus | null} [delivery_status]
|
|
4497
|
+
* @param {SortDirection | null} [direction]
|
|
4498
|
+
* @param {any[] | null} [content_types]
|
|
4499
|
+
* @param {any[] | null} [exclude_content_types]
|
|
4500
|
+
* @param {GroupMessageKind | null} [kind]
|
|
4501
|
+
* @param {string[] | null} [exclude_sender_inbox_ids]
|
|
4502
|
+
*/
|
|
4503
|
+
constructor(sent_before_ns, sent_after_ns, limit, delivery_status, direction, content_types, exclude_content_types, kind, exclude_sender_inbox_ids) {
|
|
4504
|
+
var ptr0 = isLikeNone(content_types) ? 0 : passArrayJsValueToWasm0(content_types, wasm.__wbindgen_malloc);
|
|
4505
|
+
var len0 = WASM_VECTOR_LEN;
|
|
4506
|
+
var ptr1 = isLikeNone(exclude_content_types) ? 0 : passArrayJsValueToWasm0(exclude_content_types, wasm.__wbindgen_malloc);
|
|
4507
|
+
var len1 = WASM_VECTOR_LEN;
|
|
4508
|
+
var ptr2 = isLikeNone(exclude_sender_inbox_ids) ? 0 : passArrayJsValueToWasm0(exclude_sender_inbox_ids, wasm.__wbindgen_malloc);
|
|
4509
|
+
var len2 = WASM_VECTOR_LEN;
|
|
4510
|
+
const ret = wasm.listmessagesoptions_new(!isLikeNone(sent_before_ns), isLikeNone(sent_before_ns) ? BigInt(0) : sent_before_ns, !isLikeNone(sent_after_ns), isLikeNone(sent_after_ns) ? BigInt(0) : sent_after_ns, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit, isLikeNone(delivery_status) ? 3 : delivery_status, isLikeNone(direction) ? 2 : direction, ptr0, len0, ptr1, len1, isLikeNone(kind) ? 2 : kind, ptr2, len2);
|
|
4511
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4512
|
+
ListMessagesOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4513
|
+
return this;
|
|
4514
|
+
}
|
|
4458
4515
|
/**
|
|
4459
4516
|
* @returns {any[] | undefined}
|
|
4460
4517
|
*/
|
|
@@ -4593,29 +4650,6 @@ export class ListMessagesOptions {
|
|
|
4593
4650
|
var len0 = WASM_VECTOR_LEN;
|
|
4594
4651
|
wasm.__wbg_set_listmessagesoptions_excludeSenderInboxIds(this.__wbg_ptr, ptr0, len0);
|
|
4595
4652
|
}
|
|
4596
|
-
/**
|
|
4597
|
-
* @param {bigint | null} [sent_before_ns]
|
|
4598
|
-
* @param {bigint | null} [sent_after_ns]
|
|
4599
|
-
* @param {bigint | null} [limit]
|
|
4600
|
-
* @param {DeliveryStatus | null} [delivery_status]
|
|
4601
|
-
* @param {SortDirection | null} [direction]
|
|
4602
|
-
* @param {any[] | null} [content_types]
|
|
4603
|
-
* @param {any[] | null} [exclude_content_types]
|
|
4604
|
-
* @param {GroupMessageKind | null} [kind]
|
|
4605
|
-
* @param {string[] | null} [exclude_sender_inbox_ids]
|
|
4606
|
-
*/
|
|
4607
|
-
constructor(sent_before_ns, sent_after_ns, limit, delivery_status, direction, content_types, exclude_content_types, kind, exclude_sender_inbox_ids) {
|
|
4608
|
-
var ptr0 = isLikeNone(content_types) ? 0 : passArrayJsValueToWasm0(content_types, wasm.__wbindgen_malloc);
|
|
4609
|
-
var len0 = WASM_VECTOR_LEN;
|
|
4610
|
-
var ptr1 = isLikeNone(exclude_content_types) ? 0 : passArrayJsValueToWasm0(exclude_content_types, wasm.__wbindgen_malloc);
|
|
4611
|
-
var len1 = WASM_VECTOR_LEN;
|
|
4612
|
-
var ptr2 = isLikeNone(exclude_sender_inbox_ids) ? 0 : passArrayJsValueToWasm0(exclude_sender_inbox_ids, wasm.__wbindgen_malloc);
|
|
4613
|
-
var len2 = WASM_VECTOR_LEN;
|
|
4614
|
-
const ret = wasm.listmessagesoptions_new(!isLikeNone(sent_before_ns), isLikeNone(sent_before_ns) ? BigInt(0) : sent_before_ns, !isLikeNone(sent_after_ns), isLikeNone(sent_after_ns) ? BigInt(0) : sent_after_ns, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit, isLikeNone(delivery_status) ? 3 : delivery_status, isLikeNone(direction) ? 2 : direction, ptr0, len0, ptr1, len1, isLikeNone(kind) ? 2 : kind, ptr2, len2);
|
|
4615
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4616
|
-
ListMessagesOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4617
|
-
return this;
|
|
4618
|
-
}
|
|
4619
4653
|
}
|
|
4620
4654
|
if (Symbol.dispose) ListMessagesOptions.prototype[Symbol.dispose] = ListMessagesOptions.prototype.free;
|
|
4621
4655
|
|
|
@@ -4638,6 +4672,17 @@ export class LogOptions {
|
|
|
4638
4672
|
const ptr = this.__destroy_into_raw();
|
|
4639
4673
|
wasm.__wbg_logoptions_free(ptr, 0);
|
|
4640
4674
|
}
|
|
4675
|
+
/**
|
|
4676
|
+
* @param {boolean} structured
|
|
4677
|
+
* @param {boolean} performance
|
|
4678
|
+
* @param {LogLevel | null} [level]
|
|
4679
|
+
*/
|
|
4680
|
+
constructor(structured, performance, level) {
|
|
4681
|
+
const ret = wasm.logoptions_new(structured, performance, isLikeNone(level) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(level) + 1 || 7) - 1));
|
|
4682
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4683
|
+
LogOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4684
|
+
return this;
|
|
4685
|
+
}
|
|
4641
4686
|
/**
|
|
4642
4687
|
* enable structured JSON logging to stdout.Useful for third-party log viewers
|
|
4643
4688
|
* @returns {boolean}
|
|
@@ -4683,17 +4728,6 @@ export class LogOptions {
|
|
|
4683
4728
|
set level(arg0) {
|
|
4684
4729
|
wasm.__wbg_set_logoptions_level(this.__wbg_ptr, isLikeNone(arg0) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(arg0) + 1 || 7) - 1));
|
|
4685
4730
|
}
|
|
4686
|
-
/**
|
|
4687
|
-
* @param {boolean} structured
|
|
4688
|
-
* @param {boolean} performance
|
|
4689
|
-
* @param {LogLevel | null} [level]
|
|
4690
|
-
*/
|
|
4691
|
-
constructor(structured, performance, level) {
|
|
4692
|
-
const ret = wasm.logoptions_new(structured, performance, isLikeNone(level) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(level) + 1 || 7) - 1));
|
|
4693
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4694
|
-
LogOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4695
|
-
return this;
|
|
4696
|
-
}
|
|
4697
4731
|
}
|
|
4698
4732
|
if (Symbol.dispose) LogOptions.prototype[Symbol.dispose] = LogOptions.prototype.free;
|
|
4699
4733
|
|
|
@@ -4756,14 +4790,14 @@ export class Message {
|
|
|
4756
4790
|
* @returns {bigint}
|
|
4757
4791
|
*/
|
|
4758
4792
|
get sentAtNs() {
|
|
4759
|
-
const ret = wasm.
|
|
4793
|
+
const ret = wasm.__wbg_get_apistats_upload_key_package(this.__wbg_ptr);
|
|
4760
4794
|
return ret;
|
|
4761
4795
|
}
|
|
4762
4796
|
/**
|
|
4763
4797
|
* @param {bigint} arg0
|
|
4764
4798
|
*/
|
|
4765
4799
|
set sentAtNs(arg0) {
|
|
4766
|
-
wasm.
|
|
4800
|
+
wasm.__wbg_set_apistats_upload_key_package(this.__wbg_ptr, arg0);
|
|
4767
4801
|
}
|
|
4768
4802
|
/**
|
|
4769
4803
|
* @returns {string}
|
|
@@ -4920,14 +4954,14 @@ export class MessageDisappearingSettings {
|
|
|
4920
4954
|
* @returns {bigint}
|
|
4921
4955
|
*/
|
|
4922
4956
|
get inNs() {
|
|
4923
|
-
const ret = wasm.
|
|
4957
|
+
const ret = wasm.__wbg_get_messagedisappearingsettings_inNs(this.__wbg_ptr);
|
|
4924
4958
|
return ret;
|
|
4925
4959
|
}
|
|
4926
4960
|
/**
|
|
4927
4961
|
* @param {bigint} arg0
|
|
4928
4962
|
*/
|
|
4929
4963
|
set inNs(arg0) {
|
|
4930
|
-
wasm.
|
|
4964
|
+
wasm.__wbg_set_messagedisappearingsettings_inNs(this.__wbg_ptr, arg0);
|
|
4931
4965
|
}
|
|
4932
4966
|
/**
|
|
4933
4967
|
* @param {bigint} from_ns
|
|
@@ -5055,7 +5089,7 @@ export class MetadataFieldChange {
|
|
|
5055
5089
|
set fieldName(arg0) {
|
|
5056
5090
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5057
5091
|
const len0 = WASM_VECTOR_LEN;
|
|
5058
|
-
wasm.
|
|
5092
|
+
wasm.__wbg_set_groupmember_inboxId(this.__wbg_ptr, ptr0, len0);
|
|
5059
5093
|
}
|
|
5060
5094
|
/**
|
|
5061
5095
|
* @returns {string | undefined}
|
|
@@ -5176,38 +5210,76 @@ export class Opfs {
|
|
|
5176
5210
|
/**
|
|
5177
5211
|
* @returns {Promise<void>}
|
|
5178
5212
|
*/
|
|
5179
|
-
static
|
|
5180
|
-
const ret = wasm.
|
|
5213
|
+
static wipeFiles() {
|
|
5214
|
+
const ret = wasm.opfs_wipeFiles();
|
|
5181
5215
|
return ret;
|
|
5182
5216
|
}
|
|
5183
5217
|
/**
|
|
5184
|
-
*
|
|
5185
|
-
* @
|
|
5218
|
+
* export db file with 'name'
|
|
5219
|
+
* @param {string} name
|
|
5220
|
+
* @returns {Uint8Array}
|
|
5186
5221
|
*/
|
|
5187
|
-
static
|
|
5188
|
-
const
|
|
5189
|
-
|
|
5222
|
+
static exportFile(name) {
|
|
5223
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5224
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5225
|
+
const ret = wasm.opfs_exportFile(ptr0, len0);
|
|
5226
|
+
if (ret[3]) {
|
|
5227
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5228
|
+
}
|
|
5229
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5230
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5231
|
+
return v2;
|
|
5190
5232
|
}
|
|
5191
5233
|
/**
|
|
5192
|
-
*
|
|
5193
|
-
* @
|
|
5234
|
+
* Adds n entries to the current pool.
|
|
5235
|
+
* @param {number} n
|
|
5236
|
+
* @returns {Promise<number>}
|
|
5194
5237
|
*/
|
|
5195
|
-
static
|
|
5196
|
-
const ret = wasm.
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5238
|
+
static addCapacity(n) {
|
|
5239
|
+
const ret = wasm.opfs_addCapacity(n);
|
|
5240
|
+
return ret;
|
|
5241
|
+
}
|
|
5242
|
+
/**
|
|
5243
|
+
* @returns {number}
|
|
5244
|
+
*/
|
|
5245
|
+
static getCapacity() {
|
|
5246
|
+
const ret = wasm.opfs_getCapacity();
|
|
5247
|
+
return ret >>> 0;
|
|
5248
|
+
}
|
|
5249
|
+
/**
|
|
5250
|
+
* get number of files in pool
|
|
5251
|
+
* @returns {number}
|
|
5252
|
+
*/
|
|
5253
|
+
static getFileCount() {
|
|
5254
|
+
const ret = wasm.opfs_getFileCount();
|
|
5255
|
+
return ret >>> 0;
|
|
5256
|
+
}
|
|
5257
|
+
/**
|
|
5258
|
+
* Removes up to n entries from the pool, with the caveat that it can only remove currently-unused entries.
|
|
5259
|
+
* @param {number} n
|
|
5260
|
+
* @returns {Promise<number>}
|
|
5261
|
+
*/
|
|
5262
|
+
static reduceCapacity(n) {
|
|
5263
|
+
const ret = wasm.opfs_reduceCapacity(n);
|
|
5264
|
+
return ret;
|
|
5203
5265
|
}
|
|
5204
5266
|
/**
|
|
5205
5267
|
* @returns {Promise<void>}
|
|
5206
5268
|
*/
|
|
5207
|
-
static
|
|
5208
|
-
const ret = wasm.
|
|
5269
|
+
static init_sqlite_opfs() {
|
|
5270
|
+
const ret = wasm.opfs_init_sqlite_opfs();
|
|
5209
5271
|
return ret;
|
|
5210
5272
|
}
|
|
5273
|
+
/**
|
|
5274
|
+
* list files in current pool
|
|
5275
|
+
* @returns {string[]}
|
|
5276
|
+
*/
|
|
5277
|
+
static getFileNames() {
|
|
5278
|
+
const ret = wasm.opfs_getFileNames();
|
|
5279
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
5280
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
5281
|
+
return v1;
|
|
5282
|
+
}
|
|
5211
5283
|
/**
|
|
5212
5284
|
* If a virtual file exists with the given name, disassociates it from the pool and returns true, else returns false without side effects.
|
|
5213
5285
|
* @param {string} name
|
|
@@ -5223,15 +5295,26 @@ export class Opfs {
|
|
|
5223
5295
|
return ret[0] !== 0;
|
|
5224
5296
|
}
|
|
5225
5297
|
/**
|
|
5226
|
-
*
|
|
5227
|
-
* @returns {string
|
|
5298
|
+
* gets the error from Opfs, if any.
|
|
5299
|
+
* @returns {string | undefined}
|
|
5228
5300
|
*/
|
|
5229
|
-
static
|
|
5230
|
-
const ret = wasm.
|
|
5231
|
-
|
|
5232
|
-
|
|
5301
|
+
static error() {
|
|
5302
|
+
const ret = wasm.opfs_error();
|
|
5303
|
+
let v1;
|
|
5304
|
+
if (ret[0] !== 0) {
|
|
5305
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
5306
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5307
|
+
}
|
|
5233
5308
|
return v1;
|
|
5234
5309
|
}
|
|
5310
|
+
/**
|
|
5311
|
+
* Check if the global OPFS object has been initialized
|
|
5312
|
+
* @returns {boolean}
|
|
5313
|
+
*/
|
|
5314
|
+
static exists() {
|
|
5315
|
+
const ret = wasm.opfs_exists();
|
|
5316
|
+
return ret !== 0;
|
|
5317
|
+
}
|
|
5235
5318
|
/**
|
|
5236
5319
|
* import a db file at 'path'
|
|
5237
5320
|
* @param {string} path
|
|
@@ -5247,55 +5330,6 @@ export class Opfs {
|
|
|
5247
5330
|
throw takeFromExternrefTable0(ret[0]);
|
|
5248
5331
|
}
|
|
5249
5332
|
}
|
|
5250
|
-
/**
|
|
5251
|
-
* export db file with 'name'
|
|
5252
|
-
* @param {string} name
|
|
5253
|
-
* @returns {Uint8Array}
|
|
5254
|
-
*/
|
|
5255
|
-
static exportFile(name) {
|
|
5256
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5257
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5258
|
-
const ret = wasm.opfs_exportFile(ptr0, len0);
|
|
5259
|
-
if (ret[3]) {
|
|
5260
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
5261
|
-
}
|
|
5262
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5263
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5264
|
-
return v2;
|
|
5265
|
-
}
|
|
5266
|
-
/**
|
|
5267
|
-
* get number of files in pool
|
|
5268
|
-
* @returns {number}
|
|
5269
|
-
*/
|
|
5270
|
-
static getFileCount() {
|
|
5271
|
-
const ret = wasm.opfs_getFileCount();
|
|
5272
|
-
return ret >>> 0;
|
|
5273
|
-
}
|
|
5274
|
-
/**
|
|
5275
|
-
* @returns {number}
|
|
5276
|
-
*/
|
|
5277
|
-
static getCapacity() {
|
|
5278
|
-
const ret = wasm.opfs_getCapacity();
|
|
5279
|
-
return ret >>> 0;
|
|
5280
|
-
}
|
|
5281
|
-
/**
|
|
5282
|
-
* Adds n entries to the current pool.
|
|
5283
|
-
* @param {number} n
|
|
5284
|
-
* @returns {Promise<number>}
|
|
5285
|
-
*/
|
|
5286
|
-
static addCapacity(n) {
|
|
5287
|
-
const ret = wasm.opfs_addCapacity(n);
|
|
5288
|
-
return ret;
|
|
5289
|
-
}
|
|
5290
|
-
/**
|
|
5291
|
-
* Removes up to n entries from the pool, with the caveat that it can only remove currently-unused entries.
|
|
5292
|
-
* @param {number} n
|
|
5293
|
-
* @returns {Promise<number>}
|
|
5294
|
-
*/
|
|
5295
|
-
static reduceCapacity(n) {
|
|
5296
|
-
const ret = wasm.opfs_reduceCapacity(n);
|
|
5297
|
-
return ret;
|
|
5298
|
-
}
|
|
5299
5333
|
}
|
|
5300
5334
|
if (Symbol.dispose) Opfs.prototype[Symbol.dispose] = Opfs.prototype.free;
|
|
5301
5335
|
|
|
@@ -5344,6 +5378,22 @@ export class PermissionPolicySet {
|
|
|
5344
5378
|
const ptr = this.__destroy_into_raw();
|
|
5345
5379
|
wasm.__wbg_permissionpolicyset_free(ptr, 0);
|
|
5346
5380
|
}
|
|
5381
|
+
/**
|
|
5382
|
+
* @param {PermissionPolicy} add_member_policy
|
|
5383
|
+
* @param {PermissionPolicy} remove_member_policy
|
|
5384
|
+
* @param {PermissionPolicy} add_admin_policy
|
|
5385
|
+
* @param {PermissionPolicy} remove_admin_policy
|
|
5386
|
+
* @param {PermissionPolicy} update_group_name_policy
|
|
5387
|
+
* @param {PermissionPolicy} update_group_description_policy
|
|
5388
|
+
* @param {PermissionPolicy} update_group_image_url_square_policy
|
|
5389
|
+
* @param {PermissionPolicy} update_message_disappearing_policy
|
|
5390
|
+
*/
|
|
5391
|
+
constructor(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_message_disappearing_policy) {
|
|
5392
|
+
const ret = wasm.permissionpolicyset_new(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_message_disappearing_policy);
|
|
5393
|
+
this.__wbg_ptr = ret >>> 0;
|
|
5394
|
+
PermissionPolicySetFinalization.register(this, this.__wbg_ptr, this);
|
|
5395
|
+
return this;
|
|
5396
|
+
}
|
|
5347
5397
|
/**
|
|
5348
5398
|
* @returns {PermissionPolicy}
|
|
5349
5399
|
*/
|
|
@@ -5448,22 +5498,6 @@ export class PermissionPolicySet {
|
|
|
5448
5498
|
set updateMessageDisappearingPolicy(arg0) {
|
|
5449
5499
|
wasm.__wbg_set_permissionpolicyset_updateMessageDisappearingPolicy(this.__wbg_ptr, arg0);
|
|
5450
5500
|
}
|
|
5451
|
-
/**
|
|
5452
|
-
* @param {PermissionPolicy} add_member_policy
|
|
5453
|
-
* @param {PermissionPolicy} remove_member_policy
|
|
5454
|
-
* @param {PermissionPolicy} add_admin_policy
|
|
5455
|
-
* @param {PermissionPolicy} remove_admin_policy
|
|
5456
|
-
* @param {PermissionPolicy} update_group_name_policy
|
|
5457
|
-
* @param {PermissionPolicy} update_group_description_policy
|
|
5458
|
-
* @param {PermissionPolicy} update_group_image_url_square_policy
|
|
5459
|
-
* @param {PermissionPolicy} update_message_disappearing_policy
|
|
5460
|
-
*/
|
|
5461
|
-
constructor(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_message_disappearing_policy) {
|
|
5462
|
-
const ret = wasm.permissionpolicyset_new(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_message_disappearing_policy);
|
|
5463
|
-
this.__wbg_ptr = ret >>> 0;
|
|
5464
|
-
PermissionPolicySetFinalization.register(this, this.__wbg_ptr, this);
|
|
5465
|
-
return this;
|
|
5466
|
-
}
|
|
5467
5501
|
}
|
|
5468
5502
|
if (Symbol.dispose) PermissionPolicySet.prototype[Symbol.dispose] = PermissionPolicySet.prototype.free;
|
|
5469
5503
|
|
|
@@ -5513,7 +5547,7 @@ export class Reaction {
|
|
|
5513
5547
|
set reference(arg0) {
|
|
5514
5548
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5515
5549
|
const len0 = WASM_VECTOR_LEN;
|
|
5516
|
-
wasm.
|
|
5550
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
5517
5551
|
}
|
|
5518
5552
|
/**
|
|
5519
5553
|
* @returns {string}
|
|
@@ -5536,7 +5570,7 @@ export class Reaction {
|
|
|
5536
5570
|
set referenceInboxId(arg0) {
|
|
5537
5571
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5538
5572
|
const len0 = WASM_VECTOR_LEN;
|
|
5539
|
-
wasm.
|
|
5573
|
+
wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
|
|
5540
5574
|
}
|
|
5541
5575
|
/**
|
|
5542
5576
|
* @returns {ReactionAction}
|
|
@@ -5655,7 +5689,7 @@ export class ReactionPayload {
|
|
|
5655
5689
|
set reference(arg0) {
|
|
5656
5690
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5657
5691
|
const len0 = WASM_VECTOR_LEN;
|
|
5658
|
-
wasm.
|
|
5692
|
+
wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
|
|
5659
5693
|
}
|
|
5660
5694
|
/**
|
|
5661
5695
|
* @returns {string}
|
|
@@ -5678,7 +5712,7 @@ export class ReactionPayload {
|
|
|
5678
5712
|
set referenceInboxId(arg0) {
|
|
5679
5713
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5680
5714
|
const len0 = WASM_VECTOR_LEN;
|
|
5681
|
-
wasm.
|
|
5715
|
+
wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
|
|
5682
5716
|
}
|
|
5683
5717
|
/**
|
|
5684
5718
|
* @returns {ReactionActionPayload}
|
|
@@ -6158,6 +6192,15 @@ export class SendMessageOpts {
|
|
|
6158
6192
|
const ptr = this.__destroy_into_raw();
|
|
6159
6193
|
wasm.__wbg_sendmessageopts_free(ptr, 0);
|
|
6160
6194
|
}
|
|
6195
|
+
/**
|
|
6196
|
+
* @param {boolean} should_push
|
|
6197
|
+
*/
|
|
6198
|
+
constructor(should_push) {
|
|
6199
|
+
const ret = wasm.sendmessageopts_new(should_push);
|
|
6200
|
+
this.__wbg_ptr = ret >>> 0;
|
|
6201
|
+
SendMessageOptsFinalization.register(this, this.__wbg_ptr, this);
|
|
6202
|
+
return this;
|
|
6203
|
+
}
|
|
6161
6204
|
/**
|
|
6162
6205
|
* @returns {boolean}
|
|
6163
6206
|
*/
|
|
@@ -6206,6 +6249,17 @@ export class SignatureRequestHandle {
|
|
|
6206
6249
|
const ret = wasm.signaturerequesthandle_signatureText(this.__wbg_ptr);
|
|
6207
6250
|
return ret;
|
|
6208
6251
|
}
|
|
6252
|
+
/**
|
|
6253
|
+
* @param {Identifier} account_identifier
|
|
6254
|
+
* @param {Uint8Array} signature_bytes
|
|
6255
|
+
* @param {bigint} chain_id
|
|
6256
|
+
* @param {bigint | null} [block_number]
|
|
6257
|
+
* @returns {Promise<void>}
|
|
6258
|
+
*/
|
|
6259
|
+
addScwSignature(account_identifier, signature_bytes, chain_id, block_number) {
|
|
6260
|
+
const ret = wasm.signaturerequesthandle_addScwSignature(this.__wbg_ptr, account_identifier, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
6261
|
+
return ret;
|
|
6262
|
+
}
|
|
6209
6263
|
/**
|
|
6210
6264
|
* @param {Uint8Array} signature_bytes
|
|
6211
6265
|
* @returns {Promise<void>}
|
|
@@ -6224,17 +6278,6 @@ export class SignatureRequestHandle {
|
|
|
6224
6278
|
const ret = wasm.signaturerequesthandle_addPasskeySignature(this.__wbg_ptr, ptr0);
|
|
6225
6279
|
return ret;
|
|
6226
6280
|
}
|
|
6227
|
-
/**
|
|
6228
|
-
* @param {Identifier} account_identifier
|
|
6229
|
-
* @param {Uint8Array} signature_bytes
|
|
6230
|
-
* @param {bigint} chain_id
|
|
6231
|
-
* @param {bigint | null} [block_number]
|
|
6232
|
-
* @returns {Promise<void>}
|
|
6233
|
-
*/
|
|
6234
|
-
addScwSignature(account_identifier, signature_bytes, chain_id, block_number) {
|
|
6235
|
-
const ret = wasm.signaturerequesthandle_addScwSignature(this.__wbg_ptr, account_identifier, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
6236
|
-
return ret;
|
|
6237
|
-
}
|
|
6238
6281
|
}
|
|
6239
6282
|
if (Symbol.dispose) SignatureRequestHandle.prototype[Symbol.dispose] = SignatureRequestHandle.prototype.free;
|
|
6240
6283
|
|
|
@@ -6263,13 +6306,6 @@ export class StreamCloser {
|
|
|
6263
6306
|
const ptr = this.__destroy_into_raw();
|
|
6264
6307
|
wasm.__wbg_streamcloser_free(ptr, 0);
|
|
6265
6308
|
}
|
|
6266
|
-
/**
|
|
6267
|
-
* Signal the stream to end
|
|
6268
|
-
* Does not wait for the stream to end.
|
|
6269
|
-
*/
|
|
6270
|
-
end() {
|
|
6271
|
-
wasm.streamcloser_end(this.__wbg_ptr);
|
|
6272
|
-
}
|
|
6273
6309
|
/**
|
|
6274
6310
|
* End the stream and `await` for it to shutdown
|
|
6275
6311
|
* Returns the `Result` of the task.
|
|
@@ -6287,6 +6323,13 @@ export class StreamCloser {
|
|
|
6287
6323
|
const ret = wasm.streamcloser_waitForReady(this.__wbg_ptr);
|
|
6288
6324
|
return ret;
|
|
6289
6325
|
}
|
|
6326
|
+
/**
|
|
6327
|
+
* Signal the stream to end
|
|
6328
|
+
* Does not wait for the stream to end.
|
|
6329
|
+
*/
|
|
6330
|
+
end() {
|
|
6331
|
+
wasm.streamcloser_end(this.__wbg_ptr);
|
|
6332
|
+
}
|
|
6290
6333
|
/**
|
|
6291
6334
|
* Checks if this stream is closed
|
|
6292
6335
|
* @returns {boolean}
|
|
@@ -6344,7 +6387,7 @@ export class TextContent {
|
|
|
6344
6387
|
set content(arg0) {
|
|
6345
6388
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6346
6389
|
const len0 = WASM_VECTOR_LEN;
|
|
6347
|
-
wasm.
|
|
6390
|
+
wasm.__wbg_set_textcontent_content(this.__wbg_ptr, ptr0, len0);
|
|
6348
6391
|
}
|
|
6349
6392
|
}
|
|
6350
6393
|
if (Symbol.dispose) TextContent.prototype[Symbol.dispose] = TextContent.prototype.free;
|
|
@@ -6395,7 +6438,7 @@ export class TransactionMetadata {
|
|
|
6395
6438
|
set transactionType(arg0) {
|
|
6396
6439
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6397
6440
|
const len0 = WASM_VECTOR_LEN;
|
|
6398
|
-
wasm.
|
|
6441
|
+
wasm.__wbg_set_transactionmetadata_transactionType(this.__wbg_ptr, ptr0, len0);
|
|
6399
6442
|
}
|
|
6400
6443
|
/**
|
|
6401
6444
|
* @returns {string}
|
|
@@ -6418,7 +6461,7 @@ export class TransactionMetadata {
|
|
|
6418
6461
|
set currency(arg0) {
|
|
6419
6462
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6420
6463
|
const len0 = WASM_VECTOR_LEN;
|
|
6421
|
-
wasm.
|
|
6464
|
+
wasm.__wbg_set_reaction_content(this.__wbg_ptr, ptr0, len0);
|
|
6422
6465
|
}
|
|
6423
6466
|
/**
|
|
6424
6467
|
* @returns {number}
|
|
@@ -6467,7 +6510,7 @@ export class TransactionMetadata {
|
|
|
6467
6510
|
set fromAddress(arg0) {
|
|
6468
6511
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6469
6512
|
const len0 = WASM_VECTOR_LEN;
|
|
6470
|
-
wasm.
|
|
6513
|
+
wasm.__wbg_set_transactionmetadata_fromAddress(this.__wbg_ptr, ptr0, len0);
|
|
6471
6514
|
}
|
|
6472
6515
|
/**
|
|
6473
6516
|
* @returns {string}
|
|
@@ -6490,7 +6533,7 @@ export class TransactionMetadata {
|
|
|
6490
6533
|
set toAddress(arg0) {
|
|
6491
6534
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6492
6535
|
const len0 = WASM_VECTOR_LEN;
|
|
6493
|
-
wasm.
|
|
6536
|
+
wasm.__wbg_set_transactionmetadata_toAddress(this.__wbg_ptr, ptr0, len0);
|
|
6494
6537
|
}
|
|
6495
6538
|
}
|
|
6496
6539
|
if (Symbol.dispose) TransactionMetadata.prototype[Symbol.dispose] = TransactionMetadata.prototype.free;
|
|
@@ -7211,7 +7254,7 @@ function __wbg_get_imports() {
|
|
|
7211
7254
|
const a = state0.a;
|
|
7212
7255
|
state0.a = 0;
|
|
7213
7256
|
try {
|
|
7214
|
-
return
|
|
7257
|
+
return __wbg_adapter_899(a, state0.b, arg0, arg1);
|
|
7215
7258
|
} finally {
|
|
7216
7259
|
state0.a = a;
|
|
7217
7260
|
}
|
|
@@ -7311,22 +7354,27 @@ function __wbg_get_imports() {
|
|
|
7311
7354
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
7312
7355
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
7313
7356
|
};
|
|
7314
|
-
imports.wbg.
|
|
7357
|
+
imports.wbg.__wbg_onclose_9deb104d6c5aecbc = function(arg0) {
|
|
7315
7358
|
arg0.on_close();
|
|
7316
7359
|
};
|
|
7317
|
-
imports.wbg.
|
|
7360
|
+
imports.wbg.__wbg_onconsentupdate_7347e9a3d30228a5 = function(arg0, arg1) {
|
|
7318
7361
|
arg0.on_consent_update(arg1);
|
|
7319
7362
|
};
|
|
7320
|
-
imports.wbg.
|
|
7363
|
+
imports.wbg.__wbg_onconversation_33e01e95b70f8044 = function(arg0, arg1) {
|
|
7321
7364
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
7322
7365
|
};
|
|
7323
|
-
imports.wbg.
|
|
7366
|
+
imports.wbg.__wbg_onerror_70640215ac668333 = function(arg0, arg1) {
|
|
7324
7367
|
arg0.on_error(arg1);
|
|
7325
7368
|
};
|
|
7326
|
-
imports.wbg.
|
|
7369
|
+
imports.wbg.__wbg_onmessage_debbd5dfdd180805 = function(arg0, arg1) {
|
|
7327
7370
|
arg0.on_message(Message.__wrap(arg1));
|
|
7328
7371
|
};
|
|
7329
|
-
imports.wbg.
|
|
7372
|
+
imports.wbg.__wbg_onmessagedeleted_3b5d95e932717a44 = function(arg0, arg1, arg2) {
|
|
7373
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
7374
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
7375
|
+
arg0.on_message_deleted(v0);
|
|
7376
|
+
};
|
|
7377
|
+
imports.wbg.__wbg_onuserpreferenceupdate_aef718dc262eff7d = function(arg0, arg1, arg2) {
|
|
7330
7378
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
7331
7379
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
7332
7380
|
arg0.on_user_preference_update(v0);
|
|
@@ -7693,6 +7741,11 @@ function __wbg_get_imports() {
|
|
|
7693
7741
|
const ret = XmtpCursor.__unwrap(arg0);
|
|
7694
7742
|
return ret;
|
|
7695
7743
|
};
|
|
7744
|
+
imports.wbg.__wbindgen_cast_08c1e46f0bf37c36 = function(arg0, arg1) {
|
|
7745
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7204, function: Function { arguments: [], shim_idx: 7205, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7746
|
+
const ret = makeMutClosure(arg0, arg1, 7204, __wbg_adapter_12);
|
|
7747
|
+
return ret;
|
|
7748
|
+
};
|
|
7696
7749
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
7697
7750
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
7698
7751
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -7710,19 +7763,19 @@ function __wbg_get_imports() {
|
|
|
7710
7763
|
const ret = v0;
|
|
7711
7764
|
return ret;
|
|
7712
7765
|
};
|
|
7713
|
-
imports.wbg.
|
|
7714
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
7715
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7766
|
+
imports.wbg.__wbindgen_cast_57d60d237afa669a = function(arg0, arg1) {
|
|
7767
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 6810, function: Function { arguments: [], shim_idx: 6811, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7768
|
+
const ret = makeMutClosure(arg0, arg1, 6810, __wbg_adapter_26);
|
|
7716
7769
|
return ret;
|
|
7717
7770
|
};
|
|
7718
|
-
imports.wbg.
|
|
7719
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
7720
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7771
|
+
imports.wbg.__wbindgen_cast_72aedd85aaf04c4c = function(arg0, arg1) {
|
|
7772
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4940, function: Function { arguments: [], shim_idx: 4941, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7773
|
+
const ret = makeMutClosure(arg0, arg1, 4940, __wbg_adapter_23);
|
|
7721
7774
|
return ret;
|
|
7722
7775
|
};
|
|
7723
|
-
imports.wbg.
|
|
7724
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
7725
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7776
|
+
imports.wbg.__wbindgen_cast_7690d55fcc00401c = function(arg0, arg1) {
|
|
7777
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7217, function: Function { arguments: [Externref], shim_idx: 7228, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7778
|
+
const ret = makeMutClosure(arg0, arg1, 7217, __wbg_adapter_29);
|
|
7726
7779
|
return ret;
|
|
7727
7780
|
};
|
|
7728
7781
|
imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
|
|
@@ -7754,11 +7807,6 @@ function __wbg_get_imports() {
|
|
|
7754
7807
|
const ret = arg0;
|
|
7755
7808
|
return ret;
|
|
7756
7809
|
};
|
|
7757
|
-
imports.wbg.__wbindgen_cast_dd692d1ee4d0d90d = function(arg0, arg1) {
|
|
7758
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 7128, function: Function { arguments: [], shim_idx: 7129, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7759
|
-
const ret = makeMutClosure(arg0, arg1, 7128, __wbg_adapter_24);
|
|
7760
|
-
return ret;
|
|
7761
|
-
};
|
|
7762
7810
|
imports.wbg.__wbindgen_cast_e081be35fe620ec4 = function(arg0, arg1) {
|
|
7763
7811
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
7764
7812
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|