@xmtp/wasm-bindings 1.9.0-rc4 → 1.9.0-rc5
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 +278 -286
- package/dist/bindings_wasm.js +341 -395
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +45 -50
- package/package.json +1 -1
package/dist/bindings_wasm.js
CHANGED
|
@@ -224,6 +224,13 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
224
224
|
CLOSURE_DTORS.register(real, state, state);
|
|
225
225
|
return real;
|
|
226
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* @returns {ContentTypeId}
|
|
229
|
+
*/
|
|
230
|
+
export function contentTypeReadReceipt() {
|
|
231
|
+
const ret = wasm.contentTypeReadReceipt();
|
|
232
|
+
return ret;
|
|
233
|
+
}
|
|
227
234
|
|
|
228
235
|
function takeFromExternrefTable0(idx) {
|
|
229
236
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
@@ -231,11 +238,23 @@ function takeFromExternrefTable0(idx) {
|
|
|
231
238
|
return value;
|
|
232
239
|
}
|
|
233
240
|
/**
|
|
234
|
-
* @param {
|
|
241
|
+
* @param {ReadReceipt} read_receipt
|
|
235
242
|
* @returns {EncodedContent}
|
|
236
243
|
*/
|
|
237
|
-
export function
|
|
238
|
-
const ret = wasm.
|
|
244
|
+
export function encodeReadReceipt(read_receipt) {
|
|
245
|
+
const ret = wasm.encodeReadReceipt(read_receipt);
|
|
246
|
+
if (ret[2]) {
|
|
247
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
248
|
+
}
|
|
249
|
+
return takeFromExternrefTable0(ret[0]);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @param {TransactionReference} transaction_reference
|
|
254
|
+
* @returns {EncodedContent}
|
|
255
|
+
*/
|
|
256
|
+
export function encodeTransactionReference(transaction_reference) {
|
|
257
|
+
const ret = wasm.encodeTransactionReference(transaction_reference);
|
|
239
258
|
if (ret[2]) {
|
|
240
259
|
throw takeFromExternrefTable0(ret[1]);
|
|
241
260
|
}
|
|
@@ -245,25 +264,25 @@ export function encodeAttachment(attachment) {
|
|
|
245
264
|
/**
|
|
246
265
|
* @returns {ContentTypeId}
|
|
247
266
|
*/
|
|
248
|
-
export function
|
|
249
|
-
const ret = wasm.
|
|
267
|
+
export function contentTypeTransactionReference() {
|
|
268
|
+
const ret = wasm.contentTypeTransactionReference();
|
|
250
269
|
return ret;
|
|
251
270
|
}
|
|
252
271
|
|
|
253
272
|
/**
|
|
254
273
|
* @returns {ContentTypeId}
|
|
255
274
|
*/
|
|
256
|
-
export function
|
|
257
|
-
const ret = wasm.
|
|
275
|
+
export function contentTypeMultiRemoteAttachment() {
|
|
276
|
+
const ret = wasm.contentTypeMultiRemoteAttachment();
|
|
258
277
|
return ret;
|
|
259
278
|
}
|
|
260
279
|
|
|
261
280
|
/**
|
|
262
|
-
* @param {
|
|
281
|
+
* @param {MultiRemoteAttachment} multi_remote_attachment
|
|
263
282
|
* @returns {EncodedContent}
|
|
264
283
|
*/
|
|
265
|
-
export function
|
|
266
|
-
const ret = wasm.
|
|
284
|
+
export function encodeMultiRemoteAttachment(multi_remote_attachment) {
|
|
285
|
+
const ret = wasm.encodeMultiRemoteAttachment(multi_remote_attachment);
|
|
267
286
|
if (ret[2]) {
|
|
268
287
|
throw takeFromExternrefTable0(ret[1]);
|
|
269
288
|
}
|
|
@@ -273,93 +292,156 @@ export function encodeReadReceipt(read_receipt) {
|
|
|
273
292
|
/**
|
|
274
293
|
* @returns {ContentTypeId}
|
|
275
294
|
*/
|
|
276
|
-
export function
|
|
277
|
-
const ret = wasm.
|
|
295
|
+
export function contentTypeReply() {
|
|
296
|
+
const ret = wasm.contentTypeReply();
|
|
278
297
|
return ret;
|
|
279
298
|
}
|
|
280
299
|
|
|
300
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
301
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
302
|
+
for (let i = 0; i < array.length; i++) {
|
|
303
|
+
const add = addToExternrefTable0(array[i]);
|
|
304
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
305
|
+
}
|
|
306
|
+
WASM_VECTOR_LEN = array.length;
|
|
307
|
+
return ptr;
|
|
308
|
+
}
|
|
281
309
|
/**
|
|
282
|
-
* @param {
|
|
283
|
-
* @
|
|
310
|
+
* @param {string} host
|
|
311
|
+
* @param {string | null | undefined} gatewayHost
|
|
312
|
+
* @param {string[]} inboxIds
|
|
313
|
+
* @returns {Promise<InboxState[]>}
|
|
284
314
|
*/
|
|
285
|
-
export function
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
315
|
+
export function inboxStateFromInboxIds(host, gatewayHost, inboxIds) {
|
|
316
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
317
|
+
const len0 = WASM_VECTOR_LEN;
|
|
318
|
+
var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
319
|
+
var len1 = WASM_VECTOR_LEN;
|
|
320
|
+
const ptr2 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
|
|
321
|
+
const len2 = WASM_VECTOR_LEN;
|
|
322
|
+
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
323
|
+
return ret;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @param {MetadataField} field
|
|
328
|
+
* @returns {string}
|
|
329
|
+
*/
|
|
330
|
+
export function metadataFieldName(field) {
|
|
331
|
+
let deferred1_0;
|
|
332
|
+
let deferred1_1;
|
|
333
|
+
try {
|
|
334
|
+
const ret = wasm.metadataFieldName(field);
|
|
335
|
+
deferred1_0 = ret[0];
|
|
336
|
+
deferred1_1 = ret[1];
|
|
337
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
338
|
+
} finally {
|
|
339
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
289
340
|
}
|
|
290
|
-
return takeFromExternrefTable0(ret[0]);
|
|
291
341
|
}
|
|
292
342
|
|
|
293
343
|
/**
|
|
294
|
-
*
|
|
344
|
+
* Initialize the OPFS SQLite VFS if not already initialized.
|
|
345
|
+
* This must be called before using other OPFS functions.
|
|
346
|
+
* @returns {Promise<void>}
|
|
295
347
|
*/
|
|
296
|
-
export function
|
|
297
|
-
const ret = wasm.
|
|
348
|
+
export function opfsInit() {
|
|
349
|
+
const ret = wasm.opfsInit();
|
|
298
350
|
return ret;
|
|
299
351
|
}
|
|
300
352
|
|
|
301
353
|
/**
|
|
302
|
-
*
|
|
303
|
-
* @returns {
|
|
354
|
+
* Get the current capacity of the OPFS file pool.
|
|
355
|
+
* @returns {Promise<number>}
|
|
304
356
|
*/
|
|
305
|
-
export function
|
|
306
|
-
const ret = wasm.
|
|
307
|
-
|
|
308
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
309
|
-
}
|
|
310
|
-
return takeFromExternrefTable0(ret[0]);
|
|
357
|
+
export function opfsPoolCapacity() {
|
|
358
|
+
const ret = wasm.opfsPoolCapacity();
|
|
359
|
+
return ret;
|
|
311
360
|
}
|
|
312
361
|
|
|
313
362
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
363
|
+
* Delete all database files from OPFS.
|
|
364
|
+
* Note: All databases must be closed before calling this function.
|
|
365
|
+
* @returns {Promise<void>}
|
|
316
366
|
*/
|
|
317
|
-
export function
|
|
318
|
-
const
|
|
367
|
+
export function opfsClearAll() {
|
|
368
|
+
const ret = wasm.opfsClearAll();
|
|
369
|
+
return ret;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Export a database file from OPFS as a byte array.
|
|
374
|
+
* This can be used to backup or transfer a database.
|
|
375
|
+
* Note: The database should be closed before exporting for consistency.
|
|
376
|
+
* @param {string} filename
|
|
377
|
+
* @returns {Promise<Uint8Array>}
|
|
378
|
+
*/
|
|
379
|
+
export function opfsExportDb(filename) {
|
|
380
|
+
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
319
381
|
const len0 = WASM_VECTOR_LEN;
|
|
320
|
-
const ret = wasm.
|
|
321
|
-
|
|
322
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
323
|
-
}
|
|
324
|
-
return takeFromExternrefTable0(ret[0]);
|
|
382
|
+
const ret = wasm.opfsExportDb(ptr0, len0);
|
|
383
|
+
return ret;
|
|
325
384
|
}
|
|
326
385
|
|
|
327
386
|
/**
|
|
328
|
-
*
|
|
387
|
+
* Import a database from a byte array into OPFS.
|
|
388
|
+
* This will overwrite any existing database with the same name.
|
|
389
|
+
* The byte array must contain a valid SQLite database.
|
|
390
|
+
* Note: Any existing database with the same name must be closed before importing.
|
|
391
|
+
* @param {string} filename
|
|
392
|
+
* @param {Uint8Array} data
|
|
393
|
+
* @returns {Promise<void>}
|
|
329
394
|
*/
|
|
330
|
-
export function
|
|
331
|
-
const
|
|
395
|
+
export function opfsImportDb(filename, data) {
|
|
396
|
+
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
397
|
+
const len0 = WASM_VECTOR_LEN;
|
|
398
|
+
const ret = wasm.opfsImportDb(ptr0, len0, data);
|
|
332
399
|
return ret;
|
|
333
400
|
}
|
|
334
401
|
|
|
335
402
|
/**
|
|
336
|
-
*
|
|
403
|
+
* List all database files stored in OPFS.
|
|
404
|
+
* Returns an array of file names.
|
|
405
|
+
* @returns {Promise<string[]>}
|
|
337
406
|
*/
|
|
338
|
-
export function
|
|
339
|
-
const ret = wasm.
|
|
407
|
+
export function opfsListFiles() {
|
|
408
|
+
const ret = wasm.opfsListFiles();
|
|
340
409
|
return ret;
|
|
341
410
|
}
|
|
342
411
|
|
|
343
412
|
/**
|
|
344
|
-
*
|
|
413
|
+
* Check if a database file exists in OPFS.
|
|
414
|
+
* @param {string} filename
|
|
415
|
+
* @returns {Promise<boolean>}
|
|
345
416
|
*/
|
|
346
|
-
export function
|
|
347
|
-
const
|
|
417
|
+
export function opfsFileExists(filename) {
|
|
418
|
+
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
419
|
+
const len0 = WASM_VECTOR_LEN;
|
|
420
|
+
const ret = wasm.opfsFileExists(ptr0, len0);
|
|
348
421
|
return ret;
|
|
349
422
|
}
|
|
350
423
|
|
|
351
424
|
/**
|
|
352
|
-
*
|
|
353
|
-
*
|
|
425
|
+
* Delete a specific database file from OPFS.
|
|
426
|
+
* Returns true if the file was deleted, false if it didn't exist.
|
|
427
|
+
* Note: The database must be closed before calling this function.
|
|
428
|
+
* @param {string} filename
|
|
429
|
+
* @returns {Promise<boolean>}
|
|
354
430
|
*/
|
|
355
|
-
export function
|
|
356
|
-
const ptr0 = passStringToWasm0(
|
|
431
|
+
export function opfsDeleteFile(filename) {
|
|
432
|
+
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
357
433
|
const len0 = WASM_VECTOR_LEN;
|
|
358
|
-
const ret = wasm.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
434
|
+
const ret = wasm.opfsDeleteFile(ptr0, len0);
|
|
435
|
+
return ret;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Get the number of database files stored in OPFS.
|
|
440
|
+
* @returns {Promise<number>}
|
|
441
|
+
*/
|
|
442
|
+
export function opfsFileCount() {
|
|
443
|
+
const ret = wasm.opfsFileCount();
|
|
444
|
+
return ret;
|
|
363
445
|
}
|
|
364
446
|
|
|
365
447
|
function _assertClass(instance, klass) {
|
|
@@ -383,15 +465,6 @@ export function applySignatureRequest(host, gatewayHost, signatureRequest) {
|
|
|
383
465
|
return ret;
|
|
384
466
|
}
|
|
385
467
|
|
|
386
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
387
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
388
|
-
for (let i = 0; i < array.length; i++) {
|
|
389
|
-
const add = addToExternrefTable0(array[i]);
|
|
390
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
391
|
-
}
|
|
392
|
-
WASM_VECTOR_LEN = array.length;
|
|
393
|
-
return ptr;
|
|
394
|
-
}
|
|
395
468
|
/**
|
|
396
469
|
* @param {string} host
|
|
397
470
|
* @param {string | null | undefined} gatewayHost
|
|
@@ -431,19 +504,22 @@ export function verifySignedWithPublicKey(signatureText, signatureBytes, publicK
|
|
|
431
504
|
}
|
|
432
505
|
|
|
433
506
|
/**
|
|
434
|
-
* @param {
|
|
435
|
-
* @
|
|
436
|
-
* @param {string[]} inboxIds
|
|
437
|
-
* @returns {Promise<InboxState[]>}
|
|
507
|
+
* @param {Attachment} attachment
|
|
508
|
+
* @returns {EncodedContent}
|
|
438
509
|
*/
|
|
439
|
-
export function
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
510
|
+
export function encodeAttachment(attachment) {
|
|
511
|
+
const ret = wasm.encodeAttachment(attachment);
|
|
512
|
+
if (ret[2]) {
|
|
513
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
514
|
+
}
|
|
515
|
+
return takeFromExternrefTable0(ret[0]);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* @returns {ContentTypeId}
|
|
520
|
+
*/
|
|
521
|
+
export function contentTypeAttachment() {
|
|
522
|
+
const ret = wasm.contentTypeAttachment();
|
|
447
523
|
return ret;
|
|
448
524
|
}
|
|
449
525
|
|
|
@@ -463,6 +539,19 @@ export function contentTypeLeaveRequest() {
|
|
|
463
539
|
return ret;
|
|
464
540
|
}
|
|
465
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Encrypts an attachment for storage as a remote attachment.
|
|
544
|
+
* @param {Attachment} attachment
|
|
545
|
+
* @returns {EncryptedAttachment}
|
|
546
|
+
*/
|
|
547
|
+
export function encryptAttachment(attachment) {
|
|
548
|
+
const ret = wasm.encryptAttachment(attachment);
|
|
549
|
+
if (ret[2]) {
|
|
550
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
551
|
+
}
|
|
552
|
+
return takeFromExternrefTable0(ret[0]);
|
|
553
|
+
}
|
|
554
|
+
|
|
466
555
|
/**
|
|
467
556
|
* @param {RemoteAttachment} remote_attachment
|
|
468
557
|
* @returns {EncodedContent}
|
|
@@ -506,12 +595,19 @@ export function decryptAttachment(encryptedBytes, remoteAttachment) {
|
|
|
506
595
|
}
|
|
507
596
|
|
|
508
597
|
/**
|
|
509
|
-
*
|
|
510
|
-
* @param {Attachment} attachment
|
|
511
|
-
* @returns {EncryptedAttachment}
|
|
598
|
+
* @returns {ContentTypeId}
|
|
512
599
|
*/
|
|
513
|
-
export function
|
|
514
|
-
const ret = wasm.
|
|
600
|
+
export function contentTypeWalletSendCalls() {
|
|
601
|
+
const ret = wasm.contentTypeWalletSendCalls();
|
|
602
|
+
return ret;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* @param {WalletSendCalls} wallet_send_calls
|
|
607
|
+
* @returns {EncodedContent}
|
|
608
|
+
*/
|
|
609
|
+
export function encodeWalletSendCalls(wallet_send_calls) {
|
|
610
|
+
const ret = wasm.encodeWalletSendCalls(wallet_send_calls);
|
|
515
611
|
if (ret[2]) {
|
|
516
612
|
throw takeFromExternrefTable0(ret[1]);
|
|
517
613
|
}
|
|
@@ -519,11 +615,13 @@ export function encryptAttachment(attachment) {
|
|
|
519
615
|
}
|
|
520
616
|
|
|
521
617
|
/**
|
|
522
|
-
* @param {
|
|
618
|
+
* @param {string} text
|
|
523
619
|
* @returns {EncodedContent}
|
|
524
620
|
*/
|
|
525
|
-
export function
|
|
526
|
-
const
|
|
621
|
+
export function encodeText(text) {
|
|
622
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
623
|
+
const len0 = WASM_VECTOR_LEN;
|
|
624
|
+
const ret = wasm.encodeText(ptr0, len0);
|
|
527
625
|
if (ret[2]) {
|
|
528
626
|
throw takeFromExternrefTable0(ret[1]);
|
|
529
627
|
}
|
|
@@ -533,8 +631,8 @@ export function encodeWalletSendCalls(wallet_send_calls) {
|
|
|
533
631
|
/**
|
|
534
632
|
* @returns {ContentTypeId}
|
|
535
633
|
*/
|
|
536
|
-
export function
|
|
537
|
-
const ret = wasm.
|
|
634
|
+
export function contentTypeText() {
|
|
635
|
+
const ret = wasm.contentTypeText();
|
|
538
636
|
return ret;
|
|
539
637
|
}
|
|
540
638
|
|
|
@@ -581,221 +679,122 @@ export function encodeActions(actions) {
|
|
|
581
679
|
/**
|
|
582
680
|
* @returns {ContentTypeId}
|
|
583
681
|
*/
|
|
584
|
-
export function
|
|
585
|
-
const ret = wasm.
|
|
682
|
+
export function contentTypeMarkdown() {
|
|
683
|
+
const ret = wasm.contentTypeMarkdown();
|
|
586
684
|
return ret;
|
|
587
685
|
}
|
|
588
686
|
|
|
589
687
|
/**
|
|
590
|
-
* @param {
|
|
688
|
+
* @param {string} text
|
|
591
689
|
* @returns {EncodedContent}
|
|
592
690
|
*/
|
|
593
|
-
export function
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* @param {string} host
|
|
603
|
-
* @param {string} inboxId
|
|
604
|
-
* @param {Identifier} accountIdentifier
|
|
605
|
-
* @param {string | null} [dbPath]
|
|
606
|
-
* @param {Uint8Array | null} [encryptionKey]
|
|
607
|
-
* @param {string | null} [deviceSyncServerUrl]
|
|
608
|
-
* @param {DeviceSyncWorkerMode | null} [deviceSyncWorkerMode]
|
|
609
|
-
* @param {LogOptions | null} [logOptions]
|
|
610
|
-
* @param {boolean | null} [allowOffline]
|
|
611
|
-
* @param {string | null} [appVersion]
|
|
612
|
-
* @param {string | null} [gatewayHost]
|
|
613
|
-
* @param {bigint | null} [nonce]
|
|
614
|
-
* @param {any | null} [authCallback]
|
|
615
|
-
* @param {AuthHandle | null} [authHandle]
|
|
616
|
-
* @param {ClientMode | null} [clientMode]
|
|
617
|
-
* @returns {Promise<Client>}
|
|
618
|
-
*/
|
|
619
|
-
export function createClient(host, inboxId, accountIdentifier, dbPath, encryptionKey, deviceSyncServerUrl, deviceSyncWorkerMode, logOptions, allowOffline, appVersion, gatewayHost, nonce, authCallback, authHandle, clientMode) {
|
|
620
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
621
|
-
const len0 = WASM_VECTOR_LEN;
|
|
622
|
-
const ptr1 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
623
|
-
const len1 = WASM_VECTOR_LEN;
|
|
624
|
-
var ptr2 = isLikeNone(dbPath) ? 0 : passStringToWasm0(dbPath, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
625
|
-
var len2 = WASM_VECTOR_LEN;
|
|
626
|
-
var ptr3 = isLikeNone(deviceSyncServerUrl) ? 0 : passStringToWasm0(deviceSyncServerUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
627
|
-
var len3 = WASM_VECTOR_LEN;
|
|
628
|
-
var ptr4 = isLikeNone(appVersion) ? 0 : passStringToWasm0(appVersion, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
629
|
-
var len4 = WASM_VECTOR_LEN;
|
|
630
|
-
var ptr5 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
631
|
-
var len5 = WASM_VECTOR_LEN;
|
|
632
|
-
let ptr6 = 0;
|
|
633
|
-
if (!isLikeNone(authHandle)) {
|
|
634
|
-
_assertClass(authHandle, AuthHandle);
|
|
635
|
-
ptr6 = authHandle.__destroy_into_raw();
|
|
636
|
-
}
|
|
637
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, accountIdentifier, ptr2, len2, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey), ptr3, len3, isLikeNone(deviceSyncWorkerMode) ? 2 : deviceSyncWorkerMode, isLikeNone(logOptions) ? 0 : addToExternrefTable0(logOptions), isLikeNone(allowOffline) ? 0xFFFFFF : allowOffline ? 1 : 0, ptr4, len4, ptr5, len5, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(authCallback) ? 0 : addToExternrefTable0(authCallback), ptr6, isLikeNone(clientMode) ? 2 : clientMode);
|
|
638
|
-
return ret;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* @param {string} host
|
|
643
|
-
* @param {string | null | undefined} gatewayHost
|
|
644
|
-
* @param {boolean} isSecure
|
|
645
|
-
* @param {Identifier} accountIdentifier
|
|
646
|
-
* @returns {Promise<string | undefined>}
|
|
647
|
-
*/
|
|
648
|
-
export function getInboxIdForIdentifier(host, gatewayHost, isSecure, accountIdentifier) {
|
|
649
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
650
|
-
const len0 = WASM_VECTOR_LEN;
|
|
651
|
-
var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
652
|
-
var len1 = WASM_VECTOR_LEN;
|
|
653
|
-
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, isSecure, accountIdentifier);
|
|
654
|
-
return ret;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* @param {Identifier} accountIdentifier
|
|
659
|
-
* @param {bigint | null} [nonce]
|
|
660
|
-
* @returns {string}
|
|
661
|
-
*/
|
|
662
|
-
export function generateInboxId(accountIdentifier, nonce) {
|
|
663
|
-
let deferred2_0;
|
|
664
|
-
let deferred2_1;
|
|
665
|
-
try {
|
|
666
|
-
const ret = wasm.generateInboxId(accountIdentifier, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
667
|
-
var ptr1 = ret[0];
|
|
668
|
-
var len1 = ret[1];
|
|
669
|
-
if (ret[3]) {
|
|
670
|
-
ptr1 = 0; len1 = 0;
|
|
671
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
672
|
-
}
|
|
673
|
-
deferred2_0 = ptr1;
|
|
674
|
-
deferred2_1 = len1;
|
|
675
|
-
return getStringFromWasm0(ptr1, len1);
|
|
676
|
-
} finally {
|
|
677
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* @param {MetadataField} field
|
|
683
|
-
* @returns {string}
|
|
684
|
-
*/
|
|
685
|
-
export function metadataFieldName(field) {
|
|
686
|
-
let deferred1_0;
|
|
687
|
-
let deferred1_1;
|
|
688
|
-
try {
|
|
689
|
-
const ret = wasm.metadataFieldName(field);
|
|
690
|
-
deferred1_0 = ret[0];
|
|
691
|
-
deferred1_1 = ret[1];
|
|
692
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
693
|
-
} finally {
|
|
694
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Check if a database file exists in OPFS.
|
|
700
|
-
* @param {string} filename
|
|
701
|
-
* @returns {Promise<boolean>}
|
|
702
|
-
*/
|
|
703
|
-
export function opfsFileExists(filename) {
|
|
704
|
-
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
705
|
-
const len0 = WASM_VECTOR_LEN;
|
|
706
|
-
const ret = wasm.opfsFileExists(ptr0, len0);
|
|
707
|
-
return ret;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Import a database from a byte array into OPFS.
|
|
712
|
-
* This will overwrite any existing database with the same name.
|
|
713
|
-
* The byte array must contain a valid SQLite database.
|
|
714
|
-
* Note: Any existing database with the same name must be closed before importing.
|
|
715
|
-
* @param {string} filename
|
|
716
|
-
* @param {Uint8Array} data
|
|
717
|
-
* @returns {Promise<void>}
|
|
718
|
-
*/
|
|
719
|
-
export function opfsImportDb(filename, data) {
|
|
720
|
-
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
721
|
-
const len0 = WASM_VECTOR_LEN;
|
|
722
|
-
const ret = wasm.opfsImportDb(ptr0, len0, data);
|
|
723
|
-
return ret;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* List all database files stored in OPFS.
|
|
728
|
-
* Returns an array of file names.
|
|
729
|
-
* @returns {Promise<string[]>}
|
|
730
|
-
*/
|
|
731
|
-
export function opfsListFiles() {
|
|
732
|
-
const ret = wasm.opfsListFiles();
|
|
733
|
-
return ret;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
* Get the number of database files stored in OPFS.
|
|
738
|
-
* @returns {Promise<number>}
|
|
739
|
-
*/
|
|
740
|
-
export function opfsFileCount() {
|
|
741
|
-
const ret = wasm.opfsFileCount();
|
|
742
|
-
return ret;
|
|
691
|
+
export function encodeMarkdown(text) {
|
|
692
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
693
|
+
const len0 = WASM_VECTOR_LEN;
|
|
694
|
+
const ret = wasm.encodeMarkdown(ptr0, len0);
|
|
695
|
+
if (ret[2]) {
|
|
696
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
697
|
+
}
|
|
698
|
+
return takeFromExternrefTable0(ret[0]);
|
|
743
699
|
}
|
|
744
700
|
|
|
745
701
|
/**
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
* @returns {Promise<void>}
|
|
702
|
+
* @param {Reaction} reaction
|
|
703
|
+
* @returns {EncodedContent}
|
|
749
704
|
*/
|
|
750
|
-
export function
|
|
751
|
-
const ret = wasm.
|
|
752
|
-
|
|
705
|
+
export function encodeReaction(reaction) {
|
|
706
|
+
const ret = wasm.encodeReaction(reaction);
|
|
707
|
+
if (ret[2]) {
|
|
708
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
709
|
+
}
|
|
710
|
+
return takeFromExternrefTable0(ret[0]);
|
|
753
711
|
}
|
|
754
712
|
|
|
755
713
|
/**
|
|
756
|
-
*
|
|
757
|
-
* This can be used to backup or transfer a database.
|
|
758
|
-
* Note: The database should be closed before exporting for consistency.
|
|
759
|
-
* @param {string} filename
|
|
760
|
-
* @returns {Promise<Uint8Array>}
|
|
714
|
+
* @returns {ContentTypeId}
|
|
761
715
|
*/
|
|
762
|
-
export function
|
|
763
|
-
const
|
|
764
|
-
const len0 = WASM_VECTOR_LEN;
|
|
765
|
-
const ret = wasm.opfsExportDb(ptr0, len0);
|
|
716
|
+
export function contentTypeReaction() {
|
|
717
|
+
const ret = wasm.contentTypeReaction();
|
|
766
718
|
return ret;
|
|
767
719
|
}
|
|
768
720
|
|
|
769
721
|
/**
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
* @param {
|
|
774
|
-
* @returns {Promise<
|
|
722
|
+
* @param {string} host
|
|
723
|
+
* @param {string | null | undefined} gatewayHost
|
|
724
|
+
* @param {boolean} isSecure
|
|
725
|
+
* @param {Identifier} accountIdentifier
|
|
726
|
+
* @returns {Promise<string | undefined>}
|
|
775
727
|
*/
|
|
776
|
-
export function
|
|
777
|
-
const ptr0 = passStringToWasm0(
|
|
728
|
+
export function getInboxIdForIdentifier(host, gatewayHost, isSecure, accountIdentifier) {
|
|
729
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
778
730
|
const len0 = WASM_VECTOR_LEN;
|
|
779
|
-
|
|
731
|
+
var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
732
|
+
var len1 = WASM_VECTOR_LEN;
|
|
733
|
+
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, isSecure, accountIdentifier);
|
|
780
734
|
return ret;
|
|
781
735
|
}
|
|
782
736
|
|
|
783
737
|
/**
|
|
784
|
-
*
|
|
785
|
-
*
|
|
786
|
-
* @returns {
|
|
738
|
+
* @param {Identifier} accountIdentifier
|
|
739
|
+
* @param {bigint | null} [nonce]
|
|
740
|
+
* @returns {string}
|
|
787
741
|
*/
|
|
788
|
-
export function
|
|
789
|
-
|
|
790
|
-
|
|
742
|
+
export function generateInboxId(accountIdentifier, nonce) {
|
|
743
|
+
let deferred2_0;
|
|
744
|
+
let deferred2_1;
|
|
745
|
+
try {
|
|
746
|
+
const ret = wasm.generateInboxId(accountIdentifier, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
747
|
+
var ptr1 = ret[0];
|
|
748
|
+
var len1 = ret[1];
|
|
749
|
+
if (ret[3]) {
|
|
750
|
+
ptr1 = 0; len1 = 0;
|
|
751
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
752
|
+
}
|
|
753
|
+
deferred2_0 = ptr1;
|
|
754
|
+
deferred2_1 = len1;
|
|
755
|
+
return getStringFromWasm0(ptr1, len1);
|
|
756
|
+
} finally {
|
|
757
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
758
|
+
}
|
|
791
759
|
}
|
|
792
760
|
|
|
793
761
|
/**
|
|
794
|
-
*
|
|
795
|
-
* @
|
|
762
|
+
* @param {string} host
|
|
763
|
+
* @param {string} inboxId
|
|
764
|
+
* @param {Identifier} accountIdentifier
|
|
765
|
+
* @param {string | null} [dbPath]
|
|
766
|
+
* @param {Uint8Array | null} [encryptionKey]
|
|
767
|
+
* @param {string | null} [deviceSyncServerUrl]
|
|
768
|
+
* @param {DeviceSyncWorkerMode | null} [deviceSyncWorkerMode]
|
|
769
|
+
* @param {LogOptions | null} [logOptions]
|
|
770
|
+
* @param {boolean | null} [allowOffline]
|
|
771
|
+
* @param {string | null} [appVersion]
|
|
772
|
+
* @param {string | null} [gatewayHost]
|
|
773
|
+
* @param {bigint | null} [nonce]
|
|
774
|
+
* @param {any | null} [authCallback]
|
|
775
|
+
* @param {AuthHandle | null} [authHandle]
|
|
776
|
+
* @param {ClientMode | null} [clientMode]
|
|
777
|
+
* @returns {Promise<Client>}
|
|
796
778
|
*/
|
|
797
|
-
export function
|
|
798
|
-
const
|
|
779
|
+
export function createClient(host, inboxId, accountIdentifier, dbPath, encryptionKey, deviceSyncServerUrl, deviceSyncWorkerMode, logOptions, allowOffline, appVersion, gatewayHost, nonce, authCallback, authHandle, clientMode) {
|
|
780
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
781
|
+
const len0 = WASM_VECTOR_LEN;
|
|
782
|
+
const ptr1 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
783
|
+
const len1 = WASM_VECTOR_LEN;
|
|
784
|
+
var ptr2 = isLikeNone(dbPath) ? 0 : passStringToWasm0(dbPath, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
785
|
+
var len2 = WASM_VECTOR_LEN;
|
|
786
|
+
var ptr3 = isLikeNone(deviceSyncServerUrl) ? 0 : passStringToWasm0(deviceSyncServerUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
787
|
+
var len3 = WASM_VECTOR_LEN;
|
|
788
|
+
var ptr4 = isLikeNone(appVersion) ? 0 : passStringToWasm0(appVersion, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
789
|
+
var len4 = WASM_VECTOR_LEN;
|
|
790
|
+
var ptr5 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
791
|
+
var len5 = WASM_VECTOR_LEN;
|
|
792
|
+
let ptr6 = 0;
|
|
793
|
+
if (!isLikeNone(authHandle)) {
|
|
794
|
+
_assertClass(authHandle, AuthHandle);
|
|
795
|
+
ptr6 = authHandle.__destroy_into_raw();
|
|
796
|
+
}
|
|
797
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, accountIdentifier, ptr2, len2, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey), ptr3, len3, isLikeNone(deviceSyncWorkerMode) ? 2 : deviceSyncWorkerMode, isLikeNone(logOptions) ? 0 : addToExternrefTable0(logOptions), isLikeNone(allowOffline) ? 0xFFFFFF : allowOffline ? 1 : 0, ptr4, len4, ptr5, len5, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(authCallback) ? 0 : addToExternrefTable0(authCallback), ptr6, isLikeNone(clientMode) ? 2 : clientMode);
|
|
799
798
|
return ret;
|
|
800
799
|
}
|
|
801
800
|
|
|
@@ -814,10 +813,6 @@ function wasm_bindgen__convert__closures_____invoke__hb3ea4cec5b2a99b4(arg0, arg
|
|
|
814
813
|
wasm.wasm_bindgen__convert__closures_____invoke__hb3ea4cec5b2a99b4(arg0, arg1);
|
|
815
814
|
}
|
|
816
815
|
|
|
817
|
-
function wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14(arg0, arg1) {
|
|
818
|
-
wasm.wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14(arg0, arg1);
|
|
819
|
-
}
|
|
820
|
-
|
|
821
816
|
function wasm_bindgen__convert__closures_____invoke__h57fa53c0b5bdcaf1(arg0, arg1) {
|
|
822
817
|
wasm.wasm_bindgen__convert__closures_____invoke__h57fa53c0b5bdcaf1(arg0, arg1);
|
|
823
818
|
}
|
|
@@ -826,6 +821,10 @@ function wasm_bindgen__convert__closures_____invoke__h989c99c207fff0d8(arg0, arg
|
|
|
826
821
|
wasm.wasm_bindgen__convert__closures_____invoke__h989c99c207fff0d8(arg0, arg1, arg2);
|
|
827
822
|
}
|
|
828
823
|
|
|
824
|
+
function wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14(arg0, arg1) {
|
|
825
|
+
wasm.wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14(arg0, arg1);
|
|
826
|
+
}
|
|
827
|
+
|
|
829
828
|
function wasm_bindgen__convert__closures_____invoke__h09c21df9c40da302(arg0, arg1, arg2, arg3) {
|
|
830
829
|
wasm.wasm_bindgen__convert__closures_____invoke__h09c21df9c40da302(arg0, arg1, arg2, arg3);
|
|
831
830
|
}
|
|
@@ -1112,6 +1111,45 @@ export class Client {
|
|
|
1112
1111
|
const ptr = this.__destroy_into_raw();
|
|
1113
1112
|
wasm.__wbg_client_free(ptr, 0);
|
|
1114
1113
|
}
|
|
1114
|
+
/**
|
|
1115
|
+
*
|
|
1116
|
+
* * Get the client's inbox state.
|
|
1117
|
+
* *
|
|
1118
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
1119
|
+
* * Otherwise, the state will be read from the local database.
|
|
1120
|
+
*
|
|
1121
|
+
* @param {boolean} refreshFromNetwork
|
|
1122
|
+
* @returns {Promise<InboxState>}
|
|
1123
|
+
*/
|
|
1124
|
+
inboxState(refreshFromNetwork) {
|
|
1125
|
+
const ret = wasm.client_inboxState(this.__wbg_ptr, refreshFromNetwork);
|
|
1126
|
+
return ret;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* @param {string} inboxId
|
|
1130
|
+
* @returns {Promise<InboxState>}
|
|
1131
|
+
*/
|
|
1132
|
+
getLatestInboxState(inboxId) {
|
|
1133
|
+
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1134
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1135
|
+
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
1136
|
+
return ret;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
*
|
|
1140
|
+
* * Get key package statuses for a list of installation IDs.
|
|
1141
|
+
* *
|
|
1142
|
+
* * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
|
|
1143
|
+
*
|
|
1144
|
+
* @param {string[]} installationIds
|
|
1145
|
+
* @returns {Promise<any>}
|
|
1146
|
+
*/
|
|
1147
|
+
getKeyPackageStatusesForInstallationIds(installationIds) {
|
|
1148
|
+
const ptr0 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
1149
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1150
|
+
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
1151
|
+
return ret;
|
|
1152
|
+
}
|
|
1115
1153
|
/**
|
|
1116
1154
|
* @param {SignatureRequestHandle} signatureRequest
|
|
1117
1155
|
* @returns {Promise<void>}
|
|
@@ -1207,45 +1245,6 @@ export class Client {
|
|
|
1207
1245
|
const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
|
|
1208
1246
|
return ret;
|
|
1209
1247
|
}
|
|
1210
|
-
/**
|
|
1211
|
-
*
|
|
1212
|
-
* * Get the client's inbox state.
|
|
1213
|
-
* *
|
|
1214
|
-
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
1215
|
-
* * Otherwise, the state will be read from the local database.
|
|
1216
|
-
*
|
|
1217
|
-
* @param {boolean} refreshFromNetwork
|
|
1218
|
-
* @returns {Promise<InboxState>}
|
|
1219
|
-
*/
|
|
1220
|
-
inboxState(refreshFromNetwork) {
|
|
1221
|
-
const ret = wasm.client_inboxState(this.__wbg_ptr, refreshFromNetwork);
|
|
1222
|
-
return ret;
|
|
1223
|
-
}
|
|
1224
|
-
/**
|
|
1225
|
-
* @param {string} inboxId
|
|
1226
|
-
* @returns {Promise<InboxState>}
|
|
1227
|
-
*/
|
|
1228
|
-
getLatestInboxState(inboxId) {
|
|
1229
|
-
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1230
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1231
|
-
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
1232
|
-
return ret;
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
*
|
|
1236
|
-
* * Get key package statuses for a list of installation IDs.
|
|
1237
|
-
* *
|
|
1238
|
-
* * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
|
|
1239
|
-
*
|
|
1240
|
-
* @param {string[]} installationIds
|
|
1241
|
-
* @returns {Promise<any>}
|
|
1242
|
-
*/
|
|
1243
|
-
getKeyPackageStatusesForInstallationIds(installationIds) {
|
|
1244
|
-
const ptr0 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
1245
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1246
|
-
const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
|
|
1247
|
-
return ret;
|
|
1248
|
-
}
|
|
1249
1248
|
/**
|
|
1250
1249
|
* @param {ConsentEntityType} entityType
|
|
1251
1250
|
* @param {string} entity
|
|
@@ -2487,59 +2486,6 @@ export class Conversations {
|
|
|
2487
2486
|
}
|
|
2488
2487
|
if (Symbol.dispose) Conversations.prototype[Symbol.dispose] = Conversations.prototype.free;
|
|
2489
2488
|
|
|
2490
|
-
const DeletedMessageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2491
|
-
? { register: () => {}, unregister: () => {} }
|
|
2492
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_deletedmessage_free(ptr >>> 0, 1));
|
|
2493
|
-
|
|
2494
|
-
export class DeletedMessage {
|
|
2495
|
-
|
|
2496
|
-
__destroy_into_raw() {
|
|
2497
|
-
const ptr = this.__wbg_ptr;
|
|
2498
|
-
this.__wbg_ptr = 0;
|
|
2499
|
-
DeletedMessageFinalization.unregister(this);
|
|
2500
|
-
return ptr;
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
|
-
free() {
|
|
2504
|
-
const ptr = this.__destroy_into_raw();
|
|
2505
|
-
wasm.__wbg_deletedmessage_free(ptr, 0);
|
|
2506
|
-
}
|
|
2507
|
-
/**
|
|
2508
|
-
* @returns {DeletedBy}
|
|
2509
|
-
*/
|
|
2510
|
-
get deletedBy() {
|
|
2511
|
-
const ret = wasm.__wbg_get_deletedmessage_deletedBy(this.__wbg_ptr);
|
|
2512
|
-
return ret;
|
|
2513
|
-
}
|
|
2514
|
-
/**
|
|
2515
|
-
* @param {DeletedBy} arg0
|
|
2516
|
-
*/
|
|
2517
|
-
set deletedBy(arg0) {
|
|
2518
|
-
wasm.__wbg_set_deletedmessage_deletedBy(this.__wbg_ptr, arg0);
|
|
2519
|
-
}
|
|
2520
|
-
/**
|
|
2521
|
-
* @returns {string | undefined}
|
|
2522
|
-
*/
|
|
2523
|
-
get adminInboxId() {
|
|
2524
|
-
const ret = wasm.__wbg_get_deletedmessage_adminInboxId(this.__wbg_ptr);
|
|
2525
|
-
let v1;
|
|
2526
|
-
if (ret[0] !== 0) {
|
|
2527
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
2528
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2529
|
-
}
|
|
2530
|
-
return v1;
|
|
2531
|
-
}
|
|
2532
|
-
/**
|
|
2533
|
-
* @param {string | null} [arg0]
|
|
2534
|
-
*/
|
|
2535
|
-
set adminInboxId(arg0) {
|
|
2536
|
-
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2537
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2538
|
-
wasm.__wbg_set_deletedmessage_adminInboxId(this.__wbg_ptr, ptr0, len0);
|
|
2539
|
-
}
|
|
2540
|
-
}
|
|
2541
|
-
if (Symbol.dispose) DeletedMessage.prototype[Symbol.dispose] = DeletedMessage.prototype.free;
|
|
2542
|
-
|
|
2543
2489
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2544
2490
|
? { register: () => {}, unregister: () => {} }
|
|
2545
2491
|
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
|
|
@@ -3438,29 +3384,29 @@ function __wbg_get_imports() {
|
|
|
3438
3384
|
const ret = Date.now();
|
|
3439
3385
|
return ret;
|
|
3440
3386
|
};
|
|
3441
|
-
imports.wbg.
|
|
3387
|
+
imports.wbg.__wbg_on_auth_required_945b7c94545b75b6 = function() { return handleError(function (arg0) {
|
|
3442
3388
|
const ret = arg0.on_auth_required();
|
|
3443
3389
|
return ret;
|
|
3444
3390
|
}, arguments) };
|
|
3445
|
-
imports.wbg.
|
|
3391
|
+
imports.wbg.__wbg_on_close_f7e6c8f30b57f774 = function(arg0) {
|
|
3446
3392
|
arg0.on_close();
|
|
3447
3393
|
};
|
|
3448
|
-
imports.wbg.
|
|
3394
|
+
imports.wbg.__wbg_on_consent_update_06771a6c7cc94343 = function(arg0, arg1) {
|
|
3449
3395
|
arg0.on_consent_update(arg1);
|
|
3450
3396
|
};
|
|
3451
|
-
imports.wbg.
|
|
3397
|
+
imports.wbg.__wbg_on_conversation_d3d0616675c4e05b = function(arg0, arg1) {
|
|
3452
3398
|
arg0.on_conversation(Conversation.__wrap(arg1));
|
|
3453
3399
|
};
|
|
3454
|
-
imports.wbg.
|
|
3400
|
+
imports.wbg.__wbg_on_error_8e1610984dfac66e = function(arg0, arg1) {
|
|
3455
3401
|
arg0.on_error(arg1);
|
|
3456
3402
|
};
|
|
3457
|
-
imports.wbg.
|
|
3403
|
+
imports.wbg.__wbg_on_message_952c4e0875659d51 = function(arg0, arg1) {
|
|
3458
3404
|
arg0.on_message(arg1);
|
|
3459
3405
|
};
|
|
3460
|
-
imports.wbg.
|
|
3406
|
+
imports.wbg.__wbg_on_message_deleted_d2ee7db5a55ac7ad = function(arg0, arg1) {
|
|
3461
3407
|
arg0.on_message_deleted(arg1);
|
|
3462
3408
|
};
|
|
3463
|
-
imports.wbg.
|
|
3409
|
+
imports.wbg.__wbg_on_user_preference_update_0bb0b4c3d46b8fe5 = function(arg0, arg1, arg2) {
|
|
3464
3410
|
var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
|
|
3465
3411
|
wasm.__wbindgen_free(arg1, arg2 * 4, 4);
|
|
3466
3412
|
arg0.on_user_preference_update(v0);
|
|
@@ -3724,6 +3670,11 @@ function __wbg_get_imports() {
|
|
|
3724
3670
|
const ret = arg0.write(arg1, arg2);
|
|
3725
3671
|
return ret;
|
|
3726
3672
|
}, arguments) };
|
|
3673
|
+
imports.wbg.__wbindgen_cast_12f809e4f3fc3e0c = function(arg0, arg1) {
|
|
3674
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7162, function: Function { arguments: [], shim_idx: 7163, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3675
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hdc965c5deda6531b, wasm_bindgen__convert__closures_____invoke__h57fa53c0b5bdcaf1);
|
|
3676
|
+
return ret;
|
|
3677
|
+
};
|
|
3727
3678
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3728
3679
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3729
3680
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -3748,16 +3699,11 @@ function __wbg_get_imports() {
|
|
|
3748
3699
|
const ret = v0;
|
|
3749
3700
|
return ret;
|
|
3750
3701
|
};
|
|
3751
|
-
imports.wbg.
|
|
3752
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3702
|
+
imports.wbg.__wbindgen_cast_72be41fb14cb20bd = function(arg0, arg1) {
|
|
3703
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7331, function: Function { arguments: [], shim_idx: 7332, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3753
3704
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h43bd69f6f2f23fdf, wasm_bindgen__convert__closures_____invoke__ha66b59b58c7b6e14);
|
|
3754
3705
|
return ret;
|
|
3755
3706
|
};
|
|
3756
|
-
imports.wbg.__wbindgen_cast_81e78fef84b94e03 = function(arg0, arg1) {
|
|
3757
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 6992, function: Function { arguments: [], shim_idx: 6993, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3758
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3dd912ac8e2d6083, wasm_bindgen__convert__closures_____invoke__hb3ea4cec5b2a99b4);
|
|
3759
|
-
return ret;
|
|
3760
|
-
};
|
|
3761
3707
|
imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
|
|
3762
3708
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3763
3709
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
@@ -3770,6 +3716,11 @@ function __wbg_get_imports() {
|
|
|
3770
3716
|
const ret = arg0;
|
|
3771
3717
|
return ret;
|
|
3772
3718
|
};
|
|
3719
|
+
imports.wbg.__wbindgen_cast_9db0d7ce282b21e8 = function(arg0, arg1) {
|
|
3720
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7363, function: Function { arguments: [Externref], shim_idx: 7364, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3721
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hab695a3e04b8e88a, wasm_bindgen__convert__closures_____invoke__h989c99c207fff0d8);
|
|
3722
|
+
return ret;
|
|
3723
|
+
};
|
|
3773
3724
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
3774
3725
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3775
3726
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
@@ -3780,6 +3731,11 @@ function __wbg_get_imports() {
|
|
|
3780
3731
|
const ret = arg0;
|
|
3781
3732
|
return ret;
|
|
3782
3733
|
};
|
|
3734
|
+
imports.wbg.__wbindgen_cast_d97095c50904c1e9 = function(arg0, arg1) {
|
|
3735
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 6978, function: Function { arguments: [], shim_idx: 6979, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3736
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3dd912ac8e2d6083, wasm_bindgen__convert__closures_____invoke__hb3ea4cec5b2a99b4);
|
|
3737
|
+
return ret;
|
|
3738
|
+
};
|
|
3783
3739
|
imports.wbg.__wbindgen_cast_e081be35fe620ec4 = function(arg0, arg1) {
|
|
3784
3740
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3785
3741
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
@@ -3787,16 +3743,6 @@ function __wbg_get_imports() {
|
|
|
3787
3743
|
const ret = v0;
|
|
3788
3744
|
return ret;
|
|
3789
3745
|
};
|
|
3790
|
-
imports.wbg.__wbindgen_cast_e29199c514951fd4 = function(arg0, arg1) {
|
|
3791
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 7377, function: Function { arguments: [Externref], shim_idx: 7378, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3792
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hab695a3e04b8e88a, wasm_bindgen__convert__closures_____invoke__h989c99c207fff0d8);
|
|
3793
|
-
return ret;
|
|
3794
|
-
};
|
|
3795
|
-
imports.wbg.__wbindgen_cast_ebdaa6f471b1bf9f = function(arg0, arg1) {
|
|
3796
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 7176, function: Function { arguments: [], shim_idx: 7177, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3797
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hdc965c5deda6531b, wasm_bindgen__convert__closures_____invoke__h57fa53c0b5bdcaf1);
|
|
3798
|
-
return ret;
|
|
3799
|
-
};
|
|
3800
3746
|
imports.wbg.__wbindgen_cast_f20a506f31063fd0 = function(arg0, arg1) {
|
|
3801
3747
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3802
3748
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|