@descope/web-component 3.48.3 → 3.49.1

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/index.d.ts CHANGED
@@ -127,11 +127,32 @@ type CustomScreenState = Omit<ScreenState, 'cssVars' | 'componentsConfig' | 'inp
127
127
  }[];
128
128
  };
129
129
  type ScriptModule = {
130
- stop: () => void;
131
- start: () => void;
132
130
  /**
133
- * Refreshes any tokens or state that might be needed before form submission
134
- * Currently implemented for reCAPTCHA to ensure we have a fresh token
131
+ * Unique identifier of the module.
132
+ */
133
+ id: string;
134
+ /**
135
+ * Notifies the module that it should start any profiling or monitoring.
136
+ */
137
+ start?: () => void;
138
+ /**
139
+ * Notifies the module that it should stop any profiling or monitoring.
140
+ */
141
+ stop?: () => void;
142
+ /**
143
+ * Presents the user with any required interaction to get a refreshed token or state,
144
+ * e.g., a challenge or captcha.
145
+ *
146
+ * Modules should return a value of true if the presentation completed successfully,
147
+ * false if it was cancelled by the user, and throw an error in case of failure.
148
+ *
149
+ * This is called before form submission (via a next call) after a button click.
150
+ */
151
+ present?: () => Promise<boolean>;
152
+ /**
153
+ * Refreshes any tokens or state that might be needed before form submission.
154
+ *
155
+ * Modules should throw an error in case of failure.
135
156
  */
136
157
  refresh?: () => Promise<void>;
137
158
  };
@@ -1738,6 +1759,8 @@ declare class BaseDescopeWc extends BaseClass {
1738
1759
  getProjectConfig(): Promise<ProjectConfiguration>;
1739
1760
  getFlowConfig(): Promise<FlowConfig>;
1740
1761
  getTargetLocales(): Promise<string[]>;
1762
+ handleKeyPress(): void;
1763
+ disableKeyPressHandler(): void;
1741
1764
  getComponentsVersion(): Promise<{}>;
1742
1765
  static descopeUI: any;
1743
1766
  init(): Promise<void>;