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