@thunderid/javascript 0.3.0 → 0.3.6

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 (129) hide show
  1. package/dist/StorageManager.d.ts +2 -2
  2. package/dist/StorageManager.d.ts.map +1 -1
  3. package/dist/ThunderIDJavaScriptClient.d.ts +2 -7
  4. package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -1
  5. package/dist/api/{v2/executeEmbeddedRecoveryFlowV2.d.ts → executeEmbeddedRecoveryFlow.d.ts} +7 -7
  6. package/dist/api/executeEmbeddedRecoveryFlow.d.ts.map +1 -0
  7. package/dist/api/executeEmbeddedSignInFlow.d.ts +3 -3
  8. package/dist/api/executeEmbeddedSignInFlow.d.ts.map +1 -1
  9. package/dist/api/executeEmbeddedSignUpFlow.d.ts +4 -27
  10. package/dist/api/executeEmbeddedSignUpFlow.d.ts.map +1 -1
  11. package/dist/api/{v2/executeEmbeddedUserOnboardingFlowV2.d.ts → executeEmbeddedUserOnboardingFlow.d.ts} +6 -6
  12. package/dist/api/executeEmbeddedUserOnboardingFlow.d.ts.map +1 -0
  13. package/dist/api/getBrandingPreference.d.ts.map +1 -1
  14. package/dist/api/{v2/getFlowMetaV2.d.ts → getFlowMeta.d.ts} +7 -7
  15. package/dist/api/getFlowMeta.d.ts.map +1 -0
  16. package/dist/api/{v2/getOrganizationUnitChildren.d.ts → getOrganizationUnitChildren.d.ts} +1 -1
  17. package/dist/api/getOrganizationUnitChildren.d.ts.map +1 -0
  18. package/dist/cjs/index.cjs +1096 -1342
  19. package/dist/edge/index.js +1084 -1319
  20. package/dist/i18n/models/i18n.d.ts +3 -0
  21. package/dist/i18n/models/i18n.d.ts.map +1 -1
  22. package/dist/i18n/translations/en-US.d.ts.map +1 -1
  23. package/dist/i18n/translations/fr-FR.d.ts.map +1 -1
  24. package/dist/i18n/translations/hi-IN.d.ts.map +1 -1
  25. package/dist/i18n/translations/ja-JP.d.ts.map +1 -1
  26. package/dist/i18n/translations/pt-BR.d.ts.map +1 -1
  27. package/dist/i18n/translations/pt-PT.d.ts.map +1 -1
  28. package/dist/i18n/translations/si-LK.d.ts.map +1 -1
  29. package/dist/i18n/translations/ta-IN.d.ts.map +1 -1
  30. package/dist/i18n/translations/te-IN.d.ts.map +1 -1
  31. package/dist/index.d.ts +29 -36
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +1084 -1319
  34. package/dist/models/client.d.ts +3 -28
  35. package/dist/models/client.d.ts.map +1 -1
  36. package/dist/models/config.d.ts +1 -1
  37. package/dist/models/config.d.ts.map +1 -1
  38. package/dist/models/embedded-flow.d.ts +572 -92
  39. package/dist/models/embedded-flow.d.ts.map +1 -1
  40. package/dist/models/{v2/embedded-recovery-flow-v2.d.ts → embedded-recovery-flow.d.ts} +2 -3
  41. package/dist/models/embedded-recovery-flow.d.ts.map +1 -0
  42. package/dist/models/embedded-signin-flow.d.ts +310 -66
  43. package/dist/models/embedded-signin-flow.d.ts.map +1 -1
  44. package/dist/models/{v2/embedded-signup-flow-v2.d.ts → embedded-signup-flow.d.ts} +4 -5
  45. package/dist/models/embedded-signup-flow.d.ts.map +1 -0
  46. package/dist/models/extensions/components.d.ts +55 -0
  47. package/dist/models/extensions/components.d.ts.map +1 -0
  48. package/dist/models/{v2/flow-meta-v2.d.ts → flow-meta.d.ts} +1 -1
  49. package/dist/models/flow-meta.d.ts.map +1 -0
  50. package/dist/models/organization-unit.d.ts.map +1 -0
  51. package/dist/models/translation.d.ts.map +1 -0
  52. package/dist/models/{v2/vars.d.ts → vars.d.ts} +1 -1
  53. package/dist/models/vars.d.ts.map +1 -0
  54. package/dist/utils/buildValidatorFromRules.d.ts +31 -0
  55. package/dist/utils/buildValidatorFromRules.d.ts.map +1 -0
  56. package/dist/utils/containsMetaFlowTemplateLiteral.d.ts.map +1 -0
  57. package/dist/utils/countryCodeToFlagEmoji.d.ts.map +1 -0
  58. package/dist/utils/evaluateValidationRule.d.ts +42 -0
  59. package/dist/utils/evaluateValidationRule.d.ts.map +1 -0
  60. package/dist/utils/extractEmojiFromUri.d.ts.map +1 -0
  61. package/dist/utils/getRedirectBasedSignUpUrl.d.ts +1 -1
  62. package/dist/utils/getRedirectBasedSignUpUrl.d.ts.map +1 -1
  63. package/dist/utils/injectRequestedPermissions.d.ts.map +1 -0
  64. package/dist/utils/isEmojiUri.d.ts.map +1 -0
  65. package/dist/utils/isMetaFlowTemplateLiteral.d.ts.map +1 -0
  66. package/dist/utils/isTranslationFlowTemplateLiteral.d.ts.map +1 -0
  67. package/dist/utils/parseApiErrorMessage.d.ts.map +1 -1
  68. package/dist/utils/parseFlowTemplateLiteral.d.ts.map +1 -0
  69. package/dist/utils/{v2/resolveFlowTemplateLiterals.d.ts → resolveFlowTemplateLiterals.d.ts} +2 -2
  70. package/dist/utils/resolveFlowTemplateLiterals.d.ts.map +1 -0
  71. package/dist/utils/resolveLocaleDisplayName.d.ts.map +1 -0
  72. package/dist/utils/resolveLocaleEmoji.d.ts.map +1 -0
  73. package/dist/utils/{v2/resolveMeta.d.ts → resolveMeta.d.ts} +1 -1
  74. package/dist/utils/resolveMeta.d.ts.map +1 -0
  75. package/package.json +7 -7
  76. package/dist/api/initializeEmbeddedSignInFlow.d.ts +0 -52
  77. package/dist/api/initializeEmbeddedSignInFlow.d.ts.map +0 -1
  78. package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts.map +0 -1
  79. package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts +0 -22
  80. package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts.map +0 -1
  81. package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts +0 -22
  82. package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts.map +0 -1
  83. package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts.map +0 -1
  84. package/dist/api/v2/getFlowMetaV2.d.ts.map +0 -1
  85. package/dist/api/v2/getOrganizationUnitChildren.d.ts.map +0 -1
  86. package/dist/constants/v2/OIDCDiscoveryConstants.d.ts +0 -40
  87. package/dist/constants/v2/OIDCDiscoveryConstants.d.ts.map +0 -1
  88. package/dist/models/platforms.d.ts +0 -33
  89. package/dist/models/platforms.d.ts.map +0 -1
  90. package/dist/models/v2/embedded-flow-v2.d.ts +0 -550
  91. package/dist/models/v2/embedded-flow-v2.d.ts.map +0 -1
  92. package/dist/models/v2/embedded-recovery-flow-v2.d.ts.map +0 -1
  93. package/dist/models/v2/embedded-signin-flow-v2.d.ts +0 -345
  94. package/dist/models/v2/embedded-signin-flow-v2.d.ts.map +0 -1
  95. package/dist/models/v2/embedded-signup-flow-v2.d.ts.map +0 -1
  96. package/dist/models/v2/extensions/components.d.ts +0 -89
  97. package/dist/models/v2/extensions/components.d.ts.map +0 -1
  98. package/dist/models/v2/flow-meta-v2.d.ts.map +0 -1
  99. package/dist/models/v2/organization-unit.d.ts.map +0 -1
  100. package/dist/models/v2/translation.d.ts.map +0 -1
  101. package/dist/models/v2/vars.d.ts.map +0 -1
  102. package/dist/utils/identifyPlatform.d.ts +0 -31
  103. package/dist/utils/identifyPlatform.d.ts.map +0 -1
  104. package/dist/utils/resolveFieldType.d.ts +0 -21
  105. package/dist/utils/resolveFieldType.d.ts.map +0 -1
  106. package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts.map +0 -1
  107. package/dist/utils/v2/countryCodeToFlagEmoji.d.ts.map +0 -1
  108. package/dist/utils/v2/extractEmojiFromUri.d.ts.map +0 -1
  109. package/dist/utils/v2/injectRequestedPermissions.d.ts.map +0 -1
  110. package/dist/utils/v2/isEmojiUri.d.ts.map +0 -1
  111. package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts.map +0 -1
  112. package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts.map +0 -1
  113. package/dist/utils/v2/parseFlowTemplateLiteral.d.ts.map +0 -1
  114. package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts.map +0 -1
  115. package/dist/utils/v2/resolveLocaleDisplayName.d.ts.map +0 -1
  116. package/dist/utils/v2/resolveLocaleEmoji.d.ts.map +0 -1
  117. package/dist/utils/v2/resolveMeta.d.ts.map +0 -1
  118. /package/dist/models/{v2/organization-unit.d.ts → organization-unit.d.ts} +0 -0
  119. /package/dist/models/{v2/translation.d.ts → translation.d.ts} +0 -0
  120. /package/dist/utils/{v2/containsMetaFlowTemplateLiteral.d.ts → containsMetaFlowTemplateLiteral.d.ts} +0 -0
  121. /package/dist/utils/{v2/countryCodeToFlagEmoji.d.ts → countryCodeToFlagEmoji.d.ts} +0 -0
  122. /package/dist/utils/{v2/extractEmojiFromUri.d.ts → extractEmojiFromUri.d.ts} +0 -0
  123. /package/dist/utils/{v2/injectRequestedPermissions.d.ts → injectRequestedPermissions.d.ts} +0 -0
  124. /package/dist/utils/{v2/isEmojiUri.d.ts → isEmojiUri.d.ts} +0 -0
  125. /package/dist/utils/{v2/isMetaFlowTemplateLiteral.d.ts → isMetaFlowTemplateLiteral.d.ts} +0 -0
  126. /package/dist/utils/{v2/isTranslationFlowTemplateLiteral.d.ts → isTranslationFlowTemplateLiteral.d.ts} +0 -0
  127. /package/dist/utils/{v2/parseFlowTemplateLiteral.d.ts → parseFlowTemplateLiteral.d.ts} +0 -0
  128. /package/dist/utils/{v2/resolveLocaleDisplayName.d.ts → resolveLocaleDisplayName.d.ts} +0 -0
  129. /package/dist/utils/{v2/resolveLocaleEmoji.d.ts → resolveLocaleEmoji.d.ts} +0 -0
@@ -1,550 +0,0 @@
1
- /**
2
- * Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
3
- *
4
- * WSO2 LLC. licenses this file to you under the Apache License,
5
- * Version 2.0 (the "License"); you may not use this file except
6
- * in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV1 } from '../embedded-flow';
19
- /**
20
- * Internationalized message structure returned by the backend.
21
- *
22
- * The `defaultValue` field carries the untranslated fallback text.
23
- */
24
- export interface I18nMessage {
25
- defaultValue?: string;
26
- key: string;
27
- }
28
- /**
29
- * Structured error returned in a flow response when flowStatus is ERROR.
30
- */
31
- export interface FlowExecutionError {
32
- code: string;
33
- description: I18nMessage;
34
- message: I18nMessage;
35
- }
36
- /**
37
- * Component types supported by the ThunderID embedded flow API.
38
- *
39
- * These types define the different UI components that can be rendered
40
- * as part of the embedded authentication flows. Each type corresponds
41
- * to a specific UI element with its own behavior and properties.
42
- *
43
- * @example
44
- * ```typescript
45
- * // Check component type to render appropriate UI
46
- * if (component.type === EmbeddedFlowComponentType.TextInput) {
47
- * // Render text input field
48
- * } else if (component.type === EmbeddedFlowComponentType.Action) {
49
- * // Render button/action
50
- * }
51
- * ```
52
- *
53
- * @experimental This API may change in future versions
54
- */
55
- export declare enum EmbeddedFlowComponentType {
56
- /** Interactive action component (buttons, links) for user interactions */
57
- Action = "ACTION",
58
- /** Container block component that groups other components */
59
- Block = "BLOCK",
60
- /** Consent component for displaying consent purposes and attributes */
61
- Consent = "CONSENT",
62
- /** Copyable text display component that shows text with a copy-to-clipboard action */
63
- CopyableText = "COPYABLE_TEXT",
64
- /** Divider component for visual separation of content */
65
- Divider = "DIVIDER",
66
- /** Email input field with validation for email addresses. */
67
- EmailInput = "EMAIL_INPUT",
68
- /** Icon display component for rendering named vector icons */
69
- Icon = "ICON",
70
- /** Image display component for logos and illustrations */
71
- Image = "IMAGE",
72
- /** One-time password input field for multi-factor authentication */
73
- OtpInput = "OTP_INPUT",
74
- /** Organization unit tree picker for selecting an OU */
75
- OuSelect = "OU_SELECT",
76
- /** Password input field with masking for sensitive data */
77
- PasswordInput = "PASSWORD_INPUT",
78
- /** Phone number input field with country code support */
79
- PhoneInput = "PHONE_INPUT",
80
- /** Rich text display component that renders formatted HTML content */
81
- RichText = "RICH_TEXT",
82
- /** Select/dropdown input component for single choice selection */
83
- Select = "SELECT",
84
- /** Stack layout component for arranging children in a row or column */
85
- Stack = "STACK",
86
- /** Text display component for labels, headings, and messages */
87
- Text = "TEXT",
88
- /** Standard text input field for user data entry */
89
- TextInput = "TEXT_INPUT",
90
- /** Timer component for displaying a countdown */
91
- Timer = "TIMER",
92
- /** QR code display component for wallet-based flows (e.g. OpenID4VP) */
93
- QrCode = "QR_CODE"
94
- }
95
- /**
96
- * Action variant types for buttons and interactive elements.
97
- *
98
- * @experimental This API may change in future versions
99
- */
100
- export declare enum EmbeddedFlowActionVariant {
101
- /** Danger action button for destructive operations */
102
- Danger = "DANGER",
103
- /** Info action button for informational purposes */
104
- Info = "INFO",
105
- /** Link-styled action button */
106
- Link = "LINK",
107
- /** Outlined action button for secondary emphasis */
108
- Outlined = "OUTLINED",
109
- /** Primary action button with highest visual emphasis */
110
- Primary = "PRIMARY",
111
- /** Secondary action button with moderate visual emphasis */
112
- Secondary = "SECONDARY",
113
- /** Success action button for positive confirmations */
114
- Success = "SUCCESS",
115
- /** Tertiary action button with minimal visual emphasis */
116
- Tertiary = "TERTIARY",
117
- /** Warning action button for cautionary actions */
118
- Warning = "WARNING"
119
- }
120
- /**
121
- * Text variant types for typography components.
122
- *
123
- * @experimental This API may change in future versions
124
- */
125
- export declare enum EmbeddedFlowTextVariant {
126
- /** Primary body text for main content */
127
- Body1 = "BODY_1",
128
- /** Secondary body text for supplementary content */
129
- Body2 = "BODY_2",
130
- /** Text styled for button labels */
131
- ButtonText = "BUTTON_TEXT",
132
- /** Small caption text for annotations and descriptions */
133
- Caption = "CAPTION",
134
- /** Largest heading level for main titles */
135
- Heading1 = "HEADING_1",
136
- /** Second level heading for major sections */
137
- Heading2 = "HEADING_2",
138
- /** Third level heading for subsections */
139
- Heading3 = "HEADING_3",
140
- /** Fourth level heading for minor sections */
141
- Heading4 = "HEADING_4",
142
- /** Fifth level heading for detailed sections */
143
- Heading5 = "HEADING_5",
144
- /** Smallest heading level for fine-grained sections */
145
- Heading6 = "HEADING_6",
146
- /** Overline text for labels and categories */
147
- Overline = "OVERLINE",
148
- /** Primary subtitle text with larger emphasis */
149
- Subtitle1 = "SUBTITLE_1",
150
- /** Secondary subtitle text with moderate emphasis */
151
- Subtitle2 = "SUBTITLE_2"
152
- }
153
- /**
154
- * Event types for action components.
155
- *
156
- * @experimental This API may change in future versions
157
- */
158
- export declare enum EmbeddedFlowEventType {
159
- /** Navigate back to the previous step */
160
- Back = "BACK",
161
- /** Cancel the current operation */
162
- Cancel = "CANCEL",
163
- /** Navigate to a different flow step or page */
164
- Navigate = "NAVIGATE",
165
- /** Reset form fields to initial state */
166
- Reset = "RESET",
167
- /** Submit form data to the server */
168
- Submit = "SUBMIT",
169
- /** Trigger an action or event */
170
- Trigger = "TRIGGER"
171
- }
172
- /**
173
- * Enhanced component interface for embedded flow components.
174
- *
175
- * This interface provides better support for modern form handling and user experience.
176
- * It includes properties for labels, placeholders, and required field validation
177
- * that are directly provided by the API response.
178
- *
179
- * @example
180
- * ```typescript
181
- * const component: EmbeddedFlowComponent = {
182
- * id: 'username_field',
183
- * type: EmbeddedFlowComponentType.TextInput,
184
- * label: 'Username',
185
- * placeholder: 'Enter your username',
186
- * required: true,
187
- * variant: 'TEXT',
188
- * eventType: 'SUBMIT',
189
- * components: []
190
- * };
191
- * ```
192
- *
193
- * @experimental This interface may change in future versions
194
- */
195
- export interface EmbeddedFlowComponent {
196
- /**
197
- * Alignment of children along the cross axis (for Stack components).
198
- */
199
- align?: string;
200
- /**
201
- * Alternative text for Image components.
202
- */
203
- alt?: string;
204
- /**
205
- * Icon color, CSS color value (for Icon components).
206
- */
207
- color?: string;
208
- /**
209
- * Nested child components for container components like Block and Stack.
210
- */
211
- components?: EmbeddedFlowComponent[];
212
- /**
213
- * Layout direction for Stack components ('row' | 'column').
214
- */
215
- direction?: string;
216
- /**
217
- * Icon to render at the end of an Action button (URL string).
218
- */
219
- endIcon?: string;
220
- /**
221
- * Event type for action components that defines the interaction behavior.
222
- * Only relevant for Action components.
223
- */
224
- eventType?: EmbeddedFlowEventType | string;
225
- /**
226
- * Gap between children in Stack components (number, maps to spacing units).
227
- */
228
- gap?: number;
229
- /**
230
- * Height of the component (for Image components, can be string with units or number for pixels).
231
- * The value depends on the component type (e.g., for Image components).
232
- */
233
- height?: string | number;
234
- /**
235
- * Unique identifier for the component
236
- */
237
- id: string;
238
- /**
239
- * Number of items across the main axis (for Stack grid-like layouts).
240
- */
241
- items?: string | number;
242
- /**
243
- * Justification of children along the main axis (for Stack components).
244
- */
245
- justify?: string;
246
- /**
247
- * Display label for the component (e.g., field label, button text).
248
- * Supports internationalization and may contain template strings.
249
- */
250
- label?: string;
251
- /**
252
- * Icon name for Icon components (e.g., lucide-react icon names like 'ArrowLeftRight').
253
- */
254
- name?: string;
255
- /**
256
- * Options for SELECT components.
257
- * Each option can be a string value or an object with value and label.
258
- */
259
- options?: (string | {
260
- label: string;
261
- value: string;
262
- })[];
263
- /**
264
- * Placeholder text for input components.
265
- * Provides helpful hints to users about expected input format.
266
- */
267
- placeholder?: string;
268
- /**
269
- * Reference identifier for the component (e.g., field name, action ref)
270
- */
271
- ref?: string;
272
- /**
273
- * Indicates whether this component represents a required field.
274
- * Used for form validation and UI indicators.
275
- */
276
- required?: boolean;
277
- /**
278
- * Icon size in pixels (for Icon components).
279
- */
280
- size?: number;
281
- /**
282
- * Data source key for dynamic components (e.g., COPYABLE_TEXT).
283
- * References a key in additionalData whose value is resolved at render time.
284
- */
285
- source?: string;
286
- /**
287
- * Image source URL (for Image components).
288
- */
289
- src?: string;
290
- /**
291
- * Icon to render at the start of an Action button (URL string).
292
- */
293
- startIcon?: string;
294
- /**
295
- * Component type that determines rendering behavior
296
- */
297
- type: EmbeddedFlowComponentType | string;
298
- /**
299
- * Component variant that affects visual styling and behavior.
300
- * The value depends on the component type (e.g., button variants, text variants).
301
- */
302
- variant?: EmbeddedFlowActionVariant | EmbeddedFlowTextVariant | string;
303
- /**
304
- * Width of the component (for Image components, can be string with units or number for pixels).
305
- * The value depends on the component type (e.g., for Image components).
306
- */
307
- width?: string | number;
308
- }
309
- /**
310
- * Response data structure for embedded flow API.
311
- *
312
- * This interface defines the structure of data returned by the API,
313
- * which includes both legacy input/action arrays for backward compatibility
314
- * and the new meta.components structure for modern component-driven UIs.
315
- *
316
- * The key improvement is the meta.components field, which provides
317
- * a rich component tree with proper labels, placeholders, and hierarchy
318
- * that can be directly rendered without additional transformation.
319
- *
320
- * @example
321
- * ```typescript
322
- * const response: EmbeddedFlowResponseData = {
323
- * // Legacy format (for backward compatibility)
324
- * inputs: [
325
- * { ref: 'input_001', identifier: 'username', type: 'TEXT_INPUT', required: true }
326
- * ],
327
- * actions: [
328
- * { ref: 'action_001', nextNode: 'basic_auth', eventType: 'SUBMIT' }
329
- * ],
330
- * // Modern format (recommended)
331
- * meta: {
332
- * components: [
333
- * {
334
- * id: 'text_001',
335
- * type: 'TEXT',
336
- * label: '{{ t(signin:heading.label) }}',
337
- * variant: 'HEADING_1'
338
- * },
339
- * {
340
- * id: 'block_001',
341
- * type: 'BLOCK',
342
- * components: [
343
- * {
344
- * id: 'input_001',
345
- * type: 'TEXT_INPUT',
346
- * label: '{{ t(signin:fields.username.label) }}',
347
- * placeholder: '{{ t(signin:fields.username.placeholder) }}',
348
- * required: true
349
- * },
350
- * {
351
- * id: 'action_001',
352
- * type: 'ACTION',
353
- * label: '{{ t(signin:buttons.submit.label) }}',
354
- * variant: 'PRIMARY',
355
- * eventType: 'ACTIVATE'
356
- * }
357
- * ]
358
- * }
359
- * ]
360
- * }
361
- * };
362
- * ```
363
- *
364
- * @experimental This structure may change in future versions
365
- */
366
- export interface EmbeddedFlowResponseData {
367
- /**
368
- * Legacy action definitions for backward compatibility.
369
- * @deprecated Use meta.components for new implementations
370
- */
371
- actions?: {
372
- /** Event type for the action (SUBMIT, ACTIVATE, etc.) */
373
- eventType?: string;
374
- /** Next flow node to navigate to (optional) */
375
- nextNode?: string;
376
- /** Reference identifier for the action */
377
- ref: string;
378
- }[];
379
- /**
380
- * Additional data dictionary for dynamic flow response properties.
381
- * Can be used to pass custom data like passkey challenges, server alerts, etc.
382
- */
383
- additionalData?: Record<string, any>;
384
- /**
385
- * Legacy input definitions for backward compatibility.
386
- * @deprecated Use meta.components for new implementations
387
- */
388
- inputs?: {
389
- /** Field identifier used in form submission */
390
- identifier: string;
391
- /** Reference identifier for the input */
392
- ref: string;
393
- /** Whether this input is required for form submission */
394
- required: boolean;
395
- /** Input type (TEXT_INPUT, PASSWORD_INPUT, etc.) */
396
- type: string;
397
- }[];
398
- /**
399
- * Modern component-driven metadata structure.
400
- * This contains the complete UI component tree with proper
401
- * hierarchy, labels, and configuration that can be directly rendered.
402
- *
403
- * **This is the primary data source for implementations.**
404
- * The legacy inputs/actions arrays are maintained only for backward compatibility.
405
- */
406
- meta?: {
407
- /** Array of components that define the complete UI structure */
408
- components: EmbeddedFlowComponent[];
409
- };
410
- /**
411
- * Optional redirect URL for flow completion or external authentication.
412
- */
413
- redirectURL?: string;
414
- }
415
- /**
416
- * Discriminator identifying the kind of consent a purpose represents. The same
417
- * `ConsentPurposeData` envelope is used for both attribute and permission consent;
418
- * the populated fields differ based on this discriminator.
419
- *
420
- * @experimental This type may change in future versions
421
- */
422
- export type ConsentPurposeType = 'attributes' | 'permissions';
423
- /**
424
- * Individual consent attribute/element decision.
425
- *
426
- * @experimental This interface may change in future versions
427
- */
428
- export interface ConsentAttributeElement {
429
- /** Whether the user approved collection of this attribute */
430
- approved: boolean;
431
- /** The name of the attribute being consented */
432
- name: string;
433
- }
434
- /**
435
- * A single element presented for consent within a consent purpose. For attribute purposes
436
- * the element is an attribute name. For permission purposes the element is a permission
437
- * string and `parent` may carry rollup linkage supplied by the server: when set, the UI
438
- * may render this permission as a child of `parent` and offer a single rollup toggle.
439
- *
440
- * @experimental This interface may change in future versions
441
- */
442
- export interface PromptElement {
443
- /** Canonical element name (attribute name or permission string) */
444
- name: string;
445
- /**
446
- * Canonical name of the rollup parent, permission-purpose only. Undefined for attribute
447
- * elements and for top-level permissions.
448
- */
449
- parent?: string;
450
- }
451
- /**
452
- * Consent decision for a single purpose.
453
- *
454
- * @experimental This interface may change in future versions
455
- */
456
- export interface ConsentPurposeDecision {
457
- /** Whether the user approved this purpose */
458
- approved: boolean;
459
- /** Per-attribute decisions for this purpose */
460
- elements: ConsentAttributeElement[];
461
- /** The name of the consent purpose */
462
- purposeName: string;
463
- }
464
- /**
465
- * Full consent decisions structure sent to the backend when user submits the consent form.
466
- *
467
- * @experimental This interface may change in future versions
468
- */
469
- export interface ConsentDecisions {
470
- /** Array of per-purpose decisions */
471
- purposes: ConsentPurposeDecision[];
472
- }
473
- /**
474
- * Single consent purpose data returned by the backend in additionalData.consent_prompt.
475
- * The same envelope carries both attribute and permission purposes, distinguished by `type`.
476
- *
477
- * @experimental This interface may change in future versions
478
- */
479
- export interface ConsentPurposeData {
480
- /** Optional human-readable description of the purpose */
481
- description?: string;
482
- /**
483
- * Elements that are mandatory and cannot be declined. Used by attribute purposes;
484
- * permission purposes today have no essential elements.
485
- */
486
- essential: PromptElement[];
487
- /**
488
- * Elements the user can opt in or out of. For attribute purposes these are optional
489
- * attribute names. For permission purposes these are permission elements (which may
490
- * carry rollup parent linkage).
491
- */
492
- optional: PromptElement[];
493
- /** Unique identifier for the purpose */
494
- purposeId: string;
495
- /** Human-readable purpose name */
496
- purposeName?: string;
497
- /**
498
- * Discriminator selecting between attribute and permission consent semantics.
499
- */
500
- type?: ConsentPurposeType;
501
- }
502
- /**
503
- * Consent prompt data structure stored in additionalData.consent_prompt.
504
- *
505
- * @experimental This interface may change in future versions
506
- */
507
- export interface ConsentPromptData {
508
- /** Array of consent purposes requiring user review */
509
- purposes: ConsentPurposeData[];
510
- }
511
- /**
512
- * Extended request configuration for ThunderID V2 embedded flow operations.
513
- *
514
- * This interface extends the base request configuration with V2-specific
515
- * properties required for the enhanced embedded flow API. The authId parameter
516
- * is particularly important for the V2 OAuth2 flow completion process.
517
- *
518
- * @template T The type of the payload data being sent with the request
519
- *
520
- * @example
521
- * ```typescript
522
- * const config: EmbeddedFlowExecuteRequestConfigV2 = {
523
- * baseUrl: 'https://localhost:8090',
524
- * payload: {
525
- * flowType: 'AUTHENTICATION',
526
- * inputs: { username: 'user@example.com' }
527
- * },
528
- * authId: 'auth_12345', // V2-specific for OAuth completion
529
- * headers: {
530
- * 'Authorization': 'Bearer token'
531
- * }
532
- * };
533
- * ```
534
- *
535
- * @experimental This configuration is part of the new ThunderID V2 platform
536
- */
537
- export interface EmbeddedFlowExecuteRequestConfig<T = any> extends EmbeddedFlowExecuteRequestConfigV1<T> {
538
- /**
539
- * Authentication ID used for OAuth2 flow completion in V2 API.
540
- *
541
- * When the embedded flow completes successfully and returns an assertion,
542
- * this authId is used to complete the OAuth2 authorization flow by calling
543
- * the `/oauth2/auth/callback` endpoint. This enables seamless transition from
544
- * embedded flow to traditional OAuth2 flow completion.
545
- *
546
- * @example "auth_abc123def456"
547
- */
548
- authId?: string;
549
- }
550
- //# sourceMappingURL=embedded-flow-v2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-flow-v2.d.ts","sourceRoot":"","sources":["../../../src/models/v2/embedded-flow-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kBAAkB,CAAC;AAExG;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;G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,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gCAAgC,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,kCAAkC,CAAC,CAAC,CAAC;IACtG;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-recovery-flow-v2.d.ts","sourceRoot":"","sources":["../../../src/models/v2/embedded-recovery-flow-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,QAAQ,aAAa;IAErB;;;;OAIG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,IAAI,SAAS;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE;QACJ;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAErC;;WAEG;QACH,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;QAEnB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IAEF;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAE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