@betterstore/sdk 0.3.64 → 0.3.65

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.65
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fix
8
+
3
9
  ## 0.3.64
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -54,8 +54,8 @@ interface ProductVariant {
54
54
  lengthInCm?: number;
55
55
  priceInCents: number;
56
56
  billingType: ProductBillingType;
57
- billingInterval?: string | null;
58
- stripeProductId?: string | null;
57
+ billingInterval: ProductBillingInterval;
58
+ billingIntervalCount: number;
59
59
  variantOptions: VariantOption[];
60
60
  }
61
61
  interface ProductOption {
@@ -63,6 +63,7 @@ interface ProductOption {
63
63
  values: string[];
64
64
  }
65
65
  type ProductStatus = "DRAFT" | "ACTIVE" | "ARCHIVED";
66
+ type ProductBillingInterval = "DAY" | "WEEK" | "MONTH" | "YEAR";
66
67
  type ProductBillingType = "ONE_TIME" | "SUBSCRIPTION";
67
68
  interface Product {
68
69
  id: string;
@@ -78,7 +79,8 @@ interface Product {
78
79
  lengthInCm?: number;
79
80
  priceInCents: number;
80
81
  billingType: ProductBillingType;
81
- billingInterval?: string | null;
82
+ billingInterval: ProductBillingInterval;
83
+ billingIntervalCount: number;
82
84
  stripeProductId?: string | null;
83
85
  trackInventory: boolean;
84
86
  sku?: string;
@@ -120,9 +122,9 @@ interface ZasilkovnaRate extends BaseRate {
120
122
  clientSecret: string;
121
123
  }
122
124
 
123
- type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId"> & {
125
+ type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "stripeProductId"> & {
124
126
  productId: string;
125
- selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId" | "variantOptions">;
127
+ selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "variantOptions">;
126
128
  };
127
129
  interface LineItem {
128
130
  quantity: number;
@@ -366,4 +368,4 @@ declare function createStoreHelpers(config?: {
366
368
  proxy?: string;
367
369
  }): Helpers;
368
370
 
369
- 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 ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
371
+ 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 };
package/dist/index.d.ts CHANGED
@@ -54,8 +54,8 @@ interface ProductVariant {
54
54
  lengthInCm?: number;
55
55
  priceInCents: number;
56
56
  billingType: ProductBillingType;
57
- billingInterval?: string | null;
58
- stripeProductId?: string | null;
57
+ billingInterval: ProductBillingInterval;
58
+ billingIntervalCount: number;
59
59
  variantOptions: VariantOption[];
60
60
  }
61
61
  interface ProductOption {
@@ -63,6 +63,7 @@ interface ProductOption {
63
63
  values: string[];
64
64
  }
65
65
  type ProductStatus = "DRAFT" | "ACTIVE" | "ARCHIVED";
66
+ type ProductBillingInterval = "DAY" | "WEEK" | "MONTH" | "YEAR";
66
67
  type ProductBillingType = "ONE_TIME" | "SUBSCRIPTION";
67
68
  interface Product {
68
69
  id: string;
@@ -78,7 +79,8 @@ interface Product {
78
79
  lengthInCm?: number;
79
80
  priceInCents: number;
80
81
  billingType: ProductBillingType;
81
- billingInterval?: string | null;
82
+ billingInterval: ProductBillingInterval;
83
+ billingIntervalCount: number;
82
84
  stripeProductId?: string | null;
83
85
  trackInventory: boolean;
84
86
  sku?: string;
@@ -120,9 +122,9 @@ interface ZasilkovnaRate extends BaseRate {
120
122
  clientSecret: string;
121
123
  }
122
124
 
123
- type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId"> & {
125
+ type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "stripeProductId"> & {
124
126
  productId: string;
125
- selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId" | "variantOptions">;
127
+ selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "variantOptions">;
126
128
  };
127
129
  interface LineItem {
128
130
  quantity: number;
@@ -366,4 +368,4 @@ declare function createStoreHelpers(config?: {
366
368
  proxy?: string;
367
369
  }): Helpers;
368
370
 
369
- 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 ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
371
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.64",
3
+ "version": "0.3.65",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {