datakeen-session-react 1.1.202-dev.16 → 1.1.202-dev.18
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/cjs/components/DatakeenSession.js +17 -16
- package/dist/cjs/components/card-capture-guide/CardCaptureGuide.js +139 -0
- package/dist/cjs/components/card-capture-guide/captureTelemetry.js +81 -0
- package/dist/cjs/components/card-capture-guide/guidance.js +48 -0
- package/dist/cjs/components/card-capture-guide/guideCore.js +389 -0
- package/dist/cjs/components/card-capture-guide/guideRuntime.js +118 -0
- package/dist/cjs/components/card-capture-guide/modelLoader.js +46 -0
- package/dist/cjs/components/card-capture-guide/useCaptureGuideThresholds.js +33 -0
- package/dist/cjs/components/card-capture-guide/useCardCaptureGuide.js +117 -0
- package/dist/cjs/components/card-capture-guide/useMinDisplay.js +30 -0
- package/dist/cjs/components/document-collection/DocumentCollection.js +9 -0
- package/dist/cjs/components/id-check/Photo.js +230 -122
- package/dist/cjs/components/id-check/card-capture/CardCapture.js +270 -0
- package/dist/cjs/components/id-check/card-capture/DynamicCardMask.js +85 -0
- package/dist/cjs/components/id-check/card-capture/geometry.js +119 -0
- package/dist/cjs/components/id-check/card-capture/guideTone.js +15 -0
- package/dist/cjs/components/jdi/JDIDocumentSelection.js +9 -0
- package/dist/cjs/components/selfie/Video.js +2 -2
- package/dist/cjs/components/selfie/selfie-flow/SelfieFlow.js +4 -2
- package/dist/cjs/components/session/DocumentCheck.js +37 -2
- package/dist/cjs/components/session/EndFlow.js +4 -0
- package/dist/cjs/components/session/Selfie.js +1 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js +9 -2
- package/dist/cjs/components/start-flow/Start.js +4 -0
- package/dist/cjs/components/template/TemplateNodeRenderer.js +3 -1
- package/dist/cjs/components/ui/Button.js +3 -3
- package/dist/cjs/context/CardCaptureGuideContext.js +16 -0
- package/dist/cjs/hooks/useClientInfo.js +7 -0
- package/dist/cjs/hooks/useUserInputForm.js +3 -1
- package/dist/cjs/i18n/en.json.js +57 -1
- package/dist/cjs/i18n/es.json.js +57 -1
- package/dist/cjs/i18n/fr.json.js +57 -1
- package/dist/cjs/index.css.js +1 -1
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/preview/DatakeenJourneyPreview.js +257 -0
- package/dist/cjs/preview/PreviewAutomaticStep.js +23 -0
- package/dist/cjs/preview/PreviewBranchPicker.js +54 -0
- package/dist/cjs/preview/PreviewCaptureDisabled.js +19 -0
- package/dist/cjs/preview/previewAdapter.js +27 -0
- package/dist/cjs/preview/previewMode.js +21 -0
- package/dist/cjs/preview/previewNavigation.js +105 -0
- package/dist/cjs/services/api.js +5 -0
- package/dist/cjs/services/cameraService.js +6 -0
- package/dist/cjs/services/realtime/sseClient.js +4 -0
- package/dist/cjs/services/sessionService.js +50 -0
- package/dist/cjs/utils/cssLoader.js +6 -4
- package/dist/cjs/utils/isMobileDevice.js +8 -0
- package/dist/esm/components/DatakeenSession.js +17 -16
- package/dist/esm/components/card-capture-guide/CardCaptureGuide.js +135 -0
- package/dist/esm/components/card-capture-guide/captureTelemetry.js +78 -0
- package/dist/esm/components/card-capture-guide/guidance.js +44 -0
- package/dist/esm/components/card-capture-guide/guideCore.js +372 -0
- package/dist/esm/components/card-capture-guide/guideRuntime.js +115 -0
- package/dist/esm/components/card-capture-guide/modelLoader.js +42 -0
- package/dist/esm/components/card-capture-guide/useCaptureGuideThresholds.js +31 -0
- package/dist/esm/components/card-capture-guide/useCardCaptureGuide.js +115 -0
- package/dist/esm/components/card-capture-guide/useMinDisplay.js +28 -0
- package/dist/esm/components/document-collection/DocumentCollection.js +10 -1
- package/dist/esm/components/id-check/Photo.js +232 -124
- package/dist/esm/components/id-check/card-capture/CardCapture.js +266 -0
- package/dist/esm/components/id-check/card-capture/DynamicCardMask.js +81 -0
- package/dist/esm/components/id-check/card-capture/geometry.js +110 -0
- package/dist/esm/components/id-check/card-capture/guideTone.js +13 -0
- package/dist/esm/components/jdi/JDIDocumentSelection.js +9 -0
- package/dist/esm/components/selfie/Video.js +2 -2
- package/dist/esm/components/selfie/selfie-flow/SelfieFlow.js +4 -2
- package/dist/esm/components/session/DocumentCheck.js +37 -2
- package/dist/esm/components/session/EndFlow.js +4 -0
- package/dist/esm/components/session/Selfie.js +1 -1
- package/dist/esm/components/signature-electronic/SignatureElectronic.js +9 -2
- package/dist/esm/components/start-flow/Start.js +4 -0
- package/dist/esm/components/template/TemplateNodeRenderer.js +3 -1
- package/dist/esm/components/ui/Button.js +3 -3
- package/dist/esm/context/CardCaptureGuideContext.js +13 -0
- package/dist/esm/hooks/useClientInfo.js +7 -0
- package/dist/esm/hooks/useUserInputForm.js +3 -1
- package/dist/esm/i18n/en.json.js +55 -2
- package/dist/esm/i18n/es.json.js +55 -2
- package/dist/esm/i18n/fr.json.js +55 -2
- package/dist/esm/index.css.js +1 -1
- package/dist/esm/index.js +6 -0
- package/dist/esm/preview/DatakeenJourneyPreview.js +253 -0
- package/dist/esm/preview/PreviewAutomaticStep.js +19 -0
- package/dist/esm/preview/PreviewBranchPicker.js +48 -0
- package/dist/esm/preview/PreviewCaptureDisabled.js +15 -0
- package/dist/esm/preview/previewAdapter.js +25 -0
- package/dist/esm/preview/previewMode.js +15 -0
- package/dist/esm/preview/previewNavigation.js +98 -0
- package/dist/esm/services/api.js +5 -0
- package/dist/esm/services/cameraService.js +6 -0
- package/dist/esm/services/realtime/sseClient.js +4 -0
- package/dist/esm/services/sessionService.js +49 -1
- package/dist/esm/utils/cssLoader.js +6 -4
- package/dist/esm/utils/isMobileDevice.js +8 -0
- package/dist/types/components/card-capture-guide/CardCaptureGuide.d.ts +46 -0
- package/dist/types/components/card-capture-guide/guidance.d.ts +45 -0
- package/dist/types/components/card-capture-guide/guideCore.d.ts +96 -0
- package/dist/types/components/card-capture-guide/guideRuntime.d.ts +13 -0
- package/dist/types/components/card-capture-guide/modelLoader.d.ts +13 -0
- package/dist/types/components/card-capture-guide/useCardCaptureGuide.d.ts +38 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/preview/DatakeenJourneyPreview.d.ts +6 -0
- package/dist/types/preview/types.d.ts +77 -0
- package/dist/types/services/documentTemplate.d.ts +13 -0
- package/dist/types/types/camera.d.ts +3 -0
- package/dist/types/types/session.d.ts +268 -1
- package/dist/types/utils/cssLoader.d.ts +0 -4
- package/package.json +2 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { SessionTemplateNode, SessionTemplateEdge, PlatformInfo, EndScreenCase } from '../types/session.js';
|
|
2
|
+
import { DocumentTemplate } from '../services/documentTemplate.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Types publics du mode aperçu (APP3-2057) : le journey builder du backoffice affiche le parcours
|
|
6
|
+
* en cours d'édition avec les vrais écrans du SDK, sans session ni appel réseau.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** Appareil simulé par l'aperçu. */
|
|
10
|
+
type PreviewDevice = "mobile" | "desktop";
|
|
11
|
+
/** Résultat simulé sur l'écran de fin. */
|
|
12
|
+
type PreviewEndResult = "compliant" | "non_compliant";
|
|
13
|
+
/**
|
|
14
|
+
* Nœud tel que le builder le tient en mémoire : seuls `id` et `type` sont garantis, le reste de la
|
|
15
|
+
* configuration (titres, champs, documents…) suit le contrat `SessionTemplateNode`.
|
|
16
|
+
*/
|
|
17
|
+
type PreviewJourneyNode = Partial<SessionTemplateNode> & {
|
|
18
|
+
id: string;
|
|
19
|
+
type: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
order?: number;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
/** Textes de fin tels qu'en cours d'édition (les items peuvent encore manquer). */
|
|
25
|
+
interface PreviewEndScreenConfig {
|
|
26
|
+
compliant?: Partial<EndScreenCase>;
|
|
27
|
+
nonCompliant?: Partial<EndScreenCase>;
|
|
28
|
+
}
|
|
29
|
+
/** Parcours en mémoire du builder (pas besoin d'être enregistré). */
|
|
30
|
+
interface PreviewJourney {
|
|
31
|
+
name?: string;
|
|
32
|
+
languages?: string[];
|
|
33
|
+
logo?: string;
|
|
34
|
+
actionPhrase?: string;
|
|
35
|
+
nodes: PreviewJourneyNode[];
|
|
36
|
+
edges: SessionTemplateEdge[];
|
|
37
|
+
platforms?: PlatformInfo;
|
|
38
|
+
showQRCode?: boolean;
|
|
39
|
+
buttonBgColor?: string;
|
|
40
|
+
buttonTextColor?: string;
|
|
41
|
+
endScreenConfig?: PreviewEndScreenConfig;
|
|
42
|
+
}
|
|
43
|
+
/** Lien sortant d'un nœud, tel que proposé dans l'aperçu. */
|
|
44
|
+
interface PreviewBranch {
|
|
45
|
+
edgeId: string;
|
|
46
|
+
targetId: string;
|
|
47
|
+
/** Poignée de sortie (`true`, `false`, `compliant`…) ; null pour un lien simple. */
|
|
48
|
+
handle: string | null;
|
|
49
|
+
}
|
|
50
|
+
/** Écran à afficher pour un nœud demandé. */
|
|
51
|
+
type PreviewScreen = {
|
|
52
|
+
kind: "start";
|
|
53
|
+
} | {
|
|
54
|
+
kind: "node";
|
|
55
|
+
node: SessionTemplateNode;
|
|
56
|
+
} | {
|
|
57
|
+
kind: "automatic";
|
|
58
|
+
node: SessionTemplateNode;
|
|
59
|
+
};
|
|
60
|
+
interface DatakeenJourneyPreviewProps {
|
|
61
|
+
/** Parcours en mémoire du builder. */
|
|
62
|
+
journey: PreviewJourney;
|
|
63
|
+
/** Écran demandé par le builder (null, nœud START ou id inconnu → accueil). */
|
|
64
|
+
nodeId?: string | null;
|
|
65
|
+
/** Langue d'affichage (fr, en, es). Défaut : première langue du parcours, sinon fr. */
|
|
66
|
+
language?: string;
|
|
67
|
+
/** Appareil simulé. */
|
|
68
|
+
device: PreviewDevice;
|
|
69
|
+
/** Résultat affiché sur les écrans de fin. Défaut : conforme. */
|
|
70
|
+
endResult?: PreviewEndResult;
|
|
71
|
+
/** Modèles de documents servis aux écrans de pièce d'identité (aucun appel réseau). */
|
|
72
|
+
documentTemplates?: DocumentTemplate[];
|
|
73
|
+
/** Navigation interne à l'aperçu (« Continuer », retour, choix de branche). null = accueil. */
|
|
74
|
+
onNodeChange?: (nodeId: string | null) => void;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type { DatakeenJourneyPreviewProps, PreviewBranch, PreviewDevice, PreviewEndResult, PreviewEndScreenConfig, PreviewJourney, PreviewJourneyNode, PreviewScreen };
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* On-device ID card capture guide (`controle-jdi`). Every field is optional: without it the guide
|
|
5
|
+
* loads the default model and the WASM runtime from jsDelivr.
|
|
6
|
+
*/
|
|
7
|
+
interface CardCaptureGuideConfig {
|
|
8
|
+
/** `false` keeps the historical capture aid. Default: true. */
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** URL of the .onnx weights (same origin recommended, CSP `connect-src`). */
|
|
11
|
+
modelUrl?: string;
|
|
12
|
+
/** Base URL of the onnxruntime-web .wasm files, same version as the installed package. */
|
|
13
|
+
wasmPaths?: string;
|
|
14
|
+
}
|
|
3
15
|
interface SessionConfig {
|
|
4
16
|
sessionToken?: string;
|
|
5
17
|
selfie?: boolean;
|
|
@@ -9,6 +21,8 @@ interface SessionConfig {
|
|
|
9
21
|
* défaut ; `false` pour revenir au comportement antérieur (étape lue au chargement seulement).
|
|
10
22
|
*/
|
|
11
23
|
realtimeSync?: boolean;
|
|
24
|
+
/** Hosting and activation of the on-device capture guide. */
|
|
25
|
+
cardCaptureGuide?: CardCaptureGuideConfig;
|
|
12
26
|
}
|
|
13
27
|
interface DatakeenSessionProps {
|
|
14
28
|
/** Session credential returned by server-side session creation. Required by secured backends. */
|
|
@@ -20,5 +34,258 @@ interface DatakeenSessionProps {
|
|
|
20
34
|
interface UseSessionReturn {
|
|
21
35
|
SessionComponent: React__default.ReactElement;
|
|
22
36
|
}
|
|
37
|
+
type ConditionTokenType = "variable" | "control" | "operator" | "input";
|
|
38
|
+
interface ConditionToken {
|
|
39
|
+
type: ConditionTokenType;
|
|
40
|
+
value: string;
|
|
41
|
+
label?: string;
|
|
42
|
+
sourceNodeId?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Type for custom field value types
|
|
46
|
+
*/
|
|
47
|
+
type CustomFieldValueType = "text" | "enum" | "number" | "boolean" | "date" | "email" | "address" | "list";
|
|
48
|
+
/**
|
|
49
|
+
* Display formats supported for date fields (top-level and list columns).
|
|
50
|
+
*/
|
|
51
|
+
type DateDisplayFormat = "dd/mm/yyyy" | "mm/dd/yyyy" | "yyyy-mm-dd";
|
|
52
|
+
/** Un cas de la règle : une option du pilote → un regex. */
|
|
53
|
+
interface ListColumnRegexCase {
|
|
54
|
+
value: string;
|
|
55
|
+
regex: string;
|
|
56
|
+
errorMessage?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Regex conditionnelle pilotée par une autre colonne enum de la même ligne. */
|
|
59
|
+
interface ListColumnRegexRules {
|
|
60
|
+
/** Builder-only explicit opt-out for uncovered text options. */
|
|
61
|
+
allowUnconstrained?: boolean;
|
|
62
|
+
sourceColumn: string;
|
|
63
|
+
cases: ListColumnRegexCase[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Column definition for a list-type custom field
|
|
67
|
+
*/
|
|
68
|
+
interface ListColumn {
|
|
69
|
+
label: string;
|
|
70
|
+
type: "text" | "enum" | "date" | "email";
|
|
71
|
+
options?: string[];
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
regex?: string;
|
|
74
|
+
regexErrorMessage?: string;
|
|
75
|
+
regexRules?: ListColumnRegexRules;
|
|
76
|
+
dateFormat?: DateDisplayFormat;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Interface for custom field definition
|
|
80
|
+
*/
|
|
81
|
+
interface CustomField {
|
|
82
|
+
id: string;
|
|
83
|
+
label: string;
|
|
84
|
+
placeholder?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
valueType: CustomFieldValueType;
|
|
87
|
+
enumOptions?: string[];
|
|
88
|
+
listColumns?: ListColumn[];
|
|
89
|
+
minRows?: number;
|
|
90
|
+
required?: boolean;
|
|
91
|
+
/** Absent means personal data. Lists are classified as a whole, not per column. */
|
|
92
|
+
containsPersonalData?: boolean;
|
|
93
|
+
regex?: string;
|
|
94
|
+
regexErrorMessage?: string;
|
|
95
|
+
dateFormat?: DateDisplayFormat;
|
|
96
|
+
lockedFromApi?: boolean;
|
|
97
|
+
editableIfMissing?: boolean;
|
|
98
|
+
userInputKey?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Interface for session template node
|
|
102
|
+
*/
|
|
103
|
+
interface SessionTemplateNode {
|
|
104
|
+
id: string;
|
|
105
|
+
type: string;
|
|
106
|
+
title: string;
|
|
107
|
+
description: string;
|
|
108
|
+
informationType?: "identity" | "identity-legal" | "contact" | "address" | "nationality" | "custom";
|
|
109
|
+
position: {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
};
|
|
113
|
+
options: unknown[];
|
|
114
|
+
selectedOptions: string[];
|
|
115
|
+
requiredDocumentType?: string;
|
|
116
|
+
isRequired: boolean;
|
|
117
|
+
order: number;
|
|
118
|
+
optionalFields?: string[];
|
|
119
|
+
requiredFields?: string[];
|
|
120
|
+
pageTitle?: string;
|
|
121
|
+
pageDescription?: string;
|
|
122
|
+
allowedDocumentTypes?: Array<{
|
|
123
|
+
id: string;
|
|
124
|
+
name: string;
|
|
125
|
+
/**
|
|
126
|
+
* Optional side information coming from the template.
|
|
127
|
+
* When provided and equals to two ("two", 2, "double", "recto-verso"),
|
|
128
|
+
* consumers should allow uploading two sides (front/back).
|
|
129
|
+
*/
|
|
130
|
+
side?: string | number;
|
|
131
|
+
}>;
|
|
132
|
+
allowedAddingMethods?: string[];
|
|
133
|
+
introductionPage?: {
|
|
134
|
+
title?: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
};
|
|
137
|
+
documentSelection?: {
|
|
138
|
+
title?: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
};
|
|
141
|
+
welcomeTitle?: string;
|
|
142
|
+
welcomeSubtitle?: string;
|
|
143
|
+
welcomeDescription?: string;
|
|
144
|
+
welcomeImage?: string;
|
|
145
|
+
qrCodeTitle?: string;
|
|
146
|
+
qrCodeDescription?: string;
|
|
147
|
+
consentDescription?: string;
|
|
148
|
+
consentDescription2?: string;
|
|
149
|
+
cguUrl?: string;
|
|
150
|
+
privacyPolicyUrl?: string;
|
|
151
|
+
cguLinkLabel?: string;
|
|
152
|
+
privacyLinkLabel?: string;
|
|
153
|
+
checkboxText?: string;
|
|
154
|
+
/** Upload screen copy. {{document}} is replaced by the selected document name. */
|
|
155
|
+
documentUpload?: {
|
|
156
|
+
title?: string;
|
|
157
|
+
description?: string;
|
|
158
|
+
};
|
|
159
|
+
automaticPhotoCapture?: boolean;
|
|
160
|
+
nfcEnabled?: boolean;
|
|
161
|
+
/** APP3-2020 — le backend reporte l'identité lue sur la pièce dans userInput[<nodeId>]. */
|
|
162
|
+
copyIdentityToUserInput?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* APP3-2142 — collecte de documents : champs extraits reportés par le backend dans
|
|
165
|
+
* userInput[<nodeId>] et, pour un champ de formulaire standard, à la racine.
|
|
166
|
+
*/
|
|
167
|
+
extractedToUserInput?: Array<{
|
|
168
|
+
documentTypeId: string;
|
|
169
|
+
field: string;
|
|
170
|
+
}>;
|
|
171
|
+
nfcMode?: "nfcOnly" | "nfcOrPhoto" | "nfcAndApi";
|
|
172
|
+
iad?: {
|
|
173
|
+
enabled: boolean;
|
|
174
|
+
level?: "basic" | "reinforced";
|
|
175
|
+
};
|
|
176
|
+
acceptedCountries?: AcceptedCountry[];
|
|
177
|
+
callbackURL?: string | null;
|
|
178
|
+
expectedResult?: string;
|
|
179
|
+
conditionExpression?: string;
|
|
180
|
+
conditionTokens?: ConditionToken[];
|
|
181
|
+
conditionFalseErrorMessage?: string;
|
|
182
|
+
conditionMaxRetries?: number;
|
|
183
|
+
conditionMaxRetryAction?: "end-journey" | "force-true";
|
|
184
|
+
conditionFalseMode?: "retry" | "loop";
|
|
185
|
+
targetApi?: "INSEE" | "INPI_RBE";
|
|
186
|
+
/** INPI_RBE only. Opt-in: retry against the RNA (associations) when the RNE finds nothing. */
|
|
187
|
+
rnaFallbackEnabled?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* INPI_RBE only. Opt-in: retry against INSEE (Sirene) when the RNE finds
|
|
190
|
+
* nothing. Tried before the RNA fallback when both are enabled.
|
|
191
|
+
*/
|
|
192
|
+
enableInseeFallback?: boolean;
|
|
193
|
+
referenceNodeId?: string;
|
|
194
|
+
referenceNodeType?: "information-input" | "document-collection" | "identity-control";
|
|
195
|
+
referenceField?: "siren" | "siret";
|
|
196
|
+
referenceVariable?: string;
|
|
197
|
+
customFields?: CustomField[];
|
|
198
|
+
templateId?: string;
|
|
199
|
+
external_id?: string;
|
|
200
|
+
/** Écran affiché après la signature. Valeurs vides : textes standard traduits. */
|
|
201
|
+
signedScreenTitle?: string;
|
|
202
|
+
signedScreenDescription?: string;
|
|
203
|
+
signedScreenDownloadHint?: string;
|
|
204
|
+
fieldMappings?: Array<{
|
|
205
|
+
sourceFieldId: string;
|
|
206
|
+
label: string;
|
|
207
|
+
docusealType: string;
|
|
208
|
+
readonly: boolean;
|
|
209
|
+
role?: string;
|
|
210
|
+
sourceNodeId?: string;
|
|
211
|
+
}>;
|
|
212
|
+
/** If set, the generated PDF from this upstream pdf-generation node will be used as the document to sign */
|
|
213
|
+
sourcePdfNodeId?: string;
|
|
214
|
+
pdfMode?: "upload" | "html-template";
|
|
215
|
+
sourceNodeIds?: string[];
|
|
216
|
+
allowResubmission: boolean;
|
|
217
|
+
maxResubmissionAttempts?: number;
|
|
218
|
+
/**
|
|
219
|
+
* Paramétrable par nœud depuis le journey builder : autorise ou non le
|
|
220
|
+
* bouton "Poursuivre quand même" en cas d'échec. S'applique aux nœuds
|
|
221
|
+
* identity-control, document-collection, biometric-capture (selfie/video)
|
|
222
|
+
* et external-verification. Absent/true = comportement actuel inchangé
|
|
223
|
+
* (bouton proposé), false = masqué.
|
|
224
|
+
*
|
|
225
|
+
* Déprécié pour controle-jdi/identity-control quand une sortie "false" est
|
|
226
|
+
* câblée : dans ce cas le routage automatique (blockingCodes +
|
|
227
|
+
* maxResubmissionAction) prend le relais et ce bouton disparaît. Reste lu
|
|
228
|
+
* tel quel pour les nœuds legacy sans sortie "false" (rétrocompat).
|
|
229
|
+
*/
|
|
230
|
+
allowContinueOnFailure?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Codes JDI exacts considérés comme bloquants pour ce nœud controle-jdi
|
|
233
|
+
* (déclenchent la boucle de resoumission). Absent = DEFAULT_BLOCKING_CODES
|
|
234
|
+
* (utils/jdiCodes.ts) — comportement legacy inchangé. Le code 8.0 est
|
|
235
|
+
* toujours bloquant indépendamment de cette liste.
|
|
236
|
+
*/
|
|
237
|
+
blockingCodes?: string[];
|
|
238
|
+
/**
|
|
239
|
+
* Action suivie quand les resoumissions sont épuisées sur un code bloquant
|
|
240
|
+
* ET qu'une sortie "false" est câblée sur ce nœud controle-jdi (miroir de
|
|
241
|
+
* conditionMaxRetryAction sur le nœud condition). Défaut "end-journey".
|
|
242
|
+
*/
|
|
243
|
+
maxResubmissionAction?: "end-journey" | "force-true";
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Interface for accepted countries
|
|
247
|
+
*/
|
|
248
|
+
interface AcceptedCountry {
|
|
249
|
+
code: string;
|
|
250
|
+
documents: {
|
|
251
|
+
passport: string[];
|
|
252
|
+
idCard: string[];
|
|
253
|
+
driverLicense: string[];
|
|
254
|
+
residencePermit: string[];
|
|
255
|
+
pinkDriverLicense: string[];
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Interface for session template edge
|
|
260
|
+
*/
|
|
261
|
+
interface SessionTemplateEdge {
|
|
262
|
+
id: string;
|
|
263
|
+
source: string;
|
|
264
|
+
target: string;
|
|
265
|
+
sourceHandle?: string;
|
|
266
|
+
targetHandle?: string;
|
|
267
|
+
conditionValue?: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Interface for platform information
|
|
271
|
+
*/
|
|
272
|
+
interface PlatformInfo {
|
|
273
|
+
mobile: boolean;
|
|
274
|
+
desktop: boolean;
|
|
275
|
+
backoffice: boolean;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Interface for session template
|
|
279
|
+
*/
|
|
280
|
+
/** Clé du catalogue d'icônes des écrans de fin (mappée vers lucide-react au rendu). */
|
|
281
|
+
type EndScreenIcon = "thanks" | "send" | "mail" | "check" | "clock" | "shield" | "user" | "info";
|
|
282
|
+
interface EndScreenItem {
|
|
283
|
+
icon: EndScreenIcon;
|
|
284
|
+
text: string;
|
|
285
|
+
}
|
|
286
|
+
interface EndScreenCase {
|
|
287
|
+
title?: string;
|
|
288
|
+
items: EndScreenItem[];
|
|
289
|
+
}
|
|
23
290
|
|
|
24
|
-
export type { DatakeenSessionProps, SessionConfig, UseSessionReturn };
|
|
291
|
+
export type { AcceptedCountry, CardCaptureGuideConfig, ConditionToken, ConditionTokenType, CustomField, CustomFieldValueType, DatakeenSessionProps, DateDisplayFormat, EndScreenCase, EndScreenIcon, EndScreenItem, ListColumn, ListColumnRegexCase, ListColumnRegexRules, PlatformInfo, SessionConfig, SessionTemplateEdge, SessionTemplateNode, UseSessionReturn };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datakeen-session-react",
|
|
3
|
-
"version": "1.1.202-dev.
|
|
3
|
+
"version": "1.1.202-dev.18",
|
|
4
4
|
"description": "React SDK component to manage and render Datakeen session experiences easily.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"heic2any": "^0.0.4",
|
|
116
116
|
"i18next": "^25.4.2",
|
|
117
117
|
"lucide-react": "^0.511.0",
|
|
118
|
+
"onnxruntime-web": "^1.30.0",
|
|
118
119
|
"pdfjs-dist": "5.4.149",
|
|
119
120
|
"qrcode": "^1.5.4",
|
|
120
121
|
"react-circle-flags": "^0.0.23",
|