@incodetech/core 0.0.0-dev-20260326-ac8336a → 0.0.0-dev-20260326-408c0fa
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 +54 -54
- package/dist/document-capture.d.ts +58 -58
- package/dist/document-upload.d.ts +49 -49
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +1 -1
- package/dist/{emailManager-Bl3NqSZ-.esm.js → emailManager-C8EeT_ZS.esm.js} +27 -17
- package/dist/{emailManager-DsAtfVR-.d.ts → emailManager-vDj9azjD.d.ts} +12 -4
- package/dist/extensibility.d.ts +2 -2
- package/dist/extensibility.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +5 -5
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +1 -1
- package/dist/{phoneManager-CenWu6bP.d.ts → phoneManager-BBEdl-dP.d.ts} +13 -5
- package/dist/{phoneManager-2NN9q777.esm.js → phoneManager-Chu-DkAG.esm.js} +37 -18
- 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 xstate212 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: xstate212.StateMachine<ConsentContext, {
|
|
39
39
|
type: "LOAD";
|
|
40
40
|
} | {
|
|
41
41
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -47,53 +47,53 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
47
47
|
} | {
|
|
48
48
|
type: "RESET";
|
|
49
49
|
}, {
|
|
50
|
-
[x: string]:
|
|
50
|
+
[x: string]: xstate212.ActorRefFromLogic<xstate212.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
51
51
|
consentId: string;
|
|
52
|
-
},
|
|
52
|
+
}, xstate212.EventObject>> | xstate212.ActorRefFromLogic<xstate212.PromiseActorLogic<void, {
|
|
53
53
|
languageConsentId: string;
|
|
54
54
|
checkboxes: ConsentCheckbox[];
|
|
55
|
-
},
|
|
56
|
-
},
|
|
55
|
+
}, xstate212.EventObject>> | undefined;
|
|
56
|
+
}, xstate212.Values<{
|
|
57
57
|
fetchConsent: {
|
|
58
58
|
src: "fetchConsent";
|
|
59
|
-
logic:
|
|
59
|
+
logic: xstate212.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
60
60
|
consentId: string;
|
|
61
|
-
},
|
|
61
|
+
}, xstate212.EventObject>;
|
|
62
62
|
id: string | undefined;
|
|
63
63
|
};
|
|
64
64
|
submitConsent: {
|
|
65
65
|
src: "submitConsent";
|
|
66
|
-
logic:
|
|
66
|
+
logic: xstate212.PromiseActorLogic<void, {
|
|
67
67
|
languageConsentId: string;
|
|
68
68
|
checkboxes: ConsentCheckbox[];
|
|
69
|
-
},
|
|
69
|
+
}, xstate212.EventObject>;
|
|
70
70
|
id: string | undefined;
|
|
71
71
|
};
|
|
72
|
-
}>,
|
|
73
|
-
|
|
74
|
-
type: "
|
|
75
|
-
params:
|
|
72
|
+
}>, xstate212.Values<{
|
|
73
|
+
resetContext: {
|
|
74
|
+
type: "resetContext";
|
|
75
|
+
params: xstate212.NonReducibleUnknown;
|
|
76
|
+
};
|
|
77
|
+
setError: {
|
|
78
|
+
type: "setError";
|
|
79
|
+
params: xstate212.NonReducibleUnknown;
|
|
76
80
|
};
|
|
77
81
|
setConsentData: {
|
|
78
82
|
type: "setConsentData";
|
|
79
|
-
params:
|
|
83
|
+
params: xstate212.NonReducibleUnknown;
|
|
80
84
|
};
|
|
81
85
|
toggleCheckbox: {
|
|
82
86
|
type: "toggleCheckbox";
|
|
83
|
-
params:
|
|
87
|
+
params: xstate212.NonReducibleUnknown;
|
|
84
88
|
};
|
|
85
|
-
|
|
86
|
-
type: "
|
|
87
|
-
params:
|
|
88
|
-
};
|
|
89
|
-
resetContext: {
|
|
90
|
-
type: "resetContext";
|
|
91
|
-
params: xstate72.NonReducibleUnknown;
|
|
89
|
+
clearError: {
|
|
90
|
+
type: "clearError";
|
|
91
|
+
params: xstate212.NonReducibleUnknown;
|
|
92
92
|
};
|
|
93
93
|
}>, {
|
|
94
94
|
type: "canSubmit";
|
|
95
95
|
params: unknown;
|
|
96
|
-
}, never, "error" | "
|
|
96
|
+
}, never, "error" | "idle" | "loading" | "finished" | "display" | "submitting", string, ConsentInput, xstate212.NonReducibleUnknown, xstate212.EventObject, xstate212.MetaObject, {
|
|
97
97
|
readonly id: "consent";
|
|
98
98
|
readonly initial: "idle";
|
|
99
99
|
readonly context: ({
|
|
@@ -102,70 +102,70 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
102
102
|
spawn: {
|
|
103
103
|
<TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
|
|
104
104
|
src: "fetchConsent";
|
|
105
|
-
logic:
|
|
105
|
+
logic: xstate212.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
106
106
|
consentId: string;
|
|
107
|
-
},
|
|
107
|
+
}, xstate212.EventObject>;
|
|
108
108
|
id: string | undefined;
|
|
109
109
|
} extends infer T ? T extends {
|
|
110
110
|
src: "fetchConsent";
|
|
111
|
-
logic:
|
|
111
|
+
logic: xstate212.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
112
112
|
consentId: string;
|
|
113
|
-
},
|
|
113
|
+
}, xstate212.EventObject>;
|
|
114
114
|
id: string | undefined;
|
|
115
115
|
} ? T extends {
|
|
116
116
|
src: TSrc;
|
|
117
|
-
} ?
|
|
117
|
+
} ? xstate212.ConditionalRequired<[options?: ({
|
|
118
118
|
id?: T["id"] | undefined;
|
|
119
119
|
systemId?: string;
|
|
120
|
-
input?:
|
|
120
|
+
input?: xstate212.InputFrom<T["logic"]> | undefined;
|
|
121
121
|
syncSnapshot?: boolean;
|
|
122
|
-
} & { [K in
|
|
122
|
+
} & { [K in xstate212.RequiredActorOptions<T>]: unknown }) | undefined], xstate212.IsNotNever<xstate212.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
123
123
|
src: "submitConsent";
|
|
124
|
-
logic:
|
|
124
|
+
logic: xstate212.PromiseActorLogic<void, {
|
|
125
125
|
languageConsentId: string;
|
|
126
126
|
checkboxes: ConsentCheckbox[];
|
|
127
|
-
},
|
|
127
|
+
}, xstate212.EventObject>;
|
|
128
128
|
id: string | undefined;
|
|
129
129
|
} extends infer T_1 ? T_1 extends {
|
|
130
130
|
src: "submitConsent";
|
|
131
|
-
logic:
|
|
131
|
+
logic: xstate212.PromiseActorLogic<void, {
|
|
132
132
|
languageConsentId: string;
|
|
133
133
|
checkboxes: ConsentCheckbox[];
|
|
134
|
-
},
|
|
134
|
+
}, xstate212.EventObject>;
|
|
135
135
|
id: string | undefined;
|
|
136
136
|
} ? T_1 extends {
|
|
137
137
|
src: TSrc;
|
|
138
|
-
} ?
|
|
138
|
+
} ? xstate212.ConditionalRequired<[options?: ({
|
|
139
139
|
id?: T_1["id"] | undefined;
|
|
140
140
|
systemId?: string;
|
|
141
|
-
input?:
|
|
141
|
+
input?: xstate212.InputFrom<T_1["logic"]> | undefined;
|
|
142
142
|
syncSnapshot?: boolean;
|
|
143
|
-
} & { [K_1 in
|
|
143
|
+
} & { [K_1 in xstate212.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate212.IsNotNever<xstate212.RequiredActorOptions<T_1>>> : never : never : never)): xstate212.ActorRefFromLogic<xstate212.GetConcreteByKey<xstate212.Values<{
|
|
144
144
|
fetchConsent: {
|
|
145
145
|
src: "fetchConsent";
|
|
146
|
-
logic:
|
|
146
|
+
logic: xstate212.PromiseActorLogic<FetchCombinedConsentResponse, {
|
|
147
147
|
consentId: string;
|
|
148
|
-
},
|
|
148
|
+
}, xstate212.EventObject>;
|
|
149
149
|
id: string | undefined;
|
|
150
150
|
};
|
|
151
151
|
submitConsent: {
|
|
152
152
|
src: "submitConsent";
|
|
153
|
-
logic:
|
|
153
|
+
logic: xstate212.PromiseActorLogic<void, {
|
|
154
154
|
languageConsentId: string;
|
|
155
155
|
checkboxes: ConsentCheckbox[];
|
|
156
|
-
},
|
|
156
|
+
}, xstate212.EventObject>;
|
|
157
157
|
id: string | undefined;
|
|
158
158
|
};
|
|
159
159
|
}>, "src", TSrc>["logic"]>;
|
|
160
|
-
<TLogic extends
|
|
160
|
+
<TLogic extends xstate212.AnyActorLogic>(src: TLogic, ...[options]: xstate212.ConditionalRequired<[options?: ({
|
|
161
161
|
id?: never;
|
|
162
162
|
systemId?: string;
|
|
163
|
-
input?:
|
|
163
|
+
input?: xstate212.InputFrom<TLogic> | undefined;
|
|
164
164
|
syncSnapshot?: boolean;
|
|
165
|
-
} & { [K in
|
|
165
|
+
} & { [K in xstate212.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate212.IsNotNever<xstate212.RequiredLogicInput<TLogic>>>): xstate212.ActorRefFromLogic<TLogic>;
|
|
166
166
|
};
|
|
167
167
|
input: ConsentInput;
|
|
168
|
-
self:
|
|
168
|
+
self: xstate212.ActorRef<xstate212.MachineSnapshot<ConsentContext, {
|
|
169
169
|
type: "LOAD";
|
|
170
170
|
} | {
|
|
171
171
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -176,7 +176,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
176
176
|
type: "RETRY";
|
|
177
177
|
} | {
|
|
178
178
|
type: "RESET";
|
|
179
|
-
}, Record<string,
|
|
179
|
+
}, Record<string, xstate212.AnyActorRef | undefined>, xstate212.StateValue, string, unknown, any, any>, {
|
|
180
180
|
type: "LOAD";
|
|
181
181
|
} | {
|
|
182
182
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -187,7 +187,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
187
187
|
type: "RETRY";
|
|
188
188
|
} | {
|
|
189
189
|
type: "RESET";
|
|
190
|
-
},
|
|
190
|
+
}, xstate212.AnyEventObject>;
|
|
191
191
|
}) => {
|
|
192
192
|
config: ConsentConfig;
|
|
193
193
|
title: string;
|
|
@@ -225,7 +225,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
225
225
|
} | {
|
|
226
226
|
type: "RESET";
|
|
227
227
|
};
|
|
228
|
-
self:
|
|
228
|
+
self: xstate212.ActorRef<xstate212.MachineSnapshot<ConsentContext, {
|
|
229
229
|
type: "LOAD";
|
|
230
230
|
} | {
|
|
231
231
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -236,7 +236,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
236
236
|
type: "RETRY";
|
|
237
237
|
} | {
|
|
238
238
|
type: "RESET";
|
|
239
|
-
}, Record<string,
|
|
239
|
+
}, Record<string, xstate212.AnyActorRef>, xstate212.StateValue, string, unknown, any, any>, {
|
|
240
240
|
type: "LOAD";
|
|
241
241
|
} | {
|
|
242
242
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -247,7 +247,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
247
247
|
type: "RETRY";
|
|
248
248
|
} | {
|
|
249
249
|
type: "RESET";
|
|
250
|
-
},
|
|
250
|
+
}, xstate212.AnyEventObject>;
|
|
251
251
|
}) => {
|
|
252
252
|
consentId: string;
|
|
253
253
|
};
|
|
@@ -296,7 +296,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
296
296
|
} | {
|
|
297
297
|
type: "RESET";
|
|
298
298
|
};
|
|
299
|
-
self:
|
|
299
|
+
self: xstate212.ActorRef<xstate212.MachineSnapshot<ConsentContext, {
|
|
300
300
|
type: "LOAD";
|
|
301
301
|
} | {
|
|
302
302
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -307,7 +307,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
307
307
|
type: "RETRY";
|
|
308
308
|
} | {
|
|
309
309
|
type: "RESET";
|
|
310
|
-
}, Record<string,
|
|
310
|
+
}, Record<string, xstate212.AnyActorRef>, xstate212.StateValue, string, unknown, any, any>, {
|
|
311
311
|
type: "LOAD";
|
|
312
312
|
} | {
|
|
313
313
|
type: "TOGGLE_CHECKBOX";
|
|
@@ -318,7 +318,7 @@ declare const consentMachine: xstate72.StateMachine<ConsentContext, {
|
|
|
318
318
|
type: "RETRY";
|
|
319
319
|
} | {
|
|
320
320
|
type: "RESET";
|
|
321
|
-
},
|
|
321
|
+
}, xstate212.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 xstate344 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: xstate344.StateMachine<DocumentCaptureContext, {
|
|
75
75
|
type: "CAPTURE";
|
|
76
76
|
} | {
|
|
77
77
|
type: "FILE_SELECTED";
|
|
@@ -94,84 +94,84 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
94
94
|
} | {
|
|
95
95
|
type: "CLOSE";
|
|
96
96
|
}, {
|
|
97
|
-
[x: string]:
|
|
97
|
+
[x: string]: xstate344.ActorRefFromLogic<xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>> | xstate344.ActorRefFromLogic<xstate344.PromiseActorLogic<DocumentUploadResponse, {
|
|
98
98
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
99
99
|
processingType: string;
|
|
100
100
|
onProgress: (progress: number) => void;
|
|
101
|
-
},
|
|
102
|
-
},
|
|
101
|
+
}, xstate344.EventObject>> | undefined;
|
|
102
|
+
}, xstate344.Values<{
|
|
103
103
|
initCamera: {
|
|
104
104
|
src: "initCamera";
|
|
105
|
-
logic:
|
|
105
|
+
logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
|
|
106
106
|
id: string | undefined;
|
|
107
107
|
};
|
|
108
108
|
uploadDocument: {
|
|
109
109
|
src: "uploadDocument";
|
|
110
|
-
logic:
|
|
110
|
+
logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
|
|
111
111
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
112
112
|
processingType: string;
|
|
113
113
|
onProgress: (progress: number) => void;
|
|
114
|
-
},
|
|
114
|
+
}, xstate344.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
|
-
}>,
|
|
117
|
+
}>, xstate344.Values<{
|
|
118
|
+
clearError: {
|
|
119
|
+
type: "clearError";
|
|
120
|
+
params: xstate344.NonReducibleUnknown;
|
|
121
|
+
};
|
|
118
122
|
setStream: {
|
|
119
123
|
type: "setStream";
|
|
120
|
-
params:
|
|
124
|
+
params: xstate344.NonReducibleUnknown;
|
|
125
|
+
};
|
|
126
|
+
setProgress: {
|
|
127
|
+
type: "setProgress";
|
|
128
|
+
params: xstate344.NonReducibleUnknown;
|
|
129
|
+
};
|
|
130
|
+
stopStream: {
|
|
131
|
+
type: "stopStream";
|
|
132
|
+
params: xstate344.NonReducibleUnknown;
|
|
121
133
|
};
|
|
122
134
|
setCapturedDocument: {
|
|
123
135
|
type: "setCapturedDocument";
|
|
124
|
-
params:
|
|
136
|
+
params: xstate344.NonReducibleUnknown;
|
|
125
137
|
};
|
|
126
138
|
setFileTooLargeError: {
|
|
127
139
|
type: "setFileTooLargeError";
|
|
128
|
-
params:
|
|
129
|
-
};
|
|
130
|
-
setProgress: {
|
|
131
|
-
type: "setProgress";
|
|
132
|
-
params: xstate0.NonReducibleUnknown;
|
|
140
|
+
params: xstate344.NonReducibleUnknown;
|
|
133
141
|
};
|
|
134
142
|
setUploadError: {
|
|
135
143
|
type: "setUploadError";
|
|
136
|
-
params:
|
|
144
|
+
params: xstate344.NonReducibleUnknown;
|
|
137
145
|
};
|
|
138
146
|
decrementAttemptsRemaining: {
|
|
139
147
|
type: "decrementAttemptsRemaining";
|
|
140
|
-
params:
|
|
148
|
+
params: xstate344.NonReducibleUnknown;
|
|
141
149
|
};
|
|
142
150
|
setCaptureMethodFile: {
|
|
143
151
|
type: "setCaptureMethodFile";
|
|
144
|
-
params:
|
|
152
|
+
params: xstate344.NonReducibleUnknown;
|
|
145
153
|
};
|
|
146
154
|
setCaptureMethodCamera: {
|
|
147
155
|
type: "setCaptureMethodCamera";
|
|
148
|
-
params:
|
|
156
|
+
params: xstate344.NonReducibleUnknown;
|
|
149
157
|
};
|
|
150
158
|
clearCapturedDocument: {
|
|
151
159
|
type: "clearCapturedDocument";
|
|
152
|
-
params:
|
|
160
|
+
params: xstate344.NonReducibleUnknown;
|
|
153
161
|
};
|
|
154
162
|
setPendingNextPage: {
|
|
155
163
|
type: "setPendingNextPage";
|
|
156
|
-
params:
|
|
164
|
+
params: xstate344.NonReducibleUnknown;
|
|
157
165
|
};
|
|
158
166
|
clearForNextPage: {
|
|
159
167
|
type: "clearForNextPage";
|
|
160
|
-
params:
|
|
161
|
-
};
|
|
162
|
-
clearError: {
|
|
163
|
-
type: "clearError";
|
|
164
|
-
params: xstate0.NonReducibleUnknown;
|
|
168
|
+
params: xstate344.NonReducibleUnknown;
|
|
165
169
|
};
|
|
166
170
|
resetProgress: {
|
|
167
171
|
type: "resetProgress";
|
|
168
|
-
params:
|
|
169
|
-
};
|
|
170
|
-
stopStream: {
|
|
171
|
-
type: "stopStream";
|
|
172
|
-
params: xstate0.NonReducibleUnknown;
|
|
172
|
+
params: xstate344.NonReducibleUnknown;
|
|
173
173
|
};
|
|
174
|
-
}>,
|
|
174
|
+
}>, xstate344.Values<{
|
|
175
175
|
allowSkip: {
|
|
176
176
|
type: "allowSkip";
|
|
177
177
|
params: unknown;
|
|
@@ -208,7 +208,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
208
208
|
type: "isPendingNextPage";
|
|
209
209
|
params: unknown;
|
|
210
210
|
};
|
|
211
|
-
}>, never, "
|
|
211
|
+
}>, never, "finished" | "initCamera" | "capturing" | "closed" | "uploading" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate344.NonReducibleUnknown, xstate344.EventObject, xstate344.MetaObject, {
|
|
212
212
|
readonly id: "documentCapture";
|
|
213
213
|
readonly initial: "tutorial";
|
|
214
214
|
readonly context: ({
|
|
@@ -217,67 +217,67 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
217
217
|
spawn: {
|
|
218
218
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
219
219
|
src: "initCamera";
|
|
220
|
-
logic:
|
|
220
|
+
logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
|
|
221
221
|
id: string | undefined;
|
|
222
222
|
} extends infer T ? T extends {
|
|
223
223
|
src: "initCamera";
|
|
224
|
-
logic:
|
|
224
|
+
logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
|
|
225
225
|
id: string | undefined;
|
|
226
226
|
} ? T extends {
|
|
227
227
|
src: TSrc;
|
|
228
|
-
} ?
|
|
228
|
+
} ? xstate344.ConditionalRequired<[options?: ({
|
|
229
229
|
id?: T["id"] | undefined;
|
|
230
230
|
systemId?: string;
|
|
231
|
-
input?:
|
|
231
|
+
input?: xstate344.InputFrom<T["logic"]> | undefined;
|
|
232
232
|
syncSnapshot?: boolean;
|
|
233
|
-
} & { [K in
|
|
233
|
+
} & { [K in xstate344.RequiredActorOptions<T>]: unknown }) | undefined], xstate344.IsNotNever<xstate344.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
234
234
|
src: "uploadDocument";
|
|
235
|
-
logic:
|
|
235
|
+
logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
|
|
236
236
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
237
237
|
processingType: string;
|
|
238
238
|
onProgress: (progress: number) => void;
|
|
239
|
-
},
|
|
239
|
+
}, xstate344.EventObject>;
|
|
240
240
|
id: string | undefined;
|
|
241
241
|
} extends infer T_1 ? T_1 extends {
|
|
242
242
|
src: "uploadDocument";
|
|
243
|
-
logic:
|
|
243
|
+
logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
|
|
244
244
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
245
245
|
processingType: string;
|
|
246
246
|
onProgress: (progress: number) => void;
|
|
247
|
-
},
|
|
247
|
+
}, xstate344.EventObject>;
|
|
248
248
|
id: string | undefined;
|
|
249
249
|
} ? T_1 extends {
|
|
250
250
|
src: TSrc;
|
|
251
|
-
} ?
|
|
251
|
+
} ? xstate344.ConditionalRequired<[options?: ({
|
|
252
252
|
id?: T_1["id"] | undefined;
|
|
253
253
|
systemId?: string;
|
|
254
|
-
input?:
|
|
254
|
+
input?: xstate344.InputFrom<T_1["logic"]> | undefined;
|
|
255
255
|
syncSnapshot?: boolean;
|
|
256
|
-
} & { [K_1 in
|
|
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<{
|
|
257
257
|
initCamera: {
|
|
258
258
|
src: "initCamera";
|
|
259
|
-
logic:
|
|
259
|
+
logic: xstate344.PromiseActorLogic<MediaStream, void, xstate344.EventObject>;
|
|
260
260
|
id: string | undefined;
|
|
261
261
|
};
|
|
262
262
|
uploadDocument: {
|
|
263
263
|
src: "uploadDocument";
|
|
264
|
-
logic:
|
|
264
|
+
logic: xstate344.PromiseActorLogic<DocumentUploadResponse, {
|
|
265
265
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
266
266
|
processingType: string;
|
|
267
267
|
onProgress: (progress: number) => void;
|
|
268
|
-
},
|
|
268
|
+
}, xstate344.EventObject>;
|
|
269
269
|
id: string | undefined;
|
|
270
270
|
};
|
|
271
271
|
}>, "src", TSrc>["logic"]>;
|
|
272
|
-
<TLogic extends
|
|
272
|
+
<TLogic extends xstate344.AnyActorLogic>(src: TLogic, ...[options]: xstate344.ConditionalRequired<[options?: ({
|
|
273
273
|
id?: never;
|
|
274
274
|
systemId?: string;
|
|
275
|
-
input?:
|
|
275
|
+
input?: xstate344.InputFrom<TLogic> | undefined;
|
|
276
276
|
syncSnapshot?: boolean;
|
|
277
|
-
} & { [K in
|
|
277
|
+
} & { [K in xstate344.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate344.IsNotNever<xstate344.RequiredLogicInput<TLogic>>>): xstate344.ActorRefFromLogic<TLogic>;
|
|
278
278
|
};
|
|
279
279
|
input: DocumentCaptureInput;
|
|
280
|
-
self:
|
|
280
|
+
self: xstate344.ActorRef<xstate344.MachineSnapshot<DocumentCaptureContext, {
|
|
281
281
|
type: "CAPTURE";
|
|
282
282
|
} | {
|
|
283
283
|
type: "FILE_SELECTED";
|
|
@@ -299,7 +299,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
299
299
|
type: "SKIP";
|
|
300
300
|
} | {
|
|
301
301
|
type: "CLOSE";
|
|
302
|
-
}, Record<string,
|
|
302
|
+
}, Record<string, xstate344.AnyActorRef | undefined>, xstate344.StateValue, string, unknown, any, any>, {
|
|
303
303
|
type: "CAPTURE";
|
|
304
304
|
} | {
|
|
305
305
|
type: "FILE_SELECTED";
|
|
@@ -321,7 +321,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
321
321
|
type: "SKIP";
|
|
322
322
|
} | {
|
|
323
323
|
type: "CLOSE";
|
|
324
|
-
},
|
|
324
|
+
}, xstate344.AnyEventObject>;
|
|
325
325
|
}) => {
|
|
326
326
|
config: {
|
|
327
327
|
processingType: DocumentType;
|
|
@@ -458,7 +458,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
458
458
|
} | {
|
|
459
459
|
type: "CLOSE";
|
|
460
460
|
};
|
|
461
|
-
self:
|
|
461
|
+
self: xstate344.ActorRef<xstate344.MachineSnapshot<DocumentCaptureContext, {
|
|
462
462
|
type: "CAPTURE";
|
|
463
463
|
} | {
|
|
464
464
|
type: "FILE_SELECTED";
|
|
@@ -480,7 +480,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
480
480
|
type: "SKIP";
|
|
481
481
|
} | {
|
|
482
482
|
type: "CLOSE";
|
|
483
|
-
}, Record<string,
|
|
483
|
+
}, Record<string, xstate344.AnyActorRef>, xstate344.StateValue, string, unknown, any, any>, {
|
|
484
484
|
type: "CAPTURE";
|
|
485
485
|
} | {
|
|
486
486
|
type: "FILE_SELECTED";
|
|
@@ -502,7 +502,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
502
502
|
type: "SKIP";
|
|
503
503
|
} | {
|
|
504
504
|
type: "CLOSE";
|
|
505
|
-
},
|
|
505
|
+
}, xstate344.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 xstate280 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
6
|
-
declare const documentUploadMachine:
|
|
6
|
+
declare const documentUploadMachine: xstate280.StateMachine<DocumentUploadContext, {
|
|
7
7
|
type: "START";
|
|
8
8
|
} | {
|
|
9
9
|
type: "CAPTURE";
|
|
@@ -16,52 +16,52 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
16
16
|
} | {
|
|
17
17
|
type: "CLOSE";
|
|
18
18
|
}, {
|
|
19
|
-
[x: string]:
|
|
19
|
+
[x: string]: xstate280.ActorRefFromLogic<xstate280.PromiseActorLogic<MediaStream, void, xstate280.EventObject>> | xstate280.ActorRefFromLogic<xstate280.PromiseActorLogic<void, {
|
|
20
20
|
imageBase64: string;
|
|
21
21
|
documentType: string;
|
|
22
22
|
onProgress: (progress: number) => void;
|
|
23
|
-
},
|
|
24
|
-
},
|
|
23
|
+
}, xstate280.EventObject>> | undefined;
|
|
24
|
+
}, xstate280.Values<{
|
|
25
25
|
initCamera: {
|
|
26
26
|
src: "initCamera";
|
|
27
|
-
logic:
|
|
27
|
+
logic: xstate280.PromiseActorLogic<MediaStream, void, xstate280.EventObject>;
|
|
28
28
|
id: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
uploadDocument: {
|
|
31
31
|
src: "uploadDocument";
|
|
32
|
-
logic:
|
|
32
|
+
logic: xstate280.PromiseActorLogic<void, {
|
|
33
33
|
imageBase64: string;
|
|
34
34
|
documentType: string;
|
|
35
35
|
onProgress: (progress: number) => void;
|
|
36
|
-
},
|
|
36
|
+
}, xstate280.EventObject>;
|
|
37
37
|
id: string | undefined;
|
|
38
38
|
};
|
|
39
|
-
}>,
|
|
39
|
+
}>, xstate280.Values<{
|
|
40
|
+
setError: {
|
|
41
|
+
type: "setError";
|
|
42
|
+
params: xstate280.NonReducibleUnknown;
|
|
43
|
+
};
|
|
44
|
+
clearError: {
|
|
45
|
+
type: "clearError";
|
|
46
|
+
params: xstate280.NonReducibleUnknown;
|
|
47
|
+
};
|
|
40
48
|
setStream: {
|
|
41
49
|
type: "setStream";
|
|
42
|
-
params:
|
|
50
|
+
params: xstate280.NonReducibleUnknown;
|
|
51
|
+
};
|
|
52
|
+
setImageAndClearError: {
|
|
53
|
+
type: "setImageAndClearError";
|
|
54
|
+
params: xstate280.NonReducibleUnknown;
|
|
43
55
|
};
|
|
44
56
|
setProgress: {
|
|
45
57
|
type: "setProgress";
|
|
46
|
-
params:
|
|
47
|
-
};
|
|
48
|
-
clearError: {
|
|
49
|
-
type: "clearError";
|
|
50
|
-
params: xstate140.NonReducibleUnknown;
|
|
58
|
+
params: xstate280.NonReducibleUnknown;
|
|
51
59
|
};
|
|
52
60
|
stopStream: {
|
|
53
61
|
type: "stopStream";
|
|
54
|
-
params:
|
|
55
|
-
};
|
|
56
|
-
setError: {
|
|
57
|
-
type: "setError";
|
|
58
|
-
params: xstate140.NonReducibleUnknown;
|
|
59
|
-
};
|
|
60
|
-
setImageAndClearError: {
|
|
61
|
-
type: "setImageAndClearError";
|
|
62
|
-
params: xstate140.NonReducibleUnknown;
|
|
62
|
+
params: xstate280.NonReducibleUnknown;
|
|
63
63
|
};
|
|
64
|
-
}>, never, never, "error" | "
|
|
64
|
+
}>, never, never, "error" | "idle" | "finished" | "initCamera" | "capturing" | "closed" | "uploading", string, DocumentUploadInput, xstate280.NonReducibleUnknown, xstate280.EventObject, xstate280.MetaObject, {
|
|
65
65
|
readonly id: "documentUpload";
|
|
66
66
|
readonly initial: "idle";
|
|
67
67
|
readonly context: ({
|
|
@@ -70,67 +70,67 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
70
70
|
spawn: {
|
|
71
71
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
72
72
|
src: "initCamera";
|
|
73
|
-
logic:
|
|
73
|
+
logic: xstate280.PromiseActorLogic<MediaStream, void, xstate280.EventObject>;
|
|
74
74
|
id: string | undefined;
|
|
75
75
|
} extends infer T ? T extends {
|
|
76
76
|
src: "initCamera";
|
|
77
|
-
logic:
|
|
77
|
+
logic: xstate280.PromiseActorLogic<MediaStream, void, xstate280.EventObject>;
|
|
78
78
|
id: string | undefined;
|
|
79
79
|
} ? T extends {
|
|
80
80
|
src: TSrc;
|
|
81
|
-
} ?
|
|
81
|
+
} ? xstate280.ConditionalRequired<[options?: ({
|
|
82
82
|
id?: T["id"] | undefined;
|
|
83
83
|
systemId?: string;
|
|
84
|
-
input?:
|
|
84
|
+
input?: xstate280.InputFrom<T["logic"]> | undefined;
|
|
85
85
|
syncSnapshot?: boolean;
|
|
86
|
-
} & { [K in
|
|
86
|
+
} & { [K in xstate280.RequiredActorOptions<T>]: unknown }) | undefined], xstate280.IsNotNever<xstate280.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
87
87
|
src: "uploadDocument";
|
|
88
|
-
logic:
|
|
88
|
+
logic: xstate280.PromiseActorLogic<void, {
|
|
89
89
|
imageBase64: string;
|
|
90
90
|
documentType: string;
|
|
91
91
|
onProgress: (progress: number) => void;
|
|
92
|
-
},
|
|
92
|
+
}, xstate280.EventObject>;
|
|
93
93
|
id: string | undefined;
|
|
94
94
|
} extends infer T_1 ? T_1 extends {
|
|
95
95
|
src: "uploadDocument";
|
|
96
|
-
logic:
|
|
96
|
+
logic: xstate280.PromiseActorLogic<void, {
|
|
97
97
|
imageBase64: string;
|
|
98
98
|
documentType: string;
|
|
99
99
|
onProgress: (progress: number) => void;
|
|
100
|
-
},
|
|
100
|
+
}, xstate280.EventObject>;
|
|
101
101
|
id: string | undefined;
|
|
102
102
|
} ? T_1 extends {
|
|
103
103
|
src: TSrc;
|
|
104
|
-
} ?
|
|
104
|
+
} ? xstate280.ConditionalRequired<[options?: ({
|
|
105
105
|
id?: T_1["id"] | undefined;
|
|
106
106
|
systemId?: string;
|
|
107
|
-
input?:
|
|
107
|
+
input?: xstate280.InputFrom<T_1["logic"]> | undefined;
|
|
108
108
|
syncSnapshot?: boolean;
|
|
109
|
-
} & { [K_1 in
|
|
109
|
+
} & { [K_1 in xstate280.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate280.IsNotNever<xstate280.RequiredActorOptions<T_1>>> : never : never : never)): xstate280.ActorRefFromLogic<xstate280.GetConcreteByKey<xstate280.Values<{
|
|
110
110
|
initCamera: {
|
|
111
111
|
src: "initCamera";
|
|
112
|
-
logic:
|
|
112
|
+
logic: xstate280.PromiseActorLogic<MediaStream, void, xstate280.EventObject>;
|
|
113
113
|
id: string | undefined;
|
|
114
114
|
};
|
|
115
115
|
uploadDocument: {
|
|
116
116
|
src: "uploadDocument";
|
|
117
|
-
logic:
|
|
117
|
+
logic: xstate280.PromiseActorLogic<void, {
|
|
118
118
|
imageBase64: string;
|
|
119
119
|
documentType: string;
|
|
120
120
|
onProgress: (progress: number) => void;
|
|
121
|
-
},
|
|
121
|
+
}, xstate280.EventObject>;
|
|
122
122
|
id: string | undefined;
|
|
123
123
|
};
|
|
124
124
|
}>, "src", TSrc>["logic"]>;
|
|
125
|
-
<TLogic extends
|
|
125
|
+
<TLogic extends xstate280.AnyActorLogic>(src: TLogic, ...[options]: xstate280.ConditionalRequired<[options?: ({
|
|
126
126
|
id?: never;
|
|
127
127
|
systemId?: string;
|
|
128
|
-
input?:
|
|
128
|
+
input?: xstate280.InputFrom<TLogic> | undefined;
|
|
129
129
|
syncSnapshot?: boolean;
|
|
130
|
-
} & { [K in
|
|
130
|
+
} & { [K in xstate280.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate280.IsNotNever<xstate280.RequiredLogicInput<TLogic>>>): xstate280.ActorRefFromLogic<TLogic>;
|
|
131
131
|
};
|
|
132
132
|
input: DocumentUploadInput;
|
|
133
|
-
self:
|
|
133
|
+
self: xstate280.ActorRef<xstate280.MachineSnapshot<DocumentUploadContext, {
|
|
134
134
|
type: "START";
|
|
135
135
|
} | {
|
|
136
136
|
type: "CAPTURE";
|
|
@@ -142,7 +142,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
142
142
|
type: "RETRY";
|
|
143
143
|
} | {
|
|
144
144
|
type: "CLOSE";
|
|
145
|
-
}, Record<string,
|
|
145
|
+
}, Record<string, xstate280.AnyActorRef | undefined>, xstate280.StateValue, string, unknown, any, any>, {
|
|
146
146
|
type: "START";
|
|
147
147
|
} | {
|
|
148
148
|
type: "CAPTURE";
|
|
@@ -154,7 +154,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
154
154
|
type: "RETRY";
|
|
155
155
|
} | {
|
|
156
156
|
type: "CLOSE";
|
|
157
|
-
},
|
|
157
|
+
}, xstate280.AnyEventObject>;
|
|
158
158
|
}) => {
|
|
159
159
|
config: DocumentUploadConfig;
|
|
160
160
|
stream: undefined;
|
|
@@ -224,7 +224,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
224
224
|
} | {
|
|
225
225
|
type: "CLOSE";
|
|
226
226
|
};
|
|
227
|
-
self:
|
|
227
|
+
self: xstate280.ActorRef<xstate280.MachineSnapshot<DocumentUploadContext, {
|
|
228
228
|
type: "START";
|
|
229
229
|
} | {
|
|
230
230
|
type: "CAPTURE";
|
|
@@ -236,7 +236,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
236
236
|
type: "RETRY";
|
|
237
237
|
} | {
|
|
238
238
|
type: "CLOSE";
|
|
239
|
-
}, Record<string,
|
|
239
|
+
}, Record<string, xstate280.AnyActorRef>, xstate280.StateValue, string, unknown, any, any>, {
|
|
240
240
|
type: "START";
|
|
241
241
|
} | {
|
|
242
242
|
type: "CAPTURE";
|
|
@@ -248,7 +248,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
248
248
|
type: "RETRY";
|
|
249
249
|
} | {
|
|
250
250
|
type: "CLOSE";
|
|
251
|
-
},
|
|
251
|
+
}, xstate280.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-vDj9azjD.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-DCc0dMkT.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-C8EeT_ZS.esm.js";
|
|
6
6
|
|
|
7
7
|
export { createEmailManager, emailMachine };
|
|
@@ -70,7 +70,7 @@ const emailMachine = setup({
|
|
|
70
70
|
return {
|
|
71
71
|
email: e.email,
|
|
72
72
|
isValid: e.isValid,
|
|
73
|
-
emailError: e.isValid ? void 0 : "
|
|
73
|
+
emailError: e.isValid ? void 0 : "verification.errors.emailInvalid"
|
|
74
74
|
};
|
|
75
75
|
}),
|
|
76
76
|
setEmailError: assign(({ event }) => ({ emailError: String(event.error) })),
|
|
@@ -113,7 +113,11 @@ const emailMachine = setup({
|
|
|
113
113
|
attemptsRemaining: context.config.maxOtpAttempts ?? 3,
|
|
114
114
|
resendTimer: 0,
|
|
115
115
|
resendTimerActive: false
|
|
116
|
-
}))
|
|
116
|
+
})),
|
|
117
|
+
clearResendTimer: assign({
|
|
118
|
+
resendTimer: () => 0,
|
|
119
|
+
resendTimerActive: () => false
|
|
120
|
+
})
|
|
117
121
|
},
|
|
118
122
|
guards: {
|
|
119
123
|
hasPrefill: ({ context }) => context.config.prefill,
|
|
@@ -214,7 +218,7 @@ const emailMachine = setup({
|
|
|
214
218
|
target: "otpError",
|
|
215
219
|
guard: "hasAttemptsRemaining",
|
|
216
220
|
actions: assign(({ context }) => ({
|
|
217
|
-
otpError: "
|
|
221
|
+
otpError: "otp.errorv2",
|
|
218
222
|
attemptsRemaining: context.attemptsRemaining - 1
|
|
219
223
|
}))
|
|
220
224
|
},
|
|
@@ -232,17 +236,20 @@ const emailMachine = setup({
|
|
|
232
236
|
actions: "setError"
|
|
233
237
|
}]
|
|
234
238
|
} },
|
|
235
|
-
otpError: {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
239
|
+
otpError: {
|
|
240
|
+
entry: "clearResendTimer",
|
|
241
|
+
on: {
|
|
242
|
+
OTP_CHANGED: {
|
|
243
|
+
target: "awaitingOtp",
|
|
244
|
+
actions: "setOtpCode"
|
|
245
|
+
},
|
|
246
|
+
RESEND_OTP: {
|
|
247
|
+
target: "sendingOtp",
|
|
248
|
+
guard: "canResend"
|
|
249
|
+
},
|
|
250
|
+
BACK: { target: "inputting" }
|
|
251
|
+
}
|
|
252
|
+
},
|
|
246
253
|
finished: { type: "final" },
|
|
247
254
|
error: { on: { RESET: {
|
|
248
255
|
target: "idle",
|
|
@@ -357,7 +364,8 @@ function mapState(snapshot) {
|
|
|
357
364
|
emailError: context.emailError
|
|
358
365
|
};
|
|
359
366
|
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
360
|
-
if (typedSnapshot.matches("
|
|
367
|
+
if (typedSnapshot.matches("resendingOtp")) return { status: "resendingOtp" };
|
|
368
|
+
if (typedSnapshot.matches("sendingInitialOtp")) return { status: "sendingInitialOtp" };
|
|
361
369
|
if (typedSnapshot.matches("awaitingOtp")) return {
|
|
362
370
|
status: "awaitingOtp",
|
|
363
371
|
resendTimer: context.resendTimer,
|
|
@@ -367,8 +375,10 @@ function mapState(snapshot) {
|
|
|
367
375
|
if (typedSnapshot.matches("verifyingOtp")) return { status: "verifyingOtp" };
|
|
368
376
|
if (typedSnapshot.matches("otpError")) return {
|
|
369
377
|
status: "otpError",
|
|
370
|
-
|
|
371
|
-
attemptsRemaining: context.attemptsRemaining
|
|
378
|
+
otpError: context.otpError ?? "Invalid OTP code",
|
|
379
|
+
attemptsRemaining: context.attemptsRemaining,
|
|
380
|
+
resendTimer: context.resendTimer,
|
|
381
|
+
canResend: !context.resendTimerActive
|
|
372
382
|
};
|
|
373
383
|
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
374
384
|
if (typedSnapshot.matches("error")) return {
|
|
@@ -83,8 +83,12 @@ type EmailSubmittingState = {
|
|
|
83
83
|
status: 'submitting';
|
|
84
84
|
};
|
|
85
85
|
/** OTP is being sent to the email address */
|
|
86
|
-
type
|
|
87
|
-
status: '
|
|
86
|
+
type EmailResendingOtpState = {
|
|
87
|
+
status: 'resendingOtp';
|
|
88
|
+
};
|
|
89
|
+
/** OTP is being sent initialy to the email address */
|
|
90
|
+
type EmailSendingInitialOtpState = {
|
|
91
|
+
status: 'sendingInitialOtp';
|
|
88
92
|
};
|
|
89
93
|
/**
|
|
90
94
|
* Waiting for OTP code - use `submitOtp()`, `resendOtp()`, or `back()`
|
|
@@ -106,11 +110,15 @@ type EmailVerifyingOtpState = {
|
|
|
106
110
|
* OTP verification failed - user can retry with `submitOtp()`
|
|
107
111
|
* @property error - Error message describing why verification failed
|
|
108
112
|
* @property attemptsRemaining - Number of remaining attempts before lockout
|
|
113
|
+
* @property resendTimer - Seconds remaining on resend cooldown (same as awaiting OTP)
|
|
114
|
+
* @property canResend - Whether resend is allowed (cooldown finished)
|
|
109
115
|
*/
|
|
110
116
|
type EmailOtpErrorState = {
|
|
111
117
|
status: 'otpError';
|
|
112
|
-
|
|
118
|
+
otpError: string;
|
|
113
119
|
attemptsRemaining: number;
|
|
120
|
+
resendTimer: number;
|
|
121
|
+
canResend: boolean;
|
|
114
122
|
};
|
|
115
123
|
/** Email verification completed successfully */
|
|
116
124
|
type EmailFinishedState = {
|
|
@@ -137,7 +145,7 @@ type EmailErrorState = {
|
|
|
137
145
|
* }
|
|
138
146
|
* ```
|
|
139
147
|
*/
|
|
140
|
-
type EmailState = EmailIdleState | EmailLoadingPrefillState | EmailInputtingState | EmailSubmittingState |
|
|
148
|
+
type EmailState = EmailIdleState | EmailLoadingPrefillState | EmailInputtingState | EmailSubmittingState | EmailResendingOtpState | EmailSendingInitialOtpState | EmailAwaitingOtpState | EmailVerifyingOtpState | EmailOtpErrorState | EmailFinishedState | EmailErrorState;
|
|
141
149
|
/**
|
|
142
150
|
* Creates an email verification manager for headless or UI-driven usage.
|
|
143
151
|
*
|
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-vDj9azjD.js";
|
|
11
|
+
import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-BBEdl-dP.js";
|
|
12
12
|
|
|
13
13
|
//#region ../infra/src/providers/browser/BrowserStorageProvider.d.ts
|
|
14
14
|
/**
|
|
@@ -11,8 +11,8 @@ import "./deepsightService-lTQvj-Wf.esm.js";
|
|
|
11
11
|
import "./stats-D0m3TvIg.esm.js";
|
|
12
12
|
import { t as faceCaptureMachine } from "./faceCaptureSetup-CP7WXoGS.esm.js";
|
|
13
13
|
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-CoeHnXPS.esm.js";
|
|
14
|
-
import { n as createEmailManagerFromActor } from "./emailManager-
|
|
14
|
+
import { n as createEmailManagerFromActor } from "./emailManager-C8EeT_ZS.esm.js";
|
|
15
15
|
import { n as createSelfieManagerFromActor } from "./selfieManager-DZTwDE-b.esm.js";
|
|
16
|
-
import { n as createPhoneManagerFromActor } from "./phoneManager-
|
|
16
|
+
import { n as createPhoneManagerFromActor } from "./phoneManager-Chu-DkAG.esm.js";
|
|
17
17
|
|
|
18
18
|
export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise };
|
|
@@ -64,16 +64,16 @@ declare const mandatoryConsentMachine: xstate417.StateMachine<MandatoryConsentCo
|
|
|
64
64
|
id: string | undefined;
|
|
65
65
|
};
|
|
66
66
|
}>, xstate417.Values<{
|
|
67
|
-
|
|
68
|
-
type: "
|
|
67
|
+
resetContext: {
|
|
68
|
+
type: "resetContext";
|
|
69
69
|
params: xstate417.NonReducibleUnknown;
|
|
70
70
|
};
|
|
71
71
|
setError: {
|
|
72
72
|
type: "setError";
|
|
73
73
|
params: xstate417.NonReducibleUnknown;
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
type: "
|
|
75
|
+
clearError: {
|
|
76
|
+
type: "clearError";
|
|
77
77
|
params: xstate417.NonReducibleUnknown;
|
|
78
78
|
};
|
|
79
79
|
setConsent: {
|
|
@@ -87,7 +87,7 @@ declare const mandatoryConsentMachine: xstate417.StateMachine<MandatoryConsentCo
|
|
|
87
87
|
}>, {
|
|
88
88
|
type: "canSubmit";
|
|
89
89
|
params: unknown;
|
|
90
|
-
}, never, "error" | "
|
|
90
|
+
}, never, "error" | "idle" | "loading" | "finished" | "display" | "submitting" | "closed", string, MandatoryConsentInput, xstate417.NonReducibleUnknown, xstate417.EventObject, xstate417.MetaObject, {
|
|
91
91
|
readonly id: "mandatoryConsent";
|
|
92
92
|
readonly initial: "idle";
|
|
93
93
|
readonly context: ({
|
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-BBEdl-dP.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-DCc0dMkT.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-Chu-DkAG.esm.js";
|
|
6
6
|
|
|
7
7
|
export { createPhoneManager, phoneMachine };
|
|
@@ -100,9 +100,13 @@ type PhoneInputtingState = {
|
|
|
100
100
|
type PhoneSubmittingState = {
|
|
101
101
|
status: 'submitting';
|
|
102
102
|
};
|
|
103
|
-
/** OTP is being sent to the phone number */
|
|
104
|
-
type
|
|
105
|
-
status: '
|
|
103
|
+
/** OTP is being sent to the phone number on resend */
|
|
104
|
+
type PhoneResendingOtpState = {
|
|
105
|
+
status: 'resendingOtp';
|
|
106
|
+
};
|
|
107
|
+
/** OTP is being initialy sent to the phone number */
|
|
108
|
+
type PhoneSendingInitialOtp = {
|
|
109
|
+
status: 'sendingInitialOtp';
|
|
106
110
|
};
|
|
107
111
|
/**
|
|
108
112
|
* Waiting for OTP code - use `submitOtp()`, `resendOtp()`, or `back()`
|
|
@@ -124,11 +128,15 @@ type PhoneVerifyingOtpState = {
|
|
|
124
128
|
* OTP verification failed - user can retry with `submitOtp()`
|
|
125
129
|
* @property error - Error message describing why verification failed
|
|
126
130
|
* @property attemptsRemaining - Number of remaining attempts before lockout
|
|
131
|
+
* @property resendTimer - Seconds remaining on resend cooldown (same as awaiting OTP)
|
|
132
|
+
* @property canResend - Whether resend is allowed (cooldown finished)
|
|
127
133
|
*/
|
|
128
134
|
type PhoneOtpErrorState = {
|
|
129
135
|
status: 'otpError';
|
|
130
|
-
|
|
136
|
+
otpError: string;
|
|
131
137
|
attemptsRemaining: number;
|
|
138
|
+
resendTimer: number;
|
|
139
|
+
canResend: boolean;
|
|
132
140
|
};
|
|
133
141
|
/** Phone verification completed successfully */
|
|
134
142
|
type PhoneFinishedState = {
|
|
@@ -155,7 +163,7 @@ type PhoneErrorState = {
|
|
|
155
163
|
* }
|
|
156
164
|
* ```
|
|
157
165
|
*/
|
|
158
|
-
type PhoneState = PhoneIdleState | PhoneLoadingPrefillState | PhoneInputtingState | PhoneSubmittingState |
|
|
166
|
+
type PhoneState = PhoneIdleState | PhoneLoadingPrefillState | PhoneInputtingState | PhoneSubmittingState | PhoneResendingOtpState | PhoneSendingInitialOtp | PhoneAwaitingOtpState | PhoneVerifyingOtpState | PhoneOtpErrorState | PhoneFinishedState | PhoneErrorState;
|
|
159
167
|
/**
|
|
160
168
|
* Creates a phone verification manager for headless or UI-driven usage.
|
|
161
169
|
*
|
|
@@ -152,7 +152,11 @@ const phoneMachine = setup({
|
|
|
152
152
|
attemptsRemaining: context.config.maxOtpAttempts ?? 3,
|
|
153
153
|
resendTimer: 0,
|
|
154
154
|
resendTimerActive: false
|
|
155
|
-
}))
|
|
155
|
+
})),
|
|
156
|
+
clearResendTimer: assign({
|
|
157
|
+
resendTimer: () => 0,
|
|
158
|
+
resendTimerActive: () => false
|
|
159
|
+
})
|
|
156
160
|
},
|
|
157
161
|
guards: {
|
|
158
162
|
hasPrefill: ({ context }) => context.config.prefill,
|
|
@@ -224,7 +228,7 @@ const phoneMachine = setup({
|
|
|
224
228
|
isInstantVerify: context.config.isInstantVerify ?? false
|
|
225
229
|
}),
|
|
226
230
|
onDone: [{
|
|
227
|
-
target: "
|
|
231
|
+
target: "sendingInitialOtp",
|
|
228
232
|
guard: "hasOtpVerification"
|
|
229
233
|
}, { target: "finished" }],
|
|
230
234
|
onError: {
|
|
@@ -232,7 +236,16 @@ const phoneMachine = setup({
|
|
|
232
236
|
actions: "setPhoneError"
|
|
233
237
|
}
|
|
234
238
|
} },
|
|
235
|
-
|
|
239
|
+
sendingInitialOtp: { invoke: {
|
|
240
|
+
id: "sendOtp",
|
|
241
|
+
src: "sendOtp",
|
|
242
|
+
onDone: { target: "awaitingOtp" },
|
|
243
|
+
onError: {
|
|
244
|
+
target: "awaitingOtp",
|
|
245
|
+
actions: "setError"
|
|
246
|
+
}
|
|
247
|
+
} },
|
|
248
|
+
resendingOtp: { invoke: {
|
|
236
249
|
id: "sendOtp",
|
|
237
250
|
src: "sendOtp",
|
|
238
251
|
onDone: { target: "awaitingOtp" },
|
|
@@ -252,7 +265,7 @@ const phoneMachine = setup({
|
|
|
252
265
|
OTP_CHANGED: { actions: "setOtpCode" },
|
|
253
266
|
VERIFY_OTP: { target: "verifyingOtp" },
|
|
254
267
|
RESEND_OTP: {
|
|
255
|
-
target: "
|
|
268
|
+
target: "resendingOtp",
|
|
256
269
|
guard: "canResend"
|
|
257
270
|
},
|
|
258
271
|
BACK: { target: "inputting" }
|
|
@@ -289,17 +302,20 @@ const phoneMachine = setup({
|
|
|
289
302
|
actions: "setError"
|
|
290
303
|
}]
|
|
291
304
|
} },
|
|
292
|
-
otpError: {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
305
|
+
otpError: {
|
|
306
|
+
entry: "clearResendTimer",
|
|
307
|
+
on: {
|
|
308
|
+
OTP_CHANGED: {
|
|
309
|
+
target: "awaitingOtp",
|
|
310
|
+
actions: "setOtpCode"
|
|
311
|
+
},
|
|
312
|
+
RESEND_OTP: {
|
|
313
|
+
target: "resendingOtp",
|
|
314
|
+
guard: "canResend"
|
|
315
|
+
},
|
|
316
|
+
BACK: { target: "inputting" }
|
|
317
|
+
}
|
|
318
|
+
},
|
|
303
319
|
finished: { type: "final" },
|
|
304
320
|
error: { on: { RESET: {
|
|
305
321
|
target: "idle",
|
|
@@ -423,7 +439,8 @@ function mapState(snapshot) {
|
|
|
423
439
|
phoneError: context.phoneError
|
|
424
440
|
};
|
|
425
441
|
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
426
|
-
if (typedSnapshot.matches("
|
|
442
|
+
if (typedSnapshot.matches("resendingOtp")) return { status: "resendingOtp" };
|
|
443
|
+
if (typedSnapshot.matches("sendingInitialOtp")) return { status: "sendingInitialOtp" };
|
|
427
444
|
if (typedSnapshot.matches("awaitingOtp")) return {
|
|
428
445
|
status: "awaitingOtp",
|
|
429
446
|
resendTimer: context.resendTimer,
|
|
@@ -433,8 +450,10 @@ function mapState(snapshot) {
|
|
|
433
450
|
if (typedSnapshot.matches("verifyingOtp")) return { status: "verifyingOtp" };
|
|
434
451
|
if (typedSnapshot.matches("otpError")) return {
|
|
435
452
|
status: "otpError",
|
|
436
|
-
|
|
437
|
-
attemptsRemaining: context.attemptsRemaining
|
|
453
|
+
otpError: context.otpError ?? "otp.errorv2",
|
|
454
|
+
attemptsRemaining: context.attemptsRemaining,
|
|
455
|
+
resendTimer: context.resendTimer,
|
|
456
|
+
canResend: !context.resendTimerActive
|
|
438
457
|
};
|
|
439
458
|
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
440
459
|
if (typedSnapshot.matches("error")) return {
|