datakeen-session-react 1.1.202-dev.15 → 1.1.202-dev.17
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/document-collection/DocumentCollection.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 +18 -0
- 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/template/TemplateNodeRenderer.js +3 -1
- package/dist/cjs/components/ui/Button.js +3 -3
- package/dist/cjs/hooks/useClientInfo.js +7 -0
- package/dist/cjs/hooks/useUserInputForm.js +60 -1
- package/dist/cjs/i18n/en.json.js +28 -1
- package/dist/cjs/i18n/es.json.js +28 -1
- package/dist/cjs/i18n/fr.json.js +28 -1
- package/dist/cjs/index.css.js +1 -1
- package/dist/cjs/index.js +2 -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 +7 -0
- package/dist/cjs/utils/cssLoader.js +6 -4
- package/dist/cjs/utils/extractedCopy.js +38 -0
- package/dist/cjs/utils/isMobileDevice.js +8 -0
- package/dist/esm/components/document-collection/DocumentCollection.js +10 -1
- 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 +18 -0
- 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/template/TemplateNodeRenderer.js +3 -1
- package/dist/esm/components/ui/Button.js +3 -3
- package/dist/esm/hooks/useClientInfo.js +7 -0
- package/dist/esm/hooks/useUserInputForm.js +61 -2
- package/dist/esm/i18n/en.json.js +28 -2
- package/dist/esm/i18n/es.json.js +28 -2
- package/dist/esm/i18n/fr.json.js +28 -2
- package/dist/esm/index.css.js +1 -1
- package/dist/esm/index.js +1 -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 +7 -0
- package/dist/esm/utils/cssLoader.js +6 -4
- package/dist/esm/utils/extractedCopy.js +36 -0
- package/dist/esm/utils/isMobileDevice.js +8 -0
- package/dist/types/index.d.ts +2 -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/session.d.ts +254 -1
- package/dist/types/utils/cssLoader.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getPreviewDevice } from '../preview/previewMode.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Détection du type d'appareil par userAgent (plus fiable que la largeur d'écran : un poste de
|
|
3
5
|
* bureau dans une fenêtre étroite ne doit pas être traité comme un mobile).
|
|
@@ -6,6 +8,10 @@
|
|
|
6
8
|
* ouvre directement l'application `/scan/:sessionId` plutôt que d'afficher un QR code.
|
|
7
9
|
*/
|
|
8
10
|
var isMobileDevice = function () {
|
|
11
|
+
// APP3-2057 — aperçu du builder : l'appareil choisi prime sur le user-agent du poste.
|
|
12
|
+
var previewDevice = getPreviewDevice();
|
|
13
|
+
if (previewDevice)
|
|
14
|
+
return previewDevice === "mobile";
|
|
9
15
|
if (typeof navigator === "undefined")
|
|
10
16
|
return false;
|
|
11
17
|
return /Android|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i.test(navigator.userAgent);
|
|
@@ -16,6 +22,8 @@ var isMobileDevice = function () {
|
|
|
16
22
|
* utilisateur) vers le schéma custom de l'app.
|
|
17
23
|
*/
|
|
18
24
|
var isIOSDevice = function () {
|
|
25
|
+
if (getPreviewDevice())
|
|
26
|
+
return false;
|
|
19
27
|
if (typeof navigator === "undefined")
|
|
20
28
|
return false;
|
|
21
29
|
return /iPhone|iPad|iPod/i.test(navigator.userAgent);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { I18nProvider, useI18nContext } from './providers/I18nProvider.js';
|
|
|
8
8
|
export { AnalysisResult, Prediction, extractRootCauses, getPrimaryRootCause, hasAnalysisFailed } from './utils/apiAnalysis.js';
|
|
9
9
|
export { default as DatakeenSession } from './components/DatakeenSession.js';
|
|
10
10
|
export { ConfigProvider } from './context/ConfigContext.js';
|
|
11
|
+
export { default as DatakeenJourneyPreview } from './preview/DatakeenJourneyPreview.js';
|
|
12
|
+
export { DatakeenJourneyPreviewProps, PreviewBranch, PreviewDevice, PreviewEndResult, PreviewEndScreenConfig, PreviewJourney, PreviewJourneyNode, PreviewScreen } from './preview/types.js';
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DatakeenJourneyPreviewProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare const DatakeenJourneyPreview: ({ journey, nodeId, language, device, endResult, documentTemplates, onNodeChange, }: DatakeenJourneyPreviewProps) => React.JSX.Element;
|
|
5
|
+
|
|
6
|
+
export { DatakeenJourneyPreview as default };
|
|
@@ -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 };
|
|
@@ -20,5 +20,258 @@ interface DatakeenSessionProps {
|
|
|
20
20
|
interface UseSessionReturn {
|
|
21
21
|
SessionComponent: React__default.ReactElement;
|
|
22
22
|
}
|
|
23
|
+
type ConditionTokenType = "variable" | "control" | "operator" | "input";
|
|
24
|
+
interface ConditionToken {
|
|
25
|
+
type: ConditionTokenType;
|
|
26
|
+
value: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
sourceNodeId?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Type for custom field value types
|
|
32
|
+
*/
|
|
33
|
+
type CustomFieldValueType = "text" | "enum" | "number" | "boolean" | "date" | "email" | "address" | "list";
|
|
34
|
+
/**
|
|
35
|
+
* Display formats supported for date fields (top-level and list columns).
|
|
36
|
+
*/
|
|
37
|
+
type DateDisplayFormat = "dd/mm/yyyy" | "mm/dd/yyyy" | "yyyy-mm-dd";
|
|
38
|
+
/** Un cas de la règle : une option du pilote → un regex. */
|
|
39
|
+
interface ListColumnRegexCase {
|
|
40
|
+
value: string;
|
|
41
|
+
regex: string;
|
|
42
|
+
errorMessage?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Regex conditionnelle pilotée par une autre colonne enum de la même ligne. */
|
|
45
|
+
interface ListColumnRegexRules {
|
|
46
|
+
/** Builder-only explicit opt-out for uncovered text options. */
|
|
47
|
+
allowUnconstrained?: boolean;
|
|
48
|
+
sourceColumn: string;
|
|
49
|
+
cases: ListColumnRegexCase[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Column definition for a list-type custom field
|
|
53
|
+
*/
|
|
54
|
+
interface ListColumn {
|
|
55
|
+
label: string;
|
|
56
|
+
type: "text" | "enum" | "date" | "email";
|
|
57
|
+
options?: string[];
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
regex?: string;
|
|
60
|
+
regexErrorMessage?: string;
|
|
61
|
+
regexRules?: ListColumnRegexRules;
|
|
62
|
+
dateFormat?: DateDisplayFormat;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Interface for custom field definition
|
|
66
|
+
*/
|
|
67
|
+
interface CustomField {
|
|
68
|
+
id: string;
|
|
69
|
+
label: string;
|
|
70
|
+
placeholder?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
valueType: CustomFieldValueType;
|
|
73
|
+
enumOptions?: string[];
|
|
74
|
+
listColumns?: ListColumn[];
|
|
75
|
+
minRows?: number;
|
|
76
|
+
required?: boolean;
|
|
77
|
+
/** Absent means personal data. Lists are classified as a whole, not per column. */
|
|
78
|
+
containsPersonalData?: boolean;
|
|
79
|
+
regex?: string;
|
|
80
|
+
regexErrorMessage?: string;
|
|
81
|
+
dateFormat?: DateDisplayFormat;
|
|
82
|
+
lockedFromApi?: boolean;
|
|
83
|
+
editableIfMissing?: boolean;
|
|
84
|
+
userInputKey?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Interface for session template node
|
|
88
|
+
*/
|
|
89
|
+
interface SessionTemplateNode {
|
|
90
|
+
id: string;
|
|
91
|
+
type: string;
|
|
92
|
+
title: string;
|
|
93
|
+
description: string;
|
|
94
|
+
informationType?: "identity" | "identity-legal" | "contact" | "address" | "nationality" | "custom";
|
|
95
|
+
position: {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
};
|
|
99
|
+
options: unknown[];
|
|
100
|
+
selectedOptions: string[];
|
|
101
|
+
requiredDocumentType?: string;
|
|
102
|
+
isRequired: boolean;
|
|
103
|
+
order: number;
|
|
104
|
+
optionalFields?: string[];
|
|
105
|
+
requiredFields?: string[];
|
|
106
|
+
pageTitle?: string;
|
|
107
|
+
pageDescription?: string;
|
|
108
|
+
allowedDocumentTypes?: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
/**
|
|
112
|
+
* Optional side information coming from the template.
|
|
113
|
+
* When provided and equals to two ("two", 2, "double", "recto-verso"),
|
|
114
|
+
* consumers should allow uploading two sides (front/back).
|
|
115
|
+
*/
|
|
116
|
+
side?: string | number;
|
|
117
|
+
}>;
|
|
118
|
+
allowedAddingMethods?: string[];
|
|
119
|
+
introductionPage?: {
|
|
120
|
+
title?: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
};
|
|
123
|
+
documentSelection?: {
|
|
124
|
+
title?: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
};
|
|
127
|
+
welcomeTitle?: string;
|
|
128
|
+
welcomeSubtitle?: string;
|
|
129
|
+
welcomeDescription?: string;
|
|
130
|
+
welcomeImage?: string;
|
|
131
|
+
qrCodeTitle?: string;
|
|
132
|
+
qrCodeDescription?: string;
|
|
133
|
+
consentDescription?: string;
|
|
134
|
+
consentDescription2?: string;
|
|
135
|
+
cguUrl?: string;
|
|
136
|
+
privacyPolicyUrl?: string;
|
|
137
|
+
cguLinkLabel?: string;
|
|
138
|
+
privacyLinkLabel?: string;
|
|
139
|
+
checkboxText?: string;
|
|
140
|
+
/** Upload screen copy. {{document}} is replaced by the selected document name. */
|
|
141
|
+
documentUpload?: {
|
|
142
|
+
title?: string;
|
|
143
|
+
description?: string;
|
|
144
|
+
};
|
|
145
|
+
automaticPhotoCapture?: boolean;
|
|
146
|
+
nfcEnabled?: boolean;
|
|
147
|
+
/** APP3-2020 — le backend reporte l'identité lue sur la pièce dans userInput[<nodeId>]. */
|
|
148
|
+
copyIdentityToUserInput?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* APP3-2142 — collecte de documents : champs extraits reportés par le backend dans
|
|
151
|
+
* userInput[<nodeId>] et, pour un champ de formulaire standard, à la racine.
|
|
152
|
+
*/
|
|
153
|
+
extractedToUserInput?: Array<{
|
|
154
|
+
documentTypeId: string;
|
|
155
|
+
field: string;
|
|
156
|
+
}>;
|
|
157
|
+
nfcMode?: "nfcOnly" | "nfcOrPhoto" | "nfcAndApi";
|
|
158
|
+
iad?: {
|
|
159
|
+
enabled: boolean;
|
|
160
|
+
level?: "basic" | "reinforced";
|
|
161
|
+
};
|
|
162
|
+
acceptedCountries?: AcceptedCountry[];
|
|
163
|
+
callbackURL?: string | null;
|
|
164
|
+
expectedResult?: string;
|
|
165
|
+
conditionExpression?: string;
|
|
166
|
+
conditionTokens?: ConditionToken[];
|
|
167
|
+
conditionFalseErrorMessage?: string;
|
|
168
|
+
conditionMaxRetries?: number;
|
|
169
|
+
conditionMaxRetryAction?: "end-journey" | "force-true";
|
|
170
|
+
conditionFalseMode?: "retry" | "loop";
|
|
171
|
+
targetApi?: "INSEE" | "INPI_RBE";
|
|
172
|
+
/** INPI_RBE only. Opt-in: retry against the RNA (associations) when the RNE finds nothing. */
|
|
173
|
+
rnaFallbackEnabled?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* INPI_RBE only. Opt-in: retry against INSEE (Sirene) when the RNE finds
|
|
176
|
+
* nothing. Tried before the RNA fallback when both are enabled.
|
|
177
|
+
*/
|
|
178
|
+
enableInseeFallback?: boolean;
|
|
179
|
+
referenceNodeId?: string;
|
|
180
|
+
referenceNodeType?: "information-input" | "document-collection" | "identity-control";
|
|
181
|
+
referenceField?: "siren" | "siret";
|
|
182
|
+
referenceVariable?: string;
|
|
183
|
+
customFields?: CustomField[];
|
|
184
|
+
templateId?: string;
|
|
185
|
+
external_id?: string;
|
|
186
|
+
/** Écran affiché après la signature. Valeurs vides : textes standard traduits. */
|
|
187
|
+
signedScreenTitle?: string;
|
|
188
|
+
signedScreenDescription?: string;
|
|
189
|
+
signedScreenDownloadHint?: string;
|
|
190
|
+
fieldMappings?: Array<{
|
|
191
|
+
sourceFieldId: string;
|
|
192
|
+
label: string;
|
|
193
|
+
docusealType: string;
|
|
194
|
+
readonly: boolean;
|
|
195
|
+
role?: string;
|
|
196
|
+
sourceNodeId?: string;
|
|
197
|
+
}>;
|
|
198
|
+
/** If set, the generated PDF from this upstream pdf-generation node will be used as the document to sign */
|
|
199
|
+
sourcePdfNodeId?: string;
|
|
200
|
+
pdfMode?: "upload" | "html-template";
|
|
201
|
+
sourceNodeIds?: string[];
|
|
202
|
+
allowResubmission: boolean;
|
|
203
|
+
maxResubmissionAttempts?: number;
|
|
204
|
+
/**
|
|
205
|
+
* Paramétrable par nœud depuis le journey builder : autorise ou non le
|
|
206
|
+
* bouton "Poursuivre quand même" en cas d'échec. S'applique aux nœuds
|
|
207
|
+
* identity-control, document-collection, biometric-capture (selfie/video)
|
|
208
|
+
* et external-verification. Absent/true = comportement actuel inchangé
|
|
209
|
+
* (bouton proposé), false = masqué.
|
|
210
|
+
*
|
|
211
|
+
* Déprécié pour controle-jdi/identity-control quand une sortie "false" est
|
|
212
|
+
* câblée : dans ce cas le routage automatique (blockingCodes +
|
|
213
|
+
* maxResubmissionAction) prend le relais et ce bouton disparaît. Reste lu
|
|
214
|
+
* tel quel pour les nœuds legacy sans sortie "false" (rétrocompat).
|
|
215
|
+
*/
|
|
216
|
+
allowContinueOnFailure?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Codes JDI exacts considérés comme bloquants pour ce nœud controle-jdi
|
|
219
|
+
* (déclenchent la boucle de resoumission). Absent = DEFAULT_BLOCKING_CODES
|
|
220
|
+
* (utils/jdiCodes.ts) — comportement legacy inchangé. Le code 8.0 est
|
|
221
|
+
* toujours bloquant indépendamment de cette liste.
|
|
222
|
+
*/
|
|
223
|
+
blockingCodes?: string[];
|
|
224
|
+
/**
|
|
225
|
+
* Action suivie quand les resoumissions sont épuisées sur un code bloquant
|
|
226
|
+
* ET qu'une sortie "false" est câblée sur ce nœud controle-jdi (miroir de
|
|
227
|
+
* conditionMaxRetryAction sur le nœud condition). Défaut "end-journey".
|
|
228
|
+
*/
|
|
229
|
+
maxResubmissionAction?: "end-journey" | "force-true";
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Interface for accepted countries
|
|
233
|
+
*/
|
|
234
|
+
interface AcceptedCountry {
|
|
235
|
+
code: string;
|
|
236
|
+
documents: {
|
|
237
|
+
passport: string[];
|
|
238
|
+
idCard: string[];
|
|
239
|
+
driverLicense: string[];
|
|
240
|
+
residencePermit: string[];
|
|
241
|
+
pinkDriverLicense: string[];
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Interface for session template edge
|
|
246
|
+
*/
|
|
247
|
+
interface SessionTemplateEdge {
|
|
248
|
+
id: string;
|
|
249
|
+
source: string;
|
|
250
|
+
target: string;
|
|
251
|
+
sourceHandle?: string;
|
|
252
|
+
targetHandle?: string;
|
|
253
|
+
conditionValue?: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Interface for platform information
|
|
257
|
+
*/
|
|
258
|
+
interface PlatformInfo {
|
|
259
|
+
mobile: boolean;
|
|
260
|
+
desktop: boolean;
|
|
261
|
+
backoffice: boolean;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Interface for session template
|
|
265
|
+
*/
|
|
266
|
+
/** Clé du catalogue d'icônes des écrans de fin (mappée vers lucide-react au rendu). */
|
|
267
|
+
type EndScreenIcon = "thanks" | "send" | "mail" | "check" | "clock" | "shield" | "user" | "info";
|
|
268
|
+
interface EndScreenItem {
|
|
269
|
+
icon: EndScreenIcon;
|
|
270
|
+
text: string;
|
|
271
|
+
}
|
|
272
|
+
interface EndScreenCase {
|
|
273
|
+
title?: string;
|
|
274
|
+
items: EndScreenItem[];
|
|
275
|
+
}
|
|
23
276
|
|
|
24
|
-
export type { DatakeenSessionProps, SessionConfig, UseSessionReturn };
|
|
277
|
+
export type { AcceptedCountry, ConditionToken, ConditionTokenType, CustomField, CustomFieldValueType, DatakeenSessionProps, DateDisplayFormat, EndScreenCase, EndScreenIcon, EndScreenItem, ListColumn, ListColumnRegexCase, ListColumnRegexRules, PlatformInfo, SessionConfig, SessionTemplateEdge, SessionTemplateNode, UseSessionReturn };
|
package/package.json
CHANGED