@emilgroup/tenant-sdk 1.31.1-beta.2 → 1.32.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.
- package/.openapi-generator/FILES +1 -2
- package/README.md +2 -2
- package/api/dashboard-api.ts +46 -193
- package/api/invite-users-api.ts +4 -4
- package/api/organization-migration-api.ts +113 -8
- package/base.ts +6 -1
- package/dist/api/dashboard-api.d.ts +42 -139
- package/dist/api/dashboard-api.js +44 -177
- package/dist/api/invite-users-api.d.ts +4 -4
- package/dist/api/invite-users-api.js +3 -3
- package/dist/api/organization-migration-api.d.ts +64 -8
- package/dist/api/organization-migration-api.js +101 -8
- package/dist/base.js +5 -1
- package/dist/models/{create-dashboard-v2-request-dto.d.ts → create-resources-migration-request-dto.d.ts} +12 -12
- package/dist/models/index.d.ts +1 -2
- package/dist/models/index.js +1 -2
- package/models/{create-dashboard-v2-request-dto.ts → create-resources-migration-request-dto.ts} +12 -12
- package/models/index.ts +1 -2
- package/package.json +1 -1
- package/dist/models/create-dashboard-v2-response-class.d.ts +0 -25
- package/dist/models/create-dashboard-v2-response-class.js +0 -15
- package/models/create-dashboard-v2-response-class.ts +0 -31
- /package/dist/models/{create-dashboard-v2-request-dto.js → create-resources-migration-request-dto.js} +0 -0
|
@@ -25,6 +25,8 @@ import { CreateOrganizationMigrationRequestDto } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { CreateOrganizationMigrationResponseClass } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
|
+
import { CreateResourcesMigrationRequestDto } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
28
30
|
import { GetOrganizationMigrationResponseClass } from '../models';
|
|
29
31
|
// @ts-ignore
|
|
30
32
|
import { ListOrganizationMigrationsResponseClass } from '../models';
|
|
@@ -39,8 +41,8 @@ import { RevertOrganizationMigrationResponseClass } from '../models';
|
|
|
39
41
|
export const OrganizationMigrationApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
40
42
|
return {
|
|
41
43
|
/**
|
|
42
|
-
* Creates a new organization migration. **Required Permissions** \"tenant-management.organizations.create\"
|
|
43
|
-
* @summary Create organization migration
|
|
44
|
+
* Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
|
|
45
|
+
* @summary Create organization migration to move all resources including the sub organizations
|
|
44
46
|
* @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
|
|
45
47
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
46
48
|
* @param {*} [options] Override http request option.
|
|
@@ -85,6 +87,53 @@ export const OrganizationMigrationApiAxiosParamCreator = function (configuration
|
|
|
85
87
|
options: localVarRequestOptions,
|
|
86
88
|
};
|
|
87
89
|
},
|
|
90
|
+
/**
|
|
91
|
+
* 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\"
|
|
92
|
+
* @summary Create organization migration to move only resources excluding sub organizations
|
|
93
|
+
* @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
|
|
94
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
*/
|
|
98
|
+
createResourcesMigration: async (createResourcesMigrationRequestDto: CreateResourcesMigrationRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
99
|
+
// verify required parameter 'createResourcesMigrationRequestDto' is not null or undefined
|
|
100
|
+
assertParamExists('createResourcesMigration', 'createResourcesMigrationRequestDto', createResourcesMigrationRequestDto)
|
|
101
|
+
const localVarPath = `/tenantservice/v1/organization-migrations/resources`;
|
|
102
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
103
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
104
|
+
let baseOptions;
|
|
105
|
+
let baseAccessToken;
|
|
106
|
+
if (configuration) {
|
|
107
|
+
baseOptions = configuration.baseOptions;
|
|
108
|
+
baseAccessToken = configuration.accessToken;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
112
|
+
const localVarHeaderParameter = {} as any;
|
|
113
|
+
const localVarQueryParameter = {} as any;
|
|
114
|
+
|
|
115
|
+
// authentication bearer required
|
|
116
|
+
// http bearer authentication required
|
|
117
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
118
|
+
|
|
119
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
120
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
126
|
+
|
|
127
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
128
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
129
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
130
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createResourcesMigrationRequestDto, localVarRequestOptions, configuration)
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
url: toPathString(localVarUrlObj),
|
|
134
|
+
options: localVarRequestOptions,
|
|
135
|
+
};
|
|
136
|
+
},
|
|
88
137
|
/**
|
|
89
138
|
* Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
|
|
90
139
|
* @summary Get organization migration
|
|
@@ -266,8 +315,8 @@ export const OrganizationMigrationApiFp = function(configuration?: Configuration
|
|
|
266
315
|
const localVarAxiosParamCreator = OrganizationMigrationApiAxiosParamCreator(configuration)
|
|
267
316
|
return {
|
|
268
317
|
/**
|
|
269
|
-
* Creates a new organization migration. **Required Permissions** \"tenant-management.organizations.create\"
|
|
270
|
-
* @summary Create organization migration
|
|
318
|
+
* Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
|
|
319
|
+
* @summary Create organization migration to move all resources including the sub organizations
|
|
271
320
|
* @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
|
|
272
321
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
273
322
|
* @param {*} [options] Override http request option.
|
|
@@ -277,6 +326,18 @@ export const OrganizationMigrationApiFp = function(configuration?: Configuration
|
|
|
277
326
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createOrganizationMigration(createOrganizationMigrationRequestDto, authorization, options);
|
|
278
327
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
279
328
|
},
|
|
329
|
+
/**
|
|
330
|
+
* 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\"
|
|
331
|
+
* @summary Create organization migration to move only resources excluding sub organizations
|
|
332
|
+
* @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
|
|
333
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
334
|
+
* @param {*} [options] Override http request option.
|
|
335
|
+
* @throws {RequiredError}
|
|
336
|
+
*/
|
|
337
|
+
async createResourcesMigration(createResourcesMigrationRequestDto: CreateResourcesMigrationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateOrganizationMigrationResponseClass>> {
|
|
338
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createResourcesMigration(createResourcesMigrationRequestDto, authorization, options);
|
|
339
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
340
|
+
},
|
|
280
341
|
/**
|
|
281
342
|
* Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
|
|
282
343
|
* @summary Get organization migration
|
|
@@ -331,8 +392,8 @@ export const OrganizationMigrationApiFactory = function (configuration?: Configu
|
|
|
331
392
|
const localVarFp = OrganizationMigrationApiFp(configuration)
|
|
332
393
|
return {
|
|
333
394
|
/**
|
|
334
|
-
* Creates a new organization migration. **Required Permissions** \"tenant-management.organizations.create\"
|
|
335
|
-
* @summary Create organization migration
|
|
395
|
+
* Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
|
|
396
|
+
* @summary Create organization migration to move all resources including the sub organizations
|
|
336
397
|
* @param {CreateOrganizationMigrationRequestDto} createOrganizationMigrationRequestDto
|
|
337
398
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
338
399
|
* @param {*} [options] Override http request option.
|
|
@@ -341,6 +402,17 @@ export const OrganizationMigrationApiFactory = function (configuration?: Configu
|
|
|
341
402
|
createOrganizationMigration(createOrganizationMigrationRequestDto: CreateOrganizationMigrationRequestDto, authorization?: string, options?: any): AxiosPromise<CreateOrganizationMigrationResponseClass> {
|
|
342
403
|
return localVarFp.createOrganizationMigration(createOrganizationMigrationRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
343
404
|
},
|
|
405
|
+
/**
|
|
406
|
+
* 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\"
|
|
407
|
+
* @summary Create organization migration to move only resources excluding sub organizations
|
|
408
|
+
* @param {CreateResourcesMigrationRequestDto} createResourcesMigrationRequestDto
|
|
409
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
410
|
+
* @param {*} [options] Override http request option.
|
|
411
|
+
* @throws {RequiredError}
|
|
412
|
+
*/
|
|
413
|
+
createResourcesMigration(createResourcesMigrationRequestDto: CreateResourcesMigrationRequestDto, authorization?: string, options?: any): AxiosPromise<CreateOrganizationMigrationResponseClass> {
|
|
414
|
+
return localVarFp.createResourcesMigration(createResourcesMigrationRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
415
|
+
},
|
|
344
416
|
/**
|
|
345
417
|
* Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
|
|
346
418
|
* @summary Get organization migration
|
|
@@ -405,6 +477,27 @@ export interface OrganizationMigrationApiCreateOrganizationMigrationRequest {
|
|
|
405
477
|
readonly authorization?: string
|
|
406
478
|
}
|
|
407
479
|
|
|
480
|
+
/**
|
|
481
|
+
* Request parameters for createResourcesMigration operation in OrganizationMigrationApi.
|
|
482
|
+
* @export
|
|
483
|
+
* @interface OrganizationMigrationApiCreateResourcesMigrationRequest
|
|
484
|
+
*/
|
|
485
|
+
export interface OrganizationMigrationApiCreateResourcesMigrationRequest {
|
|
486
|
+
/**
|
|
487
|
+
*
|
|
488
|
+
* @type {CreateResourcesMigrationRequestDto}
|
|
489
|
+
* @memberof OrganizationMigrationApiCreateResourcesMigration
|
|
490
|
+
*/
|
|
491
|
+
readonly createResourcesMigrationRequestDto: CreateResourcesMigrationRequestDto
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
495
|
+
* @type {string}
|
|
496
|
+
* @memberof OrganizationMigrationApiCreateResourcesMigration
|
|
497
|
+
*/
|
|
498
|
+
readonly authorization?: string
|
|
499
|
+
}
|
|
500
|
+
|
|
408
501
|
/**
|
|
409
502
|
* Request parameters for getOrganizationMigration operation in OrganizationMigrationApi.
|
|
410
503
|
* @export
|
|
@@ -525,8 +618,8 @@ export interface OrganizationMigrationApiRevertOrganizationMigrationRequest {
|
|
|
525
618
|
*/
|
|
526
619
|
export class OrganizationMigrationApi extends BaseAPI {
|
|
527
620
|
/**
|
|
528
|
-
* Creates a new organization migration. **Required Permissions** \"tenant-management.organizations.create\"
|
|
529
|
-
* @summary Create organization migration
|
|
621
|
+
* Creates a new organization migration to move all resources including the sub organizations. **Required Permissions** \"tenant-management.organizations.create\"
|
|
622
|
+
* @summary Create organization migration to move all resources including the sub organizations
|
|
530
623
|
* @param {OrganizationMigrationApiCreateOrganizationMigrationRequest} requestParameters Request parameters.
|
|
531
624
|
* @param {*} [options] Override http request option.
|
|
532
625
|
* @throws {RequiredError}
|
|
@@ -536,6 +629,18 @@ export class OrganizationMigrationApi extends BaseAPI {
|
|
|
536
629
|
return OrganizationMigrationApiFp(this.configuration).createOrganizationMigration(requestParameters.createOrganizationMigrationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
537
630
|
}
|
|
538
631
|
|
|
632
|
+
/**
|
|
633
|
+
* 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\"
|
|
634
|
+
* @summary Create organization migration to move only resources excluding sub organizations
|
|
635
|
+
* @param {OrganizationMigrationApiCreateResourcesMigrationRequest} requestParameters Request parameters.
|
|
636
|
+
* @param {*} [options] Override http request option.
|
|
637
|
+
* @throws {RequiredError}
|
|
638
|
+
* @memberof OrganizationMigrationApi
|
|
639
|
+
*/
|
|
640
|
+
public createResourcesMigration(requestParameters: OrganizationMigrationApiCreateResourcesMigrationRequest, options?: AxiosRequestConfig) {
|
|
641
|
+
return OrganizationMigrationApiFp(this.configuration).createResourcesMigration(requestParameters.createResourcesMigrationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
642
|
+
}
|
|
643
|
+
|
|
539
644
|
/**
|
|
540
645
|
* Retrieves an organization migration by its code. **Required Permissions** \"tenant-management.organizations.view\"
|
|
541
646
|
* @summary Get organization migration
|
package/base.ts
CHANGED
|
@@ -97,9 +97,14 @@ export class BaseAPI {
|
|
|
97
97
|
this.loadTokenData();
|
|
98
98
|
|
|
99
99
|
if (configuration) {
|
|
100
|
+
const { accessToken } = this.tokenData;
|
|
100
101
|
this.configuration = configuration;
|
|
101
102
|
this.basePath = configuration.basePath || this.basePath;
|
|
102
|
-
|
|
103
|
+
|
|
104
|
+
// Use config token if provided, otherwise use tokenData token
|
|
105
|
+
const configToken = this.configuration.accessToken;
|
|
106
|
+
const storedToken = accessToken ? `Bearer ${accessToken}` : '';
|
|
107
|
+
this.configuration.accessToken = configToken || storedToken;
|
|
103
108
|
} else {
|
|
104
109
|
const { accessToken, username } = this.tokenData;
|
|
105
110
|
|