@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 +10 -2
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
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
|
-
|
|
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
package/package.json
CHANGED