ce-storefront 0.20.1 → 0.21.0

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 (327) hide show
  1. package/README.md +28 -3
  2. package/esm/funcs/marketplaceGetProductDetail.d.ts +20 -0
  3. package/esm/funcs/marketplaceGetProductDetail.d.ts.map +1 -0
  4. package/esm/funcs/marketplaceGetProductDetail.js +91 -0
  5. package/esm/funcs/marketplaceGetProductDetail.js.map +1 -0
  6. package/esm/funcs/marketplaceGetVariantDetail.d.ts +20 -0
  7. package/esm/funcs/marketplaceGetVariantDetail.d.ts.map +1 -0
  8. package/esm/funcs/marketplaceGetVariantDetail.js +98 -0
  9. package/esm/funcs/marketplaceGetVariantDetail.js.map +1 -0
  10. package/esm/funcs/marketplaceListCategories.d.ts +20 -0
  11. package/esm/funcs/marketplaceListCategories.d.ts.map +1 -0
  12. package/esm/funcs/marketplaceListCategories.js +91 -0
  13. package/esm/funcs/marketplaceListCategories.js.map +1 -0
  14. package/esm/funcs/marketplaceListCrosssellProducts.d.ts +20 -0
  15. package/esm/funcs/marketplaceListCrosssellProducts.d.ts.map +1 -0
  16. package/esm/funcs/marketplaceListCrosssellProducts.js +91 -0
  17. package/esm/funcs/marketplaceListCrosssellProducts.js.map +1 -0
  18. package/esm/funcs/marketplaceListProductReviews.d.ts +20 -0
  19. package/esm/funcs/marketplaceListProductReviews.d.ts.map +1 -0
  20. package/esm/funcs/marketplaceListProductReviews.js +97 -0
  21. package/esm/funcs/marketplaceListProductReviews.js.map +1 -0
  22. package/esm/funcs/marketplaceListProductVariants.d.ts +20 -0
  23. package/esm/funcs/marketplaceListProductVariants.d.ts.map +1 -0
  24. package/esm/funcs/marketplaceListProductVariants.js +94 -0
  25. package/esm/funcs/marketplaceListProductVariants.js.map +1 -0
  26. package/esm/funcs/marketplaceListProducts.d.ts +20 -0
  27. package/esm/funcs/marketplaceListProducts.d.ts.map +1 -0
  28. package/esm/funcs/marketplaceListProducts.js +93 -0
  29. package/esm/funcs/marketplaceListProducts.js.map +1 -0
  30. package/esm/funcs/marketplaceListSimilarProducts.d.ts +20 -0
  31. package/esm/funcs/marketplaceListSimilarProducts.d.ts.map +1 -0
  32. package/esm/funcs/marketplaceListSimilarProducts.js +91 -0
  33. package/esm/funcs/marketplaceListSimilarProducts.js.map +1 -0
  34. package/esm/funcs/marketplaceListSkus.d.ts +20 -0
  35. package/esm/funcs/marketplaceListSkus.d.ts.map +1 -0
  36. package/esm/funcs/marketplaceListSkus.js +93 -0
  37. package/esm/funcs/marketplaceListSkus.js.map +1 -0
  38. package/esm/funcs/marketplaceListUpsellProducts.d.ts +20 -0
  39. package/esm/funcs/marketplaceListUpsellProducts.d.ts.map +1 -0
  40. package/esm/funcs/marketplaceListUpsellProducts.js +91 -0
  41. package/esm/funcs/marketplaceListUpsellProducts.js.map +1 -0
  42. package/esm/funcs/marketplaceSearchProducts.d.ts +20 -0
  43. package/esm/funcs/marketplaceSearchProducts.d.ts.map +1 -0
  44. package/esm/funcs/marketplaceSearchProducts.js +85 -0
  45. package/esm/funcs/marketplaceSearchProducts.js.map +1 -0
  46. package/esm/lib/config.d.ts +3 -3
  47. package/esm/lib/config.js +3 -3
  48. package/esm/lib/encodings.d.ts +1 -0
  49. package/esm/lib/encodings.d.ts.map +1 -1
  50. package/esm/lib/encodings.js +12 -1
  51. package/esm/lib/encodings.js.map +1 -1
  52. package/esm/models/components/booleanattribute.d.ts +1 -1
  53. package/esm/models/components/booleanattribute.d.ts.map +1 -1
  54. package/esm/models/components/booleanattribute.js +1 -1
  55. package/esm/models/components/booleanattribute.js.map +1 -1
  56. package/esm/models/components/collectinstorefulfillment.d.ts +1 -1
  57. package/esm/models/components/collectinstorefulfillment.d.ts.map +1 -1
  58. package/esm/models/components/collectinstorefulfillment.js +1 -2
  59. package/esm/models/components/collectinstorefulfillment.js.map +1 -1
  60. package/esm/models/components/collectinstorefulfillmentinput.d.ts +1 -1
  61. package/esm/models/components/collectinstorefulfillmentinput.d.ts.map +1 -1
  62. package/esm/models/components/colorattribute.d.ts +1 -1
  63. package/esm/models/components/colorattribute.d.ts.map +1 -1
  64. package/esm/models/components/colorattribute.js +1 -1
  65. package/esm/models/components/colorattribute.js.map +1 -1
  66. package/esm/models/components/coloroption.d.ts +1 -1
  67. package/esm/models/components/coloroption.d.ts.map +1 -1
  68. package/esm/models/components/coloroption.js +1 -1
  69. package/esm/models/components/coloroption.js.map +1 -1
  70. package/esm/models/components/customeraddress.d.ts +1 -1
  71. package/esm/models/components/customeraddress.d.ts.map +1 -1
  72. package/esm/models/components/customeraddress.js +1 -1
  73. package/esm/models/components/customeraddress.js.map +1 -1
  74. package/esm/models/components/customeraddressinput.d.ts +1 -1
  75. package/esm/models/components/customeraddressinput.d.ts.map +1 -1
  76. package/esm/models/components/dateattribute.d.ts +1 -1
  77. package/esm/models/components/dateattribute.js +1 -1
  78. package/esm/models/components/dateattribute.js.map +1 -1
  79. package/esm/models/components/deliveryfulfillment.d.ts +1 -1
  80. package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
  81. package/esm/models/components/deliveryfulfillment.js +1 -1
  82. package/esm/models/components/deliveryfulfillment.js.map +1 -1
  83. package/esm/models/components/deliveryfulfillmentinput.d.ts +1 -1
  84. package/esm/models/components/deliveryfulfillmentinput.d.ts.map +1 -1
  85. package/esm/models/components/discountbasedpromotion.d.ts +1 -10
  86. package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
  87. package/esm/models/components/discountbasedpromotion.js +1 -9
  88. package/esm/models/components/discountbasedpromotion.js.map +1 -1
  89. package/esm/models/components/fixedpricepromotion.d.ts +1 -11
  90. package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
  91. package/esm/models/components/fixedpricepromotion.js +1 -9
  92. package/esm/models/components/fixedpricepromotion.js.map +1 -1
  93. package/esm/models/components/freegoodspromotion.d.ts +1 -11
  94. package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
  95. package/esm/models/components/freegoodspromotion.js +1 -9
  96. package/esm/models/components/freegoodspromotion.js.map +1 -1
  97. package/esm/models/components/fulfillmentpreference.d.ts +1 -7
  98. package/esm/models/components/fulfillmentpreference.d.ts.map +1 -1
  99. package/esm/models/components/fulfillmentpreference.js +3 -6
  100. package/esm/models/components/fulfillmentpreference.js.map +1 -1
  101. package/esm/models/components/fulfillmentpreferenceinput.d.ts +2 -14
  102. package/esm/models/components/fulfillmentpreferenceinput.d.ts.map +1 -1
  103. package/esm/models/components/fulfillmentpreferenceinput.js +3 -6
  104. package/esm/models/components/fulfillmentpreferenceinput.js.map +1 -1
  105. package/esm/models/components/generateotpwithemail.d.ts +1 -1
  106. package/esm/models/components/generateotpwithemail.d.ts.map +1 -1
  107. package/esm/models/components/juspayhypercheckout.d.ts +1 -1
  108. package/esm/models/components/juspayhypercheckout.d.ts.map +1 -1
  109. package/esm/models/components/juspayhypercheckoutresponse.d.ts.map +1 -1
  110. package/esm/models/components/juspayhypercheckoutresponse.js +2 -3
  111. package/esm/models/components/juspayhypercheckoutresponse.js.map +1 -1
  112. package/esm/models/components/juspaynetbanking.d.ts +2 -2
  113. package/esm/models/components/juspaynetbanking.d.ts.map +1 -1
  114. package/esm/models/components/juspaynewcard.d.ts +3 -3
  115. package/esm/models/components/juspaynewcard.d.ts.map +1 -1
  116. package/esm/models/components/juspaysavedcardtoken.d.ts +3 -3
  117. package/esm/models/components/juspaysavedcardtoken.d.ts.map +1 -1
  118. package/esm/models/components/juspayupicollect.d.ts +3 -3
  119. package/esm/models/components/juspayupicollect.d.ts.map +1 -1
  120. package/esm/models/components/juspayupiintent.d.ts +3 -3
  121. package/esm/models/components/juspayupiintent.d.ts.map +1 -1
  122. package/esm/models/components/multiselectattribute.d.ts +1 -1
  123. package/esm/models/components/multiselectattribute.d.ts.map +1 -1
  124. package/esm/models/components/multiselectattribute.js +1 -1
  125. package/esm/models/components/multiselectattribute.js.map +1 -1
  126. package/esm/models/components/numberattribute.d.ts +1 -1
  127. package/esm/models/components/numberattribute.d.ts.map +1 -1
  128. package/esm/models/components/numberattribute.js +1 -1
  129. package/esm/models/components/numberattribute.js.map +1 -1
  130. package/esm/models/components/partialcollectanddelivery.d.ts +1 -1
  131. package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
  132. package/esm/models/components/partialcollectanddelivery.js +1 -1
  133. package/esm/models/components/partialcollectanddelivery.js.map +1 -1
  134. package/esm/models/components/partialcollectanddeliveryinput.d.ts +1 -1
  135. package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -1
  136. package/esm/models/components/payupaymentinfo.js +3 -3
  137. package/esm/models/components/payupaymentinfo.js.map +1 -1
  138. package/esm/models/components/productattribute.d.ts +1 -15
  139. package/esm/models/components/productattribute.d.ts.map +1 -1
  140. package/esm/models/components/productattribute.js +7 -15
  141. package/esm/models/components/productattribute.js.map +1 -1
  142. package/esm/models/components/productpromotion.d.ts +2 -18
  143. package/esm/models/components/productpromotion.d.ts.map +1 -1
  144. package/esm/models/components/productpromotion.js +8 -20
  145. package/esm/models/components/productpromotion.js.map +1 -1
  146. package/esm/models/components/singleselectattribute.d.ts +1 -1
  147. package/esm/models/components/singleselectattribute.d.ts.map +1 -1
  148. package/esm/models/components/singleselectattribute.js +1 -1
  149. package/esm/models/components/singleselectattribute.js.map +1 -1
  150. package/esm/models/components/singleselectoption.d.ts +1 -1
  151. package/esm/models/components/singleselectoption.d.ts.map +1 -1
  152. package/esm/models/components/singleselectoption.js +1 -1
  153. package/esm/models/components/singleselectoption.js.map +1 -1
  154. package/esm/models/components/textattribute.d.ts +1 -1
  155. package/esm/models/components/textattribute.js +1 -1
  156. package/esm/models/components/textattribute.js.map +1 -1
  157. package/esm/models/components/volumebasedpromotion.d.ts +1 -11
  158. package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
  159. package/esm/models/components/volumebasedpromotion.js +1 -9
  160. package/esm/models/components/volumebasedpromotion.js.map +1 -1
  161. package/esm/models/operations/createaddress.d.ts +1 -1
  162. package/esm/models/operations/createaddress.d.ts.map +1 -1
  163. package/esm/models/operations/generateotp.d.ts +20 -4
  164. package/esm/models/operations/generateotp.d.ts.map +1 -1
  165. package/esm/models/operations/generateotp.js +4 -2
  166. package/esm/models/operations/generateotp.js.map +1 -1
  167. package/esm/models/operations/getaddressdetail.d.ts +1 -1
  168. package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
  169. package/esm/models/operations/getaddressdetail.js +1 -1
  170. package/esm/models/operations/getaddressdetail.js.map +1 -1
  171. package/esm/models/operations/getmarketplaceproductdetail.d.ts +45 -0
  172. package/esm/models/operations/getmarketplaceproductdetail.d.ts.map +1 -0
  173. package/esm/models/operations/getmarketplaceproductdetail.js +38 -0
  174. package/esm/models/operations/getmarketplaceproductdetail.js.map +1 -0
  175. package/esm/models/operations/getmarketplacevariantdetail.d.ts +50 -0
  176. package/esm/models/operations/getmarketplacevariantdetail.d.ts.map +1 -0
  177. package/esm/models/operations/getmarketplacevariantdetail.js +40 -0
  178. package/esm/models/operations/getmarketplacevariantdetail.js.map +1 -0
  179. package/esm/models/operations/index.d.ts +11 -0
  180. package/esm/models/operations/index.d.ts.map +1 -1
  181. package/esm/models/operations/index.js +11 -0
  182. package/esm/models/operations/index.js.map +1 -1
  183. package/esm/models/operations/listaddresses.d.ts +1 -1
  184. package/esm/models/operations/listaddresses.d.ts.map +1 -1
  185. package/esm/models/operations/listaddresses.js +1 -1
  186. package/esm/models/operations/listaddresses.js.map +1 -1
  187. package/esm/models/operations/listmarketplacecategories.d.ts +59 -0
  188. package/esm/models/operations/listmarketplacecategories.d.ts.map +1 -0
  189. package/esm/models/operations/listmarketplacecategories.js +43 -0
  190. package/esm/models/operations/listmarketplacecategories.js.map +1 -0
  191. package/esm/models/operations/listmarketplacecrosssellproducts.d.ts +59 -0
  192. package/esm/models/operations/listmarketplacecrosssellproducts.d.ts.map +1 -0
  193. package/esm/models/operations/listmarketplacecrosssellproducts.js +42 -0
  194. package/esm/models/operations/listmarketplacecrosssellproducts.js.map +1 -0
  195. package/esm/models/operations/listmarketplaceproductreviews.d.ts +65 -0
  196. package/esm/models/operations/listmarketplaceproductreviews.d.ts.map +1 -0
  197. package/esm/models/operations/listmarketplaceproductreviews.js +48 -0
  198. package/esm/models/operations/listmarketplaceproductreviews.js.map +1 -0
  199. package/esm/models/operations/listmarketplaceproducts.d.ts +69 -0
  200. package/esm/models/operations/listmarketplaceproducts.d.ts.map +1 -0
  201. package/esm/models/operations/listmarketplaceproducts.js +45 -0
  202. package/esm/models/operations/listmarketplaceproducts.js.map +1 -0
  203. package/esm/models/operations/listmarketplaceproductvariants.d.ts +45 -0
  204. package/esm/models/operations/listmarketplaceproductvariants.d.ts.map +1 -0
  205. package/esm/models/operations/listmarketplaceproductvariants.js +38 -0
  206. package/esm/models/operations/listmarketplaceproductvariants.js.map +1 -0
  207. package/esm/models/operations/listmarketplacesimilarproducts.d.ts +59 -0
  208. package/esm/models/operations/listmarketplacesimilarproducts.d.ts.map +1 -0
  209. package/esm/models/operations/listmarketplacesimilarproducts.js +42 -0
  210. package/esm/models/operations/listmarketplacesimilarproducts.js.map +1 -0
  211. package/esm/models/operations/listmarketplaceskus.d.ts +69 -0
  212. package/esm/models/operations/listmarketplaceskus.d.ts.map +1 -0
  213. package/esm/models/operations/listmarketplaceskus.js +44 -0
  214. package/esm/models/operations/listmarketplaceskus.js.map +1 -0
  215. package/esm/models/operations/listmarketplaceupsellproducts.d.ts +62 -0
  216. package/esm/models/operations/listmarketplaceupsellproducts.d.ts.map +1 -0
  217. package/esm/models/operations/listmarketplaceupsellproducts.js +42 -0
  218. package/esm/models/operations/listmarketplaceupsellproducts.js.map +1 -0
  219. package/esm/models/operations/loginwithwhatsapp.d.ts +1 -1
  220. package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
  221. package/esm/models/operations/loginwithwhatsapp.js +1 -1
  222. package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
  223. package/esm/models/operations/searchmarketplaceproducts.d.ts +56 -0
  224. package/esm/models/operations/searchmarketplaceproducts.d.ts.map +1 -0
  225. package/esm/models/operations/searchmarketplaceproducts.js +53 -0
  226. package/esm/models/operations/searchmarketplaceproducts.js.map +1 -0
  227. package/esm/models/operations/searchproducts.d.ts +4 -4
  228. package/esm/models/operations/searchproducts.d.ts.map +1 -1
  229. package/esm/models/operations/searchproducts.js +4 -4
  230. package/esm/models/operations/searchproducts.js.map +1 -1
  231. package/esm/models/operations/updateaddressdetail.d.ts +1 -1
  232. package/esm/models/operations/updateaddressdetail.d.ts.map +1 -1
  233. package/esm/sdk/marketplace.d.ts +104 -0
  234. package/esm/sdk/marketplace.d.ts.map +1 -0
  235. package/esm/sdk/marketplace.js +140 -0
  236. package/esm/sdk/marketplace.js.map +1 -0
  237. package/esm/sdk/sdk.d.ts +3 -0
  238. package/esm/sdk/sdk.d.ts.map +1 -1
  239. package/esm/sdk/sdk.js +4 -0
  240. package/esm/sdk/sdk.js.map +1 -1
  241. package/esm/types/enums.d.ts +8 -11
  242. package/esm/types/enums.d.ts.map +1 -1
  243. package/esm/types/enums.js +22 -2
  244. package/esm/types/enums.js.map +1 -1
  245. package/esm/types/index.d.ts +2 -2
  246. package/esm/types/index.d.ts.map +1 -1
  247. package/esm/types/index.js +1 -1
  248. package/esm/types/index.js.map +1 -1
  249. package/esm/types/unrecognized.d.ts +16 -0
  250. package/esm/types/unrecognized.d.ts.map +1 -0
  251. package/esm/types/unrecognized.js +31 -0
  252. package/esm/types/unrecognized.js.map +1 -0
  253. package/examples/package-lock.json +1 -1
  254. package/jsr.json +1 -1
  255. package/package.json +1 -1
  256. package/src/funcs/marketplaceGetProductDetail.ts +198 -0
  257. package/src/funcs/marketplaceGetVariantDetail.ts +201 -0
  258. package/src/funcs/marketplaceListCategories.ts +188 -0
  259. package/src/funcs/marketplaceListCrosssellProducts.ts +193 -0
  260. package/src/funcs/marketplaceListProductReviews.ts +198 -0
  261. package/src/funcs/marketplaceListProductVariants.ts +199 -0
  262. package/src/funcs/marketplaceListProducts.ts +190 -0
  263. package/src/funcs/marketplaceListSimilarProducts.ts +193 -0
  264. package/src/funcs/marketplaceListSkus.ts +190 -0
  265. package/src/funcs/marketplaceListUpsellProducts.ts +193 -0
  266. package/src/funcs/marketplaceSearchProducts.ts +177 -0
  267. package/src/lib/config.ts +3 -3
  268. package/src/lib/encodings.ts +17 -3
  269. package/src/models/components/booleanattribute.ts +2 -2
  270. package/src/models/components/collectinstorefulfillment.ts +2 -3
  271. package/src/models/components/collectinstorefulfillmentinput.ts +1 -1
  272. package/src/models/components/colorattribute.ts +2 -2
  273. package/src/models/components/coloroption.ts +2 -2
  274. package/src/models/components/customeraddress.ts +2 -2
  275. package/src/models/components/customeraddressinput.ts +1 -1
  276. package/src/models/components/dateattribute.ts +2 -2
  277. package/src/models/components/deliveryfulfillment.ts +2 -2
  278. package/src/models/components/deliveryfulfillmentinput.ts +1 -1
  279. package/src/models/components/discountbasedpromotion.ts +2 -17
  280. package/src/models/components/fixedpricepromotion.ts +2 -18
  281. package/src/models/components/freegoodspromotion.ts +2 -18
  282. package/src/models/components/fulfillmentpreference.ts +6 -19
  283. package/src/models/components/fulfillmentpreferenceinput.ts +9 -26
  284. package/src/models/components/generateotpwithemail.ts +1 -1
  285. package/src/models/components/juspayhypercheckout.ts +1 -1
  286. package/src/models/components/juspayhypercheckoutresponse.ts +2 -3
  287. package/src/models/components/juspaynetbanking.ts +2 -2
  288. package/src/models/components/juspaynewcard.ts +3 -3
  289. package/src/models/components/juspaysavedcardtoken.ts +3 -3
  290. package/src/models/components/juspayupicollect.ts +3 -3
  291. package/src/models/components/juspayupiintent.ts +3 -3
  292. package/src/models/components/multiselectattribute.ts +2 -2
  293. package/src/models/components/numberattribute.ts +2 -2
  294. package/src/models/components/partialcollectanddelivery.ts +2 -4
  295. package/src/models/components/partialcollectanddeliveryinput.ts +1 -1
  296. package/src/models/components/payupaymentinfo.ts +3 -3
  297. package/src/models/components/productattribute.ts +14 -36
  298. package/src/models/components/productpromotion.ts +16 -48
  299. package/src/models/components/singleselectattribute.ts +2 -2
  300. package/src/models/components/singleselectoption.ts +2 -2
  301. package/src/models/components/textattribute.ts +2 -2
  302. package/src/models/components/volumebasedpromotion.ts +2 -18
  303. package/src/models/operations/createaddress.ts +1 -1
  304. package/src/models/operations/generateotp.ts +20 -6
  305. package/src/models/operations/getaddressdetail.ts +2 -2
  306. package/src/models/operations/getmarketplaceproductdetail.ts +118 -0
  307. package/src/models/operations/getmarketplacevariantdetail.ts +125 -0
  308. package/src/models/operations/index.ts +11 -0
  309. package/src/models/operations/listaddresses.ts +2 -2
  310. package/src/models/operations/listmarketplacecategories.ts +131 -0
  311. package/src/models/operations/listmarketplacecrosssellproducts.ts +145 -0
  312. package/src/models/operations/listmarketplaceproductreviews.ts +148 -0
  313. package/src/models/operations/listmarketplaceproducts.ts +143 -0
  314. package/src/models/operations/listmarketplaceproductvariants.ts +118 -0
  315. package/src/models/operations/listmarketplacesimilarproducts.ts +136 -0
  316. package/src/models/operations/listmarketplaceskus.ts +139 -0
  317. package/src/models/operations/listmarketplaceupsellproducts.ts +139 -0
  318. package/src/models/operations/loginwithwhatsapp.ts +2 -2
  319. package/src/models/operations/searchmarketplaceproducts.ts +142 -0
  320. package/src/models/operations/searchproducts.ts +9 -9
  321. package/src/models/operations/updateaddressdetail.ts +1 -1
  322. package/src/sdk/marketplace.ts +229 -0
  323. package/src/sdk/sdk.ts +6 -0
  324. package/src/types/enums.ts +38 -9
  325. package/src/types/index.ts +2 -2
  326. package/src/types/unrecognized.ts +35 -0
  327. package/tsconfig.json +1 -2
@@ -10,12 +10,12 @@ import { remap as remap$ } from "../../lib/primitives.js";
10
10
  */
11
11
  export type JuspayNetBanking = {
12
12
  paymentProviderSlug: string;
13
- integrationType?: "express-checkout" | undefined;
13
+ integrationType: "express-checkout";
14
14
  gatewayReferenceId: string;
15
15
  returnUrl: string;
16
16
  redirectAfterPayment?: boolean | undefined;
17
17
  getClientAuthToken?: boolean | undefined;
18
- paymentMethodType?: "NB" | undefined;
18
+ paymentMethodType: "NB";
19
19
  paymentMethod: string;
20
20
  };
21
21
 
@@ -17,14 +17,14 @@ export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
17
17
  */
18
18
  export type JusPayNewCard = {
19
19
  paymentProviderSlug: string;
20
- integrationType?: "express-checkout" | undefined;
20
+ integrationType: "express-checkout";
21
21
  gatewayReferenceId: string;
22
22
  returnUrl: string;
23
23
  redirectAfterPayment?: boolean | undefined;
24
24
  getClientAuthToken?: boolean | undefined;
25
- authType?: "OTP" | undefined;
25
+ authType: "OTP";
26
26
  saveToLocker: boolean;
27
- paymentMethodType?: "CARD" | undefined;
27
+ paymentMethodType: "CARD";
28
28
  paymentMethod: PaymentMethod;
29
29
  cardNumber: string;
30
30
  cardExpMonth: string;
@@ -19,14 +19,14 @@ export type JusPaySavedCardTokenPaymentMethod = ClosedEnum<
19
19
  */
20
20
  export type JusPaySavedCardToken = {
21
21
  paymentProviderSlug: string;
22
- integrationType?: "express-checkout" | undefined;
22
+ integrationType: "express-checkout";
23
23
  gatewayReferenceId: string;
24
24
  returnUrl: string;
25
25
  redirectAfterPayment?: boolean | undefined;
26
26
  getClientAuthToken?: boolean | undefined;
27
- authType?: "OTP" | undefined;
27
+ authType: "OTP";
28
28
  saveToLocker: boolean;
29
- paymentMethodType?: "CARD" | undefined;
29
+ paymentMethodType: "CARD";
30
30
  paymentMethod: JusPaySavedCardTokenPaymentMethod;
31
31
  cardToken: string;
32
32
  cardSecurityCode: string;
@@ -10,13 +10,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
10
10
  */
11
11
  export type JuspayUpiCollect = {
12
12
  paymentProviderSlug: string;
13
- integrationType?: "express-checkout" | undefined;
13
+ integrationType: "express-checkout";
14
14
  gatewayReferenceId: string;
15
15
  returnUrl: string;
16
16
  redirectAfterPayment?: boolean | undefined;
17
17
  getClientAuthToken?: boolean | undefined;
18
- paymentMethodType?: "UPI" | undefined;
19
- paymentMethod?: "UPI_COLLECT" | undefined;
18
+ paymentMethodType: "UPI";
19
+ paymentMethod: "UPI_COLLECT";
20
20
  upiVpa: string;
21
21
  };
22
22
 
@@ -10,13 +10,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
10
10
  */
11
11
  export type JuspayUpiIntent = {
12
12
  paymentProviderSlug: string;
13
- integrationType?: "express-checkout" | undefined;
13
+ integrationType: "express-checkout";
14
14
  gatewayReferenceId: string;
15
15
  returnUrl: string;
16
16
  redirectAfterPayment?: boolean | undefined;
17
17
  getClientAuthToken?: boolean | undefined;
18
- paymentMethodType?: "UPI" | undefined;
19
- paymentMethod?: "UPI_PAY" | undefined;
18
+ paymentMethodType: "UPI";
19
+ paymentMethod: "UPI_PAY";
20
20
  sdkParams: boolean;
21
21
  upiApp: string;
22
22
  };
@@ -19,7 +19,7 @@ export type MultiSelectAttribute = {
19
19
  * A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
20
20
  */
21
21
  key: string;
22
- type: string;
22
+ type: "multi-select";
23
23
  /**
24
24
  * For multi-select attributes
25
25
  */
@@ -35,7 +35,7 @@ export const MultiSelectAttribute$inboundSchema: z.ZodType<
35
35
  id: z.string(),
36
36
  name: z.string(),
37
37
  key: z.string(),
38
- type: z.string(),
38
+ type: z.literal("multi-select"),
39
39
  value: z.array(z.string()),
40
40
  });
41
41
 
@@ -19,7 +19,7 @@ export type NumberAttribute = {
19
19
  * A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
20
20
  */
21
21
  key: string;
22
- type: string;
22
+ type: "number";
23
23
  /**
24
24
  * For numeric attributes
25
25
  */
@@ -35,7 +35,7 @@ export const NumberAttribute$inboundSchema: z.ZodType<
35
35
  id: z.string(),
36
36
  name: z.string(),
37
37
  key: z.string(),
38
- type: z.string(),
38
+ type: z.literal("number"),
39
39
  value: z.number(),
40
40
  });
41
41
 
@@ -39,7 +39,7 @@ export type Delivery = {
39
39
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/PartialCollectAndDelivery} - API reference for the PartialCollectAndDelivery schema
40
40
  */
41
41
  export type PartialCollectAndDelivery = {
42
- fulfillmentType?: "partial-collect-and-delivery" | undefined;
42
+ fulfillmentType: "partial-collect-and-delivery";
43
43
  preferenceType?: PartialCollectAndDeliveryPreferenceType | undefined;
44
44
  collectInStore: PartialCollectAndDeliveryCollectInStore;
45
45
  delivery: Delivery;
@@ -118,9 +118,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
118
118
  z.ZodTypeDef,
119
119
  unknown
120
120
  > = z.object({
121
- fulfillment_type: z.literal("partial-collect-and-delivery").default(
122
- "partial-collect-and-delivery",
123
- ).optional(),
121
+ fulfillment_type: z.literal("partial-collect-and-delivery"),
124
122
  preference_type: PartialCollectAndDeliveryPreferenceType$inboundSchema
125
123
  .optional(),
126
124
  "collect-in-store": z.lazy(() =>
@@ -25,7 +25,7 @@ export type PartialCollectAndDeliveryDelivery = {
25
25
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/PartialCollectAndDelivery} - API reference for the PartialCollectAndDelivery schema
26
26
  */
27
27
  export type PartialCollectAndDeliveryInput = {
28
- fulfillmentType?: "partial-collect-and-delivery" | undefined;
28
+ fulfillmentType: "partial-collect-and-delivery";
29
29
  collectInStore: PartialCollectAndDeliveryCollectInStoreInput;
30
30
  delivery: PartialCollectAndDeliveryDelivery;
31
31
  };
@@ -84,8 +84,8 @@ export const SiDetails$inboundSchema: z.ZodType<
84
84
  unknown
85
85
  > = z.object({
86
86
  billingAmount: z.number().optional(),
87
- billingCurrency: z.literal("INR").default("INR").optional(),
88
- billingCycle: z.literal("MONTHLY").default("MONTHLY").optional(),
87
+ billingCurrency: z.literal("INR").optional(),
88
+ billingCycle: z.literal("MONTHLY").optional(),
89
89
  billingInterval: z.number().int().optional(),
90
90
  paymentStartDate: z.string().transform(v => new RFCDate(v)).optional(),
91
91
  paymentEndDate: z.string().transform(v => new RFCDate(v)).optional(),
@@ -115,7 +115,7 @@ export const PayuPaymentInfo$inboundSchema: z.ZodType<
115
115
  lastname: z.string().optional(),
116
116
  email: z.string().optional(),
117
117
  phone: z.string().optional(),
118
- si: z.literal(1).default(1).optional(),
118
+ si: z.literal(1).optional(),
119
119
  si_details: z.lazy(() => SiDetails$inboundSchema).optional(),
120
120
  furl: z.string().optional(),
121
121
  surl: z.string().optional(),
@@ -33,13 +33,13 @@ import { TextAttribute, TextAttribute$inboundSchema } from "./textattribute.js";
33
33
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/ProductAttribute} - API reference for the ProductAttribute schema
34
34
  */
35
35
  export type ProductAttribute =
36
- | (ColorAttribute & { type: "color" })
37
- | (SingleSelectAttribute & { type: "single-select" })
38
- | (MultiSelectAttribute & { type: "multi-select" })
39
- | (TextAttribute & { type: "text" })
40
- | (DateAttribute & { type: "date" })
41
- | (NumberAttribute & { type: "number" })
42
- | (BooleanAttribute & { type: "boolean" });
36
+ | ColorAttribute
37
+ | SingleSelectAttribute
38
+ | MultiSelectAttribute
39
+ | TextAttribute
40
+ | DateAttribute
41
+ | NumberAttribute
42
+ | BooleanAttribute;
43
43
 
44
44
  /** @internal */
45
45
  export const ProductAttribute$inboundSchema: z.ZodType<
@@ -47,35 +47,13 @@ export const ProductAttribute$inboundSchema: z.ZodType<
47
47
  z.ZodTypeDef,
48
48
  unknown
49
49
  > = z.union([
50
- ColorAttribute$inboundSchema.and(
51
- z.object({ type: z.literal("color") }).transform((v) => ({ type: v.type })),
52
- ),
53
- SingleSelectAttribute$inboundSchema.and(
54
- z.object({ type: z.literal("single-select") }).transform((v) => ({
55
- type: v.type,
56
- })),
57
- ),
58
- MultiSelectAttribute$inboundSchema.and(
59
- z.object({ type: z.literal("multi-select") }).transform((v) => ({
60
- type: v.type,
61
- })),
62
- ),
63
- TextAttribute$inboundSchema.and(
64
- z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })),
65
- ),
66
- DateAttribute$inboundSchema.and(
67
- z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })),
68
- ),
69
- NumberAttribute$inboundSchema.and(
70
- z.object({ type: z.literal("number") }).transform((v) => ({
71
- type: v.type,
72
- })),
73
- ),
74
- BooleanAttribute$inboundSchema.and(
75
- z.object({ type: z.literal("boolean") }).transform((v) => ({
76
- type: v.type,
77
- })),
78
- ),
50
+ ColorAttribute$inboundSchema,
51
+ SingleSelectAttribute$inboundSchema,
52
+ MultiSelectAttribute$inboundSchema,
53
+ TextAttribute$inboundSchema,
54
+ DateAttribute$inboundSchema,
55
+ NumberAttribute$inboundSchema,
56
+ BooleanAttribute$inboundSchema,
79
57
  ]);
80
58
 
81
59
  export function productAttributeFromJSON(
@@ -25,10 +25,10 @@ import {
25
25
  } from "./volumebasedpromotion.js";
26
26
 
27
27
  export type Details =
28
- | (FreeGoodsPromotion & { promotionType: "free-goods" })
29
- | (DiscountBasedPromotion & { promotionType: "discount" })
30
- | (FixedPricePromotion & { promotionType: "fixed-price" })
31
- | (VolumeBasedPromotion & { promotionType: "volume-based" });
28
+ | DiscountBasedPromotion
29
+ | FixedPricePromotion
30
+ | VolumeBasedPromotion
31
+ | FreeGoodsPromotion;
32
32
 
33
33
  /**
34
34
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/ProductPromotion} - API reference for the ProductPromotion schema
@@ -38,35 +38,19 @@ export type ProductPromotion = {
38
38
  startsAt: Date;
39
39
  expiresAt: Date | null;
40
40
  details:
41
- | (FreeGoodsPromotion & { promotionType: "free-goods" })
42
- | (DiscountBasedPromotion & { promotionType: "discount" })
43
- | (FixedPricePromotion & { promotionType: "fixed-price" })
44
- | (VolumeBasedPromotion & { promotionType: "volume-based" });
41
+ | DiscountBasedPromotion
42
+ | FixedPricePromotion
43
+ | VolumeBasedPromotion
44
+ | FreeGoodsPromotion;
45
45
  };
46
46
 
47
47
  /** @internal */
48
48
  export const Details$inboundSchema: z.ZodType<Details, z.ZodTypeDef, unknown> =
49
49
  z.union([
50
- FreeGoodsPromotion$inboundSchema.and(
51
- z.object({ promotion_type: z.literal("free-goods") }).transform((v) => ({
52
- promotionType: v.promotion_type,
53
- })),
54
- ),
55
- DiscountBasedPromotion$inboundSchema.and(
56
- z.object({ promotion_type: z.literal("discount") }).transform((v) => ({
57
- promotionType: v.promotion_type,
58
- })),
59
- ),
60
- FixedPricePromotion$inboundSchema.and(
61
- z.object({ promotion_type: z.literal("fixed-price") }).transform((v) => ({
62
- promotionType: v.promotion_type,
63
- })),
64
- ),
65
- VolumeBasedPromotion$inboundSchema.and(
66
- z.object({ promotion_type: z.literal("volume-based") }).transform((
67
- v,
68
- ) => ({ promotionType: v.promotion_type })),
69
- ),
50
+ DiscountBasedPromotion$inboundSchema,
51
+ FixedPricePromotion$inboundSchema,
52
+ VolumeBasedPromotion$inboundSchema,
53
+ FreeGoodsPromotion$inboundSchema,
70
54
  ]);
71
55
 
72
56
  export function detailsFromJSON(
@@ -91,26 +75,10 @@ export const ProductPromotion$inboundSchema: z.ZodType<
91
75
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
92
76
  ),
93
77
  details: z.union([
94
- FreeGoodsPromotion$inboundSchema.and(
95
- z.object({ promotion_type: z.literal("free-goods") }).transform((v) => ({
96
- promotionType: v.promotion_type,
97
- })),
98
- ),
99
- DiscountBasedPromotion$inboundSchema.and(
100
- z.object({ promotion_type: z.literal("discount") }).transform((v) => ({
101
- promotionType: v.promotion_type,
102
- })),
103
- ),
104
- FixedPricePromotion$inboundSchema.and(
105
- z.object({ promotion_type: z.literal("fixed-price") }).transform((v) => ({
106
- promotionType: v.promotion_type,
107
- })),
108
- ),
109
- VolumeBasedPromotion$inboundSchema.and(
110
- z.object({ promotion_type: z.literal("volume-based") }).transform((
111
- v,
112
- ) => ({ promotionType: v.promotion_type })),
113
- ),
78
+ DiscountBasedPromotion$inboundSchema,
79
+ FixedPricePromotion$inboundSchema,
80
+ VolumeBasedPromotion$inboundSchema,
81
+ FreeGoodsPromotion$inboundSchema,
114
82
  ]),
115
83
  }).transform((v) => {
116
84
  return remap$(v, {
@@ -19,7 +19,7 @@ export type SingleSelectAttribute = {
19
19
  * A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
20
20
  */
21
21
  key: string;
22
- type: string;
22
+ type: "single-select";
23
23
  /**
24
24
  * For single-select attributes
25
25
  */
@@ -35,7 +35,7 @@ export const SingleSelectAttribute$inboundSchema: z.ZodType<
35
35
  id: z.string(),
36
36
  name: z.string(),
37
37
  key: z.string(),
38
- type: z.string(),
38
+ type: z.literal("single-select"),
39
39
  value: z.string(),
40
40
  });
41
41
 
@@ -18,7 +18,7 @@ export type SingleSelectOption = {
18
18
  /**
19
19
  * The type of the associated option.
20
20
  */
21
- type?: "single-select" | undefined;
21
+ type: "single-select";
22
22
  /**
23
23
  * The value of the associated option
24
24
  */
@@ -32,7 +32,7 @@ export const SingleSelectOption$inboundSchema: z.ZodType<
32
32
  unknown
33
33
  > = z.object({
34
34
  name: z.string(),
35
- type: z.literal("single-select").default("single-select").optional(),
35
+ type: z.literal("single-select"),
36
36
  value: z.string(),
37
37
  });
38
38
 
@@ -19,7 +19,7 @@ export type TextAttribute = {
19
19
  * A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
20
20
  */
21
21
  key: string;
22
- type: string;
22
+ type: "text";
23
23
  /**
24
24
  * For text attributes
25
25
  */
@@ -35,7 +35,7 @@ export const TextAttribute$inboundSchema: z.ZodType<
35
35
  id: z.string(),
36
36
  name: z.string(),
37
37
  key: z.string(),
38
- type: z.string(),
38
+ type: z.literal("text"),
39
39
  value: z.string(),
40
40
  });
41
41
 
@@ -5,20 +5,9 @@
5
5
  import * as z from "zod/v3";
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";
9
8
  import { Result as SafeParseResult } from "../../types/fp.js";
10
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
10
 
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
-
22
11
  export type Slabs = {
23
12
  /**
24
13
  * The minimum quantity required to qualify for the discount.
@@ -34,15 +23,10 @@ export type Slabs = {
34
23
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/VolumeBasedPromotion} - API reference for the VolumeBasedPromotion schema
35
24
  */
36
25
  export type VolumeBasedPromotion = {
37
- promotionType?: "volume-based" | undefined;
26
+ promotionType: "volume-based";
38
27
  slabs: Array<Slabs>;
39
28
  };
40
29
 
41
- /** @internal */
42
- export const VolumeBasedPromotionPromotionType$inboundSchema: z.ZodNativeEnum<
43
- typeof VolumeBasedPromotionPromotionType
44
- > = z.nativeEnum(VolumeBasedPromotionPromotionType);
45
-
46
30
  /** @internal */
47
31
  export const Slabs$inboundSchema: z.ZodType<Slabs, z.ZodTypeDef, unknown> = z
48
32
  .object({
@@ -71,7 +55,7 @@ export const VolumeBasedPromotion$inboundSchema: z.ZodType<
71
55
  z.ZodTypeDef,
72
56
  unknown
73
57
  > = z.object({
74
- promotion_type: z.literal("volume-based").default("volume-based").optional(),
58
+ promotion_type: z.literal("volume-based"),
75
59
  slabs: z.array(z.lazy(() => Slabs$inboundSchema)),
76
60
  }).transform((v) => {
77
61
  return remap$(v, {
@@ -38,7 +38,7 @@ export type CreateAddressRequestBody = {
38
38
  pincode: string;
39
39
  city: string;
40
40
  state: string;
41
- country?: "India" | undefined;
41
+ country: "India";
42
42
  /**
43
43
  * Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
44
44
  */
@@ -10,7 +10,8 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type GenerateOtpRequestBody =
13
- | components.GenerateOtpWithPhone
13
+ | (components.GenerateOtpWithPhone & { channel: "sms" })
14
+ | (components.GenerateOtpWithPhone & { channel: "whatsapp" })
14
15
  | components.GenerateOtpWithEmail;
15
16
 
16
17
  export type GenerateOtpRequest = {
@@ -19,7 +20,8 @@ export type GenerateOtpRequest = {
19
20
  */
20
21
  xDebugMode?: boolean | undefined;
21
22
  requestBody:
22
- | components.GenerateOtpWithPhone
23
+ | (components.GenerateOtpWithPhone & { channel: "sms" })
24
+ | (components.GenerateOtpWithPhone & { channel: "whatsapp" })
23
25
  | components.GenerateOtpWithEmail;
24
26
  };
25
27
 
@@ -57,7 +59,8 @@ export type GenerateOtpResponseBody = {
57
59
 
58
60
  /** @internal */
59
61
  export type GenerateOtpRequestBody$Outbound =
60
- | components.GenerateOtpWithPhone$Outbound
62
+ | (components.GenerateOtpWithPhone$Outbound & { channel: "sms" })
63
+ | (components.GenerateOtpWithPhone$Outbound & { channel: "whatsapp" })
61
64
  | components.GenerateOtpWithEmail$Outbound;
62
65
 
63
66
  /** @internal */
@@ -66,7 +69,12 @@ export const GenerateOtpRequestBody$outboundSchema: z.ZodType<
66
69
  z.ZodTypeDef,
67
70
  GenerateOtpRequestBody
68
71
  > = z.union([
69
- components.GenerateOtpWithPhone$outboundSchema,
72
+ components.GenerateOtpWithPhone$outboundSchema.and(
73
+ z.object({ channel: z.literal("sms") }),
74
+ ),
75
+ components.GenerateOtpWithPhone$outboundSchema.and(
76
+ z.object({ channel: z.literal("whatsapp") }),
77
+ ),
70
78
  components.GenerateOtpWithEmail$outboundSchema,
71
79
  ]);
72
80
 
@@ -82,7 +90,8 @@ export function generateOtpRequestBodyToJSON(
82
90
  export type GenerateOtpRequest$Outbound = {
83
91
  "x-debug-mode"?: boolean | undefined;
84
92
  RequestBody:
85
- | components.GenerateOtpWithPhone$Outbound
93
+ | (components.GenerateOtpWithPhone$Outbound & { channel: "sms" })
94
+ | (components.GenerateOtpWithPhone$Outbound & { channel: "whatsapp" })
86
95
  | components.GenerateOtpWithEmail$Outbound;
87
96
  };
88
97
 
@@ -94,7 +103,12 @@ export const GenerateOtpRequest$outboundSchema: z.ZodType<
94
103
  > = z.object({
95
104
  xDebugMode: z.boolean().optional(),
96
105
  requestBody: z.union([
97
- components.GenerateOtpWithPhone$outboundSchema,
106
+ components.GenerateOtpWithPhone$outboundSchema.and(
107
+ z.object({ channel: z.literal("sms") }),
108
+ ),
109
+ components.GenerateOtpWithPhone$outboundSchema.and(
110
+ z.object({ channel: z.literal("whatsapp") }),
111
+ ),
98
112
  components.GenerateOtpWithEmail$outboundSchema,
99
113
  ]),
100
114
  }).transform((v) => {
@@ -46,7 +46,7 @@ export type Address = {
46
46
  pincode: string;
47
47
  city: string;
48
48
  state: string;
49
- country?: "India" | undefined;
49
+ country: "India";
50
50
  /**
51
51
  * Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
52
52
  */
@@ -118,7 +118,7 @@ export const Address$inboundSchema: z.ZodType<Address, z.ZodTypeDef, unknown> =
118
118
  pincode: z.string(),
119
119
  city: z.string(),
120
120
  state: z.string(),
121
- country: z.literal("India").default("India").optional(),
121
+ country: z.literal("India"),
122
122
  tax_identification_number: z.nullable(z.string()),
123
123
  business_name: z.nullable(z.string()),
124
124
  is_phone_verified: z.boolean(),
@@ -0,0 +1,118 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type GetMarketplaceProductDetailRequest = {
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
+ /**
18
+ * Determines whether to include or exlude inventory details in response json
19
+ */
20
+ inventory?: boolean | undefined;
21
+ /**
22
+ * The unique identifier of the product. Can be either the product ID or the slug.
23
+ */
24
+ productIdOrSlug: string;
25
+ };
26
+
27
+ export type GetMarketplaceProductDetailContent = {
28
+ product: components.ProductDetail;
29
+ };
30
+
31
+ /**
32
+ * Success response
33
+ */
34
+ export type GetMarketplaceProductDetailResponseBody = {
35
+ message: string;
36
+ success: boolean;
37
+ content: GetMarketplaceProductDetailContent;
38
+ };
39
+
40
+ /** @internal */
41
+ export type GetMarketplaceProductDetailRequest$Outbound = {
42
+ "x-customer-group-id"?: string | undefined;
43
+ inventory?: boolean | undefined;
44
+ product_id_or_slug: string;
45
+ };
46
+
47
+ /** @internal */
48
+ export const GetMarketplaceProductDetailRequest$outboundSchema: z.ZodType<
49
+ GetMarketplaceProductDetailRequest$Outbound,
50
+ z.ZodTypeDef,
51
+ GetMarketplaceProductDetailRequest
52
+ > = z.object({
53
+ xCustomerGroupId: z.string().optional(),
54
+ inventory: z.boolean().optional(),
55
+ productIdOrSlug: z.string(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ xCustomerGroupId: "x-customer-group-id",
59
+ productIdOrSlug: "product_id_or_slug",
60
+ });
61
+ });
62
+
63
+ export function getMarketplaceProductDetailRequestToJSON(
64
+ getMarketplaceProductDetailRequest: GetMarketplaceProductDetailRequest,
65
+ ): string {
66
+ return JSON.stringify(
67
+ GetMarketplaceProductDetailRequest$outboundSchema.parse(
68
+ getMarketplaceProductDetailRequest,
69
+ ),
70
+ );
71
+ }
72
+
73
+ /** @internal */
74
+ export const GetMarketplaceProductDetailContent$inboundSchema: z.ZodType<
75
+ GetMarketplaceProductDetailContent,
76
+ z.ZodTypeDef,
77
+ unknown
78
+ > = z.object({
79
+ product: components.ProductDetail$inboundSchema,
80
+ });
81
+
82
+ export function getMarketplaceProductDetailContentFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<GetMarketplaceProductDetailContent, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) =>
88
+ GetMarketplaceProductDetailContent$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'GetMarketplaceProductDetailContent' from JSON`,
90
+ );
91
+ }
92
+
93
+ /** @internal */
94
+ export const GetMarketplaceProductDetailResponseBody$inboundSchema: z.ZodType<
95
+ GetMarketplaceProductDetailResponseBody,
96
+ z.ZodTypeDef,
97
+ unknown
98
+ > = z.object({
99
+ message: z.string(),
100
+ success: z.boolean(),
101
+ content: z.lazy(() => GetMarketplaceProductDetailContent$inboundSchema),
102
+ });
103
+
104
+ export function getMarketplaceProductDetailResponseBodyFromJSON(
105
+ jsonString: string,
106
+ ): SafeParseResult<
107
+ GetMarketplaceProductDetailResponseBody,
108
+ SDKValidationError
109
+ > {
110
+ return safeParse(
111
+ jsonString,
112
+ (x) =>
113
+ GetMarketplaceProductDetailResponseBody$inboundSchema.parse(
114
+ JSON.parse(x),
115
+ ),
116
+ `Failed to parse 'GetMarketplaceProductDetailResponseBody' from JSON`,
117
+ );
118
+ }