@melio-eng/web-sdk 1.0.18 → 1.0.19-pr.39.3feca19

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
@@ -165,8 +165,9 @@ class Flow {
165
165
  class OnboardingFlow extends Flow {
166
166
  constructor(containerId, config, partnerName, environment, branchOverride) {
167
167
  super(containerId, config, partnerName, environment, branchOverride);
168
- const { userDetails, organizationDetails } = config;
168
+ const { userDetails, organizationDetails, enforceOnboarding } = config;
169
169
  this.preFilledParams = { userDetails, organizationDetails };
170
+ this.enforceOnboarding = enforceOnboarding;
170
171
  }
171
172
  /**
172
173
  * Construct the specific flow URL for onboarding
@@ -184,8 +185,15 @@ class OnboardingFlow extends Flow {
184
185
  }
185
186
  }
186
187
  let url = `${baseUrl}/${this.partnerName}/welcome`;
188
+ const queryParams = [];
187
189
  if (preFilledBase64) {
188
- url += `?preFilledParams=${encodeURIComponent(preFilledBase64)}`;
190
+ queryParams.push(`preFilledParams=${encodeURIComponent(preFilledBase64)}`);
191
+ }
192
+ if (this.enforceOnboarding !== undefined) {
193
+ queryParams.push(`enforceOnboarding=${this.enforceOnboarding}`);
194
+ }
195
+ if (queryParams.length > 0) {
196
+ url += `?${queryParams.join('&')}`;
189
197
  }
190
198
  return url;
191
199
  }
package/dist/types.d.ts CHANGED
@@ -47,6 +47,7 @@ export interface UserDetails {
47
47
  export interface OnboardingConfig extends BaseFlowConfig {
48
48
  userDetails?: UserDetails;
49
49
  organizationDetails?: OrganizationDetails;
50
+ enforceOnboarding?: boolean;
50
51
  }
51
52
  /**
52
53
  * Configuration for pay flow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melio-eng/web-sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.19-pr.39.3feca19",
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",