@melio-eng/web-sdk 1.0.20 → 1.0.21-pr.33.60a6886
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 +4 -5
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -83,7 +83,7 @@ class Flow {
|
|
|
83
83
|
if (!/melio\.com|melioservices\.com/.test(event.origin)) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
const { type, data } = event.data;
|
|
86
|
+
const { type, ...data } = event.data;
|
|
87
87
|
console.log('📬 Received message from iframe:', {
|
|
88
88
|
type,
|
|
89
89
|
data,
|
|
@@ -96,7 +96,7 @@ class Flow {
|
|
|
96
96
|
case 'FLOW_EXIT':
|
|
97
97
|
this.emit('exit');
|
|
98
98
|
break;
|
|
99
|
-
case '
|
|
99
|
+
case 'NAVIGATED_TO_TARGET':
|
|
100
100
|
this.emit('navigated', data);
|
|
101
101
|
break;
|
|
102
102
|
case 'AUTHENTICATION_SUCCESS':
|
|
@@ -192,9 +192,8 @@ class OnboardingFlow extends Flow {
|
|
|
192
192
|
if (this.enforceOnboarding !== undefined) {
|
|
193
193
|
queryParams.push(`enforceOnboarding=${this.enforceOnboarding}`);
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
195
|
+
queryParams.push(`externalOrigin=${this.partnerName}`);
|
|
196
|
+
url += `?${queryParams.join('&')}`;
|
|
198
197
|
return url;
|
|
199
198
|
}
|
|
200
199
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface InitConfig extends BaseFlowConfig {
|
|
|
77
77
|
export interface NavigationData {
|
|
78
78
|
/** The target route or page the user navigated to */
|
|
79
79
|
target: string;
|
|
80
|
+
targetAction: 'schedulePayment' | 'scheduleBatchPayments' | 'viewSubscriptionPlans' | 'viewSettingsCollaborators' | 'viewPayment' | 'viewPaidPayment' | 'viewBill' | 'addNewBill' | 'viewVendors' | 'addVendor' | 'viewSettings' | 'viewArInvoices' | 'redirect';
|
|
80
81
|
}
|
|
81
82
|
/**
|
|
82
83
|
* Flow completion data
|
package/package.json
CHANGED