@doordeck/doordeck-headless-sdk 0.112.0 → 0.114.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.
@@ -309,7 +309,7 @@
309
309
  function addFormatStructureForTime(structure) {
310
310
  this.k64(structure);
311
311
  }
312
- initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithTime, WithDate]);
312
+ initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithDate, WithTime]);
313
313
  function offsetHours$default(padding, $super) {
314
314
  padding = padding === VOID ? Padding_ZERO_getInstance() : padding;
315
315
  var tmp;
@@ -362,7 +362,7 @@
362
362
  return tmp;
363
363
  }
364
364
  initMetadataForInterface(AbstractWithOffsetBuilder, 'AbstractWithOffsetBuilder', VOID, VOID, [WithUtcOffset]);
365
- initMetadataForClass(Builder, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder, AbstractWithOffsetBuilder, WithTime, WithUtcOffset, WithDate]);
365
+ initMetadataForClass(Builder, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder, AbstractWithOffsetBuilder, WithDate, WithUtcOffset, WithTime]);
366
366
  initMetadataForClass(AbstractDateTimeFormat, 'AbstractDateTimeFormat');
367
367
  initMetadataForClass(DateTimeComponentsFormat, 'DateTimeComponentsFormat', VOID, AbstractDateTimeFormat);
368
368
  initMetadataForClass(TwoDigitNumber, 'TwoDigitNumber');
