@flonkid/kyc 1.9.0 → 1.9.2
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/README.md +2 -2
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -261,7 +261,7 @@ Three versions, deliberately separate:
|
|
|
261
261
|
- **Package version** (npm) — changes every release.
|
|
262
262
|
- **SDK↔iframe wire protocol** — the widget iframe and SDK deploy independently,
|
|
263
263
|
so the wire is additive-only; a `PROTOCOL_VERSION_MISMATCH` diagnostic surfaces
|
|
264
|
-
a stale-cached peer.
|
|
264
|
+
a stale-cached peer.
|
|
265
265
|
- **REST API version** — date-pinned, sent as the `Flonk-Version` header on every
|
|
266
266
|
server request. The API is additive-only within a version; a breaking change
|
|
267
267
|
would mint a new date and serve the old shape to SDKs pinned to the old one.
|
|
@@ -278,4 +278,4 @@ Three versions, deliberately separate:
|
|
|
278
278
|
## License
|
|
279
279
|
|
|
280
280
|
Proprietary. Copyright (c) 2026 Flonk. All rights reserved.
|
|
281
|
-
See [Terms of Service](https://flonk.id/terms) for usage terms.
|
|
281
|
+
See [Terms of Service](https://flonk.id/en/terms) for usage terms.
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var react = require('react');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
|
|
6
6
|
// src/shared/constants.ts
|
|
7
|
-
var SDK_VERSION = "1.9.
|
|
7
|
+
var SDK_VERSION = "1.9.2";
|
|
8
8
|
var DEFAULT_WIDGET_URL = "https://widget.flonk.id";
|
|
9
9
|
var DEFAULT_API_BASE = "https://api.flonk.id/v1";
|
|
10
10
|
var API_VERSION = "2026-06-01";
|
|
@@ -1161,14 +1161,14 @@ var FlonkKYC = class {
|
|
|
1161
1161
|
);
|
|
1162
1162
|
const { loader, primaryColor } = await showLoaderWithEarlyColor(designTokensPromise, config.lang);
|
|
1163
1163
|
try {
|
|
1164
|
-
const [{ sessionId, embedToken }, designTokens] = await Promise.all([
|
|
1164
|
+
const [{ sessionId, embedToken, qrCodeUrl }, designTokens] = await Promise.all([
|
|
1165
1165
|
sessionPromise,
|
|
1166
1166
|
designTokensPromise
|
|
1167
1167
|
]);
|
|
1168
1168
|
const finalTokens = designTokens ?? await fetchDesignTokens(this.apiBase, { sessionId });
|
|
1169
1169
|
const finalColor = primaryFrom(finalTokens);
|
|
1170
1170
|
if (finalColor !== primaryColor) loader.updateColor(finalColor);
|
|
1171
|
-
return this.buildWidget(embedToken, sessionId, config, loader, finalTokens);
|
|
1171
|
+
return this.buildWidget(embedToken, sessionId, config, loader, finalTokens, qrCodeUrl);
|
|
1172
1172
|
} catch (err) {
|
|
1173
1173
|
const msg = err.message || "Failed to create session";
|
|
1174
1174
|
loader.showError(msg, config.lang);
|
|
@@ -1260,12 +1260,14 @@ var FlonkKYC = class {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
// ── Core widget builder ──────────────────────────────
|
|
1263
|
-
buildWidget(token, sessionId, config, loader, designTokens) {
|
|
1263
|
+
buildWidget(token, sessionId, config, loader, designTokens, qrCodeUrl) {
|
|
1264
1264
|
const params = {
|
|
1265
1265
|
mode: "embedded",
|
|
1266
1266
|
sessionId,
|
|
1267
1267
|
token
|
|
1268
1268
|
};
|
|
1269
|
+
const qr = qrCodeUrl ?? config.qrCodeUrl;
|
|
1270
|
+
if (qr) params.qrCodeUrl = encodeURIComponent(qr);
|
|
1269
1271
|
if (config.allowManualUpload !== void 0) {
|
|
1270
1272
|
params.allowManualUpload = String(config.allowManualUpload !== false);
|
|
1271
1273
|
}
|