@51eat/sdk 2.0.0 → 2.2.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 (584) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/client/Client.d.ts +0 -3
  3. package/dist/cjs/api/resources/business/client/Client.js +14 -19
  4. package/dist/cjs/api/resources/business/resources/commerce/client/Client.d.ts +18 -0
  5. package/dist/cjs/api/resources/business/resources/commerce/client/Client.js +36 -6
  6. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/client/Client.d.ts +30 -0
  7. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/client/Client.js +116 -0
  8. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/exports.d.ts +2 -0
  9. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/exports.js +21 -0
  10. package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.js +1 -0
  12. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/types/GetOptionsCatalogResponse.d.ts +4 -0
  13. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/types/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/types/index.js +17 -0
  15. package/dist/cjs/api/resources/business/resources/commerce/resources/index.d.ts +18 -0
  16. package/dist/cjs/api/resources/business/resources/commerce/resources/index.js +19 -1
  17. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.d.ts +340 -1
  18. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.js +1030 -1
  19. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/index.d.ts +1 -1
  20. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/index.js +15 -0
  21. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.d.ts +10 -0
  22. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.d.ts +10 -0
  23. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.js +3 -0
  24. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.d.ts +10 -0
  25. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.js +3 -0
  26. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.d.ts +10 -0
  27. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.js +3 -0
  28. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.d.ts +10 -0
  29. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.js +3 -0
  30. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.d.ts +10 -0
  31. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.js +3 -0
  32. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetProductsLocationsRequest.d.ts +10 -0
  33. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetProductsLocationsRequest.js +3 -0
  34. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.d.ts +10 -0
  35. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.js +3 -0
  36. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.d.ts +52 -0
  37. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.js +3 -0
  38. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.d.ts +12 -0
  39. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.js +3 -0
  40. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.d.ts +15 -0
  41. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.js +3 -0
  42. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.d.ts +68 -0
  43. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.js +38 -0
  44. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.d.ts +30 -0
  45. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.js +3 -0
  46. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.d.ts +46 -0
  47. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.js +3 -0
  48. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.d.ts +52 -0
  49. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.js +3 -0
  50. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.ts +15 -0
  51. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.js +5 -0
  52. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.d.ts +4 -0
  53. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.js +3 -0
  54. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.d.ts +4 -0
  55. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.js +3 -0
  56. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.d.ts +9 -0
  57. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.js +3 -0
  58. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.d.ts +4 -0
  59. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.js +3 -0
  60. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.d.ts +4 -0
  61. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.js +3 -0
  62. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.d.ts +4 -0
  63. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.js +3 -0
  64. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.d.ts +4 -0
  65. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.js +3 -0
  66. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ListLocationsResponse.d.ts +1 -0
  67. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.d.ts +8 -0
  68. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.js +3 -0
  69. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.d.ts +15 -0
  70. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.js +3 -0
  71. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.d.ts +4 -0
  72. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.js +3 -0
  73. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.d.ts +4 -0
  74. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.js +3 -0
  75. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.d.ts +4 -0
  76. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.js +3 -0
  77. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.d.ts +4 -0
  78. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.js +3 -0
  79. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.d.ts +4 -0
  80. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.js +3 -0
  81. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.d.ts +14 -0
  82. package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.js +14 -0
  83. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/Client.d.ts +80 -0
  84. package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/Client.js +142 -49
  85. package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/requests/DeleteProductCategoriesRequest.d.ts +1 -0
  86. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/DeleteProductCategoriesRequest.js +3 -0
  87. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.d.ts +14 -0
  88. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.js +3 -0
  89. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.ts +14 -0
  90. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.js +3 -0
  91. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.d.ts +3 -0
  92. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.js +2 -0
  93. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/index.d.ts +2 -0
  94. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/index.js +18 -0
  95. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.d.ts +4 -0
  96. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.js +3 -0
  97. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.d.ts +4 -0
  98. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.js +3 -0
  99. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.d.ts +4 -0
  100. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.js +3 -0
  101. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/index.d.ts +3 -0
  102. package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/index.js +19 -0
  103. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/Client.d.ts +92 -0
  104. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/Client.js +338 -0
  105. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/index.d.ts +1 -0
  106. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/index.js +17 -0
  107. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.d.ts +13 -0
  108. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.js +3 -0
  109. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.d.ts +24 -0
  110. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.js +3 -0
  111. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.d.ts +18 -0
  112. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.js +3 -0
  113. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.d.ts +14 -0
  114. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.js +3 -0
  115. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/index.d.ts +4 -0
  116. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/index.js +2 -0
  117. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/exports.d.ts +2 -0
  118. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/exports.js +21 -0
  119. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/index.d.ts +2 -0
  120. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/index.js +18 -0
  121. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.d.ts +4 -0
  122. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.js +3 -0
  123. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.d.ts +4 -0
  124. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.js +3 -0
  125. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.d.ts +4 -0
  126. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.js +3 -0
  127. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/index.d.ts +3 -0
  128. package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/index.js +19 -0
  129. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/Client.d.ts +114 -0
  130. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/Client.js +401 -0
  131. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/index.d.ts +1 -0
  132. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/index.js +17 -0
  133. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.d.ts +10 -0
  134. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.js +3 -0
  135. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.d.ts +10 -0
  136. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.js +3 -0
  137. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.d.ts +12 -0
  138. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.js +3 -0
  139. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.d.ts +49 -0
  140. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.js +17 -0
  141. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.d.ts +36 -0
  142. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.js +17 -0
  143. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/index.d.ts +5 -0
  144. package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/index.js +7 -0
  145. package/dist/cjs/api/resources/business/resources/commerce/resources/products/exports.d.ts +2 -0
  146. package/dist/cjs/api/resources/business/resources/commerce/resources/products/exports.js +21 -0
  147. package/dist/cjs/api/resources/business/resources/commerce/resources/products/index.d.ts +2 -0
  148. package/dist/cjs/api/resources/business/resources/commerce/resources/products/index.js +18 -0
  149. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.d.ts +8 -0
  150. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.js +3 -0
  151. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.d.ts +8 -0
  152. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.js +3 -0
  153. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.d.ts +44 -0
  154. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.js +3 -0
  155. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.d.ts +8 -0
  156. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.js +3 -0
  157. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/index.d.ts +4 -0
  158. package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/index.js +20 -0
  159. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/Client.d.ts +104 -0
  160. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/Client.js +380 -0
  161. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/index.d.ts +1 -0
  162. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/index.js +17 -0
  163. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.d.ts +12 -0
  164. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.js +3 -0
  165. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.d.ts +12 -0
  166. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.js +3 -0
  167. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.d.ts +9 -0
  168. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.js +3 -0
  169. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/index.d.ts +3 -0
  170. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/index.js +2 -0
  171. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/exports.d.ts +2 -0
  172. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/exports.js +21 -0
  173. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/index.d.ts +2 -0
  174. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/index.js +18 -0
  175. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.d.ts +4 -0
  176. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.js +3 -0
  177. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.d.ts +4 -0
  178. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.js +3 -0
  179. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.d.ts +4 -0
  180. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.js +3 -0
  181. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.d.ts +4 -0
  182. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.js +3 -0
  183. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.d.ts +4 -0
  184. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.js +3 -0
  185. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/index.d.ts +5 -0
  186. package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/index.js +21 -0
  187. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/Client.d.ts +163 -0
  188. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/Client.js +537 -0
  189. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/index.d.ts +1 -0
  190. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/index.js +17 -0
  191. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.d.ts +13 -0
  192. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.js +3 -0
  193. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.d.ts +13 -0
  194. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.js +3 -0
  195. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.d.ts +13 -0
  196. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.js +3 -0
  197. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.d.ts +10 -0
  198. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.js +3 -0
  199. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.d.ts +16 -0
  200. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.js +3 -0
  201. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.d.ts +54 -0
  202. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.js +17 -0
  203. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.d.ts +46 -0
  204. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.js +17 -0
  205. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/index.d.ts +7 -0
  206. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/index.js +7 -0
  207. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/exports.d.ts +2 -0
  208. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/exports.js +21 -0
  209. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/index.d.ts +2 -0
  210. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/index.js +18 -0
  211. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.d.ts +4 -0
  212. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.js +3 -0
  213. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.d.ts +8 -0
  214. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.js +3 -0
  215. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.d.ts +6 -0
  216. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.js +3 -0
  217. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.d.ts +4 -0
  218. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.js +3 -0
  219. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.d.ts +4 -0
  220. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.js +3 -0
  221. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.d.ts +8 -0
  222. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.js +3 -0
  223. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/index.d.ts +6 -0
  224. package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/index.js +22 -0
  225. package/dist/cjs/api/resources/business/resources/index.d.ts +0 -2
  226. package/dist/cjs/api/resources/business/resources/index.js +1 -3
  227. package/dist/cjs/api/resources/commerce/resources/carts/resources/lines/client/Client.d.ts +9 -5
  228. package/dist/cjs/api/resources/commerce/resources/carts/resources/lines/client/Client.js +9 -5
  229. package/dist/cjs/api/types/BusinessCommerceLocation.d.ts +37 -3
  230. package/dist/cjs/api/types/BusinessEvent.d.ts +2 -0
  231. package/dist/cjs/api/types/BusinessLocation.d.ts +29 -0
  232. package/dist/cjs/api/types/BusinessLocation.js +11 -0
  233. package/dist/cjs/api/types/BusinessLocationDetails.d.ts +36 -0
  234. package/dist/cjs/api/types/BusinessLocationDetails.js +11 -0
  235. package/dist/cjs/api/types/BusinessLocationHourException.d.ts +14 -0
  236. package/dist/cjs/api/types/BusinessLocationHourException.js +3 -0
  237. package/dist/cjs/api/types/BusinessLocationOpeningHours.d.ts +17 -0
  238. package/dist/cjs/api/types/BusinessLocationOpeningHours.js +3 -0
  239. package/dist/cjs/api/types/BusinessLocationPickup.d.ts +25 -0
  240. package/dist/cjs/api/types/BusinessLocationPickup.js +14 -0
  241. package/dist/cjs/api/types/BusinessOpeningHourSlot.d.ts +10 -0
  242. package/dist/cjs/api/types/BusinessOpeningHourSlot.js +3 -0
  243. package/dist/cjs/api/types/BusinessPickupSchedule.d.ts +10 -0
  244. package/dist/cjs/api/types/BusinessPickupSchedule.js +3 -0
  245. package/dist/cjs/api/types/BusinessPickupWindow.d.ts +11 -0
  246. package/dist/cjs/api/types/BusinessPickupWindow.js +3 -0
  247. package/dist/cjs/api/types/BusinessSellerTerms.d.ts +10 -0
  248. package/dist/cjs/api/types/BusinessSellerTerms.js +3 -0
  249. package/dist/cjs/api/types/BusinessSelling.d.ts +61 -0
  250. package/dist/cjs/api/types/BusinessSelling.js +16 -0
  251. package/dist/cjs/api/types/Cart.d.ts +1 -1
  252. package/dist/cjs/api/types/CatalogFormOptionsResource.d.ts +87 -0
  253. package/dist/cjs/api/types/CatalogFormOptionsResource.js +17 -0
  254. package/dist/cjs/api/types/CustomerEvent.d.ts +6 -0
  255. package/dist/cjs/api/types/CustomerEventDetail.d.ts +6 -0
  256. package/dist/cjs/api/types/CustomerEventTicketType.d.ts +7 -0
  257. package/dist/cjs/api/types/EventFeedItem.d.ts +6 -0
  258. package/dist/cjs/api/types/ImageResource.d.ts +7 -0
  259. package/dist/cjs/api/types/ImageResource.js +3 -0
  260. package/dist/cjs/api/types/LocationKind.d.ts +12 -0
  261. package/dist/cjs/api/types/LocationKind.js +15 -0
  262. package/dist/cjs/api/types/LocationProductsResource.d.ts +42 -0
  263. package/dist/cjs/api/types/LocationProductsResource.js +19 -0
  264. package/dist/cjs/api/types/ProductCategoryResource.d.ts +4 -0
  265. package/dist/cjs/api/types/ProductResource.d.ts +41 -0
  266. package/dist/cjs/api/types/ProductResource.js +18 -0
  267. package/dist/cjs/api/types/Unit.d.ts +16 -0
  268. package/dist/cjs/api/types/Unit.js +19 -0
  269. package/dist/cjs/api/types/UpdateLocationRequest.d.ts +7 -0
  270. package/dist/cjs/api/types/UpdateLocationRequest.js +3 -0
  271. package/dist/cjs/api/types/VariantInventoryLevelResource.d.ts +9 -0
  272. package/dist/cjs/api/types/VariantInventoryLevelResource.js +3 -0
  273. package/dist/cjs/api/types/VariantResource.d.ts +26 -0
  274. package/dist/cjs/api/types/VariantResource.js +3 -0
  275. package/dist/cjs/api/types/VariantStockLocationResource.d.ts +15 -0
  276. package/dist/cjs/api/types/VariantStockLocationResource.js +11 -0
  277. package/dist/cjs/api/types/index.d.ts +20 -0
  278. package/dist/cjs/api/types/index.js +20 -0
  279. package/dist/cjs/version.d.ts +1 -1
  280. package/dist/cjs/version.js +1 -1
  281. package/dist/esm/BaseClient.mjs +2 -2
  282. package/dist/esm/api/resources/business/client/Client.d.mts +0 -3
  283. package/dist/esm/api/resources/business/client/Client.mjs +0 -5
  284. package/dist/esm/api/resources/business/resources/commerce/client/Client.d.mts +18 -0
  285. package/dist/esm/api/resources/business/resources/commerce/client/Client.mjs +30 -0
  286. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/Client.d.mts +30 -0
  287. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/Client.mjs +79 -0
  288. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/index.d.mts +1 -0
  289. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/index.mjs +1 -0
  290. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/exports.d.mts +2 -0
  291. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/exports.mjs +3 -0
  292. package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.d.mts +1 -0
  293. package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.mjs +1 -0
  294. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/GetOptionsCatalogResponse.d.mts +4 -0
  295. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/index.d.mts +1 -0
  296. package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/index.mjs +1 -0
  297. package/dist/esm/api/resources/business/resources/commerce/resources/index.d.mts +18 -0
  298. package/dist/esm/api/resources/business/resources/commerce/resources/index.mjs +18 -0
  299. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.d.mts +340 -1
  300. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.mjs +1031 -2
  301. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/index.d.mts +1 -1
  302. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/index.mjs +1 -1
  303. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.d.mts +10 -0
  304. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.d.mts +10 -0
  305. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.mjs +2 -0
  306. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.d.mts +10 -0
  307. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.mjs +2 -0
  308. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.d.mts +10 -0
  309. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.mjs +2 -0
  310. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.d.mts +10 -0
  311. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.mjs +2 -0
  312. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.d.mts +10 -0
  313. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.mjs +2 -0
  314. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetProductsLocationsRequest.d.mts +10 -0
  315. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetProductsLocationsRequest.mjs +2 -0
  316. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.d.mts +10 -0
  317. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.mjs +2 -0
  318. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.d.mts +52 -0
  319. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.mjs +2 -0
  320. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.d.mts +12 -0
  321. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.mjs +2 -0
  322. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.d.mts +15 -0
  323. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.mjs +2 -0
  324. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.d.mts +68 -0
  325. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.mjs +35 -0
  326. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.d.mts +30 -0
  327. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.mjs +2 -0
  328. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.d.mts +46 -0
  329. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.mjs +2 -0
  330. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.d.mts +52 -0
  331. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.mjs +2 -0
  332. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.mts +15 -0
  333. package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.mjs +1 -0
  334. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.d.mts +4 -0
  335. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.mjs +2 -0
  336. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.d.mts +4 -0
  337. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.mjs +2 -0
  338. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.d.mts +9 -0
  339. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.mjs +2 -0
  340. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.d.mts +4 -0
  341. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.mjs +2 -0
  342. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.d.mts +4 -0
  343. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.mjs +2 -0
  344. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.d.mts +4 -0
  345. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.mjs +2 -0
  346. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.d.mts +4 -0
  347. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.mjs +2 -0
  348. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ListLocationsResponse.d.mts +1 -0
  349. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.d.mts +8 -0
  350. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.mjs +2 -0
  351. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.d.mts +15 -0
  352. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.mjs +2 -0
  353. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.d.mts +4 -0
  354. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.mjs +2 -0
  355. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.d.mts +4 -0
  356. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.mjs +2 -0
  357. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.d.mts +4 -0
  358. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.mjs +2 -0
  359. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.d.mts +4 -0
  360. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.mjs +2 -0
  361. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.d.mts +4 -0
  362. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.mjs +2 -0
  363. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.d.mts +14 -0
  364. package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.mjs +14 -0
  365. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/Client.d.mts +80 -0
  366. package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/Client.mjs +142 -49
  367. package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/requests/DeleteProductCategoriesRequest.d.mts +1 -0
  368. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/DeleteProductCategoriesRequest.mjs +2 -0
  369. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.d.mts +14 -0
  370. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.mjs +2 -0
  371. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.mts +14 -0
  372. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.mjs +2 -0
  373. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.d.mts +3 -0
  374. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.mjs +1 -0
  375. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/index.d.mts +2 -0
  376. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/index.mjs +2 -0
  377. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.d.mts +4 -0
  378. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.mjs +2 -0
  379. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.d.mts +4 -0
  380. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.mjs +2 -0
  381. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.d.mts +4 -0
  382. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.mjs +2 -0
  383. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/index.d.mts +3 -0
  384. package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/index.mjs +3 -0
  385. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/Client.d.mts +92 -0
  386. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/Client.mjs +301 -0
  387. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/index.d.mts +1 -0
  388. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/index.mjs +1 -0
  389. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.d.mts +13 -0
  390. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.mjs +2 -0
  391. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.d.mts +24 -0
  392. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.mjs +2 -0
  393. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.d.mts +18 -0
  394. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.mjs +2 -0
  395. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.d.mts +14 -0
  396. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.mjs +2 -0
  397. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/index.d.mts +4 -0
  398. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/index.mjs +1 -0
  399. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/exports.d.mts +2 -0
  400. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/exports.mjs +3 -0
  401. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/index.d.mts +2 -0
  402. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/index.mjs +2 -0
  403. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.d.mts +4 -0
  404. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.mjs +2 -0
  405. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.d.mts +4 -0
  406. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.mjs +2 -0
  407. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.d.mts +4 -0
  408. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.mjs +2 -0
  409. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/index.d.mts +3 -0
  410. package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/index.mjs +3 -0
  411. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.d.mts +114 -0
  412. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.mjs +364 -0
  413. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.d.mts +1 -0
  414. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.mjs +1 -0
  415. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.d.mts +10 -0
  416. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.mjs +2 -0
  417. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.d.mts +10 -0
  418. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.mjs +2 -0
  419. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.d.mts +12 -0
  420. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.mjs +2 -0
  421. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.d.mts +49 -0
  422. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.mjs +14 -0
  423. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.d.mts +36 -0
  424. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.mjs +14 -0
  425. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/index.d.mts +5 -0
  426. package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/index.mjs +2 -0
  427. package/dist/esm/api/resources/business/resources/commerce/resources/products/exports.d.mts +2 -0
  428. package/dist/esm/api/resources/business/resources/commerce/resources/products/exports.mjs +3 -0
  429. package/dist/esm/api/resources/business/resources/commerce/resources/products/index.d.mts +2 -0
  430. package/dist/esm/api/resources/business/resources/commerce/resources/products/index.mjs +2 -0
  431. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.d.mts +8 -0
  432. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.mjs +2 -0
  433. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.d.mts +8 -0
  434. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.mjs +2 -0
  435. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.d.mts +44 -0
  436. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.mjs +2 -0
  437. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.d.mts +8 -0
  438. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.mjs +2 -0
  439. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/index.d.mts +4 -0
  440. package/dist/esm/api/resources/business/resources/commerce/resources/products/types/index.mjs +4 -0
  441. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/Client.d.mts +104 -0
  442. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/Client.mjs +343 -0
  443. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/index.d.mts +1 -0
  444. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/index.mjs +1 -0
  445. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.d.mts +12 -0
  446. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.mjs +2 -0
  447. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.d.mts +12 -0
  448. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.mjs +2 -0
  449. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.d.mts +9 -0
  450. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.mjs +2 -0
  451. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/index.d.mts +3 -0
  452. package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/index.mjs +1 -0
  453. package/dist/esm/api/resources/business/resources/commerce/resources/selling/exports.d.mts +2 -0
  454. package/dist/esm/api/resources/business/resources/commerce/resources/selling/exports.mjs +3 -0
  455. package/dist/esm/api/resources/business/resources/commerce/resources/selling/index.d.mts +2 -0
  456. package/dist/esm/api/resources/business/resources/commerce/resources/selling/index.mjs +2 -0
  457. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.d.mts +4 -0
  458. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.mjs +2 -0
  459. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.d.mts +4 -0
  460. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.mjs +2 -0
  461. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.d.mts +4 -0
  462. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.mjs +2 -0
  463. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.d.mts +4 -0
  464. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.mjs +2 -0
  465. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.d.mts +4 -0
  466. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.mjs +2 -0
  467. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/index.d.mts +5 -0
  468. package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/index.mjs +5 -0
  469. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/Client.d.mts +163 -0
  470. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/Client.mjs +500 -0
  471. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/index.d.mts +1 -0
  472. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/index.mjs +1 -0
  473. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.d.mts +13 -0
  474. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.mjs +2 -0
  475. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.d.mts +13 -0
  476. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.mjs +2 -0
  477. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.d.mts +13 -0
  478. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.mjs +2 -0
  479. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.d.mts +10 -0
  480. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.mjs +2 -0
  481. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.d.mts +16 -0
  482. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.mjs +2 -0
  483. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.d.mts +54 -0
  484. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.mjs +14 -0
  485. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.d.mts +46 -0
  486. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.mjs +14 -0
  487. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/index.d.mts +7 -0
  488. package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/index.mjs +2 -0
  489. package/dist/esm/api/resources/business/resources/commerce/resources/variants/exports.d.mts +2 -0
  490. package/dist/esm/api/resources/business/resources/commerce/resources/variants/exports.mjs +3 -0
  491. package/dist/esm/api/resources/business/resources/commerce/resources/variants/index.d.mts +2 -0
  492. package/dist/esm/api/resources/business/resources/commerce/resources/variants/index.mjs +2 -0
  493. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.d.mts +4 -0
  494. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.mjs +2 -0
  495. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.d.mts +8 -0
  496. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.mjs +2 -0
  497. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.d.mts +6 -0
  498. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.mjs +2 -0
  499. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.d.mts +4 -0
  500. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.mjs +2 -0
  501. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.d.mts +4 -0
  502. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.mjs +2 -0
  503. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.d.mts +8 -0
  504. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.mjs +2 -0
  505. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/index.d.mts +6 -0
  506. package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/index.mjs +6 -0
  507. package/dist/esm/api/resources/business/resources/index.d.mts +0 -2
  508. package/dist/esm/api/resources/business/resources/index.mjs +0 -2
  509. package/dist/esm/api/resources/commerce/resources/carts/resources/lines/client/Client.d.mts +9 -5
  510. package/dist/esm/api/resources/commerce/resources/carts/resources/lines/client/Client.mjs +9 -5
  511. package/dist/esm/api/types/BusinessCommerceLocation.d.mts +37 -3
  512. package/dist/esm/api/types/BusinessEvent.d.mts +2 -0
  513. package/dist/esm/api/types/BusinessLocation.d.mts +29 -0
  514. package/dist/esm/api/types/BusinessLocation.mjs +8 -0
  515. package/dist/esm/api/types/BusinessLocationDetails.d.mts +36 -0
  516. package/dist/esm/api/types/BusinessLocationDetails.mjs +8 -0
  517. package/dist/esm/api/types/BusinessLocationHourException.d.mts +14 -0
  518. package/dist/esm/api/types/BusinessLocationHourException.mjs +2 -0
  519. package/dist/esm/api/types/BusinessLocationOpeningHours.d.mts +17 -0
  520. package/dist/esm/api/types/BusinessLocationOpeningHours.mjs +2 -0
  521. package/dist/esm/api/types/BusinessLocationPickup.d.mts +25 -0
  522. package/dist/esm/api/types/BusinessLocationPickup.mjs +11 -0
  523. package/dist/esm/api/types/BusinessOpeningHourSlot.d.mts +10 -0
  524. package/dist/esm/api/types/BusinessOpeningHourSlot.mjs +2 -0
  525. package/dist/esm/api/types/BusinessPickupSchedule.d.mts +10 -0
  526. package/dist/esm/api/types/BusinessPickupSchedule.mjs +2 -0
  527. package/dist/esm/api/types/BusinessPickupWindow.d.mts +11 -0
  528. package/dist/esm/api/types/BusinessPickupWindow.mjs +2 -0
  529. package/dist/esm/api/types/BusinessSellerTerms.d.mts +10 -0
  530. package/dist/esm/api/types/BusinessSellerTerms.mjs +2 -0
  531. package/dist/esm/api/types/BusinessSelling.d.mts +61 -0
  532. package/dist/esm/api/types/BusinessSelling.mjs +13 -0
  533. package/dist/esm/api/types/Cart.d.mts +1 -1
  534. package/dist/esm/api/types/CatalogFormOptionsResource.d.mts +87 -0
  535. package/dist/esm/api/types/CatalogFormOptionsResource.mjs +14 -0
  536. package/dist/esm/api/types/CustomerEvent.d.mts +6 -0
  537. package/dist/esm/api/types/CustomerEventDetail.d.mts +6 -0
  538. package/dist/esm/api/types/CustomerEventTicketType.d.mts +7 -0
  539. package/dist/esm/api/types/EventFeedItem.d.mts +6 -0
  540. package/dist/esm/api/types/ImageResource.d.mts +7 -0
  541. package/dist/esm/api/types/ImageResource.mjs +2 -0
  542. package/dist/esm/api/types/LocationKind.d.mts +12 -0
  543. package/dist/esm/api/types/LocationKind.mjs +12 -0
  544. package/dist/esm/api/types/LocationProductsResource.d.mts +42 -0
  545. package/dist/esm/api/types/LocationProductsResource.mjs +16 -0
  546. package/dist/esm/api/types/ProductCategoryResource.d.mts +4 -0
  547. package/dist/esm/api/types/ProductResource.d.mts +41 -0
  548. package/dist/esm/api/types/ProductResource.mjs +15 -0
  549. package/dist/esm/api/types/Unit.d.mts +16 -0
  550. package/dist/esm/api/types/Unit.mjs +16 -0
  551. package/dist/esm/api/types/UpdateLocationRequest.d.mts +7 -0
  552. package/dist/esm/api/types/UpdateLocationRequest.mjs +2 -0
  553. package/dist/esm/api/types/VariantInventoryLevelResource.d.mts +9 -0
  554. package/dist/esm/api/types/VariantInventoryLevelResource.mjs +2 -0
  555. package/dist/esm/api/types/VariantResource.d.mts +26 -0
  556. package/dist/esm/api/types/VariantResource.mjs +2 -0
  557. package/dist/esm/api/types/VariantStockLocationResource.d.mts +15 -0
  558. package/dist/esm/api/types/VariantStockLocationResource.mjs +8 -0
  559. package/dist/esm/api/types/index.d.mts +20 -0
  560. package/dist/esm/api/types/index.mjs +20 -0
  561. package/dist/esm/version.d.mts +1 -1
  562. package/dist/esm/version.mjs +1 -1
  563. package/package.json +67 -12
  564. package/reference.md +2688 -155
  565. package/dist/cjs/api/resources/business/resources/productCategories/client/Client.d.ts +0 -51
  566. package/dist/cjs/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoriesRequest.d.ts +0 -9
  567. package/dist/cjs/api/resources/business/resources/productCategories/client/requests/index.d.ts +0 -2
  568. package/dist/esm/api/resources/business/resources/productCategories/client/Client.d.mts +0 -51
  569. package/dist/esm/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoriesRequest.d.mts +0 -9
  570. package/dist/esm/api/resources/business/resources/productCategories/client/requests/index.d.mts +0 -2
  571. /package/dist/{esm/api/resources/business/resources/productCategories/client/requests/index.mjs → cjs/api/resources/business/resources/commerce/resources/catalog/client/index.d.ts} +0 -0
  572. /package/dist/cjs/api/resources/business/resources/{productCategories/client/requests → commerce/resources/catalog/client}/index.js +0 -0
  573. /package/dist/cjs/api/resources/business/resources/{productCategories/client/requests/DeleteProductCategoriesRequest.js → commerce/resources/catalog/types/GetOptionsCatalogResponse.js} +0 -0
  574. /package/dist/cjs/api/resources/business/resources/{productCategories/client/requests/UpdateProductCategoriesRequest.js → commerce/resources/locations/client/requests/ArchiveLocationsRequest.js} +0 -0
  575. /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.d.ts +0 -0
  576. /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.js +0 -0
  577. /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.d.ts +0 -0
  578. /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.js +0 -0
  579. /package/dist/esm/api/resources/business/resources/{productCategories/client/requests/DeleteProductCategoriesRequest.mjs → commerce/resources/catalog/types/GetOptionsCatalogResponse.mjs} +0 -0
  580. /package/dist/esm/api/resources/business/resources/{productCategories/client/requests/UpdateProductCategoriesRequest.mjs → commerce/resources/locations/client/requests/ArchiveLocationsRequest.mjs} +0 -0
  581. /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.d.mts +0 -0
  582. /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.mjs +0 -0
  583. /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.d.mts +0 -0
  584. /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.mjs +0 -0
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
43
43
  });
44
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
+ };
45
56
  Object.defineProperty(exports, "__esModule", { value: true });
46
57
  exports.LocationsClient = void 0;
47
58
  const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
@@ -58,7 +69,9 @@ class LocationsClient {
58
69
  /**
59
70
  * Every store and stand of the business, main store first and then by
60
71
  * name, including ones switched off, blocked by the plan or archived.
61
- * For the order list's store filter and the stock screen.
72
+ * Each carries why it can't sell yet (`blocker`) and its open pickup
73
+ * orders still to come (`affected_orders`), the same as the web's list.
74
+ * `can_add_store` says whether the plan has room for another store.
62
75
  *
63
76
  * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
64
77
  *
@@ -110,5 +123,1021 @@ class LocationsClient {
110
123
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/locations");
111
124
  });
112
125
  }
126
+ /**
127
+ * Answers 201. `kind` is `store` or `stand`. A Free plan has one store,
128
+ * the main one: a second is refused with a form error on `kind`.
129
+ *
130
+ * @param {FiveOneEat.business.commerce.StoreLocationRequest} request
131
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
132
+ *
133
+ * @throws {@link FiveOneEat.UnauthorizedError}
134
+ * @throws {@link FiveOneEat.ForbiddenError}
135
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
136
+ *
137
+ * @example
138
+ * await client.business.commerce.locations.create({
139
+ * "Idempotency-Key": "Idempotency-Key",
140
+ * kind: "store",
141
+ * name: "name",
142
+ * address: "address",
143
+ * city: "city",
144
+ * state: "state",
145
+ * zipcode: "zipcode",
146
+ * country: "country",
147
+ * timezone: "America/Adak"
148
+ * })
149
+ */
150
+ create(request, requestOptions) {
151
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
152
+ }
153
+ __create(request, requestOptions) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
156
+ const { "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["Idempotency-Key"]);
157
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
158
+ 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);
159
+ const _response = yield core.fetcher({
160
+ 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/locations"),
161
+ method: "POST",
162
+ headers: _headers,
163
+ contentType: "application/json",
164
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
165
+ requestType: "json",
166
+ body: _body,
167
+ 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,
168
+ 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,
169
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
170
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
171
+ logging: this._options.logging,
172
+ });
173
+ if (_response.ok) {
174
+ return {
175
+ data: _response.body,
176
+ rawResponse: _response.rawResponse,
177
+ };
178
+ }
179
+ if (_response.error.reason === "status-code") {
180
+ switch (_response.error.statusCode) {
181
+ case 401:
182
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
183
+ case 403:
184
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
185
+ case 422:
186
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
187
+ default:
188
+ throw new errors.FiveOneEatError({
189
+ statusCode: _response.error.statusCode,
190
+ body: _response.error.body,
191
+ rawResponse: _response.rawResponse,
192
+ });
193
+ }
194
+ }
195
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/commerce/locations");
196
+ });
197
+ }
198
+ /**
199
+ * Every product of the business, by name, and the IDs of those sold here
200
+ * (`selected`): online, for pickup, at a store; in person at a stand
201
+ * (`channel`). `location.sells_this_way` is false while the location
202
+ * doesn't sell that way at all, and nothing can be added there.
203
+ *
204
+ * @param {FiveOneEat.business.commerce.GetProductsLocationsRequest} request
205
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
206
+ *
207
+ * @throws {@link FiveOneEat.UnauthorizedError}
208
+ * @throws {@link FiveOneEat.ForbiddenError}
209
+ * @throws {@link FiveOneEat.NotFoundError}
210
+ *
211
+ * @example
212
+ * await client.business.commerce.locations.getProducts({
213
+ * location: "location"
214
+ * })
215
+ */
216
+ getProducts(request, requestOptions) {
217
+ return core.HttpResponsePromise.fromPromise(this.__getProducts(request, requestOptions));
218
+ }
219
+ __getProducts(request, requestOptions) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
222
+ const { location } = request;
223
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
224
+ 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);
225
+ const _response = yield core.fetcher({
226
+ 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/locations/${core.url.encodePathParam(location)}/products`),
227
+ method: "GET",
228
+ headers: _headers,
229
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
230
+ 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,
231
+ 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,
232
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
233
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
234
+ logging: this._options.logging,
235
+ });
236
+ if (_response.ok) {
237
+ return {
238
+ data: _response.body,
239
+ rawResponse: _response.rawResponse,
240
+ };
241
+ }
242
+ if (_response.error.reason === "status-code") {
243
+ switch (_response.error.statusCode) {
244
+ case 401:
245
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
246
+ case 403:
247
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
248
+ case 404:
249
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
250
+ default:
251
+ throw new errors.FiveOneEatError({
252
+ statusCode: _response.error.statusCode,
253
+ body: _response.error.body,
254
+ rawResponse: _response.rawResponse,
255
+ });
256
+ }
257
+ }
258
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/locations/{location}/products");
259
+ });
260
+ }
261
+ /**
262
+ * Sells exactly `product_ids` here, the way the location sells; an empty
263
+ * list takes them all off. Each product's other stores and stands stay
264
+ * as they are. Saving replaces what is there, so a retry is safe.
265
+ * `active: true` switches the location on before adding, `active: false`
266
+ * off after taking off. A product added where the location can't sell it
267
+ * (switched off, archived, or not taking pickup orders or selling in
268
+ * person) is refused with a form error on `availability`, and one that
269
+ * isn't the business's on `product_ids.*`.
270
+ *
271
+ * @param {FiveOneEat.business.commerce.SetLocationProductsRequest} request
272
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
273
+ *
274
+ * @throws {@link FiveOneEat.UnauthorizedError}
275
+ * @throws {@link FiveOneEat.ForbiddenError}
276
+ * @throws {@link FiveOneEat.NotFoundError}
277
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
278
+ *
279
+ * @example
280
+ * await client.business.commerce.locations.setProducts({
281
+ * location: "location",
282
+ * product_ids: ["product_ids"]
283
+ * })
284
+ */
285
+ setProducts(request, requestOptions) {
286
+ return core.HttpResponsePromise.fromPromise(this.__setProducts(request, requestOptions));
287
+ }
288
+ __setProducts(request, requestOptions) {
289
+ return __awaiter(this, void 0, void 0, function* () {
290
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
291
+ const { location } = request, _body = __rest(request, ["location"]);
292
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
293
+ 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);
294
+ const _response = yield core.fetcher({
295
+ 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/locations/${core.url.encodePathParam(location)}/products`),
296
+ method: "PUT",
297
+ headers: _headers,
298
+ contentType: "application/json",
299
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
300
+ requestType: "json",
301
+ body: _body,
302
+ 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,
303
+ 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,
304
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
305
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
306
+ logging: this._options.logging,
307
+ });
308
+ if (_response.ok) {
309
+ return {
310
+ data: _response.body,
311
+ rawResponse: _response.rawResponse,
312
+ };
313
+ }
314
+ if (_response.error.reason === "status-code") {
315
+ switch (_response.error.statusCode) {
316
+ case 401:
317
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
318
+ case 403:
319
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
320
+ case 404:
321
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
322
+ case 422:
323
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
324
+ default:
325
+ throw new errors.FiveOneEatError({
326
+ statusCode: _response.error.statusCode,
327
+ body: _response.error.body,
328
+ rawResponse: _response.rawResponse,
329
+ });
330
+ }
331
+ }
332
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/commerce/locations/{location}/products");
333
+ });
334
+ }
335
+ /**
336
+ * @param {FiveOneEat.business.commerce.GetLocationsRequest} request
337
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
338
+ *
339
+ * @throws {@link FiveOneEat.UnauthorizedError}
340
+ * @throws {@link FiveOneEat.ForbiddenError}
341
+ * @throws {@link FiveOneEat.NotFoundError}
342
+ *
343
+ * @example
344
+ * await client.business.commerce.locations.get({
345
+ * location: "location"
346
+ * })
347
+ */
348
+ get(request, requestOptions) {
349
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
350
+ }
351
+ __get(request, requestOptions) {
352
+ return __awaiter(this, void 0, void 0, function* () {
353
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
354
+ const { location } = request;
355
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
356
+ 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);
357
+ const _response = yield core.fetcher({
358
+ 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/locations/${core.url.encodePathParam(location)}`),
359
+ method: "GET",
360
+ headers: _headers,
361
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
362
+ 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,
363
+ 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,
364
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
365
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
366
+ logging: this._options.logging,
367
+ });
368
+ if (_response.ok) {
369
+ return {
370
+ data: _response.body,
371
+ rawResponse: _response.rawResponse,
372
+ };
373
+ }
374
+ if (_response.error.reason === "status-code") {
375
+ switch (_response.error.statusCode) {
376
+ case 401:
377
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
378
+ case 403:
379
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
380
+ case 404:
381
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
382
+ default:
383
+ throw new errors.FiveOneEatError({
384
+ statusCode: _response.error.statusCode,
385
+ body: _response.error.body,
386
+ rawResponse: _response.rawResponse,
387
+ });
388
+ }
389
+ }
390
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/locations/{location}");
391
+ });
392
+ }
393
+ /**
394
+ * The main store saves only its `name`: its address, timezone and phone
395
+ * are the business's, and any of those sent for it are ignored. An extra
396
+ * store or a stand needs its address, city, state, zipcode and timezone
397
+ * as well (422 on the one missing), and keeps every field it is sent
398
+ * as its new value, so send the whole form.
399
+ * `CommerceRequestBodiesDocumentedTest` keeps the fields below in step
400
+ * with `StoreLocationRequest::detailRules()`.
401
+ *
402
+ * @param {FiveOneEat.business.commerce.UpdateLocationsRequest} request
403
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
404
+ *
405
+ * @throws {@link FiveOneEat.UnauthorizedError}
406
+ * @throws {@link FiveOneEat.ForbiddenError}
407
+ * @throws {@link FiveOneEat.NotFoundError}
408
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
409
+ *
410
+ * @example
411
+ * await client.business.commerce.locations.update({
412
+ * location: "location",
413
+ * name: "name"
414
+ * })
415
+ */
416
+ update(request, requestOptions) {
417
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
418
+ }
419
+ __update(request, requestOptions) {
420
+ return __awaiter(this, void 0, void 0, function* () {
421
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
422
+ const { location } = request, _body = __rest(request, ["location"]);
423
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
424
+ 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);
425
+ const _response = yield core.fetcher({
426
+ 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/locations/${core.url.encodePathParam(location)}`),
427
+ method: "PUT",
428
+ headers: _headers,
429
+ contentType: "application/json",
430
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
431
+ requestType: "json",
432
+ body: _body,
433
+ 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,
434
+ 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,
435
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
436
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
437
+ logging: this._options.logging,
438
+ });
439
+ if (_response.ok) {
440
+ return {
441
+ data: _response.body,
442
+ rawResponse: _response.rawResponse,
443
+ };
444
+ }
445
+ if (_response.error.reason === "status-code") {
446
+ switch (_response.error.statusCode) {
447
+ case 401:
448
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
449
+ case 403:
450
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
451
+ case 404:
452
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
453
+ case 422:
454
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
455
+ default:
456
+ throw new errors.FiveOneEatError({
457
+ statusCode: _response.error.statusCode,
458
+ body: _response.error.body,
459
+ rawResponse: _response.rawResponse,
460
+ });
461
+ }
462
+ }
463
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/commerce/locations/{location}");
464
+ });
465
+ }
466
+ /**
467
+ * Only one that never sold anything and holds no stock: otherwise 409,
468
+ * and it is archived instead. The main store can't be deleted.
469
+ *
470
+ * @param {FiveOneEat.business.commerce.DeleteLocationsRequest} request
471
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
472
+ *
473
+ * @throws {@link FiveOneEat.UnauthorizedError}
474
+ * @throws {@link FiveOneEat.ForbiddenError}
475
+ * @throws {@link FiveOneEat.NotFoundError}
476
+ *
477
+ * @example
478
+ * await client.business.commerce.locations.delete({
479
+ * location: "location"
480
+ * })
481
+ */
482
+ delete(request, requestOptions) {
483
+ return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
484
+ }
485
+ __delete(request, requestOptions) {
486
+ return __awaiter(this, void 0, void 0, function* () {
487
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
488
+ const { location } = request;
489
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
490
+ 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);
491
+ const _response = yield core.fetcher({
492
+ 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/locations/${core.url.encodePathParam(location)}`),
493
+ method: "DELETE",
494
+ headers: _headers,
495
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
496
+ 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,
497
+ 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,
498
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
499
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
500
+ logging: this._options.logging,
501
+ });
502
+ if (_response.ok) {
503
+ return { data: _response.body, rawResponse: _response.rawResponse };
504
+ }
505
+ if (_response.error.reason === "status-code") {
506
+ switch (_response.error.statusCode) {
507
+ case 401:
508
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
509
+ case 403:
510
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
511
+ case 404:
512
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
513
+ default:
514
+ throw new errors.FiveOneEatError({
515
+ statusCode: _response.error.statusCode,
516
+ body: _response.error.body,
517
+ rawResponse: _response.rawResponse,
518
+ });
519
+ }
520
+ }
521
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/business/commerce/locations/{location}");
522
+ });
523
+ }
524
+ /**
525
+ * @param {FiveOneEat.business.commerce.SetLocationActiveRequest} request
526
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
527
+ *
528
+ * @throws {@link FiveOneEat.UnauthorizedError}
529
+ * @throws {@link FiveOneEat.ForbiddenError}
530
+ * @throws {@link FiveOneEat.NotFoundError}
531
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
532
+ *
533
+ * @example
534
+ * await client.business.commerce.locations.setActive({
535
+ * location: "location",
536
+ * active: true
537
+ * })
538
+ */
539
+ setActive(request, requestOptions) {
540
+ return core.HttpResponsePromise.fromPromise(this.__setActive(request, requestOptions));
541
+ }
542
+ __setActive(request, requestOptions) {
543
+ return __awaiter(this, void 0, void 0, function* () {
544
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
545
+ const { location } = request, _body = __rest(request, ["location"]);
546
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
547
+ 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);
548
+ const _response = yield core.fetcher({
549
+ 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/locations/${core.url.encodePathParam(location)}/active`),
550
+ method: "PATCH",
551
+ headers: _headers,
552
+ contentType: "application/json",
553
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
554
+ requestType: "json",
555
+ body: _body,
556
+ 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,
557
+ 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,
558
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
559
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
560
+ logging: this._options.logging,
561
+ });
562
+ if (_response.ok) {
563
+ return {
564
+ data: _response.body,
565
+ rawResponse: _response.rawResponse,
566
+ };
567
+ }
568
+ if (_response.error.reason === "status-code") {
569
+ switch (_response.error.statusCode) {
570
+ case 401:
571
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
572
+ case 403:
573
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
574
+ case 404:
575
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
576
+ case 422:
577
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
578
+ default:
579
+ throw new errors.FiveOneEatError({
580
+ statusCode: _response.error.statusCode,
581
+ body: _response.error.body,
582
+ rawResponse: _response.rawResponse,
583
+ });
584
+ }
585
+ }
586
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/business/commerce/locations/{location}/active");
587
+ });
588
+ }
589
+ /**
590
+ * Hides it and stops it taking orders, keeping its history and freeing
591
+ * its name and, for a store, its place in the plan's limit. The main
592
+ * store can't be archived.
593
+ *
594
+ * @param {FiveOneEat.business.commerce.ArchiveLocationsRequest} request
595
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
596
+ *
597
+ * @throws {@link FiveOneEat.UnauthorizedError}
598
+ * @throws {@link FiveOneEat.ForbiddenError}
599
+ * @throws {@link FiveOneEat.NotFoundError}
600
+ *
601
+ * @example
602
+ * await client.business.commerce.locations.archive({
603
+ * location: "location"
604
+ * })
605
+ */
606
+ archive(request, requestOptions) {
607
+ return core.HttpResponsePromise.fromPromise(this.__archive(request, requestOptions));
608
+ }
609
+ __archive(request, requestOptions) {
610
+ return __awaiter(this, void 0, void 0, function* () {
611
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
612
+ const { location } = request;
613
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
614
+ 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);
615
+ const _response = yield core.fetcher({
616
+ 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/locations/${core.url.encodePathParam(location)}/archive`),
617
+ method: "POST",
618
+ headers: _headers,
619
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
620
+ 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,
621
+ 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,
622
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
623
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
624
+ logging: this._options.logging,
625
+ });
626
+ if (_response.ok) {
627
+ return {
628
+ data: _response.body,
629
+ rawResponse: _response.rawResponse,
630
+ };
631
+ }
632
+ if (_response.error.reason === "status-code") {
633
+ switch (_response.error.statusCode) {
634
+ case 401:
635
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
636
+ case 403:
637
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
638
+ case 404:
639
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
640
+ default:
641
+ throw new errors.FiveOneEatError({
642
+ statusCode: _response.error.statusCode,
643
+ body: _response.error.body,
644
+ rawResponse: _response.rawResponse,
645
+ });
646
+ }
647
+ }
648
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/commerce/locations/{location}/archive");
649
+ });
650
+ }
651
+ /**
652
+ * A download link that works for a few minutes. `url` is null while the
653
+ * flyer is still being generated. Only a stand has a flyer.
654
+ *
655
+ * @param {FiveOneEat.business.commerce.FlyerLocationsRequest} request
656
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
657
+ *
658
+ * @throws {@link FiveOneEat.UnauthorizedError}
659
+ * @throws {@link FiveOneEat.ForbiddenError}
660
+ * @throws {@link FiveOneEat.NotFoundError}
661
+ *
662
+ * @example
663
+ * await client.business.commerce.locations.flyer({
664
+ * location: "location"
665
+ * })
666
+ */
667
+ flyer(request, requestOptions) {
668
+ return core.HttpResponsePromise.fromPromise(this.__flyer(request, requestOptions));
669
+ }
670
+ __flyer(request, requestOptions) {
671
+ return __awaiter(this, void 0, void 0, function* () {
672
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
673
+ const { location } = request;
674
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
675
+ 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);
676
+ const _response = yield core.fetcher({
677
+ 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/locations/${core.url.encodePathParam(location)}/flyer`),
678
+ method: "GET",
679
+ headers: _headers,
680
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
681
+ 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,
682
+ 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,
683
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
684
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
685
+ logging: this._options.logging,
686
+ });
687
+ if (_response.ok) {
688
+ return {
689
+ data: _response.body,
690
+ rawResponse: _response.rawResponse,
691
+ };
692
+ }
693
+ if (_response.error.reason === "status-code") {
694
+ switch (_response.error.statusCode) {
695
+ case 401:
696
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
697
+ case 403:
698
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
699
+ case 404:
700
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
701
+ default:
702
+ throw new errors.FiveOneEatError({
703
+ statusCode: _response.error.statusCode,
704
+ body: _response.error.body,
705
+ rawResponse: _response.rawResponse,
706
+ });
707
+ }
708
+ }
709
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/locations/{location}/flyer");
710
+ });
711
+ }
712
+ /**
713
+ * Offers, for pickup, every product the main store offers; those already
714
+ * offered are left as they are. Only an extra store takes products this
715
+ * way. `added` is how many it added, so a second call adds none.
716
+ *
717
+ * @param {FiveOneEat.business.commerce.OfferMainStoreProductsLocationsRequest} request
718
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
719
+ *
720
+ * @throws {@link FiveOneEat.UnauthorizedError}
721
+ * @throws {@link FiveOneEat.ForbiddenError}
722
+ * @throws {@link FiveOneEat.NotFoundError}
723
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
724
+ *
725
+ * @example
726
+ * await client.business.commerce.locations.offerMainStoreProducts({
727
+ * location: "location"
728
+ * })
729
+ */
730
+ offerMainStoreProducts(request, requestOptions) {
731
+ return core.HttpResponsePromise.fromPromise(this.__offerMainStoreProducts(request, requestOptions));
732
+ }
733
+ __offerMainStoreProducts(request, requestOptions) {
734
+ return __awaiter(this, void 0, void 0, function* () {
735
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
736
+ const { location } = request;
737
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
738
+ 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);
739
+ const _response = yield core.fetcher({
740
+ 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/locations/${core.url.encodePathParam(location)}/offer-main-store-products`),
741
+ method: "POST",
742
+ headers: _headers,
743
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
744
+ 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,
745
+ 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,
746
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
747
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
748
+ logging: this._options.logging,
749
+ });
750
+ if (_response.ok) {
751
+ return {
752
+ data: _response.body,
753
+ rawResponse: _response.rawResponse,
754
+ };
755
+ }
756
+ if (_response.error.reason === "status-code") {
757
+ switch (_response.error.statusCode) {
758
+ case 401:
759
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
760
+ case 403:
761
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
762
+ case 404:
763
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
764
+ case 422:
765
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
766
+ default:
767
+ throw new errors.FiveOneEatError({
768
+ statusCode: _response.error.statusCode,
769
+ body: _response.error.body,
770
+ rawResponse: _response.rawResponse,
771
+ });
772
+ }
773
+ }
774
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/commerce/locations/{location}/offer-main-store-products");
775
+ });
776
+ }
777
+ /**
778
+ * Its pickup settings, weekly windows with slot capacity and date
779
+ * exceptions, and whether the plan lets it take pickup orders
780
+ * (`can_offer_pickup`: a stand needs Pro).
781
+ *
782
+ * @param {FiveOneEat.business.commerce.GetPickupLocationsRequest} request
783
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
784
+ *
785
+ * @throws {@link FiveOneEat.UnauthorizedError}
786
+ * @throws {@link FiveOneEat.ForbiddenError}
787
+ * @throws {@link FiveOneEat.NotFoundError}
788
+ *
789
+ * @example
790
+ * await client.business.commerce.locations.getPickup({
791
+ * location: "location"
792
+ * })
793
+ */
794
+ getPickup(request, requestOptions) {
795
+ return core.HttpResponsePromise.fromPromise(this.__getPickup(request, requestOptions));
796
+ }
797
+ __getPickup(request, requestOptions) {
798
+ return __awaiter(this, void 0, void 0, function* () {
799
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
800
+ const { location } = request;
801
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
802
+ 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);
803
+ const _response = yield core.fetcher({
804
+ 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/locations/${core.url.encodePathParam(location)}/pickup`),
805
+ method: "GET",
806
+ headers: _headers,
807
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
808
+ 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,
809
+ 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,
810
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
811
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
812
+ logging: this._options.logging,
813
+ });
814
+ if (_response.ok) {
815
+ return {
816
+ data: _response.body,
817
+ rawResponse: _response.rawResponse,
818
+ };
819
+ }
820
+ if (_response.error.reason === "status-code") {
821
+ switch (_response.error.statusCode) {
822
+ case 401:
823
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
824
+ case 403:
825
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
826
+ case 404:
827
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
828
+ default:
829
+ throw new errors.FiveOneEatError({
830
+ statusCode: _response.error.statusCode,
831
+ body: _response.error.body,
832
+ rawResponse: _response.rawResponse,
833
+ });
834
+ }
835
+ }
836
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/locations/{location}/pickup");
837
+ });
838
+ }
839
+ /**
840
+ * Replaces the whole schedule. A window never runs past midnight and
841
+ * two windows on a day can't overlap. Turning pickup on at a stand on a
842
+ * Free plan is refused with a form error on `offers_pickup`.
843
+ *
844
+ * @param {FiveOneEat.business.commerce.UpdatePickupScheduleRequest} request
845
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
846
+ *
847
+ * @throws {@link FiveOneEat.UnauthorizedError}
848
+ * @throws {@link FiveOneEat.ForbiddenError}
849
+ * @throws {@link FiveOneEat.NotFoundError}
850
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
851
+ *
852
+ * @example
853
+ * await client.business.commerce.locations.updatePickup({
854
+ * location: "location",
855
+ * offers_pickup: true,
856
+ * preparation_minutes: 1,
857
+ * pickup_slot_minutes: 1,
858
+ * windows: [{
859
+ * day_of_week: 1,
860
+ * opens_at: "opens_at",
861
+ * closes_at: "closes_at"
862
+ * }],
863
+ * exceptions: [{
864
+ * starts_on: "starts_on",
865
+ * is_closed: true
866
+ * }]
867
+ * })
868
+ */
869
+ updatePickup(request, requestOptions) {
870
+ return core.HttpResponsePromise.fromPromise(this.__updatePickup(request, requestOptions));
871
+ }
872
+ __updatePickup(request, requestOptions) {
873
+ return __awaiter(this, void 0, void 0, function* () {
874
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
875
+ const { location } = request, _body = __rest(request, ["location"]);
876
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
877
+ 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);
878
+ const _response = yield core.fetcher({
879
+ 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/locations/${core.url.encodePathParam(location)}/pickup`),
880
+ method: "PUT",
881
+ headers: _headers,
882
+ contentType: "application/json",
883
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
884
+ requestType: "json",
885
+ body: _body,
886
+ 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,
887
+ 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,
888
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
889
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
890
+ logging: this._options.logging,
891
+ });
892
+ if (_response.ok) {
893
+ return {
894
+ data: _response.body,
895
+ rawResponse: _response.rawResponse,
896
+ };
897
+ }
898
+ if (_response.error.reason === "status-code") {
899
+ switch (_response.error.statusCode) {
900
+ case 401:
901
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
902
+ case 403:
903
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
904
+ case 404:
905
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
906
+ case 422:
907
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
908
+ default:
909
+ throw new errors.FiveOneEatError({
910
+ statusCode: _response.error.statusCode,
911
+ body: _response.error.body,
912
+ rawResponse: _response.rawResponse,
913
+ });
914
+ }
915
+ }
916
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/commerce/locations/{location}/pickup");
917
+ });
918
+ }
919
+ /**
920
+ * Send the schedule you are about to save. The answer lists the open
921
+ * pickup orders it would leave outside its windows, so the owner can
922
+ * contact those buyers or cancel the orders first. It changes nothing,
923
+ * and so, unlike the writes, takes no `Idempotency-Key`.
924
+ *
925
+ * @param {FiveOneEat.business.commerce.PreviewPickupScheduleRequest} request
926
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
927
+ *
928
+ * @throws {@link FiveOneEat.UnauthorizedError}
929
+ * @throws {@link FiveOneEat.ForbiddenError}
930
+ * @throws {@link FiveOneEat.NotFoundError}
931
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
932
+ *
933
+ * @example
934
+ * await client.business.commerce.locations.previewPickupAffectedOrders({
935
+ * location: "location",
936
+ * offers_pickup: true,
937
+ * preparation_minutes: 1,
938
+ * pickup_slot_minutes: 1,
939
+ * windows: [{
940
+ * day_of_week: 1,
941
+ * opens_at: "opens_at",
942
+ * closes_at: "closes_at"
943
+ * }],
944
+ * exceptions: [{
945
+ * starts_on: "starts_on",
946
+ * is_closed: true
947
+ * }]
948
+ * })
949
+ */
950
+ previewPickupAffectedOrders(request, requestOptions) {
951
+ return core.HttpResponsePromise.fromPromise(this.__previewPickupAffectedOrders(request, requestOptions));
952
+ }
953
+ __previewPickupAffectedOrders(request, requestOptions) {
954
+ return __awaiter(this, void 0, void 0, function* () {
955
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
956
+ const { location } = request, _body = __rest(request, ["location"]);
957
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
958
+ 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);
959
+ const _response = yield core.fetcher({
960
+ 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/locations/${core.url.encodePathParam(location)}/pickup/affected-orders`),
961
+ method: "POST",
962
+ headers: _headers,
963
+ contentType: "application/json",
964
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
965
+ requestType: "json",
966
+ body: _body,
967
+ 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,
968
+ 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,
969
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
970
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
971
+ logging: this._options.logging,
972
+ });
973
+ if (_response.ok) {
974
+ return {
975
+ data: _response.body,
976
+ rawResponse: _response.rawResponse,
977
+ };
978
+ }
979
+ if (_response.error.reason === "status-code") {
980
+ switch (_response.error.statusCode) {
981
+ case 401:
982
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
983
+ case 403:
984
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
985
+ case 404:
986
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
987
+ case 422:
988
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
989
+ default:
990
+ throw new errors.FiveOneEatError({
991
+ statusCode: _response.error.statusCode,
992
+ body: _response.error.body,
993
+ rawResponse: _response.rawResponse,
994
+ });
995
+ }
996
+ }
997
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/commerce/locations/{location}/pickup/affected-orders");
998
+ });
999
+ }
1000
+ /**
1001
+ * Its weekly slots and exceptions, and whether it is open now. The main
1002
+ * store and stands answer 404: the main store's hours are the business
1003
+ * hours.
1004
+ *
1005
+ * @param {FiveOneEat.business.commerce.GetHoursLocationsRequest} request
1006
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
1007
+ *
1008
+ * @throws {@link FiveOneEat.UnauthorizedError}
1009
+ * @throws {@link FiveOneEat.ForbiddenError}
1010
+ * @throws {@link FiveOneEat.NotFoundError}
1011
+ *
1012
+ * @example
1013
+ * await client.business.commerce.locations.getHours({
1014
+ * location: "location"
1015
+ * })
1016
+ */
1017
+ getHours(request, requestOptions) {
1018
+ return core.HttpResponsePromise.fromPromise(this.__getHours(request, requestOptions));
1019
+ }
1020
+ __getHours(request, requestOptions) {
1021
+ return __awaiter(this, void 0, void 0, function* () {
1022
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1023
+ const { location } = request;
1024
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1025
+ 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);
1026
+ const _response = yield core.fetcher({
1027
+ 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/locations/${core.url.encodePathParam(location)}/hours`),
1028
+ method: "GET",
1029
+ headers: _headers,
1030
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1031
+ 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,
1032
+ 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,
1033
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1034
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1035
+ logging: this._options.logging,
1036
+ });
1037
+ if (_response.ok) {
1038
+ return {
1039
+ data: _response.body,
1040
+ rawResponse: _response.rawResponse,
1041
+ };
1042
+ }
1043
+ if (_response.error.reason === "status-code") {
1044
+ switch (_response.error.statusCode) {
1045
+ case 401:
1046
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
1047
+ case 403:
1048
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
1049
+ case 404:
1050
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
1051
+ default:
1052
+ throw new errors.FiveOneEatError({
1053
+ statusCode: _response.error.statusCode,
1054
+ body: _response.error.body,
1055
+ rawResponse: _response.rawResponse,
1056
+ });
1057
+ }
1058
+ }
1059
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/locations/{location}/hours");
1060
+ });
1061
+ }
1062
+ /**
1063
+ * Replaces the whole schedule, with the business hours' rules: a slot
1064
+ * may close after midnight, and two slots on a day can't overlap. Send
1065
+ * every slot and exception to keep; none to clear them.
1066
+ *
1067
+ * @param {FiveOneEat.business.commerce.UpdateOpeningHoursRequest} request
1068
+ * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
1069
+ *
1070
+ * @throws {@link FiveOneEat.UnauthorizedError}
1071
+ * @throws {@link FiveOneEat.ForbiddenError}
1072
+ * @throws {@link FiveOneEat.NotFoundError}
1073
+ * @throws {@link FiveOneEat.ConflictError}
1074
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
1075
+ *
1076
+ * @example
1077
+ * await client.business.commerce.locations.updateHours({
1078
+ * location: "location",
1079
+ * slots: [{
1080
+ * day_of_week: 1,
1081
+ * opens_at: "opens_at",
1082
+ * closes_at: "closes_at"
1083
+ * }],
1084
+ * exceptions: [{
1085
+ * starts_on: "starts_on",
1086
+ * is_closed: true
1087
+ * }]
1088
+ * })
1089
+ */
1090
+ updateHours(request, requestOptions) {
1091
+ return core.HttpResponsePromise.fromPromise(this.__updateHours(request, requestOptions));
1092
+ }
1093
+ __updateHours(request, requestOptions) {
1094
+ return __awaiter(this, void 0, void 0, function* () {
1095
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1096
+ const { location } = request, _body = __rest(request, ["location"]);
1097
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1098
+ 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);
1099
+ const _response = yield core.fetcher({
1100
+ 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/locations/${core.url.encodePathParam(location)}/hours`),
1101
+ method: "PUT",
1102
+ headers: _headers,
1103
+ contentType: "application/json",
1104
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1105
+ requestType: "json",
1106
+ body: _body,
1107
+ 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,
1108
+ 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,
1109
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1110
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1111
+ logging: this._options.logging,
1112
+ });
1113
+ if (_response.ok) {
1114
+ return {
1115
+ data: _response.body,
1116
+ rawResponse: _response.rawResponse,
1117
+ };
1118
+ }
1119
+ if (_response.error.reason === "status-code") {
1120
+ switch (_response.error.statusCode) {
1121
+ case 401:
1122
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
1123
+ case 403:
1124
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
1125
+ case 404:
1126
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
1127
+ case 409:
1128
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
1129
+ case 422:
1130
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1131
+ default:
1132
+ throw new errors.FiveOneEatError({
1133
+ statusCode: _response.error.statusCode,
1134
+ body: _response.error.body,
1135
+ rawResponse: _response.rawResponse,
1136
+ });
1137
+ }
1138
+ }
1139
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/commerce/locations/{location}/hours");
1140
+ });
1141
+ }
113
1142
  }
114
1143
  exports.LocationsClient = LocationsClient;