@flonkid/kyc 1.9.1 → 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/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/dist/index.d.cts
CHANGED
|
@@ -48,6 +48,13 @@ interface WidgetInitConfig {
|
|
|
48
48
|
publishableKey?: string;
|
|
49
49
|
sessionId?: string;
|
|
50
50
|
embedToken?: string;
|
|
51
|
+
/**
|
|
52
|
+
* URL the desktop→mobile QR code points to. Needed for the mobile-transfer
|
|
53
|
+
* QR to render. In the `serverUrl` flow, return it from your endpoint
|
|
54
|
+
* alongside `sessionId`/`embedToken` (it's the `qrCodeUrl` from `createSession`);
|
|
55
|
+
* in the `sessionId` + `embedToken` flow, pass it here.
|
|
56
|
+
*/
|
|
57
|
+
qrCodeUrl?: string;
|
|
51
58
|
clientMetadata?: Record<string, unknown>;
|
|
52
59
|
lang?: WidgetLanguage;
|
|
53
60
|
overlayColor?: string;
|
|
@@ -126,7 +133,7 @@ interface VerificationResult {
|
|
|
126
133
|
type PrewarmLevel = 'connect' | 'intent' | 'eager' | 'none';
|
|
127
134
|
|
|
128
135
|
declare class FlonkKYC {
|
|
129
|
-
static readonly version = "1.9.
|
|
136
|
+
static readonly version = "1.9.2";
|
|
130
137
|
private readonly widgetUrl;
|
|
131
138
|
private readonly apiBase;
|
|
132
139
|
private disposeDiagnostics;
|
|
@@ -296,7 +303,7 @@ declare class FlonkValidationError extends FlonkError {
|
|
|
296
303
|
constructor(message: string);
|
|
297
304
|
}
|
|
298
305
|
|
|
299
|
-
declare const SDK_VERSION = "1.9.
|
|
306
|
+
declare const SDK_VERSION = "1.9.2";
|
|
300
307
|
/**
|
|
301
308
|
* REST API version this SDK is built against (date-pinned, separate from the
|
|
302
309
|
* package version). Sent as the `Flonk-Version` header so a future breaking API
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,13 @@ interface WidgetInitConfig {
|
|
|
48
48
|
publishableKey?: string;
|
|
49
49
|
sessionId?: string;
|
|
50
50
|
embedToken?: string;
|
|
51
|
+
/**
|
|
52
|
+
* URL the desktop→mobile QR code points to. Needed for the mobile-transfer
|
|
53
|
+
* QR to render. In the `serverUrl` flow, return it from your endpoint
|
|
54
|
+
* alongside `sessionId`/`embedToken` (it's the `qrCodeUrl` from `createSession`);
|
|
55
|
+
* in the `sessionId` + `embedToken` flow, pass it here.
|
|
56
|
+
*/
|
|
57
|
+
qrCodeUrl?: string;
|
|
51
58
|
clientMetadata?: Record<string, unknown>;
|
|
52
59
|
lang?: WidgetLanguage;
|
|
53
60
|
overlayColor?: string;
|
|
@@ -126,7 +133,7 @@ interface VerificationResult {
|
|
|
126
133
|
type PrewarmLevel = 'connect' | 'intent' | 'eager' | 'none';
|
|
127
134
|
|
|
128
135
|
declare class FlonkKYC {
|
|
129
|
-
static readonly version = "1.9.
|
|
136
|
+
static readonly version = "1.9.2";
|
|
130
137
|
private readonly widgetUrl;
|
|
131
138
|
private readonly apiBase;
|
|
132
139
|
private disposeDiagnostics;
|
|
@@ -296,7 +303,7 @@ declare class FlonkValidationError extends FlonkError {
|
|
|
296
303
|
constructor(message: string);
|
|
297
304
|
}
|
|
298
305
|
|
|
299
|
-
declare const SDK_VERSION = "1.9.
|
|
306
|
+
declare const SDK_VERSION = "1.9.2";
|
|
300
307
|
/**
|
|
301
308
|
* REST API version this SDK is built against (date-pinned, separate from the
|
|
302
309
|
* package version). Sent as the `Flonk-Version` header so a future breaking API
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { useRef, useMemo, useEffect } from 'react';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
// src/shared/constants.ts
|
|
5
|
-
var SDK_VERSION = "1.9.
|
|
5
|
+
var SDK_VERSION = "1.9.2";
|
|
6
6
|
var DEFAULT_WIDGET_URL = "https://widget.flonk.id";
|
|
7
7
|
var DEFAULT_API_BASE = "https://api.flonk.id/v1";
|
|
8
8
|
var API_VERSION = "2026-06-01";
|
|
@@ -1159,14 +1159,14 @@ var FlonkKYC = class {
|
|
|
1159
1159
|
);
|
|
1160
1160
|
const { loader, primaryColor } = await showLoaderWithEarlyColor(designTokensPromise, config.lang);
|
|
1161
1161
|
try {
|
|
1162
|
-
const [{ sessionId, embedToken }, designTokens] = await Promise.all([
|
|
1162
|
+
const [{ sessionId, embedToken, qrCodeUrl }, designTokens] = await Promise.all([
|
|
1163
1163
|
sessionPromise,
|
|
1164
1164
|
designTokensPromise
|
|
1165
1165
|
]);
|
|
1166
1166
|
const finalTokens = designTokens ?? await fetchDesignTokens(this.apiBase, { sessionId });
|
|
1167
1167
|
const finalColor = primaryFrom(finalTokens);
|
|
1168
1168
|
if (finalColor !== primaryColor) loader.updateColor(finalColor);
|
|
1169
|
-
return this.buildWidget(embedToken, sessionId, config, loader, finalTokens);
|
|
1169
|
+
return this.buildWidget(embedToken, sessionId, config, loader, finalTokens, qrCodeUrl);
|
|
1170
1170
|
} catch (err) {
|
|
1171
1171
|
const msg = err.message || "Failed to create session";
|
|
1172
1172
|
loader.showError(msg, config.lang);
|
|
@@ -1258,12 +1258,14 @@ var FlonkKYC = class {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
1260
|
// ── Core widget builder ──────────────────────────────
|
|
1261
|
-
buildWidget(token, sessionId, config, loader, designTokens) {
|
|
1261
|
+
buildWidget(token, sessionId, config, loader, designTokens, qrCodeUrl) {
|
|
1262
1262
|
const params = {
|
|
1263
1263
|
mode: "embedded",
|
|
1264
1264
|
sessionId,
|
|
1265
1265
|
token
|
|
1266
1266
|
};
|
|
1267
|
+
const qr = qrCodeUrl ?? config.qrCodeUrl;
|
|
1268
|
+
if (qr) params.qrCodeUrl = encodeURIComponent(qr);
|
|
1267
1269
|
if (config.allowManualUpload !== void 0) {
|
|
1268
1270
|
params.allowManualUpload = String(config.allowManualUpload !== false);
|
|
1269
1271
|
}
|