@incodetech/core 2.4.1-agentic.4 → 2.4.1-agentic.6
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/DateFormattingProvider-DPq9zco-.esm.js +25 -0
- package/dist/{FaceDetectionProvider-CuWUIxqF.esm.js → FaceDetectionProvider-DjXSD4uI.esm.js} +7 -7
- package/dist/addressSearch-D6cKPWmk.esm.js +72 -0
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-BObuHBjn.esm.js → antifraudManager-CbIwM35x.esm.js} +2 -2
- package/dist/{antifraudStateMachine-Dfrd2-26.esm.js → antifraudStateMachine-qNNXrlsP.esm.js} +1 -1
- package/dist/{api-CpP4PS4S.esm.js → api-C_P9YXbL.esm.js} +1 -0
- package/dist/{apiError-CUF7K_XZ.esm.js → apiError-DzZ5OriE.esm.js} +1 -1
- package/dist/{attemptCarry-WOkfvFMw.esm.js → attemptCarry-BaAXPR_w.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-PlKb1nOo.esm.js → authenticationManager-B-l8_8tH.esm.js} +4 -4
- package/dist/{authenticationManager-CWmh7aSY.d.ts → authenticationManager-DKLRA91K.d.ts} +1 -1
- package/dist/{authenticationStateMachine-BFR0oKdS.esm.js → authenticationStateMachine-Cg00UH7p.esm.js} +3 -3
- package/dist/{browser-pQZA35G2-C0fRj-ID.esm.js → browser-pQZA35G2-DJEJnmCd.esm.js} +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-IRO_1Ug6.esm.js → certificateIssuanceManager-CrF3wjCH.esm.js} +2 -2
- package/dist/{certificateIssuanceStateMachine-CjxTBZuH.esm.js → certificateIssuanceStateMachine-uSD9IkcV.esm.js} +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-DMlSL6Ax.esm.js → consentManager-BD7wwgat.esm.js} +2 -2
- package/dist/{consentManager-D8rgr5Dv.d.ts → consentManager-DXetSxcx.d.ts} +5 -5
- package/dist/{consentStateMachine-DIYSMxKQ.esm.js → consentStateMachine-BAiLDE3D.esm.js} +1 -1
- package/dist/{cpf-uAZTPUBy.esm.js → cpf-BIADjddF.esm.js} +1 -25
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-BFTdiEDB.esm.js → crossDocumentDataMatchManager-CUc1uACE.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-z8428oCM.d.ts → curpValidationManager-Crz3bnCo.d.ts} +1 -1
- package/dist/{curpValidationManager-DNpC3wyf.esm.js → curpValidationManager-DBfZSQbu.esm.js} +2 -2
- package/dist/{curpValidationStateMachine-B3iVsDyt.esm.js → curpValidationStateMachine-DyAEyScb.esm.js} +2 -2
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-CvI-pDT3.esm.js → customFieldsManager-BZhIPyaY.esm.js} +2 -2
- package/dist/{customWatchlistManager-BuHtUb0y.esm.js → customWatchlistManager-B4cmxi__.esm.js} +2 -2
- package/dist/{customWatchlistStateMachine-CiVD9wyF.esm.js → customWatchlistStateMachine-ZZoDGRAZ.esm.js} +1 -1
- package/dist/{deepsightLoader-DkADlKGZ.esm.js → deepsightLoader-S0ktD2dZ.esm.js} +3 -3
- package/dist/{addressSearch-DzbE9Ogt.esm.js → definitionSource-1vPLtuXE.esm.js} +1 -72
- package/dist/{desktopCameraElection-BGMtYwk3.esm.js → desktopCameraElection-m2dAj6Zu.esm.js} +1 -1
- package/dist/document-capture.d.ts +1 -1
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-CD5iQiUI.d.ts → documentCaptureManager-DDfviFg0.d.ts} +1 -1
- package/dist/{documentCaptureManager-DLPqruXJ.esm.js → documentCaptureManager-v57klTso.esm.js} +2 -2
- package/dist/{documentCaptureStateMachine-DCvWQhFG.esm.js → documentCaptureStateMachine-CgCtimSa.esm.js} +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-CzEx6NHv.esm.js → dynamicFormsManager-BKAlol5I.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-uy2rO9_-.esm.js → dynamicFormsStateMachine-DTyEVRIb.esm.js} +2 -2
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +2 -2
- package/dist/{ekybManager-DpeuX31I.esm.js → ekybManager-BYFWVBTW.esm.js} +2 -2
- package/dist/{ekybStateMachine-CDBsMLvu.esm.js → ekybStateMachine-CxSx0HNz.esm.js} +6 -4
- package/dist/ekyc-prefill.d.ts +17 -0
- package/dist/ekyc-prefill.esm.js +3 -0
- package/dist/ekyc.d.ts +2 -2
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DymCvmVB.esm.js → ekycManager-Bwv-qYAZ.esm.js} +2 -2
- package/dist/{ekycManager-DlGIn9wA.d.ts → ekycManager-CERRvIfg.d.ts} +1 -1
- package/dist/ekycPrefillManager-CbI1rTKP.esm.js +102 -0
- package/dist/ekycPrefillManager-DHfC1T9s.d.ts +565 -0
- package/dist/ekycPrefillStateMachine-ClGEAsOy.esm.js +686 -0
- package/dist/ekycRules-B7vXnbdg.esm.js +319 -0
- package/dist/{ekycStateMachine-CoFCUJ2z.esm.js → ekycStateMachine-DlN1RCob.esm.js} +418 -533
- package/dist/{ekycUtils-GRuMELYr.esm.js → ekycUtils-K6VJXnOg.esm.js} +18 -6
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DM_e0gFI.esm.js → electronicSignatureManager-Co_sso4-.esm.js} +3 -3
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-CGoE3CUe.esm.js → emailManager-BSaGg1Gl.esm.js} +2 -2
- package/dist/{emailStateMachine-KgHfDNvM.esm.js → emailStateMachine-CaoPZtZN.esm.js} +2 -2
- package/dist/{events-ggpBBaZ8.esm.js → events-kU5WJU4B.esm.js} +1 -1
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +15 -14
- package/dist/extensibility.esm.js +36 -35
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-D9bwl07b.esm.js → faceCaptureManagerFactory-ErFltb83.esm.js} +2 -2
- package/dist/{faceCaptureManagerFactory-DV2ULUYS.d.ts → faceCaptureManagerFactory-ZudYP6Qp.d.ts} +3 -3
- package/dist/{faceCaptureSetup-DgPLnOKa.esm.js → faceCaptureSetup-D9VsC504.esm.js} +9 -9
- package/dist/{faceMatchManager-D2xKPjjQ.esm.js → faceMatchManager-qPJsa5Ac.esm.js} +2 -2
- package/dist/{faceMatchStateMachine-CUvwiQi9.esm.js → faceMatchStateMachine-D90ZHY1r.esm.js} +2 -2
- package/dist/{feature-management-Yfp00gNu.esm.js → feature-management-TNTHwnkm.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-DgDbEeFZ.esm.js → fieldComparisonManager-BLLj_Ey1.esm.js} +2 -2
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-BZeklojR.esm.js → fiscalQrManager-Bh3rxb7Y.esm.js} +2 -2
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +9 -8
- package/dist/flow.esm.js +46 -10
- package/dist/{flowCompletionService-fJuLyBEb.esm.js → flowCompletionService-BvoiqVJA.esm.js} +2 -2
- package/dist/{flowServices-DORczGzA.esm.js → flowServices-BkrZ4ZU5.esm.js} +8 -8
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-C6Gt3ePt.esm.js → geolocationManager-hU9kxsr8.esm.js} +2 -2
- package/dist/{geolocationStateMachine-Dw6D4uRM.esm.js → geolocationStateMachine-DyYMzzIb.esm.js} +3 -3
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-CjChjZ3C.esm.js → governmentValidationManager-D5HkBqfr.esm.js} +2 -2
- package/dist/{governmentValidationStateMachine-AEbn3Afi.esm.js → governmentValidationStateMachine-BwMClTqC.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id-ocr.esm.js +3 -19
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +6 -6
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-CCA2D1Ah.d.ts → idCaptureManager-NRGuCVv2.d.ts} +2 -2
- package/dist/{idCaptureManager-DymxK9jy.esm.js → idCaptureManager-Xxlpem7N.esm.js} +6 -6
- package/dist/{idCaptureServices-TSSPG-WW.esm.js → idCaptureServices-199UFURA.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-BBF-qMAd.esm.js → idCaptureStateMachine-Bv-dhwgK.esm.js} +42 -14
- package/dist/idOcrCpfUtils-Nfln1Psb.esm.js +18 -0
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-B5xeI2lg.d.ts} +3 -3
- package/dist/{idOcrManager-xyEZNOBa.esm.js → idOcrManager-BMK2oou0.esm.js} +2 -2
- package/dist/{idOcrStateMachine-DNKXh4Rn.esm.js → idOcrStateMachine-RjNycN07.esm.js} +8 -7
- package/dist/{idVerificationManager-DdnvYfgN.esm.js → idVerificationManager-4wY-Ee4j.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-DtIBCa32.esm.js → idVerificationStateMachine-Bj00uWvh.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-CcpovlfD.esm.js → identityReuseManager-CCZ-ES2E.esm.js} +2 -2
- package/dist/{identityReuseManager-B1birg5X.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +4 -4
- package/dist/{identityReuseStateMachine-DxZFWy47.esm.js → identityReuseStateMachine-BtpkGpYZ.esm.js} +1 -1
- package/dist/{index-DC0P2Vzw.d.ts → index-BGnYn_4J.d.ts} +1 -1
- package/dist/{index-BfSZvEHi.d.ts → index-DlVDVTcf.d.ts} +34 -18
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-BJ0GVHGr.esm.js → invokeOnCaptureCallback-BkvXSZfa.esm.js} +1 -1
- package/dist/kyb-checks.esm.js +2 -2
- package/dist/{kybChecksManager-CDHqbT9w.esm.js → kybChecksManager-CEEih5pC.esm.js} +1 -1
- package/dist/{kybChecksStateMachine-CzkwMKKB.esm.js → kybChecksStateMachine-DOE71Lv7.esm.js} +5 -4
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-B4vCYslr.esm.js → mandatoryConsentManager-BBeOo3Sz.esm.js} +2 -2
- package/dist/{mandatoryConsentManager-9PHQGri5.d.ts → mandatoryConsentManager-MhZYQg10.d.ts} +6 -6
- package/dist/{mandatoryConsentStateMachine-DWslYPA3.esm.js → mandatoryConsentStateMachine-BJEyS63E.esm.js} +1 -1
- package/dist/{multipartRecordingService-BTqkHGG9.esm.js → multipartRecordingService-2iVLb-2Y.esm.js} +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneFormat-JJNaWthV.esm.js → phoneFormat-DEpESpz2.esm.js} +13 -1
- package/dist/{phoneManager-Dy5tODCU.esm.js → phoneManager-BylOWecM.esm.js} +2 -2
- package/dist/{phoneServices-DJgyOzU2.esm.js → phoneServices-Crge7uSV.esm.js} +1 -1
- package/dist/{phoneStateMachine-DnlPhnw7.esm.js → phoneStateMachine-CHnhCS-4.esm.js} +2 -2
- package/dist/{processFaceMatch-Bst83HaS.esm.js → processFaceMatch-BveUAHts.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-CTko6Cjn.esm.js → recordingService-DKXaaOHO.esm.js} +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-CCSNyi19.esm.js → redirectToMobileManager-DUpLyXsq.esm.js} +2 -2
- package/dist/{redirectToMobileStateMachine-BKyOdAUe.esm.js → redirectToMobileStateMachine-D0DW4y-f.esm.js} +1 -1
- package/dist/{resolveForm-O7-r79VA.esm.js → resolveForm-f9PhUo9j.esm.js} +1 -209
- package/dist/{runChildModule-WaHpne_n.esm.js → runChildModule-CDixuH1W.esm.js} +2 -2
- package/dist/{sdkVersion-D0wnG9m1.esm.js → sdkVersion-BNA7_9wn.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +9 -9
- package/dist/{selfieErrorUtils-Sd36xaui.esm.js → selfieErrorUtils-Geee35WF.esm.js} +1 -1
- package/dist/{selfieManager-DmZFzs1-.d.ts → selfieManager-BPOlD-UN.d.ts} +1 -1
- package/dist/{selfieManager-Q23b7zS_.esm.js → selfieManager-DVWFz5tv.esm.js} +4 -4
- package/dist/{selfieStateMachine-BzSAxwIs.esm.js → selfieStateMachine-D9KQUtMs.esm.js} +3 -3
- package/dist/{session-XoKY3xHd.esm.js → session-DoFzV1FT.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-CN9C6ItC.esm.js → sessionInitializer-DOZzSzqm.esm.js} +7 -7
- package/dist/{setup-W-Tho5PO.esm.js → setup-B6WhRfCS.esm.js} +10 -13
- package/dist/{setup-CmqnkqsR.d.ts → setup-prV5HQCQ.d.ts} +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-CwqjcxPg.esm.js → signatureManager-QlegdTo3.esm.js} +2 -2
- package/dist/{signatureStateMachine-DBVDd1Eu.esm.js → signatureStateMachine-DFbbbFwg.esm.js} +1 -1
- package/dist/{stats-CatA2dea.esm.js → stats-Bv5PiWvo.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/step-up.d.ts +15 -21
- package/dist/step-up.esm.js +17 -26
- package/dist/{tri-6laLcIfQ.esm.js → tri-B9aoyV2Z.esm.js} +3 -32
- package/dist/tri.d.ts +1 -1
- package/dist/tri.esm-DgtAka_v.esm.js +2145 -0
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-BPs_VmAj.esm.js → trueSightService-nGcZHLsZ.esm.js} +3 -3
- package/dist/trust-graph.esm.js +1 -1
- package/dist/{types-Csh8vzPo.d.ts → types-0Rr7etmf.d.ts} +1 -1
- package/dist/types-B2M1IPZn.d.ts +6 -0
- package/dist/{types-BEVHQbbC.d.ts → types-BD9sV5oG.d.ts} +1 -1
- package/dist/{types-CuMJ2M7D.d.ts → types-BaDx6utW.d.ts} +4 -1
- package/dist/{types-BPm1JSu7.d.ts → types-BpJ21a4T.d.ts} +1 -1
- package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
- package/dist/{types-CRaFu6wS.d.ts → types-CquDWYfv.d.ts} +6 -2
- package/dist/types-D9vIGFbl.d.ts +115 -0
- package/dist/{types-Cd0J0F9D.d.ts → types-NMBsvLIN.d.ts} +1 -1
- package/dist/usStates-CwOQ2kAx.esm.js +209 -0
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +6 -6
- package/dist/{videoSelfieCameraWarmer-DWGX1ByR.esm.js → videoSelfieCameraWarmer-BH8HH2Yo.esm.js} +4 -4
- package/dist/{videoSelfieStepDetector-Dv3Mgws-.d.ts → videoSelfieStepDetector-B78BE_x9.d.ts} +2 -2
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +1 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-DqUpAEj_.esm.js → watchlistForBusinessManager-DOYmIiaj.esm.js} +2 -2
- package/dist/{watchlistForBusinessStateMachine-DdaPl2PS.esm.js → watchlistForBusinessStateMachine-D8qIyL8w.esm.js} +1 -1
- package/dist/{watchlistManager-CdpXzT4B.esm.js → watchlistManager-BJGLRv-x.esm.js} +2 -2
- package/dist/{watchlistStateMachine-ofHW_lPk.esm.js → watchlistStateMachine-DeLfuGSl.esm.js} +1 -1
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.esm.js +42 -36
- package/package.json +6 -1
- package/dist/tri.esm-DgTlfPhR.esm.js +0 -3838
- package/dist/types-J6g6iKe_.d.ts +0 -6
package/dist/step-up.esm.js
CHANGED
|
@@ -8,13 +8,9 @@ function permissionsFirst(context) {
|
|
|
8
8
|
function allScopeNames(permissions) {
|
|
9
9
|
return permissions.scopes.map((scope) => scope.name);
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
function isLockedScope(scope) {
|
|
13
|
-
return scope.selectionMode === "auto-select";
|
|
14
|
-
}
|
|
15
|
-
/** The scopes that start ticked (`autoSelect` or locked), in class order. */
|
|
11
|
+
/** The scopes that start ticked (`autoSelect` or `auto-select`), in class order. */
|
|
16
12
|
function preselectedScopes(permissions) {
|
|
17
|
-
return permissions.scopes.filter((scope) => scope.autoSelect === true ||
|
|
13
|
+
return permissions.scopes.filter((scope) => scope.autoSelect === true || scope.selectionMode === "auto-select").map((scope) => scope.name);
|
|
18
14
|
}
|
|
19
15
|
/** The agent class's scopes that `approvedScopes` names, in the class order. */
|
|
20
16
|
function knownScopes(permissions, approvedScopes) {
|
|
@@ -32,8 +28,8 @@ function knownScopes(permissions, approvedScopes) {
|
|
|
32
28
|
* (`HOSTED_FINISHED` / `HOSTED_DENIED`).
|
|
33
29
|
* - `permissions` — the scope checkboxes; the ones Incode marked `autoSelect`
|
|
34
30
|
* start checked (from the agent class's scope selection modes), the rest
|
|
35
|
-
* unchecked, and Approve needs at least
|
|
36
|
-
*
|
|
31
|
+
* unchecked. The person may untick any of them, and Approve needs at least
|
|
32
|
+
* one.
|
|
37
33
|
* - `savingPermissions` — only when the host saves the choice: waits for it,
|
|
38
34
|
* then runs the face check (`beforeFaceCheck`) or finishes. A failed save
|
|
39
35
|
* is `error` (`VERIFICATION_ERROR`, `detail.code` `PERMISSIONS_NOT_SAVED`).
|
|
@@ -67,8 +63,7 @@ const stepUpMachine = setup({
|
|
|
67
63
|
toggleScope: assign(({ context, event }) => {
|
|
68
64
|
const { name } = event;
|
|
69
65
|
const known = allScopeNames(context.permissions);
|
|
70
|
-
|
|
71
|
-
if (!scope || isLockedScope(scope)) return {};
|
|
66
|
+
if (!context.permissions.scopes.find((candidate) => candidate.name === name)) return {};
|
|
72
67
|
const selected = new Set(context.selectedScopes);
|
|
73
68
|
if (selected.has(name)) selected.delete(name);
|
|
74
69
|
else selected.add(name);
|
|
@@ -248,7 +243,7 @@ function invalid(message, stepUpId) {
|
|
|
248
243
|
throw new StepUpError("INVALID_OPTIONS", message, stepUpId);
|
|
249
244
|
}
|
|
250
245
|
function normalizeScope(raw, index) {
|
|
251
|
-
if (!isRecord$1(raw) || !isNonEmptyString(raw.name)) invalid(`
|
|
246
|
+
if (!isRecord$1(raw) || !isNonEmptyString(raw.name)) invalid(`consent.scopes[${index}].name must be a non-empty string`);
|
|
252
247
|
const displayName = optionalString(raw.displayName);
|
|
253
248
|
const description = optionalString(raw.description);
|
|
254
249
|
const autoSelect = typeof raw.autoSelect === "boolean" ? raw.autoSelect : void 0;
|
|
@@ -287,22 +282,21 @@ function normalizeLimits(raw, scopeNames) {
|
|
|
287
282
|
return Object.keys(limits).length > 0 ? limits : void 0;
|
|
288
283
|
}
|
|
289
284
|
/**
|
|
290
|
-
* Checks the
|
|
285
|
+
* Checks the consent block from the start response and fills in
|
|
291
286
|
* `displayName` (falls back to the scope name). Keeps each scope's boolean
|
|
292
287
|
* `autoSelect` and known `selectionMode`, and the valid limits of known
|
|
293
|
-
* scopes.
|
|
294
|
-
* `
|
|
295
|
-
* given but not a positive number.
|
|
288
|
+
* scopes. Throws `INVALID_OPTIONS` when a required field is missing, or
|
|
289
|
+
* `durationSeconds` is not a positive number.
|
|
296
290
|
*/
|
|
297
291
|
function normalizeStepUpPermissions(raw) {
|
|
298
|
-
if (!isRecord$1(raw)) invalid("
|
|
292
|
+
if (!isRecord$1(raw)) invalid("consent is required");
|
|
299
293
|
const scopesRaw = raw.scopes;
|
|
300
|
-
if (!Array.isArray(scopesRaw) || scopesRaw.length === 0) invalid("
|
|
294
|
+
if (!Array.isArray(scopesRaw) || scopesRaw.length === 0) invalid("consent.scopes must list at least one scope");
|
|
301
295
|
const scopes = scopesRaw.map(normalizeScope);
|
|
302
296
|
const names = new Set(scopes.map((scope) => scope.name));
|
|
303
|
-
if (names.size !== scopes.length) invalid("
|
|
297
|
+
if (names.size !== scopes.length) invalid("consent.scopes must not repeat a scope name");
|
|
304
298
|
const { durationSeconds } = raw;
|
|
305
|
-
if (
|
|
299
|
+
if (typeof durationSeconds !== "number" || !Number.isFinite(durationSeconds) || durationSeconds <= 0) invalid("consent.durationSeconds must be a positive number");
|
|
306
300
|
const agentClassId = optionalString(raw.agentClassId);
|
|
307
301
|
const purpose = optionalString(raw.purpose);
|
|
308
302
|
const limits = normalizeLimits(raw.limits, names);
|
|
@@ -311,7 +305,7 @@ function normalizeStepUpPermissions(raw) {
|
|
|
311
305
|
...purpose ? { purpose } : {},
|
|
312
306
|
scopes,
|
|
313
307
|
...limits ? { limits } : {},
|
|
314
|
-
|
|
308
|
+
durationSeconds
|
|
315
309
|
};
|
|
316
310
|
}
|
|
317
311
|
/**
|
|
@@ -363,7 +357,7 @@ function validateStepUpOptions(raw) {
|
|
|
363
357
|
if (raw.disableDashboardTheme !== void 0 && typeof raw.disableDashboardTheme !== "boolean") invalid("disableDashboardTheme must be a boolean when given", stepUpId);
|
|
364
358
|
let permissions;
|
|
365
359
|
try {
|
|
366
|
-
permissions = normalizeStepUpPermissions(raw.
|
|
360
|
+
permissions = normalizeStepUpPermissions(raw.consent);
|
|
367
361
|
} catch (error) {
|
|
368
362
|
invalid(error instanceof Error ? error.message : String(error), stepUpId);
|
|
369
363
|
}
|
|
@@ -405,10 +399,9 @@ const UNITS = [
|
|
|
405
399
|
* Picks the largest unit that divides the duration exactly, so
|
|
406
400
|
* 36000 s → 10 hours, 5400 s → 90 minutes. A duration that is not a whole
|
|
407
401
|
* number of minutes is rounded up to minutes (never shown shorter than it is),
|
|
408
|
-
* and anything under a minute stays in seconds.
|
|
402
|
+
* and anything under a minute stays in seconds.
|
|
409
403
|
*/
|
|
410
404
|
function describeStepUpDuration(durationSeconds) {
|
|
411
|
-
if (durationSeconds === void 0) return void 0;
|
|
412
405
|
const seconds = Math.ceil(durationSeconds);
|
|
413
406
|
for (const { unit, seconds: size } of UNITS) if (seconds >= size && seconds % size === 0) return {
|
|
414
407
|
unit,
|
|
@@ -440,7 +433,6 @@ function readWorkflowResult(result) {
|
|
|
440
433
|
}
|
|
441
434
|
function toPermissionsState(context, saving) {
|
|
442
435
|
const { permissions, selectedScopes } = context;
|
|
443
|
-
const duration = describeStepUpDuration(permissions.durationSeconds);
|
|
444
436
|
return {
|
|
445
437
|
status: "permissions",
|
|
446
438
|
...permissions.purpose ? { purpose: permissions.purpose } : {},
|
|
@@ -449,11 +441,10 @@ function toPermissionsState(context, saving) {
|
|
|
449
441
|
return {
|
|
450
442
|
...scope,
|
|
451
443
|
checked: selectedScopes.includes(scope.name),
|
|
452
|
-
locked: isLockedScope(scope),
|
|
453
444
|
...limit ? { limit } : {}
|
|
454
445
|
};
|
|
455
446
|
}),
|
|
456
|
-
|
|
447
|
+
duration: describeStepUpDuration(permissions.durationSeconds),
|
|
457
448
|
canApprove: selectedScopes.length > 0,
|
|
458
449
|
saving
|
|
459
450
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
1
|
+
import { t as SDK_VERSION } from "./sdkVersion-BNA7_9wn.esm.js";
|
|
2
2
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
3
3
|
import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
|
|
4
4
|
//#region ../infra/src/providers/browser/TransactionalRiskIntelligenceProvider.ts
|
|
@@ -8,7 +8,7 @@ const LAZY_IMPORT_OPTIONS = {
|
|
|
8
8
|
timeoutMs: 1e4,
|
|
9
9
|
disabledMessage: "TRI will be disabled for this session."
|
|
10
10
|
};
|
|
11
|
-
const importSdk = () => import("./tri.esm-
|
|
11
|
+
const importSdk = () => import("./tri.esm-DgtAka_v.esm.js");
|
|
12
12
|
/**
|
|
13
13
|
* Concrete implementation of {@link ITransactionalRiskIntelligenceCapability}.
|
|
14
14
|
*
|
|
@@ -266,40 +266,11 @@ async function initializeTRI(config, options = {}) {
|
|
|
266
266
|
return isTRIStarted() ? "started" : "ready";
|
|
267
267
|
}
|
|
268
268
|
sdkOwnsTRI = true;
|
|
269
|
-
const state = await setupTRI(
|
|
269
|
+
const state = await setupTRI(resolvedTriConfig);
|
|
270
270
|
if (isTRIStarted() && options.sessionToken) await linkSessionWithTRI(options.sessionToken);
|
|
271
271
|
return state;
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
274
|
-
* SDK 2 first: its runtime already collects the fingerprint, so TRI does not
|
|
275
|
-
* load a second fpSignals module, and the SDK passes its own results to TRI
|
|
276
|
-
* (`addTRIFpSignals`). The host's `layers` or `collectors` choice is kept.
|
|
277
|
-
*/
|
|
278
|
-
function withoutFpSignals(config) {
|
|
279
|
-
if (config.layers) return {
|
|
280
|
-
...config,
|
|
281
|
-
layers: {
|
|
282
|
-
...config.layers,
|
|
283
|
-
"device-fingerprinting": false
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
if (config.collectors) return {
|
|
287
|
-
...config,
|
|
288
|
-
collectors: {
|
|
289
|
-
...config.collectors,
|
|
290
|
-
fpsignals: { enabled: false }
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
return {
|
|
294
|
-
...config,
|
|
295
|
-
layers: {
|
|
296
|
-
session: true,
|
|
297
|
-
behavioral: true,
|
|
298
|
-
"device-fingerprinting": false
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
274
|
* TRI's fpSignals PID and DEVICE results, waiting at most
|
|
304
275
|
* {@link FP_SIGNALS_WAIT_MS} for the module to finish. Resolves `null` when
|
|
305
276
|
* TRI is not started, its `fpsignals` collector is off or failed (CSP, load
|
package/dist/tri.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as setupTRI, c as TransactionalRiskIntelligenceSetupConfig, i as resetTRI, n as getTRIActivityId, o as startTRI, r as isTRIStarted, s as stopTRI, t as createTRISession } from "./index-
|
|
1
|
+
import { a as setupTRI, c as TransactionalRiskIntelligenceSetupConfig, i as resetTRI, n as getTRIActivityId, o as startTRI, r as isTRIStarted, s as stopTRI, t as createTRISession } from "./index-DlVDVTcf.js";
|
|
2
2
|
export { type TransactionalRiskIntelligenceSetupConfig, createTRISession, getTRIActivityId, isTRIStarted, resetTRI, setupTRI, startTRI, stopTRI };
|