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,843 @@
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 { CheckNotificationsResponseDto } from '../models';
20
+ import { CreateNotificationDto } from '../models';
21
+ import { Notification } from '../models';
22
+ import { SingleNotificationDto } from '../models';
23
+ /**
24
+ * NotificationsApi - axios parameter creator
25
+ * @export
26
+ */
27
+ export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
28
+ return {
29
+ /**
30
+ *
31
+ * @summary Check notifications to see if the user has new unread notifications or not .. and how many
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ checkNotificaions: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
36
+ const localVarPath = `/notifications/check`;
37
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
38
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
39
+ let baseOptions;
40
+ if (configuration) {
41
+ baseOptions = configuration.baseOptions;
42
+ }
43
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
44
+ const localVarHeaderParameter = {} as any;
45
+ const localVarQueryParameter = {} as any;
46
+
47
+ // authentication bearer required
48
+ // http bearer authentication required
49
+ if (configuration && configuration.accessToken) {
50
+ const accessToken = typeof configuration.accessToken === 'function'
51
+ ? await configuration.accessToken()
52
+ : await configuration.accessToken;
53
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
54
+ }
55
+
56
+ // authentication x-store-key required
57
+ if (configuration && configuration.apiKey) {
58
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
59
+ ? await configuration.apiKey("x-store-key")
60
+ : await configuration.apiKey;
61
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
62
+ }
63
+
64
+ const query = new URLSearchParams(localVarUrlObj.search);
65
+ for (const key in localVarQueryParameter) {
66
+ query.set(key, localVarQueryParameter[key]);
67
+ }
68
+ for (const key in options.params) {
69
+ query.set(key, options.params[key]);
70
+ }
71
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
72
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
73
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
74
+
75
+ return {
76
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
77
+ options: localVarRequestOptions,
78
+ };
79
+ },
80
+ /**
81
+ *
82
+ * @summary Clear all notifications
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ */
86
+ clearAllNotifications: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
87
+ const localVarPath = `/notifications/clear-all`;
88
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
89
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
90
+ let baseOptions;
91
+ if (configuration) {
92
+ baseOptions = configuration.baseOptions;
93
+ }
94
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
95
+ const localVarHeaderParameter = {} as any;
96
+ const localVarQueryParameter = {} as any;
97
+
98
+ // authentication bearer required
99
+ // http bearer authentication required
100
+ if (configuration && configuration.accessToken) {
101
+ const accessToken = typeof configuration.accessToken === 'function'
102
+ ? await configuration.accessToken()
103
+ : await configuration.accessToken;
104
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
105
+ }
106
+
107
+ // authentication x-store-key required
108
+ if (configuration && configuration.apiKey) {
109
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
110
+ ? await configuration.apiKey("x-store-key")
111
+ : await configuration.apiKey;
112
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
113
+ }
114
+
115
+ const query = new URLSearchParams(localVarUrlObj.search);
116
+ for (const key in localVarQueryParameter) {
117
+ query.set(key, localVarQueryParameter[key]);
118
+ }
119
+ for (const key in options.params) {
120
+ query.set(key, options.params[key]);
121
+ }
122
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
125
+
126
+ return {
127
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
131
+ /**
132
+ *
133
+ * @summary Clear a notification
134
+ * @param {string} notificationId
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ clearNotification: async (notificationId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
139
+ // verify required parameter 'notificationId' is not null or undefined
140
+ if (notificationId === null || notificationId === undefined) {
141
+ throw new RequiredError('notificationId','Required parameter notificationId was null or undefined when calling clearNotification.');
142
+ }
143
+ const localVarPath = `/notifications/clear/{notificationId}`
144
+ .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId)));
145
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
146
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
147
+ let baseOptions;
148
+ if (configuration) {
149
+ baseOptions = configuration.baseOptions;
150
+ }
151
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
152
+ const localVarHeaderParameter = {} as any;
153
+ const localVarQueryParameter = {} as any;
154
+
155
+ // authentication bearer required
156
+ // http bearer authentication required
157
+ if (configuration && configuration.accessToken) {
158
+ const accessToken = typeof configuration.accessToken === 'function'
159
+ ? await configuration.accessToken()
160
+ : await configuration.accessToken;
161
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
162
+ }
163
+
164
+ // authentication x-store-key required
165
+ if (configuration && configuration.apiKey) {
166
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
167
+ ? await configuration.apiKey("x-store-key")
168
+ : await configuration.apiKey;
169
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
170
+ }
171
+
172
+ const query = new URLSearchParams(localVarUrlObj.search);
173
+ for (const key in localVarQueryParameter) {
174
+ query.set(key, localVarQueryParameter[key]);
175
+ }
176
+ for (const key in options.params) {
177
+ query.set(key, options.params[key]);
178
+ }
179
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
180
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
182
+
183
+ return {
184
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
185
+ options: localVarRequestOptions,
186
+ };
187
+ },
188
+ /**
189
+ *
190
+ * @summary Create a new notification
191
+ * @param {CreateNotificationDto} body
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ */
195
+ createNotification: async (body: CreateNotificationDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
196
+ // verify required parameter 'body' is not null or undefined
197
+ if (body === null || body === undefined) {
198
+ throw new RequiredError('body','Required parameter body was null or undefined when calling createNotification.');
199
+ }
200
+ const localVarPath = `/notifications`;
201
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
202
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
203
+ let baseOptions;
204
+ if (configuration) {
205
+ baseOptions = configuration.baseOptions;
206
+ }
207
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
208
+ const localVarHeaderParameter = {} as any;
209
+ const localVarQueryParameter = {} as any;
210
+
211
+ // authentication bearer required
212
+ // http bearer authentication required
213
+ if (configuration && configuration.accessToken) {
214
+ const accessToken = typeof configuration.accessToken === 'function'
215
+ ? await configuration.accessToken()
216
+ : await configuration.accessToken;
217
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
218
+ }
219
+
220
+ // authentication x-store-key required
221
+ if (configuration && configuration.apiKey) {
222
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
223
+ ? await configuration.apiKey("x-store-key")
224
+ : await configuration.apiKey;
225
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
226
+ }
227
+
228
+ localVarHeaderParameter['Content-Type'] = 'application/json';
229
+
230
+ const query = new URLSearchParams(localVarUrlObj.search);
231
+ for (const key in localVarQueryParameter) {
232
+ query.set(key, localVarQueryParameter[key]);
233
+ }
234
+ for (const key in options.params) {
235
+ query.set(key, options.params[key]);
236
+ }
237
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
238
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
239
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
240
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
241
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
242
+
243
+ return {
244
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
245
+ options: localVarRequestOptions,
246
+ };
247
+ },
248
+ /**
249
+ *
250
+ * @summary Get all admin notifications
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ getAllAdminNotifications: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
255
+ const localVarPath = `/notifications/admin`;
256
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
257
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
258
+ let baseOptions;
259
+ if (configuration) {
260
+ baseOptions = configuration.baseOptions;
261
+ }
262
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
263
+ const localVarHeaderParameter = {} as any;
264
+ const localVarQueryParameter = {} as any;
265
+
266
+ // authentication bearer required
267
+ // http bearer authentication required
268
+ if (configuration && configuration.accessToken) {
269
+ const accessToken = typeof configuration.accessToken === 'function'
270
+ ? await configuration.accessToken()
271
+ : await configuration.accessToken;
272
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
273
+ }
274
+
275
+ // authentication x-store-key required
276
+ if (configuration && configuration.apiKey) {
277
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
278
+ ? await configuration.apiKey("x-store-key")
279
+ : await configuration.apiKey;
280
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
281
+ }
282
+
283
+ const query = new URLSearchParams(localVarUrlObj.search);
284
+ for (const key in localVarQueryParameter) {
285
+ query.set(key, localVarQueryParameter[key]);
286
+ }
287
+ for (const key in options.params) {
288
+ query.set(key, options.params[key]);
289
+ }
290
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
291
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
293
+
294
+ return {
295
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
296
+ options: localVarRequestOptions,
297
+ };
298
+ },
299
+ /**
300
+ *
301
+ * @summary Get all notifications for the user
302
+ * @param {*} [options] Override http request option.
303
+ * @throws {RequiredError}
304
+ */
305
+ getAllNotificationsForUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
306
+ const localVarPath = `/notifications/mine`;
307
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
308
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
309
+ let baseOptions;
310
+ if (configuration) {
311
+ baseOptions = configuration.baseOptions;
312
+ }
313
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
314
+ const localVarHeaderParameter = {} as any;
315
+ const localVarQueryParameter = {} as any;
316
+
317
+ // authentication bearer required
318
+ // http bearer authentication required
319
+ if (configuration && configuration.accessToken) {
320
+ const accessToken = typeof configuration.accessToken === 'function'
321
+ ? await configuration.accessToken()
322
+ : await configuration.accessToken;
323
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
324
+ }
325
+
326
+ // authentication x-store-key required
327
+ if (configuration && configuration.apiKey) {
328
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
329
+ ? await configuration.apiKey("x-store-key")
330
+ : await configuration.apiKey;
331
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
332
+ }
333
+
334
+ const query = new URLSearchParams(localVarUrlObj.search);
335
+ for (const key in localVarQueryParameter) {
336
+ query.set(key, localVarQueryParameter[key]);
337
+ }
338
+ for (const key in options.params) {
339
+ query.set(key, options.params[key]);
340
+ }
341
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
342
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
343
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
344
+
345
+ return {
346
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
347
+ options: localVarRequestOptions,
348
+ };
349
+ },
350
+ /**
351
+ *
352
+ * @summary Mark all notifications as read
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ markAllNotificationsAsRead: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
357
+ const localVarPath = `/notifications/mark-all-read`;
358
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
359
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
360
+ let baseOptions;
361
+ if (configuration) {
362
+ baseOptions = configuration.baseOptions;
363
+ }
364
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
365
+ const localVarHeaderParameter = {} as any;
366
+ const localVarQueryParameter = {} as any;
367
+
368
+ // authentication bearer required
369
+ // http bearer authentication required
370
+ if (configuration && configuration.accessToken) {
371
+ const accessToken = typeof configuration.accessToken === 'function'
372
+ ? await configuration.accessToken()
373
+ : await configuration.accessToken;
374
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
375
+ }
376
+
377
+ // authentication x-store-key required
378
+ if (configuration && configuration.apiKey) {
379
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
380
+ ? await configuration.apiKey("x-store-key")
381
+ : await configuration.apiKey;
382
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
383
+ }
384
+
385
+ const query = new URLSearchParams(localVarUrlObj.search);
386
+ for (const key in localVarQueryParameter) {
387
+ query.set(key, localVarQueryParameter[key]);
388
+ }
389
+ for (const key in options.params) {
390
+ query.set(key, options.params[key]);
391
+ }
392
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
393
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
394
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
395
+
396
+ return {
397
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
398
+ options: localVarRequestOptions,
399
+ };
400
+ },
401
+ /**
402
+ *
403
+ * @summary Mark a notification as read
404
+ * @param {string} notificationId
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ */
408
+ markNotificationAsRead: async (notificationId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
409
+ // verify required parameter 'notificationId' is not null or undefined
410
+ if (notificationId === null || notificationId === undefined) {
411
+ throw new RequiredError('notificationId','Required parameter notificationId was null or undefined when calling markNotificationAsRead.');
412
+ }
413
+ const localVarPath = `/notifications/mark-read/{notificationId}`
414
+ .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId)));
415
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
416
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
417
+ let baseOptions;
418
+ if (configuration) {
419
+ baseOptions = configuration.baseOptions;
420
+ }
421
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
422
+ const localVarHeaderParameter = {} as any;
423
+ const localVarQueryParameter = {} as any;
424
+
425
+ // authentication bearer required
426
+ // http bearer authentication required
427
+ if (configuration && configuration.accessToken) {
428
+ const accessToken = typeof configuration.accessToken === 'function'
429
+ ? await configuration.accessToken()
430
+ : await configuration.accessToken;
431
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
432
+ }
433
+
434
+ // authentication x-store-key required
435
+ if (configuration && configuration.apiKey) {
436
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
437
+ ? await configuration.apiKey("x-store-key")
438
+ : await configuration.apiKey;
439
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
440
+ }
441
+
442
+ const query = new URLSearchParams(localVarUrlObj.search);
443
+ for (const key in localVarQueryParameter) {
444
+ query.set(key, localVarQueryParameter[key]);
445
+ }
446
+ for (const key in options.params) {
447
+ query.set(key, options.params[key]);
448
+ }
449
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
450
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
451
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
452
+
453
+ return {
454
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
455
+ options: localVarRequestOptions,
456
+ };
457
+ },
458
+ /**
459
+ *
460
+ * @summary Mark a notification as unread
461
+ * @param {string} notificationId
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ markNotificationAsUnread: async (notificationId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
466
+ // verify required parameter 'notificationId' is not null or undefined
467
+ if (notificationId === null || notificationId === undefined) {
468
+ throw new RequiredError('notificationId','Required parameter notificationId was null or undefined when calling markNotificationAsUnread.');
469
+ }
470
+ const localVarPath = `/notifications/mark-unread/{notificationId}`
471
+ .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId)));
472
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
473
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
474
+ let baseOptions;
475
+ if (configuration) {
476
+ baseOptions = configuration.baseOptions;
477
+ }
478
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
479
+ const localVarHeaderParameter = {} as any;
480
+ const localVarQueryParameter = {} as any;
481
+
482
+ // authentication bearer required
483
+ // http bearer authentication required
484
+ if (configuration && configuration.accessToken) {
485
+ const accessToken = typeof configuration.accessToken === 'function'
486
+ ? await configuration.accessToken()
487
+ : await configuration.accessToken;
488
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
489
+ }
490
+
491
+ // authentication x-store-key required
492
+ if (configuration && configuration.apiKey) {
493
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
494
+ ? await configuration.apiKey("x-store-key")
495
+ : await configuration.apiKey;
496
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
497
+ }
498
+
499
+ const query = new URLSearchParams(localVarUrlObj.search);
500
+ for (const key in localVarQueryParameter) {
501
+ query.set(key, localVarQueryParameter[key]);
502
+ }
503
+ for (const key in options.params) {
504
+ query.set(key, options.params[key]);
505
+ }
506
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
507
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
508
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
509
+
510
+ return {
511
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
512
+ options: localVarRequestOptions,
513
+ };
514
+ },
515
+ }
516
+ };
517
+
518
+ /**
519
+ * NotificationsApi - functional programming interface
520
+ * @export
521
+ */
522
+ export const NotificationsApiFp = function(configuration?: Configuration) {
523
+ return {
524
+ /**
525
+ *
526
+ * @summary Check notifications to see if the user has new unread notifications or not .. and how many
527
+ * @param {*} [options] Override http request option.
528
+ * @throws {RequiredError}
529
+ */
530
+ async checkNotificaions(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<CheckNotificationsResponseDto>>> {
531
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).checkNotificaions(options);
532
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
533
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
534
+ return axios.request(axiosRequestArgs);
535
+ };
536
+ },
537
+ /**
538
+ *
539
+ * @summary Clear all notifications
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ */
543
+ async clearAllNotifications(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<SingleNotificationDto>>>> {
544
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).clearAllNotifications(options);
545
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
546
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
547
+ return axios.request(axiosRequestArgs);
548
+ };
549
+ },
550
+ /**
551
+ *
552
+ * @summary Clear a notification
553
+ * @param {string} notificationId
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ */
557
+ async clearNotification(notificationId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SingleNotificationDto>>> {
558
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).clearNotification(notificationId, options);
559
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
560
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
561
+ return axios.request(axiosRequestArgs);
562
+ };
563
+ },
564
+ /**
565
+ *
566
+ * @summary Create a new notification
567
+ * @param {CreateNotificationDto} body
568
+ * @param {*} [options] Override http request option.
569
+ * @throws {RequiredError}
570
+ */
571
+ async createNotification(body: CreateNotificationDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Notification>>> {
572
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).createNotification(body, options);
573
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
574
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
575
+ return axios.request(axiosRequestArgs);
576
+ };
577
+ },
578
+ /**
579
+ *
580
+ * @summary Get all admin notifications
581
+ * @param {*} [options] Override http request option.
582
+ * @throws {RequiredError}
583
+ */
584
+ async getAllAdminNotifications(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<SingleNotificationDto>>>> {
585
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).getAllAdminNotifications(options);
586
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
587
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
588
+ return axios.request(axiosRequestArgs);
589
+ };
590
+ },
591
+ /**
592
+ *
593
+ * @summary Get all notifications for the user
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ async getAllNotificationsForUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<SingleNotificationDto>>>> {
598
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).getAllNotificationsForUser(options);
599
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
600
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
601
+ return axios.request(axiosRequestArgs);
602
+ };
603
+ },
604
+ /**
605
+ *
606
+ * @summary Mark all notifications as read
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ */
610
+ async markAllNotificationsAsRead(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<SingleNotificationDto>>>> {
611
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).markAllNotificationsAsRead(options);
612
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
613
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
614
+ return axios.request(axiosRequestArgs);
615
+ };
616
+ },
617
+ /**
618
+ *
619
+ * @summary Mark a notification as read
620
+ * @param {string} notificationId
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ async markNotificationAsRead(notificationId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SingleNotificationDto>>> {
625
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).markNotificationAsRead(notificationId, options);
626
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
627
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
628
+ return axios.request(axiosRequestArgs);
629
+ };
630
+ },
631
+ /**
632
+ *
633
+ * @summary Mark a notification as unread
634
+ * @param {string} notificationId
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ async markNotificationAsUnread(notificationId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SingleNotificationDto>>> {
639
+ const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).markNotificationAsUnread(notificationId, options);
640
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
641
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
642
+ return axios.request(axiosRequestArgs);
643
+ };
644
+ },
645
+ }
646
+ };
647
+
648
+ /**
649
+ * NotificationsApi - factory interface
650
+ * @export
651
+ */
652
+ export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
653
+ return {
654
+ /**
655
+ *
656
+ * @summary Check notifications to see if the user has new unread notifications or not .. and how many
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ async checkNotificaions(options?: AxiosRequestConfig): Promise<AxiosResponse<CheckNotificationsResponseDto>> {
661
+ return NotificationsApiFp(configuration).checkNotificaions(options).then((request) => request(axios, basePath));
662
+ },
663
+ /**
664
+ *
665
+ * @summary Clear all notifications
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ async clearAllNotifications(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<SingleNotificationDto>>> {
670
+ return NotificationsApiFp(configuration).clearAllNotifications(options).then((request) => request(axios, basePath));
671
+ },
672
+ /**
673
+ *
674
+ * @summary Clear a notification
675
+ * @param {string} notificationId
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ async clearNotification(notificationId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SingleNotificationDto>> {
680
+ return NotificationsApiFp(configuration).clearNotification(notificationId, options).then((request) => request(axios, basePath));
681
+ },
682
+ /**
683
+ *
684
+ * @summary Create a new notification
685
+ * @param {CreateNotificationDto} body
686
+ * @param {*} [options] Override http request option.
687
+ * @throws {RequiredError}
688
+ */
689
+ async createNotification(body: CreateNotificationDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Notification>> {
690
+ return NotificationsApiFp(configuration).createNotification(body, options).then((request) => request(axios, basePath));
691
+ },
692
+ /**
693
+ *
694
+ * @summary Get all admin notifications
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ */
698
+ async getAllAdminNotifications(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<SingleNotificationDto>>> {
699
+ return NotificationsApiFp(configuration).getAllAdminNotifications(options).then((request) => request(axios, basePath));
700
+ },
701
+ /**
702
+ *
703
+ * @summary Get all notifications for the user
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ */
707
+ async getAllNotificationsForUser(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<SingleNotificationDto>>> {
708
+ return NotificationsApiFp(configuration).getAllNotificationsForUser(options).then((request) => request(axios, basePath));
709
+ },
710
+ /**
711
+ *
712
+ * @summary Mark all notifications as read
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ */
716
+ async markAllNotificationsAsRead(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<SingleNotificationDto>>> {
717
+ return NotificationsApiFp(configuration).markAllNotificationsAsRead(options).then((request) => request(axios, basePath));
718
+ },
719
+ /**
720
+ *
721
+ * @summary Mark a notification as read
722
+ * @param {string} notificationId
723
+ * @param {*} [options] Override http request option.
724
+ * @throws {RequiredError}
725
+ */
726
+ async markNotificationAsRead(notificationId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SingleNotificationDto>> {
727
+ return NotificationsApiFp(configuration).markNotificationAsRead(notificationId, options).then((request) => request(axios, basePath));
728
+ },
729
+ /**
730
+ *
731
+ * @summary Mark a notification as unread
732
+ * @param {string} notificationId
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ */
736
+ async markNotificationAsUnread(notificationId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SingleNotificationDto>> {
737
+ return NotificationsApiFp(configuration).markNotificationAsUnread(notificationId, options).then((request) => request(axios, basePath));
738
+ },
739
+ };
740
+ };
741
+
742
+ /**
743
+ * NotificationsApi - object-oriented interface
744
+ * @export
745
+ * @class NotificationsApi
746
+ * @extends {BaseAPI}
747
+ */
748
+ export class NotificationsApi extends BaseAPI {
749
+ /**
750
+ *
751
+ * @summary Check notifications to see if the user has new unread notifications or not .. and how many
752
+ * @param {*} [options] Override http request option.
753
+ * @throws {RequiredError}
754
+ * @memberof NotificationsApi
755
+ */
756
+ public async checkNotificaions(options?: AxiosRequestConfig) : Promise<AxiosResponse<CheckNotificationsResponseDto>> {
757
+ return NotificationsApiFp(this.configuration).checkNotificaions(options).then((request) => request(this.axios, this.basePath));
758
+ }
759
+ /**
760
+ *
761
+ * @summary Clear all notifications
762
+ * @param {*} [options] Override http request option.
763
+ * @throws {RequiredError}
764
+ * @memberof NotificationsApi
765
+ */
766
+ public async clearAllNotifications(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<SingleNotificationDto>>> {
767
+ return NotificationsApiFp(this.configuration).clearAllNotifications(options).then((request) => request(this.axios, this.basePath));
768
+ }
769
+ /**
770
+ *
771
+ * @summary Clear a notification
772
+ * @param {string} notificationId
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ * @memberof NotificationsApi
776
+ */
777
+ public async clearNotification(notificationId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SingleNotificationDto>> {
778
+ return NotificationsApiFp(this.configuration).clearNotification(notificationId, options).then((request) => request(this.axios, this.basePath));
779
+ }
780
+ /**
781
+ *
782
+ * @summary Create a new notification
783
+ * @param {CreateNotificationDto} body
784
+ * @param {*} [options] Override http request option.
785
+ * @throws {RequiredError}
786
+ * @memberof NotificationsApi
787
+ */
788
+ public async createNotification(body: CreateNotificationDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Notification>> {
789
+ return NotificationsApiFp(this.configuration).createNotification(body, options).then((request) => request(this.axios, this.basePath));
790
+ }
791
+ /**
792
+ *
793
+ * @summary Get all admin notifications
794
+ * @param {*} [options] Override http request option.
795
+ * @throws {RequiredError}
796
+ * @memberof NotificationsApi
797
+ */
798
+ public async getAllAdminNotifications(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<SingleNotificationDto>>> {
799
+ return NotificationsApiFp(this.configuration).getAllAdminNotifications(options).then((request) => request(this.axios, this.basePath));
800
+ }
801
+ /**
802
+ *
803
+ * @summary Get all notifications for the user
804
+ * @param {*} [options] Override http request option.
805
+ * @throws {RequiredError}
806
+ * @memberof NotificationsApi
807
+ */
808
+ public async getAllNotificationsForUser(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<SingleNotificationDto>>> {
809
+ return NotificationsApiFp(this.configuration).getAllNotificationsForUser(options).then((request) => request(this.axios, this.basePath));
810
+ }
811
+ /**
812
+ *
813
+ * @summary Mark all notifications as read
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ * @memberof NotificationsApi
817
+ */
818
+ public async markAllNotificationsAsRead(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<SingleNotificationDto>>> {
819
+ return NotificationsApiFp(this.configuration).markAllNotificationsAsRead(options).then((request) => request(this.axios, this.basePath));
820
+ }
821
+ /**
822
+ *
823
+ * @summary Mark a notification as read
824
+ * @param {string} notificationId
825
+ * @param {*} [options] Override http request option.
826
+ * @throws {RequiredError}
827
+ * @memberof NotificationsApi
828
+ */
829
+ public async markNotificationAsRead(notificationId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SingleNotificationDto>> {
830
+ return NotificationsApiFp(this.configuration).markNotificationAsRead(notificationId, options).then((request) => request(this.axios, this.basePath));
831
+ }
832
+ /**
833
+ *
834
+ * @summary Mark a notification as unread
835
+ * @param {string} notificationId
836
+ * @param {*} [options] Override http request option.
837
+ * @throws {RequiredError}
838
+ * @memberof NotificationsApi
839
+ */
840
+ public async markNotificationAsUnread(notificationId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SingleNotificationDto>> {
841
+ return NotificationsApiFp(this.configuration).markNotificationAsUnread(notificationId, options).then((request) => request(this.axios, this.basePath));
842
+ }
843
+ }