@@ -69,7 +69,7 @@ export declare namespace com.doordeck.multiplatform.sdk.context {
69
69
  getApiEnvironment(): com.doordeck.multiplatform.sdk.model.data.ApiEnvironment;
70
70
  setCloudAuthToken(token: string): void;
71
71
  getCloudAuthToken(): Nullable<string>;
72
- isCloudAuthTokenAboutToExpire(): boolean;
72
+ isCloudAuthTokenInvalidOrExpired(): boolean;
73
73
  setCloudRefreshToken(token: string): void;
74
74
  getCloudRefreshToken(): Nullable<string>;
75
75
  setFusionHost(host: string): void;
@@ -82,7 +82,7 @@ export declare namespace com.doordeck.multiplatform.sdk.context {
82
82
  getUserEmail(): Nullable<string>;
83
83
  setCertificateChain(certificateChain: kotlin.collections.KtList<string>): void;
84
84
  getCertificateChain(): Nullable<kotlin.collections.KtList<string>>;
85
- isCertificateChainAboutToExpire(): boolean;
85
+ isCertificateChainInvalidOrExpired(): boolean;
86
86
  setKeyPair(publicKey: Int8Array, privateKey: Int8Array): void;
87
87
  getKeyPair(): Nullable<com.doordeck.multiplatform.sdk.model.data.Crypto.KeyPair>;
88
88
  setKeyPairVerified(verified: boolean): void;
@@ -1908,7 +1908,7 @@ export declare namespace com.doordeck.multiplatform.sdk.crypto {
1908
1908
  const CryptoManager: {
1909
1909
  generateKeyPair(): com.doordeck.multiplatform.sdk.model.data.Crypto.KeyPair;
1910
1910
  generateEncodedKeyPair(): string;
1911
- isCertificateAboutToExpire(base64Certificate: string): boolean;
1911
+ isCertificateInvalidOrExpired(base64Certificate: string): boolean;
1912
1912
  };
1913
1913
  function crypto(): typeof com.doordeck.multiplatform.sdk.crypto.CryptoManager;
1914
1914
  }
@@ -3712,7 +3712,7 @@
3712
3712
  this.h9_1 = 4;
3713
3713
  this.g76_1 = ContextManagerImpl_getInstance().getKeyPair();
3714
3714
  this.h76_1 = ContextManagerImpl_getInstance().isKeyPairVerified();
3715
- this.i76_1 = this.g76_1 == null || ContextManagerImpl_getInstance().isCertificateChainAboutToExpire() || !this.h76_1;
3715
+ this.i76_1 = this.g76_1 == null || ContextManagerImpl_getInstance().isCertificateChainInvalidOrExpired() || !this.h76_1;
3716
3716
  var tmp_0 = this;
3717
3717
  var tmp0_elvis_lhs = this.g76_1;
3718
3718
  tmp_0.j76_1 = tmp0_elvis_lhs == null ? CryptoManager_getInstance().generateKeyPair() : tmp0_elvis_lhs;
@@ -7865,7 +7865,7 @@
7865
7865
  protoOf(ContextManagerImpl).getCloudAuthToken = function () {
7866
7866
  return this.k6h_1.getCloudAuthToken();
7867
7867
  };
7868
- protoOf(ContextManagerImpl).isCloudAuthTokenAboutToExpire = function () {
7868
+ protoOf(ContextManagerImpl).isCloudAuthTokenInvalidOrExpired = function () {
7869
7869
  var tmp0_safe_receiver = this.getCloudAuthToken();
7870
7870
  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : JwtUtils_instance.d88(tmp0_safe_receiver);
7871
7871
  return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
@@ -7907,7 +7907,7 @@
7907
7907
  protoOf(ContextManagerImpl).getCertificateChain = function () {
7908
7908
  return this.k6h_1.getCertificateChain();
7909
7909
  };
7910
- protoOf(ContextManagerImpl).isCertificateChainAboutToExpire = function () {
7910
+ protoOf(ContextManagerImpl).isCertificateChainInvalidOrExpired = function () {
7911
7911
  var tmp0_safe_receiver = this.getCertificateChain();
7912
7912
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : firstOrNull(tmp0_safe_receiver);
7913
7913
  var tmp;
@@ -7915,7 +7915,7 @@
7915
7915
  tmp = null;
7916
7916
  } else {
7917
7917
  // Inline function 'kotlin.let' call
7918
- tmp = CryptoManager_getInstance().isCertificateAboutToExpire(tmp1_safe_receiver);
7918
+ tmp = CryptoManager_getInstance().isCertificateInvalidOrExpired(tmp1_safe_receiver);
7919
7919
  }
7920
7920
  var tmp2_elvis_lhs = tmp;
7921
7921
  return tmp2_elvis_lhs == null ? true : tmp2_elvis_lhs;
@@ -32744,6 +32744,11 @@
32744
32744
  DEFAULT_REQUEST_CONTENT_TYPE = Application_getInstance().z2s_1.toString();
32745
32745
  }
32746
32746
  }
32747
+ function get_MIN_TOKEN_LIFETIME_DAYS() {
32748
+ _init_properties_JwtUtils_kt__hoggc6();
32749
+ return MIN_TOKEN_LIFETIME_DAYS;
32750
+ }
32751
+ var MIN_TOKEN_LIFETIME_DAYS;
32747
32752
  function getClaims($this, token) {
32748
32753
  var tmp;
32749
32754
  try {
@@ -32814,16 +32819,21 @@
32814
32819
  var tmp$ret$5 = 'JWT expiration date is ' + toString(expiration);
32815
32820
  tmp5.e6g(severity_0, tag_0, null, tmp$ret$5);
32816
32821
  }
32817
- var tmp_0 = System_instance.l5z();
32818
- // Inline function 'kotlin.time.Companion.days' call
32819
- Companion_getInstance_1();
32820
- var tmp$ret$8 = toDuration(1, DurationUnit_DAYS_getInstance());
32821
- return tmp_0.q6f(expiration.p6f(tmp$ret$8)) >= 0;
32822
+ return System_instance.l5z().q6f(expiration.p6f(get_MIN_TOKEN_LIFETIME_DAYS())) >= 0;
32822
32823
  };
32823
32824
  var JwtUtils_instance;
32824
32825
  function JwtUtils_getInstance() {
32825
32826
  return JwtUtils_instance;
32826
32827
  }
32828
+ var properties_initialized_JwtUtils_kt_oi6ppo;
32829
+ function _init_properties_JwtUtils_kt__hoggc6() {
32830
+ if (!properties_initialized_JwtUtils_kt_oi6ppo) {
32831
+ properties_initialized_JwtUtils_kt_oi6ppo = true;
32832
+ // Inline function 'kotlin.time.Companion.days' call
32833
+ Companion_getInstance_1();
32834
+ MIN_TOKEN_LIFETIME_DAYS = toDuration(1, DurationUnit_DAYS_getInstance());
32835
+ }
32836
+ }
32827
32837
  function Utils() {
32828
32838
  }
32829
32839
  protoOf(Utils).decodeBase64ToByteArray = function (_this__u8e3s4) {
@@ -38368,7 +38378,7 @@
38368
38378
  protoOf(CryptoManager).generateEncodedKeyPair = function () {
38369
38379
  throw new NotImplementedError('Use generateKeyPair() instead');
38370
38380
  };
38371
- protoOf(CryptoManager).isCertificateAboutToExpire = function (base64Certificate) {
38381
+ protoOf(CryptoManager).isCertificateInvalidOrExpired = function (base64Certificate) {
38372
38382
  var tmp;
38373
38383
  try {
38374
38384
  var asn1 = ASN1.fromBER(toJsArray(decodeBase64Bytes(base64Certificate)).buffer);
@@ -206,11 +206,6 @@
206
206
  initMetadataForClass(SendBroadcast, 'SendBroadcast', VOID, VOID, [Waiter]);
207
207
  initMetadataForClass(BufferedChannelIterator, 'BufferedChannelIterator', VOID, VOID, [Waiter], [0, 3]);
208
208
  initMetadataForCoroutine($sendCOROUTINE$3, CoroutineImpl);
209
- function close$default(cause, $super) {
210
- cause = cause === VOID ? null : cause;
211
- return $super === VOID ? this.v16(cause) : $super.v16.call(this, cause);
212
- }
213
- initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
214
209
  function cancel$default_0(cause, $super) {
215
210
  cause = cause === VOID ? null : cause;
216
211
  var tmp;
@@ -223,7 +218,12 @@
223
218
  return tmp;
224
219
  }
225
220
  initMetadataForInterface(ReceiveChannel, 'ReceiveChannel', VOID, VOID, VOID, [0]);
226
- initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [SendChannel, ReceiveChannel], [1, 4, 0, 3]);
221
+ function close$default(cause, $super) {
222
+ cause = cause === VOID ? null : cause;
223
+ return $super === VOID ? this.v16(cause) : $super.v16.call(this, cause);
224
+ }
225
+ initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
226
+ initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [ReceiveChannel, SendChannel], [1, 4, 0, 3]);
227
227
  initMetadataForClass(WaiterEB, 'WaiterEB');
228
228
  initMetadataForClass(ReceiveCatching, 'ReceiveCatching', VOID, VOID, [Waiter]);
229
229
  initMetadataForObject(Factory, 'Factory');
@@ -233,7 +233,7 @@
233
233
  initMetadataForClass(ChannelResult, 'ChannelResult');
234
234
  initMetadataForClass(ClosedSendChannelException, 'ClosedSendChannelException', VOID, IllegalStateException);
235
235
  initMetadataForClass(ClosedReceiveChannelException, 'ClosedReceiveChannelException', VOID, NoSuchElementException);
236
- initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, SendChannel, ReceiveChannel], [1, 0]);
236
+ initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, ReceiveChannel, SendChannel], [1, 0]);
237
237
  initMetadataForClass(ConflatedBufferedChannel, 'ConflatedBufferedChannel', VOID, BufferedChannel, VOID, [1, 0]);
238
238
  initMetadataForInterface(ProducerScope, 'ProducerScope', VOID, VOID, [CoroutineScope, SendChannel], [1]);
239
239
  initMetadataForClass(ProducerCoroutine, 'ProducerCoroutine', VOID, ChannelCoroutine, [ChannelCoroutine, ProducerScope], [1, 0]);
@@ -259,7 +259,7 @@
259
259
  initMetadataForCoroutine($doSelectSuspendCOROUTINE$23, CoroutineImpl);
260
260
  initMetadataForCoroutine($completeCOROUTINE$24, CoroutineImpl);
261
261
  initMetadataForCoroutine($processResultAndInvokeBlockRecoveringExceptionCOROUTINE$25, CoroutineImpl);
262
- initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler, Waiter, SelectInstance], [0, 2]);
262
+ initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler, SelectInstance, Waiter], [0, 2]);
263
263
  initMetadataForClass(TrySelectDetailedResult, 'TrySelectDetailedResult', VOID, Enum);
264
264
  initMetadataForClass(CancellableContinuationWithOwner, 'CancellableContinuationWithOwner', VOID, VOID, [CancellableContinuation, Waiter]);
265
265
  initMetadataForClass(SemaphoreAndMutexImpl, 'SemaphoreAndMutexImpl', VOID, VOID, VOID, [0]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doordeck/doordeck-headless-sdk",
3
- "version": "0.112.0",
3
+ "version": "0.114.0",
4
4
  "main": "kotlin/doordeck-sdk.js",
5
5
  "devDependencies": {
6
6
  "typescript": "5.5.4",