@emilgroup/tenant-sdk 1.19.0 → 1.21.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 (59) hide show
  1. package/.openapi-generator/FILES +6 -1
  2. package/README.md +2 -2
  3. package/api/dashboard-api.ts +99 -0
  4. package/api/{default-api.ts → health-check-api.ts} +21 -17
  5. package/api/users-api.ts +116 -0
  6. package/api.ts +2 -2
  7. package/base.ts +20 -7
  8. package/dist/api/dashboard-api.d.ts +52 -0
  9. package/dist/api/dashboard-api.js +88 -0
  10. package/dist/api/health-check-api.d.ts +70 -0
  11. package/dist/api/{default-api.js → health-check-api.js} +30 -26
  12. package/dist/api/users-api.d.ts +62 -0
  13. package/dist/api/users-api.js +95 -0
  14. package/dist/api.d.ts +1 -1
  15. package/dist/api.js +1 -1
  16. package/dist/base.d.ts +0 -1
  17. package/dist/base.js +18 -6
  18. package/dist/models/create-tenant-db-config-request-dto.d.ts +30 -0
  19. package/dist/models/create-tenant-db-config-request-dto.js +15 -0
  20. package/dist/models/custom-schema-class.d.ts +12 -0
  21. package/dist/models/data-report-class.d.ts +12 -0
  22. package/dist/models/data-report-filter-class.d.ts +12 -0
  23. package/dist/models/get-embedded-url-response-class.d.ts +24 -0
  24. package/dist/models/get-embedded-url-response-class.js +15 -0
  25. package/dist/models/index.d.ts +5 -0
  26. package/dist/models/index.js +5 -0
  27. package/dist/models/invite-class.d.ts +31 -1
  28. package/dist/models/invite-user-request-dto.d.ts +7 -0
  29. package/dist/models/link-user-with-partner-request-dto-rest.d.ts +30 -0
  30. package/dist/models/link-user-with-partner-request-dto-rest.js +15 -0
  31. package/dist/models/link-user-with-partner-response-class.d.ts +25 -0
  32. package/dist/models/link-user-with-partner-response-class.js +15 -0
  33. package/dist/models/org-invitation-class.d.ts +12 -0
  34. package/dist/models/organization-class.d.ts +12 -0
  35. package/dist/models/partner-invitation-data-dto.d.ts +36 -0
  36. package/dist/models/partner-invitation-data-dto.js +15 -0
  37. package/dist/models/permission-class.d.ts +12 -0
  38. package/dist/models/role-class.d.ts +12 -0
  39. package/dist/models/subscription-class.d.ts +12 -0
  40. package/dist/models/user-class.d.ts +19 -1
  41. package/models/create-tenant-db-config-request-dto.ts +36 -0
  42. package/models/custom-schema-class.ts +12 -0
  43. package/models/data-report-class.ts +12 -0
  44. package/models/data-report-filter-class.ts +12 -0
  45. package/models/get-embedded-url-response-class.ts +30 -0
  46. package/models/index.ts +5 -0
  47. package/models/invite-class.ts +31 -1
  48. package/models/invite-user-request-dto.ts +7 -0
  49. package/models/link-user-with-partner-request-dto-rest.ts +36 -0
  50. package/models/link-user-with-partner-response-class.ts +31 -0
  51. package/models/org-invitation-class.ts +12 -0
  52. package/models/organization-class.ts +12 -0
  53. package/models/partner-invitation-data-dto.ts +42 -0
  54. package/models/permission-class.ts +12 -0
  55. package/models/role-class.ts +12 -0
  56. package/models/subscription-class.ts +12 -0
  57. package/models/user-class.ts +19 -1
  58. package/package.json +1 -1
  59. package/dist/api/default-api.d.ts +0 -66
@@ -234,6 +234,53 @@ var DashboardApiAxiosParamCreator = function (configuration) {
234
234
  });
235
235
  });
236
236
  },
237
+ /**
238
+ *
239
+ * @param {string} providerDashboardId
240
+ * @param {string} [authorization] Bearer Token
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ getEmbeddedUrl: function (providerDashboardId, authorization, options) {
245
+ if (options === void 0) { options = {}; }
246
+ return __awaiter(_this, void 0, void 0, function () {
247
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
248
+ return __generator(this, function (_a) {
249
+ switch (_a.label) {
250
+ case 0:
251
+ // verify required parameter 'providerDashboardId' is not null or undefined
252
+ (0, common_1.assertParamExists)('getEmbeddedUrl', 'providerDashboardId', providerDashboardId);
253
+ localVarPath = "/tenantservice/v1/dashboards/{provider_dashboard_id}/embedded-url"
254
+ .replace("{".concat("provider_dashboard_id", "}"), encodeURIComponent(String(providerDashboardId)));
255
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
256
+ if (configuration) {
257
+ baseOptions = configuration.baseOptions;
258
+ baseAccessToken = configuration.accessToken;
259
+ }
260
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
261
+ localVarHeaderParameter = {};
262
+ localVarQueryParameter = {};
263
+ // authentication bearer required
264
+ // http bearer authentication required
265
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
266
+ case 1:
267
+ // authentication bearer required
268
+ // http bearer authentication required
269
+ _a.sent();
270
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
271
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
272
+ }
273
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
274
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
275
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
276
+ return [2 /*return*/, {
277
+ url: (0, common_1.toPathString)(localVarUrlObj),
278
+ options: localVarRequestOptions,
279
+ }];
280
+ }
281
+ });
282
+ });
283
+ },
237
284
  /**
238
285
  *
239
286
  * @param {string} [authorization] Bearer Token
@@ -427,6 +474,26 @@ var DashboardApiFp = function (configuration) {
427
474
  });
428
475
  });
429
476
  },
477
+ /**
478
+ *
479
+ * @param {string} providerDashboardId
480
+ * @param {string} [authorization] Bearer Token
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ getEmbeddedUrl: function (providerDashboardId, authorization, options) {
485
+ return __awaiter(this, void 0, void 0, function () {
486
+ var localVarAxiosArgs;
487
+ return __generator(this, function (_a) {
488
+ switch (_a.label) {
489
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getEmbeddedUrl(providerDashboardId, authorization, options)];
490
+ case 1:
491
+ localVarAxiosArgs = _a.sent();
492
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
493
+ }
494
+ });
495
+ });
496
+ },
430
497
  /**
431
498
  *
432
499
  * @param {string} [authorization] Bearer Token
@@ -514,6 +581,16 @@ var DashboardApiFactory = function (configuration, basePath, axios) {
514
581
  getDashboard: function (code, authorization, options) {
515
582
  return localVarFp.getDashboard(code, authorization, options).then(function (request) { return request(axios, basePath); });
516
583
  },
584
+ /**
585
+ *
586
+ * @param {string} providerDashboardId
587
+ * @param {string} [authorization] Bearer Token
588
+ * @param {*} [options] Override http request option.
589
+ * @throws {RequiredError}
590
+ */
591
+ getEmbeddedUrl: function (providerDashboardId, authorization, options) {
592
+ return localVarFp.getEmbeddedUrl(providerDashboardId, authorization, options).then(function (request) { return request(axios, basePath); });
593
+ },
517
594
  /**
518
595
  *
519
596
  * @param {string} [authorization] Bearer Token
@@ -588,6 +665,17 @@ var DashboardApi = /** @class */ (function (_super) {
588
665
  var _this = this;
589
666
  return (0, exports.DashboardApiFp)(this.configuration).getDashboard(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
590
667
  };
668
+ /**
669
+ *
670
+ * @param {DashboardApiGetEmbeddedUrlRequest} requestParameters Request parameters.
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ * @memberof DashboardApi
674
+ */
675
+ DashboardApi.prototype.getEmbeddedUrl = function (requestParameters, options) {
676
+ var _this = this;
677
+ return (0, exports.DashboardApiFp)(this.configuration).getEmbeddedUrl(requestParameters.providerDashboardId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
678
+ };
591
679
  /**
592
680
  *
593
681
  * @param {DashboardApiListDashboardsRequest} requestParameters Request parameters.
@@ -0,0 +1,70 @@
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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { InlineResponse200 } from '../models';
16
+ /**
17
+ * HealthCheckApi - axios parameter creator
18
+ * @export
19
+ */
20
+ export declare const HealthCheckApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
23
+ * @summary Health Check
24
+ * @param {*} [options] Override http request option.
25
+ * @throws {RequiredError}
26
+ */
27
+ check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
28
+ };
29
+ /**
30
+ * HealthCheckApi - functional programming interface
31
+ * @export
32
+ */
33
+ export declare const HealthCheckApiFp: (configuration?: Configuration) => {
34
+ /**
35
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
36
+ * @summary Health Check
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
41
+ };
42
+ /**
43
+ * HealthCheckApi - factory interface
44
+ * @export
45
+ */
46
+ export declare const HealthCheckApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
47
+ /**
48
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
49
+ * @summary Health Check
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ check(options?: any): AxiosPromise<InlineResponse200>;
54
+ };
55
+ /**
56
+ * HealthCheckApi - object-oriented interface
57
+ * @export
58
+ * @class HealthCheckApi
59
+ * @extends {BaseAPI}
60
+ */
61
+ export declare class HealthCheckApi extends BaseAPI {
62
+ /**
63
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
64
+ * @summary Health Check
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ * @memberof HealthCheckApi
68
+ */
69
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
70
+ }
@@ -78,7 +78,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
78
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
79
79
  };
80
80
  Object.defineProperty(exports, "__esModule", { value: true });
81
- exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
81
+ exports.HealthCheckApi = exports.HealthCheckApiFactory = exports.HealthCheckApiFp = exports.HealthCheckApiAxiosParamCreator = void 0;
82
82
  var axios_1 = __importDefault(require("axios"));
83
83
  // Some imports not used depending on template conditions
84
84
  // @ts-ignore
@@ -86,14 +86,15 @@ var common_1 = require("../common");
86
86
  // @ts-ignore
87
87
  var base_1 = require("../base");
88
88
  /**
89
- * DefaultApi - axios parameter creator
89
+ * HealthCheckApi - axios parameter creator
90
90
  * @export
91
91
  */
92
- var DefaultApiAxiosParamCreator = function (configuration) {
92
+ var HealthCheckApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
95
  /**
96
- *
96
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
97
+ * @summary Health Check
97
98
  * @param {*} [options] Override http request option.
98
99
  * @throws {RequiredError}
99
100
  */
@@ -123,16 +124,17 @@ var DefaultApiAxiosParamCreator = function (configuration) {
123
124
  },
124
125
  };
125
126
  };
126
- exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
127
+ exports.HealthCheckApiAxiosParamCreator = HealthCheckApiAxiosParamCreator;
127
128
  /**
128
- * DefaultApi - functional programming interface
129
+ * HealthCheckApi - functional programming interface
129
130
  * @export
130
131
  */
131
- var DefaultApiFp = function (configuration) {
132
- var localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
132
+ var HealthCheckApiFp = function (configuration) {
133
+ var localVarAxiosParamCreator = (0, exports.HealthCheckApiAxiosParamCreator)(configuration);
133
134
  return {
134
135
  /**
135
- *
136
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
137
+ * @summary Health Check
136
138
  * @param {*} [options] Override http request option.
137
139
  * @throws {RequiredError}
138
140
  */
@@ -151,16 +153,17 @@ var DefaultApiFp = function (configuration) {
151
153
  },
152
154
  };
153
155
  };
154
- exports.DefaultApiFp = DefaultApiFp;
156
+ exports.HealthCheckApiFp = HealthCheckApiFp;
155
157
  /**
156
- * DefaultApi - factory interface
158
+ * HealthCheckApi - factory interface
157
159
  * @export
158
160
  */
159
- var DefaultApiFactory = function (configuration, basePath, axios) {
160
- var localVarFp = (0, exports.DefaultApiFp)(configuration);
161
+ var HealthCheckApiFactory = function (configuration, basePath, axios) {
162
+ var localVarFp = (0, exports.HealthCheckApiFp)(configuration);
161
163
  return {
162
164
  /**
163
- *
165
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
166
+ * @summary Health Check
164
167
  * @param {*} [options] Override http request option.
165
168
  * @throws {RequiredError}
166
169
  */
@@ -169,28 +172,29 @@ var DefaultApiFactory = function (configuration, basePath, axios) {
169
172
  },
170
173
  };
171
174
  };
172
- exports.DefaultApiFactory = DefaultApiFactory;
175
+ exports.HealthCheckApiFactory = HealthCheckApiFactory;
173
176
  /**
174
- * DefaultApi - object-oriented interface
177
+ * HealthCheckApi - object-oriented interface
175
178
  * @export
176
- * @class DefaultApi
179
+ * @class HealthCheckApi
177
180
  * @extends {BaseAPI}
178
181
  */
179
- var DefaultApi = /** @class */ (function (_super) {
180
- __extends(DefaultApi, _super);
181
- function DefaultApi() {
182
+ var HealthCheckApi = /** @class */ (function (_super) {
183
+ __extends(HealthCheckApi, _super);
184
+ function HealthCheckApi() {
182
185
  return _super !== null && _super.apply(this, arguments) || this;
183
186
  }
184
187
  /**
185
- *
188
+ * Returns the health status of the tenant service. This endpoint is used to monitor the operational status of the tenant service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
189
+ * @summary Health Check
186
190
  * @param {*} [options] Override http request option.
187
191
  * @throws {RequiredError}
188
- * @memberof DefaultApi
192
+ * @memberof HealthCheckApi
189
193
  */
190
- DefaultApi.prototype.check = function (options) {
194
+ HealthCheckApi.prototype.check = function (options) {
191
195
  var _this = this;
192
- return (0, exports.DefaultApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
196
+ return (0, exports.HealthCheckApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
193
197
  };
194
- return DefaultApi;
198
+ return HealthCheckApi;
195
199
  }(base_1.BaseAPI));
196
- exports.DefaultApi = DefaultApi;
200
+ exports.HealthCheckApi = HealthCheckApi;
@@ -24,6 +24,8 @@ import { EnableUserResponseClass } from '../models';
24
24
  import { EnableUsersRequestDto } from '../models';
25
25
  import { EnableUsersResponseClass } from '../models';
26
26
  import { GetUserResponseClass } from '../models';
27
+ import { LinkUserWithPartnerRequestDtoRest } from '../models';
28
+ import { LinkUserWithPartnerResponseClass } from '../models';
27
29
  import { ListUsersResponseClass } from '../models';
28
30
  /**
29
31
  * UsersApi - axios parameter creator
@@ -97,6 +99,15 @@ export declare const UsersApiAxiosParamCreator: (configuration?: Configuration)
97
99
  * @throws {RequiredError}
98
100
  */
99
101
  getUser: (code: string, code2: string, authorization?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
102
+ /**
103
+ *
104
+ * @param {string} code Unique identifier for the object.
105
+ * @param {LinkUserWithPartnerRequestDtoRest} linkUserWithPartnerRequestDtoRest
106
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
107
+ * @param {*} [options] Override http request option.
108
+ * @throws {RequiredError}
109
+ */
110
+ linkUserWithPartner: (code: string, linkUserWithPartnerRequestDtoRest: LinkUserWithPartnerRequestDtoRest, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
100
111
  /**
101
112
  * 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.
102
113
  * @summary List users
@@ -185,6 +196,15 @@ export declare const UsersApiFp: (configuration?: Configuration) => {
185
196
  * @throws {RequiredError}
186
197
  */
187
198
  getUser(code: string, code2: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetUserResponseClass>>;
199
+ /**
200
+ *
201
+ * @param {string} code Unique identifier for the object.
202
+ * @param {LinkUserWithPartnerRequestDtoRest} linkUserWithPartnerRequestDtoRest
203
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ */
207
+ linkUserWithPartner(code: string, linkUserWithPartnerRequestDtoRest: LinkUserWithPartnerRequestDtoRest, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LinkUserWithPartnerResponseClass>>;
188
208
  /**
189
209
  * 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.
190
210
  * @summary List users
@@ -273,6 +293,15 @@ export declare const UsersApiFactory: (configuration?: Configuration, basePath?:
273
293
  * @throws {RequiredError}
274
294
  */
275
295
  getUser(code: string, code2: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetUserResponseClass>;
296
+ /**
297
+ *
298
+ * @param {string} code Unique identifier for the object.
299
+ * @param {LinkUserWithPartnerRequestDtoRest} linkUserWithPartnerRequestDtoRest
300
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
301
+ * @param {*} [options] Override http request option.
302
+ * @throws {RequiredError}
303
+ */
304
+ linkUserWithPartner(code: string, linkUserWithPartnerRequestDtoRest: LinkUserWithPartnerRequestDtoRest, authorization?: string, options?: any): AxiosPromise<LinkUserWithPartnerResponseClass>;
276
305
  /**
277
306
  * 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.
278
307
  * @summary List users
@@ -459,6 +488,31 @@ export interface UsersApiGetUserRequest {
459
488
  */
460
489
  readonly expand?: string;
461
490
  }
491
+ /**
492
+ * Request parameters for linkUserWithPartner operation in UsersApi.
493
+ * @export
494
+ * @interface UsersApiLinkUserWithPartnerRequest
495
+ */
496
+ export interface UsersApiLinkUserWithPartnerRequest {
497
+ /**
498
+ * Unique identifier for the object.
499
+ * @type {string}
500
+ * @memberof UsersApiLinkUserWithPartner
501
+ */
502
+ readonly code: string;
503
+ /**
504
+ *
505
+ * @type {LinkUserWithPartnerRequestDtoRest}
506
+ * @memberof UsersApiLinkUserWithPartner
507
+ */
508
+ readonly linkUserWithPartnerRequestDtoRest: LinkUserWithPartnerRequestDtoRest;
509
+ /**
510
+ * Bearer Token: provided by the login endpoint under the name accessToken.
511
+ * @type {string}
512
+ * @memberof UsersApiLinkUserWithPartner
513
+ */
514
+ readonly authorization?: string;
515
+ }
462
516
  /**
463
517
  * Request parameters for listUsers operation in UsersApi.
464
518
  * @export
@@ -585,6 +639,14 @@ export declare class UsersApi extends BaseAPI {
585
639
  * @memberof UsersApi
586
640
  */
587
641
  getUser(requestParameters: UsersApiGetUserRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetUserResponseClass, any>>;
642
+ /**
643
+ *
644
+ * @param {UsersApiLinkUserWithPartnerRequest} requestParameters Request parameters.
645
+ * @param {*} [options] Override http request option.
646
+ * @throws {RequiredError}
647
+ * @memberof UsersApi
648
+ */
649
+ linkUserWithPartner(requestParameters: UsersApiLinkUserWithPartnerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LinkUserWithPartnerResponseClass, any>>;
588
650
  /**
589
651
  * 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.
590
652
  * @summary List users
@@ -486,6 +486,58 @@ var UsersApiAxiosParamCreator = function (configuration) {
486
486
  });
487
487
  });
488
488
  },
489
+ /**
490
+ *
491
+ * @param {string} code Unique identifier for the object.
492
+ * @param {LinkUserWithPartnerRequestDtoRest} linkUserWithPartnerRequestDtoRest
493
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ linkUserWithPartner: function (code, linkUserWithPartnerRequestDtoRest, authorization, options) {
498
+ if (options === void 0) { options = {}; }
499
+ return __awaiter(_this, void 0, void 0, function () {
500
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
501
+ return __generator(this, function (_a) {
502
+ switch (_a.label) {
503
+ case 0:
504
+ // verify required parameter 'code' is not null or undefined
505
+ (0, common_1.assertParamExists)('linkUserWithPartner', 'code', code);
506
+ // verify required parameter 'linkUserWithPartnerRequestDtoRest' is not null or undefined
507
+ (0, common_1.assertParamExists)('linkUserWithPartner', 'linkUserWithPartnerRequestDtoRest', linkUserWithPartnerRequestDtoRest);
508
+ localVarPath = "/tenantservice/v1/users/{code}/link-partner"
509
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
510
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
511
+ if (configuration) {
512
+ baseOptions = configuration.baseOptions;
513
+ baseAccessToken = configuration.accessToken;
514
+ }
515
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
516
+ localVarHeaderParameter = {};
517
+ localVarQueryParameter = {};
518
+ // authentication bearer required
519
+ // http bearer authentication required
520
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
521
+ case 1:
522
+ // authentication bearer required
523
+ // http bearer authentication required
524
+ _a.sent();
525
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
526
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
527
+ }
528
+ localVarHeaderParameter['Content-Type'] = 'application/json';
529
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
530
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
531
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
532
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(linkUserWithPartnerRequestDtoRest, localVarRequestOptions, configuration);
533
+ return [2 /*return*/, {
534
+ url: (0, common_1.toPathString)(localVarUrlObj),
535
+ options: localVarRequestOptions,
536
+ }];
537
+ }
538
+ });
539
+ });
540
+ },
489
541
  /**
490
542
  * 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.
491
543
  * @summary List users
@@ -731,6 +783,27 @@ var UsersApiFp = function (configuration) {
731
783
  });
732
784
  });
733
785
  },
786
+ /**
787
+ *
788
+ * @param {string} code Unique identifier for the object.
789
+ * @param {LinkUserWithPartnerRequestDtoRest} linkUserWithPartnerRequestDtoRest
790
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
791
+ * @param {*} [options] Override http request option.
792
+ * @throws {RequiredError}
793
+ */
794
+ linkUserWithPartner: function (code, linkUserWithPartnerRequestDtoRest, authorization, options) {
795
+ return __awaiter(this, void 0, void 0, function () {
796
+ var localVarAxiosArgs;
797
+ return __generator(this, function (_a) {
798
+ switch (_a.label) {
799
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.linkUserWithPartner(code, linkUserWithPartnerRequestDtoRest, authorization, options)];
800
+ case 1:
801
+ localVarAxiosArgs = _a.sent();
802
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
803
+ }
804
+ });
805
+ });
806
+ },
734
807
  /**
735
808
  * 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.
736
809
  * @summary List users
@@ -851,6 +924,17 @@ var UsersApiFactory = function (configuration, basePath, axios) {
851
924
  getUser: function (code, code2, authorization, expand, options) {
852
925
  return localVarFp.getUser(code, code2, authorization, expand, options).then(function (request) { return request(axios, basePath); });
853
926
  },
927
+ /**
928
+ *
929
+ * @param {string} code Unique identifier for the object.
930
+ * @param {LinkUserWithPartnerRequestDtoRest} linkUserWithPartnerRequestDtoRest
931
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
932
+ * @param {*} [options] Override http request option.
933
+ * @throws {RequiredError}
934
+ */
935
+ linkUserWithPartner: function (code, linkUserWithPartnerRequestDtoRest, authorization, options) {
936
+ return localVarFp.linkUserWithPartner(code, linkUserWithPartnerRequestDtoRest, authorization, options).then(function (request) { return request(axios, basePath); });
937
+ },
854
938
  /**
855
939
  * 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.
856
940
  * @summary List users
@@ -970,6 +1054,17 @@ var UsersApi = /** @class */ (function (_super) {
970
1054
  var _this = this;
971
1055
  return (0, exports.UsersApiFp)(this.configuration).getUser(requestParameters.code, requestParameters.code2, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
972
1056
  };
1057
+ /**
1058
+ *
1059
+ * @param {UsersApiLinkUserWithPartnerRequest} requestParameters Request parameters.
1060
+ * @param {*} [options] Override http request option.
1061
+ * @throws {RequiredError}
1062
+ * @memberof UsersApi
1063
+ */
1064
+ UsersApi.prototype.linkUserWithPartner = function (requestParameters, options) {
1065
+ var _this = this;
1066
+ return (0, exports.UsersApiFp)(this.configuration).linkUserWithPartner(requestParameters.code, requestParameters.linkUserWithPartnerRequestDtoRest, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1067
+ };
973
1068
  /**
974
1069
  * 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.
975
1070
  * @summary List users
package/dist/api.d.ts CHANGED
@@ -14,8 +14,8 @@ export * from './api/dashboard-api';
14
14
  export * from './api/dashboard-group-api';
15
15
  export * from './api/data-report-api';
16
16
  export * from './api/data-report-executor-api';
17
- export * from './api/default-api';
18
17
  export * from './api/delete-organization-invitations-api';
18
+ export * from './api/health-check-api';
19
19
  export * from './api/invite-organizations-api';
20
20
  export * from './api/invite-users-api';
21
21
  export * from './api/list-organization-invitations-api';
package/dist/api.js CHANGED
@@ -32,8 +32,8 @@ __exportStar(require("./api/dashboard-api"), exports);
32
32
  __exportStar(require("./api/dashboard-group-api"), exports);
33
33
  __exportStar(require("./api/data-report-api"), exports);
34
34
  __exportStar(require("./api/data-report-executor-api"), exports);
35
- __exportStar(require("./api/default-api"), exports);
36
35
  __exportStar(require("./api/delete-organization-invitations-api"), exports);
36
+ __exportStar(require("./api/health-check-api"), exports);
37
37
  __exportStar(require("./api/invite-organizations-api"), exports);
38
38
  __exportStar(require("./api/invite-users-api"), exports);
39
39
  __exportStar(require("./api/list-organization-invitations-api"), exports);
package/dist/base.d.ts CHANGED
@@ -52,7 +52,6 @@ export declare class BaseAPI {
52
52
  protected axios: AxiosInstance;
53
53
  protected configuration: Configuration | undefined;
54
54
  private tokenData?;
55
- private permissions?;
56
55
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
57
56
  selectEnvironment(env: Environment): void;
58
57
  selectBasePath(path: string): void;
package/dist/base.js CHANGED
@@ -144,7 +144,11 @@ var BaseAPI = /** @class */ (function () {
144
144
  this.configuration.basePath = path;
145
145
  };
146
146
  BaseAPI.prototype.getPermissions = function () {
147
- return this.permissions.split(',');
147
+ var _a;
148
+ if (!((_a = this.tokenData) === null || _a === void 0 ? void 0 : _a.permissions)) {
149
+ return [];
150
+ }
151
+ return this.tokenData.permissions.split(',');
148
152
  };
149
153
  BaseAPI.prototype.authorize = function (username, password) {
150
154
  return __awaiter(this, void 0, void 0, function () {
@@ -170,7 +174,7 @@ var BaseAPI = /** @class */ (function () {
170
174
  this.configuration.accessToken = "Bearer ".concat(accessToken);
171
175
  this.tokenData.username = username;
172
176
  this.tokenData.accessToken = accessToken;
173
- this.permissions = permissions;
177
+ this.tokenData.permissions = permissions;
174
178
  this.storeTokenData(__assign({}, this.tokenData));
175
179
  return [2 /*return*/];
176
180
  }
@@ -179,7 +183,8 @@ var BaseAPI = /** @class */ (function () {
179
183
  };
180
184
  BaseAPI.prototype.refreshTokenInternal = function () {
181
185
  return __awaiter(this, void 0, void 0, function () {
182
- var username, options, response;
186
+ var username, refreshTokenAxios, options, response;
187
+ var _this = this;
183
188
  return __generator(this, function (_a) {
184
189
  switch (_a.label) {
185
190
  case 0:
@@ -187,6 +192,13 @@ var BaseAPI = /** @class */ (function () {
187
192
  if (!username) {
188
193
  throw new Error('Failed to refresh token.');
189
194
  }
195
+ refreshTokenAxios = axios_1.default.create();
196
+ refreshTokenAxios.interceptors.response.use(function (response) {
197
+ var permissions = response.data.permissions;
198
+ _this.tokenData.permissions = permissions;
199
+ _this.storeTokenData(_this.tokenData);
200
+ return response;
201
+ });
190
202
  options = {
191
203
  method: 'POST',
192
204
  url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
@@ -196,7 +208,7 @@ var BaseAPI = /** @class */ (function () {
196
208
  data: { username: username },
197
209
  withCredentials: true,
198
210
  };
199
- return [4 /*yield*/, axios_1.default.request(options)];
211
+ return [4 /*yield*/, refreshTokenAxios.request(options)];
200
212
  case 1:
201
213
  response = _a.sent();
202
214
  return [2 /*return*/, response.data];
@@ -241,7 +253,7 @@ var BaseAPI = /** @class */ (function () {
241
253
  case 2:
242
254
  _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
243
255
  accessToken = "Bearer ".concat(tokenString);
244
- this.permissions = permissions;
256
+ this.tokenData.permissions = permissions;
245
257
  delete originalConfig.headers['Authorization'];
246
258
  originalConfig.headers['Authorization'] = accessToken;
247
259
  this.configuration.accessToken = accessToken;
@@ -267,7 +279,7 @@ var BaseAPI = /** @class */ (function () {
267
279
  case 7:
268
280
  _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
269
281
  accessToken = "Bearer ".concat(tokenString);
270
- this.permissions = permissions;
282
+ this.tokenData.permissions = permissions;
271
283
  _retry = true;
272
284
  originalConfig.headers['Authorization'] = accessToken;
273
285
  this.configuration.accessToken = accessToken;