@baas-id/react 0.3.5 → 0.3.7
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 +27 -3
- package/dist/esm/baas-id-react.css +1 -1
- package/dist/esm/chunks/ContinueFlow-BzKnkzHf.js +11597 -0
- package/dist/esm/chunks/provider-DqpgUBfH.js +87 -0
- package/dist/esm/continue.js +11 -7
- package/dist/esm/index.js +156 -119
- package/dist/esm/native.js +91 -0
- package/dist/esm/preview.js +220 -181
- package/dist/types/continue.d.ts +3 -0
- package/dist/types/index.d.ts +10 -1
- package/dist/types/native.d.ts +38 -0
- package/dist/types/react/DocumentCapture.d.ts +1 -0
- package/dist/types/react/FingerCapture.d.ts +20 -0
- package/dist/types/react/capture/api.d.ts +53 -0
- package/dist/types/react/capture/camera.d.ts +1 -1
- package/dist/types/react/capture/demo.d.ts +10 -0
- package/dist/types/react/capture/index.d.ts +3 -2
- package/dist/types/react/capture/torch.d.ts +14 -0
- package/dist/types/react/chip/ChipRead.d.ts +21 -0
- package/dist/types/react/chip/capability.d.ts +11 -0
- package/dist/types/react/chip/evidence.d.ts +9 -0
- package/dist/types/react/chip/provider.d.ts +42 -0
- package/dist/types/react/chip/useChipRead.d.ts +32 -0
- package/dist/types/react/chip/webNfcPresence.d.ts +2 -0
- package/dist/types/react/document/DocumentParts.d.ts +1 -0
- package/dist/types/react/face/useFaceCapture.d.ts +6 -0
- package/dist/types/react/finger/FingerGuide.d.ts +14 -0
- package/dist/types/react/finger/detector.d.ts +39 -0
- package/dist/types/react/finger/qualityGate.d.ts +37 -0
- package/dist/types/react/finger/runFingerCapture.d.ts +77 -0
- package/dist/types/react/finger/upload.d.ts +10 -0
- package/dist/types/react/finger/useFingerCapture.d.ts +31 -0
- package/dist/types/react/flows/experience.d.ts +4 -0
- package/dist/types/react/flows/index.d.ts +1 -1
- package/dist/types/react/flows/renewal.d.ts +27 -0
- package/dist/types/react/flows/session.d.ts +5 -1
- package/dist/types/react/flows/state.d.ts +34 -2
- package/dist/types/react/flows/types.d.ts +57 -0
- package/dist/types/react/flows/useFlowSession.d.ts +12 -2
- package/dist/types/react/handoff/ContinueFlow.d.ts +6 -2
- package/dist/types/react/handoff/api.d.ts +3 -2
- package/dist/types/react/handoff/phoneLink.d.ts +2 -1
- package/dist/types/react/i18n/types.d.ts +40 -3
- package/dist/types/react/preview/FlowPreview.d.ts +1 -0
- package/dist/types/react/telemetry/bus.d.ts +1 -1
- package/dist/types/react/version.d.ts +1 -1
- package/dist/types/react/vision/resample.d.ts +7 -0
- package/package.json +6 -1
- package/dist/esm/chunks/ContinueFlow-C2PNt2ZN.js +0 -10122
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { Strings } from "../i18n";
|
|
2
|
-
import type { Purpose, RpidSession, SessionFlow, VerificationResult } from "./types";
|
|
2
|
+
import type { ExtractionRecord, Purpose, RpidSession, SessionFlow, VerificationResult } from "./types";
|
|
3
3
|
export type Side = "front" | "back";
|
|
4
|
-
export type CaptureId = Side | "face";
|
|
4
|
+
export type CaptureId = Side | "chip" | "finger" | "face";
|
|
5
|
+
export declare const ALL_STEPS: readonly CaptureId[];
|
|
5
6
|
export declare const FULL_ENROLLMENT: readonly CaptureId[];
|
|
6
7
|
export declare function captureSteps(purpose: Purpose, flow?: SessionFlow | null): CaptureId[];
|
|
8
|
+
export interface ChipAccess {
|
|
9
|
+
documentNumber: string;
|
|
10
|
+
birthDate: string;
|
|
11
|
+
expiryDate: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function yymmdd(v: unknown): string | null;
|
|
14
|
+
export declare function chipAccessOf(record: ExtractionRecord | null | undefined): ChipAccess | null;
|
|
7
15
|
export declare const isFaceOnly: (purpose: Purpose) => purpose is "signin" | "identify";
|
|
8
16
|
export declare const NEUTRAL_OUTCOMES: readonly string[];
|
|
9
17
|
export type Settlement = {
|
|
@@ -14,13 +22,19 @@ export type Settlement = {
|
|
|
14
22
|
verdict: "REJECTED" | "NEEDS_REVIEW";
|
|
15
23
|
};
|
|
16
24
|
export declare function settleFinalize(result: Pick<VerificationResult, "verdict" | "reason">): Settlement;
|
|
25
|
+
export declare const toStep: (id: CaptureId) => Step;
|
|
26
|
+
export declare const idOf: (s: Step) => CaptureId | null;
|
|
17
27
|
export type Step = {
|
|
18
28
|
k: "opening";
|
|
19
29
|
} | {
|
|
20
30
|
k: "doc";
|
|
21
31
|
side: Side;
|
|
32
|
+
} | {
|
|
33
|
+
k: "chip";
|
|
22
34
|
} | {
|
|
23
35
|
k: "face";
|
|
36
|
+
} | {
|
|
37
|
+
k: "finger";
|
|
24
38
|
} | {
|
|
25
39
|
k: "finalizing";
|
|
26
40
|
} | {
|
|
@@ -58,7 +72,10 @@ export interface FlowState {
|
|
|
58
72
|
thumbs: Thumbs;
|
|
59
73
|
plan: CaptureId[];
|
|
60
74
|
faceRetriesLeft?: number;
|
|
75
|
+
fingerRetriesLeft?: number;
|
|
61
76
|
retakes?: Partial<Record<Side, RetakeNotice>>;
|
|
77
|
+
chain?: string;
|
|
78
|
+
chipAccess?: ChipAccess;
|
|
62
79
|
}
|
|
63
80
|
export type FlowAction = {
|
|
64
81
|
type: "open";
|
|
@@ -66,10 +83,17 @@ export type FlowAction = {
|
|
|
66
83
|
type: "opened";
|
|
67
84
|
session: RpidSession;
|
|
68
85
|
purpose: Purpose;
|
|
86
|
+
} | {
|
|
87
|
+
type: "renewed";
|
|
88
|
+
session: RpidSession;
|
|
69
89
|
} | {
|
|
70
90
|
type: "docCaptured";
|
|
71
91
|
side: Side;
|
|
72
92
|
thumb?: string;
|
|
93
|
+
record?: ExtractionRecord | null;
|
|
94
|
+
} | {
|
|
95
|
+
type: "stepDone";
|
|
96
|
+
id: "chip" | "finger" | "face";
|
|
73
97
|
} | {
|
|
74
98
|
type: "finalizing";
|
|
75
99
|
} | {
|
|
@@ -89,6 +113,9 @@ export type FlowAction = {
|
|
|
89
113
|
} | {
|
|
90
114
|
type: "faceRetry";
|
|
91
115
|
retriesLeft: number;
|
|
116
|
+
} | {
|
|
117
|
+
type: "fingerRetry";
|
|
118
|
+
retriesLeft: number;
|
|
92
119
|
} | {
|
|
93
120
|
type: "remote";
|
|
94
121
|
};
|
|
@@ -97,9 +124,14 @@ export declare function flowReducer(state: FlowState, action: FlowAction): FlowS
|
|
|
97
124
|
export declare const isCapturing: (s: Step) => s is {
|
|
98
125
|
k: "doc";
|
|
99
126
|
side: Side;
|
|
127
|
+
} | {
|
|
128
|
+
k: "chip";
|
|
100
129
|
} | {
|
|
101
130
|
k: "face";
|
|
131
|
+
} | {
|
|
132
|
+
k: "finger";
|
|
102
133
|
};
|
|
134
|
+
export declare const lastStep: (plan: readonly CaptureId[]) => CaptureId;
|
|
103
135
|
export declare function railIndex(s: Step, plan?: readonly CaptureId[]): number;
|
|
104
136
|
export declare function titleFor(step: Step, purpose: Purpose, t: Strings): string;
|
|
105
137
|
export declare function finalizingLabel(purpose: Purpose, t: Strings): string;
|
|
@@ -4,6 +4,8 @@ import type { DocumentAuthenticity } from "../capture";
|
|
|
4
4
|
import type { SelfieQualityFloors } from "../face/qualityGate";
|
|
5
5
|
import type { Appearance } from "../theme/appearance";
|
|
6
6
|
import type { TenantInstructions, TenantMessages } from "./experience";
|
|
7
|
+
import type { ChipReader } from "../chip/provider";
|
|
8
|
+
import type { FingerDetector } from "../finger/detector";
|
|
7
9
|
export type { Appearance, TenantInstructions, TenantMessages };
|
|
8
10
|
export type { DocumentAuthenticity };
|
|
9
11
|
export interface ExtractionField {
|
|
@@ -88,8 +90,29 @@ export interface ApiSessionBody {
|
|
|
88
90
|
};
|
|
89
91
|
progress?: boolean;
|
|
90
92
|
test?: boolean;
|
|
93
|
+
steps?: StepId[];
|
|
94
|
+
chip?: {
|
|
95
|
+
required?: boolean;
|
|
96
|
+
aa_challenge?: string;
|
|
97
|
+
data_groups?: string[];
|
|
98
|
+
} | null;
|
|
99
|
+
finger?: {
|
|
100
|
+
fingers?: FingerPosition[];
|
|
101
|
+
torch?: boolean;
|
|
102
|
+
} | null;
|
|
91
103
|
};
|
|
92
104
|
}
|
|
105
|
+
export type StepId = "front" | "back" | "chip" | "face" | "finger";
|
|
106
|
+
export type FingerPosition = "right_index" | "right_middle" | "right_ring" | "right_little" | "left_index" | "left_middle" | "left_ring" | "left_little" | "right_thumb" | "left_thumb";
|
|
107
|
+
export interface SessionChip {
|
|
108
|
+
required: boolean;
|
|
109
|
+
aaChallenge?: string;
|
|
110
|
+
dataGroups: string[];
|
|
111
|
+
}
|
|
112
|
+
export interface SessionFinger {
|
|
113
|
+
fingers: FingerPosition[];
|
|
114
|
+
torch: boolean;
|
|
115
|
+
}
|
|
93
116
|
export interface SessionFlow {
|
|
94
117
|
document?: boolean;
|
|
95
118
|
documentSides?: "front_back" | "front";
|
|
@@ -108,6 +131,9 @@ export interface SessionFlow {
|
|
|
108
131
|
handoff?: SessionHandoff;
|
|
109
132
|
progress?: boolean;
|
|
110
133
|
test?: boolean;
|
|
134
|
+
steps?: StepId[];
|
|
135
|
+
chip?: SessionChip;
|
|
136
|
+
finger?: SessionFinger;
|
|
111
137
|
}
|
|
112
138
|
export interface SessionHandoff {
|
|
113
139
|
mode?: "auto" | "suggest";
|
|
@@ -160,6 +186,13 @@ export type RpidFlowEvent = {
|
|
|
160
186
|
sessionId: string;
|
|
161
187
|
purpose: Purpose;
|
|
162
188
|
bound: boolean;
|
|
189
|
+
renewed?: true;
|
|
190
|
+
} | {
|
|
191
|
+
type: "session.renewed";
|
|
192
|
+
sessionId: string;
|
|
193
|
+
previousSessionId: string;
|
|
194
|
+
purpose: Purpose;
|
|
195
|
+
reason: "expiring" | "resume" | "start" | "expired";
|
|
163
196
|
} | {
|
|
164
197
|
type: "session.failed";
|
|
165
198
|
reason: string;
|
|
@@ -182,6 +215,26 @@ export type RpidFlowEvent = {
|
|
|
182
215
|
target: "front" | "back";
|
|
183
216
|
reason: string;
|
|
184
217
|
mismatches?: string[];
|
|
218
|
+
} | {
|
|
219
|
+
type: "chip.read";
|
|
220
|
+
access: "bac" | "pace";
|
|
221
|
+
dataGroups: string[];
|
|
222
|
+
activeAuth: boolean;
|
|
223
|
+
} | {
|
|
224
|
+
type: "chip.unavailable";
|
|
225
|
+
reason: string;
|
|
226
|
+
chipRequired: boolean;
|
|
227
|
+
} | {
|
|
228
|
+
type: "chip.rejected";
|
|
229
|
+
reason: string;
|
|
230
|
+
retriesLeft?: number;
|
|
231
|
+
} | {
|
|
232
|
+
type: "finger.captured";
|
|
233
|
+
fingers: string[];
|
|
234
|
+
} | {
|
|
235
|
+
type: "finger.rejected";
|
|
236
|
+
reason: string;
|
|
237
|
+
retriesLeft?: number;
|
|
185
238
|
} | {
|
|
186
239
|
type: "face.captured";
|
|
187
240
|
} | {
|
|
@@ -230,10 +283,12 @@ export interface ConsentChoice {
|
|
|
230
283
|
export interface OpenSessionContext {
|
|
231
284
|
consent?: ConsentChoice;
|
|
232
285
|
previousSessionId?: string;
|
|
286
|
+
renewal?: boolean;
|
|
233
287
|
}
|
|
234
288
|
export interface VerificationFlowProps {
|
|
235
289
|
apiUrl: string;
|
|
236
290
|
openSession: (signal?: AbortSignal, context?: OpenSessionContext) => Promise<RpidSession | ApiSessionBody>;
|
|
291
|
+
sessionRenewal?: boolean;
|
|
237
292
|
consent?: {
|
|
238
293
|
modelImprovement?: ModelImprovementPrompt;
|
|
239
294
|
};
|
|
@@ -252,6 +307,8 @@ export interface VerificationFlowProps {
|
|
|
252
307
|
onEvent?: (event: RpidFlowEvent) => void;
|
|
253
308
|
handoff?: HandoffOption;
|
|
254
309
|
diagnostics?: boolean;
|
|
310
|
+
chipReader?: ChipReader;
|
|
311
|
+
fingerDetector?: FingerDetector;
|
|
255
312
|
}
|
|
256
313
|
export type Purpose = "enrollment" | "signin" | "reverification" | "identify";
|
|
257
314
|
export type EnrollmentFlowProps = VerificationFlowProps;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type RpidClientConfig } from "../capture";
|
|
2
2
|
import { type FlowState, type Side } from "./state";
|
|
3
|
+
import type { ChipOutcome } from "../chip/useChipRead";
|
|
3
4
|
import type { SideRetake } from "../DocumentCapture";
|
|
5
|
+
import { type RenewOutcome, type RenewReason, type SessionLife } from "./renewal";
|
|
4
6
|
import type { ConsentChoice, Purpose, VerificationFlowProps, VerificationResult } from "./types";
|
|
5
|
-
export declare function useFlowSession({ purpose, apiUrl, openSession, locale, strings: overrides, formality: formalityProp, onVerified, onFailed, onEvent, source, consentChoice, diagnostics, }: VerificationFlowProps & {
|
|
7
|
+
export declare function useFlowSession({ purpose, apiUrl, openSession, locale, strings: overrides, formality: formalityProp, onVerified, onFailed, onEvent, source, consentChoice, diagnostics, sessionRenewal, }: VerificationFlowProps & {
|
|
6
8
|
purpose: Purpose;
|
|
7
9
|
consentChoice?: ConsentChoice | null;
|
|
8
10
|
}): {
|
|
@@ -14,9 +16,17 @@ export declare function useFlowSession({ purpose, apiUrl, openSession, locale, s
|
|
|
14
16
|
config: RpidClientConfig | null;
|
|
15
17
|
restart: () => undefined;
|
|
16
18
|
docCaptured: (side: Side, serverResult: unknown, thumb?: string) => void;
|
|
17
|
-
captureRejected: (kind: "document" | "face", reason: string, detail?: unknown) => void;
|
|
19
|
+
captureRejected: (kind: "document" | "face" | "chip" | "finger", reason: string, detail?: unknown) => void;
|
|
18
20
|
faceCaptured: () => Promise<void>;
|
|
21
|
+
chipDone: (outcome: ChipOutcome) => void;
|
|
22
|
+
fingerCaptured: (serverResult: unknown) => void;
|
|
19
23
|
docRetake: (r: SideRetake) => void;
|
|
20
24
|
remoteResult: (result: VerificationResult) => Promise<void>;
|
|
21
25
|
failWith: (code: string) => void;
|
|
26
|
+
life: import("react").MutableRefObject<SessionLife | null>;
|
|
27
|
+
renew: (why: RenewReason, loud?: boolean) => Promise<RenewOutcome>;
|
|
28
|
+
touch: () => void;
|
|
29
|
+
beforeCapture: (unused: boolean) => true | Promise<boolean>;
|
|
30
|
+
preparing: boolean;
|
|
31
|
+
renewalOn: () => boolean;
|
|
22
32
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type Formality, type Locale, type StringOverrides, type Strings } from "../i18n";
|
|
2
2
|
import type { RpidFlowEvent } from "../flows/types";
|
|
3
3
|
import type { ColorScheme } from "../theme/scheme";
|
|
4
|
+
import type { ChipReader } from "../chip/provider";
|
|
5
|
+
import type { FingerDetector } from "../finger/detector";
|
|
4
6
|
export declare function readHandoffCode(search?: string, pathname?: string, hash?: string): string | null;
|
|
5
7
|
export declare function readLastLook(now?: number): {
|
|
6
8
|
locale?: string;
|
|
@@ -27,15 +29,17 @@ export interface ContinueFlowProps {
|
|
|
27
29
|
locale: Locale;
|
|
28
30
|
formality: Formality;
|
|
29
31
|
}) => void;
|
|
32
|
+
chipReader?: ChipReader;
|
|
33
|
+
fingerDetector?: FingerDetector;
|
|
30
34
|
}
|
|
31
|
-
export declare function ContinueFlow({ apiUrl, code, modelsUrl, locale: hostLocale, strings, formality, colorScheme, privacyNote, source, debug, onEvent, onDone, onLanguage, }: ContinueFlowProps): import("react").JSX.Element;
|
|
35
|
+
export declare function ContinueFlow({ apiUrl, code, modelsUrl, locale: hostLocale, strings, formality, colorScheme, privacyNote, source, debug, onEvent, onDone, onLanguage, chipReader, fingerDetector, }: ContinueFlowProps): import("react").JSX.Element;
|
|
32
36
|
export declare function ContinueConfirmView({ t, tenant, codeHint, onContinue }: {
|
|
33
37
|
t: Strings;
|
|
34
38
|
tenant: string;
|
|
35
39
|
codeHint: string;
|
|
36
40
|
onContinue?: () => void;
|
|
37
41
|
}): import("react").JSX.Element;
|
|
38
|
-
export type DoneStep = "front" | "back" | "face";
|
|
42
|
+
export type DoneStep = "front" | "back" | "chip" | "face" | "finger";
|
|
39
43
|
export declare function ContinueDoneView({ t, tenant, codeHint, steps }: {
|
|
40
44
|
t: Strings;
|
|
41
45
|
tenant?: string | null;
|
|
@@ -49,9 +49,10 @@ export interface CallLanguage {
|
|
|
49
49
|
export declare function peekHandoff(apiUrl: string, code: string, signal?: AbortSignal, lang?: CallLanguage): Promise<HandoffPeek>;
|
|
50
50
|
export declare function refusalLanguage(e: unknown): CallLanguage | null;
|
|
51
51
|
export declare function claimHandoff(apiUrl: string, code: string, device?: string, signal?: AbortSignal, lang?: CallLanguage): Promise<Json>;
|
|
52
|
-
export
|
|
52
|
+
export type ProgressStep = "front" | "back" | "chip" | "face" | "finger";
|
|
53
|
+
export declare function reportProgress(cfg: RpidClientConfig, step: ProgressStep): Promise<void>;
|
|
53
54
|
export declare function reportPhone(cfg: RpidClientConfig, event: "heartbeat" | "failed" | "abandoned", info?: {
|
|
54
|
-
step?:
|
|
55
|
+
step?: ProgressStep;
|
|
55
56
|
reason?: string;
|
|
56
57
|
final?: boolean;
|
|
57
58
|
}, beacon?: boolean): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { RpidClientConfig } from "../capture";
|
|
2
|
+
import { type ProgressStep } from "./api";
|
|
2
3
|
export declare const HEARTBEAT_MS = 10000;
|
|
3
4
|
export interface PhoneFailure {
|
|
4
5
|
reason: string;
|
|
5
6
|
final: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function usePhoneLink(cfg: RpidClientConfig | null, step:
|
|
8
|
+
export declare function usePhoneLink(cfg: RpidClientConfig | null, step: ProgressStep | null, failure: PhoneFailure | null, finished: boolean): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type Locale = "en" | "es-419";
|
|
2
|
-
export type ClientReason = "CAMERA_UNAVAILABLE" | "ENGINE_UNAVAILABLE" | "UPLOAD_FAILED" | "SESSION_OPEN_FAILED" | "MOVEMENT_TIMEOUT" | "RECENTER_TIMEOUT" | "MOIRE_SUSPECTED" | "SPOOF_SUSPECTED" | "MOVEMENT_DISCONTINUOUS" | "PATTERN_SUSPECTED" | "LOW_QUALITY" | "DOC_DAMAGED_REPEATED";
|
|
3
|
-
export type ServerReason = "DOC_QUALITY_LOW" | "DOC_SIDE_MISMATCH" | "PORTRAIT_NOT_FOUND" | "FACE_MISMATCH" | "TEMPLATE_STALE" | "FACE_NOT_FOUND" | "FACE_MISSING" | "DOCUMENT_MISSING" | "PAD_REJECTED" | "NOT_ENROLLED" | "ALREADY_ENROLLED" | "SESSION_EXPIRED" | "SESSION_FINALIZED" | "SESSION_NOT_FOUND" | "WRONG_PURPOSE" | "CAPTURE_TOKEN_INVALID" | "CAPTURE_TOKEN_EXPIRED" | "CAPTURE_TOKEN_SESSION_MISMATCH" | "CREDENTIALS_REQUIRED" | "INVALID_API_KEY" | "RPID_UNREACHABLE" | "RETRIES_EXHAUSTED" | "FACE_RETRY" | "AI_ASSESSMENT" | "DOC_SCREEN_REPLAY" | "DOC_PAPER_COPY" | "DOC_TAMPERED" | "DOC_DAMAGED" | "DOC_SIDES_INCONSISTENT" | "DOC_FIELDS_CHANGED" | "DUPLICATE_SUSPECT" | "MATCH_FOUND" | "NO_MATCH" | "AMBIGUOUS_MATCH" | "DOC_BACK_MISMATCH" | "DOC_BACK_UNREADABLE" | "REPLAY_SUSPECTED" | "INJECTION_SUSPECTED" | "CHALLENGE_UNVERIFIED" | "PAD_SUSPECTED" | "HANDOFF_CODE_INVALID" | "HANDOFF_CODE_EXPIRED" | "HANDOFF_CODE_USED" | "HANDOFF_REVOKED" | "HANDOFF_ACTIVE" | "HANDOFF_DISABLED" | "HANDOFF_ALREADY_CLAIMED" | "HANDOFF_RATE_LIMITED" | "CAPTURE_TOKEN_REVOKED";
|
|
2
|
+
export type ClientReason = "CAMERA_UNAVAILABLE" | "ENGINE_UNAVAILABLE" | "UPLOAD_FAILED" | "SESSION_OPEN_FAILED" | "MOVEMENT_TIMEOUT" | "RECENTER_TIMEOUT" | "MOIRE_SUSPECTED" | "SPOOF_SUSPECTED" | "MOVEMENT_DISCONTINUOUS" | "PATTERN_SUSPECTED" | "LOW_QUALITY" | "DOC_DAMAGED_REPEATED" | "NFC_UNAVAILABLE" | "CHIP_READ_FAILED" | "CHIP_TIMEOUT";
|
|
3
|
+
export type ServerReason = "DOC_QUALITY_LOW" | "DOC_SIDE_MISMATCH" | "PORTRAIT_NOT_FOUND" | "FACE_MISMATCH" | "TEMPLATE_STALE" | "FACE_NOT_FOUND" | "FACE_MISSING" | "DOCUMENT_MISSING" | "PAD_REJECTED" | "NOT_ENROLLED" | "ALREADY_ENROLLED" | "SESSION_EXPIRED" | "SESSION_FINALIZED" | "SESSION_NOT_FOUND" | "WRONG_PURPOSE" | "CAPTURE_TOKEN_INVALID" | "CAPTURE_TOKEN_EXPIRED" | "CAPTURE_TOKEN_SESSION_MISMATCH" | "CREDENTIALS_REQUIRED" | "INVALID_API_KEY" | "RPID_UNREACHABLE" | "RETRIES_EXHAUSTED" | "FACE_RETRY" | "AI_ASSESSMENT" | "DOC_SCREEN_REPLAY" | "DOC_PAPER_COPY" | "DOC_TAMPERED" | "DOC_DAMAGED" | "DOC_SIDES_INCONSISTENT" | "DOC_FIELDS_CHANGED" | "DUPLICATE_SUSPECT" | "MATCH_FOUND" | "NO_MATCH" | "AMBIGUOUS_MATCH" | "DOC_BACK_MISMATCH" | "DOC_BACK_UNREADABLE" | "REPLAY_SUSPECTED" | "INJECTION_SUSPECTED" | "CHALLENGE_UNVERIFIED" | "PAD_SUSPECTED" | "HANDOFF_CODE_INVALID" | "HANDOFF_CODE_EXPIRED" | "HANDOFF_CODE_USED" | "HANDOFF_REVOKED" | "HANDOFF_ACTIVE" | "HANDOFF_DISABLED" | "HANDOFF_ALREADY_CLAIMED" | "HANDOFF_RATE_LIMITED" | "CAPTURE_TOKEN_REVOKED" | "CHIP_MISSING" | "CHIP_UNAVAILABLE" | "CHIP_PASSIVE_AUTH_FAILED" | "CHIP_HASH_MISMATCH" | "CHIP_CSCA_UNKNOWN" | "CHIP_CLONE_SUSPECTED" | "CHIP_MRZ_MISMATCH" | "CHIP_PORTRAIT_MISMATCH" | "CHIP_UNREADABLE" | "CHIP_ACCESS_DENIED" | "FINGER_NOT_FOUND" | "FINGER_QUALITY_LOW" | "FINGER_PAD_SUSPECTED" | "FINGER_MISMATCH" | "FINGER_NOT_ENROLLED" | "FINGER_TEMPLATE_STALE" | "FINGER_MISSING";
|
|
4
4
|
export type Reason = ClientReason | ServerReason;
|
|
5
5
|
export type Formality = "informal" | "formal";
|
|
6
6
|
export type Recovery = "retry" | "restart" | "support";
|
|
@@ -9,7 +9,7 @@ export interface ReasonEntry {
|
|
|
9
9
|
recovery: Recovery;
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
|
-
export type GuideKey = "no_face" | "no_card" | "too_dark" | "too_bright" | "hold_still" | "move_closer" | "move_back" | "recenter" | "perfect" | "ready" | "find_light" | "look_straight" | "loading" | "too_far" | "bad_framing" | "screen_suspected" | "paper_suspected" | "tilt_less" | "low_contrast" | "wrong_side_front" | "wrong_side_back" | "turn_over" | "blurred" | "glare" | "steady" | "uploading" | "mrz_reading" | "mrz_unreadable" | "mrz_verified" | "closer_more" | "done_short" | "abrupt" | "a_bit_more" | "nod_start" | "nod_return" | "turn_left" | "turn_right" | "turn_wrong_left" | "turn_wrong_right" | "turn_slower" | "turn_lost" | "turn_return_center" | "turn_done" | "turn_hold_steady" | "turn_going_well" | "turn_almost" | "turn_complete" | "recenter_front" | "recenter_center" | "try_other_movement";
|
|
12
|
+
export type GuideKey = "no_face" | "no_card" | "too_dark" | "too_bright" | "hold_still" | "move_closer" | "move_back" | "recenter" | "perfect" | "ready" | "find_light" | "look_straight" | "loading" | "too_far" | "bad_framing" | "screen_suspected" | "paper_suspected" | "tilt_less" | "low_contrast" | "wrong_side_front" | "wrong_side_back" | "turn_over" | "blurred" | "glare" | "steady" | "uploading" | "mrz_reading" | "mrz_unreadable" | "mrz_verified" | "closer_more" | "done_short" | "abrupt" | "a_bit_more" | "nod_start" | "nod_return" | "turn_left" | "turn_right" | "turn_wrong_left" | "turn_wrong_right" | "turn_slower" | "turn_lost" | "turn_return_center" | "turn_done" | "turn_hold_steady" | "turn_going_well" | "turn_almost" | "turn_complete" | "recenter_front" | "recenter_center" | "try_other_movement" | "no_hand" | "fingers_closer" | "fingers_back" | "fingers_together" | "hold_fingers_still" | "finger_glare" | "finger_blurry" | "show_left_hand" | "show_right_hand";
|
|
13
13
|
export type EngineStage = "starting" | "downloading" | "warming" | "downloading_face" | "ready";
|
|
14
14
|
export type DistanceHint = "too_far" | "bit_far" | "ideal" | "bit_close" | "too_close";
|
|
15
15
|
export interface Strings {
|
|
@@ -47,6 +47,33 @@ export interface Strings {
|
|
|
47
47
|
gloss: string;
|
|
48
48
|
front: string;
|
|
49
49
|
back: string;
|
|
50
|
+
place: string;
|
|
51
|
+
hold: string;
|
|
52
|
+
reading: string;
|
|
53
|
+
readingDg: string;
|
|
54
|
+
done: string;
|
|
55
|
+
skip: string;
|
|
56
|
+
skipRequired: string;
|
|
57
|
+
openApp: string;
|
|
58
|
+
unsupported: string;
|
|
59
|
+
nfcOff: string;
|
|
60
|
+
wrongMrz: string;
|
|
61
|
+
unavailable: string;
|
|
62
|
+
handoff: string;
|
|
63
|
+
uploading: string;
|
|
64
|
+
presence: string;
|
|
65
|
+
progressAria: string;
|
|
66
|
+
};
|
|
67
|
+
finger: {
|
|
68
|
+
placeRight: string;
|
|
69
|
+
placeLeft: string;
|
|
70
|
+
placeThumbRight: string;
|
|
71
|
+
placeThumbLeft: string;
|
|
72
|
+
hold: string;
|
|
73
|
+
torchOn: string;
|
|
74
|
+
done: string;
|
|
75
|
+
guideAria: string;
|
|
76
|
+
uploading: string;
|
|
50
77
|
};
|
|
51
78
|
tele: {
|
|
52
79
|
engineStarting: string;
|
|
@@ -146,6 +173,7 @@ export interface Strings {
|
|
|
146
173
|
frontMismatchBody: string;
|
|
147
174
|
unverifiedTitle: string;
|
|
148
175
|
unverifiedBody: string;
|
|
176
|
+
backAccepted: string;
|
|
149
177
|
mismatchFields: string;
|
|
150
178
|
pending: string;
|
|
151
179
|
finalTitle: string;
|
|
@@ -158,6 +186,7 @@ export interface Strings {
|
|
|
158
186
|
verifying: string;
|
|
159
187
|
locked: string;
|
|
160
188
|
stepDone: string;
|
|
189
|
+
retrying: string;
|
|
161
190
|
};
|
|
162
191
|
intro: {
|
|
163
192
|
frontTitle: string;
|
|
@@ -166,6 +195,10 @@ export interface Strings {
|
|
|
166
195
|
backBody: string;
|
|
167
196
|
faceTitle: string;
|
|
168
197
|
faceBody: string;
|
|
198
|
+
chipTitle: string;
|
|
199
|
+
chipBody: string;
|
|
200
|
+
fingerTitle: string;
|
|
201
|
+
fingerBody: string;
|
|
169
202
|
needs: string;
|
|
170
203
|
start: string;
|
|
171
204
|
timeMovements: string;
|
|
@@ -239,6 +272,10 @@ export interface Strings {
|
|
|
239
272
|
stepFront: string;
|
|
240
273
|
stepBack: string;
|
|
241
274
|
stepFace: string;
|
|
275
|
+
stepChip: string;
|
|
276
|
+
stepFinger: string;
|
|
277
|
+
titleChip: string;
|
|
278
|
+
titleFinger: string;
|
|
242
279
|
titleFront: string;
|
|
243
280
|
titleBack: string;
|
|
244
281
|
titleFace: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ClientEventType = "camera_permission" | "camera_error" | "camera_not_found" | "camera_started" | "model_load_start" | "model_load_done" | "model_load_failed" | "model_load_timeout" | "engine_unavailable" | "visibility" | "step_shown" | "retry" | "abandoned" | "flow_failed" | "handoff_shown" | "continue_here" | "capture_review_shown" | "capture_confirmed" | "capture_retaken" | "detector_stats" | "detector_summary" | "orientation_fixed" | "face_tracking";
|
|
1
|
+
export type ClientEventType = "camera_permission" | "camera_error" | "camera_not_found" | "camera_started" | "model_load_start" | "model_load_done" | "model_load_failed" | "model_load_timeout" | "engine_unavailable" | "visibility" | "step_shown" | "retry" | "abandoned" | "flow_failed" | "handoff_shown" | "continue_here" | "capture_review_shown" | "capture_confirmed" | "capture_retaken" | "detector_stats" | "detector_summary" | "orientation_fixed" | "face_tracking" | "nfc_capability" | "nfc_scan_start" | "nfc_scan_error" | "finger_stats" | "finger_summary" | "torch_state";
|
|
2
2
|
export interface ClientEvent {
|
|
3
3
|
type: ClientEventType;
|
|
4
4
|
t?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.3.
|
|
1
|
+
export declare const SDK_VERSION = "0.3.7";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baas-id/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "BaaS identity verification for React: guided ID and face capture with on-device quality gating, server-side verdicts, phone handoff. Requires a BaaS account.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "BaaS, S.A.",
|
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
"import": "./dist/esm/continue.js",
|
|
47
47
|
"default": "./dist/esm/continue.js"
|
|
48
48
|
},
|
|
49
|
+
"./native": {
|
|
50
|
+
"types": "./dist/types/native.d.ts",
|
|
51
|
+
"import": "./dist/esm/native.js",
|
|
52
|
+
"default": "./dist/esm/native.js"
|
|
53
|
+
},
|
|
49
54
|
"./styles.css": "./dist/esm/baas-id-react.css",
|
|
50
55
|
"./package.json": "./package.json"
|
|
51
56
|
},
|