@doordeck/doordeck-headless-sdk 0.132.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.
Files changed (28) hide show
  1. package/kotlin/Kermit-kermit-core.js +44 -44
  2. package/kotlin/Kermit-kermit.js +4 -4
  3. package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1411 -1411
  4. package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +74 -22
  5. package/kotlin/MultiplatformSettings-multiplatform-settings.js +18 -18
  6. package/kotlin/doordeck-sdk.d.ts +13 -91
  7. package/kotlin/doordeck-sdk.js +9739 -10202
  8. package/kotlin/kotlin-kotlin-stdlib.js +6 -6
  9. package/kotlin/kotlinx-atomicfu.js +13 -13
  10. package/kotlin/kotlinx-coroutines-core.js +1906 -1906
  11. package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +32 -32
  12. package/kotlin/kotlinx-io-kotlinx-io-core.js +443 -443
  13. package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1710 -1710
  14. package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1347 -1347
  15. package/kotlin/ktor-ktor-client-auth.js +241 -241
  16. package/kotlin/ktor-ktor-client-content-negotiation.js +135 -135
  17. package/kotlin/ktor-ktor-client-core.js +1882 -1882
  18. package/kotlin/ktor-ktor-client-logging.js +668 -668
  19. package/kotlin/ktor-ktor-events.js +6 -6
  20. package/kotlin/ktor-ktor-http-cio.js +330 -330
  21. package/kotlin/ktor-ktor-http.js +682 -682
  22. package/kotlin/ktor-ktor-io.js +628 -628
  23. package/kotlin/ktor-ktor-serialization-kotlinx-json.js +7 -7
  24. package/kotlin/ktor-ktor-serialization-kotlinx.js +140 -140
  25. package/kotlin/ktor-ktor-serialization.js +62 -62
  26. package/kotlin/ktor-ktor-utils.js +660 -660
  27. package/kotlin/ktor-ktor-websockets.js +37 -37
  28. package/package.json +1 -1
@@ -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>);
@@ -2867,84 +2855,6 @@ export declare namespace com.doordeck.multiplatform.sdk.model.responses {
2867
2855
  }
2868
2856
  }
2869
2857
  }
2870
- class SiteLocksResponse {
2871
- constructor(id: string, name: string, colour: Nullable<string> | undefined, role: com.doordeck.multiplatform.sdk.model.common.UserRole, settings: com.doordeck.multiplatform.sdk.model.responses.SiteLockSettingsResponse, state?: Nullable<com.doordeck.multiplatform.sdk.model.responses.SiteStateResponse>);
2872
- get id(): string;
2873
- get name(): string;
2874
- get colour(): Nullable<string>;
2875
- get role(): com.doordeck.multiplatform.sdk.model.common.UserRole;
2876
- get settings(): com.doordeck.multiplatform.sdk.model.responses.SiteLockSettingsResponse;
2877
- get state(): Nullable<com.doordeck.multiplatform.sdk.model.responses.SiteStateResponse>;
2878
- copy(id?: string, name?: string, colour?: Nullable<string>, role?: com.doordeck.multiplatform.sdk.model.common.UserRole, settings?: com.doordeck.multiplatform.sdk.model.responses.SiteLockSettingsResponse, state?: Nullable<com.doordeck.multiplatform.sdk.model.responses.SiteStateResponse>): com.doordeck.multiplatform.sdk.model.responses.SiteLocksResponse;
2879
- toString(): string;
2880
- hashCode(): number;
2881
- equals(other: Nullable<any>): boolean;
2882
- }
2883
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2884
- namespace SiteLocksResponse.$metadata$ {
2885
- const constructor: abstract new () => SiteLocksResponse;
2886
- }
2887
- namespace SiteLocksResponse {
2888
- abstract class Companion extends KtSingleton<Companion.$metadata$.constructor>() {
2889
- private constructor();
2890
- }
2891
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2892
- namespace Companion.$metadata$ {
2893
- abstract class constructor {
2894
- private constructor();
2895
- }
2896
- }
2897
- }
2898
- class SiteLockSettingsResponse {
2899
- constructor(unlockTime: number, permittedAddresses: kotlin.collections.KtList<string>, defaultName: string, tiles: kotlin.collections.KtList<string>, favourite?: Nullable<boolean>);
2900
- get unlockTime(): number;
2901
- get permittedAddresses(): kotlin.collections.KtList<string>;
2902
- get defaultName(): string;
2903
- get tiles(): kotlin.collections.KtList<string>;
2904
- get favourite(): Nullable<boolean>;
2905
- copy(unlockTime?: number, permittedAddresses?: kotlin.collections.KtList<string>, defaultName?: string, tiles?: kotlin.collections.KtList<string>, favourite?: Nullable<boolean>): com.doordeck.multiplatform.sdk.model.responses.SiteLockSettingsResponse;
2906
- toString(): string;
2907
- hashCode(): number;
2908
- equals(other: Nullable<any>): boolean;
2909
- }
2910
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2911
- namespace SiteLockSettingsResponse.$metadata$ {
2912
- const constructor: abstract new () => SiteLockSettingsResponse;
2913
- }
2914
- namespace SiteLockSettingsResponse {
2915
- abstract class Companion extends KtSingleton<Companion.$metadata$.constructor>() {
2916
- private constructor();
2917
- }
2918
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2919
- namespace Companion.$metadata$ {
2920
- abstract class constructor {
2921
- private constructor();
2922
- }
2923
- }
2924
- }
2925
- class SiteStateResponse {
2926
- constructor(connected: boolean);
2927
- get connected(): boolean;
2928
- copy(connected?: boolean): com.doordeck.multiplatform.sdk.model.responses.SiteStateResponse;
2929
- toString(): string;
2930
- hashCode(): number;
2931
- equals(other: Nullable<any>): boolean;
2932
- }
2933
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2934
- namespace SiteStateResponse.$metadata$ {
2935
- const constructor: abstract new () => SiteStateResponse;
2936
- }
2937
- namespace SiteStateResponse {
2938
- abstract class Companion extends KtSingleton<Companion.$metadata$.constructor>() {
2939
- private constructor();
2940
- }
2941
- /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
2942
- namespace Companion.$metadata$ {
2943
- abstract class constructor {
2944
- private constructor();
2945
- }
2946
- }
2947
- }
2948
2858
  class UserForSiteResponse {
2949
2859
  constructor(userId: string, email: string, displayName: Nullable<string> | undefined, orphan: boolean);
2950
2860
  get userId(): string;
@@ -3044,6 +2954,18 @@ export declare namespace com.doordeck.multiplatform.sdk.util {
3044
2954
  }
3045
2955
  }
3046
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
+ }
3047
2969
  export declare namespace com.doordeck.multiplatform.sdk.api {
3048
2970
  abstract class AccountApi extends KtSingleton<AccountApi.$metadata$.constructor>() {
3049
2971
  private constructor();
@@ -3203,7 +3125,7 @@ export declare namespace com.doordeck.multiplatform.sdk.api {
3203
3125
  namespace SitesApi.$metadata$ {
3204
3126
  abstract class constructor {
3205
3127
  listSites(): Promise<kotlin.collections.KtList<com.doordeck.multiplatform.sdk.model.responses.SiteResponse>>;
3206
- getLocksForSite(siteId: string): Promise<kotlin.collections.KtList<com.doordeck.multiplatform.sdk.model.responses.SiteLocksResponse>>;
3128
+ getLocksForSite(siteId: string): Promise<kotlin.collections.KtList<com.doordeck.multiplatform.sdk.model.responses.LockResponse>>;
3207
3129
  getUsersForSite(siteId: string): Promise<kotlin.collections.KtList<com.doordeck.multiplatform.sdk.model.responses.UserForSiteResponse>>;
3208
3130
  private constructor();
3209
3131
  }