@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 +6 -0
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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"
|
|
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
|
-
|
|
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"
|
|
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
|
-
|
|
217
|
+
allowedLineItems: {
|
|
218
|
+
productId: string;
|
|
219
|
+
quantity: number;
|
|
220
|
+
}[];
|
|
216
221
|
discount: Discount;
|
|
217
222
|
}[];
|
|
218
223
|
currency: string;
|