@emilgroup/tenant-sdk-node 1.29.1-beta.1 → 1.31.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 (64) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +2 -2
  3. package/api/invite-users-api.ts +4 -4
  4. package/api/organization-migration-api.ts +683 -0
  5. package/api/users-api.ts +4 -4
  6. package/api.ts +2 -0
  7. package/base.ts +45 -3
  8. package/dist/api/custom-schema-api.js +14 -39
  9. package/dist/api/dashboard-api.js +29 -74
  10. package/dist/api/dashboard-group-api.js +17 -46
  11. package/dist/api/data-report-api.js +14 -39
  12. package/dist/api/data-report-executor-api.js +5 -18
  13. package/dist/api/delete-organization-invitations-api.js +5 -18
  14. package/dist/api/health-check-api.js +5 -18
  15. package/dist/api/invite-organizations-api.js +5 -18
  16. package/dist/api/invite-users-api.d.ts +4 -4
  17. package/dist/api/invite-users-api.js +17 -42
  18. package/dist/api/list-organization-invitations-api.js +5 -18
  19. package/dist/api/organization-migration-api.d.ts +385 -0
  20. package/dist/api/organization-migration-api.js +639 -0
  21. package/dist/api/organizations-api.js +11 -32
  22. package/dist/api/re-invite-an-organization-api.js +5 -18
  23. package/dist/api/roles-api.js +5 -18
  24. package/dist/api/settings-api.js +5 -18
  25. package/dist/api/users-api.d.ts +4 -4
  26. package/dist/api/users-api.js +26 -63
  27. package/dist/api.d.ts +1 -0
  28. package/dist/api.js +1 -0
  29. package/dist/base.d.ts +11 -2
  30. package/dist/base.js +56 -27
  31. package/dist/common.d.ts +1 -1
  32. package/dist/common.js +2 -2
  33. package/dist/models/create-organization-migration-request-dto.d.ts +42 -0
  34. package/dist/models/create-organization-migration-request-dto.js +15 -0
  35. package/dist/models/create-organization-migration-response-class.d.ts +25 -0
  36. package/dist/models/create-organization-migration-response-class.js +15 -0
  37. package/dist/models/create-resources-migration-request-dto.d.ts +36 -0
  38. package/dist/models/create-resources-migration-request-dto.js +15 -0
  39. package/dist/models/get-organization-migration-response-class.d.ts +25 -0
  40. package/dist/models/get-organization-migration-response-class.js +15 -0
  41. package/dist/models/index.d.ts +8 -0
  42. package/dist/models/index.js +8 -0
  43. package/dist/models/link-user-with-partner-request-dto-rest.d.ts +6 -0
  44. package/dist/models/list-organization-migrations-response-class.d.ts +43 -0
  45. package/dist/models/list-organization-migrations-response-class.js +15 -0
  46. package/dist/models/org-invitation-class.d.ts +6 -0
  47. package/dist/models/organization-migration-class.d.ts +81 -0
  48. package/dist/models/organization-migration-class.js +24 -0
  49. package/dist/models/revert-organization-migration-request-dto.d.ts +30 -0
  50. package/dist/models/revert-organization-migration-request-dto.js +15 -0
  51. package/dist/models/revert-organization-migration-response-class.d.ts +25 -0
  52. package/dist/models/revert-organization-migration-response-class.js +15 -0
  53. package/models/create-organization-migration-request-dto.ts +48 -0
  54. package/models/create-organization-migration-response-class.ts +31 -0
  55. package/models/create-resources-migration-request-dto.ts +42 -0
  56. package/models/get-organization-migration-response-class.ts +31 -0
  57. package/models/index.ts +8 -0
  58. package/models/link-user-with-partner-request-dto-rest.ts +6 -0
  59. package/models/list-organization-migrations-response-class.ts +49 -0
  60. package/models/org-invitation-class.ts +6 -0
  61. package/models/organization-migration-class.ts +90 -0
  62. package/models/revert-organization-migration-request-dto.ts +36 -0
  63. package/models/revert-organization-migration-response-class.ts +31 -0
  64. package/package.json +4 -4
@@ -0,0 +1,639 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Tenant Service
6
+ * The EMIL TenantService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.OrganizationMigrationApi = exports.OrganizationMigrationApiFactory = exports.OrganizationMigrationApiFp = exports.OrganizationMigrationApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * OrganizationMigrationApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var OrganizationMigrationApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
101
+ * @summary Create organization migration to move all resources including the sub organizations
102
+ * @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createOrganizationMigration: function (createOrganizationMigrationRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createOrganizationMigrationRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createOrganizationMigration', 'createOrganizationMigrationRequestDto', createOrganizationMigrationRequestDto);
116
+ localVarPath = "/tenantservice/v1/organization-migrations";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrganizationMigrationRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * Creates a new organization migration to move only source organization\'s resources to target organization. It does not move organization and users. **Required Permissions** \"tenant-management.organizations.create\"
150
+ * @summary Create organization migration to move only resources excluding sub organizations
151
+ * @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ createResourcesMigration: function (createResourcesMigrationRequestDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'createResourcesMigrationRequestDto' is not null or undefined
164
+ (0, common_1.assertParamExists)('createResourcesMigration', 'createResourcesMigrationRequestDto', createResourcesMigrationRequestDto);
165
+ localVarPath = "/tenantservice/v1/organization-migrations/resources";
166
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createResourcesMigrationRequestDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
197
+ /**
198
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
199
+ * @summary Get organization migration
200
+ * @param {any} code Unique identifier for the object.
201
+ * @param {string} [expand] Fields to expand response by
202
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
203
+ * @param {*} [options] Override http request option.
204
+ * @throws {RequiredError}
205
+ */
206
+ getOrganizationMigration: function (code, expand, authorization, options) {
207
+ if (options === void 0) { options = {}; }
208
+ return __awaiter(_this, void 0, void 0, function () {
209
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
210
+ return __generator(this, function (_a) {
211
+ switch (_a.label) {
212
+ case 0:
213
+ // verify required parameter 'code' is not null or undefined
214
+ (0, common_1.assertParamExists)('getOrganizationMigration', 'code', code);
215
+ localVarPath = "/tenantservice/v1/organization-migrations/{code}"
216
+ .replace("{".concat("expand", "}"), encodeURIComponent(String(expand)))
217
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
218
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
219
+ if (configuration) {
220
+ baseOptions = configuration.baseOptions;
221
+ baseAccessToken = configuration.accessToken;
222
+ }
223
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
224
+ localVarHeaderParameter = {};
225
+ localVarQueryParameter = {};
226
+ // authentication bearer required
227
+ // http bearer authentication required
228
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
229
+ case 1:
230
+ // authentication bearer required
231
+ // http bearer authentication required
232
+ _a.sent();
233
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
234
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
235
+ }
236
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
237
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
238
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
239
+ return [2 /*return*/, {
240
+ url: (0, common_1.toPathString)(localVarUrlObj),
241
+ options: localVarRequestOptions,
242
+ }];
243
+ }
244
+ });
245
+ });
246
+ },
247
+ /**
248
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
249
+ * @summary List organization migrations
250
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
251
+ * @param {string} [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.
252
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
253
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
254
+ * @param {string} [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.
255
+ * @param {string} [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.
256
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
257
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
258
+ * @param {*} [options] Override http request option.
259
+ * @throws {RequiredError}
260
+ */
261
+ listOrganizationMigrations: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
262
+ if (options === void 0) { options = {}; }
263
+ return __awaiter(_this, void 0, void 0, function () {
264
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
265
+ return __generator(this, function (_a) {
266
+ switch (_a.label) {
267
+ case 0:
268
+ localVarPath = "/tenantservice/v1/organization-migrations";
269
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
270
+ if (configuration) {
271
+ baseOptions = configuration.baseOptions;
272
+ baseAccessToken = configuration.accessToken;
273
+ }
274
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
275
+ localVarHeaderParameter = {};
276
+ localVarQueryParameter = {};
277
+ // authentication bearer required
278
+ // http bearer authentication required
279
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
280
+ case 1:
281
+ // authentication bearer required
282
+ // http bearer authentication required
283
+ _a.sent();
284
+ if (pageSize !== undefined) {
285
+ localVarQueryParameter['pageSize'] = pageSize;
286
+ }
287
+ if (pageToken !== undefined) {
288
+ localVarQueryParameter['pageToken'] = pageToken;
289
+ }
290
+ if (filter !== undefined) {
291
+ localVarQueryParameter['filter'] = filter;
292
+ }
293
+ if (search !== undefined) {
294
+ localVarQueryParameter['search'] = search;
295
+ }
296
+ if (order !== undefined) {
297
+ localVarQueryParameter['order'] = order;
298
+ }
299
+ if (expand !== undefined) {
300
+ localVarQueryParameter['expand'] = expand;
301
+ }
302
+ if (filters !== undefined) {
303
+ localVarQueryParameter['filters'] = filters;
304
+ }
305
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
306
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
307
+ }
308
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
309
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
310
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
311
+ return [2 /*return*/, {
312
+ url: (0, common_1.toPathString)(localVarUrlObj),
313
+ options: localVarRequestOptions,
314
+ }];
315
+ }
316
+ });
317
+ });
318
+ },
319
+ /**
320
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
321
+ * @summary Revert organization migration
322
+ * @param {RevertOrganizationMigrationRequestDto} revertOrganizationMigrationRequestDto
323
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
324
+ * @param {*} [options] Override http request option.
325
+ * @throws {RequiredError}
326
+ */
327
+ revertOrganizationMigration: function (revertOrganizationMigrationRequestDto, authorization, options) {
328
+ if (options === void 0) { options = {}; }
329
+ return __awaiter(_this, void 0, void 0, function () {
330
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
331
+ return __generator(this, function (_a) {
332
+ switch (_a.label) {
333
+ case 0:
334
+ // verify required parameter 'revertOrganizationMigrationRequestDto' is not null or undefined
335
+ (0, common_1.assertParamExists)('revertOrganizationMigration', 'revertOrganizationMigrationRequestDto', revertOrganizationMigrationRequestDto);
336
+ localVarPath = "/tenantservice/v1/organization-migrations/revert";
337
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
338
+ if (configuration) {
339
+ baseOptions = configuration.baseOptions;
340
+ baseAccessToken = configuration.accessToken;
341
+ }
342
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
343
+ localVarHeaderParameter = {};
344
+ localVarQueryParameter = {};
345
+ // authentication bearer required
346
+ // http bearer authentication required
347
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
348
+ case 1:
349
+ // authentication bearer required
350
+ // http bearer authentication required
351
+ _a.sent();
352
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
353
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
354
+ }
355
+ localVarHeaderParameter['Content-Type'] = 'application/json';
356
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
357
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
358
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
359
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(revertOrganizationMigrationRequestDto, localVarRequestOptions, configuration);
360
+ return [2 /*return*/, {
361
+ url: (0, common_1.toPathString)(localVarUrlObj),
362
+ options: localVarRequestOptions,
363
+ }];
364
+ }
365
+ });
366
+ });
367
+ },
368
+ };
369
+ };
370
+ exports.OrganizationMigrationApiAxiosParamCreator = OrganizationMigrationApiAxiosParamCreator;
371
+ /**
372
+ * OrganizationMigrationApi - functional programming interface
373
+ * @export
374
+ */
375
+ var OrganizationMigrationApiFp = function (configuration) {
376
+ var localVarAxiosParamCreator = (0, exports.OrganizationMigrationApiAxiosParamCreator)(configuration);
377
+ return {
378
+ /**
379
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
380
+ * @summary Create organization migration to move all resources including the sub organizations
381
+ * @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
382
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ createOrganizationMigration: function (createOrganizationMigrationRequestDto, authorization, options) {
387
+ return __awaiter(this, void 0, void 0, function () {
388
+ var localVarAxiosArgs;
389
+ return __generator(this, function (_a) {
390
+ switch (_a.label) {
391
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrganizationMigration(createOrganizationMigrationRequestDto, authorization, options)];
392
+ case 1:
393
+ localVarAxiosArgs = _a.sent();
394
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
395
+ }
396
+ });
397
+ });
398
+ },
399
+ /**
400
+ * Creates a new organization migration to move only source organization\'s resources to target organization. It does not move organization and users. **Required Permissions** \"tenant-management.organizations.create\"
401
+ * @summary Create organization migration to move only resources excluding sub organizations
402
+ * @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
403
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
404
+ * @param {*} [options] Override http request option.
405
+ * @throws {RequiredError}
406
+ */
407
+ createResourcesMigration: function (createResourcesMigrationRequestDto, authorization, options) {
408
+ return __awaiter(this, void 0, void 0, function () {
409
+ var localVarAxiosArgs;
410
+ return __generator(this, function (_a) {
411
+ switch (_a.label) {
412
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createResourcesMigration(createResourcesMigrationRequestDto, authorization, options)];
413
+ case 1:
414
+ localVarAxiosArgs = _a.sent();
415
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
416
+ }
417
+ });
418
+ });
419
+ },
420
+ /**
421
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
422
+ * @summary Get organization migration
423
+ * @param {any} code Unique identifier for the object.
424
+ * @param {string} [expand] Fields to expand response by
425
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ getOrganizationMigration: function (code, expand, authorization, options) {
430
+ return __awaiter(this, void 0, void 0, function () {
431
+ var localVarAxiosArgs;
432
+ return __generator(this, function (_a) {
433
+ switch (_a.label) {
434
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getOrganizationMigration(code, expand, authorization, options)];
435
+ case 1:
436
+ localVarAxiosArgs = _a.sent();
437
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
438
+ }
439
+ });
440
+ });
441
+ },
442
+ /**
443
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
444
+ * @summary List organization migrations
445
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
446
+ * @param {string} [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.
447
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
448
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
449
+ * @param {string} [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.
450
+ * @param {string} [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.
451
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
452
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ listOrganizationMigrations: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
457
+ return __awaiter(this, void 0, void 0, function () {
458
+ var localVarAxiosArgs;
459
+ return __generator(this, function (_a) {
460
+ switch (_a.label) {
461
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listOrganizationMigrations(pageSize, pageToken, filter, search, order, expand, filters, authorization, options)];
462
+ case 1:
463
+ localVarAxiosArgs = _a.sent();
464
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
465
+ }
466
+ });
467
+ });
468
+ },
469
+ /**
470
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
471
+ * @summary Revert organization migration
472
+ * @param {RevertOrganizationMigrationRequestDto} revertOrganizationMigrationRequestDto
473
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ revertOrganizationMigration: function (revertOrganizationMigrationRequestDto, authorization, options) {
478
+ return __awaiter(this, void 0, void 0, function () {
479
+ var localVarAxiosArgs;
480
+ return __generator(this, function (_a) {
481
+ switch (_a.label) {
482
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.revertOrganizationMigration(revertOrganizationMigrationRequestDto, authorization, options)];
483
+ case 1:
484
+ localVarAxiosArgs = _a.sent();
485
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
486
+ }
487
+ });
488
+ });
489
+ },
490
+ };
491
+ };
492
+ exports.OrganizationMigrationApiFp = OrganizationMigrationApiFp;
493
+ /**
494
+ * OrganizationMigrationApi - factory interface
495
+ * @export
496
+ */
497
+ var OrganizationMigrationApiFactory = function (configuration, basePath, axios) {
498
+ var localVarFp = (0, exports.OrganizationMigrationApiFp)(configuration);
499
+ return {
500
+ /**
501
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
502
+ * @summary Create organization migration to move all resources including the sub organizations
503
+ * @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
504
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ createOrganizationMigration: function (createOrganizationMigrationRequestDto, authorization, options) {
509
+ return localVarFp.createOrganizationMigration(createOrganizationMigrationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
510
+ },
511
+ /**
512
+ * Creates a new organization migration to move only source organization\'s resources to target organization. It does not move organization and users. **Required Permissions** \"tenant-management.organizations.create\"
513
+ * @summary Create organization migration to move only resources excluding sub organizations
514
+ * @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
515
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
516
+ * @param {*} [options] Override http request option.
517
+ * @throws {RequiredError}
518
+ */
519
+ createResourcesMigration: function (createResourcesMigrationRequestDto, authorization, options) {
520
+ return localVarFp.createResourcesMigration(createResourcesMigrationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
521
+ },
522
+ /**
523
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
524
+ * @summary Get organization migration
525
+ * @param {any} code Unique identifier for the object.
526
+ * @param {string} [expand] Fields to expand response by
527
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
528
+ * @param {*} [options] Override http request option.
529
+ * @throws {RequiredError}
530
+ */
531
+ getOrganizationMigration: function (code, expand, authorization, options) {
532
+ return localVarFp.getOrganizationMigration(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
533
+ },
534
+ /**
535
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
536
+ * @summary List organization migrations
537
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
538
+ * @param {string} [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.
539
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
540
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
541
+ * @param {string} [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.
542
+ * @param {string} [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.
543
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
544
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ listOrganizationMigrations: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
549
+ return localVarFp.listOrganizationMigrations(pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then(function (request) { return request(axios, basePath); });
550
+ },
551
+ /**
552
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
553
+ * @summary Revert organization migration
554
+ * @param {RevertOrganizationMigrationRequestDto} revertOrganizationMigrationRequestDto
555
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
556
+ * @param {*} [options] Override http request option.
557
+ * @throws {RequiredError}
558
+ */
559
+ revertOrganizationMigration: function (revertOrganizationMigrationRequestDto, authorization, options) {
560
+ return localVarFp.revertOrganizationMigration(revertOrganizationMigrationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
561
+ },
562
+ };
563
+ };
564
+ exports.OrganizationMigrationApiFactory = OrganizationMigrationApiFactory;
565
+ /**
566
+ * OrganizationMigrationApi - object-oriented interface
567
+ * @export
568
+ * @class OrganizationMigrationApi
569
+ * @extends {BaseAPI}
570
+ */
571
+ var OrganizationMigrationApi = /** @class */ (function (_super) {
572
+ __extends(OrganizationMigrationApi, _super);
573
+ function OrganizationMigrationApi() {
574
+ return _super !== null && _super.apply(this, arguments) || this;
575
+ }
576
+ /**
577
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
578
+ * @summary Create organization migration to move all resources including the sub organizations
579
+ * @param {OrganizationMigrationApiCreateOrganizationMigrationRequest} requestParameters Request parameters.
580
+ * @param {*} [options] Override http request option.
581
+ * @throws {RequiredError}
582
+ * @memberof OrganizationMigrationApi
583
+ */
584
+ OrganizationMigrationApi.prototype.createOrganizationMigration = function (requestParameters, options) {
585
+ var _this = this;
586
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).createOrganizationMigration(requestParameters.createOrganizationMigrationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
587
+ };
588
+ /**
589
+ * Creates a new organization migration to move only source organization\'s resources to target organization. It does not move organization and users. **Required Permissions** \"tenant-management.organizations.create\"
590
+ * @summary Create organization migration to move only resources excluding sub organizations
591
+ * @param {OrganizationMigrationApiCreateResourcesMigrationRequest} requestParameters Request parameters.
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ * @memberof OrganizationMigrationApi
595
+ */
596
+ OrganizationMigrationApi.prototype.createResourcesMigration = function (requestParameters, options) {
597
+ var _this = this;
598
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).createResourcesMigration(requestParameters.createResourcesMigrationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
599
+ };
600
+ /**
601
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
602
+ * @summary Get organization migration
603
+ * @param {OrganizationMigrationApiGetOrganizationMigrationRequest} requestParameters Request parameters.
604
+ * @param {*} [options] Override http request option.
605
+ * @throws {RequiredError}
606
+ * @memberof OrganizationMigrationApi
607
+ */
608
+ OrganizationMigrationApi.prototype.getOrganizationMigration = function (requestParameters, options) {
609
+ var _this = this;
610
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).getOrganizationMigration(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
611
+ };
612
+ /**
613
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
614
+ * @summary List organization migrations
615
+ * @param {OrganizationMigrationApiListOrganizationMigrationsRequest} requestParameters Request parameters.
616
+ * @param {*} [options] Override http request option.
617
+ * @throws {RequiredError}
618
+ * @memberof OrganizationMigrationApi
619
+ */
620
+ OrganizationMigrationApi.prototype.listOrganizationMigrations = function (requestParameters, options) {
621
+ var _this = this;
622
+ if (requestParameters === void 0) { requestParameters = {}; }
623
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).listOrganizationMigrations(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
624
+ };
625
+ /**
626
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
627
+ * @summary Revert organization migration
628
+ * @param {OrganizationMigrationApiRevertOrganizationMigrationRequest} requestParameters Request parameters.
629
+ * @param {*} [options] Override http request option.
630
+ * @throws {RequiredError}
631
+ * @memberof OrganizationMigrationApi
632
+ */
633
+ OrganizationMigrationApi.prototype.revertOrganizationMigration = function (requestParameters, options) {
634
+ var _this = this;
635
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).revertOrganizationMigration(requestParameters.revertOrganizationMigrationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
636
+ };
637
+ return OrganizationMigrationApi;
638
+ }(base_1.BaseAPI));
639
+ exports.OrganizationMigrationApi = OrganizationMigrationApi;