@51eat/sdk 0.0.27 → 0.0.29

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 (397) hide show
  1. package/README.md +3 -2
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/business/client/Client.d.ts +6 -0
  4. package/dist/cjs/api/resources/business/client/Client.js +20 -10
  5. package/dist/cjs/api/resources/business/resources/bulletins/client/Client.d.ts +3 -0
  6. package/dist/cjs/api/resources/business/resources/bulletins/client/Client.js +5 -0
  7. package/dist/cjs/api/resources/business/resources/bulletins/exports.d.ts +1 -0
  8. package/dist/cjs/api/resources/business/resources/bulletins/exports.js +1 -0
  9. package/dist/cjs/api/resources/business/resources/bulletins/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/business/resources/bulletins/index.js +1 -0
  11. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/Client.d.ts +49 -0
  12. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/Client.js +208 -0
  13. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/index.js +17 -0
  15. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.ts +12 -0
  16. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.d.ts +13 -0
  17. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.js +3 -0
  18. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/index.js +2 -0
  20. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/exports.d.ts +2 -0
  21. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/exports.js +21 -0
  22. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/index.d.ts +2 -0
  23. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/index.js +18 -0
  24. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.ts +4 -0
  25. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.js +3 -0
  26. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.d.ts +4 -0
  27. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.js +3 -0
  28. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/index.d.ts +2 -0
  29. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/index.js +18 -0
  30. package/dist/cjs/api/resources/business/resources/bulletins/resources/index.d.ts +3 -0
  31. package/dist/cjs/api/resources/business/resources/bulletins/resources/index.js +42 -0
  32. package/dist/cjs/api/resources/business/resources/events/client/Client.d.ts +198 -0
  33. package/dist/cjs/api/resources/business/resources/events/client/Client.js +746 -0
  34. package/dist/cjs/api/resources/business/resources/events/client/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/business/resources/events/client/index.js +17 -0
  36. package/dist/cjs/api/resources/business/resources/events/client/requests/DeleteEventsRequest.d.ts +10 -0
  37. package/dist/cjs/api/resources/business/resources/events/client/requests/DeleteEventsRequest.js +3 -0
  38. package/dist/cjs/api/resources/business/resources/events/client/requests/DeleteImageEventsRequest.d.ts +10 -0
  39. package/dist/cjs/api/resources/business/resources/events/client/requests/DeleteImageEventsRequest.js +3 -0
  40. package/dist/cjs/api/resources/business/resources/events/client/requests/GetEventsRequest.d.ts +10 -0
  41. package/dist/cjs/api/resources/business/resources/events/client/requests/GetEventsRequest.js +3 -0
  42. package/dist/cjs/api/resources/business/resources/events/client/requests/ListAttendeesEventsRequest.d.ts +10 -0
  43. package/dist/cjs/api/resources/business/resources/events/client/requests/ListAttendeesEventsRequest.js +3 -0
  44. package/dist/cjs/api/resources/business/resources/events/client/requests/ListRsvpsEventsRequest.d.ts +10 -0
  45. package/dist/cjs/api/resources/business/resources/events/client/requests/ListRsvpsEventsRequest.js +3 -0
  46. package/dist/cjs/api/resources/business/resources/events/client/requests/SalesSummaryEventsRequest.d.ts +10 -0
  47. package/dist/cjs/api/resources/business/resources/events/client/requests/SalesSummaryEventsRequest.js +3 -0
  48. package/dist/cjs/api/resources/business/resources/events/client/requests/StoreEventRequest.d.ts +20 -0
  49. package/dist/cjs/api/resources/business/resources/events/client/requests/StoreEventRequest.js +3 -0
  50. package/dist/cjs/api/resources/business/resources/events/client/requests/TogglePublishedEventsRequest.d.ts +10 -0
  51. package/dist/cjs/api/resources/business/resources/events/client/requests/TogglePublishedEventsRequest.js +3 -0
  52. package/dist/cjs/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.ts +20 -0
  53. package/dist/cjs/api/resources/business/resources/events/client/requests/UpdateEventRequest.js +3 -0
  54. package/dist/cjs/api/resources/business/resources/events/client/requests/UploadEventImageRequest.d.ts +14 -0
  55. package/dist/cjs/api/resources/business/resources/events/client/requests/UploadEventImageRequest.js +3 -0
  56. package/dist/cjs/api/resources/business/resources/events/client/requests/index.d.ts +10 -0
  57. package/dist/cjs/api/resources/business/resources/events/client/requests/index.js +2 -0
  58. package/dist/cjs/api/resources/business/resources/events/exports.d.ts +3 -0
  59. package/dist/cjs/api/resources/business/resources/events/exports.js +22 -0
  60. package/dist/cjs/api/resources/business/resources/events/index.d.ts +3 -0
  61. package/dist/cjs/api/resources/business/resources/events/index.js +19 -0
  62. package/dist/cjs/api/resources/business/resources/events/resources/index.d.ts +6 -0
  63. package/dist/cjs/api/resources/business/resources/events/resources/index.js +45 -0
  64. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/Client.d.ts +46 -0
  65. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/Client.js +178 -0
  66. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/index.d.ts +1 -0
  67. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/index.js +17 -0
  68. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/requests/GetOrdersRequest.d.ts +13 -0
  69. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/requests/GetOrdersRequest.js +3 -0
  70. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/requests/ListOrdersRequest.d.ts +10 -0
  71. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/requests/ListOrdersRequest.js +3 -0
  72. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/requests/index.d.ts +2 -0
  73. package/dist/cjs/api/resources/business/resources/events/resources/orders/client/requests/index.js +2 -0
  74. package/dist/cjs/api/resources/business/resources/events/resources/orders/exports.d.ts +2 -0
  75. package/dist/cjs/api/resources/business/resources/events/resources/orders/exports.js +21 -0
  76. package/dist/cjs/api/resources/business/resources/events/resources/orders/index.d.ts +2 -0
  77. package/dist/cjs/api/resources/business/resources/events/resources/orders/index.js +18 -0
  78. package/dist/cjs/api/resources/business/resources/events/resources/orders/types/GetOrdersResponse.d.ts +4 -0
  79. package/dist/cjs/api/resources/business/resources/events/resources/orders/types/GetOrdersResponse.js +3 -0
  80. package/dist/cjs/api/resources/business/resources/events/resources/orders/types/ListOrdersResponse.d.ts +4 -0
  81. package/dist/cjs/api/resources/business/resources/events/resources/orders/types/ListOrdersResponse.js +3 -0
  82. package/dist/cjs/api/resources/business/resources/events/resources/orders/types/index.d.ts +2 -0
  83. package/dist/cjs/api/resources/business/resources/events/resources/orders/types/index.js +18 -0
  84. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/Client.d.ts +94 -0
  85. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/Client.js +378 -0
  86. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/index.d.ts +1 -0
  87. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/index.js +17 -0
  88. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/DeleteTicketTypesRequest.d.ts +10 -0
  89. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/DeleteTicketTypesRequest.js +3 -0
  90. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/GetTicketTypesRequest.d.ts +10 -0
  91. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/GetTicketTypesRequest.js +3 -0
  92. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/ListTicketTypesRequest.d.ts +10 -0
  93. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/ListTicketTypesRequest.js +3 -0
  94. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.ts +21 -0
  95. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.js +3 -0
  96. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.ts +18 -0
  97. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.js +3 -0
  98. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/index.d.ts +5 -0
  99. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/index.js +2 -0
  100. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/exports.d.ts +2 -0
  101. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/exports.js +21 -0
  102. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/index.d.ts +2 -0
  103. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/index.js +18 -0
  104. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/CreateTicketTypesResponse.d.ts +4 -0
  105. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/CreateTicketTypesResponse.js +3 -0
  106. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/DeleteTicketTypesResponse.d.ts +9 -0
  107. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/DeleteTicketTypesResponse.js +10 -0
  108. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/GetTicketTypesResponse.d.ts +4 -0
  109. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/GetTicketTypesResponse.js +3 -0
  110. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/ListTicketTypesResponse.d.ts +4 -0
  111. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/ListTicketTypesResponse.js +3 -0
  112. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/UpdateTicketTypesResponse.d.ts +4 -0
  113. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/UpdateTicketTypesResponse.js +3 -0
  114. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/index.d.ts +5 -0
  115. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/types/index.js +21 -0
  116. package/dist/cjs/api/resources/business/resources/events/types/CreateEventsResponse.d.ts +4 -0
  117. package/dist/cjs/api/resources/business/resources/events/types/CreateEventsResponse.js +3 -0
  118. package/dist/cjs/api/resources/business/resources/events/types/DeleteEventsResponse.d.ts +9 -0
  119. package/dist/cjs/api/resources/business/resources/events/types/DeleteEventsResponse.js +10 -0
  120. package/dist/cjs/api/resources/business/resources/events/types/DeleteImageEventsResponse.d.ts +9 -0
  121. package/dist/cjs/api/resources/business/resources/events/types/DeleteImageEventsResponse.js +10 -0
  122. package/dist/cjs/api/resources/business/resources/events/types/GetEventsResponse.d.ts +4 -0
  123. package/dist/cjs/api/resources/business/resources/events/types/GetEventsResponse.js +3 -0
  124. package/dist/cjs/api/resources/business/resources/events/types/ListAttendeesEventsResponse.d.ts +4 -0
  125. package/dist/cjs/api/resources/business/resources/events/types/ListAttendeesEventsResponse.js +3 -0
  126. package/dist/cjs/api/resources/business/resources/events/types/ListEventsResponse.d.ts +4 -0
  127. package/dist/cjs/api/resources/business/resources/events/types/ListEventsResponse.js +3 -0
  128. package/dist/cjs/api/resources/business/resources/events/types/ListRsvpsEventsResponse.d.ts +4 -0
  129. package/dist/cjs/api/resources/business/resources/events/types/ListRsvpsEventsResponse.js +3 -0
  130. package/dist/cjs/api/resources/business/resources/events/types/SalesSummaryEventsResponse.d.ts +4 -0
  131. package/dist/cjs/api/resources/business/resources/events/types/SalesSummaryEventsResponse.js +3 -0
  132. package/dist/cjs/api/resources/business/resources/events/types/TogglePublishedEventsResponse.d.ts +4 -0
  133. package/dist/cjs/api/resources/business/resources/events/types/TogglePublishedEventsResponse.js +3 -0
  134. package/dist/cjs/api/resources/business/resources/events/types/UpdateEventsResponse.d.ts +4 -0
  135. package/dist/cjs/api/resources/business/resources/events/types/UpdateEventsResponse.js +3 -0
  136. package/dist/cjs/api/resources/business/resources/events/types/UploadImageEventsResponse.d.ts +4 -0
  137. package/dist/cjs/api/resources/business/resources/events/types/UploadImageEventsResponse.js +3 -0
  138. package/dist/cjs/api/resources/business/resources/events/types/index.d.ts +11 -0
  139. package/dist/cjs/api/resources/business/resources/events/types/index.js +27 -0
  140. package/dist/cjs/api/resources/business/resources/index.d.ts +6 -0
  141. package/dist/cjs/api/resources/business/resources/index.js +7 -1
  142. package/dist/cjs/api/resources/business/resources/stripeConnect/client/Client.d.ts +84 -0
  143. package/dist/cjs/api/resources/business/resources/stripeConnect/client/Client.js +295 -0
  144. package/dist/cjs/api/resources/business/resources/stripeConnect/client/index.d.ts +1 -0
  145. package/dist/cjs/api/resources/business/resources/stripeConnect/client/index.js +17 -0
  146. package/dist/cjs/api/resources/business/resources/stripeConnect/client/requests/CreateAccountSessionRequest.d.ts +21 -0
  147. package/dist/cjs/api/resources/business/resources/stripeConnect/client/requests/CreateAccountSessionRequest.js +3 -0
  148. package/dist/cjs/api/resources/business/resources/stripeConnect/client/requests/index.d.ts +1 -0
  149. package/dist/cjs/api/resources/business/resources/stripeConnect/client/requests/index.js +2 -0
  150. package/dist/cjs/api/resources/business/resources/stripeConnect/exports.d.ts +2 -0
  151. package/dist/cjs/api/resources/business/resources/stripeConnect/exports.js +21 -0
  152. package/dist/cjs/api/resources/business/resources/stripeConnect/index.d.ts +2 -0
  153. package/dist/cjs/api/resources/business/resources/stripeConnect/index.js +18 -0
  154. package/dist/cjs/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.ts +4 -0
  155. package/dist/cjs/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.js +3 -0
  156. package/dist/cjs/api/resources/business/resources/stripeConnect/types/DisconnectStripeConnectResponse.d.ts +9 -0
  157. package/dist/cjs/api/resources/business/resources/stripeConnect/types/DisconnectStripeConnectResponse.js +10 -0
  158. package/dist/cjs/api/resources/business/resources/stripeConnect/types/RefreshStripeConnectResponse.d.ts +12 -0
  159. package/dist/cjs/api/resources/business/resources/stripeConnect/types/RefreshStripeConnectResponse.js +3 -0
  160. package/dist/cjs/api/resources/business/resources/stripeConnect/types/StatusStripeConnectResponse.d.ts +12 -0
  161. package/dist/cjs/api/resources/business/resources/stripeConnect/types/StatusStripeConnectResponse.js +3 -0
  162. package/dist/cjs/api/resources/business/resources/stripeConnect/types/index.d.ts +4 -0
  163. package/dist/cjs/api/resources/business/resources/stripeConnect/types/index.js +20 -0
  164. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +2 -2
  165. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +1 -1
  166. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/{StoreBulletinCommentRequest.d.ts → AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.ts} +2 -1
  167. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.js +3 -0
  168. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.ts +1 -1
  169. package/dist/cjs/api/types/BusinessBulletinComment.d.ts +15 -0
  170. package/dist/cjs/api/types/BusinessBulletinComment.js +3 -0
  171. package/dist/cjs/api/types/BusinessBulletinCommentReply.d.ts +13 -0
  172. package/dist/cjs/api/types/BusinessBulletinCommentReply.js +3 -0
  173. package/dist/cjs/api/types/BusinessBulletinCommentResponse.d.ts +5 -0
  174. package/dist/cjs/api/types/BusinessBulletinCommentResponse.js +3 -0
  175. package/dist/cjs/api/types/BusinessEvent.d.ts +20 -0
  176. package/dist/cjs/api/types/BusinessEvent.js +3 -0
  177. package/dist/cjs/api/types/BusinessEventAttendee.d.ts +22 -0
  178. package/dist/cjs/api/types/BusinessEventAttendee.js +3 -0
  179. package/dist/cjs/api/types/BusinessEventOrder.d.ts +26 -0
  180. package/dist/cjs/api/types/BusinessEventOrder.js +3 -0
  181. package/dist/cjs/api/types/BusinessEventOrderDetail.d.ts +28 -0
  182. package/dist/cjs/api/types/BusinessEventOrderDetail.js +3 -0
  183. package/dist/cjs/api/types/BusinessEventRsvp.d.ts +16 -0
  184. package/dist/cjs/api/types/BusinessEventRsvp.js +3 -0
  185. package/dist/cjs/api/types/BusinessEventSalesSummary.d.ts +1 -0
  186. package/dist/cjs/api/types/BusinessEventSalesSummary.js +3 -0
  187. package/dist/cjs/api/types/BusinessEventTicketType.d.ts +17 -0
  188. package/dist/cjs/api/types/BusinessEventTicketType.js +3 -0
  189. package/dist/cjs/api/types/BusinessStripeConnection.d.ts +18 -0
  190. package/dist/cjs/api/types/BusinessStripeConnection.js +3 -0
  191. package/dist/cjs/api/types/CustomerBulletinCommentReply.d.ts +13 -0
  192. package/dist/cjs/api/types/CustomerBulletinCommentReply.js +3 -0
  193. package/dist/cjs/api/types/CustomerComment.d.ts +3 -0
  194. package/dist/cjs/api/types/index.d.ts +12 -0
  195. package/dist/cjs/api/types/index.js +12 -0
  196. package/dist/cjs/version.d.ts +1 -1
  197. package/dist/cjs/version.js +1 -1
  198. package/dist/esm/BaseClient.mjs +2 -2
  199. package/dist/esm/api/resources/business/client/Client.d.mts +6 -0
  200. package/dist/esm/api/resources/business/client/Client.mjs +10 -0
  201. package/dist/esm/api/resources/business/resources/bulletins/client/Client.d.mts +3 -0
  202. package/dist/esm/api/resources/business/resources/bulletins/client/Client.mjs +5 -0
  203. package/dist/esm/api/resources/business/resources/bulletins/exports.d.mts +1 -0
  204. package/dist/esm/api/resources/business/resources/bulletins/exports.mjs +1 -0
  205. package/dist/esm/api/resources/business/resources/bulletins/index.d.mts +1 -0
  206. package/dist/esm/api/resources/business/resources/bulletins/index.mjs +1 -0
  207. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/Client.d.mts +49 -0
  208. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/Client.mjs +171 -0
  209. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/index.d.mts +1 -0
  210. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/index.mjs +1 -0
  211. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.mts +12 -0
  212. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.d.mts +13 -0
  213. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.mjs +2 -0
  214. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/index.d.mts +2 -0
  215. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/index.mjs +1 -0
  216. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/exports.d.mts +2 -0
  217. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/exports.mjs +3 -0
  218. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/index.d.mts +2 -0
  219. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/index.mjs +2 -0
  220. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.mts +4 -0
  221. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.mjs +2 -0
  222. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.d.mts +4 -0
  223. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.mjs +2 -0
  224. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/index.d.mts +2 -0
  225. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/index.mjs +2 -0
  226. package/dist/esm/api/resources/business/resources/bulletins/resources/index.d.mts +3 -0
  227. package/dist/esm/api/resources/business/resources/bulletins/resources/index.mjs +3 -0
  228. package/dist/esm/api/resources/business/resources/events/client/Client.d.mts +198 -0
  229. package/dist/esm/api/resources/business/resources/events/client/Client.mjs +709 -0
  230. package/dist/esm/api/resources/business/resources/events/client/index.d.mts +1 -0
  231. package/dist/esm/api/resources/business/resources/events/client/index.mjs +1 -0
  232. package/dist/esm/api/resources/business/resources/events/client/requests/DeleteEventsRequest.d.mts +10 -0
  233. package/dist/esm/api/resources/business/resources/events/client/requests/DeleteEventsRequest.mjs +2 -0
  234. package/dist/esm/api/resources/business/resources/events/client/requests/DeleteImageEventsRequest.d.mts +10 -0
  235. package/dist/esm/api/resources/business/resources/events/client/requests/DeleteImageEventsRequest.mjs +2 -0
  236. package/dist/esm/api/resources/business/resources/events/client/requests/GetEventsRequest.d.mts +10 -0
  237. package/dist/esm/api/resources/business/resources/events/client/requests/GetEventsRequest.mjs +2 -0
  238. package/dist/esm/api/resources/business/resources/events/client/requests/ListAttendeesEventsRequest.d.mts +10 -0
  239. package/dist/esm/api/resources/business/resources/events/client/requests/ListAttendeesEventsRequest.mjs +2 -0
  240. package/dist/esm/api/resources/business/resources/events/client/requests/ListRsvpsEventsRequest.d.mts +10 -0
  241. package/dist/esm/api/resources/business/resources/events/client/requests/ListRsvpsEventsRequest.mjs +2 -0
  242. package/dist/esm/api/resources/business/resources/events/client/requests/SalesSummaryEventsRequest.d.mts +10 -0
  243. package/dist/esm/api/resources/business/resources/events/client/requests/SalesSummaryEventsRequest.mjs +2 -0
  244. package/dist/esm/api/resources/business/resources/events/client/requests/StoreEventRequest.d.mts +20 -0
  245. package/dist/esm/api/resources/business/resources/events/client/requests/StoreEventRequest.mjs +2 -0
  246. package/dist/esm/api/resources/business/resources/events/client/requests/TogglePublishedEventsRequest.d.mts +10 -0
  247. package/dist/esm/api/resources/business/resources/events/client/requests/TogglePublishedEventsRequest.mjs +2 -0
  248. package/dist/esm/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.mts +20 -0
  249. package/dist/esm/api/resources/business/resources/events/client/requests/UpdateEventRequest.mjs +2 -0
  250. package/dist/esm/api/resources/business/resources/events/client/requests/UploadEventImageRequest.d.mts +14 -0
  251. package/dist/esm/api/resources/business/resources/events/client/requests/UploadEventImageRequest.mjs +2 -0
  252. package/dist/esm/api/resources/business/resources/events/client/requests/index.d.mts +10 -0
  253. package/dist/esm/api/resources/business/resources/events/client/requests/index.mjs +1 -0
  254. package/dist/esm/api/resources/business/resources/events/exports.d.mts +3 -0
  255. package/dist/esm/api/resources/business/resources/events/exports.mjs +4 -0
  256. package/dist/esm/api/resources/business/resources/events/index.d.mts +3 -0
  257. package/dist/esm/api/resources/business/resources/events/index.mjs +3 -0
  258. package/dist/esm/api/resources/business/resources/events/resources/index.d.mts +6 -0
  259. package/dist/esm/api/resources/business/resources/events/resources/index.mjs +6 -0
  260. package/dist/esm/api/resources/business/resources/events/resources/orders/client/Client.d.mts +46 -0
  261. package/dist/esm/api/resources/business/resources/events/resources/orders/client/Client.mjs +141 -0
  262. package/dist/esm/api/resources/business/resources/events/resources/orders/client/index.d.mts +1 -0
  263. package/dist/esm/api/resources/business/resources/events/resources/orders/client/index.mjs +1 -0
  264. package/dist/esm/api/resources/business/resources/events/resources/orders/client/requests/GetOrdersRequest.d.mts +13 -0
  265. package/dist/esm/api/resources/business/resources/events/resources/orders/client/requests/GetOrdersRequest.mjs +2 -0
  266. package/dist/esm/api/resources/business/resources/events/resources/orders/client/requests/ListOrdersRequest.d.mts +10 -0
  267. package/dist/esm/api/resources/business/resources/events/resources/orders/client/requests/ListOrdersRequest.mjs +2 -0
  268. package/dist/esm/api/resources/business/resources/events/resources/orders/client/requests/index.d.mts +2 -0
  269. package/dist/esm/api/resources/business/resources/events/resources/orders/client/requests/index.mjs +1 -0
  270. package/dist/esm/api/resources/business/resources/events/resources/orders/exports.d.mts +2 -0
  271. package/dist/esm/api/resources/business/resources/events/resources/orders/exports.mjs +3 -0
  272. package/dist/esm/api/resources/business/resources/events/resources/orders/index.d.mts +2 -0
  273. package/dist/esm/api/resources/business/resources/events/resources/orders/index.mjs +2 -0
  274. package/dist/esm/api/resources/business/resources/events/resources/orders/types/GetOrdersResponse.d.mts +4 -0
  275. package/dist/esm/api/resources/business/resources/events/resources/orders/types/GetOrdersResponse.mjs +2 -0
  276. package/dist/esm/api/resources/business/resources/events/resources/orders/types/ListOrdersResponse.d.mts +4 -0
  277. package/dist/esm/api/resources/business/resources/events/resources/orders/types/ListOrdersResponse.mjs +2 -0
  278. package/dist/esm/api/resources/business/resources/events/resources/orders/types/index.d.mts +2 -0
  279. package/dist/esm/api/resources/business/resources/events/resources/orders/types/index.mjs +2 -0
  280. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/Client.d.mts +94 -0
  281. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/Client.mjs +341 -0
  282. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/index.d.mts +1 -0
  283. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/index.mjs +1 -0
  284. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/DeleteTicketTypesRequest.d.mts +10 -0
  285. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/DeleteTicketTypesRequest.mjs +2 -0
  286. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/GetTicketTypesRequest.d.mts +10 -0
  287. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/GetTicketTypesRequest.mjs +2 -0
  288. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/ListTicketTypesRequest.d.mts +10 -0
  289. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/ListTicketTypesRequest.mjs +2 -0
  290. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.mts +21 -0
  291. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.mjs +2 -0
  292. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.mts +18 -0
  293. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.mjs +2 -0
  294. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/index.d.mts +5 -0
  295. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/index.mjs +1 -0
  296. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/exports.d.mts +2 -0
  297. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/exports.mjs +3 -0
  298. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/index.d.mts +2 -0
  299. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/index.mjs +2 -0
  300. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/CreateTicketTypesResponse.d.mts +4 -0
  301. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/CreateTicketTypesResponse.mjs +2 -0
  302. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/DeleteTicketTypesResponse.d.mts +9 -0
  303. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/DeleteTicketTypesResponse.mjs +7 -0
  304. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/GetTicketTypesResponse.d.mts +4 -0
  305. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/GetTicketTypesResponse.mjs +2 -0
  306. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/ListTicketTypesResponse.d.mts +4 -0
  307. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/ListTicketTypesResponse.mjs +2 -0
  308. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/UpdateTicketTypesResponse.d.mts +4 -0
  309. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/UpdateTicketTypesResponse.mjs +2 -0
  310. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/index.d.mts +5 -0
  311. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/types/index.mjs +5 -0
  312. package/dist/esm/api/resources/business/resources/events/types/CreateEventsResponse.d.mts +4 -0
  313. package/dist/esm/api/resources/business/resources/events/types/CreateEventsResponse.mjs +2 -0
  314. package/dist/esm/api/resources/business/resources/events/types/DeleteEventsResponse.d.mts +9 -0
  315. package/dist/esm/api/resources/business/resources/events/types/DeleteEventsResponse.mjs +7 -0
  316. package/dist/esm/api/resources/business/resources/events/types/DeleteImageEventsResponse.d.mts +9 -0
  317. package/dist/esm/api/resources/business/resources/events/types/DeleteImageEventsResponse.mjs +7 -0
  318. package/dist/esm/api/resources/business/resources/events/types/GetEventsResponse.d.mts +4 -0
  319. package/dist/esm/api/resources/business/resources/events/types/GetEventsResponse.mjs +2 -0
  320. package/dist/esm/api/resources/business/resources/events/types/ListAttendeesEventsResponse.d.mts +4 -0
  321. package/dist/esm/api/resources/business/resources/events/types/ListAttendeesEventsResponse.mjs +2 -0
  322. package/dist/esm/api/resources/business/resources/events/types/ListEventsResponse.d.mts +4 -0
  323. package/dist/esm/api/resources/business/resources/events/types/ListEventsResponse.mjs +2 -0
  324. package/dist/esm/api/resources/business/resources/events/types/ListRsvpsEventsResponse.d.mts +4 -0
  325. package/dist/esm/api/resources/business/resources/events/types/ListRsvpsEventsResponse.mjs +2 -0
  326. package/dist/esm/api/resources/business/resources/events/types/SalesSummaryEventsResponse.d.mts +4 -0
  327. package/dist/esm/api/resources/business/resources/events/types/SalesSummaryEventsResponse.mjs +2 -0
  328. package/dist/esm/api/resources/business/resources/events/types/TogglePublishedEventsResponse.d.mts +4 -0
  329. package/dist/esm/api/resources/business/resources/events/types/TogglePublishedEventsResponse.mjs +2 -0
  330. package/dist/esm/api/resources/business/resources/events/types/UpdateEventsResponse.d.mts +4 -0
  331. package/dist/esm/api/resources/business/resources/events/types/UpdateEventsResponse.mjs +2 -0
  332. package/dist/esm/api/resources/business/resources/events/types/UploadImageEventsResponse.d.mts +4 -0
  333. package/dist/esm/api/resources/business/resources/events/types/UploadImageEventsResponse.mjs +2 -0
  334. package/dist/esm/api/resources/business/resources/events/types/index.d.mts +11 -0
  335. package/dist/esm/api/resources/business/resources/events/types/index.mjs +11 -0
  336. package/dist/esm/api/resources/business/resources/index.d.mts +6 -0
  337. package/dist/esm/api/resources/business/resources/index.mjs +6 -0
  338. package/dist/esm/api/resources/business/resources/stripeConnect/client/Client.d.mts +84 -0
  339. package/dist/esm/api/resources/business/resources/stripeConnect/client/Client.mjs +258 -0
  340. package/dist/esm/api/resources/business/resources/stripeConnect/client/index.d.mts +1 -0
  341. package/dist/esm/api/resources/business/resources/stripeConnect/client/index.mjs +1 -0
  342. package/dist/esm/api/resources/business/resources/stripeConnect/client/requests/CreateAccountSessionRequest.d.mts +21 -0
  343. package/dist/esm/api/resources/business/resources/stripeConnect/client/requests/CreateAccountSessionRequest.mjs +2 -0
  344. package/dist/esm/api/resources/business/resources/stripeConnect/client/requests/index.d.mts +1 -0
  345. package/dist/esm/api/resources/business/resources/stripeConnect/client/requests/index.mjs +1 -0
  346. package/dist/esm/api/resources/business/resources/stripeConnect/exports.d.mts +2 -0
  347. package/dist/esm/api/resources/business/resources/stripeConnect/exports.mjs +3 -0
  348. package/dist/esm/api/resources/business/resources/stripeConnect/index.d.mts +2 -0
  349. package/dist/esm/api/resources/business/resources/stripeConnect/index.mjs +2 -0
  350. package/dist/esm/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.mts +4 -0
  351. package/dist/esm/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.mjs +2 -0
  352. package/dist/esm/api/resources/business/resources/stripeConnect/types/DisconnectStripeConnectResponse.d.mts +9 -0
  353. package/dist/esm/api/resources/business/resources/stripeConnect/types/DisconnectStripeConnectResponse.mjs +7 -0
  354. package/dist/esm/api/resources/business/resources/stripeConnect/types/RefreshStripeConnectResponse.d.mts +12 -0
  355. package/dist/esm/api/resources/business/resources/stripeConnect/types/RefreshStripeConnectResponse.mjs +2 -0
  356. package/dist/esm/api/resources/business/resources/stripeConnect/types/StatusStripeConnectResponse.d.mts +12 -0
  357. package/dist/esm/api/resources/business/resources/stripeConnect/types/StatusStripeConnectResponse.mjs +2 -0
  358. package/dist/esm/api/resources/business/resources/stripeConnect/types/index.d.mts +4 -0
  359. package/dist/esm/api/resources/business/resources/stripeConnect/types/index.mjs +4 -0
  360. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +2 -2
  361. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +1 -1
  362. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/{StoreBulletinCommentRequest.d.mts → AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.mts} +2 -1
  363. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs +2 -0
  364. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.mts +1 -1
  365. package/dist/esm/api/types/BusinessBulletinComment.d.mts +15 -0
  366. package/dist/esm/api/types/BusinessBulletinComment.mjs +2 -0
  367. package/dist/esm/api/types/BusinessBulletinCommentReply.d.mts +13 -0
  368. package/dist/esm/api/types/BusinessBulletinCommentReply.mjs +2 -0
  369. package/dist/esm/api/types/BusinessBulletinCommentResponse.d.mts +5 -0
  370. package/dist/esm/api/types/BusinessBulletinCommentResponse.mjs +2 -0
  371. package/dist/esm/api/types/BusinessEvent.d.mts +20 -0
  372. package/dist/esm/api/types/BusinessEvent.mjs +2 -0
  373. package/dist/esm/api/types/BusinessEventAttendee.d.mts +22 -0
  374. package/dist/esm/api/types/BusinessEventAttendee.mjs +2 -0
  375. package/dist/esm/api/types/BusinessEventOrder.d.mts +26 -0
  376. package/dist/esm/api/types/BusinessEventOrder.mjs +2 -0
  377. package/dist/esm/api/types/BusinessEventOrderDetail.d.mts +28 -0
  378. package/dist/esm/api/types/BusinessEventOrderDetail.mjs +2 -0
  379. package/dist/esm/api/types/BusinessEventRsvp.d.mts +16 -0
  380. package/dist/esm/api/types/BusinessEventRsvp.mjs +2 -0
  381. package/dist/esm/api/types/BusinessEventSalesSummary.d.mts +1 -0
  382. package/dist/esm/api/types/BusinessEventSalesSummary.mjs +2 -0
  383. package/dist/esm/api/types/BusinessEventTicketType.d.mts +17 -0
  384. package/dist/esm/api/types/BusinessEventTicketType.mjs +2 -0
  385. package/dist/esm/api/types/BusinessStripeConnection.d.mts +18 -0
  386. package/dist/esm/api/types/BusinessStripeConnection.mjs +2 -0
  387. package/dist/esm/api/types/CustomerBulletinCommentReply.d.mts +13 -0
  388. package/dist/esm/api/types/CustomerBulletinCommentReply.mjs +2 -0
  389. package/dist/esm/api/types/CustomerComment.d.mts +3 -0
  390. package/dist/esm/api/types/index.d.mts +12 -0
  391. package/dist/esm/api/types/index.mjs +12 -0
  392. package/dist/esm/version.d.mts +1 -1
  393. package/dist/esm/version.mjs +1 -1
  394. package/package.json +56 -1
  395. package/reference.md +1572 -203
  396. /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.js → business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.js} +0 -0
  397. /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.mjs → business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.mjs} +0 -0
@@ -0,0 +1,709 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
24
+ import * as core from "../../../../../../core/index.mjs";
25
+ import * as environments from "../../../../../../environments.mjs";
26
+ import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
27
+ import * as errors from "../../../../../../errors/index.mjs";
28
+ import * as FiveOneEat from "../../../../../index.mjs";
29
+ import { OrdersClient } from "../resources/orders/client/Client.mjs";
30
+ import { TicketTypesClient } from "../resources/ticketTypes/client/Client.mjs";
31
+ export class EventsClient {
32
+ constructor(options = {}) {
33
+ this._options = normalizeClientOptionsWithAuth(options);
34
+ }
35
+ get ticketTypes() {
36
+ var _a;
37
+ return ((_a = this._ticketTypes) !== null && _a !== void 0 ? _a : (this._ticketTypes = new TicketTypesClient(this._options)));
38
+ }
39
+ get orders() {
40
+ var _a;
41
+ return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new OrdersClient(this._options)));
42
+ }
43
+ /**
44
+ * Accepts an optional `filter` query param: `upcoming`, `past`, or `all` (default `all`).
45
+ *
46
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link FiveOneEat.UnauthorizedError}
49
+ * @throws {@link FiveOneEat.ForbiddenError}
50
+ *
51
+ * @example
52
+ * await client.business.events.list()
53
+ */
54
+ list(requestOptions) {
55
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
56
+ }
57
+ __list(requestOptions) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
60
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
61
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
62
+ const _response = yield core.fetcher({
63
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/events"),
64
+ method: "GET",
65
+ headers: _headers,
66
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
67
+ 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,
68
+ 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,
69
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
70
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
71
+ logging: this._options.logging,
72
+ });
73
+ if (_response.ok) {
74
+ return {
75
+ data: _response.body,
76
+ rawResponse: _response.rawResponse,
77
+ };
78
+ }
79
+ if (_response.error.reason === "status-code") {
80
+ switch (_response.error.statusCode) {
81
+ case 401:
82
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
83
+ case 403:
84
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
85
+ default:
86
+ throw new errors.FiveOneEatError({
87
+ statusCode: _response.error.statusCode,
88
+ body: _response.error.body,
89
+ rawResponse: _response.rawResponse,
90
+ });
91
+ }
92
+ }
93
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/events");
94
+ });
95
+ }
96
+ /**
97
+ * @param {FiveOneEat.business.StoreEventRequest} request
98
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link FiveOneEat.UnauthorizedError}
101
+ * @throws {@link FiveOneEat.ForbiddenError}
102
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
103
+ *
104
+ * @example
105
+ * await client.business.events.create({
106
+ * title: "title",
107
+ * starts_at: "2024-01-15T09:30:00Z",
108
+ * ends_at: "2024-01-15T09:30:00Z"
109
+ * })
110
+ */
111
+ create(request, requestOptions) {
112
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
113
+ }
114
+ __create(request, requestOptions) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
117
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
118
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
119
+ const _response = yield core.fetcher({
120
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/events"),
121
+ method: "POST",
122
+ headers: _headers,
123
+ contentType: "application/json",
124
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
125
+ requestType: "json",
126
+ body: request,
127
+ 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,
128
+ 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,
129
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
130
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
131
+ logging: this._options.logging,
132
+ });
133
+ if (_response.ok) {
134
+ return {
135
+ data: _response.body,
136
+ rawResponse: _response.rawResponse,
137
+ };
138
+ }
139
+ if (_response.error.reason === "status-code") {
140
+ switch (_response.error.statusCode) {
141
+ case 401:
142
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
143
+ case 403:
144
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
145
+ case 422:
146
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
147
+ default:
148
+ throw new errors.FiveOneEatError({
149
+ statusCode: _response.error.statusCode,
150
+ body: _response.error.body,
151
+ rawResponse: _response.rawResponse,
152
+ });
153
+ }
154
+ }
155
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/events");
156
+ });
157
+ }
158
+ /**
159
+ * @param {FiveOneEat.business.GetEventsRequest} request
160
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
161
+ *
162
+ * @throws {@link FiveOneEat.UnauthorizedError}
163
+ * @throws {@link FiveOneEat.ForbiddenError}
164
+ * @throws {@link FiveOneEat.NotFoundError}
165
+ *
166
+ * @example
167
+ * await client.business.events.get({
168
+ * event: "event"
169
+ * })
170
+ */
171
+ get(request, requestOptions) {
172
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
173
+ }
174
+ __get(request, requestOptions) {
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
177
+ const { event } = request;
178
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
179
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
180
+ const _response = yield core.fetcher({
181
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}`),
182
+ method: "GET",
183
+ headers: _headers,
184
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
185
+ 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,
186
+ 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,
187
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
188
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
189
+ logging: this._options.logging,
190
+ });
191
+ if (_response.ok) {
192
+ return {
193
+ data: _response.body,
194
+ rawResponse: _response.rawResponse,
195
+ };
196
+ }
197
+ if (_response.error.reason === "status-code") {
198
+ switch (_response.error.statusCode) {
199
+ case 401:
200
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
201
+ case 403:
202
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
203
+ case 404:
204
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
205
+ default:
206
+ throw new errors.FiveOneEatError({
207
+ statusCode: _response.error.statusCode,
208
+ body: _response.error.body,
209
+ rawResponse: _response.rawResponse,
210
+ });
211
+ }
212
+ }
213
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/events/{event}");
214
+ });
215
+ }
216
+ /**
217
+ * @param {FiveOneEat.business.UpdateEventRequest} request
218
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
219
+ *
220
+ * @throws {@link FiveOneEat.UnauthorizedError}
221
+ * @throws {@link FiveOneEat.ForbiddenError}
222
+ * @throws {@link FiveOneEat.NotFoundError}
223
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
224
+ *
225
+ * @example
226
+ * await client.business.events.update({
227
+ * event: "event"
228
+ * })
229
+ */
230
+ update(request, requestOptions) {
231
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
232
+ }
233
+ __update(request, requestOptions) {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
236
+ const { event } = request, _body = __rest(request, ["event"]);
237
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
238
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
239
+ const _response = yield core.fetcher({
240
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}`),
241
+ method: "PUT",
242
+ headers: _headers,
243
+ contentType: "application/json",
244
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
245
+ requestType: "json",
246
+ body: _body,
247
+ 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,
248
+ 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,
249
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
250
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
251
+ logging: this._options.logging,
252
+ });
253
+ if (_response.ok) {
254
+ return {
255
+ data: _response.body,
256
+ rawResponse: _response.rawResponse,
257
+ };
258
+ }
259
+ if (_response.error.reason === "status-code") {
260
+ switch (_response.error.statusCode) {
261
+ case 401:
262
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
263
+ case 403:
264
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
265
+ case 404:
266
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
267
+ case 422:
268
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
269
+ default:
270
+ throw new errors.FiveOneEatError({
271
+ statusCode: _response.error.statusCode,
272
+ body: _response.error.body,
273
+ rawResponse: _response.rawResponse,
274
+ });
275
+ }
276
+ }
277
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/business/events/{event}");
278
+ });
279
+ }
280
+ /**
281
+ * @param {FiveOneEat.business.DeleteEventsRequest} request
282
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
283
+ *
284
+ * @throws {@link FiveOneEat.UnauthorizedError}
285
+ * @throws {@link FiveOneEat.ForbiddenError}
286
+ * @throws {@link FiveOneEat.NotFoundError}
287
+ *
288
+ * @example
289
+ * await client.business.events.delete({
290
+ * event: "event"
291
+ * })
292
+ */
293
+ delete(request, requestOptions) {
294
+ return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
295
+ }
296
+ __delete(request, requestOptions) {
297
+ return __awaiter(this, void 0, void 0, function* () {
298
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
299
+ const { event } = request;
300
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
301
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
302
+ const _response = yield core.fetcher({
303
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}`),
304
+ method: "DELETE",
305
+ headers: _headers,
306
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
307
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
308
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
309
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
310
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
311
+ logging: this._options.logging,
312
+ });
313
+ if (_response.ok) {
314
+ return {
315
+ data: _response.body,
316
+ rawResponse: _response.rawResponse,
317
+ };
318
+ }
319
+ if (_response.error.reason === "status-code") {
320
+ switch (_response.error.statusCode) {
321
+ case 401:
322
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
323
+ case 403:
324
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
325
+ case 404:
326
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
327
+ default:
328
+ throw new errors.FiveOneEatError({
329
+ statusCode: _response.error.statusCode,
330
+ body: _response.error.body,
331
+ rawResponse: _response.rawResponse,
332
+ });
333
+ }
334
+ }
335
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/business/events/{event}");
336
+ });
337
+ }
338
+ /**
339
+ * @param {FiveOneEat.business.TogglePublishedEventsRequest} request
340
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
341
+ *
342
+ * @throws {@link FiveOneEat.UnauthorizedError}
343
+ * @throws {@link FiveOneEat.ForbiddenError}
344
+ * @throws {@link FiveOneEat.NotFoundError}
345
+ *
346
+ * @example
347
+ * await client.business.events.togglePublished({
348
+ * event: "event"
349
+ * })
350
+ */
351
+ togglePublished(request, requestOptions) {
352
+ return core.HttpResponsePromise.fromPromise(this.__togglePublished(request, requestOptions));
353
+ }
354
+ __togglePublished(request, requestOptions) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
357
+ const { event } = request;
358
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
359
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
360
+ const _response = yield core.fetcher({
361
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}/toggle-published`),
362
+ method: "PUT",
363
+ headers: _headers,
364
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
365
+ 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,
366
+ 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,
367
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
368
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
369
+ logging: this._options.logging,
370
+ });
371
+ if (_response.ok) {
372
+ return {
373
+ data: _response.body,
374
+ rawResponse: _response.rawResponse,
375
+ };
376
+ }
377
+ if (_response.error.reason === "status-code") {
378
+ switch (_response.error.statusCode) {
379
+ case 401:
380
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
381
+ case 403:
382
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
383
+ case 404:
384
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
385
+ default:
386
+ throw new errors.FiveOneEatError({
387
+ statusCode: _response.error.statusCode,
388
+ body: _response.error.body,
389
+ rawResponse: _response.rawResponse,
390
+ });
391
+ }
392
+ }
393
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/business/events/{event}/toggle-published");
394
+ });
395
+ }
396
+ /**
397
+ * Upload and replace the image for the given event. Any existing image will be deleted.
398
+ *
399
+ * @param {FiveOneEat.business.UploadEventImageRequest} request
400
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
401
+ *
402
+ * @throws {@link FiveOneEat.UnauthorizedError}
403
+ * @throws {@link FiveOneEat.ForbiddenError}
404
+ * @throws {@link FiveOneEat.NotFoundError}
405
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
406
+ *
407
+ * @example
408
+ * import { createReadStream } from "fs";
409
+ * await client.business.events.uploadImage({
410
+ * image: fs.createReadStream("/path/to/your/file"),
411
+ * event: "event"
412
+ * })
413
+ */
414
+ uploadImage(request, requestOptions) {
415
+ return core.HttpResponsePromise.fromPromise(this.__uploadImage(request, requestOptions));
416
+ }
417
+ __uploadImage(request, requestOptions) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
420
+ const _body = yield core.newFormData();
421
+ yield _body.appendFile("image", request.image);
422
+ if (request.alt_text != null) {
423
+ _body.append("alt_text", request.alt_text);
424
+ }
425
+ const _maybeEncodedRequest = yield _body.getRequest();
426
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
427
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
428
+ const _response = yield core.fetcher({
429
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(request.event)}/image`),
430
+ method: "POST",
431
+ headers: _headers,
432
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
433
+ requestType: "file",
434
+ duplex: _maybeEncodedRequest.duplex,
435
+ body: _maybeEncodedRequest.body,
436
+ 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,
437
+ 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,
438
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
439
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
440
+ logging: this._options.logging,
441
+ });
442
+ if (_response.ok) {
443
+ return {
444
+ data: _response.body,
445
+ rawResponse: _response.rawResponse,
446
+ };
447
+ }
448
+ if (_response.error.reason === "status-code") {
449
+ switch (_response.error.statusCode) {
450
+ case 401:
451
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
452
+ case 403:
453
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
454
+ case 404:
455
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
456
+ case 422:
457
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
458
+ default:
459
+ throw new errors.FiveOneEatError({
460
+ statusCode: _response.error.statusCode,
461
+ body: _response.error.body,
462
+ rawResponse: _response.rawResponse,
463
+ });
464
+ }
465
+ }
466
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/events/{event}/image");
467
+ });
468
+ }
469
+ /**
470
+ * @param {FiveOneEat.business.DeleteImageEventsRequest} request
471
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
472
+ *
473
+ * @throws {@link FiveOneEat.UnauthorizedError}
474
+ * @throws {@link FiveOneEat.ForbiddenError}
475
+ * @throws {@link FiveOneEat.NotFoundError}
476
+ *
477
+ * @example
478
+ * await client.business.events.deleteImage({
479
+ * event: "event"
480
+ * })
481
+ */
482
+ deleteImage(request, requestOptions) {
483
+ return core.HttpResponsePromise.fromPromise(this.__deleteImage(request, requestOptions));
484
+ }
485
+ __deleteImage(request, requestOptions) {
486
+ return __awaiter(this, void 0, void 0, function* () {
487
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
488
+ const { event } = request;
489
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
490
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
491
+ const _response = yield core.fetcher({
492
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}/image`),
493
+ method: "DELETE",
494
+ headers: _headers,
495
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
496
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
497
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
498
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
499
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
500
+ logging: this._options.logging,
501
+ });
502
+ if (_response.ok) {
503
+ return {
504
+ data: _response.body,
505
+ rawResponse: _response.rawResponse,
506
+ };
507
+ }
508
+ if (_response.error.reason === "status-code") {
509
+ switch (_response.error.statusCode) {
510
+ case 401:
511
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
512
+ case 403:
513
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
514
+ case 404:
515
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
516
+ default:
517
+ throw new errors.FiveOneEatError({
518
+ statusCode: _response.error.statusCode,
519
+ body: _response.error.body,
520
+ rawResponse: _response.rawResponse,
521
+ });
522
+ }
523
+ }
524
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/business/events/{event}/image");
525
+ });
526
+ }
527
+ /**
528
+ * Accepts an optional `status` query param: `attending`, `not_attending`, or `maybe`.
529
+ *
530
+ * @param {FiveOneEat.business.ListRsvpsEventsRequest} request
531
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
532
+ *
533
+ * @throws {@link FiveOneEat.UnauthorizedError}
534
+ * @throws {@link FiveOneEat.ForbiddenError}
535
+ * @throws {@link FiveOneEat.NotFoundError}
536
+ *
537
+ * @example
538
+ * await client.business.events.listRsvps({
539
+ * event: "event"
540
+ * })
541
+ */
542
+ listRsvps(request, requestOptions) {
543
+ return core.HttpResponsePromise.fromPromise(this.__listRsvps(request, requestOptions));
544
+ }
545
+ __listRsvps(request, requestOptions) {
546
+ return __awaiter(this, void 0, void 0, function* () {
547
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
548
+ const { event } = request;
549
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
550
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
551
+ const _response = yield core.fetcher({
552
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}/rsvps`),
553
+ method: "GET",
554
+ headers: _headers,
555
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
556
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
557
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
558
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
559
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
560
+ logging: this._options.logging,
561
+ });
562
+ if (_response.ok) {
563
+ return {
564
+ data: _response.body,
565
+ rawResponse: _response.rawResponse,
566
+ };
567
+ }
568
+ if (_response.error.reason === "status-code") {
569
+ switch (_response.error.statusCode) {
570
+ case 401:
571
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
572
+ case 403:
573
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
574
+ case 404:
575
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
576
+ default:
577
+ throw new errors.FiveOneEatError({
578
+ statusCode: _response.error.statusCode,
579
+ body: _response.error.body,
580
+ rawResponse: _response.rawResponse,
581
+ });
582
+ }
583
+ }
584
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/events/{event}/rsvps");
585
+ });
586
+ }
587
+ /**
588
+ * Accepts an optional `status` query param matching the ticket status
589
+ * (`valid`, `used`, `cancelled`, `refunded`).
590
+ *
591
+ * @param {FiveOneEat.business.ListAttendeesEventsRequest} request
592
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
593
+ *
594
+ * @throws {@link FiveOneEat.UnauthorizedError}
595
+ * @throws {@link FiveOneEat.ForbiddenError}
596
+ * @throws {@link FiveOneEat.NotFoundError}
597
+ *
598
+ * @example
599
+ * await client.business.events.listAttendees({
600
+ * event: "event"
601
+ * })
602
+ */
603
+ listAttendees(request, requestOptions) {
604
+ return core.HttpResponsePromise.fromPromise(this.__listAttendees(request, requestOptions));
605
+ }
606
+ __listAttendees(request, requestOptions) {
607
+ return __awaiter(this, void 0, void 0, function* () {
608
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
609
+ const { event } = request;
610
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
611
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
612
+ const _response = yield core.fetcher({
613
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}/attendees`),
614
+ method: "GET",
615
+ headers: _headers,
616
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
617
+ 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,
618
+ 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,
619
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
620
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
621
+ logging: this._options.logging,
622
+ });
623
+ if (_response.ok) {
624
+ return {
625
+ data: _response.body,
626
+ rawResponse: _response.rawResponse,
627
+ };
628
+ }
629
+ if (_response.error.reason === "status-code") {
630
+ switch (_response.error.statusCode) {
631
+ case 401:
632
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
633
+ case 403:
634
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
635
+ case 404:
636
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
637
+ default:
638
+ throw new errors.FiveOneEatError({
639
+ statusCode: _response.error.statusCode,
640
+ body: _response.error.body,
641
+ rawResponse: _response.rawResponse,
642
+ });
643
+ }
644
+ }
645
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/events/{event}/attendees");
646
+ });
647
+ }
648
+ /**
649
+ * Returns aggregated sales totals: gross revenue, refunds, tickets sold,
650
+ * and a per-ticket-type breakdown.
651
+ *
652
+ * @param {FiveOneEat.business.SalesSummaryEventsRequest} request
653
+ * @param {EventsClient.RequestOptions} requestOptions - Request-specific configuration.
654
+ *
655
+ * @throws {@link FiveOneEat.UnauthorizedError}
656
+ * @throws {@link FiveOneEat.ForbiddenError}
657
+ * @throws {@link FiveOneEat.NotFoundError}
658
+ *
659
+ * @example
660
+ * await client.business.events.salesSummary({
661
+ * event: "event"
662
+ * })
663
+ */
664
+ salesSummary(request, requestOptions) {
665
+ return core.HttpResponsePromise.fromPromise(this.__salesSummary(request, requestOptions));
666
+ }
667
+ __salesSummary(request, requestOptions) {
668
+ return __awaiter(this, void 0, void 0, function* () {
669
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
670
+ const { event } = request;
671
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
672
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
673
+ const _response = yield core.fetcher({
674
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `business/events/${core.url.encodePathParam(event)}/sales-summary`),
675
+ method: "GET",
676
+ headers: _headers,
677
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
678
+ 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,
679
+ 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,
680
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
681
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
682
+ logging: this._options.logging,
683
+ });
684
+ if (_response.ok) {
685
+ return {
686
+ data: _response.body,
687
+ rawResponse: _response.rawResponse,
688
+ };
689
+ }
690
+ if (_response.error.reason === "status-code") {
691
+ switch (_response.error.statusCode) {
692
+ case 401:
693
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
694
+ case 403:
695
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
696
+ case 404:
697
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
698
+ default:
699
+ throw new errors.FiveOneEatError({
700
+ statusCode: _response.error.statusCode,
701
+ body: _response.error.body,
702
+ rawResponse: _response.rawResponse,
703
+ });
704
+ }
705
+ }
706
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/events/{event}/sales-summary");
707
+ });
708
+ }
709
+ }