@melio-eng/web-sdk 1.0.21 → 1.0.22-pr.33.6dd8f53

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 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 'FLOW_NAVIGATED':
99
+ case 'NAVIGATED_TO_TARGET':
100
100
  this.emit('navigated', data);
101
101
  break;
102
102
  case 'AUTHENTICATION_SUCCESS':
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melio-eng/web-sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.22-pr.33.6dd8f53",
4
4
  "description": "Melio Web SDK - Embed core Melio workflows directly into partner UI with minimal effort",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",