@asgardeo/javascript 0.7.1 → 0.7.3
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/dist/AsgardeoJavaScriptClient.d.ts +3 -4
- package/dist/IsomorphicCrypto.d.ts +2 -2
- package/dist/StorageManager.d.ts +6 -8
- package/dist/__legacy__/client.d.ts +15 -15
- package/dist/__legacy__/helpers/authentication-helper.d.ts +5 -5
- package/dist/__legacy__/models/client-config.d.ts +14 -14
- package/dist/api/createOrganization.d.ts +8 -8
- package/dist/api/getAllOrganizations.d.ts +5 -5
- package/dist/api/getBrandingPreference.d.ts +5 -5
- package/dist/api/getMeOrganizations.d.ts +9 -9
- package/dist/api/getOrganization.d.ts +4 -4
- package/dist/api/getSchemas.d.ts +4 -4
- package/dist/api/getScim2Me.d.ts +4 -4
- package/dist/api/updateMeProfile.d.ts +7 -7
- package/dist/api/updateOrganization.d.ts +5 -5
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +16 -16
- package/dist/cjs/index.js +1183 -1186
- package/dist/cjs/index.js.map +4 -4
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +14 -14
- package/dist/constants/OIDCDiscoveryConstants.d.ts +17 -106
- package/dist/constants/OIDCRequestConstants.d.ts +6 -44
- package/dist/constants/PKCEConstants.d.ts +3 -18
- package/dist/constants/TokenConstants.d.ts +2 -31
- package/dist/constants/TokenExchangeConstants.d.ts +5 -30
- package/dist/index.js +1184 -1187
- package/dist/index.js.map +4 -4
- package/dist/models/branding-preference.d.ts +5 -5
- package/dist/models/client.d.ts +57 -58
- package/dist/models/config.d.ts +48 -48
- package/dist/models/crypto.d.ts +11 -11
- package/dist/models/embedded-flow.d.ts +10 -10
- package/dist/models/field.d.ts +8 -8
- package/dist/models/oidc-discovery.d.ts +161 -161
- package/dist/models/oidc-endpoints.d.ts +15 -15
- package/dist/models/platforms.d.ts +2 -2
- package/dist/models/scim2-schema.d.ts +17 -17
- package/dist/models/session.d.ts +4 -4
- package/dist/models/store.d.ts +9 -9
- package/dist/models/user.d.ts +5 -5
- package/dist/models/v2/embedded-flow-v2.d.ts +86 -86
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +39 -39
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +42 -42
- package/dist/theme/types.d.ts +133 -133
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts +4 -3
- package/dist/utils/logger.d.ts +6 -6
- package/dist/utils/processUsername.d.ts +1 -1
- package/package.json +1 -1
- package/dist/utils/cryptoUtils.d.ts +0 -0
|
@@ -212,16 +212,16 @@ export interface BrandingOrganizationDetails {
|
|
|
212
212
|
export interface UrlsConfig {
|
|
213
213
|
cookiePolicyURL?: string;
|
|
214
214
|
privacyPolicyURL?: string;
|
|
215
|
-
termsOfUseURL?: string;
|
|
216
215
|
selfSignUpURL?: string;
|
|
216
|
+
termsOfUseURL?: string;
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* Interface for branding preference theme configuration.
|
|
220
220
|
*/
|
|
221
221
|
export interface BrandingTheme {
|
|
222
|
-
activeTheme?: string;
|
|
223
|
-
LIGHT?: ThemeVariant;
|
|
224
222
|
DARK?: ThemeVariant;
|
|
223
|
+
LIGHT?: ThemeVariant;
|
|
224
|
+
activeTheme?: string;
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
227
|
* Interface for branding preference configuration.
|
|
@@ -241,8 +241,8 @@ export interface BrandingPreferenceConfig {
|
|
|
241
241
|
* Interface for branding preference configuration.
|
|
242
242
|
*/
|
|
243
243
|
export interface BrandingPreference {
|
|
244
|
-
type?: string;
|
|
245
|
-
name?: string;
|
|
246
244
|
locale?: string;
|
|
245
|
+
name?: string;
|
|
247
246
|
preference?: BrandingPreferenceConfig;
|
|
247
|
+
type?: string;
|
|
248
248
|
}
|
package/dist/models/client.d.ts
CHANGED
|
@@ -15,14 +15,13 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
18
|
+
import { SignInOptions, SignOutOptions, SignUpOptions } from './config';
|
|
19
19
|
import { EmbeddedFlowExecuteRequestConfig, EmbeddedFlowExecuteRequestPayload, EmbeddedFlowExecuteResponse } from './embedded-flow';
|
|
20
20
|
import { EmbeddedSignInFlowHandleRequestPayload } from './embedded-signin-flow';
|
|
21
|
-
import { Organization } from './organization';
|
|
22
|
-
import { User, UserProfile } from './user';
|
|
23
|
-
import { TokenExchangeRequestConfig, TokenResponse } from './token';
|
|
21
|
+
import { Organization, AllOrganizationsApiResponse } from './organization';
|
|
24
22
|
import { Storage } from './store';
|
|
25
|
-
import {
|
|
23
|
+
import { TokenExchangeRequestConfig, TokenResponse } from './token';
|
|
24
|
+
import { User, UserProfile } from './user';
|
|
26
25
|
/**
|
|
27
26
|
* Interface defining the core functionality for Asgardeo authentication clients.
|
|
28
27
|
*
|
|
@@ -35,46 +34,51 @@ import { SignInOptions, SignOutOptions, SignUpOptions } from './config';
|
|
|
35
34
|
*/
|
|
36
35
|
export interface AsgardeoClient<T> {
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @returns Associated organizations.
|
|
37
|
+
* Clears the session for the specified session ID.
|
|
38
|
+
* @param sessionId - Optional session ID to clear the session for.
|
|
41
39
|
*/
|
|
42
|
-
|
|
40
|
+
clearSession(sessionId?: string): void;
|
|
43
41
|
/**
|
|
44
|
-
*
|
|
45
|
-
* @param
|
|
46
|
-
* @
|
|
42
|
+
* Decodes a JWT token and returns its payload.
|
|
43
|
+
* @param token - The JWT token to be decoded.
|
|
44
|
+
* @returns A promise that resolves to the decoded token payload.
|
|
47
45
|
*/
|
|
48
|
-
|
|
46
|
+
decodeJwtToken<R = Record<string, unknown>>(token: string): Promise<R>;
|
|
49
47
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* @
|
|
48
|
+
* Swaps the current access token with a new one based on the provided configuration (with a grant type).
|
|
49
|
+
* @param config - Configuration for the token exchange request.
|
|
50
|
+
* @param sessionId - Optional session ID to be used for the token exchange.
|
|
53
51
|
*/
|
|
54
|
-
|
|
52
|
+
exchangeToken(config: TokenExchangeRequestConfig, sessionId?: string): Promise<TokenResponse | Response>;
|
|
55
53
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @param
|
|
58
|
-
* @returns A promise that resolves
|
|
54
|
+
* Retrieves the access token for the current session.
|
|
55
|
+
* @param sessionId - Optional session ID to retrieve the access token for a specific session.
|
|
56
|
+
* @returns A promise that resolves to the access token string.
|
|
59
57
|
*/
|
|
60
|
-
|
|
58
|
+
getAccessToken(sessionId?: string): Promise<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Gets all organizations available to the user.
|
|
61
|
+
* @param options - Optional parameters for the request.
|
|
62
|
+
* @param sessionId - Optional session ID to be used for the request.
|
|
63
|
+
*/
|
|
64
|
+
getAllOrganizations(options?: any, sessionId?: string): Promise<AllOrganizationsApiResponse>;
|
|
61
65
|
/**
|
|
62
66
|
* Gets the client configuration.
|
|
63
67
|
* @returns The client configuration.
|
|
64
68
|
*/
|
|
65
69
|
getConfiguration(): T;
|
|
66
70
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* @
|
|
71
|
+
* Gets the current organization of the user.
|
|
72
|
+
*
|
|
73
|
+
* @returns The current organization if available, otherwise null.
|
|
70
74
|
*/
|
|
71
|
-
|
|
75
|
+
getCurrentOrganization(sessionId?: string): Promise<Organization | null>;
|
|
72
76
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* @
|
|
77
|
+
* Gets the current signed-in user's associated organizations.
|
|
78
|
+
*
|
|
79
|
+
* @returns Associated organizations.
|
|
76
80
|
*/
|
|
77
|
-
|
|
81
|
+
getMyOrganizations(options?: any, sessionId?: string): Promise<Organization[]>;
|
|
78
82
|
/**
|
|
79
83
|
* Gets user information from the session.
|
|
80
84
|
*
|
|
@@ -95,16 +99,6 @@ export interface AsgardeoClient<T> {
|
|
|
95
99
|
* @returns Promise resolving to boolean indicating success.
|
|
96
100
|
*/
|
|
97
101
|
initialize(config: T, storage?: Storage): Promise<boolean>;
|
|
98
|
-
/**
|
|
99
|
-
* Re-initializes the client with a new configuration.
|
|
100
|
-
*
|
|
101
|
-
* @remarks
|
|
102
|
-
* This can be partial configuration to update only specific fields.
|
|
103
|
-
*
|
|
104
|
-
* @param config - New configuration to re-initialize the client with.
|
|
105
|
-
* @returns Promise resolving to boolean indicating success.
|
|
106
|
-
*/
|
|
107
|
-
reInitialize(config: Partial<T>): Promise<boolean>;
|
|
108
102
|
/**
|
|
109
103
|
* Checks if the client is currently loading.
|
|
110
104
|
* This can be used to determine if the client is in the process of initializing or fetching user data.
|
|
@@ -119,6 +113,22 @@ export interface AsgardeoClient<T> {
|
|
|
119
113
|
* @returns Boolean indicating sign-in status.
|
|
120
114
|
*/
|
|
121
115
|
isSignedIn(): Promise<boolean>;
|
|
116
|
+
/**
|
|
117
|
+
* Re-initializes the client with a new configuration.
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
* This can be partial configuration to update only specific fields.
|
|
121
|
+
*
|
|
122
|
+
* @param config - New configuration to re-initialize the client with.
|
|
123
|
+
* @returns Promise resolving to boolean indicating success.
|
|
124
|
+
*/
|
|
125
|
+
reInitialize(config: Partial<T>): Promise<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Sets the session data for the specified session ID.
|
|
128
|
+
* @param sessionData - The session data to be set.
|
|
129
|
+
* @param sessionId - Optional session ID to set the session data for.
|
|
130
|
+
*/
|
|
131
|
+
setSession(sessionData: Record<string, unknown>, sessionId?: string): Promise<void>;
|
|
122
132
|
/**
|
|
123
133
|
* Initiates the sign-in process for the user.
|
|
124
134
|
*
|
|
@@ -181,26 +191,15 @@ export interface AsgardeoClient<T> {
|
|
|
181
191
|
*/
|
|
182
192
|
signUp(payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse>;
|
|
183
193
|
/**
|
|
184
|
-
*
|
|
185
|
-
* @param
|
|
186
|
-
* @returns A promise that resolves
|
|
187
|
-
*/
|
|
188
|
-
getAccessToken(sessionId?: string): Promise<string>;
|
|
189
|
-
/**
|
|
190
|
-
* Sets the session data for the specified session ID.
|
|
191
|
-
* @param sessionData - The session data to be set.
|
|
192
|
-
* @param sessionId - Optional session ID to set the session data for.
|
|
193
|
-
*/
|
|
194
|
-
setSession(sessionData: Record<string, unknown>, sessionId?: string): Promise<void>;
|
|
195
|
-
/**
|
|
196
|
-
* Clears the session for the specified session ID.
|
|
197
|
-
* @param sessionId - Optional session ID to clear the session for.
|
|
194
|
+
* Switches the current organization to the specified one.
|
|
195
|
+
* @param organization - The organization to switch to.
|
|
196
|
+
* @returns A promise that resolves when the switch is complete.
|
|
198
197
|
*/
|
|
199
|
-
|
|
198
|
+
switchOrganization(organization: Organization, sessionId?: string): Promise<TokenResponse | Response>;
|
|
200
199
|
/**
|
|
201
|
-
*
|
|
202
|
-
* @param
|
|
203
|
-
* @
|
|
200
|
+
* Updates the user profile with the provided payload.
|
|
201
|
+
* @param payload - The new user profile data.
|
|
202
|
+
* @param userId - Optional user ID to specify which user's profile to update.
|
|
204
203
|
*/
|
|
205
|
-
|
|
204
|
+
updateUserProfile(payload: any, userId?: string): Promise<User>;
|
|
206
205
|
}
|
package/dist/models/config.d.ts
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { I18nBundle } from '@asgardeo/i18n';
|
|
19
|
+
import { Platform } from './platforms';
|
|
19
20
|
import { RecursivePartial } from './utility-types';
|
|
20
21
|
import { ThemeConfig, ThemeMode } from '../theme/types';
|
|
21
|
-
import { Platform } from './platforms';
|
|
22
22
|
/**
|
|
23
23
|
* Interface representing the additional parameters to be sent in the sign-in request.
|
|
24
24
|
* This can include custom parameters that your authorization server supports.
|
|
@@ -88,13 +88,6 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
88
88
|
* allowedExternalUrls: ["https://api.example.com", "https://api.another-service.com"]
|
|
89
89
|
*/
|
|
90
90
|
allowedExternalUrls?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* Optional organization handle for the Organization in Asgardeo.
|
|
93
|
-
* This is used to identify the organization in the Asgardeo identity server in cases like Branding, etc.
|
|
94
|
-
* If not provided, the framework layer will try to use the `baseUrl` to determine the organization handle.
|
|
95
|
-
* @remarks This is mandatory if a custom domain is configured for the Asgardeo organization.
|
|
96
|
-
*/
|
|
97
|
-
organizationHandle?: string | undefined;
|
|
98
91
|
/**
|
|
99
92
|
* Optional UUID of the Asgardeo application.
|
|
100
93
|
* This is used to identify the application in the Asgardeo identity server for Application Branding,
|
|
@@ -118,6 +111,18 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
118
111
|
* Not recommended for public clients like browser applications.
|
|
119
112
|
*/
|
|
120
113
|
clientSecret?: string | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Optional instance ID for multi-auth context support.
|
|
116
|
+
* Use this when you need multiple authentication contexts in the same application.
|
|
117
|
+
*/
|
|
118
|
+
instanceId?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Optional organization handle for the Organization in Asgardeo.
|
|
121
|
+
* This is used to identify the organization in the Asgardeo identity server in cases like Branding, etc.
|
|
122
|
+
* If not provided, the framework layer will try to use the `baseUrl` to determine the organization handle.
|
|
123
|
+
* @remarks This is mandatory if a custom domain is configured for the Asgardeo organization.
|
|
124
|
+
*/
|
|
125
|
+
organizationHandle?: string | undefined;
|
|
121
126
|
/**
|
|
122
127
|
* Optional platform where the application is running.
|
|
123
128
|
* This helps the SDK to optimize its behavior based on the platform.
|
|
@@ -137,12 +142,27 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
137
142
|
* scopes: ["openid", "profile", "email"]
|
|
138
143
|
*/
|
|
139
144
|
scopes?: string | string[] | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Optional additional parameters to be sent in the authorize request.
|
|
147
|
+
* @see {@link SignInOptions} for more details.
|
|
148
|
+
*/
|
|
149
|
+
signInOptions?: SignInOptions;
|
|
140
150
|
/**
|
|
141
151
|
* Optional URL to redirect the user to sign-in.
|
|
142
152
|
* By default, this will be the sign-in page of Asgardeo.
|
|
143
153
|
* If you want to use a custom sign-in page, you can provide the URL here and use the `SignIn` component to render it.
|
|
144
154
|
*/
|
|
145
155
|
signInUrl?: string | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Optional additional parameters to be sent in the sign-out request.
|
|
158
|
+
* @see {@link SignOutOptions} for more details.
|
|
159
|
+
*/
|
|
160
|
+
signOutOptions?: SignOutOptions;
|
|
161
|
+
/**
|
|
162
|
+
* Optional additional parameters to be sent in the sign-up request.
|
|
163
|
+
* @see {@link SignUpOptions} for more details.
|
|
164
|
+
*/
|
|
165
|
+
signUpOptions?: SignUpOptions;
|
|
146
166
|
/**
|
|
147
167
|
* Optional URL to redirect the user to sign-up.
|
|
148
168
|
* By default, this will be the sign-up page of Asgardeo.
|
|
@@ -150,6 +170,22 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
150
170
|
* and use the `SignUp` component to render it.
|
|
151
171
|
*/
|
|
152
172
|
signUpUrl?: string | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* Storage mechanism to use for storing tokens and session data.
|
|
175
|
+
* The values should be defined at the framework layer.
|
|
176
|
+
*/
|
|
177
|
+
storage?: T;
|
|
178
|
+
/**
|
|
179
|
+
* Flag to indicate whether the Application session should be synchronized with the IdP session.
|
|
180
|
+
* @remarks This uses the OIDC iframe base session management feature to keep the application session in sync with the IdP session.
|
|
181
|
+
* WARNING: This may not work in all browsers due to 3rd party cookie restrictions.
|
|
182
|
+
* It is recommended to use this feature only if you are aware of the implications and have tested it in your target browsers.
|
|
183
|
+
* If you are not sure, it is safer to leave this option as `false`.
|
|
184
|
+
* @example
|
|
185
|
+
* syncSession: true
|
|
186
|
+
* @see {@link https://openid.net/specs/openid-connect-session-management-1_0.html#IframeBasedSessionManagement}
|
|
187
|
+
*/
|
|
188
|
+
syncSession?: boolean;
|
|
153
189
|
/**
|
|
154
190
|
* Token validation configuration.
|
|
155
191
|
* This allows you to configure how the SDK validates tokens received from the authorization server.
|
|
@@ -162,6 +198,10 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
162
198
|
* ID token validation config.
|
|
163
199
|
*/
|
|
164
200
|
idToken?: {
|
|
201
|
+
/**
|
|
202
|
+
* Allowed leeway for ID tokens (in seconds).
|
|
203
|
+
*/
|
|
204
|
+
clockTolerance?: number;
|
|
165
205
|
/**
|
|
166
206
|
* Whether to validate ID tokens.
|
|
167
207
|
*/
|
|
@@ -170,48 +210,8 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
170
210
|
* Whether to validate the issuer of ID tokens.
|
|
171
211
|
*/
|
|
172
212
|
validateIssuer?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* Allowed leeway for ID tokens (in seconds).
|
|
175
|
-
*/
|
|
176
|
-
clockTolerance?: number;
|
|
177
213
|
};
|
|
178
214
|
};
|
|
179
|
-
/**
|
|
180
|
-
* Optional additional parameters to be sent in the authorize request.
|
|
181
|
-
* @see {@link SignInOptions} for more details.
|
|
182
|
-
*/
|
|
183
|
-
signInOptions?: SignInOptions;
|
|
184
|
-
/**
|
|
185
|
-
* Optional additional parameters to be sent in the sign-out request.
|
|
186
|
-
* @see {@link SignOutOptions} for more details.
|
|
187
|
-
*/
|
|
188
|
-
signOutOptions?: SignOutOptions;
|
|
189
|
-
/**
|
|
190
|
-
* Optional additional parameters to be sent in the sign-up request.
|
|
191
|
-
* @see {@link SignUpOptions} for more details.
|
|
192
|
-
*/
|
|
193
|
-
signUpOptions?: SignUpOptions;
|
|
194
|
-
/**
|
|
195
|
-
* Flag to indicate whether the Application session should be synchronized with the IdP session.
|
|
196
|
-
* @remarks This uses the OIDC iframe base session management feature to keep the application session in sync with the IdP session.
|
|
197
|
-
* WARNING: This may not work in all browsers due to 3rd party cookie restrictions.
|
|
198
|
-
* It is recommended to use this feature only if you are aware of the implications and have tested it in your target browsers.
|
|
199
|
-
* If you are not sure, it is safer to leave this option as `false`.
|
|
200
|
-
* @example
|
|
201
|
-
* syncSession: true
|
|
202
|
-
* @see {@link https://openid.net/specs/openid-connect-session-management-1_0.html#IframeBasedSessionManagement}
|
|
203
|
-
*/
|
|
204
|
-
syncSession?: boolean;
|
|
205
|
-
/**
|
|
206
|
-
* Storage mechanism to use for storing tokens and session data.
|
|
207
|
-
* The values should be defined at the framework layer.
|
|
208
|
-
*/
|
|
209
|
-
storage?: T;
|
|
210
|
-
/**
|
|
211
|
-
* Optional instance ID for multi-auth context support.
|
|
212
|
-
* Use this when you need multiple authentication contexts in the same application.
|
|
213
|
-
*/
|
|
214
|
-
instanceId?: number;
|
|
215
215
|
}
|
|
216
216
|
export interface WithPreferences {
|
|
217
217
|
/**
|
package/dist/models/crypto.d.ts
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
* JWK Model
|
|
20
20
|
*/
|
|
21
21
|
export interface JWKInterface {
|
|
22
|
-
|
|
22
|
+
alg: string;
|
|
23
23
|
e: string;
|
|
24
|
-
use: string;
|
|
25
24
|
kid: string;
|
|
26
|
-
|
|
25
|
+
kty: string;
|
|
27
26
|
n: string;
|
|
27
|
+
use: string;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Cryptographic utility interface for OIDC operations.
|
|
@@ -49,14 +49,6 @@ export interface JWKInterface {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
export interface Crypto<T = any> {
|
|
52
|
-
/**
|
|
53
|
-
* Encode the provided data in base64url format.
|
|
54
|
-
*
|
|
55
|
-
* @param value - Data to be encoded.
|
|
56
|
-
*
|
|
57
|
-
* @returns Encoded data.
|
|
58
|
-
*/
|
|
59
|
-
base64URLEncode(value: T): string;
|
|
60
52
|
/**
|
|
61
53
|
* Decode the provided data encoded in base64url format.
|
|
62
54
|
*
|
|
@@ -65,6 +57,14 @@ export interface Crypto<T = any> {
|
|
|
65
57
|
* @returns Decoded data.
|
|
66
58
|
*/
|
|
67
59
|
base64URLDecode(value: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Encode the provided data in base64url format.
|
|
62
|
+
*
|
|
63
|
+
* @param value - Data to be encoded.
|
|
64
|
+
*
|
|
65
|
+
* @returns Encoded data.
|
|
66
|
+
*/
|
|
67
|
+
base64URLEncode(value: T): string;
|
|
68
68
|
/**
|
|
69
69
|
* Generate random bytes.
|
|
70
70
|
*
|
|
@@ -40,9 +40,9 @@ export declare enum EmbeddedFlowResponseType {
|
|
|
40
40
|
View = "VIEW"
|
|
41
41
|
}
|
|
42
42
|
export interface EmbeddedSignUpFlowData {
|
|
43
|
+
additionalData?: Record<string, any>;
|
|
43
44
|
components?: EmbeddedFlowComponent[];
|
|
44
45
|
redirectURL?: string;
|
|
45
|
-
additionalData?: Record<string, any>;
|
|
46
46
|
}
|
|
47
47
|
export interface EmbeddedFlowComponent {
|
|
48
48
|
components: EmbeddedFlowComponent[];
|
|
@@ -135,15 +135,6 @@ export interface EmbeddedFlowExecuteErrorResponse {
|
|
|
135
135
|
* @example "FEE-60005" - User provisioning error
|
|
136
136
|
*/
|
|
137
137
|
code: string;
|
|
138
|
-
/**
|
|
139
|
-
* Brief error message describing what went wrong.
|
|
140
|
-
*
|
|
141
|
-
* This is typically a short, high-level description of the error.
|
|
142
|
-
* For more detailed information, refer to the `description` field.
|
|
143
|
-
*
|
|
144
|
-
* @example "Error while provisioning user."
|
|
145
|
-
*/
|
|
146
|
-
message: string;
|
|
147
138
|
/**
|
|
148
139
|
* Detailed error description with contextual information.
|
|
149
140
|
*
|
|
@@ -162,4 +153,13 @@ export interface EmbeddedFlowExecuteErrorResponse {
|
|
|
162
153
|
* include other flow types (e.g., 'LOGIN', 'PASSWORD_RESET') in the future.
|
|
163
154
|
*/
|
|
164
155
|
flowType: 'REGISTRATION';
|
|
156
|
+
/**
|
|
157
|
+
* Brief error message describing what went wrong.
|
|
158
|
+
*
|
|
159
|
+
* This is typically a short, high-level description of the error.
|
|
160
|
+
* For more detailed information, refer to the `description` field.
|
|
161
|
+
*
|
|
162
|
+
* @example "Error while provisioning user."
|
|
163
|
+
*/
|
|
164
|
+
message: string;
|
|
165
165
|
}
|
package/dist/models/field.d.ts
CHANGED
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
export declare enum FieldType {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
Checkbox = "CHECKBOX",
|
|
20
|
+
Date = "DATE",
|
|
21
21
|
Email = "EMAIL",
|
|
22
22
|
Number = "NUMBER",
|
|
23
|
-
Select = "SELECT",
|
|
24
|
-
Checkbox = "CHECKBOX",
|
|
25
|
-
Radio = "RADIO",
|
|
26
23
|
Otp = "OTP",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
Password = "PASSWORD",
|
|
25
|
+
Radio = "RADIO",
|
|
26
|
+
Select = "SELECT",
|
|
27
|
+
Text = "TEXT",
|
|
28
|
+
Textarea = "TEXTAREA",
|
|
29
|
+
Time = "TIME"
|
|
30
30
|
}
|