@melio-eng/web-sdk 1.0.18 → 1.0.19-pr.39.244b53b
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 +11 -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,16 @@ class OnboardingFlow extends Flow {
|
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
let url = `${baseUrl}/${this.partnerName}/welcome`;
|
|
188
|
+
// Build query parameters
|
|
189
|
+
const queryParams = [];
|
|
187
190
|
if (preFilledBase64) {
|
|
188
|
-
|
|
191
|
+
queryParams.push(`preFilledParams=${encodeURIComponent(preFilledBase64)}`);
|
|
192
|
+
}
|
|
193
|
+
if (this.enforceOnboarding !== undefined) {
|
|
194
|
+
queryParams.push(`enforceOnboarding=${this.enforceOnboarding}`);
|
|
195
|
+
}
|
|
196
|
+
if (queryParams.length > 0) {
|
|
197
|
+
url += `?${queryParams.join('&')}`;
|
|
189
198
|
}
|
|
190
199
|
return url;
|
|
191
200
|
}
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED