@xmtp/wasm-bindings 1.6.0-dev.21f0ffd → 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.
@@ -229,95 +229,46 @@ function makeMutClosure(arg0, arg1, dtor, f) {
229
229
  return real;
230
230
  }
231
231
 
232
- function _assertClass(instance, klass) {
233
- if (!(instance instanceof klass)) {
234
- throw new Error(`expected instance of ${klass.name}`);
235
- }
236
- }
237
-
238
232
  function takeFromExternrefTable0(idx) {
239
233
  const value = wasm.__wbindgen_export_4.get(idx);
240
234
  wasm.__externref_table_dealloc(idx);
241
235
  return value;
242
236
  }
243
237
  /**
244
- * @param {Reaction} reaction
245
- * @returns {Uint8Array}
238
+ * @param {string} signature_text
239
+ * @param {Uint8Array} signature_bytes
240
+ * @param {Uint8Array} public_key
246
241
  */
247
- export function encodeReaction(reaction) {
248
- _assertClass(reaction, Reaction);
249
- var ptr0 = reaction.__destroy_into_raw();
250
- const ret = wasm.encodeReaction(ptr0);
251
- if (ret[2]) {
252
- throw takeFromExternrefTable0(ret[1]);
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]);
253
248
  }
254
- return takeFromExternrefTable0(ret[0]);
255
249
  }
256
250
 
257
- /**
258
- * @param {Uint8Array} bytes
259
- * @returns {Reaction}
260
- */
261
- export function decodeReaction(bytes) {
262
- const ret = wasm.decodeReaction(bytes);
263
- if (ret[2]) {
264
- throw takeFromExternrefTable0(ret[1]);
251
+ function _assertClass(instance, klass) {
252
+ if (!(instance instanceof klass)) {
253
+ throw new Error(`expected instance of ${klass.name}`);
265
254
  }
266
- return Reaction.__wrap(ret[0]);
267
255
  }
268
-
269
256
  /**
270
257
  * @param {string} v3_host
271
258
  * @param {string | null | undefined} gateway_host
272
- * @param {Identifier} accountIdentifier
273
- * @returns {Promise<string | undefined>}
259
+ * @param {SignatureRequestHandle} signature_request
260
+ * @returns {Promise<void>}
274
261
  */
275
- export function getInboxIdForIdentifier(v3_host, gateway_host, accountIdentifier) {
262
+ export function applySignatureRequest(v3_host, gateway_host, signature_request) {
276
263
  const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
277
264
  const len0 = WASM_VECTOR_LEN;
278
265
  var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
279
266
  var len1 = WASM_VECTOR_LEN;
280
- const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
267
+ _assertClass(signature_request, SignatureRequestHandle);
268
+ const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
281
269
  return ret;
282
270
  }
283
271
 
284
- /**
285
- * @param {Identifier} accountIdentifier
286
- * @returns {string}
287
- */
288
- export function generateInboxId(accountIdentifier) {
289
- let deferred2_0;
290
- let deferred2_1;
291
- try {
292
- const ret = wasm.generateInboxId(accountIdentifier);
293
- var ptr1 = ret[0];
294
- var len1 = ret[1];
295
- if (ret[3]) {
296
- ptr1 = 0; len1 = 0;
297
- throw takeFromExternrefTable0(ret[2]);
298
- }
299
- deferred2_0 = ptr1;
300
- deferred2_1 = len1;
301
- return getStringFromWasm0(ptr1, len1);
302
- } finally {
303
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
304
- }
305
- }
306
-
307
- /**
308
- * @param {string} signature_text
309
- * @param {Uint8Array} signature_bytes
310
- * @param {Uint8Array} public_key
311
- */
312
- export function verifySignedWithPublicKey(signature_text, signature_bytes, public_key) {
313
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
314
- const len0 = WASM_VECTOR_LEN;
315
- const ret = wasm.verifySignedWithPublicKey(ptr0, len0, signature_bytes, public_key);
316
- if (ret[1]) {
317
- throw takeFromExternrefTable0(ret[0]);
318
- }
319
- }
320
-
321
272
  function passArrayJsValueToWasm0(array, malloc) {
322
273
  const ptr = malloc(array.length * 4, 4) >>> 0;
323
274
  for (let i = 0; i < array.length; i++) {
@@ -351,28 +302,81 @@ export function revokeInstallationsSignatureRequest(v3_host, gateway_host, recov
351
302
  return SignatureRequestHandle.__wrap(ret[0]);
352
303
  }
353
304
 
305
+ /**
306
+ * @param {Uint8Array} bytes
307
+ * @returns {Reaction}
308
+ */
309
+ export function decodeReaction(bytes) {
310
+ const ret = wasm.decodeReaction(bytes);
311
+ if (ret[2]) {
312
+ throw takeFromExternrefTable0(ret[1]);
313
+ }
314
+ return Reaction.__wrap(ret[0]);
315
+ }
316
+
317
+ /**
318
+ * @param {Reaction} reaction
319
+ * @returns {Uint8Array}
320
+ */
321
+ export function encodeReaction(reaction) {
322
+ _assertClass(reaction, Reaction);
323
+ var ptr0 = reaction.__destroy_into_raw();
324
+ const ret = wasm.encodeReaction(ptr0);
325
+ if (ret[2]) {
326
+ throw takeFromExternrefTable0(ret[1]);
327
+ }
328
+ return takeFromExternrefTable0(ret[0]);
329
+ }
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
+
351
+ /**
352
+ * @param {Uint8Array} bytes
353
+ * @returns {MultiRemoteAttachment}
354
+ */
355
+ export function decodeMultiRemoteAttachment(bytes) {
356
+ const ret = wasm.decodeMultiRemoteAttachment(bytes);
357
+ if (ret[2]) {
358
+ throw takeFromExternrefTable0(ret[1]);
359
+ }
360
+ return MultiRemoteAttachment.__wrap(ret[0]);
361
+ }
362
+
354
363
  /**
355
364
  * @param {string} v3_host
356
365
  * @param {string | null | undefined} gateway_host
357
- * @param {SignatureRequestHandle} signature_request
358
- * @returns {Promise<void>}
366
+ * @param {string[]} inbox_ids
367
+ * @returns {Promise<InboxState[]>}
359
368
  */
360
- export function applySignatureRequest(v3_host, gateway_host, signature_request) {
369
+ export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
361
370
  const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
371
  const len0 = WASM_VECTOR_LEN;
363
372
  var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
364
373
  var len1 = WASM_VECTOR_LEN;
365
- _assertClass(signature_request, SignatureRequestHandle);
366
- const ret = wasm.applySignatureRequest(ptr0, len0, ptr1, len1, signature_request.__wbg_ptr);
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);
367
377
  return ret;
368
378
  }
369
379
 
370
- function passArray8ToWasm0(arg, malloc) {
371
- const ptr = malloc(arg.length * 1, 1) >>> 0;
372
- getUint8ArrayMemory0().set(arg, ptr / 1);
373
- WASM_VECTOR_LEN = arg.length;
374
- return ptr;
375
- }
376
380
  /**
377
381
  * @param {string} host
378
382
  * @param {string} inbox_id
@@ -411,45 +415,40 @@ export function createClient(host, inbox_id, account_identifier, db_path, encryp
411
415
  }
412
416
 
413
417
  /**
414
- * @param {MultiRemoteAttachment} multiRemoteAttachment
415
- * @returns {Uint8Array}
416
- */
417
- export function encodeMultiRemoteAttachment(multiRemoteAttachment) {
418
- _assertClass(multiRemoteAttachment, MultiRemoteAttachment);
419
- var ptr0 = multiRemoteAttachment.__destroy_into_raw();
420
- const ret = wasm.encodeMultiRemoteAttachment(ptr0);
421
- if (ret[2]) {
422
- throw takeFromExternrefTable0(ret[1]);
423
- }
424
- return takeFromExternrefTable0(ret[0]);
425
- }
426
-
427
- /**
428
- * @param {Uint8Array} bytes
429
- * @returns {MultiRemoteAttachment}
418
+ * @param {Identifier} accountIdentifier
419
+ * @returns {string}
430
420
  */
431
- export function decodeMultiRemoteAttachment(bytes) {
432
- const ret = wasm.decodeMultiRemoteAttachment(bytes);
433
- if (ret[2]) {
434
- throw takeFromExternrefTable0(ret[1]);
421
+ export function generateInboxId(accountIdentifier) {
422
+ let deferred2_0;
423
+ let deferred2_1;
424
+ try {
425
+ const ret = wasm.generateInboxId(accountIdentifier);
426
+ var ptr1 = ret[0];
427
+ var len1 = ret[1];
428
+ if (ret[3]) {
429
+ ptr1 = 0; len1 = 0;
430
+ throw takeFromExternrefTable0(ret[2]);
431
+ }
432
+ deferred2_0 = ptr1;
433
+ deferred2_1 = len1;
434
+ return getStringFromWasm0(ptr1, len1);
435
+ } finally {
436
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
435
437
  }
436
- return MultiRemoteAttachment.__wrap(ret[0]);
437
438
  }
438
439
 
439
440
  /**
440
441
  * @param {string} v3_host
441
442
  * @param {string | null | undefined} gateway_host
442
- * @param {string[]} inbox_ids
443
- * @returns {Promise<InboxState[]>}
443
+ * @param {Identifier} accountIdentifier
444
+ * @returns {Promise<string | undefined>}
444
445
  */
445
- export function inboxStateFromInboxIds(v3_host, gateway_host, inbox_ids) {
446
+ export function getInboxIdForIdentifier(v3_host, gateway_host, accountIdentifier) {
446
447
  const ptr0 = passStringToWasm0(v3_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
448
  const len0 = WASM_VECTOR_LEN;
448
449
  var ptr1 = isLikeNone(gateway_host) ? 0 : passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
449
450
  var len1 = WASM_VECTOR_LEN;
450
- const ptr2 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
451
- const len2 = WASM_VECTOR_LEN;
452
- const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
451
+ const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, accountIdentifier);
453
452
  return ret;
454
453
  }
455
454
 
@@ -464,24 +463,24 @@ export function task_worker_entry_point(ptr) {
464
463
  }
465
464
  }
466
465
 
467
- function __wbg_adapter_10(arg0, arg1) {
468
- wasm.wasm_bindgen__convert__closures_____invoke__h8d2688e22b07e25f(arg0, arg1);
466
+ function __wbg_adapter_12(arg0, arg1) {
467
+ wasm.wasm_bindgen__convert__closures_____invoke__h02b2793523eb74f0(arg0, arg1);
469
468
  }
470
469
 
471
- function __wbg_adapter_15(arg0, arg1) {
472
- wasm.wasm_bindgen__convert__closures_____invoke__h040a93cf6078a98e(arg0, arg1);
470
+ function __wbg_adapter_19(arg0, arg1) {
471
+ wasm.wasm_bindgen__convert__closures_____invoke__h8d77716d6e2e4cde(arg0, arg1);
473
472
  }
474
473
 
475
- function __wbg_adapter_22(arg0, arg1) {
476
- wasm.wasm_bindgen__convert__closures_____invoke__h6553f0a100c562a9(arg0, arg1);
474
+ function __wbg_adapter_24(arg0, arg1) {
475
+ wasm.wasm_bindgen__convert__closures_____invoke__h1b0aee6a11857ece(arg0, arg1);
477
476
  }
478
477
 
479
- function __wbg_adapter_25(arg0, arg1, arg2) {
480
- wasm.closure7152_externref_shim(arg0, arg1, arg2);
478
+ function __wbg_adapter_35(arg0, arg1, arg2) {
479
+ wasm.closure7210_externref_shim(arg0, arg1, arg2);
481
480
  }
482
481
 
483
- function __wbg_adapter_937(arg0, arg1, arg2, arg3) {
484
- wasm.closure8118_externref_shim(arg0, arg1, arg2, arg3);
482
+ function __wbg_adapter_848(arg0, arg1, arg2, arg3) {
483
+ wasm.closure8166_externref_shim(arg0, arg1, arg2, arg3);
485
484
  }
486
485
 
487
486
  /**
@@ -914,6 +913,38 @@ export class Client {
914
913
  const ptr = this.__destroy_into_raw();
915
914
  wasm.__wbg_client_free(ptr, 0);
916
915
  }
916
+ /**
917
+ * @param {SignatureRequestHandle} signature_request
918
+ * @returns {Promise<void>}
919
+ */
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);
924
+ return ret;
925
+ }
926
+ /**
927
+ * @param {SignatureRequestHandle} signature_request
928
+ * @returns {Promise<void>}
929
+ */
930
+ applySignatureRequest(signature_request) {
931
+ _assertClass(signature_request, SignatureRequestHandle);
932
+ const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
933
+ return ret;
934
+ }
935
+ /**
936
+ * @param {string} signature_text
937
+ * @returns {Uint8Array}
938
+ */
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]);
945
+ }
946
+ return takeFromExternrefTable0(ret[0]);
947
+ }
917
948
  /**
918
949
  * @returns {SignatureRequestHandle | undefined}
919
950
  */
@@ -941,11 +972,16 @@ export class Client {
941
972
  return ret;
942
973
  }
943
974
  /**
944
- * @returns {Promise<SignatureRequestHandle>}
975
+ * @param {string} signature_text
976
+ * @param {Uint8Array} signature_bytes
945
977
  */
946
- revokeAllOtherInstallationsSignatureRequest() {
947
- const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
948
- return ret;
978
+ verifySignedWithInstallationKey(signature_text, signature_bytes) {
979
+ const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
980
+ const len0 = WASM_VECTOR_LEN;
981
+ const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
982
+ if (ret[1]) {
983
+ throw takeFromExternrefTable0(ret[0]);
984
+ }
949
985
  }
950
986
  /**
951
987
  * @param {Uint8Array[]} installation_ids
@@ -966,48 +1002,22 @@ export class Client {
966
1002
  return ret;
967
1003
  }
968
1004
  /**
969
- * @param {SignatureRequestHandle} signature_request
970
- * @returns {Promise<void>}
1005
+ * @returns {Promise<SignatureRequestHandle>}
971
1006
  */
972
- applySignatureRequest(signature_request) {
973
- _assertClass(signature_request, SignatureRequestHandle);
974
- const ret = wasm.client_applySignatureRequest(this.__wbg_ptr, signature_request.__wbg_ptr);
975
- return ret;
976
- }
977
- /**
978
- * @param {SignatureRequestHandle} signature_request
979
- * @returns {Promise<void>}
980
- */
981
- registerIdentity(signature_request) {
982
- _assertClass(signature_request, SignatureRequestHandle);
983
- var ptr0 = signature_request.__destroy_into_raw();
984
- const ret = wasm.client_registerIdentity(this.__wbg_ptr, ptr0);
1007
+ revokeAllOtherInstallationsSignatureRequest() {
1008
+ const ret = wasm.client_revokeAllOtherInstallationsSignatureRequest(this.__wbg_ptr);
985
1009
  return ret;
986
1010
  }
987
1011
  /**
988
- * @param {string} signature_text
989
- * @returns {Uint8Array}
990
- */
991
- signWithInstallationKey(signature_text) {
992
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
993
- const len0 = WASM_VECTOR_LEN;
994
- const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
995
- if (ret[2]) {
996
- throw takeFromExternrefTable0(ret[1]);
997
- }
998
- return takeFromExternrefTable0(ret[0]);
999
- }
1000
- /**
1001
- * @param {string} signature_text
1002
- * @param {Uint8Array} signature_bytes
1012
+ * @param {ConsentEntityType} entity_type
1013
+ * @param {string} entity
1014
+ * @returns {Promise<ConsentState>}
1003
1015
  */
1004
- verifySignedWithInstallationKey(signature_text, signature_bytes) {
1005
- const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1016
+ getConsentState(entity_type, entity) {
1017
+ const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1006
1018
  const len0 = WASM_VECTOR_LEN;
1007
- const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
1008
- if (ret[1]) {
1009
- throw takeFromExternrefTable0(ret[0]);
1010
- }
1019
+ const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
1020
+ return ret;
1011
1021
  }
1012
1022
  /**
1013
1023
  * @param {Consent[]} records
@@ -1020,31 +1030,52 @@ export class Client {
1020
1030
  return ret;
1021
1031
  }
1022
1032
  /**
1023
- * @param {ConsentEntityType} entity_type
1024
- * @param {string} entity
1025
- * @returns {Promise<ConsentState>}
1033
+ *
1034
+ * * Get the client's inbox state.
1035
+ * *
1036
+ * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1037
+ * * Otherwise, the state will be read from the local database.
1038
+ *
1039
+ * @param {boolean} refresh_from_network
1040
+ * @returns {Promise<InboxState>}
1026
1041
  */
1027
- getConsentState(entity_type, entity) {
1028
- const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1042
+ inboxState(refresh_from_network) {
1043
+ const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
1044
+ return ret;
1045
+ }
1046
+ /**
1047
+ * @param {string} inbox_id
1048
+ * @returns {Promise<InboxState>}
1049
+ */
1050
+ getLatestInboxState(inbox_id) {
1051
+ const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1029
1052
  const len0 = WASM_VECTOR_LEN;
1030
- const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
1053
+ const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1031
1054
  return ret;
1032
1055
  }
1033
1056
  /**
1034
- * @returns {Identifier}
1057
+ *
1058
+ * * Get key package statuses for a list of installation IDs.
1059
+ * *
1060
+ * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1061
+ *
1062
+ * @param {string[]} installation_ids
1063
+ * @returns {Promise<any>}
1035
1064
  */
1036
- get accountIdentifier() {
1037
- const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
1065
+ getKeyPackageStatusesForInstallationIds(installation_ids) {
1066
+ const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1067
+ const len0 = WASM_VECTOR_LEN;
1068
+ const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1038
1069
  return ret;
1039
1070
  }
1040
1071
  /**
1041
1072
  * @returns {string}
1042
1073
  */
1043
- get inboxId() {
1074
+ get appVersion() {
1044
1075
  let deferred1_0;
1045
1076
  let deferred1_1;
1046
1077
  try {
1047
- const ret = wasm.client_inboxId(this.__wbg_ptr);
1078
+ const ret = wasm.client_appVersion(this.__wbg_ptr);
1048
1079
  deferred1_0 = ret[0];
1049
1080
  deferred1_1 = ret[1];
1050
1081
  return getStringFromWasm0(ret[0], ret[1]);
@@ -1052,6 +1083,24 @@ export class Client {
1052
1083
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1053
1084
  }
1054
1085
  }
1086
+ /**
1087
+ * Output booleans should be zipped with the index of input identifiers
1088
+ * @param {Identifier[]} account_identifiers
1089
+ * @returns {Promise<any>}
1090
+ */
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);
1095
+ return ret;
1096
+ }
1097
+ /**
1098
+ * @returns {Conversations}
1099
+ */
1100
+ conversations() {
1101
+ const ret = wasm.client_conversations(this.__wbg_ptr);
1102
+ return Conversations.__wrap(ret);
1103
+ }
1055
1104
  /**
1056
1105
  * @returns {boolean}
1057
1106
  */
@@ -1060,35 +1109,33 @@ export class Client {
1060
1109
  return ret !== 0;
1061
1110
  }
1062
1111
  /**
1063
- * @returns {string}
1112
+ * @returns {ApiStats}
1064
1113
  */
1065
- get installationId() {
1066
- let deferred1_0;
1067
- let deferred1_1;
1068
- try {
1069
- const ret = wasm.client_installationId(this.__wbg_ptr);
1070
- deferred1_0 = ret[0];
1071
- deferred1_1 = ret[1];
1072
- return getStringFromWasm0(ret[0], ret[1]);
1073
- } finally {
1074
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1075
- }
1114
+ apiStatistics() {
1115
+ const ret = wasm.client_apiStatistics(this.__wbg_ptr);
1116
+ return ApiStats.__wrap(ret);
1076
1117
  }
1077
1118
  /**
1078
- * @returns {Uint8Array}
1119
+ * @param {Uint8Array} message_id
1120
+ * @returns {number}
1079
1121
  */
1080
- get installationIdBytes() {
1081
- const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
1082
- return ret;
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;
1083
1130
  }
1084
1131
  /**
1085
1132
  * @returns {string}
1086
1133
  */
1087
- get appVersion() {
1134
+ get installationId() {
1088
1135
  let deferred1_0;
1089
1136
  let deferred1_1;
1090
1137
  try {
1091
- const ret = wasm.client_appVersion(this.__wbg_ptr);
1138
+ const ret = wasm.client_installationId(this.__wbg_ptr);
1092
1139
  deferred1_0 = ret[0];
1093
1140
  deferred1_1 = ret[1];
1094
1141
  return getStringFromWasm0(ret[0], ret[1]);
@@ -1112,62 +1159,55 @@ export class Client {
1112
1159
  }
1113
1160
  }
1114
1161
  /**
1115
- * Output booleans should be zipped with the index of input identifiers
1116
- * @param {Identifier[]} account_identifiers
1117
- * @returns {Promise<any>}
1162
+ * @param {Uint8Array} message_id
1163
+ * @returns {Promise<DecodedMessage>}
1118
1164
  */
1119
- canMessage(account_identifiers) {
1120
- const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
1165
+ messageV2(message_id) {
1166
+ const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
1121
1167
  const len0 = WASM_VECTOR_LEN;
1122
- const ret = wasm.client_canMessage(this.__wbg_ptr, ptr0, len0);
1168
+ const ret = wasm.client_messageV2(this.__wbg_ptr, ptr0, len0);
1123
1169
  return ret;
1124
1170
  }
1125
1171
  /**
1126
- * @returns {Promise<void>}
1172
+ * @returns {Promise<GroupSyncSummary>}
1127
1173
  */
1128
- sendSyncRequest() {
1129
- const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
1174
+ syncPreferences() {
1175
+ const ret = wasm.client_syncPreferences(this.__wbg_ptr);
1130
1176
  return ret;
1131
1177
  }
1132
1178
  /**
1133
- * @param {Identifier} identifier
1134
- * @returns {Promise<string | undefined>}
1179
+ * @returns {Promise<void>}
1135
1180
  */
1136
- findInboxIdByIdentifier(identifier) {
1137
- const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
1181
+ sendSyncRequest() {
1182
+ const ret = wasm.client_sendSyncRequest(this.__wbg_ptr);
1138
1183
  return ret;
1139
1184
  }
1140
1185
  /**
1141
- * @param {string[]} inbox_ids
1142
- * @param {boolean} refresh_from_network
1143
- * @returns {Promise<InboxState[]>}
1186
+ * @returns {Identifier}
1144
1187
  */
1145
- inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
1146
- const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
1147
- const len0 = WASM_VECTOR_LEN;
1148
- const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
1188
+ get accountIdentifier() {
1189
+ const ret = wasm.client_accountIdentifier(this.__wbg_ptr);
1149
1190
  return ret;
1150
1191
  }
1151
- /**
1152
- * @returns {Conversations}
1153
- */
1154
- conversations() {
1155
- const ret = wasm.client_conversations(this.__wbg_ptr);
1156
- return Conversations.__wrap(ret);
1192
+ clearAllStatistics() {
1193
+ wasm.client_clearAllStatistics(this.__wbg_ptr);
1157
1194
  }
1158
1195
  /**
1159
- * @returns {Promise<GroupSyncSummary>}
1196
+ * @param {string} server_url
1197
+ * @returns {Promise<string>}
1160
1198
  */
1161
- syncPreferences() {
1162
- const ret = wasm.client_syncPreferences(this.__wbg_ptr);
1199
+ uploadDebugArchive(server_url) {
1200
+ const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1201
+ const len0 = WASM_VECTOR_LEN;
1202
+ const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
1163
1203
  return ret;
1164
1204
  }
1165
1205
  /**
1166
- * @returns {ApiStats}
1206
+ * @returns {Uint8Array}
1167
1207
  */
1168
- apiStatistics() {
1169
- const ret = wasm.client_apiStatistics(this.__wbg_ptr);
1170
- return ApiStats.__wrap(ret);
1208
+ get installationIdBytes() {
1209
+ const ret = wasm.client_installationIdBytes(this.__wbg_ptr);
1210
+ return ret;
1171
1211
  }
1172
1212
  /**
1173
1213
  * @returns {IdentityStats}
@@ -1191,80 +1231,39 @@ export class Client {
1191
1231
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1192
1232
  }
1193
1233
  }
1194
- clearAllStatistics() {
1195
- wasm.client_clearAllStatistics(this.__wbg_ptr);
1196
- }
1197
1234
  /**
1198
- * @param {string} server_url
1199
- * @returns {Promise<string>}
1235
+ * @param {string[]} inbox_ids
1236
+ * @param {boolean} refresh_from_network
1237
+ * @returns {Promise<InboxState[]>}
1200
1238
  */
1201
- uploadDebugArchive(server_url) {
1202
- const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1239
+ inboxStateFromInboxIds(inbox_ids, refresh_from_network) {
1240
+ const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
1203
1241
  const len0 = WASM_VECTOR_LEN;
1204
- const ret = wasm.client_uploadDebugArchive(this.__wbg_ptr, ptr0, len0);
1242
+ const ret = wasm.client_inboxStateFromInboxIds(this.__wbg_ptr, ptr0, len0, refresh_from_network);
1205
1243
  return ret;
1206
1244
  }
1207
1245
  /**
1208
- * @param {Uint8Array} message_id
1209
- * @returns {number}
1210
- */
1211
- deleteMessage(message_id) {
1212
- const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
1213
- const len0 = WASM_VECTOR_LEN;
1214
- const ret = wasm.client_deleteMessage(this.__wbg_ptr, ptr0, len0);
1215
- if (ret[2]) {
1216
- throw takeFromExternrefTable0(ret[1]);
1217
- }
1218
- return ret[0] >>> 0;
1219
- }
1220
- /**
1221
- * @param {Uint8Array} message_id
1222
- * @returns {Promise<DecodedMessage>}
1246
+ * @param {Identifier} identifier
1247
+ * @returns {Promise<string | undefined>}
1223
1248
  */
1224
- messageV2(message_id) {
1225
- const ptr0 = passArray8ToWasm0(message_id, wasm.__wbindgen_malloc);
1226
- const len0 = WASM_VECTOR_LEN;
1227
- const ret = wasm.client_messageV2(this.__wbg_ptr, ptr0, len0);
1249
+ findInboxIdByIdentifier(identifier) {
1250
+ const ret = wasm.client_findInboxIdByIdentifier(this.__wbg_ptr, identifier);
1228
1251
  return ret;
1229
1252
  }
1230
1253
  /**
1231
- *
1232
- * * Get the client's inbox state.
1233
- * *
1234
- * * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
1235
- * * Otherwise, the state will be read from the local database.
1236
- *
1237
- * @param {boolean} refresh_from_network
1238
- * @returns {Promise<InboxState>}
1254
+ * @returns {string}
1239
1255
  */
1240
- inboxState(refresh_from_network) {
1241
- const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
1242
- return ret;
1243
- }
1244
- /**
1245
- * @param {string} inbox_id
1246
- * @returns {Promise<InboxState>}
1247
- */
1248
- getLatestInboxState(inbox_id) {
1249
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1250
- const len0 = WASM_VECTOR_LEN;
1251
- const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
1252
- return ret;
1253
- }
1254
- /**
1255
- *
1256
- * * Get key package statuses for a list of installation IDs.
1257
- * *
1258
- * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects.
1259
- *
1260
- * @param {string[]} installation_ids
1261
- * @returns {Promise<any>}
1262
- */
1263
- getKeyPackageStatusesForInstallationIds(installation_ids) {
1264
- const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
1265
- const len0 = WASM_VECTOR_LEN;
1266
- const ret = wasm.client_getKeyPackageStatusesForInstallationIds(this.__wbg_ptr, ptr0, len0);
1267
- return ret;
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
+ }
1268
1267
  }
1269
1268
  }
1270
1269
  if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
@@ -1340,7 +1339,7 @@ export class Consent {
1340
1339
  set entity(arg0) {
1341
1340
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1342
1341
  const len0 = WASM_VECTOR_LEN;
1343
- wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
1342
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
1344
1343
  }
1345
1344
  /**
1346
1345
  * @param {ConsentEntityType} entity_type
@@ -1383,6 +1382,22 @@ export class ContentTypeId {
1383
1382
  const ptr = this.__destroy_into_raw();
1384
1383
  wasm.__wbg_contenttypeid_free(ptr, 0);
1385
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
+ }
1386
1401
  /**
1387
1402
  * @returns {string}
1388
1403
  */
@@ -1404,7 +1419,7 @@ export class ContentTypeId {
1404
1419
  set authorityId(arg0) {
1405
1420
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1406
1421
  const len0 = WASM_VECTOR_LEN;
1407
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
1422
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
1408
1423
  }
1409
1424
  /**
1410
1425
  * @returns {string}
@@ -1427,7 +1442,7 @@ export class ContentTypeId {
1427
1442
  set typeId(arg0) {
1428
1443
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1429
1444
  const len0 = WASM_VECTOR_LEN;
1430
- wasm.__wbg_set_contenttypeid_typeId(this.__wbg_ptr, ptr0, len0);
1445
+ wasm.__wbg_set_attachment_content(this.__wbg_ptr, ptr0, len0);
1431
1446
  }
1432
1447
  /**
1433
1448
  * @returns {number}
@@ -1455,22 +1470,6 @@ export class ContentTypeId {
1455
1470
  set versionMinor(arg0) {
1456
1471
  wasm.__wbg_set_contenttypeid_versionMinor(this.__wbg_ptr, arg0);
1457
1472
  }
1458
- /**
1459
- * @param {string} authority_id
1460
- * @param {string} type_id
1461
- * @param {number} version_major
1462
- * @param {number} version_minor
1463
- */
1464
- constructor(authority_id, type_id, version_major, version_minor) {
1465
- const ptr0 = passStringToWasm0(authority_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1466
- const len0 = WASM_VECTOR_LEN;
1467
- const ptr1 = passStringToWasm0(type_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1468
- const len1 = WASM_VECTOR_LEN;
1469
- const ret = wasm.contenttypeid_new(ptr0, len0, ptr1, len1, version_major, version_minor);
1470
- this.__wbg_ptr = ret >>> 0;
1471
- ContentTypeIdFinalization.register(this, this.__wbg_ptr, this);
1472
- return this;
1473
- }
1474
1473
  }
1475
1474
  if (Symbol.dispose) ContentTypeId.prototype[Symbol.dispose] = ContentTypeId.prototype.free;
1476
1475
 
@@ -1500,93 +1499,77 @@ export class Conversation {
1500
1499
  wasm.__wbg_conversation_free(ptr, 0);
1501
1500
  }
1502
1501
  /**
1503
- * @returns {ConsentState}
1502
+ * @returns {string[]}
1504
1503
  */
1505
- consentState() {
1506
- const ret = wasm.conversation_consentState(this.__wbg_ptr);
1507
- if (ret[2]) {
1508
- throw takeFromExternrefTable0(ret[1]);
1504
+ adminList() {
1505
+ const ret = wasm.conversation_adminList(this.__wbg_ptr);
1506
+ if (ret[3]) {
1507
+ throw takeFromExternrefTable0(ret[2]);
1509
1508
  }
1510
- return ret[0];
1509
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1510
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1511
+ return v1;
1511
1512
  }
1512
1513
  /**
1513
- * @param {ConsentState} state
1514
+ * @returns {Promise<any>}
1514
1515
  */
1515
- updateConsentState(state) {
1516
- const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
1517
- if (ret[1]) {
1518
- throw takeFromExternrefTable0(ret[0]);
1519
- }
1516
+ getDebugInfo() {
1517
+ const ret = wasm.conversation_getDebugInfo(this.__wbg_ptr);
1518
+ return ret;
1520
1519
  }
1521
1520
  /**
1522
1521
  * @returns {string}
1523
1522
  */
1524
- id() {
1525
- let deferred1_0;
1526
- let deferred1_1;
1523
+ groupName() {
1524
+ let deferred2_0;
1525
+ let deferred2_1;
1527
1526
  try {
1528
- const ret = wasm.conversation_id(this.__wbg_ptr);
1529
- deferred1_0 = ret[0];
1530
- deferred1_1 = ret[1];
1531
- return getStringFromWasm0(ret[0], ret[1]);
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);
1532
1537
  } finally {
1533
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1538
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1534
1539
  }
1535
1540
  }
1536
1541
  /**
1537
- * @param {EncodedContent} encoded_content
1538
- * @param {SendMessageOpts} opts
1539
- * @returns {Promise<string>}
1542
+ * @param {Identifier[]} account_identifiers
1543
+ * @returns {Promise<void>}
1540
1544
  */
1541
- send(encoded_content, opts) {
1542
- _assertClass(encoded_content, EncodedContent);
1543
- var ptr0 = encoded_content.__destroy_into_raw();
1544
- _assertClass(opts, SendMessageOpts);
1545
- var ptr1 = opts.__destroy_into_raw();
1546
- const ret = wasm.conversation_send(this.__wbg_ptr, ptr0, ptr1);
1545
+ 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);
1547
1549
  return ret;
1548
1550
  }
1549
1551
  /**
1550
- * send a message without immediately publishing to the delivery service.
1551
- * @param {EncodedContent} encoded_content
1552
- * @param {SendMessageOpts} opts
1553
- * @returns {string}
1552
+ * @returns {Promise<any>}
1554
1553
  */
1555
- sendOptimistic(encoded_content, opts) {
1556
- let deferred4_0;
1557
- let deferred4_1;
1558
- try {
1559
- _assertClass(encoded_content, EncodedContent);
1560
- var ptr0 = encoded_content.__destroy_into_raw();
1561
- _assertClass(opts, SendMessageOpts);
1562
- var ptr1 = opts.__destroy_into_raw();
1563
- const ret = wasm.conversation_sendOptimistic(this.__wbg_ptr, ptr0, ptr1);
1564
- var ptr3 = ret[0];
1565
- var len3 = ret[1];
1566
- if (ret[3]) {
1567
- ptr3 = 0; len3 = 0;
1568
- throw takeFromExternrefTable0(ret[2]);
1569
- }
1570
- deferred4_0 = ptr3;
1571
- deferred4_1 = len3;
1572
- return getStringFromWasm0(ptr3, len3);
1573
- } finally {
1574
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
1575
- }
1554
+ listMembers() {
1555
+ const ret = wasm.conversation_listMembers(this.__wbg_ptr);
1556
+ return ret;
1576
1557
  }
1577
1558
  /**
1578
- * Publish all unpublished messages
1559
+ * @param {string} inbox_id
1579
1560
  * @returns {Promise<void>}
1580
1561
  */
1581
- publishMessages() {
1582
- const ret = wasm.conversation_publishMessages(this.__wbg_ptr);
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);
1583
1566
  return ret;
1584
1567
  }
1585
1568
  /**
1586
- * @returns {Promise<void>}
1569
+ * @returns {bigint}
1587
1570
  */
1588
- sync() {
1589
- const ret = wasm.conversation_sync(this.__wbg_ptr);
1571
+ createdAtNs() {
1572
+ const ret = wasm.conversation_createdAtNs(this.__wbg_ptr);
1590
1573
  return ret;
1591
1574
  }
1592
1575
  /**
@@ -1603,75 +1586,35 @@ export class Conversation {
1603
1586
  return ret;
1604
1587
  }
1605
1588
  /**
1606
- * @param {ListMessagesOptions | null} [opts]
1607
- * @returns {Promise<bigint>}
1589
+ * @returns {any}
1608
1590
  */
1609
- countMessages(opts) {
1610
- let ptr0 = 0;
1611
- if (!isLikeNone(opts)) {
1612
- _assertClass(opts, ListMessagesOptions);
1613
- 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]);
1614
1595
  }
1615
- const ret = wasm.conversation_countMessages(this.__wbg_ptr, ptr0);
1616
- return ret;
1596
+ return takeFromExternrefTable0(ret[0]);
1617
1597
  }
1618
1598
  /**
1619
1599
  * @param {ListMessagesOptions | null} [opts]
1620
- * @returns {Promise<MessageWithReactions[]>}
1600
+ * @returns {Promise<bigint>}
1621
1601
  */
1622
- findMessagesWithReactions(opts) {
1602
+ countMessages(opts) {
1623
1603
  let ptr0 = 0;
1624
1604
  if (!isLikeNone(opts)) {
1625
1605
  _assertClass(opts, ListMessagesOptions);
1626
1606
  ptr0 = opts.__destroy_into_raw();
1627
1607
  }
1628
- const ret = wasm.conversation_findMessagesWithReactions(this.__wbg_ptr, ptr0);
1608
+ const ret = wasm.conversation_countMessages(this.__wbg_ptr, ptr0);
1629
1609
  return ret;
1630
1610
  }
1631
1611
  /**
1632
- * @returns {Promise<any>}
1612
+ * @returns {Promise<GroupMetadata>}
1633
1613
  */
1634
- listMembers() {
1635
- const ret = wasm.conversation_listMembers(this.__wbg_ptr);
1614
+ groupMetadata() {
1615
+ const ret = wasm.conversation_groupMetadata(this.__wbg_ptr);
1636
1616
  return ret;
1637
1617
  }
1638
- /**
1639
- * @returns {string[]}
1640
- */
1641
- adminList() {
1642
- const ret = wasm.conversation_adminList(this.__wbg_ptr);
1643
- if (ret[3]) {
1644
- throw takeFromExternrefTable0(ret[2]);
1645
- }
1646
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1647
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1648
- return v1;
1649
- }
1650
- /**
1651
- * @returns {string[]}
1652
- */
1653
- superAdminList() {
1654
- const ret = wasm.conversation_superAdminList(this.__wbg_ptr);
1655
- if (ret[3]) {
1656
- throw takeFromExternrefTable0(ret[2]);
1657
- }
1658
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
1659
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1660
- return v1;
1661
- }
1662
- /**
1663
- * @param {string} inbox_id
1664
- * @returns {boolean}
1665
- */
1666
- isAdmin(inbox_id) {
1667
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1668
- const len0 = WASM_VECTOR_LEN;
1669
- const ret = wasm.conversation_isAdmin(this.__wbg_ptr, ptr0, len0);
1670
- if (ret[2]) {
1671
- throw takeFromExternrefTable0(ret[1]);
1672
- }
1673
- return ret[0] !== 0;
1674
- }
1675
1618
  /**
1676
1619
  * @param {string} inbox_id
1677
1620
  * @returns {boolean}
@@ -1679,81 +1622,11 @@ export class Conversation {
1679
1622
  isSuperAdmin(inbox_id) {
1680
1623
  const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1681
1624
  const len0 = WASM_VECTOR_LEN;
1682
- const ret = wasm.conversation_isSuperAdmin(this.__wbg_ptr, ptr0, len0);
1683
- if (ret[2]) {
1684
- throw takeFromExternrefTable0(ret[1]);
1685
- }
1686
- return ret[0] !== 0;
1687
- }
1688
- /**
1689
- * @param {Identifier[]} account_identifiers
1690
- * @returns {Promise<void>}
1691
- */
1692
- addMembers(account_identifiers) {
1693
- const ptr0 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
1694
- const len0 = WASM_VECTOR_LEN;
1695
- const ret = wasm.conversation_addMembers(this.__wbg_ptr, ptr0, len0);
1696
- return ret;
1697
- }
1698
- /**
1699
- * @param {string} inbox_id
1700
- * @returns {Promise<void>}
1701
- */
1702
- addAdmin(inbox_id) {
1703
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1704
- const len0 = WASM_VECTOR_LEN;
1705
- const ret = wasm.conversation_addAdmin(this.__wbg_ptr, ptr0, len0);
1706
- return ret;
1707
- }
1708
- /**
1709
- * @param {string} inbox_id
1710
- * @returns {Promise<void>}
1711
- */
1712
- removeAdmin(inbox_id) {
1713
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1714
- const len0 = WASM_VECTOR_LEN;
1715
- const ret = wasm.conversation_removeAdmin(this.__wbg_ptr, ptr0, len0);
1716
- return ret;
1717
- }
1718
- /**
1719
- * @param {string} inbox_id
1720
- * @returns {Promise<void>}
1721
- */
1722
- addSuperAdmin(inbox_id) {
1723
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1724
- const len0 = WASM_VECTOR_LEN;
1725
- const ret = wasm.conversation_addSuperAdmin(this.__wbg_ptr, ptr0, len0);
1726
- return ret;
1727
- }
1728
- /**
1729
- * @param {string} inbox_id
1730
- * @returns {Promise<void>}
1731
- */
1732
- removeSuperAdmin(inbox_id) {
1733
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1734
- const len0 = WASM_VECTOR_LEN;
1735
- const ret = wasm.conversation_removeSuperAdmin(this.__wbg_ptr, ptr0, len0);
1736
- return ret;
1737
- }
1738
- /**
1739
- * @returns {GroupPermissions}
1740
- */
1741
- groupPermissions() {
1742
- const ret = wasm.conversation_groupPermissions(this.__wbg_ptr);
1743
- if (ret[2]) {
1744
- throw takeFromExternrefTable0(ret[1]);
1745
- }
1746
- return GroupPermissions.__wrap(ret[0]);
1747
- }
1748
- /**
1749
- * @param {string[]} inbox_ids
1750
- * @returns {Promise<void>}
1751
- */
1752
- addMembersByInboxId(inbox_ids) {
1753
- const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
1754
- const len0 = WASM_VECTOR_LEN;
1755
- const ret = wasm.conversation_addMembersByInboxId(this.__wbg_ptr, ptr0, len0);
1756
- return ret;
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;
1757
1630
  }
1758
1631
  /**
1759
1632
  * @param {Identifier[]} account_identifiers
@@ -1766,33 +1639,51 @@ export class Conversation {
1766
1639
  return ret;
1767
1640
  }
1768
1641
  /**
1769
- * @param {string[]} inbox_ids
1642
+ * @param {string} inbox_id
1770
1643
  * @returns {Promise<void>}
1771
1644
  */
1772
- removeMembersByInboxId(inbox_ids) {
1773
- const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
1645
+ addSuperAdmin(inbox_id) {
1646
+ const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1774
1647
  const len0 = WASM_VECTOR_LEN;
1775
- const ret = wasm.conversation_removeMembersByInboxId(this.__wbg_ptr, ptr0, len0);
1648
+ const ret = wasm.conversation_addSuperAdmin(this.__wbg_ptr, ptr0, len0);
1776
1649
  return ret;
1777
1650
  }
1778
1651
  /**
1779
- * @param {string} group_name
1780
- * @returns {Promise<void>}
1652
+ * send a message without immediately publishing to the delivery service.
1653
+ * @param {EncodedContent} encoded_content
1654
+ * @param {SendMessageOpts} opts
1655
+ * @returns {string}
1781
1656
  */
1782
- updateGroupName(group_name) {
1783
- const ptr0 = passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1784
- const len0 = WASM_VECTOR_LEN;
1785
- const ret = wasm.conversation_updateGroupName(this.__wbg_ptr, ptr0, len0);
1786
- return ret;
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
+ }
1787
1678
  }
1788
1679
  /**
1789
1680
  * @returns {string}
1790
1681
  */
1791
- groupName() {
1682
+ dmPeerInboxId() {
1792
1683
  let deferred2_0;
1793
1684
  let deferred2_1;
1794
1685
  try {
1795
- const ret = wasm.conversation_groupName(this.__wbg_ptr);
1686
+ const ret = wasm.conversation_dmPeerInboxId(this.__wbg_ptr);
1796
1687
  var ptr1 = ret[0];
1797
1688
  var len1 = ret[1];
1798
1689
  if (ret[3]) {
@@ -1807,23 +1698,33 @@ export class Conversation {
1807
1698
  }
1808
1699
  }
1809
1700
  /**
1810
- * @param {string} group_image_url_square
1701
+ * Publish all unpublished messages
1811
1702
  * @returns {Promise<void>}
1812
1703
  */
1813
- updateGroupImageUrlSquare(group_image_url_square) {
1814
- const ptr0 = passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1815
- const len0 = WASM_VECTOR_LEN;
1816
- const ret = wasm.conversation_updateGroupImageUrlSquare(this.__wbg_ptr, ptr0, len0);
1704
+ publishMessages() {
1705
+ const ret = wasm.conversation_publishMessages(this.__wbg_ptr);
1817
1706
  return ret;
1818
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
+ }
1819
1720
  /**
1820
1721
  * @returns {string}
1821
1722
  */
1822
- groupImageUrlSquare() {
1723
+ addedByInboxId() {
1823
1724
  let deferred2_0;
1824
1725
  let deferred2_1;
1825
1726
  try {
1826
- const ret = wasm.conversation_groupImageUrlSquare(this.__wbg_ptr);
1727
+ const ret = wasm.conversation_addedByInboxId(this.__wbg_ptr);
1827
1728
  var ptr1 = ret[0];
1828
1729
  var len1 = ret[1];
1829
1730
  if (ret[3]) {
@@ -1838,13 +1739,16 @@ export class Conversation {
1838
1739
  }
1839
1740
  }
1840
1741
  /**
1841
- * @param {string} group_description
1842
- * @returns {Promise<void>}
1742
+ * @param {ListMessagesOptions | null} [opts]
1743
+ * @returns {Promise<DecodedMessage[]>}
1843
1744
  */
1844
- updateGroupDescription(group_description) {
1845
- const ptr0 = passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1846
- const len0 = WASM_VECTOR_LEN;
1847
- const ret = wasm.conversation_updateGroupDescription(this.__wbg_ptr, ptr0, len0);
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);
1848
1752
  return ret;
1849
1753
  }
1850
1754
  /**
@@ -1869,32 +1773,31 @@ export class Conversation {
1869
1773
  }
1870
1774
  }
1871
1775
  /**
1872
- * @param {any} callback
1873
- * @returns {StreamCloser}
1776
+ * @returns {GroupPermissions}
1874
1777
  */
1875
- stream(callback) {
1876
- const ret = wasm.conversation_stream(this.__wbg_ptr, callback);
1778
+ groupPermissions() {
1779
+ const ret = wasm.conversation_groupPermissions(this.__wbg_ptr);
1877
1780
  if (ret[2]) {
1878
1781
  throw takeFromExternrefTable0(ret[1]);
1879
1782
  }
1880
- return StreamCloser.__wrap(ret[0]);
1783
+ return GroupPermissions.__wrap(ret[0]);
1881
1784
  }
1882
1785
  /**
1883
- * @returns {bigint}
1786
+ * @param {string} group_name
1787
+ * @returns {Promise<void>}
1884
1788
  */
1885
- createdAtNs() {
1886
- const ret = wasm.conversation_createdAtNs(this.__wbg_ptr);
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);
1887
1793
  return ret;
1888
1794
  }
1889
1795
  /**
1890
- * @returns {boolean}
1796
+ * @returns {Promise<Conversation[]>}
1891
1797
  */
1892
- isActive() {
1893
- const ret = wasm.conversation_isActive(this.__wbg_ptr);
1894
- if (ret[2]) {
1895
- throw takeFromExternrefTable0(ret[1]);
1896
- }
1897
- return ret[0] !== 0;
1798
+ findDuplicateDms() {
1799
+ const ret = wasm.conversation_findDuplicateDms(this.__wbg_ptr);
1800
+ return ret;
1898
1801
  }
1899
1802
  /**
1900
1803
  * @returns {string | undefined}
@@ -1912,41 +1815,30 @@ export class Conversation {
1912
1815
  return v1;
1913
1816
  }
1914
1817
  /**
1915
- * @returns {string}
1818
+ * @param {string} inbox_id
1819
+ * @returns {Promise<void>}
1916
1820
  */
1917
- addedByInboxId() {
1918
- let deferred2_0;
1919
- let deferred2_1;
1920
- try {
1921
- const ret = wasm.conversation_addedByInboxId(this.__wbg_ptr);
1922
- var ptr1 = ret[0];
1923
- var len1 = ret[1];
1924
- if (ret[3]) {
1925
- ptr1 = 0; len1 = 0;
1926
- throw takeFromExternrefTable0(ret[2]);
1927
- }
1928
- deferred2_0 = ptr1;
1929
- deferred2_1 = len1;
1930
- return getStringFromWasm0(ptr1, len1);
1931
- } finally {
1932
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1933
- }
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;
1934
1826
  }
1935
1827
  /**
1936
- * @returns {Promise<GroupMetadata>}
1828
+ * @returns {Promise<any>}
1937
1829
  */
1938
- groupMetadata() {
1939
- const ret = wasm.conversation_groupMetadata(this.__wbg_ptr);
1830
+ getLastReadTimes() {
1831
+ const ret = wasm.conversation_getLastReadTimes(this.__wbg_ptr);
1940
1832
  return ret;
1941
1833
  }
1942
1834
  /**
1943
1835
  * @returns {string}
1944
1836
  */
1945
- dmPeerInboxId() {
1837
+ groupImageUrlSquare() {
1946
1838
  let deferred2_0;
1947
1839
  let deferred2_1;
1948
1840
  try {
1949
- const ret = wasm.conversation_dmPeerInboxId(this.__wbg_ptr);
1841
+ const ret = wasm.conversation_groupImageUrlSquare(this.__wbg_ptr);
1950
1842
  var ptr1 = ret[0];
1951
1843
  var len1 = ret[1];
1952
1844
  if (ret[3]) {
@@ -1960,6 +1852,26 @@ export class Conversation {
1960
1852
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1961
1853
  }
1962
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
+ }
1963
1875
  /**
1964
1876
  * @param {PermissionUpdateType} permission_update_type
1965
1877
  * @param {PermissionPolicy} permission_policy_option
@@ -1970,86 +1882,173 @@ export class Conversation {
1970
1882
  const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permission_update_type, permission_policy_option, isLikeNone(metadata_field) ? 5 : metadata_field);
1971
1883
  return ret;
1972
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
+ }
1973
1960
  /**
1974
1961
  * @param {MessageDisappearingSettings} settings
1975
1962
  * @returns {Promise<void>}
1976
1963
  */
1977
- updateMessageDisappearingSettings(settings) {
1978
- _assertClass(settings, MessageDisappearingSettings);
1979
- var ptr0 = settings.__destroy_into_raw();
1980
- const ret = wasm.conversation_updateMessageDisappearingSettings(this.__wbg_ptr, ptr0);
1964
+ updateMessageDisappearingSettings(settings) {
1965
+ _assertClass(settings, MessageDisappearingSettings);
1966
+ var ptr0 = settings.__destroy_into_raw();
1967
+ const ret = wasm.conversation_updateMessageDisappearingSettings(this.__wbg_ptr, ptr0);
1968
+ return ret;
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
1981
  return ret;
1982
1982
  }
1983
1983
  /**
1984
1984
  * @returns {Promise<void>}
1985
1985
  */
1986
- removeMessageDisappearingSettings() {
1987
- const ret = wasm.conversation_removeMessageDisappearingSettings(this.__wbg_ptr);
1986
+ sync() {
1987
+ const ret = wasm.conversation_sync(this.__wbg_ptr);
1988
1988
  return ret;
1989
1989
  }
1990
1990
  /**
1991
- * @returns {MessageDisappearingSettings | undefined}
1991
+ * @param {any} callback
1992
+ * @returns {StreamCloser}
1992
1993
  */
1993
- messageDisappearingSettings() {
1994
- const ret = wasm.conversation_messageDisappearingSettings(this.__wbg_ptr);
1994
+ stream(callback) {
1995
+ const ret = wasm.conversation_stream(this.__wbg_ptr, callback);
1995
1996
  if (ret[2]) {
1996
1997
  throw takeFromExternrefTable0(ret[1]);
1997
1998
  }
1998
- return ret[0] === 0 ? undefined : MessageDisappearingSettings.__wrap(ret[0]);
1999
+ return StreamCloser.__wrap(ret[0]);
1999
2000
  }
2000
2001
  /**
2002
+ * @param {string} inbox_id
2001
2003
  * @returns {boolean}
2002
2004
  */
2003
- isMessageDisappearingEnabled() {
2004
- const ret = wasm.conversation_isMessageDisappearingEnabled(this.__wbg_ptr);
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);
2005
2009
  if (ret[2]) {
2006
2010
  throw takeFromExternrefTable0(ret[1]);
2007
2011
  }
2008
2012
  return ret[0] !== 0;
2009
2013
  }
2010
2014
  /**
2011
- * @returns {any}
2012
- */
2013
- getHmacKeys() {
2014
- const ret = wasm.conversation_getHmacKeys(this.__wbg_ptr);
2015
- if (ret[2]) {
2016
- throw takeFromExternrefTable0(ret[1]);
2017
- }
2018
- return takeFromExternrefTable0(ret[0]);
2019
- }
2020
- /**
2021
- * @returns {Promise<any>}
2015
+ * @param {string} inbox_id
2016
+ * @returns {Promise<void>}
2022
2017
  */
2023
- getDebugInfo() {
2024
- const ret = wasm.conversation_getDebugInfo(this.__wbg_ptr);
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);
2025
2022
  return ret;
2026
2023
  }
2027
2024
  /**
2028
- * @returns {Promise<Conversation[]>}
2025
+ * @returns {boolean}
2029
2026
  */
2030
- findDuplicateDms() {
2031
- const ret = wasm.conversation_findDuplicateDms(this.__wbg_ptr);
2032
- return ret;
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;
2033
2033
  }
2034
2034
  /**
2035
- * @param {ListMessagesOptions | null} [opts]
2036
- * @returns {Promise<DecodedMessage[]>}
2035
+ * @returns {ConsentState}
2037
2036
  */
2038
- findMessagesV2(opts) {
2039
- let ptr0 = 0;
2040
- if (!isLikeNone(opts)) {
2041
- _assertClass(opts, ListMessagesOptions);
2042
- 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]);
2043
2041
  }
2044
- const ret = wasm.conversation_findMessagesV2(this.__wbg_ptr, ptr0);
2045
- return ret;
2042
+ return ret[0];
2046
2043
  }
2047
2044
  /**
2048
- * @returns {Promise<any>}
2045
+ * @param {ConsentState} state
2049
2046
  */
2050
- getLastReadTimes() {
2051
- const ret = wasm.conversation_getLastReadTimes(this.__wbg_ptr);
2052
- return ret;
2047
+ updateConsentState(state) {
2048
+ const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
2049
+ if (ret[1]) {
2050
+ throw takeFromExternrefTable0(ret[0]);
2051
+ }
2053
2052
  }
2054
2053
  }
2055
2054
  if (Symbol.dispose) Conversation.prototype[Symbol.dispose] = Conversation.prototype.free;
@@ -2316,22 +2315,6 @@ export class Conversations {
2316
2315
  const ptr = this.__destroy_into_raw();
2317
2316
  wasm.__wbg_conversations_free(ptr, 0);
2318
2317
  }
2319
- /**
2320
- * @param {CreateGroupOptions | null} [options]
2321
- * @returns {Conversation}
2322
- */
2323
- createGroupOptimistic(options) {
2324
- let ptr0 = 0;
2325
- if (!isLikeNone(options)) {
2326
- _assertClass(options, CreateGroupOptions);
2327
- ptr0 = options.__destroy_into_raw();
2328
- }
2329
- const ret = wasm.conversations_createGroupOptimistic(this.__wbg_ptr, ptr0);
2330
- if (ret[2]) {
2331
- throw takeFromExternrefTable0(ret[1]);
2332
- }
2333
- return Conversation.__wrap(ret[0]);
2334
- }
2335
2318
  /**
2336
2319
  * @param {Identifier[]} account_identifiers
2337
2320
  * @param {CreateGroupOptions | null} [options]
@@ -2349,50 +2332,25 @@ export class Conversations {
2349
2332
  return ret;
2350
2333
  }
2351
2334
  /**
2352
- * @param {string[]} inbox_ids
2353
- * @param {CreateGroupOptions | null} [options]
2354
- * @returns {Promise<Conversation>}
2355
- */
2356
- createGroupByInboxIds(inbox_ids, options) {
2357
- const ptr0 = passArrayJsValueToWasm0(inbox_ids, wasm.__wbindgen_malloc);
2358
- const len0 = WASM_VECTOR_LEN;
2359
- let ptr1 = 0;
2360
- if (!isLikeNone(options)) {
2361
- _assertClass(options, CreateGroupOptions);
2362
- ptr1 = options.__destroy_into_raw();
2363
- }
2364
- const ret = wasm.conversations_createGroupByInboxIds(this.__wbg_ptr, ptr0, len0, ptr1);
2365
- return ret;
2366
- }
2367
- /**
2368
- * @param {Identifier} account_identifier
2369
- * @param {CreateDMOptions | null} [options]
2370
- * @returns {Promise<Conversation>}
2335
+ * @returns {any}
2371
2336
  */
2372
- createDm(account_identifier, options) {
2373
- let ptr0 = 0;
2374
- if (!isLikeNone(options)) {
2375
- _assertClass(options, CreateDMOptions);
2376
- 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]);
2377
2341
  }
2378
- const ret = wasm.conversations_createDm(this.__wbg_ptr, account_identifier, ptr0);
2379
- return ret;
2342
+ return takeFromExternrefTable0(ret[0]);
2380
2343
  }
2381
2344
  /**
2382
- * @param {string} inbox_id
2383
- * @param {CreateDMOptions | null} [options]
2384
- * @returns {Promise<Conversation>}
2345
+ * @param {any} callback
2346
+ * @returns {StreamCloser}
2385
2347
  */
2386
- createDmByInboxId(inbox_id, options) {
2387
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2388
- const len0 = WASM_VECTOR_LEN;
2389
- let ptr1 = 0;
2390
- if (!isLikeNone(options)) {
2391
- _assertClass(options, CreateDMOptions);
2392
- 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]);
2393
2352
  }
2394
- const ret = wasm.conversations_createDmByInboxId(this.__wbg_ptr, ptr0, len0, ptr1);
2395
- return ret;
2353
+ return StreamCloser.__wrap(ret[0]);
2396
2354
  }
2397
2355
  /**
2398
2356
  * @param {string} group_id
@@ -2408,17 +2366,18 @@ export class Conversations {
2408
2366
  return Conversation.__wrap(ret[0]);
2409
2367
  }
2410
2368
  /**
2411
- * @param {string} target_inbox_id
2412
- * @returns {Conversation}
2369
+ * @param {Identifier} account_identifier
2370
+ * @param {CreateDMOptions | null} [options]
2371
+ * @returns {Promise<Conversation>}
2413
2372
  */
2414
- findDmByTargetInboxId(target_inbox_id) {
2415
- const ptr0 = passStringToWasm0(target_inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2416
- const len0 = WASM_VECTOR_LEN;
2417
- const ret = wasm.conversations_findDmByTargetInboxId(this.__wbg_ptr, ptr0, len0);
2418
- if (ret[2]) {
2419
- 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();
2420
2378
  }
2421
- return Conversation.__wrap(ret[0]);
2379
+ const ret = wasm.conversations_createDm(this.__wbg_ptr, account_identifier, ptr0);
2380
+ return ret;
2422
2381
  }
2423
2382
  /**
2424
2383
  * @param {string} message_id
@@ -2434,11 +2393,30 @@ export class Conversations {
2434
2393
  return Message.__wrap(ret[0]);
2435
2394
  }
2436
2395
  /**
2437
- * @returns {Promise<void>}
2396
+ * @param {any} callback
2397
+ * @returns {StreamCloser}
2438
2398
  */
2439
- sync() {
2440
- const ret = wasm.conversations_sync(this.__wbg_ptr);
2441
- return ret;
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]);
2405
+ }
2406
+ /**
2407
+ * @param {any} callback
2408
+ * @param {ConversationType | null} [conversation_type]
2409
+ * @param {any[] | null} [consent_states]
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]);
2442
2420
  }
2443
2421
  /**
2444
2422
  * @param {any[] | null} [consent_states]
@@ -2451,30 +2429,49 @@ export class Conversations {
2451
2429
  return ret;
2452
2430
  }
2453
2431
  /**
2454
- * @param {ListConversationsOptions | null} [opts]
2455
- * @returns {Array<any>}
2432
+ * @param {CreateGroupOptions | null} [options]
2433
+ * @returns {Conversation}
2456
2434
  */
2457
- list(opts) {
2435
+ createGroupOptimistic(options) {
2458
2436
  let ptr0 = 0;
2459
- if (!isLikeNone(opts)) {
2460
- _assertClass(opts, ListConversationsOptions);
2461
- ptr0 = opts.__destroy_into_raw();
2437
+ if (!isLikeNone(options)) {
2438
+ _assertClass(options, CreateGroupOptions);
2439
+ ptr0 = options.__destroy_into_raw();
2462
2440
  }
2463
- const ret = wasm.conversations_list(this.__wbg_ptr, ptr0);
2441
+ const ret = wasm.conversations_createGroupOptimistic(this.__wbg_ptr, ptr0);
2464
2442
  if (ret[2]) {
2465
2443
  throw takeFromExternrefTable0(ret[1]);
2466
2444
  }
2467
- return takeFromExternrefTable0(ret[0]);
2445
+ return Conversation.__wrap(ret[0]);
2468
2446
  }
2469
2447
  /**
2470
- * @returns {any}
2448
+ * @param {string[]} inbox_ids
2449
+ * @param {CreateGroupOptions | null} [options]
2450
+ * @returns {Promise<Conversation>}
2471
2451
  */
2472
- getHmacKeys() {
2473
- const ret = wasm.conversations_getHmacKeys(this.__wbg_ptr);
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);
2474
2471
  if (ret[2]) {
2475
2472
  throw takeFromExternrefTable0(ret[1]);
2476
2473
  }
2477
- return takeFromExternrefTable0(ret[0]);
2474
+ return Conversation.__wrap(ret[0]);
2478
2475
  }
2479
2476
  /**
2480
2477
  * Returns a 'ReadableStream' of Conversations
@@ -2486,49 +2483,51 @@ export class Conversations {
2486
2483
  return ret;
2487
2484
  }
2488
2485
  /**
2489
- * @param {any} callback
2490
- * @param {ConversationType | null} [conversation_type]
2491
- * @returns {StreamCloser}
2486
+ * @param {string} inbox_id
2487
+ * @param {CreateDMOptions | null} [options]
2488
+ * @returns {Promise<Conversation>}
2489
+ */
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();
2497
+ }
2498
+ const ret = wasm.conversations_createDmByInboxId(this.__wbg_ptr, ptr0, len0, ptr1);
2499
+ return ret;
2500
+ }
2501
+ /**
2502
+ * @param {ListConversationsOptions | null} [opts]
2503
+ * @returns {Array<any>}
2492
2504
  */
2493
- stream(callback, conversation_type) {
2494
- const ret = wasm.conversations_stream(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type);
2495
- if (ret[2]) {
2496
- throw takeFromExternrefTable0(ret[1]);
2505
+ list(opts) {
2506
+ let ptr0 = 0;
2507
+ if (!isLikeNone(opts)) {
2508
+ _assertClass(opts, ListConversationsOptions);
2509
+ ptr0 = opts.__destroy_into_raw();
2497
2510
  }
2498
- return StreamCloser.__wrap(ret[0]);
2499
- }
2500
- /**
2501
- * @param {any} callback
2502
- * @param {ConversationType | null} [conversation_type]
2503
- * @param {any[] | null} [consent_states]
2504
- * @returns {StreamCloser}
2505
- */
2506
- streamAllMessages(callback, conversation_type, consent_states) {
2507
- var ptr0 = isLikeNone(consent_states) ? 0 : passArrayJsValueToWasm0(consent_states, wasm.__wbindgen_malloc);
2508
- var len0 = WASM_VECTOR_LEN;
2509
- const ret = wasm.conversations_streamAllMessages(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type, ptr0, len0);
2511
+ const ret = wasm.conversations_list(this.__wbg_ptr, ptr0);
2510
2512
  if (ret[2]) {
2511
2513
  throw takeFromExternrefTable0(ret[1]);
2512
2514
  }
2513
- return StreamCloser.__wrap(ret[0]);
2515
+ return takeFromExternrefTable0(ret[0]);
2514
2516
  }
2515
2517
  /**
2516
- * @param {any} callback
2517
- * @returns {StreamCloser}
2518
+ * @returns {Promise<void>}
2518
2519
  */
2519
- streamConsent(callback) {
2520
- const ret = wasm.conversations_streamConsent(this.__wbg_ptr, callback);
2521
- if (ret[2]) {
2522
- throw takeFromExternrefTable0(ret[1]);
2523
- }
2524
- return StreamCloser.__wrap(ret[0]);
2520
+ sync() {
2521
+ const ret = wasm.conversations_sync(this.__wbg_ptr);
2522
+ return ret;
2525
2523
  }
2526
2524
  /**
2527
2525
  * @param {any} callback
2526
+ * @param {ConversationType | null} [conversation_type]
2528
2527
  * @returns {StreamCloser}
2529
2528
  */
2530
- streamPreferences(callback) {
2531
- const ret = wasm.conversations_streamPreferences(this.__wbg_ptr, callback);
2529
+ stream(callback, conversation_type) {
2530
+ const ret = wasm.conversations_stream(this.__wbg_ptr, callback, isLikeNone(conversation_type) ? 4 : conversation_type);
2532
2531
  if (ret[2]) {
2533
2532
  throw takeFromExternrefTable0(ret[1]);
2534
2533
  }
@@ -2554,6 +2553,20 @@ export class CreateDMOptions {
2554
2553
  const ptr = this.__destroy_into_raw();
2555
2554
  wasm.__wbg_createdmoptions_free(ptr, 0);
2556
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
+ }
2557
2570
  /**
2558
2571
  * @returns {MessageDisappearingSettings | undefined}
2559
2572
  */
@@ -2572,20 +2585,6 @@ export class CreateDMOptions {
2572
2585
  }
2573
2586
  wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
2574
2587
  }
2575
- /**
2576
- * @param {MessageDisappearingSettings | null} [message_disappearing_settings]
2577
- */
2578
- constructor(message_disappearing_settings) {
2579
- let ptr0 = 0;
2580
- if (!isLikeNone(message_disappearing_settings)) {
2581
- _assertClass(message_disappearing_settings, MessageDisappearingSettings);
2582
- ptr0 = message_disappearing_settings.__destroy_into_raw();
2583
- }
2584
- const ret = wasm.createdmoptions_new(ptr0);
2585
- this.__wbg_ptr = ret >>> 0;
2586
- CreateDMOptionsFinalization.register(this, this.__wbg_ptr, this);
2587
- return this;
2588
- }
2589
2588
  }
2590
2589
  if (Symbol.dispose) CreateDMOptions.prototype[Symbol.dispose] = CreateDMOptions.prototype.free;
2591
2590
 
@@ -2606,6 +2605,36 @@ export class CreateGroupOptions {
2606
2605
  const ptr = this.__destroy_into_raw();
2607
2606
  wasm.__wbg_creategroupoptions_free(ptr, 0);
2608
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
+ }
2609
2638
  /**
2610
2639
  * @returns {GroupPermissionsOptions | undefined}
2611
2640
  */
@@ -2715,36 +2744,6 @@ export class CreateGroupOptions {
2715
2744
  }
2716
2745
  wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
2717
2746
  }
2718
- /**
2719
- * @param {GroupPermissionsOptions | null} [permissions]
2720
- * @param {string | null} [group_name]
2721
- * @param {string | null} [group_image_url_square]
2722
- * @param {string | null} [group_description]
2723
- * @param {PermissionPolicySet | null} [custom_permission_policy_set]
2724
- * @param {MessageDisappearingSettings | null} [message_disappearing_settings]
2725
- */
2726
- constructor(permissions, group_name, group_image_url_square, group_description, custom_permission_policy_set, message_disappearing_settings) {
2727
- var ptr0 = isLikeNone(group_name) ? 0 : passStringToWasm0(group_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2728
- var len0 = WASM_VECTOR_LEN;
2729
- var ptr1 = isLikeNone(group_image_url_square) ? 0 : passStringToWasm0(group_image_url_square, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2730
- var len1 = WASM_VECTOR_LEN;
2731
- var ptr2 = isLikeNone(group_description) ? 0 : passStringToWasm0(group_description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2732
- var len2 = WASM_VECTOR_LEN;
2733
- let ptr3 = 0;
2734
- if (!isLikeNone(custom_permission_policy_set)) {
2735
- _assertClass(custom_permission_policy_set, PermissionPolicySet);
2736
- ptr3 = custom_permission_policy_set.__destroy_into_raw();
2737
- }
2738
- let ptr4 = 0;
2739
- if (!isLikeNone(message_disappearing_settings)) {
2740
- _assertClass(message_disappearing_settings, MessageDisappearingSettings);
2741
- ptr4 = message_disappearing_settings.__destroy_into_raw();
2742
- }
2743
- const ret = wasm.creategroupoptions_new(isLikeNone(permissions) ? 3 : permissions, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4);
2744
- this.__wbg_ptr = ret >>> 0;
2745
- CreateGroupOptionsFinalization.register(this, this.__wbg_ptr, this);
2746
- return this;
2747
- }
2748
2747
  }
2749
2748
  if (Symbol.dispose) CreateGroupOptions.prototype[Symbol.dispose] = CreateGroupOptions.prototype.free;
2750
2749
 
@@ -3001,6 +3000,13 @@ export class DecodedMessageContent {
3001
3000
  const ptr = this.__destroy_into_raw();
3002
3001
  wasm.__wbg_decodedmessagecontent_free(ptr, 0);
3003
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
+ }
3004
3010
  /**
3005
3011
  * @returns {PayloadType}
3006
3012
  */
@@ -3009,32 +3015,25 @@ export class DecodedMessageContent {
3009
3015
  return ret;
3010
3016
  }
3011
3017
  /**
3012
- * @returns {TextContent | undefined}
3013
- */
3014
- asText() {
3015
- const ret = wasm.decodedmessagecontent_asText(this.__wbg_ptr);
3016
- return ret === 0 ? undefined : TextContent.__wrap(ret);
3017
- }
3018
- /**
3019
- * @returns {EnrichedReply | undefined}
3018
+ * @returns {Attachment | undefined}
3020
3019
  */
3021
- asReply() {
3022
- const ret = wasm.decodedmessagecontent_asReply(this.__wbg_ptr);
3023
- return ret === 0 ? undefined : EnrichedReply.__wrap(ret);
3020
+ asAttachment() {
3021
+ const ret = wasm.decodedmessagecontent_asAttachment(this.__wbg_ptr);
3022
+ return ret === 0 ? undefined : Attachment.__wrap(ret);
3024
3023
  }
3025
3024
  /**
3026
- * @returns {ReactionPayload | undefined}
3025
+ * @returns {ReadReceipt | undefined}
3027
3026
  */
3028
- asReaction() {
3029
- const ret = wasm.decodedmessagecontent_asReaction(this.__wbg_ptr);
3030
- return ret === 0 ? undefined : ReactionPayload.__wrap(ret);
3027
+ asReadReceipt() {
3028
+ const ret = wasm.decodedmessagecontent_asReadReceipt(this.__wbg_ptr);
3029
+ return ret === 0 ? undefined : ReadReceipt.__wrap(ret);
3031
3030
  }
3032
3031
  /**
3033
- * @returns {Attachment | undefined}
3032
+ * @returns {GroupUpdated | undefined}
3034
3033
  */
3035
- asAttachment() {
3036
- const ret = wasm.decodedmessagecontent_asAttachment(this.__wbg_ptr);
3037
- return ret === 0 ? undefined : Attachment.__wrap(ret);
3034
+ asGroupUpdated() {
3035
+ const ret = wasm.decodedmessagecontent_asGroupUpdated(this.__wbg_ptr);
3036
+ return ret === 0 ? undefined : GroupUpdated.__wrap(ret);
3038
3037
  }
3039
3038
  /**
3040
3039
  * @returns {RemoteAttachment | undefined}
@@ -3044,11 +3043,14 @@ export class DecodedMessageContent {
3044
3043
  return ret === 0 ? undefined : RemoteAttachment.__wrap(ret);
3045
3044
  }
3046
3045
  /**
3047
- * @returns {MultiRemoteAttachment | undefined}
3046
+ * @returns {any}
3048
3047
  */
3049
- asMultiRemoteAttachment() {
3050
- const ret = wasm.decodedmessagecontent_asMultiRemoteAttachment(this.__wbg_ptr);
3051
- return ret === 0 ? undefined : MultiRemoteAttachment.__wrap(ret);
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]);
3052
3054
  }
3053
3055
  /**
3054
3056
  * @returns {TransactionReference | undefined}
@@ -3058,28 +3060,25 @@ export class DecodedMessageContent {
3058
3060
  return ret === 0 ? undefined : TransactionReference.__wrap(ret);
3059
3061
  }
3060
3062
  /**
3061
- * @returns {GroupUpdated | undefined}
3063
+ * @returns {MultiRemoteAttachment | undefined}
3062
3064
  */
3063
- asGroupUpdated() {
3064
- const ret = wasm.decodedmessagecontent_asGroupUpdated(this.__wbg_ptr);
3065
- return ret === 0 ? undefined : GroupUpdated.__wrap(ret);
3065
+ asMultiRemoteAttachment() {
3066
+ const ret = wasm.decodedmessagecontent_asMultiRemoteAttachment(this.__wbg_ptr);
3067
+ return ret === 0 ? undefined : MultiRemoteAttachment.__wrap(ret);
3066
3068
  }
3067
3069
  /**
3068
- * @returns {ReadReceipt | undefined}
3070
+ * @returns {TextContent | undefined}
3069
3071
  */
3070
- asReadReceipt() {
3071
- const ret = wasm.decodedmessagecontent_asReadReceipt(this.__wbg_ptr);
3072
- return ret === 0 ? undefined : ReadReceipt.__wrap(ret);
3072
+ asText() {
3073
+ const ret = wasm.decodedmessagecontent_asText(this.__wbg_ptr);
3074
+ return ret === 0 ? undefined : TextContent.__wrap(ret);
3073
3075
  }
3074
3076
  /**
3075
- * @returns {any}
3077
+ * @returns {EnrichedReply | undefined}
3076
3078
  */
3077
- asWalletSendCalls() {
3078
- const ret = wasm.decodedmessagecontent_asWalletSendCalls(this.__wbg_ptr);
3079
- if (ret[2]) {
3080
- throw takeFromExternrefTable0(ret[1]);
3081
- }
3082
- return takeFromExternrefTable0(ret[0]);
3079
+ asReply() {
3080
+ const ret = wasm.decodedmessagecontent_asReply(this.__wbg_ptr);
3081
+ return ret === 0 ? undefined : EnrichedReply.__wrap(ret);
3083
3082
  }
3084
3083
  /**
3085
3084
  * @returns {EncodedContent | undefined}
@@ -3116,6 +3115,26 @@ export class EncodedContent {
3116
3115
  const ptr = this.__destroy_into_raw();
3117
3116
  wasm.__wbg_encodedcontent_free(ptr, 0);
3118
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
+ }
3119
3138
  /**
3120
3139
  * @returns {ContentTypeId | undefined}
3121
3140
  */
@@ -3189,29 +3208,9 @@ export class EncodedContent {
3189
3208
  }
3190
3209
  /**
3191
3210
  * @param {Uint8Array} arg0
3192
- */
3193
- set content(arg0) {
3194
- wasm.__wbg_set_encodedcontent_content(this.__wbg_ptr, arg0);
3195
- }
3196
- /**
3197
- * @param {ContentTypeId | null | undefined} type
3198
- * @param {any} parameters
3199
- * @param {string | null | undefined} fallback
3200
- * @param {number | null | undefined} compression
3201
- * @param {Uint8Array} content
3202
- */
3203
- constructor(type, parameters, fallback, compression, content) {
3204
- let ptr0 = 0;
3205
- if (!isLikeNone(type)) {
3206
- _assertClass(type, ContentTypeId);
3207
- ptr0 = type.__destroy_into_raw();
3208
- }
3209
- var ptr1 = isLikeNone(fallback) ? 0 : passStringToWasm0(fallback, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3210
- var len1 = WASM_VECTOR_LEN;
3211
- const ret = wasm.encodedcontent_new(ptr0, parameters, ptr1, len1, isLikeNone(compression) ? 0x100000001 : (compression) >> 0, content);
3212
- this.__wbg_ptr = ret >>> 0;
3213
- EncodedContentFinalization.register(this, this.__wbg_ptr, this);
3214
- return this;
3211
+ */
3212
+ set content(arg0) {
3213
+ wasm.__wbg_set_encodedcontent_content(this.__wbg_ptr, arg0);
3215
3214
  }
3216
3215
  }
3217
3216
  if (Symbol.dispose) EncodedContent.prototype[Symbol.dispose] = EncodedContent.prototype.free;
@@ -3241,6 +3240,13 @@ export class EnrichedReply {
3241
3240
  const ptr = this.__destroy_into_raw();
3242
3241
  wasm.__wbg_enrichedreply_free(ptr, 0);
3243
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
+ }
3244
3250
  /**
3245
3251
  * @returns {string}
3246
3252
  */
@@ -3263,13 +3269,6 @@ export class EnrichedReply {
3263
3269
  const ret = wasm.enrichedreply_content(this.__wbg_ptr);
3264
3270
  return DecodedMessageContent.__wrap(ret);
3265
3271
  }
3266
- /**
3267
- * @returns {DecodedMessage | undefined}
3268
- */
3269
- get inReplyTo() {
3270
- const ret = wasm.enrichedreply_inReplyTo(this.__wbg_ptr);
3271
- return ret === 0 ? undefined : DecodedMessage.__wrap(ret);
3272
- }
3273
3272
  }
3274
3273
  if (Symbol.dispose) EnrichedReply.prototype[Symbol.dispose] = EnrichedReply.prototype.free;
3275
3274
 
@@ -3290,6 +3289,25 @@ export class GroupMember {
3290
3289
  const ptr = this.__destroy_into_raw();
3291
3290
  wasm.__wbg_groupmember_free(ptr, 0);
3292
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
+ }
3293
3311
  /**
3294
3312
  * @returns {string}
3295
3313
  */
@@ -3311,7 +3329,7 @@ export class GroupMember {
3311
3329
  set inboxId(arg0) {
3312
3330
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3313
3331
  const len0 = WASM_VECTOR_LEN;
3314
- wasm.__wbg_set_consent_entity(this.__wbg_ptr, ptr0, len0);
3332
+ wasm.__wbg_set_attachment_mimeType(this.__wbg_ptr, ptr0, len0);
3315
3333
  }
3316
3334
  /**
3317
3335
  * @returns {Identifier[]}
@@ -3373,25 +3391,6 @@ export class GroupMember {
3373
3391
  set consentState(arg0) {
3374
3392
  wasm.__wbg_set_groupmember_consentState(this.__wbg_ptr, arg0);
3375
3393
  }
3376
- /**
3377
- * @param {string} inboxId
3378
- * @param {Identifier[]} accountIdentifiers
3379
- * @param {string[]} installationIds
3380
- * @param {PermissionLevel} permissionLevel
3381
- * @param {ConsentState} consentState
3382
- */
3383
- constructor(inboxId, accountIdentifiers, installationIds, permissionLevel, consentState) {
3384
- const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3385
- const len0 = WASM_VECTOR_LEN;
3386
- const ptr1 = passArrayJsValueToWasm0(accountIdentifiers, wasm.__wbindgen_malloc);
3387
- const len1 = WASM_VECTOR_LEN;
3388
- const ptr2 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
3389
- const len2 = WASM_VECTOR_LEN;
3390
- const ret = wasm.groupmember_new(ptr0, len0, ptr1, len1, ptr2, len2, permissionLevel, consentState);
3391
- this.__wbg_ptr = ret >>> 0;
3392
- GroupMemberFinalization.register(this, this.__wbg_ptr, this);
3393
- return this;
3394
- }
3395
3394
  }
3396
3395
  if (Symbol.dispose) GroupMember.prototype[Symbol.dispose] = GroupMember.prototype.free;
3397
3396
 
@@ -3479,24 +3478,24 @@ export class GroupPermissions {
3479
3478
  wasm.__wbg_grouppermissions_free(ptr, 0);
3480
3479
  }
3481
3480
  /**
3482
- * @returns {GroupPermissionsOptions}
3481
+ * @returns {PermissionPolicySet}
3483
3482
  */
3484
- policyType() {
3485
- const ret = wasm.grouppermissions_policyType(this.__wbg_ptr);
3483
+ policySet() {
3484
+ const ret = wasm.grouppermissions_policySet(this.__wbg_ptr);
3486
3485
  if (ret[2]) {
3487
3486
  throw takeFromExternrefTable0(ret[1]);
3488
3487
  }
3489
- return ret[0];
3488
+ return PermissionPolicySet.__wrap(ret[0]);
3490
3489
  }
3491
3490
  /**
3492
- * @returns {PermissionPolicySet}
3491
+ * @returns {GroupPermissionsOptions}
3493
3492
  */
3494
- policySet() {
3495
- const ret = wasm.grouppermissions_policySet(this.__wbg_ptr);
3493
+ policyType() {
3494
+ const ret = wasm.grouppermissions_policyType(this.__wbg_ptr);
3496
3495
  if (ret[2]) {
3497
3496
  throw takeFromExternrefTable0(ret[1]);
3498
3497
  }
3499
- return PermissionPolicySet.__wrap(ret[0]);
3498
+ return ret[0];
3500
3499
  }
3501
3500
  }
3502
3501
  if (Symbol.dispose) GroupPermissions.prototype[Symbol.dispose] = GroupPermissions.prototype.free;
@@ -3526,6 +3525,16 @@ export class GroupSyncSummary {
3526
3525
  const ptr = this.__destroy_into_raw();
3527
3526
  wasm.__wbg_groupsyncsummary_free(ptr, 0);
3528
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
+ }
3529
3538
  /**
3530
3539
  * @returns {number}
3531
3540
  */
@@ -3552,16 +3561,6 @@ export class GroupSyncSummary {
3552
3561
  set numSynced(arg0) {
3553
3562
  wasm.__wbg_set_groupsyncsummary_numSynced(this.__wbg_ptr, arg0);
3554
3563
  }
3555
- /**
3556
- * @param {number} num_eligible
3557
- * @param {number} num_synced
3558
- */
3559
- constructor(num_eligible, num_synced) {
3560
- const ret = wasm.groupsyncsummary_new(num_eligible, num_synced);
3561
- this.__wbg_ptr = ret >>> 0;
3562
- GroupSyncSummaryFinalization.register(this, this.__wbg_ptr, this);
3563
- return this;
3564
- }
3565
3564
  }
3566
3565
  if (Symbol.dispose) GroupSyncSummary.prototype[Symbol.dispose] = GroupSyncSummary.prototype.free;
3567
3566
 
@@ -3611,7 +3610,7 @@ export class GroupUpdated {
3611
3610
  set initiatedByInboxId(arg0) {
3612
3611
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3613
3612
  const len0 = WASM_VECTOR_LEN;
3614
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
3613
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
3615
3614
  }
3616
3615
  /**
3617
3616
  * @returns {Inbox[]}
@@ -3850,7 +3849,7 @@ export class Inbox {
3850
3849
  set inboxId(arg0) {
3851
3850
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3852
3851
  const len0 = WASM_VECTOR_LEN;
3853
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
3852
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
3854
3853
  }
3855
3854
  }
3856
3855
  if (Symbol.dispose) Inbox.prototype[Symbol.dispose] = Inbox.prototype.free;
@@ -3880,6 +3879,24 @@ export class InboxState {
3880
3879
  const ptr = this.__destroy_into_raw();
3881
3880
  wasm.__wbg_inboxstate_free(ptr, 0);
3882
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
+ }
3883
3900
  /**
3884
3901
  * @returns {string}
3885
3902
  */
@@ -3901,7 +3918,7 @@ export class InboxState {
3901
3918
  set inboxId(arg0) {
3902
3919
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3903
3920
  const len0 = WASM_VECTOR_LEN;
3904
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
3921
+ wasm.__wbg_set_inboxstate_inboxId(this.__wbg_ptr, ptr0, len0);
3905
3922
  }
3906
3923
  /**
3907
3924
  * @returns {Identifier}
@@ -3950,24 +3967,6 @@ export class InboxState {
3950
3967
  const len0 = WASM_VECTOR_LEN;
3951
3968
  wasm.__wbg_set_inboxstate_accountIdentifiers(this.__wbg_ptr, ptr0, len0);
3952
3969
  }
3953
- /**
3954
- * @param {string} inbox_id
3955
- * @param {Identifier} recovery_identifier
3956
- * @param {Installation[]} installations
3957
- * @param {Identifier[]} account_identifiers
3958
- */
3959
- constructor(inbox_id, recovery_identifier, installations, account_identifiers) {
3960
- const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3961
- const len0 = WASM_VECTOR_LEN;
3962
- const ptr1 = passArrayJsValueToWasm0(installations, wasm.__wbindgen_malloc);
3963
- const len1 = WASM_VECTOR_LEN;
3964
- const ptr2 = passArrayJsValueToWasm0(account_identifiers, wasm.__wbindgen_malloc);
3965
- const len2 = WASM_VECTOR_LEN;
3966
- const ret = wasm.inboxstate_new(ptr0, len0, recovery_identifier, ptr1, len1, ptr2, len2);
3967
- this.__wbg_ptr = ret >>> 0;
3968
- InboxStateFinalization.register(this, this.__wbg_ptr, this);
3969
- return this;
3970
- }
3971
3970
  }
3972
3971
  if (Symbol.dispose) InboxState.prototype[Symbol.dispose] = InboxState.prototype.free;
3973
3972
 
@@ -4003,6 +4002,19 @@ export class Installation {
4003
4002
  const ptr = this.__destroy_into_raw();
4004
4003
  wasm.__wbg_installation_free(ptr, 0);
4005
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
+ }
4006
4018
  /**
4007
4019
  * @returns {Uint8Array}
4008
4020
  */
@@ -4052,19 +4064,6 @@ export class Installation {
4052
4064
  set clientTimestampNs(arg0) {
4053
4065
  wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4054
4066
  }
4055
- /**
4056
- * @param {Uint8Array} bytes
4057
- * @param {string} id
4058
- * @param {bigint | null} [client_timestamp_ns]
4059
- */
4060
- constructor(bytes, id, client_timestamp_ns) {
4061
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4062
- const len0 = WASM_VECTOR_LEN;
4063
- const ret = wasm.installation_new(bytes, ptr0, len0, !isLikeNone(client_timestamp_ns), isLikeNone(client_timestamp_ns) ? BigInt(0) : client_timestamp_ns);
4064
- this.__wbg_ptr = ret >>> 0;
4065
- InstallationFinalization.register(this, this.__wbg_ptr, this);
4066
- return this;
4067
- }
4068
4067
  }
4069
4068
  if (Symbol.dispose) Installation.prototype[Symbol.dispose] = Installation.prototype.free;
4070
4069
 
@@ -4085,13 +4084,6 @@ export class IntoUnderlyingByteSource {
4085
4084
  const ptr = this.__destroy_into_raw();
4086
4085
  wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
4087
4086
  }
4088
- /**
4089
- * @returns {ReadableStreamType}
4090
- */
4091
- get type() {
4092
- const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
4093
- return __wbindgen_enum_ReadableStreamType[ret];
4094
- }
4095
4087
  /**
4096
4088
  * @returns {number}
4097
4089
  */
@@ -4099,6 +4091,14 @@ export class IntoUnderlyingByteSource {
4099
4091
  const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
4100
4092
  return ret >>> 0;
4101
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
+ }
4102
4102
  /**
4103
4103
  * @param {ReadableByteStreamController} controller
4104
4104
  */
@@ -4106,12 +4106,11 @@ export class IntoUnderlyingByteSource {
4106
4106
  wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
4107
4107
  }
4108
4108
  /**
4109
- * @param {ReadableByteStreamController} controller
4110
- * @returns {Promise<any>}
4109
+ * @returns {ReadableStreamType}
4111
4110
  */
4112
- pull(controller) {
4113
- const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
4114
- return ret;
4111
+ get type() {
4112
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
4113
+ return __wbindgen_enum_ReadableStreamType[ret];
4115
4114
  }
4116
4115
  cancel() {
4117
4116
  const ptr = this.__destroy_into_raw();
@@ -4138,11 +4137,12 @@ export class IntoUnderlyingSink {
4138
4137
  wasm.__wbg_intounderlyingsink_free(ptr, 0);
4139
4138
  }
4140
4139
  /**
4141
- * @param {any} chunk
4140
+ * @param {any} reason
4142
4141
  * @returns {Promise<any>}
4143
4142
  */
4144
- write(chunk) {
4145
- const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
4143
+ abort(reason) {
4144
+ const ptr = this.__destroy_into_raw();
4145
+ const ret = wasm.intounderlyingsink_abort(ptr, reason);
4146
4146
  return ret;
4147
4147
  }
4148
4148
  /**
@@ -4154,12 +4154,11 @@ export class IntoUnderlyingSink {
4154
4154
  return ret;
4155
4155
  }
4156
4156
  /**
4157
- * @param {any} reason
4157
+ * @param {any} chunk
4158
4158
  * @returns {Promise<any>}
4159
4159
  */
4160
- abort(reason) {
4161
- const ptr = this.__destroy_into_raw();
4162
- const ret = wasm.intounderlyingsink_abort(ptr, reason);
4160
+ write(chunk) {
4161
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
4163
4162
  return ret;
4164
4163
  }
4165
4164
  }
@@ -4226,7 +4225,7 @@ export class KeyPackageStatus {
4226
4225
  * @returns {Lifetime | undefined}
4227
4226
  */
4228
4227
  get lifetime() {
4229
- const ret = wasm.__wbg_get_createdmoptions_messageDisappearingSettings(this.__wbg_ptr);
4228
+ const ret = wasm.__wbg_get_keypackagestatus_lifetime(this.__wbg_ptr);
4230
4229
  return ret === 0 ? undefined : Lifetime.__wrap(ret);
4231
4230
  }
4232
4231
  /**
@@ -4238,7 +4237,7 @@ export class KeyPackageStatus {
4238
4237
  _assertClass(arg0, Lifetime);
4239
4238
  ptr0 = arg0.__destroy_into_raw();
4240
4239
  }
4241
- wasm.__wbg_set_createdmoptions_messageDisappearingSettings(this.__wbg_ptr, ptr0);
4240
+ wasm.__wbg_set_keypackagestatus_lifetime(this.__wbg_ptr, ptr0);
4242
4241
  }
4243
4242
  /**
4244
4243
  * @returns {string | undefined}
@@ -4292,14 +4291,14 @@ export class Lifetime {
4292
4291
  * @returns {bigint}
4293
4292
  */
4294
4293
  get not_before() {
4295
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
4294
+ const ret = wasm.__wbg_get_lifetime_not_before(this.__wbg_ptr);
4296
4295
  return BigInt.asUintN(64, ret);
4297
4296
  }
4298
4297
  /**
4299
4298
  * @param {bigint} arg0
4300
4299
  */
4301
4300
  set not_before(arg0) {
4302
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
4301
+ wasm.__wbg_set_lifetime_not_before(this.__wbg_ptr, arg0);
4303
4302
  }
4304
4303
  /**
4305
4304
  * @returns {bigint}
@@ -4378,7 +4377,7 @@ export class ListConversationsOptions {
4378
4377
  * @param {bigint | null} [arg0]
4379
4378
  */
4380
4379
  set createdAfterNs(arg0) {
4381
- wasm.__wbg_set_installation_clientTimestampNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4380
+ wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4382
4381
  }
4383
4382
  /**
4384
4383
  * @returns {bigint | undefined}
@@ -4455,6 +4454,29 @@ export class ListMessagesOptions {
4455
4454
  const ptr = this.__destroy_into_raw();
4456
4455
  wasm.__wbg_listmessagesoptions_free(ptr, 0);
4457
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
+ }
4458
4480
  /**
4459
4481
  * @returns {any[] | undefined}
4460
4482
  */
@@ -4506,7 +4528,7 @@ export class ListMessagesOptions {
4506
4528
  * @param {bigint | null} [arg0]
4507
4529
  */
4508
4530
  set sentBeforeNs(arg0) {
4509
- wasm.__wbg_set_listmessagesoptions_sentBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4531
+ wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4510
4532
  }
4511
4533
  /**
4512
4534
  * @returns {bigint | undefined}
@@ -4519,7 +4541,7 @@ export class ListMessagesOptions {
4519
4541
  * @param {bigint | null} [arg0]
4520
4542
  */
4521
4543
  set sentAfterNs(arg0) {
4522
- wasm.__wbg_set_listmessagesoptions_sentAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4544
+ wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4523
4545
  }
4524
4546
  /**
4525
4547
  * @returns {bigint | undefined}
@@ -4532,7 +4554,7 @@ export class ListMessagesOptions {
4532
4554
  * @param {bigint | null} [arg0]
4533
4555
  */
4534
4556
  set limit(arg0) {
4535
- wasm.__wbg_set_listmessagesoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4557
+ wasm.__wbg_set_listconversationsoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
4536
4558
  }
4537
4559
  /**
4538
4560
  * @returns {DeliveryStatus | undefined}
@@ -4593,29 +4615,6 @@ export class ListMessagesOptions {
4593
4615
  var len0 = WASM_VECTOR_LEN;
4594
4616
  wasm.__wbg_set_listmessagesoptions_excludeSenderInboxIds(this.__wbg_ptr, ptr0, len0);
4595
4617
  }
4596
- /**
4597
- * @param {bigint | null} [sent_before_ns]
4598
- * @param {bigint | null} [sent_after_ns]
4599
- * @param {bigint | null} [limit]
4600
- * @param {DeliveryStatus | null} [delivery_status]
4601
- * @param {SortDirection | null} [direction]
4602
- * @param {any[] | null} [content_types]
4603
- * @param {any[] | null} [exclude_content_types]
4604
- * @param {GroupMessageKind | null} [kind]
4605
- * @param {string[] | null} [exclude_sender_inbox_ids]
4606
- */
4607
- constructor(sent_before_ns, sent_after_ns, limit, delivery_status, direction, content_types, exclude_content_types, kind, exclude_sender_inbox_ids) {
4608
- var ptr0 = isLikeNone(content_types) ? 0 : passArrayJsValueToWasm0(content_types, wasm.__wbindgen_malloc);
4609
- var len0 = WASM_VECTOR_LEN;
4610
- var ptr1 = isLikeNone(exclude_content_types) ? 0 : passArrayJsValueToWasm0(exclude_content_types, wasm.__wbindgen_malloc);
4611
- var len1 = WASM_VECTOR_LEN;
4612
- var ptr2 = isLikeNone(exclude_sender_inbox_ids) ? 0 : passArrayJsValueToWasm0(exclude_sender_inbox_ids, wasm.__wbindgen_malloc);
4613
- var len2 = WASM_VECTOR_LEN;
4614
- const ret = wasm.listmessagesoptions_new(!isLikeNone(sent_before_ns), isLikeNone(sent_before_ns) ? BigInt(0) : sent_before_ns, !isLikeNone(sent_after_ns), isLikeNone(sent_after_ns) ? BigInt(0) : sent_after_ns, !isLikeNone(limit), isLikeNone(limit) ? BigInt(0) : limit, isLikeNone(delivery_status) ? 3 : delivery_status, isLikeNone(direction) ? 2 : direction, ptr0, len0, ptr1, len1, isLikeNone(kind) ? 2 : kind, ptr2, len2);
4615
- this.__wbg_ptr = ret >>> 0;
4616
- ListMessagesOptionsFinalization.register(this, this.__wbg_ptr, this);
4617
- return this;
4618
- }
4619
4618
  }
4620
4619
  if (Symbol.dispose) ListMessagesOptions.prototype[Symbol.dispose] = ListMessagesOptions.prototype.free;
4621
4620
 
@@ -4638,6 +4637,17 @@ export class LogOptions {
4638
4637
  const ptr = this.__destroy_into_raw();
4639
4638
  wasm.__wbg_logoptions_free(ptr, 0);
4640
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
+ }
4641
4651
  /**
4642
4652
  * enable structured JSON logging to stdout.Useful for third-party log viewers
4643
4653
  * @returns {boolean}
@@ -4683,17 +4693,6 @@ export class LogOptions {
4683
4693
  set level(arg0) {
4684
4694
  wasm.__wbg_set_logoptions_level(this.__wbg_ptr, isLikeNone(arg0) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(arg0) + 1 || 7) - 1));
4685
4695
  }
4686
- /**
4687
- * @param {boolean} structured
4688
- * @param {boolean} performance
4689
- * @param {LogLevel | null} [level]
4690
- */
4691
- constructor(structured, performance, level) {
4692
- const ret = wasm.logoptions_new(structured, performance, isLikeNone(level) ? 7 : ((__wbindgen_enum_LogLevel.indexOf(level) + 1 || 7) - 1));
4693
- this.__wbg_ptr = ret >>> 0;
4694
- LogOptionsFinalization.register(this, this.__wbg_ptr, this);
4695
- return this;
4696
- }
4697
4696
  }
4698
4697
  if (Symbol.dispose) LogOptions.prototype[Symbol.dispose] = LogOptions.prototype.free;
4699
4698
 
@@ -4756,14 +4755,14 @@ export class Message {
4756
4755
  * @returns {bigint}
4757
4756
  */
4758
4757
  get sentAtNs() {
4759
- const ret = wasm.__wbg_get_message_sentAtNs(this.__wbg_ptr);
4758
+ const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
4760
4759
  return ret;
4761
4760
  }
4762
4761
  /**
4763
4762
  * @param {bigint} arg0
4764
4763
  */
4765
4764
  set sentAtNs(arg0) {
4766
- wasm.__wbg_set_message_sentAtNs(this.__wbg_ptr, arg0);
4765
+ wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
4767
4766
  }
4768
4767
  /**
4769
4768
  * @returns {string}
@@ -4920,14 +4919,14 @@ export class MessageDisappearingSettings {
4920
4919
  * @returns {bigint}
4921
4920
  */
4922
4921
  get inNs() {
4923
- const ret = wasm.__wbg_get_lifetime_not_after(this.__wbg_ptr);
4922
+ const ret = wasm.__wbg_get_messagedisappearingsettings_inNs(this.__wbg_ptr);
4924
4923
  return ret;
4925
4924
  }
4926
4925
  /**
4927
4926
  * @param {bigint} arg0
4928
4927
  */
4929
4928
  set inNs(arg0) {
4930
- wasm.__wbg_set_lifetime_not_after(this.__wbg_ptr, arg0);
4929
+ wasm.__wbg_set_messagedisappearingsettings_inNs(this.__wbg_ptr, arg0);
4931
4930
  }
4932
4931
  /**
4933
4932
  * @param {bigint} from_ns
@@ -5055,7 +5054,7 @@ export class MetadataFieldChange {
5055
5054
  set fieldName(arg0) {
5056
5055
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5057
5056
  const len0 = WASM_VECTOR_LEN;
5058
- wasm.__wbg_set_contenttypeid_authorityId(this.__wbg_ptr, ptr0, len0);
5057
+ wasm.__wbg_set_groupupdated_initiatedByInboxId(this.__wbg_ptr, ptr0, len0);
5059
5058
  }
5060
5059
  /**
5061
5060
  * @returns {string | undefined}
@@ -5176,38 +5175,76 @@ export class Opfs {
5176
5175
  /**
5177
5176
  * @returns {Promise<void>}
5178
5177
  */
5179
- static init_sqlite_opfs() {
5180
- const ret = wasm.opfs_init_sqlite_opfs();
5178
+ static wipeFiles() {
5179
+ const ret = wasm.opfs_wipeFiles();
5181
5180
  return ret;
5182
5181
  }
5183
5182
  /**
5184
- * Check if the global OPFS object has been initialized
5185
- * @returns {boolean}
5183
+ * export db file with 'name'
5184
+ * @param {string} name
5185
+ * @returns {Uint8Array}
5186
5186
  */
5187
- static exists() {
5188
- const ret = wasm.opfs_exists();
5189
- return ret !== 0;
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;
5190
5197
  }
5191
5198
  /**
5192
- * gets the error from Opfs, if any.
5193
- * @returns {string | undefined}
5199
+ * Adds n entries to the current pool.
5200
+ * @param {number} n
5201
+ * @returns {Promise<number>}
5194
5202
  */
5195
- static error() {
5196
- const ret = wasm.opfs_error();
5197
- let v1;
5198
- if (ret[0] !== 0) {
5199
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
5200
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
5201
- }
5202
- return v1;
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;
5203
5230
  }
5204
5231
  /**
5205
5232
  * @returns {Promise<void>}
5206
5233
  */
5207
- static wipeFiles() {
5208
- const ret = wasm.opfs_wipeFiles();
5234
+ static init_sqlite_opfs() {
5235
+ const ret = wasm.opfs_init_sqlite_opfs();
5209
5236
  return ret;
5210
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
+ }
5211
5248
  /**
5212
5249
  * If a virtual file exists with the given name, disassociates it from the pool and returns true, else returns false without side effects.
5213
5250
  * @param {string} name
@@ -5223,15 +5260,26 @@ export class Opfs {
5223
5260
  return ret[0] !== 0;
5224
5261
  }
5225
5262
  /**
5226
- * list files in current pool
5227
- * @returns {string[]}
5263
+ * gets the error from Opfs, if any.
5264
+ * @returns {string | undefined}
5228
5265
  */
5229
- static getFileNames() {
5230
- const ret = wasm.opfs_getFileNames();
5231
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
5232
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
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
+ }
5233
5273
  return v1;
5234
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
+ }
5235
5283
  /**
5236
5284
  * import a db file at 'path'
5237
5285
  * @param {string} path
@@ -5247,55 +5295,6 @@ export class Opfs {
5247
5295
  throw takeFromExternrefTable0(ret[0]);
5248
5296
  }
5249
5297
  }
5250
- /**
5251
- * export db file with 'name'
5252
- * @param {string} name
5253
- * @returns {Uint8Array}
5254
- */
5255
- static exportFile(name) {
5256
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5257
- const len0 = WASM_VECTOR_LEN;
5258
- const ret = wasm.opfs_exportFile(ptr0, len0);
5259
- if (ret[3]) {
5260
- throw takeFromExternrefTable0(ret[2]);
5261
- }
5262
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
5263
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
5264
- return v2;
5265
- }
5266
- /**
5267
- * get number of files in pool
5268
- * @returns {number}
5269
- */
5270
- static getFileCount() {
5271
- const ret = wasm.opfs_getFileCount();
5272
- return ret >>> 0;
5273
- }
5274
- /**
5275
- * @returns {number}
5276
- */
5277
- static getCapacity() {
5278
- const ret = wasm.opfs_getCapacity();
5279
- return ret >>> 0;
5280
- }
5281
- /**
5282
- * Adds n entries to the current pool.
5283
- * @param {number} n
5284
- * @returns {Promise<number>}
5285
- */
5286
- static addCapacity(n) {
5287
- const ret = wasm.opfs_addCapacity(n);
5288
- return ret;
5289
- }
5290
- /**
5291
- * Removes up to n entries from the pool, with the caveat that it can only remove currently-unused entries.
5292
- * @param {number} n
5293
- * @returns {Promise<number>}
5294
- */
5295
- static reduceCapacity(n) {
5296
- const ret = wasm.opfs_reduceCapacity(n);
5297
- return ret;
5298
- }
5299
5298
  }
5300
5299
  if (Symbol.dispose) Opfs.prototype[Symbol.dispose] = Opfs.prototype.free;
5301
5300
 
@@ -5344,6 +5343,22 @@ export class PermissionPolicySet {
5344
5343
  const ptr = this.__destroy_into_raw();
5345
5344
  wasm.__wbg_permissionpolicyset_free(ptr, 0);
5346
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
+ }
5347
5362
  /**
5348
5363
  * @returns {PermissionPolicy}
5349
5364
  */
@@ -5448,22 +5463,6 @@ export class PermissionPolicySet {
5448
5463
  set updateMessageDisappearingPolicy(arg0) {
5449
5464
  wasm.__wbg_set_permissionpolicyset_updateMessageDisappearingPolicy(this.__wbg_ptr, arg0);
5450
5465
  }
5451
- /**
5452
- * @param {PermissionPolicy} add_member_policy
5453
- * @param {PermissionPolicy} remove_member_policy
5454
- * @param {PermissionPolicy} add_admin_policy
5455
- * @param {PermissionPolicy} remove_admin_policy
5456
- * @param {PermissionPolicy} update_group_name_policy
5457
- * @param {PermissionPolicy} update_group_description_policy
5458
- * @param {PermissionPolicy} update_group_image_url_square_policy
5459
- * @param {PermissionPolicy} update_message_disappearing_policy
5460
- */
5461
- constructor(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_message_disappearing_policy) {
5462
- const ret = wasm.permissionpolicyset_new(add_member_policy, remove_member_policy, add_admin_policy, remove_admin_policy, update_group_name_policy, update_group_description_policy, update_group_image_url_square_policy, update_message_disappearing_policy);
5463
- this.__wbg_ptr = ret >>> 0;
5464
- PermissionPolicySetFinalization.register(this, this.__wbg_ptr, this);
5465
- return this;
5466
- }
5467
5466
  }
5468
5467
  if (Symbol.dispose) PermissionPolicySet.prototype[Symbol.dispose] = PermissionPolicySet.prototype.free;
5469
5468
 
@@ -5806,7 +5805,7 @@ export class RemoteAttachment {
5806
5805
  set url(arg0) {
5807
5806
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5808
5807
  const len0 = WASM_VECTOR_LEN;
5809
- wasm.__wbg_set_conversationdebuginfo_forkDetails(this.__wbg_ptr, ptr0, len0);
5808
+ wasm.__wbg_set_remoteattachment_url(this.__wbg_ptr, ptr0, len0);
5810
5809
  }
5811
5810
  /**
5812
5811
  * @returns {string}
@@ -5829,7 +5828,7 @@ export class RemoteAttachment {
5829
5828
  set contentDigest(arg0) {
5830
5829
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5831
5830
  const len0 = WASM_VECTOR_LEN;
5832
- wasm.__wbg_set_conversationdebuginfo_localCommitLog(this.__wbg_ptr, ptr0, len0);
5831
+ wasm.__wbg_set_remoteattachment_contentDigest(this.__wbg_ptr, ptr0, len0);
5833
5832
  }
5834
5833
  /**
5835
5834
  * @returns {Uint8Array}
@@ -5846,7 +5845,7 @@ export class RemoteAttachment {
5846
5845
  set secret(arg0) {
5847
5846
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
5848
5847
  const len0 = WASM_VECTOR_LEN;
5849
- wasm.__wbg_set_conversationdebuginfo_remoteCommitLog(this.__wbg_ptr, ptr0, len0);
5848
+ wasm.__wbg_set_remoteattachment_secret(this.__wbg_ptr, ptr0, len0);
5850
5849
  }
5851
5850
  /**
5852
5851
  * @returns {Uint8Array}
@@ -5909,14 +5908,14 @@ export class RemoteAttachment {
5909
5908
  * @returns {bigint}
5910
5909
  */
5911
5910
  get contentLength() {
5912
- const ret = wasm.__wbg_get_conversationdebuginfo_epoch(this.__wbg_ptr);
5911
+ const ret = wasm.__wbg_get_remoteattachment_contentLength(this.__wbg_ptr);
5913
5912
  return ret;
5914
5913
  }
5915
5914
  /**
5916
5915
  * @param {bigint} arg0
5917
5916
  */
5918
5917
  set contentLength(arg0) {
5919
- wasm.__wbg_set_conversationdebuginfo_epoch(this.__wbg_ptr, arg0);
5918
+ wasm.__wbg_set_remoteattachment_contentLength(this.__wbg_ptr, arg0);
5920
5919
  }
5921
5920
  /**
5922
5921
  * @returns {string | undefined}
@@ -6158,6 +6157,15 @@ export class SendMessageOpts {
6158
6157
  const ptr = this.__destroy_into_raw();
6159
6158
  wasm.__wbg_sendmessageopts_free(ptr, 0);
6160
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
+ }
6161
6169
  /**
6162
6170
  * @returns {boolean}
6163
6171
  */
@@ -6206,6 +6214,17 @@ export class SignatureRequestHandle {
6206
6214
  const ret = wasm.signaturerequesthandle_signatureText(this.__wbg_ptr);
6207
6215
  return ret;
6208
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
+ }
6209
6228
  /**
6210
6229
  * @param {Uint8Array} signature_bytes
6211
6230
  * @returns {Promise<void>}
@@ -6224,17 +6243,6 @@ export class SignatureRequestHandle {
6224
6243
  const ret = wasm.signaturerequesthandle_addPasskeySignature(this.__wbg_ptr, ptr0);
6225
6244
  return ret;
6226
6245
  }
6227
- /**
6228
- * @param {Identifier} account_identifier
6229
- * @param {Uint8Array} signature_bytes
6230
- * @param {bigint} chain_id
6231
- * @param {bigint | null} [block_number]
6232
- * @returns {Promise<void>}
6233
- */
6234
- addScwSignature(account_identifier, signature_bytes, chain_id, block_number) {
6235
- const ret = wasm.signaturerequesthandle_addScwSignature(this.__wbg_ptr, account_identifier, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
6236
- return ret;
6237
- }
6238
6246
  }
6239
6247
  if (Symbol.dispose) SignatureRequestHandle.prototype[Symbol.dispose] = SignatureRequestHandle.prototype.free;
6240
6248
 
@@ -6263,13 +6271,6 @@ export class StreamCloser {
6263
6271
  const ptr = this.__destroy_into_raw();
6264
6272
  wasm.__wbg_streamcloser_free(ptr, 0);
6265
6273
  }
6266
- /**
6267
- * Signal the stream to end
6268
- * Does not wait for the stream to end.
6269
- */
6270
- end() {
6271
- wasm.streamcloser_end(this.__wbg_ptr);
6272
- }
6273
6274
  /**
6274
6275
  * End the stream and `await` for it to shutdown
6275
6276
  * Returns the `Result` of the task.
@@ -6287,6 +6288,13 @@ export class StreamCloser {
6287
6288
  const ret = wasm.streamcloser_waitForReady(this.__wbg_ptr);
6288
6289
  return ret;
6289
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
+ }
6290
6298
  /**
6291
6299
  * Checks if this stream is closed
6292
6300
  * @returns {boolean}
@@ -6395,7 +6403,7 @@ export class TransactionMetadata {
6395
6403
  set transactionType(arg0) {
6396
6404
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6397
6405
  const len0 = WASM_VECTOR_LEN;
6398
- wasm.__wbg_set_conversationdebuginfo_forkDetails(this.__wbg_ptr, ptr0, len0);
6406
+ wasm.__wbg_set_remoteattachment_url(this.__wbg_ptr, ptr0, len0);
6399
6407
  }
6400
6408
  /**
6401
6409
  * @returns {string}
@@ -6418,7 +6426,7 @@ export class TransactionMetadata {
6418
6426
  set currency(arg0) {
6419
6427
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6420
6428
  const len0 = WASM_VECTOR_LEN;
6421
- wasm.__wbg_set_conversationdebuginfo_localCommitLog(this.__wbg_ptr, ptr0, len0);
6429
+ wasm.__wbg_set_remoteattachment_contentDigest(this.__wbg_ptr, ptr0, len0);
6422
6430
  }
6423
6431
  /**
6424
6432
  * @returns {number}
@@ -6467,7 +6475,7 @@ export class TransactionMetadata {
6467
6475
  set fromAddress(arg0) {
6468
6476
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6469
6477
  const len0 = WASM_VECTOR_LEN;
6470
- wasm.__wbg_set_conversationdebuginfo_remoteCommitLog(this.__wbg_ptr, ptr0, len0);
6478
+ wasm.__wbg_set_remoteattachment_secret(this.__wbg_ptr, ptr0, len0);
6471
6479
  }
6472
6480
  /**
6473
6481
  * @returns {string}
@@ -7211,7 +7219,7 @@ function __wbg_get_imports() {
7211
7219
  const a = state0.a;
7212
7220
  state0.a = 0;
7213
7221
  try {
7214
- return __wbg_adapter_937(a, state0.b, arg0, arg1);
7222
+ return __wbg_adapter_848(a, state0.b, arg0, arg1);
7215
7223
  } finally {
7216
7224
  state0.a = a;
7217
7225
  }
@@ -7693,6 +7701,11 @@ function __wbg_get_imports() {
7693
7701
  const ret = XmtpCursor.__unwrap(arg0);
7694
7702
  return ret;
7695
7703
  };
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);
7707
+ return ret;
7708
+ };
7696
7709
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
7697
7710
  // Cast intrinsic for `Ref(String) -> Externref`.
7698
7711
  const ret = getStringFromWasm0(arg0, arg1);
@@ -7710,19 +7723,9 @@ function __wbg_get_imports() {
7710
7723
  const ret = v0;
7711
7724
  return ret;
7712
7725
  };
7713
- imports.wbg.__wbindgen_cast_53c92800d0d29e36 = function(arg0, arg1) {
7714
- // Cast intrinsic for `Closure(Closure { dtor_idx: 4890, function: Function { arguments: [], shim_idx: 4891, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7715
- const ret = makeMutClosure(arg0, arg1, 4890, __wbg_adapter_10);
7716
- return ret;
7717
- };
7718
- imports.wbg.__wbindgen_cast_6798c2a5eadbaf4c = function(arg0, arg1) {
7719
- // Cast intrinsic for `Closure(Closure { dtor_idx: 6731, function: Function { arguments: [], shim_idx: 6732, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7720
- const ret = makeMutClosure(arg0, arg1, 6731, __wbg_adapter_15);
7721
- return ret;
7722
- };
7723
- imports.wbg.__wbindgen_cast_8a5711609b1ed734 = function(arg0, arg1) {
7724
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7141, function: Function { arguments: [Externref], shim_idx: 7152, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7725
- const ret = makeMutClosure(arg0, arg1, 7141, __wbg_adapter_25);
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);
7726
7729
  return ret;
7727
7730
  };
7728
7731
  imports.wbg.__wbindgen_cast_8e37b4ad2f2ba653 = function(arg0, arg1) {
@@ -7744,6 +7747,11 @@ function __wbg_get_imports() {
7744
7747
  const ret = arg0;
7745
7748
  return ret;
7746
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
+ };
7747
7755
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
7748
7756
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
7749
7757
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -7754,11 +7762,6 @@ function __wbg_get_imports() {
7754
7762
  const ret = arg0;
7755
7763
  return ret;
7756
7764
  };
7757
- imports.wbg.__wbindgen_cast_dd692d1ee4d0d90d = function(arg0, arg1) {
7758
- // Cast intrinsic for `Closure(Closure { dtor_idx: 7128, function: Function { arguments: [], shim_idx: 7129, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7759
- const ret = makeMutClosure(arg0, arg1, 7128, __wbg_adapter_22);
7760
- return ret;
7761
- };
7762
7765
  imports.wbg.__wbindgen_cast_e081be35fe620ec4 = function(arg0, arg1) {
7763
7766
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
7764
7767
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -7773,6 +7776,11 @@ function __wbg_get_imports() {
7773
7776
  const ret = v0;
7774
7777
  return ret;
7775
7778
  };
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);
7782
+ return ret;
7783
+ };
7776
7784
  imports.wbg.__wbindgen_init_externref_table = function() {
7777
7785
  const table = wasm.__wbindgen_export_4;
7778
7786
  const offset = table.grow(4);