@xmtp/wasm-bindings 1.6.0-dev.07065a7 → 1.6.0-dev.35d2ff1
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 +641 -626
- package/dist/bindings_wasm.js +1205 -1130
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +504 -497
- package/dist/version.json +2 -2
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -234,18 +234,39 @@ function takeFromExternrefTable0(idx) {
|
|
|
234
234
|
wasm.__externref_table_dealloc(idx);
|
|
235
235
|
return value;
|
|
236
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* @param {string} signature_text
|
|
239
|
+
* @param {Uint8Array} signature_bytes
|
|
240
|
+
* @param {Uint8Array} public_key
|
|
241
|
+
*/
|
|
242
|
+
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
243
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
244
|
+
const len0 = WASM_VECTOR_LEN;
|
|
245
|
+
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
246
|
+
if (ret[1]) {
|
|
247
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
237
250
|
|
|
238
251
|
function _assertClass(instance, klass) {
|
|
239
252
|
if (!(instance instanceof klass)) {
|
|
240
253
|
throw new Error(`expected instance of ${klass.name}`);
|
|
241
254
|
}
|
|
242
255
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
256
|
+
/**
|
|
257
|
+
* @param {string} v3_host
|
|
258
|
+
* @param {string | null | undefined} gateway_host
|
|
259
|
+
* @param {SignatureRequestHandle} signature_request
|
|
260
|
+
* @returns {Promise<void>}
|
|
261
|
+
*/
|
|
262
|
+
export function applySignatureRequest(v3_host, gateway_host, signature_request) {
|
|
263
|
+
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
264
|
+
const len0 = WASM_VECTOR_LEN;
|
|
265
|
+
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
|
+
var len1 = WASM_VECTOR_LEN;
|
|
267
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
268
|
+
const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
|
|
269
|
+
return ret;
|
|
249
270
|
}
|
|
250
271
|
|
|
251
272
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
@@ -258,66 +279,39 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
258
279
|
return ptr;
|
|
259
280
|
}
|
|
260
281
|
/**
|
|
261
|
-
* @param {string}
|
|
282
|
+
* @param {string} v3_host
|
|
283
|
+
* @param {string | null | undefined} gateway_host
|
|
284
|
+
* @param {Identifier} recovery_identifier
|
|
262
285
|
* @param {string} inbox_id
|
|
263
|
-
* @param {
|
|
264
|
-
* @
|
|
265
|
-
* @param {Uint8Array | null} [encryption_key]
|
|
266
|
-
* @param {string | null} [device_sync_server_url]
|
|
267
|
-
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
268
|
-
* @param {LogOptions | null} [log_options]
|
|
269
|
-
* @param {boolean | null} [allow_offline]
|
|
270
|
-
* @param {boolean | null} [disable_events]
|
|
271
|
-
* @param {string | null} [app_version]
|
|
272
|
-
* @param {string | null} [gateway_host]
|
|
273
|
-
* @returns {Promise<Client>}
|
|
286
|
+
* @param {Uint8Array[]} installation_ids
|
|
287
|
+
* @returns {SignatureRequestHandle}
|
|
274
288
|
*/
|
|
275
|
-
export function
|
|
276
|
-
const ptr0 = passStringToWasm0(
|
|
289
|
+
export function revokeInstallationsSignatureRequest(v3_host, gateway_host, recovery_identifier, inbox_id, installation_ids) {
|
|
290
|
+
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
277
291
|
const len0 = WASM_VECTOR_LEN;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if (!isLikeNone(log_options)) {
|
|
286
|
-
_assertClass(log_options, LogOptions);
|
|
287
|
-
ptr4 = log_options.__destroy_into_raw();
|
|
288
|
-
}
|
|
289
|
-
var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
290
|
-
var len5 = WASM_VECTOR_LEN;
|
|
291
|
-
var ptr6 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
|
-
var len6 = WASM_VECTOR_LEN;
|
|
293
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0, isLikeNone(disable_events) ? 0xFFFFFF : disable_events ? 1 : 0, ptr5, len5, ptr6, len6);
|
|
294
|
-
return ret;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
299
|
-
* @returns {Uint8Array}
|
|
300
|
-
*/
|
|
301
|
-
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
302
|
-
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
303
|
-
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
304
|
-
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
292
|
+
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
var len1 = WASM_VECTOR_LEN;
|
|
294
|
+
const ptr2 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len2 = WASM_VECTOR_LEN;
|
|
296
|
+
const ptr3 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
297
|
+
const len3 = WASM_VECTOR_LEN;
|
|
298
|
+
const ret = wasm.revokeInstallationsSignatureRequest(ptr0, len0, ptr1, len1, recovery_identifier, ptr2, len2, ptr3, len3);
|
|
305
299
|
if (ret[2]) {
|
|
306
300
|
throw takeFromExternrefTable0(ret[1]);
|
|
307
301
|
}
|
|
308
|
-
return
|
|
302
|
+
return SignatureRequestHandle.__wrap(ret[0]);
|
|
309
303
|
}
|
|
310
304
|
|
|
311
305
|
/**
|
|
312
306
|
* @param {Uint8Array} bytes
|
|
313
|
-
* @returns {
|
|
307
|
+
* @returns {Reaction}
|
|
314
308
|
*/
|
|
315
|
-
export function
|
|
316
|
-
const ret = wasm.
|
|
309
|
+
export function decodeReaction(bytes) {
|
|
310
|
+
const ret = wasm.decodeReaction(bytes);
|
|
317
311
|
if (ret[2]) {
|
|
318
312
|
throw takeFromExternrefTable0(ret[1]);
|
|
319
313
|
}
|
|
320
|
-
return
|
|
314
|
+
return Reaction.__wrap(ret[0]);
|
|
321
315
|
}
|
|
322
316
|
|
|
323
317
|
/**
|
|
@@ -334,30 +328,89 @@ export function encodeReaction(reaction) {
|
|
|
334
328
|
return takeFromExternrefTable0(ret[0]);
|
|
335
329
|
}
|
|
336
330
|
|
|
331
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
332
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
333
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
334
|
+
WASM_VECTOR_LEN = arg.length;
|
|
335
|
+
return ptr;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @param {MultiRemoteAttachment} multiRemoteAttachment
|
|
339
|
+
* @returns {Uint8Array}
|
|
340
|
+
*/
|
|
341
|
+
export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
|
|
342
|
+
_assertClass(multiRemoteAttachment, MultiRemoteAttachment);
|
|
343
|
+
var ptr0 = multiRemoteAttachment.__destroy_into_raw();
|
|
344
|
+
const ret = wasm.encodeMultiRemoteAttachment(ptr0);
|
|
345
|
+
if (ret[2]) {
|
|
346
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
347
|
+
}
|
|
348
|
+
return takeFromExternrefTable0(ret[0]);
|
|
349
|
+
}
|
|
350
|
+
|
|
337
351
|
/**
|
|
338
352
|
* @param {Uint8Array} bytes
|
|
339
|
-
* @returns {
|
|
353
|
+
* @returns {MultiRemoteAttachment}
|
|
340
354
|
*/
|
|
341
|
-
export function
|
|
342
|
-
const ret = wasm.
|
|
355
|
+
export function decodeMultiRemoteAttachment(bytes) {
|
|
356
|
+
const ret = wasm.decodeMultiRemoteAttachment(bytes);
|
|
343
357
|
if (ret[2]) {
|
|
344
358
|
throw takeFromExternrefTable0(ret[1]);
|
|
345
359
|
}
|
|
346
|
-
return
|
|
360
|
+
return MultiRemoteAttachment.__wrap(ret[0]);
|
|
347
361
|
}
|
|
348
362
|
|
|
349
363
|
/**
|
|
350
364
|
* @param {string} v3_host
|
|
351
365
|
* @param {string | null | undefined} gateway_host
|
|
352
|
-
* @param {
|
|
353
|
-
* @returns {Promise<
|
|
366
|
+
* @param {string[]} inbox_ids
|
|
367
|
+
* @returns {Promise<InboxState[]>}
|
|
354
368
|
*/
|
|
355
|
-
export function
|
|
369
|
+
export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
|
|
356
370
|
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
357
371
|
const len0 = WASM_VECTOR_LEN;
|
|
358
372
|
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
359
373
|
var len1 = WASM_VECTOR_LEN;
|
|
360
|
-
const
|
|
374
|
+
const ptr2 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
375
|
+
const len2 = WASM_VECTOR_LEN;
|
|
376
|
+
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
377
|
+
return ret;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @param {string} host
|
|
382
|
+
* @param {string} inbox_id
|
|
383
|
+
* @param {Identifier} account_identifier
|
|
384
|
+
* @param {string | null} [db_path]
|
|
385
|
+
* @param {Uint8Array | null} [encryption_key]
|
|
386
|
+
* @param {string | null} [device_sync_server_url]
|
|
387
|
+
* @param {DeviceSyncWorkerMode | null} [device_sync_worker_mode]
|
|
388
|
+
* @param {LogOptions | null} [log_options]
|
|
389
|
+
* @param {boolean | null} [allow_offline]
|
|
390
|
+
* @param {boolean | null} [disable_events]
|
|
391
|
+
* @param {string | null} [app_version]
|
|
392
|
+
* @param {string | null} [gateway_host]
|
|
393
|
+
* @returns {Promise<Client>}
|
|
394
|
+
*/
|
|
395
|
+
export function createClient(host, inbox_id, account_identifier, db_path, encryption_key, device_sync_server_url, device_sync_worker_mode, log_options, allow_offline, disable_events, app_version, gateway_host) {
|
|
396
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
397
|
+
const len0 = WASM_VECTOR_LEN;
|
|
398
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
399
|
+
const len1 = WASM_VECTOR_LEN;
|
|
400
|
+
var ptr2 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
401
|
+
var len2 = WASM_VECTOR_LEN;
|
|
402
|
+
var ptr3 = isLikeNone(device_sync_server_url) ? 0 : passStringToWasm0(device_sync_server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
403
|
+
var len3 = WASM_VECTOR_LEN;
|
|
404
|
+
let ptr4 = 0;
|
|
405
|
+
if (!isLikeNone(log_options)) {
|
|
406
|
+
_assertClass(log_options, LogOptions);
|
|
407
|
+
ptr4 = log_options.__destroy_into_raw();
|
|
408
|
+
}
|
|
409
|
+
var ptr5 = isLikeNone(app_version) ? 0 : passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
410
|
+
var len5 = WASM_VECTOR_LEN;
|
|
411
|
+
var ptr6 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
412
|
+
var len6 = WASM_VECTOR_LEN;
|
|
413
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, account_identifier, ptr2, len2, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr3, len3, isLikeNone(device_sync_worker_mode) ? 3 : ((__wbindgen_enum_DeviceSyncWorkerMode.indexOf(device_sync_worker_mode) + 1 || 3) - 1), ptr4, isLikeNone(allow_offline) ? 0xFFFFFF : allow_offline ? 1 : 0, isLikeNone(disable_events) ? 0xFFFFFF : disable_events ? 1 : 0, ptr5, len5, ptr6, len6);
|
|
361
414
|
return ret;
|
|
362
415
|
}
|
|
363
416
|
|
|
@@ -387,71 +440,15 @@ export function generateInboxId(accountIdentifier) {
|
|
|
387
440
|
/**
|
|
388
441
|
* @param {string} v3_host
|
|
389
442
|
* @param {string | null | undefined} gateway_host
|
|
390
|
-
* @param {
|
|
391
|
-
* @returns {Promise<
|
|
392
|
-
*/
|
|
393
|
-
export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
|
|
394
|
-
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
395
|
-
const len0 = WASM_VECTOR_LEN;
|
|
396
|
-
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
397
|
-
var len1 = WASM_VECTOR_LEN;
|
|
398
|
-
const ptr2 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
399
|
-
const len2 = WASM_VECTOR_LEN;
|
|
400
|
-
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
401
|
-
return ret;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* @param {string} signature_text
|
|
406
|
-
* @param {Uint8Array} signature_bytes
|
|
407
|
-
* @param {Uint8Array} public_key
|
|
408
|
-
*/
|
|
409
|
-
export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
|
|
410
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
411
|
-
const len0 = WASM_VECTOR_LEN;
|
|
412
|
-
const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
|
|
413
|
-
if (ret[1]) {
|
|
414
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* @param {string} v3_host
|
|
420
|
-
* @param {string | null | undefined} gateway_host
|
|
421
|
-
* @param {Identifier} recovery_identifier
|
|
422
|
-
* @param {string} inbox_id
|
|
423
|
-
* @param {Uint8Array[]} installation_ids
|
|
424
|
-
* @returns {SignatureRequestHandle}
|
|
425
|
-
*/
|
|
426
|
-
export function revokeInstallationsSignatureRequest(v3_host, gateway_host, recovery_identifier, inbox_id, installation_ids) {
|
|
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 ptr2 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
432
|
-
const len2 = WASM_VECTOR_LEN;
|
|
433
|
-
const ptr3 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
434
|
-
const len3 = WASM_VECTOR_LEN;
|
|
435
|
-
const ret = wasm.revokeInstallationsSignatureRequest(ptr0, len0, ptr1, len1, recovery_identifier, ptr2, len2, ptr3, len3);
|
|
436
|
-
if (ret[2]) {
|
|
437
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
438
|
-
}
|
|
439
|
-
return SignatureRequestHandle.__wrap(ret[0]);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* @param {string} v3_host
|
|
444
|
-
* @param {string | null | undefined} gateway_host
|
|
445
|
-
* @param {SignatureRequestHandle} signature_request
|
|
446
|
-
* @returns {Promise<void>}
|
|
443
|
+
* @param {Identifier} accountIdentifier
|
|
444
|
+
* @returns {Promise<string | undefined>}
|
|
447
445
|
*/
|
|
448
|
-
export function
|
|
446
|
+
export function getInboxIdForIdentifier(v3_host, gateway_host, accountIdentifier) {
|
|
449
447
|
const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
450
448
|
const len0 = WASM_VECTOR_LEN;
|
|
451
449
|
var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
452
450
|
var len1 = WASM_VECTOR_LEN;
|
|
453
|
-
|
|
454
|
-
const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
|
|
451
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
|
|
455
452
|
return ret;
|
|
456
453
|
}
|
|
457
454
|
|
|
@@ -466,24 +463,24 @@ export function task_worker_entry_point(ptr) {
|
|
|
466
463
|
}
|
|
467
464
|
}
|
|
468
465
|
|
|
469
|
-
function
|
|
470
|
-
wasm.
|
|
466
|
+
function __wbg_adapter_12(arg0, arg1) {
|
|
467
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h02b2793523eb74f0(arg0, arg1);
|
|
471
468
|
}
|
|
472
469
|
|
|
473
470
|
function __wbg_adapter_19(arg0, arg1) {
|
|
474
|
-
wasm.
|
|
471
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h8d77716d6e2e4cde(arg0, arg1);
|
|
475
472
|
}
|
|
476
473
|
|
|
477
|
-
function
|
|
478
|
-
wasm.
|
|
474
|
+
function __wbg_adapter_24(arg0, arg1) {
|
|
475
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h1b0aee6a11857ece(arg0, arg1);
|
|
479
476
|
}
|
|
480
477
|
|
|
481
|
-
function __wbg_adapter_35(arg0, arg1) {
|
|
482
|
-
wasm.
|
|
478
|
+
function __wbg_adapter_35(arg0, arg1, arg2) {
|
|
479
|
+
wasm.closure7210_externref_shim(arg0, arg1, arg2);
|
|
483
480
|
}
|
|
484
481
|
|
|
485
|
-
function
|
|
486
|
-
wasm.
|
|
482
|
+
function __wbg_adapter_848(arg0, arg1, arg2, arg3) {
|
|
483
|
+
wasm.closure8166_externref_shim(arg0, arg1, arg2, arg3);
|
|
487
484
|
}
|
|
488
485
|
|
|
489
486
|
/**
|
|
@@ -534,13 +531,14 @@ export const DeliveryStatus = Object.freeze({
|
|
|
534
531
|
Failed: 2, "2": "Failed",
|
|
535
532
|
});
|
|
536
533
|
/**
|
|
537
|
-
* @enum {0 | 1 | 2 | 3}
|
|
534
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
538
535
|
*/
|
|
539
536
|
export const GroupMembershipState = Object.freeze({
|
|
540
537
|
Allowed: 0, "0": "Allowed",
|
|
541
538
|
Rejected: 1, "1": "Rejected",
|
|
542
539
|
Pending: 2, "2": "Pending",
|
|
543
540
|
Restored: 3, "3": "Restored",
|
|
541
|
+
PendingRemove: 4, "4": "PendingRemove",
|
|
544
542
|
});
|
|
545
543
|
/**
|
|
546
544
|
* @enum {0 | 1}
|
|
@@ -916,200 +914,119 @@ export class Client {
|
|
|
916
914
|
wasm.__wbg_client_free(ptr, 0);
|
|
917
915
|
}
|
|
918
916
|
/**
|
|
919
|
-
* @
|
|
917
|
+
* @param {SignatureRequestHandle} signature_request
|
|
918
|
+
* @returns {Promise<void>}
|
|
920
919
|
*/
|
|
921
|
-
|
|
922
|
-
|
|
920
|
+
registerIdentity(signature_request) {
|
|
921
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
922
|
+
var ptr0 = signature_request.__destroy_into_raw();
|
|
923
|
+
const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
|
|
923
924
|
return ret;
|
|
924
925
|
}
|
|
925
926
|
/**
|
|
926
|
-
* @
|
|
927
|
+
* @param {SignatureRequestHandle} signature_request
|
|
928
|
+
* @returns {Promise<void>}
|
|
927
929
|
*/
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
try {
|
|
932
|
-
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
933
|
-
deferred1_0 = ret[0];
|
|
934
|
-
deferred1_1 = ret[1];
|
|
935
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
936
|
-
} finally {
|
|
937
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* @returns {boolean}
|
|
942
|
-
*/
|
|
943
|
-
get isRegistered() {
|
|
944
|
-
const ret = wasm.client_isRegistered(this.__wbg_ptr);
|
|
945
|
-
return ret !== 0;
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* @returns {string}
|
|
949
|
-
*/
|
|
950
|
-
get installationId() {
|
|
951
|
-
let deferred1_0;
|
|
952
|
-
let deferred1_1;
|
|
953
|
-
try {
|
|
954
|
-
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
955
|
-
deferred1_0 = ret[0];
|
|
956
|
-
deferred1_1 = ret[1];
|
|
957
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
958
|
-
} finally {
|
|
959
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
/**
|
|
963
|
-
* @returns {Uint8Array}
|
|
964
|
-
*/
|
|
965
|
-
get installationIdBytes() {
|
|
966
|
-
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
930
|
+
applySignatureRequest(signature_request) {
|
|
931
|
+
_assertClass(signature_request, SignatureRequestHandle);
|
|
932
|
+
const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
|
|
967
933
|
return ret;
|
|
968
934
|
}
|
|
969
935
|
/**
|
|
970
|
-
* @
|
|
936
|
+
* @param {string} signature_text
|
|
937
|
+
* @returns {Uint8Array}
|
|
971
938
|
*/
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
deferred1_1 = ret[1];
|
|
979
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
980
|
-
} finally {
|
|
981
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
939
|
+
signWithInstallationKey(signature_text) {
|
|
940
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
941
|
+
const len0 = WASM_VECTOR_LEN;
|
|
942
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
943
|
+
if (ret[2]) {
|
|
944
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
982
945
|
}
|
|
946
|
+
return takeFromExternrefTable0(ret[0]);
|
|
983
947
|
}
|
|
984
948
|
/**
|
|
985
|
-
* @returns {
|
|
949
|
+
* @returns {SignatureRequestHandle | undefined}
|
|
986
950
|
*/
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
const ret = wasm.client_libxmtpVersion(this.__wbg_ptr);
|
|
992
|
-
deferred1_0 = ret[0];
|
|
993
|
-
deferred1_1 = ret[1];
|
|
994
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
995
|
-
} finally {
|
|
996
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
951
|
+
createInboxSignatureRequest() {
|
|
952
|
+
const ret = wasm.client_createInboxSignatureRequest(this.__wbg_ptr);
|
|
953
|
+
if (ret[2]) {
|
|
954
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
997
955
|
}
|
|
956
|
+
return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
|
|
998
957
|
}
|
|
999
958
|
/**
|
|
1000
|
-
*
|
|
1001
|
-
* @
|
|
1002
|
-
* @returns {Promise<any>}
|
|
1003
|
-
*/
|
|
1004
|
-
canMessage(account_identifiers) {
|
|
1005
|
-
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1006
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1007
|
-
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
1008
|
-
return ret;
|
|
1009
|
-
}
|
|
1010
|
-
/**
|
|
1011
|
-
* @returns {Promise<void>}
|
|
959
|
+
* @param {Identifier} new_identifier
|
|
960
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
1012
961
|
*/
|
|
1013
|
-
|
|
1014
|
-
const ret = wasm.
|
|
962
|
+
addWalletSignatureRequest(new_identifier) {
|
|
963
|
+
const ret = wasm.client_addWalletSignatureRequest(this.__wbg_ptr, new_identifier);
|
|
1015
964
|
return ret;
|
|
1016
965
|
}
|
|
1017
966
|
/**
|
|
1018
967
|
* @param {Identifier} identifier
|
|
1019
|
-
* @returns {Promise<
|
|
968
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
1020
969
|
*/
|
|
1021
|
-
|
|
1022
|
-
const ret = wasm.
|
|
970
|
+
revokeWalletSignatureRequest(identifier) {
|
|
971
|
+
const ret = wasm.client_revokeWalletSignatureRequest(this.__wbg_ptr, identifier);
|
|
1023
972
|
return ret;
|
|
1024
973
|
}
|
|
1025
974
|
/**
|
|
1026
|
-
* @param {string
|
|
1027
|
-
* @param {
|
|
1028
|
-
* @returns {Promise<InboxState[]>}
|
|
975
|
+
* @param {string} signature_text
|
|
976
|
+
* @param {Uint8Array} signature_bytes
|
|
1029
977
|
*/
|
|
1030
|
-
|
|
1031
|
-
const ptr0 =
|
|
978
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
979
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1032
980
|
const len0 = WASM_VECTOR_LEN;
|
|
1033
|
-
const ret = wasm.
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
* @returns {Conversations}
|
|
1038
|
-
*/
|
|
1039
|
-
conversations() {
|
|
1040
|
-
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
1041
|
-
return Conversations.__wrap(ret);
|
|
981
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
982
|
+
if (ret[1]) {
|
|
983
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
984
|
+
}
|
|
1042
985
|
}
|
|
1043
986
|
/**
|
|
1044
|
-
* @
|
|
987
|
+
* @param {Uint8Array[]} installation_ids
|
|
988
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
1045
989
|
*/
|
|
1046
|
-
|
|
1047
|
-
const
|
|
990
|
+
revokeInstallationsSignatureRequest(installation_ids) {
|
|
991
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
992
|
+
const len0 = WASM_VECTOR_LEN;
|
|
993
|
+
const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
|
|
1048
994
|
return ret;
|
|
1049
995
|
}
|
|
1050
996
|
/**
|
|
1051
|
-
* @
|
|
1052
|
-
|
|
1053
|
-
apiStatistics() {
|
|
1054
|
-
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
1055
|
-
return ApiStats.__wrap(ret);
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
* @returns {IdentityStats}
|
|
1059
|
-
*/
|
|
1060
|
-
apiIdentityStatistics() {
|
|
1061
|
-
const ret = wasm.client_apiIdentityStatistics(this.__wbg_ptr);
|
|
1062
|
-
return IdentityStats.__wrap(ret);
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* @returns {string}
|
|
997
|
+
* @param {Identifier} new_recovery_identifier
|
|
998
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
1066
999
|
*/
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
try {
|
|
1071
|
-
const ret = wasm.client_apiAggregateStatistics(this.__wbg_ptr);
|
|
1072
|
-
deferred1_0 = ret[0];
|
|
1073
|
-
deferred1_1 = ret[1];
|
|
1074
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1075
|
-
} finally {
|
|
1076
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
clearAllStatistics() {
|
|
1080
|
-
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
1000
|
+
changeRecoveryIdentifierSignatureRequest(new_recovery_identifier) {
|
|
1001
|
+
const ret = wasm.client_changeRecoveryIdentifierSignatureRequest(this.__wbg_ptr, new_recovery_identifier);
|
|
1002
|
+
return ret;
|
|
1081
1003
|
}
|
|
1082
1004
|
/**
|
|
1083
|
-
* @
|
|
1084
|
-
* @returns {Promise<string>}
|
|
1005
|
+
* @returns {Promise<SignatureRequestHandle>}
|
|
1085
1006
|
*/
|
|
1086
|
-
|
|
1087
|
-
const
|
|
1088
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1089
|
-
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
1007
|
+
revokeAllOtherInstallationsSignatureRequest() {
|
|
1008
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
|
|
1090
1009
|
return ret;
|
|
1091
1010
|
}
|
|
1092
1011
|
/**
|
|
1093
|
-
* @param {
|
|
1094
|
-
* @
|
|
1012
|
+
* @param {ConsentEntityType} entity_type
|
|
1013
|
+
* @param {string} entity
|
|
1014
|
+
* @returns {Promise<ConsentState>}
|
|
1095
1015
|
*/
|
|
1096
|
-
|
|
1097
|
-
const ptr0 =
|
|
1016
|
+
getConsentState(entity_type, entity) {
|
|
1017
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1098
1018
|
const len0 = WASM_VECTOR_LEN;
|
|
1099
|
-
const ret = wasm.
|
|
1100
|
-
|
|
1101
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1102
|
-
}
|
|
1103
|
-
return ret[0] >>> 0;
|
|
1019
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
1020
|
+
return ret;
|
|
1104
1021
|
}
|
|
1105
1022
|
/**
|
|
1106
|
-
* @param {
|
|
1107
|
-
* @returns {Promise<
|
|
1023
|
+
* @param {Consent[]} records
|
|
1024
|
+
* @returns {Promise<void>}
|
|
1108
1025
|
*/
|
|
1109
|
-
|
|
1110
|
-
const ptr0 =
|
|
1026
|
+
setConsentStates(records) {
|
|
1027
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
1111
1028
|
const len0 = WASM_VECTOR_LEN;
|
|
1112
|
-
const ret = wasm.
|
|
1029
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
1113
1030
|
return ret;
|
|
1114
1031
|
}
|
|
1115
1032
|
/**
|
|
@@ -1152,121 +1069,202 @@ export class Client {
|
|
|
1152
1069
|
return ret;
|
|
1153
1070
|
}
|
|
1154
1071
|
/**
|
|
1155
|
-
* @returns {
|
|
1072
|
+
* @returns {string}
|
|
1156
1073
|
*/
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1074
|
+
get appVersion() {
|
|
1075
|
+
let deferred1_0;
|
|
1076
|
+
let deferred1_1;
|
|
1077
|
+
try {
|
|
1078
|
+
const ret = wasm.client_appVersion(this.__wbg_ptr);
|
|
1079
|
+
deferred1_0 = ret[0];
|
|
1080
|
+
deferred1_1 = ret[1];
|
|
1081
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1082
|
+
} finally {
|
|
1083
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1161
1084
|
}
|
|
1162
|
-
return ret[0] === 0 ? undefined : SignatureRequestHandle.__wrap(ret[0]);
|
|
1163
1085
|
}
|
|
1164
1086
|
/**
|
|
1165
|
-
*
|
|
1166
|
-
* @
|
|
1087
|
+
* Output booleans should be zipped with the index of input identifiers
|
|
1088
|
+
* @param {Identifier[]} account_identifiers
|
|
1089
|
+
* @returns {Promise<any>}
|
|
1167
1090
|
*/
|
|
1168
|
-
|
|
1169
|
-
const
|
|
1091
|
+
canMessage(account_identifiers) {
|
|
1092
|
+
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1093
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1094
|
+
const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
|
|
1170
1095
|
return ret;
|
|
1171
1096
|
}
|
|
1172
1097
|
/**
|
|
1173
|
-
* @
|
|
1174
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1098
|
+
* @returns {Conversations}
|
|
1175
1099
|
*/
|
|
1176
|
-
|
|
1177
|
-
const ret = wasm.
|
|
1178
|
-
return ret;
|
|
1100
|
+
conversations() {
|
|
1101
|
+
const ret = wasm.client_conversations(this.__wbg_ptr);
|
|
1102
|
+
return Conversations.__wrap(ret);
|
|
1179
1103
|
}
|
|
1180
1104
|
/**
|
|
1181
|
-
* @returns {
|
|
1105
|
+
* @returns {boolean}
|
|
1182
1106
|
*/
|
|
1183
|
-
|
|
1184
|
-
const ret = wasm.
|
|
1185
|
-
return ret;
|
|
1107
|
+
get isRegistered() {
|
|
1108
|
+
const ret = wasm.client_isRegistered(this.__wbg_ptr);
|
|
1109
|
+
return ret !== 0;
|
|
1186
1110
|
}
|
|
1187
1111
|
/**
|
|
1188
|
-
* @
|
|
1189
|
-
* @returns {Promise<SignatureRequestHandle>}
|
|
1112
|
+
* @returns {ApiStats}
|
|
1190
1113
|
*/
|
|
1191
|
-
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1194
|
-
const ret = wasm.client_revokeInstallationsSignatureRequest(this.__wbg_ptr, ptr0, len0);
|
|
1195
|
-
return ret;
|
|
1114
|
+
apiStatistics() {
|
|
1115
|
+
const ret = wasm.client_apiStatistics(this.__wbg_ptr);
|
|
1116
|
+
return ApiStats.__wrap(ret);
|
|
1196
1117
|
}
|
|
1197
1118
|
/**
|
|
1198
|
-
* @param {
|
|
1199
|
-
* @returns {
|
|
1119
|
+
* @param {Uint8Array} message_id
|
|
1120
|
+
* @returns {number}
|
|
1200
1121
|
*/
|
|
1201
|
-
|
|
1202
|
-
const
|
|
1122
|
+
deleteMessage(message_id) {
|
|
1123
|
+
const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
|
|
1124
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1125
|
+
const ret = wasm.client_deleteMessage(this.__wbg_ptr, ptr0, len0);
|
|
1126
|
+
if (ret[2]) {
|
|
1127
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1128
|
+
}
|
|
1129
|
+
return ret[0] >>> 0;
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* @returns {string}
|
|
1133
|
+
*/
|
|
1134
|
+
get installationId() {
|
|
1135
|
+
let deferred1_0;
|
|
1136
|
+
let deferred1_1;
|
|
1137
|
+
try {
|
|
1138
|
+
const ret = wasm.client_installationId(this.__wbg_ptr);
|
|
1139
|
+
deferred1_0 = ret[0];
|
|
1140
|
+
deferred1_1 = ret[1];
|
|
1141
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1142
|
+
} finally {
|
|
1143
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* @returns {string}
|
|
1148
|
+
*/
|
|
1149
|
+
get libxmtpVersion() {
|
|
1150
|
+
let deferred1_0;
|
|
1151
|
+
let deferred1_1;
|
|
1152
|
+
try {
|
|
1153
|
+
const ret = wasm.client_libxmtpVersion(this.__wbg_ptr);
|
|
1154
|
+
deferred1_0 = ret[0];
|
|
1155
|
+
deferred1_1 = ret[1];
|
|
1156
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1157
|
+
} finally {
|
|
1158
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* @param {Uint8Array} message_id
|
|
1163
|
+
* @returns {Promise<DecodedMessage>}
|
|
1164
|
+
*/
|
|
1165
|
+
messageV2(message_id) {
|
|
1166
|
+
const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
|
|
1167
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1168
|
+
const ret = wasm.client_messageV2(this.__wbg_ptr, ptr0, len0);
|
|
1203
1169
|
return ret;
|
|
1204
1170
|
}
|
|
1205
1171
|
/**
|
|
1206
|
-
* @
|
|
1207
|
-
* @returns {Promise<void>}
|
|
1172
|
+
* @returns {Promise<GroupSyncSummary>}
|
|
1208
1173
|
*/
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
|
|
1174
|
+
syncPreferences() {
|
|
1175
|
+
const ret = wasm.client_syncPreferences(this.__wbg_ptr);
|
|
1212
1176
|
return ret;
|
|
1213
1177
|
}
|
|
1214
1178
|
/**
|
|
1215
|
-
* @param {SignatureRequestHandle} signature_request
|
|
1216
1179
|
* @returns {Promise<void>}
|
|
1217
1180
|
*/
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
var ptr0 = signature_request.__destroy_into_raw();
|
|
1221
|
-
const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
|
|
1181
|
+
sendSyncRequest() {
|
|
1182
|
+
const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
|
|
1222
1183
|
return ret;
|
|
1223
1184
|
}
|
|
1224
1185
|
/**
|
|
1225
|
-
* @
|
|
1226
|
-
* @returns {Uint8Array}
|
|
1186
|
+
* @returns {Identifier}
|
|
1227
1187
|
*/
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
}
|
|
1235
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1188
|
+
get accountIdentifier() {
|
|
1189
|
+
const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
|
|
1190
|
+
return ret;
|
|
1191
|
+
}
|
|
1192
|
+
clearAllStatistics() {
|
|
1193
|
+
wasm.client_clearAllStatistics(this.__wbg_ptr);
|
|
1236
1194
|
}
|
|
1237
1195
|
/**
|
|
1238
|
-
* @param {string}
|
|
1239
|
-
* @
|
|
1196
|
+
* @param {string} server_url
|
|
1197
|
+
* @returns {Promise<string>}
|
|
1240
1198
|
*/
|
|
1241
|
-
|
|
1242
|
-
const ptr0 = passStringToWasm0(
|
|
1199
|
+
uploadDebugArchive(server_url) {
|
|
1200
|
+
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1243
1201
|
const len0 = WASM_VECTOR_LEN;
|
|
1244
|
-
const ret = wasm.
|
|
1245
|
-
|
|
1246
|
-
|
|
1202
|
+
const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
|
|
1203
|
+
return ret;
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* @returns {Uint8Array}
|
|
1207
|
+
*/
|
|
1208
|
+
get installationIdBytes() {
|
|
1209
|
+
const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
|
|
1210
|
+
return ret;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @returns {IdentityStats}
|
|
1214
|
+
*/
|
|
1215
|
+
apiIdentityStatistics() {
|
|
1216
|
+
const ret = wasm.client_apiIdentityStatistics(this.__wbg_ptr);
|
|
1217
|
+
return IdentityStats.__wrap(ret);
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* @returns {string}
|
|
1221
|
+
*/
|
|
1222
|
+
apiAggregateStatistics() {
|
|
1223
|
+
let deferred1_0;
|
|
1224
|
+
let deferred1_1;
|
|
1225
|
+
try {
|
|
1226
|
+
const ret = wasm.client_apiAggregateStatistics(this.__wbg_ptr);
|
|
1227
|
+
deferred1_0 = ret[0];
|
|
1228
|
+
deferred1_1 = ret[1];
|
|
1229
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1230
|
+
} finally {
|
|
1231
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1247
1232
|
}
|
|
1248
1233
|
}
|
|
1249
1234
|
/**
|
|
1250
|
-
* @param {
|
|
1251
|
-
* @
|
|
1235
|
+
* @param {string[]} inbox_ids
|
|
1236
|
+
* @param {boolean} refresh_from_network
|
|
1237
|
+
* @returns {Promise<InboxState[]>}
|
|
1252
1238
|
*/
|
|
1253
|
-
|
|
1254
|
-
const ptr0 = passArrayJsValueToWasm0(
|
|
1239
|
+
inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
|
|
1240
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1255
1241
|
const len0 = WASM_VECTOR_LEN;
|
|
1256
|
-
const ret = wasm.
|
|
1242
|
+
const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
|
|
1257
1243
|
return ret;
|
|
1258
1244
|
}
|
|
1259
1245
|
/**
|
|
1260
|
-
* @param {
|
|
1261
|
-
* @
|
|
1262
|
-
* @returns {Promise<ConsentState>}
|
|
1246
|
+
* @param {Identifier} identifier
|
|
1247
|
+
* @returns {Promise<string | undefined>}
|
|
1263
1248
|
*/
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1266
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1267
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
1249
|
+
findInboxIdByIdentifier(identifier) {
|
|
1250
|
+
const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
|
|
1268
1251
|
return ret;
|
|
1269
1252
|
}
|
|
1253
|
+
/**
|
|
1254
|
+
* @returns {string}
|
|
1255
|
+
*/
|
|
1256
|
+
get inboxId() {
|
|
1257
|
+
let deferred1_0;
|
|
1258
|
+
let deferred1_1;
|
|
1259
|
+
try {
|
|
1260
|
+
const ret = wasm.client_inboxId(this.__wbg_ptr);
|
|
1261
|
+
deferred1_0 = ret[0];
|
|
1262
|
+
deferred1_1 = ret[1];
|
|
1263
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1264
|
+
} finally {
|
|
1265
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1270
1268
|
}
|
|
1271
1269
|
if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
|
|
1272
1270
|
|
|
@@ -1341,7 +1339,7 @@ export class Consent {
|
|
|
1341
1339
|
set entity(arg0) {
|
|
1342
1340
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1343
1341
|
const len0 = WASM_VECTOR_LEN;
|
|
1344
|
-
wasm.
|
|
1342
|
+
wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
|
|
1345
1343
|
}
|
|
1346
1344
|
/**
|
|
1347
1345
|
* @param {ConsentEntityType} entity_type
|
|
@@ -1384,6 +1382,22 @@ export class ContentTypeId {
|
|
|
1384
1382
|
const ptr = this.__destroy_into_raw();
|
|
1385
1383
|
wasm.__wbg_contenttypeid_free(ptr, 0);
|
|
1386
1384
|
}
|
|
1385
|
+
/**
|
|
1386
|
+
* @param {string} authority_id
|
|
1387
|
+
* @param {string} type_id
|
|
1388
|
+
* @param {number} version_major
|
|
1389
|
+
* @param {number} version_minor
|
|
1390
|
+
*/
|
|
1391
|
+
constructor(authority_id, type_id, version_major, version_minor) {
|
|
1392
|
+
const ptr0 = passStringToWasm0(authority_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1393
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1394
|
+
const ptr1 = passStringToWasm0(type_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1395
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1396
|
+
const ret = wasm.contenttypeid_new(ptr0, len0, ptr1, len1, version_major, version_minor);
|
|
1397
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1398
|
+
ContentTypeIdFinalization.register(this, this.__wbg_ptr, this);
|
|
1399
|
+
return this;
|
|
1400
|
+
}
|
|
1387
1401
|
/**
|
|
1388
1402
|
* @returns {string}
|
|
1389
1403
|
*/
|
|
@@ -1405,7 +1419,7 @@ export class ContentTypeId {
|
|
|
1405
1419
|
set authorityId(arg0) {
|
|
1406
1420
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1407
1421
|
const len0 = WASM_VECTOR_LEN;
|
|
1408
|
-
wasm.
|
|
1422
|
+
wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
|
|
1409
1423
|
}
|
|
1410
1424
|
/**
|
|
1411
1425
|
* @returns {string}
|
|
@@ -1428,7 +1442,7 @@ export class ContentTypeId {
|
|
|
1428
1442
|
set typeId(arg0) {
|
|
1429
1443
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1430
1444
|
const len0 = WASM_VECTOR_LEN;
|
|
1431
|
-
wasm.
|
|
1445
|
+
wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
|
|
1432
1446
|
}
|
|
1433
1447
|
/**
|
|
1434
1448
|
* @returns {number}
|
|
@@ -1456,22 +1470,6 @@ export class ContentTypeId {
|
|
|
1456
1470
|
set versionMinor(arg0) {
|
|
1457
1471
|
wasm.__wbg_set_contenttypeid_versionMinor(this.__wbg_ptr, arg0);
|
|
1458
1472
|
}
|
|
1459
|
-
/**
|
|
1460
|
-
* @param {string} authority_id
|
|
1461
|
-
* @param {string} type_id
|
|
1462
|
-
* @param {number} version_major
|
|
1463
|
-
* @param {number} version_minor
|
|
1464
|
-
*/
|
|
1465
|
-
constructor(authority_id, type_id, version_major, version_minor) {
|
|
1466
|
-
const ptr0 = passStringToWasm0(authority_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1467
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1468
|
-
const ptr1 = passStringToWasm0(type_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1469
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1470
|
-
const ret = wasm.contenttypeid_new(ptr0, len0, ptr1, len1, version_major, version_minor);
|
|
1471
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1472
|
-
ContentTypeIdFinalization.register(this, this.__wbg_ptr, this);
|
|
1473
|
-
return this;
|
|
1474
|
-
}
|
|
1475
1473
|
}
|
|
1476
1474
|
if (Symbol.dispose) ContentTypeId.prototype[Symbol.dispose] = ContentTypeId.prototype.free;
|
|
1477
1475
|
|
|
@@ -1501,93 +1499,77 @@ export class Conversation {
|
|
|
1501
1499
|
wasm.__wbg_conversation_free(ptr, 0);
|
|
1502
1500
|
}
|
|
1503
1501
|
/**
|
|
1504
|
-
* @returns {
|
|
1502
|
+
* @returns {string[]}
|
|
1505
1503
|
*/
|
|
1506
|
-
|
|
1507
|
-
const ret = wasm.
|
|
1508
|
-
if (ret[
|
|
1509
|
-
throw takeFromExternrefTable0(ret[
|
|
1504
|
+
adminList() {
|
|
1505
|
+
const ret = wasm.conversation_adminList(this.__wbg_ptr);
|
|
1506
|
+
if (ret[3]) {
|
|
1507
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1510
1508
|
}
|
|
1511
|
-
|
|
1509
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1510
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1511
|
+
return v1;
|
|
1512
1512
|
}
|
|
1513
1513
|
/**
|
|
1514
|
-
* @
|
|
1514
|
+
* @returns {Promise<any>}
|
|
1515
1515
|
*/
|
|
1516
|
-
|
|
1517
|
-
const ret = wasm.
|
|
1518
|
-
|
|
1519
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1520
|
-
}
|
|
1516
|
+
getDebugInfo() {
|
|
1517
|
+
const ret = wasm.conversation_getDebugInfo(this.__wbg_ptr);
|
|
1518
|
+
return ret;
|
|
1521
1519
|
}
|
|
1522
1520
|
/**
|
|
1523
1521
|
* @returns {string}
|
|
1524
1522
|
*/
|
|
1525
|
-
|
|
1526
|
-
let
|
|
1527
|
-
let
|
|
1523
|
+
groupName() {
|
|
1524
|
+
let deferred2_0;
|
|
1525
|
+
let deferred2_1;
|
|
1528
1526
|
try {
|
|
1529
|
-
const ret = wasm.
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1527
|
+
const ret = wasm.conversation_groupName(this.__wbg_ptr);
|
|
1528
|
+
var ptr1 = ret[0];
|
|
1529
|
+
var len1 = ret[1];
|
|
1530
|
+
if (ret[3]) {
|
|
1531
|
+
ptr1 = 0; len1 = 0;
|
|
1532
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1533
|
+
}
|
|
1534
|
+
deferred2_0 = ptr1;
|
|
1535
|
+
deferred2_1 = len1;
|
|
1536
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1533
1537
|
} finally {
|
|
1534
|
-
wasm.__wbindgen_free(
|
|
1538
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1535
1539
|
}
|
|
1536
1540
|
}
|
|
1537
1541
|
/**
|
|
1538
|
-
* @param {
|
|
1539
|
-
* @
|
|
1540
|
-
* @returns {Promise<string>}
|
|
1542
|
+
* @param {Identifier[]} account_identifiers
|
|
1543
|
+
* @returns {Promise<void>}
|
|
1541
1544
|
*/
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
var ptr1 = opts.__destroy_into_raw();
|
|
1547
|
-
const ret = wasm.conversation_send(this.__wbg_ptr, ptr0, ptr1);
|
|
1545
|
+
addMembers(account_identifiers) {
|
|
1546
|
+
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1548
|
+
const ret = wasm.conversation_addMembers(this.__wbg_ptr, ptr0, len0);
|
|
1548
1549
|
return ret;
|
|
1549
1550
|
}
|
|
1550
1551
|
/**
|
|
1551
|
-
*
|
|
1552
|
-
* @param {EncodedContent} encoded_content
|
|
1553
|
-
* @param {SendMessageOpts} opts
|
|
1554
|
-
* @returns {string}
|
|
1552
|
+
* @returns {Promise<any>}
|
|
1555
1553
|
*/
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
try {
|
|
1560
|
-
_assertClass(encoded_content, EncodedContent);
|
|
1561
|
-
var ptr0 = encoded_content.__destroy_into_raw();
|
|
1562
|
-
_assertClass(opts, SendMessageOpts);
|
|
1563
|
-
var ptr1 = opts.__destroy_into_raw();
|
|
1564
|
-
const ret = wasm.conversation_sendOptimistic(this.__wbg_ptr, ptr0, ptr1);
|
|
1565
|
-
var ptr3 = ret[0];
|
|
1566
|
-
var len3 = ret[1];
|
|
1567
|
-
if (ret[3]) {
|
|
1568
|
-
ptr3 = 0; len3 = 0;
|
|
1569
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1570
|
-
}
|
|
1571
|
-
deferred4_0 = ptr3;
|
|
1572
|
-
deferred4_1 = len3;
|
|
1573
|
-
return getStringFromWasm0(ptr3, len3);
|
|
1574
|
-
} finally {
|
|
1575
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1576
|
-
}
|
|
1554
|
+
listMembers() {
|
|
1555
|
+
const ret = wasm.conversation_listMembers(this.__wbg_ptr);
|
|
1556
|
+
return ret;
|
|
1577
1557
|
}
|
|
1578
1558
|
/**
|
|
1579
|
-
*
|
|
1559
|
+
* @param {string} inbox_id
|
|
1580
1560
|
* @returns {Promise<void>}
|
|
1581
1561
|
*/
|
|
1582
|
-
|
|
1583
|
-
const
|
|
1562
|
+
removeAdmin(inbox_id) {
|
|
1563
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1564
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1565
|
+
const ret = wasm.conversation_removeAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1584
1566
|
return ret;
|
|
1585
1567
|
}
|
|
1586
1568
|
/**
|
|
1587
|
-
* @returns {
|
|
1569
|
+
* @returns {bigint}
|
|
1588
1570
|
*/
|
|
1589
|
-
|
|
1590
|
-
const ret = wasm.
|
|
1571
|
+
createdAtNs() {
|
|
1572
|
+
const ret = wasm.conversation_createdAtNs(this.__wbg_ptr);
|
|
1591
1573
|
return ret;
|
|
1592
1574
|
}
|
|
1593
1575
|
/**
|
|
@@ -1604,157 +1586,47 @@ export class Conversation {
|
|
|
1604
1586
|
return ret;
|
|
1605
1587
|
}
|
|
1606
1588
|
/**
|
|
1607
|
-
* @
|
|
1608
|
-
* @returns {Promise<bigint>}
|
|
1589
|
+
* @returns {any}
|
|
1609
1590
|
*/
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
if (
|
|
1613
|
-
|
|
1614
|
-
ptr0 = opts.__destroy_into_raw();
|
|
1591
|
+
getHmacKeys() {
|
|
1592
|
+
const ret = wasm.conversation_getHmacKeys(this.__wbg_ptr);
|
|
1593
|
+
if (ret[2]) {
|
|
1594
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1615
1595
|
}
|
|
1616
|
-
|
|
1617
|
-
return ret;
|
|
1596
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1618
1597
|
}
|
|
1619
1598
|
/**
|
|
1620
1599
|
* @param {ListMessagesOptions | null} [opts]
|
|
1621
|
-
* @returns {Promise<
|
|
1600
|
+
* @returns {Promise<bigint>}
|
|
1622
1601
|
*/
|
|
1623
|
-
|
|
1602
|
+
countMessages(opts) {
|
|
1624
1603
|
let ptr0 = 0;
|
|
1625
1604
|
if (!isLikeNone(opts)) {
|
|
1626
1605
|
_assertClass(opts, ListMessagesOptions);
|
|
1627
1606
|
ptr0 = opts.__destroy_into_raw();
|
|
1628
1607
|
}
|
|
1629
|
-
const ret = wasm.
|
|
1608
|
+
const ret = wasm.conversation_countMessages(this.__wbg_ptr, ptr0);
|
|
1630
1609
|
return ret;
|
|
1631
1610
|
}
|
|
1632
1611
|
/**
|
|
1633
|
-
* @returns {Promise<
|
|
1612
|
+
* @returns {Promise<GroupMetadata>}
|
|
1634
1613
|
*/
|
|
1635
|
-
|
|
1636
|
-
const ret = wasm.
|
|
1614
|
+
groupMetadata() {
|
|
1615
|
+
const ret = wasm.conversation_groupMetadata(this.__wbg_ptr);
|
|
1637
1616
|
return ret;
|
|
1638
1617
|
}
|
|
1639
|
-
/**
|
|
1640
|
-
* @returns {string[]}
|
|
1641
|
-
*/
|
|
1642
|
-
adminList() {
|
|
1643
|
-
const ret = wasm.conversation_adminList(this.__wbg_ptr);
|
|
1644
|
-
if (ret[3]) {
|
|
1645
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1646
|
-
}
|
|
1647
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1648
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1649
|
-
return v1;
|
|
1650
|
-
}
|
|
1651
|
-
/**
|
|
1652
|
-
* @returns {string[]}
|
|
1653
|
-
*/
|
|
1654
|
-
superAdminList() {
|
|
1655
|
-
const ret = wasm.conversation_superAdminList(this.__wbg_ptr);
|
|
1656
|
-
if (ret[3]) {
|
|
1657
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1658
|
-
}
|
|
1659
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1660
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1661
|
-
return v1;
|
|
1662
|
-
}
|
|
1663
|
-
/**
|
|
1664
|
-
* @param {string} inbox_id
|
|
1665
|
-
* @returns {boolean}
|
|
1666
|
-
*/
|
|
1667
|
-
isAdmin(inbox_id) {
|
|
1668
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1669
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1670
|
-
const ret = wasm.conversation_isAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1671
|
-
if (ret[2]) {
|
|
1672
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1673
|
-
}
|
|
1674
|
-
return ret[0] !== 0;
|
|
1675
|
-
}
|
|
1676
1618
|
/**
|
|
1677
1619
|
* @param {string} inbox_id
|
|
1678
1620
|
* @returns {boolean}
|
|
1679
1621
|
*/
|
|
1680
1622
|
isSuperAdmin(inbox_id) {
|
|
1681
1623
|
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1682
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1683
|
-
const ret = wasm.conversation_isSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1684
|
-
if (ret[2]) {
|
|
1685
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1686
|
-
}
|
|
1687
|
-
return ret[0] !== 0;
|
|
1688
|
-
}
|
|
1689
|
-
/**
|
|
1690
|
-
* @param {Identifier[]} account_identifiers
|
|
1691
|
-
* @returns {Promise<void>}
|
|
1692
|
-
*/
|
|
1693
|
-
addMembers(account_identifiers) {
|
|
1694
|
-
const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
1695
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1696
|
-
const ret = wasm.conversation_addMembers(this.__wbg_ptr, ptr0, len0);
|
|
1697
|
-
return ret;
|
|
1698
|
-
}
|
|
1699
|
-
/**
|
|
1700
|
-
* @param {string} inbox_id
|
|
1701
|
-
* @returns {Promise<void>}
|
|
1702
|
-
*/
|
|
1703
|
-
addAdmin(inbox_id) {
|
|
1704
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1705
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1706
|
-
const ret = wasm.conversation_addAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1707
|
-
return ret;
|
|
1708
|
-
}
|
|
1709
|
-
/**
|
|
1710
|
-
* @param {string} inbox_id
|
|
1711
|
-
* @returns {Promise<void>}
|
|
1712
|
-
*/
|
|
1713
|
-
removeAdmin(inbox_id) {
|
|
1714
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1715
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1716
|
-
const ret = wasm.conversation_removeAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1717
|
-
return ret;
|
|
1718
|
-
}
|
|
1719
|
-
/**
|
|
1720
|
-
* @param {string} inbox_id
|
|
1721
|
-
* @returns {Promise<void>}
|
|
1722
|
-
*/
|
|
1723
|
-
addSuperAdmin(inbox_id) {
|
|
1724
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1725
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1726
|
-
const ret = wasm.conversation_addSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1727
|
-
return ret;
|
|
1728
|
-
}
|
|
1729
|
-
/**
|
|
1730
|
-
* @param {string} inbox_id
|
|
1731
|
-
* @returns {Promise<void>}
|
|
1732
|
-
*/
|
|
1733
|
-
removeSuperAdmin(inbox_id) {
|
|
1734
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1735
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1736
|
-
const ret = wasm.conversation_removeSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1737
|
-
return ret;
|
|
1738
|
-
}
|
|
1739
|
-
/**
|
|
1740
|
-
* @returns {GroupPermissions}
|
|
1741
|
-
*/
|
|
1742
|
-
groupPermissions() {
|
|
1743
|
-
const ret = wasm.conversation_groupPermissions(this.__wbg_ptr);
|
|
1744
|
-
if (ret[2]) {
|
|
1745
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1746
|
-
}
|
|
1747
|
-
return GroupPermissions.__wrap(ret[0]);
|
|
1748
|
-
}
|
|
1749
|
-
/**
|
|
1750
|
-
* @param {string[]} inbox_ids
|
|
1751
|
-
* @returns {Promise<void>}
|
|
1752
|
-
*/
|
|
1753
|
-
addMembersByInboxId(inbox_ids) {
|
|
1754
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1755
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1756
|
-
const ret = wasm.conversation_addMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1757
|
-
return ret;
|
|
1624
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1625
|
+
const ret = wasm.conversation_isSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1626
|
+
if (ret[2]) {
|
|
1627
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1628
|
+
}
|
|
1629
|
+
return ret[0] !== 0;
|
|
1758
1630
|
}
|
|
1759
1631
|
/**
|
|
1760
1632
|
* @param {Identifier[]} account_identifiers
|
|
@@ -1767,33 +1639,51 @@ export class Conversation {
|
|
|
1767
1639
|
return ret;
|
|
1768
1640
|
}
|
|
1769
1641
|
/**
|
|
1770
|
-
* @param {string
|
|
1642
|
+
* @param {string} inbox_id
|
|
1771
1643
|
* @returns {Promise<void>}
|
|
1772
1644
|
*/
|
|
1773
|
-
|
|
1774
|
-
const ptr0 =
|
|
1645
|
+
addSuperAdmin(inbox_id) {
|
|
1646
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1775
1647
|
const len0 = WASM_VECTOR_LEN;
|
|
1776
|
-
const ret = wasm.
|
|
1648
|
+
const ret = wasm.conversation_addSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1777
1649
|
return ret;
|
|
1778
1650
|
}
|
|
1779
1651
|
/**
|
|
1780
|
-
*
|
|
1781
|
-
* @
|
|
1652
|
+
* send a message without immediately publishing to the delivery service.
|
|
1653
|
+
* @param {EncodedContent} encoded_content
|
|
1654
|
+
* @param {SendMessageOpts} opts
|
|
1655
|
+
* @returns {string}
|
|
1782
1656
|
*/
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1657
|
+
sendOptimistic(encoded_content, opts) {
|
|
1658
|
+
let deferred4_0;
|
|
1659
|
+
let deferred4_1;
|
|
1660
|
+
try {
|
|
1661
|
+
_assertClass(encoded_content, EncodedContent);
|
|
1662
|
+
var ptr0 = encoded_content.__destroy_into_raw();
|
|
1663
|
+
_assertClass(opts, SendMessageOpts);
|
|
1664
|
+
var ptr1 = opts.__destroy_into_raw();
|
|
1665
|
+
const ret = wasm.conversation_sendOptimistic(this.__wbg_ptr, ptr0, ptr1);
|
|
1666
|
+
var ptr3 = ret[0];
|
|
1667
|
+
var len3 = ret[1];
|
|
1668
|
+
if (ret[3]) {
|
|
1669
|
+
ptr3 = 0; len3 = 0;
|
|
1670
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1671
|
+
}
|
|
1672
|
+
deferred4_0 = ptr3;
|
|
1673
|
+
deferred4_1 = len3;
|
|
1674
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1675
|
+
} finally {
|
|
1676
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1677
|
+
}
|
|
1788
1678
|
}
|
|
1789
1679
|
/**
|
|
1790
1680
|
* @returns {string}
|
|
1791
1681
|
*/
|
|
1792
|
-
|
|
1682
|
+
dmPeerInboxId() {
|
|
1793
1683
|
let deferred2_0;
|
|
1794
1684
|
let deferred2_1;
|
|
1795
1685
|
try {
|
|
1796
|
-
const ret = wasm.
|
|
1686
|
+
const ret = wasm.conversation_dmPeerInboxId(this.__wbg_ptr);
|
|
1797
1687
|
var ptr1 = ret[0];
|
|
1798
1688
|
var len1 = ret[1];
|
|
1799
1689
|
if (ret[3]) {
|
|
@@ -1808,23 +1698,33 @@ export class Conversation {
|
|
|
1808
1698
|
}
|
|
1809
1699
|
}
|
|
1810
1700
|
/**
|
|
1811
|
-
*
|
|
1701
|
+
* Publish all unpublished messages
|
|
1812
1702
|
* @returns {Promise<void>}
|
|
1813
1703
|
*/
|
|
1814
|
-
|
|
1815
|
-
const
|
|
1816
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1817
|
-
const ret = wasm.conversation_updateGroupImageUrlSquare(this.__wbg_ptr, ptr0, len0);
|
|
1704
|
+
publishMessages() {
|
|
1705
|
+
const ret = wasm.conversation_publishMessages(this.__wbg_ptr);
|
|
1818
1706
|
return ret;
|
|
1819
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* @returns {string[]}
|
|
1710
|
+
*/
|
|
1711
|
+
superAdminList() {
|
|
1712
|
+
const ret = wasm.conversation_superAdminList(this.__wbg_ptr);
|
|
1713
|
+
if (ret[3]) {
|
|
1714
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1715
|
+
}
|
|
1716
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1717
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1718
|
+
return v1;
|
|
1719
|
+
}
|
|
1820
1720
|
/**
|
|
1821
1721
|
* @returns {string}
|
|
1822
1722
|
*/
|
|
1823
|
-
|
|
1723
|
+
addedByInboxId() {
|
|
1824
1724
|
let deferred2_0;
|
|
1825
1725
|
let deferred2_1;
|
|
1826
1726
|
try {
|
|
1827
|
-
const ret = wasm.
|
|
1727
|
+
const ret = wasm.conversation_addedByInboxId(this.__wbg_ptr);
|
|
1828
1728
|
var ptr1 = ret[0];
|
|
1829
1729
|
var len1 = ret[1];
|
|
1830
1730
|
if (ret[3]) {
|
|
@@ -1839,13 +1739,16 @@ export class Conversation {
|
|
|
1839
1739
|
}
|
|
1840
1740
|
}
|
|
1841
1741
|
/**
|
|
1842
|
-
* @param {
|
|
1843
|
-
* @returns {Promise<
|
|
1742
|
+
* @param {ListMessagesOptions | null} [opts]
|
|
1743
|
+
* @returns {Promise<DecodedMessage[]>}
|
|
1844
1744
|
*/
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1745
|
+
findMessagesV2(opts) {
|
|
1746
|
+
let ptr0 = 0;
|
|
1747
|
+
if (!isLikeNone(opts)) {
|
|
1748
|
+
_assertClass(opts, ListMessagesOptions);
|
|
1749
|
+
ptr0 = opts.__destroy_into_raw();
|
|
1750
|
+
}
|
|
1751
|
+
const ret = wasm.conversation_findMessagesV2(this.__wbg_ptr, ptr0);
|
|
1849
1752
|
return ret;
|
|
1850
1753
|
}
|
|
1851
1754
|
/**
|
|
@@ -1870,32 +1773,31 @@ export class Conversation {
|
|
|
1870
1773
|
}
|
|
1871
1774
|
}
|
|
1872
1775
|
/**
|
|
1873
|
-
* @
|
|
1874
|
-
* @returns {StreamCloser}
|
|
1776
|
+
* @returns {GroupPermissions}
|
|
1875
1777
|
*/
|
|
1876
|
-
|
|
1877
|
-
const ret = wasm.
|
|
1778
|
+
groupPermissions() {
|
|
1779
|
+
const ret = wasm.conversation_groupPermissions(this.__wbg_ptr);
|
|
1878
1780
|
if (ret[2]) {
|
|
1879
1781
|
throw takeFromExternrefTable0(ret[1]);
|
|
1880
1782
|
}
|
|
1881
|
-
return
|
|
1783
|
+
return GroupPermissions.__wrap(ret[0]);
|
|
1882
1784
|
}
|
|
1883
1785
|
/**
|
|
1884
|
-
* @
|
|
1786
|
+
* @param {string} group_name
|
|
1787
|
+
* @returns {Promise<void>}
|
|
1885
1788
|
*/
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1789
|
+
updateGroupName(group_name) {
|
|
1790
|
+
const ptr0 = passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1791
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1792
|
+
const ret = wasm.conversation_updateGroupName(this.__wbg_ptr, ptr0, len0);
|
|
1888
1793
|
return ret;
|
|
1889
1794
|
}
|
|
1890
1795
|
/**
|
|
1891
|
-
* @returns {
|
|
1796
|
+
* @returns {Promise<Conversation[]>}
|
|
1892
1797
|
*/
|
|
1893
|
-
|
|
1894
|
-
const ret = wasm.
|
|
1895
|
-
|
|
1896
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1897
|
-
}
|
|
1898
|
-
return ret[0] !== 0;
|
|
1798
|
+
findDuplicateDms() {
|
|
1799
|
+
const ret = wasm.conversation_findDuplicateDms(this.__wbg_ptr);
|
|
1800
|
+
return ret;
|
|
1899
1801
|
}
|
|
1900
1802
|
/**
|
|
1901
1803
|
* @returns {string | undefined}
|
|
@@ -1913,41 +1815,30 @@ export class Conversation {
|
|
|
1913
1815
|
return v1;
|
|
1914
1816
|
}
|
|
1915
1817
|
/**
|
|
1916
|
-
* @
|
|
1818
|
+
* @param {string} inbox_id
|
|
1819
|
+
* @returns {Promise<void>}
|
|
1917
1820
|
*/
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
var ptr1 = ret[0];
|
|
1924
|
-
var len1 = ret[1];
|
|
1925
|
-
if (ret[3]) {
|
|
1926
|
-
ptr1 = 0; len1 = 0;
|
|
1927
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1928
|
-
}
|
|
1929
|
-
deferred2_0 = ptr1;
|
|
1930
|
-
deferred2_1 = len1;
|
|
1931
|
-
return getStringFromWasm0(ptr1, len1);
|
|
1932
|
-
} finally {
|
|
1933
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1934
|
-
}
|
|
1821
|
+
removeSuperAdmin(inbox_id) {
|
|
1822
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1823
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1824
|
+
const ret = wasm.conversation_removeSuperAdmin(this.__wbg_ptr, ptr0, len0);
|
|
1825
|
+
return ret;
|
|
1935
1826
|
}
|
|
1936
1827
|
/**
|
|
1937
|
-
* @returns {Promise<
|
|
1828
|
+
* @returns {Promise<any>}
|
|
1938
1829
|
*/
|
|
1939
|
-
|
|
1940
|
-
const ret = wasm.
|
|
1830
|
+
getLastReadTimes() {
|
|
1831
|
+
const ret = wasm.conversation_getLastReadTimes(this.__wbg_ptr);
|
|
1941
1832
|
return ret;
|
|
1942
1833
|
}
|
|
1943
1834
|
/**
|
|
1944
1835
|
* @returns {string}
|
|
1945
1836
|
*/
|
|
1946
|
-
|
|
1837
|
+
groupImageUrlSquare() {
|
|
1947
1838
|
let deferred2_0;
|
|
1948
1839
|
let deferred2_1;
|
|
1949
1840
|
try {
|
|
1950
|
-
const ret = wasm.
|
|
1841
|
+
const ret = wasm.conversation_groupImageUrlSquare(this.__wbg_ptr);
|
|
1951
1842
|
var ptr1 = ret[0];
|
|
1952
1843
|
var len1 = ret[1];
|
|
1953
1844
|
if (ret[3]) {
|
|
@@ -1961,6 +1852,26 @@ export class Conversation {
|
|
|
1961
1852
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1962
1853
|
}
|
|
1963
1854
|
}
|
|
1855
|
+
/**
|
|
1856
|
+
* @param {string[]} inbox_ids
|
|
1857
|
+
* @returns {Promise<void>}
|
|
1858
|
+
*/
|
|
1859
|
+
addMembersByInboxId(inbox_ids) {
|
|
1860
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1861
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1862
|
+
const ret = wasm.conversation_addMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1863
|
+
return ret;
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* @param {string} group_description
|
|
1867
|
+
* @returns {Promise<void>}
|
|
1868
|
+
*/
|
|
1869
|
+
updateGroupDescription(group_description) {
|
|
1870
|
+
const ptr0 = passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1871
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1872
|
+
const ret = wasm.conversation_updateGroupDescription(this.__wbg_ptr, ptr0, len0);
|
|
1873
|
+
return ret;
|
|
1874
|
+
}
|
|
1964
1875
|
/**
|
|
1965
1876
|
* @param {PermissionUpdateType} permission_update_type
|
|
1966
1877
|
* @param {PermissionPolicy} permission_policy_option
|
|
@@ -1971,6 +1882,81 @@ export class Conversation {
|
|
|
1971
1882
|
const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permission_update_type, permission_policy_option, isLikeNone(metadata_field) ? 5 : metadata_field);
|
|
1972
1883
|
return ret;
|
|
1973
1884
|
}
|
|
1885
|
+
/**
|
|
1886
|
+
* @param {string[]} inbox_ids
|
|
1887
|
+
* @returns {Promise<void>}
|
|
1888
|
+
*/
|
|
1889
|
+
removeMembersByInboxId(inbox_ids) {
|
|
1890
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
1891
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1892
|
+
const ret = wasm.conversation_removeMembersByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
1893
|
+
return ret;
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* @param {ListMessagesOptions | null} [opts]
|
|
1897
|
+
* @returns {Promise<MessageWithReactions[]>}
|
|
1898
|
+
*/
|
|
1899
|
+
findMessagesWithReactions(opts) {
|
|
1900
|
+
let ptr0 = 0;
|
|
1901
|
+
if (!isLikeNone(opts)) {
|
|
1902
|
+
_assertClass(opts, ListMessagesOptions);
|
|
1903
|
+
ptr0 = opts.__destroy_into_raw();
|
|
1904
|
+
}
|
|
1905
|
+
const ret = wasm.conversation_findMessagesWithReactions(this.__wbg_ptr, ptr0);
|
|
1906
|
+
return ret;
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* @returns {MessageDisappearingSettings | undefined}
|
|
1910
|
+
*/
|
|
1911
|
+
messageDisappearingSettings() {
|
|
1912
|
+
const ret = wasm.conversation_messageDisappearingSettings(this.__wbg_ptr);
|
|
1913
|
+
if (ret[2]) {
|
|
1914
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1915
|
+
}
|
|
1916
|
+
return ret[0] === 0 ? undefined : MessageDisappearingSettings.__wrap(ret[0]);
|
|
1917
|
+
}
|
|
1918
|
+
/**
|
|
1919
|
+
* @param {string} group_image_url_square
|
|
1920
|
+
* @returns {Promise<void>}
|
|
1921
|
+
*/
|
|
1922
|
+
updateGroupImageUrlSquare(group_image_url_square) {
|
|
1923
|
+
const ptr0 = passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1924
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1925
|
+
const ret = wasm.conversation_updateGroupImageUrlSquare(this.__wbg_ptr, ptr0, len0);
|
|
1926
|
+
return ret;
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* @returns {string}
|
|
1930
|
+
*/
|
|
1931
|
+
id() {
|
|
1932
|
+
let deferred1_0;
|
|
1933
|
+
let deferred1_1;
|
|
1934
|
+
try {
|
|
1935
|
+
const ret = wasm.conversation_id(this.__wbg_ptr);
|
|
1936
|
+
deferred1_0 = ret[0];
|
|
1937
|
+
deferred1_1 = ret[1];
|
|
1938
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1939
|
+
} finally {
|
|
1940
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
/**
|
|
1944
|
+
* @returns {boolean}
|
|
1945
|
+
*/
|
|
1946
|
+
isMessageDisappearingEnabled() {
|
|
1947
|
+
const ret = wasm.conversation_isMessageDisappearingEnabled(this.__wbg_ptr);
|
|
1948
|
+
if (ret[2]) {
|
|
1949
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1950
|
+
}
|
|
1951
|
+
return ret[0] !== 0;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* @returns {Promise<void>}
|
|
1955
|
+
*/
|
|
1956
|
+
removeMessageDisappearingSettings() {
|
|
1957
|
+
const ret = wasm.conversation_removeMessageDisappearingSettings(this.__wbg_ptr);
|
|
1958
|
+
return ret;
|
|
1959
|
+
}
|
|
1974
1960
|
/**
|
|
1975
1961
|
* @param {MessageDisappearingSettings} settings
|
|
1976
1962
|
* @returns {Promise<void>}
|
|
@@ -1981,76 +1967,88 @@ export class Conversation {
|
|
|
1981
1967
|
const ret = wasm.conversation_updateMessageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
1982
1968
|
return ret;
|
|
1983
1969
|
}
|
|
1970
|
+
/**
|
|
1971
|
+
* @param {EncodedContent} encoded_content
|
|
1972
|
+
* @param {SendMessageOpts} opts
|
|
1973
|
+
* @returns {Promise<string>}
|
|
1974
|
+
*/
|
|
1975
|
+
send(encoded_content, opts) {
|
|
1976
|
+
_assertClass(encoded_content, EncodedContent);
|
|
1977
|
+
var ptr0 = encoded_content.__destroy_into_raw();
|
|
1978
|
+
_assertClass(opts, SendMessageOpts);
|
|
1979
|
+
var ptr1 = opts.__destroy_into_raw();
|
|
1980
|
+
const ret = wasm.conversation_send(this.__wbg_ptr, ptr0, ptr1);
|
|
1981
|
+
return ret;
|
|
1982
|
+
}
|
|
1984
1983
|
/**
|
|
1985
1984
|
* @returns {Promise<void>}
|
|
1986
1985
|
*/
|
|
1987
|
-
|
|
1988
|
-
const ret = wasm.
|
|
1986
|
+
sync() {
|
|
1987
|
+
const ret = wasm.conversation_sync(this.__wbg_ptr);
|
|
1989
1988
|
return ret;
|
|
1990
1989
|
}
|
|
1991
1990
|
/**
|
|
1992
|
-
* @
|
|
1991
|
+
* @param {any} callback
|
|
1992
|
+
* @returns {StreamCloser}
|
|
1993
1993
|
*/
|
|
1994
|
-
|
|
1995
|
-
const ret = wasm.
|
|
1994
|
+
stream(callback) {
|
|
1995
|
+
const ret = wasm.conversation_stream(this.__wbg_ptr, callback);
|
|
1996
1996
|
if (ret[2]) {
|
|
1997
1997
|
throw takeFromExternrefTable0(ret[1]);
|
|
1998
1998
|
}
|
|
1999
|
-
return
|
|
1999
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2000
2000
|
}
|
|
2001
2001
|
/**
|
|
2002
|
+
* @param {string} inbox_id
|
|
2002
2003
|
* @returns {boolean}
|
|
2003
2004
|
*/
|
|
2004
|
-
|
|
2005
|
-
const
|
|
2005
|
+
isAdmin(inbox_id) {
|
|
2006
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2007
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2008
|
+
const ret = wasm.conversation_isAdmin(this.__wbg_ptr, ptr0, len0);
|
|
2006
2009
|
if (ret[2]) {
|
|
2007
2010
|
throw takeFromExternrefTable0(ret[1]);
|
|
2008
2011
|
}
|
|
2009
2012
|
return ret[0] !== 0;
|
|
2010
2013
|
}
|
|
2011
2014
|
/**
|
|
2012
|
-
* @
|
|
2013
|
-
|
|
2014
|
-
getHmacKeys() {
|
|
2015
|
-
const ret = wasm.conversation_getHmacKeys(this.__wbg_ptr);
|
|
2016
|
-
if (ret[2]) {
|
|
2017
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2018
|
-
}
|
|
2019
|
-
return takeFromExternrefTable0(ret[0]);
|
|
2020
|
-
}
|
|
2021
|
-
/**
|
|
2022
|
-
* @returns {Promise<any>}
|
|
2015
|
+
* @param {string} inbox_id
|
|
2016
|
+
* @returns {Promise<void>}
|
|
2023
2017
|
*/
|
|
2024
|
-
|
|
2025
|
-
const
|
|
2018
|
+
addAdmin(inbox_id) {
|
|
2019
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2020
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2021
|
+
const ret = wasm.conversation_addAdmin(this.__wbg_ptr, ptr0, len0);
|
|
2026
2022
|
return ret;
|
|
2027
2023
|
}
|
|
2028
2024
|
/**
|
|
2029
|
-
* @returns {
|
|
2025
|
+
* @returns {boolean}
|
|
2030
2026
|
*/
|
|
2031
|
-
|
|
2032
|
-
const ret = wasm.
|
|
2033
|
-
|
|
2027
|
+
isActive() {
|
|
2028
|
+
const ret = wasm.conversation_isActive(this.__wbg_ptr);
|
|
2029
|
+
if (ret[2]) {
|
|
2030
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2031
|
+
}
|
|
2032
|
+
return ret[0] !== 0;
|
|
2034
2033
|
}
|
|
2035
2034
|
/**
|
|
2036
|
-
* @
|
|
2037
|
-
* @returns {Promise<DecodedMessage[]>}
|
|
2035
|
+
* @returns {ConsentState}
|
|
2038
2036
|
*/
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
if (
|
|
2042
|
-
|
|
2043
|
-
ptr0 = opts.__destroy_into_raw();
|
|
2037
|
+
consentState() {
|
|
2038
|
+
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
2039
|
+
if (ret[2]) {
|
|
2040
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2044
2041
|
}
|
|
2045
|
-
|
|
2046
|
-
return ret;
|
|
2042
|
+
return ret[0];
|
|
2047
2043
|
}
|
|
2048
2044
|
/**
|
|
2049
|
-
* @
|
|
2045
|
+
* @param {ConsentState} state
|
|
2050
2046
|
*/
|
|
2051
|
-
|
|
2052
|
-
const ret = wasm.
|
|
2053
|
-
|
|
2047
|
+
updateConsentState(state) {
|
|
2048
|
+
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
2049
|
+
if (ret[1]) {
|
|
2050
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
2051
|
+
}
|
|
2054
2052
|
}
|
|
2055
2053
|
}
|
|
2056
2054
|
if (Symbol.dispose) Conversation.prototype[Symbol.dispose] = Conversation.prototype.free;
|
|
@@ -2317,22 +2315,6 @@ export class Conversations {
|
|
|
2317
2315
|
const ptr = this.__destroy_into_raw();
|
|
2318
2316
|
wasm.__wbg_conversations_free(ptr, 0);
|
|
2319
2317
|
}
|
|
2320
|
-
/**
|
|
2321
|
-
* @param {CreateGroupOptions | null} [options]
|
|
2322
|
-
* @returns {Conversation}
|
|
2323
|
-
*/
|
|
2324
|
-
createGroupOptimistic(options) {
|
|
2325
|
-
let ptr0 = 0;
|
|
2326
|
-
if (!isLikeNone(options)) {
|
|
2327
|
-
_assertClass(options, CreateGroupOptions);
|
|
2328
|
-
ptr0 = options.__destroy_into_raw();
|
|
2329
|
-
}
|
|
2330
|
-
const ret = wasm.conversations_createGroupOptimistic(this.__wbg_ptr, ptr0);
|
|
2331
|
-
if (ret[2]) {
|
|
2332
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2333
|
-
}
|
|
2334
|
-
return Conversation.__wrap(ret[0]);
|
|
2335
|
-
}
|
|
2336
2318
|
/**
|
|
2337
2319
|
* @param {Identifier[]} account_identifiers
|
|
2338
2320
|
* @param {CreateGroupOptions | null} [options]
|
|
@@ -2350,50 +2332,25 @@ export class Conversations {
|
|
|
2350
2332
|
return ret;
|
|
2351
2333
|
}
|
|
2352
2334
|
/**
|
|
2353
|
-
* @
|
|
2354
|
-
* @param {CreateGroupOptions | null} [options]
|
|
2355
|
-
* @returns {Promise<Conversation>}
|
|
2356
|
-
*/
|
|
2357
|
-
createGroupByInboxIds(inbox_ids, options) {
|
|
2358
|
-
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
2359
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2360
|
-
let ptr1 = 0;
|
|
2361
|
-
if (!isLikeNone(options)) {
|
|
2362
|
-
_assertClass(options, CreateGroupOptions);
|
|
2363
|
-
ptr1 = options.__destroy_into_raw();
|
|
2364
|
-
}
|
|
2365
|
-
const ret = wasm.conversations_createGroupByInboxIds(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
2366
|
-
return ret;
|
|
2367
|
-
}
|
|
2368
|
-
/**
|
|
2369
|
-
* @param {Identifier} account_identifier
|
|
2370
|
-
* @param {CreateDMOptions | null} [options]
|
|
2371
|
-
* @returns {Promise<Conversation>}
|
|
2335
|
+
* @returns {any}
|
|
2372
2336
|
*/
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
if (
|
|
2376
|
-
|
|
2377
|
-
ptr0 = options.__destroy_into_raw();
|
|
2337
|
+
getHmacKeys() {
|
|
2338
|
+
const ret = wasm.conversations_getHmacKeys(this.__wbg_ptr);
|
|
2339
|
+
if (ret[2]) {
|
|
2340
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2378
2341
|
}
|
|
2379
|
-
|
|
2380
|
-
return ret;
|
|
2342
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2381
2343
|
}
|
|
2382
2344
|
/**
|
|
2383
|
-
* @param {
|
|
2384
|
-
* @
|
|
2385
|
-
* @returns {Promise<Conversation>}
|
|
2345
|
+
* @param {any} callback
|
|
2346
|
+
* @returns {StreamCloser}
|
|
2386
2347
|
*/
|
|
2387
|
-
|
|
2388
|
-
const
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
if (!isLikeNone(options)) {
|
|
2392
|
-
_assertClass(options, CreateDMOptions);
|
|
2393
|
-
ptr1 = options.__destroy_into_raw();
|
|
2348
|
+
streamConsent(callback) {
|
|
2349
|
+
const ret = wasm.conversations_streamConsent(this.__wbg_ptr, callback);
|
|
2350
|
+
if (ret[2]) {
|
|
2351
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2394
2352
|
}
|
|
2395
|
-
|
|
2396
|
-
return ret;
|
|
2353
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2397
2354
|
}
|
|
2398
2355
|
/**
|
|
2399
2356
|
* @param {string} group_id
|
|
@@ -2409,17 +2366,18 @@ export class Conversations {
|
|
|
2409
2366
|
return Conversation.__wrap(ret[0]);
|
|
2410
2367
|
}
|
|
2411
2368
|
/**
|
|
2412
|
-
* @param {
|
|
2413
|
-
* @
|
|
2369
|
+
* @param {Identifier} account_identifier
|
|
2370
|
+
* @param {CreateDMOptions | null} [options]
|
|
2371
|
+
* @returns {Promise<Conversation>}
|
|
2414
2372
|
*/
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2373
|
+
createDm(account_identifier, options) {
|
|
2374
|
+
let ptr0 = 0;
|
|
2375
|
+
if (!isLikeNone(options)) {
|
|
2376
|
+
_assertClass(options, CreateDMOptions);
|
|
2377
|
+
ptr0 = options.__destroy_into_raw();
|
|
2421
2378
|
}
|
|
2422
|
-
|
|
2379
|
+
const ret = wasm.conversations_createDm(this.__wbg_ptr, account_identifier, ptr0);
|
|
2380
|
+
return ret;
|
|
2423
2381
|
}
|
|
2424
2382
|
/**
|
|
2425
2383
|
* @param {string} message_id
|
|
@@ -2435,15 +2393,34 @@ export class Conversations {
|
|
|
2435
2393
|
return Message.__wrap(ret[0]);
|
|
2436
2394
|
}
|
|
2437
2395
|
/**
|
|
2438
|
-
* @
|
|
2396
|
+
* @param {any} callback
|
|
2397
|
+
* @returns {StreamCloser}
|
|
2439
2398
|
*/
|
|
2440
|
-
|
|
2441
|
-
const ret = wasm.
|
|
2442
|
-
|
|
2399
|
+
streamPreferences(callback) {
|
|
2400
|
+
const ret = wasm.conversations_streamPreferences(this.__wbg_ptr, callback);
|
|
2401
|
+
if (ret[2]) {
|
|
2402
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2403
|
+
}
|
|
2404
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2443
2405
|
}
|
|
2444
2406
|
/**
|
|
2407
|
+
* @param {any} callback
|
|
2408
|
+
* @param {ConversationType | null} [conversation_type]
|
|
2445
2409
|
* @param {any[] | null} [consent_states]
|
|
2446
|
-
* @returns {
|
|
2410
|
+
* @returns {StreamCloser}
|
|
2411
|
+
*/
|
|
2412
|
+
streamAllMessages(callback, conversation_type, consent_states) {
|
|
2413
|
+
var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
|
|
2414
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2415
|
+
const ret = wasm.conversations_streamAllMessages(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type, ptr0, len0);
|
|
2416
|
+
if (ret[2]) {
|
|
2417
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2418
|
+
}
|
|
2419
|
+
return StreamCloser.__wrap(ret[0]);
|
|
2420
|
+
}
|
|
2421
|
+
/**
|
|
2422
|
+
* @param {any[] | null} [consent_states]
|
|
2423
|
+
* @returns {Promise<GroupSyncSummary>}
|
|
2447
2424
|
*/
|
|
2448
2425
|
syncAllConversations(consent_states) {
|
|
2449
2426
|
var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
|
|
@@ -2452,30 +2429,49 @@ export class Conversations {
|
|
|
2452
2429
|
return ret;
|
|
2453
2430
|
}
|
|
2454
2431
|
/**
|
|
2455
|
-
* @param {
|
|
2456
|
-
* @returns {
|
|
2432
|
+
* @param {CreateGroupOptions | null} [options]
|
|
2433
|
+
* @returns {Conversation}
|
|
2457
2434
|
*/
|
|
2458
|
-
|
|
2435
|
+
createGroupOptimistic(options) {
|
|
2459
2436
|
let ptr0 = 0;
|
|
2460
|
-
if (!isLikeNone(
|
|
2461
|
-
_assertClass(
|
|
2462
|
-
ptr0 =
|
|
2437
|
+
if (!isLikeNone(options)) {
|
|
2438
|
+
_assertClass(options, CreateGroupOptions);
|
|
2439
|
+
ptr0 = options.__destroy_into_raw();
|
|
2463
2440
|
}
|
|
2464
|
-
const ret = wasm.
|
|
2441
|
+
const ret = wasm.conversations_createGroupOptimistic(this.__wbg_ptr, ptr0);
|
|
2465
2442
|
if (ret[2]) {
|
|
2466
2443
|
throw takeFromExternrefTable0(ret[1]);
|
|
2467
2444
|
}
|
|
2468
|
-
return
|
|
2445
|
+
return Conversation.__wrap(ret[0]);
|
|
2469
2446
|
}
|
|
2470
2447
|
/**
|
|
2471
|
-
* @
|
|
2448
|
+
* @param {string[]} inbox_ids
|
|
2449
|
+
* @param {CreateGroupOptions | null} [options]
|
|
2450
|
+
* @returns {Promise<Conversation>}
|
|
2472
2451
|
*/
|
|
2473
|
-
|
|
2474
|
-
const
|
|
2452
|
+
createGroupByInboxIds(inbox_ids, options) {
|
|
2453
|
+
const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
|
|
2454
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2455
|
+
let ptr1 = 0;
|
|
2456
|
+
if (!isLikeNone(options)) {
|
|
2457
|
+
_assertClass(options, CreateGroupOptions);
|
|
2458
|
+
ptr1 = options.__destroy_into_raw();
|
|
2459
|
+
}
|
|
2460
|
+
const ret = wasm.conversations_createGroupByInboxIds(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
2461
|
+
return ret;
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* @param {string} target_inbox_id
|
|
2465
|
+
* @returns {Conversation}
|
|
2466
|
+
*/
|
|
2467
|
+
findDmByTargetInboxId(target_inbox_id) {
|
|
2468
|
+
const ptr0 = passStringToWasm0(target_inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2469
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2470
|
+
const ret = wasm.conversations_findDmByTargetInboxId(this.__wbg_ptr, ptr0, len0);
|
|
2475
2471
|
if (ret[2]) {
|
|
2476
2472
|
throw takeFromExternrefTable0(ret[1]);
|
|
2477
2473
|
}
|
|
2478
|
-
return
|
|
2474
|
+
return Conversation.__wrap(ret[0]);
|
|
2479
2475
|
}
|
|
2480
2476
|
/**
|
|
2481
2477
|
* Returns a 'ReadableStream' of Conversations
|
|
@@ -2487,49 +2483,51 @@ export class Conversations {
|
|
|
2487
2483
|
return ret;
|
|
2488
2484
|
}
|
|
2489
2485
|
/**
|
|
2490
|
-
* @param {
|
|
2491
|
-
* @param {
|
|
2492
|
-
* @returns {
|
|
2486
|
+
* @param {string} inbox_id
|
|
2487
|
+
* @param {CreateDMOptions | null} [options]
|
|
2488
|
+
* @returns {Promise<Conversation>}
|
|
2493
2489
|
*/
|
|
2494
|
-
|
|
2495
|
-
const
|
|
2496
|
-
|
|
2497
|
-
|
|
2490
|
+
createDmByInboxId(inbox_id, options) {
|
|
2491
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2492
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2493
|
+
let ptr1 = 0;
|
|
2494
|
+
if (!isLikeNone(options)) {
|
|
2495
|
+
_assertClass(options, CreateDMOptions);
|
|
2496
|
+
ptr1 = options.__destroy_into_raw();
|
|
2498
2497
|
}
|
|
2499
|
-
|
|
2498
|
+
const ret = wasm.conversations_createDmByInboxId(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
2499
|
+
return ret;
|
|
2500
2500
|
}
|
|
2501
2501
|
/**
|
|
2502
|
-
* @param {
|
|
2503
|
-
* @
|
|
2504
|
-
* @param {any[] | null} [consent_states]
|
|
2505
|
-
* @returns {StreamCloser}
|
|
2502
|
+
* @param {ListConversationsOptions | null} [opts]
|
|
2503
|
+
* @returns {Array<any>}
|
|
2506
2504
|
*/
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2505
|
+
list(opts) {
|
|
2506
|
+
let ptr0 = 0;
|
|
2507
|
+
if (!isLikeNone(opts)) {
|
|
2508
|
+
_assertClass(opts, ListConversationsOptions);
|
|
2509
|
+
ptr0 = opts.__destroy_into_raw();
|
|
2510
|
+
}
|
|
2511
|
+
const ret = wasm.conversations_list(this.__wbg_ptr, ptr0);
|
|
2511
2512
|
if (ret[2]) {
|
|
2512
2513
|
throw takeFromExternrefTable0(ret[1]);
|
|
2513
2514
|
}
|
|
2514
|
-
return
|
|
2515
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2515
2516
|
}
|
|
2516
2517
|
/**
|
|
2517
|
-
* @
|
|
2518
|
-
* @returns {StreamCloser}
|
|
2518
|
+
* @returns {Promise<void>}
|
|
2519
2519
|
*/
|
|
2520
|
-
|
|
2521
|
-
const ret = wasm.
|
|
2522
|
-
|
|
2523
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2524
|
-
}
|
|
2525
|
-
return StreamCloser.__wrap(ret[0]);
|
|
2520
|
+
sync() {
|
|
2521
|
+
const ret = wasm.conversations_sync(this.__wbg_ptr);
|
|
2522
|
+
return ret;
|
|
2526
2523
|
}
|
|
2527
2524
|
/**
|
|
2528
2525
|
* @param {any} callback
|
|
2526
|
+
* @param {ConversationType | null} [conversation_type]
|
|
2529
2527
|
* @returns {StreamCloser}
|
|
2530
2528
|
*/
|
|
2531
|
-
|
|
2532
|
-
const ret = wasm.
|
|
2529
|
+
stream(callback, conversation_type) {
|
|
2530
|
+
const ret = wasm.conversations_stream(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type);
|
|
2533
2531
|
if (ret[2]) {
|
|
2534
2532
|
throw takeFromExternrefTable0(ret[1]);
|
|
2535
2533
|
}
|
|
@@ -2555,6 +2553,20 @@ export class CreateDMOptions {
|
|
|
2555
2553
|
const ptr = this.__destroy_into_raw();
|
|
2556
2554
|
wasm.__wbg_createdmoptions_free(ptr, 0);
|
|
2557
2555
|
}
|
|
2556
|
+
/**
|
|
2557
|
+
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2558
|
+
*/
|
|
2559
|
+
constructor(message_disappearing_settings) {
|
|
2560
|
+
let ptr0 = 0;
|
|
2561
|
+
if (!isLikeNone(message_disappearing_settings)) {
|
|
2562
|
+
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2563
|
+
ptr0 = message_disappearing_settings.__destroy_into_raw();
|
|
2564
|
+
}
|
|
2565
|
+
const ret = wasm.createdmoptions_new(ptr0);
|
|
2566
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2567
|
+
CreateDMOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2568
|
+
return this;
|
|
2569
|
+
}
|
|
2558
2570
|
/**
|
|
2559
2571
|
* @returns {MessageDisappearingSettings | undefined}
|
|
2560
2572
|
*/
|
|
@@ -2573,20 +2585,6 @@ export class CreateDMOptions {
|
|
|
2573
2585
|
}
|
|
2574
2586
|
wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
2575
2587
|
}
|
|
2576
|
-
/**
|
|
2577
|
-
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2578
|
-
*/
|
|
2579
|
-
constructor(message_disappearing_settings) {
|
|
2580
|
-
let ptr0 = 0;
|
|
2581
|
-
if (!isLikeNone(message_disappearing_settings)) {
|
|
2582
|
-
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2583
|
-
ptr0 = message_disappearing_settings.__destroy_into_raw();
|
|
2584
|
-
}
|
|
2585
|
-
const ret = wasm.createdmoptions_new(ptr0);
|
|
2586
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2587
|
-
CreateDMOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2588
|
-
return this;
|
|
2589
|
-
}
|
|
2590
2588
|
}
|
|
2591
2589
|
if (Symbol.dispose) CreateDMOptions.prototype[Symbol.dispose] = CreateDMOptions.prototype.free;
|
|
2592
2590
|
|
|
@@ -2607,6 +2605,36 @@ export class CreateGroupOptions {
|
|
|
2607
2605
|
const ptr = this.__destroy_into_raw();
|
|
2608
2606
|
wasm.__wbg_creategroupoptions_free(ptr, 0);
|
|
2609
2607
|
}
|
|
2608
|
+
/**
|
|
2609
|
+
* @param {GroupPermissionsOptions | null} [permissions]
|
|
2610
|
+
* @param {string | null} [group_name]
|
|
2611
|
+
* @param {string | null} [group_image_url_square]
|
|
2612
|
+
* @param {string | null} [group_description]
|
|
2613
|
+
* @param {PermissionPolicySet | null} [custom_permission_policy_set]
|
|
2614
|
+
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2615
|
+
*/
|
|
2616
|
+
constructor(permissions, group_name, group_image_url_square, group_description, custom_permission_policy_set, message_disappearing_settings) {
|
|
2617
|
+
var ptr0 = isLikeNone(group_name) ? 0 : passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2618
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2619
|
+
var ptr1 = isLikeNone(group_image_url_square) ? 0 : passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2620
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2621
|
+
var ptr2 = isLikeNone(group_description) ? 0 : passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2622
|
+
var len2 = WASM_VECTOR_LEN;
|
|
2623
|
+
let ptr3 = 0;
|
|
2624
|
+
if (!isLikeNone(custom_permission_policy_set)) {
|
|
2625
|
+
_assertClass(custom_permission_policy_set, PermissionPolicySet);
|
|
2626
|
+
ptr3 = custom_permission_policy_set.__destroy_into_raw();
|
|
2627
|
+
}
|
|
2628
|
+
let ptr4 = 0;
|
|
2629
|
+
if (!isLikeNone(message_disappearing_settings)) {
|
|
2630
|
+
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2631
|
+
ptr4 = message_disappearing_settings.__destroy_into_raw();
|
|
2632
|
+
}
|
|
2633
|
+
const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4);
|
|
2634
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2635
|
+
CreateGroupOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2636
|
+
return this;
|
|
2637
|
+
}
|
|
2610
2638
|
/**
|
|
2611
2639
|
* @returns {GroupPermissionsOptions | undefined}
|
|
2612
2640
|
*/
|
|
@@ -2716,36 +2744,6 @@ export class CreateGroupOptions {
|
|
|
2716
2744
|
}
|
|
2717
2745
|
wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
|
|
2718
2746
|
}
|
|
2719
|
-
/**
|
|
2720
|
-
* @param {GroupPermissionsOptions | null} [permissions]
|
|
2721
|
-
* @param {string | null} [group_name]
|
|
2722
|
-
* @param {string | null} [group_image_url_square]
|
|
2723
|
-
* @param {string | null} [group_description]
|
|
2724
|
-
* @param {PermissionPolicySet | null} [custom_permission_policy_set]
|
|
2725
|
-
* @param {MessageDisappearingSettings | null} [message_disappearing_settings]
|
|
2726
|
-
*/
|
|
2727
|
-
constructor(permissions, group_name, group_image_url_square, group_description, custom_permission_policy_set, message_disappearing_settings) {
|
|
2728
|
-
var ptr0 = isLikeNone(group_name) ? 0 : passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2729
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2730
|
-
var ptr1 = isLikeNone(group_image_url_square) ? 0 : passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2731
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2732
|
-
var ptr2 = isLikeNone(group_description) ? 0 : passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2733
|
-
var len2 = WASM_VECTOR_LEN;
|
|
2734
|
-
let ptr3 = 0;
|
|
2735
|
-
if (!isLikeNone(custom_permission_policy_set)) {
|
|
2736
|
-
_assertClass(custom_permission_policy_set, PermissionPolicySet);
|
|
2737
|
-
ptr3 = custom_permission_policy_set.__destroy_into_raw();
|
|
2738
|
-
}
|
|
2739
|
-
let ptr4 = 0;
|
|
2740
|
-
if (!isLikeNone(message_disappearing_settings)) {
|
|
2741
|
-
_assertClass(message_disappearing_settings, MessageDisappearingSettings);
|
|
2742
|
-
ptr4 = message_disappearing_settings.__destroy_into_raw();
|
|
2743
|
-
}
|
|
2744
|
-
const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4);
|
|
2745
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2746
|
-
CreateGroupOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
2747
|
-
return this;
|
|
2748
|
-
}
|
|
2749
2747
|
}
|
|
2750
2748
|
if (Symbol.dispose) CreateGroupOptions.prototype[Symbol.dispose] = CreateGroupOptions.prototype.free;
|
|
2751
2749
|
|
|
@@ -3002,6 +3000,13 @@ export class DecodedMessageContent {
|
|
|
3002
3000
|
const ptr = this.__destroy_into_raw();
|
|
3003
3001
|
wasm.__wbg_decodedmessagecontent_free(ptr, 0);
|
|
3004
3002
|
}
|
|
3003
|
+
/**
|
|
3004
|
+
* @returns {ReactionPayload | undefined}
|
|
3005
|
+
*/
|
|
3006
|
+
asReaction() {
|
|
3007
|
+
const ret = wasm.decodedmessagecontent_asReaction(this.__wbg_ptr);
|
|
3008
|
+
return ret === 0 ? undefined : ReactionPayload.__wrap(ret);
|
|
3009
|
+
}
|
|
3005
3010
|
/**
|
|
3006
3011
|
* @returns {PayloadType}
|
|
3007
3012
|
*/
|
|
@@ -3010,32 +3015,25 @@ export class DecodedMessageContent {
|
|
|
3010
3015
|
return ret;
|
|
3011
3016
|
}
|
|
3012
3017
|
/**
|
|
3013
|
-
* @returns {
|
|
3014
|
-
*/
|
|
3015
|
-
asText() {
|
|
3016
|
-
const ret = wasm.decodedmessagecontent_asText(this.__wbg_ptr);
|
|
3017
|
-
return ret === 0 ? undefined : TextContent.__wrap(ret);
|
|
3018
|
-
}
|
|
3019
|
-
/**
|
|
3020
|
-
* @returns {EnrichedReply | undefined}
|
|
3018
|
+
* @returns {Attachment | undefined}
|
|
3021
3019
|
*/
|
|
3022
|
-
|
|
3023
|
-
const ret = wasm.
|
|
3024
|
-
return ret === 0 ? undefined :
|
|
3020
|
+
asAttachment() {
|
|
3021
|
+
const ret = wasm.decodedmessagecontent_asAttachment(this.__wbg_ptr);
|
|
3022
|
+
return ret === 0 ? undefined : Attachment.__wrap(ret);
|
|
3025
3023
|
}
|
|
3026
3024
|
/**
|
|
3027
|
-
* @returns {
|
|
3025
|
+
* @returns {ReadReceipt | undefined}
|
|
3028
3026
|
*/
|
|
3029
|
-
|
|
3030
|
-
const ret = wasm.
|
|
3031
|
-
return ret === 0 ? undefined :
|
|
3027
|
+
asReadReceipt() {
|
|
3028
|
+
const ret = wasm.decodedmessagecontent_asReadReceipt(this.__wbg_ptr);
|
|
3029
|
+
return ret === 0 ? undefined : ReadReceipt.__wrap(ret);
|
|
3032
3030
|
}
|
|
3033
3031
|
/**
|
|
3034
|
-
* @returns {
|
|
3032
|
+
* @returns {GroupUpdated | undefined}
|
|
3035
3033
|
*/
|
|
3036
|
-
|
|
3037
|
-
const ret = wasm.
|
|
3038
|
-
return ret === 0 ? undefined :
|
|
3034
|
+
asGroupUpdated() {
|
|
3035
|
+
const ret = wasm.decodedmessagecontent_asGroupUpdated(this.__wbg_ptr);
|
|
3036
|
+
return ret === 0 ? undefined : GroupUpdated.__wrap(ret);
|
|
3039
3037
|
}
|
|
3040
3038
|
/**
|
|
3041
3039
|
* @returns {RemoteAttachment | undefined}
|
|
@@ -3045,11 +3043,14 @@ export class DecodedMessageContent {
|
|
|
3045
3043
|
return ret === 0 ? undefined : RemoteAttachment.__wrap(ret);
|
|
3046
3044
|
}
|
|
3047
3045
|
/**
|
|
3048
|
-
* @returns {
|
|
3046
|
+
* @returns {any}
|
|
3049
3047
|
*/
|
|
3050
|
-
|
|
3051
|
-
const ret = wasm.
|
|
3052
|
-
|
|
3048
|
+
asWalletSendCalls() {
|
|
3049
|
+
const ret = wasm.decodedmessagecontent_asWalletSendCalls(this.__wbg_ptr);
|
|
3050
|
+
if (ret[2]) {
|
|
3051
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3052
|
+
}
|
|
3053
|
+
return takeFromExternrefTable0(ret[0]);
|
|
3053
3054
|
}
|
|
3054
3055
|
/**
|
|
3055
3056
|
* @returns {TransactionReference | undefined}
|
|
@@ -3059,28 +3060,25 @@ export class DecodedMessageContent {
|
|
|
3059
3060
|
return ret === 0 ? undefined : TransactionReference.__wrap(ret);
|
|
3060
3061
|
}
|
|
3061
3062
|
/**
|
|
3062
|
-
* @returns {
|
|
3063
|
+
* @returns {MultiRemoteAttachment | undefined}
|
|
3063
3064
|
*/
|
|
3064
|
-
|
|
3065
|
-
const ret = wasm.
|
|
3066
|
-
return ret === 0 ? undefined :
|
|
3065
|
+
asMultiRemoteAttachment() {
|
|
3066
|
+
const ret = wasm.decodedmessagecontent_asMultiRemoteAttachment(this.__wbg_ptr);
|
|
3067
|
+
return ret === 0 ? undefined : MultiRemoteAttachment.__wrap(ret);
|
|
3067
3068
|
}
|
|
3068
3069
|
/**
|
|
3069
|
-
* @returns {
|
|
3070
|
+
* @returns {TextContent | undefined}
|
|
3070
3071
|
*/
|
|
3071
|
-
|
|
3072
|
-
const ret = wasm.
|
|
3073
|
-
return ret === 0 ? undefined :
|
|
3072
|
+
asText() {
|
|
3073
|
+
const ret = wasm.decodedmessagecontent_asText(this.__wbg_ptr);
|
|
3074
|
+
return ret === 0 ? undefined : TextContent.__wrap(ret);
|
|
3074
3075
|
}
|
|
3075
3076
|
/**
|
|
3076
|
-
* @returns {
|
|
3077
|
+
* @returns {EnrichedReply | undefined}
|
|
3077
3078
|
*/
|
|
3078
|
-
|
|
3079
|
-
const ret = wasm.
|
|
3080
|
-
|
|
3081
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
3082
|
-
}
|
|
3083
|
-
return takeFromExternrefTable0(ret[0]);
|
|
3079
|
+
asReply() {
|
|
3080
|
+
const ret = wasm.decodedmessagecontent_asReply(this.__wbg_ptr);
|
|
3081
|
+
return ret === 0 ? undefined : EnrichedReply.__wrap(ret);
|
|
3084
3082
|
}
|
|
3085
3083
|
/**
|
|
3086
3084
|
* @returns {EncodedContent | undefined}
|
|
@@ -3117,6 +3115,26 @@ export class EncodedContent {
|
|
|
3117
3115
|
const ptr = this.__destroy_into_raw();
|
|
3118
3116
|
wasm.__wbg_encodedcontent_free(ptr, 0);
|
|
3119
3117
|
}
|
|
3118
|
+
/**
|
|
3119
|
+
* @param {ContentTypeId | null | undefined} type
|
|
3120
|
+
* @param {any} parameters
|
|
3121
|
+
* @param {string | null | undefined} fallback
|
|
3122
|
+
* @param {number | null | undefined} compression
|
|
3123
|
+
* @param {Uint8Array} content
|
|
3124
|
+
*/
|
|
3125
|
+
constructor(type, parameters, fallback, compression, content) {
|
|
3126
|
+
let ptr0 = 0;
|
|
3127
|
+
if (!isLikeNone(type)) {
|
|
3128
|
+
_assertClass(type, ContentTypeId);
|
|
3129
|
+
ptr0 = type.__destroy_into_raw();
|
|
3130
|
+
}
|
|
3131
|
+
var ptr1 = isLikeNone(fallback) ? 0 : passStringToWasm0(fallback, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3132
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3133
|
+
const ret = wasm.encodedcontent_new(ptr0, parameters, ptr1, len1, isLikeNone(compression) ? 0x100000001 : (compression) >> 0, content);
|
|
3134
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3135
|
+
EncodedContentFinalization.register(this, this.__wbg_ptr, this);
|
|
3136
|
+
return this;
|
|
3137
|
+
}
|
|
3120
3138
|
/**
|
|
3121
3139
|
* @returns {ContentTypeId | undefined}
|
|
3122
3140
|
*/
|
|
@@ -3194,26 +3212,6 @@ export class EncodedContent {
|
|
|
3194
3212
|
set content(arg0) {
|
|
3195
3213
|
wasm.__wbg_set_encodedcontent_content(this.__wbg_ptr, arg0);
|
|
3196
3214
|
}
|
|
3197
|
-
/**
|
|
3198
|
-
* @param {ContentTypeId | null | undefined} type
|
|
3199
|
-
* @param {any} parameters
|
|
3200
|
-
* @param {string | null | undefined} fallback
|
|
3201
|
-
* @param {number | null | undefined} compression
|
|
3202
|
-
* @param {Uint8Array} content
|
|
3203
|
-
*/
|
|
3204
|
-
constructor(type, parameters, fallback, compression, content) {
|
|
3205
|
-
let ptr0 = 0;
|
|
3206
|
-
if (!isLikeNone(type)) {
|
|
3207
|
-
_assertClass(type, ContentTypeId);
|
|
3208
|
-
ptr0 = type.__destroy_into_raw();
|
|
3209
|
-
}
|
|
3210
|
-
var ptr1 = isLikeNone(fallback) ? 0 : passStringToWasm0(fallback, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3211
|
-
var len1 = WASM_VECTOR_LEN;
|
|
3212
|
-
const ret = wasm.encodedcontent_new(ptr0, parameters, ptr1, len1, isLikeNone(compression) ? 0x100000001 : (compression) >> 0, content);
|
|
3213
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3214
|
-
EncodedContentFinalization.register(this, this.__wbg_ptr, this);
|
|
3215
|
-
return this;
|
|
3216
|
-
}
|
|
3217
3215
|
}
|
|
3218
3216
|
if (Symbol.dispose) EncodedContent.prototype[Symbol.dispose] = EncodedContent.prototype.free;
|
|
3219
3217
|
|
|
@@ -3242,6 +3240,13 @@ export class EnrichedReply {
|
|
|
3242
3240
|
const ptr = this.__destroy_into_raw();
|
|
3243
3241
|
wasm.__wbg_enrichedreply_free(ptr, 0);
|
|
3244
3242
|
}
|
|
3243
|
+
/**
|
|
3244
|
+
* @returns {DecodedMessage | undefined}
|
|
3245
|
+
*/
|
|
3246
|
+
get inReplyTo() {
|
|
3247
|
+
const ret = wasm.enrichedreply_inReplyTo(this.__wbg_ptr);
|
|
3248
|
+
return ret === 0 ? undefined : DecodedMessage.__wrap(ret);
|
|
3249
|
+
}
|
|
3245
3250
|
/**
|
|
3246
3251
|
* @returns {string}
|
|
3247
3252
|
*/
|
|
@@ -3262,14 +3267,7 @@ export class EnrichedReply {
|
|
|
3262
3267
|
*/
|
|
3263
3268
|
get content() {
|
|
3264
3269
|
const ret = wasm.enrichedreply_content(this.__wbg_ptr);
|
|
3265
|
-
return DecodedMessageContent.__wrap(ret);
|
|
3266
|
-
}
|
|
3267
|
-
/**
|
|
3268
|
-
* @returns {DecodedMessage | undefined}
|
|
3269
|
-
*/
|
|
3270
|
-
get inReplyTo() {
|
|
3271
|
-
const ret = wasm.enrichedreply_inReplyTo(this.__wbg_ptr);
|
|
3272
|
-
return ret === 0 ? undefined : DecodedMessage.__wrap(ret);
|
|
3270
|
+
return DecodedMessageContent.__wrap(ret);
|
|
3273
3271
|
}
|
|
3274
3272
|
}
|
|
3275
3273
|
if (Symbol.dispose) EnrichedReply.prototype[Symbol.dispose] = EnrichedReply.prototype.free;
|
|
@@ -3291,6 +3289,25 @@ export class GroupMember {
|
|
|
3291
3289
|
const ptr = this.__destroy_into_raw();
|
|
3292
3290
|
wasm.__wbg_groupmember_free(ptr, 0);
|
|
3293
3291
|
}
|
|
3292
|
+
/**
|
|
3293
|
+
* @param {string} inboxId
|
|
3294
|
+
* @param {Identifier[]} accountIdentifiers
|
|
3295
|
+
* @param {string[]} installationIds
|
|
3296
|
+
* @param {PermissionLevel} permissionLevel
|
|
3297
|
+
* @param {ConsentState} consentState
|
|
3298
|
+
*/
|
|
3299
|
+
constructor(inboxId, accountIdentifiers, installationIds, permissionLevel, consentState) {
|
|
3300
|
+
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3301
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3302
|
+
const ptr1 = passArrayJsValueToWasm0(accountIdentifiers, wasm.__wbindgen_malloc);
|
|
3303
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3304
|
+
const ptr2 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
3305
|
+
const len2 = WASM_VECTOR_LEN;
|
|
3306
|
+
const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permissionLevel, consentState);
|
|
3307
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3308
|
+
GroupMemberFinalization.register(this, this.__wbg_ptr, this);
|
|
3309
|
+
return this;
|
|
3310
|
+
}
|
|
3294
3311
|
/**
|
|
3295
3312
|
* @returns {string}
|
|
3296
3313
|
*/
|
|
@@ -3312,7 +3329,7 @@ export class GroupMember {
|
|
|
3312
3329
|
set inboxId(arg0) {
|
|
3313
3330
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3314
3331
|
const len0 = WASM_VECTOR_LEN;
|
|
3315
|
-
wasm.
|
|
3332
|
+
wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
|
|
3316
3333
|
}
|
|
3317
3334
|
/**
|
|
3318
3335
|
* @returns {Identifier[]}
|
|
@@ -3374,25 +3391,6 @@ export class GroupMember {
|
|
|
3374
3391
|
set consentState(arg0) {
|
|
3375
3392
|
wasm.__wbg_set_groupmember_consentState(this.__wbg_ptr, arg0);
|
|
3376
3393
|
}
|
|
3377
|
-
/**
|
|
3378
|
-
* @param {string} inboxId
|
|
3379
|
-
* @param {Identifier[]} accountIdentifiers
|
|
3380
|
-
* @param {string[]} installationIds
|
|
3381
|
-
* @param {PermissionLevel} permissionLevel
|
|
3382
|
-
* @param {ConsentState} consentState
|
|
3383
|
-
*/
|
|
3384
|
-
constructor(inboxId, accountIdentifiers, installationIds, permissionLevel, consentState) {
|
|
3385
|
-
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3386
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3387
|
-
const ptr1 = passArrayJsValueToWasm0(accountIdentifiers, wasm.__wbindgen_malloc);
|
|
3388
|
-
const len1 = WASM_VECTOR_LEN;
|
|
3389
|
-
const ptr2 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
3390
|
-
const len2 = WASM_VECTOR_LEN;
|
|
3391
|
-
const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permissionLevel, consentState);
|
|
3392
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3393
|
-
GroupMemberFinalization.register(this, this.__wbg_ptr, this);
|
|
3394
|
-
return this;
|
|
3395
|
-
}
|
|
3396
3394
|
}
|
|
3397
3395
|
if (Symbol.dispose) GroupMember.prototype[Symbol.dispose] = GroupMember.prototype.free;
|
|
3398
3396
|
|
|
@@ -3480,28 +3478,92 @@ export class GroupPermissions {
|
|
|
3480
3478
|
wasm.__wbg_grouppermissions_free(ptr, 0);
|
|
3481
3479
|
}
|
|
3482
3480
|
/**
|
|
3483
|
-
* @returns {
|
|
3481
|
+
* @returns {PermissionPolicySet}
|
|
3484
3482
|
*/
|
|
3485
|
-
|
|
3486
|
-
const ret = wasm.
|
|
3483
|
+
policySet() {
|
|
3484
|
+
const ret = wasm.grouppermissions_policySet(this.__wbg_ptr);
|
|
3487
3485
|
if (ret[2]) {
|
|
3488
3486
|
throw takeFromExternrefTable0(ret[1]);
|
|
3489
3487
|
}
|
|
3490
|
-
return ret[0];
|
|
3488
|
+
return PermissionPolicySet.__wrap(ret[0]);
|
|
3491
3489
|
}
|
|
3492
3490
|
/**
|
|
3493
|
-
* @returns {
|
|
3491
|
+
* @returns {GroupPermissionsOptions}
|
|
3494
3492
|
*/
|
|
3495
|
-
|
|
3496
|
-
const ret = wasm.
|
|
3493
|
+
policyType() {
|
|
3494
|
+
const ret = wasm.grouppermissions_policyType(this.__wbg_ptr);
|
|
3497
3495
|
if (ret[2]) {
|
|
3498
3496
|
throw takeFromExternrefTable0(ret[1]);
|
|
3499
3497
|
}
|
|
3500
|
-
return
|
|
3498
|
+
return ret[0];
|
|
3501
3499
|
}
|
|
3502
3500
|
}
|
|
3503
3501
|
if (Symbol.dispose) GroupPermissions.prototype[Symbol.dispose] = GroupPermissions.prototype.free;
|
|
3504
3502
|
|
|
3503
|
+
const GroupSyncSummaryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3504
|
+
? { register: () => {}, unregister: () => {} }
|
|
3505
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_groupsyncsummary_free(ptr >>> 0, 1));
|
|
3506
|
+
|
|
3507
|
+
export class GroupSyncSummary {
|
|
3508
|
+
|
|
3509
|
+
static __wrap(ptr) {
|
|
3510
|
+
ptr = ptr >>> 0;
|
|
3511
|
+
const obj = Object.create(GroupSyncSummary.prototype);
|
|
3512
|
+
obj.__wbg_ptr = ptr;
|
|
3513
|
+
GroupSyncSummaryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3514
|
+
return obj;
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
__destroy_into_raw() {
|
|
3518
|
+
const ptr = this.__wbg_ptr;
|
|
3519
|
+
this.__wbg_ptr = 0;
|
|
3520
|
+
GroupSyncSummaryFinalization.unregister(this);
|
|
3521
|
+
return ptr;
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
free() {
|
|
3525
|
+
const ptr = this.__destroy_into_raw();
|
|
3526
|
+
wasm.__wbg_groupsyncsummary_free(ptr, 0);
|
|
3527
|
+
}
|
|
3528
|
+
/**
|
|
3529
|
+
* @param {number} num_eligible
|
|
3530
|
+
* @param {number} num_synced
|
|
3531
|
+
*/
|
|
3532
|
+
constructor(num_eligible, num_synced) {
|
|
3533
|
+
const ret = wasm.groupsyncsummary_new(num_eligible, num_synced);
|
|
3534
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3535
|
+
GroupSyncSummaryFinalization.register(this, this.__wbg_ptr, this);
|
|
3536
|
+
return this;
|
|
3537
|
+
}
|
|
3538
|
+
/**
|
|
3539
|
+
* @returns {number}
|
|
3540
|
+
*/
|
|
3541
|
+
get numEligible() {
|
|
3542
|
+
const ret = wasm.__wbg_get_groupsyncsummary_numEligible(this.__wbg_ptr);
|
|
3543
|
+
return ret >>> 0;
|
|
3544
|
+
}
|
|
3545
|
+
/**
|
|
3546
|
+
* @param {number} arg0
|
|
3547
|
+
*/
|
|
3548
|
+
set numEligible(arg0) {
|
|
3549
|
+
wasm.__wbg_set_groupsyncsummary_numEligible(this.__wbg_ptr, arg0);
|
|
3550
|
+
}
|
|
3551
|
+
/**
|
|
3552
|
+
* @returns {number}
|
|
3553
|
+
*/
|
|
3554
|
+
get numSynced() {
|
|
3555
|
+
const ret = wasm.__wbg_get_groupsyncsummary_numSynced(this.__wbg_ptr);
|
|
3556
|
+
return ret >>> 0;
|
|
3557
|
+
}
|
|
3558
|
+
/**
|
|
3559
|
+
* @param {number} arg0
|
|
3560
|
+
*/
|
|
3561
|
+
set numSynced(arg0) {
|
|
3562
|
+
wasm.__wbg_set_groupsyncsummary_numSynced(this.__wbg_ptr, arg0);
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
if (Symbol.dispose) GroupSyncSummary.prototype[Symbol.dispose] = GroupSyncSummary.prototype.free;
|
|
3566
|
+
|
|
3505
3567
|
const GroupUpdatedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3506
3568
|
? { register: () => {}, unregister: () => {} }
|
|
3507
3569
|
: new FinalizationRegistry(ptr => wasm.__wbg_groupupdated_free(ptr >>> 0, 1));
|
|
@@ -3548,7 +3610,7 @@ export class GroupUpdated {
|
|
|
3548
3610
|
set initiatedByInboxId(arg0) {
|
|
3549
3611
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3550
3612
|
const len0 = WASM_VECTOR_LEN;
|
|
3551
|
-
wasm.
|
|
3613
|
+
wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
3552
3614
|
}
|
|
3553
3615
|
/**
|
|
3554
3616
|
* @returns {Inbox[]}
|
|
@@ -3787,7 +3849,7 @@ export class Inbox {
|
|
|
3787
3849
|
set inboxId(arg0) {
|
|
3788
3850
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3789
3851
|
const len0 = WASM_VECTOR_LEN;
|
|
3790
|
-
wasm.
|
|
3852
|
+
wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
3791
3853
|
}
|
|
3792
3854
|
}
|
|
3793
3855
|
if (Symbol.dispose) Inbox.prototype[Symbol.dispose] = Inbox.prototype.free;
|
|
@@ -3817,6 +3879,24 @@ export class InboxState {
|
|
|
3817
3879
|
const ptr = this.__destroy_into_raw();
|
|
3818
3880
|
wasm.__wbg_inboxstate_free(ptr, 0);
|
|
3819
3881
|
}
|
|
3882
|
+
/**
|
|
3883
|
+
* @param {string} inbox_id
|
|
3884
|
+
* @param {Identifier} recovery_identifier
|
|
3885
|
+
* @param {Installation[]} installations
|
|
3886
|
+
* @param {Identifier[]} account_identifiers
|
|
3887
|
+
*/
|
|
3888
|
+
constructor(inbox_id, recovery_identifier, installations, account_identifiers) {
|
|
3889
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3890
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3891
|
+
const ptr1 = passArrayJsValueToWasm0(installations, wasm.__wbindgen_malloc);
|
|
3892
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3893
|
+
const ptr2 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
3894
|
+
const len2 = WASM_VECTOR_LEN;
|
|
3895
|
+
const ret = wasm.inboxstate_new(ptr0, len0, recovery_identifier, ptr1, len1, ptr2, len2);
|
|
3896
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3897
|
+
InboxStateFinalization.register(this, this.__wbg_ptr, this);
|
|
3898
|
+
return this;
|
|
3899
|
+
}
|
|
3820
3900
|
/**
|
|
3821
3901
|
* @returns {string}
|
|
3822
3902
|
*/
|
|
@@ -3887,24 +3967,6 @@ export class InboxState {
|
|
|
3887
3967
|
const len0 = WASM_VECTOR_LEN;
|
|
3888
3968
|
wasm.__wbg_set_inboxstate_accountIdentifiers(this.__wbg_ptr, ptr0, len0);
|
|
3889
3969
|
}
|
|
3890
|
-
/**
|
|
3891
|
-
* @param {string} inbox_id
|
|
3892
|
-
* @param {Identifier} recovery_identifier
|
|
3893
|
-
* @param {Installation[]} installations
|
|
3894
|
-
* @param {Identifier[]} account_identifiers
|
|
3895
|
-
*/
|
|
3896
|
-
constructor(inbox_id, recovery_identifier, installations, account_identifiers) {
|
|
3897
|
-
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3898
|
-
const len0 = WASM_VECTOR_LEN;
|
|
3899
|
-
const ptr1 = passArrayJsValueToWasm0(installations, wasm.__wbindgen_malloc);
|
|
3900
|
-
const len1 = WASM_VECTOR_LEN;
|
|
3901
|
-
const ptr2 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
|
|
3902
|
-
const len2 = WASM_VECTOR_LEN;
|
|
3903
|
-
const ret = wasm.inboxstate_new(ptr0, len0, recovery_identifier, ptr1, len1, ptr2, len2);
|
|
3904
|
-
this.__wbg_ptr = ret >>> 0;
|
|
3905
|
-
InboxStateFinalization.register(this, this.__wbg_ptr, this);
|
|
3906
|
-
return this;
|
|
3907
|
-
}
|
|
3908
3970
|
}
|
|
3909
3971
|
if (Symbol.dispose) InboxState.prototype[Symbol.dispose] = InboxState.prototype.free;
|
|
3910
3972
|
|
|
@@ -3940,6 +4002,19 @@ export class Installation {
|
|
|
3940
4002
|
const ptr = this.__destroy_into_raw();
|
|
3941
4003
|
wasm.__wbg_installation_free(ptr, 0);
|
|
3942
4004
|
}
|
|
4005
|
+
/**
|
|
4006
|
+
* @param {Uint8Array} bytes
|
|
4007
|
+
* @param {string} id
|
|
4008
|
+
* @param {bigint | null} [client_timestamp_ns]
|
|
4009
|
+
*/
|
|
4010
|
+
constructor(bytes, id, client_timestamp_ns) {
|
|
4011
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4012
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4013
|
+
const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
|
|
4014
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4015
|
+
InstallationFinalization.register(this, this.__wbg_ptr, this);
|
|
4016
|
+
return this;
|
|
4017
|
+
}
|
|
3943
4018
|
/**
|
|
3944
4019
|
* @returns {Uint8Array}
|
|
3945
4020
|
*/
|
|
@@ -3989,19 +4064,6 @@ export class Installation {
|
|
|
3989
4064
|
set clientTimestampNs(arg0) {
|
|
3990
4065
|
wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
3991
4066
|
}
|
|
3992
|
-
/**
|
|
3993
|
-
* @param {Uint8Array} bytes
|
|
3994
|
-
* @param {string} id
|
|
3995
|
-
* @param {bigint | null} [client_timestamp_ns]
|
|
3996
|
-
*/
|
|
3997
|
-
constructor(bytes, id, client_timestamp_ns) {
|
|
3998
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3999
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4000
|
-
const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
|
|
4001
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4002
|
-
InstallationFinalization.register(this, this.__wbg_ptr, this);
|
|
4003
|
-
return this;
|
|
4004
|
-
}
|
|
4005
4067
|
}
|
|
4006
4068
|
if (Symbol.dispose) Installation.prototype[Symbol.dispose] = Installation.prototype.free;
|
|
4007
4069
|
|
|
@@ -4022,13 +4084,6 @@ export class IntoUnderlyingByteSource {
|
|
|
4022
4084
|
const ptr = this.__destroy_into_raw();
|
|
4023
4085
|
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
4024
4086
|
}
|
|
4025
|
-
/**
|
|
4026
|
-
* @returns {ReadableStreamType}
|
|
4027
|
-
*/
|
|
4028
|
-
get type() {
|
|
4029
|
-
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
4030
|
-
return __wbindgen_enum_ReadableStreamType[ret];
|
|
4031
|
-
}
|
|
4032
4087
|
/**
|
|
4033
4088
|
* @returns {number}
|
|
4034
4089
|
*/
|
|
@@ -4036,6 +4091,14 @@ export class IntoUnderlyingByteSource {
|
|
|
4036
4091
|
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
4037
4092
|
return ret >>> 0;
|
|
4038
4093
|
}
|
|
4094
|
+
/**
|
|
4095
|
+
* @param {ReadableByteStreamController} controller
|
|
4096
|
+
* @returns {Promise<any>}
|
|
4097
|
+
*/
|
|
4098
|
+
pull(controller) {
|
|
4099
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
4100
|
+
return ret;
|
|
4101
|
+
}
|
|
4039
4102
|
/**
|
|
4040
4103
|
* @param {ReadableByteStreamController} controller
|
|
4041
4104
|
*/
|
|
@@ -4043,12 +4106,11 @@ export class IntoUnderlyingByteSource {
|
|
|
4043
4106
|
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
4044
4107
|
}
|
|
4045
4108
|
/**
|
|
4046
|
-
* @
|
|
4047
|
-
* @returns {Promise<any>}
|
|
4109
|
+
* @returns {ReadableStreamType}
|
|
4048
4110
|
*/
|
|
4049
|
-
|
|
4050
|
-
const ret = wasm.
|
|
4051
|
-
return ret;
|
|
4111
|
+
get type() {
|
|
4112
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
4113
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
4052
4114
|
}
|
|
4053
4115
|
cancel() {
|
|
4054
4116
|
const ptr = this.__destroy_into_raw();
|
|
@@ -4075,11 +4137,12 @@ export class IntoUnderlyingSink {
|
|
|
4075
4137
|
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
4076
4138
|
}
|
|
4077
4139
|
/**
|
|
4078
|
-
* @param {any}
|
|
4140
|
+
* @param {any} reason
|
|
4079
4141
|
* @returns {Promise<any>}
|
|
4080
4142
|
*/
|
|
4081
|
-
|
|
4082
|
-
const
|
|
4143
|
+
abort(reason) {
|
|
4144
|
+
const ptr = this.__destroy_into_raw();
|
|
4145
|
+
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
4083
4146
|
return ret;
|
|
4084
4147
|
}
|
|
4085
4148
|
/**
|
|
@@ -4091,12 +4154,11 @@ export class IntoUnderlyingSink {
|
|
|
4091
4154
|
return ret;
|
|
4092
4155
|
}
|
|
4093
4156
|
/**
|
|
4094
|
-
* @param {any}
|
|
4157
|
+
* @param {any} chunk
|
|
4095
4158
|
* @returns {Promise<any>}
|
|
4096
4159
|
*/
|
|
4097
|
-
|
|
4098
|
-
const
|
|
4099
|
-
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
4160
|
+
write(chunk) {
|
|
4161
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
4100
4162
|
return ret;
|
|
4101
4163
|
}
|
|
4102
4164
|
}
|
|
@@ -4229,27 +4291,27 @@ export class Lifetime {
|
|
|
4229
4291
|
* @returns {bigint}
|
|
4230
4292
|
*/
|
|
4231
4293
|
get not_before() {
|
|
4232
|
-
const ret = wasm.
|
|
4294
|
+
const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
|
|
4233
4295
|
return BigInt.asUintN(64, ret);
|
|
4234
4296
|
}
|
|
4235
4297
|
/**
|
|
4236
4298
|
* @param {bigint} arg0
|
|
4237
4299
|
*/
|
|
4238
4300
|
set not_before(arg0) {
|
|
4239
|
-
wasm.
|
|
4301
|
+
wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
|
|
4240
4302
|
}
|
|
4241
4303
|
/**
|
|
4242
4304
|
* @returns {bigint}
|
|
4243
4305
|
*/
|
|
4244
4306
|
get not_after() {
|
|
4245
|
-
const ret = wasm.
|
|
4307
|
+
const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
|
|
4246
4308
|
return BigInt.asUintN(64, ret);
|
|
4247
4309
|
}
|
|
4248
4310
|
/**
|
|
4249
4311
|
* @param {bigint} arg0
|
|
4250
4312
|
*/
|
|
4251
4313
|
set not_after(arg0) {
|
|
4252
|
-
wasm.
|
|
4314
|
+
wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
|
|
4253
4315
|
}
|
|
4254
4316
|
}
|
|
4255
4317
|
if (Symbol.dispose) Lifetime.prototype[Symbol.dispose] = Lifetime.prototype.free;
|
|
@@ -4392,6 +4454,29 @@ export class ListMessagesOptions {
|
|
|
4392
4454
|
const ptr = this.__destroy_into_raw();
|
|
4393
4455
|
wasm.__wbg_listmessagesoptions_free(ptr, 0);
|
|
4394
4456
|
}
|
|
4457
|
+
/**
|
|
4458
|
+
* @param {bigint | null} [sent_before_ns]
|
|
4459
|
+
* @param {bigint | null} [sent_after_ns]
|
|
4460
|
+
* @param {bigint | null} [limit]
|
|
4461
|
+
* @param {DeliveryStatus | null} [delivery_status]
|
|
4462
|
+
* @param {SortDirection | null} [direction]
|
|
4463
|
+
* @param {any[] | null} [content_types]
|
|
4464
|
+
* @param {any[] | null} [exclude_content_types]
|
|
4465
|
+
* @param {GroupMessageKind | null} [kind]
|
|
4466
|
+
* @param {string[] | null} [exclude_sender_inbox_ids]
|
|
4467
|
+
*/
|
|
4468
|
+
constructor(sent_before_ns, sent_after_ns, limit, delivery_status, direction, content_types, exclude_content_types, kind, exclude_sender_inbox_ids) {
|
|
4469
|
+
var ptr0 = isLikeNone(content_types) ? 0 : passArrayJsValueToWasm0(content_types, wasm.__wbindgen_malloc);
|
|
4470
|
+
var len0 = WASM_VECTOR_LEN;
|
|
4471
|
+
var ptr1 = isLikeNone(exclude_content_types) ? 0 : passArrayJsValueToWasm0(exclude_content_types, wasm.__wbindgen_malloc);
|
|
4472
|
+
var len1 = WASM_VECTOR_LEN;
|
|
4473
|
+
var ptr2 = isLikeNone(exclude_sender_inbox_ids) ? 0 : passArrayJsValueToWasm0(exclude_sender_inbox_ids, wasm.__wbindgen_malloc);
|
|
4474
|
+
var len2 = WASM_VECTOR_LEN;
|
|
4475
|
+
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);
|
|
4476
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4477
|
+
ListMessagesOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4478
|
+
return this;
|
|
4479
|
+
}
|
|
4395
4480
|
/**
|
|
4396
4481
|
* @returns {any[] | undefined}
|
|
4397
4482
|
*/
|
|
@@ -4530,29 +4615,6 @@ export class ListMessagesOptions {
|
|
|
4530
4615
|
var len0 = WASM_VECTOR_LEN;
|
|
4531
4616
|
wasm.__wbg_set_listmessagesoptions_excludeSenderInboxIds(this.__wbg_ptr, ptr0, len0);
|
|
4532
4617
|
}
|
|
4533
|
-
/**
|
|
4534
|
-
* @param {bigint | null} [sent_before_ns]
|
|
4535
|
-
* @param {bigint | null} [sent_after_ns]
|
|
4536
|
-
* @param {bigint | null} [limit]
|
|
4537
|
-
* @param {DeliveryStatus | null} [delivery_status]
|
|
4538
|
-
* @param {SortDirection | null} [direction]
|
|
4539
|
-
* @param {any[] | null} [content_types]
|
|
4540
|
-
* @param {any[] | null} [exclude_content_types]
|
|
4541
|
-
* @param {GroupMessageKind | null} [kind]
|
|
4542
|
-
* @param {string[] | null} [exclude_sender_inbox_ids]
|
|
4543
|
-
*/
|
|
4544
|
-
constructor(sent_before_ns, sent_after_ns, limit, delivery_status, direction, content_types, exclude_content_types, kind, exclude_sender_inbox_ids) {
|
|
4545
|
-
var ptr0 = isLikeNone(content_types) ? 0 : passArrayJsValueToWasm0(content_types, wasm.__wbindgen_malloc);
|
|
4546
|
-
var len0 = WASM_VECTOR_LEN;
|
|
4547
|
-
var ptr1 = isLikeNone(exclude_content_types) ? 0 : passArrayJsValueToWasm0(exclude_content_types, wasm.__wbindgen_malloc);
|
|
4548
|
-
var len1 = WASM_VECTOR_LEN;
|
|
4549
|
-
var ptr2 = isLikeNone(exclude_sender_inbox_ids) ? 0 : passArrayJsValueToWasm0(exclude_sender_inbox_ids, wasm.__wbindgen_malloc);
|
|
4550
|
-
var len2 = WASM_VECTOR_LEN;
|
|
4551
|
-
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);
|
|
4552
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4553
|
-
ListMessagesOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4554
|
-
return this;
|
|
4555
|
-
}
|
|
4556
4618
|
}
|
|
4557
4619
|
if (Symbol.dispose) ListMessagesOptions.prototype[Symbol.dispose] = ListMessagesOptions.prototype.free;
|
|
4558
4620
|
|
|
@@ -4575,6 +4637,17 @@ export class LogOptions {
|
|
|
4575
4637
|
const ptr = this.__destroy_into_raw();
|
|
4576
4638
|
wasm.__wbg_logoptions_free(ptr, 0);
|
|
4577
4639
|
}
|
|
4640
|
+
/**
|
|
4641
|
+
* @param {boolean} structured
|
|
4642
|
+
* @param {boolean} performance
|
|
4643
|
+
* @param {LogLevel | null} [level]
|
|
4644
|
+
*/
|
|
4645
|
+
constructor(structured, performance, level) {
|
|
4646
|
+
const ret = wasm.logoptions_new(structured, performance, isLikeNone(level) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(level) + 1 || 7) - 1));
|
|
4647
|
+
this.__wbg_ptr = ret >>> 0;
|
|
4648
|
+
LogOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4649
|
+
return this;
|
|
4650
|
+
}
|
|
4578
4651
|
/**
|
|
4579
4652
|
* enable structured JSON logging to stdout.Useful for third-party log viewers
|
|
4580
4653
|
* @returns {boolean}
|
|
@@ -4620,17 +4693,6 @@ export class LogOptions {
|
|
|
4620
4693
|
set level(arg0) {
|
|
4621
4694
|
wasm.__wbg_set_logoptions_level(this.__wbg_ptr, isLikeNone(arg0) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(arg0) + 1 || 7) - 1));
|
|
4622
4695
|
}
|
|
4623
|
-
/**
|
|
4624
|
-
* @param {boolean} structured
|
|
4625
|
-
* @param {boolean} performance
|
|
4626
|
-
* @param {LogLevel | null} [level]
|
|
4627
|
-
*/
|
|
4628
|
-
constructor(structured, performance, level) {
|
|
4629
|
-
const ret = wasm.logoptions_new(structured, performance, isLikeNone(level) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(level) + 1 || 7) - 1));
|
|
4630
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4631
|
-
LogOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
4632
|
-
return this;
|
|
4633
|
-
}
|
|
4634
4696
|
}
|
|
4635
4697
|
if (Symbol.dispose) LogOptions.prototype[Symbol.dispose] = LogOptions.prototype.free;
|
|
4636
4698
|
|
|
@@ -4992,7 +5054,7 @@ export class MetadataFieldChange {
|
|
|
4992
5054
|
set fieldName(arg0) {
|
|
4993
5055
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4994
5056
|
const len0 = WASM_VECTOR_LEN;
|
|
4995
|
-
wasm.
|
|
5057
|
+
wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
|
|
4996
5058
|
}
|
|
4997
5059
|
/**
|
|
4998
5060
|
* @returns {string | undefined}
|
|
@@ -5113,38 +5175,76 @@ export class Opfs {
|
|
|
5113
5175
|
/**
|
|
5114
5176
|
* @returns {Promise<void>}
|
|
5115
5177
|
*/
|
|
5116
|
-
static
|
|
5117
|
-
const ret = wasm.
|
|
5178
|
+
static wipeFiles() {
|
|
5179
|
+
const ret = wasm.opfs_wipeFiles();
|
|
5118
5180
|
return ret;
|
|
5119
5181
|
}
|
|
5120
5182
|
/**
|
|
5121
|
-
*
|
|
5122
|
-
* @
|
|
5183
|
+
* export db file with 'name'
|
|
5184
|
+
* @param {string} name
|
|
5185
|
+
* @returns {Uint8Array}
|
|
5123
5186
|
*/
|
|
5124
|
-
static
|
|
5125
|
-
const
|
|
5126
|
-
|
|
5187
|
+
static exportFile(name) {
|
|
5188
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5189
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5190
|
+
const ret = wasm.opfs_exportFile(ptr0, len0);
|
|
5191
|
+
if (ret[3]) {
|
|
5192
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5193
|
+
}
|
|
5194
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5195
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5196
|
+
return v2;
|
|
5127
5197
|
}
|
|
5128
5198
|
/**
|
|
5129
|
-
*
|
|
5130
|
-
* @
|
|
5199
|
+
* Adds n entries to the current pool.
|
|
5200
|
+
* @param {number} n
|
|
5201
|
+
* @returns {Promise<number>}
|
|
5131
5202
|
*/
|
|
5132
|
-
static
|
|
5133
|
-
const ret = wasm.
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5203
|
+
static addCapacity(n) {
|
|
5204
|
+
const ret = wasm.opfs_addCapacity(n);
|
|
5205
|
+
return ret;
|
|
5206
|
+
}
|
|
5207
|
+
/**
|
|
5208
|
+
* @returns {number}
|
|
5209
|
+
*/
|
|
5210
|
+
static getCapacity() {
|
|
5211
|
+
const ret = wasm.opfs_getCapacity();
|
|
5212
|
+
return ret >>> 0;
|
|
5213
|
+
}
|
|
5214
|
+
/**
|
|
5215
|
+
* get number of files in pool
|
|
5216
|
+
* @returns {number}
|
|
5217
|
+
*/
|
|
5218
|
+
static getFileCount() {
|
|
5219
|
+
const ret = wasm.opfs_getFileCount();
|
|
5220
|
+
return ret >>> 0;
|
|
5221
|
+
}
|
|
5222
|
+
/**
|
|
5223
|
+
* Removes up to n entries from the pool, with the caveat that it can only remove currently-unused entries.
|
|
5224
|
+
* @param {number} n
|
|
5225
|
+
* @returns {Promise<number>}
|
|
5226
|
+
*/
|
|
5227
|
+
static reduceCapacity(n) {
|
|
5228
|
+
const ret = wasm.opfs_reduceCapacity(n);
|
|
5229
|
+
return ret;
|
|
5140
5230
|
}
|
|
5141
5231
|
/**
|
|
5142
5232
|
* @returns {Promise<void>}
|
|
5143
5233
|
*/
|
|
5144
|
-
static
|
|
5145
|
-
const ret = wasm.
|
|
5234
|
+
static init_sqlite_opfs() {
|
|
5235
|
+
const ret = wasm.opfs_init_sqlite_opfs();
|
|
5146
5236
|
return ret;
|
|
5147
5237
|
}
|
|
5238
|
+
/**
|
|
5239
|
+
* list files in current pool
|
|
5240
|
+
* @returns {string[]}
|
|
5241
|
+
*/
|
|
5242
|
+
static getFileNames() {
|
|
5243
|
+
const ret = wasm.opfs_getFileNames();
|
|
5244
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
5245
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
5246
|
+
return v1;
|
|
5247
|
+
}
|
|
5148
5248
|
/**
|
|
5149
5249
|
* If a virtual file exists with the given name, disassociates it from the pool and returns true, else returns false without side effects.
|
|
5150
5250
|
* @param {string} name
|
|
@@ -5160,15 +5260,26 @@ export class Opfs {
|
|
|
5160
5260
|
return ret[0] !== 0;
|
|
5161
5261
|
}
|
|
5162
5262
|
/**
|
|
5163
|
-
*
|
|
5164
|
-
* @returns {string
|
|
5263
|
+
* gets the error from Opfs, if any.
|
|
5264
|
+
* @returns {string | undefined}
|
|
5165
5265
|
*/
|
|
5166
|
-
static
|
|
5167
|
-
const ret = wasm.
|
|
5168
|
-
|
|
5169
|
-
|
|
5266
|
+
static error() {
|
|
5267
|
+
const ret = wasm.opfs_error();
|
|
5268
|
+
let v1;
|
|
5269
|
+
if (ret[0] !== 0) {
|
|
5270
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
5271
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5272
|
+
}
|
|
5170
5273
|
return v1;
|
|
5171
5274
|
}
|
|
5275
|
+
/**
|
|
5276
|
+
* Check if the global OPFS object has been initialized
|
|
5277
|
+
* @returns {boolean}
|
|
5278
|
+
*/
|
|
5279
|
+
static exists() {
|
|
5280
|
+
const ret = wasm.opfs_exists();
|
|
5281
|
+
return ret !== 0;
|
|
5282
|
+
}
|
|
5172
5283
|
/**
|
|
5173
5284
|
* import a db file at 'path'
|
|
5174
5285
|
* @param {string} path
|
|
@@ -5184,55 +5295,6 @@ export class Opfs {
|
|
|
5184
5295
|
throw takeFromExternrefTable0(ret[0]);
|
|
5185
5296
|
}
|
|
5186
5297
|
}
|
|
5187
|
-
/**
|
|
5188
|
-
* export db file with 'name'
|
|
5189
|
-
* @param {string} name
|
|
5190
|
-
* @returns {Uint8Array}
|
|
5191
|
-
*/
|
|
5192
|
-
static exportFile(name) {
|
|
5193
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5194
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5195
|
-
const ret = wasm.opfs_exportFile(ptr0, len0);
|
|
5196
|
-
if (ret[3]) {
|
|
5197
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
5198
|
-
}
|
|
5199
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
5200
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
5201
|
-
return v2;
|
|
5202
|
-
}
|
|
5203
|
-
/**
|
|
5204
|
-
* get number of files in pool
|
|
5205
|
-
* @returns {number}
|
|
5206
|
-
*/
|
|
5207
|
-
static getFileCount() {
|
|
5208
|
-
const ret = wasm.opfs_getFileCount();
|
|
5209
|
-
return ret >>> 0;
|
|
5210
|
-
}
|
|
5211
|
-
/**
|
|
5212
|
-
* @returns {number}
|
|
5213
|
-
*/
|
|
5214
|
-
static getCapacity() {
|
|
5215
|
-
const ret = wasm.opfs_getCapacity();
|
|
5216
|
-
return ret >>> 0;
|
|
5217
|
-
}
|
|
5218
|
-
/**
|
|
5219
|
-
* Adds n entries to the current pool.
|
|
5220
|
-
* @param {number} n
|
|
5221
|
-
* @returns {Promise<number>}
|
|
5222
|
-
*/
|
|
5223
|
-
static addCapacity(n) {
|
|
5224
|
-
const ret = wasm.opfs_addCapacity(n);
|
|
5225
|
-
return ret;
|
|
5226
|
-
}
|
|
5227
|
-
/**
|
|
5228
|
-
* Removes up to n entries from the pool, with the caveat that it can only remove currently-unused entries.
|
|
5229
|
-
* @param {number} n
|
|
5230
|
-
* @returns {Promise<number>}
|
|
5231
|
-
*/
|
|
5232
|
-
static reduceCapacity(n) {
|
|
5233
|
-
const ret = wasm.opfs_reduceCapacity(n);
|
|
5234
|
-
return ret;
|
|
5235
|
-
}
|
|
5236
5298
|
}
|
|
5237
5299
|
if (Symbol.dispose) Opfs.prototype[Symbol.dispose] = Opfs.prototype.free;
|
|
5238
5300
|
|
|
@@ -5281,6 +5343,22 @@ export class PermissionPolicySet {
|
|
|
5281
5343
|
const ptr = this.__destroy_into_raw();
|
|
5282
5344
|
wasm.__wbg_permissionpolicyset_free(ptr, 0);
|
|
5283
5345
|
}
|
|
5346
|
+
/**
|
|
5347
|
+
* @param {PermissionPolicy} add_member_policy
|
|
5348
|
+
* @param {PermissionPolicy} remove_member_policy
|
|
5349
|
+
* @param {PermissionPolicy} add_admin_policy
|
|
5350
|
+
* @param {PermissionPolicy} remove_admin_policy
|
|
5351
|
+
* @param {PermissionPolicy} update_group_name_policy
|
|
5352
|
+
* @param {PermissionPolicy} update_group_description_policy
|
|
5353
|
+
* @param {PermissionPolicy} update_group_image_url_square_policy
|
|
5354
|
+
* @param {PermissionPolicy} update_message_disappearing_policy
|
|
5355
|
+
*/
|
|
5356
|
+
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) {
|
|
5357
|
+
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);
|
|
5358
|
+
this.__wbg_ptr = ret >>> 0;
|
|
5359
|
+
PermissionPolicySetFinalization.register(this, this.__wbg_ptr, this);
|
|
5360
|
+
return this;
|
|
5361
|
+
}
|
|
5284
5362
|
/**
|
|
5285
5363
|
* @returns {PermissionPolicy}
|
|
5286
5364
|
*/
|
|
@@ -5385,22 +5463,6 @@ export class PermissionPolicySet {
|
|
|
5385
5463
|
set updateMessageDisappearingPolicy(arg0) {
|
|
5386
5464
|
wasm.__wbg_set_permissionpolicyset_updateMessageDisappearingPolicy(this.__wbg_ptr, arg0);
|
|
5387
5465
|
}
|
|
5388
|
-
/**
|
|
5389
|
-
* @param {PermissionPolicy} add_member_policy
|
|
5390
|
-
* @param {PermissionPolicy} remove_member_policy
|
|
5391
|
-
* @param {PermissionPolicy} add_admin_policy
|
|
5392
|
-
* @param {PermissionPolicy} remove_admin_policy
|
|
5393
|
-
* @param {PermissionPolicy} update_group_name_policy
|
|
5394
|
-
* @param {PermissionPolicy} update_group_description_policy
|
|
5395
|
-
* @param {PermissionPolicy} update_group_image_url_square_policy
|
|
5396
|
-
* @param {PermissionPolicy} update_message_disappearing_policy
|
|
5397
|
-
*/
|
|
5398
|
-
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) {
|
|
5399
|
-
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);
|
|
5400
|
-
this.__wbg_ptr = ret >>> 0;
|
|
5401
|
-
PermissionPolicySetFinalization.register(this, this.__wbg_ptr, this);
|
|
5402
|
-
return this;
|
|
5403
|
-
}
|
|
5404
5466
|
}
|
|
5405
5467
|
if (Symbol.dispose) PermissionPolicySet.prototype[Symbol.dispose] = PermissionPolicySet.prototype.free;
|
|
5406
5468
|
|
|
@@ -5450,7 +5512,7 @@ export class Reaction {
|
|
|
5450
5512
|
set reference(arg0) {
|
|
5451
5513
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5452
5514
|
const len0 = WASM_VECTOR_LEN;
|
|
5453
|
-
wasm.
|
|
5515
|
+
wasm.__wbg_set_reaction_reference(this.__wbg_ptr, ptr0, len0);
|
|
5454
5516
|
}
|
|
5455
5517
|
/**
|
|
5456
5518
|
* @returns {string}
|
|
@@ -5592,7 +5654,7 @@ export class ReactionPayload {
|
|
|
5592
5654
|
set reference(arg0) {
|
|
5593
5655
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5594
5656
|
const len0 = WASM_VECTOR_LEN;
|
|
5595
|
-
wasm.
|
|
5657
|
+
wasm.__wbg_set_reaction_reference(this.__wbg_ptr, ptr0, len0);
|
|
5596
5658
|
}
|
|
5597
5659
|
/**
|
|
5598
5660
|
* @returns {string}
|
|
@@ -5743,7 +5805,7 @@ export class RemoteAttachment {
|
|
|
5743
5805
|
set url(arg0) {
|
|
5744
5806
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5745
5807
|
const len0 = WASM_VECTOR_LEN;
|
|
5746
|
-
wasm.
|
|
5808
|
+
wasm.__wbg_set_remoteattachment_url(this.__wbg_ptr, ptr0, len0);
|
|
5747
5809
|
}
|
|
5748
5810
|
/**
|
|
5749
5811
|
* @returns {string}
|
|
@@ -5766,7 +5828,7 @@ export class RemoteAttachment {
|
|
|
5766
5828
|
set contentDigest(arg0) {
|
|
5767
5829
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5768
5830
|
const len0 = WASM_VECTOR_LEN;
|
|
5769
|
-
wasm.
|
|
5831
|
+
wasm.__wbg_set_remoteattachment_contentDigest(this.__wbg_ptr, ptr0, len0);
|
|
5770
5832
|
}
|
|
5771
5833
|
/**
|
|
5772
5834
|
* @returns {Uint8Array}
|
|
@@ -5783,7 +5845,7 @@ export class RemoteAttachment {
|
|
|
5783
5845
|
set secret(arg0) {
|
|
5784
5846
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
5785
5847
|
const len0 = WASM_VECTOR_LEN;
|
|
5786
|
-
wasm.
|
|
5848
|
+
wasm.__wbg_set_remoteattachment_secret(this.__wbg_ptr, ptr0, len0);
|
|
5787
5849
|
}
|
|
5788
5850
|
/**
|
|
5789
5851
|
* @returns {Uint8Array}
|
|
@@ -5840,20 +5902,20 @@ export class RemoteAttachment {
|
|
|
5840
5902
|
set scheme(arg0) {
|
|
5841
5903
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5842
5904
|
const len0 = WASM_VECTOR_LEN;
|
|
5843
|
-
wasm.
|
|
5905
|
+
wasm.__wbg_set_remoteattachment_scheme(this.__wbg_ptr, ptr0, len0);
|
|
5844
5906
|
}
|
|
5845
5907
|
/**
|
|
5846
5908
|
* @returns {bigint}
|
|
5847
5909
|
*/
|
|
5848
5910
|
get contentLength() {
|
|
5849
|
-
const ret = wasm.
|
|
5911
|
+
const ret = wasm.__wbg_get_remoteattachment_contentLength(this.__wbg_ptr);
|
|
5850
5912
|
return ret;
|
|
5851
5913
|
}
|
|
5852
5914
|
/**
|
|
5853
5915
|
* @param {bigint} arg0
|
|
5854
5916
|
*/
|
|
5855
5917
|
set contentLength(arg0) {
|
|
5856
|
-
wasm.
|
|
5918
|
+
wasm.__wbg_set_remoteattachment_contentLength(this.__wbg_ptr, arg0);
|
|
5857
5919
|
}
|
|
5858
5920
|
/**
|
|
5859
5921
|
* @returns {string | undefined}
|
|
@@ -6095,6 +6157,15 @@ export class SendMessageOpts {
|
|
|
6095
6157
|
const ptr = this.__destroy_into_raw();
|
|
6096
6158
|
wasm.__wbg_sendmessageopts_free(ptr, 0);
|
|
6097
6159
|
}
|
|
6160
|
+
/**
|
|
6161
|
+
* @param {boolean} should_push
|
|
6162
|
+
*/
|
|
6163
|
+
constructor(should_push) {
|
|
6164
|
+
const ret = wasm.sendmessageopts_new(should_push);
|
|
6165
|
+
this.__wbg_ptr = ret >>> 0;
|
|
6166
|
+
SendMessageOptsFinalization.register(this, this.__wbg_ptr, this);
|
|
6167
|
+
return this;
|
|
6168
|
+
}
|
|
6098
6169
|
/**
|
|
6099
6170
|
* @returns {boolean}
|
|
6100
6171
|
*/
|
|
@@ -6143,6 +6214,17 @@ export class SignatureRequestHandle {
|
|
|
6143
6214
|
const ret = wasm.signaturerequesthandle_signatureText(this.__wbg_ptr);
|
|
6144
6215
|
return ret;
|
|
6145
6216
|
}
|
|
6217
|
+
/**
|
|
6218
|
+
* @param {Identifier} account_identifier
|
|
6219
|
+
* @param {Uint8Array} signature_bytes
|
|
6220
|
+
* @param {bigint} chain_id
|
|
6221
|
+
* @param {bigint | null} [block_number]
|
|
6222
|
+
* @returns {Promise<void>}
|
|
6223
|
+
*/
|
|
6224
|
+
addScwSignature(account_identifier, signature_bytes, chain_id, block_number) {
|
|
6225
|
+
const ret = wasm.signaturerequesthandle_addScwSignature(this.__wbg_ptr, account_identifier, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
6226
|
+
return ret;
|
|
6227
|
+
}
|
|
6146
6228
|
/**
|
|
6147
6229
|
* @param {Uint8Array} signature_bytes
|
|
6148
6230
|
* @returns {Promise<void>}
|
|
@@ -6161,17 +6243,6 @@ export class SignatureRequestHandle {
|
|
|
6161
6243
|
const ret = wasm.signaturerequesthandle_addPasskeySignature(this.__wbg_ptr, ptr0);
|
|
6162
6244
|
return ret;
|
|
6163
6245
|
}
|
|
6164
|
-
/**
|
|
6165
|
-
* @param {Identifier} account_identifier
|
|
6166
|
-
* @param {Uint8Array} signature_bytes
|
|
6167
|
-
* @param {bigint} chain_id
|
|
6168
|
-
* @param {bigint | null} [block_number]
|
|
6169
|
-
* @returns {Promise<void>}
|
|
6170
|
-
*/
|
|
6171
|
-
addScwSignature(account_identifier, signature_bytes, chain_id, block_number) {
|
|
6172
|
-
const ret = wasm.signaturerequesthandle_addScwSignature(this.__wbg_ptr, account_identifier, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
6173
|
-
return ret;
|
|
6174
|
-
}
|
|
6175
6246
|
}
|
|
6176
6247
|
if (Symbol.dispose) SignatureRequestHandle.prototype[Symbol.dispose] = SignatureRequestHandle.prototype.free;
|
|
6177
6248
|
|
|
@@ -6200,13 +6271,6 @@ export class StreamCloser {
|
|
|
6200
6271
|
const ptr = this.__destroy_into_raw();
|
|
6201
6272
|
wasm.__wbg_streamcloser_free(ptr, 0);
|
|
6202
6273
|
}
|
|
6203
|
-
/**
|
|
6204
|
-
* Signal the stream to end
|
|
6205
|
-
* Does not wait for the stream to end.
|
|
6206
|
-
*/
|
|
6207
|
-
end() {
|
|
6208
|
-
wasm.streamcloser_end(this.__wbg_ptr);
|
|
6209
|
-
}
|
|
6210
6274
|
/**
|
|
6211
6275
|
* End the stream and `await` for it to shutdown
|
|
6212
6276
|
* Returns the `Result` of the task.
|
|
@@ -6224,6 +6288,13 @@ export class StreamCloser {
|
|
|
6224
6288
|
const ret = wasm.streamcloser_waitForReady(this.__wbg_ptr);
|
|
6225
6289
|
return ret;
|
|
6226
6290
|
}
|
|
6291
|
+
/**
|
|
6292
|
+
* Signal the stream to end
|
|
6293
|
+
* Does not wait for the stream to end.
|
|
6294
|
+
*/
|
|
6295
|
+
end() {
|
|
6296
|
+
wasm.streamcloser_end(this.__wbg_ptr);
|
|
6297
|
+
}
|
|
6227
6298
|
/**
|
|
6228
6299
|
* Checks if this stream is closed
|
|
6229
6300
|
* @returns {boolean}
|
|
@@ -6281,7 +6352,7 @@ export class TextContent {
|
|
|
6281
6352
|
set content(arg0) {
|
|
6282
6353
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6283
6354
|
const len0 = WASM_VECTOR_LEN;
|
|
6284
|
-
wasm.
|
|
6355
|
+
wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
|
|
6285
6356
|
}
|
|
6286
6357
|
}
|
|
6287
6358
|
if (Symbol.dispose) TextContent.prototype[Symbol.dispose] = TextContent.prototype.free;
|
|
@@ -6332,7 +6403,7 @@ export class TransactionMetadata {
|
|
|
6332
6403
|
set transactionType(arg0) {
|
|
6333
6404
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6334
6405
|
const len0 = WASM_VECTOR_LEN;
|
|
6335
|
-
wasm.
|
|
6406
|
+
wasm.__wbg_set_remoteattachment_url(this.__wbg_ptr, ptr0, len0);
|
|
6336
6407
|
}
|
|
6337
6408
|
/**
|
|
6338
6409
|
* @returns {string}
|
|
@@ -6355,7 +6426,7 @@ export class TransactionMetadata {
|
|
|
6355
6426
|
set currency(arg0) {
|
|
6356
6427
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6357
6428
|
const len0 = WASM_VECTOR_LEN;
|
|
6358
|
-
wasm.
|
|
6429
|
+
wasm.__wbg_set_remoteattachment_contentDigest(this.__wbg_ptr, ptr0, len0);
|
|
6359
6430
|
}
|
|
6360
6431
|
/**
|
|
6361
6432
|
* @returns {number}
|
|
@@ -6404,7 +6475,7 @@ export class TransactionMetadata {
|
|
|
6404
6475
|
set fromAddress(arg0) {
|
|
6405
6476
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6406
6477
|
const len0 = WASM_VECTOR_LEN;
|
|
6407
|
-
wasm.
|
|
6478
|
+
wasm.__wbg_set_remoteattachment_secret(this.__wbg_ptr, ptr0, len0);
|
|
6408
6479
|
}
|
|
6409
6480
|
/**
|
|
6410
6481
|
* @returns {string}
|
|
@@ -6427,7 +6498,7 @@ export class TransactionMetadata {
|
|
|
6427
6498
|
set toAddress(arg0) {
|
|
6428
6499
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6429
6500
|
const len0 = WASM_VECTOR_LEN;
|
|
6430
|
-
wasm.
|
|
6501
|
+
wasm.__wbg_set_remoteattachment_salt(this.__wbg_ptr, ptr0, len0);
|
|
6431
6502
|
}
|
|
6432
6503
|
}
|
|
6433
6504
|
if (Symbol.dispose) TransactionMetadata.prototype[Symbol.dispose] = TransactionMetadata.prototype.free;
|
|
@@ -6955,6 +7026,10 @@ function __wbg_get_imports() {
|
|
|
6955
7026
|
const ret = GroupMetadata.__wrap(arg0);
|
|
6956
7027
|
return ret;
|
|
6957
7028
|
};
|
|
7029
|
+
imports.wbg.__wbg_groupsyncsummary_new = function(arg0) {
|
|
7030
|
+
const ret = GroupSyncSummary.__wrap(arg0);
|
|
7031
|
+
return ret;
|
|
7032
|
+
};
|
|
6958
7033
|
imports.wbg.__wbg_has_6a9bff5f4208cfca = function(arg0, arg1) {
|
|
6959
7034
|
const ret = arg0.has(arg1);
|
|
6960
7035
|
return ret;
|
|
@@ -7144,7 +7219,7 @@ function __wbg_get_imports() {
|
|
|
7144
7219
|
const a = state0.a;
|
|
7145
7220
|
state0.a = 0;
|
|
7146
7221
|
try {
|
|
7147
|
-
return
|
|
7222
|
+
return __wbg_adapter_848(a, state0.b, arg0, arg1);
|
|
7148
7223
|
} finally {
|
|
7149
7224
|
state0.a = a;
|
|
7150
7225
|
}
|
|
@@ -7626,14 +7701,9 @@ function __wbg_get_imports() {
|
|
|
7626
7701
|
const ret = XmtpCursor.__unwrap(arg0);
|
|
7627
7702
|
return ret;
|
|
7628
7703
|
};
|
|
7629
|
-
imports.wbg.
|
|
7630
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
7631
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7632
|
-
return ret;
|
|
7633
|
-
};
|
|
7634
|
-
imports.wbg.__wbindgen_cast_1b7f7f568e748ae7 = function(arg0, arg1) {
|
|
7635
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 6863, function: Function { arguments: [], shim_idx: 6864, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7636
|
-
const ret = makeMutClosure(arg0, arg1, 6863, __wbg_adapter_19);
|
|
7704
|
+
imports.wbg.__wbindgen_cast_151449bbdd082f72 = function(arg0, arg1) {
|
|
7705
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7199, function: Function { arguments: [Externref], shim_idx: 7210, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7706
|
+
const ret = makeMutClosure(arg0, arg1, 7199, __wbg_adapter_35);
|
|
7637
7707
|
return ret;
|
|
7638
7708
|
};
|
|
7639
7709
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
@@ -7641,11 +7711,6 @@ function __wbg_get_imports() {
|
|
|
7641
7711
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
7642
7712
|
return ret;
|
|
7643
7713
|
};
|
|
7644
|
-
imports.wbg.__wbindgen_cast_3bc3aaada66c6346 = function(arg0, arg1) {
|
|
7645
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 6474, function: Function { arguments: [], shim_idx: 6475, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7646
|
-
const ret = makeMutClosure(arg0, arg1, 6474, __wbg_adapter_8);
|
|
7647
|
-
return ret;
|
|
7648
|
-
};
|
|
7649
7714
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
7650
7715
|
// Cast intrinsic for `U64 -> Externref`.
|
|
7651
7716
|
const ret = BigInt.asUintN(64, arg0);
|
|
@@ -7658,6 +7723,11 @@ function __wbg_get_imports() {
|
|
|
7658
7723
|
const ret = v0;
|
|
7659
7724
|
return ret;
|
|
7660
7725
|
};
|
|
7726
|
+
imports.wbg.__wbindgen_cast_62db4f9293d6826e = function(arg0, arg1) {
|
|
7727
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7186, function: Function { arguments: [], shim_idx: 7187, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7728
|
+
const ret = makeMutClosure(arg0, arg1, 7186, __wbg_adapter_24);
|
|
7729
|
+
return ret;
|
|
7730
|
+
};
|
|
7661
7731
|
imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
|
|
7662
7732
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
7663
7733
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
@@ -7677,6 +7747,11 @@ function __wbg_get_imports() {
|
|
|
7677
7747
|
const ret = arg0;
|
|
7678
7748
|
return ret;
|
|
7679
7749
|
};
|
|
7750
|
+
imports.wbg.__wbindgen_cast_b82bb237d0f501f8 = function(arg0, arg1) {
|
|
7751
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4926, function: Function { arguments: [], shim_idx: 4927, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7752
|
+
const ret = makeMutClosure(arg0, arg1, 4926, __wbg_adapter_19);
|
|
7753
|
+
return ret;
|
|
7754
|
+
};
|
|
7680
7755
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
7681
7756
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
7682
7757
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
@@ -7701,9 +7776,9 @@ function __wbg_get_imports() {
|
|
|
7701
7776
|
const ret = v0;
|
|
7702
7777
|
return ret;
|
|
7703
7778
|
};
|
|
7704
|
-
imports.wbg.
|
|
7705
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
7706
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7779
|
+
imports.wbg.__wbindgen_cast_fb5f939437ad8d97 = function(arg0, arg1) {
|
|
7780
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 6795, function: Function { arguments: [], shim_idx: 6796, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7781
|
+
const ret = makeMutClosure(arg0, arg1, 6795, __wbg_adapter_12);
|
|
7707
7782
|
return ret;
|
|
7708
7783
|
};
|
|
7709
7784
|
imports.wbg.__wbindgen_init_externref_table = function() {
|