ffi-bindings 1.0.0 → 1.0.2

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.
@@ -1,4 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.VirtualElementCallWidgetProperties = exports.VirtualElementCallWidgetConfig = exports.ServerVendorInfo = exports.RoomPowerLevelChanges = exports.RoomMemberRole = exports.QrCodeLoginError_Tags = exports.QrCodeLoginError = exports.PaginatorState = exports.PaginationStatus_Tags = exports.PaginationStatus = exports.OAuthAuthorizationData = exports.NotificationType = exports.Intent = exports.HeaderStyle = exports.EncryptionSystem_Tags = exports.EncryptionSystem = exports.BackupDownloadStrategy = void 0;
7
+ var wasmBundle = _interopRequireWildcard(require("./wasm-bindgen/index.js"));
8
+ var _uniffiBindgenReactNative = require("uniffi-bindgen-react-native");
1
9
  var _process;
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
2
11
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
12
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
4
13
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
@@ -12,19 +21,14 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
12
21
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
13
22
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
14
23
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
15
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
16
- // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
24
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
17
25
  // Trust me, you don't want to mess with it!
18
- /* tslint:disable */
19
- /* eslint-disable */
20
- // @ts-nocheck
21
- import * as wasmBundle from "./wasm-bindgen/index.js";
22
- import { AbstractFfiConverterByteArray, FfiConverterBool, FfiConverterFloat64, FfiConverterInt32, FfiConverterInt64, FfiConverterObject, FfiConverterOptional, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiTypeNameSymbol, variantOrdinalSymbol } from "uniffi-bindgen-react-native";
26
+ /* tslint:disable */ /* eslint-disable */ // @ts-nocheck
23
27
  // Get converters from the other files, if any.
24
28
  var nativeModule = function nativeModule() {
25
29
  return wasmBundle;
26
30
  };
27
- var uniffiCaller = new UniffiRustCaller(function () {
31
+ var uniffiCaller = new _uniffiBindgenReactNative.UniffiRustCaller(function () {
28
32
  return new wasmBundle.RustCallStatus();
29
33
  });
30
34
  var uniffiIsDebug =
@@ -32,10 +36,18 @@ var uniffiIsDebug =
32
36
  (typeof process === "undefined" ? "undefined" : _typeof(process)) !== "object" ||
33
37
  // @ts-ignore -- The process global might not be defined
34
38
  ((_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.NODE_ENV) !== "production" || false;
39
+ // Public interface members begin here.
40
+
41
+ /**
42
+ * A set of common power levels required for various operations within a room,
43
+ * that can be applied as a single operation. When updating these
44
+ * settings, any levels that are `None` will remain unchanged.
45
+ */
46
+
35
47
  /**
36
48
  * Generated factory for {@link RoomPowerLevelChanges} record objects.
37
49
  */
38
- export var RoomPowerLevelChanges = function () {
50
+ var RoomPowerLevelChanges = exports.RoomPowerLevelChanges = function () {
39
51
  var _defaults = function defaults() {
40
52
  return {
41
53
  ban: undefined,
@@ -52,22 +64,11 @@ export var RoomPowerLevelChanges = function () {
52
64
  };
53
65
  };
54
66
  var create = function () {
55
- return uniffiCreateRecord(_defaults);
67
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(_defaults);
56
68
  }();
57
69
  return Object.freeze({
58
- /**
59
- * Create a frozen instance of {@link RoomPowerLevelChanges}, with defaults specified
60
- * in Rust, in the {@link matrix_sdk} crate.
61
- */
62
70
  create: create,
63
- /**
64
- * Create a frozen instance of {@link RoomPowerLevelChanges}, with defaults specified
65
- * in Rust, in the {@link matrix_sdk} crate.
66
- */
67
71
  "new": create,
68
- /**
69
- * Defaults specified in the {@link matrix_sdk} crate.
70
- */
71
72
  defaults: function defaults() {
72
73
  return Object.freeze(_defaults());
73
74
  }
@@ -118,34 +119,28 @@ var FfiConverterTypeRoomPowerLevelChanges = function () {
118
119
  return FfiConverterOptionalInt64.allocationSize(value.ban) + FfiConverterOptionalInt64.allocationSize(value.invite) + FfiConverterOptionalInt64.allocationSize(value.kick) + FfiConverterOptionalInt64.allocationSize(value.redact) + FfiConverterOptionalInt64.allocationSize(value.eventsDefault) + FfiConverterOptionalInt64.allocationSize(value.stateDefault) + FfiConverterOptionalInt64.allocationSize(value.usersDefault) + FfiConverterOptionalInt64.allocationSize(value.roomName) + FfiConverterOptionalInt64.allocationSize(value.roomAvatar) + FfiConverterOptionalInt64.allocationSize(value.roomTopic) + FfiConverterOptionalInt64.allocationSize(value.spaceChild);
119
120
  }
120
121
  }]);
121
- }(AbstractFfiConverterByteArray);
122
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
122
123
  ;
123
124
  return new FFIConverter();
124
125
  }();
126
+
127
+ /**
128
+ * Information about the server vendor obtained from the federation API.
129
+ */
130
+
125
131
  /**
126
132
  * Generated factory for {@link ServerVendorInfo} record objects.
127
133
  */
128
- export var ServerVendorInfo = function () {
134
+ var ServerVendorInfo = exports.ServerVendorInfo = function () {
129
135
  var _defaults2 = function defaults() {
130
136
  return {};
131
137
  };
132
138
  var create = function () {
133
- return uniffiCreateRecord(_defaults2);
139
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(_defaults2);
134
140
  }();
135
141
  return Object.freeze({
136
- /**
137
- * Create a frozen instance of {@link ServerVendorInfo}, with defaults specified
138
- * in Rust, in the {@link matrix_sdk} crate.
139
- */
140
142
  create: create,
141
- /**
142
- * Create a frozen instance of {@link ServerVendorInfo}, with defaults specified
143
- * in Rust, in the {@link matrix_sdk} crate.
144
- */
145
143
  "new": create,
146
- /**
147
- * Defaults specified in the {@link matrix_sdk} crate.
148
- */
149
144
  defaults: function defaults() {
150
145
  return Object.freeze(_defaults2());
151
146
  }
@@ -178,14 +173,27 @@ var FfiConverterTypeServerVendorInfo = function () {
178
173
  return FfiConverterString.allocationSize(value.serverName) + FfiConverterString.allocationSize(value.version);
179
174
  }
180
175
  }]);
181
- }(AbstractFfiConverterByteArray);
176
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
182
177
  ;
183
178
  return new FFIConverter();
184
179
  }();
180
+
181
+ /**
182
+ * Configuration parameters, to create a new virtual Element Call widget.
183
+ *
184
+ * If `intent` is provided the appropriate default values for all other
185
+ * parameters will be used by element call.
186
+ * In most cases its enough to only set the intent. Use the other properties
187
+ * only if you want to deviate from the `intent` defaults.
188
+ *
189
+ * Set [`docs/url-params.md`](https://github.com/element-hq/element-call/blob/livekit/docs/url-params.md)
190
+ * to find out more about the parameters and their defaults.
191
+ */
192
+
185
193
  /**
186
194
  * Generated factory for {@link VirtualElementCallWidgetConfig} record objects.
187
195
  */
188
- export var VirtualElementCallWidgetConfig = function () {
196
+ var VirtualElementCallWidgetConfig = exports.VirtualElementCallWidgetConfig = function () {
189
197
  var _defaults3 = function defaults() {
190
198
  return {
191
199
  skipLobby: undefined,
@@ -200,22 +208,11 @@ export var VirtualElementCallWidgetConfig = function () {
200
208
  };
201
209
  };
202
210
  var create = function () {
203
- return uniffiCreateRecord(_defaults3);
211
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(_defaults3);
204
212
  }();
205
213
  return Object.freeze({
206
- /**
207
- * Create a frozen instance of {@link VirtualElementCallWidgetConfig}, with defaults specified
208
- * in Rust, in the {@link matrix_sdk} crate.
209
- */
210
214
  create: create,
211
- /**
212
- * Create a frozen instance of {@link VirtualElementCallWidgetConfig}, with defaults specified
213
- * in Rust, in the {@link matrix_sdk} crate.
214
- */
215
215
  "new": create,
216
- /**
217
- * Defaults specified in the {@link matrix_sdk} crate.
218
- */
219
216
  defaults: function defaults() {
220
217
  return Object.freeze(_defaults3());
221
218
  }
@@ -264,14 +261,23 @@ var FfiConverterTypeVirtualElementCallWidgetConfig = function () {
264
261
  return FfiConverterOptionalTypeIntent.allocationSize(value.intent) + FfiConverterOptionalBool.allocationSize(value.skipLobby) + FfiConverterOptionalTypeHeaderStyle.allocationSize(value.header) + FfiConverterOptionalBool.allocationSize(value.hideHeader) + FfiConverterOptionalBool.allocationSize(value.preload) + FfiConverterOptionalBool.allocationSize(value.appPrompt) + FfiConverterOptionalBool.allocationSize(value.confineToRoom) + FfiConverterOptionalBool.allocationSize(value.hideScreensharing) + FfiConverterOptionalBool.allocationSize(value.controlledAudioDevices) + FfiConverterOptionalTypeNotificationType.allocationSize(value.sendNotificationType);
265
262
  }
266
263
  }]);
267
- }(AbstractFfiConverterByteArray);
264
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
268
265
  ;
269
266
  return new FFIConverter();
270
267
  }();
268
+
269
+ /**
270
+ * Properties to create a new virtual Element Call widget.
271
+ *
272
+ * All these are required to start the widget in the first place.
273
+ * This is different from the `VirtualElementCallWidgetConfiguration` which
274
+ * configures the widgets behavior.
275
+ */
276
+
271
277
  /**
272
278
  * Generated factory for {@link VirtualElementCallWidgetProperties} record objects.
273
279
  */
274
- export var VirtualElementCallWidgetProperties = function () {
280
+ var VirtualElementCallWidgetProperties = exports.VirtualElementCallWidgetProperties = function () {
275
281
  var _defaults4 = function defaults() {
276
282
  return {
277
283
  parentUrl: undefined,
@@ -286,22 +292,11 @@ export var VirtualElementCallWidgetProperties = function () {
286
292
  };
287
293
  };
288
294
  var create = function () {
289
- return uniffiCreateRecord(_defaults4);
295
+ return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(_defaults4);
290
296
  }();
291
297
  return Object.freeze({
292
- /**
293
- * Create a frozen instance of {@link VirtualElementCallWidgetProperties}, with defaults specified
294
- * in Rust, in the {@link matrix_sdk} crate.
295
- */
296
298
  create: create,
297
- /**
298
- * Create a frozen instance of {@link VirtualElementCallWidgetProperties}, with defaults specified
299
- * in Rust, in the {@link matrix_sdk} crate.
300
- */
301
299
  "new": create,
302
- /**
303
- * Defaults specified in the {@link matrix_sdk} crate.
304
- */
305
300
  defaults: function defaults() {
306
301
  return Object.freeze(_defaults4());
307
302
  }
@@ -354,7 +349,7 @@ var FfiConverterTypeVirtualElementCallWidgetProperties = function () {
354
349
  return FfiConverterString.allocationSize(value.elementCallUrl) + FfiConverterString.allocationSize(value.widgetId) + FfiConverterOptionalString.allocationSize(value.parentUrl) + FfiConverterOptionalFloat64.allocationSize(value.fontScale) + FfiConverterOptionalString.allocationSize(value.font) + FfiConverterTypeEncryptionSystem.allocationSize(value.encryption) + FfiConverterOptionalString.allocationSize(value.posthogUserId) + FfiConverterOptionalString.allocationSize(value.posthogApiHost) + FfiConverterOptionalString.allocationSize(value.posthogApiKey) + FfiConverterOptionalString.allocationSize(value.rageshakeSubmitUrl) + FfiConverterOptionalString.allocationSize(value.sentryDsn) + FfiConverterOptionalString.allocationSize(value.sentryEnvironment);
355
350
  }
356
351
  }]);
357
- }(AbstractFfiConverterByteArray);
352
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
358
353
  ;
359
354
  return new FFIConverter();
360
355
  }();
@@ -373,12 +368,12 @@ var stringConverter = function () {
373
368
  }
374
369
  };
375
370
  }();
