ce-storefront 0.3.4 → 0.3.6

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 (338) hide show
  1. package/README.md +26 -37
  2. package/docs/sdks/{cestorefrontpayments → cestorefrontorderspayments}/README.md +1 -1
  3. package/docs/sdks/customers/README.md +236 -0
  4. package/docs/sdks/{paymentsapijuspay → juspay}/README.md +12 -12
  5. package/docs/sdks/orders/README.md +80 -1
  6. package/docs/sdks/payments/README.md +242 -2
  7. package/docs/sdks/products/README.md +1 -1
  8. package/esm/funcs/catalogProductsGet.d.ts +1 -1
  9. package/esm/funcs/catalogProductsGet.js +1 -1
  10. package/esm/funcs/{customersAPIGetCustomersId.d.ts → customersGetCustomersId.d.ts} +2 -2
  11. package/esm/funcs/customersGetCustomersId.d.ts.map +1 -0
  12. package/esm/funcs/{customersAPIGetCustomersId.js → customersGetCustomersId.js} +2 -2
  13. package/esm/funcs/customersGetCustomersId.js.map +1 -0
  14. package/esm/funcs/{customersAPIPostCustomers.d.ts → customersPostCustomers.d.ts} +2 -2
  15. package/esm/funcs/customersPostCustomers.d.ts.map +1 -0
  16. package/esm/funcs/{customersAPIPostCustomers.js → customersPostCustomers.js} +2 -2
  17. package/esm/funcs/customersPostCustomers.js.map +1 -0
  18. package/esm/funcs/{customersAPIPutCustomersId.d.ts → customersPutCustomersId.d.ts} +2 -2
  19. package/esm/funcs/customersPutCustomersId.d.ts.map +1 -0
  20. package/esm/funcs/{customersAPIPutCustomersId.js → customersPutCustomersId.js} +2 -2
  21. package/esm/funcs/{customersAPIPostCustomers.js.map → customersPutCustomersId.js.map} +1 -1
  22. package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts → juspayGetPaymentsJuspayCustomer.d.ts} +2 -2
  23. package/esm/funcs/juspayGetPaymentsJuspayCustomer.d.ts.map +1 -0
  24. package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.js → juspayGetPaymentsJuspayCustomer.js} +2 -2
  25. package/esm/funcs/juspayGetPaymentsJuspayCustomer.js.map +1 -0
  26. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts → juspayPostPaymentsJuspayCreateCustomer.d.ts} +2 -2
  27. package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.d.ts.map +1 -0
  28. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js → juspayPostPaymentsJuspayCreateCustomer.js} +2 -2
  29. package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.js.map +1 -0
  30. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts → juspayPostPaymentsJuspayCreateOrder.d.ts} +2 -2
  31. package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.d.ts.map +1 -0
  32. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js → juspayPostPaymentsJuspayCreateOrder.js} +2 -2
  33. package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.js.map +1 -0
  34. package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.d.ts → ordersGetOrdersIdPaymentStatus.d.ts} +2 -2
  35. package/esm/funcs/ordersGetOrdersIdPaymentStatus.d.ts.map +1 -0
  36. package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.js → ordersGetOrdersIdPaymentStatus.js} +2 -2
  37. package/esm/funcs/ordersGetOrdersIdPaymentStatus.js.map +1 -0
  38. package/esm/funcs/paymentsGetMethods.d.ts +1 -1
  39. package/esm/funcs/paymentsGetMethods.d.ts.map +1 -1
  40. package/esm/funcs/paymentsGetMethods.js +3 -3
  41. package/esm/funcs/paymentsGetMethods.js.map +1 -1
  42. package/esm/funcs/{paymentsAPIGetPaymentsCards.d.ts → paymentsGetPaymentsCards.d.ts} +2 -2
  43. package/esm/funcs/paymentsGetPaymentsCards.d.ts.map +1 -0
  44. package/esm/funcs/{paymentsAPIGetPaymentsCards.js → paymentsGetPaymentsCards.js} +2 -2
  45. package/esm/funcs/paymentsGetPaymentsCards.js.map +1 -0
  46. package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.d.ts → paymentsGetPaymentsVerifyVpa.d.ts} +2 -2
  47. package/esm/funcs/paymentsGetPaymentsVerifyVpa.d.ts.map +1 -0
  48. package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.js → paymentsGetPaymentsVerifyVpa.js} +2 -2
  49. package/esm/funcs/paymentsGetPaymentsVerifyVpa.js.map +1 -0
  50. package/esm/funcs/{paymentsAPIPostPaymentsCards.d.ts → paymentsPostPaymentsCards.d.ts} +2 -2
  51. package/esm/funcs/paymentsPostPaymentsCards.d.ts.map +1 -0
  52. package/esm/funcs/{paymentsAPIPostPaymentsCards.js → paymentsPostPaymentsCards.js} +2 -2
  53. package/esm/funcs/paymentsPostPaymentsCards.js.map +1 -0
  54. package/esm/lib/config.d.ts +3 -3
  55. package/esm/lib/config.js +3 -3
  56. package/esm/models/components/analyticsevent.d.ts +8 -8
  57. package/esm/models/components/analyticsevent.d.ts.map +1 -1
  58. package/esm/models/components/analyticsevent.js +12 -12
  59. package/esm/models/components/analyticsevent.js.map +1 -1
  60. package/esm/models/components/associatedoption.d.ts +125 -0
  61. package/esm/models/components/associatedoption.d.ts.map +1 -0
  62. package/esm/models/components/associatedoption.js +107 -0
  63. package/esm/models/components/associatedoption.js.map +1 -0
  64. package/esm/models/components/cart.d.ts +16 -16
  65. package/esm/models/components/cart.d.ts.map +1 -1
  66. package/esm/models/components/cart.js +16 -16
  67. package/esm/models/components/cart.js.map +1 -1
  68. package/esm/models/components/createcustomer.d.ts +1 -1
  69. package/esm/models/components/createcustomer.d.ts.map +1 -1
  70. package/esm/models/components/createcustomer.js +1 -1
  71. package/esm/models/components/createcustomer.js.map +1 -1
  72. package/esm/models/components/{customeraddressinput.d.ts → customeraddress.d.ts} +33 -33
  73. package/esm/models/components/customeraddress.d.ts.map +1 -0
  74. package/esm/models/components/{customeraddressinput.js → customeraddress.js} +37 -37
  75. package/esm/models/components/customeraddress.js.map +1 -0
  76. package/esm/models/components/discountbasedpromotion.d.ts +0 -2
  77. package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
  78. package/esm/models/components/discountbasedpromotion.js +0 -4
  79. package/esm/models/components/discountbasedpromotion.js.map +1 -1
  80. package/esm/models/components/fixedpricepromotion.d.ts +0 -2
  81. package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
  82. package/esm/models/components/fixedpricepromotion.js +0 -4
  83. package/esm/models/components/fixedpricepromotion.js.map +1 -1
  84. package/esm/models/components/freegoodspromotion.d.ts +2 -7
  85. package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
  86. package/esm/models/components/freegoodspromotion.js +2 -6
  87. package/esm/models/components/freegoodspromotion.js.map +1 -1
  88. package/esm/models/components/index.d.ts +6 -8
  89. package/esm/models/components/index.d.ts.map +1 -1
  90. package/esm/models/components/index.js +6 -8
  91. package/esm/models/components/index.js.map +1 -1
  92. package/esm/models/components/orderdetail.d.ts +1 -1
  93. package/esm/models/components/orderdetail.d.ts.map +1 -1
  94. package/esm/models/components/orderdetail.js +1 -1
  95. package/esm/models/components/orderdetail.js.map +1 -1
  96. package/esm/models/components/{productlist.d.ts → product.d.ts} +38 -78
  97. package/esm/models/components/product.d.ts.map +1 -0
  98. package/esm/models/components/{productlist.js → product.js} +37 -98
  99. package/esm/models/components/product.js.map +1 -0
  100. package/esm/models/components/productattribute.d.ts +97 -64
  101. package/esm/models/components/productattribute.d.ts.map +1 -1
  102. package/esm/models/components/productattribute.js +67 -128
  103. package/esm/models/components/productattribute.js.map +1 -1
  104. package/esm/models/components/productcategory.d.ts +2 -2
  105. package/esm/models/components/productcategory.d.ts.map +1 -1
  106. package/esm/models/components/productcategory.js +2 -2
  107. package/esm/models/components/productcategory.js.map +1 -1
  108. package/esm/models/components/productdetail.d.ts +63 -165
  109. package/esm/models/components/productdetail.d.ts.map +1 -1
  110. package/esm/models/components/productdetail.js +70 -204
  111. package/esm/models/components/productdetail.js.map +1 -1
  112. package/esm/models/components/productlistresponse.d.ts +24 -3
  113. package/esm/models/components/productlistresponse.d.ts.map +1 -1
  114. package/esm/models/components/productlistresponse.js +24 -3
  115. package/esm/models/components/productlistresponse.js.map +1 -1
  116. package/esm/models/components/productpromotion.d.ts +11 -5
  117. package/esm/models/components/productpromotion.d.ts.map +1 -1
  118. package/esm/models/components/productshipping.d.ts +0 -2
  119. package/esm/models/components/productshipping.d.ts.map +1 -1
  120. package/esm/models/components/productshipping.js +0 -4
  121. package/esm/models/components/productshipping.js.map +1 -1
  122. package/esm/models/components/{promotion.d.ts → promotiondetail.d.ts} +29 -29
  123. package/esm/models/components/promotiondetail.d.ts.map +1 -0
  124. package/esm/models/components/{promotion.js → promotiondetail.js} +29 -29
  125. package/esm/models/components/promotiondetail.js.map +1 -0
  126. package/esm/models/components/seo.d.ts +6 -6
  127. package/esm/models/components/seo.d.ts.map +1 -1
  128. package/esm/models/components/seo.js +6 -19
  129. package/esm/models/components/seo.js.map +1 -1
  130. package/esm/models/components/{skuinfo.d.ts → sku.d.ts} +56 -48
  131. package/esm/models/components/sku.d.ts.map +1 -0
  132. package/esm/models/components/{skuinfo.js → sku.js} +65 -57
  133. package/esm/models/components/sku.js.map +1 -0
  134. package/esm/models/components/variant.d.ts +13 -52
  135. package/esm/models/components/variant.d.ts.map +1 -1
  136. package/esm/models/components/variant.js +5 -55
  137. package/esm/models/components/variant.js.map +1 -1
  138. package/esm/models/components/variantdetail.d.ts +31 -60
  139. package/esm/models/components/variantdetail.d.ts.map +1 -1
  140. package/esm/models/components/variantdetail.js +20 -57
  141. package/esm/models/components/variantdetail.js.map +1 -1
  142. package/esm/models/components/variantoption.d.ts +118 -0
  143. package/esm/models/components/variantoption.d.ts.map +1 -0
  144. package/esm/models/components/variantoption.js +114 -0
  145. package/esm/models/components/variantoption.js.map +1 -0
  146. package/esm/models/components/volumebasedpromotion.d.ts +0 -5
  147. package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
  148. package/esm/models/components/volumebasedpromotion.js +0 -4
  149. package/esm/models/components/volumebasedpromotion.js.map +1 -1
  150. package/esm/models/operations/getpaymentmethods.d.ts +143 -0
  151. package/esm/models/operations/getpaymentmethods.d.ts.map +1 -0
  152. package/esm/models/operations/{getpaymentspaymentmethods.js → getpaymentmethods.js} +42 -44
  153. package/esm/models/operations/getpaymentmethods.js.map +1 -0
  154. package/esm/models/operations/getpromotions.d.ts +2 -2
  155. package/esm/models/operations/getpromotions.d.ts.map +1 -1
  156. package/esm/models/operations/getpromotions.js +2 -2
  157. package/esm/models/operations/getpromotions.js.map +1 -1
  158. package/esm/models/operations/getsimilar.d.ts +2 -27
  159. package/esm/models/operations/getsimilar.d.ts.map +1 -1
  160. package/esm/models/operations/getsimilar.js +2 -27
  161. package/esm/models/operations/getsimilar.js.map +1 -1
  162. package/esm/models/operations/getskus.d.ts +2 -2
  163. package/esm/models/operations/getskus.d.ts.map +1 -1
  164. package/esm/models/operations/getskus.js +2 -2
  165. package/esm/models/operations/getskus.js.map +1 -1
  166. package/esm/models/operations/getwishtlist.d.ts +2 -2
  167. package/esm/models/operations/getwishtlist.d.ts.map +1 -1
  168. package/esm/models/operations/getwishtlist.js +2 -2
  169. package/esm/models/operations/getwishtlist.js.map +1 -1
  170. package/esm/models/operations/index.d.ts +1 -2
  171. package/esm/models/operations/index.d.ts.map +1 -1
  172. package/esm/models/operations/index.js +1 -2
  173. package/esm/models/operations/index.js.map +1 -1
  174. package/esm/models/operations/postcartitemid.d.ts +15 -15
  175. package/esm/models/operations/postcartitemid.d.ts.map +1 -1
  176. package/esm/models/operations/postcartitemid.js +15 -15
  177. package/esm/models/operations/postcartitemid.js.map +1 -1
  178. package/esm/sdk/{cestorefrontpayments.d.ts → cestorefrontorderspayments.d.ts} +2 -2
  179. package/esm/sdk/cestorefrontorderspayments.d.ts.map +1 -0
  180. package/esm/sdk/{cestorefrontpayments.js → cestorefrontorderspayments.js} +2 -2
  181. package/esm/sdk/cestorefrontorderspayments.js.map +1 -0
  182. package/esm/sdk/customers.d.ts +24 -1
  183. package/esm/sdk/customers.d.ts.map +1 -1
  184. package/esm/sdk/customers.js +31 -0
  185. package/esm/sdk/customers.js.map +1 -1
  186. package/esm/sdk/{paymentsapijuspay.d.ts → juspay.d.ts} +2 -2
  187. package/esm/sdk/juspay.d.ts.map +1 -0
  188. package/esm/sdk/{paymentsapijuspay.js → juspay.js} +8 -8
  189. package/esm/sdk/juspay.js.map +1 -0
  190. package/esm/sdk/orders.d.ts +9 -2
  191. package/esm/sdk/orders.d.ts.map +1 -1
  192. package/esm/sdk/orders.js +12 -2
  193. package/esm/sdk/orders.js.map +1 -1
  194. package/esm/sdk/payments.d.ts +23 -1
  195. package/esm/sdk/payments.d.ts.map +1 -1
  196. package/esm/sdk/payments.js +31 -0
  197. package/esm/sdk/payments.js.map +1 -1
  198. package/esm/sdk/products.d.ts +1 -1
  199. package/esm/sdk/products.js +1 -1
  200. package/esm/sdk/sdk.d.ts +3 -12
  201. package/esm/sdk/sdk.d.ts.map +1 -1
  202. package/esm/sdk/sdk.js +3 -15
  203. package/esm/sdk/sdk.js.map +1 -1
  204. package/jsr.json +1 -1
  205. package/package.json +1 -1
  206. package/src/funcs/catalogProductsGet.ts +1 -1
  207. package/src/funcs/{customersAPIGetCustomersId.ts → customersGetCustomersId.ts} +1 -1
  208. package/src/funcs/{customersAPIPostCustomers.ts → customersPostCustomers.ts} +1 -1
  209. package/src/funcs/{customersAPIPutCustomersId.ts → customersPutCustomersId.ts} +1 -1
  210. package/src/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.ts → juspayGetPaymentsJuspayCustomer.ts} +1 -1
  211. package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.ts → juspayPostPaymentsJuspayCreateCustomer.ts} +1 -1
  212. package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.ts → juspayPostPaymentsJuspayCreateOrder.ts} +1 -1
  213. package/src/funcs/{ordersAPIGetOrdersIdPaymentStatus.ts → ordersGetOrdersIdPaymentStatus.ts} +1 -1
  214. package/src/funcs/paymentsGetMethods.ts +6 -7
  215. package/src/funcs/{paymentsAPIGetPaymentsCards.ts → paymentsGetPaymentsCards.ts} +1 -1
  216. package/src/funcs/{paymentsAPIGetPaymentsVerifyVpa.ts → paymentsGetPaymentsVerifyVpa.ts} +1 -1
  217. package/src/funcs/{paymentsAPIPostPaymentsCards.ts → paymentsPostPaymentsCards.ts} +1 -1
  218. package/src/lib/config.ts +3 -3
  219. package/src/models/components/analyticsevent.ts +16 -15
  220. package/src/models/components/associatedoption.ts +217 -0
  221. package/src/models/components/cart.ts +25 -25
  222. package/src/models/components/createcustomer.ts +1 -1
  223. package/src/models/components/discountbasedpromotion.ts +0 -6
  224. package/src/models/components/fixedpricepromotion.ts +0 -6
  225. package/src/models/components/freegoodspromotion.ts +4 -13
  226. package/src/models/components/index.ts +6 -8
  227. package/src/models/components/orderdetail.ts +1 -1
  228. package/src/models/components/{skuinfo.ts → product.ts} +111 -96
  229. package/src/models/components/productattribute.ts +162 -188
  230. package/src/models/components/productcategory.ts +4 -4
  231. package/src/models/components/productdetail.ts +143 -418
  232. package/src/models/components/productlistresponse.ts +55 -9
  233. package/src/models/components/productshipping.ts +0 -6
  234. package/src/models/components/{promotion.ts → promotiondetail.ts} +47 -45
  235. package/src/models/components/seo.ts +12 -25
  236. package/src/models/components/sku.ts +244 -0
  237. package/src/models/components/variant.ts +14 -119
  238. package/src/models/components/variantdetail.ts +51 -143
  239. package/src/models/components/variantoption.ts +214 -0
  240. package/src/models/components/volumebasedpromotion.ts +0 -9
  241. package/src/models/operations/{getpaymentspaymentmethods.ts → getpaymentmethods.ts} +68 -77
  242. package/src/models/operations/getpromotions.ts +4 -4
  243. package/src/models/operations/getsimilar.ts +4 -62
  244. package/src/models/operations/getskus.ts +4 -4
  245. package/src/models/operations/getwishtlist.ts +4 -4
  246. package/src/models/operations/index.ts +1 -2
  247. package/src/models/operations/postcartitemid.ts +27 -25
  248. package/src/sdk/{cestorefrontpayments.ts → cestorefrontorderspayments.ts} +1 -1
  249. package/src/sdk/customers.ts +58 -1
  250. package/src/sdk/{paymentsapijuspay.ts → juspay.ts} +7 -7
  251. package/src/sdk/orders.ts +22 -4
  252. package/src/sdk/payments.ts +57 -2
  253. package/src/sdk/products.ts +1 -1
  254. package/src/sdk/sdk.ts +4 -22
  255. package/docs/sdks/customersapi/README.md +0 -321
  256. package/docs/sdks/ordersapi/README.md +0 -86
  257. package/docs/sdks/paymentsapi/README.md +0 -247
  258. package/esm/funcs/customersAPIGetCustomersId.d.ts.map +0 -1
  259. package/esm/funcs/customersAPIGetCustomersId.js.map +0 -1
  260. package/esm/funcs/customersAPIGetRecommendedProducts.d.ts +0 -16
  261. package/esm/funcs/customersAPIGetRecommendedProducts.d.ts.map +0 -1
  262. package/esm/funcs/customersAPIGetRecommendedProducts.js +0 -80
  263. package/esm/funcs/customersAPIGetRecommendedProducts.js.map +0 -1
  264. package/esm/funcs/customersAPIPostCustomers.d.ts.map +0 -1
  265. package/esm/funcs/customersAPIPutCustomersId.d.ts.map +0 -1
  266. package/esm/funcs/customersAPIPutCustomersId.js.map +0 -1
  267. package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.d.ts.map +0 -1
  268. package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.js.map +0 -1
  269. package/esm/funcs/paymentsAPIGetPaymentsCards.d.ts.map +0 -1
  270. package/esm/funcs/paymentsAPIGetPaymentsCards.js.map +0 -1
  271. package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.d.ts.map +0 -1
  272. package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.js.map +0 -1
  273. package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts.map +0 -1
  274. package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.js.map +0 -1
  275. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts.map +0 -1
  276. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js.map +0 -1
  277. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts.map +0 -1
  278. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js.map +0 -1
  279. package/esm/funcs/paymentsAPIPostPaymentsCards.d.ts.map +0 -1
  280. package/esm/funcs/paymentsAPIPostPaymentsCards.js.map +0 -1
  281. package/esm/models/components/customeraddressinput.d.ts.map +0 -1
  282. package/esm/models/components/customeraddressinput.js.map +0 -1
  283. package/esm/models/components/productbundleitem.d.ts +0 -47
  284. package/esm/models/components/productbundleitem.d.ts.map +0 -1
  285. package/esm/models/components/productbundleitem.js +0 -66
  286. package/esm/models/components/productbundleitem.js.map +0 -1
  287. package/esm/models/components/productlist.d.ts.map +0 -1
  288. package/esm/models/components/productlist.js.map +0 -1
  289. package/esm/models/components/productpackaging.d.ts +0 -68
  290. package/esm/models/components/productpackaging.d.ts.map +0 -1
  291. package/esm/models/components/productpackaging.js +0 -88
  292. package/esm/models/components/productpackaging.js.map +0 -1
  293. package/esm/models/components/promotion.d.ts.map +0 -1
  294. package/esm/models/components/promotion.js.map +0 -1
  295. package/esm/models/components/recommendedproduct.d.ts +0 -155
  296. package/esm/models/components/recommendedproduct.d.ts.map +0 -1
  297. package/esm/models/components/recommendedproduct.js +0 -193
  298. package/esm/models/components/recommendedproduct.js.map +0 -1
  299. package/esm/models/components/saleschannel.d.ts +0 -39
  300. package/esm/models/components/saleschannel.d.ts.map +0 -1
  301. package/esm/models/components/saleschannel.js +0 -53
  302. package/esm/models/components/saleschannel.js.map +0 -1
  303. package/esm/models/components/skuinfo.d.ts.map +0 -1
  304. package/esm/models/components/skuinfo.js.map +0 -1
  305. package/esm/models/operations/getpaymentspaymentmethods.d.ts +0 -143
  306. package/esm/models/operations/getpaymentspaymentmethods.d.ts.map +0 -1
  307. package/esm/models/operations/getpaymentspaymentmethods.js.map +0 -1
  308. package/esm/models/operations/getrecommendedproducts.d.ts +0 -90
  309. package/esm/models/operations/getrecommendedproducts.d.ts.map +0 -1
  310. package/esm/models/operations/getrecommendedproducts.js +0 -87
  311. package/esm/models/operations/getrecommendedproducts.js.map +0 -1
  312. package/esm/sdk/cestorefrontpayments.d.ts.map +0 -1
  313. package/esm/sdk/cestorefrontpayments.js.map +0 -1
  314. package/esm/sdk/customersapi.d.ts +0 -34
  315. package/esm/sdk/customersapi.d.ts.map +0 -1
  316. package/esm/sdk/customersapi.js +0 -48
  317. package/esm/sdk/customersapi.js.map +0 -1
  318. package/esm/sdk/ordersapi.d.ts +0 -12
  319. package/esm/sdk/ordersapi.d.ts.map +0 -1
  320. package/esm/sdk/ordersapi.js +0 -18
  321. package/esm/sdk/ordersapi.js.map +0 -1
  322. package/esm/sdk/paymentsapi.d.ts +0 -27
  323. package/esm/sdk/paymentsapi.d.ts.map +0 -1
  324. package/esm/sdk/paymentsapi.js +0 -39
  325. package/esm/sdk/paymentsapi.js.map +0 -1
  326. package/esm/sdk/paymentsapijuspay.d.ts.map +0 -1
  327. package/esm/sdk/paymentsapijuspay.js.map +0 -1
  328. package/src/funcs/customersAPIGetRecommendedProducts.ts +0 -144
  329. package/src/models/components/productbundleitem.ts +0 -127
  330. package/src/models/components/productlist.ts +0 -368
  331. package/src/models/components/productpackaging.ts +0 -162
  332. package/src/models/components/recommendedproduct.ts +0 -385
  333. package/src/models/components/saleschannel.ts +0 -96
  334. package/src/models/operations/getrecommendedproducts.ts +0 -206
  335. package/src/sdk/customersapi.ts +0 -82
  336. package/src/sdk/ordersapi.ts +0 -27
  337. package/src/sdk/paymentsapi.ts +0 -64
  338. package/src/models/components/{customeraddressinput.ts → customeraddress.ts} +60 -60
@@ -13,33 +13,79 @@ import {
13
13
  Pagination$outboundSchema,
14
14
  } from "./pagination.js";
15
15
  import {
16
- ProductList,
17
- ProductList$inboundSchema,
18
- ProductList$Outbound,
19
- ProductList$outboundSchema,
20
- } from "./productlist.js";
16
+ Product,
17
+ Product$inboundSchema,
18
+ Product$Outbound,
19
+ Product$outboundSchema,
20
+ } from "./product.js";
21
+
22
+ export type Products = Array<Product>;
21
23
 
22
24
  export type ProductListResponse = {
23
- products?: Array<ProductList> | undefined;
25
+ products?: Array<Product> | undefined;
24
26
  /**
25
27
  * pagination metadata structure
26
28
  */
27
29
  pagination?: Pagination | undefined;
28
30
  };
29
31
 
32
+ /** @internal */
33
+ export const Products$inboundSchema: z.ZodType<
34
+ Products,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.array(Product$inboundSchema);
38
+
39
+ /** @internal */
40
+ export type Products$Outbound = Array<Product$Outbound>;
41
+
42
+ /** @internal */
43
+ export const Products$outboundSchema: z.ZodType<
44
+ Products$Outbound,
45
+ z.ZodTypeDef,
46
+ Products
47
+ > = z.array(Product$outboundSchema);
48
+
49
+ /**
50
+ * @internal
51
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
+ */
53
+ export namespace Products$ {
54
+ /** @deprecated use `Products$inboundSchema` instead. */
55
+ export const inboundSchema = Products$inboundSchema;
56
+ /** @deprecated use `Products$outboundSchema` instead. */
57
+ export const outboundSchema = Products$outboundSchema;
58
+ /** @deprecated use `Products$Outbound` instead. */
59
+ export type Outbound = Products$Outbound;
60
+ }
61
+
62
+ export function productsToJSON(products: Products): string {
63
+ return JSON.stringify(Products$outboundSchema.parse(products));
64
+ }
65
+
66
+ export function productsFromJSON(
67
+ jsonString: string,
68
+ ): SafeParseResult<Products, SDKValidationError> {
69
+ return safeParse(
70
+ jsonString,
71
+ (x) => Products$inboundSchema.parse(JSON.parse(x)),
72
+ `Failed to parse 'Products' from JSON`,
73
+ );
74
+ }
75
+
30
76
  /** @internal */
31
77
  export const ProductListResponse$inboundSchema: z.ZodType<
32
78
  ProductListResponse,
33
79
  z.ZodTypeDef,
34
80
  unknown
35
81
  > = z.object({
36
- products: z.array(ProductList$inboundSchema).optional(),
82
+ products: z.array(Product$inboundSchema).optional(),
37
83
  pagination: Pagination$inboundSchema.optional(),
38
84
  });
39
85
 
40
86
  /** @internal */
41
87
  export type ProductListResponse$Outbound = {
42
- products?: Array<ProductList$Outbound> | undefined;
88
+ products?: Array<Product$Outbound> | undefined;
43
89
  pagination?: Pagination$Outbound | undefined;
44
90
  };
45
91
 
@@ -49,7 +95,7 @@ export const ProductListResponse$outboundSchema: z.ZodType<
49
95
  z.ZodTypeDef,
50
96
  ProductListResponse
51
97
  > = z.object({
52
- products: z.array(ProductList$outboundSchema).optional(),
98
+ products: z.array(Product$outboundSchema).optional(),
53
99
  pagination: Pagination$outboundSchema.optional(),
54
100
  });
55
101
 
@@ -15,7 +15,6 @@ export type ProductShipping = {
15
15
  shipsInternationally?: boolean | undefined;
16
16
  midCode?: string | undefined;
17
17
  countryOfOrigin?: string | undefined;
18
- taxRegion?: string | undefined;
19
18
  taxType?: string | undefined;
20
19
  taxRate?: number | undefined;
21
20
  };
@@ -32,7 +31,6 @@ export const ProductShipping$inboundSchema: z.ZodType<
32
31
  ships_internationally: z.boolean().optional(),
33
32
  mid_code: z.string().optional(),
34
33
  country_of_origin: z.string().default("India"),
35
- tax_region: z.string().optional(),
36
34
  tax_type: z.string().optional(),
37
35
  tax_rate: z.number().optional(),
38
36
  }).transform((v) => {
@@ -43,7 +41,6 @@ export const ProductShipping$inboundSchema: z.ZodType<
43
41
  "ships_internationally": "shipsInternationally",
44
42
  "mid_code": "midCode",
45
43
  "country_of_origin": "countryOfOrigin",
46
- "tax_region": "taxRegion",
47
44
  "tax_type": "taxType",
48
45
  "tax_rate": "taxRate",
49
46
  });
@@ -57,7 +54,6 @@ export type ProductShipping$Outbound = {
57
54
  ships_internationally?: boolean | undefined;
58
55
  mid_code?: string | undefined;
59
56
  country_of_origin: string;
60
- tax_region?: string | undefined;
61
57
  tax_type?: string | undefined;
62
58
  tax_rate?: number | undefined;
63
59
  };
@@ -74,7 +70,6 @@ export const ProductShipping$outboundSchema: z.ZodType<
74
70
  shipsInternationally: z.boolean().optional(),
75
71
  midCode: z.string().optional(),
76
72
  countryOfOrigin: z.string().default("India"),
77
- taxRegion: z.string().optional(),
78
73
  taxType: z.string().optional(),
79
74
  taxRate: z.number().optional(),
80
75
  }).transform((v) => {
@@ -85,7 +80,6 @@ export const ProductShipping$outboundSchema: z.ZodType<
85
80
  shipsInternationally: "ships_internationally",
86
81
  midCode: "mid_code",
87
82
  countryOfOrigin: "country_of_origin",
88
- taxRegion: "tax_region",
89
83
  taxType: "tax_type",
90
84
  taxRate: "tax_rate",
91
85
  });
@@ -17,18 +17,18 @@ export const PromotionType = {
17
17
  } as const;
18
18
  export type PromotionType = ClosedEnum<typeof PromotionType>;
19
19
 
20
- export type PromotionDetails = {};
20
+ export type PromotionDetailDetails = {};
21
21
 
22
22
  /**
23
23
  * promotion model
24
24
  */
25
- export type Promotion = {
25
+ export type PromotionDetail = {
26
26
  id?: string | undefined;
27
27
  name?: string | undefined;
28
28
  description?: string | undefined;
29
29
  promotionType?: PromotionType | undefined;
30
30
  tags?: Array<string> | undefined;
31
- details?: PromotionDetails | undefined;
31
+ details?: PromotionDetailDetails | undefined;
32
32
  hasRedemptionLimit?: boolean | undefined;
33
33
  redemptionLimit?: number | undefined;
34
34
  redemptionCount?: number | undefined;
@@ -64,56 +64,56 @@ export namespace PromotionType$ {
64
64
  }
65
65
 
66
66
  /** @internal */
67
- export const PromotionDetails$inboundSchema: z.ZodType<
68
- PromotionDetails,
67
+ export const PromotionDetailDetails$inboundSchema: z.ZodType<
68
+ PromotionDetailDetails,
69
69
  z.ZodTypeDef,
70
70
  unknown
71
71
  > = z.object({});
72
72
 
73
73
  /** @internal */
74
- export type PromotionDetails$Outbound = {};
74
+ export type PromotionDetailDetails$Outbound = {};
75
75
 
76
76
  /** @internal */
77
- export const PromotionDetails$outboundSchema: z.ZodType<
78
- PromotionDetails$Outbound,
77
+ export const PromotionDetailDetails$outboundSchema: z.ZodType<
78
+ PromotionDetailDetails$Outbound,
79
79
  z.ZodTypeDef,
80
- PromotionDetails
80
+ PromotionDetailDetails
81
81
  > = z.object({});
82
82
 
83
83
  /**
84
84
  * @internal
85
85
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
86
86
  */
87
- export namespace PromotionDetails$ {
88
- /** @deprecated use `PromotionDetails$inboundSchema` instead. */
89
- export const inboundSchema = PromotionDetails$inboundSchema;
90
- /** @deprecated use `PromotionDetails$outboundSchema` instead. */
91
- export const outboundSchema = PromotionDetails$outboundSchema;
92
- /** @deprecated use `PromotionDetails$Outbound` instead. */
93
- export type Outbound = PromotionDetails$Outbound;
87
+ export namespace PromotionDetailDetails$ {
88
+ /** @deprecated use `PromotionDetailDetails$inboundSchema` instead. */
89
+ export const inboundSchema = PromotionDetailDetails$inboundSchema;
90
+ /** @deprecated use `PromotionDetailDetails$outboundSchema` instead. */
91
+ export const outboundSchema = PromotionDetailDetails$outboundSchema;
92
+ /** @deprecated use `PromotionDetailDetails$Outbound` instead. */
93
+ export type Outbound = PromotionDetailDetails$Outbound;
94
94
  }
95
95
 
96
- export function promotionDetailsToJSON(
97
- promotionDetails: PromotionDetails,
96
+ export function promotionDetailDetailsToJSON(
97
+ promotionDetailDetails: PromotionDetailDetails,
98
98
  ): string {
99
99
  return JSON.stringify(
100
- PromotionDetails$outboundSchema.parse(promotionDetails),
100
+ PromotionDetailDetails$outboundSchema.parse(promotionDetailDetails),
101
101
  );
102
102
  }
103
103
 
104
- export function promotionDetailsFromJSON(
104
+ export function promotionDetailDetailsFromJSON(
105
105
  jsonString: string,
106
- ): SafeParseResult<PromotionDetails, SDKValidationError> {
106
+ ): SafeParseResult<PromotionDetailDetails, SDKValidationError> {
107
107
  return safeParse(
108
108
  jsonString,
109
- (x) => PromotionDetails$inboundSchema.parse(JSON.parse(x)),
110
- `Failed to parse 'PromotionDetails' from JSON`,
109
+ (x) => PromotionDetailDetails$inboundSchema.parse(JSON.parse(x)),
110
+ `Failed to parse 'PromotionDetailDetails' from JSON`,
111
111
  );
112
112
  }
113
113
 
114
114
  /** @internal */
115
- export const Promotion$inboundSchema: z.ZodType<
116
- Promotion,
115
+ export const PromotionDetail$inboundSchema: z.ZodType<
116
+ PromotionDetail,
117
117
  z.ZodTypeDef,
118
118
  unknown
119
119
  > = z.object({
@@ -122,7 +122,7 @@ export const Promotion$inboundSchema: z.ZodType<
122
122
  description: z.string().optional(),
123
123
  promotion_type: PromotionType$inboundSchema.optional(),
124
124
  tags: z.array(z.string()).optional(),
125
- details: z.lazy(() => PromotionDetails$inboundSchema).optional(),
125
+ details: z.lazy(() => PromotionDetailDetails$inboundSchema).optional(),
126
126
  has_redemption_limit: z.boolean().optional(),
127
127
  redemption_limit: z.number().int().optional(),
128
128
  redemption_count: z.number().int().optional(),
@@ -157,13 +157,13 @@ export const Promotion$inboundSchema: z.ZodType<
157
157
  });
158
158
 
159
159
  /** @internal */
160
- export type Promotion$Outbound = {
160
+ export type PromotionDetail$Outbound = {
161
161
  id?: string | undefined;
162
162
  name?: string | undefined;
163
163
  description?: string | undefined;
164
164
  promotion_type?: string | undefined;
165
165
  tags?: Array<string> | undefined;
166
- details?: PromotionDetails$Outbound | undefined;
166
+ details?: PromotionDetailDetails$Outbound | undefined;
167
167
  has_redemption_limit?: boolean | undefined;
168
168
  redemption_limit?: number | undefined;
169
169
  redemption_count?: number | undefined;
@@ -178,17 +178,17 @@ export type Promotion$Outbound = {
178
178
  };
179
179
 
180
180
  /** @internal */
181
- export const Promotion$outboundSchema: z.ZodType<
182
- Promotion$Outbound,
181
+ export const PromotionDetail$outboundSchema: z.ZodType<
182
+ PromotionDetail$Outbound,
183
183
  z.ZodTypeDef,
184
- Promotion
184
+ PromotionDetail
185
185
  > = z.object({
186
186
  id: z.string().optional(),
187
187
  name: z.string().optional(),
188
188
  description: z.string().optional(),
189
189
  promotionType: PromotionType$outboundSchema.optional(),
190
190
  tags: z.array(z.string()).optional(),
191
- details: z.lazy(() => PromotionDetails$outboundSchema).optional(),
191
+ details: z.lazy(() => PromotionDetailDetails$outboundSchema).optional(),
192
192
  hasRedemptionLimit: z.boolean().optional(),
193
193
  redemptionLimit: z.number().int().optional(),
194
194
  redemptionCount: z.number().int().optional(),
@@ -221,25 +221,27 @@ export const Promotion$outboundSchema: z.ZodType<
221
221
  * @internal
222
222
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
223
223
  */
224
- export namespace Promotion$ {
225
- /** @deprecated use `Promotion$inboundSchema` instead. */
226
- export const inboundSchema = Promotion$inboundSchema;
227
- /** @deprecated use `Promotion$outboundSchema` instead. */
228
- export const outboundSchema = Promotion$outboundSchema;
229
- /** @deprecated use `Promotion$Outbound` instead. */
230
- export type Outbound = Promotion$Outbound;
224
+ export namespace PromotionDetail$ {
225
+ /** @deprecated use `PromotionDetail$inboundSchema` instead. */
226
+ export const inboundSchema = PromotionDetail$inboundSchema;
227
+ /** @deprecated use `PromotionDetail$outboundSchema` instead. */
228
+ export const outboundSchema = PromotionDetail$outboundSchema;
229
+ /** @deprecated use `PromotionDetail$Outbound` instead. */
230
+ export type Outbound = PromotionDetail$Outbound;
231
231
  }
232
232
 
233
- export function promotionToJSON(promotion: Promotion): string {
234
- return JSON.stringify(Promotion$outboundSchema.parse(promotion));
233
+ export function promotionDetailToJSON(
234
+ promotionDetail: PromotionDetail,
235
+ ): string {
236
+ return JSON.stringify(PromotionDetail$outboundSchema.parse(promotionDetail));
235
237
  }
236
238
 
237
- export function promotionFromJSON(
239
+ export function promotionDetailFromJSON(
238
240
  jsonString: string,
239
- ): SafeParseResult<Promotion, SDKValidationError> {
241
+ ): SafeParseResult<PromotionDetail, SDKValidationError> {
240
242
  return safeParse(
241
243
  jsonString,
242
- (x) => Promotion$inboundSchema.parse(JSON.parse(x)),
243
- `Failed to parse 'Promotion' from JSON`,
244
+ (x) => PromotionDetail$inboundSchema.parse(JSON.parse(x)),
245
+ `Failed to parse 'PromotionDetail' from JSON`,
244
246
  );
245
247
  }
@@ -3,54 +3,41 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
6
  import { safeParse } from "../../lib/schemas.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
9
 
11
10
  export type Seo = {
12
- metaTitle?: string | undefined;
13
- metaDescription?: string | undefined;
14
- metaKeywords?: Array<string> | undefined;
15
11
  slug?: string | undefined;
12
+ title?: string | undefined;
13
+ description?: string | undefined;
14
+ keywords?: Array<string> | undefined;
16
15
  };
17
16
 
18
17
  /** @internal */
19
18
  export const Seo$inboundSchema: z.ZodType<Seo, z.ZodTypeDef, unknown> = z
20
19
  .object({
21
- meta_title: z.string().optional(),
22
- meta_description: z.string().optional(),
23
- meta_keywords: z.array(z.string()).optional(),
24
20
  slug: z.string().optional(),
25
- }).transform((v) => {
26
- return remap$(v, {
27
- "meta_title": "metaTitle",
28
- "meta_description": "metaDescription",
29
- "meta_keywords": "metaKeywords",
30
- });
21
+ title: z.string().optional(),
22
+ description: z.string().optional(),
23
+ keywords: z.array(z.string()).optional(),
31
24
  });
32
25
 
33
26
  /** @internal */
34
27
  export type Seo$Outbound = {
35
- meta_title?: string | undefined;
36
- meta_description?: string | undefined;
37
- meta_keywords?: Array<string> | undefined;
38
28
  slug?: string | undefined;
29
+ title?: string | undefined;
30
+ description?: string | undefined;
31
+ keywords?: Array<string> | undefined;
39
32
  };
40
33
 
41
34
  /** @internal */
42
35
  export const Seo$outboundSchema: z.ZodType<Seo$Outbound, z.ZodTypeDef, Seo> = z
43
36
  .object({
44
- metaTitle: z.string().optional(),
45
- metaDescription: z.string().optional(),
46
- metaKeywords: z.array(z.string()).optional(),
47
37
  slug: z.string().optional(),
48
- }).transform((v) => {
49
- return remap$(v, {
50
- metaTitle: "meta_title",
51
- metaDescription: "meta_description",
52
- metaKeywords: "meta_keywords",
53
- });
38
+ title: z.string().optional(),
39
+ description: z.string().optional(),
40
+ keywords: z.array(z.string()).optional(),
54
41
  });
55
42
 
56
43
  /**
@@ -0,0 +1,244 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ AssociatedOption,
13
+ AssociatedOption$inboundSchema,
14
+ AssociatedOption$Outbound,
15
+ AssociatedOption$outboundSchema,
16
+ } from "./associatedoption.js";
17
+ import {
18
+ ProductAttribute,
19
+ ProductAttribute$inboundSchema,
20
+ ProductAttribute$Outbound,
21
+ ProductAttribute$outboundSchema,
22
+ } from "./productattribute.js";
23
+ import {
24
+ ProductImage,
25
+ ProductImage$inboundSchema,
26
+ ProductImage$Outbound,
27
+ ProductImage$outboundSchema,
28
+ } from "./productimage.js";
29
+ import {
30
+ ProductPricing,
31
+ ProductPricing$inboundSchema,
32
+ ProductPricing$Outbound,
33
+ ProductPricing$outboundSchema,
34
+ } from "./productpricing.js";
35
+ import {
36
+ ProductPromotion,
37
+ ProductPromotion$inboundSchema,
38
+ ProductPromotion$Outbound,
39
+ ProductPromotion$outboundSchema,
40
+ } from "./productpromotion.js";
41
+ import {
42
+ ProductSubscription,
43
+ ProductSubscription$inboundSchema,
44
+ ProductSubscription$Outbound,
45
+ ProductSubscription$outboundSchema,
46
+ } from "./productsubscription.js";
47
+
48
+ export const SKUProductType = {
49
+ Physical: "physical",
50
+ Digital: "digital",
51
+ Bundle: "bundle",
52
+ } as const;
53
+ export type SKUProductType = ClosedEnum<typeof SKUProductType>;
54
+
55
+ export type Sku = {
56
+ productId: string;
57
+ variantId?: string | null | undefined;
58
+ sku: string;
59
+ productName: string;
60
+ variantName?: string | null | undefined;
61
+ productType: SKUProductType;
62
+ slug?: string | undefined;
63
+ shortDescription?: string | undefined;
64
+ active?: boolean | undefined;
65
+ stockAvailable?: boolean | undefined;
66
+ onOffer?: boolean | undefined;
67
+ onSubscription?: boolean | undefined;
68
+ onPromotion?: boolean | undefined;
69
+ categoryIds?: Array<string> | undefined;
70
+ tags?: Array<string> | undefined;
71
+ reviewsCount?: number | undefined;
72
+ reviewsRatingSum?: number | undefined;
73
+ attributes?: Array<ProductAttribute> | undefined;
74
+ images?: Array<ProductImage> | undefined;
75
+ pricing?: ProductPricing | undefined;
76
+ promotion?: ProductPromotion | null | undefined;
77
+ subscription?: Array<ProductSubscription> | undefined;
78
+ associatedOptions?: { [k: string]: AssociatedOption } | undefined;
79
+ };
80
+
81
+ /** @internal */
82
+ export const SKUProductType$inboundSchema: z.ZodNativeEnum<
83
+ typeof SKUProductType
84
+ > = z.nativeEnum(SKUProductType);
85
+
86
+ /** @internal */
87
+ export const SKUProductType$outboundSchema: z.ZodNativeEnum<
88
+ typeof SKUProductType
89
+ > = SKUProductType$inboundSchema;
90
+
91
+ /**
92
+ * @internal
93
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
+ */
95
+ export namespace SKUProductType$ {
96
+ /** @deprecated use `SKUProductType$inboundSchema` instead. */
97
+ export const inboundSchema = SKUProductType$inboundSchema;
98
+ /** @deprecated use `SKUProductType$outboundSchema` instead. */
99
+ export const outboundSchema = SKUProductType$outboundSchema;
100
+ }
101
+
102
+ /** @internal */
103
+ export const Sku$inboundSchema: z.ZodType<Sku, z.ZodTypeDef, unknown> = z
104
+ .object({
105
+ product_id: z.string(),
106
+ variant_id: z.nullable(z.string()).optional(),
107
+ sku: z.string(),
108
+ product_name: z.string(),
109
+ variant_name: z.nullable(z.string()).optional(),
110
+ product_type: SKUProductType$inboundSchema,
111
+ slug: z.string().optional(),
112
+ short_description: z.string().optional(),
113
+ active: z.boolean().default(true),
114
+ stock_available: z.boolean().default(true),
115
+ on_offer: z.boolean().default(false),
116
+ on_subscription: z.boolean().default(false),
117
+ on_promotion: z.boolean().default(false),
118
+ category_ids: z.array(z.string()).optional(),
119
+ tags: z.array(z.string()).optional(),
120
+ reviews_count: z.number().int().optional(),
121
+ reviews_rating_sum: z.number().optional(),
122
+ attributes: z.array(ProductAttribute$inboundSchema).optional(),
123
+ images: z.array(ProductImage$inboundSchema).optional(),
124
+ pricing: ProductPricing$inboundSchema.optional(),
125
+ promotion: z.nullable(ProductPromotion$inboundSchema).optional(),
126
+ subscription: z.array(ProductSubscription$inboundSchema).optional(),
127
+ associated_options: z.record(AssociatedOption$inboundSchema).optional(),
128
+ }).transform((v) => {
129
+ return remap$(v, {
130
+ "product_id": "productId",
131
+ "variant_id": "variantId",
132
+ "product_name": "productName",
133
+ "variant_name": "variantName",
134
+ "product_type": "productType",
135
+ "short_description": "shortDescription",
136
+ "stock_available": "stockAvailable",
137
+ "on_offer": "onOffer",
138
+ "on_subscription": "onSubscription",
139
+ "on_promotion": "onPromotion",
140
+ "category_ids": "categoryIds",
141
+ "reviews_count": "reviewsCount",
142
+ "reviews_rating_sum": "reviewsRatingSum",
143
+ "associated_options": "associatedOptions",
144
+ });
145
+ });
146
+
147
+ /** @internal */
148
+ export type Sku$Outbound = {
149
+ product_id: string;
150
+ variant_id?: string | null | undefined;
151
+ sku: string;
152
+ product_name: string;
153
+ variant_name?: string | null | undefined;
154
+ product_type: string;
155
+ slug?: string | undefined;
156
+ short_description?: string | undefined;
157
+ active: boolean;
158
+ stock_available: boolean;
159
+ on_offer: boolean;
160
+ on_subscription: boolean;
161
+ on_promotion: boolean;
162
+ category_ids?: Array<string> | undefined;
163
+ tags?: Array<string> | undefined;
164
+ reviews_count?: number | undefined;
165
+ reviews_rating_sum?: number | undefined;
166
+ attributes?: Array<ProductAttribute$Outbound> | undefined;
167
+ images?: Array<ProductImage$Outbound> | undefined;
168
+ pricing?: ProductPricing$Outbound | undefined;
169
+ promotion?: ProductPromotion$Outbound | null | undefined;
170
+ subscription?: Array<ProductSubscription$Outbound> | undefined;
171
+ associated_options?: { [k: string]: AssociatedOption$Outbound } | undefined;
172
+ };
173
+
174
+ /** @internal */
175
+ export const Sku$outboundSchema: z.ZodType<Sku$Outbound, z.ZodTypeDef, Sku> = z
176
+ .object({
177
+ productId: z.string(),
178
+ variantId: z.nullable(z.string()).optional(),
179
+ sku: z.string(),
180
+ productName: z.string(),
181
+ variantName: z.nullable(z.string()).optional(),
182
+ productType: SKUProductType$outboundSchema,
183
+ slug: z.string().optional(),
184
+ shortDescription: z.string().optional(),
185
+ active: z.boolean().default(true),
186
+ stockAvailable: z.boolean().default(true),
187
+ onOffer: z.boolean().default(false),
188
+ onSubscription: z.boolean().default(false),
189
+ onPromotion: z.boolean().default(false),
190
+ categoryIds: z.array(z.string()).optional(),
191
+ tags: z.array(z.string()).optional(),
192
+ reviewsCount: z.number().int().optional(),
193
+ reviewsRatingSum: z.number().optional(),
194
+ attributes: z.array(ProductAttribute$outboundSchema).optional(),
195
+ images: z.array(ProductImage$outboundSchema).optional(),
196
+ pricing: ProductPricing$outboundSchema.optional(),
197
+ promotion: z.nullable(ProductPromotion$outboundSchema).optional(),
198
+ subscription: z.array(ProductSubscription$outboundSchema).optional(),
199
+ associatedOptions: z.record(AssociatedOption$outboundSchema).optional(),
200
+ }).transform((v) => {
201
+ return remap$(v, {
202
+ productId: "product_id",
203
+ variantId: "variant_id",
204
+ productName: "product_name",
205
+ variantName: "variant_name",
206
+ productType: "product_type",
207
+ shortDescription: "short_description",
208
+ stockAvailable: "stock_available",
209
+ onOffer: "on_offer",
210
+ onSubscription: "on_subscription",
211
+ onPromotion: "on_promotion",
212
+ categoryIds: "category_ids",
213
+ reviewsCount: "reviews_count",
214
+ reviewsRatingSum: "reviews_rating_sum",
215
+ associatedOptions: "associated_options",
216
+ });
217
+ });
218
+
219
+ /**
220
+ * @internal
221
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
222
+ */
223
+ export namespace Sku$ {
224
+ /** @deprecated use `Sku$inboundSchema` instead. */
225
+ export const inboundSchema = Sku$inboundSchema;
226
+ /** @deprecated use `Sku$outboundSchema` instead. */
227
+ export const outboundSchema = Sku$outboundSchema;
228
+ /** @deprecated use `Sku$Outbound` instead. */
229
+ export type Outbound = Sku$Outbound;
230
+ }
231
+
232
+ export function skuToJSON(sku: Sku): string {
233
+ return JSON.stringify(Sku$outboundSchema.parse(sku));
234
+ }
235
+
236
+ export function skuFromJSON(
237
+ jsonString: string,
238
+ ): SafeParseResult<Sku, SDKValidationError> {
239
+ return safeParse(
240
+ jsonString,
241
+ (x) => Sku$inboundSchema.parse(JSON.parse(x)),
242
+ `Failed to parse 'Sku' from JSON`,
243
+ );
244
+ }