hey-pharmacist-ecommerce 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +269 -0
  2. package/dist/index.d.mts +564 -0
  3. package/dist/index.d.ts +564 -0
  4. package/dist/index.js +7541 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +7485 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +70 -0
  9. package/src/components/CartItem.tsx +103 -0
  10. package/src/components/EmptyState.tsx +27 -0
  11. package/src/components/Footer.tsx +147 -0
  12. package/src/components/Header.tsx +151 -0
  13. package/src/components/OrderCard.tsx +98 -0
  14. package/src/components/ProductCard.tsx +122 -0
  15. package/src/components/ui/Badge.tsx +31 -0
  16. package/src/components/ui/Button.tsx +61 -0
  17. package/src/components/ui/Input.tsx +45 -0
  18. package/src/components/ui/Modal.tsx +79 -0
  19. package/src/components/ui/Skeleton.tsx +46 -0
  20. package/src/hooks/useOrders.ts +98 -0
  21. package/src/hooks/useProducts.ts +125 -0
  22. package/src/index.ts +71 -0
  23. package/src/lib/Apis/api.ts +46 -0
  24. package/src/lib/Apis/apis/addresses-api.ts +1461 -0
  25. package/src/lib/Apis/apis/auth-api.ts +945 -0
  26. package/src/lib/Apis/apis/blogs-api.ts +582 -0
  27. package/src/lib/Apis/apis/cart-api.ts +456 -0
  28. package/src/lib/Apis/apis/categories-api.ts +725 -0
  29. package/src/lib/Apis/apis/chats-api.ts +1101 -0
  30. package/src/lib/Apis/apis/contact-us-api.ts +394 -0
  31. package/src/lib/Apis/apis/discounts-api.ts +763 -0
  32. package/src/lib/Apis/apis/drafts-api.ts +448 -0
  33. package/src/lib/Apis/apis/events-api.ts +1311 -0
  34. package/src/lib/Apis/apis/file-proccesor-api.ts +293 -0
  35. package/src/lib/Apis/apis/health-api.ts +119 -0
  36. package/src/lib/Apis/apis/images-api.ts +271 -0
  37. package/src/lib/Apis/apis/inventory-api.ts +375 -0
  38. package/src/lib/Apis/apis/marketing-api.ts +3099 -0
  39. package/src/lib/Apis/apis/notifications-api.ts +843 -0
  40. package/src/lib/Apis/apis/open-aiapi.ts +513 -0
  41. package/src/lib/Apis/apis/orders-api.ts +1343 -0
  42. package/src/lib/Apis/apis/payment-methods-api.ts +411 -0
  43. package/src/lib/Apis/apis/payments-api.ts +469 -0
  44. package/src/lib/Apis/apis/product-attributes-api.ts +538 -0
  45. package/src/lib/Apis/apis/product-favorite-list-api.ts +321 -0
  46. package/src/lib/Apis/apis/product-variants-api.ts +648 -0
  47. package/src/lib/Apis/apis/products-api.ts +1442 -0
  48. package/src/lib/Apis/apis/review-api.ts +1383 -0
  49. package/src/lib/Apis/apis/roles-api.ts +614 -0
  50. package/src/lib/Apis/apis/shipping-api.ts +703 -0
  51. package/src/lib/Apis/apis/statistics-api.ts +234 -0
  52. package/src/lib/Apis/apis/stores-api.ts +1519 -0
  53. package/src/lib/Apis/apis/sub-categories-api.ts +1208 -0
  54. package/src/lib/Apis/apis/user-groups-api.ts +1198 -0
  55. package/src/lib/Apis/apis/users-api.ts +1403 -0
  56. package/src/lib/Apis/apis/web-hooks-api.ts +198 -0
  57. package/src/lib/Apis/base.ts +70 -0
  58. package/src/lib/Apis/configuration.ts +75 -0
  59. package/src/lib/Apis/index.ts +17 -0
  60. package/src/lib/Apis/models/add-contact-to-list-dto.ts +33 -0
  61. package/src/lib/Apis/models/add-message-dto.ts +56 -0
  62. package/src/lib/Apis/models/address-created-request.ts +134 -0
  63. package/src/lib/Apis/models/address.ts +164 -0
  64. package/src/lib/Apis/models/allow-user-credit-dto.ts +27 -0
  65. package/src/lib/Apis/models/appointment.ts +75 -0
  66. package/src/lib/Apis/models/available-dates-dto.ts +33 -0
  67. package/src/lib/Apis/models/available-suggested-dates-dto.ts +33 -0
  68. package/src/lib/Apis/models/blog.ts +75 -0
  69. package/src/lib/Apis/models/browser-stats-response-dto.ts +40 -0
  70. package/src/lib/Apis/models/bulk-move-subcategories-dto.ts +33 -0
  71. package/src/lib/Apis/models/bulk-unassign-subcategories-dto.ts +27 -0
  72. package/src/lib/Apis/models/campaign-content-response-dto.ts +40 -0
  73. package/src/lib/Apis/models/campaign-draft-dto.ts +175 -0
  74. package/src/lib/Apis/models/campaign-draft-response-dto.ts +40 -0
  75. package/src/lib/Apis/models/campaign-draft-schedule-dto.ts +49 -0
  76. package/src/lib/Apis/models/campaign-draft-schedule-response-dto.ts +40 -0
  77. package/src/lib/Apis/models/campaign-draft-sending-dto.ts +43 -0
  78. package/src/lib/Apis/models/campaign-draft-sending-response-dto.ts +40 -0
  79. package/src/lib/Apis/models/cart-body-dto.ts +40 -0
  80. package/src/lib/Apis/models/cart-body-populated.ts +47 -0
  81. package/src/lib/Apis/models/cart-item-populated.ts +41 -0
  82. package/src/lib/Apis/models/cart-item.ts +33 -0
  83. package/src/lib/Apis/models/cart-response-dto.ts +70 -0
  84. package/src/lib/Apis/models/categories-paginated-response-dto.ts +52 -0
  85. package/src/lib/Apis/models/category-filters.ts +40 -0
  86. package/src/lib/Apis/models/category-populated.ts +106 -0
  87. package/src/lib/Apis/models/category-sub-category-populated.ts +51 -0
  88. package/src/lib/Apis/models/category.ts +99 -0
  89. package/src/lib/Apis/models/categorys-headlines-response-dto.ts +40 -0
  90. package/src/lib/Apis/models/change-user-email-dto.ts +27 -0
  91. package/src/lib/Apis/models/chat.ts +33 -0
  92. package/src/lib/Apis/models/check-notifications-response-dto.ts +33 -0
  93. package/src/lib/Apis/models/contact-aggregated-stats-response-dto.ts +40 -0
  94. package/src/lib/Apis/models/contact-full-dto.ts +93 -0
  95. package/src/lib/Apis/models/contact-full-response-dto.ts +40 -0
  96. package/src/lib/Apis/models/contact-list-stats-response-dto.ts +40 -0
  97. package/src/lib/Apis/models/contact-lists-response-dto.ts +40 -0
  98. package/src/lib/Apis/models/contact-us.ts +81 -0
  99. package/src/lib/Apis/models/country-stats-response-dto.ts +40 -0
  100. package/src/lib/Apis/models/create-address-dto.ts +134 -0
  101. package/src/lib/Apis/models/create-blog-dto.ts +45 -0
  102. package/src/lib/Apis/models/create-category-dto.ts +45 -0
  103. package/src/lib/Apis/models/create-chat-dto.ts +39 -0
  104. package/src/lib/Apis/models/create-contact-dto.ts +39 -0
  105. package/src/lib/Apis/models/create-contact-list-dto.ts +27 -0
  106. package/src/lib/Apis/models/create-discount-dto.ts +208 -0
  107. package/src/lib/Apis/models/create-draft-dto.ts +67 -0
  108. package/src/lib/Apis/models/create-email-template-dto.ts +51 -0
  109. package/src/lib/Apis/models/create-event-dto.ts +52 -0
  110. package/src/lib/Apis/models/create-marketing-campaign-dto.ts +81 -0
  111. package/src/lib/Apis/models/create-message-dto.ts +57 -0
  112. package/src/lib/Apis/models/create-notification-dto.ts +75 -0
  113. package/src/lib/Apis/models/create-product-attribute-dto.ts +33 -0
  114. package/src/lib/Apis/models/create-product-dto.ts +94 -0
  115. package/src/lib/Apis/models/create-review-dto.ts +63 -0
  116. package/src/lib/Apis/models/create-role-dto.ts +57 -0
  117. package/src/lib/Apis/models/create-single-variant-product-dto.ts +155 -0
  118. package/src/lib/Apis/models/create-store-address-dto.ts +134 -0
  119. package/src/lib/Apis/models/create-store-dto.ts +105 -0
  120. package/src/lib/Apis/models/create-sub-category-dto.ts +45 -0
  121. package/src/lib/Apis/models/create-user-dto.ts +89 -0
  122. package/src/lib/Apis/models/create-user-group-dto.ts +39 -0
  123. package/src/lib/Apis/models/create-variant-dto.ts +119 -0
  124. package/src/lib/Apis/models/create-zone-dto.ts +82 -0
  125. package/src/lib/Apis/models/custom-product-dto.ts +63 -0
  126. package/src/lib/Apis/models/default-payment-method-request-dto.ts +27 -0
  127. package/src/lib/Apis/models/delete-file-dto.ts +27 -0
  128. package/src/lib/Apis/models/delete-many-files-dto.ts +27 -0
  129. package/src/lib/Apis/models/discount-paginated-response.ts +52 -0
  130. package/src/lib/Apis/models/discount.ts +245 -0
  131. package/src/lib/Apis/models/discounts-insights-dto.ts +57 -0
  132. package/src/lib/Apis/models/draft.ts +79 -0
  133. package/src/lib/Apis/models/email-invoice-dto.ts +45 -0
  134. package/src/lib/Apis/models/email-template-response-dto.ts +117 -0
  135. package/src/lib/Apis/models/event.ts +76 -0
  136. package/src/lib/Apis/models/extended-product-dto.ts +204 -0
  137. package/src/lib/Apis/models/fileproccesor-upload-body.ts +27 -0
  138. package/src/lib/Apis/models/forget-password.ts +27 -0
  139. package/src/lib/Apis/models/frequently-bought-product-dto.ts +71 -0
  140. package/src/lib/Apis/models/general-stats-response-dto.ts +40 -0
  141. package/src/lib/Apis/models/generate-day-slots-dto.ts +51 -0
  142. package/src/lib/Apis/models/generate-month-slots-dto.ts +57 -0
  143. package/src/lib/Apis/models/generate-week-slots-dto.ts +57 -0
  144. package/src/lib/Apis/models/google-analytics-request-dto.ts +55 -0
  145. package/src/lib/Apis/models/google-analytics-response-dto.ts +39 -0
  146. package/src/lib/Apis/models/group-with-no-users-dto.ts +75 -0
  147. package/src/lib/Apis/models/group-with-users-dto.ts +76 -0
  148. package/src/lib/Apis/models/images-upload-body.ts +27 -0
  149. package/src/lib/Apis/models/index.ts +197 -0
  150. package/src/lib/Apis/models/inventory-paginated-response.ts +75 -0
  151. package/src/lib/Apis/models/link-stats-response-dto.ts +40 -0
  152. package/src/lib/Apis/models/login-dto.ts +33 -0
  153. package/src/lib/Apis/models/manual-discount.ts +49 -0
  154. package/src/lib/Apis/models/manual-order-dto.ts +133 -0
  155. package/src/lib/Apis/models/manual-shipping-dto.ts +45 -0
  156. package/src/lib/Apis/models/marketing-campaign-content-dto.ts +27 -0
  157. package/src/lib/Apis/models/marketing-list-contact-dto.ts +51 -0
  158. package/src/lib/Apis/models/move-subcategory-dto.ts +27 -0
  159. package/src/lib/Apis/models/my-favorite-list-dto.ts +52 -0
  160. package/src/lib/Apis/models/notification.ts +93 -0
  161. package/src/lib/Apis/models/object-id.ts +21 -0
  162. package/src/lib/Apis/models/open-api.ts +33 -0
  163. package/src/lib/Apis/models/order-paginated-response.ts +52 -0
  164. package/src/lib/Apis/models/order.ts +214 -0
  165. package/src/lib/Apis/models/orders-insights-dto.ts +69 -0
  166. package/src/lib/Apis/models/paginated-products-dto.ts +52 -0
  167. package/src/lib/Apis/models/payment-method-data.ts +34 -0
  168. package/src/lib/Apis/models/payment-method.ts +51 -0
  169. package/src/lib/Apis/models/payment-time-line-dto.ts +56 -0
  170. package/src/lib/Apis/models/payment.ts +182 -0
  171. package/src/lib/Apis/models/payments-insights-dto.ts +69 -0
  172. package/src/lib/Apis/models/payments-paginated-response.ts +52 -0
  173. package/src/lib/Apis/models/pick-type-class.ts +51 -0
  174. package/src/lib/Apis/models/populated-chat-dto.ts +95 -0
  175. package/src/lib/Apis/models/populated-discount.ts +246 -0
  176. package/src/lib/Apis/models/populated-order.ts +209 -0
  177. package/src/lib/Apis/models/prefered-pick-or-delivery-time-dto.ts +33 -0
  178. package/src/lib/Apis/models/price-range.ts +33 -0
  179. package/src/lib/Apis/models/product-attribute.ts +57 -0
  180. package/src/lib/Apis/models/product-variant.ts +167 -0
  181. package/src/lib/Apis/models/product.ts +136 -0
  182. package/src/lib/Apis/models/products-insights-dto.ts +45 -0
  183. package/src/lib/Apis/models/rate-dto.ts +123 -0
  184. package/src/lib/Apis/models/refill-request-dto.ts +75 -0
  185. package/src/lib/Apis/models/refill-request.ts +105 -0
  186. package/src/lib/Apis/models/register-or-login-with-gmail.ts +27 -0
  187. package/src/lib/Apis/models/reserve-appointment.ts +261 -0
  188. package/src/lib/Apis/models/review.ts +93 -0
  189. package/src/lib/Apis/models/role.ts +69 -0
  190. package/src/lib/Apis/models/schedule-campaign-draft-dto.ts +27 -0
  191. package/src/lib/Apis/models/send-test-email-dto.ts +28 -0
  192. package/src/lib/Apis/models/shallow-parent-category-dto.ts +33 -0
  193. package/src/lib/Apis/models/shipment-details-dto.ts +88 -0
  194. package/src/lib/Apis/models/shipment-status-dto.ts +117 -0
  195. package/src/lib/Apis/models/shipment-with-order.ts +105 -0
  196. package/src/lib/Apis/models/shipment.ts +104 -0
  197. package/src/lib/Apis/models/shipping-info.ts +88 -0
  198. package/src/lib/Apis/models/single-browser-stats-dto.ts +45 -0
  199. package/src/lib/Apis/models/single-contact-aggregated-stats-dto.ts +129 -0
  200. package/src/lib/Apis/models/single-contact-list-stats-dto.ts +117 -0
  201. package/src/lib/Apis/models/single-country-stats-dto.ts +39 -0
  202. package/src/lib/Apis/models/single-general-stats.ts +153 -0
  203. package/src/lib/Apis/models/single-link-stats-dto.ts +39 -0
  204. package/src/lib/Apis/models/single-message-populated.ts +59 -0
  205. package/src/lib/Apis/models/single-notification-dto.ts +99 -0
  206. package/src/lib/Apis/models/single-product-media.ts +74 -0
  207. package/src/lib/Apis/models/single-recipient-dto.ts +33 -0
  208. package/src/lib/Apis/models/single-suggest-attribute.ts +33 -0
  209. package/src/lib/Apis/models/statistic-dto.ts +171 -0
  210. package/src/lib/Apis/models/store-entity.ts +117 -0
  211. package/src/lib/Apis/models/store.ts +135 -0
  212. package/src/lib/Apis/models/sub-category-headlines-only-response-dto.ts +39 -0
  213. package/src/lib/Apis/models/sub-category.ts +93 -0
  214. package/src/lib/Apis/models/suggest-attributes.ts +28 -0
  215. package/src/lib/Apis/models/suggested-slot.ts +33 -0
  216. package/src/lib/Apis/models/table-cell-dto.ts +33 -0
  217. package/src/lib/Apis/models/table-dto.ts +34 -0
  218. package/src/lib/Apis/models/tadmin-session-data.ts +47 -0
  219. package/src/lib/Apis/models/track-dto.ts +94 -0
  220. package/src/lib/Apis/models/tracking-status-location-base.ts +45 -0
  221. package/src/lib/Apis/models/tracking-status-substatus.ts +39 -0
  222. package/src/lib/Apis/models/tracking-status.ts +71 -0
  223. package/src/lib/Apis/models/transfere-patient-request.ts +123 -0
  224. package/src/lib/Apis/models/transfere-patients-request-dto.ts +99 -0
  225. package/src/lib/Apis/models/tuser-session-data.ts +34 -0
  226. package/src/lib/Apis/models/update-address-dto.ts +134 -0
  227. package/src/lib/Apis/models/update-blog-dto.ts +45 -0
  228. package/src/lib/Apis/models/update-campaign-draft-content-dto.ts +27 -0
  229. package/src/lib/Apis/models/update-category-dto.ts +45 -0
  230. package/src/lib/Apis/models/update-discount-dto.ts +208 -0
  231. package/src/lib/Apis/models/update-event-dto.ts +52 -0
  232. package/src/lib/Apis/models/update-items-order-dto.ts +27 -0
  233. package/src/lib/Apis/models/update-marketing-camp-draft-dto.ts +81 -0
  234. package/src/lib/Apis/models/update-message-dto.ts +57 -0
  235. package/src/lib/Apis/models/update-product-attribute-dto.ts +33 -0
  236. package/src/lib/Apis/models/update-product-dto.ts +96 -0
  237. package/src/lib/Apis/models/update-product-variant-dto.ts +119 -0
  238. package/src/lib/Apis/models/update-refill-request-dto.ts +75 -0
  239. package/src/lib/Apis/models/update-review-dto.ts +63 -0
  240. package/src/lib/Apis/models/update-role-dto.ts +57 -0
  241. package/src/lib/Apis/models/update-store-dto.ts +105 -0
  242. package/src/lib/Apis/models/update-sub-category-dto.ts +45 -0
  243. package/src/lib/Apis/models/update-transfere-patients-request-dto.ts +99 -0
  244. package/src/lib/Apis/models/update-user-dto.ts +239 -0
  245. package/src/lib/Apis/models/update-user-group-dto.ts +39 -0
  246. package/src/lib/Apis/models/update-zone-dto.ts +82 -0
  247. package/src/lib/Apis/models/upload-pdf-body.ts +27 -0
  248. package/src/lib/Apis/models/used-by.ts +87 -0
  249. package/src/lib/Apis/models/user-entity.ts +220 -0
  250. package/src/lib/Apis/models/user-group.ts +75 -0
  251. package/src/lib/Apis/models/user-insights-dto.ts +39 -0
  252. package/src/lib/Apis/models/user-with-no-id.ts +226 -0
  253. package/src/lib/Apis/models/user.ts +232 -0
  254. package/src/lib/Apis/models/users-paginated-response.ts +52 -0
  255. package/src/lib/Apis/models/verify-email-dto.ts +33 -0
  256. package/src/lib/Apis/models/zone-single-size.ts +51 -0
  257. package/src/lib/Apis/models/zone.ts +106 -0
  258. package/src/lib/Apis/wrapper.ts +37 -0
  259. package/src/lib/api/auth.ts +81 -0
  260. package/src/lib/api/cart.ts +42 -0
  261. package/src/lib/api/client.ts +118 -0
  262. package/src/lib/api/orders.ts +53 -0
  263. package/src/lib/api/products.ts +51 -0
  264. package/src/lib/api-adapter/auth-adapter.ts +196 -0
  265. package/src/lib/api-adapter/cart-adapter.ts +193 -0
  266. package/src/lib/api-adapter/config.ts +76 -0
  267. package/src/lib/api-adapter/index.ts +13 -0
  268. package/src/lib/api-adapter/mappers.ts +147 -0
  269. package/src/lib/api-adapter/orders-adapter.ts +195 -0
  270. package/src/lib/api-adapter/products-adapter.ts +194 -0
  271. package/src/lib/types/index.ts +152 -0
  272. package/src/lib/utils/colors.ts +51 -0
  273. package/src/lib/utils/format.ts +48 -0
  274. package/src/providers/AuthProvider.tsx +117 -0
  275. package/src/providers/CartProvider.tsx +131 -0
  276. package/src/providers/EcommerceProvider.tsx +34 -0
  277. package/src/providers/ThemeProvider.tsx +57 -0
  278. package/src/screens/CartScreen.tsx +140 -0
  279. package/src/screens/CheckoutScreen.tsx +340 -0
  280. package/src/screens/CurrentOrdersScreen.tsx +85 -0
  281. package/src/screens/LoginScreen.tsx +149 -0
  282. package/src/screens/OrdersScreen.tsx +86 -0
  283. package/src/screens/ProductDetailScreen.tsx +255 -0
  284. package/src/screens/ProfileScreen.tsx +211 -0
  285. package/src/screens/RegisterScreen.tsx +200 -0
  286. package/src/screens/ShopScreen.tsx +233 -0
  287. package/src/styles/globals.css +51 -0
@@ -0,0 +1,1311 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Hey Pharamcist API
5
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+ *
7
+ * OpenAPI spec version: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
15
+ import { Configuration } from '../configuration';
16
+ // Some imports not used depending on template conditions
17
+ // @ts-ignore
18
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
19
+ import { Appointment } from '../models';
20
+ import { AvailableSuggestedDatesDto } from '../models';
21
+ import { CreateEventDto } from '../models';
22
+ import { Event } from '../models';
23
+ import { GenerateDaySlotsDto } from '../models';
24
+ import { GenerateMonthSlotsDto } from '../models';
25
+ import { GenerateWeekSlotsDto } from '../models';
26
+ import { ReserveAppointment } from '../models';
27
+ import { SuggestedSlot } from '../models';
28
+ import { UpdateEventDto } from '../models';
29
+ /**
30
+ * EventsApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const EventsApiAxiosParamCreator = function (configuration?: Configuration) {
34
+ return {
35
+ /**
36
+ *
37
+ * @summary Cancel an appointment
38
+ * @param {string} id
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ cancelAppointment: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
+ // verify required parameter 'id' is not null or undefined
44
+ if (id === null || id === undefined) {
45
+ throw new RequiredError('id','Required parameter id was null or undefined when calling cancelAppointment.');
46
+ }
47
+ const localVarPath = `/events/cancel-appointment/{id}`
48
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
56
+ const localVarHeaderParameter = {} as any;
57
+ const localVarQueryParameter = {} as any;
58
+
59
+ // authentication x-store-key required
60
+ if (configuration && configuration.apiKey) {
61
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
62
+ ? await configuration.apiKey("x-store-key")
63
+ : await configuration.apiKey;
64
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
65
+ }
66
+
67
+ const query = new URLSearchParams(localVarUrlObj.search);
68
+ for (const key in localVarQueryParameter) {
69
+ query.set(key, localVarQueryParameter[key]);
70
+ }
71
+ for (const key in options.params) {
72
+ query.set(key, options.params[key]);
73
+ }
74
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+
78
+ return {
79
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ /**
84
+ *
85
+ * @summary Create an appointment
86
+ * @param {ReserveAppointment} body
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ createAppointment: async (body: ReserveAppointment, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ // verify required parameter 'body' is not null or undefined
92
+ if (body === null || body === undefined) {
93
+ throw new RequiredError('body','Required parameter body was null or undefined when calling createAppointment.');
94
+ }
95
+ const localVarPath = `/events/create-appointment`;
96
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
97
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
98
+ let baseOptions;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ }
102
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
103
+ const localVarHeaderParameter = {} as any;
104
+ const localVarQueryParameter = {} as any;
105
+
106
+ // authentication x-store-key required
107
+ if (configuration && configuration.apiKey) {
108
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
109
+ ? await configuration.apiKey("x-store-key")
110
+ : await configuration.apiKey;
111
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
112
+ }
113
+
114
+ localVarHeaderParameter['Content-Type'] = 'application/json';
115
+
116
+ const query = new URLSearchParams(localVarUrlObj.search);
117
+ for (const key in localVarQueryParameter) {
118
+ query.set(key, localVarQueryParameter[key]);
119
+ }
120
+ for (const key in options.params) {
121
+ query.set(key, options.params[key]);
122
+ }
123
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
126
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
127
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
128
+
129
+ return {
130
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
131
+ options: localVarRequestOptions,
132
+ };
133
+ },
134
+ /**
135
+ *
136
+ * @summary Create an appointment
137
+ * @param {ReserveAppointment} body
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ createAppointmentV2: async (body: ReserveAppointment, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ // verify required parameter 'body' is not null or undefined
143
+ if (body === null || body === undefined) {
144
+ throw new RequiredError('body','Required parameter body was null or undefined when calling createAppointmentV2.');
145
+ }
146
+ const localVarPath = `/events/create-appointment-v2`;
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
149
+ let baseOptions;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ }
153
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
154
+ const localVarHeaderParameter = {} as any;
155
+ const localVarQueryParameter = {} as any;
156
+
157
+ // authentication x-store-key required
158
+ if (configuration && configuration.apiKey) {
159
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
160
+ ? await configuration.apiKey("x-store-key")
161
+ : await configuration.apiKey;
162
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
163
+ }
164
+
165
+ localVarHeaderParameter['Content-Type'] = 'application/json';
166
+
167
+ const query = new URLSearchParams(localVarUrlObj.search);
168
+ for (const key in localVarQueryParameter) {
169
+ query.set(key, localVarQueryParameter[key]);
170
+ }
171
+ for (const key in options.params) {
172
+ query.set(key, options.params[key]);
173
+ }
174
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
175
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
176
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
177
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
178
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
179
+
180
+ return {
181
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
182
+ options: localVarRequestOptions,
183
+ };
184
+ },
185
+ /**
186
+ *
187
+ * @summary Create an event
188
+ * @param {CreateEventDto} body
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ */
192
+ createEvent: async (body: CreateEventDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
193
+ // verify required parameter 'body' is not null or undefined
194
+ if (body === null || body === undefined) {
195
+ throw new RequiredError('body','Required parameter body was null or undefined when calling createEvent.');
196
+ }
197
+ const localVarPath = `/events/create-event`;
198
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
199
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
200
+ let baseOptions;
201
+ if (configuration) {
202
+ baseOptions = configuration.baseOptions;
203
+ }
204
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
205
+ const localVarHeaderParameter = {} as any;
206
+ const localVarQueryParameter = {} as any;
207
+
208
+ // authentication x-store-key required
209
+ if (configuration && configuration.apiKey) {
210
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
211
+ ? await configuration.apiKey("x-store-key")
212
+ : await configuration.apiKey;
213
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
214
+ }
215
+
216
+ localVarHeaderParameter['Content-Type'] = 'application/json';
217
+
218
+ const query = new URLSearchParams(localVarUrlObj.search);
219
+ for (const key in localVarQueryParameter) {
220
+ query.set(key, localVarQueryParameter[key]);
221
+ }
222
+ for (const key in options.params) {
223
+ query.set(key, options.params[key]);
224
+ }
225
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
226
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
227
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
228
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
229
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
230
+
231
+ return {
232
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
233
+ options: localVarRequestOptions,
234
+ };
235
+ },
236
+ /**
237
+ *
238
+ * @summary Delete an event
239
+ * @param {string} id
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ */
243
+ deleteEvent: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
244
+ // verify required parameter 'id' is not null or undefined
245
+ if (id === null || id === undefined) {
246
+ throw new RequiredError('id','Required parameter id was null or undefined when calling deleteEvent.');
247
+ }
248
+ const localVarPath = `/events/delete-event/{id}`
249
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
250
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
251
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
252
+ let baseOptions;
253
+ if (configuration) {
254
+ baseOptions = configuration.baseOptions;
255
+ }
256
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
257
+ const localVarHeaderParameter = {} as any;
258
+ const localVarQueryParameter = {} as any;
259
+
260
+ // authentication x-store-key required
261
+ if (configuration && configuration.apiKey) {
262
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
263
+ ? await configuration.apiKey("x-store-key")
264
+ : await configuration.apiKey;
265
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
266
+ }
267
+
268
+ const query = new URLSearchParams(localVarUrlObj.search);
269
+ for (const key in localVarQueryParameter) {
270
+ query.set(key, localVarQueryParameter[key]);
271
+ }
272
+ for (const key in options.params) {
273
+ query.set(key, options.params[key]);
274
+ }
275
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
276
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
277
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
278
+
279
+ return {
280
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
281
+ options: localVarRequestOptions,
282
+ };
283
+ },
284
+ /**
285
+ *
286
+ * @summary Helper function to generate slots for a day
287
+ * @param {GenerateDaySlotsDto} body
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ generateSlotsForDay: async (body: GenerateDaySlotsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
292
+ // verify required parameter 'body' is not null or undefined
293
+ if (body === null || body === undefined) {
294
+ throw new RequiredError('body','Required parameter body was null or undefined when calling generateSlotsForDay.');
295
+ }
296
+ const localVarPath = `/events/generate-slots-for-day`;
297
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
298
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
299
+ let baseOptions;
300
+ if (configuration) {
301
+ baseOptions = configuration.baseOptions;
302
+ }
303
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
304
+ const localVarHeaderParameter = {} as any;
305
+ const localVarQueryParameter = {} as any;
306
+
307
+ // authentication x-store-key required
308
+ if (configuration && configuration.apiKey) {
309
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
310
+ ? await configuration.apiKey("x-store-key")
311
+ : await configuration.apiKey;
312
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
313
+ }
314
+
315
+ localVarHeaderParameter['Content-Type'] = 'application/json';
316
+
317
+ const query = new URLSearchParams(localVarUrlObj.search);
318
+ for (const key in localVarQueryParameter) {
319
+ query.set(key, localVarQueryParameter[key]);
320
+ }
321
+ for (const key in options.params) {
322
+ query.set(key, options.params[key]);
323
+ }
324
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
325
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
326
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
327
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
328
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
329
+
330
+ return {
331
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
332
+ options: localVarRequestOptions,
333
+ };
334
+ },
335
+ /**
336
+ *
337
+ * @summary Helper function to generate slots for a month
338
+ * @param {GenerateMonthSlotsDto} body
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ generateSlotsForMonth: async (body: GenerateMonthSlotsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
343
+ // verify required parameter 'body' is not null or undefined
344
+ if (body === null || body === undefined) {
345
+ throw new RequiredError('body','Required parameter body was null or undefined when calling generateSlotsForMonth.');
346
+ }
347
+ const localVarPath = `/events/generate-slots-for-month`;
348
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
349
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
350
+ let baseOptions;
351
+ if (configuration) {
352
+ baseOptions = configuration.baseOptions;
353
+ }
354
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
355
+ const localVarHeaderParameter = {} as any;
356
+ const localVarQueryParameter = {} as any;
357
+
358
+ // authentication x-store-key required
359
+ if (configuration && configuration.apiKey) {
360
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
361
+ ? await configuration.apiKey("x-store-key")
362
+ : await configuration.apiKey;
363
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
364
+ }
365
+
366
+ localVarHeaderParameter['Content-Type'] = 'application/json';
367
+
368
+ const query = new URLSearchParams(localVarUrlObj.search);
369
+ for (const key in localVarQueryParameter) {
370
+ query.set(key, localVarQueryParameter[key]);
371
+ }
372
+ for (const key in options.params) {
373
+ query.set(key, options.params[key]);
374
+ }
375
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
376
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
377
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
378
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
379
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
380
+
381
+ return {
382
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
383
+ options: localVarRequestOptions,
384
+ };
385
+ },
386
+ /**
387
+ *
388
+ * @summary Helper function to generate slots for a week
389
+ * @param {GenerateWeekSlotsDto} body
390
+ * @param {*} [options] Override http request option.
391
+ * @throws {RequiredError}
392
+ */
393
+ generateSlotsForWeek: async (body: GenerateWeekSlotsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
394
+ // verify required parameter 'body' is not null or undefined
395
+ if (body === null || body === undefined) {
396
+ throw new RequiredError('body','Required parameter body was null or undefined when calling generateSlotsForWeek.');
397
+ }
398
+ const localVarPath = `/events/generate-slots-for-week`;
399
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
400
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
401
+ let baseOptions;
402
+ if (configuration) {
403
+ baseOptions = configuration.baseOptions;
404
+ }
405
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
406
+ const localVarHeaderParameter = {} as any;
407
+ const localVarQueryParameter = {} as any;
408
+
409
+ // authentication x-store-key required
410
+ if (configuration && configuration.apiKey) {
411
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
412
+ ? await configuration.apiKey("x-store-key")
413
+ : await configuration.apiKey;
414
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
415
+ }
416
+
417
+ localVarHeaderParameter['Content-Type'] = 'application/json';
418
+
419
+ const query = new URLSearchParams(localVarUrlObj.search);
420
+ for (const key in localVarQueryParameter) {
421
+ query.set(key, localVarQueryParameter[key]);
422
+ }
423
+ for (const key in options.params) {
424
+ query.set(key, options.params[key]);
425
+ }
426
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
427
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
428
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
429
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
430
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
431
+
432
+ return {
433
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
434
+ options: localVarRequestOptions,
435
+ };
436
+ },
437
+ /**
438
+ *
439
+ * @summary Get all appointments for a store
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ getAllAppointments: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
444
+ const localVarPath = `/events/all-store-appointments`;
445
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
446
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
447
+ let baseOptions;
448
+ if (configuration) {
449
+ baseOptions = configuration.baseOptions;
450
+ }
451
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
452
+ const localVarHeaderParameter = {} as any;
453
+ const localVarQueryParameter = {} as any;
454
+
455
+ // authentication x-store-key required
456
+ if (configuration && configuration.apiKey) {
457
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
458
+ ? await configuration.apiKey("x-store-key")
459
+ : await configuration.apiKey;
460
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
461
+ }
462
+
463
+ const query = new URLSearchParams(localVarUrlObj.search);
464
+ for (const key in localVarQueryParameter) {
465
+ query.set(key, localVarQueryParameter[key]);
466
+ }
467
+ for (const key in options.params) {
468
+ query.set(key, options.params[key]);
469
+ }
470
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
471
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
472
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
473
+
474
+ return {
475
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
476
+ options: localVarRequestOptions,
477
+ };
478
+ },
479
+ /**
480
+ *
481
+ * @summary Get all appointments for a date
482
+ * @param {string} id
483
+ * @param {*} [options] Override http request option.
484
+ * @throws {RequiredError}
485
+ */
486
+ getAllAppointmentsForDate: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
487
+ // verify required parameter 'id' is not null or undefined
488
+ if (id === null || id === undefined) {
489
+ throw new RequiredError('id','Required parameter id was null or undefined when calling getAllAppointmentsForDate.');
490
+ }
491
+ const localVarPath = `/events/all-appointments-for-date/{id}`
492
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
493
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
494
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
495
+ let baseOptions;
496
+ if (configuration) {
497
+ baseOptions = configuration.baseOptions;
498
+ }
499
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
500
+ const localVarHeaderParameter = {} as any;
501
+ const localVarQueryParameter = {} as any;
502
+
503
+ // authentication x-store-key required
504
+ if (configuration && configuration.apiKey) {
505
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
506
+ ? await configuration.apiKey("x-store-key")
507
+ : await configuration.apiKey;
508
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
509
+ }
510
+
511
+ const query = new URLSearchParams(localVarUrlObj.search);
512
+ for (const key in localVarQueryParameter) {
513
+ query.set(key, localVarQueryParameter[key]);
514
+ }
515
+ for (const key in options.params) {
516
+ query.set(key, options.params[key]);
517
+ }
518
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
519
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
520
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
521
+
522
+ return {
523
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
524
+ options: localVarRequestOptions,
525
+ };
526
+ },
527
+ /**
528
+ *
529
+ * @summary Get all appointments for an event
530
+ * @param {string} id
531
+ * @param {*} [options] Override http request option.
532
+ * @throws {RequiredError}
533
+ */
534
+ getAllEventAppointments: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
535
+ // verify required parameter 'id' is not null or undefined
536
+ if (id === null || id === undefined) {
537
+ throw new RequiredError('id','Required parameter id was null or undefined when calling getAllEventAppointments.');
538
+ }
539
+ const localVarPath = `/events/all-event-appointments/{id}`
540
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
541
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
542
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
543
+ let baseOptions;
544
+ if (configuration) {
545
+ baseOptions = configuration.baseOptions;
546
+ }
547
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
548
+ const localVarHeaderParameter = {} as any;
549
+ const localVarQueryParameter = {} as any;
550
+
551
+ // authentication x-store-key required
552
+ if (configuration && configuration.apiKey) {
553
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
554
+ ? await configuration.apiKey("x-store-key")
555
+ : await configuration.apiKey;
556
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
557
+ }
558
+
559
+ const query = new URLSearchParams(localVarUrlObj.search);
560
+ for (const key in localVarQueryParameter) {
561
+ query.set(key, localVarQueryParameter[key]);
562
+ }
563
+ for (const key in options.params) {
564
+ query.set(key, options.params[key]);
565
+ }
566
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
568
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
569
+
570
+ return {
571
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
572
+ options: localVarRequestOptions,
573
+ };
574
+ },
575
+ /**
576
+ *
577
+ * @summary Get all events
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ */
581
+ getAllEvents: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
582
+ const localVarPath = `/events/all-events`;
583
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
584
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
585
+ let baseOptions;
586
+ if (configuration) {
587
+ baseOptions = configuration.baseOptions;
588
+ }
589
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
590
+ const localVarHeaderParameter = {} as any;
591
+ const localVarQueryParameter = {} as any;
592
+
593
+ // authentication x-store-key required
594
+ if (configuration && configuration.apiKey) {
595
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
596
+ ? await configuration.apiKey("x-store-key")
597
+ : await configuration.apiKey;
598
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
599
+ }
600
+
601
+ const query = new URLSearchParams(localVarUrlObj.search);
602
+ for (const key in localVarQueryParameter) {
603
+ query.set(key, localVarQueryParameter[key]);
604
+ }
605
+ for (const key in options.params) {
606
+ query.set(key, options.params[key]);
607
+ }
608
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
609
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
610
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
611
+
612
+ return {
613
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
614
+ options: localVarRequestOptions,
615
+ };
616
+ },
617
+ /**
618
+ *
619
+ * @summary Get all appointments for a user
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ */
623
+ getAllUserAppointments: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
624
+ const localVarPath = `/events/all-user-appointments`;
625
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
626
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
627
+ let baseOptions;
628
+ if (configuration) {
629
+ baseOptions = configuration.baseOptions;
630
+ }
631
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
632
+ const localVarHeaderParameter = {} as any;
633
+ const localVarQueryParameter = {} as any;
634
+
635
+ // authentication x-store-key required
636
+ if (configuration && configuration.apiKey) {
637
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
638
+ ? await configuration.apiKey("x-store-key")
639
+ : await configuration.apiKey;
640
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
641
+ }
642
+
643
+ const query = new URLSearchParams(localVarUrlObj.search);
644
+ for (const key in localVarQueryParameter) {
645
+ query.set(key, localVarQueryParameter[key]);
646
+ }
647
+ for (const key in options.params) {
648
+ query.set(key, options.params[key]);
649
+ }
650
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
651
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
652
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
653
+
654
+ return {
655
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
656
+ options: localVarRequestOptions,
657
+ };
658
+ },
659
+ /**
660
+ *
661
+ * @summary Get a single event
662
+ * @param {string} id
663
+ * @param {*} [options] Override http request option.
664
+ * @throws {RequiredError}
665
+ */
666
+ getEventById: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
667
+ // verify required parameter 'id' is not null or undefined
668
+ if (id === null || id === undefined) {
669
+ throw new RequiredError('id','Required parameter id was null or undefined when calling getEventById.');
670
+ }
671
+ const localVarPath = `/events/single-event/{id}`
672
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
673
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
674
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
675
+ let baseOptions;
676
+ if (configuration) {
677
+ baseOptions = configuration.baseOptions;
678
+ }
679
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
680
+ const localVarHeaderParameter = {} as any;
681
+ const localVarQueryParameter = {} as any;
682
+
683
+ // authentication x-store-key required
684
+ if (configuration && configuration.apiKey) {
685
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
686
+ ? await configuration.apiKey("x-store-key")
687
+ : await configuration.apiKey;
688
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
689
+ }
690
+
691
+ const query = new URLSearchParams(localVarUrlObj.search);
692
+ for (const key in localVarQueryParameter) {
693
+ query.set(key, localVarQueryParameter[key]);
694
+ }
695
+ for (const key in options.params) {
696
+ query.set(key, options.params[key]);
697
+ }
698
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
699
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
700
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
701
+
702
+ return {
703
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
704
+ options: localVarRequestOptions,
705
+ };
706
+ },
707
+ /**
708
+ *
709
+ * @summary Update an event
710
+ * @param {UpdateEventDto} body
711
+ * @param {string} id
712
+ * @param {*} [options] Override http request option.
713
+ * @throws {RequiredError}
714
+ */
715
+ updateEvent: async (body: UpdateEventDto, id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
716
+ // verify required parameter 'body' is not null or undefined
717
+ if (body === null || body === undefined) {
718
+ throw new RequiredError('body','Required parameter body was null or undefined when calling updateEvent.');
719
+ }
720
+ // verify required parameter 'id' is not null or undefined
721
+ if (id === null || id === undefined) {
722
+ throw new RequiredError('id','Required parameter id was null or undefined when calling updateEvent.');
723
+ }
724
+ const localVarPath = `/events/update-event/{id}`
725
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
726
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
727
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
728
+ let baseOptions;
729
+ if (configuration) {
730
+ baseOptions = configuration.baseOptions;
731
+ }
732
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
733
+ const localVarHeaderParameter = {} as any;
734
+ const localVarQueryParameter = {} as any;
735
+
736
+ // authentication x-store-key required
737
+ if (configuration && configuration.apiKey) {
738
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
739
+ ? await configuration.apiKey("x-store-key")
740
+ : await configuration.apiKey;
741
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
742
+ }
743
+
744
+ localVarHeaderParameter['Content-Type'] = 'application/json';
745
+
746
+ const query = new URLSearchParams(localVarUrlObj.search);
747
+ for (const key in localVarQueryParameter) {
748
+ query.set(key, localVarQueryParameter[key]);
749
+ }
750
+ for (const key in options.params) {
751
+ query.set(key, options.params[key]);
752
+ }
753
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
754
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
755
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
756
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
757
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
758
+
759
+ return {
760
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
761
+ options: localVarRequestOptions,
762
+ };
763
+ },
764
+ }
765
+ };
766
+
767
+ /**
768
+ * EventsApi - functional programming interface
769
+ * @export
770
+ */
771
+ export const EventsApiFp = function(configuration?: Configuration) {
772
+ return {
773
+ /**
774
+ *
775
+ * @summary Cancel an appointment
776
+ * @param {string} id
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ */
780
+ async cancelAppointment(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
781
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).cancelAppointment(id, options);
782
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
783
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
784
+ return axios.request(axiosRequestArgs);
785
+ };
786
+ },
787
+ /**
788
+ *
789
+ * @summary Create an appointment
790
+ * @param {ReserveAppointment} body
791
+ * @param {*} [options] Override http request option.
792
+ * @throws {RequiredError}
793
+ */
794
+ async createAppointment(body: ReserveAppointment, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Appointment>>> {
795
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).createAppointment(body, options);
796
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
797
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
798
+ return axios.request(axiosRequestArgs);
799
+ };
800
+ },
801
+ /**
802
+ *
803
+ * @summary Create an appointment
804
+ * @param {ReserveAppointment} body
805
+ * @param {*} [options] Override http request option.
806
+ * @throws {RequiredError}
807
+ */
808
+ async createAppointmentV2(body: ReserveAppointment, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Appointment>>> {
809
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).createAppointmentV2(body, options);
810
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
811
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
812
+ return axios.request(axiosRequestArgs);
813
+ };
814
+ },
815
+ /**
816
+ *
817
+ * @summary Create an event
818
+ * @param {CreateEventDto} body
819
+ * @param {*} [options] Override http request option.
820
+ * @throws {RequiredError}
821
+ */
822
+ async createEvent(body: CreateEventDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Event>>> {
823
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).createEvent(body, options);
824
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
825
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
826
+ return axios.request(axiosRequestArgs);
827
+ };
828
+ },
829
+ /**
830
+ *
831
+ * @summary Delete an event
832
+ * @param {string} id
833
+ * @param {*} [options] Override http request option.
834
+ * @throws {RequiredError}
835
+ */
836
+ async deleteEvent(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
837
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).deleteEvent(id, options);
838
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
839
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
840
+ return axios.request(axiosRequestArgs);
841
+ };
842
+ },
843
+ /**
844
+ *
845
+ * @summary Helper function to generate slots for a day
846
+ * @param {GenerateDaySlotsDto} body
847
+ * @param {*} [options] Override http request option.
848
+ * @throws {RequiredError}
849
+ */
850
+ async generateSlotsForDay(body: GenerateDaySlotsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<SuggestedSlot>>>> {
851
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).generateSlotsForDay(body, options);
852
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
853
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
854
+ return axios.request(axiosRequestArgs);
855
+ };
856
+ },
857
+ /**
858
+ *
859
+ * @summary Helper function to generate slots for a month
860
+ * @param {GenerateMonthSlotsDto} body
861
+ * @param {*} [options] Override http request option.
862
+ * @throws {RequiredError}
863
+ */
864
+ async generateSlotsForMonth(body: GenerateMonthSlotsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<AvailableSuggestedDatesDto>>>> {
865
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).generateSlotsForMonth(body, options);
866
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
867
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
868
+ return axios.request(axiosRequestArgs);
869
+ };
870
+ },
871
+ /**
872
+ *
873
+ * @summary Helper function to generate slots for a week
874
+ * @param {GenerateWeekSlotsDto} body
875
+ * @param {*} [options] Override http request option.
876
+ * @throws {RequiredError}
877
+ */
878
+ async generateSlotsForWeek(body: GenerateWeekSlotsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<AvailableSuggestedDatesDto>>>> {
879
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).generateSlotsForWeek(body, options);
880
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
881
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
882
+ return axios.request(axiosRequestArgs);
883
+ };
884
+ },
885
+ /**
886
+ *
887
+ * @summary Get all appointments for a store
888
+ * @param {*} [options] Override http request option.
889
+ * @throws {RequiredError}
890
+ */
891
+ async getAllAppointments(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Appointment>>>> {
892
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).getAllAppointments(options);
893
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
894
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
895
+ return axios.request(axiosRequestArgs);
896
+ };
897
+ },
898
+ /**
899
+ *
900
+ * @summary Get all appointments for a date
901
+ * @param {string} id
902
+ * @param {*} [options] Override http request option.
903
+ * @throws {RequiredError}
904
+ */
905
+ async getAllAppointmentsForDate(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Appointment>>>> {
906
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).getAllAppointmentsForDate(id, options);
907
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
908
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
909
+ return axios.request(axiosRequestArgs);
910
+ };
911
+ },
912
+ /**
913
+ *
914
+ * @summary Get all appointments for an event
915
+ * @param {string} id
916
+ * @param {*} [options] Override http request option.
917
+ * @throws {RequiredError}
918
+ */
919
+ async getAllEventAppointments(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Appointment>>>> {
920
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).getAllEventAppointments(id, options);
921
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
922
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
923
+ return axios.request(axiosRequestArgs);
924
+ };
925
+ },
926
+ /**
927
+ *
928
+ * @summary Get all events
929
+ * @param {*} [options] Override http request option.
930
+ * @throws {RequiredError}
931
+ */
932
+ async getAllEvents(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Event>>>> {
933
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).getAllEvents(options);
934
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
935
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
936
+ return axios.request(axiosRequestArgs);
937
+ };
938
+ },
939
+ /**
940
+ *
941
+ * @summary Get all appointments for a user
942
+ * @param {*} [options] Override http request option.
943
+ * @throws {RequiredError}
944
+ */
945
+ async getAllUserAppointments(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Appointment>>>> {
946
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).getAllUserAppointments(options);
947
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
948
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
949
+ return axios.request(axiosRequestArgs);
950
+ };
951
+ },
952
+ /**
953
+ *
954
+ * @summary Get a single event
955
+ * @param {string} id
956
+ * @param {*} [options] Override http request option.
957
+ * @throws {RequiredError}
958
+ */
959
+ async getEventById(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Event>>> {
960
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).getEventById(id, options);
961
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
962
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
963
+ return axios.request(axiosRequestArgs);
964
+ };
965
+ },
966
+ /**
967
+ *
968
+ * @summary Update an event
969
+ * @param {UpdateEventDto} body
970
+ * @param {string} id
971
+ * @param {*} [options] Override http request option.
972
+ * @throws {RequiredError}
973
+ */
974
+ async updateEvent(body: UpdateEventDto, id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Event>>> {
975
+ const localVarAxiosArgs = await EventsApiAxiosParamCreator(configuration).updateEvent(body, id, options);
976
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
977
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
978
+ return axios.request(axiosRequestArgs);
979
+ };
980
+ },
981
+ }
982
+ };
983
+
984
+ /**
985
+ * EventsApi - factory interface
986
+ * @export
987
+ */
988
+ export const EventsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
989
+ return {
990
+ /**
991
+ *
992
+ * @summary Cancel an appointment
993
+ * @param {string} id
994
+ * @param {*} [options] Override http request option.
995
+ * @throws {RequiredError}
996
+ */
997
+ async cancelAppointment(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
998
+ return EventsApiFp(configuration).cancelAppointment(id, options).then((request) => request(axios, basePath));
999
+ },
1000
+ /**
1001
+ *
1002
+ * @summary Create an appointment
1003
+ * @param {ReserveAppointment} body
1004
+ * @param {*} [options] Override http request option.
1005
+ * @throws {RequiredError}
1006
+ */
1007
+ async createAppointment(body: ReserveAppointment, options?: AxiosRequestConfig): Promise<AxiosResponse<Appointment>> {
1008
+ return EventsApiFp(configuration).createAppointment(body, options).then((request) => request(axios, basePath));
1009
+ },
1010
+ /**
1011
+ *
1012
+ * @summary Create an appointment
1013
+ * @param {ReserveAppointment} body
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ */
1017
+ async createAppointmentV2(body: ReserveAppointment, options?: AxiosRequestConfig): Promise<AxiosResponse<Appointment>> {
1018
+ return EventsApiFp(configuration).createAppointmentV2(body, options).then((request) => request(axios, basePath));
1019
+ },
1020
+ /**
1021
+ *
1022
+ * @summary Create an event
1023
+ * @param {CreateEventDto} body
1024
+ * @param {*} [options] Override http request option.
1025
+ * @throws {RequiredError}
1026
+ */
1027
+ async createEvent(body: CreateEventDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Event>> {
1028
+ return EventsApiFp(configuration).createEvent(body, options).then((request) => request(axios, basePath));
1029
+ },
1030
+ /**
1031
+ *
1032
+ * @summary Delete an event
1033
+ * @param {string} id
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ async deleteEvent(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1038
+ return EventsApiFp(configuration).deleteEvent(id, options).then((request) => request(axios, basePath));
1039
+ },
1040
+ /**
1041
+ *
1042
+ * @summary Helper function to generate slots for a day
1043
+ * @param {GenerateDaySlotsDto} body
1044
+ * @param {*} [options] Override http request option.
1045
+ * @throws {RequiredError}
1046
+ */
1047
+ async generateSlotsForDay(body: GenerateDaySlotsDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<SuggestedSlot>>> {
1048
+ return EventsApiFp(configuration).generateSlotsForDay(body, options).then((request) => request(axios, basePath));
1049
+ },
1050
+ /**
1051
+ *
1052
+ * @summary Helper function to generate slots for a month
1053
+ * @param {GenerateMonthSlotsDto} body
1054
+ * @param {*} [options] Override http request option.
1055
+ * @throws {RequiredError}
1056
+ */
1057
+ async generateSlotsForMonth(body: GenerateMonthSlotsDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<AvailableSuggestedDatesDto>>> {
1058
+ return EventsApiFp(configuration).generateSlotsForMonth(body, options).then((request) => request(axios, basePath));
1059
+ },
1060
+ /**
1061
+ *
1062
+ * @summary Helper function to generate slots for a week
1063
+ * @param {GenerateWeekSlotsDto} body
1064
+ * @param {*} [options] Override http request option.
1065
+ * @throws {RequiredError}
1066
+ */
1067
+ async generateSlotsForWeek(body: GenerateWeekSlotsDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<AvailableSuggestedDatesDto>>> {
1068
+ return EventsApiFp(configuration).generateSlotsForWeek(body, options).then((request) => request(axios, basePath));
1069
+ },
1070
+ /**
1071
+ *
1072
+ * @summary Get all appointments for a store
1073
+ * @param {*} [options] Override http request option.
1074
+ * @throws {RequiredError}
1075
+ */
1076
+ async getAllAppointments(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Appointment>>> {
1077
+ return EventsApiFp(configuration).getAllAppointments(options).then((request) => request(axios, basePath));
1078
+ },
1079
+ /**
1080
+ *
1081
+ * @summary Get all appointments for a date
1082
+ * @param {string} id
1083
+ * @param {*} [options] Override http request option.
1084
+ * @throws {RequiredError}
1085
+ */
1086
+ async getAllAppointmentsForDate(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Appointment>>> {
1087
+ return EventsApiFp(configuration).getAllAppointmentsForDate(id, options).then((request) => request(axios, basePath));
1088
+ },
1089
+ /**
1090
+ *
1091
+ * @summary Get all appointments for an event
1092
+ * @param {string} id
1093
+ * @param {*} [options] Override http request option.
1094
+ * @throws {RequiredError}
1095
+ */
1096
+ async getAllEventAppointments(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Appointment>>> {
1097
+ return EventsApiFp(configuration).getAllEventAppointments(id, options).then((request) => request(axios, basePath));
1098
+ },
1099
+ /**
1100
+ *
1101
+ * @summary Get all events
1102
+ * @param {*} [options] Override http request option.
1103
+ * @throws {RequiredError}
1104
+ */
1105
+ async getAllEvents(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Event>>> {
1106
+ return EventsApiFp(configuration).getAllEvents(options).then((request) => request(axios, basePath));
1107
+ },
1108
+ /**
1109
+ *
1110
+ * @summary Get all appointments for a user
1111
+ * @param {*} [options] Override http request option.
1112
+ * @throws {RequiredError}
1113
+ */
1114
+ async getAllUserAppointments(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Appointment>>> {
1115
+ return EventsApiFp(configuration).getAllUserAppointments(options).then((request) => request(axios, basePath));
1116
+ },
1117
+ /**
1118
+ *
1119
+ * @summary Get a single event
1120
+ * @param {string} id
1121
+ * @param {*} [options] Override http request option.
1122
+ * @throws {RequiredError}
1123
+ */
1124
+ async getEventById(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Event>> {
1125
+ return EventsApiFp(configuration).getEventById(id, options).then((request) => request(axios, basePath));
1126
+ },
1127
+ /**
1128
+ *
1129
+ * @summary Update an event
1130
+ * @param {UpdateEventDto} body
1131
+ * @param {string} id
1132
+ * @param {*} [options] Override http request option.
1133
+ * @throws {RequiredError}
1134
+ */
1135
+ async updateEvent(body: UpdateEventDto, id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Event>> {
1136
+ return EventsApiFp(configuration).updateEvent(body, id, options).then((request) => request(axios, basePath));
1137
+ },
1138
+ };
1139
+ };
1140
+
1141
+ /**
1142
+ * EventsApi - object-oriented interface
1143
+ * @export
1144
+ * @class EventsApi
1145
+ * @extends {BaseAPI}
1146
+ */
1147
+ export class EventsApi extends BaseAPI {
1148
+ /**
1149
+ *
1150
+ * @summary Cancel an appointment
1151
+ * @param {string} id
1152
+ * @param {*} [options] Override http request option.
1153
+ * @throws {RequiredError}
1154
+ * @memberof EventsApi
1155
+ */
1156
+ public async cancelAppointment(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1157
+ return EventsApiFp(this.configuration).cancelAppointment(id, options).then((request) => request(this.axios, this.basePath));
1158
+ }
1159
+ /**
1160
+ *
1161
+ * @summary Create an appointment
1162
+ * @param {ReserveAppointment} body
1163
+ * @param {*} [options] Override http request option.
1164
+ * @throws {RequiredError}
1165
+ * @memberof EventsApi
1166
+ */
1167
+ public async createAppointment(body: ReserveAppointment, options?: AxiosRequestConfig) : Promise<AxiosResponse<Appointment>> {
1168
+ return EventsApiFp(this.configuration).createAppointment(body, options).then((request) => request(this.axios, this.basePath));
1169
+ }
1170
+ /**
1171
+ *
1172
+ * @summary Create an appointment
1173
+ * @param {ReserveAppointment} body
1174
+ * @param {*} [options] Override http request option.
1175
+ * @throws {RequiredError}
1176
+ * @memberof EventsApi
1177
+ */
1178
+ public async createAppointmentV2(body: ReserveAppointment, options?: AxiosRequestConfig) : Promise<AxiosResponse<Appointment>> {
1179
+ return EventsApiFp(this.configuration).createAppointmentV2(body, options).then((request) => request(this.axios, this.basePath));
1180
+ }
1181
+ /**
1182
+ *
1183
+ * @summary Create an event
1184
+ * @param {CreateEventDto} body
1185
+ * @param {*} [options] Override http request option.
1186
+ * @throws {RequiredError}
1187
+ * @memberof EventsApi
1188
+ */
1189
+ public async createEvent(body: CreateEventDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Event>> {
1190
+ return EventsApiFp(this.configuration).createEvent(body, options).then((request) => request(this.axios, this.basePath));
1191
+ }
1192
+ /**
1193
+ *
1194
+ * @summary Delete an event
1195
+ * @param {string} id
1196
+ * @param {*} [options] Override http request option.
1197
+ * @throws {RequiredError}
1198
+ * @memberof EventsApi
1199
+ */
1200
+ public async deleteEvent(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1201
+ return EventsApiFp(this.configuration).deleteEvent(id, options).then((request) => request(this.axios, this.basePath));
1202
+ }
1203
+ /**
1204
+ *
1205
+ * @summary Helper function to generate slots for a day
1206
+ * @param {GenerateDaySlotsDto} body
1207
+ * @param {*} [options] Override http request option.
1208
+ * @throws {RequiredError}
1209
+ * @memberof EventsApi
1210
+ */
1211
+ public async generateSlotsForDay(body: GenerateDaySlotsDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<SuggestedSlot>>> {
1212
+ return EventsApiFp(this.configuration).generateSlotsForDay(body, options).then((request) => request(this.axios, this.basePath));
1213
+ }
1214
+ /**
1215
+ *
1216
+ * @summary Helper function to generate slots for a month
1217
+ * @param {GenerateMonthSlotsDto} body
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ * @memberof EventsApi
1221
+ */
1222
+ public async generateSlotsForMonth(body: GenerateMonthSlotsDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<AvailableSuggestedDatesDto>>> {
1223
+ return EventsApiFp(this.configuration).generateSlotsForMonth(body, options).then((request) => request(this.axios, this.basePath));
1224
+ }
1225
+ /**
1226
+ *
1227
+ * @summary Helper function to generate slots for a week
1228
+ * @param {GenerateWeekSlotsDto} body
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ * @memberof EventsApi
1232
+ */
1233
+ public async generateSlotsForWeek(body: GenerateWeekSlotsDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<AvailableSuggestedDatesDto>>> {
1234
+ return EventsApiFp(this.configuration).generateSlotsForWeek(body, options).then((request) => request(this.axios, this.basePath));
1235
+ }
1236
+ /**
1237
+ *
1238
+ * @summary Get all appointments for a store
1239
+ * @param {*} [options] Override http request option.
1240
+ * @throws {RequiredError}
1241
+ * @memberof EventsApi
1242
+ */
1243
+ public async getAllAppointments(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Appointment>>> {
1244
+ return EventsApiFp(this.configuration).getAllAppointments(options).then((request) => request(this.axios, this.basePath));
1245
+ }
1246
+ /**
1247
+ *
1248
+ * @summary Get all appointments for a date
1249
+ * @param {string} id
1250
+ * @param {*} [options] Override http request option.
1251
+ * @throws {RequiredError}
1252
+ * @memberof EventsApi
1253
+ */
1254
+ public async getAllAppointmentsForDate(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Appointment>>> {
1255
+ return EventsApiFp(this.configuration).getAllAppointmentsForDate(id, options).then((request) => request(this.axios, this.basePath));
1256
+ }
1257
+ /**
1258
+ *
1259
+ * @summary Get all appointments for an event
1260
+ * @param {string} id
1261
+ * @param {*} [options] Override http request option.
1262
+ * @throws {RequiredError}
1263
+ * @memberof EventsApi
1264
+ */
1265
+ public async getAllEventAppointments(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Appointment>>> {
1266
+ return EventsApiFp(this.configuration).getAllEventAppointments(id, options).then((request) => request(this.axios, this.basePath));
1267
+ }
1268
+ /**
1269
+ *
1270
+ * @summary Get all events
1271
+ * @param {*} [options] Override http request option.
1272
+ * @throws {RequiredError}
1273
+ * @memberof EventsApi
1274
+ */
1275
+ public async getAllEvents(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Event>>> {
1276
+ return EventsApiFp(this.configuration).getAllEvents(options).then((request) => request(this.axios, this.basePath));
1277
+ }
1278
+ /**
1279
+ *
1280
+ * @summary Get all appointments for a user
1281
+ * @param {*} [options] Override http request option.
1282
+ * @throws {RequiredError}
1283
+ * @memberof EventsApi
1284
+ */
1285
+ public async getAllUserAppointments(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Appointment>>> {
1286
+ return EventsApiFp(this.configuration).getAllUserAppointments(options).then((request) => request(this.axios, this.basePath));
1287
+ }
1288
+ /**
1289
+ *
1290
+ * @summary Get a single event
1291
+ * @param {string} id
1292
+ * @param {*} [options] Override http request option.
1293
+ * @throws {RequiredError}
1294
+ * @memberof EventsApi
1295
+ */
1296
+ public async getEventById(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Event>> {
1297
+ return EventsApiFp(this.configuration).getEventById(id, options).then((request) => request(this.axios, this.basePath));
1298
+ }
1299
+ /**
1300
+ *
1301
+ * @summary Update an event
1302
+ * @param {UpdateEventDto} body
1303
+ * @param {string} id
1304
+ * @param {*} [options] Override http request option.
1305
+ * @throws {RequiredError}
1306
+ * @memberof EventsApi
1307
+ */
1308
+ public async updateEvent(body: UpdateEventDto, id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Event>> {
1309
+ return EventsApiFp(this.configuration).updateEvent(body, id, options).then((request) => request(this.axios, this.basePath));
1310
+ }
1311
+ }