@betterstore/sdk 0.3.47 → 0.3.48
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 +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +6 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -86,12 +86,22 @@ interface Product {
|
|
|
86
86
|
seoPageTitle?: string;
|
|
87
87
|
seoDescription?: string;
|
|
88
88
|
seoHandle?: string;
|
|
89
|
+
vendor?: string;
|
|
89
90
|
status: ProductStatus;
|
|
90
91
|
options: ProductOption[];
|
|
91
92
|
productVariants: ProductVariant[];
|
|
92
93
|
}
|
|
93
94
|
interface ProductWithoutVariants extends Omit<Product, "productVariants"> {
|
|
94
95
|
}
|
|
96
|
+
interface Collection {
|
|
97
|
+
id: string;
|
|
98
|
+
title: string;
|
|
99
|
+
description?: string;
|
|
100
|
+
images: string[];
|
|
101
|
+
seoPageTitle?: string;
|
|
102
|
+
seoDescription?: string;
|
|
103
|
+
seoHandle?: string;
|
|
104
|
+
}
|
|
95
105
|
|
|
96
106
|
type ShippingRate = ZasilkovnaRate;
|
|
97
107
|
interface BaseRate {
|
|
@@ -104,7 +114,7 @@ interface ZasilkovnaRate extends BaseRate {
|
|
|
104
114
|
clientSecret: string;
|
|
105
115
|
}
|
|
106
116
|
|
|
107
|
-
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
117
|
+
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
108
118
|
selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "variantOptions">;
|
|
109
119
|
};
|
|
110
120
|
interface LineItem {
|
|
@@ -261,6 +271,7 @@ declare class Products {
|
|
|
261
271
|
constructor(apiKey: string, proxy?: string);
|
|
262
272
|
list(): Promise<ProductWithoutVariants[]>;
|
|
263
273
|
retrieve(productId: string): Promise<Product | null>;
|
|
274
|
+
listCollections(): Promise<Collection[]>;
|
|
264
275
|
}
|
|
265
276
|
|
|
266
277
|
declare function createBetterStore(config: {
|
|
@@ -278,4 +289,4 @@ declare function createStoreHelpers(config?: {
|
|
|
278
289
|
proxy?: string;
|
|
279
290
|
}): Helpers;
|
|
280
291
|
|
|
281
|
-
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, 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 };
|
|
292
|
+
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -86,12 +86,22 @@ interface Product {
|
|
|
86
86
|
seoPageTitle?: string;
|
|
87
87
|
seoDescription?: string;
|
|
88
88
|
seoHandle?: string;
|
|
89
|
+
vendor?: string;
|
|
89
90
|
status: ProductStatus;
|
|
90
91
|
options: ProductOption[];
|
|
91
92
|
productVariants: ProductVariant[];
|
|
92
93
|
}
|
|
93
94
|
interface ProductWithoutVariants extends Omit<Product, "productVariants"> {
|
|
94
95
|
}
|
|
96
|
+
interface Collection {
|
|
97
|
+
id: string;
|
|
98
|
+
title: string;
|
|
99
|
+
description?: string;
|
|
100
|
+
images: string[];
|
|
101
|
+
seoPageTitle?: string;
|
|
102
|
+
seoDescription?: string;
|
|
103
|
+
seoHandle?: string;
|
|
104
|
+
}
|
|
95
105
|
|
|
96
106
|
type ShippingRate = ZasilkovnaRate;
|
|
97
107
|
interface BaseRate {
|
|
@@ -104,7 +114,7 @@ interface ZasilkovnaRate extends BaseRate {
|
|
|
104
114
|
clientSecret: string;
|
|
105
115
|
}
|
|
106
116
|
|
|
107
|
-
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
117
|
+
type ProductData = Pick<Product, "title" | "description" | "images" | "category" | "tags" | "sku" | "barcode" | "vendor" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents"> & {
|
|
108
118
|
selectedVariant: Pick<ProductVariant, "title" | "sku" | "barcode" | "images" | "isPhysical" | "weightInGrams" | "heightInCm" | "widthInCm" | "lengthInCm" | "priceInCents" | "variantOptions">;
|
|
109
119
|
};
|
|
110
120
|
interface LineItem {
|
|
@@ -261,6 +271,7 @@ declare class Products {
|
|
|
261
271
|
constructor(apiKey: string, proxy?: string);
|
|
262
272
|
list(): Promise<ProductWithoutVariants[]>;
|
|
263
273
|
retrieve(productId: string): Promise<Product | null>;
|
|
274
|
+
listCollections(): Promise<Collection[]>;
|
|
264
275
|
}
|
|
265
276
|
|
|
266
277
|
declare function createBetterStore(config: {
|
|
@@ -278,4 +289,4 @@ declare function createStoreHelpers(config?: {
|
|
|
278
289
|
proxy?: string;
|
|
279
290
|
}): Helpers;
|
|
280
291
|
|
|
281
|
-
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, 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 };
|
|
292
|
+
export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, 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 };
|
package/dist/index.js
CHANGED
|
@@ -463,6 +463,12 @@ var Products = class {
|
|
|
463
463
|
return data;
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
|
+
listCollections() {
|
|
467
|
+
return __async(this, null, function* () {
|
|
468
|
+
const data = yield this.apiClient.get("/collections");
|
|
469
|
+
return data;
|
|
470
|
+
});
|
|
471
|
+
}
|
|
466
472
|
};
|
|
467
473
|
var products_default = Products;
|
|
468
474
|
|
package/dist/index.mjs
CHANGED
|
@@ -427,6 +427,12 @@ var Products = class {
|
|
|
427
427
|
return data;
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
+
listCollections() {
|
|
431
|
+
return __async(this, null, function* () {
|
|
432
|
+
const data = yield this.apiClient.get("/collections");
|
|
433
|
+
return data;
|
|
434
|
+
});
|
|
435
|
+
}
|
|
430
436
|
};
|
|
431
437
|
var products_default = Products;
|
|
432
438
|
|