@emilgroup/auth-sdk 1.5.0 → 1.10.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 (69) hide show
  1. package/.openapi-generator/FILES +2 -2
  2. package/README.md +2 -2
  3. package/api/authservice-api.ts +29 -29
  4. package/api/default-api.ts +8 -4
  5. package/base.ts +1 -0
  6. package/dist/api/authservice-api.d.ts +613 -0
  7. package/dist/api/authservice-api.js +1065 -0
  8. package/dist/api/default-api.d.ts +70 -0
  9. package/dist/api/default-api.js +200 -0
  10. package/dist/api.d.ts +13 -0
  11. package/dist/api.js +31 -0
  12. package/dist/base.d.ts +74 -0
  13. package/dist/base.js +299 -0
  14. package/dist/common.d.ts +91 -0
  15. package/dist/common.js +276 -0
  16. package/dist/configuration.d.ts +83 -0
  17. package/dist/configuration.js +44 -0
  18. package/dist/index.d.ts +15 -0
  19. package/dist/index.js +36 -0
  20. package/dist/models/create-org-and-user-request-dto.d.ts +84 -0
  21. package/dist/models/create-org-and-user-request-dto.js +15 -0
  22. package/dist/models/create-org-and-user-response-class.d.ts +32 -0
  23. package/dist/models/create-org-and-user-response-class.js +15 -0
  24. package/dist/models/create-user-request-dto.d.ts +54 -0
  25. package/dist/models/create-user-request-dto.js +15 -0
  26. package/dist/models/create-user-response-class.d.ts +25 -0
  27. package/dist/models/create-user-response-class.js +15 -0
  28. package/dist/models/custom-schema-class.d.ts +66 -0
  29. package/dist/models/custom-schema-class.js +15 -0
  30. package/dist/models/forgot-password-request-dto.d.ts +24 -0
  31. package/dist/models/forgot-password-request-dto.js +15 -0
  32. package/dist/models/get-saml-login-link-request-dto.d.ts +24 -0
  33. package/dist/models/get-saml-login-link-request-dto.js +15 -0
  34. package/dist/models/index.d.ts +21 -0
  35. package/dist/models/index.js +37 -0
  36. package/dist/models/inline-response200.d.ts +54 -0
  37. package/dist/models/inline-response200.js +15 -0
  38. package/dist/models/inline-response503.d.ts +54 -0
  39. package/dist/models/inline-response503.js +15 -0
  40. package/dist/models/login-by-saml-request-dto.d.ts +30 -0
  41. package/dist/models/login-by-saml-request-dto.js +15 -0
  42. package/dist/models/login-class.d.ts +30 -0
  43. package/dist/models/login-class.js +15 -0
  44. package/dist/models/login-request-dto.d.ts +30 -0
  45. package/dist/models/login-request-dto.js +15 -0
  46. package/dist/models/logout-request-dto.d.ts +24 -0
  47. package/dist/models/logout-request-dto.js +15 -0
  48. package/dist/models/org-invitation-class.d.ts +109 -0
  49. package/dist/models/org-invitation-class.js +15 -0
  50. package/dist/models/organization-class.d.ts +114 -0
  51. package/dist/models/organization-class.js +15 -0
  52. package/dist/models/refresh-token-dto.d.ts +24 -0
  53. package/dist/models/refresh-token-dto.js +15 -0
  54. package/dist/models/reset-password-request-dto.d.ts +36 -0
  55. package/dist/models/reset-password-request-dto.js +15 -0
  56. package/dist/models/role-class.d.ts +54 -0
  57. package/dist/models/role-class.js +15 -0
  58. package/dist/models/user-class.d.ts +85 -0
  59. package/dist/models/user-class.js +15 -0
  60. package/dist/models/verify-org-invitation-request-dto.d.ts +24 -0
  61. package/dist/models/verify-org-invitation-request-dto.js +15 -0
  62. package/dist/models/verify-org-invitation-response-class.d.ts +32 -0
  63. package/dist/models/verify-org-invitation-response-class.js +15 -0
  64. package/models/{get-samllogin-link-request-dto.ts → get-saml-login-link-request-dto.ts} +3 -3
  65. package/models/index.ts +2 -2
  66. package/models/inline-response200.ts +6 -6
  67. package/models/inline-response503.ts +6 -6
  68. package/models/{login-by-samlrequest-dto.ts → login-by-saml-request-dto.ts} +4 -4
  69. package/package.json +1 -1
@@ -16,11 +16,11 @@ models/create-user-request-dto.ts
16
16
  models/create-user-response-class.ts
17
17
  models/custom-schema-class.ts
18
18
  models/forgot-password-request-dto.ts
19
- models/get-samllogin-link-request-dto.ts
19
+ models/get-saml-login-link-request-dto.ts
20
20
  models/index.ts
21
21
  models/inline-response200.ts
22
22
  models/inline-response503.ts
23
- models/login-by-samlrequest-dto.ts
23
+ models/login-by-saml-request-dto.ts
24
24
  models/login-class.ts
25
25
  models/login-request-dto.ts
26
26
  models/logout-request-dto.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@1.5.0 --save
20
+ npm install @emilgroup/auth-sdk@1.10.1-beta.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/auth-sdk@1.5.0
24
+ yarn add @emilgroup/auth-sdk@1.10.1-beta.0
25
25
  ```
26
26
 
27
27
  And then you can import ``.
@@ -31,7 +31,7 @@ import { CreateUserResponseClass } from '../models';
31
31
  // @ts-ignore
32
32
  import { ForgotPasswordRequestDto } from '../models';
33
33
  // @ts-ignore
34
- import { LoginBySAMLRequestDto } from '../models';
34
+ import { LoginBySamlRequestDto } from '../models';
35
35
  // @ts-ignore
36
36
  import { LoginClass } from '../models';
37
37
  // @ts-ignore
@@ -165,8 +165,8 @@ export const AuthserviceApiAxiosParamCreator = function (configuration?: Configu
165
165
  };
166
166
  },
167
167
  /**
168
- * Get saml login link configured for the tenant in cognito as well as tenant settings
169
- * @summary Get saml login link for tenant
168
+ * Get SAML login link configured for the tenant in cognito as well as tenant settings
169
+ * @summary Get SAML login link for tenant
170
170
  * @param {string} tenantSlug
171
171
  * @param {*} [options] Override http request option.
172
172
  * @throws {RequiredError}
@@ -244,13 +244,13 @@ export const AuthserviceApiAxiosParamCreator = function (configuration?: Configu
244
244
  /**
245
245
  * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
246
246
  * @summary Login by SAML idp provider such as ADFS
247
- * @param {LoginBySAMLRequestDto} loginBySAMLRequestDto
247
+ * @param {LoginBySamlRequestDto} loginBySamlRequestDto
248
248
  * @param {*} [options] Override http request option.
249
249
  * @throws {RequiredError}
250
250
  */
251
- loginBySAML: async (loginBySAMLRequestDto: LoginBySAMLRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
252
- // verify required parameter 'loginBySAMLRequestDto' is not null or undefined
253
- assertParamExists('loginBySAML', 'loginBySAMLRequestDto', loginBySAMLRequestDto)
251
+ loginBySaml: async (loginBySamlRequestDto: LoginBySamlRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
252
+ // verify required parameter 'loginBySamlRequestDto' is not null or undefined
253
+ assertParamExists('loginBySaml', 'loginBySamlRequestDto', loginBySamlRequestDto)
254
254
  const localVarPath = `/authservice/v1/login/saml`;
255
255
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
256
256
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -272,7 +272,7 @@ export const AuthserviceApiAxiosParamCreator = function (configuration?: Configu
272
272
  setSearchParams(localVarUrlObj, localVarQueryParameter);
273
273
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
274
274
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
275
- localVarRequestOptions.data = serializeDataIfNeeded(loginBySAMLRequestDto, localVarRequestOptions, configuration)
275
+ localVarRequestOptions.data = serializeDataIfNeeded(loginBySamlRequestDto, localVarRequestOptions, configuration)
276
276
 
277
277
  return {
278
278
  url: toPathString(localVarUrlObj),
@@ -559,8 +559,8 @@ export const AuthserviceApiFp = function(configuration?: Configuration) {
559
559
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
560
560
  },
561
561
  /**
562
- * Get saml login link configured for the tenant in cognito as well as tenant settings
563
- * @summary Get saml login link for tenant
562
+ * Get SAML login link configured for the tenant in cognito as well as tenant settings
563
+ * @summary Get SAML login link for tenant
564
564
  * @param {string} tenantSlug
565
565
  * @param {*} [options] Override http request option.
566
566
  * @throws {RequiredError}
@@ -583,12 +583,12 @@ export const AuthserviceApiFp = function(configuration?: Configuration) {
583
583
  /**
584
584
  * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
585
585
  * @summary Login by SAML idp provider such as ADFS
586
- * @param {LoginBySAMLRequestDto} loginBySAMLRequestDto
586
+ * @param {LoginBySamlRequestDto} loginBySamlRequestDto
587
587
  * @param {*} [options] Override http request option.
588
588
  * @throws {RequiredError}
589
589
  */
590
- async loginBySAML(loginBySAMLRequestDto: LoginBySAMLRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginClass>> {
591
- const localVarAxiosArgs = await localVarAxiosParamCreator.loginBySAML(loginBySAMLRequestDto, options);
590
+ async loginBySaml(loginBySamlRequestDto: LoginBySamlRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginClass>> {
591
+ const localVarAxiosArgs = await localVarAxiosParamCreator.loginBySaml(loginBySamlRequestDto, options);
592
592
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
593
593
  },
594
594
  /**
@@ -699,8 +699,8 @@ export const AuthserviceApiFactory = function (configuration?: Configuration, ba
699
699
  return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then((request) => request(axios, basePath));
700
700
  },
701
701
  /**
702
- * Get saml login link configured for the tenant in cognito as well as tenant settings
703
- * @summary Get saml login link for tenant
702
+ * Get SAML login link configured for the tenant in cognito as well as tenant settings
703
+ * @summary Get SAML login link for tenant
704
704
  * @param {string} tenantSlug
705
705
  * @param {*} [options] Override http request option.
706
706
  * @throws {RequiredError}
@@ -721,12 +721,12 @@ export const AuthserviceApiFactory = function (configuration?: Configuration, ba
721
721
  /**
722
722
  * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
723
723
  * @summary Login by SAML idp provider such as ADFS
724
- * @param {LoginBySAMLRequestDto} loginBySAMLRequestDto
724
+ * @param {LoginBySamlRequestDto} loginBySamlRequestDto
725
725
  * @param {*} [options] Override http request option.
726
726
  * @throws {RequiredError}
727
727
  */
728
- loginBySAML(loginBySAMLRequestDto: LoginBySAMLRequestDto, options?: any): AxiosPromise<LoginClass> {
729
- return localVarFp.loginBySAML(loginBySAMLRequestDto, options).then((request) => request(axios, basePath));
728
+ loginBySaml(loginBySamlRequestDto: LoginBySamlRequestDto, options?: any): AxiosPromise<LoginClass> {
729
+ return localVarFp.loginBySaml(loginBySamlRequestDto, options).then((request) => request(axios, basePath));
730
730
  },
731
731
  /**
732
732
  * Sign tenant user out.
@@ -863,17 +863,17 @@ export interface AuthserviceApiLoginRequest {
863
863
  }
864
864
 
865
865
  /**
866
- * Request parameters for loginBySAML operation in AuthserviceApi.
866
+ * Request parameters for loginBySaml operation in AuthserviceApi.
867
867
  * @export
868
- * @interface AuthserviceApiLoginBySAMLRequest
868
+ * @interface AuthserviceApiLoginBySamlRequest
869
869
  */
870
- export interface AuthserviceApiLoginBySAMLRequest {
870
+ export interface AuthserviceApiLoginBySamlRequest {
871
871
  /**
872
872
  *
873
- * @type {LoginBySAMLRequestDto}
874
- * @memberof AuthserviceApiLoginBySAML
873
+ * @type {LoginBySamlRequestDto}
874
+ * @memberof AuthserviceApiLoginBySaml
875
875
  */
876
- readonly loginBySAMLRequestDto: LoginBySAMLRequestDto
876
+ readonly loginBySamlRequestDto: LoginBySamlRequestDto
877
877
  }
878
878
 
879
879
  /**
@@ -1011,8 +1011,8 @@ export class AuthserviceApi extends BaseAPI {
1011
1011
  }
1012
1012
 
1013
1013
  /**
1014
- * Get saml login link configured for the tenant in cognito as well as tenant settings
1015
- * @summary Get saml login link for tenant
1014
+ * Get SAML login link configured for the tenant in cognito as well as tenant settings
1015
+ * @summary Get SAML login link for tenant
1016
1016
  * @param {AuthserviceApiGetSamlLoginLinkRequest} requestParameters Request parameters.
1017
1017
  * @param {*} [options] Override http request option.
1018
1018
  * @throws {RequiredError}
@@ -1037,13 +1037,13 @@ export class AuthserviceApi extends BaseAPI {
1037
1037
  /**
1038
1038
  * Get new access token, refresh token after successful login. This api also creates a tenant user if user does not exist
1039
1039
  * @summary Login by SAML idp provider such as ADFS
1040
- * @param {AuthserviceApiLoginBySAMLRequest} requestParameters Request parameters.
1040
+ * @param {AuthserviceApiLoginBySamlRequest} requestParameters Request parameters.
1041
1041
  * @param {*} [options] Override http request option.
1042
1042
  * @throws {RequiredError}
1043
1043
  * @memberof AuthserviceApi
1044
1044
  */
1045
- public loginBySAML(requestParameters: AuthserviceApiLoginBySAMLRequest, options?: AxiosRequestConfig) {
1046
- return AuthserviceApiFp(this.configuration).loginBySAML(requestParameters.loginBySAMLRequestDto, options).then((request) => request(this.axios, this.basePath));
1045
+ public loginBySaml(requestParameters: AuthserviceApiLoginBySamlRequest, options?: AxiosRequestConfig) {
1046
+ return AuthserviceApiFp(this.configuration).loginBySaml(requestParameters.loginBySamlRequestDto, options).then((request) => request(this.axios, this.basePath));
1047
1047
  }
1048
1048
 
1049
1049
  /**
@@ -31,7 +31,8 @@ import { InlineResponse503 } from '../models';
31
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.
35
+ * @summary Health Check
35
36
  * @param {*} [options] Override http request option.
36
37
  * @throws {RequiredError}
37
38
  */
@@ -72,7 +73,8 @@ export const DefaultApiFp = function(configuration?: Configuration) {
72
73
  const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
73
74
  return {
74
75
  /**
75
- *
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.
77
+ * @summary Health Check
76
78
  * @param {*} [options] Override http request option.
77
79
  * @throws {RequiredError}
78
80
  */
@@ -91,7 +93,8 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
91
93
  const localVarFp = DefaultApiFp(configuration)
92
94
  return {
93
95
  /**
94
- *
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.
97
+ * @summary Health Check
95
98
  * @param {*} [options] Override http request option.
96
99
  * @throws {RequiredError}
97
100
  */
@@ -109,7 +112,8 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
109
112
  */
110
113
  export class DefaultApi extends BaseAPI {
111
114
  /**
112
- *
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
+ * @summary Health Check
113
117
  * @param {*} [options] Override http request option.
114
118
  * @throws {RequiredError}
115
119
  * @memberof DefaultApi
package/base.ts CHANGED
@@ -87,6 +87,7 @@ export class BaseAPI {
87
87
  if (configuration) {
88
88
  this.configuration = configuration;
89
89
  this.basePath = configuration.basePath || this.basePath;
90
+ this.configuration.accessToken = this.tokenData.accessToken ? `Bearer ${this.tokenData.accessToken}` : '';
90
91
  } else {
91
92
  const { accessToken, username } = this.tokenData;
92
93