@betterstore/sdk 0.3.58 → 0.3.60

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.60
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fix
8
+
9
+ ## 0.3.59
10
+
11
+ ### Patch Changes
12
+
13
+ - bug fix
14
+
3
15
  ## 0.3.58
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -204,6 +204,7 @@ interface CheckoutSession {
204
204
  shipping: number | null;
205
205
  discountAmount: number | null;
206
206
  appliedDiscounts: {
207
+ id: string;
207
208
  amount: number;
208
209
  allowedProductIDs: string[];
209
210
  discount: Discount;
@@ -237,9 +238,9 @@ declare class Checkout {
237
238
  */
238
239
  applyDiscountCode(checkoutId: string, discountCode: string): Promise<CheckoutSession>;
239
240
  /**
240
- * Remove a discount code from a checkout session
241
+ * Remove a discount from a checkout session
241
242
  */
242
- removeDiscountCode(checkoutId: string, discountId: string): Promise<CheckoutSession>;
243
+ removeDiscount(checkoutId: string, discountId: string): Promise<CheckoutSession>;
243
244
  /**
244
245
  * Revalidate a checkout session
245
246
  */
@@ -276,7 +277,7 @@ declare class Client {
276
277
  /**
277
278
  * Remove a discount code from a checkout session
278
279
  */
279
- removeDiscountCode(clientSecret: string, checkoutId: string, discountId: string): Promise<CheckoutSession>;
280
+ removeDiscount(clientSecret: string, checkoutId: string, discountId: string): Promise<CheckoutSession>;
280
281
  /**
281
282
  * Revalidate a checkout session
282
283
  */
package/dist/index.d.ts CHANGED
@@ -204,6 +204,7 @@ interface CheckoutSession {
204
204
  shipping: number | null;
205
205
  discountAmount: number | null;
206
206
  appliedDiscounts: {
207
+ id: string;
207
208
  amount: number;
208
209
  allowedProductIDs: string[];
209
210
  discount: Discount;
@@ -237,9 +238,9 @@ declare class Checkout {
237
238
  */
238
239
  applyDiscountCode(checkoutId: string, discountCode: string): Promise<CheckoutSession>;
239
240
  /**
240
- * Remove a discount code from a checkout session
241
+ * Remove a discount from a checkout session
241
242
  */
242
- removeDiscountCode(checkoutId: string, discountId: string): Promise<CheckoutSession>;
243
+ removeDiscount(checkoutId: string, discountId: string): Promise<CheckoutSession>;
243
244
  /**
244
245
  * Revalidate a checkout session
245
246
  */
@@ -276,7 +277,7 @@ declare class Client {
276
277
  /**
277
278
  * Remove a discount code from a checkout session
278
279
  */
279
- removeDiscountCode(clientSecret: string, checkoutId: string, discountId: string): Promise<CheckoutSession>;
280
+ removeDiscount(clientSecret: string, checkoutId: string, discountId: string): Promise<CheckoutSession>;
280
281
  /**
281
282
  * Revalidate a checkout session
282
283
  */
package/dist/index.js CHANGED
@@ -176,9 +176,9 @@ var Checkout = class {
176
176
  });
177
177
  }
178
178
  /**
179
- * Remove a discount code from a checkout session
179
+ * Remove a discount from a checkout session
180
180
  */
181
- removeDiscountCode(checkoutId, discountId) {
181
+ removeDiscount(checkoutId, discountId) {
182
182
  return __async(this, null, function* () {
183
183
  const data = yield this.apiClient.delete(
184
184
  `/checkout/${checkoutId}/discounts/${discountId}`
@@ -271,7 +271,7 @@ var Client = class {
271
271
  /**
272
272
  * Remove a discount code from a checkout session
273
273
  */
274
- removeDiscountCode(clientSecret, checkoutId, discountId) {
274
+ removeDiscount(clientSecret, checkoutId, discountId) {
275
275
  return __async(this, null, function* () {
276
276
  const apiClient = createApiClient(clientSecret, this.proxy);
277
277
  const data = yield apiClient.delete(
package/dist/index.mjs CHANGED
@@ -140,9 +140,9 @@ var Checkout = class {
140
140
  });
141
141
  }
142
142
  /**
143
- * Remove a discount code from a checkout session
143
+ * Remove a discount from a checkout session
144
144
  */
145
- removeDiscountCode(checkoutId, discountId) {
145
+ removeDiscount(checkoutId, discountId) {
146
146
  return __async(this, null, function* () {
147
147
  const data = yield this.apiClient.delete(
148
148
  `/checkout/${checkoutId}/discounts/${discountId}`
@@ -235,7 +235,7 @@ var Client = class {
235
235
  /**
236
236
  * Remove a discount code from a checkout session
237
237
  */
238
- removeDiscountCode(clientSecret, checkoutId, discountId) {
238
+ removeDiscount(clientSecret, checkoutId, discountId) {
239
239
  return __async(this, null, function* () {
240
240
  const apiClient = createApiClient(clientSecret, this.proxy);
241
241
  const data = yield apiClient.delete(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.58",
3
+ "version": "0.3.60",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {