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