@emilgroup/tenant-sdk-node 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.openapi-generator/FILES +5 -7
  2. package/README.md +2 -2
  3. package/api/invite-organizations-api.ts +15 -15
  4. package/api/invite-users-api.ts +34 -34
  5. package/api/roles-api.ts +4 -0
  6. package/api/users-api.ts +124 -4
  7. package/base.ts +7 -15
  8. package/dist/api/invite-organizations-api.d.ts +9 -9
  9. package/dist/api/invite-organizations-api.js +12 -12
  10. package/dist/api/invite-users-api.d.ts +22 -22
  11. package/dist/api/invite-users-api.js +27 -27
  12. package/dist/api/roles-api.d.ts +4 -0
  13. package/dist/api/roles-api.js +4 -0
  14. package/dist/api/users-api.d.ts +70 -4
  15. package/dist/api/users-api.js +102 -3
  16. package/dist/base.d.ts +1 -3
  17. package/dist/base.js +20 -26
  18. package/dist/models/{invite-users-request-dto.d.ts → assign-user-roles-request-dto.d.ts} +8 -14
  19. package/dist/models/assign-user-roles-response-class.d.ts +25 -0
  20. package/dist/models/index.d.ts +5 -7
  21. package/dist/models/index.js +5 -7
  22. package/dist/models/{invite-org-request-dto.d.ts → invite-org-request-dto-rest.d.ts} +27 -14
  23. package/dist/models/invite-user-request-dto-rest.d.ts +49 -0
  24. package/dist/models/invite-users-request-dto-rest.d.ts +49 -0
  25. package/models/{invite-users-request-dto.ts → assign-user-roles-request-dto.ts} +8 -14
  26. package/models/assign-user-roles-response-class.ts +31 -0
  27. package/models/index.ts +5 -7
  28. package/models/{invite-org-request-dto.ts → invite-org-request-dto-rest.ts} +27 -14
  29. package/models/invite-user-request-dto-rest.ts +55 -0
  30. package/models/invite-users-request-dto-rest.ts +55 -0
  31. package/package.json +1 -1
  32. package/dist/models/create-permission-request-dto.d.ts +0 -42
  33. package/dist/models/create-role-request-dto.d.ts +0 -36
  34. package/dist/models/invite-user-request-dto.d.ts +0 -43
  35. package/dist/models/partner-invitation-data-dto.d.ts +0 -36
  36. package/dist/models/partner-invitation-data-dto.js +0 -15
  37. package/dist/models/update-role-request-dto.d.ts +0 -42
  38. package/dist/models/update-role-request-dto.js +0 -15
  39. package/models/create-permission-request-dto.ts +0 -48
  40. package/models/create-role-request-dto.ts +0 -42
  41. package/models/invite-user-request-dto.ts +0 -49
  42. package/models/partner-invitation-data-dto.ts +0 -42
  43. package/models/update-role-request-dto.ts +0 -48
  44. /package/dist/models/{create-permission-request-dto.js → assign-user-roles-request-dto.js} +0 -0
  45. /package/dist/models/{create-role-request-dto.js → assign-user-roles-response-class.js} +0 -0
  46. /package/dist/models/{invite-org-request-dto.js → invite-org-request-dto-rest.js} +0 -0
  47. /package/dist/models/{invite-user-request-dto.js → invite-user-request-dto-rest.js} +0 -0
  48. /package/dist/models/{invite-users-request-dto.js → invite-users-request-dto-rest.js} +0 -0
@@ -107,6 +107,7 @@ var RolesApiAxiosParamCreator = function (configuration) {
107
107
  * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.
108
108
  * @param {string} [expand] You can expand roles in this endpoint. By default, permissions will be an empty array.
109
109
  * @param {*} [options] Override http request option.
110
+ * @deprecated
110
111
  * @throws {RequiredError}
111
112
  */
112
113
  listRoles: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
@@ -185,6 +186,7 @@ var RolesApiFp = function (configuration) {
185
186
  * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.
186
187
  * @param {string} [expand] You can expand roles in this endpoint. By default, permissions will be an empty array.
187
188
  * @param {*} [options] Override http request option.
189
+ * @deprecated
188
190
  * @throws {RequiredError}
189
191
  */
190
192
  listRoles: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
@@ -221,6 +223,7 @@ var RolesApiFactory = function (configuration, basePath, axios) {
221
223
  * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.
222
224
  * @param {string} [expand] You can expand roles in this endpoint. By default, permissions will be an empty array.
223
225
  * @param {*} [options] Override http request option.
226
+ * @deprecated
224
227
  * @throws {RequiredError}
225
228
  */
226
229
  listRoles: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
@@ -245,6 +248,7 @@ var RolesApi = /** @class */ (function (_super) {
245
248
  * @summary List roles
246
249
  * @param {RolesApiListRolesRequest} requestParameters Request parameters.
247
250
  * @param {*} [options] Override http request option.
251
+ * @deprecated
248
252
  * @throws {RequiredError}
249
253
  * @memberof RolesApi
250
254
  */
@@ -12,6 +12,8 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { AssignUserRolesRequestDto } from '../models';
16
+ import { AssignUserRolesResponseClass } from '../models';
15
17
  import { BatchDeleteRequestDto } from '../models';
16
18
  import { BatchDeleteResponseClass } from '../models';
17
19
  import { DisableUsersRequestDto } from '../models';
@@ -27,6 +29,16 @@ import { ListUsersResponseClass } from '../models';
27
29
  * @export
28
30
  */
29
31
  export declare const UsersApiAxiosParamCreator: (configuration?: Configuration) => {
32
+ /**
33
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
34
+ * @param {number} id
35
+ * @param {AssignUserRolesRequestDto} assignUserRolesRequestDto
36
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
37
+ * @param {*} [options] Override http request option.
38
+ * @deprecated
39
+ * @throws {RequiredError}
40
+ */
41
+ assignUserRoles: (id: number, assignUserRolesRequestDto: AssignUserRolesRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
30
42
  /**
31
43
  *
32
44
  * @param {BatchDeleteRequestDto} batchDeleteRequestDto
@@ -78,7 +90,7 @@ export declare const UsersApiAxiosParamCreator: (configuration?: Configuration)
78
90
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
79
91
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
80
92
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: email&lt;/i&gt;
81
- * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
93
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
82
94
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
83
95
  * @param {*} [options] Override http request option.
84
96
  * @throws {RequiredError}
@@ -90,6 +102,16 @@ export declare const UsersApiAxiosParamCreator: (configuration?: Configuration)
90
102
  * @export
91
103
  */
92
104
  export declare const UsersApiFp: (configuration?: Configuration) => {
105
+ /**
106
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
107
+ * @param {number} id
108
+ * @param {AssignUserRolesRequestDto} assignUserRolesRequestDto
109
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
110
+ * @param {*} [options] Override http request option.
111
+ * @deprecated
112
+ * @throws {RequiredError}
113
+ */
114
+ assignUserRoles(id: number, assignUserRolesRequestDto: AssignUserRolesRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssignUserRolesResponseClass>>;
93
115
  /**
94
116
  *
95
117
  * @param {BatchDeleteRequestDto} batchDeleteRequestDto
@@ -141,7 +163,7 @@ export declare const UsersApiFp: (configuration?: Configuration) => {
141
163
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
142
164
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
143
165
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: email&lt;/i&gt;
144
- * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
166
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
145
167
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
146
168
  * @param {*} [options] Override http request option.
147
169
  * @throws {RequiredError}
@@ -153,6 +175,16 @@ export declare const UsersApiFp: (configuration?: Configuration) => {
153
175
  * @export
154
176
  */
155
177
  export declare const UsersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
178
+ /**
179
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
180
+ * @param {number} id
181
+ * @param {AssignUserRolesRequestDto} assignUserRolesRequestDto
182
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
183
+ * @param {*} [options] Override http request option.
184
+ * @deprecated
185
+ * @throws {RequiredError}
186
+ */
187
+ assignUserRoles(id: number, assignUserRolesRequestDto: AssignUserRolesRequestDto, authorization?: string, options?: any): AxiosPromise<AssignUserRolesResponseClass>;
156
188
  /**
157
189
  *
158
190
  * @param {BatchDeleteRequestDto} batchDeleteRequestDto
@@ -204,13 +236,38 @@ export declare const UsersApiFactory: (configuration?: Configuration, basePath?:
204
236
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
205
237
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
206
238
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: email&lt;/i&gt;
207
- * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
239
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
208
240
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
209
241
  * @param {*} [options] Override http request option.
210
242
  * @throws {RequiredError}
211
243
  */
212
244
  listUsers(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListUsersResponseClass>;
213
245
  };
246
+ /**
247
+ * Request parameters for assignUserRoles operation in UsersApi.
248
+ * @export
249
+ * @interface UsersApiAssignUserRolesRequest
250
+ */
251
+ export interface UsersApiAssignUserRolesRequest {
252
+ /**
253
+ *
254
+ * @type {number}
255
+ * @memberof UsersApiAssignUserRoles
256
+ */
257
+ readonly id: number;
258
+ /**
259
+ *
260
+ * @type {AssignUserRolesRequestDto}
261
+ * @memberof UsersApiAssignUserRoles
262
+ */
263
+ readonly assignUserRolesRequestDto: AssignUserRolesRequestDto;
264
+ /**
265
+ * Bearer Token: provided by the login endpoint under the name accessToken.
266
+ * @type {string}
267
+ * @memberof UsersApiAssignUserRoles
268
+ */
269
+ readonly authorization?: string;
270
+ }
214
271
  /**
215
272
  * Request parameters for deleteUsers operation in UsersApi.
216
273
  * @export
@@ -361,7 +418,7 @@ export interface UsersApiListUsersRequest {
361
418
  */
362
419
  readonly order?: string;
363
420
  /**
364
- * 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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
421
+ * 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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
365
422
  * @type {string}
366
423
  * @memberof UsersApiListUsers
367
424
  */
@@ -380,6 +437,15 @@ export interface UsersApiListUsersRequest {
380
437
  * @extends {BaseAPI}
381
438
  */
382
439
  export declare class UsersApi extends BaseAPI {
440
+ /**
441
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
442
+ * @param {UsersApiAssignUserRolesRequest} requestParameters Request parameters.
443
+ * @param {*} [options] Override http request option.
444
+ * @deprecated
445
+ * @throws {RequiredError}
446
+ * @memberof UsersApi
447
+ */
448
+ assignUserRoles(requestParameters: UsersApiAssignUserRolesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AssignUserRolesResponseClass, any>>;
383
449
  /**
384
450
  *
385
451
  * @param {UsersApiDeleteUsersRequest} requestParameters Request parameters.
@@ -96,6 +96,59 @@ var FormData = require('form-data');
96
96
  var UsersApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
+ /**
100
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
101
+ * @param {number} id
102
+ * @param {AssignUserRolesRequestDto} assignUserRolesRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
+ * @param {*} [options] Override http request option.
105
+ * @deprecated
106
+ * @throws {RequiredError}
107
+ */
108
+ assignUserRoles: function (id, assignUserRolesRequestDto, authorization, options) {
109
+ if (options === void 0) { options = {}; }
110
+ return __awaiter(_this, void 0, void 0, function () {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0:
115
+ // verify required parameter 'id' is not null or undefined
116
+ (0, common_1.assertParamExists)('assignUserRoles', 'id', id);
117
+ // verify required parameter 'assignUserRolesRequestDto' is not null or undefined
118
+ (0, common_1.assertParamExists)('assignUserRoles', 'assignUserRolesRequestDto', assignUserRolesRequestDto);
119
+ localVarPath = "/tenantservice/v1/users/{id}/assign-roles"
120
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
121
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ baseAccessToken = configuration.accessToken;
125
+ }
126
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
127
+ localVarHeaderParameter = {};
128
+ localVarQueryParameter = {};
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
+ case 1:
133
+ // authentication bearer required
134
+ // http bearer authentication required
135
+ _a.sent();
136
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
+ }
139
+ localVarHeaderParameter['Content-Type'] = 'application/json';
140
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
141
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
142
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
143
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(assignUserRolesRequestDto, localVarRequestOptions, configuration);
144
+ return [2 /*return*/, {
145
+ url: (0, common_1.toPathString)(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ }];
148
+ }
149
+ });
150
+ });
151
+ },
99
152
  /**
100
153
  *
101
154
  * @param {BatchDeleteRequestDto} batchDeleteRequestDto
@@ -352,7 +405,7 @@ var UsersApiAxiosParamCreator = function (configuration) {
352
405
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
353
406
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
354
407
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: email&lt;/i&gt;
355
- * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
408
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
356
409
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
357
410
  * @param {*} [options] Override http request option.
358
411
  * @throws {RequiredError}
@@ -425,6 +478,28 @@ exports.UsersApiAxiosParamCreator = UsersApiAxiosParamCreator;
425
478
  var UsersApiFp = function (configuration) {
426
479
  var localVarAxiosParamCreator = (0, exports.UsersApiAxiosParamCreator)(configuration);
427
480
  return {
481
+ /**
482
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
483
+ * @param {number} id
484
+ * @param {AssignUserRolesRequestDto} assignUserRolesRequestDto
485
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
486
+ * @param {*} [options] Override http request option.
487
+ * @deprecated
488
+ * @throws {RequiredError}
489
+ */
490
+ assignUserRoles: function (id, assignUserRolesRequestDto, authorization, options) {
491
+ return __awaiter(this, void 0, void 0, function () {
492
+ var localVarAxiosArgs;
493
+ return __generator(this, function (_a) {
494
+ switch (_a.label) {
495
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.assignUserRoles(id, assignUserRolesRequestDto, authorization, options)];
496
+ case 1:
497
+ localVarAxiosArgs = _a.sent();
498
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
499
+ }
500
+ });
501
+ });
502
+ },
428
503
  /**
429
504
  *
430
505
  * @param {BatchDeleteRequestDto} batchDeleteRequestDto
@@ -536,7 +611,7 @@ var UsersApiFp = function (configuration) {
536
611
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
537
612
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
538
613
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: email&lt;/i&gt;
539
- * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
614
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
540
615
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
541
616
  * @param {*} [options] Override http request option.
542
617
  * @throws {RequiredError}
@@ -564,6 +639,18 @@ exports.UsersApiFp = UsersApiFp;
564
639
  var UsersApiFactory = function (configuration, basePath, axios) {
565
640
  var localVarFp = (0, exports.UsersApiFp)(configuration);
566
641
  return {
642
+ /**
643
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
644
+ * @param {number} id
645
+ * @param {AssignUserRolesRequestDto} assignUserRolesRequestDto
646
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
647
+ * @param {*} [options] Override http request option.
648
+ * @deprecated
649
+ * @throws {RequiredError}
650
+ */
651
+ assignUserRoles: function (id, assignUserRolesRequestDto, authorization, options) {
652
+ return localVarFp.assignUserRoles(id, assignUserRolesRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
653
+ },
567
654
  /**
568
655
  *
569
656
  * @param {BatchDeleteRequestDto} batchDeleteRequestDto
@@ -625,7 +712,7 @@ var UsersApiFactory = function (configuration, basePath, axios) {
625
712
  * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
626
713
  * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
627
714
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: email&lt;/i&gt;
628
- * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: roles, subscriptions, organizations&lt;i&gt;
715
+ * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: subscriptions, organizations&lt;i&gt;
629
716
  * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, email, sub, status, organizationId, ern, partnerCode&lt;/i&gt;
630
717
  * @param {*} [options] Override http request option.
631
718
  * @throws {RequiredError}
@@ -647,6 +734,18 @@ var UsersApi = /** @class */ (function (_super) {
647
734
  function UsersApi() {
648
735
  return _super !== null && _super.apply(this, arguments) || this;
649
736
  }
737
+ /**
738
+ * This endpoint is deprecated, please refer to the policy administration service at /policy-administration-service/api.
739
+ * @param {UsersApiAssignUserRolesRequest} requestParameters Request parameters.
740
+ * @param {*} [options] Override http request option.
741
+ * @deprecated
742
+ * @throws {RequiredError}
743
+ * @memberof UsersApi
744
+ */
745
+ UsersApi.prototype.assignUserRoles = function (requestParameters, options) {
746
+ var _this = this;
747
+ return (0, exports.UsersApiFp)(this.configuration).assignUserRoles(requestParameters.id, requestParameters.assignUserRolesRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
748
+ };
650
749
  /**
651
750
  *
652
751
  * @param {UsersApiDeleteUsersRequest} requestParameters Request parameters.
package/dist/base.d.ts CHANGED
@@ -53,16 +53,14 @@ export declare class BaseAPI {
53
53
  protected configuration: Configuration;
54
54
  private username?;
55
55
  private password?;
56
- private permissions?;
57
56
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
58
57
  initialize(env?: Environment): Promise<void>;
59
58
  private loadCredentials;
60
59
  private readConfigFile;
61
60
  private readEnvVariables;
62
61
  selectEnvironment(env: Environment): void;
63
- getPermissions(): Array<string>;
64
62
  authorize(username: string, password: string): Promise<void>;
65
- refreshTokenInternal(): Promise<LoginClass>;
63
+ refreshTokenInternal(): Promise<string>;
66
64
  private extractRefreshToken;
67
65
  getConfiguration(): Configuration;
68
66
  private attachInterceptor;
package/dist/base.js CHANGED
@@ -242,14 +242,11 @@ var BaseAPI = /** @class */ (function () {
242
242
  BaseAPI.prototype.selectEnvironment = function (env) {
243
243
  this.configuration.basePath = env;
244
244
  };
245
- BaseAPI.prototype.getPermissions = function () {
246
- return this.permissions.split(',');
247
- };
248
245
  BaseAPI.prototype.authorize = function (username, password) {
249
246
  return __awaiter(this, void 0, void 0, function () {
250
- var options, response, _a, accessToken, permissions, refreshToken;
251
- return __generator(this, function (_b) {
252
- switch (_b.label) {
247
+ var options, response, accessToken, refreshToken;
248
+ return __generator(this, function (_a) {
249
+ switch (_a.label) {
253
250
  case 0:
254
251
  options = {
255
252
  method: 'POST',
@@ -263,11 +260,10 @@ var BaseAPI = /** @class */ (function () {
263
260
  };
264
261
  return [4 /*yield*/, axios_1.default.request(options)];
265
262
  case 1:
266
- response = _b.sent();
267
- _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
263
+ response = _a.sent();
264
+ accessToken = response.data.accessToken;
268
265
  this.configuration.username = username;
269
266
  this.configuration.accessToken = "Bearer ".concat(accessToken);
270
- this.permissions = permissions;
271
267
  refreshToken = this.extractRefreshToken(response);
272
268
  this.configuration.refreshToken = refreshToken;
273
269
  return [2 /*return*/];
@@ -277,13 +273,13 @@ var BaseAPI = /** @class */ (function () {
277
273
  };
278
274
  BaseAPI.prototype.refreshTokenInternal = function () {
279
275
  return __awaiter(this, void 0, void 0, function () {
280
- var _a, username, refreshToken, options, response;
276
+ var _a, username, refreshToken, options, accessToken;
281
277
  return __generator(this, function (_b) {
282
278
  switch (_b.label) {
283
279
  case 0:
284
280
  _a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
285
281
  if (!username || !refreshToken) {
286
- throw new Error('Failed to refresh token.');
282
+ return [2 /*return*/, ''];
287
283
  }
288
284
  options = {
289
285
  method: 'POST',
@@ -297,8 +293,8 @@ var BaseAPI = /** @class */ (function () {
297
293
  };
298
294
  return [4 /*yield*/, axios_1.default.request(options)];
299
295
  case 1:
300
- response = _b.sent();
301
- return [2 /*return*/, response.data];
296
+ accessToken = (_b.sent()).data.accessToken;
297
+ return [2 /*return*/, accessToken];
302
298
  }
303
299
  });
304
300
  });
@@ -318,27 +314,26 @@ var BaseAPI = /** @class */ (function () {
318
314
  axios.interceptors.response.use(function (res) {
319
315
  return res;
320
316
  }, function (err) { return __awaiter(_this, void 0, void 0, function () {
321
- var originalConfig, _a, tokenString, permissions, accessToken, _error_1, _b, tokenString, permissions, accessToken, _error_2;
322
- return __generator(this, function (_c) {
323
- switch (_c.label) {
317
+ var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
318
+ return __generator(this, function (_a) {
319
+ switch (_a.label) {
324
320
  case 0:
325
321
  originalConfig = err.config;
326
322
  if (!err.response) return [3 /*break*/, 5];
327
323
  if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
328
324
  originalConfig._retry = true;
329
- _c.label = 1;
325
+ _a.label = 1;
330
326
  case 1:
331
- _c.trys.push([1, 3, , 4]);
327
+ _a.trys.push([1, 3, , 4]);
332
328
  return [4 /*yield*/, this.refreshTokenInternal()];
333
329
  case 2:
334
- _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
330
+ tokenString = _a.sent();
335
331
  accessToken = "Bearer ".concat(tokenString);
336
- this.permissions = permissions;
337
332
  originalConfig.headers['Authorization'] = "Bearer ".concat(accessToken);
338
333
  this.configuration.accessToken = accessToken;
339
334
  return [2 /*return*/, axios.request(originalConfig)];
340
335
  case 3:
341
- _error_1 = _c.sent();
336
+ _error_1 = _a.sent();
342
337
  if (_error_1.response && _error_1.response.data) {
343
338
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
344
339
  }
@@ -354,20 +349,19 @@ var BaseAPI = /** @class */ (function () {
354
349
  && originalConfig.headers.hasOwnProperty('Authorization')
355
350
  && _retry_count < 4)) return [3 /*break*/, 9];
356
351
  _retry_count++;
357
- _c.label = 6;
352
+ _a.label = 6;
358
353
  case 6:
359
- _c.trys.push([6, 8, , 9]);
354
+ _a.trys.push([6, 8, , 9]);
360
355
  return [4 /*yield*/, this.refreshTokenInternal()];
361
356
  case 7:
362
- _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
357
+ tokenString = _a.sent();
363
358
  accessToken = "Bearer ".concat(tokenString);
364
- this.permissions = permissions;
365
359
  _retry = true;
366
360
  originalConfig.headers['Authorization'] = accessToken;
367
361
  this.configuration.accessToken = accessToken;
368
362
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
369
363
  case 8:
370
- _error_2 = _c.sent();
364
+ _error_2 = _a.sent();
371
365
  if (_error_2.response && _error_2.response.data) {
372
366
  return [2 /*return*/, Promise.reject(_error_2.response.data)];
373
367
  }
@@ -12,25 +12,19 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface InviteUsersRequestDto
15
+ * @interface AssignUserRolesRequestDto
16
16
  */
17
- export interface InviteUsersRequestDto {
17
+ export interface AssignUserRolesRequestDto {
18
18
  /**
19
- * User\'s email address.
20
- * @type {Array<string>}
21
- * @memberof InviteUsersRequestDto
19
+ * User id
20
+ * @type {number}
21
+ * @memberof AssignUserRolesRequestDto
22
22
  */
23
- 'emails': Array<string>;
23
+ 'userId': number;
24
24
  /**
25
- * Role ids to be assigned.
25
+ * Role ids to be assigned
26
26
  * @type {Array<number>}
27
- * @memberof InviteUsersRequestDto
27
+ * @memberof AssignUserRolesRequestDto
28
28
  */
29
29
  'roleIds': Array<number>;
30
- /**
31
- * Organization associated with the users.
32
- * @type {number}
33
- * @memberof InviteUsersRequestDto
34
- */
35
- 'organizationId'?: number;
36
30
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL Tenant Service
3
+ * The EMIL TenantService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { UserClass } from './user-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AssignUserRolesResponseClass
17
+ */
18
+ export interface AssignUserRolesResponseClass {
19
+ /**
20
+ * user
21
+ * @type {UserClass}
22
+ * @memberof AssignUserRolesResponseClass
23
+ */
24
+ 'user': UserClass;
25
+ }
@@ -1,3 +1,5 @@
1
+ export * from './assign-user-roles-request-dto';
2
+ export * from './assign-user-roles-response-class';
1
3
  export * from './batch-delete-request-dto';
2
4
  export * from './batch-delete-response-class';
3
5
  export * from './create-custom-schema-request-dto';
@@ -8,8 +10,6 @@ export * from './create-dashboard-request-dto';
8
10
  export * from './create-dashboard-response-class';
9
11
  export * from './create-data-report-request-dto';
10
12
  export * from './create-data-report-response-class';
11
- export * from './create-permission-request-dto';
12
- export * from './create-role-request-dto';
13
13
  export * from './create-tenant-request-dto';
14
14
  export * from './custom-field-dto';
15
15
  export * from './custom-schema-class';
@@ -39,10 +39,10 @@ export * from './initial-tenant-config-class';
39
39
  export * from './inline-response200';
40
40
  export * from './inline-response503';
41
41
  export * from './invite-class';
42
- export * from './invite-org-request-dto';
43
- export * from './invite-user-request-dto';
42
+ export * from './invite-org-request-dto-rest';
43
+ export * from './invite-user-request-dto-rest';
44
44
  export * from './invite-user-response-class';
45
- export * from './invite-users-request-dto';
45
+ export * from './invite-users-request-dto-rest';
46
46
  export * from './invite-users-response-class';
47
47
  export * from './link-user-with-partner-request-dto-rest';
48
48
  export * from './link-user-with-partner-response-class';
@@ -58,7 +58,6 @@ export * from './list-users-response-class';
58
58
  export * from './org-invitation-class';
59
59
  export * from './org-invitation-response-class';
60
60
  export * from './organization-class';
61
- export * from './partner-invitation-data-dto';
62
61
  export * from './permission-class';
63
62
  export * from './re-invite-org-request-dto';
64
63
  export * from './role-class';
@@ -78,5 +77,4 @@ export * from './update-data-report-request-dto';
78
77
  export * from './update-data-report-response-class';
79
78
  export * from './update-organization-request-dto-rest';
80
79
  export * from './update-organization-response-class';
81
- export * from './update-role-request-dto';
82
80
  export * from './user-class';
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./assign-user-roles-request-dto"), exports);
18
+ __exportStar(require("./assign-user-roles-response-class"), exports);
17
19
  __exportStar(require("./batch-delete-request-dto"), exports);
18
20
  __exportStar(require("./batch-delete-response-class"), exports);
19
21
  __exportStar(require("./create-custom-schema-request-dto"), exports);
@@ -24,8 +26,6 @@ __exportStar(require("./create-dashboard-request-dto"), exports);
24
26
  __exportStar(require("./create-dashboard-response-class"), exports);
25
27
  __exportStar(require("./create-data-report-request-dto"), exports);
26
28
  __exportStar(require("./create-data-report-response-class"), exports);
27
- __exportStar(require("./create-permission-request-dto"), exports);
28
- __exportStar(require("./create-role-request-dto"), exports);
29
29
  __exportStar(require("./create-tenant-request-dto"), exports);
30
30
  __exportStar(require("./custom-field-dto"), exports);
31
31
  __exportStar(require("./custom-schema-class"), exports);
@@ -55,10 +55,10 @@ __exportStar(require("./initial-tenant-config-class"), exports);
55
55
  __exportStar(require("./inline-response200"), exports);
56
56
  __exportStar(require("./inline-response503"), exports);
57
57
  __exportStar(require("./invite-class"), exports);
58
- __exportStar(require("./invite-org-request-dto"), exports);
59
- __exportStar(require("./invite-user-request-dto"), exports);
58
+ __exportStar(require("./invite-org-request-dto-rest"), exports);
59
+ __exportStar(require("./invite-user-request-dto-rest"), exports);
60
60
  __exportStar(require("./invite-user-response-class"), exports);
61
- __exportStar(require("./invite-users-request-dto"), exports);
61
+ __exportStar(require("./invite-users-request-dto-rest"), exports);
62
62
  __exportStar(require("./invite-users-response-class"), exports);
63
63
  __exportStar(require("./link-user-with-partner-request-dto-rest"), exports);
64
64
  __exportStar(require("./link-user-with-partner-response-class"), exports);
@@ -74,7 +74,6 @@ __exportStar(require("./list-users-response-class"), exports);
74
74
  __exportStar(require("./org-invitation-class"), exports);
75
75
  __exportStar(require("./org-invitation-response-class"), exports);
76
76
  __exportStar(require("./organization-class"), exports);
77
- __exportStar(require("./partner-invitation-data-dto"), exports);
78
77
  __exportStar(require("./permission-class"), exports);
79
78
  __exportStar(require("./re-invite-org-request-dto"), exports);
80
79
  __exportStar(require("./role-class"), exports);
@@ -94,5 +93,4 @@ __exportStar(require("./update-data-report-request-dto"), exports);
94
93
  __exportStar(require("./update-data-report-response-class"), exports);
95
94
  __exportStar(require("./update-organization-request-dto-rest"), exports);
96
95
  __exportStar(require("./update-organization-response-class"), exports);
97
- __exportStar(require("./update-role-request-dto"), exports);
98
96
  __exportStar(require("./user-class"), exports);