376
- var FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
371
+ var FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
372
+
377
373
  /**
378
374
  * Settings for end-to-end encryption features.
379
375
  */
380
- export var BackupDownloadStrategy;
381
- (function (BackupDownloadStrategy) {
376
+ var BackupDownloadStrategy = exports.BackupDownloadStrategy = /*#__PURE__*/function (BackupDownloadStrategy) {
382
377
  /**
383
378
  * Automatically download all room keys from the backup when the backup
384
379
  * recovery key has been received. The backup recovery key can be received
@@ -403,9 +398,10 @@ export var BackupDownloadStrategy;
403
398
  * This is the default option.
404
399
  */
405
400
  BackupDownloadStrategy[BackupDownloadStrategy["Manual"] = 2] = "Manual";
406
- })(BackupDownloadStrategy || (BackupDownloadStrategy = {}));
401
+ return BackupDownloadStrategy;
402
+ }({});
407
403
  var FfiConverterTypeBackupDownloadStrategy = function () {
408
- var ordinalConverter = FfiConverterInt32;
404
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
409
405
  var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter5) {
410
406
  function FFIConverter() {
411
407
  _classCallCheck(this, FFIConverter);
@@ -423,7 +419,7 @@ var FfiConverterTypeBackupDownloadStrategy = function () {
423
419
  case 3:
424
420
  return BackupDownloadStrategy.Manual;
425
421
  default:
426
- throw new UniffiInternalError.UnexpectedEnumCase();
422
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
427
423
  }
428
424
  }
429
425
  }, {
@@ -444,22 +440,23 @@ var FfiConverterTypeBackupDownloadStrategy = function () {
444
440
  return ordinalConverter.allocationSize(0);
445
441
  }
446
442
  }]);
447
- }(AbstractFfiConverterByteArray);
443
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
448
444
  return new FFIConverter();
449
445
  }();
446
+
450
447
  // Enum: EncryptionSystem
451
- export var EncryptionSystem_Tags;
452
- (function (EncryptionSystem_Tags) {
448
+ var EncryptionSystem_Tags = exports.EncryptionSystem_Tags = /*#__PURE__*/function (EncryptionSystem_Tags) {
453
449
  EncryptionSystem_Tags["Unencrypted"] = "Unencrypted";
454
450
  EncryptionSystem_Tags["PerParticipantKeys"] = "PerParticipantKeys";
455
451
  EncryptionSystem_Tags["SharedSecret"] = "SharedSecret";
456
- })(EncryptionSystem_Tags || (EncryptionSystem_Tags = {}));
452
+ return EncryptionSystem_Tags;
453
+ }({});
457
454
  /**
458
455
  * Defines if a call is encrypted and which encryption system should be used.
459
456
  *
460
457
  * This controls the url parameters: `perParticipantE2EE`, `password`.
461
458
  */
462
- export var EncryptionSystem = function () {
459
+ var EncryptionSystem = exports.EncryptionSystem = function () {
463
460
  /**
464
461
  * Equivalent to the element call url parameter: `perParticipantE2EE=false`
465
462
  * and no password.
@@ -473,7 +470,7 @@ export var EncryptionSystem = function () {
473
470
  * @private
474
471
  * This field is private and should not be used, use `tag` instead.
475
472
  */
476
- _defineProperty(_this, uniffiTypeNameSymbol, "EncryptionSystem");
473
+ _defineProperty(_this, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "EncryptionSystem");
477
474
  _defineProperty(_this, "tag", EncryptionSystem_Tags.Unencrypted);
478
475
  return _this;
479
476
  }
@@ -489,7 +486,7 @@ export var EncryptionSystem = function () {
489
486
  return obj.tag === EncryptionSystem_Tags.Unencrypted;
490
487
  }
491
488
  }]);
492
- }(UniffiEnum);
489
+ }(_uniffiBindgenReactNative.UniffiEnum);
493
490
  /**
494
491
  * Equivalent to the element call url parameters:
495
492
  * `perParticipantE2EE=true`
@@ -503,7 +500,7 @@ export var EncryptionSystem = function () {
503
500
  * @private
504
501
  * This field is private and should not be used, use `tag` instead.
505
502
  */
506
- _defineProperty(_this2, uniffiTypeNameSymbol, "EncryptionSystem");
503
+ _defineProperty(_this2, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "EncryptionSystem");
507
504
  _defineProperty(_this2, "tag", EncryptionSystem_Tags.PerParticipantKeys);
508
505
  return _this2;
509
506
  }
@@ -519,7 +516,7 @@ export var EncryptionSystem = function () {
519
516
  return obj.tag === EncryptionSystem_Tags.PerParticipantKeys;
520
517
  }
521
518
  }]);
522
- }(UniffiEnum);
519
+ }(_uniffiBindgenReactNative.UniffiEnum);
523
520
  /**
524
521
  * Equivalent to the element call url parameters:
525
522
  * `password={secret}`
@@ -533,7 +530,7 @@ export var EncryptionSystem = function () {
533
530
  * @private
534
531
  * This field is private and should not be used, use `tag` instead.
535
532
  */
536
- _defineProperty(_this3, uniffiTypeNameSymbol, "EncryptionSystem");
533
+ _defineProperty(_this3, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "EncryptionSystem");
537
534
  _defineProperty(_this3, "tag", EncryptionSystem_Tags.SharedSecret);
538
535
  _defineProperty(_this3, "inner", void 0);
539
536
  _this3.inner = Object.freeze(inner);
@@ -551,9 +548,9 @@ export var EncryptionSystem = function () {
551
548
  return obj.tag === EncryptionSystem_Tags.SharedSecret;
552
549
  }
553
550
  }]);
554
- }(UniffiEnum);
551
+ }(_uniffiBindgenReactNative.UniffiEnum);
555
552
  function instanceOf(obj) {
556
- return obj[uniffiTypeNameSymbol] === "EncryptionSystem";
553
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "EncryptionSystem";
557
554
  }
558
555
  return Object.freeze({
559
556
  instanceOf: instanceOf,
@@ -562,9 +559,16 @@ export var EncryptionSystem = function () {
562
559
  SharedSecret: SharedSecret_
563
560
  });
564
561
  }();
562
+
563
+ /**
564
+ * Defines if a call is encrypted and which encryption system should be used.
565
+ *
566
+ * This controls the url parameters: `perParticipantE2EE`, `password`.
567
+ */
568
+
565
569
  // FfiConverter for enum EncryptionSystem
566
570
  var FfiConverterTypeEncryptionSystem = function () {
567
- var ordinalConverter = FfiConverterInt32;
571
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
568
572
  var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter6) {
569
573
  function FFIConverter() {
570
574
  _classCallCheck(this, FFIConverter);
@@ -584,7 +588,7 @@ var FfiConverterTypeEncryptionSystem = function () {
584
588
  secret: FfiConverterString.read(from)
585
589
  });
586
590
  default:
587
- throw new UniffiInternalError.UnexpectedEnumCase();
591
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
588
592
  }
589
593
  }
590
594
  }, {
@@ -610,7 +614,7 @@ var FfiConverterTypeEncryptionSystem = function () {
610
614
  }
611
615
  default:
612
616
  // Throwing from here means that EncryptionSystem_Tags hasn't matched an ordinal.
613
- throw new UniffiInternalError.UnexpectedEnumCase();
617
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
614
618
  }
615
619
  }
616
620
  }, {
@@ -633,18 +637,18 @@ var FfiConverterTypeEncryptionSystem = function () {
633
637
  return size;
634
638
  }
635
639
  default:
636
- throw new UniffiInternalError.UnexpectedEnumCase();
640
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
637
641
  }
638
642
  }
639
643
  }]);
640
- }(AbstractFfiConverterByteArray);
644
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
641
645
  return new FFIConverter();
642
646
  }();
647
+
643
648
  /**
644
649
  * Defines how (if) element-call renders a header.
645
650
  */
646
- export var HeaderStyle;
647
- (function (HeaderStyle) {
651
+ var HeaderStyle = exports.HeaderStyle = /*#__PURE__*/function (HeaderStyle) {
648
652
  /**
649
653
  * The normal header with branding.
650
654
  */
@@ -657,9 +661,10 @@ export var HeaderStyle;
657
661
  * No Header (useful for webapps).
658
662
  */
659
663
  HeaderStyle[HeaderStyle["None"] = 2] = "None";
660
- })(HeaderStyle || (HeaderStyle = {}));
664
+ return HeaderStyle;
665
+ }({});
661
666
  var FfiConverterTypeHeaderStyle = function () {
662
- var ordinalConverter = FfiConverterInt32;
667
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
663
668
  var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter7) {
664
669
  function FFIConverter() {
665
670
  _classCallCheck(this, FFIConverter);
@@ -677,7 +682,7 @@ var FfiConverterTypeHeaderStyle = function () {
677
682
  case 3:
678
683
  return HeaderStyle.None;
679
684
  default:
680
- throw new UniffiInternalError.UnexpectedEnumCase();
685
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
681
686
  }
682
687
  }
683
688
  }, {
@@ -698,16 +703,16 @@ var FfiConverterTypeHeaderStyle = function () {
698
703
  return ordinalConverter.allocationSize(0);
699
704
  }
700
705
  }]);
701
- }(AbstractFfiConverterByteArray);
706
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
702
707
  return new FFIConverter();
703
708
  }();
709
+
704
710
  /**
705
711
  * Defines the intent of showing the call.
706
712
  *
707
713
  * This controls whether to show or skip the lobby.
708
714
  */
709
- export var Intent;
710
- (function (Intent) {
715
+ var Intent = exports.Intent = /*#__PURE__*/function (Intent) {
711
716
  /**
712
717
  * The user wants to start a call.
713
718
  */
@@ -725,9 +730,19 @@ export var Intent;
725
730
  * The user wants to start a call in a "Direct Message" (DM) room.
726
731
  */
727
732
  Intent[Intent["StartCallDm"] = 3] = "StartCallDm";
728
- })(Intent || (Intent = {}));
733
+ /**
734
+ * The user wants to start a voice call in a "Direct Message" (DM) room.
735
+ */
736
+ Intent[Intent["StartCallDmVoice"] = 4] = "StartCallDmVoice";
737
+ /**
738
+ * The user wants to join an existing voice call that is a "Direct
739
+ * Message" (DM) room.
740
+ */
741
+ Intent[Intent["JoinExistingDmVoice"] = 5] = "JoinExistingDmVoice";
742
+ return Intent;
743
+ }({});
729
744
  var FfiConverterTypeIntent = function () {
730
- var ordinalConverter = FfiConverterInt32;
745
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
731
746
  var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter8) {
732
747
  function FFIConverter() {
733
748
  _classCallCheck(this, FFIConverter);
@@ -746,8 +761,12 @@ var FfiConverterTypeIntent = function () {
746
761
  return Intent.JoinExistingDm;
747
762
  case 4:
748
763
  return Intent.StartCallDm;
764
+ case 5:
765
+ return Intent.StartCallDmVoice;
766
+ case 6:
767
+ return Intent.JoinExistingDmVoice;
749
768
  default:
750
- throw new UniffiInternalError.UnexpectedEnumCase();
769
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
751
770
  }
752
771
  }
753
772
  }, {
@@ -762,6 +781,10 @@ var FfiConverterTypeIntent = function () {
762
781
  return ordinalConverter.write(3, into);
763
782
  case Intent.StartCallDm:
764
783
  return ordinalConverter.write(4, into);
784
+ case Intent.StartCallDmVoice:
785
+ return ordinalConverter.write(5, into);
786
+ case Intent.JoinExistingDmVoice:
787
+ return ordinalConverter.write(6, into);
765
788
  }
766
789
  }
767
790
  }, {
@@ -770,14 +793,14 @@ var FfiConverterTypeIntent = function () {
770
793
  return ordinalConverter.allocationSize(0);
771
794
  }
772
795
  }]);
773
- }(AbstractFfiConverterByteArray);
796
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
774
797
  return new FFIConverter();
775
798
  }();
799
+
776
800
  /**
777
801
  * Types of call notifications.
778
802
  */
779
- export var NotificationType;
780
- (function (NotificationType) {
803
+ var NotificationType = exports.NotificationType = /*#__PURE__*/function (NotificationType) {
781
804
  /**
782
805
  * The receiving client should display a visual notification.
783
806
  */
@@ -786,9 +809,10 @@ export var NotificationType;
786
809
  * The receiving client should ring with an audible sound.
787
810
  */
788
811
  NotificationType[NotificationType["Ring"] = 1] = "Ring";
789
- })(NotificationType || (NotificationType = {}));
812
+ return NotificationType;
813
+ }({});
790
814
  var FfiConverterTypeNotificationType = function () {
791
- var ordinalConverter = FfiConverterInt32;
815
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
792
816
  var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter9) {
793
817
  function FFIConverter() {
794
818
  _classCallCheck(this, FFIConverter);
@@ -804,7 +828,7 @@ var FfiConverterTypeNotificationType = function () {
804
828
  case 2:
805
829
  return NotificationType.Ring;
806
830
  default:
807
- throw new UniffiInternalError.UnexpectedEnumCase();
831
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
808
832
  }
809
833
  }
810
834
  }, {
@@ -823,14 +847,166 @@ var FfiConverterTypeNotificationType = function () {
823
847
  return ordinalConverter.allocationSize(0);
824
848
  }
825
849
  }]);
826
- }(AbstractFfiConverterByteArray);
850
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
827
851
  return new FFIConverter();
828
852
  }();
853
+
854
+ // Enum: PaginationStatus
855
+ var PaginationStatus_Tags = exports.PaginationStatus_Tags = /*#__PURE__*/function (PaginationStatus_Tags) {
856
+ PaginationStatus_Tags["Idle"] = "Idle";
857
+ PaginationStatus_Tags["Paginating"] = "Paginating";
858
+ return PaginationStatus_Tags;
859
+ }({});
860
+ /**
861
+ * Status for the pagination on a cache.
862
+ */
863
+ var PaginationStatus = exports.PaginationStatus = function () {
864
+ /**
865
+ * No pagination is happening right now.
866
+ */
867
+ var Idle_ = /*#__PURE__*/function (_UniffiEnum4) {
868
+ function Idle_(inner) {
869
+ var _this4;
870
+ _classCallCheck(this, Idle_);
871
+ _this4 = _callSuper(this, Idle_, ["PaginationStatus", "Idle"]);
872
+ /**
873
+ * @private
874
+ * This field is private and should not be used, use `tag` instead.
875
+ */
876
+ _defineProperty(_this4, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "PaginationStatus");
877
+ _defineProperty(_this4, "tag", PaginationStatus_Tags.Idle);
878
+ _defineProperty(_this4, "inner", void 0);
879
+ _this4.inner = Object.freeze(inner);
880
+ return _this4;
881
+ }
882
+ _inherits(Idle_, _UniffiEnum4);
883
+ return _createClass(Idle_, null, [{
884
+ key: "new",
885
+ value: function _new(inner) {
886
+ return new Idle_(inner);
887
+ }
888
+ }, {
889
+ key: "instanceOf",
890
+ value: function instanceOf(obj) {
891
+ return obj.tag === PaginationStatus_Tags.Idle;
892
+ }
893
+ }]);
894
+ }(_uniffiBindgenReactNative.UniffiEnum);
895
+ /**
896
+ * Pagination is already running in the background.
897
+ */
898
+ var Paginating_ = /*#__PURE__*/function (_UniffiEnum5) {
899
+ function Paginating_() {
900
+ var _this5;
901
+ _classCallCheck(this, Paginating_);
902
+ _this5 = _callSuper(this, Paginating_, ["PaginationStatus", "Paginating"]);
903
+ /**
904
+ * @private
905
+ * This field is private and should not be used, use `tag` instead.
906
+ */
907
+ _defineProperty(_this5, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "PaginationStatus");
908
+ _defineProperty(_this5, "tag", PaginationStatus_Tags.Paginating);
909
+ return _this5;
910
+ }
911
+ _inherits(Paginating_, _UniffiEnum5);
912
+ return _createClass(Paginating_, null, [{
913
+ key: "new",
914
+ value: function _new() {
915
+ return new Paginating_();
916
+ }
917
+ }, {
918
+ key: "instanceOf",
919
+ value: function instanceOf(obj) {
920
+ return obj.tag === PaginationStatus_Tags.Paginating;
921
+ }
922
+ }]);
923
+ }(_uniffiBindgenReactNative.UniffiEnum);
924
+ function instanceOf(obj) {
925
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "PaginationStatus";
926
+ }
927
+ return Object.freeze({
928
+ instanceOf: instanceOf,
929
+ Idle: Idle_,
930
+ Paginating: Paginating_
931
+ });
932
+ }();
933
+
934
+ /**
935
+ * Status for the pagination on a cache.
936
+ */
937
+
938
+ // FfiConverter for enum PaginationStatus
939
+ var FfiConverterTypePaginationStatus = function () {
940
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
941
+ var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter0) {
942
+ function FFIConverter() {
943
+ _classCallCheck(this, FFIConverter);
944
+ return _callSuper(this, FFIConverter, arguments);
945
+ }
946
+ _inherits(FFIConverter, _AbstractFfiConverter0);
947
+ return _createClass(FFIConverter, [{
948
+ key: "read",
949
+ value: function read(from) {
950
+ switch (ordinalConverter.read(from)) {
951
+ case 1:
952
+ return new PaginationStatus.Idle({
953
+ hitTimelineStart: _uniffiBindgenReactNative.FfiConverterBool.read(from)
954
+ });
955
+ case 2:
956
+ return new PaginationStatus.Paginating();
957
+ default:
958
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
959
+ }
960
+ }
961
+ }, {
962
+ key: "write",
963
+ value: function write(value, into) {
964
+ switch (value.tag) {
965
+ case PaginationStatus_Tags.Idle:
966
+ {
967
+ ordinalConverter.write(1, into);
968
+ var inner = value.inner;
969
+ _uniffiBindgenReactNative.FfiConverterBool.write(inner.hitTimelineStart, into);
970
+ return;
971
+ }
972
+ case PaginationStatus_Tags.Paginating:
973
+ {
974
+ ordinalConverter.write(2, into);
975
+ return;
976
+ }
977
+ default:
978
+ // Throwing from here means that PaginationStatus_Tags hasn't matched an ordinal.
979
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
980
+ }
981
+ }
982
+ }, {
983
+ key: "allocationSize",
984
+ value: function allocationSize(value) {
985
+ switch (value.tag) {
986
+ case PaginationStatus_Tags.Idle:
987
+ {
988
+ var inner = value.inner;
989
+ var size = ordinalConverter.allocationSize(1);
990
+ size += _uniffiBindgenReactNative.FfiConverterBool.allocationSize(inner.hitTimelineStart);
991
+ return size;
992
+ }
993
+ case PaginationStatus_Tags.Paginating:
994
+ {
995
+ return ordinalConverter.allocationSize(2);
996
+ }
997
+ default:
998
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
999
+ }
1000
+ }
1001
+ }]);
1002
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
1003
+ return new FFIConverter();
1004
+ }();
1005
+
829
1006
  /**
830
1007
  * Current state of a [`Paginator`].
831
1008
  */
832
- export var PaginatorState;
833
- (function (PaginatorState) {
1009
+ var PaginatorState = exports.PaginatorState = /*#__PURE__*/function (PaginatorState) {
834
1010
  /**
835
1011
  * The initial state of the paginator.
836
1012
  */
@@ -848,15 +1024,16 @@ export var PaginatorState;
848
1024
  * The paginator is… paginating one direction or another.
849
1025
  */
850
1026
  PaginatorState[PaginatorState["Paginating"] = 3] = "Paginating";
851
- })(PaginatorState || (PaginatorState = {}));
1027
+ return PaginatorState;
1028
+ }({});
852
1029
  var FfiConverterTypePaginatorState = function () {
853
- var ordinalConverter = FfiConverterInt32;
854
- var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter0) {
1030
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1031
+ var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter1) {
855
1032
  function FFIConverter() {
856
1033
  _classCallCheck(this, FFIConverter);
857
1034
  return _callSuper(this, FFIConverter, arguments);
858
1035
  }
859
- _inherits(FFIConverter, _AbstractFfiConverter0);
1036
+ _inherits(FFIConverter, _AbstractFfiConverter1);
860
1037
  return _createClass(FFIConverter, [{
861
1038
  key: "read",
862
1039
  value: function read(from) {
@@ -870,7 +1047,7 @@ var FfiConverterTypePaginatorState = function () {
870
1047
  case 4:
871
1048
  return PaginatorState.Paginating;
872
1049
  default:
873
- throw new UniffiInternalError.UnexpectedEnumCase();
1050
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
874
1051
  }
875
1052
  }
876
1053
  }, {
@@ -893,12 +1070,12 @@ var FfiConverterTypePaginatorState = function () {
893
1070
  return ordinalConverter.allocationSize(0);
894
1071
  }
895
1072
  }]);
896
- }(AbstractFfiConverterByteArray);
1073
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
897
1074
  return new FFIConverter();
898
1075
  }();
1076
+
899
1077
  // Flat error type: QrCodeLoginError
900
- export var QrCodeLoginError_Tags;
901
- (function (QrCodeLoginError_Tags) {
1078
+ var QrCodeLoginError_Tags = exports.QrCodeLoginError_Tags = /*#__PURE__*/function (QrCodeLoginError_Tags) {
902
1079
  QrCodeLoginError_Tags["OAuth"] = "OAuth";
903
1080
  QrCodeLoginError_Tags["LoginFailure"] = "LoginFailure";
904
1081
  QrCodeLoginError_Tags["UnexpectedMessage"] = "UnexpectedMessage";
@@ -910,187 +1087,188 @@ export var QrCodeLoginError_Tags;
910
1087
  QrCodeLoginError_Tags["DeviceKeyUpload"] = "DeviceKeyUpload";
911
1088
  QrCodeLoginError_Tags["SecretImport"] = "SecretImport";
912
1089
  QrCodeLoginError_Tags["ServerReset"] = "ServerReset";
913
- })(QrCodeLoginError_Tags || (QrCodeLoginError_Tags = {}));
1090
+ return QrCodeLoginError_Tags;
1091
+ }({});
914
1092
  /**
915
1093
  * The error type for failures while trying to log in a new device using a QR
916
1094
  * code.
917
1095
  */
918
- export var QrCodeLoginError = function () {
1096
+ var QrCodeLoginError = exports.QrCodeLoginError = function () {
919
1097
  /**
920
1098
  * An error happened while we were communicating with the OAuth 2.0
921
1099
  * authorization server.
922
1100
  */
923
1101
  var OAuth = /*#__PURE__*/function (_UniffiError) {
924
1102
  function OAuth(message) {
925
- var _this4;
1103
+ var _this6;
926
1104
  _classCallCheck(this, OAuth);
927
- _this4 = _callSuper(this, OAuth, ["QrCodeLoginError", "OAuth", message]);
1105
+ _this6 = _callSuper(this, OAuth, ["QrCodeLoginError", "OAuth", message]);
928
1106
  /**
929
1107
  * @private
930
1108
  * This field is private and should not be used.
931
1109
  */
932
- _defineProperty(_this4, uniffiTypeNameSymbol, "QrCodeLoginError");
1110
+ _defineProperty(_this6, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
933
1111
  /**
934
1112
  * @private
935
1113
  * This field is private and should not be used.
936
1114
  */
937
- _defineProperty(_this4, variantOrdinalSymbol, 1);
938
- _defineProperty(_this4, "tag", QrCodeLoginError_Tags.OAuth);
939
- return _this4;
1115
+ _defineProperty(_this6, _uniffiBindgenReactNative.variantOrdinalSymbol, 1);
1116
+ _defineProperty(_this6, "tag", QrCodeLoginError_Tags.OAuth);
1117
+ return _this6;
940
1118
  }
941
1119
  _inherits(OAuth, _UniffiError);
942
1120
  return _createClass(OAuth, null, [{
943
1121
  key: "instanceOf",
944
1122
  value: function instanceOf(e) {
945
- return _instanceOf(e) && e[variantOrdinalSymbol] === 1;
1123
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 1;
946
1124
  }
947
1125
  }]);
948
- }(UniffiError);
1126
+ }(_uniffiBindgenReactNative.UniffiError);
949
1127
  /**
950
1128
  * The other device has signaled to us that the login has failed.
951
1129
  */
952
1130
  var LoginFailure = /*#__PURE__*/function (_UniffiError2) {
953
1131
  function LoginFailure(message) {
954
- var _this5;
1132
+ var _this7;
955
1133
  _classCallCheck(this, LoginFailure);
956
- _this5 = _callSuper(this, LoginFailure, ["QrCodeLoginError", "LoginFailure", message]);
1134
+ _this7 = _callSuper(this, LoginFailure, ["QrCodeLoginError", "LoginFailure", message]);
957
1135
  /**
958
1136
  * @private
959
1137
  * This field is private and should not be used.
960
1138
  */
961
- _defineProperty(_this5, uniffiTypeNameSymbol, "QrCodeLoginError");
1139
+ _defineProperty(_this7, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
962
1140
  /**
963
1141
  * @private
964
1142
  * This field is private and should not be used.
965
1143
  */
966
- _defineProperty(_this5, variantOrdinalSymbol, 2);
967
- _defineProperty(_this5, "tag", QrCodeLoginError_Tags.LoginFailure);
968
- return _this5;
1144
+ _defineProperty(_this7, _uniffiBindgenReactNative.variantOrdinalSymbol, 2);
1145
+ _defineProperty(_this7, "tag", QrCodeLoginError_Tags.LoginFailure);
1146
+ return _this7;
969
1147
  }
970
1148
  _inherits(LoginFailure, _UniffiError2);
971
1149
  return _createClass(LoginFailure, null, [{
972
1150
  key: "instanceOf",
973
1151
  value: function instanceOf(e) {
974
- return _instanceOf(e) && e[variantOrdinalSymbol] === 2;
1152
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 2;
975
1153
  }
976
1154
  }]);
977
- }(UniffiError);
1155
+ }(_uniffiBindgenReactNative.UniffiError);
978
1156
  /**
979
1157
  * An unexpected message was received from the other device.
980
1158
  */
981
1159
  var UnexpectedMessage = /*#__PURE__*/function (_UniffiError3) {
982
1160
  function UnexpectedMessage(message) {
983
- var _this6;
1161
+ var _this8;
984
1162
  _classCallCheck(this, UnexpectedMessage);
985
- _this6 = _callSuper(this, UnexpectedMessage, ["QrCodeLoginError", "UnexpectedMessage", message]);
1163
+ _this8 = _callSuper(this, UnexpectedMessage, ["QrCodeLoginError", "UnexpectedMessage", message]);
986
1164
  /**
987
1165
  * @private
988
1166
  * This field is private and should not be used.
989
1167
  */
990
- _defineProperty(_this6, uniffiTypeNameSymbol, "QrCodeLoginError");
1168
+ _defineProperty(_this8, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
991
1169
  /**
992
1170
  * @private
993
1171
  * This field is private and should not be used.
994
1172
  */
995
- _defineProperty(_this6, variantOrdinalSymbol, 3);
996
- _defineProperty(_this6, "tag", QrCodeLoginError_Tags.UnexpectedMessage);
997
- return _this6;
1173
+ _defineProperty(_this8, _uniffiBindgenReactNative.variantOrdinalSymbol, 3);
1174
+ _defineProperty(_this8, "tag", QrCodeLoginError_Tags.UnexpectedMessage);
1175
+ return _this8;
998
1176
  }
999
1177
  _inherits(UnexpectedMessage, _UniffiError3);
1000
1178
  return _createClass(UnexpectedMessage, null, [{
1001
1179
  key: "instanceOf",
1002
1180
  value: function instanceOf(e) {
1003
- return _instanceOf(e) && e[variantOrdinalSymbol] === 3;
1181
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 3;
1004
1182
  }
1005
1183
  }]);
1006
- }(UniffiError);
1184
+ }(_uniffiBindgenReactNative.UniffiError);
1007
1185
  /**
1008
1186
  * An error happened while exchanging messages with the other device.
1009
1187
  */
1010
1188
  var SecureChannel = /*#__PURE__*/function (_UniffiError4) {
1011
1189
  function SecureChannel(message) {
1012
- var _this7;
1190
+ var _this9;
1013
1191
  _classCallCheck(this, SecureChannel);
1014
- _this7 = _callSuper(this, SecureChannel, ["QrCodeLoginError", "SecureChannel", message]);
1192
+ _this9 = _callSuper(this, SecureChannel, ["QrCodeLoginError", "SecureChannel", message]);
1015
1193
  /**
1016
1194
  * @private
1017
1195
  * This field is private and should not be used.
1018
1196
  */
1019
- _defineProperty(_this7, uniffiTypeNameSymbol, "QrCodeLoginError");
1197
+ _defineProperty(_this9, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1020
1198
  /**
1021
1199
  * @private
1022
1200
  * This field is private and should not be used.
1023
1201
  */
1024
- _defineProperty(_this7, variantOrdinalSymbol, 4);
1025
- _defineProperty(_this7, "tag", QrCodeLoginError_Tags.SecureChannel);
1026
- return _this7;
1202
+ _defineProperty(_this9, _uniffiBindgenReactNative.variantOrdinalSymbol, 4);
1203
+ _defineProperty(_this9, "tag", QrCodeLoginError_Tags.SecureChannel);
1204
+ return _this9;
1027
1205
  }
1028
1206
  _inherits(SecureChannel, _UniffiError4);
1029
1207
  return _createClass(SecureChannel, null, [{
1030
1208
  key: "instanceOf",
1031
1209
  value: function instanceOf(e) {
1032
- return _instanceOf(e) && e[variantOrdinalSymbol] === 4;
1210
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 4;
1033
1211
  }
1034
1212
  }]);
1035
- }(UniffiError);
1213
+ }(_uniffiBindgenReactNative.UniffiError);
1036
1214
  /**
1037
1215
  * The rendezvous session was not found and might have expired.
1038
1216
  */
1039
1217
  var NotFound = /*#__PURE__*/function (_UniffiError5) {
1040
1218
  function NotFound(message) {
1041
- var _this8;
1219
+ var _this0;
1042
1220
  _classCallCheck(this, NotFound);
1043
- _this8 = _callSuper(this, NotFound, ["QrCodeLoginError", "NotFound", message]);
1221
+ _this0 = _callSuper(this, NotFound, ["QrCodeLoginError", "NotFound", message]);
1044
1222
  /**
1045
1223
  * @private
1046
1224
  * This field is private and should not be used.
1047
1225
  */
1048
- _defineProperty(_this8, uniffiTypeNameSymbol, "QrCodeLoginError");
1226
+ _defineProperty(_this0, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1049
1227
  /**
1050
1228
  * @private
1051
1229
  * This field is private and should not be used.
1052
1230
  */
1053
- _defineProperty(_this8, variantOrdinalSymbol, 5);
1054
- _defineProperty(_this8, "tag", QrCodeLoginError_Tags.NotFound);
1055
- return _this8;
1231
+ _defineProperty(_this0, _uniffiBindgenReactNative.variantOrdinalSymbol, 5);
1232
+ _defineProperty(_this0, "tag", QrCodeLoginError_Tags.NotFound);
1233
+ return _this0;
1056
1234
  }
1057
1235
  _inherits(NotFound, _UniffiError5);
1058
1236
  return _createClass(NotFound, null, [{
1059
1237
  key: "instanceOf",
1060
1238
  value: function instanceOf(e) {
1061
- return _instanceOf(e) && e[variantOrdinalSymbol] === 5;
1239
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 5;
1062
1240
  }
1063
1241
  }]);
1064
- }(UniffiError);
1242
+ }(_uniffiBindgenReactNative.UniffiError);
1065
1243
  /**
1066
1244
  * The cross-process refresh lock failed to be initialized.
1067
1245
  */
1068
1246
  var CrossProcessRefreshLock = /*#__PURE__*/function (_UniffiError6) {
1069
1247
  function CrossProcessRefreshLock(message) {
1070
- var _this9;
1248
+ var _this1;
1071
1249
  _classCallCheck(this, CrossProcessRefreshLock);
1072
- _this9 = _callSuper(this, CrossProcessRefreshLock, ["QrCodeLoginError", "CrossProcessRefreshLock", message]);
1250
+ _this1 = _callSuper(this, CrossProcessRefreshLock, ["QrCodeLoginError", "CrossProcessRefreshLock", message]);
1073
1251
  /**
1074
1252
  * @private
1075
1253
  * This field is private and should not be used.
1076
1254
  */
1077
- _defineProperty(_this9, uniffiTypeNameSymbol, "QrCodeLoginError");
1255
+ _defineProperty(_this1, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1078
1256
  /**
1079
1257
  * @private
1080
1258
  * This field is private and should not be used.
1081
1259
  */
1082
- _defineProperty(_this9, variantOrdinalSymbol, 6);
1083
- _defineProperty(_this9, "tag", QrCodeLoginError_Tags.CrossProcessRefreshLock);
1084
- return _this9;
1260
+ _defineProperty(_this1, _uniffiBindgenReactNative.variantOrdinalSymbol, 6);
1261
+ _defineProperty(_this1, "tag", QrCodeLoginError_Tags.CrossProcessRefreshLock);
1262
+ return _this1;
1085
1263
  }
1086
1264
  _inherits(CrossProcessRefreshLock, _UniffiError6);
1087
1265
  return _createClass(CrossProcessRefreshLock, null, [{
1088
1266
  key: "instanceOf",
1089
1267
  value: function instanceOf(e) {
1090
- return _instanceOf(e) && e[variantOrdinalSymbol] === 6;
1268
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 6;
1091
1269
  }
1092
1270
  }]);
1093
- }(UniffiError);
1271
+ }(_uniffiBindgenReactNative.UniffiError);
1094
1272
  /**
1095
1273
  * An error happened while we were trying to discover our user and device
1096
1274
  * ID, after we have acquired an access token from the OAuth 2.0
@@ -1098,151 +1276,151 @@ export var QrCodeLoginError = function () {
1098
1276
  */
1099
1277
  var UserIdDiscovery = /*#__PURE__*/function (_UniffiError7) {
1100
1278
  function UserIdDiscovery(message) {
1101
- var _this0;
1279
+ var _this10;
1102
1280
  _classCallCheck(this, UserIdDiscovery);
1103
- _this0 = _callSuper(this, UserIdDiscovery, ["QrCodeLoginError", "UserIdDiscovery", message]);
1281
+ _this10 = _callSuper(this, UserIdDiscovery, ["QrCodeLoginError", "UserIdDiscovery", message]);
1104
1282
  /**
1105
1283
  * @private
1106
1284
  * This field is private and should not be used.
1107
1285
  */
1108
- _defineProperty(_this0, uniffiTypeNameSymbol, "QrCodeLoginError");
1286
+ _defineProperty(_this10, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1109
1287
  /**
1110
1288
  * @private
1111
1289
  * This field is private and should not be used.
1112
1290
  */
1113
- _defineProperty(_this0, variantOrdinalSymbol, 7);
1114
- _defineProperty(_this0, "tag", QrCodeLoginError_Tags.UserIdDiscovery);
1115
- return _this0;
1291
+ _defineProperty(_this10, _uniffiBindgenReactNative.variantOrdinalSymbol, 7);
1292
+ _defineProperty(_this10, "tag", QrCodeLoginError_Tags.UserIdDiscovery);
1293
+ return _this10;
1116
1294
  }
1117
1295
  _inherits(UserIdDiscovery, _UniffiError7);
1118
1296
  return _createClass(UserIdDiscovery, null, [{
1119
1297
  key: "instanceOf",
1120
1298
  value: function instanceOf(e) {
1121
- return _instanceOf(e) && e[variantOrdinalSymbol] === 7;
1299
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 7;
1122
1300
  }
1123
1301
  }]);
1124
- }(UniffiError);
1302
+ }(_uniffiBindgenReactNative.UniffiError);
1125
1303
  /**
1126
1304
  * We failed to set the session tokens after we figured out our device and
1127
1305
  * user IDs.
1128
1306
  */
1129
1307
  var SessionTokens = /*#__PURE__*/function (_UniffiError8) {
1130
1308
  function SessionTokens(message) {
1131
- var _this1;
1309
+ var _this11;
1132
1310
  _classCallCheck(this, SessionTokens);
1133
- _this1 = _callSuper(this, SessionTokens, ["QrCodeLoginError", "SessionTokens", message]);
1311
+ _this11 = _callSuper(this, SessionTokens, ["QrCodeLoginError", "SessionTokens", message]);
1134
1312
  /**
1135
1313
  * @private
1136
1314
  * This field is private and should not be used.
1137
1315
  */
1138
- _defineProperty(_this1, uniffiTypeNameSymbol, "QrCodeLoginError");
1316
+ _defineProperty(_this11, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1139
1317
  /**
1140
1318
  * @private
1141
1319
  * This field is private and should not be used.
1142
1320
  */
1143
- _defineProperty(_this1, variantOrdinalSymbol, 8);
1144
- _defineProperty(_this1, "tag", QrCodeLoginError_Tags.SessionTokens);
1145
- return _this1;
1321
+ _defineProperty(_this11, _uniffiBindgenReactNative.variantOrdinalSymbol, 8);
1322
+ _defineProperty(_this11, "tag", QrCodeLoginError_Tags.SessionTokens);
1323
+ return _this11;
1146
1324
  }
1147
1325
  _inherits(SessionTokens, _UniffiError8);
1148
1326
  return _createClass(SessionTokens, null, [{
1149
1327
  key: "instanceOf",
1150
1328
  value: function instanceOf(e) {
1151
- return _instanceOf(e) && e[variantOrdinalSymbol] === 8;
1329
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 8;
1152
1330
  }
1153
1331
  }]);
1154
- }(UniffiError);
1332
+ }(_uniffiBindgenReactNative.UniffiError);
1155
1333
  /**
1156
1334
  * The device keys failed to be uploaded after we successfully logged in.
1157
1335
  */
1158
1336
  var DeviceKeyUpload = /*#__PURE__*/function (_UniffiError9) {
1159
1337
  function DeviceKeyUpload(message) {
1160
- var _this10;
1338
+ var _this12;
1161
1339
  _classCallCheck(this, DeviceKeyUpload);
1162
- _this10 = _callSuper(this, DeviceKeyUpload, ["QrCodeLoginError", "DeviceKeyUpload", message]);
1340
+ _this12 = _callSuper(this, DeviceKeyUpload, ["QrCodeLoginError", "DeviceKeyUpload", message]);
1163
1341
  /**
1164
1342
  * @private
1165
1343
  * This field is private and should not be used.
1166
1344
  */
1167
- _defineProperty(_this10, uniffiTypeNameSymbol, "QrCodeLoginError");
1345
+ _defineProperty(_this12, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1168
1346
  /**
1169
1347
  * @private
1170
1348
  * This field is private and should not be used.
1171
1349
  */
1172
- _defineProperty(_this10, variantOrdinalSymbol, 9);
1173
- _defineProperty(_this10, "tag", QrCodeLoginError_Tags.DeviceKeyUpload);
1174
- return _this10;
1350
+ _defineProperty(_this12, _uniffiBindgenReactNative.variantOrdinalSymbol, 9);
1351
+ _defineProperty(_this12, "tag", QrCodeLoginError_Tags.DeviceKeyUpload);
1352
+ return _this12;
1175
1353
  }
1176
1354
  _inherits(DeviceKeyUpload, _UniffiError9);
1177
1355
  return _createClass(DeviceKeyUpload, null, [{
1178
1356
  key: "instanceOf",
1179
1357
  value: function instanceOf(e) {
1180
- return _instanceOf(e) && e[variantOrdinalSymbol] === 9;
1358
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 9;
1181
1359
  }
1182
1360
  }]);
1183
- }(UniffiError);
1361
+ }(_uniffiBindgenReactNative.UniffiError);
1184
1362
  /**
1185
1363
  * The secrets bundle we received from the existing device failed to be
1186
1364
  * imported.
1187
1365
  */
1188
1366
  var SecretImport = /*#__PURE__*/function (_UniffiError0) {
1189
1367
  function SecretImport(message) {
1190
- var _this11;
1368
+ var _this13;
1191
1369
  _classCallCheck(this, SecretImport);
1192
- _this11 = _callSuper(this, SecretImport, ["QrCodeLoginError", "SecretImport", message]);
1370
+ _this13 = _callSuper(this, SecretImport, ["QrCodeLoginError", "SecretImport", message]);
1193
1371
  /**
1194
1372
  * @private
1195
1373
  * This field is private and should not be used.
1196
1374
  */
1197
- _defineProperty(_this11, uniffiTypeNameSymbol, "QrCodeLoginError");
1375
+ _defineProperty(_this13, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1198
1376
  /**
1199
1377
  * @private
1200
1378
  * This field is private and should not be used.
1201
1379
  */
1202
- _defineProperty(_this11, variantOrdinalSymbol, 10);
1203
- _defineProperty(_this11, "tag", QrCodeLoginError_Tags.SecretImport);
1204
- return _this11;
1380
+ _defineProperty(_this13, _uniffiBindgenReactNative.variantOrdinalSymbol, 10);
1381
+ _defineProperty(_this13, "tag", QrCodeLoginError_Tags.SecretImport);
1382
+ return _this13;
1205
1383
  }
1206
1384
  _inherits(SecretImport, _UniffiError0);
1207
1385
  return _createClass(SecretImport, null, [{
1208
1386
  key: "instanceOf",
1209
1387
  value: function instanceOf(e) {
1210
- return _instanceOf(e) && e[variantOrdinalSymbol] === 10;
1388
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 10;
1211
1389
  }
1212
1390
  }]);
1213
- }(UniffiError);
1391
+ }(_uniffiBindgenReactNative.UniffiError);
1214
1392
  /**
1215
1393
  * The other party told us to use a different homeserver but we failed to
1216
1394
  * reset the server URL.
1217
1395
  */
1218
1396
  var ServerReset = /*#__PURE__*/function (_UniffiError1) {
1219
1397
  function ServerReset(message) {
1220
- var _this12;
1398
+ var _this14;
1221
1399
  _classCallCheck(this, ServerReset);
1222
- _this12 = _callSuper(this, ServerReset, ["QrCodeLoginError", "ServerReset", message]);
1400
+ _this14 = _callSuper(this, ServerReset, ["QrCodeLoginError", "ServerReset", message]);
1223
1401
  /**
1224
1402
  * @private
1225
1403
  * This field is private and should not be used.
1226
1404
  */
1227
- _defineProperty(_this12, uniffiTypeNameSymbol, "QrCodeLoginError");
1405
+ _defineProperty(_this14, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "QrCodeLoginError");
1228
1406
  /**
1229
1407
  * @private
1230
1408
  * This field is private and should not be used.
1231
1409
  */
1232
- _defineProperty(_this12, variantOrdinalSymbol, 11);
1233
- _defineProperty(_this12, "tag", QrCodeLoginError_Tags.ServerReset);
1234
- return _this12;
1410
+ _defineProperty(_this14, _uniffiBindgenReactNative.variantOrdinalSymbol, 11);
1411
+ _defineProperty(_this14, "tag", QrCodeLoginError_Tags.ServerReset);
1412
+ return _this14;
1235
1413
  }
1236
1414
  _inherits(ServerReset, _UniffiError1);
1237
1415
  return _createClass(ServerReset, null, [{
1238
1416
  key: "instanceOf",
1239
1417
  value: function instanceOf(e) {
1240
- return _instanceOf(e) && e[variantOrdinalSymbol] === 11;
1418
+ return _instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 11;
1241
1419
  }
1242
1420
  }]);
1243
- }(UniffiError); // Utility function which does not rely on instanceof.
1421
+ }(_uniffiBindgenReactNative.UniffiError); // Utility function which does not rely on instanceof.
1244
1422
  function _instanceOf(e) {
1245
- return e[uniffiTypeNameSymbol] === "QrCodeLoginError";
1423
+ return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "QrCodeLoginError";
1246
1424
  }
1247
1425
  return {
1248
1426
  OAuth: OAuth,
@@ -1259,14 +1437,22 @@ export var QrCodeLoginError = function () {
1259
1437
  instanceOf: _instanceOf
1260
1438
  };
1261
1439
  }();
1440
+
1441
+ // Union type for QrCodeLoginError error type.
1442
+
1443
+ /**
1444
+ * The error type for failures while trying to log in a new device using a QR
1445
+ * code.
1446
+ */
1447
+
1262
1448
  var FfiConverterTypeQRCodeLoginError = function () {
1263
- var intConverter = FfiConverterInt32;
1264
- var FfiConverter = /*#__PURE__*/function (_AbstractFfiConverter1) {
1449
+ var intConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1450
+ var FfiConverter = /*#__PURE__*/function (_AbstractFfiConverter10) {
1265
1451
  function FfiConverter() {
1266
1452
  _classCallCheck(this, FfiConverter);
1267
1453
  return _callSuper(this, FfiConverter, arguments);
1268
1454
  }
1269
- _inherits(FfiConverter, _AbstractFfiConverter1);
1455
+ _inherits(FfiConverter, _AbstractFfiConverter10);
1270
1456
  return _createClass(FfiConverter, [{
1271
1457
  key: "read",
1272
1458
  value: function read(from) {
@@ -1294,14 +1480,14 @@ var FfiConverterTypeQRCodeLoginError = function () {
1294
1480
  case 11:
1295
1481
  return new QrCodeLoginError.ServerReset(FfiConverterString.read(from));
1296
1482
  default:
1297
- throw new UniffiInternalError.UnexpectedEnumCase();
1483
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1298
1484
  }
1299
1485
  }
1300
1486
  }, {
1301
1487
  key: "write",
1302
1488
  value: function write(value, into) {
1303
1489
  var obj = value;
1304
- var index = obj[variantOrdinalSymbol];
1490
+ var index = obj[_uniffiBindgenReactNative.variantOrdinalSymbol];
1305
1491
  intConverter.write(index, into);
1306
1492
  }
1307
1493
  }, {
@@ -1310,14 +1496,14 @@ var FfiConverterTypeQRCodeLoginError = function () {
1310
1496
  return intConverter.allocationSize(0);
1311
1497
  }
1312
1498
  }]);
1313
- }(AbstractFfiConverterByteArray);
1499
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
1314
1500
  return new FfiConverter();
1315
1501
  }();
1502
+
1316
1503
  /**
1317
1504
  * The role of a member in a room.
1318
1505
  */
1319
- export var RoomMemberRole;
1320
- (function (RoomMemberRole) {
1506
+ var RoomMemberRole = exports.RoomMemberRole = /*#__PURE__*/function (RoomMemberRole) {
1321
1507
  /**
1322
1508
  * The member is a creator.
1323
1509
  *
@@ -1343,15 +1529,16 @@ export var RoomMemberRole;
1343
1529
  * The member is a regular user.
1344
1530
  */
1345
1531
  RoomMemberRole[RoomMemberRole["User"] = 3] = "User";
1346
- })(RoomMemberRole || (RoomMemberRole = {}));
1532
+ return RoomMemberRole;
1533
+ }({});
1347
1534
  var FfiConverterTypeRoomMemberRole = function () {
1348
- var ordinalConverter = FfiConverterInt32;
1349
- var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter10) {
1535
+ var ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1536
+ var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter11) {
1350
1537
  function FFIConverter() {
1351
1538
  _classCallCheck(this, FFIConverter);
1352
1539
  return _callSuper(this, FFIConverter, arguments);
1353
1540
  }
1354
- _inherits(FFIConverter, _AbstractFfiConverter10);
1541
+ _inherits(FFIConverter, _AbstractFfiConverter11);
1355
1542
  return _createClass(FFIConverter, [{
1356
1543
  key: "read",
1357
1544
  value: function read(from) {
@@ -1365,7 +1552,7 @@ var FfiConverterTypeRoomMemberRole = function () {
1365
1552
  case 4:
1366
1553
  return RoomMemberRole.User;
1367
1554
  default:
1368
- throw new UniffiInternalError.UnexpectedEnumCase();
1555
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1369
1556
  }
1370
1557
  }
1371
1558
  }, {
@@ -1388,171 +1575,34 @@ var FfiConverterTypeRoomMemberRole = function () {
1388
1575
  return ordinalConverter.allocationSize(0);
1389
1576
  }
1390
1577
  }]);
1391
- }(AbstractFfiConverterByteArray);
1578
+ }(_uniffiBindgenReactNative.AbstractFfiConverterByteArray);
1392
1579
  return new FFIConverter();
1393
1580
  }();
1394
- // Enum: RoomPaginationStatus
1395
- export var RoomPaginationStatus_Tags;
1396
- (function (RoomPaginationStatus_Tags) {
1397
- RoomPaginationStatus_Tags["Idle"] = "Idle";
1398
- RoomPaginationStatus_Tags["Paginating"] = "Paginating";
1399
- })(RoomPaginationStatus_Tags || (RoomPaginationStatus_Tags = {}));
1581
+
1400
1582
  /**
1401
- * Status for the back-pagination on a room event cache.
1583
+ * The data needed to perform authorization using OAuth 2.0.
1584
+ */
1585
+
1586
+ /**
1587
+ * @deprecated Use `OAuthAuthorizationDataLike` instead.
1402
1588
  */
1403
- export var RoomPaginationStatus = function () {
1404
- /**
1405
- * No back-pagination is happening right now.
1406
- */
1407
- var Idle_ = /*#__PURE__*/function (_UniffiEnum4) {
1408
- function Idle_(inner) {
1409
- var _this13;
1410
- _classCallCheck(this, Idle_);
1411
- _this13 = _callSuper(this, Idle_, ["RoomPaginationStatus", "Idle"]);
1412
- /**
1413
- * @private
1414
- * This field is private and should not be used, use `tag` instead.
1415
- */
1416
- _defineProperty(_this13, uniffiTypeNameSymbol, "RoomPaginationStatus");
1417
- _defineProperty(_this13, "tag", RoomPaginationStatus_Tags.Idle);
1418
- _defineProperty(_this13, "inner", void 0);
1419
- _this13.inner = Object.freeze(inner);
1420
- return _this13;
1421
- }
1422
- _inherits(Idle_, _UniffiEnum4);
1423
- return _createClass(Idle_, null, [{
1424
- key: "new",
1425
- value: function _new(inner) {
1426
- return new Idle_(inner);
1427
- }
1428
- }, {
1429
- key: "instanceOf",
1430
- value: function instanceOf(obj) {
1431
- return obj.tag === RoomPaginationStatus_Tags.Idle;
1432
- }
1433
- }]);
1434
- }(UniffiEnum);
1435
- /**
1436
- * Back-pagination is already running in the background.
1437
- */
1438
- var Paginating_ = /*#__PURE__*/function (_UniffiEnum5) {
1439
- function Paginating_() {
1440
- var _this14;
1441
- _classCallCheck(this, Paginating_);
1442
- _this14 = _callSuper(this, Paginating_, ["RoomPaginationStatus", "Paginating"]);
1443
- /**
1444
- * @private
1445
- * This field is private and should not be used, use `tag` instead.
1446
- */
1447
- _defineProperty(_this14, uniffiTypeNameSymbol, "RoomPaginationStatus");
1448
- _defineProperty(_this14, "tag", RoomPaginationStatus_Tags.Paginating);
1449
- return _this14;
1450
- }
1451
- _inherits(Paginating_, _UniffiEnum5);
1452
- return _createClass(Paginating_, null, [{
1453
- key: "new",
1454
- value: function _new() {
1455
- return new Paginating_();
1456
- }
1457
- }, {
1458
- key: "instanceOf",
1459
- value: function instanceOf(obj) {
1460
- return obj.tag === RoomPaginationStatus_Tags.Paginating;
1461
- }
1462
- }]);
1463
- }(UniffiEnum);
1464
- function instanceOf(obj) {
1465
- return obj[uniffiTypeNameSymbol] === "RoomPaginationStatus";
1466
- }
1467
- return Object.freeze({
1468
- instanceOf: instanceOf,
1469
- Idle: Idle_,
1470
- Paginating: Paginating_
1471
- });
1472
- }();
1473
- // FfiConverter for enum RoomPaginationStatus
1474
- var FfiConverterTypeRoomPaginationStatus = function () {
1475
- var ordinalConverter = FfiConverterInt32;
1476
- var FFIConverter = /*#__PURE__*/function (_AbstractFfiConverter11) {
1477
- function FFIConverter() {
1478
- _classCallCheck(this, FFIConverter);
1479
- return _callSuper(this, FFIConverter, arguments);
1480
- }
1481
- _inherits(FFIConverter, _AbstractFfiConverter11);
1482
- return _createClass(FFIConverter, [{
1483
- key: "read",
1484
- value: function read(from) {
1485
- switch (ordinalConverter.read(from)) {
1486
- case 1:
1487
- return new RoomPaginationStatus.Idle({
1488
- hitTimelineStart: FfiConverterBool.read(from)
1489
- });
1490
- case 2:
1491
- return new RoomPaginationStatus.Paginating();
1492
- default:
1493
- throw new UniffiInternalError.UnexpectedEnumCase();
1494
- }
1495
- }
1496
- }, {
1497
- key: "write",
1498
- value: function write(value, into) {
1499
- switch (value.tag) {
1500
- case RoomPaginationStatus_Tags.Idle:
1501
- {
1502
- ordinalConverter.write(1, into);
1503
- var inner = value.inner;
1504
- FfiConverterBool.write(inner.hitTimelineStart, into);
1505
- return;
1506
- }
1507
- case RoomPaginationStatus_Tags.Paginating:
1508
- {
1509
- ordinalConverter.write(2, into);
1510
- return;
1511
- }
1512
- default:
1513
- // Throwing from here means that RoomPaginationStatus_Tags hasn't matched an ordinal.
1514
- throw new UniffiInternalError.UnexpectedEnumCase();
1515
- }
1516
- }
1517
- }, {
1518
- key: "allocationSize",
1519
- value: function allocationSize(value) {
1520
- switch (value.tag) {
1521
- case RoomPaginationStatus_Tags.Idle:
1522
- {
1523
- var inner = value.inner;
1524
- var size = ordinalConverter.allocationSize(1);
1525
- size += FfiConverterBool.allocationSize(inner.hitTimelineStart);
1526
- return size;
1527
- }
1528
- case RoomPaginationStatus_Tags.Paginating:
1529
- {
1530
- return ordinalConverter.allocationSize(2);
1531
- }
1532
- default:
1533
- throw new UniffiInternalError.UnexpectedEnumCase();
1534
- }
1535
- }
1536
- }]);
1537
- }(AbstractFfiConverterByteArray);
1538
- return new FFIConverter();
1539
- }();
1540
1589
  /**
1541
1590
  * The data needed to perform authorization using OAuth 2.0.
1542
1591
  */
1543
- export var OAuthAuthorizationData = /*#__PURE__*/function (_UniffiAbstractObject) {
1592
+ var OAuthAuthorizationData = exports.OAuthAuthorizationData = /*#__PURE__*/function (_UniffiAbstractObject) {
1544
1593
  // No primary constructor declared for this class.
1545
1594
  function OAuthAuthorizationData(pointer) {
1546
1595
  var _this15;
1547
1596
  _classCallCheck(this, OAuthAuthorizationData);
1548
1597
  _this15 = _callSuper(this, OAuthAuthorizationData);
1549
- _defineProperty(_this15, uniffiTypeNameSymbol, "OAuthAuthorizationData");
1550
- _defineProperty(_this15, destructorGuardSymbol, void 0);
1551
- _defineProperty(_this15, pointerLiteralSymbol, void 0);
1552
- _this15[pointerLiteralSymbol] = pointer;
1553
- _this15[destructorGuardSymbol] = uniffiTypeOAuthAuthorizationDataObjectFactory.bless(pointer);
1598
+ _defineProperty(_this15, _uniffiBindgenReactNative.uniffiTypeNameSymbol, "OAuthAuthorizationData");
1599
+ _defineProperty(_this15, _uniffiBindgenReactNative.destructorGuardSymbol, void 0);
1600
+ _defineProperty(_this15, _uniffiBindgenReactNative.pointerLiteralSymbol, void 0);
1601
+ _this15[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
1602
+ _this15[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeOAuthAuthorizationDataObjectFactory.bless(pointer);
1554
1603
  return _this15;
1555
1604
  }
1605
+
1556
1606
  /**
1557
1607
  * The login URL to use for authorization.
1558
1608
  */
@@ -1565,18 +1615,19 @@ export var OAuthAuthorizationData = /*#__PURE__*/function (_UniffiAbstractObject
1565
1615
  return nativeModule().ubrn_uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url(uniffiTypeOAuthAuthorizationDataObjectFactory.clonePointer(_this16), callStatus);
1566
1616
  }, /*liftString:*/FfiConverterString.lift));
1567
1617
  }
1618
+
1568
1619
  /**
1569
1620
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
1570
1621
  */
1571
1622
  }, {
1572
1623
  key: "uniffiDestroy",
1573
1624
  value: function uniffiDestroy() {
1574
- var ptr = this[destructorGuardSymbol];
1625
+ var ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
1575
1626
  if (ptr !== undefined) {
1576
1627
  var pointer = uniffiTypeOAuthAuthorizationDataObjectFactory.pointer(this);
1577
1628
  uniffiTypeOAuthAuthorizationDataObjectFactory.freePointer(pointer);
1578
1629
  uniffiTypeOAuthAuthorizationDataObjectFactory.unbless(ptr);
1579
- delete this[destructorGuardSymbol];
1630
+ delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
1580
1631
  }
1581
1632
  }
1582
1633
  }], [{
@@ -1585,7 +1636,7 @@ export var OAuthAuthorizationData = /*#__PURE__*/function (_UniffiAbstractObject
1585
1636
  return uniffiTypeOAuthAuthorizationDataObjectFactory.isConcreteType(obj);
1586
1637
  }
1587
1638
  }]);
