@betterstore/sdk 0.3.63 → 0.3.64
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 +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.js +0 -10
- package/dist/index.mjs +0 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -53,17 +53,17 @@ interface ProductVariant {
|
|
|
53
53
|
widthInCm?: number;
|
|
54
54
|
lengthInCm?: number;
|
|
55
55
|
priceInCents: number;
|
|
56
|
+
billingType: ProductBillingType;
|
|
57
|
+
billingInterval?: string | null;
|
|
58
|
+
stripeProductId?: string | null;
|
|
56
59
|
variantOptions: VariantOption[];
|
|
57
60
|
}
|
|
58
61
|
interface ProductOption {
|
|
59
62
|
name: string;
|
|
60
63
|
values: string[];
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
ACTIVE = "ACTIVE",
|
|
65
|
-
ARCHIVED = "ARCHIVED"
|
|
66
|
-
}
|
|
65
|
+
type ProductStatus = "DRAFT" | "ACTIVE" | "ARCHIVED";
|
|
66
|
+
type ProductBillingType = "ONE_TIME" | "SUBSCRIPTION";
|
|
67
67
|
interface Product {
|
|
68
68
|
id: string;
|
|
69
69
|
title: string;
|
|
@@ -77,6 +77,9 @@ interface Product {
|
|
|
77
77
|
widthInCm?: number;
|
|
78
78
|
lengthInCm?: number;
|
|
79
79
|
priceInCents: number;
|
|
80
|
+
billingType: ProductBillingType;
|
|
81
|
+
billingInterval?: string | null;
|
|
82
|
+
stripeProductId?: string | null;
|
|
80
83
|
trackInventory: boolean;
|
|
81
84
|
sku?: string;
|
|
82
85
|
barcode?: string;
|
|
@@ -117,9 +120,9 @@ interface ZasilkovnaRate extends BaseRate {
|
|
|
117
120
|
clientSecret: string;
|
|
118
121
|
}
|
|
119
122
|
|
|
120
|
-
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
123
|
+
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId"> & {
|
|
121
124
|
productId: string;
|
|
122
|
-
selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "variantOptions">;
|
|
125
|
+
selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId" | "variantOptions">;
|
|
123
126
|
};
|
|
124
127
|
interface LineItem {
|
|
125
128
|
quantity: number;
|
|
@@ -363,4 +366,4 @@ declare function createStoreHelpers(config?: {
|
|
|
363
366
|
proxy?: string;
|
|
364
367
|
}): Helpers;
|
|
365
368
|
|
|
366
|
-
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductOption, ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
|
369
|
+
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -53,17 +53,17 @@ interface ProductVariant {
|
|
|
53
53
|
widthInCm?: number;
|
|
54
54
|
lengthInCm?: number;
|
|
55
55
|
priceInCents: number;
|
|
56
|
+
billingType: ProductBillingType;
|
|
57
|
+
billingInterval?: string | null;
|
|
58
|
+
stripeProductId?: string | null;
|
|
56
59
|
variantOptions: VariantOption[];
|
|
57
60
|
}
|
|
58
61
|
interface ProductOption {
|
|
59
62
|
name: string;
|
|
60
63
|
values: string[];
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
ACTIVE = "ACTIVE",
|
|
65
|
-
ARCHIVED = "ARCHIVED"
|
|
66
|
-
}
|
|
65
|
+
type ProductStatus = "DRAFT" | "ACTIVE" | "ARCHIVED";
|
|
66
|
+
type ProductBillingType = "ONE_TIME" | "SUBSCRIPTION";
|
|
67
67
|
interface Product {
|
|
68
68
|
id: string;
|
|
69
69
|
title: string;
|
|
@@ -77,6 +77,9 @@ interface Product {
|
|
|
77
77
|
widthInCm?: number;
|
|
78
78
|
lengthInCm?: number;
|
|
79
79
|
priceInCents: number;
|
|
80
|
+
billingType: ProductBillingType;
|
|
81
|
+
billingInterval?: string | null;
|
|
82
|
+
stripeProductId?: string | null;
|
|
80
83
|
trackInventory: boolean;
|
|
81
84
|
sku?: string;
|
|
82
85
|
barcode?: string;
|
|
@@ -117,9 +120,9 @@ interface ZasilkovnaRate extends BaseRate {
|
|
|
117
120
|
clientSecret: string;
|
|
118
121
|
}
|
|
119
122
|
|
|
120
|
-
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
123
|
+
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId"> & {
|
|
121
124
|
productId: string;
|
|
122
|
-
selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "variantOptions">;
|
|
125
|
+
selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "billingType" | "billingInterval" | "stripeProductId" | "variantOptions">;
|
|
123
126
|
};
|
|
124
127
|
interface LineItem {
|
|
125
128
|
quantity: number;
|
|
@@ -363,4 +366,4 @@ declare function createStoreHelpers(config?: {
|
|
|
363
366
|
proxy?: string;
|
|
364
367
|
}): Helpers;
|
|
365
368
|
|
|
366
|
-
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductOption, ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
|
369
|
+
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerUpdateParams, type LineItem, type LineItemCreate, type Product, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
package/dist/index.js
CHANGED
|
@@ -50,7 +50,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
50
50
|
// src/index.ts
|
|
51
51
|
var index_exports = {};
|
|
52
52
|
__export(index_exports, {
|
|
53
|
-
ProductStatus: () => ProductStatus,
|
|
54
53
|
createStoreClient: () => createStoreClient,
|
|
55
54
|
createStoreHelpers: () => createStoreHelpers,
|
|
56
55
|
default: () => createBetterStore
|
|
@@ -539,14 +538,6 @@ var Products = class {
|
|
|
539
538
|
};
|
|
540
539
|
var products_default = Products;
|
|
541
540
|
|
|
542
|
-
// src/products/types.ts
|
|
543
|
-
var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
544
|
-
ProductStatus2["DRAFT"] = "DRAFT";
|
|
545
|
-
ProductStatus2["ACTIVE"] = "ACTIVE";
|
|
546
|
-
ProductStatus2["ARCHIVED"] = "ARCHIVED";
|
|
547
|
-
return ProductStatus2;
|
|
548
|
-
})(ProductStatus || {});
|
|
549
|
-
|
|
550
541
|
// src/index.ts
|
|
551
542
|
function createBetterStore(config) {
|
|
552
543
|
if (!config.apiKey) {
|
|
@@ -566,7 +557,6 @@ function createStoreHelpers(config) {
|
|
|
566
557
|
}
|
|
567
558
|
// Annotate the CommonJS export names for ESM import in node:
|
|
568
559
|
0 && (module.exports = {
|
|
569
|
-
ProductStatus,
|
|
570
560
|
createStoreClient,
|
|
571
561
|
createStoreHelpers
|
|
572
562
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -501,14 +501,6 @@ var Products = class {
|
|
|
501
501
|
};
|
|
502
502
|
var products_default = Products;
|
|
503
503
|
|
|
504
|
-
// src/products/types.ts
|
|
505
|
-
var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
506
|
-
ProductStatus2["DRAFT"] = "DRAFT";
|
|
507
|
-
ProductStatus2["ACTIVE"] = "ACTIVE";
|
|
508
|
-
ProductStatus2["ARCHIVED"] = "ARCHIVED";
|
|
509
|
-
return ProductStatus2;
|
|
510
|
-
})(ProductStatus || {});
|
|
511
|
-
|
|
512
504
|
// src/index.ts
|
|
513
505
|
function createBetterStore(config) {
|
|
514
506
|
if (!config.apiKey) {
|
|
@@ -527,7 +519,6 @@ function createStoreHelpers(config) {
|
|
|
527
519
|
return new helpers_default(config == null ? void 0 : config.proxy);
|
|
528
520
|
}
|
|
529
521
|
export {
|
|
530
|
-
ProductStatus,
|
|
531
522
|
createStoreClient,
|
|
532
523
|
createStoreHelpers,
|
|
533
524
|
createBetterStore as default
|