@betterstore/sdk 0.3.67 → 0.3.68

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,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.68
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fix
8
+
3
9
  ## 0.3.67
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -33,6 +33,10 @@ interface Customer$1 extends CustomerCreateParams {
33
33
  createdAt: string;
34
34
  updatedAt: string;
35
35
  }
36
+ interface CustomerSubscription {
37
+ cancelAtPeriodEnd: boolean;
38
+ }
39
+ type CustomerSubscriptionUpdateParams = Partial<Pick<CustomerSubscription, "cancelAtPeriodEnd">>;
36
40
 
37
41
  interface VariantOption {
38
42
  name: string;
@@ -337,6 +341,10 @@ declare class Customer {
337
341
  * Delete a customer
338
342
  */
339
343
  delete(customerId: string): Promise<void>;
344
+ /**
345
+ * Delete a customer
346
+ */
347
+ updateCustomerSubscription(stripeSubscriptionId: string, params: CustomerSubscriptionUpdateParams): Promise<CustomerSubscription>;
340
348
  }
341
349
 
342
350
  declare class Helpers {
@@ -372,4 +380,4 @@ declare function createStoreHelpers(config?: {
372
380
  proxy?: string;
373
381
  }): Helpers;
374
382
 
375
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
383
+ export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
package/dist/index.d.ts CHANGED
@@ -33,6 +33,10 @@ interface Customer$1 extends CustomerCreateParams {
33
33
  createdAt: string;
34
34
  updatedAt: string;
35
35
  }
36
+ interface CustomerSubscription {
37
+ cancelAtPeriodEnd: boolean;
38
+ }
39
+ type CustomerSubscriptionUpdateParams = Partial<Pick<CustomerSubscription, "cancelAtPeriodEnd">>;
36
40
 
37
41
  interface VariantOption {
38
42
  name: string;
@@ -337,6 +341,10 @@ declare class Customer {
337
341
  * Delete a customer
338
342
  */
339
343
  delete(customerId: string): Promise<void>;
344
+ /**
345
+ * Delete a customer
346
+ */
347
+ updateCustomerSubscription(stripeSubscriptionId: string, params: CustomerSubscriptionUpdateParams): Promise<CustomerSubscription>;
340
348
  }
341
349
 
342
350
  declare class Helpers {
@@ -372,4 +380,4 @@ declare function createStoreHelpers(config?: {
372
380
  proxy?: string;
373
381
  }): Helpers;
374
382
 
375
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
383
+ export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
package/dist/index.js CHANGED
@@ -382,6 +382,18 @@ var Customer = class {
382
382
  yield this.apiClient.delete(`/customer/${customerId}`);
383
383
  });
384
384
  }
385
+ /**
386
+ * Delete a customer
387
+ */
388
+ updateCustomerSubscription(stripeSubscriptionId, params) {
389
+ return __async(this, null, function* () {
390
+ const data = yield this.apiClient.put(
391
+ `/customer/subscription/${stripeSubscriptionId}`,
392
+ params
393
+ );
394
+ return data;
395
+ });
396
+ }
385
397
  };
386
398
  var customer_default = Customer;
387
399
 
package/dist/index.mjs CHANGED
@@ -345,6 +345,18 @@ var Customer = class {
345
345
  yield this.apiClient.delete(`/customer/${customerId}`);
346
346
  });
347
347
  }
348
+ /**
349
+ * Delete a customer
350
+ */
351
+ updateCustomerSubscription(stripeSubscriptionId, params) {
352
+ return __async(this, null, function* () {
353
+ const data = yield this.apiClient.put(
354
+ `/customer/subscription/${stripeSubscriptionId}`,
355
+ params
356
+ );
357
+ return data;
358
+ });
359
+ }
348
360
  };
349
361
  var customer_default = Customer;
350
362
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.67",
3
+ "version": "0.3.68",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {