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.
Files changed (171) hide show
  1. package/docs/sdks/catalog/README.md +7 -3
  2. package/esm/funcs/catalogGetProductDetail.js +1 -1
  3. package/esm/funcs/catalogGetProductDetail.js.map +1 -1
  4. package/esm/funcs/catalogGetVariantDetail.js +1 -1
  5. package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
  6. package/esm/funcs/catalogListCrosssellProducts.js +1 -1
  7. package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
  8. package/esm/funcs/catalogListProductVariants.js +1 -1
  9. package/esm/funcs/catalogListProductVariants.js.map +1 -1
  10. package/esm/funcs/catalogListProducts.js +1 -1
  11. package/esm/funcs/catalogListProducts.js.map +1 -1
  12. package/esm/funcs/catalogListSimilarProducts.js +1 -1
  13. package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
  14. package/esm/funcs/catalogListSkus.js +1 -1
  15. package/esm/funcs/catalogListSkus.js.map +1 -1
  16. package/esm/funcs/catalogListUpsellProducts.js +1 -1
  17. package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
  18. package/esm/funcs/catalogSearchProducts.d.ts +1 -2
  19. package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
  20. package/esm/funcs/catalogSearchProducts.js +4 -4
  21. package/esm/funcs/catalogSearchProducts.js.map +1 -1
  22. package/esm/lib/config.d.ts +3 -3
  23. package/esm/lib/config.js +3 -3
  24. package/esm/lib/files.d.ts +5 -0
  25. package/esm/lib/files.d.ts.map +1 -1
  26. package/esm/lib/files.js +40 -0
  27. package/esm/lib/files.js.map +1 -1
  28. package/esm/lib/security.d.ts +2 -2
  29. package/esm/lib/security.d.ts.map +1 -1
  30. package/esm/models/components/coloroption.js +1 -1
  31. package/esm/models/components/coloroption.js.map +1 -1
  32. package/esm/models/components/customeraddress.js +1 -1
  33. package/esm/models/components/customeraddress.js.map +1 -1
  34. package/esm/models/components/customeraddressinput.js +1 -1
  35. package/esm/models/components/customeraddressinput.js.map +1 -1
  36. package/esm/models/components/discountbasedpromotion.js +1 -1
  37. package/esm/models/components/discountbasedpromotion.js.map +1 -1
  38. package/esm/models/components/fixedpricepromotion.js +1 -1
  39. package/esm/models/components/fixedpricepromotion.js.map +1 -1
  40. package/esm/models/components/freegoodspromotion.js +1 -1
  41. package/esm/models/components/freegoodspromotion.js.map +1 -1
  42. package/esm/models/components/generateotpwithemail.js +1 -1
  43. package/esm/models/components/generateotpwithemail.js.map +1 -1
  44. package/esm/models/components/juspaypaymentinfo.d.ts.map +1 -1
  45. package/esm/models/components/juspaypaymentinfo.js +3 -2
  46. package/esm/models/components/juspaypaymentinfo.js.map +1 -1
  47. package/esm/models/components/orderpayment.d.ts +2 -2
  48. package/esm/models/components/orderpayment.d.ts.map +1 -1
  49. package/esm/models/components/orderpayment.js +2 -2
  50. package/esm/models/components/orderpayment.js.map +1 -1
  51. package/esm/models/components/payupaymentinfo.js +3 -3
  52. package/esm/models/components/payupaymentinfo.js.map +1 -1
  53. package/esm/models/components/productpromotion.d.ts +20 -20
  54. package/esm/models/components/productpromotion.d.ts.map +1 -1
  55. package/esm/models/components/productpromotion.js +16 -16
  56. package/esm/models/components/productpromotion.js.map +1 -1
  57. package/esm/models/components/searchproduct.d.ts +0 -5
  58. package/esm/models/components/searchproduct.d.ts.map +1 -1
  59. package/esm/models/components/searchproduct.js +0 -11
  60. package/esm/models/components/searchproduct.js.map +1 -1
  61. package/esm/models/components/singleselectoption.js +1 -1
  62. package/esm/models/components/singleselectoption.js.map +1 -1
  63. package/esm/models/components/volumebasedpromotion.js +1 -1
  64. package/esm/models/components/volumebasedpromotion.js.map +1 -1
  65. package/esm/models/operations/createaddress.js +1 -1
  66. package/esm/models/operations/createaddress.js.map +1 -1
  67. package/esm/models/operations/createorder.d.ts +16 -16
  68. package/esm/models/operations/createorder.d.ts.map +1 -1
  69. package/esm/models/operations/createorder.js +12 -12
  70. package/esm/models/operations/createorder.js.map +1 -1
  71. package/esm/models/operations/generateotp.d.ts +2 -2
  72. package/esm/models/operations/generateotp.js +2 -2
  73. package/esm/models/operations/getaddressdetail.js +1 -1
  74. package/esm/models/operations/getaddressdetail.js.map +1 -1
  75. package/esm/models/operations/getproductdetail.d.ts +3 -3
  76. package/esm/models/operations/getproductdetail.d.ts.map +1 -1
  77. package/esm/models/operations/getproductdetail.js +4 -4
  78. package/esm/models/operations/getproductdetail.js.map +1 -1
  79. package/esm/models/operations/getvariantdetail.d.ts +3 -3
  80. package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
  81. package/esm/models/operations/getvariantdetail.js +4 -4
  82. package/esm/models/operations/getvariantdetail.js.map +1 -1
  83. package/esm/models/operations/listaddresses.js +1 -1
  84. package/esm/models/operations/listaddresses.js.map +1 -1
  85. package/esm/models/operations/listcrosssellproducts.d.ts +3 -3
  86. package/esm/models/operations/listcrosssellproducts.d.ts.map +1 -1
  87. package/esm/models/operations/listcrosssellproducts.js +4 -4
  88. package/esm/models/operations/listcrosssellproducts.js.map +1 -1
  89. package/esm/models/operations/listproducts.d.ts +3 -3
  90. package/esm/models/operations/listproducts.d.ts.map +1 -1
  91. package/esm/models/operations/listproducts.js +4 -4
  92. package/esm/models/operations/listproducts.js.map +1 -1
  93. package/esm/models/operations/listproductvariants.d.ts +3 -3
  94. package/esm/models/operations/listproductvariants.d.ts.map +1 -1
  95. package/esm/models/operations/listproductvariants.js +4 -4
  96. package/esm/models/operations/listproductvariants.js.map +1 -1
  97. package/esm/models/operations/listsimilarproducts.d.ts +3 -3
  98. package/esm/models/operations/listsimilarproducts.d.ts.map +1 -1
  99. package/esm/models/operations/listsimilarproducts.js +4 -4
  100. package/esm/models/operations/listsimilarproducts.js.map +1 -1
  101. package/esm/models/operations/listskus.d.ts +3 -3
  102. package/esm/models/operations/listskus.d.ts.map +1 -1
  103. package/esm/models/operations/listskus.js +4 -4
  104. package/esm/models/operations/listskus.js.map +1 -1
  105. package/esm/models/operations/listupsellproducts.d.ts +3 -3
  106. package/esm/models/operations/listupsellproducts.d.ts.map +1 -1
  107. package/esm/models/operations/listupsellproducts.js +4 -4
  108. package/esm/models/operations/listupsellproducts.js.map +1 -1
  109. package/esm/models/operations/loginwithwhatsapp.js +1 -1
  110. package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
  111. package/esm/models/operations/retryorderpayment.d.ts +16 -16
  112. package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
  113. package/esm/models/operations/retryorderpayment.js +12 -12
  114. package/esm/models/operations/retryorderpayment.js.map +1 -1
  115. package/esm/models/operations/searchproducts.d.ts +30 -0
  116. package/esm/models/operations/searchproducts.d.ts.map +1 -1
  117. package/esm/models/operations/searchproducts.js +37 -0
  118. package/esm/models/operations/searchproducts.js.map +1 -1
  119. package/esm/models/operations/updateaddressdetail.js +1 -1
  120. package/esm/models/operations/updateaddressdetail.js.map +1 -1
  121. package/esm/sdk/catalog.d.ts +1 -2
  122. package/esm/sdk/catalog.d.ts.map +1 -1
  123. package/esm/sdk/catalog.js.map +1 -1
  124. package/esm/types/constdatetime.js +1 -1
  125. package/jsr.json +1 -1
  126. package/package.json +1 -1
  127. package/src/funcs/catalogGetProductDetail.ts +3 -3
  128. package/src/funcs/catalogGetVariantDetail.ts +3 -3
  129. package/src/funcs/catalogListCrosssellProducts.ts +3 -3
  130. package/src/funcs/catalogListProductVariants.ts +3 -3
  131. package/src/funcs/catalogListProducts.ts +3 -3
  132. package/src/funcs/catalogListSimilarProducts.ts +3 -3
  133. package/src/funcs/catalogListSkus.ts +3 -3
  134. package/src/funcs/catalogListUpsellProducts.ts +3 -3
  135. package/src/funcs/catalogSearchProducts.ts +10 -6
  136. package/src/lib/config.ts +3 -3
  137. package/src/lib/files.ts +42 -0
  138. package/src/lib/security.ts +2 -2
  139. package/src/models/components/coloroption.ts +1 -1
  140. package/src/models/components/customeraddress.ts +1 -1
  141. package/src/models/components/customeraddressinput.ts +1 -1
  142. package/src/models/components/discountbasedpromotion.ts +1 -1
  143. package/src/models/components/fixedpricepromotion.ts +1 -1
  144. package/src/models/components/freegoodspromotion.ts +1 -1
  145. package/src/models/components/generateotpwithemail.ts +1 -1
  146. package/src/models/components/juspaypaymentinfo.ts +3 -2
  147. package/src/models/components/orderpayment.ts +4 -4
  148. package/src/models/components/payupaymentinfo.ts +3 -3
  149. package/src/models/components/productpromotion.ts +48 -48
  150. package/src/models/components/searchproduct.ts +0 -16
  151. package/src/models/components/singleselectoption.ts +1 -1
  152. package/src/models/components/volumebasedpromotion.ts +1 -1
  153. package/src/models/operations/createaddress.ts +1 -1
  154. package/src/models/operations/createorder.ts +37 -35
  155. package/src/models/operations/generateotp.ts +6 -6
  156. package/src/models/operations/getaddressdetail.ts +1 -1
  157. package/src/models/operations/getproductdetail.ts +7 -7
  158. package/src/models/operations/getvariantdetail.ts +7 -7
  159. package/src/models/operations/listaddresses.ts +1 -1
  160. package/src/models/operations/listcrosssellproducts.ts +7 -7
  161. package/src/models/operations/listproducts.ts +7 -7
  162. package/src/models/operations/listproductvariants.ts +7 -7
  163. package/src/models/operations/listsimilarproducts.ts +7 -7
  164. package/src/models/operations/listskus.ts +7 -7
  165. package/src/models/operations/listupsellproducts.ts +7 -7
  166. package/src/models/operations/loginwithwhatsapp.ts +1 -1
  167. package/src/models/operations/retryorderpayment.ts +37 -35
  168. package/src/models/operations/searchproducts.ts +75 -0
  169. package/src/models/operations/updateaddressdetail.ts +1 -1
  170. package/src/sdk/catalog.ts +1 -2
  171. 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.PayuPaymentGatewayParams & { paymentGateway: "PAYU" })
14
- | (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" });
13
+ | (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" })
14
+ | (components.PayuPaymentGatewayParams & { paymentGateway: "PAYU" });
15
15
 
16
16
  export type RetryOrderPaymentRequestBody = {
17
17
  paymentGatewayParams:
18
- | (components.PayuPaymentGatewayParams & { paymentGateway: "PAYU" })
19
- | (components.JuspayPaymentGatewayParams & { paymentGateway: "JUSPAY" });
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.JuspayPaymentInfo
32
- | components.PayuPaymentInfo;
31
+ | components.PayuPaymentInfo
32
+ | components.JuspayPaymentInfo;
33
33
 
34
34
  export type RetryOrderPaymentContent = {
35
- paymentInfo: components.JuspayPaymentInfo | components.PayuPaymentInfo;
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.PayuPaymentGatewayParams$inboundSchema.and(
54
- z.object({ payment_gateway: z.literal("PAYU") }).transform((v) => ({
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.JuspayPaymentGatewayParams$inboundSchema.and(
59
- z.object({ payment_gateway: z.literal("JUSPAY") }).transform((v) => ({
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.PayuPaymentGatewayParams$outboundSchema.and(
79
- z.object({ paymentGateway: z.literal("PAYU") }).transform((v) => ({
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.JuspayPaymentGatewayParams$outboundSchema.and(
84
- z.object({ paymentGateway: z.literal("JUSPAY") }).transform((v) => ({
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.PayuPaymentGatewayParams$inboundSchema.and(
134
- z.object({ payment_gateway: z.literal("PAYU") }).transform((v) => ({
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.JuspayPaymentGatewayParams$inboundSchema.and(
139
- z.object({ payment_gateway: z.literal("JUSPAY") }).transform((v) => ({
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.PayuPaymentGatewayParams$outboundSchema.and(
169
- z.object({ paymentGateway: z.literal("PAYU") }).transform((v) => ({
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.JuspayPaymentGatewayParams$outboundSchema.and(
174
- z.object({ paymentGateway: z.literal("JUSPAY") }).transform((v) => ({
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.JuspayPaymentInfo$Outbound
298
- | components.PayuPaymentInfo$Outbound;
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.JuspayPaymentInfo$Outbound
363
- | components.PayuPaymentInfo$Outbound;
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(),
@@ -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: components.SearchProduct,
198
+ request: operations.SearchProductsRequest,
200
199
  options?: RequestOptions,
201
200
  ): Promise<operations.SearchProductsResponseBody> {
202
201
  return unwrapAsync(catalogSearchProducts(
@@ -11,5 +11,5 @@ export function constDateTime(
11
11
  return (
12
12
  typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
13
13
  );
14
- }, `Value must be equivelant to ${val}`);
14
+ }, `Value must be equivalent to ${val}`);
15
15
  }