@51eat/sdk 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (420) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/resources/commerce/client/Client.d.ts +9 -0
  3. package/dist/cjs/api/resources/business/resources/commerce/client/Client.js +17 -2
  4. package/dist/cjs/api/resources/business/resources/commerce/resources/index.d.ts +10 -0
  5. package/dist/cjs/api/resources/business/resources/commerce/resources/index.js +14 -4
  6. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.d.ts +294 -1
  7. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.js +893 -1
  8. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/index.d.ts +1 -1
  9. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/index.js +15 -0
  10. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.d.ts +10 -0
  11. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.js +3 -0
  12. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.d.ts +10 -0
  13. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.js +3 -0
  14. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.d.ts +10 -0
  15. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.js +3 -0
  16. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.js +3 -0
  18. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.d.ts +10 -0
  19. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.js +3 -0
  20. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.d.ts +10 -0
  21. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.js +3 -0
  22. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.d.ts +10 -0
  23. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.js +3 -0
  24. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.d.ts +52 -0
  25. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.js +3 -0
  26. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.d.ts +12 -0
  27. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.js +3 -0
  28. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.d.ts +68 -0
  29. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.js +38 -0
  30. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.d.ts +30 -0
  31. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.js +3 -0
  32. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.d.ts +46 -0
  33. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.js +3 -0
  34. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.d.ts +52 -0
  35. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.js +3 -0
  36. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.ts +13 -0
  37. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.js +5 -0
  38. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.d.ts +4 -0
  39. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.js +3 -0
  40. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.d.ts +4 -0
  41. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.js +3 -0
  42. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.d.ts +9 -0
  43. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.js +3 -0
  44. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.d.ts +4 -0
  45. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.js +3 -0
  46. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.d.ts +4 -0
  47. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.js +3 -0
  48. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.d.ts +4 -0
  49. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.js +3 -0
  50. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ListLocationsResponse.d.ts +1 -0
  51. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.d.ts +8 -0
  52. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.js +3 -0
  53. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.d.ts +15 -0
  54. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.js +3 -0
  55. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.d.ts +4 -0
  56. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.js +3 -0
  57. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.d.ts +4 -0
  58. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.js +3 -0
  59. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.d.ts +4 -0
  60. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.js +3 -0
  61. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.d.ts +4 -0
  62. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.js +3 -0
  63. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.d.ts +12 -0
  64. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.js +12 -0
  65. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/Client.d.ts +114 -0
  66. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/Client.js +401 -0
  67. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/index.d.ts +1 -0
  68. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/index.js +17 -0
  69. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.d.ts +10 -0
  70. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.js +3 -0
  71. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.d.ts +10 -0
  72. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.js +3 -0
  73. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.d.ts +12 -0
  74. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.js +3 -0
  75. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.d.ts +49 -0
  76. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.js +17 -0
  77. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.d.ts +36 -0
  78. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.js +17 -0
  79. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/index.d.ts +5 -0
  80. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/index.js +7 -0
  81. package/dist/cjs/api/resources/business/resources/commerce/resources/products/exports.d.ts +2 -0
  82. package/dist/cjs/api/resources/business/resources/commerce/resources/products/exports.js +21 -0
  83. package/dist/cjs/api/resources/business/resources/commerce/resources/products/index.d.ts +2 -0
  84. package/dist/cjs/api/resources/business/resources/commerce/resources/products/index.js +18 -0
  85. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.d.ts +8 -0
  86. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.js +3 -0
  87. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.d.ts +8 -0
  88. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.js +3 -0
  89. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.d.ts +44 -0
  90. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.js +3 -0
  91. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.d.ts +8 -0
  92. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.js +3 -0
  93. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/index.d.ts +4 -0
  94. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/index.js +20 -0
  95. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/Client.d.ts +104 -0
  96. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/Client.js +380 -0
  97. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/index.d.ts +1 -0
  98. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/index.js +17 -0
  99. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.d.ts +12 -0
  100. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.js +3 -0
  101. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.d.ts +12 -0
  102. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.js +3 -0
  103. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.d.ts +9 -0
  104. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.js +3 -0
  105. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/index.d.ts +3 -0
  106. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/index.js +2 -0
  107. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/exports.d.ts +2 -0
  108. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/exports.js +21 -0
  109. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/index.d.ts +2 -0
  110. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/index.js +18 -0
  111. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.d.ts +4 -0
  112. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.js +3 -0
  113. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.d.ts +4 -0
  114. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.js +3 -0
  115. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.d.ts +4 -0
  116. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.js +3 -0
  117. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.d.ts +4 -0
  118. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.js +3 -0
  119. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.d.ts +4 -0
  120. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.js +3 -0
  121. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/index.d.ts +5 -0
  122. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/index.js +21 -0
  123. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/Client.d.ts +163 -0
  124. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/Client.js +537 -0
  125. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/index.d.ts +1 -0
  126. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/index.js +17 -0
  127. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.d.ts +13 -0
  128. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.js +3 -0
  129. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.d.ts +13 -0
  130. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.js +3 -0
  131. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.d.ts +13 -0
  132. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.js +3 -0
  133. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.d.ts +10 -0
  134. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.js +3 -0
  135. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.d.ts +16 -0
  136. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.js +3 -0
  137. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.d.ts +54 -0
  138. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.js +17 -0
  139. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.d.ts +46 -0
  140. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.js +17 -0
  141. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/index.d.ts +7 -0
  142. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/index.js +7 -0
  143. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/exports.d.ts +2 -0
  144. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/exports.js +21 -0
  145. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/index.d.ts +2 -0
  146. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/index.js +18 -0
  147. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.d.ts +4 -0
  148. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.js +3 -0
  149. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.d.ts +8 -0
  150. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.js +3 -0
  151. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.d.ts +6 -0
  152. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.js +3 -0
  153. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.d.ts +4 -0
  154. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.js +3 -0
  155. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.d.ts +4 -0
  156. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.js +3 -0
  157. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.d.ts +8 -0
  158. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.js +3 -0
  159. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/index.d.ts +6 -0
  160. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/index.js +22 -0
  161. package/dist/cjs/api/resources/commerce/resources/carts/resources/lines/client/Client.d.ts +9 -5
  162. package/dist/cjs/api/resources/commerce/resources/carts/resources/lines/client/Client.js +9 -5
  163. package/dist/cjs/api/types/BusinessCommerceLocation.d.ts +37 -3
  164. package/dist/cjs/api/types/BusinessEvent.d.ts +2 -0
  165. package/dist/cjs/api/types/BusinessLocation.d.ts +29 -0
  166. package/dist/cjs/api/types/BusinessLocation.js +11 -0
  167. package/dist/cjs/api/types/BusinessLocationDetails.d.ts +36 -0
  168. package/dist/cjs/api/types/BusinessLocationDetails.js +11 -0
  169. package/dist/cjs/api/types/BusinessLocationHourException.d.ts +14 -0
  170. package/dist/cjs/api/types/BusinessLocationHourException.js +3 -0
  171. package/dist/cjs/api/types/BusinessLocationOpeningHours.d.ts +17 -0
  172. package/dist/cjs/api/types/BusinessLocationOpeningHours.js +3 -0
  173. package/dist/cjs/api/types/BusinessLocationPickup.d.ts +25 -0
  174. package/dist/cjs/api/types/BusinessLocationPickup.js +14 -0
  175. package/dist/cjs/api/types/BusinessOpeningHourSlot.d.ts +10 -0
  176. package/dist/cjs/api/types/BusinessOpeningHourSlot.js +3 -0
  177. package/dist/cjs/api/types/BusinessPickupSchedule.d.ts +10 -0
  178. package/dist/cjs/api/types/BusinessPickupSchedule.js +3 -0
  179. package/dist/cjs/api/types/BusinessPickupWindow.d.ts +11 -0
  180. package/dist/cjs/api/types/BusinessPickupWindow.js +3 -0
  181. package/dist/cjs/api/types/BusinessSellerTerms.d.ts +10 -0
  182. package/dist/cjs/api/types/BusinessSellerTerms.js +3 -0
  183. package/dist/cjs/api/types/BusinessSelling.d.ts +61 -0
  184. package/dist/cjs/api/types/BusinessSelling.js +16 -0
  185. package/dist/cjs/api/types/Cart.d.ts +1 -1
  186. package/dist/cjs/api/types/CustomerEvent.d.ts +6 -0
  187. package/dist/cjs/api/types/CustomerEventDetail.d.ts +6 -0
  188. package/dist/cjs/api/types/CustomerEventTicketType.d.ts +7 -0
  189. package/dist/cjs/api/types/EventFeedItem.d.ts +6 -0
  190. package/dist/cjs/api/types/ImageResource.d.ts +7 -0
  191. package/dist/cjs/api/types/ImageResource.js +3 -0
  192. package/dist/cjs/api/types/LocationKind.d.ts +12 -0
  193. package/dist/cjs/api/types/LocationKind.js +15 -0
  194. package/dist/cjs/api/types/ProductResource.d.ts +41 -0
  195. package/dist/cjs/api/types/ProductResource.js +18 -0
  196. package/dist/cjs/api/types/Unit.d.ts +16 -0
  197. package/dist/cjs/api/types/Unit.js +19 -0
  198. package/dist/cjs/api/types/UpdateLocationRequest.d.ts +7 -0
  199. package/dist/cjs/api/types/UpdateLocationRequest.js +3 -0
  200. package/dist/cjs/api/types/VariantInventoryLevelResource.d.ts +9 -0
  201. package/dist/cjs/api/types/VariantInventoryLevelResource.js +3 -0
  202. package/dist/cjs/api/types/VariantResource.d.ts +26 -0
  203. package/dist/cjs/api/types/VariantResource.js +3 -0
  204. package/dist/cjs/api/types/VariantStockLocationResource.d.ts +15 -0
  205. package/dist/cjs/api/types/VariantStockLocationResource.js +11 -0
  206. package/dist/cjs/api/types/index.d.ts +18 -0
  207. package/dist/cjs/api/types/index.js +18 -0
  208. package/dist/cjs/version.d.ts +1 -1
  209. package/dist/cjs/version.js +1 -1
  210. package/dist/esm/BaseClient.mjs +2 -2
  211. package/dist/esm/api/resources/business/resources/commerce/client/Client.d.mts +9 -0
  212. package/dist/esm/api/resources/business/resources/commerce/client/Client.mjs +15 -0
  213. package/dist/esm/api/resources/business/resources/commerce/resources/index.d.mts +10 -0
  214. package/dist/esm/api/resources/business/resources/commerce/resources/index.mjs +10 -0
  215. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.d.mts +294 -1
  216. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.mjs +894 -2
  217. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/index.d.mts +1 -1
  218. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/index.mjs +1 -1
  219. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.d.mts +10 -0
  220. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.mjs +2 -0
  221. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.d.mts +10 -0
  222. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.mjs +2 -0
  223. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.d.mts +10 -0
  224. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.mjs +2 -0
  225. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.d.mts +10 -0
  226. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.mjs +2 -0
  227. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.d.mts +10 -0
  228. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.mjs +2 -0
  229. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.d.mts +10 -0
  230. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.mjs +2 -0
  231. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.d.mts +10 -0
  232. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.mjs +2 -0
  233. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.d.mts +52 -0
  234. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.mjs +2 -0
  235. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.d.mts +12 -0
  236. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.mjs +2 -0
  237. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.d.mts +68 -0
  238. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.mjs +35 -0
  239. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.d.mts +30 -0
  240. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.mjs +2 -0
  241. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.d.mts +46 -0
  242. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.mjs +2 -0
  243. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.d.mts +52 -0
  244. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.mjs +2 -0
  245. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.mts +13 -0
  246. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.mjs +1 -0
  247. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.d.mts +4 -0
  248. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.mjs +2 -0
  249. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.d.mts +4 -0
  250. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.mjs +2 -0
  251. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.d.mts +9 -0
  252. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.mjs +2 -0
  253. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.d.mts +4 -0
  254. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.mjs +2 -0
  255. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.d.mts +4 -0
  256. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.mjs +2 -0
  257. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.d.mts +4 -0
  258. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.mjs +2 -0
  259. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ListLocationsResponse.d.mts +1 -0
  260. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.d.mts +8 -0
  261. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.mjs +2 -0
  262. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.d.mts +15 -0
  263. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.mjs +2 -0
  264. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.d.mts +4 -0
  265. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.mjs +2 -0
  266. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.d.mts +4 -0
  267. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.mjs +2 -0
  268. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.d.mts +4 -0
  269. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.mjs +2 -0
  270. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.d.mts +4 -0
  271. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.mjs +2 -0
  272. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.d.mts +12 -0
  273. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.mjs +12 -0
  274. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.d.mts +114 -0
  275. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.mjs +364 -0
  276. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.d.mts +1 -0
  277. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.mjs +1 -0
  278. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.d.mts +10 -0
  279. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.mjs +2 -0
  280. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.d.mts +10 -0
  281. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.mjs +2 -0
  282. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.d.mts +12 -0
  283. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.mjs +2 -0
  284. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.d.mts +49 -0
  285. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.mjs +14 -0
  286. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.d.mts +36 -0
  287. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.mjs +14 -0
  288. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/index.d.mts +5 -0
  289. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/index.mjs +2 -0
  290. package/dist/esm/api/resources/business/resources/commerce/resources/products/exports.d.mts +2 -0
  291. package/dist/esm/api/resources/business/resources/commerce/resources/products/exports.mjs +3 -0
  292. package/dist/esm/api/resources/business/resources/commerce/resources/products/index.d.mts +2 -0
  293. package/dist/esm/api/resources/business/resources/commerce/resources/products/index.mjs +2 -0
  294. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.d.mts +8 -0
  295. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.mjs +2 -0
  296. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.d.mts +8 -0
  297. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.mjs +2 -0
  298. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.d.mts +44 -0
  299. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.mjs +2 -0
  300. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.d.mts +8 -0
  301. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.mjs +2 -0
  302. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/index.d.mts +4 -0
  303. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/index.mjs +4 -0
  304. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/Client.d.mts +104 -0
  305. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/Client.mjs +343 -0
  306. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/index.d.mts +1 -0
  307. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/index.mjs +1 -0
  308. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.d.mts +12 -0
  309. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.mjs +2 -0
  310. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.d.mts +12 -0
  311. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.mjs +2 -0
  312. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.d.mts +9 -0
  313. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.mjs +2 -0
  314. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/index.d.mts +3 -0
  315. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/index.mjs +1 -0
  316. package/dist/esm/api/resources/business/resources/commerce/resources/selling/exports.d.mts +2 -0
  317. package/dist/esm/api/resources/business/resources/commerce/resources/selling/exports.mjs +3 -0
  318. package/dist/esm/api/resources/business/resources/commerce/resources/selling/index.d.mts +2 -0
  319. package/dist/esm/api/resources/business/resources/commerce/resources/selling/index.mjs +2 -0
  320. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.d.mts +4 -0
  321. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.mjs +2 -0
  322. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.d.mts +4 -0
  323. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.mjs +2 -0
  324. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.d.mts +4 -0
  325. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.mjs +2 -0
  326. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.d.mts +4 -0
  327. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.mjs +2 -0
  328. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.d.mts +4 -0
  329. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.mjs +2 -0
  330. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/index.d.mts +5 -0
  331. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/index.mjs +5 -0
  332. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/Client.d.mts +163 -0
  333. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/Client.mjs +500 -0
  334. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/index.d.mts +1 -0
  335. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/index.mjs +1 -0
  336. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.d.mts +13 -0
  337. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.mjs +2 -0
  338. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.d.mts +13 -0
  339. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.mjs +2 -0
  340. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.d.mts +13 -0
  341. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.mjs +2 -0
  342. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.d.mts +10 -0
  343. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.mjs +2 -0
  344. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.d.mts +16 -0
  345. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.mjs +2 -0
  346. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.d.mts +54 -0
  347. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.mjs +14 -0
  348. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.d.mts +46 -0
  349. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.mjs +14 -0
  350. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/index.d.mts +7 -0
  351. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/index.mjs +2 -0
  352. package/dist/esm/api/resources/business/resources/commerce/resources/variants/exports.d.mts +2 -0
  353. package/dist/esm/api/resources/business/resources/commerce/resources/variants/exports.mjs +3 -0
  354. package/dist/esm/api/resources/business/resources/commerce/resources/variants/index.d.mts +2 -0
  355. package/dist/esm/api/resources/business/resources/commerce/resources/variants/index.mjs +2 -0
  356. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.d.mts +4 -0
  357. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.mjs +2 -0
  358. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.d.mts +8 -0
  359. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.mjs +2 -0
  360. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.d.mts +6 -0
  361. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.mjs +2 -0
  362. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.d.mts +4 -0
  363. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.mjs +2 -0
  364. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.d.mts +4 -0
  365. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.mjs +2 -0
  366. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.d.mts +8 -0
  367. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.mjs +2 -0
  368. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/index.d.mts +6 -0
  369. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/index.mjs +6 -0
  370. package/dist/esm/api/resources/commerce/resources/carts/resources/lines/client/Client.d.mts +9 -5
  371. package/dist/esm/api/resources/commerce/resources/carts/resources/lines/client/Client.mjs +9 -5
  372. package/dist/esm/api/types/BusinessCommerceLocation.d.mts +37 -3
  373. package/dist/esm/api/types/BusinessEvent.d.mts +2 -0
  374. package/dist/esm/api/types/BusinessLocation.d.mts +29 -0
  375. package/dist/esm/api/types/BusinessLocation.mjs +8 -0
  376. package/dist/esm/api/types/BusinessLocationDetails.d.mts +36 -0
  377. package/dist/esm/api/types/BusinessLocationDetails.mjs +8 -0
  378. package/dist/esm/api/types/BusinessLocationHourException.d.mts +14 -0
  379. package/dist/esm/api/types/BusinessLocationHourException.mjs +2 -0
  380. package/dist/esm/api/types/BusinessLocationOpeningHours.d.mts +17 -0
  381. package/dist/esm/api/types/BusinessLocationOpeningHours.mjs +2 -0
  382. package/dist/esm/api/types/BusinessLocationPickup.d.mts +25 -0
  383. package/dist/esm/api/types/BusinessLocationPickup.mjs +11 -0
  384. package/dist/esm/api/types/BusinessOpeningHourSlot.d.mts +10 -0
  385. package/dist/esm/api/types/BusinessOpeningHourSlot.mjs +2 -0
  386. package/dist/esm/api/types/BusinessPickupSchedule.d.mts +10 -0
  387. package/dist/esm/api/types/BusinessPickupSchedule.mjs +2 -0
  388. package/dist/esm/api/types/BusinessPickupWindow.d.mts +11 -0
  389. package/dist/esm/api/types/BusinessPickupWindow.mjs +2 -0
  390. package/dist/esm/api/types/BusinessSellerTerms.d.mts +10 -0
  391. package/dist/esm/api/types/BusinessSellerTerms.mjs +2 -0
  392. package/dist/esm/api/types/BusinessSelling.d.mts +61 -0
  393. package/dist/esm/api/types/BusinessSelling.mjs +13 -0
  394. package/dist/esm/api/types/Cart.d.mts +1 -1
  395. package/dist/esm/api/types/CustomerEvent.d.mts +6 -0
  396. package/dist/esm/api/types/CustomerEventDetail.d.mts +6 -0
  397. package/dist/esm/api/types/CustomerEventTicketType.d.mts +7 -0
  398. package/dist/esm/api/types/EventFeedItem.d.mts +6 -0
  399. package/dist/esm/api/types/ImageResource.d.mts +7 -0
  400. package/dist/esm/api/types/ImageResource.mjs +2 -0
  401. package/dist/esm/api/types/LocationKind.d.mts +12 -0
  402. package/dist/esm/api/types/LocationKind.mjs +12 -0
  403. package/dist/esm/api/types/ProductResource.d.mts +41 -0
  404. package/dist/esm/api/types/ProductResource.mjs +15 -0
  405. package/dist/esm/api/types/Unit.d.mts +16 -0
  406. package/dist/esm/api/types/Unit.mjs +16 -0
  407. package/dist/esm/api/types/UpdateLocationRequest.d.mts +7 -0
  408. package/dist/esm/api/types/UpdateLocationRequest.mjs +2 -0
  409. package/dist/esm/api/types/VariantInventoryLevelResource.d.mts +9 -0
  410. package/dist/esm/api/types/VariantInventoryLevelResource.mjs +2 -0
  411. package/dist/esm/api/types/VariantResource.d.mts +26 -0
  412. package/dist/esm/api/types/VariantResource.mjs +2 -0
  413. package/dist/esm/api/types/VariantStockLocationResource.d.mts +15 -0
  414. package/dist/esm/api/types/VariantStockLocationResource.mjs +8 -0
  415. package/dist/esm/api/types/index.d.mts +18 -0
  416. package/dist/esm/api/types/index.mjs +18 -0
  417. package/dist/esm/version.d.mts +1 -1
  418. package/dist/esm/version.mjs +1 -1
  419. package/package.json +34 -1
  420. package/reference.md +2115 -83
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../../../index.js";
2
+ export interface UpdateLocationsResponse {
3
+ data: FiveOneEat.BusinessLocationDetails;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../../../index.js";
2
+ export interface UpdatePickupLocationsResponse {
3
+ data: FiveOneEat.BusinessLocationPickup;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,13 @@
1
+ export * from "./ArchiveLocationsResponse.js";
2
+ export * from "./CreateLocationsResponse.js";
3
+ export * from "./FlyerLocationsResponse.js";
4
+ export * from "./GetHoursLocationsResponse.js";
5
+ export * from "./GetLocationsResponse.js";
6
+ export * from "./GetPickupLocationsResponse.js";
1
7
  export * from "./ListLocationsResponse.js";
8
+ export * from "./OfferMainStoreProductsLocationsResponse.js";
9
+ export * from "./PreviewPickupAffectedOrdersLocationsResponse.js";
10
+ export * from "./SetActiveLocationsResponse.js";
11
+ export * from "./UpdateHoursLocationsResponse.js";
12
+ export * from "./UpdateLocationsResponse.js";
13
+ export * from "./UpdatePickupLocationsResponse.js";
@@ -14,4 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ArchiveLocationsResponse.js"), exports);
18
+ __exportStar(require("./CreateLocationsResponse.js"), exports);
19
+ __exportStar(require("./FlyerLocationsResponse.js"), exports);
20
+ __exportStar(require("./GetHoursLocationsResponse.js"), exports);
21
+ __exportStar(require("./GetLocationsResponse.js"), exports);
22
+ __exportStar(require("./GetPickupLocationsResponse.js"), exports);
17
23
  __exportStar(require("./ListLocationsResponse.js"), exports);
24
+ __exportStar(require("./OfferMainStoreProductsLocationsResponse.js"), exports);
25
+ __exportStar(require("./PreviewPickupAffectedOrdersLocationsResponse.js"), exports);
26
+ __exportStar(require("./SetActiveLocationsResponse.js"), exports);
27
+ __exportStar(require("./UpdateHoursLocationsResponse.js"), exports);
28
+ __exportStar(require("./UpdateLocationsResponse.js"), exports);
29
+ __exportStar(require("./UpdatePickupLocationsResponse.js"), exports);
@@ -0,0 +1,114 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../../../../../index.js";
5
+ export declare namespace ProductsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class ProductsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ProductsClient.Options>;
12
+ constructor(options?: ProductsClient.Options);
13
+ /**
14
+ * Newest first, 20 a page, each with its default option and category.
15
+ * `search` keeps those whose name contains it, any case; `location`
16
+ * those offered at that store or stand, either way of buying (ignored
17
+ * unless it's one of the business's unarchived locations); `category`
18
+ * those filed in that category.
19
+ *
20
+ * @param {FiveOneEat.business.commerce.ListProductsRequest} request
21
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
22
+ *
23
+ * @throws {@link FiveOneEat.UnauthorizedError}
24
+ * @throws {@link FiveOneEat.ForbiddenError}
25
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
26
+ *
27
+ * @example
28
+ * await client.business.commerce.products.list()
29
+ */
30
+ list(request?: FiveOneEat.business.commerce.ListProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.ListProductsResponse>;
31
+ private __list;
32
+ /**
33
+ * Answers 201 with the product as `GET /products/{product}` shows it. It
34
+ * starts with one option, the default: `price` prices it, and `compare_at_price`,
35
+ * `unit`, `quantity_step` and `starting_stock` need a price. Without a
36
+ * price the option starts unpriced. Refused with a form error on
37
+ * `payments` until the business can take payments, and on `is_active`
38
+ * when it would go on sale before 51Eat approves the business to sell.
39
+ *
40
+ * @param {FiveOneEat.business.commerce.StoreProductRequest} request
41
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
42
+ *
43
+ * @throws {@link FiveOneEat.UnauthorizedError}
44
+ * @throws {@link FiveOneEat.ForbiddenError}
45
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
46
+ *
47
+ * @example
48
+ * await client.business.commerce.products.create({
49
+ * "Idempotency-Key": "Idempotency-Key",
50
+ * name: "name",
51
+ * tax_code: "tax_code"
52
+ * })
53
+ */
54
+ create(request: FiveOneEat.business.commerce.StoreProductRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.CreateProductsResponse>;
55
+ private __create;
56
+ /**
57
+ * With its unarchived options in order, each with its stock at every
58
+ * location, where it's offered (`availability`), its category, photos
59
+ * and tax code.
60
+ *
61
+ * @param {FiveOneEat.business.commerce.GetProductsRequest} request
62
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link FiveOneEat.UnauthorizedError}
65
+ * @throws {@link FiveOneEat.ForbiddenError}
66
+ * @throws {@link FiveOneEat.NotFoundError}
67
+ *
68
+ * @example
69
+ * await client.business.commerce.products.get({
70
+ * product: "product"
71
+ * })
72
+ */
73
+ get(request: FiveOneEat.business.commerce.GetProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.GetProductsResponse>;
74
+ private __get;
75
+ /**
76
+ * Saves its details. `availability`, when sent, replaces where it's
77
+ * offered; left out, that stays as it is.
78
+ *
79
+ * @param {FiveOneEat.business.commerce.UpdateProductRequest} request
80
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link FiveOneEat.UnauthorizedError}
83
+ * @throws {@link FiveOneEat.ForbiddenError}
84
+ * @throws {@link FiveOneEat.NotFoundError}
85
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
86
+ *
87
+ * @example
88
+ * await client.business.commerce.products.update({
89
+ * product: "product",
90
+ * name: "name",
91
+ * tax_code: "tax_code"
92
+ * })
93
+ */
94
+ update(request: FiveOneEat.business.commerce.UpdateProductRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.UpdateProductsResponse>;
95
+ private __update;
96
+ /**
97
+ * Archives it, so its orders keep it. It leaves the list and every store
98
+ * and stand.
99
+ *
100
+ * @param {FiveOneEat.business.commerce.DeleteProductsRequest} request
101
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
102
+ *
103
+ * @throws {@link FiveOneEat.UnauthorizedError}
104
+ * @throws {@link FiveOneEat.ForbiddenError}
105
+ * @throws {@link FiveOneEat.NotFoundError}
106
+ *
107
+ * @example
108
+ * await client.business.commerce.products.delete({
109
+ * product: "product"
110
+ * })
111
+ */
112
+ delete(request: FiveOneEat.business.commerce.DeleteProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<void>;
113
+ private __delete;
114
+ }
@@ -0,0 +1,401 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.ProductsClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
59
+ const headers_js_1 = require("../../../../../../../../core/headers.js");
60
+ const core = __importStar(require("../../../../../../../../core/index.js"));
61
+ const environments = __importStar(require("../../../../../../../../environments.js"));
62
+ const handleNonStatusCodeError_js_1 = require("../../../../../../../../errors/handleNonStatusCodeError.js");
63
+ const errors = __importStar(require("../../../../../../../../errors/index.js"));
64
+ const FiveOneEat = __importStar(require("../../../../../../../index.js"));
65
+ class ProductsClient {
66
+ constructor(options = {}) {
67
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
+ }
69
+ /**
70
+ * Newest first, 20 a page, each with its default option and category.
71
+ * `search` keeps those whose name contains it, any case; `location`
72
+ * those offered at that store or stand, either way of buying (ignored
73
+ * unless it's one of the business's unarchived locations); `category`
74
+ * those filed in that category.
75
+ *
76
+ * @param {FiveOneEat.business.commerce.ListProductsRequest} request
77
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
78
+ *
79
+ * @throws {@link FiveOneEat.UnauthorizedError}
80
+ * @throws {@link FiveOneEat.ForbiddenError}
81
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
82
+ *
83
+ * @example
84
+ * await client.business.commerce.products.list()
85
+ */
86
+ list(request = {}, requestOptions) {
87
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
88
+ }
89
+ __list() {
90
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
91
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
92
+ const { search, location, category } = request;
93
+ const _queryParams = {
94
+ search,
95
+ location,
96
+ category,
97
+ };
98
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
99
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
+ 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, "business/commerce/products"),
102
+ method: "GET",
103
+ headers: _headers,
104
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
105
+ queryString: core.url
106
+ .queryBuilder()
107
+ .addMany(_queryParams)
108
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
109
+ .build(),
110
+ 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,
111
+ 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,
112
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
113
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
114
+ logging: this._options.logging,
115
+ });
116
+ if (_response.ok) {
117
+ return {
118
+ data: _response.body,
119
+ rawResponse: _response.rawResponse,
120
+ };
121
+ }
122
+ if (_response.error.reason === "status-code") {
123
+ switch (_response.error.statusCode) {
124
+ case 401:
125
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
126
+ case 403:
127
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
128
+ case 422:
129
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
130
+ default:
131
+ throw new errors.FiveOneEatError({
132
+ statusCode: _response.error.statusCode,
133
+ body: _response.error.body,
134
+ rawResponse: _response.rawResponse,
135
+ });
136
+ }
137
+ }
138
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/products");
139
+ });
140
+ }
141
+ /**
142
+ * Answers 201 with the product as `GET /products/{product}` shows it. It
143
+ * starts with one option, the default: `price` prices it, and `compare_at_price`,
144
+ * `unit`, `quantity_step` and `starting_stock` need a price. Without a
145
+ * price the option starts unpriced. Refused with a form error on
146
+ * `payments` until the business can take payments, and on `is_active`
147
+ * when it would go on sale before 51Eat approves the business to sell.
148
+ *
149
+ * @param {FiveOneEat.business.commerce.StoreProductRequest} request
150
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
151
+ *
152
+ * @throws {@link FiveOneEat.UnauthorizedError}
153
+ * @throws {@link FiveOneEat.ForbiddenError}
154
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
155
+ *
156
+ * @example
157
+ * await client.business.commerce.products.create({
158
+ * "Idempotency-Key": "Idempotency-Key",
159
+ * name: "name",
160
+ * tax_code: "tax_code"
161
+ * })
162
+ */
163
+ create(request, requestOptions) {
164
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
165
+ }
166
+ __create(request, requestOptions) {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
169
+ const { "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["Idempotency-Key"]);
170
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
171
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
172
+ const _response = yield core.fetcher({
173
+ 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, "business/commerce/products"),
174
+ method: "POST",
175
+ headers: _headers,
176
+ contentType: "application/json",
177
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
178
+ requestType: "json",
179
+ body: _body,
180
+ 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,
181
+ 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,
182
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
183
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
184
+ logging: this._options.logging,
185
+ });
186
+ if (_response.ok) {
187
+ return {
188
+ data: _response.body,
189
+ rawResponse: _response.rawResponse,
190
+ };
191
+ }
192
+ if (_response.error.reason === "status-code") {
193
+ switch (_response.error.statusCode) {
194
+ case 401:
195
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
196
+ case 403:
197
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
198
+ case 422:
199
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
200
+ default:
201
+ throw new errors.FiveOneEatError({
202
+ statusCode: _response.error.statusCode,
203
+ body: _response.error.body,
204
+ rawResponse: _response.rawResponse,
205
+ });
206
+ }
207
+ }
208
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/commerce/products");
209
+ });
210
+ }
211
+ /**
212
+ * With its unarchived options in order, each with its stock at every
213
+ * location, where it's offered (`availability`), its category, photos
214
+ * and tax code.
215
+ *
216
+ * @param {FiveOneEat.business.commerce.GetProductsRequest} request
217
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
218
+ *
219
+ * @throws {@link FiveOneEat.UnauthorizedError}
220
+ * @throws {@link FiveOneEat.ForbiddenError}
221
+ * @throws {@link FiveOneEat.NotFoundError}
222
+ *
223
+ * @example
224
+ * await client.business.commerce.products.get({
225
+ * product: "product"
226
+ * })
227
+ */
228
+ get(request, requestOptions) {
229
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
230
+ }
231
+ __get(request, requestOptions) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
234
+ const { product } = request;
235
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
236
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
237
+ const _response = yield core.fetcher({
238
+ 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, `business/commerce/products/${core.url.encodePathParam(product)}`),
239
+ method: "GET",
240
+ headers: _headers,
241
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
242
+ 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,
243
+ 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,
244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
246
+ logging: this._options.logging,
247
+ });
248
+ if (_response.ok) {
249
+ return {
250
+ data: _response.body,
251
+ rawResponse: _response.rawResponse,
252
+ };
253
+ }
254
+ if (_response.error.reason === "status-code") {
255
+ switch (_response.error.statusCode) {
256
+ case 401:
257
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
258
+ case 403:
259
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
260
+ case 404:
261
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
262
+ default:
263
+ throw new errors.FiveOneEatError({
264
+ statusCode: _response.error.statusCode,
265
+ body: _response.error.body,
266
+ rawResponse: _response.rawResponse,
267
+ });
268
+ }
269
+ }
270
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/products/{product}");
271
+ });
272
+ }
273
+ /**
274
+ * Saves its details. `availability`, when sent, replaces where it's
275
+ * offered; left out, that stays as it is.
276
+ *
277
+ * @param {FiveOneEat.business.commerce.UpdateProductRequest} request
278
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
279
+ *
280
+ * @throws {@link FiveOneEat.UnauthorizedError}
281
+ * @throws {@link FiveOneEat.ForbiddenError}
282
+ * @throws {@link FiveOneEat.NotFoundError}
283
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
284
+ *
285
+ * @example
286
+ * await client.business.commerce.products.update({
287
+ * product: "product",
288
+ * name: "name",
289
+ * tax_code: "tax_code"
290
+ * })
291
+ */
292
+ update(request, requestOptions) {
293
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
294
+ }
295
+ __update(request, requestOptions) {
296
+ return __awaiter(this, void 0, void 0, function* () {
297
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
298
+ const { product } = request, _body = __rest(request, ["product"]);
299
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
300
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
301
+ const _response = yield core.fetcher({
302
+ 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, `business/commerce/products/${core.url.encodePathParam(product)}`),
303
+ method: "PUT",
304
+ headers: _headers,
305
+ contentType: "application/json",
306
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
307
+ requestType: "json",
308
+ body: _body,
309
+ 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,
310
+ 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,
311
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
312
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
313
+ logging: this._options.logging,
314
+ });
315
+ if (_response.ok) {
316
+ return {
317
+ data: _response.body,
318
+ rawResponse: _response.rawResponse,
319
+ };
320
+ }
321
+ if (_response.error.reason === "status-code") {
322
+ switch (_response.error.statusCode) {
323
+ case 401:
324
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
325
+ case 403:
326
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
327
+ case 404:
328
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
329
+ case 422:
330
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
331
+ default:
332
+ throw new errors.FiveOneEatError({
333
+ statusCode: _response.error.statusCode,
334
+ body: _response.error.body,
335
+ rawResponse: _response.rawResponse,
336
+ });
337
+ }
338
+ }
339
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/commerce/products/{product}");
340
+ });
341
+ }
342
+ /**
343
+ * Archives it, so its orders keep it. It leaves the list and every store
344
+ * and stand.
345
+ *
346
+ * @param {FiveOneEat.business.commerce.DeleteProductsRequest} request
347
+ * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
348
+ *
349
+ * @throws {@link FiveOneEat.UnauthorizedError}
350
+ * @throws {@link FiveOneEat.ForbiddenError}
351
+ * @throws {@link FiveOneEat.NotFoundError}
352
+ *
353
+ * @example
354
+ * await client.business.commerce.products.delete({
355
+ * product: "product"
356
+ * })
357
+ */
358
+ delete(request, requestOptions) {
359
+ return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
360
+ }
361
+ __delete(request, requestOptions) {
362
+ return __awaiter(this, void 0, void 0, function* () {
363
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
364
+ const { product } = request;
365
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
366
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
367
+ const _response = yield core.fetcher({
368
+ 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, `business/commerce/products/${core.url.encodePathParam(product)}`),
369
+ method: "DELETE",
370
+ headers: _headers,
371
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
372
+ 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,
373
+ 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,
374
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
375
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
376
+ logging: this._options.logging,
377
+ });
378
+ if (_response.ok) {
379
+ return { data: undefined, rawResponse: _response.rawResponse };
380
+ }
381
+ if (_response.error.reason === "status-code") {
382
+ switch (_response.error.statusCode) {
383
+ case 401:
384
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
385
+ case 403:
386
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
387
+ case 404:
388
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
389
+ default:
390
+ throw new errors.FiveOneEatError({
391
+ statusCode: _response.error.statusCode,
392
+ body: _response.error.body,
393
+ rawResponse: _response.rawResponse,
394
+ });
395
+ }
396
+ }
397
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/business/commerce/products/{product}");
398
+ });
399
+ }
400
+ }
401
+ exports.ProductsClient = ProductsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * product: "product"
5
+ * }
6
+ */
7
+ export interface DeleteProductsRequest {
8
+ /** The product ID */
9
+ product: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * product: "product"
5
+ * }
6
+ */
7
+ export interface GetProductsRequest {
8
+ /** The product ID */
9
+ product: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface ListProductsRequest {
6
+ /** Only products whose name contains it, any case. */
7
+ search?: string | null;
8
+ /** Only products offered at this store or stand, either way of buying. */
9
+ location?: string | null;
10
+ /** Only products filed in this category. */
11
+ category?: string | null;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });