@emilgroup/auth-sdk-node 1.18.0 → 1.18.1-beta.19

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.
@@ -4,7 +4,7 @@
4
4
  README.md
5
5
  api.ts
6
6
  api/authservice-api.ts
7
- api/health-api.ts
7
+ api/default-api.ts
8
8
  api/workspaces-api.ts
9
9
  base.ts
10
10
  common.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/auth-sdk-node@1.18.0 --save
20
+ npm install @emilgroup/auth-sdk-node@1.18.1-beta.19 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/auth-sdk-node@1.18.0
24
+ yarn add @emilgroup/auth-sdk-node@1.18.1-beta.19
25
25
  ```
26
26
 
27
27
  And then you can import ``.
@@ -29,10 +29,10 @@ import { InlineResponse503 } from '../models';
29
29
  import { URL, URLSearchParams } from 'url';
30
30
  const FormData = require('form-data');
31
31
  /**
32
- * HealthApi - axios parameter creator
32
+ * DefaultApi - axios parameter creator
33
33
  * @export
34
34
  */
35
- export const HealthApiAxiosParamCreator = function (configuration?: Configuration) {
35
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
36
36
  return {
37
37
  /**
38
38
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
@@ -70,11 +70,11 @@ export const HealthApiAxiosParamCreator = function (configuration?: Configuratio
70
70
  };
71
71
 
72
72
  /**
73
- * HealthApi - functional programming interface
73
+ * DefaultApi - functional programming interface
74
74
  * @export
75
75
  */
76
- export const HealthApiFp = function(configuration?: Configuration) {
77
- const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration)
76
+ export const DefaultApiFp = function(configuration?: Configuration) {
77
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
78
78
  return {
79
79
  /**
80
80
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
@@ -90,11 +90,11 @@ export const HealthApiFp = function(configuration?: Configuration) {
90
90
  };
91
91
 
92
92
  /**
93
- * HealthApi - factory interface
93
+ * DefaultApi - factory interface
94
94
  * @export
95
95
  */
96
- export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
97
- const localVarFp = HealthApiFp(configuration)
96
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
97
+ const localVarFp = DefaultApiFp(configuration)
98
98
  return {
99
99
  /**
100
100
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
@@ -109,20 +109,20 @@ export const HealthApiFactory = function (configuration?: Configuration, basePat
109
109
  };
110
110
 
111
111
  /**
112
- * HealthApi - object-oriented interface
112
+ * DefaultApi - object-oriented interface
113
113
  * @export
114
- * @class HealthApi
114
+ * @class DefaultApi
115
115
  * @extends {BaseAPI}
116
116
  */
117
- export class HealthApi extends BaseAPI {
117
+ export class DefaultApi extends BaseAPI {
118
118
  /**
119
119
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
120
120
  * @summary Health Check
121
121
  * @param {*} [options] Override http request option.
122
122
  * @throws {RequiredError}
123
- * @memberof HealthApi
123
+ * @memberof DefaultApi
124
124
  */
125
125
  public check(options?: AxiosRequestConfig) {
126
- return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
126
+ return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
127
127
  }
128
128
  }
package/api.ts CHANGED
@@ -25,11 +25,11 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
25
25
  // @ts-ignore
26
26
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
27
27
  import { AuthserviceApi } from './api';
28
- import { HealthApi } from './api';
28
+ import { DefaultApi } from './api';
29
29
  import { WorkspacesApi } from './api';
30
30
 
31
31
 
32
32
  export * from './api/authservice-api';
33
- export * from './api/health-api';
33
+ export * from './api/default-api';
34
34
  export * from './api/workspaces-api';
35
35
 
package/base.ts CHANGED
@@ -44,6 +44,7 @@ export interface LoginClass {
44
44
  permissions: string;
45
45
  }
46
46
 
47
+
47
48
  export enum Environment {
48
49
  Production = 'https://apiv2.emil.de',
49
50
  Test = 'https://apiv2-test.emil.de',
@@ -94,13 +95,13 @@ export class BaseAPI {
94
95
  this.attachInterceptor(axios);
95
96
  }
96
97
 
97
- async initialize(env: Environment = Environment.Production) {
98
+ async initialize(env: Environment = Environment.Production, targetWorkspace?: string) {
98
99
  this.configuration.basePath = env;
99
100
 
100
101
  await this.loadCredentials();
101
102
 
102
103
  if (this.username) {
103
- await this.authorize(this.username, this.password);
104
+ await this.authorize(this.username, this.password, targetWorkspace);
104
105
  this.password = null; // to avoid keeping password loaded in memory.
105
106
  }
106
107
  }
@@ -150,7 +151,7 @@ export class BaseAPI {
150
151
  this.configuration.basePath = env;
151
152
  }
152
153
 
153
- async authorize(username: string, password: string): Promise<void> {
154
+ async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
154
155
  const options: AxiosRequestConfig = {
155
156
  method: 'POST',
156
157
  url: `${this.configuration.basePath}/authservice/v1/login`,
@@ -170,6 +171,7 @@ export class BaseAPI {
170
171
 
171
172
  const refreshToken = this.extractRefreshToken(response)
172
173
  this.configuration.refreshToken = refreshToken;
174
+
173
175
  }
174
176
 
175
177
  async refreshTokenInternal(): Promise<string> {
@@ -510,7 +510,7 @@ export declare class AuthserviceApi extends BaseAPI {
510
510
  * @throws {RequiredError}
511
511
  * @memberof AuthserviceApi
512
512
  */
513
- createOrgAndUser(requestParameters: AuthserviceApiCreateOrgAndUserRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateOrgAndUserResponseClass, any>>;
513
+ createOrgAndUser(requestParameters: AuthserviceApiCreateOrgAndUserRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateOrgAndUserResponseClass, any, {}>>;
514
514
  /**
515
515
  * Register a tenant user using the invite token sent to the tenant user\'s email address.
516
516
  * @summary Register tenant user after invite
@@ -519,7 +519,7 @@ export declare class AuthserviceApi extends BaseAPI {
519
519
  * @throws {RequiredError}
520
520
  * @memberof AuthserviceApi
521
521
  */
522
- createUser(requestParameters: AuthserviceApiCreateUserRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateUserResponseClass, any>>;
522
+ createUser(requestParameters: AuthserviceApiCreateUserRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateUserResponseClass, any, {}>>;
523
523
  /**
524
524
  * Send a tenant user a reset-password token via email.
525
525
  * @summary Forgot password by tenant
@@ -528,7 +528,7 @@ export declare class AuthserviceApi extends BaseAPI {
528
528
  * @throws {RequiredError}
529
529
  * @memberof AuthserviceApi
530
530
  */
531
- forgotPassword(requestParameters: AuthserviceApiForgotPasswordRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
531
+ forgotPassword(requestParameters: AuthserviceApiForgotPasswordRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
532
532
  /**
533
533
  * Get SAML login link configured for the tenant in cognito as well as tenant settings
534
534
  * @summary Get SAML login link for tenant
@@ -537,7 +537,7 @@ export declare class AuthserviceApi extends BaseAPI {
537
537
  * @throws {RequiredError}
538
538
  * @memberof AuthserviceApi
539
539
  */
540
- getSamlLoginLink(requestParameters: AuthserviceApiGetSamlLoginLinkRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
540
+ getSamlLoginLink(requestParameters: AuthserviceApiGetSamlLoginLinkRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
541
541
  /**
542
542
  * Get new access token, refresh token after successful login.
543
543
  * @summary Login by tenant
@@ -546,7 +546,7 @@ export declare class AuthserviceApi extends BaseAPI {
546
546
  * @throws {RequiredError}
547
547
  * @memberof AuthserviceApi
548
548
  */
549
- login(requestParameters: AuthserviceApiLoginRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginClass, any>>;
549
+ login(requestParameters: AuthserviceApiLoginRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginClass, any, {}>>;
550
550
  /**
551
551
  * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
552
552
  * @summary Login by SAML idp provider such as ADFS
@@ -555,7 +555,7 @@ export declare class AuthserviceApi extends BaseAPI {
555
555
  * @throws {RequiredError}
556
556
  * @memberof AuthserviceApi
557
557
  */
558
- loginBySaml(requestParameters: AuthserviceApiLoginBySamlRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginClass, any>>;
558
+ loginBySaml(requestParameters: AuthserviceApiLoginBySamlRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginClass, any, {}>>;
559
559
  /**
560
560
  * Sign tenant user out.
561
561
  * @summary Logout tenant
@@ -564,7 +564,7 @@ export declare class AuthserviceApi extends BaseAPI {
564
564
  * @throws {RequiredError}
565
565
  * @memberof AuthserviceApi
566
566
  */
567
- logout(requestParameters: AuthserviceApiLogoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
567
+ logout(requestParameters: AuthserviceApiLogoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
568
568
  /**
569
569
  * Get new access token, new refresh token.
570
570
  * @summary Refresh token by tenant
@@ -573,7 +573,7 @@ export declare class AuthserviceApi extends BaseAPI {
573
573
  * @throws {RequiredError}
574
574
  * @memberof AuthserviceApi
575
575
  */
576
- refreshToken(requestParameters: AuthserviceApiRefreshTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginClass, any>>;
576
+ refreshToken(requestParameters: AuthserviceApiRefreshTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LoginClass, any, {}>>;
577
577
  /**
578
578
  * Change tenant user\'s password using the token provided by the reset password endpoint.
579
579
  * @summary Change password by tenant
@@ -582,7 +582,7 @@ export declare class AuthserviceApi extends BaseAPI {
582
582
  * @throws {RequiredError}
583
583
  * @memberof AuthserviceApi
584
584
  */
585
- resetPassword(requestParameters: AuthserviceApiResetPasswordRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
585
+ resetPassword(requestParameters: AuthserviceApiResetPasswordRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
586
586
  /**
587
587
  * Verify the invite sent to the tenant user via email.
588
588
  * @summary Verify tenant user\'s invite token
@@ -591,7 +591,7 @@ export declare class AuthserviceApi extends BaseAPI {
591
591
  * @throws {RequiredError}
592
592
  * @memberof AuthserviceApi
593
593
  */
594
- verifyInvite(requestParameters: AuthserviceApiVerifyInviteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
594
+ verifyInvite(requestParameters: AuthserviceApiVerifyInviteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
595
595
  /**
596
596
  * Verifies token and returns necessary data for signing up as an organization.
597
597
  * @summary Verify a organization\'s invitation token
@@ -600,7 +600,7 @@ export declare class AuthserviceApi extends BaseAPI {
600
600
  * @throws {RequiredError}
601
601
  * @memberof AuthserviceApi
602
602
  */
603
- verifyOrgInvitation(requestParameters: AuthserviceApiVerifyOrgInvitationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<VerifyOrgInvitationResponseClass, any>>;
603
+ verifyOrgInvitation(requestParameters: AuthserviceApiVerifyOrgInvitationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<VerifyOrgInvitationResponseClass, any, {}>>;
604
604
  /**
605
605
  * Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
606
606
  * @summary Verify tenant reset password token
@@ -609,5 +609,5 @@ export declare class AuthserviceApi extends BaseAPI {
609
609
  * @throws {RequiredError}
610
610
  * @memberof AuthserviceApi
611
611
  */
612
- verifyResetPasswordToken(requestParameters: AuthserviceApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
612
+ verifyResetPasswordToken(requestParameters: AuthserviceApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
613
613
  }
@@ -14,10 +14,10 @@ import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { InlineResponse200 } from '../models';
16
16
  /**
17
- * HealthApi - axios parameter creator
17
+ * DefaultApi - axios parameter creator
18
18
  * @export
19
19
  */
20
- export declare const HealthApiAxiosParamCreator: (configuration?: Configuration) => {
20
+ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
21
21
  /**
22
22
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
23
23
  * @summary Health Check
@@ -27,10 +27,10 @@ export declare const HealthApiAxiosParamCreator: (configuration?: Configuration)
27
27
  check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
28
28
  };
29
29
  /**
30
- * HealthApi - functional programming interface
30
+ * DefaultApi - functional programming interface
31
31
  * @export
32
32
  */
33
- export declare const HealthApiFp: (configuration?: Configuration) => {
33
+ export declare const DefaultApiFp: (configuration?: Configuration) => {
34
34
  /**
35
35
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
36
36
  * @summary Health Check
@@ -40,10 +40,10 @@ export declare const HealthApiFp: (configuration?: Configuration) => {
40
40
  check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
41
41
  };
42
42
  /**
43
- * HealthApi - factory interface
43
+ * DefaultApi - factory interface
44
44
  * @export
45
45
  */
46
- export declare const HealthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
46
+ export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
47
47
  /**
48
48
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
49
49
  * @summary Health Check
@@ -53,18 +53,18 @@ export declare const HealthApiFactory: (configuration?: Configuration, basePath?
53
53
  check(options?: any): AxiosPromise<InlineResponse200>;
54
54
  };
55
55
  /**
56
- * HealthApi - object-oriented interface
56
+ * DefaultApi - object-oriented interface
57
57
  * @export
58
- * @class HealthApi
58
+ * @class DefaultApi
59
59
  * @extends {BaseAPI}
60
60
  */
61
- export declare class HealthApi extends BaseAPI {
61
+ export declare class DefaultApi extends BaseAPI {
62
62
  /**
63
63
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
64
64
  * @summary Health Check
65
65
  * @param {*} [options] Override http request option.
66
66
  * @throws {RequiredError}
67
- * @memberof HealthApi
67
+ * @memberof DefaultApi
68
68
  */
69
- check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
69
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
70
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.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = void 0;
81
+ exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
82
82
  var axios_1 = __importDefault(require("axios"));
83
83
  // Some imports not used depending on template conditions
84
84
  // @ts-ignore
@@ -90,10 +90,10 @@ var base_1 = require("../base");
90
90
  var url_1 = require("url");
91
91
  var FormData = require('form-data');
92
92
  /**
93
- * HealthApi - axios parameter creator
93
+ * DefaultApi - axios parameter creator
94
94
  * @export
95
95
  */
96
- var HealthApiAxiosParamCreator = function (configuration) {
96
+ var DefaultApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
99
  /**
@@ -128,13 +128,13 @@ var HealthApiAxiosParamCreator = function (configuration) {
128
128
  },
129
129
  };
130
130
  };
131
- exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
131
+ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
132
132
  /**
133
- * HealthApi - functional programming interface
133
+ * DefaultApi - functional programming interface
134
134
  * @export
135
135
  */
136
- var HealthApiFp = function (configuration) {
137
- var localVarAxiosParamCreator = (0, exports.HealthApiAxiosParamCreator)(configuration);
136
+ var DefaultApiFp = function (configuration) {
137
+ var localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
138
138
  return {
139
139
  /**
140
140
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
@@ -157,13 +157,13 @@ var HealthApiFp = function (configuration) {
157
157
  },
158
158
  };
159
159
  };
160
- exports.HealthApiFp = HealthApiFp;
160
+ exports.DefaultApiFp = DefaultApiFp;
161
161
  /**
162
- * HealthApi - factory interface
162
+ * DefaultApi - factory interface
163
163
  * @export
164
164
  */
165
- var HealthApiFactory = function (configuration, basePath, axios) {
166
- var localVarFp = (0, exports.HealthApiFp)(configuration);
165
+ var DefaultApiFactory = function (configuration, basePath, axios) {
166
+ var localVarFp = (0, exports.DefaultApiFp)(configuration);
167
167
  return {
168
168
  /**
169
169
  * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
@@ -176,16 +176,16 @@ var HealthApiFactory = function (configuration, basePath, axios) {
176
176
  },
177
177
  };
178
178
  };
179
- exports.HealthApiFactory = HealthApiFactory;
179
+ exports.DefaultApiFactory = DefaultApiFactory;
180
180
  /**
181
- * HealthApi - object-oriented interface
181
+ * DefaultApi - object-oriented interface
182
182
  * @export
183
- * @class HealthApi
183
+ * @class DefaultApi
184
184
  * @extends {BaseAPI}
185
185
  */
186
- var HealthApi = /** @class */ (function (_super) {
187
- __extends(HealthApi, _super);
188
- function HealthApi() {
186
+ var DefaultApi = /** @class */ (function (_super) {
187
+ __extends(DefaultApi, _super);
188
+ function DefaultApi() {
189
189
  return _super !== null && _super.apply(this, arguments) || this;
190
190
  }
191
191
  /**
@@ -193,12 +193,12 @@ var HealthApi = /** @class */ (function (_super) {
193
193
  * @summary Health Check
194
194
  * @param {*} [options] Override http request option.
195
195
  * @throws {RequiredError}
196
- * @memberof HealthApi
196
+ * @memberof DefaultApi
197
197
  */
198
- HealthApi.prototype.check = function (options) {
198
+ DefaultApi.prototype.check = function (options) {
199
199
  var _this = this;
200
- return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
200
+ return (0, exports.DefaultApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
201
201
  };
202
- return HealthApi;
202
+ return DefaultApi;
203
203
  }(base_1.BaseAPI));
204
- exports.HealthApi = HealthApi;
204
+ exports.DefaultApi = DefaultApi;
@@ -140,7 +140,7 @@ export declare class WorkspacesApi extends BaseAPI {
140
140
  * @throws {RequiredError}
141
141
  * @memberof WorkspacesApi
142
142
  */
143
- listWorkspaces(requestParameters?: WorkspacesApiListWorkspacesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListWorkspacesResponseClass, any>>;
143
+ listWorkspaces(requestParameters?: WorkspacesApiListWorkspacesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListWorkspacesResponseClass, any, {}>>;
144
144
  /**
145
145
  * Switch to a different workspace and get new access and refresh tokens.
146
146
  * @summary Switch workspace
@@ -149,5 +149,5 @@ export declare class WorkspacesApi extends BaseAPI {
149
149
  * @throws {RequiredError}
150
150
  * @memberof WorkspacesApi
151
151
  */
152
- switchWorkspace(requestParameters: WorkspacesApiSwitchWorkspaceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SwitchWorkspaceResponseClass, any>>;
152
+ switchWorkspace(requestParameters: WorkspacesApiSwitchWorkspaceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SwitchWorkspaceResponseClass, any, {}>>;
153
153
  }
package/dist/api.d.ts CHANGED
@@ -10,5 +10,5 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export * from './api/authservice-api';
13
- export * from './api/health-api';
13
+ export * from './api/default-api';
14
14
  export * from './api/workspaces-api';
package/dist/api.js CHANGED
@@ -28,5 +28,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./api/authservice-api"), exports);
31
- __exportStar(require("./api/health-api"), exports);
31
+ __exportStar(require("./api/default-api"), exports);
32
32
  __exportStar(require("./api/workspaces-api"), exports);
package/dist/base.d.ts CHANGED
@@ -55,12 +55,12 @@ export declare class BaseAPI {
55
55
  private username?;
56
56
  private password?;
57
57
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
58
- initialize(env?: Environment): Promise<void>;
58
+ initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
59
59
  private loadCredentials;
60
60
  private readConfigFile;
61
61
  private readEnvVariables;
62
62
  selectEnvironment(env: Environment): void;
63
- authorize(username: string, password: string): Promise<void>;
63
+ authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
64
64
  refreshTokenInternal(): Promise<string>;
65
65
  private extractRefreshToken;
66
66
  getConfiguration(): Configuration;
package/dist/base.js CHANGED
@@ -162,7 +162,7 @@ var BaseAPI = /** @class */ (function () {
162
162
  }
163
163
  this.attachInterceptor(axios);
164
164
  }
165
- BaseAPI.prototype.initialize = function (env) {
165
+ BaseAPI.prototype.initialize = function (env, targetWorkspace) {
166
166
  if (env === void 0) { env = Environment.Production; }
167
167
  return __awaiter(this, void 0, void 0, function () {
168
168
  return __generator(this, function (_a) {
@@ -173,7 +173,7 @@ var BaseAPI = /** @class */ (function () {
173
173
  case 1:
174
174
  _a.sent();
175
175
  if (!this.username) return [3 /*break*/, 3];
176
- return [4 /*yield*/, this.authorize(this.username, this.password)];
176
+ return [4 /*yield*/, this.authorize(this.username, this.password, targetWorkspace)];
177
177
  case 2:
178
178
  _a.sent();
179
179
  this.password = null; // to avoid keeping password loaded in memory.
@@ -243,7 +243,7 @@ var BaseAPI = /** @class */ (function () {
243
243
  BaseAPI.prototype.selectEnvironment = function (env) {
244
244
  this.configuration.basePath = env;
245
245
  };
246
- BaseAPI.prototype.authorize = function (username, password) {
246
+ BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
247
247
  return __awaiter(this, void 0, void 0, function () {
248
248
  var options, response, accessToken, refreshToken;
249
249
  return __generator(this, function (_a) {
package/dist/common.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare const toPathString: (url: URL) => string;
63
63
  *
64
64
  * @export
65
65
  */
66
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
66
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
67
67
  /**
68
68
  * EMIL AuthService
69
69
  * The EMIL AuthService API description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/auth-sdk-node",
3
- "version": "1.18.0",
3
+ "version": "1.18.1-beta.19",
4
4
  "description": "OpenAPI client for @emilgroup/auth-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "prepare": "npm run build"
19
19
  },
20
20
  "dependencies": {
21
- "axios": "^0.27.2",
21
+ "axios": "^1.12.0",
22
22
  "form-data": "^4.0.0",
23
23
  "url": "^0.11.0"
24
24
  },