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