@incodetech/core 0.0.0-dev-20260723-be346272 → 0.0.0-dev-20260723-397b76d8

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.
Files changed (87) hide show
  1. package/dist/ae-signature.d.ts +2 -1
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/authentication.d.ts +3 -2
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-BCm7eGoK.d.ts → authenticationManager-Ce1nLm5y.d.ts} +1 -1
  6. package/dist/{authenticationManager-B9Qm5yqf.esm.js → authenticationManager-DW449fW3.esm.js} +2 -2
  7. package/dist/{authenticationStateMachine-C_zvYGnY.esm.js → authenticationStateMachine-CrvxMmoJ.esm.js} +2 -2
  8. package/dist/consent.d.ts +1 -1
  9. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  10. package/dist/{deepsightLoader-DLTccYCv.esm.js → deepsightLoader-BCxEZjuI.esm.js} +1 -1
  11. package/dist/document-capture.d.ts +2 -1
  12. package/dist/{documentCaptureManager-CBP2DkPr.d.ts → documentCaptureManager-pEqMY_Oo.d.ts} +2 -104
  13. package/dist/dynamic-forms.d.ts +2 -1
  14. package/dist/dynamic-forms.esm.js +2 -2
  15. package/dist/{dynamicFormsManager-Dposae2l.d.ts → dynamicFormsManager-BYac2uEY.d.ts} +2 -48
  16. package/dist/{dynamicFormsManager-Fi2O2RUM.esm.js → dynamicFormsManager-DI0sCyVB.esm.js} +1 -1
  17. package/dist/ekyb.d.ts +2 -1
  18. package/dist/ekyb.esm.js +3 -2
  19. package/dist/{ekybManager-BJk_XfA7.esm.js → ekybManager-D46NN7cx.esm.js} +1 -1
  20. package/dist/{ekybManager-CBX0tM04.d.ts → ekybManager-Dzswb_b8.d.ts} +3 -48
  21. package/dist/{ekybStateMachine-CUADos0H.esm.js → ekybStateMachine-DX7KeqlM.esm.js} +2 -170
  22. package/dist/ekyc.esm.js +3 -2
  23. package/dist/{ekycManager-CI7sN4Ln.esm.js → ekycManager-DRrG5I6e.esm.js} +1 -1
  24. package/dist/{ekycStateMachine-DFQdmBXl.esm.js → ekycStateMachine-DRbbavZy.esm.js} +2 -223
  25. package/dist/ekycUtils-Dew1rBG0.esm.js +223 -0
  26. package/dist/electronic-signature.d.ts +2 -1
  27. package/dist/electronic-signature.esm.js +1 -1
  28. package/dist/extensibility.d.ts +12 -11
  29. package/dist/extensibility.esm.js +9 -9
  30. package/dist/{faceCaptureManagerFactory-DPf1rRsd.d.ts → faceCaptureManagerFactory-BUE6z9iY.d.ts} +2 -4
  31. package/dist/{faceCaptureManagerFactory-C7hNylWL.esm.js → faceCaptureManagerFactory-BcntOvvC.esm.js} +1 -1
  32. package/dist/{faceCaptureSetup-Bso0SOrU.esm.js → faceCaptureSetup-BUAw6zY_.esm.js} +2 -2
  33. package/dist/flow.d.ts +44 -1
  34. package/dist/flow.esm.js +4 -11
  35. package/dist/flowServices-BU1mMxoQ.esm.js +596 -0
  36. package/dist/geolocation.esm.js +2 -2
  37. package/dist/{geolocationManager-bZDyI0gy.esm.js → geolocationManager-zeqAcVHC.esm.js} +1 -1
  38. package/dist/id-ocr.d.ts +2 -1
  39. package/dist/id.d.ts +2 -1
  40. package/dist/id.esm.js +2 -2
  41. package/dist/{idCaptureManager-BDCJwgrN.esm.js → idCaptureManager-BqmmPXFm.esm.js} +1 -1
  42. package/dist/idCaptureManager-CtsYvX-Z.d.ts +405 -0
  43. package/dist/{idCaptureStateMachine-DZjn9cjg.esm.js → idCaptureStateMachine-CnKkMNrI.esm.js} +5 -5
  44. package/dist/{idOcrManager-B-JyjyPb.d.ts → idOcrManager-DlYG277_.d.ts} +2 -163
  45. package/dist/{index-CKbmDFNq.d.ts → index-DGcdhk8Y.d.ts} +2 -64
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.esm.js +1 -1
  48. package/dist/mandatory-consent.d.ts +2 -1
  49. package/dist/{mandatoryConsentManager-Bc9AKBft.d.ts → mandatoryConsentManager-Ck2e2W4o.d.ts} +6 -25
  50. package/dist/{onDeviceFaceResults-D7Ymps8b.esm.js → onDeviceFaceResults-CWMT6JTR.esm.js} +1 -1
  51. package/dist/personhood.esm.js +2 -2
  52. package/dist/qe-signature.d.ts +2 -1
  53. package/dist/qe-signature.esm.js +1 -1
  54. package/dist/{recordingService-OzNK87cy.esm.js → recordingService-CfT3nmFO.esm.js} +1 -1
  55. package/dist/redirect-to-mobile.d.ts +2 -1
  56. package/dist/{redirectToMobileManager-NVQM3o5P.d.ts → redirectToMobileManager-DZlJhqvq.d.ts} +2 -40
  57. package/dist/selfie.d.ts +2 -2
  58. package/dist/selfie.esm.js +4 -4
  59. package/dist/{selfieManager-CTfo3Af7.esm.js → selfieManager-D-QJUh3X.esm.js} +2 -2
  60. package/dist/{selfieManager-Dq9wNlcg.d.ts → selfieManager-LabfZln4.d.ts} +1 -1
  61. package/dist/{selfieStateMachine-CBHAhVhb.esm.js → selfieStateMachine-BH-U-y6R.esm.js} +2 -2
  62. package/dist/session-BU4MkUEc.esm.js +1 -0
  63. package/dist/session.d.ts +2 -0
  64. package/dist/session.esm.js +2 -2
  65. package/dist/{sessionInitializer-Cn9Ol4oc.esm.js → sessionInitializer-DT7IYwRx.esm.js} +58 -11
  66. package/dist/{setup-BBfVpTog.d.ts → setup-B1WTXTQV.d.ts} +15 -0
  67. package/dist/{setup-BUSg9dNN.esm.js → setup-DXdKnXXf.esm.js} +21 -7
  68. package/dist/types-B4BObr_7.d.ts +105 -0
  69. package/dist/types-BAvkiv6L.d.ts +6 -0
  70. package/dist/types-BQgIv5p8.d.ts +21 -0
  71. package/dist/types-BfHiko5D.d.ts +48 -0
  72. package/dist/types-CBJI9n6h.d.ts +163 -0
  73. package/dist/{idCaptureManager-DOYaK3vb.d.ts → types-D0ohdBDu.d.ts} +2 -401
  74. package/dist/types-DPIDuhut2.d.ts +40 -0
  75. package/dist/types-DWaEoU0I.d.ts +64 -0
  76. package/dist/types-xIEGXWk8.d.ts +48 -0
  77. package/dist/video-selfie.esm.js +3 -3
  78. package/dist/wasm.d.ts +1 -1
  79. package/dist/wasm.esm.js +1 -1
  80. package/dist/workflow.esm.js +16 -11
  81. package/package.json +1 -1
  82. package/dist/flowServices-BEPX-eK1.esm.js +0 -209
  83. package/dist/session-D9poVEP5.esm.js +0 -1
  84. package/dist/videoSelfieSteps-DHcibfYH.esm.js +0 -57
  85. package/dist/{dynamicFormsStateMachine-DiPpuHgF.esm.js → dynamicFormsStateMachine-BQqAwNQ-.esm.js} +1 -1
  86. package/dist/{electronicSignatureManager-DGFwHdro.esm.js → electronicSignatureManager-BXIpAJ5m.esm.js} +1 -1
  87. package/dist/{geolocationStateMachine-ByU6-nbM.esm.js → geolocationStateMachine-DxSETS9_.esm.js} +1 -1
@@ -0,0 +1,48 @@
1
+ import { l as FieldDef } from "./types-Bk_6dmDa.js";
2
+ //#region src/modules/ekyb/types.d.ts
3
+ type UboEntry = {
4
+ id: string;
5
+ name: string;
6
+ surname: string;
7
+ };
8
+ type EkybFormValues = {
9
+ country: string;
10
+ businessName?: string;
11
+ street?: string;
12
+ houseNo?: string;
13
+ addressLine2?: string;
14
+ city?: string;
15
+ state?: string;
16
+ postalCode?: string;
17
+ taxId?: string;
18
+ };
19
+ type EkybConfig = {
20
+ flowId?: string;
21
+ verificationFields?: string[];
22
+ checkBusinessName?: boolean;
23
+ checkAddress?: boolean;
24
+ checkTaxId?: boolean;
25
+ checkUniqueBeneficialOwner?: boolean;
26
+ };
27
+ type EkybValidationRule = {
28
+ type: 'required';
29
+ } | {
30
+ type: 'streetLevelRequired';
31
+ } | {
32
+ type: 'cnpj';
33
+ } | {
34
+ type: 'postalCodeFormat';
35
+ country: string;
36
+ };
37
+ type EkybValidationError = {
38
+ key: string;
39
+ params?: Record<string, string | number>;
40
+ };
41
+ type EkybValidationErrors = Partial<Record<string, EkybValidationError>>;
42
+ type EkybFieldDef = FieldDef & {
43
+ optionalForCountries?: string[];
44
+ validation?: EkybValidationRule[];
45
+ };
46
+ type EkybCountry = 'BR' | 'US' | 'GB' | 'ES' | 'IT' | 'FR' | 'DE' | 'IL' | 'MX' | 'CN' | 'NG' | 'CM' | 'KE';
47
+ //#endregion
48
+ export { EkybValidationError as a, EkybFormValues as i, EkybCountry as n, EkybValidationErrors as o, EkybFieldDef as r, UboEntry as s, EkybConfig as t };
@@ -0,0 +1,163 @@
1
+ //#region src/modules/id-ocr/types.d.ts
2
+ type IdOcrConfig = {
3
+ /** Allows user to edit OCR information @default false */
4
+ editableOcr?: boolean;
5
+ /**
6
+ * When true (from flow/onboarding), after the first ID OCR step completes the
7
+ * machine loads and optionally edits OCR for the second captured ID.
8
+ */
9
+ secondId?: boolean;
10
+ /**
11
+ * Session flow id (injected by orchestrated flow UI). When listed in `CPFFlowIds`
12
+ * (`idOcrConsts`), only the CPF field is shown and validated; it maps to `documentNumber` on OCR.
13
+ */
14
+ flowId?: string;
15
+ };
16
+ type NameBean = {
17
+ fullName?: string;
18
+ firstName?: string;
19
+ middleName?: string;
20
+ givenName?: string;
21
+ nameSuffix?: string;
22
+ paternalLastName?: string;
23
+ maternalLastName?: string;
24
+ lastNameMrz?: string;
25
+ };
26
+ type AddressBean = {
27
+ street?: string;
28
+ colony?: string;
29
+ postalCode?: string;
30
+ city?: string;
31
+ state?: string;
32
+ label?: string;
33
+ confidentGeolocation?: boolean;
34
+ };
35
+ type AddressStatements = {
36
+ _id: string;
37
+ dateType: string;
38
+ addressStatementTimestamp: number;
39
+ };
40
+ type OcrData = {
41
+ name: NameBean;
42
+ givenName?: string;
43
+ firstName?: string;
44
+ middleName?: string;
45
+ nameSuffix?: string;
46
+ mothersSurname?: string;
47
+ fathersSurname?: string;
48
+ nickName?: string;
49
+ address?: string;
50
+ street?: string;
51
+ colony?: string;
52
+ postalCode?: string;
53
+ city?: string;
54
+ state?: string;
55
+ stateCode?: string;
56
+ countryCode?: string;
57
+ addressFields?: AddressBean;
58
+ fullAddress?: boolean;
59
+ invalidAddress?: boolean;
60
+ checkedAddress?: string;
61
+ checkedAddressBean?: AddressBean;
62
+ exteriorNumber?: string;
63
+ interiorNumber?: string;
64
+ addressFromStatement?: string;
65
+ addressFieldsFromStatement?: AddressBean;
66
+ invalidAddressFromStatement?: boolean;
67
+ addressStatementEmissionDate?: number;
68
+ documentType?: string;
69
+ addressStatementTimestamps?: AddressStatements[];
70
+ poaName?: string;
71
+ typeOfId?: string;
72
+ documentFrontSubtype?: string;
73
+ documentBackSubtype?: string;
74
+ birthDate?: number | string;
75
+ gender?: string;
76
+ claveDeElector?: string;
77
+ curp?: string;
78
+ numeroEmisionCredencial?: string;
79
+ cic?: string;
80
+ ocr?: string;
81
+ documentNumber?: string;
82
+ personalNumber?: string;
83
+ refNumber?: string;
84
+ nue?: string;
85
+ externalId?: string;
86
+ issuedAt?: string;
87
+ expireAt?: string;
88
+ expirationDate?: number;
89
+ issueDate?: number;
90
+ registrationDate?: number;
91
+ issuingCountry?: string;
92
+ issuingState?: string;
93
+ birthPlace?: string;
94
+ issuingAuthority?: string;
95
+ height?: string;
96
+ weight?: string;
97
+ eyeColor?: string;
98
+ hairColor?: string;
99
+ bloodType?: string;
100
+ maritalStatus?: string;
101
+ nationality?: string;
102
+ nationalityMrz?: string;
103
+ classes?: string;
104
+ cond?: string;
105
+ mentions?: string;
106
+ restrictions?: string;
107
+ mrz1?: string;
108
+ mrz2?: string;
109
+ mrz3?: string;
110
+ fullNameMrz?: string;
111
+ documentNumberCheckDigit?: string;
112
+ dateOfBirthCheckDigit?: string;
113
+ expirationDateCheckDigit?: string;
114
+ fathersName?: string;
115
+ mothersName?: string;
116
+ federalRevenueNumber?: string;
117
+ originDocumentId?: string;
118
+ driversLicenseCategory?: string;
119
+ controlNumber?: string;
120
+ renach?: string;
121
+ ocrReliabilityConfidence?: number;
122
+ ocrDataConfidence?: unknown;
123
+ };
124
+ type UpdateOcrDataParams = {
125
+ address?: string;
126
+ documentNumber?: string;
127
+ name?: string;
128
+ firstName?: string;
129
+ lastName?: string;
130
+ paternalLastName?: string;
131
+ maternalLastName?: string;
132
+ personalNumber?: string;
133
+ curp?: string;
134
+ email?: string;
135
+ birthDate?: string;
136
+ expireAt?: string;
137
+ gender?: string;
138
+ issuingCountry?: string;
139
+ };
140
+ type ValidationRule = {
141
+ type: 'required';
142
+ } | {
143
+ type: 'minAge';
144
+ years: number;
145
+ } | {
146
+ type: 'cpf';
147
+ };
148
+ type OcrFieldConfig = {
149
+ key: keyof UpdateOcrDataParams;
150
+ labelKey: string;
151
+ type: 'text' | 'date' | 'radio';
152
+ options?: {
153
+ label: string;
154
+ value: string;
155
+ }[];
156
+ validation?: ValidationRule[];
157
+ required: boolean;
158
+ };
159
+ type UpdateOcrResponse = {
160
+ success: boolean;
161
+ };
162
+ //#endregion
163
+ export { UpdateOcrResponse as a, UpdateOcrDataParams as i, OcrData as n, ValidationRule as o, OcrFieldConfig as r, IdOcrConfig as t };
@@ -1,14 +1,8 @@
1
- import { A as StateMachine, i as ActorRefFrom, l as AnyStateMachine } from "./spawn-D9jgw9pW.js";
2
- import "./StateMachine-EDpYWy0i.js";
3
- import { t as Manager } from "./Manager-CQQ99QOI.js";
4
- import "./Actor-iTq7YY48.js";
5
- import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
6
- import "./index-B8weJxmL.js";
7
1
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
8
2
  import { n as StreamCanvasCapture, r as IncodeCanvas, t as DeepsightService } from "./deepsightService-CR-CYdka.js";
9
3
  import { a as MLProviderConfig, i as IMLProviderCapability, n as IRecordingCapability, r as RecordingConnection, t as IStorageCapability } from "./IStorageCapability-B8IGxCwe.js";
10
4
  import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-BjTTkLmd.js";
11
- import { n as PermissionStatus, t as PermissionResult } from "./types-BT-aiBYV.js";
5
+ import { t as PermissionResult } from "./types-BT-aiBYV.js";
12
6
  //#region ../infra/src/wasm/apiUtilities.d.ts
13
7
  /**
14
8
  * Shared WASM module loader.
@@ -773,397 +767,4 @@ type IdCaptureOutput = {
773
767
  skipFaceMatch: boolean;
774
768
  } | undefined;
775
769
  //#endregion
776
- //#region src/modules/id/idCaptureStateMachine.d.ts
777
- declare const idCaptureMachine: AnyStateMachine;
778
- type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any, any, any, any, any, any, IdCaptureInput, any, any, any, any>;
779
- //#endregion
780
- //#region src/modules/id/idCaptureActor.d.ts
781
- type CreateIdCaptureActorOptions = {
782
- config: IdCaptureConfig;
783
- dependencies?: IdCaptureDependencies;
784
- };
785
- type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
786
- declare function createIdCaptureActor(options: CreateIdCaptureActorOptions): IdCaptureActor;
787
- //#endregion
788
- //#region src/modules/id/idCaptureOnlyStateMachine.d.ts
789
- type IdCaptureOnlyContext = IdCaptureContext;
790
- type IdCaptureOnlyEvent = IdCaptureEvent;
791
- type IdCaptureOnlyInput = IdCaptureInput;
792
- /**
793
- * ID capture state machine variant for the captureOnly flow. Shares the full
794
- * base ID-capture state tree (chooser, tutorial, permissions, capture,
795
- * front/back finished, processing, finished); only the upload, process, and
796
- * recording steps are local instead of remote.
797
- */
798
- declare const idCaptureOnlyMachine: AnyStateMachine;
799
- type IdCaptureOnlyMachine = StateMachine<IdCaptureOnlyContext, IdCaptureOnlyEvent, any, any, any, any, any, any, any, IdCaptureOnlyInput, any, any, any, any>;
800
- //#endregion
801
- //#region src/modules/id/idCaptureOnlyActor.d.ts
802
- type CreateIdCaptureOnlyActorOptions = {
803
- config: IdCaptureOnlyConfig;
804
- dependencies?: IdCaptureDependencies;
805
- };
806
- type IdCaptureOnlyActor = ActorRefFrom<IdCaptureOnlyMachine>;
807
- declare function createIdCaptureOnlyActor(options: CreateIdCaptureOnlyActorOptions): IdCaptureOnlyActor;
808
- //#endregion
809
- //#region src/modules/id/idCaptureServices.d.ts
810
- type IdCaptureInitResult = {
811
- stream: CameraStream;
812
- provider: IIdCaptureCapability;
813
- captureResolution?: string;
814
- cameraFallbackLevel?: number;
815
- };
816
- type InitializeIdCaptureParams = {
817
- config: IdCaptureConfig;
818
- deepsightService?: DeepsightService;
819
- };
820
- declare function initializeIdCapture(params: InitializeIdCaptureParams): Promise<IdCaptureInitResult>;
821
- declare function stopStream(stream: CameraStream): void;
822
- type UploadIdImageParams = {
823
- image: string;
824
- type: 'front' | 'back';
825
- sendBase64?: boolean;
826
- isSecondId?: boolean;
827
- onlyFront?: boolean;
828
- glare?: number;
829
- sharpness?: number;
830
- shouldSkipGlareBack?: boolean;
831
- shouldSkipGlareFront?: boolean;
832
- captureType?: string;
833
- ageAssurance?: boolean;
834
- onProgress?: (progress: number) => void;
835
- metadata?: string;
836
- signal?: AbortSignal;
837
- analyticsProvider?: IAnalyticsCapability;
838
- imageData?: ImageData;
839
- /**
840
- * [ENG-44176] When `false`, attaches `extractIdFace=false` as a query param
841
- * to `POST /omni/add/front-id/v2` so the backend skips biometric face
842
- * extraction. Forwarded only for `type === 'front'`. Omitted / `true` is a
843
- * no-op on the wire (backend default is extraction on).
844
- */
845
- extractIdFace?: boolean;
846
- };
847
- type ValidationError = {
848
- error: boolean;
849
- message: string;
850
- messageDescription?: string;
851
- errorKey: IdErrorCode;
852
- };
853
- declare function validateUploadResponse(response: UploadIdResponse & {
854
- failReason?: string;
855
- side?: 'front' | 'back';
856
- }, sessionState?: {
857
- skipGlareFront?: boolean;
858
- skipGlareBack?: boolean;
859
- }): ValidationError | undefined;
860
- declare function uploadIdImage(params: UploadIdImageParams): Promise<CaptureIdResponse>;
861
- type StartRecordingParams = {
862
- config: IdCaptureConfig;
863
- stream: CameraStream;
864
- existing?: RecordingSession;
865
- type: 'frontId' | 'backId';
866
- };
867
- declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
868
- declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
869
- declare function stopRecording(session: RecordingSession): void;
870
- declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
871
- isDocumentExpired: boolean;
872
- }>;
873
- type UploadManualIdFileParams = {
874
- side: 'front' | 'back' | 'passport';
875
- /**
876
- * Raw base64 payload (no `data:<mime>;base64,` prefix). Callers must strip
877
- * the data-URL prefix — the v2 backend rejects data URLs with
878
- * `IllegalArgumentException: Illegal base64 character 3a`.
879
- */
880
- base64Image: string;
881
- retry?: boolean;
882
- onlyFront?: boolean;
883
- signal?: AbortSignal;
884
- isSecondId?: boolean;
885
- /**
886
- * [ENG-44176] When `false`, attaches `extractIdFace=false` to the upload
887
- * so the backend skips biometric face extraction. Forwarded only for the
888
- * `front` and `passport` sides; back uploads ignore it. Omitted / `true`
889
- * is a no-op on the wire.
890
- */
891
- extractIdFace?: boolean;
892
- };
893
- /**
894
- * Upload a user-selected image as front / back / passport ID.
895
- *
896
- * Uses the same request shape as the live-camera path (`uploadIdImage`):
897
- * JSON body `{ base64Image }` with default application/json Content-Type,
898
- * `captureType=UPLOAD` query param, `retry=true` when retrying.
899
- * Back is POSTed to `/omni/add/back-id/v2` (or `/omni/add/back-second-id/v2`
900
- * when `isSecondId`); front and passport go to `/omni/add/front-id/v2` (or
901
- * `/omni/add/front-second-id/v2` when `isSecondId`).
902
- *
903
- * The v2 endpoints reject raw `image/jpeg` bodies with 415, so the caller
904
- * must convert the File to base64 before calling this service.
905
- */
906
- declare function uploadManualIdFile(params: UploadManualIdFileParams): Promise<UploadIdResponse>;
907
- /**
908
- * UTF-8-safe base64 encoding of a decoded barcode payload. Uses the browser
909
- * `TextEncoder` + `btoa` (always available in the SDK's target environment) so
910
- * non-ASCII payloads survive `btoa`, which only accepts Latin-1.
911
- */
912
- declare function barcodeToBase64(raw: string): string;
913
- type AddBarcodeParams = {
914
- rawBarcode: string;
915
- /** When true (default), the server processes the ID from the barcode. */
916
- processId?: boolean;
917
- /** PDF417 decode-quality metrics forwarded to the server (best-effort). */
918
- metrics?: Pdf417DecodeResult | null;
919
- signal?: AbortSignal;
920
- };
921
- /**
922
- * US Smart Capture: submits a decoded PDF417 barcode to
923
- * `POST /omni/add/barcode/v3`. The response drives the downstream front-capture
924
- * and Process ID skips (`forceFrontIdCapture` / `idValidationCompleted`).
925
- * Mirrors SDK 1's `addBarcode`. Throws (carrying `status`/`data`) on a non-OK
926
- * response so the caller can fall back to a full-frame upload. The
927
- * hardware-id token is injected by the shared `api` layer, as in `uploadIdImage`.
928
- */
929
- declare function addBarcode(params: AddBarcodeParams): Promise<AddBarcodeV3Response>;
930
- //#endregion
931
- //#region src/modules/id/digitalUpload/types.d.ts
932
- type DigitalUploadFailReason = 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED' | 'ID_TYPE_UNACCEPTABLE' | 'FILE_CHANGED_ERROR' | 'INVALID_FILE_TYPE' | 'NETWORK_ERROR' | 'GENERIC';
933
- //#endregion
934
- //#region src/internal/idCapture/idCaptureManagerFactory.d.ts
935
- type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'uploading' | 'uploadError' | 'success';
936
- type IdCaptureIdleState = {
937
- status: 'idle';
938
- };
939
- type IdCaptureChooserState = {
940
- status: 'chooser';
941
- availableDocumentTypes: IdDocumentType[];
942
- };
943
- type IdCaptureLoadingState = {
944
- status: 'loading';
945
- };
946
- type IdCaptureTutorialState = {
947
- status: 'tutorial';
948
- selectedDocumentType: IdDocumentType | undefined;
949
- currentMode: IdCaptureMode;
950
- };
951
- type IdCaptureAgeVerificationState = {
952
- status: 'ageVerification';
953
- };
954
- type IdCapturePermissionsState = {
955
- status: 'permissions';
956
- permissionStatus: PermissionStatus;
957
- };
958
- type IdCaptureCaptureState = {
959
- status: 'capture';
960
- captureStatus: CaptureStatus;
961
- stream: CameraStream | undefined;
962
- detectionStatus: DetectionStatus;
963
- debugFrame: ImageData | undefined;
964
- attemptsRemaining: number;
965
- uploadError: IdErrorCode | undefined;
966
- currentMode: IdCaptureMode;
967
- counterValue: number;
968
- orientation: DetectionOrientation | undefined;
969
- idType: string | undefined;
970
- previewImageUrl?: string;
971
- uploadProgress?: number;
972
- ageAssurance: boolean;
973
- uploadErrorMessage?: string;
974
- uploadErrorDescription?: string;
975
- /** Whether back capture is needed after front capture completes */
976
- needsBackCapture: boolean;
977
- /** Whether front capture is needed after back capture (usSmartCapture + forceFrontIdCapture) */
978
- needsFrontCapture: boolean;
979
- showCaptureButtonInAuto: boolean;
980
- /** Whether retry is available (attemptsRemaining > 0) */
981
- canRetry: boolean;
982
- };
983
- type IdCaptureMandatoryConsentState = {
984
- status: 'mandatoryConsent';
985
- regulationType: RegulationTypes;
986
- };
987
- type IdCaptureFrontFinishedState = {
988
- status: 'frontFinished';
989
- };
990
- type IdCaptureBackFinishedState = {
991
- status: 'backFinished';
992
- };
993
- type IdCaptureProcessingState = {
994
- status: 'processing';
995
- };
996
- type IdCaptureExpiredState = {
997
- status: 'expired';
998
- /**
999
- * Remaining attempts after this expired result. Mirrors V1's
1000
- * `idv2.capture.processing.attemptsRemainingLabel` counter and Figma's
1001
- * "X attempts remaining" line on `1-9-11-id-documenterror`.
1002
- */
1003
- attemptsRemaining: number;
1004
- /** Which side just expired — drives the back-specific subtitle in the UI. */
1005
- currentMode: IdCaptureMode;
1006
- };
1007
- type IdCaptureExpiredExhaustedState = {
1008
- status: 'expiredExhausted';
1009
- };
1010
- type IdCaptureFinishedState = {
1011
- status: 'finished';
1012
- /**
1013
- * Terminal output of the ID machine — the downstream module-skip signal
1014
- * (e.g. `skipFaceMatch` for the US Smart Capture "no front, no match" path).
1015
- * UI-driven modules don't auto-propagate machine output to the orchestrator,
1016
- * so the UI forwards this to `flowManager.completeModule(output)` on finish.
1017
- */
1018
- output?: IdCaptureOutput;
1019
- };
1020
- type IdCaptureClosedState = {
1021
- status: 'closed';
1022
- };
1023
- type IdCaptureErrorState = {
1024
- status: 'error';
1025
- error: string;
1026
- };
1027
- type ManualUploadUploadingSide = ManualUploadSide;
1028
- type IdCaptureManualUploadState = {
1029
- status: 'manualUpload';
1030
- phase: 'selecting' | 'uploading' | 'exhausted';
1031
- /** Which side is currently uploading (undefined in `selecting`/`exhausted`). */
1032
- uploadingSide: ManualUploadUploadingSide | undefined;
1033
- activeTab: ManualUploadTab;
1034
- showIdTab: boolean;
1035
- showPassportTab: boolean;
1036
- /** Whether the ID tab should render a back-of-ID slot. */
1037
- showBackSlot: boolean;
1038
- frontFileName: string | undefined;
1039
- backFileName: string | undefined;
1040
- passportFileName: string | undefined;
1041
- frontUploaded: boolean;
1042
- backUploaded: boolean;
1043
- passportUploaded: boolean;
1044
- canContinue: boolean;
1045
- retriesLeft: number;
1046
- /** i18n key for the current error message, if any. */
1047
- errorKey: string | null;
1048
- errorSide: ManualUploadSide | null;
1049
- };
1050
- type IdCaptureDigitalUploadState = {
1051
- status: 'digitalIdUpload';
1052
- phase: 'tutorial' | 'selecting' | 'reviewing' | 'uploading' | 'holding' | 'success' | 'error' | 'fileTooLarge' | 'exhausted';
1053
- file: File | null;
1054
- fileName: string | undefined;
1055
- failReason: DigitalUploadFailReason | null;
1056
- attemptsRemaining: number;
1057
- uploadProgress: number;
1058
- pickerRequestId: number;
1059
- };
1060
- type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCaptureAgeVerificationState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureExpiredExhaustedState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState | IdCaptureManualUploadState | IdCaptureDigitalUploadState;
1061
- /**
1062
- * Union of all `idCaptureMachine` variants' actor types. Variants share the
1063
- * same state tree and context shape, so the manager helpers
1064
- * (`mapState`, `createApi`) work uniformly for either flavor at runtime.
1065
- */
1066
- type AnyIdCaptureActor = IdCaptureActor | IdCaptureOnlyActor;
1067
- /**
1068
- * Builds the public ID capture manager from an already-created actor.
1069
- * Used by both `createIdCaptureManager` and `createIdCaptureOnlyManager`.
1070
- *
1071
- * The internal cast to `IdCaptureActor` narrows the union for `createManager`,
1072
- * which is typed against the regular machine. Variants produced via
1073
- * `idCaptureMachine.provide({...})` share the same context and event types,
1074
- * so the cast is sound at runtime — only the actor implementation differs.
1075
- *
1076
- * `visibilityObserver` defaults to the browser `document.visibilitychange`
1077
- * provider so first-party and BYO-actor callers get foreground/background
1078
- * events without extra wiring. Construction lives here — a documented,
1079
- * narrow deviation from "never `new` a provider inside Core" (see
1080
- * `docs/patterns/CAPABILITY.md`). Pass a fake/no-op to override (tests do).
1081
- */
1082
- declare function createIdCaptureManagerFromActor(actor: AnyIdCaptureActor, visibilityObserver?: IVisibilityObserverCapability): Manager<IdCaptureState> & {
1083
- load(): void;
1084
- selectDocument(documentType: IdDocumentType): void;
1085
- nextStep(): Promise<void>;
1086
- requestPermission(): void;
1087
- goToLearnMore(): void;
1088
- back(): void;
1089
- close(): void;
1090
- reset(): void;
1091
- retryCapture(): void;
1092
- continueExhausted(): void;
1093
- continueFromError(): void;
1094
- capture(): void;
1095
- switchToManualCapture(): void;
1096
- continueToBack(): void;
1097
- continueToFront(): void;
1098
- skipBack(): void;
1099
- acceptMandatoryConsent(): void;
1100
- cancelMandatoryConsent(): void;
1101
- /**
1102
- * Updates the detection area used for WASM geometry calculation.
1103
- * Call this when the UI detection area dimensions change (e.g., on resize or orientation change).
1104
- */
1105
- updateDetectionArea(detectionArea: DetectionArea): void;
1106
- /**
1107
- * Manual upload: tab change (ID / Passport). Resets per-tab file selections.
1108
- * Note: there is intentionally no `switchToManualUpload` method — entry to
1109
- * the manual-upload flow is gated by config + Chooser to prevent a
1110
- * dev-console bypass of live camera capture.
1111
- */
1112
- manualUploadChangeTab(tab: ManualUploadTab): void;
1113
- manualUploadSelectFile(side: ManualUploadSide, file: File): void;
1114
- manualUploadContinue(): void;
1115
- manualUploadReset(): void;
1116
- digitalUploadNextStep(): void;
1117
- digitalUploadPickFile(file: File): void;
1118
- digitalUploadConfirm(): void;
1119
- digitalUploadReplace(): void;
1120
- digitalUploadRetry(): void;
1121
- digitalUploadScanInstead(): void;
1122
- digitalUploadChooseAnother(): void;
1123
- };
1124
- type IdCaptureManager = ReturnType<typeof createIdCaptureManagerFromActor>;
1125
- //#endregion
1126
- //#region src/modules/id/idCaptureManager.d.ts
1127
- /**
1128
- * Creates a manager for the regular ID capture flow. The shared
1129
- * `mapState`/`createApi`/state-types live in
1130
- * `internal/idCapture/idCaptureManagerFactory.ts`; this file is a thin
1131
- * wrapper that creates the actor and delegates to the factory.
1132
- *
1133
- * For the captureOnly flow (rich payload delivered locally via `onCapture`),
1134
- * use `createIdCaptureOnlyManager`.
1135
- */
1136
- declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): Manager<IdCaptureState> & {
1137
- load(): void;
1138
- selectDocument(documentType: IdDocumentType): void;
1139
- nextStep(): Promise<void>;
1140
- requestPermission(): void;
1141
- goToLearnMore(): void;
1142
- back(): void;
1143
- close(): void;
1144
- reset(): void;
1145
- retryCapture(): void;
1146
- continueExhausted(): void;
1147
- continueFromError(): void;
1148
- capture(): void;
1149
- switchToManualCapture(): void;
1150
- continueToBack(): void;
1151
- continueToFront(): void;
1152
- skipBack(): void;
1153
- acceptMandatoryConsent(): void;
1154
- cancelMandatoryConsent(): void;
1155
- updateDetectionArea(detectionArea: DetectionArea): void;
1156
- manualUploadChangeTab(tab: ManualUploadTab): void;
1157
- manualUploadSelectFile(side: ManualUploadSide, file: File): void;
1158
- manualUploadContinue(): void;
1159
- manualUploadReset(): void;
1160
- digitalUploadNextStep(): void;
1161
- digitalUploadPickFile(file: File): void;
1162
- digitalUploadConfirm(): void;
1163
- digitalUploadReplace(): void;
1164
- digitalUploadRetry(): void;
1165
- digitalUploadScanInstead(): void;
1166
- digitalUploadChooseAnother(): void;
1167
- };
1168
- //#endregion
1169
- export { IdErrorCode as $, createIdCaptureActor as A, IdCaptureConfig as B, CreateIdCaptureOnlyActorOptions as C, idCaptureOnlyMachine as D, IdCaptureOnlyMachine as E, CaptureOnlyResponse as F, IdCaptureInput as G, IdCaptureDependencies as H, CapturedImage as I, IdCaptureOutput as J, IdCaptureMode as K, DetectionArea as L, idCaptureMachine as M, AddBarcodeV3Response as N, CreateIdCaptureActorOptions as O, CaptureIdResponse as P, IdError as Q, DetectionStatus as R, validateUploadResponse as S, createIdCaptureOnlyActor as T, IdCaptureEvent as U, IdCaptureContext as V, IdCaptureGeometry as W, IdCapturedImageData as X, IdCaptureThresholds as Y, IdDocumentType as Z, startRecordingSession as _, AddBarcodeParams as a, MANUAL_UPLOAD_MAX_RETRIES as at, uploadIdImage as b, StartRecordingParams as c, ManualUploadTab as ct, ValidationError as d, IdFlowStep as et, addBarcode as f, processId as g, preloadIdRecordingProvider as h, createIdCaptureManagerFromActor as i, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES as it, IdCaptureMachine as j, IdCaptureActor as k, UploadIdImageParams as l, DetectionOrientation as lt, initializeIdCapture as m, IdCaptureManager as n, UploadIdResponse as nt, IdCaptureInitResult as o, ManualUploadContext as ot, barcodeToBase64 as p, IdCaptureOnlyConfig as q, IdCaptureState as r, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS as rt, InitializeIdCaptureParams as s, ManualUploadSide as st, createIdCaptureManager as t, RecordingSession as tt, UploadManualIdFileParams as u, IdCaptureSettings as ut, stopRecording as v, IdCaptureOnlyActor as w, uploadManualIdFile as x, stopStream as y, ID_ERROR_CODES as z };
770
+ export { ManualUploadSide as A, RecordingSession as C, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES as D, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS as E, Pdf417DecodeResult as F, DetectionOrientation as M, IIdCaptureCapability as N, MANUAL_UPLOAD_MAX_RETRIES as O, IdCaptureSettings as P, IdFlowStep as S, IAnalyticsCapability as T, IdCaptureThresholds as _, DetectionArea as a, IdError as b, IdCaptureConfig as c, IdCaptureEvent as d, IdCaptureGeometry as f, IdCaptureOutput as g, IdCaptureOnlyConfig as h, CapturedImage as i, ManualUploadTab as j, ManualUploadContext as k, IdCaptureContext as l, IdCaptureMode as m, CaptureIdResponse as n, DetectionStatus as o, IdCaptureInput as p, CaptureOnlyResponse as r, ID_ERROR_CODES as s, AddBarcodeV3Response as t, IdCaptureDependencies as u, IdCapturedImageData as v, UploadIdResponse as w, IdErrorCode as x, IdDocumentType as y };
@@ -0,0 +1,40 @@
1
+ //#region src/modules/redirect-to-mobile/types.d.ts
2
+ type RedirectToMobileConfig = {
3
+ flowId?: string;
4
+ url?: string;
5
+ disableSmsOption?: boolean;
6
+ addContinueToDesktop?: boolean;
7
+ qrPhishingResistance?: boolean;
8
+ authHint?: string;
9
+ externalId?: string;
10
+ lang?: string;
11
+ };
12
+ type OnboardingStatus = 'ONBOARDING_FINISHED' | 'ONBOARDING_IN_PROGRESS' | 'ONBOARDING_NOT_STARTED';
13
+ type OnboardingStatusResponse = {
14
+ onboardingStatus: OnboardingStatus;
15
+ };
16
+ type RedirectUrlResponse = {
17
+ url: string;
18
+ };
19
+ type QrRefreshResponse = {
20
+ urlUuid: string;
21
+ };
22
+ type StartInfoResponse = {
23
+ phonePrefix: string;
24
+ ipIsoCode: string;
25
+ };
26
+ type SendRedirectSmsParams = {
27
+ smsType: 'DESKTOP_ONBOARDING';
28
+ uuid: string;
29
+ params?: string[];
30
+ };
31
+ type RedirectToMobileServices = {
32
+ fetchRedirectUrl: (signal?: AbortSignal) => Promise<RedirectUrlResponse>;
33
+ fetchOnboardingStatus: (signal?: AbortSignal) => Promise<OnboardingStatusResponse>;
34
+ sendRedirectSms: (params: SendRedirectSmsParams, signal?: AbortSignal) => Promise<void>;
35
+ addPhoneForRedirect: (phone: string, signal?: AbortSignal) => Promise<void>;
36
+ refreshQrUuid: (onboardingId: string, signal?: AbortSignal) => Promise<QrRefreshResponse>;
37
+ fetchStartInfo: (signal?: AbortSignal) => Promise<StartInfoResponse>;
38
+ };
39
+ //#endregion
40
+ export { RedirectToMobileServices as n, RedirectToMobileConfig as t };