@incodetech/core 0.0.0-dev-20260313-8b7649e → 0.0.0-dev-20260316-0522f9e

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 (82) hide show
  1. package/dist/Actor-D3GOC38V.d.ts +2 -0
  2. package/dist/StateMachine-BFurBmbZ.d.ts +2 -0
  3. package/dist/addressSearch-B446UZn4.esm.js +423 -0
  4. package/dist/authentication.d.ts +10 -78
  5. package/dist/authentication.esm.js +11 -195
  6. package/dist/authenticationManager-BWtUIJXV.d.ts +66 -0
  7. package/dist/authenticationManager-IChdnUM9.esm.js +197 -0
  8. package/dist/{backCameraStream-B57NWDGu.esm.js → backCameraStream-DDzfvhxo.esm.js} +1 -1
  9. package/dist/curp-validation.d.ts +4 -4
  10. package/dist/curp-validation.esm.js +5 -5
  11. package/dist/{deepsightLoader-BXTRzhYx.esm.js → deepsightLoader-IPtIRYqd.esm.js} +4 -4
  12. package/dist/{deepsightService-CYCDsan2.d.ts → deepsightService-CP5OM4Fc.d.ts} +131 -3
  13. package/dist/{deepsightService-CTK55DG8.esm.js → deepsightService-Ca85OHZ-.esm.js} +3 -3
  14. package/dist/document-capture.d.ts +2 -2
  15. package/dist/document-capture.esm.js +6 -6
  16. package/dist/document-upload.d.ts +3 -3
  17. package/dist/document-upload.esm.js +5 -5
  18. package/dist/ekyb.d.ts +16 -5
  19. package/dist/ekyb.esm.js +245 -65
  20. package/dist/ekyc.d.ts +2 -12
  21. package/dist/ekyc.esm.js +34 -197
  22. package/dist/email.d.ts +3 -263
  23. package/dist/email.esm.js +6 -477
  24. package/dist/emailManager-BRFO9OW6.esm.js +486 -0
  25. package/dist/emailManager-DcYzBeT-.d.ts +335 -0
  26. package/dist/{events-b4_xvENs.esm.js → events-3HzCcoEy.esm.js} +2 -2
  27. package/dist/extensibility.d.ts +95 -0
  28. package/dist/extensibility.esm.js +17 -0
  29. package/dist/face-match.d.ts +1 -1
  30. package/dist/face-match.esm.js +5 -5
  31. package/dist/faceCaptureManagerFactory-Dm3dO_r0.d.ts +610 -0
  32. package/dist/{faceCaptureSetup-10lCb_yE.esm.js → faceCaptureSetup-I9wFuT1d.esm.js} +11 -11
  33. package/dist/flow.d.ts +7 -7
  34. package/dist/flow.esm.js +6 -84
  35. package/dist/{flowCompletionService-DHXqHOAk.esm.js → flowCompletionService-D1bhU2uN.esm.js} +2 -2
  36. package/dist/flowServices-B5YbZJ7r.esm.js +83 -0
  37. package/dist/geolocation.d.ts +1 -1
  38. package/dist/geolocation.esm.js +5 -5
  39. package/dist/government-validation.d.ts +1 -1
  40. package/dist/government-validation.esm.js +4 -4
  41. package/dist/id-A_upgNRR.esm.js +0 -0
  42. package/dist/id.d.ts +9 -9
  43. package/dist/id.esm.js +11 -10
  44. package/dist/{id-TUJyOPso.esm.js → idCaptureManager-BdlS0WrG.esm.js} +18 -11
  45. package/dist/{index-5ZEjz-8I.d.ts → idCaptureManager-dTZ7KTot.d.ts} +30 -8
  46. package/dist/index-Km_6UPBI.d.ts +1 -0
  47. package/dist/index.d.ts +21 -12
  48. package/dist/index.esm.js +33 -21
  49. package/dist/{lib-V3Lo-Jit.esm.js → lib-DJozC192.esm.js} +1 -1
  50. package/dist/phone.d.ts +3 -291
  51. package/dist/phone.esm.js +6 -551
  52. package/dist/phoneManager-BwJpxm-D.d.ts +370 -0
  53. package/dist/phoneManager-TWj65pNG.esm.js +560 -0
  54. package/dist/redirect-to-mobile.d.ts +1 -1
  55. package/dist/redirect-to-mobile.esm.js +4 -4
  56. package/dist/selfie.d.ts +10 -408
  57. package/dist/selfie.esm.js +11 -118
  58. package/dist/selfieManager-BeVNeGVa.esm.js +117 -0
  59. package/dist/selfieManager-BgSkTLJj.d.ts +68 -0
  60. package/dist/session.d.ts +1 -1
  61. package/dist/session.esm.js +3 -3
  62. package/dist/{src-D3v6I2la.esm.js → src-D0bFtylT.esm.js} +2 -2
  63. package/dist/{stats-D76Thmqp.esm.js → stats-kLtQIgsA.esm.js} +1 -1
  64. package/dist/stats.esm.js +2 -2
  65. package/dist/{streamingEvents-CQq5fJCL.esm.js → streamingEvents-BjxVqrJP.esm.js} +3 -3
  66. package/dist/{types-DnrAr9fb.d.ts → types-BHnsBsl_.d.ts} +1 -1
  67. package/dist/{types-BYYaKde4.d.ts → types-CWa0DQcn.d.ts} +12 -1
  68. package/dist/{types-Bn54lmeM.d.ts → types-seztsdvN.d.ts} +1 -1
  69. package/package.json +5 -1
  70. package/dist/Actor-B6Lr-x6S.d.ts +0 -2
  71. package/dist/StateMachine-WHeQE3lC.d.ts +0 -2
  72. package/dist/faceCaptureManagerFactory-D1NUo68Z.d.ts +0 -231
  73. package/dist/types-B4KNFqC4.d.ts +0 -130
  74. package/dist/usStates-D4SmlpeT.esm.js +0 -210
  75. /package/dist/{Manager-CG5CQ1kY.d.ts → Manager-DsNvecSe.d.ts} +0 -0
  76. /package/dist/{api-3fZO5bmj.esm.js → api-C2uzxrpN.esm.js} +0 -0
  77. /package/dist/{camera-D7zu0Mls.d.ts → camera-Bzi6CMAW.d.ts} +0 -0
  78. /package/dist/{chunk-B1Ox1Owh.esm.js → chunk-C4_ANvih.esm.js} +0 -0
  79. /package/dist/{endpoints-5sPFFmaB.esm.js → endpoints-IAlXA1zN.esm.js} +0 -0
  80. /package/dist/{flowCompletionService-DeWKduBI.d.ts → flowCompletionService-BiICW3B-.d.ts} +0 -0
  81. /package/dist/{warmup-Da5qDIWZ.d.ts → warmup-4e5k___O.d.ts} +0 -0
  82. /package/dist/{xstate.esm-07M59Cte.esm.js → xstate.esm-CcoTezCZ.esm.js} +0 -0
@@ -0,0 +1,2 @@
1
+ import { ActorRefFrom, createActor } from "xstate";
2
+ export { createActor as n, ActorRefFrom as t };
@@ -0,0 +1,2 @@
1
+ import { AnyStateMachine, StateMachine, fromPromise } from "xstate";
2
+ export { StateMachine as n, fromPromise as r, AnyStateMachine as t };
@@ -0,0 +1,423 @@
1
+ import { g as BrowserTimerProvider } from "./src-D0bFtylT.esm.js";
2
+ import { r as fromCallback } from "./xstate.esm-CcoTezCZ.esm.js";
3
+ import { t as api } from "./api-C2uzxrpN.esm.js";
4
+ import { t as endpoints } from "./endpoints-IAlXA1zN.esm.js";
5
+
6
+ //#region src/shared/usStates.ts
7
+ const usStates = {
8
+ AL: {
9
+ code: "AL",
10
+ name: "Alabama"
11
+ },
12
+ AK: {
13
+ code: "AK",
14
+ name: "Alaska"
15
+ },
16
+ AZ: {
17
+ code: "AZ",
18
+ name: "Arizona"
19
+ },
20
+ AR: {
21
+ code: "AR",
22
+ name: "Arkansas"
23
+ },
24
+ CA: {
25
+ code: "CA",
26
+ name: "California"
27
+ },
28
+ CO: {
29
+ code: "CO",
30
+ name: "Colorado"
31
+ },
32
+ CT: {
33
+ code: "CT",
34
+ name: "Connecticut"
35
+ },
36
+ DE: {
37
+ code: "DE",
38
+ name: "Delaware"
39
+ },
40
+ FL: {
41
+ code: "FL",
42
+ name: "Florida"
43
+ },
44
+ GA: {
45
+ code: "GA",
46
+ name: "Georgia"
47
+ },
48
+ HI: {
49
+ code: "HI",
50
+ name: "Hawaii"
51
+ },
52
+ ID: {
53
+ code: "ID",
54
+ name: "Idaho"
55
+ },
56
+ IL: {
57
+ code: "IL",
58
+ name: "Illinois"
59
+ },
60
+ IN: {
61
+ code: "IN",
62
+ name: "Indiana"
63
+ },
64
+ IA: {
65
+ code: "IA",
66
+ name: "Iowa"
67
+ },
68
+ KS: {
69
+ code: "KS",
70
+ name: "Kansas"
71
+ },
72
+ KY: {
73
+ code: "KY",
74
+ name: "Kentucky"
75
+ },
76
+ LA: {
77
+ code: "LA",
78
+ name: "Louisiana"
79
+ },
80
+ ME: {
81
+ code: "ME",
82
+ name: "Maine"
83
+ },
84
+ MD: {
85
+ code: "MD",
86
+ name: "Maryland"
87
+ },
88
+ MA: {
89
+ code: "MA",
90
+ name: "Massachusetts"
91
+ },
92
+ MI: {
93
+ code: "MI",
94
+ name: "Michigan"
95
+ },
96
+ MN: {
97
+ code: "MN",
98
+ name: "Minnesota"
99
+ },
100
+ MS: {
101
+ code: "MS",
102
+ name: "Mississippi"
103
+ },
104
+ MO: {
105
+ code: "MO",
106
+ name: "Missouri"
107
+ },
108
+ MT: {
109
+ code: "MT",
110
+ name: "Montana"
111
+ },
112
+ NE: {
113
+ code: "NE",
114
+ name: "Nebraska"
115
+ },
116
+ NV: {
117
+ code: "NV",
118
+ name: "Nevada"
119
+ },
120
+ NH: {
121
+ code: "NH",
122
+ name: "New Hampshire"
123
+ },
124
+ NJ: {
125
+ code: "NJ",
126
+ name: "New Jersey"
127
+ },
128
+ NM: {
129
+ code: "NM",
130
+ name: "New Mexico"
131
+ },
132
+ NY: {
133
+ code: "NY",
134
+ name: "New York"
135
+ },
136
+ NC: {
137
+ code: "NC",
138
+ name: "North Carolina"
139
+ },
140
+ ND: {
141
+ code: "ND",
142
+ name: "North Dakota"
143
+ },
144
+ OH: {
145
+ code: "OH",
146
+ name: "Ohio"
147
+ },
148
+ OK: {
149
+ code: "OK",
150
+ name: "Oklahoma"
151
+ },
152
+ OR: {
153
+ code: "OR",
154
+ name: "Oregon"
155
+ },
156
+ PA: {
157
+ code: "PA",
158
+ name: "Pennsylvania"
159
+ },
160
+ RI: {
161
+ code: "RI",
162
+ name: "Rhode Island"
163
+ },
164
+ SC: {
165
+ code: "SC",
166
+ name: "South Carolina"
167
+ },
168
+ SD: {
169
+ code: "SD",
170
+ name: "South Dakota"
171
+ },
172
+ TN: {
173
+ code: "TN",
174
+ name: "Tennessee"
175
+ },
176
+ TX: {
177
+ code: "TX",
178
+ name: "Texas"
179
+ },
180
+ UT: {
181
+ code: "UT",
182
+ name: "Utah"
183
+ },
184
+ VT: {
185
+ code: "VT",
186
+ name: "Vermont"
187
+ },
188
+ VA: {
189
+ code: "VA",
190
+ name: "Virginia"
191
+ },
192
+ WA: {
193
+ code: "WA",
194
+ name: "Washington"
195
+ },
196
+ WV: {
197
+ code: "WV",
198
+ name: "West Virginia"
199
+ },
200
+ WI: {
201
+ code: "WI",
202
+ name: "Wisconsin"
203
+ },
204
+ WY: {
205
+ code: "WY",
206
+ name: "Wyoming"
207
+ }
208
+ };
209
+ const usStateOptions = Object.values(usStates).map((state) => ({
210
+ value: state.code,
211
+ label: state.name
212
+ }));
213
+
214
+ //#endregion
215
+ //#region src/shared/postalCode.ts
216
+ const DEFAULT_POSTAL_CODE_MAX_LENGTH = 8;
217
+ const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
218
+ US: 10,
219
+ BR: 9,
220
+ GB: 8,
221
+ UK: 8,
222
+ AR: 8,
223
+ CA: 7,
224
+ IL: 7,
225
+ CN: 6,
226
+ NG: 6,
227
+ DE: 5,
228
+ ES: 5,
229
+ FR: 5,
230
+ IT: 5,
231
+ KE: 5,
232
+ MX: 5
233
+ };
234
+ const POSTAL_CODE_FORMAT_ERROR_KEYS = new Set([
235
+ "verification.errors.zipCodeInvalidFormat",
236
+ "verification.errors.postalCodeInvalidFormat",
237
+ "verification.errors.invalidPostalCodeFixedLength",
238
+ "verification.errors.CAPostalCodeInvalidFormat",
239
+ "verification.errors.UKPostalCodeInvalidFormat",
240
+ "verification.errors.ARPostalCodeInvalidFormat"
241
+ ]);
242
+ const FIXED_LENGTH_KEY = "verification.errors.invalidPostalCodeFixedLength";
243
+ const FIXED_DIGIT_POSTAL_CODE_LENGTH = {
244
+ DE: 5,
245
+ ES: 5,
246
+ FR: 5,
247
+ IT: 5,
248
+ KE: 5,
249
+ MX: 5,
250
+ CN: 6,
251
+ NG: 6,
252
+ IL: 7
253
+ };
254
+ function getPostalCodeMaxLength(country) {
255
+ return POSTAL_CODE_MAX_LENGTH_BY_COUNTRY[country] ?? DEFAULT_POSTAL_CODE_MAX_LENGTH;
256
+ }
257
+ function getPostalCodeErrorKey(country) {
258
+ if (country in FIXED_DIGIT_POSTAL_CODE_LENGTH) return FIXED_LENGTH_KEY;
259
+ if (country === "CA") return "verification.errors.CAPostalCodeInvalidFormat";
260
+ if (country === "AR") return "verification.errors.ARPostalCodeInvalidFormat";
261
+ if (country === "GB" || country === "UK") return "verification.errors.UKPostalCodeInvalidFormat";
262
+ if (country === "US") return "verification.errors.zipCodeInvalidFormat";
263
+ return "verification.errors.postalCodeInvalidFormat";
264
+ }
265
+ const US_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{9}|\d{5}-\d{4})$/;
266
+ const BR_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{8}|\d{5}-\d{3})$/;
267
+ const CA_POSTAL_CODE_REGEX = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
268
+ const UK_POSTAL_CODE_REGEX = /^(?:[A-Z]{2}\d|[A-Z]{2}\d{2}|[A-Z]\d|[A-Z]\d{2}|[A-Z]\d[A-Z]|[A-Z]{2}\d[A-Z]) \d[A-Z]{2}$/;
269
+ const AR_POSTAL_CODE_REGEX = /^[A-Za-z]\d{4}[A-Za-z]{3}$/;
270
+ const FIVE_DIGIT_REGEX = /^\d{5}$/;
271
+ const SIX_DIGIT_REGEX = /^\d{6}$/;
272
+ const IL_POSTAL_CODE_REGEX = /^\d{7}$/;
273
+ /**
274
+ * Validates a postal code by country.
275
+ * Covers all countries used by eKYC and eKYB.
276
+ */
277
+ function validatePostalCode(postalCode, country) {
278
+ if (!postalCode) return false;
279
+ switch (country) {
280
+ case "US": return US_POSTAL_CODE_REGEX.test(postalCode);
281
+ case "BR": return BR_POSTAL_CODE_REGEX.test(postalCode);
282
+ case "CA": return CA_POSTAL_CODE_REGEX.test(postalCode);
283
+ case "GB":
284
+ case "UK": return UK_POSTAL_CODE_REGEX.test(postalCode.toUpperCase());
285
+ case "AR": return AR_POSTAL_CODE_REGEX.test(postalCode.replace(/\s/g, "").toUpperCase());
286
+ case "IL": return IL_POSTAL_CODE_REGEX.test(postalCode);
287
+ case "CN":
288
+ case "NG": return SIX_DIGIT_REGEX.test(postalCode);
289
+ case "DE":
290
+ case "FR":
291
+ case "IT":
292
+ case "ES":
293
+ case "MX":
294
+ case "KE": return FIVE_DIGIT_REGEX.test(postalCode);
295
+ case "CM": return postalCode.length > 0;
296
+ default: {
297
+ const stripped = postalCode.replace(/\D/g, "");
298
+ return /^\d+$/.test(stripped) && [5, DEFAULT_POSTAL_CODE_MAX_LENGTH].includes(stripped.length);
299
+ }
300
+ }
301
+ }
302
+ /**
303
+ * Progressively formats postal code input by country.
304
+ * Covers all countries used by eKYC and eKYB.
305
+ */
306
+ function formatPostalCode(value, country) {
307
+ if (country === "US" || country === "BR") {
308
+ const maxDigits = country === "US" ? 9 : 8;
309
+ const hasDash = value.includes("-");
310
+ const digits = value.replace(/\D/g, "").slice(0, maxDigits);
311
+ if (digits.length <= 5) {
312
+ if (hasDash && digits.length === 5) return `${digits}-`;
313
+ return digits;
314
+ }
315
+ if (hasDash) return `${digits.slice(0, 5)}-${digits.slice(5)}`;
316
+ return digits;
317
+ }
318
+ if (country === "ES") return value.replace(/\D/g, "").slice(0, 5);
319
+ if (country === "CA") {
320
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 6);
321
+ if (normalized.length <= 3) return normalized;
322
+ return `${normalized.slice(0, 3)} ${normalized.slice(3)}`;
323
+ }
324
+ if (country === "GB" || country === "UK") {
325
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 7);
326
+ if (normalized.length <= 3) return normalized;
327
+ return `${normalized.slice(0, -3)} ${normalized.slice(-3)}`;
328
+ }
329
+ if (country === "AR") return value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 8);
330
+ if (country === "IL") return value.replace(/\D/g, "").slice(0, 7);
331
+ if (country === "CN" || country === "NG") return value.replace(/\D/g, "").slice(0, 6);
332
+ if (country === "DE" || country === "FR" || country === "IT" || country === "MX" || country === "KE") return value.replace(/\D/g, "").slice(0, 5);
333
+ return value.slice(0, DEFAULT_POSTAL_CODE_MAX_LENGTH);
334
+ }
335
+
336
+ //#endregion
337
+ //#region src/shared/displayErrors.ts
338
+ const DYNAMIC_REQUIRED_KEY = "verification.errors.fieldRequiredDynamic";
339
+
340
+ //#endregion
341
+ //#region src/shared/addressSuggestion.ts
342
+ /**
343
+ * Fills form values from an address autocomplete suggestion.
344
+ * Shared between eKYC and eKYB address forms.
345
+ */
346
+ function fillFromSuggestion(values, touched, suggestion) {
347
+ const newValues = { ...values };
348
+ const newTouched = { ...touched };
349
+ if (suggestion.street) {
350
+ newValues.street = suggestion.street;
351
+ newTouched.street = true;
352
+ }
353
+ if (suggestion.city) {
354
+ newValues.city = suggestion.city;
355
+ newTouched.city = true;
356
+ }
357
+ if (suggestion.stateCode) {
358
+ newValues.state = suggestion.stateCode;
359
+ newTouched.state = true;
360
+ }
361
+ if (suggestion.postalCode) {
362
+ newValues.postalCode = suggestion.postalCode;
363
+ newTouched.postalCode = true;
364
+ }
365
+ if (suggestion.houseNumber) {
366
+ newValues.houseNo = suggestion.houseNumber;
367
+ newTouched.houseNo = true;
368
+ }
369
+ return {
370
+ values: newValues,
371
+ touched: newTouched
372
+ };
373
+ }
374
+
375
+ //#endregion
376
+ //#region src/shared/addressSearch.ts
377
+ /** Searches for address suggestions via the address autocomplete API. */
378
+ async function searchAddress(query, signal) {
379
+ const res = await api.post(endpoints.addressAutocomplete, { search: query }, { signal });
380
+ if (!res.ok) throw new Error(`POST ${endpoints.addressAutocomplete} failed: ${res.status} ${res.statusText}`);
381
+ return { apiResponse: { items: (res.data.apiResponse?.items ?? []).map((item, i) => {
382
+ const addr = item.address ?? item;
383
+ return {
384
+ id: item.id ?? i,
385
+ label: addr.label ?? item.title ?? "",
386
+ street: addr.street,
387
+ city: addr.city,
388
+ stateCode: addr.stateCode ?? addr.state,
389
+ postalCode: addr.postalCode,
390
+ houseNumber: addr.houseNumber,
391
+ countryCode: addr.countryCode
392
+ };
393
+ }) } };
394
+ }
395
+ const DEBOUNCE_MS = 300;
396
+ /**
397
+ * XState callback actor that debounces address search requests.
398
+ * Cancels in-flight HTTP requests when the actor is stopped.
399
+ */
400
+ const debounceSearchActor = fromCallback(({ input, sendBack }) => {
401
+ const timerProvider = BrowserTimerProvider.getInstance();
402
+ const controller = new AbortController();
403
+ const handle = timerProvider.setTimeout(async () => {
404
+ try {
405
+ sendBack({
406
+ type: "RESULTS",
407
+ suggestions: (await searchAddress(input.query, controller.signal)).apiResponse?.items ?? []
408
+ });
409
+ } catch {
410
+ if (!controller.signal.aborted) sendBack({
411
+ type: "RESULTS",
412
+ suggestions: []
413
+ });
414
+ }
415
+ }, DEBOUNCE_MS);
416
+ return () => {
417
+ timerProvider.clearTimeout(handle);
418
+ controller.abort();
419
+ };
420
+ });
421
+
422
+ //#endregion
423
+ export { POSTAL_CODE_FORMAT_ERROR_KEYS as a, getPostalCodeMaxLength as c, FIXED_DIGIT_POSTAL_CODE_LENGTH as i, validatePostalCode as l, fillFromSuggestion as n, formatPostalCode as o, DYNAMIC_REQUIRED_KEY as r, getPostalCodeErrorKey as s, debounceSearchActor as t, usStateOptions as u };
@@ -1,79 +1,11 @@
1
- import "./types-B4KNFqC4.js";
2
- import "./warmup-Da5qDIWZ.js";
3
- import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-D1NUo68Z.js";
4
- import { t as Manager } from "./Manager-CG5CQ1kY.js";
5
- import "./camera-D7zu0Mls.js";
6
- import { t as ActorRefFrom } from "./Actor-B6Lr-x6S.js";
7
- import { t as AnyStateMachine } from "./StateMachine-WHeQE3lC.js";
8
- import "./types-DnrAr9fb.js";
9
- import { r as FlowModuleConfig } from "./types-Bn54lmeM.js";
10
-
11
- //#region src/modules/authentication/authenticationStateMachine.d.ts
12
- declare const _authenticationMachine: AnyStateMachine;
13
- type AuthenticationMachine = typeof _authenticationMachine;
14
- declare const authenticationMachine: AnyStateMachine;
15
- //#endregion
16
- //#region src/modules/authentication/types.d.ts
17
- type AuthenticationConfig = FlowModuleConfig['AUTHENTICATION'] & BaseFaceCaptureConfig;
18
- //#endregion
19
- //#region src/modules/authentication/authenticationActor.d.ts
20
- type CreateAuthenticationActorOptions = {
21
- config: AuthenticationConfig;
22
- dependencies?: FaceCaptureDependencies;
23
- authHint?: string;
24
- };
25
- type AuthenticationActor = ActorRefFrom<AuthenticationMachine>;
26
- declare function createAuthenticationActor(options: CreateAuthenticationActorOptions): AuthenticationActor;
27
- //#endregion
28
- //#region src/modules/authentication/authenticationManager.d.ts
29
- type AuthenticationState = FaceCaptureManagerState;
30
- /**
31
- * Creates an authentication manager instance for handling face authentication flow.
32
- *
33
- * The authentication manager provides:
34
- * - State management with statuses: `idle`, `loading`, `tutorial`, `permissions`, `capture`, `finished`, `closed`, `error`
35
- * - Permission handling with nested states: `idle`, `requesting`, `denied`, `learnMore`
36
- * - Capture handling with nested states: `initializing`, `startingRecorder`, `recordingActive`, `detecting`, `capturing`, `uploading`, `uploadError`, `success`
37
- * - Camera stream access when in `capture` state
38
- * - Detection status feedback during face detection
39
- * - Attempt tracking with `attemptsRemaining`
40
- *
41
- * @param options - Configuration for the authentication actor
42
- * @param options.config - The authentication module configuration from the flow
43
- * @param options.authHint - Hint for identifying the user (e.g., phone number, email)
44
- * @returns A manager instance with state subscription, API methods, and lifecycle controls
45
- *
46
- * @example
47
- * ```ts
48
- * const authManager = createAuthenticationManager({
49
- * config: authConfig,
50
- * authHint: 'user@example.com'
51
- * });
52
- *
53
- * authManager.subscribe((state) => {
54
- * if (state.status === 'capture') {
55
- * console.log('Camera ready:', state.stream);
56
- * console.log('Detection status:', state.detectionStatus);
57
- * }
58
- * if (state.status === 'finished') {
59
- * console.log('Authentication successful!');
60
- * }
61
- * });
62
- *
63
- * authManager.load();
64
- * ```
65
- */
66
- declare function createAuthenticationManager(options: CreateAuthenticationActorOptions): Manager<FaceCaptureManagerState> & {
67
- load(): void;
68
- nextStep(): void;
69
- requestPermission(): void;
70
- goToLearnMore(): void;
71
- back(): void;
72
- close(): void;
73
- reset(): void;
74
- retryCapture(): void;
75
- capture(): void;
76
- };
77
- type AuthenticationManager = FaceCaptureManager;
78
- //#endregion
1
+ import "./deepsightService-CP5OM4Fc.js";
2
+ import { g as AuthenticationConfig, h as createAuthenticationActor, m as CreateAuthenticationActorOptions, p as AuthenticationActor, y as authenticationMachine } from "./faceCaptureManagerFactory-Dm3dO_r0.js";
3
+ import "./warmup-4e5k___O.js";
4
+ import "./Manager-DsNvecSe.js";
5
+ import "./camera-Bzi6CMAW.js";
6
+ import "./Actor-D3GOC38V.js";
7
+ import "./StateMachine-BFurBmbZ.js";
8
+ import "./types-BHnsBsl_.js";
9
+ import "./types-seztsdvN.js";
10
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-BWtUIJXV.js";
79
11
  export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };