@betterstore/sdk 0.3.65 → 0.3.67

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.67
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fixes
8
+
9
+ ## 0.3.66
10
+
11
+ ### Patch Changes
12
+
13
+ - bug fixes
14
+
3
15
  ## 0.3.65
4
16
 
5
17
  ### 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
  };
@@ -132,7 +131,6 @@ interface LineItem {
132
131
  name: string;
133
132
  value: string;
134
133
  }[];
135
- discountId?: string;
136
134
  productData: ProductData;
137
135
  metadata?: string;
138
136
  }
@@ -147,7 +145,7 @@ interface CheckoutCreateParams {
147
145
  customerId?: string;
148
146
  lineItems: LineItemCreate[];
149
147
  currency?: Currency;
150
- discountCode?: string;
148
+ discountCodes?: string[];
151
149
  }
152
150
  interface CheckoutUpdateParams {
153
151
  customerId?: string;
@@ -191,6 +189,9 @@ type Discount = {
191
189
  maxUsesPerCustomer?: number | null;
192
190
  maxAllowedProductQuantity?: number | null;
193
191
  uses: number;
192
+ subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
193
+ subscriptionDiscountDurationValue: number;
194
+ stripeDiscountId?: string | null;
194
195
  startsAt: Date;
195
196
  expiresAt?: Date | null;
196
197
  status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
@@ -212,7 +213,10 @@ interface CheckoutSession {
212
213
  appliedDiscounts: {
213
214
  id: string;
214
215
  amount: number;
215
- allowedProductIDs: string[];
216
+ allowedLineItems: {
217
+ productId: string;
218
+ quantity: number;
219
+ }[];
216
220
  discount: Discount;
217
221
  }[];
218
222
  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
  };
@@ -132,7 +131,6 @@ interface LineItem {
132
131
  name: string;
133
132
  value: string;
134
133
  }[];
135
- discountId?: string;
136
134
  productData: ProductData;
137
135
  metadata?: string;
138
136
  }
@@ -147,7 +145,7 @@ interface CheckoutCreateParams {
147
145
  customerId?: string;
148
146
  lineItems: LineItemCreate[];
149
147
  currency?: Currency;
150
- discountCode?: string;
148
+ discountCodes?: string[];
151
149
  }
152
150
  interface CheckoutUpdateParams {
153
151
  customerId?: string;
@@ -191,6 +189,9 @@ type Discount = {
191
189
  maxUsesPerCustomer?: number | null;
192
190
  maxAllowedProductQuantity?: number | null;
193
191
  uses: number;
192
+ subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
193
+ subscriptionDiscountDurationValue: number;
194
+ stripeDiscountId?: string | null;
194
195
  startsAt: Date;
195
196
  expiresAt?: Date | null;
196
197
  status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
@@ -212,7 +213,10 @@ interface CheckoutSession {
212
213
  appliedDiscounts: {
213
214
  id: string;
214
215
  amount: number;
215
- allowedProductIDs: string[];
216
+ allowedLineItems: {
217
+ productId: string;
218
+ quantity: number;
219
+ }[];
216
220
  discount: Discount;
217
221
  }[];
218
222
  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.67",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {