@betterstore/sdk 0.3.15 → 0.3.17
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 +8 -1
- package/dist/index.d.ts +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -91,16 +91,22 @@ interface LineItem {
|
|
|
91
91
|
product?: Pick<Product, "title" | "priceInCents" | "images">;
|
|
92
92
|
metadata?: string;
|
|
93
93
|
}
|
|
94
|
+
type Currency = {
|
|
95
|
+
code: string;
|
|
96
|
+
exchangeRate: number;
|
|
97
|
+
};
|
|
94
98
|
interface CheckoutCreateParams {
|
|
95
99
|
type: "hosted" | "embed";
|
|
96
100
|
customerId?: string;
|
|
97
101
|
lineItems: LineItem[];
|
|
102
|
+
currency?: Currency;
|
|
98
103
|
}
|
|
99
104
|
interface CheckoutUpdateParams {
|
|
100
105
|
lineItems?: LineItem[];
|
|
101
106
|
customerId?: string;
|
|
102
107
|
tax?: number;
|
|
103
108
|
shipping?: number;
|
|
109
|
+
currency?: Currency;
|
|
104
110
|
shippingInfo?: {
|
|
105
111
|
rateId: string;
|
|
106
112
|
provider?: string;
|
|
@@ -121,6 +127,7 @@ interface CheckoutSession {
|
|
|
121
127
|
tax?: number;
|
|
122
128
|
shipping?: number;
|
|
123
129
|
currency: string;
|
|
130
|
+
exchangeRate: number;
|
|
124
131
|
status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
|
|
125
132
|
customer?: {
|
|
126
133
|
id: string;
|
|
@@ -227,4 +234,4 @@ declare function createStoreClient(config: {
|
|
|
227
234
|
proxy?: string;
|
|
228
235
|
}): Client;
|
|
229
236
|
|
|
230
|
-
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
|
@@ -91,16 +91,22 @@ interface LineItem {
|
|
|
91
91
|
product?: Pick<Product, "title" | "priceInCents" | "images">;
|
|
92
92
|
metadata?: string;
|
|
93
93
|
}
|
|
94
|
+
type Currency = {
|
|
95
|
+
code: string;
|
|
96
|
+
exchangeRate: number;
|
|
97
|
+
};
|
|
94
98
|
interface CheckoutCreateParams {
|
|
95
99
|
type: "hosted" | "embed";
|
|
96
100
|
customerId?: string;
|
|
97
101
|
lineItems: LineItem[];
|
|
102
|
+
currency?: Currency;
|
|
98
103
|
}
|
|
99
104
|
interface CheckoutUpdateParams {
|
|
100
105
|
lineItems?: LineItem[];
|
|
101
106
|
customerId?: string;
|
|
102
107
|
tax?: number;
|
|
103
108
|
shipping?: number;
|
|
109
|
+
currency?: Currency;
|
|
104
110
|
shippingInfo?: {
|
|
105
111
|
rateId: string;
|
|
106
112
|
provider?: string;
|
|
@@ -121,6 +127,7 @@ interface CheckoutSession {
|
|
|
121
127
|
tax?: number;
|
|
122
128
|
shipping?: number;
|
|
123
129
|
currency: string;
|
|
130
|
+
exchangeRate: number;
|
|
124
131
|
status: "IN_PROGRESS" | "PAYMENT_PENDING" | "ABANDONED" | "CANCELED" | "FAILED";
|
|
125
132
|
customer?: {
|
|
126
133
|
id: string;
|
|
@@ -227,4 +234,4 @@ declare function createStoreClient(config: {
|
|
|
227
234
|
proxy?: string;
|
|
228
235
|
}): Client;
|
|
229
236
|
|
|
230
|
-
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 };
|