@betterstore/sdk 0.3.65 → 0.3.66

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.66
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fixes
8
+
3
9
  ## 0.3.65
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -81,7 +81,6 @@ interface Product {
81
81
  billingType: ProductBillingType;
82
82
  billingInterval: ProductBillingInterval;
83
83
  billingIntervalCount: number;
84
- stripeProductId?: string | null;
85
84
  trackInventory: boolean;
86
85
  sku?: string;
87
86
  barcode?: string;
@@ -122,7 +121,7 @@ interface ZasilkovnaRate extends BaseRate {
122
121
  clientSecret: string;
123
122
  }
124
123
 
125
- type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "stripeProductId"> & {
124
+ type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount"> & {
126
125
  productId: string;
127
126
  selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "variantOptions">;
128
127
  };
@@ -191,6 +190,9 @@ type Discount = {
191
190
  maxUsesPerCustomer?: number | null;
192
191
  maxAllowedProductQuantity?: number | null;
193
192
  uses: number;
193
+ subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
194
+ subscriptionDiscountDurationValue: number;
195
+ stripeDiscountId?: string | null;
194
196
  startsAt: Date;
195
197
  expiresAt?: Date | null;
196
198
  status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
@@ -212,7 +214,10 @@ interface CheckoutSession {
212
214
  appliedDiscounts: {
213
215
  id: string;
214
216
  amount: number;
215
- allowedProductIDs: string[];
217
+ allowedLineItems: {
218
+ productId: string;
219
+ quantity: number;
220
+ }[];
216
221
  discount: Discount;
217
222
  }[];
218
223
  currency: string;
package/dist/index.d.ts CHANGED
@@ -81,7 +81,6 @@ interface Product {
81
81
  billingType: ProductBillingType;
82
82
  billingInterval: ProductBillingInterval;
83
83
  billingIntervalCount: number;
84
- stripeProductId?: string | null;
85
84
  trackInventory: boolean;
86
85
  sku?: string;
87
86
  barcode?: string;
@@ -122,7 +121,7 @@ interface ZasilkovnaRate extends BaseRate {
122
121
  clientSecret: string;
123
122
  }
124
123
 
125
- type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "stripeProductId"> & {
124
+ type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount"> & {
126
125
  productId: string;
127
126
  selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "billingIntervalCount" | "variantOptions">;
128
127
  };
@@ -191,6 +190,9 @@ type Discount = {
191
190
  maxUsesPerCustomer?: number | null;
192
191
  maxAllowedProductQuantity?: number | null;
193
192
  uses: number;
193
+ subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
194
+ subscriptionDiscountDurationValue: number;
195
+ stripeDiscountId?: string | null;
194
196
  startsAt: Date;
195
197
  expiresAt?: Date | null;
196
198
  status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
@@ -212,7 +214,10 @@ interface CheckoutSession {
212
214
  appliedDiscounts: {
213
215
  id: string;
214
216
  amount: number;
215
- allowedProductIDs: string[];
217
+ allowedLineItems: {
218
+ productId: string;
219
+ quantity: number;
220
+ }[];
216
221
  discount: Discount;
217
222
  }[];
218
223
  currency: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.65",
3
+ "version": "0.3.66",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {