@incodetech/core 0.0.0-dev-20260330-e91ed6b → 0.0.0-dev-20260331-a4ec4fe

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/consent.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { f as Manager } from "./index-BTaLQSj9.js";
2
- import * as xstate417 from "xstate";
2
+ import * as xstate67 from "xstate";
3
3
 
4
4
  //#region src/modules/consent/types.d.ts
5
5
  type ConsentConfig = {
@@ -35,7 +35,7 @@ type ConsentContext = {
35
35
  type ConsentInput = {
36
36
  config: ConsentConfig;
37
37
  };
38
- declare const consentMachine: xstate417.StateMachine<ConsentContext, {
38
+ declare const consentMachine: xstate67.StateMachine<ConsentContext, {
39
39
  type: "LOAD";
40
40
  } | {
41
41
  type: "TOGGLE_CHECKBOX";
@@ -47,53 +47,53 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
47
47
  } | {
48
48
  type: "RESET";
49
49
  }, {
50
- [x: string]: xstate417.ActorRefFromLogic<xstate417.PromiseActorLogic<FetchCombinedConsentResponse, {
50
+ [x: string]: xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
51
51
  consentId: string;
52
- }, xstate417.EventObject>> | xstate417.ActorRefFromLogic<xstate417.PromiseActorLogic<void, {
52
+ }, xstate67.EventObject>> | xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<void, {
53
53
  languageConsentId: string;
54
54
  checkboxes: ConsentCheckbox[];
55
- }, xstate417.EventObject>> | undefined;
56
- }, xstate417.Values<{
55
+ }, xstate67.EventObject>> | undefined;
56
+ }, xstate67.Values<{
57
57
  fetchConsent: {
58
58
  src: "fetchConsent";
59
- logic: xstate417.PromiseActorLogic<FetchCombinedConsentResponse, {
59
+ logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
60
60
  consentId: string;
61
- }, xstate417.EventObject>;
61
+ }, xstate67.EventObject>;
62
62
  id: string | undefined;
63
63
  };
64
64
  submitConsent: {
65
65
  src: "submitConsent";
66
- logic: xstate417.PromiseActorLogic<void, {
66
+ logic: xstate67.PromiseActorLogic<void, {
67
67
  languageConsentId: string;
68
68
  checkboxes: ConsentCheckbox[];
69
- }, xstate417.EventObject>;
69
+ }, xstate67.EventObject>;
70
70
  id: string | undefined;
71
71
  };
72
- }>, xstate417.Values<{
72
+ }>, xstate67.Values<{
73
73
  setError: {
74
74
  type: "setError";
75
- params: xstate417.NonReducibleUnknown;
75
+ params: xstate67.NonReducibleUnknown;
76
76
  };
77
77
  clearError: {
78
78
  type: "clearError";
79
- params: xstate417.NonReducibleUnknown;
79
+ params: xstate67.NonReducibleUnknown;
80
80
  };
81
81
  resetContext: {
82
82
  type: "resetContext";
83
- params: xstate417.NonReducibleUnknown;
83
+ params: xstate67.NonReducibleUnknown;
84
84
  };
85
85
  setConsentData: {
86
86
  type: "setConsentData";
87
- params: xstate417.NonReducibleUnknown;
87
+ params: xstate67.NonReducibleUnknown;
88
88
  };
89
89
  toggleCheckbox: {
90
90
  type: "toggleCheckbox";
91
- params: xstate417.NonReducibleUnknown;
91
+ params: xstate67.NonReducibleUnknown;
92
92
  };
93
93
  }>, {
94
94
  type: "canSubmit";
95
95
  params: unknown;
96
- }, never, "error" | "idle" | "finished" | "loading" | "display" | "submitting", string, ConsentInput, xstate417.NonReducibleUnknown, xstate417.EventObject, xstate417.MetaObject, {
96
+ }, never, "error" | "idle" | "loading" | "display" | "submitting" | "finished", string, ConsentInput, xstate67.NonReducibleUnknown, xstate67.EventObject, xstate67.MetaObject, {
97
97
  readonly id: "consent";
98
98
  readonly initial: "idle";
99
99
  readonly context: ({
@@ -102,70 +102,70 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
102
102
  spawn: {
103
103
  <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
104
104
  src: "fetchConsent";
105
- logic: xstate417.PromiseActorLogic<FetchCombinedConsentResponse, {
105
+ logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
106
106
  consentId: string;
107
- }, xstate417.EventObject>;
107
+ }, xstate67.EventObject>;
108
108
  id: string | undefined;
109
109
  } extends infer T ? T extends {
110
110
  src: "fetchConsent";
111
- logic: xstate417.PromiseActorLogic<FetchCombinedConsentResponse, {
111
+ logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
112
112
  consentId: string;
113
- }, xstate417.EventObject>;
113
+ }, xstate67.EventObject>;
114
114
  id: string | undefined;
115
115
  } ? T extends {
116
116
  src: TSrc;
117
- } ? xstate417.ConditionalRequired<[options?: ({
117
+ } ? xstate67.ConditionalRequired<[options?: ({
118
118
  id?: T["id"] | undefined;
119
119
  systemId?: string;
120
- input?: xstate417.InputFrom<T["logic"]> | undefined;
120
+ input?: xstate67.InputFrom<T["logic"]> | undefined;
121
121
  syncSnapshot?: boolean;
122
- } & { [K in xstate417.RequiredActorOptions<T>]: unknown }) | undefined], xstate417.IsNotNever<xstate417.RequiredActorOptions<T>>> : never : never : never) | ({
122
+ } & { [K in xstate67.RequiredActorOptions<T>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T>>> : never : never : never) | ({
123
123
  src: "submitConsent";
124
- logic: xstate417.PromiseActorLogic<void, {
124
+ logic: xstate67.PromiseActorLogic<void, {
125
125
  languageConsentId: string;
126
126
  checkboxes: ConsentCheckbox[];
127
- }, xstate417.EventObject>;
127
+ }, xstate67.EventObject>;
128
128
  id: string | undefined;
129
129
  } extends infer T_1 ? T_1 extends {
130
130
  src: "submitConsent";
131
- logic: xstate417.PromiseActorLogic<void, {
131
+ logic: xstate67.PromiseActorLogic<void, {
132
132
  languageConsentId: string;
133
133
  checkboxes: ConsentCheckbox[];
134
- }, xstate417.EventObject>;
134
+ }, xstate67.EventObject>;
135
135
  id: string | undefined;
136
136
  } ? T_1 extends {
137
137
  src: TSrc;
138
- } ? xstate417.ConditionalRequired<[options?: ({
138
+ } ? xstate67.ConditionalRequired<[options?: ({
139
139
  id?: T_1["id"] | undefined;
140
140
  systemId?: string;
141
- input?: xstate417.InputFrom<T_1["logic"]> | undefined;
141
+ input?: xstate67.InputFrom<T_1["logic"]> | undefined;
142
142
  syncSnapshot?: boolean;
143
- } & { [K_1 in xstate417.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate417.IsNotNever<xstate417.RequiredActorOptions<T_1>>> : never : never : never)): xstate417.ActorRefFromLogic<xstate417.GetConcreteByKey<xstate417.Values<{
143
+ } & { [K_1 in xstate67.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T_1>>> : never : never : never)): xstate67.ActorRefFromLogic<xstate67.GetConcreteByKey<xstate67.Values<{
144
144
  fetchConsent: {
145
145
  src: "fetchConsent";
146
- logic: xstate417.PromiseActorLogic<FetchCombinedConsentResponse, {
146
+ logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
147
147
  consentId: string;
148
- }, xstate417.EventObject>;
148
+ }, xstate67.EventObject>;
149
149
  id: string | undefined;
150
150
  };
151
151
  submitConsent: {
152
152
  src: "submitConsent";
153
- logic: xstate417.PromiseActorLogic<void, {
153
+ logic: xstate67.PromiseActorLogic<void, {
154
154
  languageConsentId: string;
155
155
  checkboxes: ConsentCheckbox[];
156
- }, xstate417.EventObject>;
156
+ }, xstate67.EventObject>;
157
157
  id: string | undefined;
158
158
  };
159
159
  }>, "src", TSrc>["logic"]>;
160
- <TLogic extends xstate417.AnyActorLogic>(src: TLogic, ...[options]: xstate417.ConditionalRequired<[options?: ({
160
+ <TLogic extends xstate67.AnyActorLogic>(src: TLogic, ...[options]: xstate67.ConditionalRequired<[options?: ({
161
161
  id?: never;
162
162
  systemId?: string;
163
- input?: xstate417.InputFrom<TLogic> | undefined;
163
+ input?: xstate67.InputFrom<TLogic> | undefined;
164
164
  syncSnapshot?: boolean;
165
- } & { [K in xstate417.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate417.IsNotNever<xstate417.RequiredLogicInput<TLogic>>>): xstate417.ActorRefFromLogic<TLogic>;
165
+ } & { [K in xstate67.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredLogicInput<TLogic>>>): xstate67.ActorRefFromLogic<TLogic>;
166
166
  };
167
167
  input: ConsentInput;
168
- self: xstate417.ActorRef<xstate417.MachineSnapshot<ConsentContext, {
168
+ self: xstate67.ActorRef<xstate67.MachineSnapshot<ConsentContext, {
169
169
  type: "LOAD";
170
170
  } | {
171
171
  type: "TOGGLE_CHECKBOX";
@@ -176,7 +176,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
176
176
  type: "RETRY";
177
177
  } | {
178
178
  type: "RESET";
179
- }, Record<string, xstate417.AnyActorRef | undefined>, xstate417.StateValue, string, unknown, any, any>, {
179
+ }, Record<string, xstate67.AnyActorRef | undefined>, xstate67.StateValue, string, unknown, any, any>, {
180
180
  type: "LOAD";
181
181
  } | {
182
182
  type: "TOGGLE_CHECKBOX";
@@ -187,7 +187,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
187
187
  type: "RETRY";
188
188
  } | {
189
189
  type: "RESET";
190
- }, xstate417.AnyEventObject>;
190
+ }, xstate67.AnyEventObject>;
191
191
  }) => {
192
192
  config: ConsentConfig;
193
193
  title: string;
@@ -225,7 +225,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
225
225
  } | {
226
226
  type: "RESET";
227
227
  };
228
- self: xstate417.ActorRef<xstate417.MachineSnapshot<ConsentContext, {
228
+ self: xstate67.ActorRef<xstate67.MachineSnapshot<ConsentContext, {
229
229
  type: "LOAD";
230
230
  } | {
231
231
  type: "TOGGLE_CHECKBOX";
@@ -236,7 +236,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
236
236
  type: "RETRY";
237
237
  } | {
238
238
  type: "RESET";
239
- }, Record<string, xstate417.AnyActorRef>, xstate417.StateValue, string, unknown, any, any>, {
239
+ }, Record<string, xstate67.AnyActorRef>, xstate67.StateValue, string, unknown, any, any>, {
240
240
  type: "LOAD";
241
241
  } | {
242
242
  type: "TOGGLE_CHECKBOX";
@@ -247,7 +247,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
247
247
  type: "RETRY";
248
248
  } | {
249
249
  type: "RESET";
250
- }, xstate417.AnyEventObject>;
250
+ }, xstate67.AnyEventObject>;
251
251
  }) => {
252
252
  consentId: string;
253
253
  };
@@ -296,7 +296,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
296
296
  } | {
297
297
  type: "RESET";
298
298
  };
299
- self: xstate417.ActorRef<xstate417.MachineSnapshot<ConsentContext, {
299
+ self: xstate67.ActorRef<xstate67.MachineSnapshot<ConsentContext, {
300
300
  type: "LOAD";
301
301
  } | {
302
302
  type: "TOGGLE_CHECKBOX";
@@ -307,7 +307,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
307
307
  type: "RETRY";
308
308
  } | {
309
309
  type: "RESET";
310
- }, Record<string, xstate417.AnyActorRef>, xstate417.StateValue, string, unknown, any, any>, {
310
+ }, Record<string, xstate67.AnyActorRef>, xstate67.StateValue, string, unknown, any, any>, {
311
311
  type: "LOAD";
312
312
  } | {
313
313
  type: "TOGGLE_CHECKBOX";
@@ -318,7 +318,7 @@ declare const consentMachine: xstate417.StateMachine<ConsentContext, {
318
318
  type: "RETRY";
319
319
  } | {
320
320
  type: "RESET";
321
- }, xstate417.AnyEventObject>;
321
+ }, xstate67.AnyEventObject>;
322
322
  }) => {
323
323
  languageConsentId: string;
324
324
  checkboxes: ConsentCheckbox[];
@@ -1,5 +1,5 @@
1
1
  import { d as CameraStream, f as Manager } from "./index-BTaLQSj9.js";
2
- import * as xstate344 from "xstate";
2
+ import * as xstate412 from "xstate";
3
3
 
4
4
  //#region src/modules/document-capture/types.d.ts
5
5
  type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
@@ -71,7 +71,7 @@ type DocumentCaptureInput = {
71
71
  };
72
72
  //#endregion
73
73
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
74
- declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureContext, {
74
+ declare const documentCaptureMachine: xstate412.StateMachine<DocumentCaptureContext, {
75
75
  type: "CAPTURE";
76
76
  } | {
77
77
  type: "FILE_SELECTED";
@@ -94,84 +94,84 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
94
94
  } | {
95
95
  type: "CLOSE";
96
96
  }, {
97
- [x: string]: xstate344.ActorRefFromLogic<xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>> | xstate344.ActorRefFromLogic<xstate344.PromiseActorLogic<DocumentUploadResponse, {
97
+ [x: string]: xstate412.ActorRefFromLogic<xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>> | xstate412.ActorRefFromLogic<xstate412.PromiseActorLogic<DocumentUploadResponse, {
98
98
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
99
99
  processingType: string;
100
100
  onProgress: (progress: number) => void;
101
- }, xstate344.EventObject>> | undefined;
102
- }, xstate344.Values<{
101
+ }, xstate412.EventObject>> | undefined;
102
+ }, xstate412.Values<{
103
103
  initCamera: {
104
104
  src: "initCamera";
105
- logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
105
+ logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
106
106
  id: string | undefined;
107
107
  };
108
108
  uploadDocument: {
109
109
  src: "uploadDocument";
110
- logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
110
+ logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
111
111
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
112
112
  processingType: string;
113
113
  onProgress: (progress: number) => void;
114
- }, xstate344.EventObject>;
114
+ }, xstate412.EventObject>;
115
115
  id: string | undefined;
116
116
  };
117
- }>, xstate344.Values<{
117
+ }>, xstate412.Values<{
118
+ clearError: {
119
+ type: "clearError";
120
+ params: xstate412.NonReducibleUnknown;
121
+ };
118
122
  setStream: {
119
123
  type: "setStream";
120
- params: xstate344.NonReducibleUnknown;
124
+ params: xstate412.NonReducibleUnknown;
121
125
  };
122
126
  setProgress: {
123
127
  type: "setProgress";
124
- params: xstate344.NonReducibleUnknown;
125
- };
126
- clearError: {
127
- type: "clearError";
128
- params: xstate344.NonReducibleUnknown;
128
+ params: xstate412.NonReducibleUnknown;
129
129
  };
130
130
  stopStream: {
131
131
  type: "stopStream";
132
- params: xstate344.NonReducibleUnknown;
132
+ params: xstate412.NonReducibleUnknown;
133
133
  };
134
134
  setCapturedDocument: {
135
135
  type: "setCapturedDocument";
136
- params: xstate344.NonReducibleUnknown;
136
+ params: xstate412.NonReducibleUnknown;
137
137
  };
138
138
  setFileTooLargeError: {
139
139
  type: "setFileTooLargeError";
140
- params: xstate344.NonReducibleUnknown;
140
+ params: xstate412.NonReducibleUnknown;
141
141
  };
142
142
  setUploadError: {
143
143
  type: "setUploadError";
144
- params: xstate344.NonReducibleUnknown;
144
+ params: xstate412.NonReducibleUnknown;
145
145
  };
146
146
  decrementAttemptsRemaining: {
147
147
  type: "decrementAttemptsRemaining";
148
- params: xstate344.NonReducibleUnknown;
148
+ params: xstate412.NonReducibleUnknown;
149
149
  };
150
150
  setCaptureMethodFile: {
151
151
  type: "setCaptureMethodFile";
152
- params: xstate344.NonReducibleUnknown;
152
+ params: xstate412.NonReducibleUnknown;
153
153
  };
154
154
  setCaptureMethodCamera: {
155
155
  type: "setCaptureMethodCamera";
156
- params: xstate344.NonReducibleUnknown;
156
+ params: xstate412.NonReducibleUnknown;
157
157
  };
158
158
  clearCapturedDocument: {
159
159
  type: "clearCapturedDocument";
160
- params: xstate344.NonReducibleUnknown;
160
+ params: xstate412.NonReducibleUnknown;
161
161
  };
162
162
  setPendingNextPage: {
163
163
  type: "setPendingNextPage";
164
- params: xstate344.NonReducibleUnknown;
164
+ params: xstate412.NonReducibleUnknown;
165
165
  };
166
166
  clearForNextPage: {
167
167
  type: "clearForNextPage";
168
- params: xstate344.NonReducibleUnknown;
168
+ params: xstate412.NonReducibleUnknown;
169
169
  };
170
170
  resetProgress: {
171
171
  type: "resetProgress";
172
- params: xstate344.NonReducibleUnknown;
172
+ params: xstate412.NonReducibleUnknown;
173
173
  };
174
- }>, xstate344.Values<{
174
+ }>, xstate412.Values<{
175
175
  allowSkip: {
176
176
  type: "allowSkip";
177
177
  params: unknown;
@@ -208,7 +208,7 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
208
208
  type: "isPendingNextPage";
209
209
  params: unknown;
210
210
  };
211
- }>, never, "initCamera" | "capturing" | "closed" | "uploading" | "finished" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate344.NonReducibleUnknown, xstate344.EventObject, xstate344.MetaObject, {
211
+ }>, never, "closed" | "finished" | "initCamera" | "capturing" | "uploading" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate412.NonReducibleUnknown, xstate412.EventObject, xstate412.MetaObject, {
212
212
  readonly id: "documentCapture";
213
213
  readonly initial: "tutorial";
214
214
  readonly context: ({
@@ -217,67 +217,67 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
217
217
  spawn: {
218
218
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
219
219
  src: "initCamera";
220
- logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
220
+ logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
221
221
  id: string | undefined;
222
222
  } extends infer T ? T extends {
223
223
  src: "initCamera";
224
- logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
224
+ logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
225
225
  id: string | undefined;
226
226
  } ? T extends {
227
227
  src: TSrc;
228
- } ? xstate344.ConditionalRequired<[options?: ({
228
+ } ? xstate412.ConditionalRequired<[options?: ({
229
229
  id?: T["id"] | undefined;
230
230
  systemId?: string;
231
- input?: xstate344.InputFrom<T["logic"]> | undefined;
231
+ input?: xstate412.InputFrom<T["logic"]> | undefined;
232
232
  syncSnapshot?: boolean;
233
- } & { [K in xstate344.RequiredActorOptions<T>]: unknown }) | undefined], xstate344.IsNotNever<xstate344.RequiredActorOptions<T>>> : never : never : never) | ({
233
+ } & { [K in xstate412.RequiredActorOptions<T>]: unknown }) | undefined], xstate412.IsNotNever<xstate412.RequiredActorOptions<T>>> : never : never : never) | ({
234
234
  src: "uploadDocument";
235
- logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
235
+ logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
236
236
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
237
237
  processingType: string;
238
238
  onProgress: (progress: number) => void;
239
- }, xstate344.EventObject>;
239
+ }, xstate412.EventObject>;
240
240
  id: string | undefined;
241
241
  } extends infer T_1 ? T_1 extends {
242
242
  src: "uploadDocument";
243
- logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
243
+ logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
244
244
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
245
245
  processingType: string;
246
246
  onProgress: (progress: number) => void;
247
- }, xstate344.EventObject>;
247
+ }, xstate412.EventObject>;
248
248
  id: string | undefined;
249
249
  } ? T_1 extends {
250
250
  src: TSrc;
251
- } ? xstate344.ConditionalRequired<[options?: ({
251
+ } ? xstate412.ConditionalRequired<[options?: ({
252
252
  id?: T_1["id"] | undefined;
253
253
  systemId?: string;
254
- input?: xstate344.InputFrom<T_1["logic"]> | undefined;
254
+ input?: xstate412.InputFrom<T_1["logic"]> | undefined;
255
255
  syncSnapshot?: boolean;
256
- } & { [K_1 in xstate344.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate344.IsNotNever<xstate344.RequiredActorOptions<T_1>>> : never : never : never)): xstate344.ActorRefFromLogic<xstate344.GetConcreteByKey<xstate344.Values<{
256
+ } & { [K_1 in xstate412.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate412.IsNotNever<xstate412.RequiredActorOptions<T_1>>> : never : never : never)): xstate412.ActorRefFromLogic<xstate412.GetConcreteByKey<xstate412.Values<{
257
257
  initCamera: {
258
258
  src: "initCamera";
259
- logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
259
+ logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
260
260
  id: string | undefined;
261
261
  };
262
262
  uploadDocument: {
263
263
  src: "uploadDocument";
264
- logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
264
+ logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
265
265
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
266
266
  processingType: string;
267
267
  onProgress: (progress: number) => void;
268
- }, xstate344.EventObject>;
268
+ }, xstate412.EventObject>;
269
269
  id: string | undefined;
270
270
  };
271
271
  }>, "src", TSrc>["logic"]>;
272
- <TLogic extends xstate344.AnyActorLogic>(src: TLogic, ...[options]: xstate344.ConditionalRequired<[options?: ({
272
+ <TLogic extends xstate412.AnyActorLogic>(src: TLogic, ...[options]: xstate412.ConditionalRequired<[options?: ({
273
273
  id?: never;
274
274
  systemId?: string;
275
- input?: xstate344.InputFrom<TLogic> | undefined;
275
+ input?: xstate412.InputFrom<TLogic> | undefined;
276
276
  syncSnapshot?: boolean;
277
- } & { [K in xstate344.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate344.IsNotNever<xstate344.RequiredLogicInput<TLogic>>>): xstate344.ActorRefFromLogic<TLogic>;
277
+ } & { [K in xstate412.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate412.IsNotNever<xstate412.RequiredLogicInput<TLogic>>>): xstate412.ActorRefFromLogic<TLogic>;
278
278
  };
279
279
  input: DocumentCaptureInput;
280
- self: xstate344.ActorRef<xstate344.MachineSnapshot<DocumentCaptureContext, {
280
+ self: xstate412.ActorRef<xstate412.MachineSnapshot<DocumentCaptureContext, {
281
281
  type: "CAPTURE";
282
282
  } | {
283
283
  type: "FILE_SELECTED";
@@ -299,7 +299,7 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
299
299
  type: "SKIP";
300
300
  } | {
301
301
  type: "CLOSE";
302
- }, Record<string, xstate344.AnyActorRef | undefined>, xstate344.StateValue, string, unknown, any, any>, {
302
+ }, Record<string, xstate412.AnyActorRef | undefined>, xstate412.StateValue, string, unknown, any, any>, {
303
303
  type: "CAPTURE";
304
304
  } | {
305
305
  type: "FILE_SELECTED";
@@ -321,7 +321,7 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
321
321
  type: "SKIP";
322
322
  } | {
323
323
  type: "CLOSE";
324
- }, xstate344.AnyEventObject>;
324
+ }, xstate412.AnyEventObject>;
325
325
  }) => {
326
326
  config: {
327
327
  processingType: DocumentType;
@@ -458,7 +458,7 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
458
458
  } | {
459
459
  type: "CLOSE";
460
460
  };
461
- self: xstate344.ActorRef<xstate344.MachineSnapshot<DocumentCaptureContext, {
461
+ self: xstate412.ActorRef<xstate412.MachineSnapshot<DocumentCaptureContext, {
462
462
  type: "CAPTURE";
463
463
  } | {
464
464
  type: "FILE_SELECTED";
@@ -480,7 +480,7 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
480
480
  type: "SKIP";
481
481
  } | {
482
482
  type: "CLOSE";
483
- }, Record<string, xstate344.AnyActorRef>, xstate344.StateValue, string, unknown, any, any>, {
483
+ }, Record<string, xstate412.AnyActorRef>, xstate412.StateValue, string, unknown, any, any>, {
484
484
  type: "CAPTURE";
485
485
  } | {
486
486
  type: "FILE_SELECTED";
@@ -502,7 +502,7 @@ declare const documentCaptureMachine: xstate344.StateMachine<DocumentCaptureCont
502
502
  type: "SKIP";
503
503
  } | {
504
504
  type: "CLOSE";
505
- }, xstate344.AnyEventObject>;
505
+ }, xstate412.AnyEventObject>;
506
506
  }) => {
507
507
  capturedDocument: CapturedDocument;
508
508
  processingType: DocumentType;
@@ -1,9 +1,9 @@
1
1
  import { f as Manager } from "./index-BTaLQSj9.js";
2
2
  import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-oveF7RrS.js";
3
- import * as xstate0 from "xstate";
3
+ import * as xstate135 from "xstate";
4
4
 
5
5
  //#region src/modules/document-upload/documentUploadStateMachine.d.ts
6
- declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
6
+ declare const documentUploadMachine: xstate135.StateMachine<DocumentUploadContext, {
7
7
  type: "START";
8
8
  } | {
9
9
  type: "CAPTURE";
@@ -16,52 +16,52 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
16
16
  } | {
17
17
  type: "CLOSE";
18
18
  }, {
19
- [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
19
+ [x: string]: xstate135.ActorRefFromLogic<xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>> | xstate135.ActorRefFromLogic<xstate135.PromiseActorLogic<void, {
20
20
  imageBase64: string;
21
21
  documentType: string;
22
22
  onProgress: (progress: number) => void;
23
- }, xstate0.EventObject>> | undefined;
24
- }, xstate0.Values<{
23
+ }, xstate135.EventObject>> | undefined;
24
+ }, xstate135.Values<{
25
25
  initCamera: {
26
26
  src: "initCamera";
27
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
27
+ logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
28
28
  id: string | undefined;
29
29
  };
30
30
  uploadDocument: {
31
31
  src: "uploadDocument";
32
- logic: xstate0.PromiseActorLogic<void, {
32
+ logic: xstate135.PromiseActorLogic<void, {
33
33
  imageBase64: string;
34
34
  documentType: string;
35
35
  onProgress: (progress: number) => void;
36
- }, xstate0.EventObject>;
36
+ }, xstate135.EventObject>;
37
37
  id: string | undefined;
38
38
  };
39
- }>, xstate0.Values<{
39
+ }>, xstate135.Values<{
40
+ setError: {
41
+ type: "setError";
42
+ params: xstate135.NonReducibleUnknown;
43
+ };
44
+ clearError: {
45
+ type: "clearError";
46
+ params: xstate135.NonReducibleUnknown;
47
+ };
40
48
  setStream: {
41
49
  type: "setStream";
42
- params: xstate0.NonReducibleUnknown;
50
+ params: xstate135.NonReducibleUnknown;
43
51
  };
44
52
  setImageAndClearError: {
45
53
  type: "setImageAndClearError";
46
- params: xstate0.NonReducibleUnknown;
54
+ params: xstate135.NonReducibleUnknown;
47
55
  };
48
56
  setProgress: {
49
57
  type: "setProgress";
50
- params: xstate0.NonReducibleUnknown;
51
- };
52
- setError: {
53
- type: "setError";
54
- params: xstate0.NonReducibleUnknown;
55
- };
56
- clearError: {
57
- type: "clearError";
58
- params: xstate0.NonReducibleUnknown;
58
+ params: xstate135.NonReducibleUnknown;
59
59
  };
60
60
  stopStream: {
61
61
  type: "stopStream";
62
- params: xstate0.NonReducibleUnknown;
62
+ params: xstate135.NonReducibleUnknown;
63
63
  };
64
- }>, never, never, "error" | "initCamera" | "idle" | "capturing" | "closed" | "uploading" | "finished", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
64
+ }>, never, never, "error" | "idle" | "closed" | "finished" | "initCamera" | "capturing" | "uploading", string, DocumentUploadInput, xstate135.NonReducibleUnknown, xstate135.EventObject, xstate135.MetaObject, {
65
65
  readonly id: "documentUpload";
66
66
  readonly initial: "idle";
67
67
  readonly context: ({
@@ -70,67 +70,67 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
70
70
  spawn: {
71
71
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
72
72
  src: "initCamera";
73
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
73
+ logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
74
74
  id: string | undefined;
75
75
  } extends infer T ? T extends {
76
76
  src: "initCamera";
77
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
77
+ logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
78
78
  id: string | undefined;
79
79
  } ? T extends {
80
80
  src: TSrc;
81
- } ? xstate0.ConditionalRequired<[options?: ({
81
+ } ? xstate135.ConditionalRequired<[options?: ({
82
82
  id?: T["id"] | undefined;
83
83
  systemId?: string;
84
- input?: xstate0.InputFrom<T["logic"]> | undefined;
84
+ input?: xstate135.InputFrom<T["logic"]> | undefined;
85
85
  syncSnapshot?: boolean;
86
- } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
86
+ } & { [K in xstate135.RequiredActorOptions<T>]: unknown }) | undefined], xstate135.IsNotNever<xstate135.RequiredActorOptions<T>>> : never : never : never) | ({
87
87
  src: "uploadDocument";
88
- logic: xstate0.PromiseActorLogic<void, {
88
+ logic: xstate135.PromiseActorLogic<void, {
89
89
  imageBase64: string;
90
90
  documentType: string;
91
91
  onProgress: (progress: number) => void;
92
- }, xstate0.EventObject>;
92
+ }, xstate135.EventObject>;
93
93
  id: string | undefined;
94
94
  } extends infer T_1 ? T_1 extends {
95
95
  src: "uploadDocument";
96
- logic: xstate0.PromiseActorLogic<void, {
96
+ logic: xstate135.PromiseActorLogic<void, {
97
97
  imageBase64: string;
98
98
  documentType: string;
99
99
  onProgress: (progress: number) => void;
100
- }, xstate0.EventObject>;
100
+ }, xstate135.EventObject>;
101
101
  id: string | undefined;
102
102
  } ? T_1 extends {
103
103
  src: TSrc;
104
- } ? xstate0.ConditionalRequired<[options?: ({
104
+ } ? xstate135.ConditionalRequired<[options?: ({
105
105
  id?: T_1["id"] | undefined;
106
106
  systemId?: string;
107
- input?: xstate0.InputFrom<T_1["logic"]> | undefined;
107
+ input?: xstate135.InputFrom<T_1["logic"]> | undefined;
108
108
  syncSnapshot?: boolean;
109
- } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
109
+ } & { [K_1 in xstate135.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate135.IsNotNever<xstate135.RequiredActorOptions<T_1>>> : never : never : never)): xstate135.ActorRefFromLogic<xstate135.GetConcreteByKey<xstate135.Values<{
110
110
  initCamera: {
111
111
  src: "initCamera";
112
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
112
+ logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
113
113
  id: string | undefined;
114
114
  };
115
115
  uploadDocument: {
116
116
  src: "uploadDocument";
117
- logic: xstate0.PromiseActorLogic<void, {
117
+ logic: xstate135.PromiseActorLogic<void, {
118
118
  imageBase64: string;
119
119
  documentType: string;
120
120
  onProgress: (progress: number) => void;
121
- }, xstate0.EventObject>;
121
+ }, xstate135.EventObject>;
122
122
  id: string | undefined;
123
123
  };
124
124
  }>, "src", TSrc>["logic"]>;
125
- <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
125
+ <TLogic extends xstate135.AnyActorLogic>(src: TLogic, ...[options]: xstate135.ConditionalRequired<[options?: ({
126
126
  id?: never;
127
127
  systemId?: string;
128
- input?: xstate0.InputFrom<TLogic> | undefined;
128
+ input?: xstate135.InputFrom<TLogic> | undefined;
129
129
  syncSnapshot?: boolean;
130
- } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
130
+ } & { [K in xstate135.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate135.IsNotNever<xstate135.RequiredLogicInput<TLogic>>>): xstate135.ActorRefFromLogic<TLogic>;
131
131
  };
132
132
  input: DocumentUploadInput;
133
- self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
133
+ self: xstate135.ActorRef<xstate135.MachineSnapshot<DocumentUploadContext, {
134
134
  type: "START";
135
135
  } | {
136
136
  type: "CAPTURE";
@@ -142,7 +142,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
142
142
  type: "RETRY";
143
143
  } | {
144
144
  type: "CLOSE";
145
- }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
145
+ }, Record<string, xstate135.AnyActorRef | undefined>, xstate135.StateValue, string, unknown, any, any>, {
146
146
  type: "START";
147
147
  } | {
148
148
  type: "CAPTURE";
@@ -154,7 +154,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
154
154
  type: "RETRY";
155
155
  } | {
156
156
  type: "CLOSE";
157
- }, xstate0.AnyEventObject>;
157
+ }, xstate135.AnyEventObject>;
158
158
  }) => {
159
159
  config: DocumentUploadConfig;
160
160
  stream: undefined;
@@ -224,7 +224,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
224
224
  } | {
225
225
  type: "CLOSE";
226
226
  };
227
- self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
227
+ self: xstate135.ActorRef<xstate135.MachineSnapshot<DocumentUploadContext, {
228
228
  type: "START";
229
229
  } | {
230
230
  type: "CAPTURE";
@@ -236,7 +236,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
236
236
  type: "RETRY";
237
237
  } | {
238
238
  type: "CLOSE";
239
- }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
239
+ }, Record<string, xstate135.AnyActorRef>, xstate135.StateValue, string, unknown, any, any>, {
240
240
  type: "START";
241
241
  } | {
242
242
  type: "CAPTURE";
@@ -248,7 +248,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
248
248
  type: "RETRY";
249
249
  } | {
250
250
  type: "CLOSE";
251
- }, xstate0.AnyEventObject>;
251
+ }, xstate135.AnyEventObject>;
252
252
  }) => {
253
253
  imageBase64: string;
254
254
  documentType: string;
package/dist/email.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./index-BTaLQSj9.js";
2
- import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-vDj9azjD.js";
2
+ import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-DN_q_zxy.js";
3
3
  export { type EmailConfig, type EmailManager, type EmailState, createEmailManager, emailMachine };
package/dist/email.esm.js CHANGED
@@ -2,6 +2,6 @@ import "./events-Cc1xUUgF.esm.js";
2
2
  import "./src-NguNDCeE.esm.js";
3
3
  import "./api-G4JA8CXK.esm.js";
4
4
  import "./endpoints-CCuj1KZH.esm.js";
5
- import { r as emailMachine, t as createEmailManager } from "./emailManager-bG4KnBIC.esm.js";
5
+ import { r as emailMachine, t as createEmailManager } from "./emailManager-CPOeN76P.esm.js";
6
6
 
7
7
  export { createEmailManager, emailMachine };
@@ -361,7 +361,8 @@ function mapState(snapshot) {
361
361
  if (typedSnapshot.matches("inputting")) return {
362
362
  status: "inputting",
363
363
  prefilledEmail: context.prefilledEmail,
364
- emailError: context.emailError
364
+ emailError: context.emailError,
365
+ otpVerification: context.config.otpVerification
365
366
  };
366
367
  if (typedSnapshot.matches("submitting")) return { status: "submitting" };
367
368
  if (typedSnapshot.matches("resendingOtp")) return { status: "resendingOtp" };
@@ -72,11 +72,13 @@ type EmailLoadingPrefillState = {
72
72
  * Ready for email input - use `setEmail()` and `submit()`
73
73
  * @property prefilledEmail - Pre-populated email address (if prefill enabled)
74
74
  * @property emailError - Validation error message if email was rejected
75
+ * @property otpVerification - Whether OTP email verification is enabled (from module config). When omitted, treat as `false`.
75
76
  */
76
77
  type EmailInputtingState = {
77
78
  status: 'inputting';
78
79
  prefilledEmail?: string;
79
80
  emailError?: string;
81
+ otpVerification?: boolean;
80
82
  };
81
83
  /** Email address is being submitted to the backend */
82
84
  type EmailSubmittingState = {
@@ -7,8 +7,8 @@ import "./types-oveF7RrS.js";
7
7
  import "./types-mQLzH6uw.js";
8
8
  import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-B4Nnp7ws.js";
9
9
  import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-TaI12wf3.js";
10
- import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-vDj9azjD.js";
11
- import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-BBEdl-dP.js";
10
+ import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-DN_q_zxy.js";
11
+ import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-D2A0hXXq.js";
12
12
 
13
13
  //#region ../infra/src/capabilities/IFingerprintCapability.d.ts
14
14
  type DeviceFingerprintInfo = {
@@ -11,8 +11,8 @@ import "./deepsightService-qolSLlqQ.esm.js";
11
11
  import "./stats-D0m3TvIg.esm.js";
12
12
  import { t as faceCaptureMachine } from "./faceCaptureSetup-Ca7SG6Xe.esm.js";
13
13
  import { n as createAuthenticationManagerFromActor } from "./authenticationManager-DMbrmeCK.esm.js";
14
- import { n as createEmailManagerFromActor } from "./emailManager-bG4KnBIC.esm.js";
14
+ import { n as createEmailManagerFromActor } from "./emailManager-CPOeN76P.esm.js";
15
15
  import { n as createSelfieManagerFromActor } from "./selfieManager-BIQkjPBF.esm.js";
16
- import { n as createPhoneManagerFromActor } from "./phoneManager-DES56A95.esm.js";
16
+ import { n as createPhoneManagerFromActor } from "./phoneManager-B5sf9ARV.esm.js";
17
17
 
18
18
  export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise, getDeviceFingerprintInfo, getFingerprint };
@@ -1,7 +1,7 @@
1
1
  import { f as Manager } from "./index-BTaLQSj9.js";
2
2
  import "./types-oveF7RrS.js";
3
3
  import { i as RegulationTypes } from "./types-mQLzH6uw.js";
4
- import * as xstate63 from "xstate";
4
+ import * as xstate0 from "xstate";
5
5
 
6
6
  //#region src/modules/mandatory-consent/types.d.ts
7
7
  type MandatoryConsentConfig = {
@@ -28,7 +28,7 @@ type MandatoryConsentContext = {
28
28
  type MandatoryConsentInput = {
29
29
  config: MandatoryConsentConfig;
30
30
  };
31
- declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentContext, {
31
+ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentContext, {
32
32
  type: "LOAD";
33
33
  } | {
34
34
  type: "TOGGLE";
@@ -41,53 +41,53 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
41
41
  } | {
42
42
  type: "RESET";
43
43
  }, {
44
- [x: string]: xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<FetchMandatoryConsentResponse, {
44
+ [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
45
45
  config: MandatoryConsentConfig;
46
- }, xstate63.EventObject>> | xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<void, {
46
+ }, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
47
47
  consentId: string;
48
48
  isSigned: boolean;
49
- }, xstate63.EventObject>> | undefined;
50
- }, xstate63.Values<{
49
+ }, xstate0.EventObject>> | undefined;
50
+ }, xstate0.Values<{
51
51
  fetchConsent: {
52
52
  src: "fetchConsent";
53
- logic: xstate63.PromiseActorLogic<FetchMandatoryConsentResponse, {
53
+ logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
54
54
  config: MandatoryConsentConfig;
55
- }, xstate63.EventObject>;
55
+ }, xstate0.EventObject>;
56
56
  id: string | undefined;
57
57
  };
58
58
  submitConsent: {
59
59
  src: "submitConsent";
60
- logic: xstate63.PromiseActorLogic<void, {
60
+ logic: xstate0.PromiseActorLogic<void, {
61
61
  consentId: string;
62
62
  isSigned: boolean;
63
- }, xstate63.EventObject>;
63
+ }, xstate0.EventObject>;
64
64
  id: string | undefined;
65
65
  };
66
- }>, xstate63.Values<{
67
- setError: {
68
- type: "setError";
69
- params: xstate63.NonReducibleUnknown;
70
- };
71
- clearError: {
72
- type: "clearError";
73
- params: xstate63.NonReducibleUnknown;
74
- };
66
+ }>, xstate0.Values<{
75
67
  setConsent: {
76
68
  type: "setConsent";
77
- params: xstate63.NonReducibleUnknown;
69
+ params: xstate0.NonReducibleUnknown;
78
70
  };
79
71
  toggleSigned: {
80
72
  type: "toggleSigned";
81
- params: xstate63.NonReducibleUnknown;
73
+ params: xstate0.NonReducibleUnknown;
74
+ };
75
+ setError: {
76
+ type: "setError";
77
+ params: xstate0.NonReducibleUnknown;
78
+ };
79
+ clearError: {
80
+ type: "clearError";
81
+ params: xstate0.NonReducibleUnknown;
82
82
  };
83
83
  resetContext: {
84
84
  type: "resetContext";
85
- params: xstate63.NonReducibleUnknown;
85
+ params: xstate0.NonReducibleUnknown;
86
86
  };
87
87
  }>, {
88
88
  type: "canSubmit";
89
89
  params: unknown;
90
- }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate63.NonReducibleUnknown, xstate63.EventObject, xstate63.MetaObject, {
90
+ }, never, "error" | "idle" | "loading" | "display" | "submitting" | "closed" | "finished", string, MandatoryConsentInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
91
91
  readonly id: "mandatoryConsent";
92
92
  readonly initial: "idle";
93
93
  readonly context: ({
@@ -96,70 +96,70 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
96
96
  spawn: {
97
97
  <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
98
98
  src: "fetchConsent";
99
- logic: xstate63.PromiseActorLogic<FetchMandatoryConsentResponse, {
99
+ logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
100
100
  config: MandatoryConsentConfig;
101
- }, xstate63.EventObject>;
101
+ }, xstate0.EventObject>;
102
102
  id: string | undefined;
103
103
  } extends infer T ? T extends {
104
104
  src: "fetchConsent";
105
- logic: xstate63.PromiseActorLogic<FetchMandatoryConsentResponse, {
105
+ logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
106
106
  config: MandatoryConsentConfig;
107
- }, xstate63.EventObject>;
107
+ }, xstate0.EventObject>;
108
108
  id: string | undefined;
109
109
  } ? T extends {
110
110
  src: TSrc;
111
- } ? xstate63.ConditionalRequired<[options?: ({
111
+ } ? xstate0.ConditionalRequired<[options?: ({
112
112
  id?: T["id"] | undefined;
113
113
  systemId?: string;
114
- input?: xstate63.InputFrom<T["logic"]> | undefined;
114
+ input?: xstate0.InputFrom<T["logic"]> | undefined;
115
115
  syncSnapshot?: boolean;
116
- } & { [K in xstate63.RequiredActorOptions<T>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T>>> : never : never : never) | ({
116
+ } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
117
117
  src: "submitConsent";
118
- logic: xstate63.PromiseActorLogic<void, {
118
+ logic: xstate0.PromiseActorLogic<void, {
119
119
  consentId: string;
120
120
  isSigned: boolean;
121
- }, xstate63.EventObject>;
121
+ }, xstate0.EventObject>;
122
122
  id: string | undefined;
123
123
  } extends infer T_1 ? T_1 extends {
124
124
  src: "submitConsent";
125
- logic: xstate63.PromiseActorLogic<void, {
125
+ logic: xstate0.PromiseActorLogic<void, {
126
126
  consentId: string;
127
127
  isSigned: boolean;
128
- }, xstate63.EventObject>;
128
+ }, xstate0.EventObject>;
129
129
  id: string | undefined;
130
130
  } ? T_1 extends {
131
131
  src: TSrc;
132
- } ? xstate63.ConditionalRequired<[options?: ({
132
+ } ? xstate0.ConditionalRequired<[options?: ({
133
133
  id?: T_1["id"] | undefined;
134
134
  systemId?: string;
135
- input?: xstate63.InputFrom<T_1["logic"]> | undefined;
135
+ input?: xstate0.InputFrom<T_1["logic"]> | undefined;
136
136
  syncSnapshot?: boolean;
137
- } & { [K_1 in xstate63.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T_1>>> : never : never : never)): xstate63.ActorRefFromLogic<xstate63.GetConcreteByKey<xstate63.Values<{
137
+ } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
138
138
  fetchConsent: {
139
139
  src: "fetchConsent";
140
- logic: xstate63.PromiseActorLogic<FetchMandatoryConsentResponse, {
140
+ logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
141
141
  config: MandatoryConsentConfig;
142
- }, xstate63.EventObject>;
142
+ }, xstate0.EventObject>;
143
143
  id: string | undefined;
144
144
  };
145
145
  submitConsent: {
146
146
  src: "submitConsent";
147
- logic: xstate63.PromiseActorLogic<void, {
147
+ logic: xstate0.PromiseActorLogic<void, {
148
148
  consentId: string;
149
149
  isSigned: boolean;
150
- }, xstate63.EventObject>;
150
+ }, xstate0.EventObject>;
151
151
  id: string | undefined;
152
152
  };
153
153
  }>, "src", TSrc>["logic"]>;
154
- <TLogic extends xstate63.AnyActorLogic>(src: TLogic, ...[options]: xstate63.ConditionalRequired<[options?: ({
154
+ <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
155
155
  id?: never;
156
156
  systemId?: string;
157
- input?: xstate63.InputFrom<TLogic> | undefined;
157
+ input?: xstate0.InputFrom<TLogic> | undefined;
158
158
  syncSnapshot?: boolean;
159
- } & { [K in xstate63.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredLogicInput<TLogic>>>): xstate63.ActorRefFromLogic<TLogic>;
159
+ } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
160
160
  };
161
161
  input: MandatoryConsentInput;
162
- self: xstate63.ActorRef<xstate63.MachineSnapshot<MandatoryConsentContext, {
162
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<MandatoryConsentContext, {
163
163
  type: "LOAD";
164
164
  } | {
165
165
  type: "TOGGLE";
@@ -171,7 +171,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
171
171
  type: "RETRY";
172
172
  } | {
173
173
  type: "RESET";
174
- }, Record<string, xstate63.AnyActorRef | undefined>, xstate63.StateValue, string, unknown, any, any>, {
174
+ }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
175
175
  type: "LOAD";
176
176
  } | {
177
177
  type: "TOGGLE";
@@ -183,7 +183,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
183
183
  type: "RETRY";
184
184
  } | {
185
185
  type: "RESET";
186
- }, xstate63.AnyEventObject>;
186
+ }, xstate0.AnyEventObject>;
187
187
  }) => {
188
188
  config: MandatoryConsentConfig;
189
189
  consent: undefined;
@@ -220,7 +220,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
220
220
  } | {
221
221
  type: "RESET";
222
222
  };
223
- self: xstate63.ActorRef<xstate63.MachineSnapshot<MandatoryConsentContext, {
223
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<MandatoryConsentContext, {
224
224
  type: "LOAD";
225
225
  } | {
226
226
  type: "TOGGLE";
@@ -232,7 +232,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
232
232
  type: "RETRY";
233
233
  } | {
234
234
  type: "RESET";
235
- }, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
235
+ }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
236
236
  type: "LOAD";
237
237
  } | {
238
238
  type: "TOGGLE";
@@ -244,7 +244,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
244
244
  type: "RETRY";
245
245
  } | {
246
246
  type: "RESET";
247
- }, xstate63.AnyEventObject>;
247
+ }, xstate0.AnyEventObject>;
248
248
  }) => {
249
249
  config: MandatoryConsentConfig;
250
250
  };
@@ -297,7 +297,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
297
297
  } | {
298
298
  type: "RESET";
299
299
  };
300
- self: xstate63.ActorRef<xstate63.MachineSnapshot<MandatoryConsentContext, {
300
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<MandatoryConsentContext, {
301
301
  type: "LOAD";
302
302
  } | {
303
303
  type: "TOGGLE";
@@ -309,7 +309,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
309
309
  type: "RETRY";
310
310
  } | {
311
311
  type: "RESET";
312
- }, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
312
+ }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
313
313
  type: "LOAD";
314
314
  } | {
315
315
  type: "TOGGLE";
@@ -321,7 +321,7 @@ declare const mandatoryConsentMachine: xstate63.StateMachine<MandatoryConsentCon
321
321
  type: "RETRY";
322
322
  } | {
323
323
  type: "RESET";
324
- }, xstate63.AnyEventObject>;
324
+ }, xstate0.AnyEventObject>;
325
325
  }) => {
326
326
  consentId: string;
327
327
  isSigned: boolean;
package/dist/phone.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./index-BTaLQSj9.js";
2
- import { a as phoneMachine, n as PhoneState, o as PhoneConfig, r as createPhoneManager, t as PhoneManager } from "./phoneManager-BBEdl-dP.js";
2
+ import { a as phoneMachine, n as PhoneState, o as PhoneConfig, r as createPhoneManager, t as PhoneManager } from "./phoneManager-D2A0hXXq.js";
3
3
  export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
package/dist/phone.esm.js CHANGED
@@ -2,6 +2,6 @@ import "./events-Cc1xUUgF.esm.js";
2
2
  import "./src-NguNDCeE.esm.js";
3
3
  import "./api-G4JA8CXK.esm.js";
4
4
  import "./endpoints-CCuj1KZH.esm.js";
5
- import { r as phoneMachine, t as createPhoneManager } from "./phoneManager-DES56A95.esm.js";
5
+ import { r as phoneMachine, t as createPhoneManager } from "./phoneManager-B5sf9ARV.esm.js";
6
6
 
7
7
  export { createPhoneManager, phoneMachine };
@@ -429,14 +429,18 @@ function mapState(snapshot) {
429
429
  status: "inputting",
430
430
  countryCode: context.countryCode,
431
431
  phonePrefix: context.phonePrefix,
432
- prefilledPhone: context.prefilledPhone
432
+ prefilledPhone: context.prefilledPhone,
433
+ otpVerification: context.config.otpVerification,
434
+ optinEnabled: context.config.optinEnabled ?? false
433
435
  };
434
436
  if (typedSnapshot.matches("inputting")) return {
435
437
  status: "inputting",
436
438
  countryCode: context.countryCode,
437
439
  phonePrefix: context.phonePrefix,
438
440
  prefilledPhone: context.prefilledPhone,
439
- phoneError: context.phoneError
441
+ phoneError: context.phoneError,
442
+ otpVerification: context.config.otpVerification,
443
+ optinEnabled: context.config.optinEnabled ?? false
440
444
  };
441
445
  if (typedSnapshot.matches("submitting")) return { status: "submitting" };
442
446
  if (typedSnapshot.matches("resendingOtp")) return { status: "resendingOtp" };
@@ -88,6 +88,8 @@ type PhoneLoadingPrefillState = {
88
88
  * @property phonePrefix - International dialing prefix (e.g., '+1', '+52')
89
89
  * @property prefilledPhone - Pre-populated phone number (if prefill enabled)
90
90
  * @property phoneError - Validation error message if phone was rejected
91
+ * @property otpVerification - Whether OTP SMS verification is enabled (from module config). When omitted, treat as `false`.
92
+ * @property optinEnabled - Whether marketing opt-in checkbox is shown (from module config). When omitted, treat as `false`.
91
93
  */
92
94
  type PhoneInputtingState = {
93
95
  status: 'inputting';
@@ -95,6 +97,8 @@ type PhoneInputtingState = {
95
97
  phonePrefix: string;
96
98
  prefilledPhone?: string;
97
99
  phoneError?: string;
100
+ otpVerification?: boolean;
101
+ optinEnabled?: boolean;
98
102
  };
99
103
  /** Phone number is being submitted to the backend */
100
104
  type PhoneSubmittingState = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "0.0.0-dev-20260330-e91ed6b",
3
+ "version": "0.0.0-dev-20260331-a4ec4fe",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",