@asgardeo/javascript 0.9.0 → 0.9.2

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.
@@ -40,6 +40,8 @@ export declare enum EmbeddedFlowComponentType {
40
40
  Action = "ACTION",
41
41
  /** Container block component that groups other components */
42
42
  Block = "BLOCK",
43
+ /** Consent component for displaying consent purposes and attributes */
44
+ Consent = "CONSENT",
43
45
  /** Divider component for visual separation of content */
44
46
  Divider = "DIVIDER",
45
47
  /** Email input field with validation for email addresses. */
@@ -63,7 +65,9 @@ export declare enum EmbeddedFlowComponentType {
63
65
  /** Text display component for labels, headings, and messages */
64
66
  Text = "TEXT",
65
67
  /** Standard text input field for user data entry */
66
- TextInput = "TEXT_INPUT"
68
+ TextInput = "TEXT_INPUT",
69
+ /** Timer component for displaying a countdown */
70
+ Timer = "TIMER"
67
71
  }
68
72
  /**
69
73
  * Action variant types for buttons and interactive elements.
@@ -77,12 +81,12 @@ export declare enum EmbeddedFlowActionVariant {
77
81
  Info = "INFO",
78
82
  /** Link-styled action button */
79
83
  Link = "LINK",
84
+ /** Outlined action button for secondary emphasis */
85
+ Outlined = "OUTLINED",
80
86
  /** Primary action button with highest visual emphasis */
81
87
  Primary = "PRIMARY",
82
88
  /** Secondary action button with moderate visual emphasis */
83
89
  Secondary = "SECONDARY",
84
- /** Social media action button (e.g., Google, Facebook) */
85
- Social = "SOCIAL",
86
90
  /** Success action button for positive confirmations */
87
91
  Success = "SUCCESS",
88
92
  /** Tertiary action button with minimal visual emphasis */
@@ -380,6 +384,65 @@ export interface EmbeddedFlowResponseData {
380
384
  */
381
385
  redirectURL?: string;
382
386
  }
387
+ /**
388
+ * Individual consent attribute/element decision.
389
+ *
390
+ * @experimental This interface may change in future versions
391
+ */
392
+ export interface ConsentAttributeElement {
393
+ /** Whether the user approved collection of this attribute */
394
+ approved: boolean;
395
+ /** The name of the attribute being consented */
396
+ name: string;
397
+ }
398
+ /**
399
+ * Consent decision for a single purpose.
400
+ *
401
+ * @experimental This interface may change in future versions
402
+ */
403
+ export interface ConsentPurposeDecision {
404
+ /** Whether the user approved this purpose */
405
+ approved: boolean;
406
+ /** Per-attribute decisions for this purpose */
407
+ elements: ConsentAttributeElement[];
408
+ /** The name of the consent purpose */
409
+ purpose_name: string;
410
+ }
411
+ /**
412
+ * Full consent decisions structure sent to the backend when user submits the consent form.
413
+ *
414
+ * @experimental This interface may change in future versions
415
+ */
416
+ export interface ConsentDecisions {
417
+ /** Array of per-purpose decisions */
418
+ purposes: ConsentPurposeDecision[];
419
+ }
420
+ /**
421
+ * Single consent purpose data returned by the backend in additionalData.consent_prompt.
422
+ *
423
+ * @experimental This interface may change in future versions
424
+ */
425
+ export interface ConsentPurposeData {
426
+ /** Optional human-readable description of the purpose */
427
+ description?: string;
428
+ /** Attributes that are always required and cannot be declined */
429
+ essential: string[];
430
+ /** Attributes that the user can optionally decline */
431
+ optional: string[];
432
+ /** Unique identifier for the purpose */
433
+ purpose_id: string;
434
+ /** Human-readable purpose name */
435
+ purpose_name: string;
436
+ }
437
+ /**
438
+ * Consent prompt data structure stored in additionalData.consent_prompt.
439
+ *
440
+ * @experimental This interface may change in future versions
441
+ */
442
+ export interface ConsentPromptData {
443
+ /** Array of consent purposes requiring user review */
444
+ purposes: ConsentPurposeData[];
445
+ }
383
446
  /**
384
447
  * Extended request configuration for Asgardeo V2 embedded flow operations.
385
448
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "tslib": "2.8.1",
49
49
  "jose": "^5.2.0",
50
- "@asgardeo/i18n": "0.4.3"
50
+ "@asgardeo/i18n": "0.4.4"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"