@moonbase.sh/storefront-api 0.2.43 → 0.2.45

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.
package/dist/index.cjs CHANGED
@@ -586,6 +586,10 @@ var OrderEndpoints = class {
586
586
  );
587
587
  return response.data;
588
588
  }
589
+ async removeBillingDetails(orderId) {
590
+ const response = await this.api.fetch(`/api/customer/orders/${orderId}/billing-details`, openOrderSchema, { method: "DELETE" });
591
+ return response.data;
592
+ }
589
593
  };
590
594
 
591
595
  // src/globalModels.ts
@@ -762,9 +766,6 @@ var _TokenStore = class _TokenStore {
762
766
  window.clearTimeout(this.refreshTimeoutId);
763
767
  if (this.tokens) {
764
768
  this.tokens.expiresAt = new Date(this.tokens.expiresAt);
765
- this.refreshTimeoutId = window.setTimeout(() => {
766
- this.refreshPromise = this.refreshTokens();
767
- }, 10 * 60 * 1e3 + (Math.random() + 1) * 60 * 1e3);
768
769
  }
769
770
  break;
770
771
  }
package/dist/index.d.cts CHANGED
@@ -5824,6 +5824,7 @@ declare class OrderEndpoints {
5824
5824
  pushContent(order: Order, checkout?: {
5825
5825
  returnUrl: string;
5826
5826
  }, utm?: UrchinTrackingModule): Promise<OpenOrder>;
5827
+ removeBillingDetails(orderId: string): Promise<OpenOrder>;
5827
5828
  }
5828
5829
 
5829
5830
  declare const discountSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -5824,6 +5824,7 @@ declare class OrderEndpoints {
5824
5824
  pushContent(order: Order, checkout?: {
5825
5825
  returnUrl: string;
5826
5826
  }, utm?: UrchinTrackingModule): Promise<OpenOrder>;
5827
+ removeBillingDetails(orderId: string): Promise<OpenOrder>;
5827
5828
  }
5828
5829
 
5829
5830
  declare const discountSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
package/dist/index.js CHANGED
@@ -544,6 +544,10 @@ var OrderEndpoints = class {
544
544
  );
545
545
  return response.data;
546
546
  }
547
+ async removeBillingDetails(orderId) {
548
+ const response = await this.api.fetch(`/api/customer/orders/${orderId}/billing-details`, openOrderSchema, { method: "DELETE" });
549
+ return response.data;
550
+ }
547
551
  };
548
552
 
549
553
  // src/globalModels.ts
@@ -720,9 +724,6 @@ var _TokenStore = class _TokenStore {
720
724
  window.clearTimeout(this.refreshTimeoutId);
721
725
  if (this.tokens) {
722
726
  this.tokens.expiresAt = new Date(this.tokens.expiresAt);
723
- this.refreshTimeoutId = window.setTimeout(() => {
724
- this.refreshPromise = this.refreshTokens();
725
- }, 10 * 60 * 1e3 + (Math.random() + 1) * 60 * 1e3);
726
727
  }
727
728
  break;
728
729
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/storefront-api",
3
3
  "type": "module",
4
- "version": "0.2.43",
4
+ "version": "0.2.45",
5
5
  "description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",