1588
- }(UniffiAbstractObject);
1639
+ }(_uniffiBindgenReactNative.UniffiAbstractObject);
1589
1640
  var uniffiTypeOAuthAuthorizationDataObjectFactory = function () {
1590
1641
  /// <reference lib="es2021" />
1591
1642
  var registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry(function (heldValue) {
@@ -1594,9 +1645,9 @@ var uniffiTypeOAuthAuthorizationDataObjectFactory = function () {
1594
1645
  return {
1595
1646
  create: function create(pointer) {
1596
1647
  var instance = Object.create(OAuthAuthorizationData.prototype);
1597
- instance[pointerLiteralSymbol] = pointer;
1598
- instance[destructorGuardSymbol] = this.bless(pointer);
1599
- instance[uniffiTypeNameSymbol] = "OAuthAuthorizationData";
1648
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
1649
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
1650
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "OAuthAuthorizationData";
1600
1651
  return instance;
1601
1652
  },
1602
1653
  bless: function bless(p) {
@@ -1618,10 +1669,10 @@ var uniffiTypeOAuthAuthorizationDataObjectFactory = function () {
1618
1669
  }
1619
1670
  },
1620
1671
  pointer: function pointer(obj) {
1621
- if (obj[destructorGuardSymbol] === undefined) {
1622
- throw new UniffiInternalError.UnexpectedNullPointer();
1672
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
1673
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
1623
1674
  }
1624
- return obj[pointerLiteralSymbol];
1675
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
1625
1676
  },
1626
1677
  clonePointer: function clonePointer(obj) {
1627
1678
  var pointer = this.pointer(obj);
@@ -1635,26 +1686,34 @@ var uniffiTypeOAuthAuthorizationDataObjectFactory = function () {
1635
1686
  }, /*liftString:*/FfiConverterString.lift);
1636
1687
  },
1637
1688
  isConcreteType: function isConcreteType(obj) {
1638
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "OAuthAuthorizationData";
1689
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "OAuthAuthorizationData";
1639
1690
  }
1640
1691
  };
1641
1692
  }();
1642
- // FfiConverter for OAuthAuthorizationDataInterface
1643
- var FfiConverterTypeOAuthAuthorizationData = new FfiConverterObject(uniffiTypeOAuthAuthorizationDataObjectFactory);
1693
+ // FfiConverter for OAuthAuthorizationDataLike
1694
+ var FfiConverterTypeOAuthAuthorizationData = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeOAuthAuthorizationDataObjectFactory);
1695
+
1644
1696
  // FfiConverter for boolean | undefined
1645
- var FfiConverterOptionalBool = new FfiConverterOptional(FfiConverterBool);
1697
+ var FfiConverterOptionalBool = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterBool);
1698
+
1646
1699
  // FfiConverter for /*f64*/number | undefined
1647
- var FfiConverterOptionalFloat64 = new FfiConverterOptional(FfiConverterFloat64);
1700
+ var FfiConverterOptionalFloat64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterFloat64);
1701
+
1648
1702
  // FfiConverter for /*i64*/bigint | undefined
1649
- var FfiConverterOptionalInt64 = new FfiConverterOptional(FfiConverterInt64);
1703
+ var FfiConverterOptionalInt64 = new _uniffiBindgenReactNative.FfiConverterOptional(_uniffiBindgenReactNative.FfiConverterInt64);
1704
+
1650
1705
  // FfiConverter for string | undefined
1651
- var FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
1706
+ var FfiConverterOptionalString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterString);
1707
+
1652
1708
  // FfiConverter for HeaderStyle | undefined
1653
- var FfiConverterOptionalTypeHeaderStyle = new FfiConverterOptional(FfiConverterTypeHeaderStyle);
1709
+ var FfiConverterOptionalTypeHeaderStyle = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeHeaderStyle);
1710
+
1654
1711
  // FfiConverter for Intent | undefined
1655
- var FfiConverterOptionalTypeIntent = new FfiConverterOptional(FfiConverterTypeIntent);
1712
+ var FfiConverterOptionalTypeIntent = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeIntent);
1713
+
1656
1714
  // FfiConverter for NotificationType | undefined
1657
- var FfiConverterOptionalTypeNotificationType = new FfiConverterOptional(FfiConverterTypeNotificationType);
1715
+ var FfiConverterOptionalTypeNotificationType = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterTypeNotificationType);
1716
+
1658
1717
  /**
1659
1718
  * This should be called before anything else.
1660
1719
  *
@@ -1667,17 +1726,17 @@ var FfiConverterOptionalTypeNotificationType = new FfiConverterOptional(FfiConve
1667
1726
  */
1668
1727
  function uniffiEnsureInitialized() {
1669
1728
  // Get the bindings contract version from our ComponentInterface
1670
- var bindingsContractVersion = 29;
1729
+ var bindingsContractVersion = 30;
1671
1730
  // Get the scaffolding contract version by calling the into the dylib
1672
1731
  var scaffoldingContractVersion = nativeModule().ubrn_ffi_matrix_sdk_uniffi_contract_version();
1673
1732
  if (bindingsContractVersion !== scaffoldingContractVersion) {
1674
- throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
1733
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
1675
1734
  }
1676
- if (nativeModule().ubrn_uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() !== 25566) {
1677
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url");
1735
+ if (nativeModule().ubrn_uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() !== 47865) {
1736
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url");
1678
1737
  }
1679
1738
  }
1680
- export default Object.freeze({
1739
+ var _default = exports["default"] = Object.freeze({
1681
1740
  initialize: uniffiEnsureInitialized,
1682
1741
  converters: {
1683
1742
  FfiConverterTypeBackupDownloadStrategy: FfiConverterTypeBackupDownloadStrategy,
@@ -1686,10 +1745,10 @@ export default Object.freeze({
1686
1745
  FfiConverterTypeIntent: FfiConverterTypeIntent,
1687
1746
  FfiConverterTypeNotificationType: FfiConverterTypeNotificationType,
1688
1747
  FfiConverterTypeOAuthAuthorizationData: FfiConverterTypeOAuthAuthorizationData,
1748
+ FfiConverterTypePaginationStatus: FfiConverterTypePaginationStatus,
1689
1749
  FfiConverterTypePaginatorState: FfiConverterTypePaginatorState,
1690
1750
  FfiConverterTypeQRCodeLoginError: FfiConverterTypeQRCodeLoginError,
1691
1751
  FfiConverterTypeRoomMemberRole: FfiConverterTypeRoomMemberRole,
1692
- FfiConverterTypeRoomPaginationStatus: FfiConverterTypeRoomPaginationStatus,
1693
1752
  FfiConverterTypeRoomPowerLevelChanges: FfiConverterTypeRoomPowerLevelChanges,
1694
1753
  FfiConverterTypeServerVendorInfo: FfiConverterTypeServerVendorInfo,
1695
1754
  FfiConverterTypeVirtualElementCallWidgetConfig: FfiConverterTypeVirtualElementCallWidgetConfig,