ce-storefront 0.13.0 → 0.13.2
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 +55 -99
- 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.js +2 -5
- 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/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 +2 -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/appliedpromotion.d.ts +8 -8
- package/esm/models/components/appliedpromotion.d.ts.map +1 -1
- package/esm/models/components/appliedpromotion.js +12 -12
- package/esm/models/components/appliedpromotion.js.map +1 -1
- package/esm/models/components/discountbasedpromotion.d.ts +31 -0
- package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +21 -0
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.d.ts +34 -2
- package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +23 -2
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.d.ts +32 -0
- package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
- package/esm/models/components/freegoodspromotion.js +21 -0
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/item.d.ts +8 -0
- package/esm/models/components/item.d.ts.map +1 -1
- package/esm/models/components/item.js +5 -0
- package/esm/models/components/item.js.map +1 -1
- package/esm/models/components/product.d.ts +5 -0
- package/esm/models/components/product.d.ts.map +1 -1
- package/esm/models/components/product.js +2 -0
- package/esm/models/components/product.js.map +1 -1
- package/esm/models/components/productbundleitem.d.ts +8 -0
- package/esm/models/components/productbundleitem.d.ts.map +1 -1
- package/esm/models/components/productbundleitem.js +5 -0
- package/esm/models/components/productbundleitem.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +5 -0
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +2 -0
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +2 -14
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/components/productshipping.d.ts +8 -16
- package/esm/models/components/productshipping.d.ts.map +1 -1
- package/esm/models/components/productshipping.js +12 -28
- package/esm/models/components/productshipping.js.map +1 -1
- package/esm/models/components/variant.d.ts +5 -0
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +2 -0
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +5 -0
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +2 -0
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/components/volumebasedpromotion.d.ts +34 -2
- package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +23 -2
- package/esm/models/components/volumebasedpromotion.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/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 +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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/catalogGetProductDetail.ts +6 -6
- package/src/funcs/catalogGetVariantDetail.ts +6 -6
- package/src/funcs/catalogListCrosssellProducts.ts +6 -1
- package/src/funcs/catalogListProductVariants.ts +6 -6
- package/src/funcs/catalogListProducts.ts +6 -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/appliedpromotion.ts +18 -16
- package/src/models/components/discountbasedpromotion.ts +30 -1
- package/src/models/components/fixedpricepromotion.ts +36 -4
- package/src/models/components/freegoodspromotion.ts +33 -1
- package/src/models/components/item.ts +17 -0
- package/src/models/components/product.ts +7 -0
- package/src/models/components/productbundleitem.ts +17 -0
- package/src/models/components/productdetail.ts +7 -0
- package/src/models/components/productshipping.ts +20 -44
- package/src/models/components/variant.ts +7 -0
- package/src/models/components/variantdetail.ts +7 -0
- package/src/models/components/volumebasedpromotion.ts +37 -4
- 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/listcrosssellproducts.ts +9 -0
- package/src/models/operations/listproducts.ts +1 -1
- 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
|
@@ -5,9 +5,20 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
12
|
+
export const VolumeBasedPromotionPromotionType = {
|
|
13
|
+
Discount: "discount",
|
|
14
|
+
VolumeBased: "volume-based",
|
|
15
|
+
FixedPrice: "fixed-price",
|
|
16
|
+
FreeGoods: "free-goods",
|
|
17
|
+
} as const;
|
|
18
|
+
export type VolumeBasedPromotionPromotionType = ClosedEnum<
|
|
19
|
+
typeof VolumeBasedPromotionPromotionType
|
|
20
|
+
>;
|
|
21
|
+
|
|
11
22
|
export type Slabs = {
|
|
12
23
|
/**
|
|
13
24
|
* The minimum quantity required to qualify for the discount.
|
|
@@ -20,10 +31,32 @@ export type Slabs = {
|
|
|
20
31
|
};
|
|
21
32
|
|
|
22
33
|
export type VolumeBasedPromotion = {
|
|
23
|
-
promotionType?: "
|
|
34
|
+
promotionType?: "volume-based" | undefined;
|
|
24
35
|
slabs: Array<Slabs>;
|
|
25
36
|
};
|
|
26
37
|
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const VolumeBasedPromotionPromotionType$inboundSchema: z.ZodNativeEnum<
|
|
40
|
+
typeof VolumeBasedPromotionPromotionType
|
|
41
|
+
> = z.nativeEnum(VolumeBasedPromotionPromotionType);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const VolumeBasedPromotionPromotionType$outboundSchema: z.ZodNativeEnum<
|
|
45
|
+
typeof VolumeBasedPromotionPromotionType
|
|
46
|
+
> = VolumeBasedPromotionPromotionType$inboundSchema;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace VolumeBasedPromotionPromotionType$ {
|
|
53
|
+
/** @deprecated use `VolumeBasedPromotionPromotionType$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = VolumeBasedPromotionPromotionType$inboundSchema;
|
|
55
|
+
/** @deprecated use `VolumeBasedPromotionPromotionType$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema =
|
|
57
|
+
VolumeBasedPromotionPromotionType$outboundSchema;
|
|
58
|
+
}
|
|
59
|
+
|
|
27
60
|
/** @internal */
|
|
28
61
|
export const Slabs$inboundSchema: z.ZodType<Slabs, z.ZodTypeDef, unknown> = z
|
|
29
62
|
.object({
|
|
@@ -90,7 +123,7 @@ export const VolumeBasedPromotion$inboundSchema: z.ZodType<
|
|
|
90
123
|
z.ZodTypeDef,
|
|
91
124
|
unknown
|
|
92
125
|
> = z.object({
|
|
93
|
-
promotion_type: z.literal("
|
|
126
|
+
promotion_type: z.literal("volume-based").optional(),
|
|
94
127
|
slabs: z.array(z.lazy(() => Slabs$inboundSchema)),
|
|
95
128
|
}).transform((v) => {
|
|
96
129
|
return remap$(v, {
|
|
@@ -100,7 +133,7 @@ export const VolumeBasedPromotion$inboundSchema: z.ZodType<
|
|
|
100
133
|
|
|
101
134
|
/** @internal */
|
|
102
135
|
export type VolumeBasedPromotion$Outbound = {
|
|
103
|
-
promotion_type: "
|
|
136
|
+
promotion_type: "volume-based";
|
|
104
137
|
slabs: Array<Slabs$Outbound>;
|
|
105
138
|
};
|
|
106
139
|
|
|
@@ -110,7 +143,7 @@ export const VolumeBasedPromotion$outboundSchema: z.ZodType<
|
|
|
110
143
|
z.ZodTypeDef,
|
|
111
144
|
VolumeBasedPromotion
|
|
112
145
|
> = z.object({
|
|
113
|
-
promotionType: z.literal("
|
|
146
|
+
promotionType: z.literal("volume-based").default("volume-based"),
|
|
114
147
|
slabs: z.array(z.lazy(() => Slabs$outboundSchema)),
|
|
115
148
|
}).transform((v) => {
|
|
116
149
|
return remap$(v, {
|
|
@@ -3,22 +3,37 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export class CeError extends Error {
|
|
6
|
+
/**
|
|
7
|
+
* HTTP status code
|
|
8
|
+
*/
|
|
6
9
|
public readonly statusCode: number;
|
|
10
|
+
/**
|
|
11
|
+
* HTTP content type
|
|
12
|
+
*/
|
|
7
13
|
public readonly contentType: string;
|
|
14
|
+
/**
|
|
15
|
+
* HTTP body
|
|
16
|
+
*/
|
|
17
|
+
public readonly body: string;
|
|
18
|
+
/**
|
|
19
|
+
* Raw response
|
|
20
|
+
*/
|
|
21
|
+
public readonly rawResponse: Response;
|
|
8
22
|
|
|
9
23
|
constructor(
|
|
10
24
|
message: string,
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
rawResponse: Response,
|
|
26
|
+
body: string = "",
|
|
13
27
|
) {
|
|
14
28
|
const statusCode = rawResponse.status;
|
|
15
29
|
const contentType = rawResponse.headers.get("content-type") || "";
|
|
16
30
|
const bodyString = body.length > 0 ? `\n${body}` : "";
|
|
17
|
-
|
|
18
31
|
super(
|
|
19
32
|
`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`,
|
|
20
33
|
);
|
|
21
34
|
|
|
35
|
+
this.body = body;
|
|
36
|
+
this.rawResponse = rawResponse;
|
|
22
37
|
this.statusCode = statusCode;
|
|
23
38
|
this.contentType = contentType;
|
|
24
39
|
|
|
@@ -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 GetProductDetailRequest = {
|
|
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 | undefined;
|
|
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 GetProductDetailContent = {
|
|
@@ -39,19 +39,19 @@ export const GetProductDetailRequest$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().default("1"),
|
|
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 GetProductDetailRequest$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 GetProductDetailRequest$outboundSchema: z.ZodType<
|
|
|
60
60
|
z.ZodTypeDef,
|
|
61
61
|
GetProductDetailRequest
|
|
62
62
|
> = z.object({
|
|
63
|
-
customerGroupId: z.string().optional(),
|
|
64
63
|
productId: z.string().default("1"),
|
|
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
|
|
|
@@ -10,10 +10,6 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type GetVariantDetailRequest = {
|
|
13
|
-
/**
|
|
14
|
-
* use this param only if different pricing is configured as per customer group
|
|
15
|
-
*/
|
|
16
|
-
customerGroupId?: string | undefined;
|
|
17
13
|
/**
|
|
18
14
|
* product id
|
|
19
15
|
*/
|
|
@@ -22,6 +18,10 @@ export type GetVariantDetailRequest = {
|
|
|
22
18
|
* variant id
|
|
23
19
|
*/
|
|
24
20
|
variantId: string;
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
customerGroupId?: string | undefined;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export type GetVariantDetailContent = {
|
|
@@ -43,22 +43,22 @@ export const GetVariantDetailRequest$inboundSchema: z.ZodType<
|
|
|
43
43
|
z.ZodTypeDef,
|
|
44
44
|
unknown
|
|
45
45
|
> = z.object({
|
|
46
|
-
customer_group_id: z.string().optional(),
|
|
47
46
|
product_id: z.string(),
|
|
48
47
|
variant_id: z.string(),
|
|
48
|
+
customer_group_id: z.string().optional(),
|
|
49
49
|
}).transform((v) => {
|
|
50
50
|
return remap$(v, {
|
|
51
|
-
"customer_group_id": "customerGroupId",
|
|
52
51
|
"product_id": "productId",
|
|
53
52
|
"variant_id": "variantId",
|
|
53
|
+
"customer_group_id": "customerGroupId",
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
/** @internal */
|
|
58
58
|
export type GetVariantDetailRequest$Outbound = {
|
|
59
|
-
customer_group_id?: string | undefined;
|
|
60
59
|
product_id: string;
|
|
61
60
|
variant_id: string;
|
|
61
|
+
customer_group_id?: string | undefined;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
/** @internal */
|
|
@@ -67,14 +67,14 @@ export const GetVariantDetailRequest$outboundSchema: z.ZodType<
|
|
|
67
67
|
z.ZodTypeDef,
|
|
68
68
|
GetVariantDetailRequest
|
|
69
69
|
> = z.object({
|
|
70
|
-
customerGroupId: z.string().optional(),
|
|
71
70
|
productId: z.string(),
|
|
72
71
|
variantId: z.string(),
|
|
72
|
+
customerGroupId: z.string().optional(),
|
|
73
73
|
}).transform((v) => {
|
|
74
74
|
return remap$(v, {
|
|
75
|
-
customerGroupId: "customer_group_id",
|
|
76
75
|
productId: "product_id",
|
|
77
76
|
variantId: "variant_id",
|
|
77
|
+
customerGroupId: "customer_group_id",
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
@@ -26,6 +26,10 @@ export type ListCrosssellProductsRequest = {
|
|
|
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 ListCrosssellProductsContent = {
|
|
@@ -55,10 +59,12 @@ export const ListCrosssellProductsRequest$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 ListCrosssellProductsRequest$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 ListCrosssellProductsRequest$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
|
|
|
@@ -27,7 +27,7 @@ export type ListProductsRequest = {
|
|
|
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
33
|
};
|
|
@@ -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
|
|