@emilgroup/tenant-sdk-node 1.23.0 → 1.26.1-beta.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 (53) hide show
  1. package/.openapi-generator/FILES +6 -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 +8 -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 +2 -3
  17. package/dist/base.js +21 -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/create-tenant-db-config-request-dto.d.ts +30 -0
  21. package/dist/models/index.d.ts +6 -7
  22. package/dist/models/index.js +6 -7
  23. package/dist/models/invite-class.d.ts +12 -12
  24. package/dist/models/{invite-org-request-dto.d.ts → invite-org-request-dto-rest.d.ts} +27 -14
  25. package/dist/models/invite-user-request-dto-rest.d.ts +49 -0
  26. package/dist/models/invite-users-request-dto-rest.d.ts +49 -0
  27. package/dist/models/user-class.d.ts +8 -8
  28. package/models/{invite-users-request-dto.ts → assign-user-roles-request-dto.ts} +8 -14
  29. package/models/assign-user-roles-response-class.ts +31 -0
  30. package/models/{create-role-request-dto.ts → create-tenant-db-config-request-dto.ts} +9 -15
  31. package/models/index.ts +6 -7
  32. package/models/invite-class.ts +12 -12
  33. package/models/{invite-org-request-dto.ts → invite-org-request-dto-rest.ts} +27 -14
  34. package/models/invite-user-request-dto-rest.ts +55 -0
  35. package/models/invite-users-request-dto-rest.ts +55 -0
  36. package/models/user-class.ts +8 -8
  37. package/package.json +1 -1
  38. package/dist/models/create-permission-request-dto.d.ts +0 -42
  39. package/dist/models/create-role-request-dto.d.ts +0 -36
  40. package/dist/models/invite-user-request-dto.d.ts +0 -43
  41. package/dist/models/partner-invitation-data-dto.d.ts +0 -36
  42. package/dist/models/update-role-request-dto.d.ts +0 -42
  43. package/dist/models/update-role-request-dto.js +0 -15
  44. package/models/create-permission-request-dto.ts +0 -48
  45. package/models/invite-user-request-dto.ts +0 -49
  46. package/models/partner-invitation-data-dto.ts +0 -42
  47. package/models/update-role-request-dto.ts +0 -48
  48. /package/dist/models/{create-permission-request-dto.js → assign-user-roles-request-dto.js} +0 -0
  49. /package/dist/models/{create-role-request-dto.js → assign-user-roles-response-class.js} +0 -0
  50. /package/dist/models/{invite-org-request-dto.js → create-tenant-db-config-request-dto.js} +0 -0
  51. /package/dist/models/{invite-user-request-dto.js → invite-org-request-dto-rest.js} +0 -0
  52. /package/dist/models/{invite-users-request-dto.js → invite-user-request-dto-rest.js} +0 -0
  53. /package/dist/models/{partner-invitation-data-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
@@ -29,6 +29,7 @@ export interface LoginClass {
29
29
  export declare enum Environment {
30
30
  Production = "https://apiv2.emil.de",
31
31
  Test = "https://apiv2-test.emil.de",
32
+ Staging = "https://apiv2-staging.emil.de",
32
33
  Development = "https://apiv2-dev.emil.de",
33
34
  ProductionZurich = "https://eu-central-2.apiv2.emil.de"
34
35
  }
@@ -53,16 +54,14 @@ export declare class BaseAPI {
53
54
  protected configuration: Configuration;
54
55
  private username?;
55
56
  private password?;
56
- private permissions?;
57
57
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
58
58
  initialize(env?: Environment): Promise<void>;
59
59
  private loadCredentials;
60
60
  private readConfigFile;
61
61
  private readEnvVariables;
62
62
  selectEnvironment(env: Environment): void;
63
- getPermissions(): Array<string>;
64
63
  authorize(username: string, password: string): Promise<void>;
65
- refreshTokenInternal(): Promise<LoginClass>;
64
+ refreshTokenInternal(): Promise<string>;
66
65
  private extractRefreshToken;
67
66
  getConfiguration(): Configuration;
68
67
  private attachInterceptor;
package/dist/base.js CHANGED
@@ -129,6 +129,7 @@ var Environment;
129
129
  (function (Environment) {
130
130
  Environment["Production"] = "https://apiv2.emil.de";
131
131
  Environment["Test"] = "https://apiv2-test.emil.de";
132
+ Environment["Staging"] = "https://apiv2-staging.emil.de";
132
133
  Environment["Development"] = "https://apiv2-dev.emil.de";
133
134
  Environment["ProductionZurich"] = "https://eu-central-2.apiv2.emil.de";
134
135
  })(Environment = exports.Environment || (exports.Environment = {}));
@@ -242,14 +243,11 @@ var BaseAPI = /** @class */ (function () {
242
243
  BaseAPI.prototype.selectEnvironment = function (env) {
243
244
  this.configuration.basePath = env;
244
245
  };
245
- BaseAPI.prototype.getPermissions = function () {
246
- return this.permissions.split(',');
247
- };
248
246
  BaseAPI.prototype.authorize = function (username, password) {
249
247
  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) {
248
+ var options, response, accessToken, refreshToken;
249
+ return __generator(this, function (_a) {
250
+ switch (_a.label) {
253
251
  case 0:
254
252
  options = {
255
253
  method: 'POST',
@@ -263,11 +261,10 @@ var BaseAPI = /** @class */ (function () {
263
261
  };
264
262
  return [4 /*yield*/, axios_1.default.request(options)];
265
263
  case 1:
266
- response = _b.sent();
267
- _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
264
+ response = _a.sent();
265
+ accessToken = response.data.accessToken;
268
266
  this.configuration.username = username;
269
267
  this.configuration.accessToken = "Bearer ".concat(accessToken);
270
- this.permissions = permissions;
271
268
  refreshToken = this.extractRefreshToken(response);
272
269
  this.configuration.refreshToken = refreshToken;
273
270
  return [2 /*return*/];
@@ -277,13 +274,13 @@ var BaseAPI = /** @class */ (function () {
277
274
  };
278
275
  BaseAPI.prototype.refreshTokenInternal = function () {
279
276
  return __awaiter(this, void 0, void 0, function () {
280
- var _a, username, refreshToken, options, response;
277
+ var _a, username, refreshToken, options, accessToken;
281
278
  return __generator(this, function (_b) {
282
279
  switch (_b.label) {
283
280
  case 0:
284
281
  _a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
285
282
  if (!username || !refreshToken) {
286
- throw new Error('Failed to refresh token.');
283
+ return [2 /*return*/, ''];
287
284
  }
288
285
  options = {
289
286
  method: 'POST',
@@ -297,8 +294,8 @@ var BaseAPI = /** @class */ (function () {
297
294
  };
298
295
  return [4 /*yield*/, axios_1.default.request(options)];
299
296
  case 1:
300
- response = _b.sent();
301
- return [2 /*return*/, response.data];
297
+ accessToken = (_b.sent()).data.accessToken;
298
+ return [2 /*return*/, accessToken];
302
299
  }
303
300
  });
304
301
  });
@@ -318,27 +315,26 @@ var BaseAPI = /** @class */ (function () {
318
315
  axios.interceptors.response.use(function (res) {
319
316
  return res;
320
317
  }, 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) {
318
+ var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
319
+ return __generator(this, function (_a) {
320
+ switch (_a.label) {
324
321
  case 0:
325
322
  originalConfig = err.config;
326
323
  if (!err.response) return [3 /*break*/, 5];
327
324
  if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
328
325
  originalConfig._retry = true;
329
- _c.label = 1;
326
+ _a.label = 1;
330
327
  case 1:
331
- _c.trys.push([1, 3, , 4]);
328
+ _a.trys.push([1, 3, , 4]);
332
329
  return [4 /*yield*/, this.refreshTokenInternal()];
333
330
  case 2:
334
- _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
331
+ tokenString = _a.sent();
335
332
  accessToken = "Bearer ".concat(tokenString);
336
- this.permissions = permissions;
337
333
  originalConfig.headers['Authorization'] = "Bearer ".concat(accessToken);
338
334
  this.configuration.accessToken = accessToken;
339
335
  return [2 /*return*/, axios.request(originalConfig)];
340
336
  case 3:
341
- _error_1 = _c.sent();
337
+ _error_1 = _a.sent();
342
338
  if (_error_1.response && _error_1.response.data) {
343
339
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
344
340
  }
@@ -354,20 +350,19 @@ var BaseAPI = /** @class */ (function () {
354
350
  && originalConfig.headers.hasOwnProperty('Authorization')
355
351
  && _retry_count < 4)) return [3 /*break*/, 9];
356
352
  _retry_count++;
357
- _c.label = 6;
353
+ _a.label = 6;
358
354
  case 6:
359
- _c.trys.push([6, 8, , 9]);
355
+ _a.trys.push([6, 8, , 9]);
360
356
  return [4 /*yield*/, this.refreshTokenInternal()];
361
357
  case 7:
362
- _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
358
+ tokenString = _a.sent();
363
359
  accessToken = "Bearer ".concat(tokenString);
364
- this.permissions = permissions;
365
360
  _retry = true;
366
361
  originalConfig.headers['Authorization'] = accessToken;
367
362
  this.configuration.accessToken = accessToken;
368
363
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
369
364
  case 8:
370
- _error_2 = _c.sent();
365
+ _error_2 = _a.sent();
371
366
  if (_error_2.response && _error_2.response.data) {
372
367
  return [2 /*return*/, Promise.reject(_error_2.response.data)];
373
368
  }
@@ -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
+ }
@@ -0,0 +1,30 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateTenantDbConfigRequestDto
16
+ */
17
+ export interface CreateTenantDbConfigRequestDto {
18
+ /**
19
+ * Tenant Slug
20
+ * @type {string}
21
+ * @memberof CreateTenantDbConfigRequestDto
22
+ */
23
+ 'tenantSlug': string;
24
+ /**
25
+ * Tenant DB Config
26
+ * @type {object}
27
+ * @memberof CreateTenantDbConfigRequestDto
28
+ */
29
+ 'config': object;
30
+ }
@@ -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,7 @@ 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
+ export * from './create-tenant-db-config-request-dto';
13
14
  export * from './create-tenant-request-dto';
14
15
  export * from './custom-field-dto';
15
16
  export * from './custom-schema-class';
@@ -39,10 +40,10 @@ export * from './initial-tenant-config-class';
39
40
  export * from './inline-response200';
40
41
  export * from './inline-response503';
41
42
  export * from './invite-class';
42
- export * from './invite-org-request-dto';
43
- export * from './invite-user-request-dto';
43
+ export * from './invite-org-request-dto-rest';
44
+ export * from './invite-user-request-dto-rest';
44
45
  export * from './invite-user-response-class';
45
- export * from './invite-users-request-dto';
46
+ export * from './invite-users-request-dto-rest';
46
47
  export * from './invite-users-response-class';
47
48
  export * from './link-user-with-partner-request-dto-rest';
48
49
  export * from './link-user-with-partner-response-class';
@@ -58,7 +59,6 @@ export * from './list-users-response-class';
58
59
  export * from './org-invitation-class';
59
60
  export * from './org-invitation-response-class';
60
61
  export * from './organization-class';
61
- export * from './partner-invitation-data-dto';
62
62
  export * from './permission-class';
63
63
  export * from './re-invite-org-request-dto';
64
64
  export * from './role-class';
@@ -78,5 +78,4 @@ export * from './update-data-report-request-dto';
78
78
  export * from './update-data-report-response-class';
79
79
  export * from './update-organization-request-dto-rest';
80
80
  export * from './update-organization-response-class';
81
- export * from './update-role-request-dto';
82
81
  export * from './user-class';