@emilgroup/tenant-sdk-node 1.16.0 → 1.17.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/README.md +2 -2
- package/api/custom-schema-api.ts +4 -4
- package/api/data-report-api.ts +4 -4
- package/api/invite-users-api.ts +31 -31
- package/api/settings-api.ts +4 -4
- package/api/users-api.ts +31 -31
- package/base.ts +16 -8
- package/dist/api/custom-schema-api.d.ts +4 -4
- package/dist/api/custom-schema-api.js +4 -4
- package/dist/api/data-report-api.d.ts +4 -4
- package/dist/api/data-report-api.js +4 -4
- package/dist/api/invite-users-api.d.ts +31 -31
- package/dist/api/invite-users-api.js +16 -16
- package/dist/api/settings-api.d.ts +4 -4
- package/dist/api/settings-api.js +4 -4
- package/dist/api/users-api.d.ts +31 -31
- package/dist/api/users-api.js +16 -16
- package/dist/base.d.ts +4 -2
- package/dist/base.js +26 -20
- package/dist/models/create-custom-schema-request-dto.d.ts +1 -0
- package/dist/models/create-custom-schema-request-dto.js +2 -1
- package/dist/models/invite-class.d.ts +6 -0
- package/dist/models/update-custom-schema-request-dto.d.ts +1 -0
- package/dist/models/update-custom-schema-request-dto.js +2 -1
- package/dist/models/user-class.d.ts +6 -0
- package/models/create-custom-schema-request-dto.ts +2 -1
- package/models/invite-class.ts +6 -0
- package/models/update-custom-schema-request-dto.ts +2 -1
- package/models/user-class.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/tenant-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/tenant-sdk-node@1.17.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/tenant-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/tenant-sdk-node@1.17.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `UsersApi`.
|
package/api/custom-schema-api.ts
CHANGED
|
@@ -90,7 +90,7 @@ export const CustomSchemaApiAxiosParamCreator = function (configuration?: Config
|
|
|
90
90
|
};
|
|
91
91
|
},
|
|
92
92
|
/**
|
|
93
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
93
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
94
94
|
* @summary Retrieve the custom-schema
|
|
95
95
|
* @param {string} code Unique identifier for the object.
|
|
96
96
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -289,7 +289,7 @@ export const CustomSchemaApiFp = function(configuration?: Configuration) {
|
|
|
289
289
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
290
290
|
},
|
|
291
291
|
/**
|
|
292
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
292
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
293
293
|
* @summary Retrieve the custom-schema
|
|
294
294
|
* @param {string} code Unique identifier for the object.
|
|
295
295
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -354,7 +354,7 @@ export const CustomSchemaApiFactory = function (configuration?: Configuration, b
|
|
|
354
354
|
return localVarFp.createCustomSchema(createCustomSchemaRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
355
355
|
},
|
|
356
356
|
/**
|
|
357
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
357
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
358
358
|
* @summary Retrieve the custom-schema
|
|
359
359
|
* @param {string} code Unique identifier for the object.
|
|
360
360
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -557,7 +557,7 @@ export class CustomSchemaApi extends BaseAPI {
|
|
|
557
557
|
}
|
|
558
558
|
|
|
559
559
|
/**
|
|
560
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
560
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
561
561
|
* @summary Retrieve the custom-schema
|
|
562
562
|
* @param {CustomSchemaApiGetCustomSchemaRequest} requestParameters Request parameters.
|
|
563
563
|
* @param {*} [options] Override http request option.
|
package/api/data-report-api.ts
CHANGED
|
@@ -134,7 +134,7 @@ export const DataReportApiAxiosParamCreator = function (configuration?: Configur
|
|
|
134
134
|
};
|
|
135
135
|
},
|
|
136
136
|
/**
|
|
137
|
-
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code
|
|
137
|
+
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
|
|
138
138
|
* @summary Retrieve the data-report
|
|
139
139
|
* @param {string} code Unique identifier for the object.
|
|
140
140
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -344,7 +344,7 @@ export const DataReportApiFp = function(configuration?: Configuration) {
|
|
|
344
344
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
345
345
|
},
|
|
346
346
|
/**
|
|
347
|
-
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code
|
|
347
|
+
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
|
|
348
348
|
* @summary Retrieve the data-report
|
|
349
349
|
* @param {string} code Unique identifier for the object.
|
|
350
350
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -419,7 +419,7 @@ export const DataReportApiFactory = function (configuration?: Configuration, bas
|
|
|
419
419
|
return localVarFp.deleteAlert(id, authorization, options).then((request) => request(axios, basePath));
|
|
420
420
|
},
|
|
421
421
|
/**
|
|
422
|
-
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code
|
|
422
|
+
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
|
|
423
423
|
* @summary Retrieve the data-report
|
|
424
424
|
* @param {string} code Unique identifier for the object.
|
|
425
425
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -654,7 +654,7 @@ export class DataReportApi extends BaseAPI {
|
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
/**
|
|
657
|
-
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code
|
|
657
|
+
* Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
|
|
658
658
|
* @summary Retrieve the data-report
|
|
659
659
|
* @param {DataReportApiGetDataReportRequest} requestParameters Request parameters.
|
|
660
660
|
* @param {*} [options] Override http request option.
|
package/api/invite-users-api.ts
CHANGED
|
@@ -233,20 +233,20 @@ export const InviteUsersApiAxiosParamCreator = function (configuration?: Configu
|
|
|
233
233
|
};
|
|
234
234
|
},
|
|
235
235
|
/**
|
|
236
|
-
* Returns a list of invited users you have previously created.
|
|
236
|
+
* Returns a list of invited users you have previously created. The invited users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
237
237
|
* @summary List invited users
|
|
238
238
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
239
239
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
240
240
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
241
|
-
* @param {
|
|
241
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
242
242
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
243
|
-
* @param {
|
|
244
|
-
* @param {
|
|
245
|
-
* @param {
|
|
243
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email, expiresOn</i>
|
|
244
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, organizations<i>
|
|
245
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
246
246
|
* @param {*} [options] Override http request option.
|
|
247
247
|
* @throws {RequiredError}
|
|
248
248
|
*/
|
|
249
|
-
listInvites: async (authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
249
|
+
listInvites: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
250
250
|
const localVarPath = `/tenantservice/v1/users/invites`;
|
|
251
251
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
252
252
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -367,20 +367,20 @@ export const InviteUsersApiFp = function(configuration?: Configuration) {
|
|
|
367
367
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
368
368
|
},
|
|
369
369
|
/**
|
|
370
|
-
* Returns a list of invited users you have previously created.
|
|
370
|
+
* Returns a list of invited users you have previously created. The invited users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
371
371
|
* @summary List invited users
|
|
372
372
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
373
373
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
374
374
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
375
|
-
* @param {
|
|
375
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
376
376
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
377
|
-
* @param {
|
|
378
|
-
* @param {
|
|
379
|
-
* @param {
|
|
377
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email, expiresOn</i>
|
|
378
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, organizations<i>
|
|
379
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
380
380
|
* @param {*} [options] Override http request option.
|
|
381
381
|
* @throws {RequiredError}
|
|
382
382
|
*/
|
|
383
|
-
async listInvites(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
383
|
+
async listInvites(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInvitesResponseClass>> {
|
|
384
384
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listInvites(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
385
385
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
386
386
|
},
|
|
@@ -439,20 +439,20 @@ export const InviteUsersApiFactory = function (configuration?: Configuration, ba
|
|
|
439
439
|
return localVarFp.inviteUsers(inviteUsersRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
440
440
|
},
|
|
441
441
|
/**
|
|
442
|
-
* Returns a list of invited users you have previously created.
|
|
442
|
+
* Returns a list of invited users you have previously created. The invited users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
443
443
|
* @summary List invited users
|
|
444
444
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
445
445
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
446
446
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
447
|
-
* @param {
|
|
447
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
448
448
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
449
|
-
* @param {
|
|
450
|
-
* @param {
|
|
451
|
-
* @param {
|
|
449
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email, expiresOn</i>
|
|
450
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, organizations<i>
|
|
451
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
452
452
|
* @param {*} [options] Override http request option.
|
|
453
453
|
* @throws {RequiredError}
|
|
454
454
|
*/
|
|
455
|
-
listInvites(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
455
|
+
listInvites(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListInvitesResponseClass> {
|
|
456
456
|
return localVarFp.listInvites(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
457
457
|
},
|
|
458
458
|
};
|
|
@@ -570,11 +570,11 @@ export interface InviteUsersApiListInvitesRequest {
|
|
|
570
570
|
readonly pageToken?: any
|
|
571
571
|
|
|
572
572
|
/**
|
|
573
|
-
* Filter the response by one or multiple fields.
|
|
574
|
-
* @type {
|
|
573
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
574
|
+
* @type {string}
|
|
575
575
|
* @memberof InviteUsersApiListInvites
|
|
576
576
|
*/
|
|
577
|
-
readonly filter?:
|
|
577
|
+
readonly filter?: string
|
|
578
578
|
|
|
579
579
|
/**
|
|
580
580
|
* To search the list by any field, pass search=xxx to fetch the result.
|
|
@@ -584,25 +584,25 @@ export interface InviteUsersApiListInvitesRequest {
|
|
|
584
584
|
readonly search?: any
|
|
585
585
|
|
|
586
586
|
/**
|
|
587
|
-
*
|
|
588
|
-
* @type {
|
|
587
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email, expiresOn</i>
|
|
588
|
+
* @type {string}
|
|
589
589
|
* @memberof InviteUsersApiListInvites
|
|
590
590
|
*/
|
|
591
|
-
readonly order?:
|
|
591
|
+
readonly order?: string
|
|
592
592
|
|
|
593
593
|
/**
|
|
594
|
-
*
|
|
595
|
-
* @type {
|
|
594
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, organizations<i>
|
|
595
|
+
* @type {string}
|
|
596
596
|
* @memberof InviteUsersApiListInvites
|
|
597
597
|
*/
|
|
598
|
-
readonly expand?:
|
|
598
|
+
readonly expand?: string
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
|
-
* Filters the response by one or multiple fields.
|
|
602
|
-
* @type {
|
|
601
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, email, token, organizationId, ern</i>
|
|
602
|
+
* @type {string}
|
|
603
603
|
* @memberof InviteUsersApiListInvites
|
|
604
604
|
*/
|
|
605
|
-
readonly filters?:
|
|
605
|
+
readonly filters?: string
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
/**
|
|
@@ -661,7 +661,7 @@ export class InviteUsersApi extends BaseAPI {
|
|
|
661
661
|
}
|
|
662
662
|
|
|
663
663
|
/**
|
|
664
|
-
* Returns a list of invited users you have previously created.
|
|
664
|
+
* Returns a list of invited users you have previously created. The invited users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
665
665
|
* @summary List invited users
|
|
666
666
|
* @param {InviteUsersApiListInvitesRequest} requestParameters Request parameters.
|
|
667
667
|
* @param {*} [options] Override http request option.
|
package/api/settings-api.ts
CHANGED
|
@@ -33,7 +33,7 @@ const FormData = require('form-data');
|
|
|
33
33
|
export const SettingsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
34
|
return {
|
|
35
35
|
/**
|
|
36
|
-
* Retrieves the details of the settings that was previously created. Supply the unique settings code
|
|
36
|
+
* Retrieves the details of the settings that was previously created. Supply the unique settings code that was returned when you created it and Emil Api will return the corresponding settings information.
|
|
37
37
|
* @summary Retrieve the settings
|
|
38
38
|
* @param {string} keys
|
|
39
39
|
* @param {string} [authorization] Bearer Token
|
|
@@ -91,7 +91,7 @@ export const SettingsApiFp = function(configuration?: Configuration) {
|
|
|
91
91
|
const localVarAxiosParamCreator = SettingsApiAxiosParamCreator(configuration)
|
|
92
92
|
return {
|
|
93
93
|
/**
|
|
94
|
-
* Retrieves the details of the settings that was previously created. Supply the unique settings code
|
|
94
|
+
* Retrieves the details of the settings that was previously created. Supply the unique settings code that was returned when you created it and Emil Api will return the corresponding settings information.
|
|
95
95
|
* @summary Retrieve the settings
|
|
96
96
|
* @param {string} keys
|
|
97
97
|
* @param {string} [authorization] Bearer Token
|
|
@@ -113,7 +113,7 @@ export const SettingsApiFactory = function (configuration?: Configuration, baseP
|
|
|
113
113
|
const localVarFp = SettingsApiFp(configuration)
|
|
114
114
|
return {
|
|
115
115
|
/**
|
|
116
|
-
* Retrieves the details of the settings that was previously created. Supply the unique settings code
|
|
116
|
+
* Retrieves the details of the settings that was previously created. Supply the unique settings code that was returned when you created it and Emil Api will return the corresponding settings information.
|
|
117
117
|
* @summary Retrieve the settings
|
|
118
118
|
* @param {string} keys
|
|
119
119
|
* @param {string} [authorization] Bearer Token
|
|
@@ -155,7 +155,7 @@ export interface SettingsApiGetTenantSettingsRequest {
|
|
|
155
155
|
*/
|
|
156
156
|
export class SettingsApi extends BaseAPI {
|
|
157
157
|
/**
|
|
158
|
-
* Retrieves the details of the settings that was previously created. Supply the unique settings code
|
|
158
|
+
* Retrieves the details of the settings that was previously created. Supply the unique settings code that was returned when you created it and Emil Api will return the corresponding settings information.
|
|
159
159
|
* @summary Retrieve the settings
|
|
160
160
|
* @param {SettingsApiGetTenantSettingsRequest} requestParameters Request parameters.
|
|
161
161
|
* @param {*} [options] Override http request option.
|
package/api/users-api.ts
CHANGED
|
@@ -433,20 +433,20 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
433
433
|
};
|
|
434
434
|
},
|
|
435
435
|
/**
|
|
436
|
-
* Returns a list of users you have previously created.
|
|
436
|
+
* Returns a list of users you have previously created. The users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
437
437
|
* @summary List users
|
|
438
438
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
439
439
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
440
440
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
441
|
-
* @param {
|
|
441
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
442
442
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
443
|
-
* @param {
|
|
444
|
-
* @param {
|
|
445
|
-
* @param {
|
|
443
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email</i>
|
|
444
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, subscriptions, organizations<i>
|
|
445
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
446
446
|
* @param {*} [options] Override http request option.
|
|
447
447
|
* @throws {RequiredError}
|
|
448
448
|
*/
|
|
449
|
-
listUsers: async (authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
449
|
+
listUsers: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
450
450
|
const localVarPath = `/tenantservice/v1/users`;
|
|
451
451
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
452
452
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -610,20 +610,20 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
610
610
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
611
611
|
},
|
|
612
612
|
/**
|
|
613
|
-
* Returns a list of users you have previously created.
|
|
613
|
+
* Returns a list of users you have previously created. The users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
614
614
|
* @summary List users
|
|
615
615
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
616
616
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
617
617
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
618
|
-
* @param {
|
|
618
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
619
619
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
620
|
-
* @param {
|
|
621
|
-
* @param {
|
|
622
|
-
* @param {
|
|
620
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email</i>
|
|
621
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, subscriptions, organizations<i>
|
|
622
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
623
623
|
* @param {*} [options] Override http request option.
|
|
624
624
|
* @throws {RequiredError}
|
|
625
625
|
*/
|
|
626
|
-
async listUsers(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
626
|
+
async listUsers(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListUsersResponseClass>> {
|
|
627
627
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
628
628
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
629
629
|
},
|
|
@@ -721,20 +721,20 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
|
|
|
721
721
|
return localVarFp.getUser(code, code2, authorization, expand, options).then((request) => request(axios, basePath));
|
|
722
722
|
},
|
|
723
723
|
/**
|
|
724
|
-
* Returns a list of users you have previously created.
|
|
724
|
+
* Returns a list of users you have previously created. The users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
725
725
|
* @summary List users
|
|
726
726
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
727
727
|
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
728
728
|
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
729
|
-
* @param {
|
|
729
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
730
730
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
731
|
-
* @param {
|
|
732
|
-
* @param {
|
|
733
|
-
* @param {
|
|
731
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email</i>
|
|
732
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, subscriptions, organizations<i>
|
|
733
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
734
734
|
* @param {*} [options] Override http request option.
|
|
735
735
|
* @throws {RequiredError}
|
|
736
736
|
*/
|
|
737
|
-
listUsers(authorization?: string, pageSize?: any, pageToken?: any, filter?:
|
|
737
|
+
listUsers(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListUsersResponseClass> {
|
|
738
738
|
return localVarFp.listUsers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
739
739
|
},
|
|
740
740
|
};
|
|
@@ -957,11 +957,11 @@ export interface UsersApiListUsersRequest {
|
|
|
957
957
|
readonly pageToken?: any
|
|
958
958
|
|
|
959
959
|
/**
|
|
960
|
-
* Filter the response by one or multiple fields.
|
|
961
|
-
* @type {
|
|
960
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
961
|
+
* @type {string}
|
|
962
962
|
* @memberof UsersApiListUsers
|
|
963
963
|
*/
|
|
964
|
-
readonly filter?:
|
|
964
|
+
readonly filter?: string
|
|
965
965
|
|
|
966
966
|
/**
|
|
967
967
|
* To search the list by any field, pass search=xxx to fetch the result.
|
|
@@ -971,25 +971,25 @@ export interface UsersApiListUsersRequest {
|
|
|
971
971
|
readonly search?: any
|
|
972
972
|
|
|
973
973
|
/**
|
|
974
|
-
*
|
|
975
|
-
* @type {
|
|
974
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: email</i>
|
|
975
|
+
* @type {string}
|
|
976
976
|
* @memberof UsersApiListUsers
|
|
977
977
|
*/
|
|
978
|
-
readonly order?:
|
|
978
|
+
readonly order?: string
|
|
979
979
|
|
|
980
980
|
/**
|
|
981
|
-
*
|
|
982
|
-
* @type {
|
|
981
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: roles, subscriptions, organizations<i>
|
|
982
|
+
* @type {string}
|
|
983
983
|
* @memberof UsersApiListUsers
|
|
984
984
|
*/
|
|
985
|
-
readonly expand?:
|
|
985
|
+
readonly expand?: string
|
|
986
986
|
|
|
987
987
|
/**
|
|
988
|
-
* Filters the response by one or multiple fields.
|
|
989
|
-
* @type {
|
|
988
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, email, sub, status, organizationId, ern</i>
|
|
989
|
+
* @type {string}
|
|
990
990
|
* @memberof UsersApiListUsers
|
|
991
991
|
*/
|
|
992
|
-
readonly filters?:
|
|
992
|
+
readonly filters?: string
|
|
993
993
|
}
|
|
994
994
|
|
|
995
995
|
/**
|
|
@@ -1088,7 +1088,7 @@ export class UsersApi extends BaseAPI {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
1090
|
/**
|
|
1091
|
-
* Returns a list of users you have previously created.
|
|
1091
|
+
* Returns a list of users you have previously created. The users are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
1092
1092
|
* @summary List users
|
|
1093
1093
|
* @param {UsersApiListUsersRequest} requestParameters Request parameters.
|
|
1094
1094
|
* @param {*} [options] Override http request option.
|
package/base.ts
CHANGED
|
@@ -41,7 +41,7 @@ export const COLLECTION_FORMATS = {
|
|
|
41
41
|
|
|
42
42
|
export interface LoginClass {
|
|
43
43
|
accessToken: string;
|
|
44
|
-
permissions:
|
|
44
|
+
permissions: string;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export enum Environment {
|
|
@@ -79,6 +79,7 @@ export class BaseAPI {
|
|
|
79
79
|
protected configuration: Configuration;
|
|
80
80
|
private username?: string;
|
|
81
81
|
private password?: string;
|
|
82
|
+
private permissions?: string;
|
|
82
83
|
|
|
83
84
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
84
85
|
if (configuration) {
|
|
@@ -149,6 +150,10 @@ export class BaseAPI {
|
|
|
149
150
|
this.configuration.basePath = env;
|
|
150
151
|
}
|
|
151
152
|
|
|
153
|
+
getPermissions(): Array<string> {
|
|
154
|
+
return this.permissions.split(',');
|
|
155
|
+
}
|
|
156
|
+
|
|
152
157
|
async authorize(username: string, password: string): Promise<void> {
|
|
153
158
|
const options: AxiosRequestConfig = {
|
|
154
159
|
method: 'POST',
|
|
@@ -163,20 +168,21 @@ export class BaseAPI {
|
|
|
163
168
|
|
|
164
169
|
const response = await globalAxios.request<LoginClass>(options);
|
|
165
170
|
|
|
166
|
-
const { data: { accessToken } } = response;
|
|
171
|
+
const { data: { accessToken, permissions } } = response;
|
|
167
172
|
this.configuration.username = username;
|
|
168
173
|
this.configuration.accessToken = `Bearer ${accessToken}`;
|
|
174
|
+
this.permissions = permissions;
|
|
169
175
|
|
|
170
176
|
const refreshToken = this.extractRefreshToken(response)
|
|
171
177
|
this.configuration.refreshToken = refreshToken;
|
|
172
178
|
}
|
|
173
179
|
|
|
174
|
-
async refreshTokenInternal(): Promise<
|
|
180
|
+
async refreshTokenInternal(): Promise<LoginClass> {
|
|
175
181
|
const { username, refreshToken } = this.configuration;
|
|
176
182
|
|
|
177
183
|
|
|
178
184
|
if (!username || !refreshToken) {
|
|
179
|
-
|
|
185
|
+
throw new Error('Failed to refresh token.');
|
|
180
186
|
}
|
|
181
187
|
|
|
182
188
|
const options: AxiosRequestConfig = {
|
|
@@ -190,9 +196,9 @@ export class BaseAPI {
|
|
|
190
196
|
withCredentials: true,
|
|
191
197
|
};
|
|
192
198
|
|
|
193
|
-
const
|
|
199
|
+
const response = await globalAxios.request<LoginClass>(options);
|
|
194
200
|
|
|
195
|
-
return
|
|
201
|
+
return response.data;
|
|
196
202
|
}
|
|
197
203
|
|
|
198
204
|
private extractRefreshToken(response: AxiosResponse): string {
|
|
@@ -221,8 +227,9 @@ export class BaseAPI {
|
|
|
221
227
|
if (err.response.status === 401 && !originalConfig._retry) {
|
|
222
228
|
originalConfig._retry = true;
|
|
223
229
|
try {
|
|
224
|
-
const tokenString = await this.refreshTokenInternal();
|
|
230
|
+
const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
|
|
225
231
|
const accessToken = `Bearer ${tokenString}`;
|
|
232
|
+
this.permissions = permissions;
|
|
226
233
|
|
|
227
234
|
originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
|
|
228
235
|
|
|
@@ -246,8 +253,9 @@ export class BaseAPI {
|
|
|
246
253
|
){
|
|
247
254
|
_retry_count++;
|
|
248
255
|
try {
|
|
249
|
-
const tokenString = await this.refreshTokenInternal();
|
|
256
|
+
const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
|
|
250
257
|
const accessToken = `Bearer ${tokenString}`;
|
|
258
|
+
this.permissions = permissions;
|
|
251
259
|
|
|
252
260
|
_retry = true;
|
|
253
261
|
originalConfig.headers['Authorization'] = accessToken;
|
|
@@ -33,7 +33,7 @@ export declare const CustomSchemaApiAxiosParamCreator: (configuration?: Configur
|
|
|
33
33
|
*/
|
|
34
34
|
createCustomSchema: (createCustomSchemaRequestDto: CreateCustomSchemaRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
35
|
/**
|
|
36
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
36
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
37
37
|
* @summary Retrieve the custom-schema
|
|
38
38
|
* @param {string} code Unique identifier for the object.
|
|
39
39
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -83,7 +83,7 @@ export declare const CustomSchemaApiFp: (configuration?: Configuration) => {
|
|
|
83
83
|
*/
|
|
84
84
|
createCustomSchema(createCustomSchemaRequestDto: CreateCustomSchemaRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomSchemaResponseClass>>;
|
|
85
85
|
/**
|
|
86
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
86
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
87
87
|
* @summary Retrieve the custom-schema
|
|
88
88
|
* @param {string} code Unique identifier for the object.
|
|
89
89
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -133,7 +133,7 @@ export declare const CustomSchemaApiFactory: (configuration?: Configuration, bas
|
|
|
133
133
|
*/
|
|
134
134
|
createCustomSchema(createCustomSchemaRequestDto: CreateCustomSchemaRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCustomSchemaResponseClass>;
|
|
135
135
|
/**
|
|
136
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
136
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
137
137
|
* @summary Retrieve the custom-schema
|
|
138
138
|
* @param {string} code Unique identifier for the object.
|
|
139
139
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -309,7 +309,7 @@ export declare class CustomSchemaApi extends BaseAPI {
|
|
|
309
309
|
*/
|
|
310
310
|
createCustomSchema(requestParameters: CustomSchemaApiCreateCustomSchemaRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateCustomSchemaResponseClass, any>>;
|
|
311
311
|
/**
|
|
312
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
312
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
313
313
|
* @summary Retrieve the custom-schema
|
|
314
314
|
* @param {CustomSchemaApiGetCustomSchemaRequest} requestParameters Request parameters.
|
|
315
315
|
* @param {*} [options] Override http request option.
|
|
@@ -146,7 +146,7 @@ var CustomSchemaApiAxiosParamCreator = function (configuration) {
|
|
|
146
146
|
});
|
|
147
147
|
},
|
|
148
148
|
/**
|
|
149
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
149
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
150
150
|
* @summary Retrieve the custom-schema
|
|
151
151
|
* @param {string} code Unique identifier for the object.
|
|
152
152
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -354,7 +354,7 @@ var CustomSchemaApiFp = function (configuration) {
|
|
|
354
354
|
});
|
|
355
355
|
},
|
|
356
356
|
/**
|
|
357
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
357
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
358
358
|
* @summary Retrieve the custom-schema
|
|
359
359
|
* @param {string} code Unique identifier for the object.
|
|
360
360
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -446,7 +446,7 @@ var CustomSchemaApiFactory = function (configuration, basePath, axios) {
|
|
|
446
446
|
return localVarFp.createCustomSchema(createCustomSchemaRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
447
447
|
},
|
|
448
448
|
/**
|
|
449
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
449
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
450
450
|
* @summary Retrieve the custom-schema
|
|
451
451
|
* @param {string} code Unique identifier for the object.
|
|
452
452
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -513,7 +513,7 @@ var CustomSchemaApi = /** @class */ (function (_super) {
|
|
|
513
513
|
return (0, exports.CustomSchemaApiFp)(this.configuration).createCustomSchema(requestParameters.createCustomSchemaRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
514
514
|
};
|
|
515
515
|
/**
|
|
516
|
-
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code
|
|
516
|
+
* Retrieves the details of the custom-schema that was previously created. Supply the unique custom-schema code that was returned when you created it and Emil Api will return the corresponding custom-schema information.
|
|
517
517
|
* @summary Retrieve the custom-schema
|
|
518
518
|
* @param {CustomSchemaApiGetCustomSchemaRequest} requestParameters Request parameters.
|
|
519
519
|
* @param {*} [options] Override http request option.
|