@incodetech/core 0.0.0-dev-20260313-bc2dab4 → 0.0.0-dev-20260317-ce5d28b
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/addressSearch-B446UZn4.esm.js +423 -0
- package/dist/authentication.d.ts +10 -10
- package/dist/authentication.esm.js +6 -6
- package/dist/{authenticationManager-DQL9XsaI.d.ts → authenticationManager-BWtUIJXV.d.ts} +2 -2
- package/dist/{authenticationManager-4j4j8ac9.esm.js → authenticationManager-IChdnUM9.esm.js} +3 -3
- package/dist/{backCameraStream-4aLwsDOv.esm.js → backCameraStream-DDzfvhxo.esm.js} +1 -1
- package/dist/curp-validation.d.ts +4 -4
- package/dist/curp-validation.esm.js +1 -1
- package/dist/{deepsightLoader-C-Xil8cg.esm.js → deepsightLoader-IPtIRYqd.esm.js} +2 -2
- package/dist/{deepsightService-UhtHJCFb.d.ts → deepsightService-CP5OM4Fc.d.ts} +1 -1
- package/dist/{deepsightService-BgqD33AH.esm.js → deepsightService-Ca85OHZ-.esm.js} +1 -1
- package/dist/document-capture.d.ts +37 -37
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +2 -2
- package/dist/ekyb.d.ts +16 -5
- package/dist/ekyb.esm.js +241 -61
- package/dist/ekyc.d.ts +2 -12
- package/dist/ekyc.esm.js +31 -194
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-e7j__XBB.esm.js → emailManager-BRFO9OW6.esm.js} +1 -1
- package/dist/{emailManager-DZeOYBQ6.d.ts → emailManager-DcYzBeT-.d.ts} +2 -2
- package/dist/extensibility.d.ts +14 -14
- package/dist/extensibility.esm.js +10 -10
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureManagerFactory-CiQWYHp2.d.ts → faceCaptureManagerFactory-Dm3dO_r0.d.ts} +7 -7
- package/dist/{faceCaptureSetup-CF9TJlsc.esm.js → faceCaptureSetup-I9wFuT1d.esm.js} +4 -4
- package/dist/flow.d.ts +7 -7
- package/dist/flow.esm.js +5 -83
- package/dist/flowServices-B5YbZJ7r.esm.js +83 -0
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +1 -1
- package/dist/id.d.ts +9 -9
- package/dist/id.esm.js +5 -5
- package/dist/{idCaptureManager-B9BsU7-M.esm.js → idCaptureManager-BdlS0WrG.esm.js} +5 -5
- package/dist/{idCaptureManager-D8FwP0TW.d.ts → idCaptureManager-dTZ7KTot.d.ts} +6 -6
- package/dist/index.d.ts +10 -10
- package/dist/index.esm.js +5 -5
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-BsamACjL.d.ts → phoneManager-BwJpxm-D.d.ts} +2 -2
- package/dist/{phoneManager-B6fNmxhw.esm.js → phoneManager-TWj65pNG.esm.js} +1 -1
- package/dist/redirect-to-mobile.d.ts +1 -1
- package/dist/redirect-to-mobile.esm.js +1 -1
- package/dist/selfie.d.ts +10 -10
- package/dist/selfie.esm.js +6 -6
- package/dist/{selfieManager-ByV0akn-.esm.js → selfieManager-BeVNeGVa.esm.js} +2 -2
- package/dist/{selfieManager-Czysy-lv.d.ts → selfieManager-BgSkTLJj.d.ts} +2 -2
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +1 -1
- package/dist/{src-BmVrWkLJ.esm.js → src-D0bFtylT.esm.js} +1 -1
- package/dist/{streamingEvents-Cw6kqXEh.esm.js → streamingEvents-BjxVqrJP.esm.js} +1 -1
- package/dist/{types-BugcSDaO.d.ts → types-BHnsBsl_.d.ts} +1 -1
- package/dist/{types-DTieLton.d.ts → types-CWa0DQcn.d.ts} +12 -1
- package/dist/{types-C9Jo2XOb.d.ts → types-seztsdvN.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/usStates-vWM_ZgEH.esm.js +0 -210
- /package/dist/{Actor-BAf9LRYf.d.ts → Actor-D3GOC38V.d.ts} +0 -0
- /package/dist/{Manager-CXnC-tN_.d.ts → Manager-DsNvecSe.d.ts} +0 -0
- /package/dist/{StateMachine-DJpZF_HP.d.ts → StateMachine-BFurBmbZ.d.ts} +0 -0
- /package/dist/{camera-DDn9ILon.d.ts → camera-Bzi6CMAW.d.ts} +0 -0
- /package/dist/{flowCompletionService-D4YDcHQR.d.ts → flowCompletionService-BiICW3B-.d.ts} +0 -0
- /package/dist/{flowCompletionService-CV8Ywiut.esm.js → flowCompletionService-D1bhU2uN.esm.js} +0 -0
- /package/dist/{index-BtQzTfU9.d.ts → index-Km_6UPBI.d.ts} +0 -0
- /package/dist/{lib-COh1FH9n.esm.js → lib-DJozC192.esm.js} +0 -0
- /package/dist/{warmup-Bp_1oXoL.d.ts → warmup-4e5k___O.d.ts} +0 -0
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-3HzCcoEy.esm.js";
|
|
2
|
-
import { A as createManager
|
|
3
|
-
import { a as createActor, i as fromPromise, n as assign,
|
|
2
|
+
import { A as createManager } from "./src-D0bFtylT.esm.js";
|
|
3
|
+
import { a as createActor, i as fromPromise, n as assign, t as setup } from "./xstate.esm-CcoTezCZ.esm.js";
|
|
4
4
|
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-IAlXA1zN.esm.js";
|
|
6
|
-
import { t as usStateOptions } from "./
|
|
6
|
+
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-B446UZn4.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/libphonenumber-js@1.12.31/node_modules/libphonenumber-js/metadata.min.json.js
|
|
9
9
|
var metadata_min_json_default = {
|
|
@@ -9811,44 +9811,6 @@ const DRIVERS_LICENSE_FIELDS = [
|
|
|
9811
9811
|
"dlExpireAt"
|
|
9812
9812
|
];
|
|
9813
9813
|
const REQUIRED_ERROR_KEYS = new Set(["verification.errors.required"]);
|
|
9814
|
-
const FIELD_REQUIRED_DISPLAY_KEY = {
|
|
9815
|
-
firstName: "verification.errors.firstNameRequired",
|
|
9816
|
-
surName: "verification.errors.surNameRequired",
|
|
9817
|
-
maternalSurname: "verification.errors.maternalSurnameRequired",
|
|
9818
|
-
dateOfBirth: "verification.errors.dateOfBirthRequired",
|
|
9819
|
-
street: "verification.errors.streetRequired",
|
|
9820
|
-
city: "verification.errors.cityRequired",
|
|
9821
|
-
state: "verification.errors.stateRequired",
|
|
9822
|
-
houseNo: "verification.errors.houseNoRequired",
|
|
9823
|
-
ssn: "verification.errors.ssnRequired",
|
|
9824
|
-
taxId: "verification.errors.taxIdRequired",
|
|
9825
|
-
last4SSN: "verification.errors.last4SSNRequired",
|
|
9826
|
-
nationality: "verification.errors.nationality",
|
|
9827
|
-
phone: "verification.errors.phoneRequired",
|
|
9828
|
-
email: "verification.errors.emailRequired",
|
|
9829
|
-
dlNumber: "verification.errors.dlNumber",
|
|
9830
|
-
dlState: "verification.errors.dlStateRequired",
|
|
9831
|
-
dlExpireAt: "verification.errors.dlExpireAtRequired",
|
|
9832
|
-
idNum: "verification.errors.prcId"
|
|
9833
|
-
};
|
|
9834
|
-
const POSTAL_CODE_FORMAT_ERROR_KEYS = new Set([
|
|
9835
|
-
"verification.errors.zipCodeInvalidFormat",
|
|
9836
|
-
"verification.errors.postalCodeInvalidFormat",
|
|
9837
|
-
"verification.errors.CAPostalCodeInvalidFormat",
|
|
9838
|
-
"verification.errors.ESPostalCodeInvalidFormat",
|
|
9839
|
-
"verification.errors.UKPostalCodeInvalidFormat",
|
|
9840
|
-
"verification.errors.ARPostalCodeInvalidFormat"
|
|
9841
|
-
]);
|
|
9842
|
-
const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
|
|
9843
|
-
US: 10,
|
|
9844
|
-
BR: 9,
|
|
9845
|
-
CA: 7,
|
|
9846
|
-
ES: 5,
|
|
9847
|
-
GB: 8,
|
|
9848
|
-
UK: 8,
|
|
9849
|
-
AR: 8
|
|
9850
|
-
};
|
|
9851
|
-
const DEFAULT_POSTAL_CODE_MAX_LENGTH = 8;
|
|
9852
9814
|
const INVALID_CPF_PATTERNS = [
|
|
9853
9815
|
"00000000000",
|
|
9854
9816
|
"11111111111",
|
|
@@ -9971,67 +9933,6 @@ const PO_BOX_REGEX = /POBox|P\.O\.Box|pobox|postofficebox|postbox|po\.box|p\.o\.
|
|
|
9971
9933
|
function isPoBox(address) {
|
|
9972
9934
|
return PO_BOX_REGEX.test(address.replace(/\s/g, ""));
|
|
9973
9935
|
}
|
|
9974
|
-
const US_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{9}|\d{5}-\d{4})$/;
|
|
9975
|
-
const BR_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{8}|\d{5}-\d{3})$/;
|
|
9976
|
-
const CA_POSTAL_CODE_REGEX = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
|
|
9977
|
-
const ES_POSTAL_CODE_REGEX = /^\d{5}$/;
|
|
9978
|
-
const UK_POSTAL_CODE_REGEX = /^(?:[A-Z]{2}\d|[A-Z]{2}\d{2}|[A-Z]\d|[A-Z]\d{2}|[A-Z]\d[A-Z]|[A-Z]{2}\d[A-Z]) \d[A-Z]{2}$/;
|
|
9979
|
-
const AR_POSTAL_CODE_REGEX = /^[A-Za-z]\d{4}[A-Za-z]{3}$/;
|
|
9980
|
-
/**
|
|
9981
|
-
* Validates postal code by country:
|
|
9982
|
-
* - US: 5-digit, 9-digit, or ZIP+4
|
|
9983
|
-
* - BR: 5-digit, 8-digit, or 5+3 with dash
|
|
9984
|
-
* - CA: A1A 1A1
|
|
9985
|
-
* - ES: 5 digits
|
|
9986
|
-
* - GB/UK: A0 0AA, AA0 0AA, AA0A 0AA
|
|
9987
|
-
* - AR: CPA XNNNNXXX (1 letter + 4 digits + 3 letters)
|
|
9988
|
-
* - Others: 5 or 8 numeric digits
|
|
9989
|
-
*/
|
|
9990
|
-
function validatePostalCode(postalCode, country) {
|
|
9991
|
-
if (!postalCode) return false;
|
|
9992
|
-
if (country === "US") return US_POSTAL_CODE_REGEX.test(postalCode);
|
|
9993
|
-
if (country === "BR") return BR_POSTAL_CODE_REGEX.test(postalCode);
|
|
9994
|
-
if (country === "CA") return CA_POSTAL_CODE_REGEX.test(postalCode);
|
|
9995
|
-
if (country === "ES") return ES_POSTAL_CODE_REGEX.test(postalCode);
|
|
9996
|
-
if (country === "GB" || country === "UK") return UK_POSTAL_CODE_REGEX.test(postalCode.toUpperCase());
|
|
9997
|
-
if (country === "AR") return AR_POSTAL_CODE_REGEX.test(postalCode.replace(/\s/g, "").toUpperCase());
|
|
9998
|
-
const stripped = postalCode.replace(/\D/g, "");
|
|
9999
|
-
return /^\d+$/.test(stripped) && [5, DEFAULT_POSTAL_CODE_MAX_LENGTH].includes(stripped.length);
|
|
10000
|
-
}
|
|
10001
|
-
/**
|
|
10002
|
-
* Normalizes ZIP input to digits and an optional dash after 5 digits.
|
|
10003
|
-
* Examples:
|
|
10004
|
-
* - 12345
|
|
10005
|
-
* - 123456789
|
|
10006
|
-
* - 12345-6789
|
|
10007
|
-
*/
|
|
10008
|
-
function formatPostalCode(value, country) {
|
|
10009
|
-
if (country === "US" || country === "BR" || country === "ES") {
|
|
10010
|
-
let maxLength = getPostalCodeMaxLength(country);
|
|
10011
|
-
if (country !== "ES") maxLength = maxLength - 1;
|
|
10012
|
-
const hasDash = value.includes("-");
|
|
10013
|
-
const digits = value.replace(/\D/g, "").slice(0, maxLength);
|
|
10014
|
-
if (country === "ES") return digits;
|
|
10015
|
-
if (digits.length <= 5) {
|
|
10016
|
-
if (hasDash && digits.length === 5) return `${digits}-`;
|
|
10017
|
-
return digits;
|
|
10018
|
-
}
|
|
10019
|
-
if (hasDash) return `${digits.slice(0, 5)}-${digits.slice(5)}`;
|
|
10020
|
-
return digits;
|
|
10021
|
-
}
|
|
10022
|
-
if (country === "CA") {
|
|
10023
|
-
const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 6);
|
|
10024
|
-
if (normalized.length <= 3) return normalized;
|
|
10025
|
-
return `${normalized.slice(0, 3)} ${normalized.slice(3)}`;
|
|
10026
|
-
}
|
|
10027
|
-
if (country === "GB" || country === "UK") {
|
|
10028
|
-
const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 7);
|
|
10029
|
-
if (normalized.length <= 3) return normalized;
|
|
10030
|
-
return `${normalized.slice(0, -3)} ${normalized.slice(-3)}`;
|
|
10031
|
-
}
|
|
10032
|
-
if (country === "AR") return value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 8);
|
|
10033
|
-
return value.replace(/\D/g, "").slice(0, DEFAULT_POSTAL_CODE_MAX_LENGTH);
|
|
10034
|
-
}
|
|
10035
9936
|
/** Validates a phone number using libphonenumber-js country rules */
|
|
10036
9937
|
function validatePhone(phone, country) {
|
|
10037
9938
|
if (!phone) return false;
|
|
@@ -10052,26 +9953,6 @@ function formatPhoneE164(phone, country) {
|
|
|
10052
9953
|
|
|
10053
9954
|
//#endregion
|
|
10054
9955
|
//#region src/modules/ekyc/ekycActions.ts
|
|
10055
|
-
function getRequiredDisplayKey(field, country) {
|
|
10056
|
-
if (field === "postalCode") return country === "US" ? "verification.errors.zipCodeRequired" : "verification.errors.postalCodeRequired";
|
|
10057
|
-
else if (field === "ssn") {
|
|
10058
|
-
if (country === "BR") return "verification.errors.taxIdRequired";
|
|
10059
|
-
else if (country === "CN") return "verification.errors.prcId";
|
|
10060
|
-
return "verification.errors.ssnRequired";
|
|
10061
|
-
}
|
|
10062
|
-
return FIELD_REQUIRED_DISPLAY_KEY[field] ?? "verification.errors.required";
|
|
10063
|
-
}
|
|
10064
|
-
function getPostalCodeMaxLength(country) {
|
|
10065
|
-
return POSTAL_CODE_MAX_LENGTH_BY_COUNTRY[country] ?? DEFAULT_POSTAL_CODE_MAX_LENGTH;
|
|
10066
|
-
}
|
|
10067
|
-
function getPostalCodeErrorKey(country) {
|
|
10068
|
-
if (country === "CA") return "verification.errors.CAPostalCodeInvalidFormat";
|
|
10069
|
-
if (country === "ES") return "verification.errors.ESPostalCodeInvalidFormat";
|
|
10070
|
-
if (country === "AR") return "verification.errors.ARPostalCodeInvalidFormat";
|
|
10071
|
-
if (country === "GB" || country === "UK") return "verification.errors.UKPostalCodeInvalidFormat";
|
|
10072
|
-
if (country === "US") return "verification.errors.zipCodeInvalidFormat";
|
|
10073
|
-
return "verification.errors.postalCodeInvalidFormat";
|
|
10074
|
-
}
|
|
10075
9956
|
function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false) {
|
|
10076
9957
|
const defs = [];
|
|
10077
9958
|
const add = (name, type, label, source, opts) => {
|
|
@@ -10197,17 +10078,36 @@ function computeValidation(fields, values, country, configSource) {
|
|
|
10197
10078
|
isValid: Object.keys(errors).length === 0
|
|
10198
10079
|
};
|
|
10199
10080
|
}
|
|
10200
|
-
function computeDisplayErrors(errors, touched, submitAttempted, country) {
|
|
10081
|
+
function computeDisplayErrors(errors, touched, submitAttempted, country, fields) {
|
|
10201
10082
|
const display = {};
|
|
10202
10083
|
const errorParams = {};
|
|
10084
|
+
const fieldLabelMap = new Map(fields?.map((f) => [f.name, f.label]));
|
|
10203
10085
|
for (const [field, err] of Object.entries(errors)) {
|
|
10204
10086
|
const isRequiredErr = REQUIRED_ERROR_KEYS.has(err);
|
|
10205
|
-
if (isRequiredErr && (submitAttempted || touched[field]))
|
|
10206
|
-
|
|
10087
|
+
if (isRequiredErr && (submitAttempted || touched[field])) {
|
|
10088
|
+
const label = fieldLabelMap.get(field);
|
|
10089
|
+
if (label) {
|
|
10090
|
+
display[field] = DYNAMIC_REQUIRED_KEY;
|
|
10091
|
+
errorParams[field] = {
|
|
10092
|
+
...errorParams[field] ?? {},
|
|
10093
|
+
fieldName: label
|
|
10094
|
+
};
|
|
10095
|
+
} else display[field] = DYNAMIC_REQUIRED_KEY;
|
|
10096
|
+
} else if (!isRequiredErr && touched[field]) display[field] = err;
|
|
10207
10097
|
if (display[field] && field === "postalCode" && POSTAL_CODE_FORMAT_ERROR_KEYS.has(err)) {
|
|
10208
|
-
|
|
10209
|
-
if (
|
|
10210
|
-
|
|
10098
|
+
const fixedLen = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
|
|
10099
|
+
if (fixedLen !== void 0) errorParams[field] = {
|
|
10100
|
+
...errorParams[field] ?? {},
|
|
10101
|
+
length: fixedLen
|
|
10102
|
+
};
|
|
10103
|
+
else {
|
|
10104
|
+
let maxLen = getPostalCodeMaxLength(country);
|
|
10105
|
+
if (country === "US" || country === "BR") maxLen = maxLen - 1;
|
|
10106
|
+
errorParams[field] = {
|
|
10107
|
+
...errorParams[field] ?? {},
|
|
10108
|
+
maxLength: maxLen
|
|
10109
|
+
};
|
|
10110
|
+
}
|
|
10211
10111
|
}
|
|
10212
10112
|
}
|
|
10213
10113
|
return {
|
|
@@ -10322,34 +10222,6 @@ function processFieldValue(name, value, fieldsCountry) {
|
|
|
10322
10222
|
if (name === "postalCode") return formatPostalCode(value, fieldsCountry);
|
|
10323
10223
|
return value;
|
|
10324
10224
|
}
|
|
10325
|
-
function fillFromSuggestion(values, touched, suggestion) {
|
|
10326
|
-
const newValues = { ...values };
|
|
10327
|
-
const newTouched = { ...touched };
|
|
10328
|
-
if (suggestion.street) {
|
|
10329
|
-
newValues.street = suggestion.street;
|
|
10330
|
-
newTouched.street = true;
|
|
10331
|
-
}
|
|
10332
|
-
if (suggestion.city) {
|
|
10333
|
-
newValues.city = suggestion.city;
|
|
10334
|
-
newTouched.city = true;
|
|
10335
|
-
}
|
|
10336
|
-
if (suggestion.stateCode) {
|
|
10337
|
-
newValues.state = suggestion.stateCode;
|
|
10338
|
-
newTouched.state = true;
|
|
10339
|
-
}
|
|
10340
|
-
if (suggestion.postalCode) {
|
|
10341
|
-
newValues.postalCode = suggestion.postalCode;
|
|
10342
|
-
newTouched.postalCode = true;
|
|
10343
|
-
}
|
|
10344
|
-
if (suggestion.houseNumber) {
|
|
10345
|
-
newValues.houseNo = suggestion.houseNumber;
|
|
10346
|
-
newTouched.houseNo = true;
|
|
10347
|
-
}
|
|
10348
|
-
return {
|
|
10349
|
-
values: newValues,
|
|
10350
|
-
touched: newTouched
|
|
10351
|
-
};
|
|
10352
|
-
}
|
|
10353
10225
|
|
|
10354
10226
|
//#endregion
|
|
10355
10227
|
//#region src/modules/ekyc/ekycServices.ts
|
|
@@ -10372,24 +10244,6 @@ async function fetchOtpStatus(signal) {
|
|
|
10372
10244
|
if (!res.ok) throw new Error(`GET ${endpoints.otpStatus} failed: ${res.status} ${res.statusText}`);
|
|
10373
10245
|
return res.data;
|
|
10374
10246
|
}
|
|
10375
|
-
/** Searches for address suggestions */
|
|
10376
|
-
async function searchAddress(query, signal) {
|
|
10377
|
-
const res = await api.post(endpoints.addressAutocomplete, { search: query }, { signal });
|
|
10378
|
-
if (!res.ok) throw new Error(`POST ${endpoints.addressAutocomplete} failed: ${res.status} ${res.statusText}`);
|
|
10379
|
-
return { apiResponse: { items: (res.data.apiResponse?.items ?? []).map((item, i) => {
|
|
10380
|
-
const addr = item.address ?? item;
|
|
10381
|
-
return {
|
|
10382
|
-
id: item.id ?? i,
|
|
10383
|
-
label: addr.label ?? item.title ?? "",
|
|
10384
|
-
street: addr.street,
|
|
10385
|
-
city: addr.city,
|
|
10386
|
-
stateCode: addr.stateCode ?? addr.state,
|
|
10387
|
-
postalCode: addr.postalCode,
|
|
10388
|
-
houseNumber: addr.houseNumber,
|
|
10389
|
-
countryCode: addr.countryCode
|
|
10390
|
-
};
|
|
10391
|
-
}) } };
|
|
10392
|
-
}
|
|
10393
10247
|
var EkycSubmitError = class extends Error {
|
|
10394
10248
|
constructor(status, apiError) {
|
|
10395
10249
|
super(`POST ${endpoints.ekycSubmit} failed: ${status} – ${apiError}`);
|
|
@@ -10435,23 +10289,6 @@ const fetchPrefillDataActor = fromPromise(async ({ signal }) => {
|
|
|
10435
10289
|
};
|
|
10436
10290
|
});
|
|
10437
10291
|
const submitEkycActor = fromPromise(async ({ input, signal }) => submitEkyc(input, signal));
|
|
10438
|
-
const debounceSearchActor = fromCallback(({ input, sendBack }) => {
|
|
10439
|
-
const timerProvider = BrowserTimerProvider.getInstance();
|
|
10440
|
-
const handle = timerProvider.setTimeout(async () => {
|
|
10441
|
-
try {
|
|
10442
|
-
sendBack({
|
|
10443
|
-
type: "RESULTS",
|
|
10444
|
-
suggestions: (await searchAddress(input.query)).apiResponse?.items ?? []
|
|
10445
|
-
});
|
|
10446
|
-
} catch {
|
|
10447
|
-
sendBack({
|
|
10448
|
-
type: "RESULTS",
|
|
10449
|
-
suggestions: []
|
|
10450
|
-
});
|
|
10451
|
-
}
|
|
10452
|
-
}, 300);
|
|
10453
|
-
return () => timerProvider.clearTimeout(handle);
|
|
10454
|
-
});
|
|
10455
10292
|
|
|
10456
10293
|
//#endregion
|
|
10457
10294
|
//#region src/modules/ekyc/ekycStateMachine.ts
|
|
@@ -10512,7 +10349,7 @@ const ekycMachine = setup({
|
|
|
10512
10349
|
[name]: true
|
|
10513
10350
|
};
|
|
10514
10351
|
const { errors, isValid } = computeValidation(context.fields, newValues, context.fieldsCountry, context.configSource);
|
|
10515
|
-
const { displayErrors, errorParams } = computeDisplayErrors(errors, newTouched, context.submitAttempted, context.fieldsCountry);
|
|
10352
|
+
const { displayErrors, errorParams } = computeDisplayErrors(errors, newTouched, context.submitAttempted, context.fieldsCountry, context.fields);
|
|
10516
10353
|
return {
|
|
10517
10354
|
values: newValues,
|
|
10518
10355
|
errors,
|
|
@@ -10527,7 +10364,7 @@ const ekycMachine = setup({
|
|
|
10527
10364
|
const { suggestion } = event;
|
|
10528
10365
|
const { values: newValues, touched: newTouched } = fillFromSuggestion(context.values, context.touched, suggestion);
|
|
10529
10366
|
const { errors, isValid } = computeValidation(context.fields, newValues, context.fieldsCountry, context.configSource);
|
|
10530
|
-
const { displayErrors, errorParams } = computeDisplayErrors(errors, newTouched, context.submitAttempted, context.fieldsCountry);
|
|
10367
|
+
const { displayErrors, errorParams } = computeDisplayErrors(errors, newTouched, context.submitAttempted, context.fieldsCountry, context.fields);
|
|
10531
10368
|
return {
|
|
10532
10369
|
values: newValues,
|
|
10533
10370
|
addressSuggestions: [],
|
|
@@ -10545,7 +10382,7 @@ const ekycMachine = setup({
|
|
|
10545
10382
|
setSubmitError: assign(() => ({ submitError: "verification.errors.countryNotSupported" })),
|
|
10546
10383
|
clearSubmitError: assign({ submitError: () => "" }),
|
|
10547
10384
|
markSubmitAttempted: assign(({ context }) => {
|
|
10548
|
-
const { displayErrors, errorParams } = computeDisplayErrors(context.errors, context.touched, true, context.fieldsCountry);
|
|
10385
|
+
const { displayErrors, errorParams } = computeDisplayErrors(context.errors, context.touched, true, context.fieldsCountry, context.fields);
|
|
10549
10386
|
return {
|
|
10550
10387
|
submitAttempted: true,
|
|
10551
10388
|
displayErrors,
|
package/dist/email.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-
|
|
1
|
+
import "./Manager-DsNvecSe.js";
|
|
2
|
+
import "./Actor-D3GOC38V.js";
|
|
3
|
+
import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-DcYzBeT-.js";
|
|
4
4
|
export { type EmailConfig, type EmailManager, type EmailState, createEmailManager, emailMachine };
|
package/dist/email.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./events-3HzCcoEy.esm.js";
|
|
2
|
-
import "./src-
|
|
2
|
+
import "./src-D0bFtylT.esm.js";
|
|
3
3
|
import "./xstate.esm-CcoTezCZ.esm.js";
|
|
4
4
|
import "./api-C2uzxrpN.esm.js";
|
|
5
5
|
import "./endpoints-IAlXA1zN.esm.js";
|
|
6
|
-
import { r as emailMachine, t as createEmailManager } from "./emailManager-
|
|
6
|
+
import { r as emailMachine, t as createEmailManager } from "./emailManager-BRFO9OW6.esm.js";
|
|
7
7
|
|
|
8
8
|
export { createEmailManager, emailMachine };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-3HzCcoEy.esm.js";
|
|
2
|
-
import { A as createManager, g as BrowserTimerProvider } from "./src-
|
|
2
|
+
import { A as createManager, g as BrowserTimerProvider } from "./src-D0bFtylT.esm.js";
|
|
3
3
|
import { a as createActor, i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-CcoTezCZ.esm.js";
|
|
4
4
|
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-IAlXA1zN.esm.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-DsNvecSe.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-D3GOC38V.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/email/types.d.ts
|
|
5
5
|
|
package/dist/extensibility.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { S as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-
|
|
2
|
-
import { a as IStorageCapability } from "./deepsightService-
|
|
3
|
-
import { C as WasmUtilConfig, S as VirtualCameraCheckOutput, b as BaseWasmProvider, c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine, x as IWasmUtilCapability } from "./faceCaptureManagerFactory-
|
|
4
|
-
import "./warmup-
|
|
5
|
-
import "./Manager-
|
|
6
|
-
import "./camera-
|
|
7
|
-
import { n as createActor } from "./Actor-
|
|
8
|
-
import { r as fromPromise } from "./StateMachine-
|
|
9
|
-
import "./types-
|
|
10
|
-
import "./types-
|
|
11
|
-
import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-
|
|
12
|
-
import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-
|
|
13
|
-
import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-
|
|
14
|
-
import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-
|
|
1
|
+
import { S as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-dTZ7KTot.js";
|
|
2
|
+
import { a as IStorageCapability } from "./deepsightService-CP5OM4Fc.js";
|
|
3
|
+
import { C as WasmUtilConfig, S as VirtualCameraCheckOutput, b as BaseWasmProvider, c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine, x as IWasmUtilCapability } from "./faceCaptureManagerFactory-Dm3dO_r0.js";
|
|
4
|
+
import "./warmup-4e5k___O.js";
|
|
5
|
+
import "./Manager-DsNvecSe.js";
|
|
6
|
+
import "./camera-Bzi6CMAW.js";
|
|
7
|
+
import { n as createActor } from "./Actor-D3GOC38V.js";
|
|
8
|
+
import { r as fromPromise } from "./StateMachine-BFurBmbZ.js";
|
|
9
|
+
import "./types-BHnsBsl_.js";
|
|
10
|
+
import "./types-seztsdvN.js";
|
|
11
|
+
import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-BgSkTLJj.js";
|
|
12
|
+
import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-BWtUIJXV.js";
|
|
13
|
+
import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-DcYzBeT-.js";
|
|
14
|
+
import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-BwJpxm-D.js";
|
|
15
15
|
|
|
16
16
|
//#region ../infra/src/providers/browser/BrowserStorageProvider.d.ts
|
|
17
17
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./events-3HzCcoEy.esm.js";
|
|
2
|
-
import "./backCameraStream-
|
|
3
|
-
import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-
|
|
2
|
+
import "./backCameraStream-DDzfvhxo.esm.js";
|
|
3
|
+
import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-D0bFtylT.esm.js";
|
|
4
4
|
import { a as createActor, i as fromPromise } from "./xstate.esm-CcoTezCZ.esm.js";
|
|
5
|
-
import "./streamingEvents-
|
|
6
|
-
import "./deepsightService-
|
|
5
|
+
import "./streamingEvents-BjxVqrJP.esm.js";
|
|
6
|
+
import "./deepsightService-Ca85OHZ-.esm.js";
|
|
7
7
|
import "./api-C2uzxrpN.esm.js";
|
|
8
8
|
import "./endpoints-IAlXA1zN.esm.js";
|
|
9
|
-
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-
|
|
9
|
+
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-BdlS0WrG.esm.js";
|
|
10
10
|
import "./stats-kLtQIgsA.esm.js";
|
|
11
|
-
import { n as faceCaptureMachine } from "./faceCaptureSetup-
|
|
12
|
-
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-
|
|
13
|
-
import { n as createEmailManagerFromActor } from "./emailManager-
|
|
14
|
-
import { n as createSelfieManagerFromActor } from "./selfieManager-
|
|
15
|
-
import { n as createPhoneManagerFromActor } from "./phoneManager-
|
|
11
|
+
import { n as faceCaptureMachine } from "./faceCaptureSetup-I9wFuT1d.esm.js";
|
|
12
|
+
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-IChdnUM9.esm.js";
|
|
13
|
+
import { n as createEmailManagerFromActor } from "./emailManager-BRFO9OW6.esm.js";
|
|
14
|
+
import { n as createSelfieManagerFromActor } from "./selfieManager-BeVNeGVa.esm.js";
|
|
15
|
+
import { n as createPhoneManagerFromActor } from "./phoneManager-TWj65pNG.esm.js";
|
|
16
16
|
|
|
17
17
|
export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise };
|
package/dist/face-match.d.ts
CHANGED
package/dist/face-match.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-3HzCcoEy.esm.js";
|
|
2
|
-
import { A as createManager } from "./src-
|
|
2
|
+
import { A as createManager } from "./src-D0bFtylT.esm.js";
|
|
3
3
|
import { a as createActor, i as fromPromise, n as assign, t as setup } from "./xstate.esm-CcoTezCZ.esm.js";
|
|
4
4
|
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-IAlXA1zN.esm.js";
|
package/dist/{faceCaptureManagerFactory-CiQWYHp2.d.ts → faceCaptureManagerFactory-Dm3dO_r0.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as IStorageCapability, d as IncodeCanvas, i as StreamCanvasCapture, l as IMLProviderCapability, n as PermissionResult, o as IRecordingCapability, r as PermissionStatus, t as DeepsightService, u as MLProviderConfig } from "./deepsightService-
|
|
2
|
-
import { n as WasmPipeline } from "./warmup-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
4
|
-
import { t as CameraStream } from "./camera-
|
|
5
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
6
|
-
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-
|
|
7
|
-
import { r as FlowModuleConfig, t as Flow } from "./types-
|
|
1
|
+
import { a as IStorageCapability, d as IncodeCanvas, i as StreamCanvasCapture, l as IMLProviderCapability, n as PermissionResult, o as IRecordingCapability, r as PermissionStatus, t as DeepsightService, u as MLProviderConfig } from "./deepsightService-CP5OM4Fc.js";
|
|
2
|
+
import { n as WasmPipeline } from "./warmup-4e5k___O.js";
|
|
3
|
+
import { t as Manager } from "./Manager-DsNvecSe.js";
|
|
4
|
+
import { t as CameraStream } from "./camera-Bzi6CMAW.js";
|
|
5
|
+
import { t as ActorRefFrom } from "./Actor-D3GOC38V.js";
|
|
6
|
+
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-BFurBmbZ.js";
|
|
7
|
+
import { r as FlowModuleConfig, t as Flow } from "./types-seztsdvN.js";
|
|
8
8
|
|
|
9
9
|
//#region ../infra/src/capabilities/IFaceDetectionCapability.d.ts
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as addEvent, n as eventModuleNames } from "./events-3HzCcoEy.esm.js";
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
3
|
-
import { A as createManager, O as requestCameraAccess, S as StreamCanvasCapture, d as OpenViduRecordingProvider, k as stopCameraStream, p as LocalRecordingProvider, s as FaceDetectionProvider, x as StreamCanvasProcessingSession } from "./src-
|
|
2
|
+
import { t as getBackCameraStream } from "./backCameraStream-DDzfvhxo.esm.js";
|
|
3
|
+
import { A as createManager, O as requestCameraAccess, S as StreamCanvasCapture, d as OpenViduRecordingProvider, k as stopCameraStream, p as LocalRecordingProvider, s as FaceDetectionProvider, x as StreamCanvasProcessingSession } from "./src-D0bFtylT.esm.js";
|
|
4
4
|
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-CcoTezCZ.esm.js";
|
|
5
|
-
import { a as uploadDeepsightVideo, i as stopRecording$1, l as getDeviceClass, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-
|
|
5
|
+
import { a as uploadDeepsightVideo, i as stopRecording$1, l as getDeviceClass, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-BjxVqrJP.esm.js";
|
|
6
6
|
import { r as getToken, t as api } from "./api-C2uzxrpN.esm.js";
|
|
7
7
|
import { t as endpoints } from "./endpoints-IAlXA1zN.esm.js";
|
|
8
8
|
import { t as addDeviceStats } from "./stats-kLtQIgsA.esm.js";
|
|
@@ -445,7 +445,7 @@ async function stopRecording(session) {
|
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
async function initializeDeepsightSession(options) {
|
|
448
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
448
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-IPtIRYqd.esm.js");
|
|
449
449
|
return loadDeepsightSession({
|
|
450
450
|
ds: options.ds,
|
|
451
451
|
storage: options.storage
|
package/dist/flow.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as WasmPipeline } from "./warmup-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import "./camera-
|
|
4
|
-
import { t as AnyStateMachine } from "./StateMachine-
|
|
5
|
-
import "./types-
|
|
6
|
-
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-
|
|
7
|
-
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-
|
|
1
|
+
import { n as WasmPipeline } from "./warmup-4e5k___O.js";
|
|
2
|
+
import { t as Manager } from "./Manager-DsNvecSe.js";
|
|
3
|
+
import "./camera-Bzi6CMAW.js";
|
|
4
|
+
import { t as AnyStateMachine } from "./StateMachine-BFurBmbZ.js";
|
|
5
|
+
import "./types-BHnsBsl_.js";
|
|
6
|
+
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-seztsdvN.js";
|
|
7
|
+
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-BiICW3B-.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/flow/flowUtils.d.ts
|
|
10
10
|
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,88 +1,10 @@
|
|
|
1
|
-
import { A as createManager } from "./src-
|
|
1
|
+
import { A as createManager } from "./src-D0bFtylT.esm.js";
|
|
2
2
|
import { a as createActor, i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-CcoTezCZ.esm.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
3
|
+
import "./api-C2uzxrpN.esm.js";
|
|
4
|
+
import "./endpoints-IAlXA1zN.esm.js";
|
|
5
|
+
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-B5YbZJ7r.esm.js";
|
|
6
|
+
import { t as getFinishStatus } from "./flowCompletionService-D1bhU2uN.esm.js";
|
|
6
7
|
|
|
7
|
-
//#region src/modules/flow/flowUtils.ts
|
|
8
|
-
const WASM_MODULE_PIPELINES = {
|
|
9
|
-
SELFIE: "selfie",
|
|
10
|
-
AUTHENTICATION: "selfie",
|
|
11
|
-
FACE_MATCH: "selfie",
|
|
12
|
-
VIDEO_ONBOARDING: "selfie",
|
|
13
|
-
ID: "idCapture",
|
|
14
|
-
TUTORIAL_ID: "idCapture",
|
|
15
|
-
SECOND_ID: "idCapture"
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Analyzes a flow configuration and returns the WASM pipelines needed.
|
|
19
|
-
* Use this to conditionally warmup WASM only when required by the flow.
|
|
20
|
-
*
|
|
21
|
-
* @param flow - The flow configuration from /omni/onboarding/flow
|
|
22
|
-
* @returns Array of WASM pipelines needed (e.g., ['selfie', 'idCapture'])
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* const pipelines = getRequiredWasmPipelines(flow);
|
|
27
|
-
* if (pipelines.length > 0) {
|
|
28
|
-
* warmupWasm({ ...wasmConfig, pipelines });
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
function getRequiredWasmPipelines(flow) {
|
|
33
|
-
const pipelines = /* @__PURE__ */ new Set();
|
|
34
|
-
for (const module of flow.flowModules) {
|
|
35
|
-
const pipeline = WASM_MODULE_PIPELINES[module.key];
|
|
36
|
-
if (pipeline) pipelines.add(pipeline);
|
|
37
|
-
}
|
|
38
|
-
return [...pipelines];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Normalizes flow modules by expanding TUTORIAL_ID into ID + SECOND_ID
|
|
42
|
-
* based on configuration flags. Matches legacy flowService behavior.
|
|
43
|
-
*
|
|
44
|
-
* - TUTORIAL_ID becomes ID (with same config)
|
|
45
|
-
* - If secondId: true, adds SECOND_ID module with isSecondId: true
|
|
46
|
-
* - thirdId is deprecated and ignored; the flow continues to the next step
|
|
47
|
-
* - Bare ID following TUTORIAL_ID is dropped (already merged)
|
|
48
|
-
*/
|
|
49
|
-
function normalizeFlowModules(modules) {
|
|
50
|
-
return modules.flatMap((module, idx, arr) => {
|
|
51
|
-
if (module.key === "TUTORIAL_ID") {
|
|
52
|
-
const idConfig = module.configuration;
|
|
53
|
-
const result = [{
|
|
54
|
-
key: "ID",
|
|
55
|
-
configuration: idConfig
|
|
56
|
-
}];
|
|
57
|
-
if (idConfig.secondId) result.push({
|
|
58
|
-
key: "SECOND_ID",
|
|
59
|
-
configuration: {
|
|
60
|
-
...idConfig,
|
|
61
|
-
isSecondId: true
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return result;
|
|
65
|
-
}
|
|
66
|
-
const prev = arr[idx - 1];
|
|
67
|
-
if (module.key === "ID" && prev?.key === "TUTORIAL_ID") return [];
|
|
68
|
-
return [module];
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/modules/flow/flowServices.ts
|
|
74
|
-
const getFlow = async (signal) => {
|
|
75
|
-
const res = await api.get(endpoints.flow, { signal });
|
|
76
|
-
if (!res.ok) throw new Error(`GET /flow failed: ${res.status} ${res.statusText}`);
|
|
77
|
-
const data = res.data;
|
|
78
|
-
const normalizedModules = normalizeFlowModules(data.flowModules ?? []);
|
|
79
|
-
return {
|
|
80
|
-
...data,
|
|
81
|
-
flowModules: normalizedModules
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
//#endregion
|
|
86
8
|
//#region src/modules/flow/flowStateMachine.ts
|
|
87
9
|
const flowMachine = setup({
|
|
88
10
|
types: {
|