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