ce-storefront 0.13.1 → 0.13.3
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/FUNCTIONS.md +5 -22
- package/README.md +44 -58
- package/docs/sdks/auth/README.md +50 -90
- package/docs/sdks/carts/README.md +60 -108
- package/docs/sdks/catalog/README.md +62 -104
- package/docs/sdks/common/README.md +5 -9
- package/docs/sdks/customers/README.md +35 -63
- package/docs/sdks/orders/README.md +35 -63
- package/docs/sdks/shipping/README.md +5 -9
- package/esm/funcs/catalogGetProductDetail.d.ts +1 -1
- package/esm/funcs/catalogGetProductDetail.js +5 -11
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +2 -5
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.js +1 -0
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +2 -1
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +2 -5
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.js +3 -2
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +2 -1
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.js +2 -2
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +2 -1
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/productreview.d.ts +1 -10
- package/esm/models/components/productreview.d.ts.map +1 -1
- package/esm/models/components/productreview.js +2 -5
- package/esm/models/components/productreview.js.map +1 -1
- package/esm/models/errors/ceerror.d.ts +14 -2
- package/esm/models/errors/ceerror.d.ts.map +1 -1
- package/esm/models/errors/ceerror.js +1 -1
- package/esm/models/errors/ceerror.js.map +1 -1
- package/esm/models/operations/getproductdetail.d.ts +5 -5
- package/esm/models/operations/getproductdetail.d.ts.map +1 -1
- package/esm/models/operations/getproductdetail.js +4 -4
- package/esm/models/operations/getproductdetail.js.map +1 -1
- package/esm/models/operations/getvariantdetail.d.ts +5 -5
- package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
- package/esm/models/operations/getvariantdetail.js +4 -4
- package/esm/models/operations/getvariantdetail.js.map +1 -1
- package/esm/models/operations/listcategories.d.ts +6 -1
- package/esm/models/operations/listcategories.d.ts.map +1 -1
- package/esm/models/operations/listcategories.js +4 -0
- package/esm/models/operations/listcategories.js.map +1 -1
- package/esm/models/operations/listcrosssellproducts.d.ts +5 -0
- package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
- package/esm/models/operations/listcrosssellproducts.js +4 -0
- package/esm/models/operations/listcrosssellproducts.js.map +1 -1
- package/esm/models/operations/listproducts.d.ts +7 -2
- package/esm/models/operations/listproducts.d.ts.map +1 -1
- package/esm/models/operations/listproducts.js +4 -0
- package/esm/models/operations/listproducts.js.map +1 -1
- package/esm/models/operations/listproductvariants.d.ts +5 -5
- package/esm/models/operations/listproductvariants.d.ts.map +1 -1
- package/esm/models/operations/listproductvariants.js +4 -4
- package/esm/models/operations/listproductvariants.js.map +1 -1
- package/esm/models/operations/listsimilarproducts.d.ts +5 -0
- package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
- package/esm/models/operations/listsimilarproducts.js +4 -0
- package/esm/models/operations/listsimilarproducts.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +5 -5
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +2 -2
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/listupsellproducts.d.ts +5 -0
- package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
- package/esm/models/operations/listupsellproducts.js +4 -0
- package/esm/models/operations/listupsellproducts.js.map +1 -1
- package/esm/sdk/catalog.d.ts +1 -1
- package/esm/sdk/catalog.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/catalogGetProductDetail.ts +13 -12
- package/src/funcs/catalogGetVariantDetail.ts +6 -6
- package/src/funcs/catalogListCategories.ts +1 -0
- package/src/funcs/catalogListCrosssellProducts.ts +6 -1
- package/src/funcs/catalogListProductVariants.ts +6 -6
- package/src/funcs/catalogListProducts.ts +7 -2
- package/src/funcs/catalogListSimilarProducts.ts +6 -1
- package/src/funcs/catalogListSkus.ts +6 -2
- package/src/funcs/catalogListUpsellProducts.ts +6 -1
- package/src/index.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/productreview.ts +3 -6
- package/src/models/errors/ceerror.ts +18 -3
- package/src/models/operations/getproductdetail.ts +9 -9
- package/src/models/operations/getvariantdetail.ts +9 -9
- package/src/models/operations/listcategories.ts +10 -1
- package/src/models/operations/listcrosssellproducts.ts +9 -0
- package/src/models/operations/listproducts.ts +11 -2
- package/src/models/operations/listproductvariants.ts +9 -9
- package/src/models/operations/listsimilarproducts.ts +9 -0
- package/src/models/operations/listskus.ts +7 -7
- package/src/models/operations/listupsellproducts.ts +9 -0
- package/src/sdk/catalog.ts +1 -1
|
@@ -23,13 +23,17 @@ export type ListProductsRequest = {
|
|
|
23
23
|
*/
|
|
24
24
|
sortBy?: string | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* filter products by categories
|
|
26
|
+
* filter products by categories ids
|
|
27
27
|
*/
|
|
28
28
|
categoryId?: Array<string> | undefined;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
31
31
|
*/
|
|
32
32
|
customerGroupId?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* filter products by categories slugs
|
|
35
|
+
*/
|
|
36
|
+
categorySlug?: Array<string> | undefined;
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
export type Content = {
|
|
@@ -60,11 +64,13 @@ export const ListProductsRequest$inboundSchema: z.ZodType<
|
|
|
60
64
|
sort_by: z.string().optional(),
|
|
61
65
|
category_id: z.array(z.string()).optional(),
|
|
62
66
|
customer_group_id: z.string().optional(),
|
|
67
|
+
category_slug: z.array(z.string()).optional(),
|
|
63
68
|
}).transform((v) => {
|
|
64
69
|
return remap$(v, {
|
|
65
70
|
"sort_by": "sortBy",
|
|
66
71
|
"category_id": "categoryId",
|
|
67
72
|
"customer_group_id": "customerGroupId",
|
|
73
|
+
"category_slug": "categorySlug",
|
|
68
74
|
});
|
|
69
75
|
});
|
|
70
76
|
|
|
@@ -75,6 +81,7 @@ export type ListProductsRequest$Outbound = {
|
|
|
75
81
|
sort_by?: string | undefined;
|
|
76
82
|
category_id?: Array<string> | undefined;
|
|
77
83
|
customer_group_id?: string | undefined;
|
|
84
|
+
category_slug?: Array<string> | undefined;
|
|
78
85
|
};
|
|
79
86
|
|
|
80
87
|
/** @internal */
|
|
@@ -88,11 +95,13 @@ export const ListProductsRequest$outboundSchema: z.ZodType<
|
|
|
88
95
|
sortBy: z.string().optional(),
|
|
89
96
|
categoryId: z.array(z.string()).optional(),
|
|
90
97
|
customerGroupId: z.string().optional(),
|
|
98
|
+
categorySlug: z.array(z.string()).optional(),
|
|
91
99
|
}).transform((v) => {
|
|
92
100
|
return remap$(v, {
|
|
93
101
|
sortBy: "sort_by",
|
|
94
102
|
categoryId: "category_id",
|
|
95
103
|
customerGroupId: "customer_group_id",
|
|
104
|
+
categorySlug: "category_slug",
|
|
96
105
|
});
|
|
97
106
|
});
|
|
98
107
|
|
|
@@ -10,14 +10,14 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type ListProductVariantsRequest = {
|
|
13
|
-
/**
|
|
14
|
-
* use this param only if different pricing is configured as per customer group
|
|
15
|
-
*/
|
|
16
|
-
customerGroupId?: string | undefined;
|
|
17
13
|
/**
|
|
18
14
|
* ID of a particular product
|
|
19
15
|
*/
|
|
20
16
|
productId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
19
|
+
*/
|
|
20
|
+
customerGroupId?: string | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export type ListProductVariantsContent = {
|
|
@@ -39,19 +39,19 @@ export const ListProductVariantsRequest$inboundSchema: z.ZodType<
|
|
|
39
39
|
z.ZodTypeDef,
|
|
40
40
|
unknown
|
|
41
41
|
> = z.object({
|
|
42
|
-
customer_group_id: z.string().optional(),
|
|
43
42
|
product_id: z.string(),
|
|
43
|
+
customer_group_id: z.string().optional(),
|
|
44
44
|
}).transform((v) => {
|
|
45
45
|
return remap$(v, {
|
|
46
|
-
"customer_group_id": "customerGroupId",
|
|
47
46
|
"product_id": "productId",
|
|
47
|
+
"customer_group_id": "customerGroupId",
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
/** @internal */
|
|
52
52
|
export type ListProductVariantsRequest$Outbound = {
|
|
53
|
-
customer_group_id?: string | undefined;
|
|
54
53
|
product_id: string;
|
|
54
|
+
customer_group_id?: string | undefined;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
/** @internal */
|
|
@@ -60,12 +60,12 @@ export const ListProductVariantsRequest$outboundSchema: z.ZodType<
|
|
|
60
60
|
z.ZodTypeDef,
|
|
61
61
|
ListProductVariantsRequest
|
|
62
62
|
> = z.object({
|
|
63
|
-
customerGroupId: z.string().optional(),
|
|
64
63
|
productId: z.string(),
|
|
64
|
+
customerGroupId: z.string().optional(),
|
|
65
65
|
}).transform((v) => {
|
|
66
66
|
return remap$(v, {
|
|
67
|
-
customerGroupId: "customer_group_id",
|
|
68
67
|
productId: "product_id",
|
|
68
|
+
customerGroupId: "customer_group_id",
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
|
|
@@ -26,6 +26,10 @@ export type ListSimilarProductsRequest = {
|
|
|
26
26
|
* json to sort records
|
|
27
27
|
*/
|
|
28
28
|
sortBy?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
31
|
+
*/
|
|
32
|
+
customerGroupId?: string | undefined;
|
|
29
33
|
};
|
|
30
34
|
|
|
31
35
|
export type ListSimilarProductsContent = {
|
|
@@ -55,10 +59,12 @@ export const ListSimilarProductsRequest$inboundSchema: z.ZodType<
|
|
|
55
59
|
page: z.number().int().optional(),
|
|
56
60
|
limit: z.number().int().optional(),
|
|
57
61
|
sort_by: z.string().optional(),
|
|
62
|
+
customer_group_id: z.string().optional(),
|
|
58
63
|
}).transform((v) => {
|
|
59
64
|
return remap$(v, {
|
|
60
65
|
"product_id": "productId",
|
|
61
66
|
"sort_by": "sortBy",
|
|
67
|
+
"customer_group_id": "customerGroupId",
|
|
62
68
|
});
|
|
63
69
|
});
|
|
64
70
|
|
|
@@ -68,6 +74,7 @@ export type ListSimilarProductsRequest$Outbound = {
|
|
|
68
74
|
page?: number | undefined;
|
|
69
75
|
limit?: number | undefined;
|
|
70
76
|
sort_by?: string | undefined;
|
|
77
|
+
customer_group_id?: string | undefined;
|
|
71
78
|
};
|
|
72
79
|
|
|
73
80
|
/** @internal */
|
|
@@ -80,10 +87,12 @@ export const ListSimilarProductsRequest$outboundSchema: z.ZodType<
|
|
|
80
87
|
page: z.number().int().optional(),
|
|
81
88
|
limit: z.number().int().optional(),
|
|
82
89
|
sortBy: z.string().optional(),
|
|
90
|
+
customerGroupId: z.string().optional(),
|
|
83
91
|
}).transform((v) => {
|
|
84
92
|
return remap$(v, {
|
|
85
93
|
productId: "product_id",
|
|
86
94
|
sortBy: "sort_by",
|
|
95
|
+
customerGroupId: "customer_group_id",
|
|
87
96
|
});
|
|
88
97
|
});
|
|
89
98
|
|
|
@@ -26,14 +26,14 @@ export type ListSkusRequest = {
|
|
|
26
26
|
* filter sku by categories
|
|
27
27
|
*/
|
|
28
28
|
categoryId?: Array<string> | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* use this param only if different pricing is configured as per customer group
|
|
31
|
-
*/
|
|
32
|
-
customerGroupId?: string | undefined;
|
|
33
29
|
/**
|
|
34
30
|
* array of sku
|
|
35
31
|
*/
|
|
36
32
|
sku?: Array<string> | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
35
|
+
*/
|
|
36
|
+
customerGroupId?: string | undefined;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export type ListSkusContent = {
|
|
@@ -63,8 +63,8 @@ export const ListSkusRequest$inboundSchema: z.ZodType<
|
|
|
63
63
|
limit: z.number().int().optional(),
|
|
64
64
|
sort_by: z.string().optional(),
|
|
65
65
|
category_id: z.array(z.string()).optional(),
|
|
66
|
-
customer_group_id: z.string().optional(),
|
|
67
66
|
sku: z.array(z.string()).optional(),
|
|
67
|
+
customer_group_id: z.string().optional(),
|
|
68
68
|
}).transform((v) => {
|
|
69
69
|
return remap$(v, {
|
|
70
70
|
"sort_by": "sortBy",
|
|
@@ -79,8 +79,8 @@ export type ListSkusRequest$Outbound = {
|
|
|
79
79
|
limit?: number | undefined;
|
|
80
80
|
sort_by?: string | undefined;
|
|
81
81
|
category_id?: Array<string> | undefined;
|
|
82
|
-
customer_group_id?: string | undefined;
|
|
83
82
|
sku?: Array<string> | undefined;
|
|
83
|
+
customer_group_id?: string | undefined;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
/** @internal */
|
|
@@ -93,8 +93,8 @@ export const ListSkusRequest$outboundSchema: z.ZodType<
|
|
|
93
93
|
limit: z.number().int().optional(),
|
|
94
94
|
sortBy: z.string().optional(),
|
|
95
95
|
categoryId: z.array(z.string()).optional(),
|
|
96
|
-
customerGroupId: z.string().optional(),
|
|
97
96
|
sku: z.array(z.string()).optional(),
|
|
97
|
+
customerGroupId: z.string().optional(),
|
|
98
98
|
}).transform((v) => {
|
|
99
99
|
return remap$(v, {
|
|
100
100
|
sortBy: "sort_by",
|
|
@@ -26,6 +26,10 @@ export type ListUpsellProductsRequest = {
|
|
|
26
26
|
* json to sort records
|
|
27
27
|
*/
|
|
28
28
|
sortBy?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
31
|
+
*/
|
|
32
|
+
customerGroupId?: string | undefined;
|
|
29
33
|
};
|
|
30
34
|
|
|
31
35
|
export type ListUpsellProductsContent = {
|
|
@@ -58,10 +62,12 @@ export const ListUpsellProductsRequest$inboundSchema: z.ZodType<
|
|
|
58
62
|
page: z.number().int().optional(),
|
|
59
63
|
limit: z.number().int().optional(),
|
|
60
64
|
sort_by: z.string().optional(),
|
|
65
|
+
customer_group_id: z.string().optional(),
|
|
61
66
|
}).transform((v) => {
|
|
62
67
|
return remap$(v, {
|
|
63
68
|
"product_id": "productId",
|
|
64
69
|
"sort_by": "sortBy",
|
|
70
|
+
"customer_group_id": "customerGroupId",
|
|
65
71
|
});
|
|
66
72
|
});
|
|
67
73
|
|
|
@@ -71,6 +77,7 @@ export type ListUpsellProductsRequest$Outbound = {
|
|
|
71
77
|
page?: number | undefined;
|
|
72
78
|
limit?: number | undefined;
|
|
73
79
|
sort_by?: string | undefined;
|
|
80
|
+
customer_group_id?: string | undefined;
|
|
74
81
|
};
|
|
75
82
|
|
|
76
83
|
/** @internal */
|
|
@@ -83,10 +90,12 @@ export const ListUpsellProductsRequest$outboundSchema: z.ZodType<
|
|
|
83
90
|
page: z.number().int().optional(),
|
|
84
91
|
limit: z.number().int().optional(),
|
|
85
92
|
sortBy: z.string().optional(),
|
|
93
|
+
customerGroupId: z.string().optional(),
|
|
86
94
|
}).transform((v) => {
|
|
87
95
|
return remap$(v, {
|
|
88
96
|
productId: "product_id",
|
|
89
97
|
sortBy: "sort_by",
|
|
98
|
+
customerGroupId: "customer_group_id",
|
|
90
99
|
});
|
|
91
100
|
});
|
|
92
101
|
|
package/src/sdk/catalog.ts
CHANGED
|
@@ -57,7 +57,7 @@ export class Catalog extends ClientSDK {
|
|
|
57
57
|
* Retrieve a product detail
|
|
58
58
|
*
|
|
59
59
|
* @remarks
|
|
60
|
-
* Retrieves the details of an existing product. Supply the unique product ID
|
|
60
|
+
* Retrieves the details of an existing product. Supply either the unique product ID or the unique slug, and Commerce Engine will return the corresponding product information.
|
|
61
61
|
*/
|
|
62
62
|
async getProductDetail(
|
|
63
63
|
request: operations.GetProductDetailRequest,
|