@incodetech/core 2.0.0-rc.0 → 2.0.0

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 (178) hide show
  1. package/package.json +3 -3
  2. package/dist/Actor-CI32dTbG.d.ts +0 -2
  3. package/dist/BaseWasmProvider-C_DLEI40.esm.js +0 -1118
  4. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +0 -55
  5. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +0 -22
  6. package/dist/ITimerCapability-C67ZRskg.esm.js +0 -7
  7. package/dist/IpifyProvider-D7jx52AL.esm.js +0 -139
  8. package/dist/Manager-C8PrhBOx.d.ts +0 -19
  9. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +0 -254
  10. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +0 -87
  11. package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
  12. package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
  13. package/dist/addressSearch-BpTbTWCa.esm.js +0 -430
  14. package/dist/ae-signature-DDDZmWXj.esm.js +0 -12
  15. package/dist/ae-signature.d.ts +0 -25
  16. package/dist/ae-signature.esm.js +0 -8
  17. package/dist/antifraud.d.ts +0 -57
  18. package/dist/antifraud.esm.js +0 -45
  19. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +0 -39
  20. package/dist/api-CESGtpbH.esm.js +0 -53
  21. package/dist/authentication.d.ts +0 -12
  22. package/dist/authentication.esm.js +0 -25
  23. package/dist/authenticationManager-5M-fKzXx.esm.js +0 -67
  24. package/dist/authenticationManager-C83GNIhl.d.ts +0 -66
  25. package/dist/authenticationStateMachine-BMZqatiF.esm.js +0 -139
  26. package/dist/backCameraStream-DMdMeGk2.esm.js +0 -346
  27. package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
  28. package/dist/camera-DBSxa6ML.d.ts +0 -4
  29. package/dist/camera-PA2Ljri3.esm.js +0 -22
  30. package/dist/camera.d.ts +0 -15
  31. package/dist/camera.esm.js +0 -5
  32. package/dist/chunk-CRF6K_H_.esm.js +0 -49
  33. package/dist/consent.d.ts +0 -398
  34. package/dist/consent.esm.js +0 -79
  35. package/dist/consentStateMachine-CCT-B60O.esm.js +0 -151
  36. package/dist/cpf-PPz2Njto.esm.js +0 -38
  37. package/dist/cpf-ocr.d.ts +0 -204
  38. package/dist/cpf-ocr.esm.js +0 -177
  39. package/dist/cross-document-data-match.d.ts +0 -34
  40. package/dist/cross-document-data-match.esm.js +0 -71
  41. package/dist/curp-validation.d.ts +0 -188
  42. package/dist/curp-validation.esm.js +0 -110
  43. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +0 -595
  44. package/dist/custom-fields.d.ts +0 -115
  45. package/dist/custom-fields.esm.js +0 -177
  46. package/dist/custom-watchlist.d.ts +0 -66
  47. package/dist/custom-watchlist.esm.js +0 -86
  48. package/dist/dateUtils-UoN5xswP.esm.js +0 -23
  49. package/dist/deepsightLoader-Cm4JIT_z.esm.js +0 -52
  50. package/dist/deepsightService-CEVxzehb.d.ts +0 -412
  51. package/dist/deepsightService-O74l4Y__.esm.js +0 -489
  52. package/dist/device.d.ts +0 -46
  53. package/dist/device.esm.js +0 -106
  54. package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
  55. package/dist/document-capture.d.ts +0 -906
  56. package/dist/document-capture.esm.js +0 -156
  57. package/dist/document-upload.d.ts +0 -331
  58. package/dist/document-upload.esm.js +0 -203
  59. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +0 -394
  60. package/dist/dynamic-forms.d.ts +0 -178
  61. package/dist/dynamic-forms.esm.js +0 -323
  62. package/dist/ekyb.d.ts +0 -148
  63. package/dist/ekyb.esm.js +0 -127
  64. package/dist/ekybStateMachine-B59rQjgj.esm.js +0 -674
  65. package/dist/ekyc.d.ts +0 -164
  66. package/dist/ekyc.esm.js +0 -104
  67. package/dist/ekycStateMachine-oeO0Iekd.esm.js +0 -10626
  68. package/dist/electronic-signature.d.ts +0 -4
  69. package/dist/electronic-signature.esm.js +0 -7
  70. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +0 -428
  71. package/dist/email.d.ts +0 -4
  72. package/dist/email.esm.js +0 -9
  73. package/dist/emailManager-DIfnS5g1.d.ts +0 -352
  74. package/dist/emailManager-wAV0LE-H.esm.js +0 -238
  75. package/dist/emailStateMachine-DOf4j58N.esm.js +0 -292
  76. package/dist/endpoints-CnN3SyDa.esm.js +0 -87
  77. package/dist/events-D6-e4vok.esm.js +0 -596
  78. package/dist/events.d.ts +0 -265
  79. package/dist/events.esm.js +0 -4
  80. package/dist/extensibility.d.ts +0 -122
  81. package/dist/extensibility.esm.js +0 -43
  82. package/dist/face-match.d.ts +0 -228
  83. package/dist/face-match.esm.js +0 -173
  84. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +0 -290
  85. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +0 -690
  86. package/dist/faceCaptureSetup-B3faSpYA.esm.js +0 -873
  87. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +0 -127
  88. package/dist/flow-events.d.ts +0 -6
  89. package/dist/flow-events.esm.js +0 -0
  90. package/dist/flow.d.ts +0 -358
  91. package/dist/flow.esm.js +0 -825
  92. package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
  93. package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
  94. package/dist/flowServices-DTsm-Vf1.esm.js +0 -188
  95. package/dist/geolocation.d.ts +0 -127
  96. package/dist/geolocation.esm.js +0 -89
  97. package/dist/geolocationStateMachine-asasuHY2.esm.js +0 -105
  98. package/dist/getBrowser-BSXUTWXw.esm.js +0 -41
  99. package/dist/getDeviceClass-BSntT9_j.esm.js +0 -14
  100. package/dist/government-validation.d.ts +0 -67
  101. package/dist/government-validation.esm.js +0 -81
  102. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +0 -271
  103. package/dist/home.d.ts +0 -99
  104. package/dist/home.esm.js +0 -61
  105. package/dist/http.d.ts +0 -68
  106. package/dist/http.esm.js +0 -3
  107. package/dist/id-ocr.d.ts +0 -635
  108. package/dist/id-ocr.esm.js +0 -86
  109. package/dist/id-verification.d.ts +0 -190
  110. package/dist/id-verification.esm.js +0 -43
  111. package/dist/id.d.ts +0 -24
  112. package/dist/id.esm.js +0 -164
  113. package/dist/idCaptureManager-B9TGA5dq.d.ts +0 -956
  114. package/dist/idCaptureManager-DMK0GIt3.esm.js +0 -581
  115. package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +0 -2954
  116. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +0 -388
  117. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +0 -71
  118. package/dist/identity-reuse.d.ts +0 -530
  119. package/dist/identity-reuse.esm.js +0 -274
  120. package/dist/index-BLKtMA0g.d.ts +0 -1177
  121. package/dist/index-BcRG8rtJ.d.ts +0 -97
  122. package/dist/index.d.ts +0 -3
  123. package/dist/index.esm.js +0 -12
  124. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +0 -30
  125. package/dist/lib-BB0B_qQX.esm.js +0 -12499
  126. package/dist/mandatory-consent.d.ts +0 -412
  127. package/dist/mandatory-consent.esm.js +0 -78
  128. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +0 -126
  129. package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
  130. package/dist/openviduLazy-Cok70ZSg.esm.js +0 -12
  131. package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
  132. package/dist/phone.d.ts +0 -4
  133. package/dist/phone.esm.js +0 -9
  134. package/dist/phoneManager-B6M30hKE.d.ts +0 -397
  135. package/dist/phoneManager-DAJbGhlY.esm.js +0 -256
  136. package/dist/phoneStateMachine-CuPARRaT.esm.js +0 -351
  137. package/dist/platform-CfrjKhmi.esm.js +0 -83
  138. package/dist/qe-signature-DFo_Cc-I.esm.js +0 -12
  139. package/dist/qe-signature.d.ts +0 -25
  140. package/dist/qe-signature.esm.js +0 -8
  141. package/dist/recordingService-Ig2UgbLv.esm.js +0 -1003
  142. package/dist/redirect-to-mobile.d.ts +0 -107
  143. package/dist/redirect-to-mobile.esm.js +0 -102
  144. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +0 -249
  145. package/dist/runChildModule-CqqwqAkW.esm.js +0 -219
  146. package/dist/selfie.d.ts +0 -26
  147. package/dist/selfie.esm.js +0 -146
  148. package/dist/selfieManager-D0lSgd-J.d.ts +0 -68
  149. package/dist/selfieManager-Duisl7qN.esm.js +0 -60
  150. package/dist/selfieStateMachine-D76whWEf.esm.js +0 -68
  151. package/dist/session-BS-d_vuE.esm.js +0 -3206
  152. package/dist/session.d.ts +0 -217
  153. package/dist/session.esm.js +0 -9
  154. package/dist/setup-Buy-hyj4.esm.js +0 -887
  155. package/dist/setup-C5AITV8m.d.ts +0 -254
  156. package/dist/signature.d.ts +0 -94
  157. package/dist/signature.esm.js +0 -66
  158. package/dist/signatureStateMachine-B5-QVUve.esm.js +0 -132
  159. package/dist/stats-CIfiPzb1.esm.js +0 -16
  160. package/dist/stats.d.ts +0 -16
  161. package/dist/stats.esm.js +0 -4
  162. package/dist/trust-graph.d.ts +0 -54
  163. package/dist/trust-graph.esm.js +0 -56
  164. package/dist/types-B06Ypu2F.d.ts +0 -49
  165. package/dist/types-BP1m8VRw.d.ts +0 -340
  166. package/dist/types-CAD4va6a.d.ts +0 -5
  167. package/dist/types-CFV9G_7j.d.ts +0 -24
  168. package/dist/warmup-CEcppFiS.d.ts +0 -63
  169. package/dist/wasm.d.ts +0 -15
  170. package/dist/wasm.esm.js +0 -12
  171. package/dist/watchlist-for-business.d.ts +0 -79
  172. package/dist/watchlist-for-business.esm.js +0 -148
  173. package/dist/watchlist.d.ts +0 -62
  174. package/dist/watchlist.esm.js +0 -86
  175. package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
  176. package/dist/workflow.d.ts +0 -907
  177. package/dist/workflow.esm.js +0 -702
  178. package/dist/xstate.esm-B70JrNqo.esm.js +0 -3404
@@ -1,412 +0,0 @@
1
- import { t as Manager } from "./Manager-C8PrhBOx.js";
2
- import "./Actor-CI32dTbG.js";
3
- import "./camera-DBSxa6ML.js";
4
- import "./types-CFV9G_7j.js";
5
- import { a as RegulationTypes } from "./types-BP1m8VRw.js";
6
- import * as xstate16 from "xstate";
7
-
8
- //#region src/modules/mandatory-consent/types.d.ts
9
- type MandatoryConsentConfig = {
10
- consentType: RegulationTypes;
11
- };
12
- type MandatoryConsent = {
13
- id: string;
14
- title: string;
15
- text: string;
16
- description?: string;
17
- consentType: string;
18
- };
19
- type FetchMandatoryConsentResponse = {
20
- consents: MandatoryConsent[];
21
- };
22
- //#endregion
23
- //#region src/modules/mandatory-consent/mandatoryConsentStateMachine.d.ts
24
- type MandatoryConsentContext = {
25
- config: MandatoryConsentConfig;
26
- consent: MandatoryConsent | undefined;
27
- isSigned: boolean;
28
- error: string | undefined;
29
- };
30
- type MandatoryConsentInput = {
31
- config: MandatoryConsentConfig;
32
- };
33
- declare const mandatoryConsentMachine: xstate16.StateMachine<MandatoryConsentContext, {
34
- type: "LOAD";
35
- } | {
36
- type: "TOGGLE";
37
- } | {
38
- type: "SUBMIT";
39
- } | {
40
- type: "CANCEL";
41
- } | {
42
- type: "RETRY";
43
- } | {
44
- type: "RESET";
45
- }, {
46
- [x: string]: xstate16.ActorRefFromLogic<xstate16.PromiseActorLogic<FetchMandatoryConsentResponse, {
47
- config: MandatoryConsentConfig;
48
- }, xstate16.EventObject>> | xstate16.ActorRefFromLogic<xstate16.PromiseActorLogic<void, {
49
- consentId: string;
50
- isSigned: boolean;
51
- }, xstate16.EventObject>> | undefined;
52
- }, xstate16.Values<{
53
- fetchConsent: {
54
- src: "fetchConsent";
55
- logic: xstate16.PromiseActorLogic<FetchMandatoryConsentResponse, {
56
- config: MandatoryConsentConfig;
57
- }, xstate16.EventObject>;
58
- id: string | undefined;
59
- };
60
- submitConsent: {
61
- src: "submitConsent";
62
- logic: xstate16.PromiseActorLogic<void, {
63
- consentId: string;
64
- isSigned: boolean;
65
- }, xstate16.EventObject>;
66
- id: string | undefined;
67
- };
68
- }>, xstate16.Values<{
69
- setConsent: {
70
- type: "setConsent";
71
- params: xstate16.NonReducibleUnknown;
72
- };
73
- toggleSigned: {
74
- type: "toggleSigned";
75
- params: xstate16.NonReducibleUnknown;
76
- };
77
- setError: {
78
- type: "setError";
79
- params: xstate16.NonReducibleUnknown;
80
- };
81
- clearError: {
82
- type: "clearError";
83
- params: xstate16.NonReducibleUnknown;
84
- };
85
- resetContext: {
86
- type: "resetContext";
87
- params: xstate16.NonReducibleUnknown;
88
- };
89
- }>, {
90
- type: "canSubmit";
91
- params: unknown;
92
- }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate16.NonReducibleUnknown, xstate16.EventObject, xstate16.MetaObject, {
93
- readonly id: "mandatoryConsent";
94
- readonly initial: "idle";
95
- readonly context: ({
96
- input
97
- }: {
98
- spawn: {
99
- <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
100
- src: "fetchConsent";
101
- logic: xstate16.PromiseActorLogic<FetchMandatoryConsentResponse, {
102
- config: MandatoryConsentConfig;
103
- }, xstate16.EventObject>;
104
- id: string | undefined;
105
- } extends infer T ? T extends {
106
- src: "fetchConsent";
107
- logic: xstate16.PromiseActorLogic<FetchMandatoryConsentResponse, {
108
- config: MandatoryConsentConfig;
109
- }, xstate16.EventObject>;
110
- id: string | undefined;
111
- } ? T extends {
112
- src: TSrc;
113
- } ? xstate16.ConditionalRequired<[options?: ({
114
- id?: T["id"] | undefined;
115
- systemId?: string;
116
- input?: xstate16.InputFrom<T["logic"]> | undefined;
117
- syncSnapshot?: boolean;
118
- } & { [K in xstate16.RequiredActorOptions<T>]: unknown }) | undefined], xstate16.IsNotNever<xstate16.RequiredActorOptions<T>>> : never : never : never) | ({
119
- src: "submitConsent";
120
- logic: xstate16.PromiseActorLogic<void, {
121
- consentId: string;
122
- isSigned: boolean;
123
- }, xstate16.EventObject>;
124
- id: string | undefined;
125
- } extends infer T_1 ? T_1 extends {
126
- src: "submitConsent";
127
- logic: xstate16.PromiseActorLogic<void, {
128
- consentId: string;
129
- isSigned: boolean;
130
- }, xstate16.EventObject>;
131
- id: string | undefined;
132
- } ? T_1 extends {
133
- src: TSrc;
134
- } ? xstate16.ConditionalRequired<[options?: ({
135
- id?: T_1["id"] | undefined;
136
- systemId?: string;
137
- input?: xstate16.InputFrom<T_1["logic"]> | undefined;
138
- syncSnapshot?: boolean;
139
- } & { [K_1 in xstate16.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate16.IsNotNever<xstate16.RequiredActorOptions<T_1>>> : never : never : never)): xstate16.ActorRefFromLogic<xstate16.GetConcreteByKey<xstate16.Values<{
140
- fetchConsent: {
141
- src: "fetchConsent";
142
- logic: xstate16.PromiseActorLogic<FetchMandatoryConsentResponse, {
143
- config: MandatoryConsentConfig;
144
- }, xstate16.EventObject>;
145
- id: string | undefined;
146
- };
147
- submitConsent: {
148
- src: "submitConsent";
149
- logic: xstate16.PromiseActorLogic<void, {
150
- consentId: string;
151
- isSigned: boolean;
152
- }, xstate16.EventObject>;
153
- id: string | undefined;
154
- };
155
- }>, "src", TSrc>["logic"]>;
156
- <TLogic extends xstate16.AnyActorLogic>(src: TLogic, ...[options]: xstate16.ConditionalRequired<[options?: ({
157
- id?: never;
158
- systemId?: string;
159
- input?: xstate16.InputFrom<TLogic> | undefined;
160
- syncSnapshot?: boolean;
161
- } & { [K in xstate16.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate16.IsNotNever<xstate16.RequiredLogicInput<TLogic>>>): xstate16.ActorRefFromLogic<TLogic>;
162
- };
163
- input: MandatoryConsentInput;
164
- self: xstate16.ActorRef<xstate16.MachineSnapshot<MandatoryConsentContext, {
165
- type: "LOAD";
166
- } | {
167
- type: "TOGGLE";
168
- } | {
169
- type: "SUBMIT";
170
- } | {
171
- type: "CANCEL";
172
- } | {
173
- type: "RETRY";
174
- } | {
175
- type: "RESET";
176
- }, Record<string, xstate16.AnyActorRef | undefined>, xstate16.StateValue, string, unknown, any, any>, {
177
- type: "LOAD";
178
- } | {
179
- type: "TOGGLE";
180
- } | {
181
- type: "SUBMIT";
182
- } | {
183
- type: "CANCEL";
184
- } | {
185
- type: "RETRY";
186
- } | {
187
- type: "RESET";
188
- }, xstate16.AnyEventObject>;
189
- }) => {
190
- config: MandatoryConsentConfig;
191
- consent: undefined;
192
- isSigned: false;
193
- error: undefined;
194
- };
195
- readonly states: {
196
- readonly idle: {
197
- readonly on: {
198
- readonly LOAD: {
199
- readonly target: "loading";
200
- readonly actions: "clearError";
201
- };
202
- };
203
- };
204
- readonly loading: {
205
- readonly invoke: {
206
- readonly id: "fetchConsent";
207
- readonly src: "fetchConsent";
208
- readonly input: ({
209
- context
210
- }: {
211
- context: MandatoryConsentContext;
212
- event: {
213
- type: "LOAD";
214
- } | {
215
- type: "TOGGLE";
216
- } | {
217
- type: "SUBMIT";
218
- } | {
219
- type: "CANCEL";
220
- } | {
221
- type: "RETRY";
222
- } | {
223
- type: "RESET";
224
- };
225
- self: xstate16.ActorRef<xstate16.MachineSnapshot<MandatoryConsentContext, {
226
- type: "LOAD";
227
- } | {
228
- type: "TOGGLE";
229
- } | {
230
- type: "SUBMIT";
231
- } | {
232
- type: "CANCEL";
233
- } | {
234
- type: "RETRY";
235
- } | {
236
- type: "RESET";
237
- }, Record<string, xstate16.AnyActorRef>, xstate16.StateValue, string, unknown, any, any>, {
238
- type: "LOAD";
239
- } | {
240
- type: "TOGGLE";
241
- } | {
242
- type: "SUBMIT";
243
- } | {
244
- type: "CANCEL";
245
- } | {
246
- type: "RETRY";
247
- } | {
248
- type: "RESET";
249
- }, xstate16.AnyEventObject>;
250
- }) => {
251
- config: MandatoryConsentConfig;
252
- };
253
- readonly onDone: {
254
- readonly target: "display";
255
- readonly actions: "setConsent";
256
- };
257
- readonly onError: {
258
- readonly target: "error";
259
- readonly actions: "setError";
260
- };
261
- };
262
- };
263
- readonly display: {
264
- readonly on: {
265
- readonly TOGGLE: {
266
- readonly actions: "toggleSigned";
267
- };
268
- readonly SUBMIT: {
269
- readonly target: "submitting";
270
- readonly guard: "canSubmit";
271
- };
272
- readonly CANCEL: {
273
- readonly target: "closed";
274
- };
275
- readonly RETRY: {
276
- readonly target: "loading";
277
- readonly actions: "clearError";
278
- };
279
- };
280
- };
281
- readonly submitting: {
282
- readonly invoke: {
283
- readonly id: "submitConsent";
284
- readonly src: "submitConsent";
285
- readonly input: ({
286
- context
287
- }: {
288
- context: MandatoryConsentContext;
289
- event: {
290
- type: "LOAD";
291
- } | {
292
- type: "TOGGLE";
293
- } | {
294
- type: "SUBMIT";
295
- } | {
296
- type: "CANCEL";
297
- } | {
298
- type: "RETRY";
299
- } | {
300
- type: "RESET";
301
- };
302
- self: xstate16.ActorRef<xstate16.MachineSnapshot<MandatoryConsentContext, {
303
- type: "LOAD";
304
- } | {
305
- type: "TOGGLE";
306
- } | {
307
- type: "SUBMIT";
308
- } | {
309
- type: "CANCEL";
310
- } | {
311
- type: "RETRY";
312
- } | {
313
- type: "RESET";
314
- }, Record<string, xstate16.AnyActorRef>, xstate16.StateValue, string, unknown, any, any>, {
315
- type: "LOAD";
316
- } | {
317
- type: "TOGGLE";
318
- } | {
319
- type: "SUBMIT";
320
- } | {
321
- type: "CANCEL";
322
- } | {
323
- type: "RETRY";
324
- } | {
325
- type: "RESET";
326
- }, xstate16.AnyEventObject>;
327
- }) => {
328
- consentId: string;
329
- isSigned: boolean;
330
- };
331
- readonly onDone: {
332
- readonly target: "finished";
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 CANCEL: {
347
- readonly target: "closed";
348
- };
349
- readonly RESET: {
350
- readonly target: "idle";
351
- readonly actions: "resetContext";
352
- };
353
- };
354
- };
355
- readonly finished: {
356
- readonly type: "final";
357
- };
358
- readonly closed: {
359
- readonly type: "final";
360
- };
361
- };
362
- }>;
363
- //#endregion
364
- //#region src/modules/mandatory-consent/mandatoryConsentActor.d.ts
365
- type CreateMandatoryConsentActorOptions = {
366
- config: MandatoryConsentConfig;
367
- };
368
- //#endregion
369
- //#region src/modules/mandatory-consent/mandatoryConsentManager.d.ts
370
- type MandatoryConsentIdleState = {
371
- status: 'idle';
372
- };
373
- type MandatoryConsentLoadingState = {
374
- status: 'loading';
375
- };
376
- type MandatoryConsentDisplayState = {
377
- status: 'display';
378
- title: string;
379
- text: string;
380
- isSigned: boolean;
381
- canSubmit: boolean;
382
- error?: string;
383
- };
384
- type MandatoryConsentSubmittingState = {
385
- status: 'submitting';
386
- title: string;
387
- text: string;
388
- isSigned: boolean;
389
- canSubmit: false;
390
- };
391
- type MandatoryConsentFinishedState = {
392
- status: 'finished';
393
- };
394
- type MandatoryConsentClosedState = {
395
- status: 'closed';
396
- };
397
- type MandatoryConsentErrorState = {
398
- status: 'error';
399
- error: string;
400
- };
401
- type MandatoryConsentState = MandatoryConsentIdleState | MandatoryConsentLoadingState | MandatoryConsentDisplayState | MandatoryConsentSubmittingState | MandatoryConsentFinishedState | MandatoryConsentClosedState | MandatoryConsentErrorState;
402
- declare function createMandatoryConsentManager(options: CreateMandatoryConsentActorOptions): Manager<MandatoryConsentState> & {
403
- load(): void;
404
- toggle(): void;
405
- submit(): void;
406
- cancel(): void;
407
- retry(): void;
408
- reset(): void;
409
- };
410
- type MandatoryConsentManager = ReturnType<typeof createMandatoryConsentManager>;
411
- //#endregion
412
- export { type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, mandatoryConsentMachine };
@@ -1,78 +0,0 @@
1
- import "./api-CESGtpbH.esm.js";
2
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-D6-e4vok.esm.js";
3
- import "./endpoints-CnN3SyDa.esm.js";
4
- import { c as createManager, s as createActor } from "./xstate.esm-B70JrNqo.esm.js";
5
- import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-Cnco1jvn.esm.js";
6
-
7
- //#region src/modules/mandatory-consent/mandatoryConsentActor.ts
8
- function createMandatoryConsentActor(options) {
9
- return createActor(mandatoryConsentMachine, { input: { config: options.config } }).start();
10
- }
11
-
12
- //#endregion
13
- //#region src/modules/mandatory-consent/mandatoryConsentManager.ts
14
- function mapState(snapshot) {
15
- const typedSnapshot = snapshot;
16
- const { context } = typedSnapshot;
17
- const canSubmit = Boolean(context.isSigned && context.consent?.id);
18
- if (typedSnapshot.matches("idle")) return { status: "idle" };
19
- if (typedSnapshot.matches("loading")) return { status: "loading" };
20
- if (typedSnapshot.matches("display")) return {
21
- status: "display",
22
- title: context.consent?.title ?? "",
23
- text: context.consent?.text ?? "",
24
- isSigned: context.isSigned,
25
- canSubmit,
26
- error: context.error
27
- };
28
- if (typedSnapshot.matches("submitting")) return {
29
- status: "submitting",
30
- title: context.consent?.title ?? "",
31
- text: context.consent?.text ?? "",
32
- isSigned: context.isSigned,
33
- canSubmit: false
34
- };
35
- if (typedSnapshot.matches("finished")) return { status: "finished" };
36
- if (typedSnapshot.matches("closed")) return { status: "closed" };
37
- if (typedSnapshot.matches("error")) return {
38
- status: "error",
39
- error: context.error ?? "Unknown error"
40
- };
41
- return { status: "idle" };
42
- }
43
- function createApi({ actor, trackElementClicked }) {
44
- return {
45
- load() {
46
- actor.send({ type: "LOAD" });
47
- },
48
- toggle() {
49
- actor.send({ type: "TOGGLE" });
50
- },
51
- submit() {
52
- trackElementClicked?.("submit");
53
- actor.send({ type: "SUBMIT" });
54
- },
55
- cancel() {
56
- trackElementClicked?.("cancel");
57
- actor.send({ type: "CANCEL" });
58
- },
59
- retry() {
60
- trackElementClicked?.("retry");
61
- actor.send({ type: "RETRY" });
62
- },
63
- reset() {
64
- actor.send({ type: "RESET" });
65
- }
66
- };
67
- }
68
- function createMandatoryConsentManager(options) {
69
- return createManager({
70
- actor: createMandatoryConsentActor(options),
71
- mapState,
72
- createApi,
73
- instrumentation: createManagerInstrumentation(eventModuleNames.mlConsent)
74
- });
75
- }
76
-
77
- //#endregion
78
- export { createMandatoryConsentManager, mandatoryConsentMachine };
@@ -1,126 +0,0 @@
1
- import { t as api } from "./api-CESGtpbH.esm.js";
2
- import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
3
- import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
4
-
5
- //#region src/modules/mandatory-consent/mandatoryConsentServices.ts
6
- async function fetchMandatoryConsent(regulationType, signal) {
7
- const res = await api.get(endpoints.getConsents, {
8
- signal,
9
- query: {
10
- type: "MANDATORY",
11
- language: "en",
12
- regulationType
13
- }
14
- });
15
- if (!res.ok) throw new Error(`GET ${endpoints.getConsents} failed: ${res.status} ${res.statusText}`);
16
- return res.data;
17
- }
18
- async function submitMandatoryConsent(params, signal) {
19
- const res = await api.post(endpoints.submitMlConsent, params, { signal });
20
- if (!res.ok) throw new Error(`POST ${endpoints.submitMlConsent} failed: ${res.status} ${res.statusText}`);
21
- }
22
-
23
- //#endregion
24
- //#region src/modules/mandatory-consent/mandatoryConsentStateMachine.ts
25
- const mandatoryConsentMachine = setup({
26
- types: {
27
- context: {},
28
- events: {},
29
- input: {}
30
- },
31
- actors: {
32
- fetchConsent: fromPromise(async ({ input, signal }) => fetchMandatoryConsent(input.config.consentType, signal)),
33
- submitConsent: fromPromise(async ({ input, signal }) => submitMandatoryConsent({ consents: [{
34
- id: input.consentId,
35
- isSigned: input.isSigned
36
- }] }, signal))
37
- },
38
- actions: {
39
- setConsent: assign(({ event }) => {
40
- return {
41
- consent: event.output.consents[0],
42
- isSigned: false,
43
- error: void 0
44
- };
45
- }),
46
- toggleSigned: assign(({ context }) => ({ isSigned: !context.isSigned })),
47
- setError: assign(({ event }) => ({ error: String(event.error) })),
48
- clearError: assign({ error: () => void 0 }),
49
- resetContext: assign(({ context }) => ({
50
- config: context.config,
51
- consent: void 0,
52
- isSigned: false,
53
- error: void 0
54
- }))
55
- },
56
- guards: { canSubmit: ({ context }) => Boolean(context.consent?.id) && context.isSigned }
57
- }).createMachine({
58
- id: "mandatoryConsent",
59
- initial: "idle",
60
- context: ({ input }) => ({
61
- config: input.config,
62
- consent: void 0,
63
- isSigned: false,
64
- error: void 0
65
- }),
66
- states: {
67
- idle: { on: { LOAD: {
68
- target: "loading",
69
- actions: "clearError"
70
- } } },
71
- loading: { invoke: {
72
- id: "fetchConsent",
73
- src: "fetchConsent",
74
- input: ({ context }) => ({ config: context.config }),
75
- onDone: {
76
- target: "display",
77
- actions: "setConsent"
78
- },
79
- onError: {
80
- target: "error",
81
- actions: "setError"
82
- }
83
- } },
84
- display: { on: {
85
- TOGGLE: { actions: "toggleSigned" },
86
- SUBMIT: {
87
- target: "submitting",
88
- guard: "canSubmit"
89
- },
90
- CANCEL: { target: "closed" },
91
- RETRY: {
92
- target: "loading",
93
- actions: "clearError"
94
- }
95
- } },
96
- submitting: { invoke: {
97
- id: "submitConsent",
98
- src: "submitConsent",
99
- input: ({ context }) => ({
100
- consentId: context.consent?.id ?? "",
101
- isSigned: context.isSigned
102
- }),
103
- onDone: { target: "finished" },
104
- onError: {
105
- target: "display",
106
- actions: "setError"
107
- }
108
- } },
109
- error: { on: {
110
- RETRY: {
111
- target: "loading",
112
- actions: "clearError"
113
- },
114
- CANCEL: { target: "closed" },
115
- RESET: {
116
- target: "idle",
117
- actions: "resetContext"
118
- }
119
- } },
120
- finished: { type: "final" },
121
- closed: { type: "final" }
122
- }
123
- });
124
-
125
- //#endregion
126
- export { mandatoryConsentMachine as t };
@@ -1,3 +0,0 @@
1
- import { t as loadOpenVidu } from "./openviduLazy-Cok70ZSg.esm.js";
2
-
3
- export { loadOpenVidu };
@@ -1,12 +0,0 @@
1
- import { a as __toDynamicImportESM } from "./chunk-CRF6K_H_.esm.js";
2
-
3
- //#region ../infra/src/providers/browser/openviduLazy.ts
4
- let openViduImport;
5
- async function loadOpenVidu() {
6
- if (openViduImport) return openViduImport;
7
- openViduImport = import("./lib-BB0B_qQX.esm.js").then(__toDynamicImportESM(1));
8
- return openViduImport;
9
- }
10
-
11
- //#endregion
12
- export { loadOpenVidu as t };
@@ -1,50 +0,0 @@
1
- import { i as stopCameraStream, r as requestCameraAccess } from "./camera-PA2Ljri3.esm.js";
2
- import { t as MotionSensorProvider } from "./MotionSensorProvider-4v7xkqAp.esm.js";
3
-
4
- //#region ../infra/src/media/permissions.ts
5
- async function queryPermission(name) {
6
- try {
7
- if (typeof navigator === "undefined" || !navigator.permissions) return "prompt";
8
- return (await navigator.permissions.query({ name })).state;
9
- } catch {
10
- return "prompt";
11
- }
12
- }
13
- async function queryCameraPermission() {
14
- return queryPermission("camera");
15
- }
16
-
17
- //#endregion
18
- //#region src/internal/permissions/permissionServices.ts
19
- async function checkPermission() {
20
- const queryResult = await queryCameraPermission();
21
- if (queryResult === "granted") return "granted";
22
- if (queryResult === "denied") return "denied";
23
- return "prompt";
24
- }
25
- /**
26
- * Requests motion sensor permission. Must be called during a user gesture on iOS.
27
- * Returns the permission result.
28
- */
29
- async function requestMotionPermission() {
30
- return new MotionSensorProvider().requestPermission();
31
- }
32
- /**
33
- * Requests camera permission by attempting to access the camera, then immediately
34
- * stops the obtained stream. Also requests motion sensor permission (required on iOS
35
- * to be called during a user gesture). This function does not keep or return the stream.
36
- */
37
- async function requestPermission(options = {}) {
38
- try {
39
- if (options.requestMotion) await requestMotionPermission();
40
- stopCameraStream(await requestCameraAccess({ video: true }));
41
- return "granted";
42
- } catch (error) {
43
- const name = error instanceof Error ? error.name : void 0;
44
- if (name === "NotAllowedError" || name === "PermissionDeniedError") return "denied";
45
- return "prompt";
46
- }
47
- }
48
-
49
- //#endregion
50
- export { requestPermission as n, checkPermission as t };
package/dist/phone.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import "./Manager-C8PrhBOx.js";
2
- import "./Actor-CI32dTbG.js";
3
- import { a as phoneMachine, n as PhoneState, o as PhoneConfig, r as createPhoneManager, t as PhoneManager } from "./phoneManager-B6M30hKE.js";
4
- export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
package/dist/phone.esm.js DELETED
@@ -1,9 +0,0 @@
1
- import "./BrowserTimerProvider-DhNc_x02.esm.js";
2
- import "./api-CESGtpbH.esm.js";
3
- import "./events-D6-e4vok.esm.js";
4
- import "./endpoints-CnN3SyDa.esm.js";
5
- import "./xstate.esm-B70JrNqo.esm.js";
6
- import { t as phoneMachine } from "./phoneStateMachine-CuPARRaT.esm.js";
7
- import { t as createPhoneManager } from "./phoneManager-DAJbGhlY.esm.js";
8
-
9
- export { createPhoneManager, phoneMachine };