@emilgroup/auth-sdk 1.21.0 → 1.21.1-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +1 -1
- package/README.md +2 -2
- package/api/{health-api.ts → default-api.ts} +13 -13
- package/api.ts +2 -2
- package/base.ts +9 -5
- package/dist/api/authservice-api.d.ts +12 -12
- package/dist/api/{health-api.d.ts → default-api.d.ts} +11 -11
- package/dist/api/{health-api.js → default-api.js} +22 -22
- package/dist/api/workspaces-api.d.ts +2 -2
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +6 -3
- package/dist/common.d.ts +1 -1
- package/package.json +2 -2
package/.openapi-generator/FILES
CHANGED
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@1.21.
|
|
20
|
+
npm install @emilgroup/auth-sdk@1.21.1-beta.25 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/auth-sdk@1.21.
|
|
24
|
+
yarn add @emilgroup/auth-sdk@1.21.1-beta.25
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import ``.
|
|
@@ -25,10 +25,10 @@ import { InlineResponse200 } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { InlineResponse503 } from '../models';
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* DefaultApi - axios parameter creator
|
|
29
29
|
* @export
|
|
30
30
|
*/
|
|
31
|
-
export const
|
|
31
|
+
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
32
|
return {
|
|
33
33
|
/**
|
|
34
34
|
* 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.
|
|
@@ -66,11 +66,11 @@ export const HealthApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* DefaultApi - functional programming interface
|
|
70
70
|
* @export
|
|
71
71
|
*/
|
|
72
|
-
export const
|
|
73
|
-
const localVarAxiosParamCreator =
|
|
72
|
+
export const DefaultApiFp = function(configuration?: Configuration) {
|
|
73
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
|
|
74
74
|
return {
|
|
75
75
|
/**
|
|
76
76
|
* 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.
|
|
@@ -86,11 +86,11 @@ export const HealthApiFp = function(configuration?: Configuration) {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* DefaultApi - factory interface
|
|
90
90
|
* @export
|
|
91
91
|
*/
|
|
92
|
-
export const
|
|
93
|
-
const localVarFp =
|
|
92
|
+
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
93
|
+
const localVarFp = DefaultApiFp(configuration)
|
|
94
94
|
return {
|
|
95
95
|
/**
|
|
96
96
|
* 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.
|
|
@@ -105,20 +105,20 @@ export const HealthApiFactory = function (configuration?: Configuration, basePat
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* DefaultApi - object-oriented interface
|
|
109
109
|
* @export
|
|
110
|
-
* @class
|
|
110
|
+
* @class DefaultApi
|
|
111
111
|
* @extends {BaseAPI}
|
|
112
112
|
*/
|
|
113
|
-
export class
|
|
113
|
+
export class DefaultApi extends BaseAPI {
|
|
114
114
|
/**
|
|
115
115
|
* 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.
|
|
116
116
|
* @summary Health Check
|
|
117
117
|
* @param {*} [options] Override http request option.
|
|
118
118
|
* @throws {RequiredError}
|
|
119
|
-
* @memberof
|
|
119
|
+
* @memberof DefaultApi
|
|
120
120
|
*/
|
|
121
121
|
public check(options?: AxiosRequestConfig) {
|
|
122
|
-
return
|
|
122
|
+
return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
|
|
123
123
|
}
|
|
124
124
|
}
|
package/api.ts
CHANGED
|
@@ -21,11 +21,11 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
|
23
23
|
import { AuthserviceApi } from './api';
|
|
24
|
-
import {
|
|
24
|
+
import { DefaultApi } from './api';
|
|
25
25
|
import { WorkspacesApi } from './api';
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
export * from './api/authservice-api';
|
|
29
|
-
export * from './api/
|
|
29
|
+
export * from './api/default-api';
|
|
30
30
|
export * from './api/workspaces-api';
|
|
31
31
|
|
package/base.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface LoginClass {
|
|
|
37
37
|
permissions: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
|
|
40
41
|
export enum Environment {
|
|
41
42
|
Production = 'https://apiv2.emil.de',
|
|
42
43
|
Test = 'https://apiv2-test.emil.de',
|
|
@@ -87,9 +88,14 @@ export class BaseAPI {
|
|
|
87
88
|
this.loadTokenData();
|
|
88
89
|
|
|
89
90
|
if (configuration) {
|
|
91
|
+
const { accessToken } = this.tokenData;
|
|
90
92
|
this.configuration = configuration;
|
|
91
93
|
this.basePath = configuration.basePath || this.basePath;
|
|
92
|
-
|
|
94
|
+
|
|
95
|
+
// Use config token if provided, otherwise use tokenData token
|
|
96
|
+
const configToken = this.configuration.accessToken;
|
|
97
|
+
const storedToken = accessToken ? `Bearer ${accessToken}` : '';
|
|
98
|
+
this.configuration.accessToken = configToken || storedToken;
|
|
93
99
|
} else {
|
|
94
100
|
const { accessToken, username } = this.tokenData;
|
|
95
101
|
|
|
@@ -119,7 +125,7 @@ export class BaseAPI {
|
|
|
119
125
|
return this.tokenData.permissions.split(',');
|
|
120
126
|
}
|
|
121
127
|
|
|
122
|
-
async authorize(username: string, password: string): Promise<void> {
|
|
128
|
+
async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
|
|
123
129
|
const options: AxiosRequestConfig = {
|
|
124
130
|
method: 'POST',
|
|
125
131
|
url: `${this.configuration.basePath}/authservice/v1/login`,
|
|
@@ -141,11 +147,9 @@ export class BaseAPI {
|
|
|
141
147
|
this.tokenData.accessToken = accessToken;
|
|
142
148
|
this.tokenData.permissions = permissions;
|
|
143
149
|
|
|
144
|
-
this.storeTokenData({
|
|
145
|
-
...this.tokenData
|
|
146
|
-
});
|
|
147
150
|
}
|
|
148
151
|
|
|
152
|
+
|
|
149
153
|
async refreshTokenInternal(): Promise<LoginClass> {
|
|
150
154
|
const { username } = this.configuration;
|
|
151
155
|
|
|
@@ -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
|
-
*
|
|
17
|
+
* DefaultApi - axios parameter creator
|
|
18
18
|
* @export
|
|
19
19
|
*/
|
|
20
|
-
export declare const
|
|
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
|
-
*
|
|
30
|
+
* DefaultApi - functional programming interface
|
|
31
31
|
* @export
|
|
32
32
|
*/
|
|
33
|
-
export declare const
|
|
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
|
-
*
|
|
43
|
+
* DefaultApi - factory interface
|
|
44
44
|
* @export
|
|
45
45
|
*/
|
|
46
|
-
export declare const
|
|
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
|
-
*
|
|
56
|
+
* DefaultApi - object-oriented interface
|
|
57
57
|
* @export
|
|
58
|
-
* @class
|
|
58
|
+
* @class DefaultApi
|
|
59
59
|
* @extends {BaseAPI}
|
|
60
60
|
*/
|
|
61
|
-
export declare class
|
|
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
|
|
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.
|
|
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
|
|
@@ -86,10 +86,10 @@ var common_1 = require("../common");
|
|
|
86
86
|
// @ts-ignore
|
|
87
87
|
var base_1 = require("../base");
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* DefaultApi - axios parameter creator
|
|
90
90
|
* @export
|
|
91
91
|
*/
|
|
92
|
-
var
|
|
92
|
+
var DefaultApiAxiosParamCreator = function (configuration) {
|
|
93
93
|
var _this = this;
|
|
94
94
|
return {
|
|
95
95
|
/**
|
|
@@ -124,13 +124,13 @@ var HealthApiAxiosParamCreator = function (configuration) {
|
|
|
124
124
|
},
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
exports.
|
|
127
|
+
exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* DefaultApi - functional programming interface
|
|
130
130
|
* @export
|
|
131
131
|
*/
|
|
132
|
-
var
|
|
133
|
-
var localVarAxiosParamCreator = (0, exports.
|
|
132
|
+
var DefaultApiFp = function (configuration) {
|
|
133
|
+
var localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
|
|
134
134
|
return {
|
|
135
135
|
/**
|
|
136
136
|
* 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.
|
|
@@ -153,13 +153,13 @@ var HealthApiFp = function (configuration) {
|
|
|
153
153
|
},
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
|
-
exports.
|
|
156
|
+
exports.DefaultApiFp = DefaultApiFp;
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
158
|
+
* DefaultApi - factory interface
|
|
159
159
|
* @export
|
|
160
160
|
*/
|
|
161
|
-
var
|
|
162
|
-
var localVarFp = (0, exports.
|
|
161
|
+
var DefaultApiFactory = function (configuration, basePath, axios) {
|
|
162
|
+
var localVarFp = (0, exports.DefaultApiFp)(configuration);
|
|
163
163
|
return {
|
|
164
164
|
/**
|
|
165
165
|
* 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.
|
|
@@ -172,16 +172,16 @@ var HealthApiFactory = function (configuration, basePath, axios) {
|
|
|
172
172
|
},
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
|
-
exports.
|
|
175
|
+
exports.DefaultApiFactory = DefaultApiFactory;
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
177
|
+
* DefaultApi - object-oriented interface
|
|
178
178
|
* @export
|
|
179
|
-
* @class
|
|
179
|
+
* @class DefaultApi
|
|
180
180
|
* @extends {BaseAPI}
|
|
181
181
|
*/
|
|
182
|
-
var
|
|
183
|
-
__extends(
|
|
184
|
-
function
|
|
182
|
+
var DefaultApi = /** @class */ (function (_super) {
|
|
183
|
+
__extends(DefaultApi, _super);
|
|
184
|
+
function DefaultApi() {
|
|
185
185
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
186
186
|
}
|
|
187
187
|
/**
|
|
@@ -189,12 +189,12 @@ var HealthApi = /** @class */ (function (_super) {
|
|
|
189
189
|
* @summary Health Check
|
|
190
190
|
* @param {*} [options] Override http request option.
|
|
191
191
|
* @throws {RequiredError}
|
|
192
|
-
* @memberof
|
|
192
|
+
* @memberof DefaultApi
|
|
193
193
|
*/
|
|
194
|
-
|
|
194
|
+
DefaultApi.prototype.check = function (options) {
|
|
195
195
|
var _this = this;
|
|
196
|
-
return (0, exports.
|
|
196
|
+
return (0, exports.DefaultApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
197
197
|
};
|
|
198
|
-
return
|
|
198
|
+
return DefaultApi;
|
|
199
199
|
}(base_1.BaseAPI));
|
|
200
|
-
exports.
|
|
200
|
+
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
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/
|
|
31
|
+
__exportStar(require("./api/default-api"), exports);
|
|
32
32
|
__exportStar(require("./api/workspaces-api"), exports);
|
package/dist/base.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare class BaseAPI {
|
|
|
57
57
|
selectEnvironment(env: Environment): void;
|
|
58
58
|
selectBasePath(path: string): void;
|
|
59
59
|
getPermissions(): Array<string>;
|
|
60
|
-
authorize(username: string, password: string): Promise<void>;
|
|
60
|
+
authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
|
|
61
61
|
refreshTokenInternal(): Promise<LoginClass>;
|
|
62
62
|
private storeTokenData;
|
|
63
63
|
loadTokenData(): void;
|
package/dist/base.js
CHANGED
|
@@ -124,9 +124,13 @@ var BaseAPI = /** @class */ (function () {
|
|
|
124
124
|
this.axios = axios;
|
|
125
125
|
this.loadTokenData();
|
|
126
126
|
if (configuration) {
|
|
127
|
+
var accessToken = this.tokenData.accessToken;
|
|
127
128
|
this.configuration = configuration;
|
|
128
129
|
this.basePath = configuration.basePath || this.basePath;
|
|
129
|
-
|
|
130
|
+
// Use config token if provided, otherwise use tokenData token
|
|
131
|
+
var configToken = this.configuration.accessToken;
|
|
132
|
+
var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
|
|
133
|
+
this.configuration.accessToken = configToken || storedToken;
|
|
130
134
|
}
|
|
131
135
|
else {
|
|
132
136
|
var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
|
|
@@ -151,7 +155,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
151
155
|
}
|
|
152
156
|
return this.tokenData.permissions.split(',');
|
|
153
157
|
};
|
|
154
|
-
BaseAPI.prototype.authorize = function (username, password) {
|
|
158
|
+
BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
|
|
155
159
|
return __awaiter(this, void 0, void 0, function () {
|
|
156
160
|
var options, response, _a, accessToken, permissions;
|
|
157
161
|
return __generator(this, function (_b) {
|
|
@@ -176,7 +180,6 @@ var BaseAPI = /** @class */ (function () {
|
|
|
176
180
|
this.tokenData.username = username;
|
|
177
181
|
this.tokenData.accessToken = accessToken;
|
|
178
182
|
this.tokenData.permissions = permissions;
|
|
179
|
-
this.storeTokenData(__assign({}, this.tokenData));
|
|
180
183
|
return [2 /*return*/];
|
|
181
184
|
}
|
|
182
185
|
});
|
package/dist/common.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export declare const toPathString: (url: URL) => string;
|
|
|
62
62
|
*
|
|
63
63
|
* @export
|
|
64
64
|
*/
|
|
65
|
-
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>;
|
|
65
|
+
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
66
|
/**
|
|
67
67
|
* EMIL AuthService
|
|
68
68
|
* The EMIL AuthService API description
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emilgroup/auth-sdk",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1-beta.25",
|
|
4
4
|
"description": "OpenAPI client for @emilgroup/auth-sdk",
|
|
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": "^
|
|
21
|
+
"axios": "^1.12.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"typescript": "^4.0"
|