@incodetech/core 0.0.0-dev-20260320-c9bdba0 → 0.0.0-dev-20260320-e46eb90

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 (79) hide show
  1. package/dist/{addressSearch-B446UZn4.esm.js → addressSearch-O-LFYClt.esm.js} +4 -4
  2. package/dist/authentication.d.ts +10 -10
  3. package/dist/authentication.esm.js +11 -11
  4. package/dist/{authenticationManager-IChdnUM9.esm.js → authenticationManager-BDCN6xbG.esm.js} +7 -7
  5. package/dist/{authenticationManager-CsDKpKla.d.ts → authenticationManager-BH1ZY_16.d.ts} +2 -2
  6. package/dist/{backCameraStream-DDzfvhxo.esm.js → backCameraStream-D-_dxon_.esm.js} +1 -1
  7. package/dist/consent.d.ts +402 -0
  8. package/dist/consent.esm.js +231 -0
  9. package/dist/curp-validation.d.ts +4 -4
  10. package/dist/curp-validation.esm.js +5 -5
  11. package/dist/{deepsightLoader-IPtIRYqd.esm.js → deepsightLoader-DXU9BgO8.esm.js} +4 -4
  12. package/dist/{deepsightService-CP5OM4Fc.d.ts → deepsightService-B4HcyNDh.d.ts} +1 -1
  13. package/dist/{deepsightService-Ca85OHZ-.esm.js → deepsightService-B4jCQAh8.esm.js} +3 -3
  14. package/dist/document-capture.d.ts +37 -37
  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 +2 -2
  19. package/dist/ekyb.esm.js +7 -7
  20. package/dist/ekyc.d.ts +2 -2
  21. package/dist/ekyc.esm.js +6 -6
  22. package/dist/email.d.ts +3 -3
  23. package/dist/email.esm.js +6 -6
  24. package/dist/{emailManager-BRFO9OW6.esm.js → emailManager-BWKRZIDo.esm.js} +5 -5
  25. package/dist/{emailManager-DcYzBeT-.d.ts → emailManager-jXfroijR.d.ts} +2 -2
  26. package/dist/{endpoints-IAlXA1zN.esm.js → endpoints-BGaT9ldX.esm.js} +2 -0
  27. package/dist/{events-3HzCcoEy.esm.js → events-CcXL3VWp.esm.js} +2 -2
  28. package/dist/extensibility.d.ts +14 -14
  29. package/dist/extensibility.esm.js +15 -15
  30. package/dist/face-match.d.ts +1 -1
  31. package/dist/face-match.esm.js +5 -5
  32. package/dist/{faceCaptureManagerFactory-COWObGBr.d.ts → faceCaptureManagerFactory-CULlsJHa.d.ts} +7 -7
  33. package/dist/{faceCaptureSetup-I9wFuT1d.esm.js → faceCaptureSetup-ePWTb1VF.esm.js} +9 -9
  34. package/dist/flow.d.ts +7 -7
  35. package/dist/flow.esm.js +6 -6
  36. package/dist/{flowCompletionService-D1bhU2uN.esm.js → flowCompletionService-BJ1cHA-d.esm.js} +2 -2
  37. package/dist/{flowServices-B5YbZJ7r.esm.js → flowServices-B5BTeA3c.esm.js} +2 -2
  38. package/dist/geolocation.d.ts +1 -1
  39. package/dist/geolocation.esm.js +5 -5
  40. package/dist/government-validation.d.ts +1 -1
  41. package/dist/government-validation.esm.js +4 -4
  42. package/dist/id.d.ts +9 -9
  43. package/dist/id.esm.js +11 -11
  44. package/dist/{idCaptureManager-7mOidZiv.esm.js → idCaptureManager-DJaBQlDY.esm.js} +10 -10
  45. package/dist/{idCaptureManager-UIUJISQP.d.ts → idCaptureManager-DY9Le1U5.d.ts} +6 -6
  46. package/dist/index.d.ts +10 -10
  47. package/dist/index.esm.js +11 -11
  48. package/dist/{lib-DJozC192.esm.js → lib-DCX3_IAU.esm.js} +1 -1
  49. package/dist/phone.d.ts +3 -3
  50. package/dist/phone.esm.js +6 -6
  51. package/dist/{phoneManager-BwJpxm-D.d.ts → phoneManager-BXeQetqQ.d.ts} +2 -2
  52. package/dist/{phoneManager-D-Mi06el.esm.js → phoneManager-CQKg7NiP.esm.js} +5 -5
  53. package/dist/redirect-to-mobile.d.ts +1 -1
  54. package/dist/redirect-to-mobile.esm.js +4 -4
  55. package/dist/selfie.d.ts +10 -10
  56. package/dist/selfie.esm.js +11 -11
  57. package/dist/{selfieManager-B3CAoqXl.d.ts → selfieManager-BzVXhKYT.d.ts} +2 -2
  58. package/dist/{selfieManager-BeVNeGVa.esm.js → selfieManager-DBIy2tuK.esm.js} +4 -4
  59. package/dist/session.d.ts +1 -1
  60. package/dist/session.esm.js +3 -3
  61. package/dist/{src-D0bFtylT.esm.js → src-LjezYyPe.esm.js} +2 -2
  62. package/dist/{stats-kLtQIgsA.esm.js → stats-DJ3CICeP.esm.js} +1 -1
  63. package/dist/stats.esm.js +2 -2
  64. package/dist/{streamingEvents-BjxVqrJP.esm.js → streamingEvents-JeLmnOFf.esm.js} +3 -3
  65. package/dist/{types-BHnsBsl_.d.ts → types-CSgWWTDb.d.ts} +1 -1
  66. package/dist/{types-BZcBRlI8.d.ts → types-S1nlDDGB.d.ts} +1 -1
  67. package/package.json +5 -1
  68. /package/dist/{Actor-D3GOC38V.d.ts → Actor-Bd72Yikw.d.ts} +0 -0
  69. /package/dist/{Manager-DsNvecSe.d.ts → Manager-DKHVvCA1.d.ts} +0 -0
  70. /package/dist/{StateMachine-BFurBmbZ.d.ts → StateMachine-D-N4dLZo.d.ts} +0 -0
  71. /package/dist/{api-C2uzxrpN.esm.js → api-G4JA8CXK.esm.js} +0 -0
  72. /package/dist/{camera-Bzi6CMAW.d.ts → camera-pEBK1r31.d.ts} +0 -0
  73. /package/dist/{chunk-C4_ANvih.esm.js → chunk-C24vxluH.esm.js} +0 -0
  74. /package/dist/{displayErrors-B2eFGhh_.d.ts → displayErrors-mVWkbnVw.d.ts} +0 -0
  75. /package/dist/{flowCompletionService-BiICW3B-.d.ts → flowCompletionService-B89QmIQg.d.ts} +0 -0
  76. /package/dist/{id-A_upgNRR.esm.js → id-B1BwT5Nd.esm.js} +0 -0
  77. /package/dist/{index-Km_6UPBI.d.ts → index-DwdIY3SO.d.ts} +0 -0
  78. /package/dist/{warmup-4e5k___O.d.ts → warmup-LifmFv5i.d.ts} +0 -0
  79. /package/dist/{xstate.esm-CcoTezCZ.esm.js → xstate.esm-nEixMy7s.esm.js} +0 -0
@@ -1,7 +1,7 @@
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";
1
+ import { g as BrowserTimerProvider } from "./src-LjezYyPe.esm.js";
2
+ import { r as fromCallback } from "./xstate.esm-nEixMy7s.esm.js";
3
+ import { t as api } from "./api-G4JA8CXK.esm.js";
4
+ import { t as endpoints } from "./endpoints-BGaT9ldX.esm.js";
5
5
 
6
6
  //#region src/shared/usStates.ts
7
7
  const usStates = {
@@ -1,11 +1,11 @@
1
- import "./deepsightService-CP5OM4Fc.js";
2
- import { g as AuthenticationConfig, h as createAuthenticationActor, m as CreateAuthenticationActorOptions, p as AuthenticationActor, y as authenticationMachine } from "./faceCaptureManagerFactory-COWObGBr.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-BZcBRlI8.js";
10
- import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-CsDKpKla.js";
1
+ import "./deepsightService-B4HcyNDh.js";
2
+ import { g as AuthenticationConfig, h as createAuthenticationActor, m as CreateAuthenticationActorOptions, p as AuthenticationActor, y as authenticationMachine } from "./faceCaptureManagerFactory-CULlsJHa.js";
3
+ import "./warmup-LifmFv5i.js";
4
+ import "./Manager-DKHVvCA1.js";
5
+ import "./camera-pEBK1r31.js";
6
+ import "./Actor-Bd72Yikw.js";
7
+ import "./StateMachine-D-N4dLZo.js";
8
+ import "./types-CSgWWTDb.js";
9
+ import "./types-S1nlDDGB.js";
10
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-BH1ZY_16.js";
11
11
  export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,13 +1,13 @@
1
- import "./events-3HzCcoEy.esm.js";
2
- import "./backCameraStream-DDzfvhxo.esm.js";
3
- import "./src-D0bFtylT.esm.js";
4
- import "./xstate.esm-CcoTezCZ.esm.js";
5
- import "./streamingEvents-BjxVqrJP.esm.js";
6
- import "./deepsightService-Ca85OHZ-.esm.js";
7
- import "./api-C2uzxrpN.esm.js";
8
- import "./endpoints-IAlXA1zN.esm.js";
9
- import "./stats-kLtQIgsA.esm.js";
10
- import "./faceCaptureSetup-I9wFuT1d.esm.js";
11
- import { i as authenticationMachine, r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-IChdnUM9.esm.js";
1
+ import "./events-CcXL3VWp.esm.js";
2
+ import "./backCameraStream-D-_dxon_.esm.js";
3
+ import "./src-LjezYyPe.esm.js";
4
+ import "./xstate.esm-nEixMy7s.esm.js";
5
+ import "./streamingEvents-JeLmnOFf.esm.js";
6
+ import "./deepsightService-B4jCQAh8.esm.js";
7
+ import "./api-G4JA8CXK.esm.js";
8
+ import "./endpoints-BGaT9ldX.esm.js";
9
+ import "./stats-DJ3CICeP.esm.js";
10
+ import "./faceCaptureSetup-ePWTb1VF.esm.js";
11
+ import { i as authenticationMachine, r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-BDCN6xbG.esm.js";
12
12
 
13
13
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,10 +1,10 @@
1
- import { d as addEvent, n as eventModuleNames } from "./events-3HzCcoEy.esm.js";
2
- import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-D0bFtylT.esm.js";
3
- import { a as createActor, i as fromPromise, n as assign } from "./xstate.esm-CcoTezCZ.esm.js";
4
- import { l as getDeviceClass } from "./streamingEvents-BjxVqrJP.esm.js";
5
- import { t as api } from "./api-C2uzxrpN.esm.js";
6
- import { t as endpoints } from "./endpoints-IAlXA1zN.esm.js";
7
- import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManagerFromActor, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-I9wFuT1d.esm.js";
1
+ import { d as addEvent, n as eventModuleNames } from "./events-CcXL3VWp.esm.js";
2
+ import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-LjezYyPe.esm.js";
3
+ import { a as createActor, i as fromPromise, n as assign } from "./xstate.esm-nEixMy7s.esm.js";
4
+ import { l as getDeviceClass } from "./streamingEvents-JeLmnOFf.esm.js";
5
+ import { t as api } from "./api-G4JA8CXK.esm.js";
6
+ import { t as endpoints } from "./endpoints-BGaT9ldX.esm.js";
7
+ import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManagerFromActor, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-ePWTb1VF.esm.js";
8
8
 
9
9
  //#region src/modules/authentication/authenticationErrorUtils.ts
10
10
  const AUTH_ERROR_MAP = {
@@ -1,5 +1,5 @@
1
- import { m as CreateAuthenticationActorOptions, n as FaceCaptureManagerState, p as AuthenticationActor, t as FaceCaptureManager } from "./faceCaptureManagerFactory-COWObGBr.js";
2
- import { t as Manager } from "./Manager-DsNvecSe.js";
1
+ import { m as CreateAuthenticationActorOptions, n as FaceCaptureManagerState, p as AuthenticationActor, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CULlsJHa.js";
2
+ import { t as Manager } from "./Manager-DKHVvCA1.js";
3
3
 
4
4
  //#region src/modules/authentication/authenticationManager.d.ts
5
5
  type AuthenticationState = FaceCaptureManagerState;
@@ -1,4 +1,4 @@
1
- import { B as isSafari, D as enumerateVideoDevices, E as applyTrackConstraints, F as isAndroid, L as isIOS, O as requestCameraAccess, k as stopCameraStream, z as isIPhone14OrHigher } from "./src-D0bFtylT.esm.js";
1
+ import { B as isSafari, D as enumerateVideoDevices, E as applyTrackConstraints, F as isAndroid, L as isIOS, O as requestCameraAccess, k as stopCameraStream, z as isIPhone14OrHigher } from "./src-LjezYyPe.esm.js";
2
2
 
3
3
  //#region ../infra/src/capabilities/ITimerCapability.ts
4
4
  function sleep(ms) {
@@ -0,0 +1,402 @@
1
+ import { t as Manager } from "./Manager-DKHVvCA1.js";
2
+ import * as xstate63 from "xstate";
3
+
4
+ //#region src/modules/consent/types.d.ts
5
+ type ConsentConfig = {
6
+ combinedConsents?: string;
7
+ consentId?: string;
8
+ };
9
+ type ConsentCheckbox = {
10
+ id: string;
11
+ label: string;
12
+ required: boolean;
13
+ checked: boolean;
14
+ };
15
+ type FetchCombinedConsentResponse = {
16
+ languageConsentId: string;
17
+ terms: string;
18
+ title: string;
19
+ consents: Array<{
20
+ checkboxId: string;
21
+ consentText: string;
22
+ optional: boolean;
23
+ }>;
24
+ };
25
+ //#endregion
26
+ //#region src/modules/consent/consentStateMachine.d.ts
27
+ type ConsentContext = {
28
+ config: ConsentConfig;
29
+ title: string;
30
+ richText: string;
31
+ languageConsentId: string;
32
+ checkboxes: ConsentCheckbox[];
33
+ error: string | undefined;
34
+ };
35
+ type ConsentInput = {
36
+ config: ConsentConfig;
37
+ };
38
+ declare const consentMachine: xstate63.StateMachine<ConsentContext, {
39
+ type: "LOAD";
40
+ } | {
41
+ type: "TOGGLE_CHECKBOX";
42
+ checkboxId: string;
43
+ } | {
44
+ type: "SUBMIT";
45
+ } | {
46
+ type: "RETRY";
47
+ } | {
48
+ type: "RESET";
49
+ }, {
50
+ [x: string]: xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<FetchCombinedConsentResponse, {
51
+ consentId: string;
52
+ }, xstate63.EventObject>> | xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<void, {
53
+ languageConsentId: string;
54
+ checkboxes: ConsentCheckbox[];
55
+ }, xstate63.EventObject>> | undefined;
56
+ }, xstate63.Values<{
57
+ fetchConsent: {
58
+ src: "fetchConsent";
59
+ logic: xstate63.PromiseActorLogic<FetchCombinedConsentResponse, {
60
+ consentId: string;
61
+ }, xstate63.EventObject>;
62
+ id: string | undefined;
63
+ };
64
+ submitConsent: {
65
+ src: "submitConsent";
66
+ logic: xstate63.PromiseActorLogic<void, {
67
+ languageConsentId: string;
68
+ checkboxes: ConsentCheckbox[];
69
+ }, xstate63.EventObject>;
70
+ id: string | undefined;
71
+ };
72
+ }>, xstate63.Values<{
73
+ setError: {
74
+ type: "setError";
75
+ params: unknown;
76
+ };
77
+ clearError: {
78
+ type: "clearError";
79
+ params: unknown;
80
+ };
81
+ setConsentData: {
82
+ type: "setConsentData";
83
+ params: unknown;
84
+ };
85
+ toggleCheckbox: {
86
+ type: "toggleCheckbox";
87
+ params: unknown;
88
+ };
89
+ resetContext: {
90
+ type: "resetContext";
91
+ params: unknown;
92
+ };
93
+ trackConsentGiven: {
94
+ type: "trackConsentGiven";
95
+ params: unknown;
96
+ };
97
+ }>, {
98
+ type: "canSubmit";
99
+ params: unknown;
100
+ }, never, "error" | "idle" | "finished" | "loading" | "display" | "submitting", string, ConsentInput, xstate63.NonReducibleUnknown, xstate63.EventObject, xstate63.MetaObject, {
101
+ readonly id: "consent";
102
+ readonly initial: "idle";
103
+ readonly context: ({
104
+ input
105
+ }: {
106
+ spawn: {
107
+ <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
108
+ src: "fetchConsent";
109
+ logic: xstate63.PromiseActorLogic<FetchCombinedConsentResponse, {
110
+ consentId: string;
111
+ }, xstate63.EventObject>;
112
+ id: string | undefined;
113
+ } extends infer T ? T extends {
114
+ src: "fetchConsent";
115
+ logic: xstate63.PromiseActorLogic<FetchCombinedConsentResponse, {
116
+ consentId: string;
117
+ }, xstate63.EventObject>;
118
+ id: string | undefined;
119
+ } ? T extends {
120
+ src: TSrc;
121
+ } ? xstate63.ConditionalRequired<[options?: ({
122
+ id?: T["id"] | undefined;
123
+ systemId?: string;
124
+ input?: xstate63.InputFrom<T["logic"]> | undefined;
125
+ syncSnapshot?: boolean;
126
+ } & { [K in xstate63.RequiredActorOptions<T>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T>>> : never : never : never) | ({
127
+ src: "submitConsent";
128
+ logic: xstate63.PromiseActorLogic<void, {
129
+ languageConsentId: string;
130
+ checkboxes: ConsentCheckbox[];
131
+ }, xstate63.EventObject>;
132
+ id: string | undefined;
133
+ } extends infer T_1 ? T_1 extends {
134
+ src: "submitConsent";
135
+ logic: xstate63.PromiseActorLogic<void, {
136
+ languageConsentId: string;
137
+ checkboxes: ConsentCheckbox[];
138
+ }, xstate63.EventObject>;
139
+ id: string | undefined;
140
+ } ? T_1 extends {
141
+ src: TSrc;
142
+ } ? xstate63.ConditionalRequired<[options?: ({
143
+ id?: T_1["id"] | undefined;
144
+ systemId?: string;
145
+ input?: xstate63.InputFrom<T_1["logic"]> | undefined;
146
+ syncSnapshot?: boolean;
147
+ } & { [K_1 in xstate63.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T_1>>> : never : never : never)): xstate63.ActorRefFromLogic<xstate63.GetConcreteByKey<xstate63.Values<{
148
+ fetchConsent: {
149
+ src: "fetchConsent";
150
+ logic: xstate63.PromiseActorLogic<FetchCombinedConsentResponse, {
151
+ consentId: string;
152
+ }, xstate63.EventObject>;
153
+ id: string | undefined;
154
+ };
155
+ submitConsent: {
156
+ src: "submitConsent";
157
+ logic: xstate63.PromiseActorLogic<void, {
158
+ languageConsentId: string;
159
+ checkboxes: ConsentCheckbox[];
160
+ }, xstate63.EventObject>;
161
+ id: string | undefined;
162
+ };
163
+ }>, "src", TSrc>["logic"]>;
164
+ <TLogic extends xstate63.AnyActorLogic>(src: TLogic, ...[options]: xstate63.ConditionalRequired<[options?: ({
165
+ id?: never;
166
+ systemId?: string;
167
+ input?: xstate63.InputFrom<TLogic> | undefined;
168
+ syncSnapshot?: boolean;
169
+ } & { [K in xstate63.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredLogicInput<TLogic>>>): xstate63.ActorRefFromLogic<TLogic>;
170
+ };
171
+ input: ConsentInput;
172
+ self: xstate63.ActorRef<xstate63.MachineSnapshot<ConsentContext, {
173
+ type: "LOAD";
174
+ } | {
175
+ type: "TOGGLE_CHECKBOX";
176
+ checkboxId: string;
177
+ } | {
178
+ type: "SUBMIT";
179
+ } | {
180
+ type: "RETRY";
181
+ } | {
182
+ type: "RESET";
183
+ }, Record<string, xstate63.AnyActorRef | undefined>, xstate63.StateValue, string, unknown, any, any>, {
184
+ type: "LOAD";
185
+ } | {
186
+ type: "TOGGLE_CHECKBOX";
187
+ checkboxId: string;
188
+ } | {
189
+ type: "SUBMIT";
190
+ } | {
191
+ type: "RETRY";
192
+ } | {
193
+ type: "RESET";
194
+ }, xstate63.AnyEventObject>;
195
+ }) => {
196
+ config: ConsentConfig;
197
+ title: string;
198
+ richText: string;
199
+ languageConsentId: string;
200
+ checkboxes: never[];
201
+ error: undefined;
202
+ };
203
+ readonly states: {
204
+ readonly idle: {
205
+ readonly on: {
206
+ readonly LOAD: {
207
+ readonly target: "loading";
208
+ readonly actions: "clearError";
209
+ };
210
+ };
211
+ };
212
+ readonly loading: {
213
+ readonly invoke: {
214
+ readonly id: "fetchConsent";
215
+ readonly src: "fetchConsent";
216
+ readonly input: ({
217
+ context
218
+ }: {
219
+ context: ConsentContext;
220
+ event: {
221
+ type: "LOAD";
222
+ } | {
223
+ type: "TOGGLE_CHECKBOX";
224
+ checkboxId: string;
225
+ } | {
226
+ type: "SUBMIT";
227
+ } | {
228
+ type: "RETRY";
229
+ } | {
230
+ type: "RESET";
231
+ };
232
+ self: xstate63.ActorRef<xstate63.MachineSnapshot<ConsentContext, {
233
+ type: "LOAD";
234
+ } | {
235
+ type: "TOGGLE_CHECKBOX";
236
+ checkboxId: string;
237
+ } | {
238
+ type: "SUBMIT";
239
+ } | {
240
+ type: "RETRY";
241
+ } | {
242
+ type: "RESET";
243
+ }, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
244
+ type: "LOAD";
245
+ } | {
246
+ type: "TOGGLE_CHECKBOX";
247
+ checkboxId: string;
248
+ } | {
249
+ type: "SUBMIT";
250
+ } | {
251
+ type: "RETRY";
252
+ } | {
253
+ type: "RESET";
254
+ }, xstate63.AnyEventObject>;
255
+ }) => {
256
+ consentId: string;
257
+ };
258
+ readonly onDone: {
259
+ readonly target: "display";
260
+ readonly actions: "setConsentData";
261
+ };
262
+ readonly onError: {
263
+ readonly target: "error";
264
+ readonly actions: "setError";
265
+ };
266
+ };
267
+ };
268
+ readonly display: {
269
+ readonly on: {
270
+ readonly TOGGLE_CHECKBOX: {
271
+ readonly actions: "toggleCheckbox";
272
+ };
273
+ readonly SUBMIT: {
274
+ readonly target: "submitting";
275
+ readonly guard: "canSubmit";
276
+ };
277
+ readonly RETRY: {
278
+ readonly target: "loading";
279
+ readonly actions: "clearError";
280
+ };
281
+ };
282
+ };
283
+ readonly submitting: {
284
+ readonly invoke: {
285
+ readonly id: "submitConsent";
286
+ readonly src: "submitConsent";
287
+ readonly input: ({
288
+ context
289
+ }: {
290
+ context: ConsentContext;
291
+ event: {
292
+ type: "LOAD";
293
+ } | {
294
+ type: "TOGGLE_CHECKBOX";
295
+ checkboxId: string;
296
+ } | {
297
+ type: "SUBMIT";
298
+ } | {
299
+ type: "RETRY";
300
+ } | {
301
+ type: "RESET";
302
+ };
303
+ self: xstate63.ActorRef<xstate63.MachineSnapshot<ConsentContext, {
304
+ type: "LOAD";
305
+ } | {
306
+ type: "TOGGLE_CHECKBOX";
307
+ checkboxId: string;
308
+ } | {
309
+ type: "SUBMIT";
310
+ } | {
311
+ type: "RETRY";
312
+ } | {
313
+ type: "RESET";
314
+ }, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
315
+ type: "LOAD";
316
+ } | {
317
+ type: "TOGGLE_CHECKBOX";
318
+ checkboxId: string;
319
+ } | {
320
+ type: "SUBMIT";
321
+ } | {
322
+ type: "RETRY";
323
+ } | {
324
+ type: "RESET";
325
+ }, xstate63.AnyEventObject>;
326
+ }) => {
327
+ languageConsentId: string;
328
+ checkboxes: ConsentCheckbox[];
329
+ };
330
+ readonly onDone: {
331
+ readonly target: "finished";
332
+ readonly actions: "trackConsentGiven";
333
+ };
334
+ readonly onError: {
335
+ readonly target: "display";
336
+ readonly actions: "setError";
337
+ };
338
+ };
339
+ };
340
+ readonly error: {
341
+ readonly on: {
342
+ readonly RETRY: {
343
+ readonly target: "loading";
344
+ readonly actions: "clearError";
345
+ };
346
+ readonly RESET: {
347
+ readonly target: "idle";
348
+ readonly actions: "resetContext";
349
+ };
350
+ };
351
+ };
352
+ readonly finished: {
353
+ readonly type: "final";
354
+ };
355
+ };
356
+ }>;
357
+ //#endregion
358
+ //#region src/modules/consent/consentActor.d.ts
359
+ type CreateConsentActorOptions = {
360
+ config: ConsentConfig;
361
+ };
362
+ //#endregion
363
+ //#region src/modules/consent/consentManager.d.ts
364
+ type ConsentIdleState = {
365
+ status: 'idle';
366
+ };
367
+ type ConsentLoadingState = {
368
+ status: 'loading';
369
+ };
370
+ type ConsentDisplayState = {
371
+ status: 'display';
372
+ title: string;
373
+ richText: string;
374
+ checkboxes: ConsentCheckbox[];
375
+ canSubmit: boolean;
376
+ error?: string;
377
+ };
378
+ type ConsentSubmittingState = {
379
+ status: 'submitting';
380
+ title: string;
381
+ richText: string;
382
+ checkboxes: ConsentCheckbox[];
383
+ canSubmit: false;
384
+ };
385
+ type ConsentFinishedState = {
386
+ status: 'finished';
387
+ };
388
+ type ConsentErrorState = {
389
+ status: 'error';
390
+ error: string;
391
+ };
392
+ type ConsentState = ConsentIdleState | ConsentLoadingState | ConsentDisplayState | ConsentSubmittingState | ConsentFinishedState | ConsentErrorState;
393
+ declare function createConsentManager(options: CreateConsentActorOptions): Manager<ConsentState> & {
394
+ load(): void;
395
+ toggleCheckbox(checkboxId: string): void;
396
+ submit(): void;
397
+ retry(): void;
398
+ reset(): void;
399
+ };
400
+ type ConsentManager = ReturnType<typeof createConsentManager>;
401
+ //#endregion
402
+ export { type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager };