@incodetech/core 0.0.0-dev-20260408-a355630 → 0.0.0-dev-20260409-09dfd52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BrowserStorageProvider-CXaS5Ooj.esm.js +55 -0
- package/dist/{OpenViduRecordingProvider-Bn2meybK.esm.js → OpenViduRecordingProvider-D_cVAwYQ.esm.js} +1 -1
- package/dist/{WasmUtilProvider-BpZSvZbg.esm.js → WasmUtilProvider-mWSXzp7b.esm.js} +1 -1
- package/dist/{addressSearch-DOFI7lwy.esm.js → addressSearch-C26OZIx0.esm.js} +4 -4
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +4 -37
- package/dist/antifraudStateMachine-B74mO8vr.esm.js +39 -0
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +22 -19
- package/dist/authenticationManager-BBQHippG.esm.js +67 -0
- package/dist/{authenticationManager-C2mk36yK.d.ts → authenticationManager-DOTo1EYF.d.ts} +2 -2
- package/dist/{authenticationManager-C7dL_avf.esm.js → authenticationStateMachine-DCJ0ArAt.esm.js} +7 -67
- package/dist/{backCameraStream-tabTmwDS.esm.js → backCameraStream-D9g2wyil.esm.js} +3 -3
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +49 -49
- package/dist/consent.esm.js +4 -149
- package/dist/consentStateMachine-DIdJXJW0.esm.js +151 -0
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +4 -417
- package/dist/curpValidationStateMachine-Dp5WB6__.esm.js +419 -0
- package/dist/{deepsightLoader-Cj6SyUQ-.esm.js → deepsightLoader-CaULV07H.esm.js} +10 -10
- package/dist/{deepsightService-ByD6uIs7.d.ts → deepsightService-S-tU77m-.d.ts} +2 -2
- package/dist/{deepsightService-BjgXl5hs.esm.js → deepsightService-rPGLH8Xp.esm.js} +5 -5
- package/dist/device.esm.js +3 -3
- package/dist/document-capture.d.ts +75 -73
- package/dist/document-capture.esm.js +8 -403
- package/dist/document-upload.d.ts +50 -50
- package/dist/document-upload.esm.js +7 -7
- package/dist/documentCaptureStateMachine-ByYOCKz5.esm.js +403 -0
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +10 -655
- package/dist/ekybStateMachine-DRku_YmR.esm.js +653 -0
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +6 -10614
- package/dist/ekycStateMachine-CSWaaWVl.esm.js +10615 -0
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-CU_hzrsl.d.ts → emailManager-D6CHM2QO.d.ts} +4 -3
- package/dist/emailManager-DByjyeY8.esm.js +238 -0
- package/dist/{emailManager-_9R4vm6g.esm.js → emailStateMachine-BoIkeCw5.esm.js} +6 -239
- package/dist/{events-DlHrOIRc.esm.js → events-W91zLpx4.esm.js} +5 -1
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +33 -26
- package/dist/face-match.d.ts +7 -6
- package/dist/face-match.esm.js +8 -129
- package/dist/faceCaptureManagerFactory-Bspg2Tyf.esm.js +117 -0
- package/dist/{faceCaptureManagerFactory-Da_-ohdg.d.ts → faceCaptureManagerFactory-P2yy30KU.d.ts} +8 -8
- package/dist/{faceCaptureSetup-CaVWkjvE.esm.js → faceCaptureSetup-CQevz86q.esm.js} +5 -119
- package/dist/faceMatchStateMachine-CLterVEC.esm.js +127 -0
- package/dist/flow.d.ts +8 -13
- package/dist/flow.esm.js +10 -29
- package/dist/{flowCompletionService-B5JemmC6.esm.js → flowCompletionService-DZSDUXus.esm.js} +2 -2
- package/dist/{flowServices-p22wrYPf.esm.js → flowServices-YATk0fgY.esm.js} +3 -3
- package/dist/geolocation.d.ts +7 -6
- package/dist/geolocation.esm.js +7 -105
- package/dist/geolocationStateMachine-CRRUCl9K.esm.js +105 -0
- package/dist/{getDeviceClass-DEzz4cmY.esm.js → getDeviceClass-DBF-ExLR.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +5 -269
- package/dist/governmentValidationStateMachine-C_iPX9VE.esm.js +271 -0
- package/dist/http.esm.js +1 -1
- package/dist/id.d.ts +10 -10
- package/dist/id.esm.js +22 -20
- package/dist/idCaptureManager-CJfatzuY.esm.js +335 -0
- package/dist/{idCaptureManager-CV08v1e3.d.ts → idCaptureManager-CbZvdr9y.d.ts} +7 -7
- package/dist/{idCaptureManager-dyZzKv8L.esm.js → idCaptureStateMachine-gf-Q9piu.esm.js} +17 -346
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +8 -8
- package/dist/{lib-Bavz2qmt.esm.js → lib-BzVJ-zxG.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +58 -58
- package/dist/mandatory-consent.esm.js +4 -124
- package/dist/mandatoryConsentStateMachine-BZNBJ1fK.esm.js +126 -0
- package/dist/{openviduLazy-vhrVZCr_.esm.js → openviduLazy-CLg_-u0m.esm.js} +2 -2
- package/dist/openviduLazy-rFXBtZVZ.esm.js +3 -0
- package/dist/{permissionServices-Cskq32Yd.esm.js → permissionServices-Cisv73eQ.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +6 -5
- package/dist/phoneManager-DhC4obPF.esm.js +258 -0
- package/dist/{phoneManager-ulJuGvJ8.d.ts → phoneManager-Zwr-qCnC.d.ts} +2 -2
- package/dist/{phoneManager-DerdUfd4.esm.js → phoneStateMachine-Cc_w4tC0.esm.js} +5 -258
- package/dist/{recordingService-483wQ6kR.esm.js → recordingService-CCfxUY7-.esm.js} +14 -68
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +5 -247
- package/dist/redirectToMobileStateMachine-vOe27Ufw.esm.js +249 -0
- package/dist/runChildModule-DVC4JEjp.esm.js +27 -0
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +22 -19
- package/dist/selfieManager-CorEST5h.esm.js +60 -0
- package/dist/{selfieManager-DCRP7X75.d.ts → selfieManager-DNwfxieF.d.ts} +2 -2
- package/dist/selfieStateMachine-3b19ON1z.esm.js +56 -0
- package/dist/{session-CUh77zj3.esm.js → session-B_rKSRql.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +6 -6
- package/dist/{setup-DpHakxsC.d.ts → setup-BYqwVLiv.d.ts} +1 -1
- package/dist/{setup-XpxfZgKn.esm.js → setup-DLvhsDol.esm.js} +6 -5
- package/dist/signature.d.ts +4 -3
- package/dist/signature.esm.js +6 -189
- package/dist/signatureStateMachine-CU92zCXU.esm.js +189 -0
- package/dist/{stats-DHDoqSBV.esm.js → stats-gFD2351t.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-2OPf1pyv.d.ts → types-CYJ0Ish6.d.ts} +1 -1
- package/dist/types-CjsEZRcz.d.ts +35 -0
- package/dist/{types-CVJVQ7fp.d.ts → types-DU8HmI5U.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +8 -8
- package/dist/workflow.d.ts +813 -0
- package/dist/workflow.esm.js +600 -0
- package/package.json +5 -1
- package/dist/openviduLazy-BIPHozOu.esm.js +0 -3
- package/dist/selfieManager-DeOcNel4.esm.js +0 -110
- /package/dist/{Actor-Ba71-_30.d.ts → Actor-DbWH1K6E.d.ts} +0 -0
- /package/dist/{BaseWasmProvider-D-s_6M5H.esm.js → BaseWasmProvider-DoYDYH1z.esm.js} +0 -0
- /package/dist/{BrowserEnvironmentProvider-DaHeLJQw.esm.js → BrowserEnvironmentProvider-BtKLxTx4.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-BhD2MlHg.esm.js → BrowserTimerProvider-v7bpbrAk.esm.js} +0 -0
- /package/dist/{ITimerCapability-oixwa6nj.esm.js → ITimerCapability-BZO_FsCo.esm.js} +0 -0
- /package/dist/{Manager-BN2g_I8W.d.ts → Manager-DcPMRgTm.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-CodM3e0E.esm.js → MotionSensorProvider-D90R4qwV.esm.js} +0 -0
- /package/dist/{StateMachine-BoJsfMvg.d.ts → StateMachine-BBuIgsHT.d.ts} +0 -0
- /package/dist/{api-DzpnV6O7.esm.js → api-aa9Mx20l.esm.js} +0 -0
- /package/dist/{browserSimulation-B4ubb2OL.esm.js → browserSimulation-DFqGKQAD.esm.js} +0 -0
- /package/dist/{camera-1eeGnAaL.d.ts → camera-DATT31my.d.ts} +0 -0
- /package/dist/{camera-DmkFpf5N.esm.js → camera-DpPQS_-5.esm.js} +0 -0
- /package/dist/{chunk-DsxENsBR.esm.js → chunk-YGHKo4MY.esm.js} +0 -0
- /package/dist/{displayErrors-BZLX7idb.d.ts → displayErrors-xrg0ejaS.d.ts} +0 -0
- /package/dist/{flowCompletionService-D-3YCHyO.d.ts → flowCompletionService-gxt5reFV.d.ts} +0 -0
- /package/dist/{getBrowser-Dtyt9J_h.esm.js → getBrowser-DCcD7H-M.esm.js} +0 -0
- /package/dist/{platform-Dv7a2fv-.esm.js → platform-DctkySJU.esm.js} +0 -0
- /package/dist/{types-D_QfFKxT.d.ts → types-CIjb0FKu.d.ts} +0 -0
- /package/dist/{warmup-CIj_wEV_.d.ts → warmup-Ckb1hN85.d.ts} +0 -0
- /package/dist/{xstate.esm-Bv55-lJ4.esm.js → xstate.esm-B7FPE6br.esm.js} +0 -0
package/dist/consent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import * as
|
|
1
|
+
import { t as Manager } from "./Manager-DcPMRgTm.js";
|
|
2
|
+
import "./Actor-DbWH1K6E.js";
|
|
3
|
+
import * as xstate378 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/consent/types.d.ts
|
|
6
6
|
type ConsentConfig = {
|
|
@@ -36,7 +36,7 @@ type ConsentContext = {
|
|
|
36
36
|
type ConsentInput = {
|
|
37
37
|
config: ConsentConfig;
|
|
38
38
|
};
|
|
39
|
-
declare const consentMachine:
|
|
39
|
+
declare const consentMachine: xstate378.StateMachine<ConsentContext, {
|
|
40
40
|
type: "LOAD";
|
|
41
41
|
} | {
|
|
42
42
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -48,53 +48,53 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
48
48
|
} | {
|
|
49
49
|
type: "RESET";
|
|
50
50
|
}, {
|
|
51
|
-
[x: string]:
|
|
51
|
+
[x: string]: xstate378.ActorRefFromLogic<xstate378.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
52
52
|
consentId: string;
|
|
53
|
-
},
|
|
53
|
+
}, xstate378.EventObject>> | xstate378.ActorRefFromLogic<xstate378.PromiseActorLogic<void, {
|
|
54
54
|
languageConsentId: string;
|
|
55
55
|
checkboxes: ConsentCheckbox[];
|
|
56
|
-
},
|
|
57
|
-
},
|
|
56
|
+
}, xstate378.EventObject>> | undefined;
|
|
57
|
+
}, xstate378.Values<{
|
|
58
58
|
fetchConsent: {
|
|
59
59
|
src: "fetchConsent";
|
|
60
|
-
logic:
|
|
60
|
+
logic: xstate378.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
61
61
|
consentId: string;
|
|
62
|
-
},
|
|
62
|
+
}, xstate378.EventObject>;
|
|
63
63
|
id: string | undefined;
|
|
64
64
|
};
|
|
65
65
|
submitConsent: {
|
|
66
66
|
src: "submitConsent";
|
|
67
|
-
logic:
|
|
67
|
+
logic: xstate378.PromiseActorLogic<void, {
|
|
68
68
|
languageConsentId: string;
|
|
69
69
|
checkboxes: ConsentCheckbox[];
|
|
70
|
-
},
|
|
70
|
+
}, xstate378.EventObject>;
|
|
71
71
|
id: string | undefined;
|
|
72
72
|
};
|
|
73
|
-
}>,
|
|
73
|
+
}>, xstate378.Values<{
|
|
74
74
|
setError: {
|
|
75
75
|
type: "setError";
|
|
76
|
-
params:
|
|
76
|
+
params: xstate378.NonReducibleUnknown;
|
|
77
77
|
};
|
|
78
78
|
clearError: {
|
|
79
79
|
type: "clearError";
|
|
80
|
-
params:
|
|
80
|
+
params: xstate378.NonReducibleUnknown;
|
|
81
81
|
};
|
|
82
82
|
resetContext: {
|
|
83
83
|
type: "resetContext";
|
|
84
|
-
params:
|
|
84
|
+
params: xstate378.NonReducibleUnknown;
|
|
85
85
|
};
|
|
86
86
|
setConsentData: {
|
|
87
87
|
type: "setConsentData";
|
|
88
|
-
params:
|
|
88
|
+
params: xstate378.NonReducibleUnknown;
|
|
89
89
|
};
|
|
90
90
|
toggleCheckbox: {
|
|
91
91
|
type: "toggleCheckbox";
|
|
92
|
-
params:
|
|
92
|
+
params: xstate378.NonReducibleUnknown;
|
|
93
93
|
};
|
|
94
94
|
}>, {
|
|
95
95
|
type: "canSubmit";
|
|
96
96
|
params: unknown;
|
|
97
|
-
}, never, "error" | "idle" | "
|
|
97
|
+
}, never, "error" | "idle" | "finished" | "loading" | "display" | "submitting", string, ConsentInput, xstate378.NonReducibleUnknown, xstate378.EventObject, xstate378.MetaObject, {
|
|
98
98
|
readonly id: "consent";
|
|
99
99
|
readonly initial: "idle";
|
|
100
100
|
readonly context: ({
|
|
@@ -103,70 +103,70 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
103
103
|
spawn: {
|
|
104
104
|
<TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
|
|
105
105
|
src: "fetchConsent";
|
|
106
|
-
logic:
|
|
106
|
+
logic: xstate378.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
107
107
|
consentId: string;
|
|
108
|
-
},
|
|
108
|
+
}, xstate378.EventObject>;
|
|
109
109
|
id: string | undefined;
|
|
110
110
|
} extends infer T ? T extends {
|
|
111
111
|
src: "fetchConsent";
|
|
112
|
-
logic:
|
|
112
|
+
logic: xstate378.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
113
113
|
consentId: string;
|
|
114
|
-
},
|
|
114
|
+
}, xstate378.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
} ? T extends {
|
|
117
117
|
src: TSrc;
|
|
118
|
-
} ?
|
|
118
|
+
} ? xstate378.ConditionalRequired<[options?: ({
|
|
119
119
|
id?: T["id"] | undefined;
|
|
120
120
|
systemId?: string;
|
|
121
|
-
input?:
|
|
121
|
+
input?: xstate378.InputFrom<T["logic"]> | undefined;
|
|
122
122
|
syncSnapshot?: boolean;
|
|
123
|
-
} & { [K in
|
|
123
|
+
} & { [K in xstate378.RequiredActorOptions<T>]: unknown }) | undefined], xstate378.IsNotNever<xstate378.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
124
124
|
src: "submitConsent";
|
|
125
|
-
logic:
|
|
125
|
+
logic: xstate378.PromiseActorLogic<void, {
|
|
126
126
|
languageConsentId: string;
|
|
127
127
|
checkboxes: ConsentCheckbox[];
|
|
128
|
-
},
|
|
128
|
+
}, xstate378.EventObject>;
|
|
129
129
|
id: string | undefined;
|
|
130
130
|
} extends infer T_1 ? T_1 extends {
|
|
131
131
|
src: "submitConsent";
|
|
132
|
-
logic:
|
|
132
|
+
logic: xstate378.PromiseActorLogic<void, {
|
|
133
133
|
languageConsentId: string;
|
|
134
134
|
checkboxes: ConsentCheckbox[];
|
|
135
|
-
},
|
|
135
|
+
}, xstate378.EventObject>;
|
|
136
136
|
id: string | undefined;
|
|
137
137
|
} ? T_1 extends {
|
|
138
138
|
src: TSrc;
|
|
139
|
-
} ?
|
|
139
|
+
} ? xstate378.ConditionalRequired<[options?: ({
|
|
140
140
|
id?: T_1["id"] | undefined;
|
|
141
141
|
systemId?: string;
|
|
142
|
-
input?:
|
|
142
|
+
input?: xstate378.InputFrom<T_1["logic"]> | undefined;
|
|
143
143
|
syncSnapshot?: boolean;
|
|
144
|
-
} & { [K_1 in
|
|
144
|
+
} & { [K_1 in xstate378.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate378.IsNotNever<xstate378.RequiredActorOptions<T_1>>> : never : never : never)): xstate378.ActorRefFromLogic<xstate378.GetConcreteByKey<xstate378.Values<{
|
|
145
145
|
fetchConsent: {
|
|
146
146
|
src: "fetchConsent";
|
|
147
|
-
logic:
|
|
147
|
+
logic: xstate378.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
148
148
|
consentId: string;
|
|
149
|
-
},
|
|
149
|
+
}, xstate378.EventObject>;
|
|
150
150
|
id: string | undefined;
|
|
151
151
|
};
|
|
152
152
|
submitConsent: {
|
|
153
153
|
src: "submitConsent";
|
|
154
|
-
logic:
|
|
154
|
+
logic: xstate378.PromiseActorLogic<void, {
|
|
155
155
|
languageConsentId: string;
|
|
156
156
|
checkboxes: ConsentCheckbox[];
|
|
157
|
-
},
|
|
157
|
+
}, xstate378.EventObject>;
|
|
158
158
|
id: string | undefined;
|
|
159
159
|
};
|
|
160
160
|
}>, "src", TSrc>["logic"]>;
|
|
161
|
-
<TLogic extends
|
|
161
|
+
<TLogic extends xstate378.AnyActorLogic>(src: TLogic, ...[options]: xstate378.ConditionalRequired<[options?: ({
|
|
162
162
|
id?: never;
|
|
163
163
|
systemId?: string;
|
|
164
|
-
input?:
|
|
164
|
+
input?: xstate378.InputFrom<TLogic> | undefined;
|
|
165
165
|
syncSnapshot?: boolean;
|
|
166
|
-
} & { [K in
|
|
166
|
+
} & { [K in xstate378.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate378.IsNotNever<xstate378.RequiredLogicInput<TLogic>>>): xstate378.ActorRefFromLogic<TLogic>;
|
|
167
167
|
};
|
|
168
168
|
input: ConsentInput;
|
|
169
|
-
self:
|
|
169
|
+
self: xstate378.ActorRef<xstate378.MachineSnapshot<ConsentContext, {
|
|
170
170
|
type: "LOAD";
|
|
171
171
|
} | {
|
|
172
172
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -177,7 +177,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
177
177
|
type: "RETRY";
|
|
178
178
|
} | {
|
|
179
179
|
type: "RESET";
|
|
180
|
-
}, Record<string,
|
|
180
|
+
}, Record<string, xstate378.AnyActorRef | undefined>, xstate378.StateValue, string, unknown, any, any>, {
|
|
181
181
|
type: "LOAD";
|
|
182
182
|
} | {
|
|
183
183
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -188,7 +188,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
188
188
|
type: "RETRY";
|
|
189
189
|
} | {
|
|
190
190
|
type: "RESET";
|
|
191
|
-
},
|
|
191
|
+
}, xstate378.AnyEventObject>;
|
|
192
192
|
}) => {
|
|
193
193
|
config: ConsentConfig;
|
|
194
194
|
title: string;
|
|
@@ -226,7 +226,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "RESET";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate378.ActorRef<xstate378.MachineSnapshot<ConsentContext, {
|
|
230
230
|
type: "LOAD";
|
|
231
231
|
} | {
|
|
232
232
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -237,7 +237,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
237
237
|
type: "RETRY";
|
|
238
238
|
} | {
|
|
239
239
|
type: "RESET";
|
|
240
|
-
}, Record<string,
|
|
240
|
+
}, Record<string, xstate378.AnyActorRef>, xstate378.StateValue, string, unknown, any, any>, {
|
|
241
241
|
type: "LOAD";
|
|
242
242
|
} | {
|
|
243
243
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -248,7 +248,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
248
248
|
type: "RETRY";
|
|
249
249
|
} | {
|
|
250
250
|
type: "RESET";
|
|
251
|
-
},
|
|
251
|
+
}, xstate378.AnyEventObject>;
|
|
252
252
|
}) => {
|
|
253
253
|
consentId: string;
|
|
254
254
|
};
|
|
@@ -297,7 +297,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
297
297
|
} | {
|
|
298
298
|
type: "RESET";
|
|
299
299
|
};
|
|
300
|
-
self:
|
|
300
|
+
self: xstate378.ActorRef<xstate378.MachineSnapshot<ConsentContext, {
|
|
301
301
|
type: "LOAD";
|
|
302
302
|
} | {
|
|
303
303
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -308,7 +308,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
308
308
|
type: "RETRY";
|
|
309
309
|
} | {
|
|
310
310
|
type: "RESET";
|
|
311
|
-
}, Record<string,
|
|
311
|
+
}, Record<string, xstate378.AnyActorRef>, xstate378.StateValue, string, unknown, any, any>, {
|
|
312
312
|
type: "LOAD";
|
|
313
313
|
} | {
|
|
314
314
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -319,7 +319,7 @@ declare const consentMachine: xstate131.StateMachine<ConsentContext, {
|
|
|
319
319
|
type: "RETRY";
|
|
320
320
|
} | {
|
|
321
321
|
type: "RESET";
|
|
322
|
-
},
|
|
322
|
+
}, xstate378.AnyEventObject>;
|
|
323
323
|
}) => {
|
|
324
324
|
languageConsentId: string;
|
|
325
325
|
checkboxes: ConsentCheckbox[];
|
package/dist/consent.esm.js
CHANGED
|
@@ -1,153 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { a as createActor,
|
|
1
|
+
import "./api-aa9Mx20l.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-W91zLpx4.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-B7FPE6br.esm.js";
|
|
4
|
+
import { t as consentMachine } from "./consentStateMachine-DIdJXJW0.esm.js";
|
|
4
5
|
|
|
5
|
-
//#region src/modules/consent/consentServices.ts
|
|
6
|
-
async function fetchCombinedConsent(consentId, signal) {
|
|
7
|
-
if (!consentId) throw new Error("Combined consent id is required");
|
|
8
|
-
const res = await api.get(endpoints.getCombinedConsent, {
|
|
9
|
-
signal,
|
|
10
|
-
query: {
|
|
11
|
-
id: consentId,
|
|
12
|
-
language: "en"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
if (!res.ok) throw new Error(`GET ${endpoints.getCombinedConsent} failed: ${res.status} ${res.statusText}`);
|
|
16
|
-
return res.data;
|
|
17
|
-
}
|
|
18
|
-
async function submitCombinedConsent(params, signal) {
|
|
19
|
-
const res = await api.post(endpoints.signCombinedConsent, params, { signal });
|
|
20
|
-
if (!res.ok) throw new Error(`POST ${endpoints.signCombinedConsent} failed: ${res.status} ${res.statusText}`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/modules/consent/consentStateMachine.ts
|
|
25
|
-
function toCheckboxRecord(checkboxes) {
|
|
26
|
-
return checkboxes.reduce((acc, checkbox) => {
|
|
27
|
-
acc[checkbox.id] = checkbox.checked;
|
|
28
|
-
return acc;
|
|
29
|
-
}, {});
|
|
30
|
-
}
|
|
31
|
-
const consentMachine = setup({
|
|
32
|
-
types: {
|
|
33
|
-
context: {},
|
|
34
|
-
events: {},
|
|
35
|
-
input: {}
|
|
36
|
-
},
|
|
37
|
-
actors: {
|
|
38
|
-
fetchConsent: fromPromise(async ({ input, signal }) => {
|
|
39
|
-
return fetchCombinedConsent(input.consentId, signal);
|
|
40
|
-
}),
|
|
41
|
-
submitConsent: fromPromise(async ({ input, signal }) => {
|
|
42
|
-
await submitCombinedConsent({
|
|
43
|
-
languageConsentId: input.languageConsentId,
|
|
44
|
-
checkboxes: toCheckboxRecord(input.checkboxes)
|
|
45
|
-
}, signal);
|
|
46
|
-
})
|
|
47
|
-
},
|
|
48
|
-
actions: {
|
|
49
|
-
setConsentData: assign(({ event }) => {
|
|
50
|
-
const output = event.output;
|
|
51
|
-
return {
|
|
52
|
-
title: output.title,
|
|
53
|
-
richText: output.terms,
|
|
54
|
-
languageConsentId: output.languageConsentId,
|
|
55
|
-
checkboxes: output.consents.map((consent) => ({
|
|
56
|
-
id: consent.checkboxId,
|
|
57
|
-
label: consent.consentText,
|
|
58
|
-
required: !consent.optional,
|
|
59
|
-
checked: false
|
|
60
|
-
})),
|
|
61
|
-
error: void 0
|
|
62
|
-
};
|
|
63
|
-
}),
|
|
64
|
-
toggleCheckbox: assign(({ context, event }) => {
|
|
65
|
-
const checkboxId = event.checkboxId;
|
|
66
|
-
return { checkboxes: context.checkboxes.map((checkbox) => checkbox.id === checkboxId ? {
|
|
67
|
-
...checkbox,
|
|
68
|
-
checked: !checkbox.checked
|
|
69
|
-
} : checkbox) };
|
|
70
|
-
}),
|
|
71
|
-
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
72
|
-
clearError: assign({ error: () => void 0 }),
|
|
73
|
-
resetContext: assign(({ context }) => ({
|
|
74
|
-
config: context.config,
|
|
75
|
-
title: "",
|
|
76
|
-
richText: "",
|
|
77
|
-
languageConsentId: "",
|
|
78
|
-
checkboxes: [],
|
|
79
|
-
error: void 0
|
|
80
|
-
}))
|
|
81
|
-
},
|
|
82
|
-
guards: { canSubmit: ({ context }) => context.checkboxes.filter((checkbox) => checkbox.required).every((checkbox) => checkbox.checked) }
|
|
83
|
-
}).createMachine({
|
|
84
|
-
id: "consent",
|
|
85
|
-
initial: "idle",
|
|
86
|
-
context: ({ input }) => ({
|
|
87
|
-
config: input.config,
|
|
88
|
-
title: "",
|
|
89
|
-
richText: "",
|
|
90
|
-
languageConsentId: "",
|
|
91
|
-
checkboxes: [],
|
|
92
|
-
error: void 0
|
|
93
|
-
}),
|
|
94
|
-
states: {
|
|
95
|
-
idle: { on: { LOAD: {
|
|
96
|
-
target: "loading",
|
|
97
|
-
actions: "clearError"
|
|
98
|
-
} } },
|
|
99
|
-
loading: { invoke: {
|
|
100
|
-
id: "fetchConsent",
|
|
101
|
-
src: "fetchConsent",
|
|
102
|
-
input: ({ context }) => ({ consentId: String(context.config.combinedConsents ?? context.config.consentId ?? "") }),
|
|
103
|
-
onDone: {
|
|
104
|
-
target: "display",
|
|
105
|
-
actions: "setConsentData"
|
|
106
|
-
},
|
|
107
|
-
onError: {
|
|
108
|
-
target: "error",
|
|
109
|
-
actions: "setError"
|
|
110
|
-
}
|
|
111
|
-
} },
|
|
112
|
-
display: { on: {
|
|
113
|
-
TOGGLE_CHECKBOX: { actions: "toggleCheckbox" },
|
|
114
|
-
SUBMIT: {
|
|
115
|
-
target: "submitting",
|
|
116
|
-
guard: "canSubmit"
|
|
117
|
-
},
|
|
118
|
-
RETRY: {
|
|
119
|
-
target: "loading",
|
|
120
|
-
actions: "clearError"
|
|
121
|
-
}
|
|
122
|
-
} },
|
|
123
|
-
submitting: { invoke: {
|
|
124
|
-
id: "submitConsent",
|
|
125
|
-
src: "submitConsent",
|
|
126
|
-
input: ({ context }) => ({
|
|
127
|
-
languageConsentId: context.languageConsentId,
|
|
128
|
-
checkboxes: context.checkboxes
|
|
129
|
-
}),
|
|
130
|
-
onDone: { target: "finished" },
|
|
131
|
-
onError: {
|
|
132
|
-
target: "display",
|
|
133
|
-
actions: "setError"
|
|
134
|
-
}
|
|
135
|
-
} },
|
|
136
|
-
error: { on: {
|
|
137
|
-
RETRY: {
|
|
138
|
-
target: "loading",
|
|
139
|
-
actions: "clearError"
|
|
140
|
-
},
|
|
141
|
-
RESET: {
|
|
142
|
-
target: "idle",
|
|
143
|
-
actions: "resetContext"
|
|
144
|
-
}
|
|
145
|
-
} },
|
|
146
|
-
finished: { type: "final" }
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
//#endregion
|
|
151
6
|
//#region src/modules/consent/consentActor.ts
|
|
152
7
|
function createConsentActor(options) {
|
|
153
8
|
return createActor(consentMachine, { input: { config: options.config } }).start();
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { t as api } from "./api-aa9Mx20l.esm.js";
|
|
2
|
+
import { _ as endpoints } from "./events-W91zLpx4.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-B7FPE6br.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/consent/consentServices.ts
|
|
6
|
+
async function fetchCombinedConsent(consentId, signal) {
|
|
7
|
+
if (!consentId) throw new Error("Combined consent id is required");
|
|
8
|
+
const res = await api.get(endpoints.getCombinedConsent, {
|
|
9
|
+
signal,
|
|
10
|
+
query: {
|
|
11
|
+
id: consentId,
|
|
12
|
+
language: "en"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
if (!res.ok) throw new Error(`GET ${endpoints.getCombinedConsent} failed: ${res.status} ${res.statusText}`);
|
|
16
|
+
return res.data;
|
|
17
|
+
}
|
|
18
|
+
async function submitCombinedConsent(params, signal) {
|
|
19
|
+
const res = await api.post(endpoints.signCombinedConsent, params, { signal });
|
|
20
|
+
if (!res.ok) throw new Error(`POST ${endpoints.signCombinedConsent} failed: ${res.status} ${res.statusText}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/modules/consent/consentStateMachine.ts
|
|
25
|
+
function toCheckboxRecord(checkboxes) {
|
|
26
|
+
return checkboxes.reduce((acc, checkbox) => {
|
|
27
|
+
acc[checkbox.id] = checkbox.checked;
|
|
28
|
+
return acc;
|
|
29
|
+
}, {});
|
|
30
|
+
}
|
|
31
|
+
const consentMachine = setup({
|
|
32
|
+
types: {
|
|
33
|
+
context: {},
|
|
34
|
+
events: {},
|
|
35
|
+
input: {}
|
|
36
|
+
},
|
|
37
|
+
actors: {
|
|
38
|
+
fetchConsent: fromPromise(async ({ input, signal }) => {
|
|
39
|
+
return fetchCombinedConsent(input.consentId, signal);
|
|
40
|
+
}),
|
|
41
|
+
submitConsent: fromPromise(async ({ input, signal }) => {
|
|
42
|
+
await submitCombinedConsent({
|
|
43
|
+
languageConsentId: input.languageConsentId,
|
|
44
|
+
checkboxes: toCheckboxRecord(input.checkboxes)
|
|
45
|
+
}, signal);
|
|
46
|
+
})
|
|
47
|
+
},
|
|
48
|
+
actions: {
|
|
49
|
+
setConsentData: assign(({ event }) => {
|
|
50
|
+
const output = event.output;
|
|
51
|
+
return {
|
|
52
|
+
title: output.title,
|
|
53
|
+
richText: output.terms,
|
|
54
|
+
languageConsentId: output.languageConsentId,
|
|
55
|
+
checkboxes: output.consents.map((consent) => ({
|
|
56
|
+
id: consent.checkboxId,
|
|
57
|
+
label: consent.consentText,
|
|
58
|
+
required: !consent.optional,
|
|
59
|
+
checked: false
|
|
60
|
+
})),
|
|
61
|
+
error: void 0
|
|
62
|
+
};
|
|
63
|
+
}),
|
|
64
|
+
toggleCheckbox: assign(({ context, event }) => {
|
|
65
|
+
const checkboxId = event.checkboxId;
|
|
66
|
+
return { checkboxes: context.checkboxes.map((checkbox) => checkbox.id === checkboxId ? {
|
|
67
|
+
...checkbox,
|
|
68
|
+
checked: !checkbox.checked
|
|
69
|
+
} : checkbox) };
|
|
70
|
+
}),
|
|
71
|
+
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
72
|
+
clearError: assign({ error: () => void 0 }),
|
|
73
|
+
resetContext: assign(({ context }) => ({
|
|
74
|
+
config: context.config,
|
|
75
|
+
title: "",
|
|
76
|
+
richText: "",
|
|
77
|
+
languageConsentId: "",
|
|
78
|
+
checkboxes: [],
|
|
79
|
+
error: void 0
|
|
80
|
+
}))
|
|
81
|
+
},
|
|
82
|
+
guards: { canSubmit: ({ context }) => context.checkboxes.filter((checkbox) => checkbox.required).every((checkbox) => checkbox.checked) }
|
|
83
|
+
}).createMachine({
|
|
84
|
+
id: "consent",
|
|
85
|
+
initial: "idle",
|
|
86
|
+
context: ({ input }) => ({
|
|
87
|
+
config: input.config,
|
|
88
|
+
title: "",
|
|
89
|
+
richText: "",
|
|
90
|
+
languageConsentId: "",
|
|
91
|
+
checkboxes: [],
|
|
92
|
+
error: void 0
|
|
93
|
+
}),
|
|
94
|
+
states: {
|
|
95
|
+
idle: { on: { LOAD: {
|
|
96
|
+
target: "loading",
|
|
97
|
+
actions: "clearError"
|
|
98
|
+
} } },
|
|
99
|
+
loading: { invoke: {
|
|
100
|
+
id: "fetchConsent",
|
|
101
|
+
src: "fetchConsent",
|
|
102
|
+
input: ({ context }) => ({ consentId: String(context.config.combinedConsents ?? context.config.consentId ?? "") }),
|
|
103
|
+
onDone: {
|
|
104
|
+
target: "display",
|
|
105
|
+
actions: "setConsentData"
|
|
106
|
+
},
|
|
107
|
+
onError: {
|
|
108
|
+
target: "error",
|
|
109
|
+
actions: "setError"
|
|
110
|
+
}
|
|
111
|
+
} },
|
|
112
|
+
display: { on: {
|
|
113
|
+
TOGGLE_CHECKBOX: { actions: "toggleCheckbox" },
|
|
114
|
+
SUBMIT: {
|
|
115
|
+
target: "submitting",
|
|
116
|
+
guard: "canSubmit"
|
|
117
|
+
},
|
|
118
|
+
RETRY: {
|
|
119
|
+
target: "loading",
|
|
120
|
+
actions: "clearError"
|
|
121
|
+
}
|
|
122
|
+
} },
|
|
123
|
+
submitting: { invoke: {
|
|
124
|
+
id: "submitConsent",
|
|
125
|
+
src: "submitConsent",
|
|
126
|
+
input: ({ context }) => ({
|
|
127
|
+
languageConsentId: context.languageConsentId,
|
|
128
|
+
checkboxes: context.checkboxes
|
|
129
|
+
}),
|
|
130
|
+
onDone: { target: "finished" },
|
|
131
|
+
onError: {
|
|
132
|
+
target: "display",
|
|
133
|
+
actions: "setError"
|
|
134
|
+
}
|
|
135
|
+
} },
|
|
136
|
+
error: { on: {
|
|
137
|
+
RETRY: {
|
|
138
|
+
target: "loading",
|
|
139
|
+
actions: "clearError"
|
|
140
|
+
},
|
|
141
|
+
RESET: {
|
|
142
|
+
target: "idle",
|
|
143
|
+
actions: "resetContext"
|
|
144
|
+
}
|
|
145
|
+
} },
|
|
146
|
+
finished: { type: "final" }
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
//#endregion
|
|
151
|
+
export { consentMachine as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, i as fromPromise, o as createManager, t as setup } from "./xstate.esm-
|
|
4
|
-
import { t as sleep } from "./ITimerCapability-
|
|
1
|
+
import { t as api } from "./api-aa9Mx20l.esm.js";
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-W91zLpx4.esm.js";
|
|
3
|
+
import { a as createActor, i as fromPromise, o as createManager, t as setup } from "./xstate.esm-B7FPE6br.esm.js";
|
|
4
|
+
import { t as sleep } from "./ITimerCapability-BZO_FsCo.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/cross-document-data-match/crossDocumentDataMatchServices.ts
|
|
7
7
|
/** Minimum spinner duration (ms), aligned with SDK v1 `ProcessCrossDocumentData`. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import "./camera-
|
|
4
|
-
import "./types-
|
|
5
|
-
import { r as FlowModuleConfig } from "./types-
|
|
1
|
+
import { t as Manager } from "./Manager-DcPMRgTm.js";
|
|
2
|
+
import "./Actor-DbWH1K6E.js";
|
|
3
|
+
import "./camera-DATT31my.js";
|
|
4
|
+
import "./types-CYJ0Ish6.js";
|
|
5
|
+
import { r as FlowModuleConfig } from "./types-DU8HmI5U.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/curp-validation/types.d.ts
|
|
8
8
|
type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
|