@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 +47 -47
- package/dist/document-capture.d.ts +52 -52
- package/dist/document-upload.d.ts +46 -46
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +1 -1
- package/dist/{emailManager-bG4KnBIC.esm.js → emailManager-CPOeN76P.esm.js} +2 -1
- package/dist/{emailManager-vDj9azjD.d.ts → emailManager-DN_q_zxy.d.ts} +2 -0
- package/dist/extensibility.d.ts +2 -2
- package/dist/extensibility.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +53 -53
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +1 -1
- package/dist/{phoneManager-DES56A95.esm.js → phoneManager-B5sf9ARV.esm.js} +6 -2
- package/dist/{phoneManager-BBEdl-dP.d.ts → phoneManager-D2A0hXXq.d.ts} +4 -0
- package/package.json +1 -1
package/dist/consent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Manager } from "./index-BTaLQSj9.js";
|
|
2
|
-
import * as
|
|
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:
|
|
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]:
|
|
50
|
+
[x: string]: xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
51
51
|
consentId: string;
|
|
52
|
-
},
|
|
52
|
+
}, xstate67.EventObject>> | xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<void, {
|
|
53
53
|
languageConsentId: string;
|
|
54
54
|
checkboxes: ConsentCheckbox[];
|
|
55
|
-
},
|
|
56
|
-
},
|
|
55
|
+
}, xstate67.EventObject>> | undefined;
|
|
56
|
+
}, xstate67.Values<{
|
|
57
57
|
fetchConsent: {
|
|
58
58
|
src: "fetchConsent";
|
|
59
|
-
logic:
|
|
59
|
+
logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
60
60
|
consentId: string;
|
|
61
|
-
},
|
|
61
|
+
}, xstate67.EventObject>;
|
|
62
62
|
id: string | undefined;
|
|
63
63
|
};
|
|
64
64
|
submitConsent: {
|
|
65
65
|
src: "submitConsent";
|
|
66
|
-
logic:
|
|
66
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
67
67
|
languageConsentId: string;
|
|
68
68
|
checkboxes: ConsentCheckbox[];
|
|
69
|
-
},
|
|
69
|
+
}, xstate67.EventObject>;
|
|
70
70
|
id: string | undefined;
|
|
71
71
|
};
|
|
72
|
-
}>,
|
|
72
|
+
}>, xstate67.Values<{
|
|
73
73
|
setError: {
|
|
74
74
|
type: "setError";
|
|
75
|
-
params:
|
|
75
|
+
params: xstate67.NonReducibleUnknown;
|
|
76
76
|
};
|
|
77
77
|
clearError: {
|
|
78
78
|
type: "clearError";
|
|
79
|
-
params:
|
|
79
|
+
params: xstate67.NonReducibleUnknown;
|
|
80
80
|
};
|
|
81
81
|
resetContext: {
|
|
82
82
|
type: "resetContext";
|
|
83
|
-
params:
|
|
83
|
+
params: xstate67.NonReducibleUnknown;
|
|
84
84
|
};
|
|
85
85
|
setConsentData: {
|
|
86
86
|
type: "setConsentData";
|
|
87
|
-
params:
|
|
87
|
+
params: xstate67.NonReducibleUnknown;
|
|
88
88
|
};
|
|
89
89
|
toggleCheckbox: {
|
|
90
90
|
type: "toggleCheckbox";
|
|
91
|
-
params:
|
|
91
|
+
params: xstate67.NonReducibleUnknown;
|
|
92
92
|
};
|
|
93
93
|
}>, {
|
|
94
94
|
type: "canSubmit";
|
|
95
95
|
params: unknown;
|
|
96
|
-
}, never, "error" | "idle" | "
|
|
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:
|
|
105
|
+
logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
106
106
|
consentId: string;
|
|
107
|
-
},
|
|
107
|
+
}, xstate67.EventObject>;
|
|
108
108
|
id: string | undefined;
|
|
109
109
|
} extends infer T ? T extends {
|
|
110
110
|
src: "fetchConsent";
|
|
111
|
-
logic:
|
|
111
|
+
logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
112
112
|
consentId: string;
|
|
113
|
-
},
|
|
113
|
+
}, xstate67.EventObject>;
|
|
114
114
|
id: string | undefined;
|
|
115
115
|
} ? T extends {
|
|
116
116
|
src: TSrc;
|
|
117
|
-
} ?
|
|
117
|
+
} ? xstate67.ConditionalRequired<[options?: ({
|
|
118
118
|
id?: T["id"] | undefined;
|
|
119
119
|
systemId?: string;
|
|
120
|
-
input?:
|
|
120
|
+
input?: xstate67.InputFrom<T["logic"]> | undefined;
|
|
121
121
|
syncSnapshot?: boolean;
|
|
122
|
-
} & { [K in
|
|
122
|
+
} & { [K in xstate67.RequiredActorOptions<T>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
123
123
|
src: "submitConsent";
|
|
124
|
-
logic:
|
|
124
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
125
125
|
languageConsentId: string;
|
|
126
126
|
checkboxes: ConsentCheckbox[];
|
|
127
|
-
},
|
|
127
|
+
}, xstate67.EventObject>;
|
|
128
128
|
id: string | undefined;
|
|
129
129
|
} extends infer T_1 ? T_1 extends {
|
|
130
130
|
src: "submitConsent";
|
|
131
|
-
logic:
|
|
131
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
132
132
|
languageConsentId: string;
|
|
133
133
|
checkboxes: ConsentCheckbox[];
|
|
134
|
-
},
|
|
134
|
+
}, xstate67.EventObject>;
|
|
135
135
|
id: string | undefined;
|
|
136
136
|
} ? T_1 extends {
|
|
137
137
|
src: TSrc;
|
|
138
|
-
} ?
|
|
138
|
+
} ? xstate67.ConditionalRequired<[options?: ({
|
|
139
139
|
id?: T_1["id"] | undefined;
|
|
140
140
|
systemId?: string;
|
|
141
|
-
input?:
|
|
141
|
+
input?: xstate67.InputFrom<T_1["logic"]> | undefined;
|
|
142
142
|
syncSnapshot?: boolean;
|
|
143
|
-
} & { [K_1 in
|
|
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:
|
|
146
|
+
logic: xstate67.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
147
147
|
consentId: string;
|
|
148
|
-
},
|
|
148
|
+
}, xstate67.EventObject>;
|
|
149
149
|
id: string | undefined;
|
|
150
150
|
};
|
|
151
151
|
submitConsent: {
|
|
152
152
|
src: "submitConsent";
|
|
153
|
-
logic:
|
|
153
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
154
154
|
languageConsentId: string;
|
|
155
155
|
checkboxes: ConsentCheckbox[];
|
|
156
|
-
},
|
|
156
|
+
}, xstate67.EventObject>;
|
|
157
157
|
id: string | undefined;
|
|
158
158
|
};
|
|
159
159
|
}>, "src", TSrc>["logic"]>;
|
|
160
|
-
<TLogic extends
|
|
160
|
+
<TLogic extends xstate67.AnyActorLogic>(src: TLogic, ...[options]: xstate67.ConditionalRequired<[options?: ({
|
|
161
161
|
id?: never;
|
|
162
162
|
systemId?: string;
|
|
163
|
-
input?:
|
|
163
|
+
input?: xstate67.InputFrom<TLogic> | undefined;
|
|
164
164
|
syncSnapshot?: boolean;
|
|
165
|
-
} & { [K in
|
|
165
|
+
} & { [K in xstate67.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredLogicInput<TLogic>>>): xstate67.ActorRefFromLogic<TLogic>;
|
|
166
166
|
};
|
|
167
167
|
input: ConsentInput;
|
|
168
|
-
self:
|
|
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,
|
|
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
|
-
},
|
|
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:
|
|
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,
|
|
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
|
-
},
|
|
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:
|
|
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,
|
|
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
|
-
},
|
|
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
|
|
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:
|
|
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]:
|
|
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
|
-
},
|
|
102
|
-
},
|
|
101
|
+
}, xstate412.EventObject>> | undefined;
|
|
102
|
+
}, xstate412.Values<{
|
|
103
103
|
initCamera: {
|
|
104
104
|
src: "initCamera";
|
|
105
|
-
logic:
|
|
105
|
+
logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
|
|
106
106
|
id: string | undefined;
|
|
107
107
|
};
|
|
108
108
|
uploadDocument: {
|
|
109
109
|
src: "uploadDocument";
|
|
110
|
-
logic:
|
|
110
|
+
logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
|
|
111
111
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
112
112
|
processingType: string;
|
|
113
113
|
onProgress: (progress: number) => void;
|
|
114
|
-
},
|
|
114
|
+
}, xstate412.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
|
-
}>,
|
|
117
|
+
}>, xstate412.Values<{
|
|
118
|
+
clearError: {
|
|
119
|
+
type: "clearError";
|
|
120
|
+
params: xstate412.NonReducibleUnknown;
|
|
121
|
+
};
|
|
118
122
|
setStream: {
|
|
119
123
|
type: "setStream";
|
|
120
|
-
params:
|
|
124
|
+
params: xstate412.NonReducibleUnknown;
|
|
121
125
|
};
|
|
122
126
|
setProgress: {
|
|
123
127
|
type: "setProgress";
|
|
124
|
-
params:
|
|
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:
|
|
132
|
+
params: xstate412.NonReducibleUnknown;
|
|
133
133
|
};
|
|
134
134
|
setCapturedDocument: {
|
|
135
135
|
type: "setCapturedDocument";
|
|
136
|
-
params:
|
|
136
|
+
params: xstate412.NonReducibleUnknown;
|
|
137
137
|
};
|
|
138
138
|
setFileTooLargeError: {
|
|
139
139
|
type: "setFileTooLargeError";
|
|
140
|
-
params:
|
|
140
|
+
params: xstate412.NonReducibleUnknown;
|
|
141
141
|
};
|
|
142
142
|
setUploadError: {
|
|
143
143
|
type: "setUploadError";
|
|
144
|
-
params:
|
|
144
|
+
params: xstate412.NonReducibleUnknown;
|
|
145
145
|
};
|
|
146
146
|
decrementAttemptsRemaining: {
|
|
147
147
|
type: "decrementAttemptsRemaining";
|
|
148
|
-
params:
|
|
148
|
+
params: xstate412.NonReducibleUnknown;
|
|
149
149
|
};
|
|
150
150
|
setCaptureMethodFile: {
|
|
151
151
|
type: "setCaptureMethodFile";
|
|
152
|
-
params:
|
|
152
|
+
params: xstate412.NonReducibleUnknown;
|
|
153
153
|
};
|
|
154
154
|
setCaptureMethodCamera: {
|
|
155
155
|
type: "setCaptureMethodCamera";
|
|
156
|
-
params:
|
|
156
|
+
params: xstate412.NonReducibleUnknown;
|
|
157
157
|
};
|
|
158
158
|
clearCapturedDocument: {
|
|
159
159
|
type: "clearCapturedDocument";
|
|
160
|
-
params:
|
|
160
|
+
params: xstate412.NonReducibleUnknown;
|
|
161
161
|
};
|
|
162
162
|
setPendingNextPage: {
|
|
163
163
|
type: "setPendingNextPage";
|
|
164
|
-
params:
|
|
164
|
+
params: xstate412.NonReducibleUnknown;
|
|
165
165
|
};
|
|
166
166
|
clearForNextPage: {
|
|
167
167
|
type: "clearForNextPage";
|
|
168
|
-
params:
|
|
168
|
+
params: xstate412.NonReducibleUnknown;
|
|
169
169
|
};
|
|
170
170
|
resetProgress: {
|
|
171
171
|
type: "resetProgress";
|
|
172
|
-
params:
|
|
172
|
+
params: xstate412.NonReducibleUnknown;
|
|
173
173
|
};
|
|
174
|
-
}>,
|
|
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, "
|
|
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:
|
|
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:
|
|
224
|
+
logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
|
|
225
225
|
id: string | undefined;
|
|
226
226
|
} ? T extends {
|
|
227
227
|
src: TSrc;
|
|
228
|
-
} ?
|
|
228
|
+
} ? xstate412.ConditionalRequired<[options?: ({
|
|
229
229
|
id?: T["id"] | undefined;
|
|
230
230
|
systemId?: string;
|
|
231
|
-
input?:
|
|
231
|
+
input?: xstate412.InputFrom<T["logic"]> | undefined;
|
|
232
232
|
syncSnapshot?: boolean;
|
|
233
|
-
} & { [K in
|
|
233
|
+
} & { [K in xstate412.RequiredActorOptions<T>]: unknown }) | undefined], xstate412.IsNotNever<xstate412.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
234
234
|
src: "uploadDocument";
|
|
235
|
-
logic:
|
|
235
|
+
logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
|
|
236
236
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
237
237
|
processingType: string;
|
|
238
238
|
onProgress: (progress: number) => void;
|
|
239
|
-
},
|
|
239
|
+
}, xstate412.EventObject>;
|
|
240
240
|
id: string | undefined;
|
|
241
241
|
} extends infer T_1 ? T_1 extends {
|
|
242
242
|
src: "uploadDocument";
|
|
243
|
-
logic:
|
|
243
|
+
logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
|
|
244
244
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
245
245
|
processingType: string;
|
|
246
246
|
onProgress: (progress: number) => void;
|
|
247
|
-
},
|
|
247
|
+
}, xstate412.EventObject>;
|
|
248
248
|
id: string | undefined;
|
|
249
249
|
} ? T_1 extends {
|
|
250
250
|
src: TSrc;
|
|
251
|
-
} ?
|
|
251
|
+
} ? xstate412.ConditionalRequired<[options?: ({
|
|
252
252
|
id?: T_1["id"] | undefined;
|
|
253
253
|
systemId?: string;
|
|
254
|
-
input?:
|
|
254
|
+
input?: xstate412.InputFrom<T_1["logic"]> | undefined;
|
|
255
255
|
syncSnapshot?: boolean;
|
|
256
|
-
} & { [K_1 in
|
|
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:
|
|
259
|
+
logic: xstate412.PromiseActorLogic<MediaStream, void, xstate412.EventObject>;
|
|
260
260
|
id: string | undefined;
|
|
261
261
|
};
|
|
262
262
|
uploadDocument: {
|
|
263
263
|
src: "uploadDocument";
|
|
264
|
-
logic:
|
|
264
|
+
logic: xstate412.PromiseActorLogic<DocumentUploadResponse, {
|
|
265
265
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
266
266
|
processingType: string;
|
|
267
267
|
onProgress: (progress: number) => void;
|
|
268
|
-
},
|
|
268
|
+
}, xstate412.EventObject>;
|
|
269
269
|
id: string | undefined;
|
|
270
270
|
};
|
|
271
271
|
}>, "src", TSrc>["logic"]>;
|
|
272
|
-
<TLogic extends
|
|
272
|
+
<TLogic extends xstate412.AnyActorLogic>(src: TLogic, ...[options]: xstate412.ConditionalRequired<[options?: ({
|
|
273
273
|
id?: never;
|
|
274
274
|
systemId?: string;
|
|
275
|
-
input?:
|
|
275
|
+
input?: xstate412.InputFrom<TLogic> | undefined;
|
|
276
276
|
syncSnapshot?: boolean;
|
|
277
|
-
} & { [K in
|
|
277
|
+
} & { [K in xstate412.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate412.IsNotNever<xstate412.RequiredLogicInput<TLogic>>>): xstate412.ActorRefFromLogic<TLogic>;
|
|
278
278
|
};
|
|
279
279
|
input: DocumentCaptureInput;
|
|
280
|
-
self:
|
|
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,
|
|
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
|
-
},
|
|
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:
|
|
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,
|
|
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
|
-
},
|
|
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
|
|
3
|
+
import * as xstate135 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
6
|
-
declare const documentUploadMachine:
|
|
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]:
|
|
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
|
-
},
|
|
24
|
-
},
|
|
23
|
+
}, xstate135.EventObject>> | undefined;
|
|
24
|
+
}, xstate135.Values<{
|
|
25
25
|
initCamera: {
|
|
26
26
|
src: "initCamera";
|
|
27
|
-
logic:
|
|
27
|
+
logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
|
|
28
28
|
id: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
uploadDocument: {
|
|
31
31
|
src: "uploadDocument";
|
|
32
|
-
logic:
|
|
32
|
+
logic: xstate135.PromiseActorLogic<void, {
|
|
33
33
|
imageBase64: string;
|
|
34
34
|
documentType: string;
|
|
35
35
|
onProgress: (progress: number) => void;
|
|
36
|
-
},
|
|
36
|
+
}, xstate135.EventObject>;
|
|
37
37
|
id: string | undefined;
|
|
38
38
|
};
|
|
39
|
-
}>,
|
|
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:
|
|
50
|
+
params: xstate135.NonReducibleUnknown;
|
|
43
51
|
};
|
|
44
52
|
setImageAndClearError: {
|
|
45
53
|
type: "setImageAndClearError";
|
|
46
|
-
params:
|
|
54
|
+
params: xstate135.NonReducibleUnknown;
|
|
47
55
|
};
|
|
48
56
|
setProgress: {
|
|
49
57
|
type: "setProgress";
|
|
50
|
-
params:
|
|
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:
|
|
62
|
+
params: xstate135.NonReducibleUnknown;
|
|
63
63
|
};
|
|
64
|
-
}>, never, never, "error" | "
|
|
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:
|
|
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:
|
|
77
|
+
logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
|
|
78
78
|
id: string | undefined;
|
|
79
79
|
} ? T extends {
|
|
80
80
|
src: TSrc;
|
|
81
|
-
} ?
|
|
81
|
+
} ? xstate135.ConditionalRequired<[options?: ({
|
|
82
82
|
id?: T["id"] | undefined;
|
|
83
83
|
systemId?: string;
|
|
84
|
-
input?:
|
|
84
|
+
input?: xstate135.InputFrom<T["logic"]> | undefined;
|
|
85
85
|
syncSnapshot?: boolean;
|
|
86
|
-
} & { [K in
|
|
86
|
+
} & { [K in xstate135.RequiredActorOptions<T>]: unknown }) | undefined], xstate135.IsNotNever<xstate135.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
87
87
|
src: "uploadDocument";
|
|
88
|
-
logic:
|
|
88
|
+
logic: xstate135.PromiseActorLogic<void, {
|
|
89
89
|
imageBase64: string;
|
|
90
90
|
documentType: string;
|
|
91
91
|
onProgress: (progress: number) => void;
|
|
92
|
-
},
|
|
92
|
+
}, xstate135.EventObject>;
|
|
93
93
|
id: string | undefined;
|
|
94
94
|
} extends infer T_1 ? T_1 extends {
|
|
95
95
|
src: "uploadDocument";
|
|
96
|
-
logic:
|
|
96
|
+
logic: xstate135.PromiseActorLogic<void, {
|
|
97
97
|
imageBase64: string;
|
|
98
98
|
documentType: string;
|
|
99
99
|
onProgress: (progress: number) => void;
|
|
100
|
-
},
|
|
100
|
+
}, xstate135.EventObject>;
|
|
101
101
|
id: string | undefined;
|
|
102
102
|
} ? T_1 extends {
|
|
103
103
|
src: TSrc;
|
|
104
|
-
} ?
|
|
104
|
+
} ? xstate135.ConditionalRequired<[options?: ({
|
|
105
105
|
id?: T_1["id"] | undefined;
|
|
106
106
|
systemId?: string;
|
|
107
|
-
input?:
|
|
107
|
+
input?: xstate135.InputFrom<T_1["logic"]> | undefined;
|
|
108
108
|
syncSnapshot?: boolean;
|
|
109
|
-
} & { [K_1 in
|
|
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:
|
|
112
|
+
logic: xstate135.PromiseActorLogic<MediaStream, void, xstate135.EventObject>;
|
|
113
113
|
id: string | undefined;
|
|
114
114
|
};
|
|
115
115
|
uploadDocument: {
|
|
116
116
|
src: "uploadDocument";
|
|
117
|
-
logic:
|
|
117
|
+
logic: xstate135.PromiseActorLogic<void, {
|
|
118
118
|
imageBase64: string;
|
|
119
119
|
documentType: string;
|
|
120
120
|
onProgress: (progress: number) => void;
|
|
121
|
-
},
|
|
121
|
+
}, xstate135.EventObject>;
|
|
122
122
|
id: string | undefined;
|
|
123
123
|
};
|
|
124
124
|
}>, "src", TSrc>["logic"]>;
|
|
125
|
-
<TLogic extends
|
|
125
|
+
<TLogic extends xstate135.AnyActorLogic>(src: TLogic, ...[options]: xstate135.ConditionalRequired<[options?: ({
|
|
126
126
|
id?: never;
|
|
127
127
|
systemId?: string;
|
|
128
|
-
input?:
|
|
128
|
+
input?: xstate135.InputFrom<TLogic> | undefined;
|
|
129
129
|
syncSnapshot?: boolean;
|
|
130
|
-
} & { [K in
|
|
130
|
+
} & { [K in xstate135.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate135.IsNotNever<xstate135.RequiredLogicInput<TLogic>>>): xstate135.ActorRefFromLogic<TLogic>;
|
|
131
131
|
};
|
|
132
132
|
input: DocumentUploadInput;
|
|
133
|
-
self:
|
|
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,
|
|
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
|
-
},
|
|
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:
|
|
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,
|
|
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
|
-
},
|
|
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-
|
|
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-
|
|
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 = {
|
package/dist/extensibility.d.ts
CHANGED
|
@@ -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-
|
|
11
|
-
import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-
|
|
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-
|
|
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-
|
|
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
|
|
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:
|
|
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]:
|
|
44
|
+
[x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
45
45
|
config: MandatoryConsentConfig;
|
|
46
|
-
},
|
|
46
|
+
}, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
|
|
47
47
|
consentId: string;
|
|
48
48
|
isSigned: boolean;
|
|
49
|
-
},
|
|
50
|
-
},
|
|
49
|
+
}, xstate0.EventObject>> | undefined;
|
|
50
|
+
}, xstate0.Values<{
|
|
51
51
|
fetchConsent: {
|
|
52
52
|
src: "fetchConsent";
|
|
53
|
-
logic:
|
|
53
|
+
logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
54
54
|
config: MandatoryConsentConfig;
|
|
55
|
-
},
|
|
55
|
+
}, xstate0.EventObject>;
|
|
56
56
|
id: string | undefined;
|
|
57
57
|
};
|
|
58
58
|
submitConsent: {
|
|
59
59
|
src: "submitConsent";
|
|
60
|
-
logic:
|
|
60
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
61
61
|
consentId: string;
|
|
62
62
|
isSigned: boolean;
|
|
63
|
-
},
|
|
63
|
+
}, xstate0.EventObject>;
|
|
64
64
|
id: string | undefined;
|
|
65
65
|
};
|
|
66
|
-
}>,
|
|
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:
|
|
69
|
+
params: xstate0.NonReducibleUnknown;
|
|
78
70
|
};
|
|
79
71
|
toggleSigned: {
|
|
80
72
|
type: "toggleSigned";
|
|
81
|
-
params:
|
|
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:
|
|
85
|
+
params: xstate0.NonReducibleUnknown;
|
|
86
86
|
};
|
|
87
87
|
}>, {
|
|
88
88
|
type: "canSubmit";
|
|
89
89
|
params: unknown;
|
|
90
|
-
}, never, "error" | "idle" | "
|
|
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:
|
|
99
|
+
logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
100
100
|
config: MandatoryConsentConfig;
|
|
101
|
-
},
|
|
101
|
+
}, xstate0.EventObject>;
|
|
102
102
|
id: string | undefined;
|
|
103
103
|
} extends infer T ? T extends {
|
|
104
104
|
src: "fetchConsent";
|
|
105
|
-
logic:
|
|
105
|
+
logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
106
106
|
config: MandatoryConsentConfig;
|
|
107
|
-
},
|
|
107
|
+
}, xstate0.EventObject>;
|
|
108
108
|
id: string | undefined;
|
|
109
109
|
} ? T extends {
|
|
110
110
|
src: TSrc;
|
|
111
|
-
} ?
|
|
111
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
112
112
|
id?: T["id"] | undefined;
|
|
113
113
|
systemId?: string;
|
|
114
|
-
input?:
|
|
114
|
+
input?: xstate0.InputFrom<T["logic"]> | undefined;
|
|
115
115
|
syncSnapshot?: boolean;
|
|
116
|
-
} & { [K in
|
|
116
|
+
} & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
117
117
|
src: "submitConsent";
|
|
118
|
-
logic:
|
|
118
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
119
119
|
consentId: string;
|
|
120
120
|
isSigned: boolean;
|
|
121
|
-
},
|
|
121
|
+
}, xstate0.EventObject>;
|
|
122
122
|
id: string | undefined;
|
|
123
123
|
} extends infer T_1 ? T_1 extends {
|
|
124
124
|
src: "submitConsent";
|
|
125
|
-
logic:
|
|
125
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
126
126
|
consentId: string;
|
|
127
127
|
isSigned: boolean;
|
|
128
|
-
},
|
|
128
|
+
}, xstate0.EventObject>;
|
|
129
129
|
id: string | undefined;
|
|
130
130
|
} ? T_1 extends {
|
|
131
131
|
src: TSrc;
|
|
132
|
-
} ?
|
|
132
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
133
133
|
id?: T_1["id"] | undefined;
|
|
134
134
|
systemId?: string;
|
|
135
|
-
input?:
|
|
135
|
+
input?: xstate0.InputFrom<T_1["logic"]> | undefined;
|
|
136
136
|
syncSnapshot?: boolean;
|
|
137
|
-
} & { [K_1 in
|
|
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:
|
|
140
|
+
logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
141
141
|
config: MandatoryConsentConfig;
|
|
142
|
-
},
|
|
142
|
+
}, xstate0.EventObject>;
|
|
143
143
|
id: string | undefined;
|
|
144
144
|
};
|
|
145
145
|
submitConsent: {
|
|
146
146
|
src: "submitConsent";
|
|
147
|
-
logic:
|
|
147
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
148
148
|
consentId: string;
|
|
149
149
|
isSigned: boolean;
|
|
150
|
-
},
|
|
150
|
+
}, xstate0.EventObject>;
|
|
151
151
|
id: string | undefined;
|
|
152
152
|
};
|
|
153
153
|
}>, "src", TSrc>["logic"]>;
|
|
154
|
-
<TLogic extends
|
|
154
|
+
<TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
|
|
155
155
|
id?: never;
|
|
156
156
|
systemId?: string;
|
|
157
|
-
input?:
|
|
157
|
+
input?: xstate0.InputFrom<TLogic> | undefined;
|
|
158
158
|
syncSnapshot?: boolean;
|
|
159
|
-
} & { [K in
|
|
159
|
+
} & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
|
|
160
160
|
};
|
|
161
161
|
input: MandatoryConsentInput;
|
|
162
|
-
self:
|
|
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,
|
|
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
|
-
},
|
|
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:
|
|
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,
|
|
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
|
-
},
|
|
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:
|
|
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,
|
|
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
|
-
},
|
|
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-
|
|
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-
|
|
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 = {
|