@melio-eng/web-sdk 1.0.38-pr.79.a66dd74 → 1.0.38-pr.80.dd7f025

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.
@@ -94,7 +94,7 @@ export class Flow {
94
94
  break;
95
95
  case 'MELIO_ERROR':
96
96
  if (data.code === 'failed_to_sync_bills') {
97
- this.emit('error', { errorCode: 'billsSyncFailed' });
97
+ this.emit('error', { errorCode: 'billsSyncFailed', ...(data.reason ? { reason: data.reason } : {}) });
98
98
  }
99
99
  break;
100
100
  case 'HEIGHT_CHANGE':
@@ -41,7 +41,7 @@ export class InitFlow {
41
41
  token: this.authorizationCode,
42
42
  theme: this.partnerName,
43
43
  });
44
- return `${baseUrl}/${this.partnerName}/init?${params.toString()}`;
44
+ return `${baseUrl}/${this.partnerName}/auth?${params.toString()}`;
45
45
  }
46
46
  /**
47
47
  * Create flow URL using partner name and environment
package/dist/types.d.ts CHANGED
@@ -117,6 +117,7 @@ export interface FlowCompletionData {
117
117
  */
118
118
  export interface ErrorData {
119
119
  errorCode: 'billsSyncFailed';
120
+ reason?: string;
120
121
  }
121
122
  /**
122
123
  * Event types that can be listened to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melio-eng/web-sdk",
3
- "version": "1.0.38-pr.79.a66dd74",
3
+ "version": "1.0.38-pr.80.dd7f025",
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",