@moonbase.sh/storefront-api 0.4.53 → 0.4.55

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
@@ -1130,6 +1130,14 @@ var OrderEndpoints = class {
1130
1130
  const response = await this.api.fetch(`/api/customer/orders/${orderId}/coupon?code=${encodeURIComponent(code)}`, openOrderSchema, { method: "PATCH" });
1131
1131
  return response.data;
1132
1132
  }
1133
+ async removeCouponCode(orderId, code) {
1134
+ const response = await this.api.fetch(`/api/customer/orders/${orderId}/coupon?code=${encodeURIComponent(code)}`, openOrderSchema, { method: "DELETE" });
1135
+ return response.data;
1136
+ }
1137
+ async clearCouponCodes(orderId) {
1138
+ const response = await this.api.fetch(`/api/customer/orders/${orderId}/coupons`, openOrderSchema, { method: "DELETE" });
1139
+ return response.data;
1140
+ }
1133
1141
  };
1134
1142
 
1135
1143
  // src/storefront/endpoints.ts
package/dist/index.d.cts CHANGED
@@ -19401,6 +19401,8 @@ declare class OrderEndpoints {
19401
19401
  }): Promise<OpenOrder>;
19402
19402
  removeBillingDetails(orderId: string): Promise<OpenOrder>;
19403
19403
  addCouponCode(orderId: string, code: string): Promise<OpenOrder>;
19404
+ removeCouponCode(orderId: string, code: string): Promise<OpenOrder>;
19405
+ clearCouponCodes(orderId: string): Promise<OpenOrder>;
19404
19406
  }
19405
19407
 
19406
19408
  declare class StorefrontEndpoints {
package/dist/index.d.ts CHANGED
@@ -19401,6 +19401,8 @@ declare class OrderEndpoints {
19401
19401
  }): Promise<OpenOrder>;
19402
19402
  removeBillingDetails(orderId: string): Promise<OpenOrder>;
19403
19403
  addCouponCode(orderId: string, code: string): Promise<OpenOrder>;
19404
+ removeCouponCode(orderId: string, code: string): Promise<OpenOrder>;
19405
+ clearCouponCodes(orderId: string): Promise<OpenOrder>;
19404
19406
  }
19405
19407
 
19406
19408
  declare class StorefrontEndpoints {
package/dist/index.js CHANGED
@@ -1074,6 +1074,14 @@ var OrderEndpoints = class {
1074
1074
  const response = await this.api.fetch(`/api/customer/orders/${orderId}/coupon?code=${encodeURIComponent(code)}`, openOrderSchema, { method: "PATCH" });
1075
1075
  return response.data;
1076
1076
  }
1077
+ async removeCouponCode(orderId, code) {
1078
+ const response = await this.api.fetch(`/api/customer/orders/${orderId}/coupon?code=${encodeURIComponent(code)}`, openOrderSchema, { method: "DELETE" });
1079
+ return response.data;
1080
+ }
1081
+ async clearCouponCodes(orderId) {
1082
+ const response = await this.api.fetch(`/api/customer/orders/${orderId}/coupons`, openOrderSchema, { method: "DELETE" });
1083
+ return response.data;
1084
+ }
1077
1085
  };
1078
1086
 
1079
1087
  // src/storefront/endpoints.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/storefront-api",
3
3
  "type": "module",
4
- "version": "0.4.53",
4
+ "version": "0.4.55",
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",