ce-storefront 0.0.1 → 0.0.2

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 (375) hide show
  1. package/.devcontainer/README.md +5 -0
  2. package/README.md +89 -124
  3. package/docs/sdks/addresses/README.md +78 -0
  4. package/docs/sdks/analytics/README.md +5 -5
  5. package/docs/sdks/auth/README.md +16 -24
  6. package/docs/sdks/campaigns/README.md +1 -79
  7. package/docs/sdks/cestorefrontuser/README.md +850 -0
  8. package/docs/sdks/{common → coupons}/README.md +9 -9
  9. package/docs/sdks/customers/README.md +12 -15
  10. package/docs/sdks/{otp → newsletter}/README.md +10 -10
  11. package/docs/sdks/notificationpreferences/README.md +240 -0
  12. package/docs/sdks/offers/README.md +1 -152
  13. package/docs/sdks/orders/README.md +0 -73
  14. package/docs/sdks/products/README.md +228 -0
  15. package/docs/sdks/{recommended → promotions}/README.md +8 -9
  16. package/docs/sdks/returns/README.md +0 -160
  17. package/docs/sdks/reviews/README.md +5 -5
  18. package/docs/sdks/shipping/README.md +5 -5
  19. package/docs/sdks/user/README.md +1 -927
  20. package/docs/sdks/{countries → utils}/README.md +81 -8
  21. package/funcs/{analyticsTrackEvent.d.ts → analyticsTrack.d.ts} +2 -2
  22. package/funcs/analyticsTrack.d.ts.map +1 -0
  23. package/funcs/{analyticsTrackEvent.js → analyticsTrack.js} +3 -3
  24. package/funcs/analyticsTrack.js.map +1 -0
  25. package/funcs/{authOtpGenerate.d.ts → authGenerateOtp.d.ts} +2 -2
  26. package/funcs/{authOtpGenerate.d.ts.map → authGenerateOtp.d.ts.map} +1 -1
  27. package/funcs/{authOtpGenerate.js → authGenerateOtp.js} +3 -3
  28. package/funcs/{authOtpGenerate.js.map → authGenerateOtp.js.map} +1 -1
  29. package/funcs/{authTokenRefresh.d.ts → authRefreshToken.d.ts} +2 -2
  30. package/funcs/{authTokenRefresh.d.ts.map → authRefreshToken.d.ts.map} +1 -1
  31. package/funcs/{authTokenRefresh.js → authRefreshToken.js} +3 -3
  32. package/funcs/{authTokenRefresh.js.map → authRefreshToken.js.map} +1 -1
  33. package/funcs/{authGetUser.d.ts → authUserGet.d.ts} +2 -2
  34. package/funcs/{authGetUser.d.ts.map → authUserGet.d.ts.map} +1 -1
  35. package/funcs/{authGetUser.js → authUserGet.js} +3 -3
  36. package/funcs/{authGetUser.js.map → authUserGet.js.map} +1 -1
  37. package/funcs/{authUpdateUser.d.ts → authUserUpdate.d.ts} +2 -2
  38. package/funcs/{authUpdateUser.d.ts.map → authUserUpdate.d.ts.map} +1 -1
  39. package/funcs/{authUpdateUser.js → authUserUpdate.js} +3 -3
  40. package/funcs/{authUpdateUser.js.map → authUserUpdate.js.map} +1 -1
  41. package/funcs/{campaignsSubscribeNewsletter.d.ts → campaignsNewsletterSubscribe.d.ts} +2 -2
  42. package/funcs/{campaignsSubscribeNewsletter.d.ts.map → campaignsNewsletterSubscribe.d.ts.map} +1 -1
  43. package/funcs/{campaignsSubscribeNewsletter.js → campaignsNewsletterSubscribe.js} +3 -3
  44. package/funcs/{campaignsSubscribeNewsletter.js.map → campaignsNewsletterSubscribe.js.map} +1 -1
  45. package/funcs/{catalogProductsCrossSellList.d.ts → catalogProductsGetCrossSells.d.ts} +2 -2
  46. package/funcs/{catalogProductsCrossSellList.d.ts.map → catalogProductsGetCrossSells.d.ts.map} +1 -1
  47. package/funcs/{catalogProductsCrossSellList.js → catalogProductsGetCrossSells.js} +3 -3
  48. package/funcs/{catalogProductsCrossSellList.js.map → catalogProductsGetCrossSells.js.map} +1 -1
  49. package/funcs/{catalogProductsSimilarList.d.ts → catalogProductsGetSimilar.d.ts} +2 -2
  50. package/funcs/catalogProductsGetSimilar.d.ts.map +1 -0
  51. package/funcs/{catalogProductsSimilarList.js → catalogProductsGetSimilar.js} +3 -3
  52. package/funcs/catalogProductsGetSimilar.js.map +1 -0
  53. package/funcs/{catalogProductsUpSellList.d.ts → catalogProductsGetUpsells.d.ts} +2 -2
  54. package/funcs/{catalogProductsUpSellList.d.ts.map → catalogProductsGetUpsells.d.ts.map} +1 -1
  55. package/funcs/{catalogProductsUpSellList.js → catalogProductsGetUpsells.js} +3 -3
  56. package/funcs/{catalogProductsUpSellList.js.map → catalogProductsGetUpsells.js.map} +1 -1
  57. package/funcs/{commonCountriesGetPincodes.d.ts → customersAddressesList.d.ts} +4 -4
  58. package/funcs/customersAddressesList.d.ts.map +1 -0
  59. package/funcs/{customersGetAddresses.js → customersAddressesList.js} +3 -3
  60. package/funcs/customersAddressesList.js.map +1 -0
  61. package/funcs/{catalogProductsRecommendedList.d.ts → customersGetRecommendedProducts.d.ts} +2 -2
  62. package/funcs/customersGetRecommendedProducts.d.ts.map +1 -0
  63. package/funcs/{catalogProductsRecommendedList.js → customersGetRecommendedProducts.js} +3 -3
  64. package/funcs/customersGetRecommendedProducts.js.map +1 -0
  65. package/funcs/{customersReviewsGetAll.d.ts → customersReviewsList.d.ts} +2 -2
  66. package/funcs/customersReviewsList.d.ts.map +1 -0
  67. package/funcs/{customersReviewsGetAll.js → customersReviewsList.js} +3 -3
  68. package/funcs/customersReviewsList.js.map +1 -0
  69. package/funcs/{offersGetCoupons.d.ts → offersCouponsList.d.ts} +2 -2
  70. package/funcs/offersCouponsList.d.ts.map +1 -0
  71. package/funcs/{offersGetCoupons.js → offersCouponsList.js} +3 -3
  72. package/funcs/{ordersGetReturns.js.map → offersCouponsList.js.map} +1 -1
  73. package/funcs/{offersGetPromotions.d.ts → offersPromotionsList.d.ts} +2 -2
  74. package/funcs/offersPromotionsList.d.ts.map +1 -0
  75. package/funcs/{offersGetPromotions.js → offersPromotionsList.js} +3 -3
  76. package/funcs/offersPromotionsList.js.map +1 -0
  77. package/funcs/{shippingGetPincodeServiceability.d.ts → shippingCheckPincodeServiceability.d.ts} +2 -2
  78. package/funcs/shippingCheckPincodeServiceability.d.ts.map +1 -0
  79. package/funcs/{shippingGetPincodeServiceability.js → shippingCheckPincodeServiceability.js} +3 -3
  80. package/funcs/shippingCheckPincodeServiceability.js.map +1 -0
  81. package/funcs/{authUserCreateNotificationPreferences.d.ts → userNotificationPreferencesCreate.d.ts} +2 -2
  82. package/funcs/userNotificationPreferencesCreate.d.ts.map +1 -0
  83. package/funcs/{authUserCreateNotificationPreferences.js → userNotificationPreferencesCreate.js} +3 -3
  84. package/funcs/userNotificationPreferencesCreate.js.map +1 -0
  85. package/funcs/{authUserGetNotificationPreferences.d.ts → userNotificationPreferencesGet.d.ts} +2 -2
  86. package/funcs/userNotificationPreferencesGet.d.ts.map +1 -0
  87. package/funcs/{authUserGetNotificationPreferences.js → userNotificationPreferencesGet.js} +3 -3
  88. package/funcs/userNotificationPreferencesGet.js.map +1 -0
  89. package/funcs/{authUserUpdateNotificationPreferences.d.ts → userNotificationPreferencesUpdate.d.ts} +2 -2
  90. package/funcs/userNotificationPreferencesUpdate.d.ts.map +1 -0
  91. package/funcs/{authUserUpdateNotificationPreferences.js → userNotificationPreferencesUpdate.js} +3 -3
  92. package/funcs/userNotificationPreferencesUpdate.js.map +1 -0
  93. package/funcs/{commonGetCountries.d.ts → utilsGetCountries.d.ts} +2 -2
  94. package/funcs/utilsGetCountries.d.ts.map +1 -0
  95. package/funcs/{commonGetCountries.js → utilsGetCountries.js} +3 -3
  96. package/funcs/utilsGetCountries.js.map +1 -0
  97. package/funcs/{customersGetAddresses.d.ts → utilsGetPincodes.d.ts} +4 -4
  98. package/funcs/utilsGetPincodes.d.ts.map +1 -0
  99. package/funcs/{commonCountriesGetPincodes.js → utilsGetPincodes.js} +3 -3
  100. package/funcs/utilsGetPincodes.js.map +1 -0
  101. package/funcs/{commonCountriesGetStates.d.ts → utilsGetStates.d.ts} +2 -2
  102. package/funcs/utilsGetStates.d.ts.map +1 -0
  103. package/funcs/{commonCountriesGetStates.js → utilsGetStates.js} +3 -3
  104. package/funcs/utilsGetStates.js.map +1 -0
  105. package/lib/config.d.ts +4 -4
  106. package/lib/config.d.ts.map +1 -1
  107. package/lib/config.js +3 -8
  108. package/lib/config.js.map +1 -1
  109. package/models/components/cartitem.js +4 -4
  110. package/models/components/cartitem.js.map +1 -1
  111. package/models/components/index.d.ts +0 -1
  112. package/models/components/index.d.ts.map +1 -1
  113. package/models/components/index.js +0 -1
  114. package/models/components/index.js.map +1 -1
  115. package/models/components/orderreturnitem.d.ts +0 -31
  116. package/models/components/orderreturnitem.d.ts.map +1 -1
  117. package/models/components/orderreturnitem.js +1 -42
  118. package/models/components/orderreturnitem.js.map +1 -1
  119. package/models/components/productattribute.js +1 -1
  120. package/models/components/productattribute.js.map +1 -1
  121. package/models/components/productdetail.js +5 -5
  122. package/models/components/productdetail.js.map +1 -1
  123. package/models/components/productlist.js +5 -5
  124. package/models/components/productlist.js.map +1 -1
  125. package/models/components/productreview.js +1 -1
  126. package/models/components/productreview.js.map +1 -1
  127. package/models/components/productshipping.js +2 -2
  128. package/models/components/productshipping.js.map +1 -1
  129. package/models/components/productsubscription.js +1 -1
  130. package/models/components/productsubscription.js.map +1 -1
  131. package/models/components/skuinfo.js +4 -4
  132. package/models/components/skuinfo.js.map +1 -1
  133. package/models/errors/unauthorized.js +1 -1
  134. package/models/errors/unauthorized.js.map +1 -1
  135. package/models/operations/index.d.ts +0 -3
  136. package/models/operations/index.d.ts.map +1 -1
  137. package/models/operations/index.js +0 -3
  138. package/models/operations/index.js.map +1 -1
  139. package/models/operations/postcartitemid.js +1 -1
  140. package/models/operations/postcartitemid.js.map +1 -1
  141. package/package.json +5 -1
  142. package/sdk/addresses.d.ts +7 -0
  143. package/sdk/addresses.d.ts.map +1 -1
  144. package/sdk/addresses.js +10 -0
  145. package/sdk/addresses.js.map +1 -1
  146. package/sdk/analytics.d.ts +1 -1
  147. package/sdk/analytics.d.ts.map +1 -1
  148. package/sdk/analytics.js +3 -3
  149. package/sdk/analytics.js.map +1 -1
  150. package/sdk/auth.d.ts +8 -14
  151. package/sdk/auth.d.ts.map +1 -1
  152. package/sdk/auth.js +12 -22
  153. package/sdk/auth.js.map +1 -1
  154. package/sdk/campaigns.d.ts +4 -9
  155. package/sdk/campaigns.d.ts.map +1 -1
  156. package/sdk/campaigns.js +4 -10
  157. package/sdk/campaigns.js.map +1 -1
  158. package/sdk/cestorefrontuser.d.ts +82 -0
  159. package/sdk/cestorefrontuser.d.ts.map +1 -0
  160. package/sdk/cestorefrontuser.js +122 -0
  161. package/sdk/cestorefrontuser.js.map +1 -0
  162. package/sdk/coupons.d.ts +12 -0
  163. package/sdk/coupons.d.ts.map +1 -0
  164. package/sdk/coupons.js +22 -0
  165. package/sdk/coupons.js.map +1 -0
  166. package/sdk/customers.d.ts +3 -3
  167. package/sdk/customers.d.ts.map +1 -1
  168. package/sdk/customers.js +5 -5
  169. package/sdk/customers.js.map +1 -1
  170. package/sdk/newsletter.d.ts +12 -0
  171. package/sdk/newsletter.d.ts.map +1 -0
  172. package/sdk/newsletter.js +22 -0
  173. package/sdk/newsletter.js.map +1 -0
  174. package/sdk/notificationpreferences.d.ts +26 -0
  175. package/sdk/notificationpreferences.d.ts.map +1 -0
  176. package/sdk/notificationpreferences.js +42 -0
  177. package/sdk/notificationpreferences.js.map +1 -0
  178. package/sdk/offers.d.ts +7 -16
  179. package/sdk/offers.d.ts.map +1 -1
  180. package/sdk/offers.js +8 -19
  181. package/sdk/offers.js.map +1 -1
  182. package/sdk/orders.d.ts +0 -7
  183. package/sdk/orders.d.ts.map +1 -1
  184. package/sdk/orders.js +0 -10
  185. package/sdk/orders.js.map +1 -1
  186. package/sdk/products.d.ts +21 -12
  187. package/sdk/products.d.ts.map +1 -1
  188. package/sdk/products.js +30 -20
  189. package/sdk/products.js.map +1 -1
  190. package/sdk/promotions.d.ts +12 -0
  191. package/sdk/promotions.d.ts.map +1 -0
  192. package/sdk/promotions.js +22 -0
  193. package/sdk/promotions.js.map +1 -0
  194. package/sdk/returns.d.ts +0 -14
  195. package/sdk/returns.d.ts.map +1 -1
  196. package/sdk/returns.js +0 -20
  197. package/sdk/returns.js.map +1 -1
  198. package/sdk/reviews.d.ts +1 -1
  199. package/sdk/reviews.d.ts.map +1 -1
  200. package/sdk/reviews.js +3 -3
  201. package/sdk/reviews.js.map +1 -1
  202. package/sdk/sdk.d.ts +8 -5
  203. package/sdk/sdk.d.ts.map +1 -1
  204. package/sdk/sdk.js +12 -7
  205. package/sdk/sdk.js.map +1 -1
  206. package/sdk/shipping.d.ts +1 -1
  207. package/sdk/shipping.d.ts.map +1 -1
  208. package/sdk/shipping.js +3 -3
  209. package/sdk/shipping.js.map +1 -1
  210. package/sdk/user.d.ts +4 -86
  211. package/sdk/user.d.ts.map +1 -1
  212. package/sdk/user.js +4 -120
  213. package/sdk/user.js.map +1 -1
  214. package/sdk/{countries.d.ts → utils.d.ts} +9 -2
  215. package/sdk/utils.d.ts.map +1 -0
  216. package/sdk/utils.js +42 -0
  217. package/sdk/utils.js.map +1 -0
  218. package/src/funcs/{analyticsTrackEvent.ts → analyticsTrack.ts} +1 -1
  219. package/src/funcs/{authOtpGenerate.ts → authGenerateOtp.ts} +1 -1
  220. package/src/funcs/{authTokenRefresh.ts → authRefreshToken.ts} +1 -1
  221. package/src/funcs/{authGetUser.ts → authUserGet.ts} +1 -1
  222. package/src/funcs/{authUpdateUser.ts → authUserUpdate.ts} +1 -1
  223. package/src/funcs/{campaignsSubscribeNewsletter.ts → campaignsNewsletterSubscribe.ts} +1 -1
  224. package/src/funcs/{catalogProductsCrossSellList.ts → catalogProductsGetCrossSells.ts} +1 -1
  225. package/src/funcs/{catalogProductsSimilarList.ts → catalogProductsGetSimilar.ts} +1 -1
  226. package/src/funcs/{catalogProductsUpSellList.ts → catalogProductsGetUpsells.ts} +1 -1
  227. package/src/funcs/{customersGetAddresses.ts → customersAddressesList.ts} +1 -1
  228. package/src/funcs/{catalogProductsRecommendedList.ts → customersGetRecommendedProducts.ts} +1 -1
  229. package/src/funcs/{customersReviewsGetAll.ts → customersReviewsList.ts} +1 -1
  230. package/src/funcs/{offersGetCoupons.ts → offersCouponsList.ts} +1 -1
  231. package/src/funcs/{offersGetPromotions.ts → offersPromotionsList.ts} +1 -1
  232. package/src/funcs/{shippingGetPincodeServiceability.ts → shippingCheckPincodeServiceability.ts} +1 -1
  233. package/src/funcs/{authUserCreateNotificationPreferences.ts → userNotificationPreferencesCreate.ts} +1 -1
  234. package/src/funcs/{authUserGetNotificationPreferences.ts → userNotificationPreferencesGet.ts} +1 -1
  235. package/src/funcs/{authUserUpdateNotificationPreferences.ts → userNotificationPreferencesUpdate.ts} +1 -1
  236. package/src/funcs/{commonGetCountries.ts → utilsGetCountries.ts} +1 -1
  237. package/src/funcs/{commonCountriesGetPincodes.ts → utilsGetPincodes.ts} +1 -1
  238. package/src/funcs/{commonCountriesGetStates.ts → utilsGetStates.ts} +1 -1
  239. package/src/lib/config.ts +3 -8
  240. package/src/models/components/cartitem.ts +4 -4
  241. package/src/models/components/index.ts +0 -1
  242. package/src/models/components/orderreturnitem.ts +0 -70
  243. package/src/models/components/productattribute.ts +1 -1
  244. package/src/models/components/productdetail.ts +5 -5
  245. package/src/models/components/productlist.ts +5 -5
  246. package/src/models/components/productreview.ts +1 -1
  247. package/src/models/components/productshipping.ts +2 -2
  248. package/src/models/components/productsubscription.ts +1 -1
  249. package/src/models/components/skuinfo.ts +4 -4
  250. package/src/models/errors/unauthorized.ts +1 -1
  251. package/src/models/operations/index.ts +0 -3
  252. package/src/models/operations/postcartitemid.ts +1 -1
  253. package/src/sdk/addresses.ts +14 -0
  254. package/src/sdk/analytics.ts +3 -3
  255. package/src/sdk/auth.ts +18 -30
  256. package/src/sdk/campaigns.ts +5 -15
  257. package/src/sdk/cestorefrontuser.ts +160 -0
  258. package/src/sdk/coupons.ts +20 -0
  259. package/src/sdk/customers.ts +6 -7
  260. package/src/sdk/newsletter.ts +23 -0
  261. package/src/sdk/notificationpreferences.ts +51 -0
  262. package/src/sdk/offers.ts +9 -21
  263. package/src/sdk/orders.ts +0 -11
  264. package/src/sdk/products.ts +42 -24
  265. package/src/sdk/promotions.ts +20 -0
  266. package/src/sdk/returns.ts +0 -28
  267. package/src/sdk/reviews.ts +3 -3
  268. package/src/sdk/sdk.ts +15 -9
  269. package/src/sdk/shipping.ts +3 -3
  270. package/src/sdk/user.ts +5 -166
  271. package/src/sdk/{countries.ts → utils.ts} +18 -5
  272. package/docs/sdks/crosssell/README.md +0 -82
  273. package/docs/sdks/similar/README.md +0 -82
  274. package/docs/sdks/token/README.md +0 -80
  275. package/docs/sdks/upsell/README.md +0 -82
  276. package/funcs/analyticsTrackEvent.d.ts.map +0 -1
  277. package/funcs/analyticsTrackEvent.js.map +0 -1
  278. package/funcs/authUserCreateNotificationPreferences.d.ts.map +0 -1
  279. package/funcs/authUserCreateNotificationPreferences.js.map +0 -1
  280. package/funcs/authUserGetNotificationPreferences.d.ts.map +0 -1
  281. package/funcs/authUserGetNotificationPreferences.js.map +0 -1
  282. package/funcs/authUserUpdateNotificationPreferences.d.ts.map +0 -1
  283. package/funcs/authUserUpdateNotificationPreferences.js.map +0 -1
  284. package/funcs/catalogProductsRecommendedList.d.ts.map +0 -1
  285. package/funcs/catalogProductsRecommendedList.js.map +0 -1
  286. package/funcs/catalogProductsSimilarList.d.ts.map +0 -1
  287. package/funcs/catalogProductsSimilarList.js.map +0 -1
  288. package/funcs/commonCountriesGetPincodes.d.ts.map +0 -1
  289. package/funcs/commonCountriesGetPincodes.js.map +0 -1
  290. package/funcs/commonCountriesGetStates.d.ts.map +0 -1
  291. package/funcs/commonCountriesGetStates.js.map +0 -1
  292. package/funcs/commonGetCountries.d.ts.map +0 -1
  293. package/funcs/commonGetCountries.js.map +0 -1
  294. package/funcs/customersGetAddresses.d.ts.map +0 -1
  295. package/funcs/customersGetAddresses.js.map +0 -1
  296. package/funcs/customersReviewsGetAll.d.ts.map +0 -1
  297. package/funcs/customersReviewsGetAll.js.map +0 -1
  298. package/funcs/offersGetCoupons.d.ts.map +0 -1
  299. package/funcs/offersGetCoupons.js.map +0 -1
  300. package/funcs/offersGetPromotions.d.ts.map +0 -1
  301. package/funcs/offersGetPromotions.js.map +0 -1
  302. package/funcs/ordersGetReturns.d.ts +0 -15
  303. package/funcs/ordersGetReturns.d.ts.map +0 -1
  304. package/funcs/ordersGetReturns.js +0 -80
  305. package/funcs/ordersReturnsCreate.d.ts +0 -16
  306. package/funcs/ordersReturnsCreate.d.ts.map +0 -1
  307. package/funcs/ordersReturnsCreate.js +0 -101
  308. package/funcs/ordersReturnsCreate.js.map +0 -1
  309. package/funcs/ordersReturnsGet.d.ts +0 -15
  310. package/funcs/ordersReturnsGet.d.ts.map +0 -1
  311. package/funcs/ordersReturnsGet.js +0 -100
  312. package/funcs/ordersReturnsGet.js.map +0 -1
  313. package/funcs/shippingGetPincodeServiceability.d.ts.map +0 -1
  314. package/funcs/shippingGetPincodeServiceability.js.map +0 -1
  315. package/models/components/createorderreturn.d.ts +0 -29
  316. package/models/components/createorderreturn.d.ts.map +0 -1
  317. package/models/components/createorderreturn.js +0 -69
  318. package/models/components/createorderreturn.js.map +0 -1
  319. package/models/operations/getordersordernumberreturnreturnid.d.ts +0 -87
  320. package/models/operations/getordersordernumberreturnreturnid.d.ts.map +0 -1
  321. package/models/operations/getordersordernumberreturnreturnid.js +0 -122
  322. package/models/operations/getordersordernumberreturnreturnid.js.map +0 -1
  323. package/models/operations/getordersreturns.d.ts +0 -56
  324. package/models/operations/getordersreturns.d.ts.map +0 -1
  325. package/models/operations/getordersreturns.js +0 -74
  326. package/models/operations/getordersreturns.js.map +0 -1
  327. package/models/operations/postordersordernumberreturn.d.ts +0 -84
  328. package/models/operations/postordersordernumberreturn.d.ts.map +0 -1
  329. package/models/operations/postordersordernumberreturn.js +0 -122
  330. package/models/operations/postordersordernumberreturn.js.map +0 -1
  331. package/sdk/common.d.ts +0 -15
  332. package/sdk/common.d.ts.map +0 -1
  333. package/sdk/common.js +0 -27
  334. package/sdk/common.js.map +0 -1
  335. package/sdk/countries.d.ts.map +0 -1
  336. package/sdk/countries.js +0 -32
  337. package/sdk/countries.js.map +0 -1
  338. package/sdk/crosssell.d.ts +0 -12
  339. package/sdk/crosssell.d.ts.map +0 -1
  340. package/sdk/crosssell.js +0 -22
  341. package/sdk/crosssell.js.map +0 -1
  342. package/sdk/otp.d.ts +0 -12
  343. package/sdk/otp.d.ts.map +0 -1
  344. package/sdk/otp.js +0 -22
  345. package/sdk/otp.js.map +0 -1
  346. package/sdk/recommended.d.ts +0 -12
  347. package/sdk/recommended.d.ts.map +0 -1
  348. package/sdk/recommended.js +0 -22
  349. package/sdk/recommended.js.map +0 -1
  350. package/sdk/similar.d.ts +0 -12
  351. package/sdk/similar.d.ts.map +0 -1
  352. package/sdk/similar.js +0 -22
  353. package/sdk/similar.js.map +0 -1
  354. package/sdk/token.d.ts +0 -12
  355. package/sdk/token.d.ts.map +0 -1
  356. package/sdk/token.js +0 -22
  357. package/sdk/token.js.map +0 -1
  358. package/sdk/upsell.d.ts +0 -12
  359. package/sdk/upsell.d.ts.map +0 -1
  360. package/sdk/upsell.js +0 -22
  361. package/sdk/upsell.js.map +0 -1
  362. package/src/funcs/ordersGetReturns.ts +0 -103
  363. package/src/funcs/ordersReturnsCreate.ts +0 -139
  364. package/src/funcs/ordersReturnsGet.ts +0 -132
  365. package/src/models/components/createorderreturn.ts +0 -73
  366. package/src/models/operations/getordersordernumberreturnreturnid.ts +0 -174
  367. package/src/models/operations/getordersreturns.ts +0 -97
  368. package/src/models/operations/postordersordernumberreturn.ts +0 -171
  369. package/src/sdk/common.ts +0 -28
  370. package/src/sdk/crosssell.ts +0 -23
  371. package/src/sdk/otp.ts +0 -23
  372. package/src/sdk/recommended.ts +0 -20
  373. package/src/sdk/similar.ts +0 -23
  374. package/src/sdk/token.ts +0 -23
  375. package/src/sdk/upsell.ts +0 -23
@@ -1,15 +1,15 @@
1
- # Common
2
- (*common*)
1
+ # Coupons
2
+ (*offers.coupons*)
3
3
 
4
4
  ## Overview
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [getCountries](#getcountries) - Retrieve all countries
8
+ * [list](#list) - Retrieve all coupons
9
9
 
10
- ## getCountries
10
+ ## list
11
11
 
12
- Retrieve all countries
12
+ Retrieve active coupons
13
13
 
14
14
  ### Example Usage
15
15
 
@@ -21,7 +21,7 @@ const ceStorefront = new CeStorefront({
21
21
  });
22
22
 
23
23
  async function run() {
24
- const result = await ceStorefront.common.getCountries();
24
+ const result = await ceStorefront.offers.coupons.list();
25
25
 
26
26
  // Handle the result
27
27
  console.log(result)
@@ -36,7 +36,7 @@ The standalone function version of this method:
36
36
 
37
37
  ```typescript
38
38
  import { CeStorefrontCore } from "ce-storefront/core.js";
39
- import { commonGetCountries } from "ce-storefront/funcs/commonGetCountries.js";
39
+ import { offersCouponsList } from "ce-storefront/funcs/offersCouponsList.js";
40
40
 
41
41
  // Use `CeStorefrontCore` for best tree-shaking performance.
42
42
  // You can create one instance of it to use across an application.
@@ -45,7 +45,7 @@ const ceStorefront = new CeStorefrontCore({
45
45
  });
46
46
 
47
47
  async function run() {
48
- const res = await commonGetCountries(ceStorefront);
48
+ const res = await offersCouponsList(ceStorefront);
49
49
 
50
50
  if (!res.ok) {
51
51
  throw res.error;
@@ -70,7 +70,7 @@ run();
70
70
 
71
71
  ### Response
72
72
 
73
- **Promise\<[operations.GetCommonCountriesResponseBody](../../models/operations/getcommoncountriesresponsebody.md)\>**
73
+ **Promise\<[operations.GetCouponsResponseBody](../../models/operations/getcouponsresponsebody.md)\>**
74
74
 
75
75
  ### Errors
76
76
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [getAddresses](#getaddresses) - Retrieve all addresses
8
+ * [getRecommendedProducts](#getrecommendedproducts) - Retrieve recommended products
9
9
 
10
- ## getAddresses
10
+ ## getRecommendedProducts
11
11
 
12
- Retrieve billing and shipping address of particular customer
12
+ Retrieves a list of recommended products for a specified user based on their browsing history, past purchases, and indicated preferences. The recommended products are returned sorted by relevance, providing a personalized shopping experience for each user.
13
13
 
14
14
  ### Example Usage
15
15
 
@@ -21,9 +21,7 @@ const ceStorefront = new CeStorefront({
21
21
  });
22
22
 
23
23
  async function run() {
24
- const result = await ceStorefront.customers.getAddresses({
25
- userId: "<value>",
26
- });
24
+ const result = await ceStorefront.customers.getRecommendedProducts();
27
25
 
28
26
  // Handle the result
29
27
  console.log(result)
@@ -38,7 +36,7 @@ The standalone function version of this method:
38
36
 
39
37
  ```typescript
40
38
  import { CeStorefrontCore } from "ce-storefront/core.js";
41
- import { customersGetAddresses } from "ce-storefront/funcs/customersGetAddresses.js";
39
+ import { customersGetRecommendedProducts } from "ce-storefront/funcs/customersGetRecommendedProducts.js";
42
40
 
43
41
  // Use `CeStorefrontCore` for best tree-shaking performance.
44
42
  // You can create one instance of it to use across an application.
@@ -47,9 +45,7 @@ const ceStorefront = new CeStorefrontCore({
47
45
  });
48
46
 
49
47
  async function run() {
50
- const res = await customersGetAddresses(ceStorefront, {
51
- userId: "<value>",
52
- });
48
+ const res = await customersGetRecommendedProducts(ceStorefront);
53
49
 
54
50
  if (!res.ok) {
55
51
  throw res.error;
@@ -68,17 +64,18 @@ run();
68
64
 
69
65
  | Parameter | Type | Required | Description |
70
66
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
71
- | `request` | [operations.GetAddressRequest](../../models/operations/getaddressrequest.md) | :heavy_check_mark: | The request object to use for the request. |
72
67
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
73
68
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
74
69
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
75
70
 
76
71
  ### Response
77
72
 
78
- **Promise\<[operations.GetAddressResponseBody](../../models/operations/getaddressresponsebody.md)\>**
73
+ **Promise\<[operations.GetRecommendedResponseBody](../../models/operations/getrecommendedresponsebody.md)\>**
79
74
 
80
75
  ### Errors
81
76
 
82
- | Error Object | Status Code | Content Type |
83
- | --------------- | --------------- | --------------- |
84
- | errors.SDKError | 4xx-5xx | */* |
77
+ | Error Object | Status Code | Content Type |
78
+ | ------------------- | ------------------- | ------------------- |
79
+ | errors.Unauthorized | 401 | application/json |
80
+ | errors.NotFound | 404 | application/json |
81
+ | errors.SDKError | 4xx-5xx | */* |
@@ -1,15 +1,15 @@
1
- # Otp
2
- (*auth.otp*)
1
+ # Newsletter
2
+ (*campaigns.newsletter*)
3
3
 
4
4
  ## Overview
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [generate](#generate) - Generate OTP
8
+ * [subscribe](#subscribe) - Subscribe to newsletter
9
9
 
10
- ## generate
10
+ ## subscribe
11
11
 
12
- Generating a One-Time Password (OTP) typically involves creating a random code that is sent to a user for authentication or verification purposes.
12
+ Subscribe to newsletter
13
13
 
14
14
  ### Example Usage
15
15
 
@@ -21,7 +21,7 @@ const ceStorefront = new CeStorefront({
21
21
  });
22
22
 
23
23
  async function run() {
24
- const result = await ceStorefront.auth.otp.generate();
24
+ const result = await ceStorefront.campaigns.newsletter.subscribe();
25
25
 
26
26
  // Handle the result
27
27
  console.log(result)
@@ -36,7 +36,7 @@ The standalone function version of this method:
36
36
 
37
37
  ```typescript
38
38
  import { CeStorefrontCore } from "ce-storefront/core.js";
39
- import { authOtpGenerate } from "ce-storefront/funcs/authOtpGenerate.js";
39
+ import { campaignsNewsletterSubscribe } from "ce-storefront/funcs/campaignsNewsletterSubscribe.js";
40
40
 
41
41
  // Use `CeStorefrontCore` for best tree-shaking performance.
42
42
  // You can create one instance of it to use across an application.
@@ -45,7 +45,7 @@ const ceStorefront = new CeStorefrontCore({
45
45
  });
46
46
 
47
47
  async function run() {
48
- const res = await authOtpGenerate(ceStorefront);
48
+ const res = await campaignsNewsletterSubscribe(ceStorefront);
49
49
 
50
50
  if (!res.ok) {
51
51
  throw res.error;
@@ -64,14 +64,14 @@ run();
64
64
 
65
65
  | Parameter | Type | Required | Description |
66
66
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
67
- | `request` | [operations.PostAuthGenerateOtpRequestBody](../../models/operations/postauthgenerateotprequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
67
+ | `request` | [operations.PostCustomersNewsletterSubscriptionRequestBody](../../models/operations/postcustomersnewslettersubscriptionrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
68
68
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
69
69
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
70
70
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
71
71
 
72
72
  ### Response
73
73
 
74
- **Promise\<[operations.PostAuthGenerateOtpResponseBody](../../models/operations/postauthgenerateotpresponsebody.md)\>**
74
+ **Promise\<[operations.PostCustomersNewsletterSubscriptionResponseBody](../../models/operations/postcustomersnewslettersubscriptionresponsebody.md)\>**
75
75
 
76
76
  ### Errors
77
77
 
@@ -0,0 +1,240 @@
1
+ # NotificationPreferences
2
+ (*user.notificationPreferences*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [get](#get) - Retrieve user notification preferences
9
+ * [create](#create) - Create user notification preferences
10
+ * [update](#update) - Update user notification preferences
11
+
12
+ ## get
13
+
14
+ The Retrieve Notification Preferences API allows clients to fetch a user's notification preferences based on their unique user identifier (user_id).
15
+
16
+ ### Example Usage
17
+
18
+ ```typescript
19
+ import { CeStorefront } from "ce-storefront";
20
+
21
+ const ceStorefront = new CeStorefront({
22
+ authorization: "<YOUR_BEARER_TOKEN_HERE>",
23
+ });
24
+
25
+ async function run() {
26
+ const result = await ceStorefront.user.notificationPreferences.get({
27
+ id: "<id>",
28
+ });
29
+
30
+ // Handle the result
31
+ console.log(result)
32
+ }
33
+
34
+ run();
35
+ ```
36
+
37
+ ### Standalone function
38
+
39
+ The standalone function version of this method:
40
+
41
+ ```typescript
42
+ import { CeStorefrontCore } from "ce-storefront/core.js";
43
+ import { userNotificationPreferencesGet } from "ce-storefront/funcs/userNotificationPreferencesGet.js";
44
+
45
+ // Use `CeStorefrontCore` for best tree-shaking performance.
46
+ // You can create one instance of it to use across an application.
47
+ const ceStorefront = new CeStorefrontCore({
48
+ authorization: "<YOUR_BEARER_TOKEN_HERE>",
49
+ });
50
+
51
+ async function run() {
52
+ const res = await userNotificationPreferencesGet(ceStorefront, {
53
+ id: "<id>",
54
+ });
55
+
56
+ if (!res.ok) {
57
+ throw res.error;
58
+ }
59
+
60
+ const { value: result } = res;
61
+
62
+ // Handle the result
63
+ console.log(result)
64
+ }
65
+
66
+ run();
67
+ ```
68
+
69
+ ### Parameters
70
+
71
+ | Parameter | Type | Required | Description |
72
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
73
+ | `request` | [operations.GetAuthUserIdNotificationPreferencesRequest](../../models/operations/getauthuseridnotificationpreferencesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
74
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
75
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
76
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
77
+
78
+ ### Response
79
+
80
+ **Promise\<[operations.GetAuthUserIdNotificationPreferencesResponseBody](../../models/operations/getauthuseridnotificationpreferencesresponsebody.md)\>**
81
+
82
+ ### Errors
83
+
84
+ | Error Object | Status Code | Content Type |
85
+ | --------------- | --------------- | --------------- |
86
+ | errors.SDKError | 4xx-5xx | */* |
87
+
88
+
89
+ ## create
90
+
91
+ Create user notification preferences API allows clients to create a user's notification preferences based on their unique user identifier (user_id).
92
+
93
+ ### Example Usage
94
+
95
+ ```typescript
96
+ import { CeStorefront } from "ce-storefront";
97
+
98
+ const ceStorefront = new CeStorefront({
99
+ authorization: "<YOUR_BEARER_TOKEN_HERE>",
100
+ });
101
+
102
+ async function run() {
103
+ const result = await ceStorefront.user.notificationPreferences.create({
104
+ id: "<id>",
105
+ });
106
+
107
+ // Handle the result
108
+ console.log(result)
109
+ }
110
+
111
+ run();
112
+ ```
113
+
114
+ ### Standalone function
115
+
116
+ The standalone function version of this method:
117
+
118
+ ```typescript
119
+ import { CeStorefrontCore } from "ce-storefront/core.js";
120
+ import { userNotificationPreferencesCreate } from "ce-storefront/funcs/userNotificationPreferencesCreate.js";
121
+
122
+ // Use `CeStorefrontCore` for best tree-shaking performance.
123
+ // You can create one instance of it to use across an application.
124
+ const ceStorefront = new CeStorefrontCore({
125
+ authorization: "<YOUR_BEARER_TOKEN_HERE>",
126
+ });
127
+
128
+ async function run() {
129
+ const res = await userNotificationPreferencesCreate(ceStorefront, {
130
+ id: "<id>",
131
+ });
132
+
133
+ if (!res.ok) {
134
+ throw res.error;
135
+ }
136
+
137
+ const { value: result } = res;
138
+
139
+ // Handle the result
140
+ console.log(result)
141
+ }
142
+
143
+ run();
144
+ ```
145
+
146
+ ### Parameters
147
+
148
+ | Parameter | Type | Required | Description |
149
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
150
+ | `request` | [operations.PostAuthUserIdNotificationPreferencesRequest](../../models/operations/postauthuseridnotificationpreferencesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
151
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
152
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
153
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
154
+
155
+ ### Response
156
+
157
+ **Promise\<[operations.PostAuthUserIdNotificationPreferencesResponseBody](../../models/operations/postauthuseridnotificationpreferencesresponsebody.md)\>**
158
+
159
+ ### Errors
160
+
161
+ | Error Object | Status Code | Content Type |
162
+ | --------------- | --------------- | --------------- |
163
+ | errors.SDKError | 4xx-5xx | */* |
164
+
165
+
166
+ ## update
167
+
168
+ Update Notification Preferences API allows clients to update a user's notification preferences based on their unique user identifier (user_id).
169
+
170
+ ### Example Usage
171
+
172
+ ```typescript
173
+ import { CeStorefront } from "ce-storefront";
174
+
175
+ const ceStorefront = new CeStorefront({
176
+ authorization: "<YOUR_BEARER_TOKEN_HERE>",
177
+ });
178
+
179
+ async function run() {
180
+ const result = await ceStorefront.user.notificationPreferences.update({
181
+ id: "<id>",
182
+ });
183
+
184
+ // Handle the result
185
+ console.log(result)
186
+ }
187
+
188
+ run();
189
+ ```
190
+
191
+ ### Standalone function
192
+
193
+ The standalone function version of this method:
194
+
195
+ ```typescript
196
+ import { CeStorefrontCore } from "ce-storefront/core.js";
197
+ import { userNotificationPreferencesUpdate } from "ce-storefront/funcs/userNotificationPreferencesUpdate.js";
198
+
199
+ // Use `CeStorefrontCore` for best tree-shaking performance.
200
+ // You can create one instance of it to use across an application.
201
+ const ceStorefront = new CeStorefrontCore({
202
+ authorization: "<YOUR_BEARER_TOKEN_HERE>",
203
+ });
204
+
205
+ async function run() {
206
+ const res = await userNotificationPreferencesUpdate(ceStorefront, {
207
+ id: "<id>",
208
+ });
209
+
210
+ if (!res.ok) {
211
+ throw res.error;
212
+ }
213
+
214
+ const { value: result } = res;
215
+
216
+ // Handle the result
217
+ console.log(result)
218
+ }
219
+
220
+ run();
221
+ ```
222
+
223
+ ### Parameters
224
+
225
+ | Parameter | Type | Required | Description |
226
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
227
+ | `request` | [operations.PutAuthUserIdNotificationPreferencesRequest](../../models/operations/putauthuseridnotificationpreferencesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
228
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
229
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
230
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
231
+
232
+ ### Response
233
+
234
+ **Promise\<[operations.PutAuthUserIdNotificationPreferencesResponseBody](../../models/operations/putauthuseridnotificationpreferencesresponsebody.md)\>**
235
+
236
+ ### Errors
237
+
238
+ | Error Object | Status Code | Content Type |
239
+ | --------------- | --------------- | --------------- |
240
+ | errors.SDKError | 4xx-5xx | */* |
@@ -1,153 +1,2 @@
1
1
  # Offers
2
- (*offers*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [getCoupons](#getcoupons) - Retrieve all coupons
9
- * [getPromotions](#getpromotions) - Retrieve all promotions
10
-
11
- ## getCoupons
12
-
13
- Retrieve active coupons
14
-
15
- ### Example Usage
16
-
17
- ```typescript
18
- import { CeStorefront } from "ce-storefront";
19
-
20
- const ceStorefront = new CeStorefront({
21
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
22
- });
23
-
24
- async function run() {
25
- const result = await ceStorefront.offers.getCoupons();
26
-
27
- // Handle the result
28
- console.log(result)
29
- }
30
-
31
- run();
32
- ```
33
-
34
- ### Standalone function
35
-
36
- The standalone function version of this method:
37
-
38
- ```typescript
39
- import { CeStorefrontCore } from "ce-storefront/core.js";
40
- import { offersGetCoupons } from "ce-storefront/funcs/offersGetCoupons.js";
41
-
42
- // Use `CeStorefrontCore` for best tree-shaking performance.
43
- // You can create one instance of it to use across an application.
44
- const ceStorefront = new CeStorefrontCore({
45
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
46
- });
47
-
48
- async function run() {
49
- const res = await offersGetCoupons(ceStorefront);
50
-
51
- if (!res.ok) {
52
- throw res.error;
53
- }
54
-
55
- const { value: result } = res;
56
-
57
- // Handle the result
58
- console.log(result)
59
- }
60
-
61
- run();
62
- ```
63
-
64
- ### Parameters
65
-
66
- | Parameter | Type | Required | Description |
67
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
68
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
69
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
70
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
71
-
72
- ### Response
73
-
74
- **Promise\<[operations.GetCouponsResponseBody](../../models/operations/getcouponsresponsebody.md)\>**
75
-
76
- ### Errors
77
-
78
- | Error Object | Status Code | Content Type |
79
- | --------------- | --------------- | --------------- |
80
- | errors.SDKError | 4xx-5xx | */* |
81
-
82
-
83
- ## getPromotions
84
-
85
- All active promotions
86
-
87
- ### Example Usage
88
-
89
- ```typescript
90
- import { CeStorefront } from "ce-storefront";
91
-
92
- const ceStorefront = new CeStorefront({
93
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
94
- });
95
-
96
- async function run() {
97
- const result = await ceStorefront.offers.getPromotions();
98
-
99
- // Handle the result
100
- console.log(result)
101
- }
102
-
103
- run();
104
- ```
105
-
106
- ### Standalone function
107
-
108
- The standalone function version of this method:
109
-
110
- ```typescript
111
- import { CeStorefrontCore } from "ce-storefront/core.js";
112
- import { offersGetPromotions } from "ce-storefront/funcs/offersGetPromotions.js";
113
-
114
- // Use `CeStorefrontCore` for best tree-shaking performance.
115
- // You can create one instance of it to use across an application.
116
- const ceStorefront = new CeStorefrontCore({
117
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
118
- });
119
-
120
- async function run() {
121
- const res = await offersGetPromotions(ceStorefront);
122
-
123
- if (!res.ok) {
124
- throw res.error;
125
- }
126
-
127
- const { value: result } = res;
128
-
129
- // Handle the result
130
- console.log(result)
131
- }
132
-
133
- run();
134
- ```
135
-
136
- ### Parameters
137
-
138
- | Parameter | Type | Required | Description |
139
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
140
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
141
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
142
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
143
-
144
- ### Response
145
-
146
- **Promise\<[operations.GetPromotionsResponseBody](../../models/operations/getpromotionsresponsebody.md)\>**
147
-
148
- ### Errors
149
-
150
- | Error Object | Status Code | Content Type |
151
- | ------------------- | ------------------- | ------------------- |
152
- | errors.Unauthorized | 401 | application/json |
153
- | errors.SDKError | 4xx-5xx | */* |
2
+ (*offers*)