ce-storefront 0.14.0 → 0.14.1
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/docs/sdks/catalog/README.md +7 -3
- package/esm/funcs/catalogGetProductDetail.js +1 -1
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +1 -1
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +1 -1
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.js +1 -1
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +1 -1
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.js +1 -1
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +1 -1
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.d.ts +1 -2
- package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +4 -4
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/files.d.ts +5 -0
- package/esm/lib/files.d.ts.map +1 -1
- package/esm/lib/files.js +40 -0
- package/esm/lib/files.js.map +1 -1
- package/esm/lib/security.d.ts +2 -2
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/models/components/coloroption.js +1 -1
- package/esm/models/components/coloroption.js.map +1 -1
- package/esm/models/components/customeraddress.js +1 -1
- package/esm/models/components/customeraddress.js.map +1 -1
- package/esm/models/components/customeraddressinput.js +1 -1
- package/esm/models/components/customeraddressinput.js.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +1 -1
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +1 -1
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.js +1 -1
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/generateotpwithemail.js +1 -1
- package/esm/models/components/generateotpwithemail.js.map +1 -1
- package/esm/models/components/juspaypaymentinfo.d.ts.map +1 -1
- package/esm/models/components/juspaypaymentinfo.js +3 -2
- package/esm/models/components/juspaypaymentinfo.js.map +1 -1
- package/esm/models/components/orderpayment.d.ts +2 -2
- package/esm/models/components/orderpayment.d.ts.map +1 -1
- package/esm/models/components/orderpayment.js +2 -2
- package/esm/models/components/orderpayment.js.map +1 -1
- package/esm/models/components/payupaymentinfo.js +3 -3
- package/esm/models/components/payupaymentinfo.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +20 -20
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/components/productpromotion.js +16 -16
- package/esm/models/components/productpromotion.js.map +1 -1
- package/esm/models/components/searchproduct.d.ts +0 -5
- package/esm/models/components/searchproduct.d.ts.map +1 -1
- package/esm/models/components/searchproduct.js +0 -11
- package/esm/models/components/searchproduct.js.map +1 -1
- package/esm/models/components/singleselectoption.js +1 -1
- package/esm/models/components/singleselectoption.js.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +1 -1
- package/esm/models/components/volumebasedpromotion.js.map +1 -1
- package/esm/models/operations/createaddress.js +1 -1
- package/esm/models/operations/createaddress.js.map +1 -1
- package/esm/models/operations/createorder.d.ts +16 -16
- package/esm/models/operations/createorder.d.ts.map +1 -1
- package/esm/models/operations/createorder.js +12 -12
- package/esm/models/operations/createorder.js.map +1 -1
- package/esm/models/operations/generateotp.d.ts +2 -2
- package/esm/models/operations/generateotp.js +2 -2
- package/esm/models/operations/getaddressdetail.js +1 -1
- package/esm/models/operations/getaddressdetail.js.map +1 -1
- package/esm/models/operations/getproductdetail.d.ts +3 -3
- 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 +3 -3
- 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/listaddresses.js +1 -1
- package/esm/models/operations/listaddresses.js.map +1 -1
- package/esm/models/operations/listcrosssellproducts.d.ts +3 -3
- package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
- package/esm/models/operations/listcrosssellproducts.js +4 -4
- package/esm/models/operations/listcrosssellproducts.js.map +1 -1
- package/esm/models/operations/listproducts.d.ts +3 -3
- package/esm/models/operations/listproducts.d.ts.map +1 -1
- package/esm/models/operations/listproducts.js +4 -4
- package/esm/models/operations/listproducts.js.map +1 -1
- package/esm/models/operations/listproductvariants.d.ts +3 -3
- 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 +3 -3
- package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
- package/esm/models/operations/listsimilarproducts.js +4 -4
- package/esm/models/operations/listsimilarproducts.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +3 -3
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +4 -4
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/listupsellproducts.d.ts +3 -3
- package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
- package/esm/models/operations/listupsellproducts.js +4 -4
- package/esm/models/operations/listupsellproducts.js.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.js +1 -1
- package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
- package/esm/models/operations/retryorderpayment.d.ts +16 -16
- package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
- package/esm/models/operations/retryorderpayment.js +12 -12
- package/esm/models/operations/retryorderpayment.js.map +1 -1
- package/esm/models/operations/searchproducts.d.ts +30 -0
- package/esm/models/operations/searchproducts.d.ts.map +1 -1
- package/esm/models/operations/searchproducts.js +37 -0
- package/esm/models/operations/searchproducts.js.map +1 -1
- package/esm/models/operations/updateaddressdetail.js +1 -1
- package/esm/models/operations/updateaddressdetail.js.map +1 -1
- package/esm/sdk/catalog.d.ts +1 -2
- package/esm/sdk/catalog.d.ts.map +1 -1
- package/esm/sdk/catalog.js.map +1 -1
- package/esm/types/constdatetime.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/catalogGetProductDetail.ts +3 -3
- package/src/funcs/catalogGetVariantDetail.ts +3 -3
- package/src/funcs/catalogListCrosssellProducts.ts +3 -3
- package/src/funcs/catalogListProductVariants.ts +3 -3
- package/src/funcs/catalogListProducts.ts +3 -3
- package/src/funcs/catalogListSimilarProducts.ts +3 -3
- package/src/funcs/catalogListSkus.ts +3 -3
- package/src/funcs/catalogListUpsellProducts.ts +3 -3
- package/src/funcs/catalogSearchProducts.ts +10 -6
- package/src/lib/config.ts +3 -3
- package/src/lib/files.ts +42 -0
- package/src/lib/security.ts +2 -2
- package/src/models/components/coloroption.ts +1 -1
- package/src/models/components/customeraddress.ts +1 -1
- package/src/models/components/customeraddressinput.ts +1 -1
- package/src/models/components/discountbasedpromotion.ts +1 -1
- package/src/models/components/fixedpricepromotion.ts +1 -1
- package/src/models/components/freegoodspromotion.ts +1 -1
- package/src/models/components/generateotpwithemail.ts +1 -1
- package/src/models/components/juspaypaymentinfo.ts +3 -2
- package/src/models/components/orderpayment.ts +4 -4
- package/src/models/components/payupaymentinfo.ts +3 -3
- package/src/models/components/productpromotion.ts +48 -48
- package/src/models/components/searchproduct.ts +0 -16
- package/src/models/components/singleselectoption.ts +1 -1
- package/src/models/components/volumebasedpromotion.ts +1 -1
- package/src/models/operations/createaddress.ts +1 -1
- package/src/models/operations/createorder.ts +37 -35
- package/src/models/operations/generateotp.ts +6 -6
- package/src/models/operations/getaddressdetail.ts +1 -1
- package/src/models/operations/getproductdetail.ts +7 -7
- package/src/models/operations/getvariantdetail.ts +7 -7
- package/src/models/operations/listaddresses.ts +1 -1
- package/src/models/operations/listcrosssellproducts.ts +7 -7
- package/src/models/operations/listproducts.ts +7 -7
- package/src/models/operations/listproductvariants.ts +7 -7
- package/src/models/operations/listsimilarproducts.ts +7 -7
- package/src/models/operations/listskus.ts +7 -7
- package/src/models/operations/listupsellproducts.ts +7 -7
- package/src/models/operations/loginwithwhatsapp.ts +1 -1
- package/src/models/operations/retryorderpayment.ts +37 -35
- package/src/models/operations/searchproducts.ts +75 -0
- package/src/models/operations/updateaddressdetail.ts +1 -1
- package/src/sdk/catalog.ts +1 -2
- package/src/types/constdatetime.ts +1 -1
|
@@ -10,13 +10,13 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type RetryOrderPaymentPaymentGatewayParams =
|
|
13
|
-
| (components.
|
|
14
|
-
| (components.
|
|
13
|
+
| (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" })
|
|
14
|
+
| (components.PayuPaymentGatewayParams & { paymentGateway: "PAYU" });
|
|
15
15
|
|
|
16
16
|
export type RetryOrderPaymentRequestBody = {
|
|
17
17
|
paymentGatewayParams:
|
|
18
|
-
| (components.
|
|
19
|
-
| (components.
|
|
18
|
+
| (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" })
|
|
19
|
+
| (components.PayuPaymentGatewayParams & { paymentGateway: "PAYU" });
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type RetryOrderPaymentRequest = {
|
|
@@ -28,11 +28,11 @@ export type RetryOrderPaymentRequest = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export type RetryOrderPaymentPaymentInfo =
|
|
31
|
-
| components.
|
|
32
|
-
| components.
|
|
31
|
+
| components.PayuPaymentInfo
|
|
32
|
+
| components.JuspayPaymentInfo;
|
|
33
33
|
|
|
34
34
|
export type RetryOrderPaymentContent = {
|
|
35
|
-
paymentInfo: components.
|
|
35
|
+
paymentInfo: components.PayuPaymentInfo | components.JuspayPaymentInfo;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -50,13 +50,13 @@ export const RetryOrderPaymentPaymentGatewayParams$inboundSchema: z.ZodType<
|
|
|
50
50
|
z.ZodTypeDef,
|
|
51
51
|
unknown
|
|
52
52
|
> = z.union([
|
|
53
|
-
components.
|
|
54
|
-
z.object({ payment_gateway: z.literal("
|
|
53
|
+
components.JuspayPaymentGatewayParams$inboundSchema.and(
|
|
54
|
+
z.object({ payment_gateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
55
55
|
paymentGateway: v.payment_gateway,
|
|
56
56
|
})),
|
|
57
57
|
),
|
|
58
|
-
components.
|
|
59
|
-
z.object({ payment_gateway: z.literal("
|
|
58
|
+
components.PayuPaymentGatewayParams$inboundSchema.and(
|
|
59
|
+
z.object({ payment_gateway: z.literal("PAYU") }).transform((v) => ({
|
|
60
60
|
paymentGateway: v.payment_gateway,
|
|
61
61
|
})),
|
|
62
62
|
),
|
|
@@ -64,9 +64,11 @@ export const RetryOrderPaymentPaymentGatewayParams$inboundSchema: z.ZodType<
|
|
|
64
64
|
|
|
65
65
|
/** @internal */
|
|
66
66
|
export type RetryOrderPaymentPaymentGatewayParams$Outbound =
|
|
67
|
-
| (components.PayuPaymentGatewayParams$Outbound & { payment_gateway: "PAYU" })
|
|
68
67
|
| (components.JuspayPaymentGatewayParams$Outbound & {
|
|
69
68
|
payment_gateway: "JUSPAY";
|
|
69
|
+
})
|
|
70
|
+
| (components.PayuPaymentGatewayParams$Outbound & {
|
|
71
|
+
payment_gateway: "PAYU";
|
|
70
72
|
});
|
|
71
73
|
|
|
72
74
|
/** @internal */
|
|
@@ -75,13 +77,13 @@ export const RetryOrderPaymentPaymentGatewayParams$outboundSchema: z.ZodType<
|
|
|
75
77
|
z.ZodTypeDef,
|
|
76
78
|
RetryOrderPaymentPaymentGatewayParams
|
|
77
79
|
> = z.union([
|
|
78
|
-
components.
|
|
79
|
-
z.object({ paymentGateway: z.literal("
|
|
80
|
+
components.JuspayPaymentGatewayParams$outboundSchema.and(
|
|
81
|
+
z.object({ paymentGateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
80
82
|
payment_gateway: v.paymentGateway,
|
|
81
83
|
})),
|
|
82
84
|
),
|
|
83
|
-
components.
|
|
84
|
-
z.object({ paymentGateway: z.literal("
|
|
85
|
+
components.PayuPaymentGatewayParams$outboundSchema.and(
|
|
86
|
+
z.object({ paymentGateway: z.literal("PAYU") }).transform((v) => ({
|
|
85
87
|
payment_gateway: v.paymentGateway,
|
|
86
88
|
})),
|
|
87
89
|
),
|
|
@@ -130,13 +132,13 @@ export const RetryOrderPaymentRequestBody$inboundSchema: z.ZodType<
|
|
|
130
132
|
unknown
|
|
131
133
|
> = z.object({
|
|
132
134
|
payment_gateway_params: z.union([
|
|
133
|
-
components.
|
|
134
|
-
z.object({ payment_gateway: z.literal("
|
|
135
|
+
components.JuspayPaymentGatewayParams$inboundSchema.and(
|
|
136
|
+
z.object({ payment_gateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
135
137
|
paymentGateway: v.payment_gateway,
|
|
136
138
|
})),
|
|
137
139
|
),
|
|
138
|
-
components.
|
|
139
|
-
z.object({ payment_gateway: z.literal("
|
|
140
|
+
components.PayuPaymentGatewayParams$inboundSchema.and(
|
|
141
|
+
z.object({ payment_gateway: z.literal("PAYU") }).transform((v) => ({
|
|
140
142
|
paymentGateway: v.payment_gateway,
|
|
141
143
|
})),
|
|
142
144
|
),
|
|
@@ -150,11 +152,11 @@ export const RetryOrderPaymentRequestBody$inboundSchema: z.ZodType<
|
|
|
150
152
|
/** @internal */
|
|
151
153
|
export type RetryOrderPaymentRequestBody$Outbound = {
|
|
152
154
|
payment_gateway_params:
|
|
153
|
-
| (components.PayuPaymentGatewayParams$Outbound & {
|
|
154
|
-
payment_gateway: "PAYU";
|
|
155
|
-
})
|
|
156
155
|
| (components.JuspayPaymentGatewayParams$Outbound & {
|
|
157
156
|
payment_gateway: "JUSPAY";
|
|
157
|
+
})
|
|
158
|
+
| (components.PayuPaymentGatewayParams$Outbound & {
|
|
159
|
+
payment_gateway: "PAYU";
|
|
158
160
|
});
|
|
159
161
|
};
|
|
160
162
|
|
|
@@ -165,13 +167,13 @@ export const RetryOrderPaymentRequestBody$outboundSchema: z.ZodType<
|
|
|
165
167
|
RetryOrderPaymentRequestBody
|
|
166
168
|
> = z.object({
|
|
167
169
|
paymentGatewayParams: z.union([
|
|
168
|
-
components.
|
|
169
|
-
z.object({ paymentGateway: z.literal("
|
|
170
|
+
components.JuspayPaymentGatewayParams$outboundSchema.and(
|
|
171
|
+
z.object({ paymentGateway: z.literal("JUSPAY") }).transform((v) => ({
|
|
170
172
|
payment_gateway: v.paymentGateway,
|
|
171
173
|
})),
|
|
172
174
|
),
|
|
173
|
-
components.
|
|
174
|
-
z.object({ paymentGateway: z.literal("
|
|
175
|
+
components.PayuPaymentGatewayParams$outboundSchema.and(
|
|
176
|
+
z.object({ paymentGateway: z.literal("PAYU") }).transform((v) => ({
|
|
175
177
|
payment_gateway: v.paymentGateway,
|
|
176
178
|
})),
|
|
177
179
|
),
|
|
@@ -288,14 +290,14 @@ export const RetryOrderPaymentPaymentInfo$inboundSchema: z.ZodType<
|
|
|
288
290
|
z.ZodTypeDef,
|
|
289
291
|
unknown
|
|
290
292
|
> = z.union([
|
|
291
|
-
components.JuspayPaymentInfo$inboundSchema,
|
|
292
293
|
components.PayuPaymentInfo$inboundSchema,
|
|
294
|
+
components.JuspayPaymentInfo$inboundSchema,
|
|
293
295
|
]);
|
|
294
296
|
|
|
295
297
|
/** @internal */
|
|
296
298
|
export type RetryOrderPaymentPaymentInfo$Outbound =
|
|
297
|
-
| components.
|
|
298
|
-
| components.
|
|
299
|
+
| components.PayuPaymentInfo$Outbound
|
|
300
|
+
| components.JuspayPaymentInfo$Outbound;
|
|
299
301
|
|
|
300
302
|
/** @internal */
|
|
301
303
|
export const RetryOrderPaymentPaymentInfo$outboundSchema: z.ZodType<
|
|
@@ -303,8 +305,8 @@ export const RetryOrderPaymentPaymentInfo$outboundSchema: z.ZodType<
|
|
|
303
305
|
z.ZodTypeDef,
|
|
304
306
|
RetryOrderPaymentPaymentInfo
|
|
305
307
|
> = z.union([
|
|
306
|
-
components.JuspayPaymentInfo$outboundSchema,
|
|
307
308
|
components.PayuPaymentInfo$outboundSchema,
|
|
309
|
+
components.JuspayPaymentInfo$outboundSchema,
|
|
308
310
|
]);
|
|
309
311
|
|
|
310
312
|
/**
|
|
@@ -347,8 +349,8 @@ export const RetryOrderPaymentContent$inboundSchema: z.ZodType<
|
|
|
347
349
|
unknown
|
|
348
350
|
> = z.object({
|
|
349
351
|
payment_info: z.union([
|
|
350
|
-
components.JuspayPaymentInfo$inboundSchema,
|
|
351
352
|
components.PayuPaymentInfo$inboundSchema,
|
|
353
|
+
components.JuspayPaymentInfo$inboundSchema,
|
|
352
354
|
]),
|
|
353
355
|
}).transform((v) => {
|
|
354
356
|
return remap$(v, {
|
|
@@ -359,8 +361,8 @@ export const RetryOrderPaymentContent$inboundSchema: z.ZodType<
|
|
|
359
361
|
/** @internal */
|
|
360
362
|
export type RetryOrderPaymentContent$Outbound = {
|
|
361
363
|
payment_info:
|
|
362
|
-
| components.
|
|
363
|
-
| components.
|
|
364
|
+
| components.PayuPaymentInfo$Outbound
|
|
365
|
+
| components.JuspayPaymentInfo$Outbound;
|
|
364
366
|
};
|
|
365
367
|
|
|
366
368
|
/** @internal */
|
|
@@ -370,8 +372,8 @@ export const RetryOrderPaymentContent$outboundSchema: z.ZodType<
|
|
|
370
372
|
RetryOrderPaymentContent
|
|
371
373
|
> = z.object({
|
|
372
374
|
paymentInfo: z.union([
|
|
373
|
-
components.JuspayPaymentInfo$outboundSchema,
|
|
374
375
|
components.PayuPaymentInfo$outboundSchema,
|
|
376
|
+
components.JuspayPaymentInfo$outboundSchema,
|
|
375
377
|
]),
|
|
376
378
|
}).transform((v) => {
|
|
377
379
|
return remap$(v, {
|
|
@@ -9,6 +9,14 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import * as components from "../components/index.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
export type SearchProductsRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* This param 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.
|
|
15
|
+
*/
|
|
16
|
+
xCustomerGroupId?: string | undefined;
|
|
17
|
+
searchProduct: components.SearchProduct;
|
|
18
|
+
};
|
|
19
|
+
|
|
12
20
|
export type FacetStats = {
|
|
13
21
|
min: number;
|
|
14
22
|
max: number;
|
|
@@ -33,6 +41,73 @@ export type SearchProductsResponseBody = {
|
|
|
33
41
|
content: SearchProductsContent;
|
|
34
42
|
};
|
|
35
43
|
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const SearchProductsRequest$inboundSchema: z.ZodType<
|
|
46
|
+
SearchProductsRequest,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
"x-customer-group-id": z.string().optional(),
|
|
51
|
+
SearchProduct: components.SearchProduct$inboundSchema,
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
"x-customer-group-id": "xCustomerGroupId",
|
|
55
|
+
"SearchProduct": "searchProduct",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type SearchProductsRequest$Outbound = {
|
|
61
|
+
"x-customer-group-id"?: string | undefined;
|
|
62
|
+
SearchProduct: components.SearchProduct$Outbound;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const SearchProductsRequest$outboundSchema: z.ZodType<
|
|
67
|
+
SearchProductsRequest$Outbound,
|
|
68
|
+
z.ZodTypeDef,
|
|
69
|
+
SearchProductsRequest
|
|
70
|
+
> = z.object({
|
|
71
|
+
xCustomerGroupId: z.string().optional(),
|
|
72
|
+
searchProduct: components.SearchProduct$outboundSchema,
|
|
73
|
+
}).transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
xCustomerGroupId: "x-customer-group-id",
|
|
76
|
+
searchProduct: "SearchProduct",
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
83
|
+
*/
|
|
84
|
+
export namespace SearchProductsRequest$ {
|
|
85
|
+
/** @deprecated use `SearchProductsRequest$inboundSchema` instead. */
|
|
86
|
+
export const inboundSchema = SearchProductsRequest$inboundSchema;
|
|
87
|
+
/** @deprecated use `SearchProductsRequest$outboundSchema` instead. */
|
|
88
|
+
export const outboundSchema = SearchProductsRequest$outboundSchema;
|
|
89
|
+
/** @deprecated use `SearchProductsRequest$Outbound` instead. */
|
|
90
|
+
export type Outbound = SearchProductsRequest$Outbound;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function searchProductsRequestToJSON(
|
|
94
|
+
searchProductsRequest: SearchProductsRequest,
|
|
95
|
+
): string {
|
|
96
|
+
return JSON.stringify(
|
|
97
|
+
SearchProductsRequest$outboundSchema.parse(searchProductsRequest),
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function searchProductsRequestFromJSON(
|
|
102
|
+
jsonString: string,
|
|
103
|
+
): SafeParseResult<SearchProductsRequest, SDKValidationError> {
|
|
104
|
+
return safeParse(
|
|
105
|
+
jsonString,
|
|
106
|
+
(x) => SearchProductsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
107
|
+
`Failed to parse 'SearchProductsRequest' from JSON`,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
36
111
|
/** @internal */
|
|
37
112
|
export const FacetStats$inboundSchema: z.ZodType<
|
|
38
113
|
FacetStats,
|
|
@@ -95,7 +95,7 @@ export const UpdateAddressDetailRequestBody$inboundSchema: z.ZodType<
|
|
|
95
95
|
pincode: z.string(),
|
|
96
96
|
city: z.string(),
|
|
97
97
|
state: z.string(),
|
|
98
|
-
country: z.literal("India").optional(),
|
|
98
|
+
country: z.literal("India").default("India").optional(),
|
|
99
99
|
tax_identification_number: z.nullable(z.string()),
|
|
100
100
|
business_name: z.nullable(z.string()),
|
|
101
101
|
is_default_billing: z.boolean().optional(),
|
package/src/sdk/catalog.ts
CHANGED
|
@@ -14,7 +14,6 @@ import { catalogListSkus } from "../funcs/catalogListSkus.js";
|
|
|
14
14
|
import { catalogListUpsellProducts } from "../funcs/catalogListUpsellProducts.js";
|
|
15
15
|
import { catalogSearchProducts } from "../funcs/catalogSearchProducts.js";
|
|
16
16
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
17
|
-
import * as components from "../models/components/index.js";
|
|
18
17
|
import * as operations from "../models/operations/index.js";
|
|
19
18
|
import { unwrapAsync } from "../types/fp.js";
|
|
20
19
|
|
|
@@ -196,7 +195,7 @@ export class Catalog extends ClientSDK {
|
|
|
196
195
|
* Search for products matching a specific words or characters given.
|
|
197
196
|
*/
|
|
198
197
|
async searchProducts(
|
|
199
|
-
request:
|
|
198
|
+
request: operations.SearchProductsRequest,
|
|
200
199
|
options?: RequestOptions,
|
|
201
200
|
): Promise<operations.SearchProductsResponseBody> {
|
|
202
201
|
return unwrapAsync(catalogSearchProducts(
|