@emilgroup/tenant-sdk-node 1.30.0 → 1.31.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 (47) 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 +686 -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/invite-users-api.d.ts +4 -4
  9. package/dist/api/invite-users-api.js +3 -3
  10. package/dist/api/organization-migration-api.d.ts +385 -0
  11. package/dist/api/organization-migration-api.js +641 -0
  12. package/dist/api/users-api.d.ts +4 -4
  13. package/dist/api/users-api.js +3 -3
  14. package/dist/api.d.ts +1 -0
  15. package/dist/api.js +1 -0
  16. package/dist/base.d.ts +11 -2
  17. package/dist/base.js +42 -3
  18. package/dist/models/create-organization-migration-request-dto.d.ts +42 -0
  19. package/dist/models/create-organization-migration-request-dto.js +15 -0
  20. package/dist/models/create-organization-migration-response-class.d.ts +25 -0
  21. package/dist/models/create-organization-migration-response-class.js +15 -0
  22. package/dist/models/create-resources-migration-request-dto.d.ts +36 -0
  23. package/dist/models/create-resources-migration-request-dto.js +15 -0
  24. package/dist/models/get-organization-migration-response-class.d.ts +25 -0
  25. package/dist/models/get-organization-migration-response-class.js +15 -0
  26. package/dist/models/index.d.ts +8 -0
  27. package/dist/models/index.js +8 -0
  28. package/dist/models/link-user-with-partner-request-dto-rest.d.ts +6 -0
  29. package/dist/models/list-organization-migrations-response-class.d.ts +43 -0
  30. package/dist/models/list-organization-migrations-response-class.js +15 -0
  31. package/dist/models/organization-migration-class.d.ts +81 -0
  32. package/dist/models/organization-migration-class.js +24 -0
  33. package/dist/models/revert-organization-migration-request-dto.d.ts +30 -0
  34. package/dist/models/revert-organization-migration-request-dto.js +15 -0
  35. package/dist/models/revert-organization-migration-response-class.d.ts +25 -0
  36. package/dist/models/revert-organization-migration-response-class.js +15 -0
  37. package/models/create-organization-migration-request-dto.ts +48 -0
  38. package/models/create-organization-migration-response-class.ts +31 -0
  39. package/models/create-resources-migration-request-dto.ts +42 -0
  40. package/models/get-organization-migration-response-class.ts +31 -0
  41. package/models/index.ts +8 -0
  42. package/models/link-user-with-partner-request-dto-rest.ts +6 -0
  43. package/models/list-organization-migrations-response-class.ts +49 -0
  44. package/models/organization-migration-class.ts +90 -0
  45. package/models/revert-organization-migration-request-dto.ts +36 -0
  46. package/models/revert-organization-migration-response-class.ts +31 -0
  47. package/package.json +1 -1
@@ -0,0 +1,641 @@
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 {string} 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("code", "}"), encodeURIComponent(String(code)));
217
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
218
+ if (configuration) {
219
+ baseOptions = configuration.baseOptions;
220
+ baseAccessToken = configuration.accessToken;
221
+ }
222
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
223
+ localVarHeaderParameter = {};
224
+ localVarQueryParameter = {};
225
+ // authentication bearer required
226
+ // http bearer authentication required
227
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
228
+ case 1:
229
+ // authentication bearer required
230
+ // http bearer authentication required
231
+ _a.sent();
232
+ if (expand !== undefined) {
233
+ localVarQueryParameter['expand'] = expand;
234
+ }
235
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
236
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
237
+ }
238
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
239
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
240
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
241
+ return [2 /*return*/, {
242
+ url: (0, common_1.toPathString)(localVarUrlObj),
243
+ options: localVarRequestOptions,
244
+ }];
245
+ }
246
+ });
247
+ });
248
+ },
249
+ /**
250
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
251
+ * @summary List organization migrations
252
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
253
+ * @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.
254
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
255
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
256
+ * @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.
257
+ * @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.
258
+ * @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.
259
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ listOrganizationMigrations: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
264
+ if (options === void 0) { options = {}; }
265
+ return __awaiter(_this, void 0, void 0, function () {
266
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
267
+ return __generator(this, function (_a) {
268
+ switch (_a.label) {
269
+ case 0:
270
+ localVarPath = "/tenantservice/v1/organization-migrations";
271
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
272
+ if (configuration) {
273
+ baseOptions = configuration.baseOptions;
274
+ baseAccessToken = configuration.accessToken;
275
+ }
276
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
277
+ localVarHeaderParameter = {};
278
+ localVarQueryParameter = {};
279
+ // authentication bearer required
280
+ // http bearer authentication required
281
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
282
+ case 1:
283
+ // authentication bearer required
284
+ // http bearer authentication required
285
+ _a.sent();
286
+ if (pageSize !== undefined) {
287
+ localVarQueryParameter['pageSize'] = pageSize;
288
+ }
289
+ if (pageToken !== undefined) {
290
+ localVarQueryParameter['pageToken'] = pageToken;
291
+ }
292
+ if (filter !== undefined) {
293
+ localVarQueryParameter['filter'] = filter;
294
+ }
295
+ if (search !== undefined) {
296
+ localVarQueryParameter['search'] = search;
297
+ }
298
+ if (order !== undefined) {
299
+ localVarQueryParameter['order'] = order;
300
+ }
301
+ if (expand !== undefined) {
302
+ localVarQueryParameter['expand'] = expand;
303
+ }
304
+ if (filters !== undefined) {
305
+ localVarQueryParameter['filters'] = filters;
306
+ }
307
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
308
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
309
+ }
310
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
311
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
312
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
313
+ return [2 /*return*/, {
314
+ url: (0, common_1.toPathString)(localVarUrlObj),
315
+ options: localVarRequestOptions,
316
+ }];
317
+ }
318
+ });
319
+ });
320
+ },
321
+ /**
322
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
323
+ * @summary Revert organization migration
324
+ * @param {RevertOrganizationMigrationRequestDto} revertOrganizationMigrationRequestDto
325
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ revertOrganizationMigration: function (revertOrganizationMigrationRequestDto, authorization, options) {
330
+ if (options === void 0) { options = {}; }
331
+ return __awaiter(_this, void 0, void 0, function () {
332
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
333
+ return __generator(this, function (_a) {
334
+ switch (_a.label) {
335
+ case 0:
336
+ // verify required parameter 'revertOrganizationMigrationRequestDto' is not null or undefined
337
+ (0, common_1.assertParamExists)('revertOrganizationMigration', 'revertOrganizationMigrationRequestDto', revertOrganizationMigrationRequestDto);
338
+ localVarPath = "/tenantservice/v1/organization-migrations/revert";
339
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
340
+ if (configuration) {
341
+ baseOptions = configuration.baseOptions;
342
+ baseAccessToken = configuration.accessToken;
343
+ }
344
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
345
+ localVarHeaderParameter = {};
346
+ localVarQueryParameter = {};
347
+ // authentication bearer required
348
+ // http bearer authentication required
349
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
350
+ case 1:
351
+ // authentication bearer required
352
+ // http bearer authentication required
353
+ _a.sent();
354
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
355
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
356
+ }
357
+ localVarHeaderParameter['Content-Type'] = 'application/json';
358
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
359
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
360
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
361
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(revertOrganizationMigrationRequestDto, localVarRequestOptions, configuration);
362
+ return [2 /*return*/, {
363
+ url: (0, common_1.toPathString)(localVarUrlObj),
364
+ options: localVarRequestOptions,
365
+ }];
366
+ }
367
+ });
368
+ });
369
+ },
370
+ };
371
+ };
372
+ exports.OrganizationMigrationApiAxiosParamCreator = OrganizationMigrationApiAxiosParamCreator;
373
+ /**
374
+ * OrganizationMigrationApi - functional programming interface
375
+ * @export
376
+ */
377
+ var OrganizationMigrationApiFp = function (configuration) {
378
+ var localVarAxiosParamCreator = (0, exports.OrganizationMigrationApiAxiosParamCreator)(configuration);
379
+ return {
380
+ /**
381
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
382
+ * @summary Create organization migration to move all resources including the sub organizations
383
+ * @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
384
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ createOrganizationMigration: function (createOrganizationMigrationRequestDto, authorization, options) {
389
+ return __awaiter(this, void 0, void 0, function () {
390
+ var localVarAxiosArgs;
391
+ return __generator(this, function (_a) {
392
+ switch (_a.label) {
393
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrganizationMigration(createOrganizationMigrationRequestDto, authorization, options)];
394
+ case 1:
395
+ localVarAxiosArgs = _a.sent();
396
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
397
+ }
398
+ });
399
+ });
400
+ },
401
+ /**
402
+ * 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\"
403
+ * @summary Create organization migration to move only resources excluding sub organizations
404
+ * @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
405
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ createResourcesMigration: function (createResourcesMigrationRequestDto, authorization, options) {
410
+ return __awaiter(this, void 0, void 0, function () {
411
+ var localVarAxiosArgs;
412
+ return __generator(this, function (_a) {
413
+ switch (_a.label) {
414
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createResourcesMigration(createResourcesMigrationRequestDto, authorization, options)];
415
+ case 1:
416
+ localVarAxiosArgs = _a.sent();
417
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
418
+ }
419
+ });
420
+ });
421
+ },
422
+ /**
423
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
424
+ * @summary Get organization migration
425
+ * @param {string} code Unique identifier for the object.
426
+ * @param {string} [expand] Fields to expand response by
427
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ getOrganizationMigration: function (code, expand, authorization, options) {
432
+ return __awaiter(this, void 0, void 0, function () {
433
+ var localVarAxiosArgs;
434
+ return __generator(this, function (_a) {
435
+ switch (_a.label) {
436
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getOrganizationMigration(code, expand, authorization, options)];
437
+ case 1:
438
+ localVarAxiosArgs = _a.sent();
439
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
440
+ }
441
+ });
442
+ });
443
+ },
444
+ /**
445
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
446
+ * @summary List organization migrations
447
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
448
+ * @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.
449
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
450
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
451
+ * @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.
452
+ * @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.
453
+ * @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.
454
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ */
458
+ listOrganizationMigrations: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
459
+ return __awaiter(this, void 0, void 0, function () {
460
+ var localVarAxiosArgs;
461
+ return __generator(this, function (_a) {
462
+ switch (_a.label) {
463
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listOrganizationMigrations(pageSize, pageToken, filter, search, order, expand, filters, authorization, options)];
464
+ case 1:
465
+ localVarAxiosArgs = _a.sent();
466
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
467
+ }
468
+ });
469
+ });
470
+ },
471
+ /**
472
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
473
+ * @summary Revert organization migration
474
+ * @param {RevertOrganizationMigrationRequestDto} revertOrganizationMigrationRequestDto
475
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ revertOrganizationMigration: function (revertOrganizationMigrationRequestDto, authorization, options) {
480
+ return __awaiter(this, void 0, void 0, function () {
481
+ var localVarAxiosArgs;
482
+ return __generator(this, function (_a) {
483
+ switch (_a.label) {
484
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.revertOrganizationMigration(revertOrganizationMigrationRequestDto, authorization, options)];
485
+ case 1:
486
+ localVarAxiosArgs = _a.sent();
487
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
488
+ }
489
+ });
490
+ });
491
+ },
492
+ };
493
+ };
494
+ exports.OrganizationMigrationApiFp = OrganizationMigrationApiFp;
495
+ /**
496
+ * OrganizationMigrationApi - factory interface
497
+ * @export
498
+ */
499
+ var OrganizationMigrationApiFactory = function (configuration, basePath, axios) {
500
+ var localVarFp = (0, exports.OrganizationMigrationApiFp)(configuration);
501
+ return {
502
+ /**
503
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
504
+ * @summary Create organization migration to move all resources including the sub organizations
505
+ * @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
506
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ createOrganizationMigration: function (createOrganizationMigrationRequestDto, authorization, options) {
511
+ return localVarFp.createOrganizationMigration(createOrganizationMigrationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
512
+ },
513
+ /**
514
+ * 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\"
515
+ * @summary Create organization migration to move only resources excluding sub organizations
516
+ * @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
517
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ createResourcesMigration: function (createResourcesMigrationRequestDto, authorization, options) {
522
+ return localVarFp.createResourcesMigration(createResourcesMigrationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
523
+ },
524
+ /**
525
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
526
+ * @summary Get organization migration
527
+ * @param {string} code Unique identifier for the object.
528
+ * @param {string} [expand] Fields to expand response by
529
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
530
+ * @param {*} [options] Override http request option.
531
+ * @throws {RequiredError}
532
+ */
533
+ getOrganizationMigration: function (code, expand, authorization, options) {
534
+ return localVarFp.getOrganizationMigration(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
535
+ },
536
+ /**
537
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
538
+ * @summary List organization migrations
539
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
540
+ * @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.
541
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
542
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
543
+ * @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.
544
+ * @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.
545
+ * @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.
546
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
547
+ * @param {*} [options] Override http request option.
548
+ * @throws {RequiredError}
549
+ */
550
+ listOrganizationMigrations: function (pageSize, pageToken, filter, search, order, expand, filters, authorization, options) {
551
+ return localVarFp.listOrganizationMigrations(pageSize, pageToken, filter, search, order, expand, filters, authorization, options).then(function (request) { return request(axios, basePath); });
552
+ },
553
+ /**
554
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
555
+ * @summary Revert organization migration
556
+ * @param {RevertOrganizationMigrationRequestDto} revertOrganizationMigrationRequestDto
557
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
558
+ * @param {*} [options] Override http request option.
559
+ * @throws {RequiredError}
560
+ */
561
+ revertOrganizationMigration: function (revertOrganizationMigrationRequestDto, authorization, options) {
562
+ return localVarFp.revertOrganizationMigration(revertOrganizationMigrationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
563
+ },
564
+ };
565
+ };
566
+ exports.OrganizationMigrationApiFactory = OrganizationMigrationApiFactory;
567
+ /**
568
+ * OrganizationMigrationApi - object-oriented interface
569
+ * @export
570
+ * @class OrganizationMigrationApi
571
+ * @extends {BaseAPI}
572
+ */
573
+ var OrganizationMigrationApi = /** @class */ (function (_super) {
574
+ __extends(OrganizationMigrationApi, _super);
575
+ function OrganizationMigrationApi() {
576
+ return _super !== null && _super.apply(this, arguments) || this;
577
+ }
578
+ /**
579
+ * Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
580
+ * @summary Create organization migration to move all resources including the sub organizations
581
+ * @param {OrganizationMigrationApiCreateOrganizationMigrationRequest} requestParameters Request parameters.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ * @memberof OrganizationMigrationApi
585
+ */
586
+ OrganizationMigrationApi.prototype.createOrganizationMigration = function (requestParameters, options) {
587
+ var _this = this;
588
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).createOrganizationMigration(requestParameters.createOrganizationMigrationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
589
+ };
590
+ /**
591
+ * 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\"
592
+ * @summary Create organization migration to move only resources excluding sub organizations
593
+ * @param {OrganizationMigrationApiCreateResourcesMigrationRequest} requestParameters Request parameters.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ * @memberof OrganizationMigrationApi
597
+ */
598
+ OrganizationMigrationApi.prototype.createResourcesMigration = function (requestParameters, options) {
599
+ var _this = this;
600
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).createResourcesMigration(requestParameters.createResourcesMigrationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
601
+ };
602
+ /**
603
+ * Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
604
+ * @summary Get organization migration
605
+ * @param {OrganizationMigrationApiGetOrganizationMigrationRequest} requestParameters Request parameters.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ * @memberof OrganizationMigrationApi
609
+ */
610
+ OrganizationMigrationApi.prototype.getOrganizationMigration = function (requestParameters, options) {
611
+ var _this = this;
612
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).getOrganizationMigration(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
613
+ };
614
+ /**
615
+ * Retrieves a list of organization migrations **Required Permissions** \"tenant-management.organizations.view\"
616
+ * @summary List organization migrations
617
+ * @param {OrganizationMigrationApiListOrganizationMigrationsRequest} requestParameters Request parameters.
618
+ * @param {*} [options] Override http request option.
619
+ * @throws {RequiredError}
620
+ * @memberof OrganizationMigrationApi
621
+ */
622
+ OrganizationMigrationApi.prototype.listOrganizationMigrations = function (requestParameters, options) {
623
+ var _this = this;
624
+ if (requestParameters === void 0) { requestParameters = {}; }
625
+ 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); });
626
+ };
627
+ /**
628
+ * Reverts an organization migration. **Required Permissions** \"tenant-management.organizations.update\"
629
+ * @summary Revert organization migration
630
+ * @param {OrganizationMigrationApiRevertOrganizationMigrationRequest} requestParameters Request parameters.
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ * @memberof OrganizationMigrationApi
634
+ */
635
+ OrganizationMigrationApi.prototype.revertOrganizationMigration = function (requestParameters, options) {
636
+ var _this = this;
637
+ return (0, exports.OrganizationMigrationApiFp)(this.configuration).revertOrganizationMigration(requestParameters.revertOrganizationMigrationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
638
+ };
639
+ return OrganizationMigrationApi;
640
+ }(base_1.BaseAPI));
641
+ exports.OrganizationMigrationApi = OrganizationMigrationApi;