@51eat/sdk 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/README.md +9 -11
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +0 -6
  4. package/dist/cjs/Client.js +8 -18
  5. package/dist/cjs/api/resources/customer/client/Client.d.ts +2 -2
  6. package/dist/cjs/api/resources/customer/client/Client.js +4 -4
  7. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +41 -13
  8. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +146 -46
  9. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.ts +2 -1
  10. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.ts +2 -1
  11. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.ts +6 -1
  12. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.ts +6 -1
  13. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.ts +2 -1
  14. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.ts +2 -1
  15. package/dist/cjs/api/resources/customer/resources/businesses/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/customer/resources/businesses/index.js +1 -0
  17. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +8 -3
  18. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +34 -9
  19. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.ts +6 -1
  20. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/index.js +1 -0
  22. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +43 -17
  23. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +152 -42
  24. package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.ts +2 -2
  25. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.ts +8 -2
  26. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.ts +10 -3
  27. package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.d.ts +2 -2
  28. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.ts +2 -2
  29. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.js +1 -0
  31. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.ts +4 -0
  32. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.ts +4 -0
  34. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.ts +4 -0
  36. package/dist/cjs/api/resources/{customerShop → customer/resources/businesses/resources/bulletins/resources/comments/types}/index.js +4 -2
  37. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/index.js +1 -0
  39. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.d.ts +4 -0
  40. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/types/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/{customerBusinesses/client → customer/resources/businesses/resources/bulletins/types}/index.js +1 -1
  42. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +33 -12
  43. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +116 -34
  44. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.ts +4 -2
  45. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.ts +3 -1
  46. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.ts +6 -1
  47. package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.d.ts +2 -2
  48. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/index.d.ts +1 -1
  49. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/index.js +3 -0
  50. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/index.js +1 -0
  52. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/GetEventsResponse.d.ts +4 -0
  53. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/ListEventsResponse.d.ts +4 -0
  54. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/RsvpEventsResponse.d.ts +4 -0
  55. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/index.d.ts +3 -0
  56. package/dist/cjs/api/resources/{customerShop/client → customer/resources/businesses/resources/events/types}/index.js +3 -1
  57. package/dist/cjs/api/resources/customer/resources/businesses/resources/index.d.ts +2 -0
  58. package/dist/cjs/api/resources/customer/resources/businesses/resources/index.js +2 -0
  59. package/dist/cjs/api/resources/customer/resources/businesses/types/FavoriteBusinessesResponse.d.ts +3 -0
  60. package/dist/cjs/api/resources/customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.d.ts +4 -0
  61. package/dist/cjs/api/resources/customer/resources/businesses/types/MenusBusinessesResponse.d.ts +4 -0
  62. package/dist/cjs/api/resources/customer/resources/businesses/types/PhotosBusinessesResponse.d.ts +4 -0
  63. package/dist/cjs/api/resources/customer/resources/businesses/types/ProfileBusinessesResponse.d.ts +4 -0
  64. package/dist/cjs/api/resources/customer/resources/businesses/types/index.d.ts +5 -0
  65. package/dist/cjs/api/resources/{customerShop/exports.js → customer/resources/businesses/types/index.js} +5 -5
  66. package/dist/cjs/api/resources/customer/resources/index.d.ts +2 -0
  67. package/dist/cjs/api/resources/customer/resources/index.js +2 -0
  68. package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +13 -7
  69. package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +63 -23
  70. package/dist/cjs/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.ts +3 -1
  71. package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.ts +2 -1
  72. package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.ts +6 -1
  73. package/dist/cjs/api/resources/customer/resources/shop/index.d.ts +1 -0
  74. package/dist/cjs/api/resources/customer/resources/shop/index.js +1 -0
  75. package/dist/cjs/api/resources/customer/resources/shop/types/GetProductShopResponse.d.ts +4 -0
  76. package/dist/cjs/api/resources/customer/resources/shop/types/ListCategoriesShopResponse.d.ts +4 -0
  77. package/dist/cjs/api/resources/customer/resources/shop/types/ListProductsShopResponse.d.ts +4 -0
  78. package/dist/cjs/api/resources/customer/resources/shop/types/index.d.ts +3 -0
  79. package/dist/cjs/api/resources/{customerShop → customer/resources/shop}/types/index.js +3 -3
  80. package/dist/cjs/api/resources/index.d.ts +0 -6
  81. package/dist/cjs/api/resources/index.js +1 -7
  82. package/dist/cjs/version.d.ts +1 -1
  83. package/dist/cjs/version.js +1 -1
  84. package/dist/esm/BaseClient.mjs +2 -2
  85. package/dist/esm/Client.d.mts +0 -6
  86. package/dist/esm/Client.mjs +0 -10
  87. package/dist/esm/api/resources/customer/client/Client.d.mts +2 -2
  88. package/dist/esm/api/resources/customer/client/Client.mjs +4 -4
  89. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +41 -13
  90. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +146 -46
  91. package/dist/esm/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.mts +2 -1
  92. package/dist/esm/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.mts +2 -1
  93. package/dist/esm/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.mts +6 -1
  94. package/dist/esm/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.mts +6 -1
  95. package/dist/esm/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.mts +2 -1
  96. package/dist/esm/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.mts +2 -1
  97. package/dist/esm/api/resources/customer/resources/businesses/index.d.mts +1 -0
  98. package/dist/esm/api/resources/customer/resources/businesses/index.mjs +1 -0
  99. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +8 -3
  100. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +34 -9
  101. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.mts +6 -1
  102. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/index.d.mts +1 -0
  103. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/index.mjs +1 -0
  104. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +43 -17
  105. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +152 -42
  106. package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.mts +2 -2
  107. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.mts +8 -2
  108. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.mts +10 -3
  109. package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.d.mts +2 -2
  110. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.mts +2 -2
  111. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.d.mts +1 -0
  112. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.mjs +1 -0
  113. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.mts +4 -0
  114. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.d.mts +4 -0
  115. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.mts +4 -0
  116. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.mts +4 -0
  117. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.mts +4 -0
  118. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.mjs +4 -0
  119. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/index.d.mts +1 -0
  120. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/index.mjs +1 -0
  121. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.d.mts +4 -0
  122. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/index.d.mts +1 -0
  123. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/index.mjs +1 -0
  124. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +33 -12
  125. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +116 -34
  126. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.mts +4 -2
  127. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.mts +3 -1
  128. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.mts +6 -1
  129. package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.d.mts +2 -2
  130. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/index.d.mts +1 -1
  131. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/index.mjs +1 -1
  132. package/dist/esm/api/resources/customer/resources/businesses/resources/events/index.d.mts +1 -0
  133. package/dist/esm/api/resources/customer/resources/businesses/resources/events/index.mjs +1 -0
  134. package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/GetEventsResponse.d.mts +4 -0
  135. package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/ListEventsResponse.d.mts +4 -0
  136. package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/RsvpEventsResponse.d.mts +4 -0
  137. package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/index.d.mts +3 -0
  138. package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/index.mjs +3 -0
  139. package/dist/esm/api/resources/customer/resources/businesses/resources/index.d.mts +2 -0
  140. package/dist/esm/api/resources/customer/resources/businesses/resources/index.mjs +2 -0
  141. package/dist/esm/api/resources/customer/resources/businesses/types/FavoriteBusinessesResponse.d.mts +3 -0
  142. package/dist/esm/api/resources/customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.d.mts +4 -0
  143. package/dist/esm/api/resources/customer/resources/businesses/types/MenusBusinessesResponse.d.mts +4 -0
  144. package/dist/esm/api/resources/customer/resources/businesses/types/PhotosBusinessesResponse.d.mts +4 -0
  145. package/dist/esm/api/resources/customer/resources/businesses/types/ProfileBusinessesResponse.d.mts +4 -0
  146. package/dist/esm/api/resources/customer/resources/businesses/types/index.d.mts +5 -0
  147. package/dist/esm/api/resources/customer/resources/businesses/types/index.mjs +5 -0
  148. package/dist/esm/api/resources/customer/resources/index.d.mts +2 -0
  149. package/dist/esm/api/resources/customer/resources/index.mjs +2 -0
  150. package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +13 -7
  151. package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +63 -23
  152. package/dist/esm/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.mts +3 -1
  153. package/dist/esm/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.mts +2 -1
  154. package/dist/esm/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.mts +6 -1
  155. package/dist/esm/api/resources/customer/resources/shop/index.d.mts +1 -0
  156. package/dist/esm/api/resources/customer/resources/shop/index.mjs +1 -0
  157. package/dist/esm/api/resources/customer/resources/shop/types/GetProductShopResponse.d.mts +4 -0
  158. package/dist/esm/api/resources/customer/resources/shop/types/ListCategoriesShopResponse.d.mts +4 -0
  159. package/dist/esm/api/resources/customer/resources/shop/types/ListProductsShopResponse.d.mts +4 -0
  160. package/dist/esm/api/resources/customer/resources/shop/types/index.d.mts +3 -0
  161. package/dist/esm/api/resources/customer/resources/shop/types/index.mjs +3 -0
  162. package/dist/esm/api/resources/index.d.mts +0 -6
  163. package/dist/esm/api/resources/index.mjs +0 -6
  164. package/dist/esm/version.d.mts +1 -1
  165. package/dist/esm/version.mjs +1 -1
  166. package/package.json +12 -34
  167. package/reference.md +693 -1623
  168. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.d.ts +0 -11
  169. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.d.ts +0 -13
  170. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/RsvpEventsRequest.d.ts +0 -11
  171. package/dist/cjs/api/resources/customerBusinesses/client/Client.d.ts +0 -267
  172. package/dist/cjs/api/resources/customerBusinesses/client/Client.js +0 -982
  173. package/dist/cjs/api/resources/customerBusinesses/client/index.d.ts +0 -1
  174. package/dist/cjs/api/resources/customerBusinesses/client/requests/BusinessesEventShowRequest.d.ts +0 -13
  175. package/dist/cjs/api/resources/customerBusinesses/client/requests/DestroyEventRsvpRequest.d.ts +0 -13
  176. package/dist/cjs/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.d.ts +0 -10
  177. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.d.ts +0 -20
  178. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.d.ts +0 -17
  179. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.d.ts +0 -14
  180. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.d.ts +0 -14
  181. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.d.ts +0 -14
  182. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.d.ts +0 -14
  183. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.d.ts +0 -10
  184. package/dist/cjs/api/resources/customerBusinesses/client/requests/ProfileShowRequest.d.ts +0 -10
  185. package/dist/cjs/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.d.ts +0 -10
  186. package/dist/cjs/api/resources/customerBusinesses/client/requests/index.d.ts +0 -15
  187. package/dist/cjs/api/resources/customerBusinesses/client/requests/index.js +0 -5
  188. package/dist/cjs/api/resources/customerBusinesses/exports.d.ts +0 -2
  189. package/dist/cjs/api/resources/customerBusinesses/exports.js +0 -21
  190. package/dist/cjs/api/resources/customerBusinesses/index.d.ts +0 -2
  191. package/dist/cjs/api/resources/customerBusinesses/index.js +0 -18
  192. package/dist/cjs/api/resources/customerBusinesses/types/BusinessesEventShowResponse.d.ts +0 -4
  193. package/dist/cjs/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.d.ts +0 -4
  194. package/dist/cjs/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.js +0 -3
  195. package/dist/cjs/api/resources/customerBusinesses/types/FavoritesBusinessResponse.d.ts +0 -3
  196. package/dist/cjs/api/resources/customerBusinesses/types/FavoritesBusinessResponse.js +0 -3
  197. package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.d.ts +0 -4
  198. package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.js +0 -3
  199. package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.d.ts +0 -4
  200. package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.js +0 -3
  201. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.d.ts +0 -4
  202. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.js +0 -3
  203. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessEventsResponse.d.ts +0 -4
  204. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessEventsResponse.js +0 -3
  205. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessMenusResponse.d.ts +0 -4
  206. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessMenusResponse.js +0 -3
  207. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.d.ts +0 -4
  208. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.js +0 -3
  209. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.d.ts +0 -4
  210. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.js +0 -3
  211. package/dist/cjs/api/resources/customerBusinesses/types/ProfileShowResponse.d.ts +0 -4
  212. package/dist/cjs/api/resources/customerBusinesses/types/ProfileShowResponse.js +0 -3
  213. package/dist/cjs/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.d.ts +0 -4
  214. package/dist/cjs/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.js +0 -3
  215. package/dist/cjs/api/resources/customerBusinesses/types/StoreEventRsvpResponse.d.ts +0 -4
  216. package/dist/cjs/api/resources/customerBusinesses/types/StoreEventRsvpResponse.js +0 -3
  217. package/dist/cjs/api/resources/customerBusinesses/types/index.d.ts +0 -13
  218. package/dist/cjs/api/resources/customerBusinesses/types/index.js +0 -29
  219. package/dist/cjs/api/resources/customerShop/client/Client.d.ts +0 -53
  220. package/dist/cjs/api/resources/customerShop/client/Client.js +0 -219
  221. package/dist/cjs/api/resources/customerShop/client/index.d.ts +0 -1
  222. package/dist/cjs/api/resources/customerShop/client/requests/GetShopProductRequest.d.ts +0 -13
  223. package/dist/cjs/api/resources/customerShop/client/requests/GetShopProductRequest.js +0 -3
  224. package/dist/cjs/api/resources/customerShop/client/requests/ListShopCategoriesRequest.d.ts +0 -10
  225. package/dist/cjs/api/resources/customerShop/client/requests/ListShopCategoriesRequest.js +0 -3
  226. package/dist/cjs/api/resources/customerShop/client/requests/ListShopProductsRequest.d.ts +0 -14
  227. package/dist/cjs/api/resources/customerShop/client/requests/ListShopProductsRequest.js +0 -3
  228. package/dist/cjs/api/resources/customerShop/client/requests/index.d.ts +0 -3
  229. package/dist/cjs/api/resources/customerShop/client/requests/index.js +0 -2
  230. package/dist/cjs/api/resources/customerShop/exports.d.ts +0 -2
  231. package/dist/cjs/api/resources/customerShop/index.d.ts +0 -2
  232. package/dist/cjs/api/resources/customerShop/types/GetShopProductResponse.d.ts +0 -4
  233. package/dist/cjs/api/resources/customerShop/types/GetShopProductResponse.js +0 -3
  234. package/dist/cjs/api/resources/customerShop/types/ListShopCategoriesResponse.d.ts +0 -4
  235. package/dist/cjs/api/resources/customerShop/types/ListShopCategoriesResponse.js +0 -3
  236. package/dist/cjs/api/resources/customerShop/types/ListShopProductsResponse.d.ts +0 -4
  237. package/dist/cjs/api/resources/customerShop/types/ListShopProductsResponse.js +0 -3
  238. package/dist/cjs/api/resources/customerShop/types/index.d.ts +0 -3
  239. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.d.mts +0 -11
  240. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.d.mts +0 -13
  241. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/RsvpEventsRequest.d.mts +0 -11
  242. package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +0 -267
  243. package/dist/esm/api/resources/customerBusinesses/client/Client.mjs +0 -945
  244. package/dist/esm/api/resources/customerBusinesses/client/index.d.mts +0 -1
  245. package/dist/esm/api/resources/customerBusinesses/client/index.mjs +0 -1
  246. package/dist/esm/api/resources/customerBusinesses/client/requests/BusinessesEventShowRequest.d.mts +0 -13
  247. package/dist/esm/api/resources/customerBusinesses/client/requests/DestroyEventRsvpRequest.d.mts +0 -13
  248. package/dist/esm/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.d.mts +0 -10
  249. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.d.mts +0 -20
  250. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.d.mts +0 -17
  251. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.d.mts +0 -14
  252. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.d.mts +0 -14
  253. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.d.mts +0 -14
  254. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.d.mts +0 -14
  255. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.d.mts +0 -10
  256. package/dist/esm/api/resources/customerBusinesses/client/requests/ProfileShowRequest.d.mts +0 -10
  257. package/dist/esm/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.d.mts +0 -10
  258. package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +0 -15
  259. package/dist/esm/api/resources/customerBusinesses/client/requests/index.mjs +0 -1
  260. package/dist/esm/api/resources/customerBusinesses/exports.d.mts +0 -2
  261. package/dist/esm/api/resources/customerBusinesses/exports.mjs +0 -3
  262. package/dist/esm/api/resources/customerBusinesses/index.d.mts +0 -2
  263. package/dist/esm/api/resources/customerBusinesses/index.mjs +0 -2
  264. package/dist/esm/api/resources/customerBusinesses/types/BusinessesEventShowResponse.d.mts +0 -4
  265. package/dist/esm/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.d.mts +0 -4
  266. package/dist/esm/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.mjs +0 -2
  267. package/dist/esm/api/resources/customerBusinesses/types/FavoritesBusinessResponse.d.mts +0 -3
  268. package/dist/esm/api/resources/customerBusinesses/types/FavoritesBusinessResponse.mjs +0 -2
  269. package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.d.mts +0 -4
  270. package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.mjs +0 -2
  271. package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.d.mts +0 -4
  272. package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.mjs +0 -2
  273. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.d.mts +0 -4
  274. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.mjs +0 -2
  275. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessEventsResponse.d.mts +0 -4
  276. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessEventsResponse.mjs +0 -2
  277. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessMenusResponse.d.mts +0 -4
  278. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessMenusResponse.mjs +0 -2
  279. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.d.mts +0 -4
  280. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.mjs +0 -2
  281. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.d.mts +0 -4
  282. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.mjs +0 -2
  283. package/dist/esm/api/resources/customerBusinesses/types/ProfileShowResponse.d.mts +0 -4
  284. package/dist/esm/api/resources/customerBusinesses/types/ProfileShowResponse.mjs +0 -2
  285. package/dist/esm/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.d.mts +0 -4
  286. package/dist/esm/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.mjs +0 -2
  287. package/dist/esm/api/resources/customerBusinesses/types/StoreEventRsvpResponse.d.mts +0 -4
  288. package/dist/esm/api/resources/customerBusinesses/types/StoreEventRsvpResponse.mjs +0 -2
  289. package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +0 -13
  290. package/dist/esm/api/resources/customerBusinesses/types/index.mjs +0 -13
  291. package/dist/esm/api/resources/customerShop/client/Client.d.mts +0 -53
  292. package/dist/esm/api/resources/customerShop/client/Client.mjs +0 -182
  293. package/dist/esm/api/resources/customerShop/client/index.d.mts +0 -1
  294. package/dist/esm/api/resources/customerShop/client/index.mjs +0 -1
  295. package/dist/esm/api/resources/customerShop/client/requests/GetShopProductRequest.d.mts +0 -13
  296. package/dist/esm/api/resources/customerShop/client/requests/GetShopProductRequest.mjs +0 -2
  297. package/dist/esm/api/resources/customerShop/client/requests/ListShopCategoriesRequest.d.mts +0 -10
  298. package/dist/esm/api/resources/customerShop/client/requests/ListShopCategoriesRequest.mjs +0 -2
  299. package/dist/esm/api/resources/customerShop/client/requests/ListShopProductsRequest.d.mts +0 -14
  300. package/dist/esm/api/resources/customerShop/client/requests/ListShopProductsRequest.mjs +0 -2
  301. package/dist/esm/api/resources/customerShop/client/requests/index.d.mts +0 -3
  302. package/dist/esm/api/resources/customerShop/client/requests/index.mjs +0 -1
  303. package/dist/esm/api/resources/customerShop/exports.d.mts +0 -2
  304. package/dist/esm/api/resources/customerShop/exports.mjs +0 -3
  305. package/dist/esm/api/resources/customerShop/index.d.mts +0 -2
  306. package/dist/esm/api/resources/customerShop/index.mjs +0 -2
  307. package/dist/esm/api/resources/customerShop/types/GetShopProductResponse.d.mts +0 -4
  308. package/dist/esm/api/resources/customerShop/types/GetShopProductResponse.mjs +0 -2
  309. package/dist/esm/api/resources/customerShop/types/ListShopCategoriesResponse.d.mts +0 -4
  310. package/dist/esm/api/resources/customerShop/types/ListShopCategoriesResponse.mjs +0 -2
  311. package/dist/esm/api/resources/customerShop/types/ListShopProductsResponse.d.mts +0 -4
  312. package/dist/esm/api/resources/customerShop/types/ListShopProductsResponse.mjs +0 -2
  313. package/dist/esm/api/resources/customerShop/types/index.d.mts +0 -3
  314. package/dist/esm/api/resources/customerShop/types/index.mjs +0 -3
  315. /package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.js +0 -0
  316. /package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.js +0 -0
  317. /package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/CreateCommentsRequest.js → types/CreateCommentsResponse.js} +0 -0
  318. /package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/ReplyCommentsRequest.js → types/ListCommentsResponse.js} +0 -0
  319. /package/dist/cjs/api/resources/customer/resources/businesses/resources/{events/client/requests/RsvpEventsRequest.js → bulletins/resources/comments/types/ListRepliesCommentsResponse.js} +0 -0
  320. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/BusinessesEventShowRequest.js → customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.js} +0 -0
  321. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/DestroyEventRsvpRequest.js → customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.js} +0 -0
  322. /package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.js +0 -0
  323. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/FavoritesBusinessRequest.js → customer/resources/businesses/resources/events/types/GetEventsResponse.js} +0 -0
  324. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.js → customer/resources/businesses/resources/events/types/ListEventsResponse.js} +0 -0
  325. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBulletinCommentsRequest.js → customer/resources/businesses/resources/events/types/RsvpEventsResponse.js} +0 -0
  326. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessBulletinsRequest.js → customer/resources/businesses/types/FavoriteBusinessesResponse.js} +0 -0
  327. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessEventsRequest.js → customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.js} +0 -0
  328. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessMenusRequest.js → customer/resources/businesses/types/MenusBusinessesResponse.js} +0 -0
  329. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessPhotosRequest.js → customer/resources/businesses/types/PhotosBusinessesResponse.js} +0 -0
  330. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.js → customer/resources/businesses/types/ProfileBusinessesResponse.js} +0 -0
  331. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/ProfileShowRequest.js → customer/resources/shop/types/GetProductShopResponse.js} +0 -0
  332. /package/dist/cjs/api/resources/{customerBusinesses/client/requests/UnfavoritesBusinessRequest.js → customer/resources/shop/types/ListCategoriesShopResponse.js} +0 -0
  333. /package/dist/cjs/api/resources/{customerBusinesses/types/BusinessesEventShowResponse.js → customer/resources/shop/types/ListProductsShopResponse.js} +0 -0
  334. /package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs +0 -0
  335. /package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.mjs +0 -0
  336. /package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/CreateCommentsRequest.mjs → types/CreateCommentsResponse.mjs} +0 -0
  337. /package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/ReplyCommentsRequest.mjs → types/ListCommentsResponse.mjs} +0 -0
  338. /package/dist/esm/api/resources/customer/resources/businesses/resources/{events/client/requests/RsvpEventsRequest.mjs → bulletins/resources/comments/types/ListRepliesCommentsResponse.mjs} +0 -0
  339. /package/dist/esm/api/resources/{customerBusinesses/client/requests/BusinessesEventShowRequest.mjs → customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.mjs} +0 -0
  340. /package/dist/esm/api/resources/{customerBusinesses/client/requests/DestroyEventRsvpRequest.mjs → customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.mjs} +0 -0
  341. /package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.mjs +0 -0
  342. /package/dist/esm/api/resources/{customerBusinesses/client/requests/FavoritesBusinessRequest.mjs → customer/resources/businesses/resources/events/types/GetEventsResponse.mjs} +0 -0
  343. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.mjs → customer/resources/businesses/resources/events/types/ListEventsResponse.mjs} +0 -0
  344. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBulletinCommentsRequest.mjs → customer/resources/businesses/resources/events/types/RsvpEventsResponse.mjs} +0 -0
  345. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessBulletinsRequest.mjs → customer/resources/businesses/types/FavoriteBusinessesResponse.mjs} +0 -0
  346. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessEventsRequest.mjs → customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.mjs} +0 -0
  347. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessMenusRequest.mjs → customer/resources/businesses/types/MenusBusinessesResponse.mjs} +0 -0
  348. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessPhotosRequest.mjs → customer/resources/businesses/types/PhotosBusinessesResponse.mjs} +0 -0
  349. /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.mjs → customer/resources/businesses/types/ProfileBusinessesResponse.mjs} +0 -0
  350. /package/dist/esm/api/resources/{customerBusinesses/client/requests/ProfileShowRequest.mjs → customer/resources/shop/types/GetProductShopResponse.mjs} +0 -0
  351. /package/dist/esm/api/resources/{customerBusinesses/client/requests/UnfavoritesBusinessRequest.mjs → customer/resources/shop/types/ListCategoriesShopResponse.mjs} +0 -0
  352. /package/dist/esm/api/resources/{customerBusinesses/types/BusinessesEventShowResponse.mjs → customer/resources/shop/types/ListProductsShopResponse.mjs} +0 -0
@@ -1,982 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __rest = (this && this.__rest) || function (s, e) {
46
- var t = {};
47
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
- t[p] = s[p];
49
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
- t[p[i]] = s[p[i]];
53
- }
54
- return t;
55
- };
56
- Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.CustomerBusinessesClient = void 0;
58
- const BaseClient_js_1 = require("../../../../BaseClient.js");
59
- const headers_js_1 = require("../../../../core/headers.js");
60
- const core = __importStar(require("../../../../core/index.js"));
61
- const environments = __importStar(require("../../../../environments.js"));
62
- const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
63
- const errors = __importStar(require("../../../../errors/index.js"));
64
- const FiveOneEat = __importStar(require("../../../index.js"));
65
- class CustomerBusinessesClient {
66
- constructor(options = {}) {
67
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
- }
69
- /**
70
- * Retrieve core business information for the profile page.
71
- *
72
- * @param {FiveOneEat.ProfileShowRequest} request
73
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
74
- *
75
- * @throws {@link FiveOneEat.UnauthorizedError}
76
- *
77
- * @example
78
- * await client.customerBusinesses.profileShow({
79
- * handle: "katzs-deli"
80
- * })
81
- */
82
- profileShow(request, requestOptions) {
83
- return core.HttpResponsePromise.fromPromise(this.__profileShow(request, requestOptions));
84
- }
85
- __profileShow(request, requestOptions) {
86
- return __awaiter(this, void 0, void 0, function* () {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
88
- const { handle } = request;
89
- const _authRequest = yield this._options.authProvider.getAuthRequest();
90
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
- const _response = yield core.fetcher({
92
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}`),
93
- method: "GET",
94
- headers: _headers,
95
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
96
- 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,
97
- 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,
98
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
100
- logging: this._options.logging,
101
- });
102
- if (_response.ok) {
103
- return { data: _response.body, rawResponse: _response.rawResponse };
104
- }
105
- if (_response.error.reason === "status-code") {
106
- switch (_response.error.statusCode) {
107
- case 401:
108
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
109
- default:
110
- throw new errors.FiveOneEatError({
111
- statusCode: _response.error.statusCode,
112
- body: _response.error.body,
113
- rawResponse: _response.rawResponse,
114
- });
115
- }
116
- }
117
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}");
118
- });
119
- }
120
- /**
121
- * Retrieve all menus organized by groups for the business.
122
- *
123
- * @param {FiveOneEat.GetBusinessMenusRequest} request
124
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
125
- *
126
- * @throws {@link FiveOneEat.UnauthorizedError}
127
- * @throws {@link FiveOneEat.UnprocessableEntityError}
128
- *
129
- * @example
130
- * await client.customerBusinesses.getBusinessMenus({
131
- * handle: "katzs-deli"
132
- * })
133
- */
134
- getBusinessMenus(request, requestOptions) {
135
- return core.HttpResponsePromise.fromPromise(this.__getBusinessMenus(request, requestOptions));
136
- }
137
- __getBusinessMenus(request, requestOptions) {
138
- return __awaiter(this, void 0, void 0, function* () {
139
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
140
- const { handle, page, per_page: perPage } = request;
141
- const _queryParams = {
142
- page,
143
- per_page: perPage,
144
- };
145
- const _authRequest = yield this._options.authProvider.getAuthRequest();
146
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
147
- const _response = yield core.fetcher({
148
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/menus`),
149
- method: "GET",
150
- headers: _headers,
151
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
152
- queryString: core.url
153
- .queryBuilder()
154
- .addMany(_queryParams)
155
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
156
- .build(),
157
- 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,
158
- 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,
159
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
160
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
161
- logging: this._options.logging,
162
- });
163
- if (_response.ok) {
164
- return { data: _response.body, rawResponse: _response.rawResponse };
165
- }
166
- if (_response.error.reason === "status-code") {
167
- switch (_response.error.statusCode) {
168
- case 401:
169
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
170
- case 422:
171
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
172
- default:
173
- throw new errors.FiveOneEatError({
174
- statusCode: _response.error.statusCode,
175
- body: _response.error.body,
176
- rawResponse: _response.rawResponse,
177
- });
178
- }
179
- }
180
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/menus");
181
- });
182
- }
183
- /**
184
- * Retrieve photo gallery for the business with pagination.
185
- *
186
- * @param {FiveOneEat.GetBusinessPhotosRequest} request
187
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
188
- *
189
- * @throws {@link FiveOneEat.UnauthorizedError}
190
- * @throws {@link FiveOneEat.UnprocessableEntityError}
191
- *
192
- * @example
193
- * await client.customerBusinesses.getBusinessPhotos({
194
- * handle: "katzs-deli"
195
- * })
196
- */
197
- getBusinessPhotos(request, requestOptions) {
198
- return core.HttpResponsePromise.fromPromise(this.__getBusinessPhotos(request, requestOptions));
199
- }
200
- __getBusinessPhotos(request, requestOptions) {
201
- return __awaiter(this, void 0, void 0, function* () {
202
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
203
- const { handle, page, per_page: perPage } = request;
204
- const _queryParams = {
205
- page,
206
- per_page: perPage,
207
- };
208
- const _authRequest = yield this._options.authProvider.getAuthRequest();
209
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
210
- const _response = yield core.fetcher({
211
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/photos`),
212
- method: "GET",
213
- headers: _headers,
214
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
215
- queryString: core.url
216
- .queryBuilder()
217
- .addMany(_queryParams)
218
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
219
- .build(),
220
- 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,
221
- 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,
222
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
223
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
224
- logging: this._options.logging,
225
- });
226
- if (_response.ok) {
227
- return { data: _response.body, rawResponse: _response.rawResponse };
228
- }
229
- if (_response.error.reason === "status-code") {
230
- switch (_response.error.statusCode) {
231
- case 401:
232
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
233
- case 422:
234
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
235
- default:
236
- throw new errors.FiveOneEatError({
237
- statusCode: _response.error.statusCode,
238
- body: _response.error.body,
239
- rawResponse: _response.rawResponse,
240
- });
241
- }
242
- }
243
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/photos");
244
- });
245
- }
246
- /**
247
- * Retrieve business announcements and updates with pagination.
248
- *
249
- * @param {FiveOneEat.GetBusinessBulletinsRequest} request
250
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
251
- *
252
- * @throws {@link FiveOneEat.UnauthorizedError}
253
- * @throws {@link FiveOneEat.UnprocessableEntityError}
254
- *
255
- * @example
256
- * await client.customerBusinesses.getBusinessBulletins({
257
- * handle: "katzs-deli"
258
- * })
259
- */
260
- getBusinessBulletins(request, requestOptions) {
261
- return core.HttpResponsePromise.fromPromise(this.__getBusinessBulletins(request, requestOptions));
262
- }
263
- __getBusinessBulletins(request, requestOptions) {
264
- return __awaiter(this, void 0, void 0, function* () {
265
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
266
- const { handle, page, per_page: perPage } = request;
267
- const _queryParams = {
268
- page,
269
- per_page: perPage,
270
- };
271
- const _authRequest = yield this._options.authProvider.getAuthRequest();
272
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
273
- const _response = yield core.fetcher({
274
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins`),
275
- method: "GET",
276
- headers: _headers,
277
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
278
- queryString: core.url
279
- .queryBuilder()
280
- .addMany(_queryParams)
281
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
282
- .build(),
283
- 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,
284
- 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,
285
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
286
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
287
- logging: this._options.logging,
288
- });
289
- if (_response.ok) {
290
- return {
291
- data: _response.body,
292
- rawResponse: _response.rawResponse,
293
- };
294
- }
295
- if (_response.error.reason === "status-code") {
296
- switch (_response.error.statusCode) {
297
- case 401:
298
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
299
- case 422:
300
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
301
- default:
302
- throw new errors.FiveOneEatError({
303
- statusCode: _response.error.statusCode,
304
- body: _response.error.body,
305
- rawResponse: _response.rawResponse,
306
- });
307
- }
308
- }
309
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins");
310
- });
311
- }
312
- /**
313
- * Retrieve paginated comments for a published business bulletin.
314
- *
315
- * @param {FiveOneEat.GetBulletinCommentsRequest} request
316
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
317
- *
318
- * @throws {@link FiveOneEat.UnauthorizedError}
319
- * @throws {@link FiveOneEat.NotFoundError}
320
- * @throws {@link FiveOneEat.UnprocessableEntityError}
321
- *
322
- * @example
323
- * await client.customerBusinesses.getBulletinComments({
324
- * handle: "katzs-deli",
325
- * bulletin: "01950e7d-1234-7000-abcd-ef0123456789"
326
- * })
327
- */
328
- getBulletinComments(request, requestOptions) {
329
- return core.HttpResponsePromise.fromPromise(this.__getBulletinComments(request, requestOptions));
330
- }
331
- __getBulletinComments(request, requestOptions) {
332
- return __awaiter(this, void 0, void 0, function* () {
333
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
334
- const { handle, bulletin, page, per_page: perPage } = request;
335
- const _queryParams = {
336
- page,
337
- per_page: perPage,
338
- };
339
- const _authRequest = yield this._options.authProvider.getAuthRequest();
340
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
341
- const _response = yield core.fetcher({
342
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments`),
343
- method: "GET",
344
- headers: _headers,
345
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
346
- queryString: core.url
347
- .queryBuilder()
348
- .addMany(_queryParams)
349
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
350
- .build(),
351
- 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,
352
- 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,
353
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
354
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
355
- logging: this._options.logging,
356
- });
357
- if (_response.ok) {
358
- return {
359
- data: _response.body,
360
- rawResponse: _response.rawResponse,
361
- };
362
- }
363
- if (_response.error.reason === "status-code") {
364
- switch (_response.error.statusCode) {
365
- case 401:
366
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
367
- case 404:
368
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
369
- case 422:
370
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
371
- default:
372
- throw new errors.FiveOneEatError({
373
- statusCode: _response.error.statusCode,
374
- body: _response.error.body,
375
- rawResponse: _response.rawResponse,
376
- });
377
- }
378
- }
379
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins/{bulletin}/comments");
380
- });
381
- }
382
- /**
383
- * Post a comment on a business bulletin. Requires authentication.
384
- *
385
- * @param {FiveOneEat.AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest} request
386
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
387
- *
388
- * @throws {@link FiveOneEat.UnauthorizedError}
389
- * @throws {@link FiveOneEat.NotFoundError}
390
- * @throws {@link FiveOneEat.UnprocessableEntityError}
391
- *
392
- * @example
393
- * await client.customerBusinesses.createBulletinComment({
394
- * handle: "katzs-deli",
395
- * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
396
- * body: "body"
397
- * })
398
- */
399
- createBulletinComment(request, requestOptions) {
400
- return core.HttpResponsePromise.fromPromise(this.__createBulletinComment(request, requestOptions));
401
- }
402
- __createBulletinComment(request, requestOptions) {
403
- return __awaiter(this, void 0, void 0, function* () {
404
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
405
- const { handle, bulletin } = request, _body = __rest(request, ["handle", "bulletin"]);
406
- const _authRequest = yield this._options.authProvider.getAuthRequest();
407
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
408
- const _response = yield core.fetcher({
409
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments`),
410
- method: "POST",
411
- headers: _headers,
412
- contentType: "application/json",
413
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
414
- requestType: "json",
415
- body: _body,
416
- 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,
417
- 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,
418
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
419
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
420
- logging: this._options.logging,
421
- });
422
- if (_response.ok) {
423
- return {
424
- data: _response.body,
425
- rawResponse: _response.rawResponse,
426
- };
427
- }
428
- if (_response.error.reason === "status-code") {
429
- switch (_response.error.statusCode) {
430
- case 401:
431
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
432
- case 404:
433
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
434
- case 422:
435
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
436
- default:
437
- throw new errors.FiveOneEatError({
438
- statusCode: _response.error.statusCode,
439
- body: _response.error.body,
440
- rawResponse: _response.rawResponse,
441
- });
442
- }
443
- }
444
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/bulletins/{bulletin}/comments");
445
- });
446
- }
447
- /**
448
- * Retrieve paginated replies for a top-level comment on a published bulletin.
449
- *
450
- * @param {FiveOneEat.GetBulletinCommentRepliesRequest} request
451
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
452
- *
453
- * @throws {@link FiveOneEat.UnauthorizedError}
454
- * @throws {@link FiveOneEat.NotFoundError}
455
- * @throws {@link FiveOneEat.UnprocessableEntityError}
456
- *
457
- * @example
458
- * await client.customerBusinesses.getBulletinCommentReplies({
459
- * handle: "katzs-deli",
460
- * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
461
- * comment: "01950e7d-5678-7000-abcd-ef0123456789"
462
- * })
463
- */
464
- getBulletinCommentReplies(request, requestOptions) {
465
- return core.HttpResponsePromise.fromPromise(this.__getBulletinCommentReplies(request, requestOptions));
466
- }
467
- __getBulletinCommentReplies(request, requestOptions) {
468
- return __awaiter(this, void 0, void 0, function* () {
469
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
470
- const { handle, bulletin, comment, page, per_page: perPage } = request;
471
- const _queryParams = {
472
- page,
473
- per_page: perPage,
474
- };
475
- const _authRequest = yield this._options.authProvider.getAuthRequest();
476
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
477
- const _response = yield core.fetcher({
478
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
479
- method: "GET",
480
- headers: _headers,
481
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
482
- queryString: core.url
483
- .queryBuilder()
484
- .addMany(_queryParams)
485
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
486
- .build(),
487
- 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,
488
- 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,
489
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
490
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
491
- logging: this._options.logging,
492
- });
493
- if (_response.ok) {
494
- return {
495
- data: _response.body,
496
- rawResponse: _response.rawResponse,
497
- };
498
- }
499
- if (_response.error.reason === "status-code") {
500
- switch (_response.error.statusCode) {
501
- case 401:
502
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
503
- case 404:
504
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
505
- case 422:
506
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
507
- default:
508
- throw new errors.FiveOneEatError({
509
- statusCode: _response.error.statusCode,
510
- body: _response.error.body,
511
- rawResponse: _response.rawResponse,
512
- });
513
- }
514
- }
515
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins/{bulletin}/comments/{comment}/replies");
516
- });
517
- }
518
- /**
519
- * Post a reply to a top-level comment on a published bulletin. Requires authentication.
520
- *
521
- * @param {FiveOneEat.StoreBulletinCommentReplyRequest} request
522
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
523
- *
524
- * @throws {@link FiveOneEat.UnauthorizedError}
525
- * @throws {@link FiveOneEat.NotFoundError}
526
- * @throws {@link FiveOneEat.UnprocessableEntityError}
527
- *
528
- * @example
529
- * await client.customerBusinesses.replyToBulletinComment({
530
- * handle: "katzs-deli",
531
- * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
532
- * comment: "01950e7d-5678-7000-abcd-ef0123456789",
533
- * body: "body"
534
- * })
535
- */
536
- replyToBulletinComment(request, requestOptions) {
537
- return core.HttpResponsePromise.fromPromise(this.__replyToBulletinComment(request, requestOptions));
538
- }
539
- __replyToBulletinComment(request, requestOptions) {
540
- return __awaiter(this, void 0, void 0, function* () {
541
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
542
- const { handle, bulletin, comment } = request, _body = __rest(request, ["handle", "bulletin", "comment"]);
543
- const _authRequest = yield this._options.authProvider.getAuthRequest();
544
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
545
- const _response = yield core.fetcher({
546
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
547
- method: "POST",
548
- headers: _headers,
549
- contentType: "application/json",
550
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
551
- requestType: "json",
552
- body: _body,
553
- 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,
554
- 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,
555
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
556
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
557
- logging: this._options.logging,
558
- });
559
- if (_response.ok) {
560
- return {
561
- data: _response.body,
562
- rawResponse: _response.rawResponse,
563
- };
564
- }
565
- if (_response.error.reason === "status-code") {
566
- switch (_response.error.statusCode) {
567
- case 401:
568
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
569
- case 404:
570
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
571
- case 422:
572
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
573
- default:
574
- throw new errors.FiveOneEatError({
575
- statusCode: _response.error.statusCode,
576
- body: _response.error.body,
577
- rawResponse: _response.rawResponse,
578
- });
579
- }
580
- }
581
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/bulletins/{bulletin}/comments/{comment}/replies");
582
- });
583
- }
584
- /**
585
- * Add a business to the authenticated user's favorites.
586
- *
587
- * @param {FiveOneEat.FavoritesBusinessRequest} request
588
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
589
- *
590
- * @throws {@link FiveOneEat.UnauthorizedError}
591
- * @throws {@link FiveOneEat.NotFoundError}
592
- * @throws {@link FiveOneEat.ConflictError}
593
- *
594
- * @example
595
- * await client.customerBusinesses.favoritesBusiness({
596
- * handle: "katzs-deli"
597
- * })
598
- */
599
- favoritesBusiness(request, requestOptions) {
600
- return core.HttpResponsePromise.fromPromise(this.__favoritesBusiness(request, requestOptions));
601
- }
602
- __favoritesBusiness(request, requestOptions) {
603
- return __awaiter(this, void 0, void 0, function* () {
604
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
605
- const { handle } = request;
606
- const _authRequest = yield this._options.authProvider.getAuthRequest();
607
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
608
- const _response = yield core.fetcher({
609
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/favorite`),
610
- method: "POST",
611
- headers: _headers,
612
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
613
- 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,
614
- 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,
615
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
616
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
617
- logging: this._options.logging,
618
- });
619
- if (_response.ok) {
620
- return { data: _response.body, rawResponse: _response.rawResponse };
621
- }
622
- if (_response.error.reason === "status-code") {
623
- switch (_response.error.statusCode) {
624
- case 401:
625
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
626
- case 404:
627
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
628
- case 409:
629
- throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
630
- default:
631
- throw new errors.FiveOneEatError({
632
- statusCode: _response.error.statusCode,
633
- body: _response.error.body,
634
- rawResponse: _response.rawResponse,
635
- });
636
- }
637
- }
638
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/favorite");
639
- });
640
- }
641
- /**
642
- * Remove a business from the authenticated user's favorites.
643
- *
644
- * @param {FiveOneEat.UnfavoritesBusinessRequest} request
645
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
646
- *
647
- * @throws {@link FiveOneEat.UnauthorizedError}
648
- *
649
- * @example
650
- * await client.customerBusinesses.unfavoritesBusiness({
651
- * handle: "katzs-deli"
652
- * })
653
- */
654
- unfavoritesBusiness(request, requestOptions) {
655
- return core.HttpResponsePromise.fromPromise(this.__unfavoritesBusiness(request, requestOptions));
656
- }
657
- __unfavoritesBusiness(request, requestOptions) {
658
- return __awaiter(this, void 0, void 0, function* () {
659
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
660
- const { handle } = request;
661
- const _authRequest = yield this._options.authProvider.getAuthRequest();
662
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
663
- const _response = yield core.fetcher({
664
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/favorite`),
665
- method: "DELETE",
666
- headers: _headers,
667
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
668
- 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,
669
- 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,
670
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
671
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
672
- logging: this._options.logging,
673
- });
674
- if (_response.ok) {
675
- return { data: _response.body, rawResponse: _response.rawResponse };
676
- }
677
- if (_response.error.reason === "status-code") {
678
- switch (_response.error.statusCode) {
679
- case 401:
680
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
681
- default:
682
- throw new errors.FiveOneEatError({
683
- statusCode: _response.error.statusCode,
684
- body: _response.error.body,
685
- rawResponse: _response.rawResponse,
686
- });
687
- }
688
- }
689
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{handle}/favorite");
690
- });
691
- }
692
- /**
693
- * Retrieve upcoming events for the business with pagination.
694
- *
695
- * @param {FiveOneEat.GetBusinessEventsRequest} request
696
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
697
- *
698
- * @throws {@link FiveOneEat.UnauthorizedError}
699
- * @throws {@link FiveOneEat.UnprocessableEntityError}
700
- *
701
- * @example
702
- * await client.customerBusinesses.getBusinessEvents({
703
- * handle: "katzs-deli"
704
- * })
705
- */
706
- getBusinessEvents(request, requestOptions) {
707
- return core.HttpResponsePromise.fromPromise(this.__getBusinessEvents(request, requestOptions));
708
- }
709
- __getBusinessEvents(request, requestOptions) {
710
- return __awaiter(this, void 0, void 0, function* () {
711
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
712
- const { handle, page, per_page: perPage } = request;
713
- const _queryParams = {
714
- page,
715
- per_page: perPage,
716
- };
717
- const _authRequest = yield this._options.authProvider.getAuthRequest();
718
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
719
- const _response = yield core.fetcher({
720
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/events`),
721
- method: "GET",
722
- headers: _headers,
723
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
724
- queryString: core.url
725
- .queryBuilder()
726
- .addMany(_queryParams)
727
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
728
- .build(),
729
- 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,
730
- 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,
731
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
732
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
733
- logging: this._options.logging,
734
- });
735
- if (_response.ok) {
736
- return { data: _response.body, rawResponse: _response.rawResponse };
737
- }
738
- if (_response.error.reason === "status-code") {
739
- switch (_response.error.statusCode) {
740
- case 401:
741
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
742
- case 422:
743
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
744
- default:
745
- throw new errors.FiveOneEatError({
746
- statusCode: _response.error.statusCode,
747
- body: _response.error.body,
748
- rawResponse: _response.rawResponse,
749
- });
750
- }
751
- }
752
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/events");
753
- });
754
- }
755
- /**
756
- * Retrieve full details for a single upcoming event belonging to the business.
757
- *
758
- * @param {FiveOneEat.BusinessesEventShowRequest} request
759
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
760
- *
761
- * @throws {@link FiveOneEat.UnauthorizedError}
762
- *
763
- * @example
764
- * await client.customerBusinesses.businessesEventShow({
765
- * handle: "katzs-deli",
766
- * event: "event"
767
- * })
768
- */
769
- businessesEventShow(request, requestOptions) {
770
- return core.HttpResponsePromise.fromPromise(this.__businessesEventShow(request, requestOptions));
771
- }
772
- __businessesEventShow(request, requestOptions) {
773
- return __awaiter(this, void 0, void 0, function* () {
774
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
775
- const { handle, event } = request;
776
- const _authRequest = yield this._options.authProvider.getAuthRequest();
777
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
778
- const _response = yield core.fetcher({
779
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/events/${core.url.encodePathParam(event)}`),
780
- method: "GET",
781
- headers: _headers,
782
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
783
- 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,
784
- 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,
785
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
786
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
787
- logging: this._options.logging,
788
- });
789
- if (_response.ok) {
790
- return {
791
- data: _response.body,
792
- rawResponse: _response.rawResponse,
793
- };
794
- }
795
- if (_response.error.reason === "status-code") {
796
- switch (_response.error.statusCode) {
797
- case 401:
798
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
799
- default:
800
- throw new errors.FiveOneEatError({
801
- statusCode: _response.error.statusCode,
802
- body: _response.error.body,
803
- rawResponse: _response.rawResponse,
804
- });
805
- }
806
- }
807
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/events/{event}");
808
- });
809
- }
810
- /**
811
- * Create or update the authenticated user's RSVP for a business event.
812
- *
813
- * @param {FiveOneEat.StoreEventRsvpRequest} request
814
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
815
- *
816
- * @throws {@link FiveOneEat.UnauthorizedError}
817
- * @throws {@link FiveOneEat.NotFoundError}
818
- * @throws {@link FiveOneEat.UnprocessableEntityError}
819
- *
820
- * @example
821
- * await client.customerBusinesses.storeEventRsvp({
822
- * handle: "katzs-deli",
823
- * event: "01950e7d-1234-7000-abcd-ef0123456789",
824
- * status: "attending"
825
- * })
826
- */
827
- storeEventRsvp(request, requestOptions) {
828
- return core.HttpResponsePromise.fromPromise(this.__storeEventRsvp(request, requestOptions));
829
- }
830
- __storeEventRsvp(request, requestOptions) {
831
- return __awaiter(this, void 0, void 0, function* () {
832
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
833
- const { handle, event } = request, _body = __rest(request, ["handle", "event"]);
834
- const _authRequest = yield this._options.authProvider.getAuthRequest();
835
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
836
- const _response = yield core.fetcher({
837
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/events/${core.url.encodePathParam(event)}/rsvp`),
838
- method: "POST",
839
- headers: _headers,
840
- contentType: "application/json",
841
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
842
- requestType: "json",
843
- body: _body,
844
- 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,
845
- 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,
846
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
847
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
848
- logging: this._options.logging,
849
- });
850
- if (_response.ok) {
851
- return { data: _response.body, rawResponse: _response.rawResponse };
852
- }
853
- if (_response.error.reason === "status-code") {
854
- switch (_response.error.statusCode) {
855
- case 401:
856
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
857
- case 404:
858
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
859
- case 422:
860
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
861
- default:
862
- throw new errors.FiveOneEatError({
863
- statusCode: _response.error.statusCode,
864
- body: _response.error.body,
865
- rawResponse: _response.rawResponse,
866
- });
867
- }
868
- }
869
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/events/{event}/rsvp");
870
- });
871
- }
872
- /**
873
- * Cancel the authenticated user's RSVP for a business event.
874
- *
875
- * @param {FiveOneEat.DestroyEventRsvpRequest} request
876
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
877
- *
878
- * @throws {@link FiveOneEat.UnauthorizedError}
879
- * @throws {@link FiveOneEat.NotFoundError}
880
- *
881
- * @example
882
- * await client.customerBusinesses.destroyEventRsvp({
883
- * handle: "katzs-deli",
884
- * event: "01950e7d-1234-7000-abcd-ef0123456789"
885
- * })
886
- */
887
- destroyEventRsvp(request, requestOptions) {
888
- return core.HttpResponsePromise.fromPromise(this.__destroyEventRsvp(request, requestOptions));
889
- }
890
- __destroyEventRsvp(request, requestOptions) {
891
- return __awaiter(this, void 0, void 0, function* () {
892
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
893
- const { handle, event } = request;
894
- const _authRequest = yield this._options.authProvider.getAuthRequest();
895
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
896
- const _response = yield core.fetcher({
897
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/events/${core.url.encodePathParam(event)}/rsvp`),
898
- method: "DELETE",
899
- headers: _headers,
900
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
901
- 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,
902
- 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,
903
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
904
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
905
- logging: this._options.logging,
906
- });
907
- if (_response.ok) {
908
- return { data: _response.body, rawResponse: _response.rawResponse };
909
- }
910
- if (_response.error.reason === "status-code") {
911
- switch (_response.error.statusCode) {
912
- case 401:
913
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
914
- case 404:
915
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
916
- default:
917
- throw new errors.FiveOneEatError({
918
- statusCode: _response.error.statusCode,
919
- body: _response.error.body,
920
- rawResponse: _response.rawResponse,
921
- });
922
- }
923
- }
924
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{handle}/events/{event}/rsvp");
925
- });
926
- }
927
- /**
928
- * Retrieve active and upcoming temporary locations for a business.
929
- *
930
- * @param {FiveOneEat.GetBusinessTemporaryLocationsRequest} request
931
- * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
932
- *
933
- * @throws {@link FiveOneEat.UnauthorizedError}
934
- *
935
- * @example
936
- * await client.customerBusinesses.getBusinessTemporaryLocations({
937
- * handle: "katzs-deli"
938
- * })
939
- */
940
- getBusinessTemporaryLocations(request, requestOptions) {
941
- return core.HttpResponsePromise.fromPromise(this.__getBusinessTemporaryLocations(request, requestOptions));
942
- }
943
- __getBusinessTemporaryLocations(request, requestOptions) {
944
- return __awaiter(this, void 0, void 0, function* () {
945
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
946
- const { handle } = request;
947
- const _authRequest = yield this._options.authProvider.getAuthRequest();
948
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
949
- const _response = yield core.fetcher({
950
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(handle)}/temporary-locations`),
951
- method: "GET",
952
- headers: _headers,
953
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
954
- 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,
955
- 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,
956
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
957
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
958
- logging: this._options.logging,
959
- });
960
- if (_response.ok) {
961
- return {
962
- data: _response.body,
963
- rawResponse: _response.rawResponse,
964
- };
965
- }
966
- if (_response.error.reason === "status-code") {
967
- switch (_response.error.statusCode) {
968
- case 401:
969
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
970
- default:
971
- throw new errors.FiveOneEatError({
972
- statusCode: _response.error.statusCode,
973
- body: _response.error.body,
974
- rawResponse: _response.rawResponse,
975
- });
976
- }
977
- }
978
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/temporary-locations");
979
- });
980
- }
981
- }
982
- exports.CustomerBusinessesClient = CustomerBusinessesClient;