@doordeck/doordeck-headless-sdk 0.133.0 → 0.134.0

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.
@@ -14,6 +14,11 @@
14
14
  var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.j2;
15
15
  var captureStack = kotlin_kotlin.$_$.da;
16
16
  var Unit_instance = kotlin_kotlin.$_$.k5;
17
+ var Companion_instance = kotlin_kotlin.$_$.f5;
18
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.b3;
19
+ var createFailure = kotlin_kotlin.$_$.lg;
20
+ var intercepted = kotlin_kotlin.$_$.i9;
21
+ var SafeContinuation_init_$Create$ = kotlin_kotlin.$_$.g1;
17
22
  var initMetadataForObject = kotlin_kotlin.$_$.za;
18
23
  var VOID = kotlin_kotlin.$_$.h;
19
24
  var _UByteArray___get_storage__impl__d4kctt = kotlin_kotlin.$_$.o3;
@@ -22,11 +27,15 @@
22
27
  var _UByteArray___init__impl__ip4y9n = kotlin_kotlin.$_$.j3;
23
28
  var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.f3;
24
29
  var UByteArray__set_impl_jvcicn = kotlin_kotlin.$_$.m3;
30
+ var CoroutineImpl = kotlin_kotlin.$_$.v9;
31
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.f9;
32
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.va;
25
33
  //endregion
26
34
  //region block: pre-declaration
27
35
  initMetadataForClass(SignatureKeyPair, 'SignatureKeyPair');
28
36
  initMetadataForClass(InvalidSignatureException, 'InvalidSignatureException', InvalidSignatureException, RuntimeException);
29
37
  initMetadataForObject(JsSodiumLoader, 'JsSodiumLoader', VOID, VOID, VOID, [0]);
38
+ initMetadataForCoroutine($initializeCOROUTINE$, CoroutineImpl);
30
39
  initMetadataForObject(LibsodiumInitializer, 'LibsodiumInitializer', VOID, VOID, VOID, [0]);
31
40
  initMetadataForObject(Signature, 'Signature');
32
41
  //endregion
@@ -104,23 +113,38 @@
104
113
  captureStack(this, InvalidSignatureException);
105
114
  }
106
115
  var randombytes_SEEDBYTES;
107
- function JsSodiumLoader$loadWithCallback$lambda($doneCallback) {
116
+ function JsSodiumLoader$load$lambda($continuation) {
108
117
  return function (it) {
109
118
  _sodium_init();
110
119
  set_sodiumLoaded(true);
111
- $doneCallback();
120
+ // Inline function 'kotlin.Companion.success' call
121
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);
122
+ $continuation.r9(tmp$ret$0);
123
+ return Unit_instance;
124
+ };
125
+ }
126
+ function JsSodiumLoader$load$lambda_0($continuation) {
127
+ return function (e) {
128
+ // Inline function 'kotlin.Companion.failure' call
129
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(e));
130
+ $continuation.r9(tmp$ret$0);
112
131
  return Unit_instance;
113
132
  };
114
133
  }
115
134
  function JsSodiumLoader() {
116
135
  }
117
- protoOf(JsSodiumLoader).vn = function (doneCallback) {
136
+ protoOf(JsSodiumLoader).vn = function ($completion) {
137
+ var safe = SafeContinuation_init_$Create$(intercepted($completion));
118
138
  if (!getSodiumLoaded()) {
119
139
  var tmp = ready;
120
- tmp.then(JsSodiumLoader$loadWithCallback$lambda(doneCallback));
140
+ var tmp_0 = tmp.then(JsSodiumLoader$load$lambda(safe));
141
+ tmp_0.catch(JsSodiumLoader$load$lambda_0(safe));
121
142
  } else {
122
- doneCallback();
143
+ // Inline function 'kotlin.Companion.success' call
144
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);
145
+ safe.r9(tmp$ret$0);
123
146
  }
147
+ return safe.y9();
124
148
  };
125
149
  var JsSodiumLoader_instance;
126
150
  function JsSodiumLoader_getInstance() {
@@ -160,22 +184,50 @@
160
184
  sodiumLoaded = _set____db54di;
161
185
  }
162
186
  var sodiumLoaded;
163
- function LibsodiumInitializer$initializeWithCallback$lambda($done) {
164
- return function () {
165
- LibsodiumInitializer_instance.wn_1 = true;
166
- $done();
167
- return Unit_instance;
168
- };
187
+ function $initializeCOROUTINE$(_this__u8e3s4, resultContinuation) {
188
+ CoroutineImpl.call(this, resultContinuation);
189
+ this.eo_1 = _this__u8e3s4;
169
190
  }
191
+ protoOf($initializeCOROUTINE$).o9 = function () {
192
+ var suspendResult = this.i9_1;
193
+ $sm: do
194
+ try {
195
+ var tmp = this.g9_1;
196
+ switch (tmp) {
197
+ case 0:
198
+ this.h9_1 = 2;
199
+ this.g9_1 = 1;
200
+ suspendResult = JsSodiumLoader_instance.vn(this);
201
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
202
+ return suspendResult;
203
+ }
204
+
205
+ continue $sm;
206
+ case 1:
207
+ this.eo_1.fo_1 = true;
208
+ return Unit_instance;
209
+ case 2:
210
+ throw this.j9_1;
211
+ }
212
+ } catch ($p) {
213
+ var e = $p;
214
+ if (this.h9_1 === 2) {
215
+ throw e;
216
+ } else {
217
+ this.g9_1 = this.h9_1;
218
+ this.j9_1 = e;
219
+ }
220
+ }
221
+ while (true);
222
+ };
170
223
  function LibsodiumInitializer() {
171
- this.wn_1 = false;
224
+ this.fo_1 = false;
172
225
  }
173
- protoOf(LibsodiumInitializer).xn = function (done) {
174
- var tmp = JsSodiumLoader_instance;
175
- tmp.vn(LibsodiumInitializer$initializeWithCallback$lambda(done));
176
- };
177
- protoOf(LibsodiumInitializer).ol = function () {
178
- return this.wn_1;
226
+ protoOf(LibsodiumInitializer).go = function ($completion) {
227
+ var tmp = new $initializeCOROUTINE$(this, $completion);
228
+ tmp.i9_1 = Unit_instance;
229
+ tmp.j9_1 = null;
230
+ return tmp.o9();
179
231
  };
180
232
  var LibsodiumInitializer_instance;
181
233
  function LibsodiumInitializer_getInstance() {
@@ -189,24 +241,24 @@
189
241
  }
190
242
  function Signature() {
191
243
  }
192
- protoOf(Signature).yn = function () {
244
+ protoOf(Signature).ho = function () {
193
245
  var keypair = getSodium().crypto_sign_keypair();
194
246
  var tmp = keypair.publicKey;
195
247
  var tmp_0 = toUByteArray(tmp instanceof Uint8Array ? tmp : THROW_CCE());
196
248
  var tmp_1 = keypair.privateKey;
197
249
  return new SignatureKeyPair(tmp_0, toUByteArray(tmp_1 instanceof Uint8Array ? tmp_1 : THROW_CCE()));
198
250
  };
199
- protoOf(Signature).zn = function (seed) {
251
+ protoOf(Signature).io = function (seed) {
200
252
  var keypair = getSodium().crypto_sign_seed_keypair(toUInt8Array(seed));
201
253
  var tmp = keypair.publicKey;
202
254
  var tmp_0 = toUByteArray(tmp instanceof Uint8Array ? tmp : THROW_CCE());
203
255
  var tmp_1 = keypair.privateKey;
204
256
  return new SignatureKeyPair(tmp_0, toUByteArray(tmp_1 instanceof Uint8Array ? tmp_1 : THROW_CCE()));
205
257
  };
206
- protoOf(Signature).ao = function (message, secretKey) {
258
+ protoOf(Signature).jo = function (message, secretKey) {
207
259
  return toUByteArray(getSodium().crypto_sign_detached(toUInt8Array(message), toUInt8Array(secretKey)));
208
260
  };
209
- protoOf(Signature).bo = function (signature, message, publicKey) {
261
+ protoOf(Signature).ko = function (signature, message, publicKey) {
210
262
  var verificationResult = getSodium().crypto_sign_verify_detached(toUInt8Array(signature), toUInt8Array(message), toUInt8Array(publicKey));
211
263
  if (verificationResult === false) {
212
264
  throw new InvalidSignatureException();
@@ -20,46 +20,46 @@
20
20
  tmp = delegate;
21
21
  }
22
22
  delegate = tmp;
23
- this.y6f_1 = delegate;
23
+ this.h6g_1 = delegate;
24
24
  }
25
25
  protoOf(StorageSettings).e2 = function () {
26
- return this.y6f_1.clear();
26
+ return this.h6g_1.clear();
27
27
  };
28
- protoOf(StorageSettings).h2o = function (key) {
29
- return this.y6f_1.removeItem(key);
28
+ protoOf(StorageSettings).q2o = function (key) {
29
+ return this.h6g_1.removeItem(key);
30
30
  };
31
- protoOf(StorageSettings).z6f = function (key) {
31
+ protoOf(StorageSettings).i6g = function (key) {
32
32
  // Inline function 'com.russhwolf.settings.get' call
33
- return !(this.y6f_1.getItem(key) == null);
33
+ return !(this.h6g_1.getItem(key) == null);
34
34
  };
35
- protoOf(StorageSettings).a6g = function (key, value) {
36
- var tmp0 = this.y6f_1;
35
+ protoOf(StorageSettings).j6g = function (key, value) {
36
+ var tmp0 = this.h6g_1;
37
37
  // Inline function 'com.russhwolf.settings.set' call
38
38
  var value_0 = value.toString();
39
39
  tmp0.setItem(key, value_0);
40
40
  };
41
- protoOf(StorageSettings).b6g = function (key) {
41
+ protoOf(StorageSettings).k6g = function (key) {
42
42
  // Inline function 'com.russhwolf.settings.get' call
43
- var tmp0_safe_receiver = this.y6f_1.getItem(key);
43
+ var tmp0_safe_receiver = this.h6g_1.getItem(key);
44
44
  return tmp0_safe_receiver == null ? null : toIntOrNull(tmp0_safe_receiver);
45
45
  };
46
- protoOf(StorageSettings).c6g = function (key, value) {
46
+ protoOf(StorageSettings).l6g = function (key, value) {
47
47
  // Inline function 'com.russhwolf.settings.set' call
48
- this.y6f_1.setItem(key, value);
48
+ this.h6g_1.setItem(key, value);
49
49
  };
50
- protoOf(StorageSettings).d6g = function (key) {
50
+ protoOf(StorageSettings).m6g = function (key) {
51
51
  // Inline function 'com.russhwolf.settings.get' call
52
- return this.y6f_1.getItem(key);
52
+ return this.h6g_1.getItem(key);
53
53
  };
54
- protoOf(StorageSettings).e6g = function (key, value) {
55
- var tmp0 = this.y6f_1;
54
+ protoOf(StorageSettings).n6g = function (key, value) {
55
+ var tmp0 = this.h6g_1;
56
56
  // Inline function 'com.russhwolf.settings.set' call
57
57
  var value_0 = value.toString();
58
58
  tmp0.setItem(key, value_0);
59
59
  };
60
- protoOf(StorageSettings).f6g = function (key) {
60
+ protoOf(StorageSettings).o6g = function (key) {
61
61
  // Inline function 'com.russhwolf.settings.get' call
62
- var tmp0_safe_receiver = this.y6f_1.getItem(key);
62
+ var tmp0_safe_receiver = this.h6g_1.getItem(key);
63
63
  return tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
64
64
  };
65
65
  //region block: exports
@@ -46,18 +46,6 @@ export declare namespace com.doordeck.multiplatform.sdk {
46
46
  };
47
47
  }
48
48
  }
49
- export declare namespace com.doordeck.multiplatform.sdk {
50
- abstract class KDoordeckFactory extends KtSingleton<KDoordeckFactory.$metadata$.constructor>() {
51
- private constructor();
52
- }
53
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
54
- namespace KDoordeckFactory.$metadata$ {
55
- abstract class constructor {
56
- initialize(sdkConfig: com.doordeck.multiplatform.sdk.config.SdkConfig): com.doordeck.multiplatform.sdk.Doordeck;
57
- private constructor();
58
- }
59
- }
60
- }
61
49
  export declare namespace com.doordeck.multiplatform.sdk.config {
62
50
  class SdkConfig {
63
51
  constructor(apiEnvironment: Nullable<com.doordeck.multiplatform.sdk.model.data.ApiEnvironment> | undefined, cloudAuthToken: Nullable<string> | undefined, cloudRefreshToken: Nullable<string> | undefined, fusionHost: Nullable<string>, secureStorage: com.doordeck.multiplatform.sdk.storage.SecureStorage, debugLogging?: Nullable<boolean>);
@@ -2966,6 +2954,18 @@ export declare namespace com.doordeck.multiplatform.sdk.util {
2966
2954
  }
2967
2955
  }
2968
2956
  }
2957
+ export declare namespace com.doordeck.multiplatform.sdk {
2958
+ abstract class KDoordeckFactory extends KtSingleton<KDoordeckFactory.$metadata$.constructor>() {
2959
+ private constructor();
2960
+ }
2961
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2962
+ namespace KDoordeckFactory.$metadata$ {
2963
+ abstract class constructor {
2964
+ initialize(sdkConfig: com.doordeck.multiplatform.sdk.config.SdkConfig): Promise<com.doordeck.multiplatform.sdk.Doordeck>;
2965
+ private constructor();
2966
+ }
2967
+ }
2968
+ }
2969
2969
  export declare namespace com.doordeck.multiplatform.sdk.api {
2970
2970
  abstract class AccountApi extends KtSingleton<AccountApi.$metadata$.constructor>() {
2971
2971
  private constructor();