@betterstore/sdk 0.3.14 → 0.3.16
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 +12 -0
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -88,18 +88,25 @@ interface LineItem {
|
|
|
88
88
|
value: string;
|
|
89
89
|
}[];
|
|
90
90
|
discountId?: string;
|
|
91
|
+
product?: Pick<Product, "title" | "priceInCents" | "images">;
|
|
91
92
|
metadata?: string;
|
|
92
93
|
}
|
|
94
|
+
type Currency = {
|
|
95
|
+
code: string;
|
|
96
|
+
exchangeRate: number;
|
|
97
|
+
};
|
|
93
98
|
interface CheckoutCreateParams {
|
|
94
99
|
type: "hosted" | "embed";
|
|
95
100
|
customerId?: string;
|
|
96
101
|
lineItems: LineItem[];
|
|
102
|
+
currency?: Currency;
|
|
97
103
|
}
|
|
98
104
|
interface CheckoutUpdateParams {
|
|
99
105
|
lineItems?: LineItem[];
|
|
100
106
|
customerId?: string;
|
|
101
107
|
tax?: number;
|
|
102
108
|
shipping?: number;
|
|
109
|
+
currency?: Currency;
|
|
103
110
|
shippingInfo?: {
|
|
104
111
|
rateId: string;
|
|
105
112
|
provider?: string;
|
|
@@ -120,6 +127,7 @@ interface CheckoutSession {
|
|
|
120
127
|
tax?: number;
|
|
121
128
|
shipping?: number;
|
|
122
129
|
currency: string;
|
|
130
|
+
exchangeRate: number;
|
|
123
131
|
status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
|
|
124
132
|
customer?: {
|
|
125
133
|
id: string;
|
|
@@ -226,4 +234,4 @@ declare function createStoreClient(config: {
|
|
|
226
234
|
proxy?: string;
|
|
227
235
|
}): Client;
|
|
228
236
|
|
|
229
|
-
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type VariantOption, createStoreClient, betterStore as default };
|
|
237
|
+
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type VariantOption, createStoreClient, betterStore as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -88,18 +88,25 @@ interface LineItem {
|
|
|
88
88
|
value: string;
|
|
89
89
|
}[];
|
|
90
90
|
discountId?: string;
|
|
91
|
+
product?: Pick<Product, "title" | "priceInCents" | "images">;
|
|
91
92
|
metadata?: string;
|
|
92
93
|
}
|
|
94
|
+
type Currency = {
|
|
95
|
+
code: string;
|
|
96
|
+
exchangeRate: number;
|
|
97
|
+
};
|
|
93
98
|
interface CheckoutCreateParams {
|
|
94
99
|
type: "hosted" | "embed";
|
|
95
100
|
customerId?: string;
|
|
96
101
|
lineItems: LineItem[];
|
|
102
|
+
currency?: Currency;
|
|
97
103
|
}
|
|
98
104
|
interface CheckoutUpdateParams {
|
|
99
105
|
lineItems?: LineItem[];
|
|
100
106
|
customerId?: string;
|
|
101
107
|
tax?: number;
|
|
102
108
|
shipping?: number;
|
|
109
|
+
currency?: Currency;
|
|
103
110
|
shippingInfo?: {
|
|
104
111
|
rateId: string;
|
|
105
112
|
provider?: string;
|
|
@@ -120,6 +127,7 @@ interface CheckoutSession {
|
|
|
120
127
|
tax?: number;
|
|
121
128
|
shipping?: number;
|
|
122
129
|
currency: string;
|
|
130
|
+
exchangeRate: number;
|
|
123
131
|
status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
|
|
124
132
|
customer?: {
|
|
125
133
|
id: string;
|
|
@@ -226,4 +234,4 @@ declare function createStoreClient(config: {
|
|
|
226
234
|
proxy?: string;
|
|
227
235
|
}): Client;
|
|
228
236
|
|
|
229
|
-
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type VariantOption, createStoreClient, betterStore as default };
|
|
237
|
+
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type Product, type ProductOption, ProductStatus, type ProductVariant, type VariantOption, createStoreClient, betterStore as default };
|