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
@@ -0,0 +1,177 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CeStorefrontCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { CeStorefrontError } from "../models/errors/cestorefronterror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Search products
30
+ *
31
+ * @remarks
32
+ * Search for products matching a specific words or characters given.
33
+ *
34
+ * @see {@link https://llm-docs.commercengine.io/storefront/operations/search-marketplace-products} - API reference for the search-marketplace-products operation
35
+ */
36
+ export function marketplaceSearchProducts(
37
+ client: CeStorefrontCore,
38
+ request: operations.SearchMarketplaceProductsRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.SearchMarketplaceProductsResponseBody,
43
+ | errors.Unauthorized
44
+ | CeStorefrontError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: CeStorefrontCore,
63
+ request: operations.SearchMarketplaceProductsRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ operations.SearchMarketplaceProductsResponseBody,
69
+ | errors.Unauthorized
70
+ | CeStorefrontError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) =>
85
+ operations.SearchMarketplaceProductsRequest$outboundSchema.parse(value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = encodeJSON("body", payload.SearchProduct, { explode: true });
93
+
94
+ const path = pathToFunc("/catalog/marketplace/products/search")();
95
+
96
+ const headers = new Headers(compactMap({
97
+ "Content-Type": "application/json",
98
+ Accept: "application/json",
99
+ "x-customer-group-id": encodeSimple(
100
+ "x-customer-group-id",
101
+ payload["x-customer-group-id"],
102
+ { explode: false, charEncoding: "none" },
103
+ ),
104
+ }));
105
+
106
+ const secConfig = await extractSecurity(client._options.authorization);
107
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
108
+ const requestSecurity = resolveGlobalSecurity(securityInput);
109
+
110
+ const context = {
111
+ options: client._options,
112
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
113
+ operationID: "search-marketplace-products",
114
+ oAuth2Scopes: null,
115
+
116
+ resolvedSecurity: requestSecurity,
117
+
118
+ securitySource: client._options.authorization,
119
+ retryConfig: options?.retries
120
+ || client._options.retryConfig
121
+ || { strategy: "none" },
122
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
123
+ };
124
+
125
+ const requestRes = client._createRequest(context, {
126
+ security: requestSecurity,
127
+ method: "POST",
128
+ baseURL: options?.serverURL,
129
+ path: path,
130
+ headers: headers,
131
+ body: body,
132
+ userAgent: client._options.userAgent,
133
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
134
+ }, options);
135
+ if (!requestRes.ok) {
136
+ return [requestRes, { status: "invalid" }];
137
+ }
138
+ const req = requestRes.value;
139
+
140
+ const doResult = await client._do(req, {
141
+ context,
142
+ errorCodes: ["401", "4XX", "5XX"],
143
+ retryConfig: context.retryConfig,
144
+ retryCodes: context.retryCodes,
145
+ });
146
+ if (!doResult.ok) {
147
+ return [doResult, { status: "request-error", request: req }];
148
+ }
149
+ const response = doResult.value;
150
+
151
+ const responseFields = {
152
+ HttpMeta: { Response: response, Request: req },
153
+ };
154
+
155
+ const [result] = await M.match<
156
+ operations.SearchMarketplaceProductsResponseBody,
157
+ | errors.Unauthorized
158
+ | CeStorefrontError
159
+ | ResponseValidationError
160
+ | ConnectionError
161
+ | RequestAbortedError
162
+ | RequestTimeoutError
163
+ | InvalidRequestError
164
+ | UnexpectedClientError
165
+ | SDKValidationError
166
+ >(
167
+ M.json(200, operations.SearchMarketplaceProductsResponseBody$inboundSchema),
168
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
169
+ M.fail("4XX"),
170
+ M.fail("5XX"),
171
+ )(response, req, { extraFields: responseFields });
172
+ if (!result.ok) {
173
+ return [result, { status: "complete", request: req, response }];
174
+ }
175
+
176
+ return [result, { status: "complete", request: req, response }];
177
+ }
package/src/lib/config.ts CHANGED
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "1.0",
83
- sdkVersion: "0.20.1",
84
- genVersion: "2.745.2",
85
- userAgent: "speakeasy-sdk/typescript 0.20.1 2.745.2 1.0 ce-storefront",
83
+ sdkVersion: "0.21.0",
84
+ genVersion: "2.768.1",
85
+ userAgent: "speakeasy-sdk/typescript 0.21.0 2.768.1 1.0 ce-storefront",
86
86
  } as const;
