@melio-eng/web-sdk 1.0.28 → 1.0.29-pr.52.dde8198

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
@@ -257,6 +257,7 @@ class SettingsFlow extends Flow {
257
257
  class PaymentsDashboardFlow extends Flow {
258
258
  constructor(containerId, config, partnerName, environment, authCode, branchOverride) {
259
259
  super(containerId, config, partnerName, environment, branchOverride);
260
+ this.paymentId = config.paymentId;
260
261
  this.authCode = authCode;
261
262
  if (isEmptyString(this.authCode)) {
262
263
  throw new Error('Authorization code is required for payments dashboard flow. Please call init() before opening payments dashboard flow.');
@@ -266,7 +267,7 @@ class PaymentsDashboardFlow extends Flow {
266
267
  * Construct the specific flow URL for payments dashboard - now goes through /auth
267
268
  */
268
269
  constructFlowUrl(baseUrl) {
269
- const target = '/pay-dashboard/payments';
270
+ const target = `/pay-dashboard/payments${this.paymentId ? `/${this.paymentId}` : ''}`;
270
271
  const encodedTarget = encodeURIComponent(target);
271
272
  return `${baseUrl}/${this.partnerName}/auth?token=${this.authCode}&redirectUrl=${encodedTarget}`;
272
273
  }
package/dist/types.d.ts CHANGED
@@ -64,6 +64,7 @@ export interface SettingsConfig extends BaseFlowConfig {
64
64
  * Configuration for payments dashboard flow
65
65
  */
66
66
  export interface PaymentsDashboardConfig extends BaseFlowConfig {
67
+ paymentId?: string;
67
68
  }
68
69
  /**
69
70
  * Configuration for init flow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melio-eng/web-sdk",
3
- "version": "1.0.28",
3
+ "version": "1.0.29-pr.52.dde8198",
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",
@@ -54,7 +54,7 @@
54
54
  ],
55
55
  "repository": {
56
56
  "type": "git",
57
- "url": "https://github.com/melio/web-sdk.git"
57
+ "url": "git+https://github.com/melio/web-sdk.git"
58
58
  },
59
59
  "bugs": {
60
60
  "url": "https://github.com/melio/web-sdk/issues"