@emilgroup/tenant-sdk 1.0.1 → 1.2.1

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 (264) hide show
  1. package/.openapi-generator/FILES +16 -72
  2. package/README.md +2 -2
  3. package/api/custom-schema-api.ts +52 -60
  4. package/api/{user-subscription-api.ts → invite-organizations-api.ts} +139 -161
  5. package/api/invite-users-api.ts +75 -79
  6. package/api/organizations-api.ts +459 -0
  7. package/api/users-api.ts +138 -148
  8. package/api.ts +4 -18
  9. package/dist/api/custom-schema-api.d.ts +42 -42
  10. package/dist/api/custom-schema-api.js +31 -38
  11. package/dist/api/{user-subscription-api.d.ts → invite-organizations-api.d.ts} +89 -103
  12. package/dist/api/{user-subscription-api.js → invite-organizations-api.js} +106 -114
  13. package/dist/api/invite-users-api.d.ts +63 -60
  14. package/dist/api/invite-users-api.js +40 -49
  15. package/dist/api/organizations-api.d.ts +263 -0
  16. package/dist/api/{settings-api.js → organizations-api.js} +135 -195
  17. package/dist/api/users-api.d.ts +113 -109
  18. package/dist/api/users-api.js +76 -93
  19. package/dist/api.d.ts +2 -9
  20. package/dist/api.js +2 -9
  21. package/dist/models/assign-user-roles-request-dto.d.ts +2 -2
  22. package/dist/models/{manage-subscription-request-dto.d.ts → batch-delete-response-class.d.ts} +5 -5
  23. package/dist/models/create-custom-schema-request-dto.d.ts +1 -0
  24. package/dist/models/create-custom-schema-request-dto.js +2 -1
  25. package/dist/models/{insurance-response-class.d.ts → delete-response-class.d.ts} +6 -6
  26. package/dist/models/{get-embedded-url-response-class.d.ts → disable-users-response-class.d.ts} +6 -6
  27. package/dist/models/{insurance-company-response-class.d.ts → enable-users-response-class.d.ts} +6 -6
  28. package/dist/models/{create-alert-response-class.d.ts → get-organization-response-class.d.ts} +7 -7
  29. package/dist/models/index.d.ts +14 -63
  30. package/dist/models/index.js +14 -63
  31. package/dist/models/invite-org-request-dto.d.ts +78 -0
  32. package/dist/models/invite-user-request-dto.d.ts +8 -2
  33. package/dist/models/invite-users-request-dto.d.ts +2 -2
  34. package/dist/models/invite-users-response-class.d.ts +24 -0
  35. package/dist/models/{list-user-subscriptions-response-class.d.ts → list-org-invitations-response-class.d.ts} +8 -8
  36. package/dist/models/{list-data-reports-response-class.d.ts → list-organizations-response-class.d.ts} +8 -8
  37. package/dist/models/org-invitation-class.d.ts +103 -0
  38. package/dist/models/{create-dashboard-response-class.d.ts → org-invitation-response-class.d.ts} +7 -7
  39. package/dist/models/organization-class.d.ts +96 -0
  40. package/dist/models/set-setting-request-dto.d.ts +10 -4
  41. package/dist/models/subscription-class.d.ts +9 -2
  42. package/dist/models/update-custom-schema-request-dto.d.ts +1 -0
  43. package/dist/models/update-custom-schema-request-dto.js +2 -1
  44. package/dist/models/update-organization-request-dto-rest.d.ts +60 -0
  45. package/dist/models/{channel-response-class.d.ts → update-organization-response-class.d.ts} +7 -12
  46. package/dist/models/user-class.d.ts +13 -5
  47. package/models/assign-user-roles-request-dto.ts +2 -2
  48. package/models/{manage-subscription-request-dto.ts → batch-delete-response-class.ts} +5 -5
  49. package/models/create-custom-schema-request-dto.ts +2 -1
  50. package/models/{insurance-response-class.ts → delete-response-class.ts} +6 -6
  51. package/models/{get-embedded-url-response-class.ts → disable-users-response-class.ts} +6 -6
  52. package/models/{insurance-company-response-class.ts → enable-users-response-class.ts} +6 -6
  53. package/models/{channel-response-class.ts → get-organization-response-class.ts} +7 -12
  54. package/models/index.ts +14 -63
  55. package/models/invite-org-request-dto.ts +84 -0
  56. package/models/invite-user-request-dto.ts +8 -2
  57. package/models/invite-users-request-dto.ts +2 -2
  58. package/models/invite-users-response-class.ts +30 -0
  59. package/models/{list-user-subscriptions-response-class.ts → list-org-invitations-response-class.ts} +8 -8
  60. package/models/{list-data-reports-response-class.ts → list-organizations-response-class.ts} +8 -8
  61. package/models/org-invitation-class.ts +109 -0
  62. package/models/{create-alert-response-class.ts → org-invitation-response-class.ts} +7 -7
  63. package/models/organization-class.ts +102 -0
  64. package/models/set-setting-request-dto.ts +10 -4
  65. package/models/subscription-class.ts +9 -2
  66. package/models/update-custom-schema-request-dto.ts +2 -1
  67. package/models/update-organization-request-dto-rest.ts +66 -0
  68. package/models/{create-dashboard-response-class.ts → update-organization-response-class.ts} +7 -7
  69. package/models/user-class.ts +13 -5
  70. package/package.json +2 -2
  71. package/api/alerts-api.ts +0 -860
  72. package/api/dashboard-api.ts +0 -792
  73. package/api/data-report-api.ts +0 -687
  74. package/api/data-report-executor-api.ts +0 -181
  75. package/api/reports-api.ts +0 -860
  76. package/api/scenario-analysis-api.ts +0 -977
  77. package/api/settings-api.ts +0 -484
  78. package/api/tariff-comparisons-api.ts +0 -381
  79. package/dist/api/alerts-api.d.ts +0 -479
  80. package/dist/api/alerts-api.js +0 -752
  81. package/dist/api/dashboard-api.d.ts +0 -434
  82. package/dist/api/dashboard-api.js +0 -724
  83. package/dist/api/data-report-api.d.ts +0 -380
  84. package/dist/api/data-report-api.js +0 -645
  85. package/dist/api/data-report-executor-api.d.ts +0 -102
  86. package/dist/api/data-report-executor-api.js +0 -232
  87. package/dist/api/reports-api.d.ts +0 -479
  88. package/dist/api/reports-api.js +0 -752
  89. package/dist/api/scenario-analysis-api.d.ts +0 -529
  90. package/dist/api/scenario-analysis-api.js +0 -895
  91. package/dist/api/settings-api.d.ts +0 -264
  92. package/dist/api/tariff-comparisons-api.d.ts +0 -206
  93. package/dist/api/tariff-comparisons-api.js +0 -409
  94. package/dist/models/alert-class.d.ts +0 -90
  95. package/dist/models/alert-history-class.d.ts +0 -108
  96. package/dist/models/compare-tariffs-request-dto.d.ts +0 -37
  97. package/dist/models/compare-tariffs-request-dto.js +0 -22
  98. package/dist/models/compare-tariffs-response-class.d.ts +0 -31
  99. package/dist/models/condition-dto.d.ts +0 -43
  100. package/dist/models/condition-dto.js +0 -22
  101. package/dist/models/create-alert-request-dto.d.ts +0 -79
  102. package/dist/models/create-alert-request-dto.js +0 -27
  103. package/dist/models/create-dashboard-request-dto.d.ts +0 -70
  104. package/dist/models/create-dashboard-request-dto.js +0 -29
  105. package/dist/models/create-data-report-request-dto.d.ts +0 -61
  106. package/dist/models/create-data-report-response-class.d.ts +0 -25
  107. package/dist/models/create-report-request-dto.d.ts +0 -49
  108. package/dist/models/create-report-request-dto.js +0 -22
  109. package/dist/models/create-report-response-class.d.ts +0 -25
  110. package/dist/models/create-scenario-analysis-request-dto.d.ts +0 -74
  111. package/dist/models/create-scenario-analysis-request-dto.js +0 -22
  112. package/dist/models/create-scenario-analysis-response-class.d.ts +0 -25
  113. package/dist/models/dashboard-class.d.ts +0 -78
  114. package/dist/models/data-report-class.d.ts +0 -79
  115. package/dist/models/data-report-filter-class.d.ts +0 -72
  116. package/dist/models/data-report-filter-dto.d.ts +0 -48
  117. package/dist/models/data-report-filter-single-value-dto.d.ts +0 -42
  118. package/dist/models/data-report-filter-single-value-dto.js +0 -15
  119. package/dist/models/data-report-filter-value-dto.d.ts +0 -31
  120. package/dist/models/data-report-filter-value-dto.js +0 -15
  121. package/dist/models/get-alert-response-class.d.ts +0 -25
  122. package/dist/models/get-alert-response-class.js +0 -15
  123. package/dist/models/get-dashboard-response-class.d.ts +0 -25
  124. package/dist/models/get-dashboard-response-class.js +0 -15
  125. package/dist/models/get-data-report-response-class.d.ts +0 -25
  126. package/dist/models/get-data-report-response-class.js +0 -15
  127. package/dist/models/get-embedded-url-response-class.js +0 -15
  128. package/dist/models/get-report-response-class.d.ts +0 -25
  129. package/dist/models/get-report-response-class.js +0 -15
  130. package/dist/models/get-scenario-analysis-response-class.d.ts +0 -25
  131. package/dist/models/get-scenario-analysis-response-class.js +0 -15
  132. package/dist/models/grouped-tariff-class.d.ts +0 -30
  133. package/dist/models/grouped-tariff-class.js +0 -15
  134. package/dist/models/insurance-company-response-class.js +0 -15
  135. package/dist/models/insurance-response-class.js +0 -15
  136. package/dist/models/list-alert-history-response-class.d.ts +0 -31
  137. package/dist/models/list-alert-history-response-class.js +0 -15
  138. package/dist/models/list-alerts-response-class.d.ts +0 -31
  139. package/dist/models/list-alerts-response-class.js +0 -15
  140. package/dist/models/list-channels-response-class.d.ts +0 -25
  141. package/dist/models/list-channels-response-class.js +0 -15
  142. package/dist/models/list-dashboards-response-class.d.ts +0 -31
  143. package/dist/models/list-dashboards-response-class.js +0 -15
  144. package/dist/models/list-data-reports-response-class.js +0 -15
  145. package/dist/models/list-insurance-companies-response-class.d.ts +0 -25
  146. package/dist/models/list-insurance-companies-response-class.js +0 -15
  147. package/dist/models/list-report-history-response-class.d.ts +0 -31
  148. package/dist/models/list-report-history-response-class.js +0 -15
  149. package/dist/models/list-reports-response-class.d.ts +0 -31
  150. package/dist/models/list-reports-response-class.js +0 -15
  151. package/dist/models/list-scenario-analyses-response-class.d.ts +0 -31
  152. package/dist/models/list-scenario-analyses-response-class.js +0 -15
  153. package/dist/models/list-scenario-analysis-dates-response-class.d.ts +0 -25
  154. package/dist/models/list-scenario-analysis-dates-response-class.js +0 -15
  155. package/dist/models/list-tariff-insurance-companies-response-class.d.ts +0 -25
  156. package/dist/models/list-tariff-insurance-companies-response-class.js +0 -15
  157. package/dist/models/list-tariffs-response-class.d.ts +0 -25
  158. package/dist/models/list-tariffs-response-class.js +0 -15
  159. package/dist/models/list-user-subscriptions-response-class.js +0 -15
  160. package/dist/models/manage-subscription-request-dto.js +0 -15
  161. package/dist/models/manage-subscription-response-class.d.ts +0 -25
  162. package/dist/models/manage-subscription-response-class.js +0 -15
  163. package/dist/models/report-class.d.ts +0 -66
  164. package/dist/models/report-class.js +0 -15
  165. package/dist/models/report-history-class.d.ts +0 -48
  166. package/dist/models/report-history-class.js +0 -15
  167. package/dist/models/run-data-report-request-dto.d.ts +0 -31
  168. package/dist/models/run-data-report-request-dto.js +0 -15
  169. package/dist/models/run-data-report-response-class.d.ts +0 -24
  170. package/dist/models/run-data-report-response-class.js +0 -15
  171. package/dist/models/scenario-analysis-class.d.ts +0 -108
  172. package/dist/models/scenario-analysis-class.js +0 -15
  173. package/dist/models/scenario-analysis-date-response-class.d.ts +0 -36
  174. package/dist/models/scenario-analysis-date-response-class.js +0 -15
  175. package/dist/models/set-tenant-setting-response-class.d.ts +0 -36
  176. package/dist/models/set-tenant-setting-response-class.js +0 -15
  177. package/dist/models/update-alert-request-dto.d.ts +0 -72
  178. package/dist/models/update-alert-request-dto.js +0 -21
  179. package/dist/models/update-alert-response-class.d.ts +0 -25
  180. package/dist/models/update-alert-response-class.js +0 -15
  181. package/dist/models/update-dashboard-request-dto.d.ts +0 -76
  182. package/dist/models/update-dashboard-request-dto.js +0 -29
  183. package/dist/models/update-dashboard-response-class.d.ts +0 -25
  184. package/dist/models/update-dashboard-response-class.js +0 -15
  185. package/dist/models/update-data-report-request-dto.d.ts +0 -61
  186. package/dist/models/update-data-report-request-dto.js +0 -15
  187. package/dist/models/update-data-report-response-class.d.ts +0 -25
  188. package/dist/models/update-data-report-response-class.js +0 -15
  189. package/dist/models/update-report-request-dto.d.ts +0 -55
  190. package/dist/models/update-report-request-dto.js +0 -22
  191. package/dist/models/update-report-response-class.d.ts +0 -25
  192. package/dist/models/update-report-response-class.js +0 -15
  193. package/dist/models/update-scenario-analysis-request-dto.d.ts +0 -74
  194. package/dist/models/update-scenario-analysis-request-dto.js +0 -22
  195. package/dist/models/update-scenario-analysis-response-class.d.ts +0 -25
  196. package/dist/models/update-scenario-analysis-response-class.js +0 -15
  197. package/models/alert-class.ts +0 -96
  198. package/models/alert-history-class.ts +0 -114
  199. package/models/compare-tariffs-request-dto.ts +0 -46
  200. package/models/compare-tariffs-response-class.ts +0 -37
  201. package/models/condition-dto.ts +0 -52
  202. package/models/create-alert-request-dto.ts +0 -89
  203. package/models/create-dashboard-request-dto.ts +0 -81
  204. package/models/create-data-report-request-dto.ts +0 -67
  205. package/models/create-data-report-response-class.ts +0 -31
  206. package/models/create-report-request-dto.ts +0 -58
  207. package/models/create-report-response-class.ts +0 -31
  208. package/models/create-scenario-analysis-request-dto.ts +0 -83
  209. package/models/create-scenario-analysis-response-class.ts +0 -31
  210. package/models/dashboard-class.ts +0 -84
  211. package/models/data-report-class.ts +0 -85
  212. package/models/data-report-filter-class.ts +0 -78
  213. package/models/data-report-filter-dto.ts +0 -54
  214. package/models/data-report-filter-single-value-dto.ts +0 -48
  215. package/models/data-report-filter-value-dto.ts +0 -37
  216. package/models/get-alert-response-class.ts +0 -31
  217. package/models/get-dashboard-response-class.ts +0 -31
  218. package/models/get-data-report-response-class.ts +0 -31
  219. package/models/get-report-response-class.ts +0 -31
  220. package/models/get-scenario-analysis-response-class.ts +0 -31
  221. package/models/grouped-tariff-class.ts +0 -36
  222. package/models/list-alert-history-response-class.ts +0 -37
  223. package/models/list-alerts-response-class.ts +0 -37
  224. package/models/list-channels-response-class.ts +0 -31
  225. package/models/list-dashboards-response-class.ts +0 -37
  226. package/models/list-insurance-companies-response-class.ts +0 -31
  227. package/models/list-report-history-response-class.ts +0 -37
  228. package/models/list-reports-response-class.ts +0 -37
  229. package/models/list-scenario-analyses-response-class.ts +0 -37
  230. package/models/list-scenario-analysis-dates-response-class.ts +0 -31
  231. package/models/list-tariff-insurance-companies-response-class.ts +0 -31
  232. package/models/list-tariffs-response-class.ts +0 -31
  233. package/models/manage-subscription-response-class.ts +0 -31
  234. package/models/report-class.ts +0 -72
  235. package/models/report-history-class.ts +0 -54
  236. package/models/run-data-report-request-dto.ts +0 -37
  237. package/models/run-data-report-response-class.ts +0 -30
  238. package/models/scenario-analysis-class.ts +0 -114
  239. package/models/scenario-analysis-date-response-class.ts +0 -42
  240. package/models/set-tenant-setting-response-class.ts +0 -42
  241. package/models/update-alert-request-dto.ts +0 -81
  242. package/models/update-alert-response-class.ts +0 -31
  243. package/models/update-dashboard-request-dto.ts +0 -87
  244. package/models/update-dashboard-response-class.ts +0 -31
  245. package/models/update-data-report-request-dto.ts +0 -67
  246. package/models/update-data-report-response-class.ts +0 -31
  247. package/models/update-report-request-dto.ts +0 -64
  248. package/models/update-report-response-class.ts +0 -31
  249. package/models/update-scenario-analysis-request-dto.ts +0 -83
  250. package/models/update-scenario-analysis-response-class.ts +0 -31
  251. /package/dist/models/{alert-class.js → batch-delete-response-class.js} +0 -0
  252. /package/dist/models/{alert-history-class.js → delete-response-class.js} +0 -0
  253. /package/dist/models/{channel-response-class.js → disable-users-response-class.js} +0 -0
  254. /package/dist/models/{compare-tariffs-response-class.js → enable-users-response-class.js} +0 -0
  255. /package/dist/models/{create-alert-response-class.js → get-organization-response-class.js} +0 -0
  256. /package/dist/models/{create-dashboard-response-class.js → invite-org-request-dto.js} +0 -0
  257. /package/dist/models/{create-data-report-request-dto.js → invite-users-response-class.js} +0 -0
  258. /package/dist/models/{create-data-report-response-class.js → list-org-invitations-response-class.js} +0 -0
  259. /package/dist/models/{create-report-response-class.js → list-organizations-response-class.js} +0 -0
  260. /package/dist/models/{create-scenario-analysis-response-class.js → org-invitation-class.js} +0 -0
  261. /package/dist/models/{dashboard-class.js → org-invitation-response-class.js} +0 -0
  262. /package/dist/models/{data-report-class.js → organization-class.js} +0 -0
  263. /package/dist/models/{data-report-filter-class.js → update-organization-request-dto-rest.js} +0 -0
  264. /package/dist/models/{data-report-filter-dto.js → update-organization-response-class.js} +0 -0
@@ -0,0 +1,459 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Tenant Service
5
+ * The EMIL TenantService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { GetOrganizationResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { ListOrganizationsResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { UpdateOrganizationRequestDtoRest } from '../models';
29
+ // @ts-ignore
30
+ import { UpdateOrganizationResponseClass } from '../models';
31
+ // URLSearchParams not necessarily used
32
+ // @ts-ignore
33
+ import { URL, URLSearchParams } from 'url';
34
+ const FormData = require('form-data');
35
+ /**
36
+ * OrganizationsApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const OrganizationsApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * Get Organization by code
43
+ * @summary Retrieve the Organization
44
+ * @param {string} code
45
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ getOrganization: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
50
+ // verify required parameter 'code' is not null or undefined
51
+ assertParamExists('getOrganization', 'code', code)
52
+ const localVarPath = `/tenantservice/v1/organizations/{code}`
53
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
54
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
55
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
56
+ let baseOptions;
57
+ let baseAccessToken;
58
+ if (configuration) {
59
+ baseOptions = configuration.baseOptions;
60
+ baseAccessToken = configuration.accessToken;
61
+ }
62
+
63
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
64
+ const localVarHeaderParameter = {} as any;
65
+ const localVarQueryParameter = {} as any;
66
+
67
+ // authentication bearer required
68
+ // http bearer authentication required
69
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
70
+
71
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
72
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
73
+ }
74
+
75
+
76
+
77
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
+
81
+ return {
82
+ url: toPathString(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ /**
87
+ * This will fetch list of organizations
88
+ * @summary List organizations
89
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
90
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
91
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
92
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
93
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
94
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
95
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
96
+ * @param {*} [options] Override http request option.
97
+ * @throws {RequiredError}
98
+ */
99
+ listOrganizations: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
100
+ const localVarPath = `/tenantservice/v1/organizations`;
101
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
102
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
103
+ let baseOptions;
104
+ let baseAccessToken;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ baseAccessToken = configuration.accessToken;
108
+ }
109
+
110
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
111
+ const localVarHeaderParameter = {} as any;
112
+ const localVarQueryParameter = {} as any;
113
+
114
+ // authentication bearer required
115
+ // http bearer authentication required
116
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
+
118
+ if (pageSize !== undefined) {
119
+ localVarQueryParameter['pageSize'] = pageSize;
120
+ }
121
+
122
+ if (pageToken !== undefined) {
123
+ localVarQueryParameter['pageToken'] = pageToken;
124
+ }
125
+
126
+ if (filter !== undefined) {
127
+ localVarQueryParameter['filter'] = filter;
128
+ }
129
+
130
+ if (search !== undefined) {
131
+ localVarQueryParameter['search'] = search;
132
+ }
133
+
134
+ if (order !== undefined) {
135
+ localVarQueryParameter['order'] = order;
136
+ }
137
+
138
+ if (expand !== undefined) {
139
+ localVarQueryParameter['expand'] = expand;
140
+ }
141
+
142
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
143
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
144
+ }
145
+
146
+
147
+
148
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
149
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
150
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
151
+
152
+ return {
153
+ url: toPathString(localVarUrlObj),
154
+ options: localVarRequestOptions,
155
+ };
156
+ },
157
+ /**
158
+ * Update organization data
159
+ * @summary Update the Organization
160
+ * @param {string} code
161
+ * @param {UpdateOrganizationRequestDtoRest} updateOrganizationRequestDtoRest
162
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
163
+ * @param {*} [options] Override http request option.
164
+ * @throws {RequiredError}
165
+ */
166
+ updateOrganization: async (code: string, updateOrganizationRequestDtoRest: UpdateOrganizationRequestDtoRest, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
167
+ // verify required parameter 'code' is not null or undefined
168
+ assertParamExists('updateOrganization', 'code', code)
169
+ // verify required parameter 'updateOrganizationRequestDtoRest' is not null or undefined
170
+ assertParamExists('updateOrganization', 'updateOrganizationRequestDtoRest', updateOrganizationRequestDtoRest)
171
+ const localVarPath = `/tenantservice/v1/organizations/{code}`
172
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
173
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
174
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
175
+ let baseOptions;
176
+ let baseAccessToken;
177
+ if (configuration) {
178
+ baseOptions = configuration.baseOptions;
179
+ baseAccessToken = configuration.accessToken;
180
+ }
181
+
182
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
183
+ const localVarHeaderParameter = {} as any;
184
+ const localVarQueryParameter = {} as any;
185
+
186
+ // authentication bearer required
187
+ // http bearer authentication required
188
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
189
+
190
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
191
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ }
193
+
194
+
195
+
196
+ localVarHeaderParameter['Content-Type'] = 'application/json';
197
+
198
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
199
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
201
+ localVarRequestOptions.data = serializeDataIfNeeded(updateOrganizationRequestDtoRest, localVarRequestOptions, configuration)
202
+
203
+ return {
204
+ url: toPathString(localVarUrlObj),
205
+ options: localVarRequestOptions,
206
+ };
207
+ },
208
+ }
209
+ };
210
+
211
+ /**
212
+ * OrganizationsApi - functional programming interface
213
+ * @export
214
+ */
215
+ export const OrganizationsApiFp = function(configuration?: Configuration) {
216
+ const localVarAxiosParamCreator = OrganizationsApiAxiosParamCreator(configuration)
217
+ return {
218
+ /**
219
+ * Get Organization by code
220
+ * @summary Retrieve the Organization
221
+ * @param {string} code
222
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
223
+ * @param {*} [options] Override http request option.
224
+ * @throws {RequiredError}
225
+ */
226
+ async getOrganization(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrganizationResponseClass>> {
227
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(code, authorization, options);
228
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
229
+ },
230
+ /**
231
+ * This will fetch list of organizations
232
+ * @summary List organizations
233
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
234
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
235
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
236
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
237
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
238
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
239
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ */
243
+ async listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOrganizationsResponseClass>> {
244
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options);
245
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
246
+ },
247
+ /**
248
+ * Update organization data
249
+ * @summary Update the Organization
250
+ * @param {string} code
251
+ * @param {UpdateOrganizationRequestDtoRest} updateOrganizationRequestDtoRest
252
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ async updateOrganization(code: string, updateOrganizationRequestDtoRest: UpdateOrganizationRequestDtoRest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateOrganizationResponseClass>> {
257
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization(code, updateOrganizationRequestDtoRest, authorization, options);
258
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
259
+ },
260
+ }
261
+ };
262
+
263
+ /**
264
+ * OrganizationsApi - factory interface
265
+ * @export
266
+ */
267
+ export const OrganizationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
268
+ const localVarFp = OrganizationsApiFp(configuration)
269
+ return {
270
+ /**
271
+ * Get Organization by code
272
+ * @summary Retrieve the Organization
273
+ * @param {string} code
274
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ getOrganization(code: string, authorization?: string, options?: any): AxiosPromise<GetOrganizationResponseClass> {
279
+ return localVarFp.getOrganization(code, authorization, options).then((request) => request(axios, basePath));
280
+ },
281
+ /**
282
+ * This will fetch list of organizations
283
+ * @summary List organizations
284
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
285
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
286
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
287
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
288
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
289
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
290
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
291
+ * @param {*} [options] Override http request option.
292
+ * @throws {RequiredError}
293
+ */
294
+ listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListOrganizationsResponseClass> {
295
+ return localVarFp.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
296
+ },
297
+ /**
298
+ * Update organization data
299
+ * @summary Update the Organization
300
+ * @param {string} code
301
+ * @param {UpdateOrganizationRequestDtoRest} updateOrganizationRequestDtoRest
302
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ updateOrganization(code: string, updateOrganizationRequestDtoRest: UpdateOrganizationRequestDtoRest, authorization?: string, options?: any): AxiosPromise<UpdateOrganizationResponseClass> {
307
+ return localVarFp.updateOrganization(code, updateOrganizationRequestDtoRest, authorization, options).then((request) => request(axios, basePath));
308
+ },
309
+ };
310
+ };
311
+
312
+ /**
313
+ * Request parameters for getOrganization operation in OrganizationsApi.
314
+ * @export
315
+ * @interface OrganizationsApiGetOrganizationRequest
316
+ */
317
+ export interface OrganizationsApiGetOrganizationRequest {
318
+ /**
319
+ *
320
+ * @type {string}
321
+ * @memberof OrganizationsApiGetOrganization
322
+ */
323
+ readonly code: string
324
+
325
+ /**
326
+ * Bearer Token: provided by the login endpoint under the name accessToken.
327
+ * @type {string}
328
+ * @memberof OrganizationsApiGetOrganization
329
+ */
330
+ readonly authorization?: string
331
+ }
332
+
333
+ /**
334
+ * Request parameters for listOrganizations operation in OrganizationsApi.
335
+ * @export
336
+ * @interface OrganizationsApiListOrganizationsRequest
337
+ */
338
+ export interface OrganizationsApiListOrganizationsRequest {
339
+ /**
340
+ * Bearer Token: provided by the login endpoint under the name accessToken.
341
+ * @type {string}
342
+ * @memberof OrganizationsApiListOrganizations
343
+ */
344
+ readonly authorization?: string
345
+
346
+ /**
347
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
348
+ * @type {any}
349
+ * @memberof OrganizationsApiListOrganizations
350
+ */
351
+ readonly pageSize?: any
352
+
353
+ /**
354
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
355
+ * @type {any}
356
+ * @memberof OrganizationsApiListOrganizations
357
+ */
358
+ readonly pageToken?: any
359
+
360
+ /**
361
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
362
+ * @type {any}
363
+ * @memberof OrganizationsApiListOrganizations
364
+ */
365
+ readonly filter?: any
366
+
367
+ /**
368
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
369
+ * @type {any}
370
+ * @memberof OrganizationsApiListOrganizations
371
+ */
372
+ readonly search?: any
373
+
374
+ /**
375
+ * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
376
+ * @type {any}
377
+ * @memberof OrganizationsApiListOrganizations
378
+ */
379
+ readonly order?: any
380
+
381
+ /**
382
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
383
+ * @type {any}
384
+ * @memberof OrganizationsApiListOrganizations
385
+ */
386
+ readonly expand?: any
387
+ }
388
+
389
+ /**
390
+ * Request parameters for updateOrganization operation in OrganizationsApi.
391
+ * @export
392
+ * @interface OrganizationsApiUpdateOrganizationRequest
393
+ */
394
+ export interface OrganizationsApiUpdateOrganizationRequest {
395
+ /**
396
+ *
397
+ * @type {string}
398
+ * @memberof OrganizationsApiUpdateOrganization
399
+ */
400
+ readonly code: string
401
+
402
+ /**
403
+ *
404
+ * @type {UpdateOrganizationRequestDtoRest}
405
+ * @memberof OrganizationsApiUpdateOrganization
406
+ */
407
+ readonly updateOrganizationRequestDtoRest: UpdateOrganizationRequestDtoRest
408
+
409
+ /**
410
+ * Bearer Token: provided by the login endpoint under the name accessToken.
411
+ * @type {string}
412
+ * @memberof OrganizationsApiUpdateOrganization
413
+ */
414
+ readonly authorization?: string
415
+ }
416
+
417
+ /**
418
+ * OrganizationsApi - object-oriented interface
419
+ * @export
420
+ * @class OrganizationsApi
421
+ * @extends {BaseAPI}
422
+ */
423
+ export class OrganizationsApi extends BaseAPI {
424
+ /**
425
+ * Get Organization by code
426
+ * @summary Retrieve the Organization
427
+ * @param {OrganizationsApiGetOrganizationRequest} requestParameters Request parameters.
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ * @memberof OrganizationsApi
431
+ */
432
+ public getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, options?: AxiosRequestConfig) {
433
+ return OrganizationsApiFp(this.configuration).getOrganization(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
434
+ }
435
+
436
+ /**
437
+ * This will fetch list of organizations
438
+ * @summary List organizations
439
+ * @param {OrganizationsApiListOrganizationsRequest} requestParameters Request parameters.
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ * @memberof OrganizationsApi
443
+ */
444
+ public listOrganizations(requestParameters: OrganizationsApiListOrganizationsRequest = {}, options?: AxiosRequestConfig) {
445
+ return OrganizationsApiFp(this.configuration).listOrganizations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
446
+ }
447
+
448
+ /**
449
+ * Update organization data
450
+ * @summary Update the Organization
451
+ * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters.
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ * @memberof OrganizationsApi
455
+ */
456
+ public updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, options?: AxiosRequestConfig) {
457
+ return OrganizationsApiFp(this.configuration).updateOrganization(requestParameters.code, requestParameters.updateOrganizationRequestDtoRest, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
458
+ }
459
+ }