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,1198 @@
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 { CreateUserGroupDto } from '../models';
20
+ import { GroupWithNoUsersDto } from '../models';
21
+ import { GroupWithUsersDto } from '../models';
22
+ import { UpdateUserGroupDto } from '../models';
23
+ import { UserGroup } from '../models';
24
+ /**
25
+ * UserGroupsApi - axios parameter creator
26
+ * @export
27
+ */
28
+ export const UserGroupsApiAxiosParamCreator = function (configuration?: Configuration) {
29
+ return {
30
+ /**
31
+ *
32
+ * @summary Add a user to a group
33
+ * @param {string} groupId
34
+ * @param {string} userId
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ addUserToGroup: async (groupId: string, userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
39
+ // verify required parameter 'groupId' is not null or undefined
40
+ if (groupId === null || groupId === undefined) {
41
+ throw new RequiredError('groupId','Required parameter groupId was null or undefined when calling addUserToGroup.');
42
+ }
43
+ // verify required parameter 'userId' is not null or undefined
44
+ if (userId === null || userId === undefined) {
45
+ throw new RequiredError('userId','Required parameter userId was null or undefined when calling addUserToGroup.');
46
+ }
47
+ const localVarPath = `/user-groups/{groupId}/add-user/{userId}`
48
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)))
49
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
50
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
51
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
52
+ let baseOptions;
53
+ if (configuration) {
54
+ baseOptions = configuration.baseOptions;
55
+ }
56
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
57
+ const localVarHeaderParameter = {} as any;
58
+ const localVarQueryParameter = {} as any;
59
+
60
+ // authentication bearer required
61
+ // http bearer authentication required
62
+ if (configuration && configuration.accessToken) {
63
+ const accessToken = typeof configuration.accessToken === 'function'
64
+ ? await configuration.accessToken()
65
+ : await configuration.accessToken;
66
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
67
+ }
68
+
69
+ // authentication x-store-key required
70
+ if (configuration && configuration.apiKey) {
71
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
72
+ ? await configuration.apiKey("x-store-key")
73
+ : await configuration.apiKey;
74
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
75
+ }
76
+
77
+ const query = new URLSearchParams(localVarUrlObj.search);
78
+ for (const key in localVarQueryParameter) {
79
+ query.set(key, localVarQueryParameter[key]);
80
+ }
81
+ for (const key in options.params) {
82
+ query.set(key, options.params[key]);
83
+ }
84
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
85
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
87
+
88
+ return {
89
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
90
+ options: localVarRequestOptions,
91
+ };
92
+ },
93
+ /**
94
+ *
95
+ * @summary Create a new user group
96
+ * @param {CreateUserGroupDto} body
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ createGroup: async (body: CreateUserGroupDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'body' is not null or undefined
102
+ if (body === null || body === undefined) {
103
+ throw new RequiredError('body','Required parameter body was null or undefined when calling createGroup.');
104
+ }
105
+ const localVarPath = `/user-groups`;
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: 'POST', ...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
+ localVarHeaderParameter['Content-Type'] = 'application/json';
134
+
135
+ const query = new URLSearchParams(localVarUrlObj.search);
136
+ for (const key in localVarQueryParameter) {
137
+ query.set(key, localVarQueryParameter[key]);
138
+ }
139
+ for (const key in options.params) {
140
+ query.set(key, options.params[key]);
141
+ }
142
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
143
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
144
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
145
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
146
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
147
+
148
+ return {
149
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
150
+ options: localVarRequestOptions,
151
+ };
152
+ },
153
+ /**
154
+ *
155
+ * @summary Delete a user group
156
+ * @param {string} groupId
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ */
160
+ deleteGroup: async (groupId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
161
+ // verify required parameter 'groupId' is not null or undefined
162
+ if (groupId === null || groupId === undefined) {
163
+ throw new RequiredError('groupId','Required parameter groupId was null or undefined when calling deleteGroup.');
164
+ }
165
+ const localVarPath = `/user-groups/{groupId}`
166
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)));
167
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
168
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
169
+ let baseOptions;
170
+ if (configuration) {
171
+ baseOptions = configuration.baseOptions;
172
+ }
173
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
174
+ const localVarHeaderParameter = {} as any;
175
+ const localVarQueryParameter = {} as any;
176
+
177
+ // authentication bearer required
178
+ // http bearer authentication required
179
+ if (configuration && configuration.accessToken) {
180
+ const accessToken = typeof configuration.accessToken === 'function'
181
+ ? await configuration.accessToken()
182
+ : await configuration.accessToken;
183
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
184
+ }
185
+
186
+ // authentication x-store-key required
187
+ if (configuration && configuration.apiKey) {
188
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
189
+ ? await configuration.apiKey("x-store-key")
190
+ : await configuration.apiKey;
191
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
192
+ }
193
+
194
+ const query = new URLSearchParams(localVarUrlObj.search);
195
+ for (const key in localVarQueryParameter) {
196
+ query.set(key, localVarQueryParameter[key]);
197
+ }
198
+ for (const key in options.params) {
199
+ query.set(key, options.params[key]);
200
+ }
201
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
202
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
203
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
204
+
205
+ return {
206
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
207
+ options: localVarRequestOptions,
208
+ };
209
+ },
210
+ /**
211
+ *
212
+ * @summary Duplicate a user group
213
+ * @param {UpdateUserGroupDto} body
214
+ * @param {string} groupId
215
+ * @param {*} [options] Override http request option.
216
+ * @throws {RequiredError}
217
+ */
218
+ duplicateGroup: async (body: UpdateUserGroupDto, groupId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
219
+ // verify required parameter 'body' is not null or undefined
220
+ if (body === null || body === undefined) {
221
+ throw new RequiredError('body','Required parameter body was null or undefined when calling duplicateGroup.');
222
+ }
223
+ // verify required parameter 'groupId' is not null or undefined
224
+ if (groupId === null || groupId === undefined) {
225
+ throw new RequiredError('groupId','Required parameter groupId was null or undefined when calling duplicateGroup.');
226
+ }
227
+ const localVarPath = `/user-groups/duplicate/{groupId}`
228
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)));
229
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
230
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
231
+ let baseOptions;
232
+ if (configuration) {
233
+ baseOptions = configuration.baseOptions;
234
+ }
235
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
236
+ const localVarHeaderParameter = {} as any;
237
+ const localVarQueryParameter = {} as any;
238
+
239
+ // authentication bearer required
240
+ // http bearer authentication required
241
+ if (configuration && configuration.accessToken) {
242
+ const accessToken = typeof configuration.accessToken === 'function'
243
+ ? await configuration.accessToken()
244
+ : await configuration.accessToken;
245
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
246
+ }
247
+
248
+ // authentication x-store-key required
249
+ if (configuration && configuration.apiKey) {
250
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
251
+ ? await configuration.apiKey("x-store-key")
252
+ : await configuration.apiKey;
253
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
254
+ }
255
+
256
+ localVarHeaderParameter['Content-Type'] = 'application/json';
257
+
258
+ const query = new URLSearchParams(localVarUrlObj.search);
259
+ for (const key in localVarQueryParameter) {
260
+ query.set(key, localVarQueryParameter[key]);
261
+ }
262
+ for (const key in options.params) {
263
+ query.set(key, options.params[key]);
264
+ }
265
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
266
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
267
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
268
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
269
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
270
+
271
+ return {
272
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
273
+ options: localVarRequestOptions,
274
+ };
275
+ },
276
+ /**
277
+ *
278
+ * @summary Get all groups
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ getAllGroups: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
283
+ const localVarPath = `/user-groups`;
284
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
285
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
286
+ let baseOptions;
287
+ if (configuration) {
288
+ baseOptions = configuration.baseOptions;
289
+ }
290
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
291
+ const localVarHeaderParameter = {} as any;
292
+ const localVarQueryParameter = {} as any;
293
+
294
+ // authentication bearer required
295
+ // http bearer authentication required
296
+ if (configuration && configuration.accessToken) {
297
+ const accessToken = typeof configuration.accessToken === 'function'
298
+ ? await configuration.accessToken()
299
+ : await configuration.accessToken;
300
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
301
+ }
302
+
303
+ // authentication x-store-key required
304
+ if (configuration && configuration.apiKey) {
305
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
306
+ ? await configuration.apiKey("x-store-key")
307
+ : await configuration.apiKey;
308
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
309
+ }
310
+
311
+ const query = new URLSearchParams(localVarUrlObj.search);
312
+ for (const key in localVarQueryParameter) {
313
+ query.set(key, localVarQueryParameter[key]);
314
+ }
315
+ for (const key in options.params) {
316
+ query.set(key, options.params[key]);
317
+ }
318
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
319
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
321
+
322
+ return {
323
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
324
+ options: localVarRequestOptions,
325
+ };
326
+ },
327
+ /**
328
+ *
329
+ * @summary Get a single user group
330
+ * @param {string} groupId
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ getSingleGroup: async (groupId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
335
+ // verify required parameter 'groupId' is not null or undefined
336
+ if (groupId === null || groupId === undefined) {
337
+ throw new RequiredError('groupId','Required parameter groupId was null or undefined when calling getSingleGroup.');
338
+ }
339
+ const localVarPath = `/user-groups/{groupId}`
340
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)));
341
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
342
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
343
+ let baseOptions;
344
+ if (configuration) {
345
+ baseOptions = configuration.baseOptions;
346
+ }
347
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
348
+ const localVarHeaderParameter = {} as any;
349
+ const localVarQueryParameter = {} as any;
350
+
351
+ // authentication bearer required
352
+ // http bearer authentication required
353
+ if (configuration && configuration.accessToken) {
354
+ const accessToken = typeof configuration.accessToken === 'function'
355
+ ? await configuration.accessToken()
356
+ : await configuration.accessToken;
357
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
358
+ }
359
+
360
+ // authentication x-store-key required
361
+ if (configuration && configuration.apiKey) {
362
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
363
+ ? await configuration.apiKey("x-store-key")
364
+ : await configuration.apiKey;
365
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
366
+ }
367
+
368
+ const query = new URLSearchParams(localVarUrlObj.search);
369
+ for (const key in localVarQueryParameter) {
370
+ query.set(key, localVarQueryParameter[key]);
371
+ }
372
+ for (const key in options.params) {
373
+ query.set(key, options.params[key]);
374
+ }
375
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
376
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
377
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
378
+
379
+ return {
380
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
381
+ options: localVarRequestOptions,
382
+ };
383
+ },
384
+ /**
385
+ *
386
+ * @summary List all groups a user belongs to
387
+ * @param {string} userId
388
+ * @param {*} [options] Override http request option.
389
+ * @throws {RequiredError}
390
+ */
391
+ listGroupsUserBelongsTo: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
392
+ // verify required parameter 'userId' is not null or undefined
393
+ if (userId === null || userId === undefined) {
394
+ throw new RequiredError('userId','Required parameter userId was null or undefined when calling listGroupsUserBelongsTo.');
395
+ }
396
+ const localVarPath = `/user-groups/users/{userId}/groups`
397
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
398
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
399
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
400
+ let baseOptions;
401
+ if (configuration) {
402
+ baseOptions = configuration.baseOptions;
403
+ }
404
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
405
+ const localVarHeaderParameter = {} as any;
406
+ const localVarQueryParameter = {} as any;
407
+
408
+ // authentication bearer required
409
+ // http bearer authentication required
410
+ if (configuration && configuration.accessToken) {
411
+ const accessToken = typeof configuration.accessToken === 'function'
412
+ ? await configuration.accessToken()
413
+ : await configuration.accessToken;
414
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
415
+ }
416
+
417
+ // authentication x-store-key required
418
+ if (configuration && configuration.apiKey) {
419
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
420
+ ? await configuration.apiKey("x-store-key")
421
+ : await configuration.apiKey;
422
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
423
+ }
424
+
425
+ const query = new URLSearchParams(localVarUrlObj.search);
426
+ for (const key in localVarQueryParameter) {
427
+ query.set(key, localVarQueryParameter[key]);
428
+ }
429
+ for (const key in options.params) {
430
+ query.set(key, options.params[key]);
431
+ }
432
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
433
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
434
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
435
+
436
+ return {
437
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
438
+ options: localVarRequestOptions,
439
+ };
440
+ },
441
+ /**
442
+ *
443
+ * @summary List all groups a user does not belong to
444
+ * @param {string} userId
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ */
448
+ listGroupsUserDoesNotBelongTo: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
449
+ // verify required parameter 'userId' is not null or undefined
450
+ if (userId === null || userId === undefined) {
451
+ throw new RequiredError('userId','Required parameter userId was null or undefined when calling listGroupsUserDoesNotBelongTo.');
452
+ }
453
+ const localVarPath = `/user-groups/users/{userId}/groups/not-in`
454
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
455
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
456
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
457
+ let baseOptions;
458
+ if (configuration) {
459
+ baseOptions = configuration.baseOptions;
460
+ }
461
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
462
+ const localVarHeaderParameter = {} as any;
463
+ const localVarQueryParameter = {} as any;
464
+
465
+ // authentication bearer required
466
+ // http bearer authentication required
467
+ if (configuration && configuration.accessToken) {
468
+ const accessToken = typeof configuration.accessToken === 'function'
469
+ ? await configuration.accessToken()
470
+ : await configuration.accessToken;
471
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
472
+ }
473
+
474
+ // authentication x-store-key required
475
+ if (configuration && configuration.apiKey) {
476
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
477
+ ? await configuration.apiKey("x-store-key")
478
+ : await configuration.apiKey;
479
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
480
+ }
481
+
482
+ const query = new URLSearchParams(localVarUrlObj.search);
483
+ for (const key in localVarQueryParameter) {
484
+ query.set(key, localVarQueryParameter[key]);
485
+ }
486
+ for (const key in options.params) {
487
+ query.set(key, options.params[key]);
488
+ }
489
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
490
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
491
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
492
+
493
+ return {
494
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
495
+ options: localVarRequestOptions,
496
+ };
497
+ },
498
+ /**
499
+ *
500
+ * @summary List all users in a group
501
+ * @param {string} id
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ listUsersInGroup: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
506
+ // verify required parameter 'id' is not null or undefined
507
+ if (id === null || id === undefined) {
508
+ throw new RequiredError('id','Required parameter id was null or undefined when calling listUsersInGroup.');
509
+ }
510
+ const localVarPath = `/user-groups/{id}/users`
511
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
512
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
513
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
514
+ let baseOptions;
515
+ if (configuration) {
516
+ baseOptions = configuration.baseOptions;
517
+ }
518
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
519
+ const localVarHeaderParameter = {} as any;
520
+ const localVarQueryParameter = {} as any;
521
+
522
+ // authentication bearer required
523
+ // http bearer authentication required
524
+ if (configuration && configuration.accessToken) {
525
+ const accessToken = typeof configuration.accessToken === 'function'
526
+ ? await configuration.accessToken()
527
+ : await configuration.accessToken;
528
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
529
+ }
530
+
531
+ // authentication x-store-key required
532
+ if (configuration && configuration.apiKey) {
533
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
534
+ ? await configuration.apiKey("x-store-key")
535
+ : await configuration.apiKey;
536
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
537
+ }
538
+
539
+ const query = new URLSearchParams(localVarUrlObj.search);
540
+ for (const key in localVarQueryParameter) {
541
+ query.set(key, localVarQueryParameter[key]);
542
+ }
543
+ for (const key in options.params) {
544
+ query.set(key, options.params[key]);
545
+ }
546
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
547
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
548
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
549
+
550
+ return {
551
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
552
+ options: localVarRequestOptions,
553
+ };
554
+ },
555
+ /**
556
+ *
557
+ * @summary List all users not in a group
558
+ * @param {string} groupId
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ listUsersNotInGroup: async (groupId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
563
+ // verify required parameter 'groupId' is not null or undefined
564
+ if (groupId === null || groupId === undefined) {
565
+ throw new RequiredError('groupId','Required parameter groupId was null or undefined when calling listUsersNotInGroup.');
566
+ }
567
+ const localVarPath = `/user-groups/{groupId}/users/not-in-group`
568
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)));
569
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
570
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
571
+ let baseOptions;
572
+ if (configuration) {
573
+ baseOptions = configuration.baseOptions;
574
+ }
575
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
576
+ const localVarHeaderParameter = {} as any;
577
+ const localVarQueryParameter = {} as any;
578
+
579
+ // authentication bearer required
580
+ // http bearer authentication required
581
+ if (configuration && configuration.accessToken) {
582
+ const accessToken = typeof configuration.accessToken === 'function'
583
+ ? await configuration.accessToken()
584
+ : await configuration.accessToken;
585
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
586
+ }
587
+
588
+ // authentication x-store-key required
589
+ if (configuration && configuration.apiKey) {
590
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
591
+ ? await configuration.apiKey("x-store-key")
592
+ : await configuration.apiKey;
593
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
594
+ }
595
+
596
+ const query = new URLSearchParams(localVarUrlObj.search);
597
+ for (const key in localVarQueryParameter) {
598
+ query.set(key, localVarQueryParameter[key]);
599
+ }
600
+ for (const key in options.params) {
601
+ query.set(key, options.params[key]);
602
+ }
603
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
604
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
605
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
606
+
607
+ return {
608
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
609
+ options: localVarRequestOptions,
610
+ };
611
+ },
612
+ /**
613
+ *
614
+ * @summary Remove a user from a group
615
+ * @param {string} id
616
+ * @param {string} userId
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ removeUserFromGroup: async (id: string, userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
621
+ // verify required parameter 'id' is not null or undefined
622
+ if (id === null || id === undefined) {
623
+ throw new RequiredError('id','Required parameter id was null or undefined when calling removeUserFromGroup.');
624
+ }
625
+ // verify required parameter 'userId' is not null or undefined
626
+ if (userId === null || userId === undefined) {
627
+ throw new RequiredError('userId','Required parameter userId was null or undefined when calling removeUserFromGroup.');
628
+ }
629
+ const localVarPath = `/user-groups/{id}/remove-user/{userId}`
630
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
631
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
632
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
633
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
634
+ let baseOptions;
635
+ if (configuration) {
636
+ baseOptions = configuration.baseOptions;
637
+ }
638
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
639
+ const localVarHeaderParameter = {} as any;
640
+ const localVarQueryParameter = {} as any;
641
+
642
+ // authentication bearer required
643
+ // http bearer authentication required
644
+ if (configuration && configuration.accessToken) {
645
+ const accessToken = typeof configuration.accessToken === 'function'
646
+ ? await configuration.accessToken()
647
+ : await configuration.accessToken;
648
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
649
+ }
650
+
651
+ // authentication x-store-key required
652
+ if (configuration && configuration.apiKey) {
653
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
654
+ ? await configuration.apiKey("x-store-key")
655
+ : await configuration.apiKey;
656
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
657
+ }
658
+
659
+ const query = new URLSearchParams(localVarUrlObj.search);
660
+ for (const key in localVarQueryParameter) {
661
+ query.set(key, localVarQueryParameter[key]);
662
+ }
663
+ for (const key in options.params) {
664
+ query.set(key, options.params[key]);
665
+ }
666
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
667
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
668
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
669
+
670
+ return {
671
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
672
+ options: localVarRequestOptions,
673
+ };
674
+ },
675
+ /**
676
+ *
677
+ * @summary Update a user group
678
+ * @param {UpdateUserGroupDto} body
679
+ * @param {string} groupId
680
+ * @param {*} [options] Override http request option.
681
+ * @throws {RequiredError}
682
+ */
683
+ updateGroup: async (body: UpdateUserGroupDto, groupId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
684
+ // verify required parameter 'body' is not null or undefined
685
+ if (body === null || body === undefined) {
686
+ throw new RequiredError('body','Required parameter body was null or undefined when calling updateGroup.');
687
+ }
688
+ // verify required parameter 'groupId' is not null or undefined
689
+ if (groupId === null || groupId === undefined) {
690
+ throw new RequiredError('groupId','Required parameter groupId was null or undefined when calling updateGroup.');
691
+ }
692
+ const localVarPath = `/user-groups/{groupId}`
693
+ .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId)));
694
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
695
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
696
+ let baseOptions;
697
+ if (configuration) {
698
+ baseOptions = configuration.baseOptions;
699
+ }
700
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
701
+ const localVarHeaderParameter = {} as any;
702
+ const localVarQueryParameter = {} as any;
703
+
704
+ // authentication bearer required
705
+ // http bearer authentication required
706
+ if (configuration && configuration.accessToken) {
707
+ const accessToken = typeof configuration.accessToken === 'function'
708
+ ? await configuration.accessToken()
709
+ : await configuration.accessToken;
710
+ localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
711
+ }
712
+
713
+ // authentication x-store-key required
714
+ if (configuration && configuration.apiKey) {
715
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
716
+ ? await configuration.apiKey("x-store-key")
717
+ : await configuration.apiKey;
718
+ localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
719
+ }
720
+
721
+ localVarHeaderParameter['Content-Type'] = 'application/json';
722
+
723
+ const query = new URLSearchParams(localVarUrlObj.search);
724
+ for (const key in localVarQueryParameter) {
725
+ query.set(key, localVarQueryParameter[key]);
726
+ }
727
+ for (const key in options.params) {
728
+ query.set(key, options.params[key]);
729
+ }
730
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
731
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
732
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
733
+ const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
734
+ localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
735
+
736
+ return {
737
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
738
+ options: localVarRequestOptions,
739
+ };
740
+ },
741
+ }
742
+ };
743
+
744
+ /**
745
+ * UserGroupsApi - functional programming interface
746
+ * @export
747
+ */
748
+ export const UserGroupsApiFp = function(configuration?: Configuration) {
749
+ return {
750
+ /**
751
+ *
752
+ * @summary Add a user to a group
753
+ * @param {string} groupId
754
+ * @param {string} userId
755
+ * @param {*} [options] Override http request option.
756
+ * @throws {RequiredError}
757
+ */
758
+ async addUserToGroup(groupId: string, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
759
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).addUserToGroup(groupId, userId, options);
760
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
761
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
762
+ return axios.request(axiosRequestArgs);
763
+ };
764
+ },
765
+ /**
766
+ *
767
+ * @summary Create a new user group
768
+ * @param {CreateUserGroupDto} body
769
+ * @param {*} [options] Override http request option.
770
+ * @throws {RequiredError}
771
+ */
772
+ async createGroup(body: CreateUserGroupDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<UserGroup>>> {
773
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).createGroup(body, options);
774
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
775
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
776
+ return axios.request(axiosRequestArgs);
777
+ };
778
+ },
779
+ /**
780
+ *
781
+ * @summary Delete a user group
782
+ * @param {string} groupId
783
+ * @param {*} [options] Override http request option.
784
+ * @throws {RequiredError}
785
+ */
786
+ async deleteGroup(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
787
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).deleteGroup(groupId, options);
788
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
789
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
790
+ return axios.request(axiosRequestArgs);
791
+ };
792
+ },
793
+ /**
794
+ *
795
+ * @summary Duplicate a user group
796
+ * @param {UpdateUserGroupDto} body
797
+ * @param {string} groupId
798
+ * @param {*} [options] Override http request option.
799
+ * @throws {RequiredError}
800
+ */
801
+ async duplicateGroup(body: UpdateUserGroupDto, groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<UserGroup>>> {
802
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).duplicateGroup(body, groupId, options);
803
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
804
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
805
+ return axios.request(axiosRequestArgs);
806
+ };
807
+ },
808
+ /**
809
+ *
810
+ * @summary Get all groups
811
+ * @param {*} [options] Override http request option.
812
+ * @throws {RequiredError}
813
+ */
814
+ async getAllGroups(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<GroupWithNoUsersDto>>>> {
815
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).getAllGroups(options);
816
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
817
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
818
+ return axios.request(axiosRequestArgs);
819
+ };
820
+ },
821
+ /**
822
+ *
823
+ * @summary Get a single user group
824
+ * @param {string} groupId
825
+ * @param {*} [options] Override http request option.
826
+ * @throws {RequiredError}
827
+ */
828
+ async getSingleGroup(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<GroupWithUsersDto>>> {
829
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).getSingleGroup(groupId, options);
830
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
831
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
832
+ return axios.request(axiosRequestArgs);
833
+ };
834
+ },
835
+ /**
836
+ *
837
+ * @summary List all groups a user belongs to
838
+ * @param {string} userId
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ */
842
+ async listGroupsUserBelongsTo(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
843
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).listGroupsUserBelongsTo(userId, options);
844
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
845
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
846
+ return axios.request(axiosRequestArgs);
847
+ };
848
+ },
849
+ /**
850
+ *
851
+ * @summary List all groups a user does not belong to
852
+ * @param {string} userId
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ */
856
+ async listGroupsUserDoesNotBelongTo(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
857
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).listGroupsUserDoesNotBelongTo(userId, options);
858
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
859
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
860
+ return axios.request(axiosRequestArgs);
861
+ };
862
+ },
863
+ /**
864
+ *
865
+ * @summary List all users in a group
866
+ * @param {string} id
867
+ * @param {*} [options] Override http request option.
868
+ * @throws {RequiredError}
869
+ */
870
+ async listUsersInGroup(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<GroupWithUsersDto>>> {
871
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).listUsersInGroup(id, options);
872
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
873
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
874
+ return axios.request(axiosRequestArgs);
875
+ };
876
+ },
877
+ /**
878
+ *
879
+ * @summary List all users not in a group
880
+ * @param {string} groupId
881
+ * @param {*} [options] Override http request option.
882
+ * @throws {RequiredError}
883
+ */
884
+ async listUsersNotInGroup(groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
885
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).listUsersNotInGroup(groupId, options);
886
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
887
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
888
+ return axios.request(axiosRequestArgs);
889
+ };
890
+ },
891
+ /**
892
+ *
893
+ * @summary Remove a user from a group
894
+ * @param {string} id
895
+ * @param {string} userId
896
+ * @param {*} [options] Override http request option.
897
+ * @throws {RequiredError}
898
+ */
899
+ async removeUserFromGroup(id: string, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
900
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).removeUserFromGroup(id, userId, options);
901
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
902
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
903
+ return axios.request(axiosRequestArgs);
904
+ };
905
+ },
906
+ /**
907
+ *
908
+ * @summary Update a user group
909
+ * @param {UpdateUserGroupDto} body
910
+ * @param {string} groupId
911
+ * @param {*} [options] Override http request option.
912
+ * @throws {RequiredError}
913
+ */
914
+ async updateGroup(body: UpdateUserGroupDto, groupId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<UserGroup>>> {
915
+ const localVarAxiosArgs = await UserGroupsApiAxiosParamCreator(configuration).updateGroup(body, groupId, options);
916
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
917
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
918
+ return axios.request(axiosRequestArgs);
919
+ };
920
+ },
921
+ }
922
+ };
923
+
924
+ /**
925
+ * UserGroupsApi - factory interface
926
+ * @export
927
+ */
928
+ export const UserGroupsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
929
+ return {
930
+ /**
931
+ *
932
+ * @summary Add a user to a group
933
+ * @param {string} groupId
934
+ * @param {string} userId
935
+ * @param {*} [options] Override http request option.
936
+ * @throws {RequiredError}
937
+ */
938
+ async addUserToGroup(groupId: string, userId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
939
+ return UserGroupsApiFp(configuration).addUserToGroup(groupId, userId, options).then((request) => request(axios, basePath));
940
+ },
941
+ /**
942
+ *
943
+ * @summary Create a new user group
944
+ * @param {CreateUserGroupDto} body
945
+ * @param {*} [options] Override http request option.
946
+ * @throws {RequiredError}
947
+ */
948
+ async createGroup(body: CreateUserGroupDto, options?: AxiosRequestConfig): Promise<AxiosResponse<UserGroup>> {
949
+ return UserGroupsApiFp(configuration).createGroup(body, options).then((request) => request(axios, basePath));
950
+ },
951
+ /**
952
+ *
953
+ * @summary Delete a user group
954
+ * @param {string} groupId
955
+ * @param {*} [options] Override http request option.
956
+ * @throws {RequiredError}
957
+ */
958
+ async deleteGroup(groupId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
959
+ return UserGroupsApiFp(configuration).deleteGroup(groupId, options).then((request) => request(axios, basePath));
960
+ },
961
+ /**
962
+ *
963
+ * @summary Duplicate a user group
964
+ * @param {UpdateUserGroupDto} body
965
+ * @param {string} groupId
966
+ * @param {*} [options] Override http request option.
967
+ * @throws {RequiredError}
968
+ */
969
+ async duplicateGroup(body: UpdateUserGroupDto, groupId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<UserGroup>> {
970
+ return UserGroupsApiFp(configuration).duplicateGroup(body, groupId, options).then((request) => request(axios, basePath));
971
+ },
972
+ /**
973
+ *
974
+ * @summary Get all groups
975
+ * @param {*} [options] Override http request option.
976
+ * @throws {RequiredError}
977
+ */
978
+ async getAllGroups(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<GroupWithNoUsersDto>>> {
979
+ return UserGroupsApiFp(configuration).getAllGroups(options).then((request) => request(axios, basePath));
980
+ },
981
+ /**
982
+ *
983
+ * @summary Get a single user group
984
+ * @param {string} groupId
985
+ * @param {*} [options] Override http request option.
986
+ * @throws {RequiredError}
987
+ */
988
+ async getSingleGroup(groupId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<GroupWithUsersDto>> {
989
+ return UserGroupsApiFp(configuration).getSingleGroup(groupId, options).then((request) => request(axios, basePath));
990
+ },
991
+ /**
992
+ *
993
+ * @summary List all groups a user belongs to
994
+ * @param {string} userId
995
+ * @param {*} [options] Override http request option.
996
+ * @throws {RequiredError}
997
+ */
998
+ async listGroupsUserBelongsTo(userId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
999
+ return UserGroupsApiFp(configuration).listGroupsUserBelongsTo(userId, options).then((request) => request(axios, basePath));
1000
+ },
1001
+ /**
1002
+ *
1003
+ * @summary List all groups a user does not belong to
1004
+ * @param {string} userId
1005
+ * @param {*} [options] Override http request option.
1006
+ * @throws {RequiredError}
1007
+ */
1008
+ async listGroupsUserDoesNotBelongTo(userId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1009
+ return UserGroupsApiFp(configuration).listGroupsUserDoesNotBelongTo(userId, options).then((request) => request(axios, basePath));
1010
+ },
1011
+ /**
1012
+ *
1013
+ * @summary List all users in a group
1014
+ * @param {string} id
1015
+ * @param {*} [options] Override http request option.
1016
+ * @throws {RequiredError}
1017
+ */
1018
+ async listUsersInGroup(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<GroupWithUsersDto>> {
1019
+ return UserGroupsApiFp(configuration).listUsersInGroup(id, options).then((request) => request(axios, basePath));
1020
+ },
1021
+ /**
1022
+ *
1023
+ * @summary List all users not in a group
1024
+ * @param {string} groupId
1025
+ * @param {*} [options] Override http request option.
1026
+ * @throws {RequiredError}
1027
+ */
1028
+ async listUsersNotInGroup(groupId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1029
+ return UserGroupsApiFp(configuration).listUsersNotInGroup(groupId, options).then((request) => request(axios, basePath));
1030
+ },
1031
+ /**
1032
+ *
1033
+ * @summary Remove a user from a group
1034
+ * @param {string} id
1035
+ * @param {string} userId
1036
+ * @param {*} [options] Override http request option.
1037
+ * @throws {RequiredError}
1038
+ */
1039
+ async removeUserFromGroup(id: string, userId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
1040
+ return UserGroupsApiFp(configuration).removeUserFromGroup(id, userId, options).then((request) => request(axios, basePath));
1041
+ },
1042
+ /**
1043
+ *
1044
+ * @summary Update a user group
1045
+ * @param {UpdateUserGroupDto} body
1046
+ * @param {string} groupId
1047
+ * @param {*} [options] Override http request option.
1048
+ * @throws {RequiredError}
1049
+ */
1050
+ async updateGroup(body: UpdateUserGroupDto, groupId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<UserGroup>> {
1051
+ return UserGroupsApiFp(configuration).updateGroup(body, groupId, options).then((request) => request(axios, basePath));
1052
+ },
1053
+ };
1054
+ };
1055
+
1056
+ /**
1057
+ * UserGroupsApi - object-oriented interface
1058
+ * @export
1059
+ * @class UserGroupsApi
1060
+ * @extends {BaseAPI}
1061
+ */
1062
+ export class UserGroupsApi extends BaseAPI {
1063
+ /**
1064
+ *
1065
+ * @summary Add a user to a group
1066
+ * @param {string} groupId
1067
+ * @param {string} userId
1068
+ * @param {*} [options] Override http request option.
1069
+ * @throws {RequiredError}
1070
+ * @memberof UserGroupsApi
1071
+ */
1072
+ public async addUserToGroup(groupId: string, userId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1073
+ return UserGroupsApiFp(this.configuration).addUserToGroup(groupId, userId, options).then((request) => request(this.axios, this.basePath));
1074
+ }
1075
+ /**
1076
+ *
1077
+ * @summary Create a new user group
1078
+ * @param {CreateUserGroupDto} body
1079
+ * @param {*} [options] Override http request option.
1080
+ * @throws {RequiredError}
1081
+ * @memberof UserGroupsApi
1082
+ */
1083
+ public async createGroup(body: CreateUserGroupDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<UserGroup>> {
1084
+ return UserGroupsApiFp(this.configuration).createGroup(body, options).then((request) => request(this.axios, this.basePath));
1085
+ }
1086
+ /**
1087
+ *
1088
+ * @summary Delete a user group
1089
+ * @param {string} groupId
1090
+ * @param {*} [options] Override http request option.
1091
+ * @throws {RequiredError}
1092
+ * @memberof UserGroupsApi
1093
+ */
1094
+ public async deleteGroup(groupId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1095
+ return UserGroupsApiFp(this.configuration).deleteGroup(groupId, options).then((request) => request(this.axios, this.basePath));
1096
+ }
1097
+ /**
1098
+ *
1099
+ * @summary Duplicate a user group
1100
+ * @param {UpdateUserGroupDto} body
1101
+ * @param {string} groupId
1102
+ * @param {*} [options] Override http request option.
1103
+ * @throws {RequiredError}
1104
+ * @memberof UserGroupsApi
1105
+ */
1106
+ public async duplicateGroup(body: UpdateUserGroupDto, groupId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<UserGroup>> {
1107
+ return UserGroupsApiFp(this.configuration).duplicateGroup(body, groupId, options).then((request) => request(this.axios, this.basePath));
1108
+ }
1109
+ /**
1110
+ *
1111
+ * @summary Get all groups
1112
+ * @param {*} [options] Override http request option.
1113
+ * @throws {RequiredError}
1114
+ * @memberof UserGroupsApi
1115
+ */
1116
+ public async getAllGroups(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<GroupWithNoUsersDto>>> {
1117
+ return UserGroupsApiFp(this.configuration).getAllGroups(options).then((request) => request(this.axios, this.basePath));
1118
+ }
1119
+ /**
1120
+ *
1121
+ * @summary Get a single user group
1122
+ * @param {string} groupId
1123
+ * @param {*} [options] Override http request option.
1124
+ * @throws {RequiredError}
1125
+ * @memberof UserGroupsApi
1126
+ */
1127
+ public async getSingleGroup(groupId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<GroupWithUsersDto>> {
1128
+ return UserGroupsApiFp(this.configuration).getSingleGroup(groupId, options).then((request) => request(this.axios, this.basePath));
1129
+ }
1130
+ /**
1131
+ *
1132
+ * @summary List all groups a user belongs to
1133
+ * @param {string} userId
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ * @memberof UserGroupsApi
1137
+ */
1138
+ public async listGroupsUserBelongsTo(userId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1139
+ return UserGroupsApiFp(this.configuration).listGroupsUserBelongsTo(userId, options).then((request) => request(this.axios, this.basePath));
1140
+ }
1141
+ /**
1142
+ *
1143
+ * @summary List all groups a user does not belong to
1144
+ * @param {string} userId
1145
+ * @param {*} [options] Override http request option.
1146
+ * @throws {RequiredError}
1147
+ * @memberof UserGroupsApi
1148
+ */
1149
+ public async listGroupsUserDoesNotBelongTo(userId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1150
+ return UserGroupsApiFp(this.configuration).listGroupsUserDoesNotBelongTo(userId, options).then((request) => request(this.axios, this.basePath));
1151
+ }
1152
+ /**
1153
+ *
1154
+ * @summary List all users in a group
1155
+ * @param {string} id
1156
+ * @param {*} [options] Override http request option.
1157
+ * @throws {RequiredError}
1158
+ * @memberof UserGroupsApi
1159
+ */
1160
+ public async listUsersInGroup(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<GroupWithUsersDto>> {
1161
+ return UserGroupsApiFp(this.configuration).listUsersInGroup(id, options).then((request) => request(this.axios, this.basePath));
1162
+ }
1163
+ /**
1164
+ *
1165
+ * @summary List all users not in a group
1166
+ * @param {string} groupId
1167
+ * @param {*} [options] Override http request option.
1168
+ * @throws {RequiredError}
1169
+ * @memberof UserGroupsApi
1170
+ */
1171
+ public async listUsersNotInGroup(groupId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1172
+ return UserGroupsApiFp(this.configuration).listUsersNotInGroup(groupId, options).then((request) => request(this.axios, this.basePath));
1173
+ }
1174
+ /**
1175
+ *
1176
+ * @summary Remove a user from a group
1177
+ * @param {string} id
1178
+ * @param {string} userId
1179
+ * @param {*} [options] Override http request option.
1180
+ * @throws {RequiredError}
1181
+ * @memberof UserGroupsApi
1182
+ */
1183
+ public async removeUserFromGroup(id: string, userId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
1184
+ return UserGroupsApiFp(this.configuration).removeUserFromGroup(id, userId, options).then((request) => request(this.axios, this.basePath));
1185
+ }
1186
+ /**
1187
+ *
1188
+ * @summary Update a user group
1189
+ * @param {UpdateUserGroupDto} body
1190
+ * @param {string} groupId
1191
+ * @param {*} [options] Override http request option.
1192
+ * @throws {RequiredError}
1193
+ * @memberof UserGroupsApi
1194
+ */
1195
+ public async updateGroup(body: UpdateUserGroupDto, groupId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<UserGroup>> {
1196
+ return UserGroupsApiFp(this.configuration).updateGroup(body, groupId, options).then((request) => request(this.axios, this.basePath));
1197
+ }
1198
+ }