@51eat/sdk 0.0.42 → 0.0.44

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 (220) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/resources/products/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/business/resources/products/client/Client.js +7 -2
  4. package/dist/cjs/api/resources/business/resources/products/resources/images/client/Client.d.ts +69 -0
  5. package/dist/cjs/api/resources/business/resources/products/resources/images/client/Client.js +259 -0
  6. package/dist/cjs/api/resources/business/resources/products/resources/images/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/business/resources/products/resources/images/client/index.js +17 -0
  8. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/DeleteImagesRequest.d.ts +13 -0
  9. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/DeleteImagesRequest.js +3 -0
  10. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/ReorderImagesRequest.d.ts +18 -0
  11. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/ReorderImagesRequest.js +3 -0
  12. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/UploadImagesRequest.d.ts +14 -0
  13. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/UploadImagesRequest.js +3 -0
  14. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/index.d.ts +3 -0
  15. package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/business/resources/products/resources/images/exports.d.ts +2 -0
  17. package/dist/cjs/api/resources/business/resources/products/resources/images/exports.js +21 -0
  18. package/dist/cjs/api/resources/business/resources/products/resources/images/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/business/resources/products/resources/images/index.js +18 -0
  20. package/dist/cjs/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.d.ts +9 -0
  21. package/dist/cjs/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.js +10 -0
  22. package/dist/cjs/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.d.ts +9 -0
  23. package/dist/cjs/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.js +10 -0
  24. package/dist/cjs/api/resources/business/resources/products/resources/images/types/UploadImagesResponse.d.ts +4 -0
  25. package/dist/cjs/api/resources/business/resources/products/resources/images/types/UploadImagesResponse.js +3 -0
  26. package/dist/cjs/api/resources/business/resources/products/resources/images/types/index.d.ts +3 -0
  27. package/dist/cjs/api/resources/business/resources/products/resources/images/types/index.js +19 -0
  28. package/dist/cjs/api/resources/business/resources/products/resources/index.d.ts +3 -0
  29. package/dist/cjs/api/resources/business/resources/products/resources/index.js +4 -1
  30. package/dist/cjs/api/resources/business/resources/products/resources/variants/client/Client.d.ts +3 -0
  31. package/dist/cjs/api/resources/business/resources/products/resources/variants/client/Client.js +5 -0
  32. package/dist/cjs/api/resources/business/resources/products/resources/variants/exports.d.ts +1 -0
  33. package/dist/cjs/api/resources/business/resources/products/resources/variants/exports.js +1 -0
  34. package/dist/cjs/api/resources/business/resources/products/resources/variants/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/business/resources/products/resources/variants/index.js +1 -0
  36. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/Client.d.ts +69 -0
  37. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/Client.js +259 -0
  38. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/index.d.ts +1 -0
  39. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/index.js +17 -0
  40. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.d.ts +13 -0
  41. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.js +3 -0
  42. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.d.ts +18 -0
  43. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.js +3 -0
  44. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.d.ts +14 -0
  45. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.js +3 -0
  46. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.d.ts +3 -0
  47. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.js +2 -0
  48. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/exports.d.ts +2 -0
  49. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/exports.js +21 -0
  50. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/index.d.ts +2 -0
  51. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/index.js +18 -0
  52. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.d.ts +9 -0
  53. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.js +10 -0
  54. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.d.ts +9 -0
  55. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.js +10 -0
  56. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.d.ts +4 -0
  57. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.js +3 -0
  58. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/index.d.ts +3 -0
  59. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/index.js +19 -0
  60. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/index.d.ts +3 -0
  61. package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/index.js +42 -0
  62. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +6 -6
  63. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +24 -24
  64. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.ts +2 -2
  65. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.ts +2 -2
  66. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.ts +2 -2
  67. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.ts +2 -2
  68. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.ts +2 -2
  69. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.ts +2 -2
  70. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +1 -1
  71. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +4 -4
  72. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.ts +2 -2
  73. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +4 -4
  74. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +16 -16
  75. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.ts +2 -2
  76. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.ts +2 -2
  77. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.ts +2 -2
  78. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.d.ts +2 -2
  79. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +4 -4
  80. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +16 -16
  81. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.ts +2 -2
  82. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.ts +2 -2
  83. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.ts +2 -2
  84. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/StoreEventRsvpRequest.d.ts +2 -2
  85. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +43 -35
  86. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +105 -92
  87. package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.ts +3 -2
  88. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CheckoutRequest.d.ts +3 -0
  89. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.ts +10 -0
  90. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ClearCartRequest.js +3 -0
  91. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.ts +3 -0
  92. package/dist/cjs/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.ts +10 -0
  93. package/dist/cjs/api/resources/customer/resources/cart/client/requests/GetCartRequest.js +3 -0
  94. package/dist/cjs/api/resources/customer/resources/cart/client/requests/index.d.ts +2 -0
  95. package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +3 -3
  96. package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +12 -12
  97. package/dist/cjs/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.ts +2 -2
  98. package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.ts +2 -2
  99. package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.ts +2 -2
  100. package/dist/cjs/api/types/BusinessProduct.d.ts +1 -1
  101. package/dist/cjs/api/types/BusinessProductVariant.d.ts +2 -0
  102. package/dist/cjs/api/types/ReorderProductImagesRequest.d.ts +12 -0
  103. package/dist/cjs/api/types/ReorderProductImagesRequest.js +3 -0
  104. package/dist/cjs/api/types/StoreProductImageRequest.d.ts +4 -0
  105. package/dist/cjs/api/types/StoreProductImageRequest.js +3 -0
  106. package/dist/cjs/api/types/index.d.ts +2 -0
  107. package/dist/cjs/api/types/index.js +2 -0
  108. package/dist/cjs/version.d.ts +1 -1
  109. package/dist/cjs/version.js +1 -1
  110. package/dist/esm/BaseClient.mjs +2 -2
  111. package/dist/esm/api/resources/business/resources/products/client/Client.d.mts +3 -0
  112. package/dist/esm/api/resources/business/resources/products/client/Client.mjs +5 -0
  113. package/dist/esm/api/resources/business/resources/products/resources/images/client/Client.d.mts +69 -0
  114. package/dist/esm/api/resources/business/resources/products/resources/images/client/Client.mjs +222 -0
  115. package/dist/esm/api/resources/business/resources/products/resources/images/client/index.d.mts +1 -0
  116. package/dist/esm/api/resources/business/resources/products/resources/images/client/index.mjs +1 -0
  117. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/DeleteImagesRequest.d.mts +13 -0
  118. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/DeleteImagesRequest.mjs +2 -0
  119. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/ReorderImagesRequest.d.mts +18 -0
  120. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/ReorderImagesRequest.mjs +2 -0
  121. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/UploadImagesRequest.d.mts +14 -0
  122. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/UploadImagesRequest.mjs +2 -0
  123. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/index.d.mts +3 -0
  124. package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/index.mjs +1 -0
  125. package/dist/esm/api/resources/business/resources/products/resources/images/exports.d.mts +2 -0
  126. package/dist/esm/api/resources/business/resources/products/resources/images/exports.mjs +3 -0
  127. package/dist/esm/api/resources/business/resources/products/resources/images/index.d.mts +2 -0
  128. package/dist/esm/api/resources/business/resources/products/resources/images/index.mjs +2 -0
  129. package/dist/esm/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.d.mts +9 -0
  130. package/dist/esm/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.mjs +7 -0
  131. package/dist/esm/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.d.mts +9 -0
  132. package/dist/esm/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.mjs +7 -0
  133. package/dist/esm/api/resources/business/resources/products/resources/images/types/UploadImagesResponse.d.mts +4 -0
  134. package/dist/esm/api/resources/business/resources/products/resources/images/types/UploadImagesResponse.mjs +2 -0
  135. package/dist/esm/api/resources/business/resources/products/resources/images/types/index.d.mts +3 -0
  136. package/dist/esm/api/resources/business/resources/products/resources/images/types/index.mjs +3 -0
  137. package/dist/esm/api/resources/business/resources/products/resources/index.d.mts +3 -0
  138. package/dist/esm/api/resources/business/resources/products/resources/index.mjs +3 -0
  139. package/dist/esm/api/resources/business/resources/products/resources/variants/client/Client.d.mts +3 -0
  140. package/dist/esm/api/resources/business/resources/products/resources/variants/client/Client.mjs +5 -0
  141. package/dist/esm/api/resources/business/resources/products/resources/variants/exports.d.mts +1 -0
  142. package/dist/esm/api/resources/business/resources/products/resources/variants/exports.mjs +1 -0
  143. package/dist/esm/api/resources/business/resources/products/resources/variants/index.d.mts +1 -0
  144. package/dist/esm/api/resources/business/resources/products/resources/variants/index.mjs +1 -0
  145. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/Client.d.mts +69 -0
  146. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/Client.mjs +222 -0
  147. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/index.d.mts +1 -0
  148. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/index.mjs +1 -0
  149. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.d.mts +13 -0
  150. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.mjs +2 -0
  151. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.d.mts +18 -0
  152. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.mjs +2 -0
  153. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.d.mts +14 -0
  154. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.mjs +2 -0
  155. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.d.mts +3 -0
  156. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.mjs +1 -0
  157. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/exports.d.mts +2 -0
  158. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/exports.mjs +3 -0
  159. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/index.d.mts +2 -0
  160. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/index.mjs +2 -0
  161. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.d.mts +9 -0
  162. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.mjs +7 -0
  163. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.d.mts +9 -0
  164. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.mjs +7 -0
  165. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.d.mts +4 -0
  166. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.mjs +2 -0
  167. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/index.d.mts +3 -0
  168. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/index.mjs +3 -0
  169. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/index.d.mts +3 -0
  170. package/dist/esm/api/resources/business/resources/products/resources/variants/resources/index.mjs +3 -0
  171. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +6 -6
  172. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +24 -24
  173. package/dist/esm/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.mts +2 -2
  174. package/dist/esm/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.mts +2 -2
  175. package/dist/esm/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.mts +2 -2
  176. package/dist/esm/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.mts +2 -2
  177. package/dist/esm/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.mts +2 -2
  178. package/dist/esm/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.mts +2 -2
  179. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +1 -1
  180. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +4 -4
  181. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.mts +2 -2
  182. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +4 -4
  183. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +16 -16
  184. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.mts +2 -2
  185. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.mts +2 -2
  186. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.mts +2 -2
  187. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.d.mts +2 -2
  188. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +4 -4
  189. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +16 -16
  190. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.mts +2 -2
  191. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.mts +2 -2
  192. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.mts +2 -2
  193. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/StoreEventRsvpRequest.d.mts +2 -2
  194. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +43 -35
  195. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +105 -92
  196. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts +3 -2
  197. package/dist/esm/api/resources/customer/resources/cart/client/requests/CheckoutRequest.d.mts +3 -0
  198. package/dist/esm/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.mts +10 -0
  199. package/dist/esm/api/resources/customer/resources/cart/client/requests/ClearCartRequest.mjs +2 -0
  200. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.mts +3 -0
  201. package/dist/esm/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.mts +10 -0
  202. package/dist/esm/api/resources/customer/resources/cart/client/requests/GetCartRequest.mjs +2 -0
  203. package/dist/esm/api/resources/customer/resources/cart/client/requests/index.d.mts +2 -0
  204. package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +3 -3
  205. package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +12 -12
  206. package/dist/esm/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.mts +2 -2
  207. package/dist/esm/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.mts +2 -2
  208. package/dist/esm/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.mts +2 -2
  209. package/dist/esm/api/types/BusinessProduct.d.mts +1 -1
  210. package/dist/esm/api/types/BusinessProductVariant.d.mts +2 -0
  211. package/dist/esm/api/types/ReorderProductImagesRequest.d.mts +12 -0
  212. package/dist/esm/api/types/ReorderProductImagesRequest.mjs +2 -0
  213. package/dist/esm/api/types/StoreProductImageRequest.d.mts +4 -0
  214. package/dist/esm/api/types/StoreProductImageRequest.mjs +2 -0
  215. package/dist/esm/api/types/index.d.mts +2 -0
  216. package/dist/esm/api/types/index.mjs +2 -0
  217. package/dist/esm/version.d.mts +1 -1
  218. package/dist/esm/version.mjs +1 -1
  219. package/package.json +23 -1
  220. package/reference.md +428 -82
@@ -31,23 +31,27 @@ export class CartClient {
31
31
  this._options = normalizeClientOptionsWithAuth(options);
32
32
  }
33
33
  /**
34
+ * @param {FiveOneEat.customer.GetCartRequest} request
34
35
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
35
36
  *
36
37
  * @throws {@link FiveOneEat.UnauthorizedError}
37
38
  *
38
39
  * @example
39
- * await client.customer.cart.get()
40
+ * await client.customer.cart.get({
41
+ * business: "katzs-deli"
42
+ * })
40
43
  */
41
- get(requestOptions) {
42
- return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
44
+ get(request, requestOptions) {
45
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
43
46
  }
44
- __get(requestOptions) {
47
+ __get(request, requestOptions) {
45
48
  return __awaiter(this, void 0, void 0, function* () {
46
49
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
50
+ const { business } = request;
47
51
  const _authRequest = yield this._options.authProvider.getAuthRequest();
48
52
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
49
53
  const _response = yield core.fetcher({
50
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/cart"),
54
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart`),
51
55
  method: "GET",
52
56
  headers: _headers,
53
57
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -72,7 +76,7 @@ export class CartClient {
72
76
  });
73
77
  }
74
78
  }
75
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/cart");
79
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/cart");
76
80
  });
77
81
  }
78
82
  /**
@@ -84,7 +88,7 @@ export class CartClient {
84
88
  *
85
89
  * @example
86
90
  * await client.customer.cart.addItem({
87
- * business_id: 1,
91
+ * business: "katzs-deli",
88
92
  * product_id: 1,
89
93
  * quantity: 1
90
94
  * })
@@ -95,16 +99,17 @@ export class CartClient {
95
99
  __addItem(request, requestOptions) {
96
100
  return __awaiter(this, void 0, void 0, function* () {
97
101
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
102
+ const { business } = request, _body = __rest(request, ["business"]);
98
103
  const _authRequest = yield this._options.authProvider.getAuthRequest();
99
104
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
105
  const _response = yield core.fetcher({
101
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/cart"),
106
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart`),
102
107
  method: "POST",
103
108
  headers: _headers,
104
109
  contentType: "application/json",
105
110
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
106
111
  requestType: "json",
107
- body: request,
112
+ body: _body,
108
113
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
109
114
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
110
115
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -131,27 +136,31 @@ export class CartClient {
131
136
  });
132
137
  }
133
138
  }
134
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/cart");
139
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/cart");
135
140
  });
136
141
  }
137
142
  /**
143
+ * @param {FiveOneEat.customer.ClearCartRequest} request
138
144
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
139
145
  *
140
146
  * @throws {@link FiveOneEat.UnauthorizedError}
141
147
  *
142
148
  * @example
143
- * await client.customer.cart.clear()
149
+ * await client.customer.cart.clear({
150
+ * business: "katzs-deli"
151
+ * })
144
152
  */
145
- clear(requestOptions) {
146
- return core.HttpResponsePromise.fromPromise(this.__clear(requestOptions));
153
+ clear(request, requestOptions) {
154
+ return core.HttpResponsePromise.fromPromise(this.__clear(request, requestOptions));
147
155
  }
148
- __clear(requestOptions) {
156
+ __clear(request, requestOptions) {
149
157
  return __awaiter(this, void 0, void 0, function* () {
150
158
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
159
+ const { business } = request;
151
160
  const _authRequest = yield this._options.authProvider.getAuthRequest();
152
161
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
153
162
  const _response = yield core.fetcher({
154
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/cart"),
163
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart`),
155
164
  method: "DELETE",
156
165
  headers: _headers,
157
166
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -179,35 +188,44 @@ export class CartClient {
179
188
  });
180
189
  }
181
190
  }
182
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/cart");
191
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{business}/cart");
183
192
  });
184
193
  }
185
194
  /**
186
- * @param {FiveOneEat.customer.UpdateCartItemRequest} request
195
+ * Returns client_secret, price breakdown, and tax calculation for use with Stripe SDK.
196
+ *
197
+ * @param {FiveOneEat.customer.CreatePaymentIntentRequest} request
187
198
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
188
199
  *
189
200
  * @throws {@link FiveOneEat.UnauthorizedError}
190
- * @throws {@link FiveOneEat.NotFoundError}
191
201
  * @throws {@link FiveOneEat.UnprocessableEntityError}
202
+ * @throws {@link FiveOneEat.InternalServerError}
203
+ * @throws {@link FiveOneEat.ServiceUnavailableError}
192
204
  *
193
205
  * @example
194
- * await client.customer.cart.updateItem({
195
- * cartItem: "cartItem",
196
- * quantity: 1
206
+ * await client.customer.cart.createPaymentIntent({
207
+ * business: "katzs-deli",
208
+ * billing_address: {
209
+ * line1: "line1",
210
+ * city: "city",
211
+ * state: "state",
212
+ * postal_code: "postal_code",
213
+ * country: "country"
214
+ * }
197
215
  * })
198
216
  */
199
- updateItem(request, requestOptions) {
200
- return core.HttpResponsePromise.fromPromise(this.__updateItem(request, requestOptions));
217
+ createPaymentIntent(request, requestOptions) {
218
+ return core.HttpResponsePromise.fromPromise(this.__createPaymentIntent(request, requestOptions));
201
219
  }
202
- __updateItem(request, requestOptions) {
220
+ __createPaymentIntent(request, requestOptions) {
203
221
  return __awaiter(this, void 0, void 0, function* () {
204
222
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
205
- const { cartItem } = request, _body = __rest(request, ["cartItem"]);
223
+ const { business } = request, _body = __rest(request, ["business"]);
206
224
  const _authRequest = yield this._options.authProvider.getAuthRequest();
207
225
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
208
226
  const _response = yield core.fetcher({
209
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/cart/items/${core.url.encodePathParam(cartItem)}`),
210
- method: "PUT",
227
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/payment-intent`),
228
+ method: "POST",
211
229
  headers: _headers,
212
230
  contentType: "application/json",
213
231
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -229,10 +247,12 @@ export class CartClient {
229
247
  switch (_response.error.statusCode) {
230
248
  case 401:
231
249
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
232
- case 404:
233
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
234
250
  case 422:
235
251
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
252
+ case 500:
253
+ throw new FiveOneEat.InternalServerError(_response.error.body, _response.rawResponse);
254
+ case 503:
255
+ throw new FiveOneEat.ServiceUnavailableError(_response.error.body, _response.rawResponse);
236
256
  default:
237
257
  throw new errors.FiveOneEatError({
238
258
  statusCode: _response.error.statusCode,
@@ -241,35 +261,49 @@ export class CartClient {
241
261
  });
242
262
  }
243
263
  }
244
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/customer/cart/items/{cartItem}");
264
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/cart/payment-intent");
245
265
  });
246
266
  }
247
267
  /**
248
- * @param {FiveOneEat.customer.RemoveItemCartRequest} request
268
+ * Verifies the Stripe payment intent, creates the order, decrements inventory,
269
+ * clears the cart, and dispatches order confirmation notifications.
270
+ *
271
+ * @param {FiveOneEat.customer.CheckoutRequest} request
249
272
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
250
273
  *
251
274
  * @throws {@link FiveOneEat.UnauthorizedError}
252
- * @throws {@link FiveOneEat.NotFoundError}
275
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
253
276
  *
254
277
  * @example
255
- * await client.customer.cart.removeItem({
256
- * cartItem: "cartItem"
278
+ * await client.customer.cart.checkout({
279
+ * business: "katzs-deli",
280
+ * payment_intent_id: "payment_intent_id",
281
+ * billing_address: {
282
+ * line1: "line1",
283
+ * city: "city",
284
+ * state: "state",
285
+ * postal_code: "postal_code",
286
+ * country: "country"
287
+ * }
257
288
  * })
258
289
  */
259
- removeItem(request, requestOptions) {
260
- return core.HttpResponsePromise.fromPromise(this.__removeItem(request, requestOptions));
290
+ checkout(request, requestOptions) {
291
+ return core.HttpResponsePromise.fromPromise(this.__checkout(request, requestOptions));
261
292
  }
262
- __removeItem(request, requestOptions) {
293
+ __checkout(request, requestOptions) {
263
294
  return __awaiter(this, void 0, void 0, function* () {
264
295
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
265
- const { cartItem } = request;
296
+ const { business } = request, _body = __rest(request, ["business"]);
266
297
  const _authRequest = yield this._options.authProvider.getAuthRequest();
267
298
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
268
299
  const _response = yield core.fetcher({
269
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/cart/items/${core.url.encodePathParam(cartItem)}`),
270
- method: "DELETE",
300
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/checkout`),
301
+ method: "POST",
271
302
  headers: _headers,
303
+ contentType: "application/json",
272
304
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
305
+ requestType: "json",
306
+ body: _body,
273
307
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
274
308
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
275
309
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -286,8 +320,8 @@ export class CartClient {
286
320
  switch (_response.error.statusCode) {
287
321
  case 401:
288
322
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
289
- case 404:
290
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
323
+ case 422:
324
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
291
325
  default:
292
326
  throw new errors.FiveOneEatError({
293
327
  statusCode: _response.error.statusCode,
@@ -296,47 +330,40 @@ export class CartClient {
296
330
  });
297
331
  }
298
332
  }
299
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/cart/items/{cartItem}");
333
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/cart/checkout");
300
334
  });
301
335
  }
302
336
  /**
303
- * Returns client_secret, price breakdown, and tax calculation for use with Stripe SDK.
304
- *
305
- * @param {FiveOneEat.customer.CreatePaymentIntentRequest} request
337
+ * @param {FiveOneEat.customer.UpdateCartItemRequest} request
306
338
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
307
339
  *
308
340
  * @throws {@link FiveOneEat.UnauthorizedError}
341
+ * @throws {@link FiveOneEat.NotFoundError}
309
342
  * @throws {@link FiveOneEat.UnprocessableEntityError}
310
- * @throws {@link FiveOneEat.InternalServerError}
311
- * @throws {@link FiveOneEat.ServiceUnavailableError}
312
343
  *
313
344
  * @example
314
- * await client.customer.cart.createPaymentIntent({
315
- * billing_address: {
316
- * line1: "line1",
317
- * city: "city",
318
- * state: "state",
319
- * postal_code: "postal_code",
320
- * country: "country"
321
- * }
345
+ * await client.customer.cart.updateItem({
346
+ * cartItem: "cartItem",
347
+ * quantity: 1
322
348
  * })
323
349
  */
324
- createPaymentIntent(request, requestOptions) {
325
- return core.HttpResponsePromise.fromPromise(this.__createPaymentIntent(request, requestOptions));
350
+ updateItem(request, requestOptions) {
351
+ return core.HttpResponsePromise.fromPromise(this.__updateItem(request, requestOptions));
326
352
  }
327
- __createPaymentIntent(request, requestOptions) {
353
+ __updateItem(request, requestOptions) {
328
354
  return __awaiter(this, void 0, void 0, function* () {
329
355
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
356
+ const { cartItem } = request, _body = __rest(request, ["cartItem"]);
330
357
  const _authRequest = yield this._options.authProvider.getAuthRequest();
331
358
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
332
359
  const _response = yield core.fetcher({
333
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/cart/payment-intent"),
334
- method: "POST",
360
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/cart/items/${core.url.encodePathParam(cartItem)}`),
361
+ method: "PUT",
335
362
  headers: _headers,
336
363
  contentType: "application/json",
337
364
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
338
365
  requestType: "json",
339
- body: request,
366
+ body: _body,
340
367
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
341
368
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
342
369
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -353,12 +380,10 @@ export class CartClient {
353
380
  switch (_response.error.statusCode) {
354
381
  case 401:
355
382
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
383
+ case 404:
384
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
356
385
  case 422:
357
386
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
358
- case 500:
359
- throw new FiveOneEat.InternalServerError(_response.error.body, _response.rawResponse);
360
- case 503:
361
- throw new FiveOneEat.ServiceUnavailableError(_response.error.body, _response.rawResponse);
362
387
  default:
363
388
  throw new errors.FiveOneEatError({
364
389
  statusCode: _response.error.statusCode,
@@ -367,47 +392,35 @@ export class CartClient {
367
392
  });
368
393
  }
369
394
  }
370
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/cart/payment-intent");
395
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/customer/cart/items/{cartItem}");
371
396
  });
372
397
  }
373
398
  /**
374
- * Verifies the Stripe payment intent, creates the order, decrements inventory,
375
- * clears the cart, and dispatches order confirmation notifications.
376
- *
377
- * @param {FiveOneEat.customer.CheckoutRequest} request
399
+ * @param {FiveOneEat.customer.RemoveItemCartRequest} request
378
400
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
379
401
  *
380
402
  * @throws {@link FiveOneEat.UnauthorizedError}
381
- * @throws {@link FiveOneEat.UnprocessableEntityError}
403
+ * @throws {@link FiveOneEat.NotFoundError}
382
404
  *
383
405
  * @example
384
- * await client.customer.cart.checkout({
385
- * payment_intent_id: "payment_intent_id",
386
- * billing_address: {
387
- * line1: "line1",
388
- * city: "city",
389
- * state: "state",
390
- * postal_code: "postal_code",
391
- * country: "country"
392
- * }
406
+ * await client.customer.cart.removeItem({
407
+ * cartItem: "cartItem"
393
408
  * })
394
409
  */
395
- checkout(request, requestOptions) {
396
- return core.HttpResponsePromise.fromPromise(this.__checkout(request, requestOptions));
410
+ removeItem(request, requestOptions) {
411
+ return core.HttpResponsePromise.fromPromise(this.__removeItem(request, requestOptions));
397
412
  }
398
- __checkout(request, requestOptions) {
413
+ __removeItem(request, requestOptions) {
399
414
  return __awaiter(this, void 0, void 0, function* () {
400
415
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
416
+ const { cartItem } = request;
401
417
  const _authRequest = yield this._options.authProvider.getAuthRequest();
402
418
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
403
419
  const _response = yield core.fetcher({
404
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/cart/checkout"),
405
- method: "POST",
420
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/cart/items/${core.url.encodePathParam(cartItem)}`),
421
+ method: "DELETE",
406
422
  headers: _headers,
407
- contentType: "application/json",
408
423
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
409
- requestType: "json",
410
- body: request,
411
424
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
412
425
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
413
426
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -424,8 +437,8 @@ export class CartClient {
424
437
  switch (_response.error.statusCode) {
425
438
  case 401:
426
439
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
427
- case 422:
428
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
440
+ case 404:
441
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
429
442
  default:
430
443
  throw new errors.FiveOneEatError({
431
444
  statusCode: _response.error.statusCode,
@@ -434,7 +447,7 @@ export class CartClient {
434
447
  });
435
448
  }
436
449
  }
437
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/cart/checkout");
450
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/cart/items/{cartItem}");
438
451
  });
439
452
  }
440
453
  }
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * business_id: 1,
4
+ * business: "katzs-deli",
5
5
  * product_id: 1,
6
6
  * quantity: 1
7
7
  * }
8
8
  */
9
9
  export interface AddToCartRequest {
10
- business_id: number;
10
+ /** The business handle */
11
+ business: string;
11
12
  product_id: number;
12
13
  variant_id?: number | null;
13
14
  quantity: number;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
+ * business: "katzs-deli",
4
5
  * payment_intent_id: "payment_intent_id",
5
6
  * billing_address: {
6
7
  * line1: "line1",
@@ -12,6 +13,8 @@
12
13
  * }
13
14
  */
14
15
  export interface CheckoutRequest {
16
+ /** The business handle */
17
+ business: string;
15
18
  payment_intent_id: string;
16
19
  fulfillment_method?: CheckoutRequest.FulfillmentMethod | null;
17
20
  pickup_date?: CheckoutRequest.PickupDate | null;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * business: "katzs-deli"
5
+ * }
6
+ */
7
+ export interface ClearCartRequest {
8
+ /** The business handle */
9
+ business: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
+ * business: "katzs-deli",
4
5
  * billing_address: {
5
6
  * line1: "line1",
6
7
  * city: "city",
@@ -11,6 +12,8 @@
11
12
  * }
12
13
  */
13
14
  export interface CreatePaymentIntentRequest {
15
+ /** The business handle */
16
+ business: string;
14
17
  fulfillment_method?: CreatePaymentIntentRequest.FulfillmentMethod | null;
15
18
  pickup_date?: CreatePaymentIntentRequest.PickupDate | null;
16
19
  pickup_time?: string | null;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * business: "katzs-deli"
5
+ * }
6
+ */
7
+ export interface GetCartRequest {
8
+ /** The business handle */
9
+ business: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,5 +1,7 @@
1
1
  export type { AddToCartRequest } from "./AddToCartRequest.mjs";
2
2
  export { CheckoutRequest } from "./CheckoutRequest.mjs";
3
+ export type { ClearCartRequest } from "./ClearCartRequest.mjs";
3
4
  export { CreatePaymentIntentRequest } from "./CreatePaymentIntentRequest.mjs";
5
+ export type { GetCartRequest } from "./GetCartRequest.mjs";
4
6
  export type { RemoveItemCartRequest } from "./RemoveItemCartRequest.mjs";
5
7
  export type { UpdateCartItemRequest } from "./UpdateCartItemRequest.mjs";
@@ -18,7 +18,7 @@ export declare class ShopClient {
18
18
  *
19
19
  * @example
20
20
  * await client.customer.shop.listProducts({
21
- * handle: "katzs-deli"
21
+ * business: "katzs-deli"
22
22
  * })
23
23
  */
24
24
  listProducts(request: FiveOneEat.customer.ListProductsShopRequest, requestOptions?: ShopClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ListProductsShopResponse>;
@@ -31,7 +31,7 @@ export declare class ShopClient {
31
31
  *
32
32
  * @example
33
33
  * await client.customer.shop.getProduct({
34
- * handle: "katzs-deli",
34
+ * business: "katzs-deli",
35
35
  * product: "product"
36
36
  * })
37
37
  */
@@ -45,7 +45,7 @@ export declare class ShopClient {
45
45
  *
46
46
  * @example
47
47
  * await client.customer.shop.listCategories({
48
- * handle: "katzs-deli"
48
+ * business: "katzs-deli"
49
49
  * })
50
50
  */
51
51
  listCategories(request: FiveOneEat.customer.ListCategoriesShopRequest, requestOptions?: ShopClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ListCategoriesShopResponse>;
@@ -27,7 +27,7 @@ export class ShopClient {
27
27
  *
28
28
  * @example
29
29
  * await client.customer.shop.listProducts({
30
- * handle: "katzs-deli"
30
+ * business: "katzs-deli"
31
31
  * })
32
32
  */
33
33
  listProducts(request, requestOptions) {
@@ -36,7 +36,7 @@ export class ShopClient {
36
36
  __listProducts(request, requestOptions) {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- const { handle, category_id: categoryId, featured } = request;
39
+ const { business, category_id: categoryId, featured } = request;
40
40
  const _queryParams = {
41
41
  category_id: categoryId,
42
42
  featured,
@@ -44,7 +44,7 @@ export class ShopClient {
44
44
  const _authRequest = yield this._options.authProvider.getAuthRequest();
45
45
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
46
46
  const _response = yield core.fetcher({
47
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/shop`),
47
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/shop`),
48
48
  method: "GET",
49
49
  headers: _headers,
50
50
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -77,7 +77,7 @@ export class ShopClient {
77
77
  });
78
78
  }
79
79
  }
80
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/shop");
80
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/shop");
81
81
  });
82
82
  }
83
83
  /**
@@ -88,7 +88,7 @@ export class ShopClient {
88
88
  *
89
89
  * @example
90
90
  * await client.customer.shop.getProduct({
91
- * handle: "katzs-deli",
91
+ * business: "katzs-deli",
92
92
  * product: "product"
93
93
  * })
94
94
  */
@@ -98,11 +98,11 @@ export class ShopClient {
98
98
  __getProduct(request, requestOptions) {
99
99
  return __awaiter(this, void 0, void 0, function* () {
100
100
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
101
- const { handle, product } = request;
101
+ const { business, product } = request;
102
102
  const _authRequest = yield this._options.authProvider.getAuthRequest();
103
103
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
104
  const _response = yield core.fetcher({
105
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/shop/products/${core.url.encodePathParam(product)}`),
105
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/shop/products/${core.url.encodePathParam(product)}`),
106
106
  method: "GET",
107
107
  headers: _headers,
108
108
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -130,7 +130,7 @@ export class ShopClient {
130
130
  });
131
131
  }
132
132
  }
133
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/shop/products/{product}");
133
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/shop/products/{product}");
134
134
  });
135
135
  }
136
136
  /**
@@ -141,7 +141,7 @@ export class ShopClient {
141
141
  *
142
142
  * @example
143
143
  * await client.customer.shop.listCategories({
144
- * handle: "katzs-deli"
144
+ * business: "katzs-deli"
145
145
  * })
146
146
  */
147
147
  listCategories(request, requestOptions) {
@@ -150,11 +150,11 @@ export class ShopClient {
150
150
  __listCategories(request, requestOptions) {
151
151
  return __awaiter(this, void 0, void 0, function* () {
152
152
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
153
- const { handle } = request;
153
+ const { business } = request;
154
154
  const _authRequest = yield this._options.authProvider.getAuthRequest();
155
155
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
156
  const _response = yield core.fetcher({
157
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/shop/categories`),
157
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/shop/categories`),
158
158
  method: "GET",
159
159
  headers: _headers,
160
160
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -182,7 +182,7 @@ export class ShopClient {
182
182
  });
183
183
  }
184
184
  }
185
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/shop/categories");
185
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/shop/categories");
186
186
  });
187
187
  }
188
188
  }