@betterstore/sdk 0.3.26 → 0.3.27
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 +15 -8
- package/dist/index.d.ts +15 -8
- package/dist/index.js +0 -5
- package/dist/index.mjs +0 -4
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Rate } from 'shippo';
|
|
2
|
-
export { Rate as ShippingRate } from 'shippo';
|
|
3
|
-
|
|
4
1
|
type Address = {
|
|
5
2
|
name: string;
|
|
6
3
|
company?: string;
|
|
@@ -80,6 +77,16 @@ interface Product {
|
|
|
80
77
|
productVariants: ProductVariant[];
|
|
81
78
|
}
|
|
82
79
|
|
|
80
|
+
type ShippingRate = ZasilkovnaRate;
|
|
81
|
+
interface BaseRate {
|
|
82
|
+
provider: string;
|
|
83
|
+
price: number;
|
|
84
|
+
}
|
|
85
|
+
interface ZasilkovnaRate extends BaseRate {
|
|
86
|
+
provider: "zasilkovna";
|
|
87
|
+
clientSecret: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
83
90
|
interface LineItem {
|
|
84
91
|
quantity: number;
|
|
85
92
|
productId: string;
|
|
@@ -104,8 +111,8 @@ interface CheckoutUpdateParams {
|
|
|
104
111
|
tax?: number;
|
|
105
112
|
shipping?: number;
|
|
106
113
|
shippingInfo?: {
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
provider: string;
|
|
115
|
+
price: number;
|
|
109
116
|
name?: string;
|
|
110
117
|
trackingNumber?: string;
|
|
111
118
|
trackingUrl?: string;
|
|
@@ -150,7 +157,7 @@ declare class Checkout {
|
|
|
150
157
|
/**
|
|
151
158
|
* Get shipping rates for a checkout session
|
|
152
159
|
*/
|
|
153
|
-
getShippingRates(checkoutId: string): Promise<
|
|
160
|
+
getShippingRates(checkoutId: string): Promise<ShippingRate[]>;
|
|
154
161
|
/**
|
|
155
162
|
* Generate payment secret for a checkout session
|
|
156
163
|
*/
|
|
@@ -171,7 +178,7 @@ declare class Client {
|
|
|
171
178
|
/**
|
|
172
179
|
* Get shipping rates for a checkout session
|
|
173
180
|
*/
|
|
174
|
-
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<
|
|
181
|
+
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<ShippingRate[]>;
|
|
175
182
|
/**
|
|
176
183
|
* Generate payment secret for a checkout session
|
|
177
184
|
*/
|
|
@@ -240,4 +247,4 @@ declare function createStoreHelpers(config?: {
|
|
|
240
247
|
proxy?: string;
|
|
241
248
|
}): Helpers;
|
|
242
249
|
|
|
243
|
-
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, createStoreHelpers, createBetterStore as default };
|
|
250
|
+
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 ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Rate } from 'shippo';
|
|
2
|
-
export { Rate as ShippingRate } from 'shippo';
|
|
3
|
-
|
|
4
1
|
type Address = {
|
|
5
2
|
name: string;
|
|
6
3
|
company?: string;
|
|
@@ -80,6 +77,16 @@ interface Product {
|
|
|
80
77
|
productVariants: ProductVariant[];
|
|
81
78
|
}
|
|
82
79
|
|
|
80
|
+
type ShippingRate = ZasilkovnaRate;
|
|
81
|
+
interface BaseRate {
|
|
82
|
+
provider: string;
|
|
83
|
+
price: number;
|
|
84
|
+
}
|
|
85
|
+
interface ZasilkovnaRate extends BaseRate {
|
|
86
|
+
provider: "zasilkovna";
|
|
87
|
+
clientSecret: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
83
90
|
interface LineItem {
|
|
84
91
|
quantity: number;
|
|
85
92
|
productId: string;
|
|
@@ -104,8 +111,8 @@ interface CheckoutUpdateParams {
|
|
|
104
111
|
tax?: number;
|
|
105
112
|
shipping?: number;
|
|
106
113
|
shippingInfo?: {
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
provider: string;
|
|
115
|
+
price: number;
|
|
109
116
|
name?: string;
|
|
110
117
|
trackingNumber?: string;
|
|
111
118
|
trackingUrl?: string;
|
|
@@ -150,7 +157,7 @@ declare class Checkout {
|
|
|
150
157
|
/**
|
|
151
158
|
* Get shipping rates for a checkout session
|
|
152
159
|
*/
|
|
153
|
-
getShippingRates(checkoutId: string): Promise<
|
|
160
|
+
getShippingRates(checkoutId: string): Promise<ShippingRate[]>;
|
|
154
161
|
/**
|
|
155
162
|
* Generate payment secret for a checkout session
|
|
156
163
|
*/
|
|
@@ -171,7 +178,7 @@ declare class Client {
|
|
|
171
178
|
/**
|
|
172
179
|
* Get shipping rates for a checkout session
|
|
173
180
|
*/
|
|
174
|
-
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<
|
|
181
|
+
getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<ShippingRate[]>;
|
|
175
182
|
/**
|
|
176
183
|
* Generate payment secret for a checkout session
|
|
177
184
|
*/
|
|
@@ -240,4 +247,4 @@ declare function createStoreHelpers(config?: {
|
|
|
240
247
|
proxy?: string;
|
|
241
248
|
}): Helpers;
|
|
242
249
|
|
|
243
|
-
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, createStoreHelpers, createBetterStore as default };
|
|
250
|
+
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 ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51
51
|
var index_exports = {};
|
|
52
52
|
__export(index_exports, {
|
|
53
53
|
ProductStatus: () => ProductStatus,
|
|
54
|
-
ShippingRate: () => import_shippo.Rate,
|
|
55
54
|
createStoreClient: () => createStoreClient,
|
|
56
55
|
createStoreHelpers: () => createStoreHelpers,
|
|
57
56
|
default: () => createBetterStore
|
|
@@ -431,9 +430,6 @@ var Products = class {
|
|
|
431
430
|
};
|
|
432
431
|
var products_default = Products;
|
|
433
432
|
|
|
434
|
-
// src/checkout/types.ts
|
|
435
|
-
var import_shippo = require("shippo");
|
|
436
|
-
|
|
437
433
|
// src/products/types.ts
|
|
438
434
|
var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
439
435
|
ProductStatus2["DRAFT"] = "DRAFT";
|
|
@@ -462,7 +458,6 @@ function createStoreHelpers(config) {
|
|
|
462
458
|
// Annotate the CommonJS export names for ESM import in node:
|
|
463
459
|
0 && (module.exports = {
|
|
464
460
|
ProductStatus,
|
|
465
|
-
ShippingRate,
|
|
466
461
|
createStoreClient,
|
|
467
462
|
createStoreHelpers
|
|
468
463
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -392,9 +392,6 @@ var Products = class {
|
|
|
392
392
|
};
|
|
393
393
|
var products_default = Products;
|
|
394
394
|
|
|
395
|
-
// src/checkout/types.ts
|
|
396
|
-
import { Rate } from "shippo";
|
|
397
|
-
|
|
398
395
|
// src/products/types.ts
|
|
399
396
|
var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
400
397
|
ProductStatus2["DRAFT"] = "DRAFT";
|
|
@@ -422,7 +419,6 @@ function createStoreHelpers(config) {
|
|
|
422
419
|
}
|
|
423
420
|
export {
|
|
424
421
|
ProductStatus,
|
|
425
|
-
Rate as ShippingRate,
|
|
426
422
|
createStoreClient,
|
|
427
423
|
createStoreHelpers,
|
|
428
424
|
createBetterStore as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betterstore/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
4
4
|
"description": "E-commerce for Developers",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"axios": "^1.8.2",
|
|
30
|
-
"shippo": "^2.15.0",
|
|
31
30
|
"zod": "^3.24.2"
|
|
32
31
|
},
|
|
33
32
|
"scripts": {
|