@melio-eng/web-sdk 1.0.25 → 1.0.26-pr.51.8654338
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.js +2 -2
- package/dist/types.d.ts +2 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108,8 +108,8 @@ class Flow {
|
|
|
108
108
|
case 'ONBOARDING_COMPLETED':
|
|
109
109
|
this.emit('completed', { flowName: 'onboarding', ...data });
|
|
110
110
|
break;
|
|
111
|
-
case '
|
|
112
|
-
this.emit('loaded'
|
|
111
|
+
case 'READY_FOR_INTERACTION':
|
|
112
|
+
this.emit('loaded');
|
|
113
113
|
break;
|
|
114
114
|
case 'MELIO_ERROR':
|
|
115
115
|
if (data.code === 'failed_to_sync_bills') {
|
package/dist/types.d.ts
CHANGED
|
@@ -97,13 +97,6 @@ export interface FlowCompletionData {
|
|
|
97
97
|
export interface ErrorData {
|
|
98
98
|
errorCode: 'billsSyncFailed';
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Flow loaded data
|
|
102
|
-
*/
|
|
103
|
-
export interface FlowLoadedData {
|
|
104
|
-
/** The name of the flow that was loaded */
|
|
105
|
-
flowName: 'onboarding' | 'payment' | 'settings' | 'dashboard';
|
|
106
|
-
}
|
|
107
100
|
/**
|
|
108
101
|
* Event types that can be listened to
|
|
109
102
|
*/
|
|
@@ -111,7 +104,7 @@ export type FlowEventType = 'completed' | 'exit' | 'navigated' | 'authentication
|
|
|
111
104
|
/**
|
|
112
105
|
* Event callback function types
|
|
113
106
|
*/
|
|
114
|
-
export type FlowEventCallback = ((data: FlowCompletionData | NavigationData | ErrorData
|
|
107
|
+
export type FlowEventCallback = ((data: FlowCompletionData | NavigationData | ErrorData) => void) | (() => void);
|
|
115
108
|
/**
|
|
116
109
|
* Flow instance interface for event handling
|
|
117
110
|
*/
|
|
@@ -127,7 +120,7 @@ export interface FlowInstance {
|
|
|
127
120
|
on(event: 'authenticationSucceeded', callback: () => void): void;
|
|
128
121
|
on(event: 'authenticationFailed', callback: () => void): void;
|
|
129
122
|
on(event: 'error', callback: (data: ErrorData) => void): void;
|
|
130
|
-
on(event: 'loaded', callback: (
|
|
123
|
+
on(event: 'loaded', callback: () => void): void;
|
|
131
124
|
/**
|
|
132
125
|
* Remove an event listener for this flow
|
|
133
126
|
* @param event - The event type to remove listener for
|
package/package.json
CHANGED