@@ -102,8 +102,9 @@ export function encodeLabel(
102
102
  });
103
103
  encValue = mapped?.join("").slice(1);
104
104
  } else {
105
- const k =
106
- options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : "";
105
+ const k = options?.explode && isPlainObject(value)
106
+ ? `${encodeString(pk)}=`
107
+ : "";
107
108
  encValue = `${k}${encodeValue(pv)}`;
108
109
  }
109
110
 
@@ -426,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string {
426
427
  type QueryEncoderOptions = {
427
428
  explode?: boolean;
428
429
  charEncoding?: "percent" | "none";
430
+ allowEmptyValue?: string[];
429
431
  };
430
432
 
431
433
  type QueryEncoder = (
@@ -440,7 +442,7 @@ type BulkQueryEncoder = (
440
442
  ) => string;
441
443
 
442
444
  export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
443
- const bulkEncode = function (
445
+ const bulkEncode = function(
444
446
  values: Record<string, unknown>,
445
447
  options?: QueryEncoderOptions,
446
448
  ): string {
@@ -450,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
450
452
  charEncoding: options?.charEncoding ?? "percent",
451
453
  };
452
454
 
455
+ const allowEmptySet = new Set(options?.allowEmptyValue ?? []);
456
+
453
457
  const encoded = Object.entries(values).map(([key, value]) => {
458
+ if (allowEmptySet.has(key)) {
459
+ if (
460
+ value === undefined
461
+ || value === null
462
+ || value === ""
463
+ || (Array.isArray(value) && value.length === 0)
464
+ ) {
465
+ return `${encodeURIComponent(key)}=`;
466
+ }
467
+ }
454
468
  return f(key, value, opts);
455
469
  });
456
470
  return queryJoin(...encoded);
@@ -19,7 +19,7 @@ export type BooleanAttribute = {
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: "boolean";
23
23
  /**
24
24
  * For boolean attributes
25
25
  */
@@ -35,7 +35,7 @@ export const BooleanAttribute$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("boolean"),
39
39
  value: z.boolean(),
40
40
  });
41
41
 
@@ -19,7 +19,7 @@ export type PreferenceType = ClosedEnum<typeof PreferenceType>;
19
19
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/CollectInStoreFulfillment} - API reference for the CollectInStoreFulfillment schema
20
20
  */
21
21
  export type CollectInStoreFulfillment = {
22
- fulfillmentType?: "collect-in-store" | undefined;
22
+ fulfillmentType: "collect-in-store";
23
23
  preferenceType?: PreferenceType | undefined;
24
24
  pickupLocationId: string;
25
25
  pickupLocationName?: string | undefined;
@@ -36,8 +36,7 @@ export const CollectInStoreFulfillment$inboundSchema: z.ZodType<
36
36
  z.ZodTypeDef,
37
37
  unknown
38
38
  > = z.object({
39
- fulfillment_type: z.literal("collect-in-store").default("collect-in-store")
40
- .optional(),
39
+ fulfillment_type: z.literal("collect-in-store"),
41
40
  preference_type: PreferenceType$inboundSchema.optional(),
42
41
  pickup_location_id: z.string(),
43
42
  pickup_location_name: z.string().optional(),
@@ -9,7 +9,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
9
9
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/CollectInStoreFulfillment} - API reference for the CollectInStoreFulfillment schema
10
10
  */
11
11
  export type CollectInStoreFulfillmentInput = {
12
- fulfillmentType?: "collect-in-store" | undefined;
12
+ fulfillmentType: "collect-in-store";
13
13
  pickupLocationId: string;
14
14
  };
15
15
 
@@ -27,7 +27,7 @@ export type ColorAttribute = {
27
27
  * 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`
28
28
  */
29
29
  key: string;
30
- type: string;
30
+ type: "color";
31
31
  value: Array<ColorAttributeValue>;
32
32
  };
33
33
 
@@ -60,7 +60,7 @@ export const ColorAttribute$inboundSchema: z.ZodType<
60
60
  id: z.string(),
61
61
  name: z.string(),
62
62
  key: z.string(),
63
- type: z.string(),
63
+ type: z.literal("color"),
64
64
  value: z.array(z.lazy(() => ColorAttributeValue$inboundSchema)),
65
65
  });
66
66
 
@@ -29,7 +29,7 @@ export type ColorOption = {
29
29
  /**
30
30
  * The type of the associated option.
31
31
  */
32
- type?: "color" | undefined;
32
+ type: "color";
33
33
  value: Value;
34
34
  };
35
35
 
@@ -57,7 +57,7 @@ export const ColorOption$inboundSchema: z.ZodType<
57
57
  unknown
58
58
  > = z.object({
59
59
  name: z.string(),
60
- type: z.literal("color").default("color").optional(),
60
+ type: z.literal("color"),
61
61
  value: z.lazy(() => Value$inboundSchema),
62
62
  });
63
63
 
@@ -35,7 +35,7 @@ export type CustomerAddress = {
35
35
  pincode: string;
36
36
  city: string;
37
37
  state: string;
38
- country?: "India" | undefined;
38
+ country: "India";
39
39
  /**
40
40
  * Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
41
41
  */
@@ -66,7 +66,7 @@ export const CustomerAddress$inboundSchema: z.ZodType<
66
66
  pincode: z.string(),
67
67
  city: z.string(),
68
68
  state: z.string(),
69
- country: z.literal("India").default("India").optional(),
69
+ country: z.literal("India"),
70
70
  tax_identification_number: z.nullable(z.string()),
71
71
  business_name: z.nullable(z.string()),
72
72
  is_phone_verified: z.boolean(),
@@ -32,7 +32,7 @@ export type CustomerAddressInput = {
32
32
  pincode: string;
33
33
  city: string;
34
34
  state: string;
35
- country?: "India" | undefined;
35
+ country: "India";
36
36
  /**
37
37
  * Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
38
38
  */
@@ -19,7 +19,7 @@ export type DateAttribute = {
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: "date";
23
23
  /**
24
24
  * For date attributes
25
25
  */
@@ -35,7 +35,7 @@ export const DateAttribute$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("date"),
39
39
  value: z.string().datetime({ offset: true }).transform(v => new Date(v)),
40
40
  });
41
41
 
@@ -21,7 +21,7 @@ export type DeliveryFulfillmentPreferenceType = ClosedEnum<
21
21
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/DeliveryFulfillment} - API reference for the DeliveryFulfillment schema
22
22
  */
23
23
  export type DeliveryFulfillment = {
24
- fulfillmentType?: "delivery" | undefined;
24
+ fulfillmentType: "delivery";
25
25
  preferenceType?: DeliveryFulfillmentPreferenceType | undefined;
26
26
  shippingProviderId: string | null;
27
27
  shippingProviderName?: string | null | undefined;
@@ -40,7 +40,7 @@ export const DeliveryFulfillment$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- fulfillment_type: z.literal("delivery").default("delivery").optional(),
43
+ fulfillment_type: z.literal("delivery"),
44
44
  preference_type: DeliveryFulfillmentPreferenceType$inboundSchema.optional(),
45
45
  shipping_provider_id: z.nullable(z.string()),
46
46
  shipping_provider_name: z.nullable(z.string()).optional(),
@@ -9,7 +9,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
9
9
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/DeliveryFulfillment} - API reference for the DeliveryFulfillment schema
10
10
  */
11
11
  export type DeliveryFulfillmentInput = {
12
- fulfillmentType?: "delivery" | undefined;
12
+ fulfillmentType: "delivery";
13
13
  shippingProviderId: string | null;
14
14
  courierCompanyId?: string | null | undefined;
15
15
  };
@@ -9,16 +9,6 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- export const DiscountBasedPromotionPromotionType = {
13
- Discount: "discount",
14
- VolumeBased: "volume-based",
15
- FixedPrice: "fixed-price",
16
- FreeGoods: "free-goods",
17
- } as const;
18
- export type DiscountBasedPromotionPromotionType = ClosedEnum<
19
- typeof DiscountBasedPromotionPromotionType
20
- >;
21
-
22
12
  export const DiscountType = {
23
13
  Percentage: "percentage",
24
14
  FixedAmount: "fixed-amount",
@@ -29,7 +19,7 @@ export type DiscountType = ClosedEnum<typeof DiscountType>;
29
19
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/DiscountBasedPromotion} - API reference for the DiscountBasedPromotion schema
30
20
  */
31
21
  export type DiscountBasedPromotion = {
32
- promotionType?: "discount" | undefined;
22
+ promotionType: "discount";
33
23
  discountType: DiscountType;
34
24
  /**
35
25
  * '> 0' if discount_type = percentage, otherwise set 0.
@@ -41,11 +31,6 @@ export type DiscountBasedPromotion = {
41
31
  discountFixedAmount?: number | undefined;
42
32
  };
43
33
 
44
- /** @internal */
45
- export const DiscountBasedPromotionPromotionType$inboundSchema: z.ZodNativeEnum<
46
- typeof DiscountBasedPromotionPromotionType
47
- > = z.nativeEnum(DiscountBasedPromotionPromotionType);
48
-
49
34
  /** @internal */
50
35
  export const DiscountType$inboundSchema: z.ZodNativeEnum<typeof DiscountType> =
51
36
  z.nativeEnum(DiscountType);
@@ -56,7 +41,7 @@ export const DiscountBasedPromotion$inboundSchema: z.ZodType<
56
41
  z.ZodTypeDef,
57
42
  unknown
58
43
  > = z.object({
59
- promotion_type: z.literal("discount").default("discount").optional(),
44
+ promotion_type: z.literal("discount"),
60
45
  discount_type: DiscountType$inboundSchema,
61
46
  discount_percent: z.number().optional(),
62
47
  discount_fixed_amount: z.number().int().optional(),
@@ -5,40 +5,24 @@
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 FixedPricePromotionPromotionType = {
13
- Discount: "discount",
14
- VolumeBased: "volume-based",
15
- FixedPrice: "fixed-price",
16
- FreeGoods: "free-goods",
17
- } as const;
18
- export type FixedPricePromotionPromotionType = ClosedEnum<
19
- typeof FixedPricePromotionPromotionType
20
- >;
21
-
22
11
  /**
23
12
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/FixedPricePromotion} - API reference for the FixedPricePromotion schema
24
13
  */
25
14
  export type FixedPricePromotion = {
26
- promotionType?: "fixed-price" | undefined;
15
+ promotionType: "fixed-price";
27
16
  offerPrice: number;
28
17
  };
29
18
 
30
- /** @internal */
31
- export const FixedPricePromotionPromotionType$inboundSchema: z.ZodNativeEnum<
32
- typeof FixedPricePromotionPromotionType
33
- > = z.nativeEnum(FixedPricePromotionPromotionType);
34
-
35
19
  /** @internal */
36
20
  export const FixedPricePromotion$inboundSchema: z.ZodType<
37
21
  FixedPricePromotion,
38
22
  z.ZodTypeDef,
39
23
  unknown
40
24
  > = z.object({
41
- promotion_type: z.literal("fixed-price").default("fixed-price").optional(),
25
+ promotion_type: z.literal("fixed-price"),
42
26
  offer_price: z.number(),
43
27
  }).transform((v) => {
44
28
  return remap$(v, {
@@ -5,25 +5,14 @@
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 FreeGoodsPromotionPromotionType = {
13
- Discount: "discount",
14
- VolumeBased: "volume-based",
15
- FixedPrice: "fixed-price",
16
- FreeGoods: "free-goods",
17
- } as const;
18
- export type FreeGoodsPromotionPromotionType = ClosedEnum<
19
- typeof FreeGoodsPromotionPromotionType
20
- >;
21
-
22
11
  /**
23
12
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/FreeGoodsPromotion} - API reference for the FreeGoodsPromotion schema
24
13
  */
25
14
  export type FreeGoodsPromotion = {
26
- promotionType?: "free-goods" | undefined;
15
+ promotionType: "free-goods";
27
16
  /**
28
17
  * The quantity of items a customer must buy to receive free goods.
29
18
  */
@@ -34,18 +23,13 @@ export type FreeGoodsPromotion = {
34
23
  getQuantity: number;
35
24
  };
36
25
 
37
- /** @internal */
38
- export const FreeGoodsPromotionPromotionType$inboundSchema: z.ZodNativeEnum<
39
- typeof FreeGoodsPromotionPromotionType
40
- > = z.nativeEnum(FreeGoodsPromotionPromotionType);
41
-
42
26
  /** @internal */
43
27
  export const FreeGoodsPromotion$inboundSchema: z.ZodType<
44
28
  FreeGoodsPromotion,
45
29
  z.ZodTypeDef,
46
30
  unknown
47
31
  > = z.object({
48
- promotion_type: z.literal("free-goods").default("free-goods").optional(),
32
+ promotion_type: z.literal("free-goods"),
49
33
  buy_quantity: z.number().int(),
50
34
  get_quantity: z.number().int(),
51
35
  }).transform((v) => {
@@ -23,11 +23,9 @@ import {
23
23
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/FulfillmentPreference} - API reference for the FulfillmentPreference schema
24
24
  */
25
25
  export type FulfillmentPreference =
26
- | (PartialCollectAndDelivery & {
27
- fulfillmentType: "partial-collect-and-delivery";
28
- })
29
- | (CollectInStoreFulfillment & { fulfillmentType: "collect-in-store" })
30
- | (DeliveryFulfillment & { fulfillmentType: "delivery" });
26
+ | CollectInStoreFulfillment
27
+ | DeliveryFulfillment
28
+ | PartialCollectAndDelivery;
31
29
 
32
30
  /** @internal */
33
31
  export const FulfillmentPreference$inboundSchema: z.ZodType<
@@ -35,20 +33,9 @@ export const FulfillmentPreference$inboundSchema: z.ZodType<
35
33
  z.ZodTypeDef,
36
34
  unknown
37
35
  > = z.union([
38
- PartialCollectAndDelivery$inboundSchema.and(
39
- z.object({ fulfillment_type: z.literal("partial-collect-and-delivery") })
40
- .transform((v) => ({ fulfillmentType: v.fulfillment_type })),
41
- ),
42
- CollectInStoreFulfillment$inboundSchema.and(
43
- z.object({ fulfillment_type: z.literal("collect-in-store") }).transform((
44
- v,
45
- ) => ({ fulfillmentType: v.fulfillment_type })),
46
- ),
47
- DeliveryFulfillment$inboundSchema.and(
48
- z.object({ fulfillment_type: z.literal("delivery") }).transform((v) => ({
49
- fulfillmentType: v.fulfillment_type,
50
- })),
51
- ),
36
+ CollectInStoreFulfillment$inboundSchema,
37
+ DeliveryFulfillment$inboundSchema,
38
+ PartialCollectAndDelivery$inboundSchema,
52
39
  ]);
53
40
 
54
41
  export function fulfillmentPreferenceFromJSON(
@@ -23,21 +23,15 @@ import {
23
23
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/FulfillmentPreference} - API reference for the FulfillmentPreference schema
24
24
  */
25
25
  export type FulfillmentPreferenceInput =
26
- | (PartialCollectAndDeliveryInput & {
27
- fulfillmentType: "partial-collect-and-delivery";
28
- })
29
- | (CollectInStoreFulfillmentInput & { fulfillmentType: "collect-in-store" })
30
- | (DeliveryFulfillmentInput & { fulfillmentType: "delivery" });
26
+ | CollectInStoreFulfillmentInput
27
+ | DeliveryFulfillmentInput
28
+ | PartialCollectAndDeliveryInput;
31
29
 
32
30
  /** @internal */
33
31
  export type FulfillmentPreferenceInput$Outbound =
34
- | (PartialCollectAndDeliveryInput$Outbound & {
35
- fulfillment_type: "partial-collect-and-delivery";
36
- })
37
- | (CollectInStoreFulfillmentInput$Outbound & {
38
- fulfillment_type: "collect-in-store";
39
- })
40
- | (DeliveryFulfillmentInput$Outbound & { fulfillment_type: "delivery" });
32
+ | CollectInStoreFulfillmentInput$Outbound
33
+ | DeliveryFulfillmentInput$Outbound
34
+ | PartialCollectAndDeliveryInput$Outbound;
41
35
 
42
36
  /** @internal */
43
37
  export const FulfillmentPreferenceInput$outboundSchema: z.ZodType<
@@ -45,20 +39,9 @@ export const FulfillmentPreferenceInput$outboundSchema: z.ZodType<
45
39
  z.ZodTypeDef,
46
40
  FulfillmentPreferenceInput
47
41
  > = z.union([
48
- PartialCollectAndDeliveryInput$outboundSchema.and(
49
- z.object({ fulfillmentType: z.literal("partial-collect-and-delivery") })
50
- .transform((v) => ({ fulfillment_type: v.fulfillmentType })),
51
- ),
52
- CollectInStoreFulfillmentInput$outboundSchema.and(
53
- z.object({ fulfillmentType: z.literal("collect-in-store") }).transform((
54
- v,
55
- ) => ({ fulfillment_type: v.fulfillmentType })),
56
- ),
57
- DeliveryFulfillmentInput$outboundSchema.and(
58
- z.object({ fulfillmentType: z.literal("delivery") }).transform((v) => ({
59
- fulfillment_type: v.fulfillmentType,
60
- })),
61
- ),
42
+ CollectInStoreFulfillmentInput$outboundSchema,
43
+ DeliveryFulfillmentInput$outboundSchema,
44
+ PartialCollectAndDeliveryInput$outboundSchema,
62
45
  ]);
63
46
 
64
47
  export function fulfillmentPreferenceInputToJSON(
@@ -20,7 +20,7 @@ export type GenerateOtpWithEmailOtpAction = ClosedEnum<
20
20
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/GenerateOtpWithEmail} - API reference for the GenerateOtpWithEmail schema
21
21
  */
22
22
  export type GenerateOtpWithEmail = {
23
- channel?: "email" | undefined;
23
+ channel: "email";
24
24
  email: string;
25
25
  otpAction: GenerateOtpWithEmailOtpAction;
26
26
  };
@@ -16,7 +16,7 @@ export type Action = ClosedEnum<typeof Action>;
16
16
  */
17
17
  export type JusPayHyperCheckout = {
18
18
  paymentProviderSlug: string;
19
- integrationType?: "hyper-checkout" | undefined;
19
+ integrationType: "hyper-checkout";
20
20
  gatewayReferenceId: string;
21
21
  returnUrl: string;
22
22
  action: Action;
@@ -158,12 +158,11 @@ export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
158
158
  customerEmail: z.string().optional(),
159
159
  currency: z.string().optional(),
160
160
  description: z.string().optional(),
161
- "options.createMandate": z.literal("REQUIRED").default("REQUIRED")
162
- .optional(),
161
+ "options.createMandate": z.literal("REQUIRED").optional(),
163
162
  "mandate.maxAmount": z.string().optional(),
164
163
  "mandate.start_date ": z.string().optional(),
165
164
  "mandate.end_date ": z.string().optional(),
166
- "mandate.frequency": z.literal("MONTHLY").default("MONTHLY").optional(),
165
+ "mandate.frequency": z.literal("MONTHLY").optional(),
167
166
  "mandate.rule_value ": MandateRuleValue$inboundSchema.optional(),
168
167
  }).transform((v) => {
169
168
  return remap$(v, {