@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.
Files changed (48) hide show
  1. package/dist/AsgardeoJavaScriptClient.d.ts +3 -4
  2. package/dist/IsomorphicCrypto.d.ts +2 -2
  3. package/dist/StorageManager.d.ts +6 -8
  4. package/dist/__legacy__/client.d.ts +15 -15
  5. package/dist/__legacy__/helpers/authentication-helper.d.ts +5 -5
  6. package/dist/__legacy__/models/client-config.d.ts +14 -14
  7. package/dist/api/createOrganization.d.ts +8 -8
  8. package/dist/api/getAllOrganizations.d.ts +5 -5
  9. package/dist/api/getBrandingPreference.d.ts +5 -5
  10. package/dist/api/getMeOrganizations.d.ts +9 -9
  11. package/dist/api/getOrganization.d.ts +4 -4
  12. package/dist/api/getSchemas.d.ts +4 -4
  13. package/dist/api/getScim2Me.d.ts +4 -4
  14. package/dist/api/updateMeProfile.d.ts +7 -7
  15. package/dist/api/updateOrganization.d.ts +5 -5
  16. package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +16 -16
  17. package/dist/cjs/index.js +1183 -1186
  18. package/dist/cjs/index.js.map +4 -4
  19. package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +14 -14
  20. package/dist/constants/OIDCDiscoveryConstants.d.ts +17 -106
  21. package/dist/constants/OIDCRequestConstants.d.ts +6 -44
  22. package/dist/constants/PKCEConstants.d.ts +3 -18
  23. package/dist/constants/TokenConstants.d.ts +2 -31
  24. package/dist/constants/TokenExchangeConstants.d.ts +5 -30
  25. package/dist/index.js +1184 -1187
  26. package/dist/index.js.map +4 -4
  27. package/dist/models/branding-preference.d.ts +5 -5
  28. package/dist/models/client.d.ts +57 -58
  29. package/dist/models/config.d.ts +48 -48
  30. package/dist/models/crypto.d.ts +11 -11
  31. package/dist/models/embedded-flow.d.ts +10 -10
  32. package/dist/models/field.d.ts +8 -8
  33. package/dist/models/oidc-discovery.d.ts +161 -161
  34. package/dist/models/oidc-endpoints.d.ts +15 -15
  35. package/dist/models/platforms.d.ts +2 -2
  36. package/dist/models/scim2-schema.d.ts +17 -17
  37. package/dist/models/session.d.ts +4 -4
  38. package/dist/models/store.d.ts +9 -9
  39. package/dist/models/user.d.ts +5 -5
  40. package/dist/models/v2/embedded-flow-v2.d.ts +86 -86
  41. package/dist/models/v2/embedded-signin-flow-v2.d.ts +39 -39
  42. package/dist/models/v2/embedded-signup-flow-v2.d.ts +42 -42
  43. package/dist/theme/types.d.ts +133 -133
  44. package/dist/utils/getAuthorizeRequestUrlParams.d.ts +4 -3
  45. package/dist/utils/logger.d.ts +6 -6
  46. package/dist/utils/processUsername.d.ts +1 -1
  47. package/package.json +1 -1
  48. package/dist/utils/cryptoUtils.d.ts +0 -0
@@ -36,26 +36,26 @@ import { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV1
36
36
  * @experimental This API may change in future versions
37
37
  */
38
38
  export declare enum EmbeddedFlowComponentType {
39
- /** Standard text input field for user data entry */
40
- TextInput = "TEXT_INPUT",
41
- /** Password input field with masking for sensitive data */
42
- PasswordInput = "PASSWORD_INPUT",
39
+ /** Interactive action component (buttons, links) for user interactions */
40
+ Action = "ACTION",
41
+ /** Container block component that groups other components */
42
+ Block = "BLOCK",
43
+ /** Divider component for visual separation of content */
44
+ Divider = "DIVIDER",
43
45
  /** Email input field with validation for email addresses. */
44
46
  EmailInput = "EMAIL_INPUT",
45
47
  /** One-time password input field for multi-factor authentication */
46
48
  OtpInput = "OTP_INPUT",
49
+ /** Password input field with masking for sensitive data */
50
+ PasswordInput = "PASSWORD_INPUT",
47
51
  /** Phone number input field with country code support */
48
52
  PhoneInput = "PHONE_INPUT",
53
+ /** Select/dropdown input component for single choice selection */
54
+ Select = "SELECT",
49
55
  /** Text display component for labels, headings, and messages */
50
56
  Text = "TEXT",
51
- /** Interactive action component (buttons, links) for user interactions */
52
- Action = "ACTION",
53
- /** Container block component that groups other components */
54
- Block = "BLOCK",
55
- /** Divider component for visual separation of content */
56
- Divider = "DIVIDER",
57
- /** Select/dropdown input component for single choice selection */
58
- Select = "SELECT"
57
+ /** Standard text input field for user data entry */
58
+ TextInput = "TEXT_INPUT"
59
59
  }
60
60
  /**
61
61
  * Action variant types for buttons and interactive elements.
@@ -63,24 +63,24 @@ export declare enum EmbeddedFlowComponentType {
63
63
  * @experimental This API may change in future versions
64
64
  */
65
65
  export declare enum EmbeddedFlowActionVariant {
66
- /** Primary action button with highest visual emphasis */
67
- Primary = "PRIMARY",
68
- /** Secondary action button with moderate visual emphasis */
69
- Secondary = "SECONDARY",
70
- /** Tertiary action button with minimal visual emphasis */
71
- Tertiary = "TERTIARY",
72
66
  /** Danger action button for destructive operations */
73
67
  Danger = "DANGER",
74
- /** Success action button for positive confirmations */
75
- Success = "SUCCESS",
76
68
  /** Info action button for informational purposes */
77
69
  Info = "INFO",
78
- /** Warning action button for cautionary actions */
79
- Warning = "WARNING",
80
70
  /** Link-styled action button */
81
71
  Link = "LINK",
72
+ /** Primary action button with highest visual emphasis */
73
+ Primary = "PRIMARY",
74
+ /** Secondary action button with moderate visual emphasis */
75
+ Secondary = "SECONDARY",
82
76
  /** Social media action button (e.g., Google, Facebook) */
83
- Social = "SOCIAL"
77
+ Social = "SOCIAL",
78
+ /** Success action button for positive confirmations */
79
+ Success = "SUCCESS",
80
+ /** Tertiary action button with minimal visual emphasis */
81
+ Tertiary = "TERTIARY",
82
+ /** Warning action button for cautionary actions */
83
+ Warning = "WARNING"
84
84
  }
85
85
  /**
86
86
  * Text variant types for typography components.
@@ -88,6 +88,14 @@ export declare enum EmbeddedFlowActionVariant {
88
88
  * @experimental This API may change in future versions
89
89
  */
90
90
  export declare enum EmbeddedFlowTextVariant {
91
+ /** Primary body text for main content */
92
+ Body1 = "BODY_1",
93
+ /** Secondary body text for supplementary content */
94
+ Body2 = "BODY_2",
95
+ /** Text styled for button labels */
96
+ ButtonText = "BUTTON_TEXT",
97
+ /** Small caption text for annotations and descriptions */
98
+ Caption = "CAPTION",
91
99
  /** Largest heading level for main titles */
92
100
  Heading1 = "HEADING_1",
93
101
  /** Second level heading for major sections */
@@ -100,20 +108,12 @@ export declare enum EmbeddedFlowTextVariant {
100
108
  Heading5 = "HEADING_5",
101
109
  /** Smallest heading level for fine-grained sections */
102
110
  Heading6 = "HEADING_6",
111
+ /** Overline text for labels and categories */
112
+ Overline = "OVERLINE",
103
113
  /** Primary subtitle text with larger emphasis */
104
114
  Subtitle1 = "SUBTITLE_1",
105
115
  /** Secondary subtitle text with moderate emphasis */
106
- Subtitle2 = "SUBTITLE_2",
107
- /** Primary body text for main content */
108
- Body1 = "BODY_1",
109
- /** Secondary body text for supplementary content */
110
- Body2 = "BODY_2",
111
- /** Small caption text for annotations and descriptions */
112
- Caption = "CAPTION",
113
- /** Overline text for labels and categories */
114
- Overline = "OVERLINE",
115
- /** Text styled for button labels */
116
- ButtonText = "BUTTON_TEXT"
116
+ Subtitle2 = "SUBTITLE_2"
117
117
  }
118
118
  /**
119
119
  * Event types for action components.
@@ -121,18 +121,18 @@ export declare enum EmbeddedFlowTextVariant {
121
121
  * @experimental This API may change in future versions
122
122
  */
123
123
  export declare enum EmbeddedFlowEventType {
124
- /** Trigger an action or event */
125
- Trigger = "TRIGGER",
126
- /** Submit form data to the server */
127
- Submit = "SUBMIT",
128
- /** Navigate to a different flow step or page */
129
- Navigate = "NAVIGATE",
124
+ /** Navigate back to the previous step */
125
+ Back = "BACK",
130
126
  /** Cancel the current operation */
131
127
  Cancel = "CANCEL",
128
+ /** Navigate to a different flow step or page */
129
+ Navigate = "NAVIGATE",
132
130
  /** Reset form fields to initial state */
133
131
  Reset = "RESET",
134
- /** Navigate back to the previous step */
135
- Back = "BACK"
132
+ /** Submit form data to the server */
133
+ Submit = "SUBMIT",
134
+ /** Trigger an action or event */
135
+ Trigger = "TRIGGER"
136
136
  }
137
137
  /**
138
138
  * Enhanced component interface for embedded flow components.
@@ -159,54 +159,54 @@ export declare enum EmbeddedFlowEventType {
159
159
  */
160
160
  export interface EmbeddedFlowComponent {
161
161
  /**
162
- * Unique identifier for the component
162
+ * Nested child components for container components like Block.
163
163
  */
164
- id: string;
164
+ components?: EmbeddedFlowComponent[];
165
165
  /**
166
- * Reference identifier for the component (e.g., field name, action ref)
166
+ * Event type for action components that defines the interaction behavior.
167
+ * Only relevant for Action components.
167
168
  */
168
- ref?: string;
169
+ eventType?: EmbeddedFlowEventType | string;
169
170
  /**
170
- * Component type that determines rendering behavior
171
+ * Unique identifier for the component
171
172
  */
172
- type: EmbeddedFlowComponentType | string;
173
+ id: string;
173
174
  /**
174
175
  * Display label for the component (e.g., field label, button text).
175
176
  * Supports internationalization and may contain template strings.
176
177
  */
177
178
  label?: string;
179
+ /**
180
+ * Options for SELECT components.
181
+ * Each option can be a string value or an object with value and label.
182
+ */
183
+ options?: Array<string | {
184
+ label: string;
185
+ value: string;
186
+ }>;
178
187
  /**
179
188
  * Placeholder text for input components.
180
189
  * Provides helpful hints to users about expected input format.
181
190
  */
182
191
  placeholder?: string;
192
+ /**
193
+ * Reference identifier for the component (e.g., field name, action ref)
194
+ */
195
+ ref?: string;
183
196
  /**
184
197
  * Indicates whether this component represents a required field.
185
198
  * Used for form validation and UI indicators.
186
199
  */
187
200
  required?: boolean;
201
+ /**
202
+ * Component type that determines rendering behavior
203
+ */
204
+ type: EmbeddedFlowComponentType | string;
188
205
  /**
189
206
  * Component variant that affects visual styling and behavior.
190
207
  * The value depends on the component type (e.g., button variants, text variants).
191
208
  */
192
209
  variant?: EmbeddedFlowActionVariant | EmbeddedFlowTextVariant | string;
193
- /**
194
- * Event type for action components that defines the interaction behavior.
195
- * Only relevant for Action components.
196
- */
197
- eventType?: EmbeddedFlowEventType | string;
198
- /**
199
- * Nested child components for container components like Block.
200
- */
201
- components?: EmbeddedFlowComponent[];
202
- /**
203
- * Options for SELECT components.
204
- * Each option can be a string value or an object with value and label.
205
- */
206
- options?: Array<string | {
207
- value: string;
208
- label: string;
209
- }>;
210
210
  }
211
211
  /**
212
212
  * Response data structure for embedded flow API.
@@ -267,30 +267,35 @@ export interface EmbeddedFlowComponent {
267
267
  */
268
268
  export interface EmbeddedFlowResponseData {
269
269
  /**
270
- * Legacy input definitions for backward compatibility.
270
+ * Legacy action definitions for backward compatibility.
271
271
  * @deprecated Use meta.components for new implementations
272
272
  */
273
- inputs?: {
274
- /** Reference identifier for the input */
273
+ actions?: {
274
+ /** Event type for the action (SUBMIT, ACTIVATE, etc.) */
275
+ eventType?: string;
276
+ /** Next flow node to navigate to (optional) */
277
+ nextNode?: string;
278
+ /** Reference identifier for the action */
275
279
  ref: string;
276
- /** Field identifier used in form submission */
277
- identifier: string;
278
- /** Input type (TEXT_INPUT, PASSWORD_INPUT, etc.) */
279
- type: string;
280
- /** Whether this input is required for form submission */
281
- required: boolean;
282
280
  }[];
283
281
  /**
284
- * Legacy action definitions for backward compatibility.
282
+ * Additional data dictionary for dynamic flow response properties.
283
+ * Can be used to pass custom data like passkey challenges, server alerts, etc.
284
+ */
285
+ additionalData?: Record<string, any>;
286
+ /**
287
+ * Legacy input definitions for backward compatibility.
285
288
  * @deprecated Use meta.components for new implementations
286
289
  */
287
- actions?: {
288
- /** Reference identifier for the action */
290
+ inputs?: {
291
+ /** Field identifier used in form submission */
292
+ identifier: string;
293
+ /** Reference identifier for the input */
289
294
  ref: string;
290
- /** Next flow node to navigate to (optional) */
291
- nextNode?: string;
292
- /** Event type for the action (SUBMIT, ACTIVATE, etc.) */
293
- eventType?: string;
295
+ /** Whether this input is required for form submission */
296
+ required: boolean;
297
+ /** Input type (TEXT_INPUT, PASSWORD_INPUT, etc.) */
298
+ type: string;
294
299
  }[];
295
300
  /**
296
301
  * Modern component-driven metadata structure.
@@ -308,11 +313,6 @@ export interface EmbeddedFlowResponseData {
308
313
  * Optional redirect URL for flow completion or external authentication.
309
314
  */
310
315
  redirectURL?: string;
311
- /**
312
- * Additional data dictionary for dynamic flow response properties.
313
- * Can be used to pass custom data like passkey challenges, server alerts, etc.
314
- */
315
- additionalData?: Record<string, any>;
316
316
  }
317
317
  /**
318
318
  * Extended request configuration for Asgardeo V2 embedded flow operations.
@@ -15,8 +15,8 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { EmbeddedFlowResponseType as EmbeddedFlowResponseTypeV1, EmbeddedFlowType as EmbeddedFlowTypeV1 } from '../embedded-flow';
19
18
  import { EmbeddedFlowResponseData as EmbeddedFlowResponseDataV2 } from './embedded-flow-v2';
19
+ import { EmbeddedFlowResponseType as EmbeddedFlowResponseTypeV1, EmbeddedFlowType as EmbeddedFlowTypeV1 } from '../embedded-flow';
20
20
  /**
21
21
  * Status enumeration for Asgardeo embedded sign-in flow operations.
22
22
  *
@@ -50,14 +50,6 @@ export declare enum EmbeddedSignInFlowStatus {
50
50
  * assertion data in the response.
51
51
  */
52
52
  Complete = "COMPLETE",
53
- /**
54
- * Sign-in flow requires additional user input.
55
- *
56
- * More authentication steps are needed. The response will contain
57
- * components in data.meta.components that should be rendered to
58
- * collect additional user input (e.g., MFA, password, etc.).
59
- */
60
- Incomplete = "INCOMPLETE",
61
53
  /**
62
54
  * Sign-in flow encountered an error.
63
55
  *
@@ -65,7 +57,15 @@ export declare enum EmbeddedSignInFlowStatus {
65
57
  * or other issues. Check error details in the response and handle
66
58
  * appropriately (retry, show error message, etc.).
67
59
  */
68
- Error = "ERROR"
60
+ Error = "ERROR",
61
+ /**
62
+ * Sign-in flow requires additional user input.
63
+ *
64
+ * More authentication steps are needed. The response will contain
65
+ * components in data.meta.components that should be rendered to
66
+ * collect additional user input (e.g., MFA, password, etc.).
67
+ */
68
+ Incomplete = "INCOMPLETE"
69
69
  }
70
70
  /**
71
71
  * Type enumeration for Asgardeo embedded sign-in flow responses.
@@ -155,26 +155,6 @@ export interface ExtendedEmbeddedSignInFlowResponse {
155
155
  * @experimental This interface is part of the new Asgardeo platform
156
156
  */
157
157
  export interface EmbeddedSignInFlowResponse extends ExtendedEmbeddedSignInFlowResponse {
158
- /**
159
- * Unique identifier for this specific flow instance.
160
- * Used to maintain state across multiple API calls during the authentication process.
161
- */
162
- flowId: string;
163
- /**
164
- * Optional reason for flow failure in case of an error.
165
- * Provides additional context when flowStatus is set to ERROR.
166
- */
167
- failureReason?: string;
168
- /**
169
- * Current status of the sign-in flow.
170
- * Determines the next action required by the client application.
171
- */
172
- flowStatus: EmbeddedSignInFlowStatus;
173
- /**
174
- * Type of response indicating how to handle the returned data.
175
- * Affects both UI rendering and navigation logic.
176
- */
177
- type: EmbeddedSignInFlowType;
178
158
  /**
179
159
  * Core response data containing UI components and flow metadata.
180
160
  * Includes both modern meta.components structure and legacy fields for compatibility.
@@ -185,10 +165,10 @@ export interface EmbeddedSignInFlowResponse extends ExtendedEmbeddedSignInFlowRe
185
165
  * @deprecated Use data.meta.components for new implementations
186
166
  */
187
167
  actions?: {
188
- /** Action type identifier */
189
- type: EmbeddedFlowResponseTypeV1;
190
168
  /** Unique action identifier */
191
169
  id: string;
170
+ /** Action type identifier */
171
+ type: EmbeddedFlowResponseTypeV1;
192
172
  }[];
193
173
  /**
194
174
  * Legacy input field definitions for backward compatibility.
@@ -197,12 +177,32 @@ export interface EmbeddedSignInFlowResponse extends ExtendedEmbeddedSignInFlowRe
197
177
  inputs?: {
198
178
  /** Field name identifier */
199
179
  name: string;
200
- /** Input field type */
201
- type: string;
202
180
  /** Whether the field is required */
203
181
  required: boolean;
182
+ /** Input field type */
183
+ type: string;
204
184
  }[];
205
185
  };
186
+ /**
187
+ * Optional reason for flow failure in case of an error.
188
+ * Provides additional context when flowStatus is set to ERROR.
189
+ */
190
+ failureReason?: string;
191
+ /**
192
+ * Unique identifier for this specific flow instance.
193
+ * Used to maintain state across multiple API calls during the authentication process.
194
+ */
195
+ flowId: string;
196
+ /**
197
+ * Current status of the sign-in flow.
198
+ * Determines the next action required by the client application.
199
+ */
200
+ flowStatus: EmbeddedSignInFlowStatus;
201
+ /**
202
+ * Type of response indicating how to handle the returned data.
203
+ * Affects both UI rendering and navigation logic.
204
+ */
205
+ type: EmbeddedSignInFlowType;
206
206
  }
207
207
  /**
208
208
  * Response structure for completed Asgardeo embedded sign-in flows.
@@ -297,16 +297,16 @@ export type EmbeddedSignInFlowInitiateRequest = {
297
297
  * @experimental This interface is part of the new Asgardeo platform
298
298
  */
299
299
  export interface EmbeddedSignInFlowRequest extends Partial<EmbeddedSignInFlowInitiateRequest> {
300
- /**
301
- * Identifier of the flow instance to continue.
302
- * Required when submitting data for an existing flow.
303
- */
304
- flowId?: string;
305
300
  /**
306
301
  * Identifier of the specific action being triggered.
307
302
  * Corresponds to action components in the UI (e.g., submit button, social login).
308
303
  */
309
304
  action?: string;
305
+ /**
306
+ * Identifier of the flow instance to continue.
307
+ * Required when submitting data for an existing flow.
308
+ */
309
+ flowId?: string;
310
310
  /**
311
311
  * User input data collected from the form components.
312
312
  * Keys should match the component identifiers from the response.
@@ -51,14 +51,6 @@ export declare enum EmbeddedSignUpFlowStatus {
51
51
  * data in the response for next steps.
52
52
  */
53
53
  Complete = "COMPLETE",
54
- /**
55
- * Sign-up flow requires additional user input.
56
- *
57
- * More registration steps are needed. The response will contain
58
- * components in data.meta.components that should be rendered to
59
- * collect additional user information (e.g., profile data, verification).
60
- */
61
- Incomplete = "INCOMPLETE",
62
54
  /**
63
55
  * Sign-up flow encountered an error and cannot proceed.
64
56
  *
@@ -69,7 +61,15 @@ export declare enum EmbeddedSignUpFlowStatus {
69
61
  *
70
62
  * @see {@link EmbeddedSignUpFlowErrorResponse} for error response structure
71
63
  */
72
- Error = "ERROR"
64
+ Error = "ERROR",
65
+ /**
66
+ * Sign-up flow requires additional user input.
67
+ *
68
+ * More registration steps are needed. The response will contain
69
+ * components in data.meta.components that should be rendered to
70
+ * collect additional user information (e.g., profile data, verification).
71
+ */
72
+ Incomplete = "INCOMPLETE"
73
73
  }
74
74
  /**
75
75
  * Type enumeration for Asgardeo embedded sign-up flow responses.
@@ -130,24 +130,6 @@ export interface ExtendedEmbeddedSignUpFlowResponse {
130
130
  * @see {@link EmbeddedSignUpFlowStatus} for available flow statuses
131
131
  */
132
132
  export interface EmbeddedSignUpFlowResponse extends ExtendedEmbeddedSignUpFlowResponse {
133
- /**
134
- * Unique identifier for this sign-up flow instance.
135
- */
136
- flowId: string;
137
- /**
138
- * Optional reason for flow failure in case of an error.
139
- * Provides additional context when flowStatus is set to ERROR.
140
- */
141
- failureReason?: string;
142
- /**
143
- * Current status of the sign-up flow.
144
- * Determines whether more input is needed or the flow is complete.
145
- */
146
- flowStatus: EmbeddedSignUpFlowStatus;
147
- /**
148
- * Type of response, indicating the expected user interaction.
149
- */
150
- type: EmbeddedSignUpFlowType;
151
133
  /**
152
134
  * Flow data containing form inputs and available actions.
153
135
  * This is transformed to component-driven format by the React transformer.
@@ -157,18 +139,36 @@ export interface EmbeddedSignUpFlowResponse extends ExtendedEmbeddedSignUpFlowRe
157
139
  * Available actions the user can take (e.g., form submission, social sign-up).
158
140
  */
159
141
  actions?: {
160
- type: EmbeddedFlowResponseTypeV1;
161
142
  id: string;
143
+ type: EmbeddedFlowResponseTypeV1;
162
144
  }[];
163
145
  /**
164
146
  * Input fields required for the current step of the sign-up flow.
165
147
  */
166
148
  inputs?: {
167
149
  name: string;
168
- type: string;
169
150
  required: boolean;
151
+ type: string;
170
152
  }[];
171
153
  };
154
+ /**
155
+ * Optional reason for flow failure in case of an error.
156
+ * Provides additional context when flowStatus is set to ERROR.
157
+ */
158
+ failureReason?: string;
159
+ /**
160
+ * Unique identifier for this sign-up flow instance.
161
+ */
162
+ flowId: string;
163
+ /**
164
+ * Current status of the sign-up flow.
165
+ * Determines whether more input is needed or the flow is complete.
166
+ */
167
+ flowStatus: EmbeddedSignUpFlowStatus;
168
+ /**
169
+ * Type of response, indicating the expected user interaction.
170
+ */
171
+ type: EmbeddedSignUpFlowType;
172
172
  }
173
173
  /**
174
174
  * Response structure for the new Asgardeo embedded sign-up flow when the flow is complete.
@@ -190,8 +190,8 @@ export type EmbeddedSignUpFlowInitiateRequest = {
190
190
  * @experimental
191
191
  */
192
192
  export interface EmbeddedSignUpFlowRequest extends Partial<EmbeddedSignUpFlowInitiateRequest> {
193
- flowId?: string;
194
193
  action?: string;
194
+ flowId?: string;
195
195
  inputs?: Record<string, any>;
196
196
  }
197
197
  /**
@@ -231,18 +231,6 @@ export interface EmbeddedSignUpFlowRequest extends Partial<EmbeddedSignUpFlowIni
231
231
  * @see {@link EmbeddedSignUpFlowResponse} for the corresponding success response structure
232
232
  */
233
233
  export interface EmbeddedSignUpFlowErrorResponse {
234
- /**
235
- * Unique identifier for the sign-up flow instance.
236
- * This ID is used to track the flow state and correlate error responses
237
- * with the specific sign-up attempt that failed.
238
- */
239
- flowId: string;
240
- /**
241
- * Status of the sign-up flow, which will be `EmbeddedSignUpFlowStatus.Error`
242
- * for error responses. This field is used by error detection logic to
243
- * identify failed flow responses.
244
- */
245
- flowStatus: EmbeddedSignUpFlowStatus;
246
234
  /**
247
235
  * Additional response data, typically empty for error responses.
248
236
  * Maintained for structural consistency with successful flow responses
@@ -262,4 +250,16 @@ export interface EmbeddedSignUpFlowErrorResponse {
262
250
  * that helps users understand and resolve the issue.
263
251
  */
264
252
  failureReason: string;
253
+ /**
254
+ * Unique identifier for the sign-up flow instance.
255
+ * This ID is used to track the flow state and correlate error responses
256
+ * with the specific sign-up attempt that failed.
257
+ */
258
+ flowId: string;
259
+ /**
260
+ * Status of the sign-up flow, which will be `EmbeddedSignUpFlowStatus.Error`
261
+ * for error responses. This field is used by error detection logic to
262
+ * identify failed flow responses.
263
+ */
264
+ flowStatus: EmbeddedSignUpFlowStatus;
265
265
  }