vesant-sdk 1.6.6-next.ac58d2b → 1.7.0-dev.059da4f
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/README.md +4 -4
- package/dist/client-C3DCmGe9.d.ts +436 -0
- package/dist/{client-D6PE3pcB.d.mts → client-DMIRx7Tu.d.mts} +4 -2
- package/dist/{client-DPtiuQvW.d.ts → client-DoMSYMMR.d.ts} +4 -2
- package/dist/client-ZNdnpWe7.d.mts +436 -0
- package/dist/compliance/index.d.mts +25 -429
- package/dist/compliance/index.d.ts +25 -429
- package/dist/compliance/index.js +181 -79
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +181 -80
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.d.mts +1 -1
- package/dist/decisions/index.d.ts +1 -1
- package/dist/decisions/index.js +1 -1
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +1 -1
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +3 -3
- package/dist/geolocation/index.d.ts +3 -3
- package/dist/geolocation/index.js +2 -1
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +2 -1
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +269 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +268 -94
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +3 -3
- package/dist/kyc/core.d.ts +3 -3
- package/dist/kyc/core.js +77 -15
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +77 -16
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +267 -26
- package/dist/kyc/index.d.ts +267 -26
- package/dist/kyc/index.js +77 -15
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +77 -16
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +45 -8
- package/dist/react.d.ts +45 -8
- package/dist/react.js +874 -272
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +873 -271
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +3 -3
- package/dist/risk-profile/index.d.ts +3 -3
- package/dist/risk-profile/index.js +1 -1
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +1 -1
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.d.mts +1 -1
- package/dist/scores/index.d.ts +1 -1
- package/dist/scores/index.js +1 -1
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +1 -1
- package/dist/scores/index.mjs.map +1 -1
- package/dist/tax/index.d.mts +41 -1
- package/dist/tax/index.d.ts +41 -1
- package/dist/tax/index.js +13 -1
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +13 -1
- package/dist/tax/index.mjs.map +1 -1
- package/dist/{types-DGDVnogO.d.mts → types-BOFaMQxI.d.mts} +2 -2
- package/dist/{types-B4Ezqo7V.d.mts → types-CBQRNL-l.d.mts} +14 -1
- package/dist/{types-B4Ezqo7V.d.ts → types-CBQRNL-l.d.ts} +14 -1
- package/dist/{types-_YQdS3Ax.d.ts → types-UGyDl1fd.d.ts} +2 -2
- package/dist/webhooks/index.d.mts +12 -4
- package/dist/webhooks/index.d.ts +12 -4
- package/package.json +1 -1
package/dist/kyc/core.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CheckKycStatusRequest, CheckKycStatusResponse,
|
|
2
|
-
export {
|
|
3
|
-
export { P as PaginationParams, R as RiskLevel } from '../types-
|
|
1
|
+
export { CheckKycStatusRequest, CheckKycStatusResponse, CreateEventBasedFaceVerificationSessionRequest, CreateEventBasedFaceVerificationSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, EventBasedFaceVerificationCallback, EventBasedFaceVerificationDeviceType, EventBasedFaceVerificationEvent, EventBasedFaceVerificationFrequencyTrigger, EventBasedFaceVerificationReactionResult, EventBasedFaceVerificationReactions, EventBasedFaceVerificationThresholdTrigger, EventBasedFaceVerificationTriggers, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.mjs';
|
|
2
|
+
export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-BOFaMQxI.mjs';
|
|
3
|
+
export { P as PaginationParams, R as RiskLevel } from '../types-CBQRNL-l.mjs';
|
|
4
4
|
import '../client-BolQlL5e.mjs';
|
package/dist/kyc/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CheckKycStatusRequest, CheckKycStatusResponse,
|
|
2
|
-
export {
|
|
3
|
-
export { P as PaginationParams, R as RiskLevel } from '../types-
|
|
1
|
+
export { CheckKycStatusRequest, CheckKycStatusResponse, CreateEventBasedFaceVerificationSessionRequest, CreateEventBasedFaceVerificationSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, EventBasedFaceVerificationCallback, EventBasedFaceVerificationDeviceType, EventBasedFaceVerificationEvent, EventBasedFaceVerificationFrequencyTrigger, EventBasedFaceVerificationReactionResult, EventBasedFaceVerificationReactions, EventBasedFaceVerificationThresholdTrigger, EventBasedFaceVerificationTriggers, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.js';
|
|
2
|
+
export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-UGyDl1fd.js';
|
|
3
|
+
export { P as PaginationParams, R as RiskLevel } from '../types-CBQRNL-l.js';
|
|
4
4
|
import '../client-BolQlL5e.js';
|
package/dist/kyc/core.js
CHANGED
|
@@ -216,7 +216,7 @@ function createConsoleLogger() {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
// src/core/version.ts
|
|
219
|
-
var SDK_VERSION = "1.
|
|
219
|
+
var SDK_VERSION = "1.7.0";
|
|
220
220
|
|
|
221
221
|
// src/shared/browser-utils.ts
|
|
222
222
|
function generateUUID() {
|
|
@@ -626,40 +626,88 @@ var KycClient = class extends BaseClient {
|
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
628
|
/**
|
|
629
|
-
* Create a
|
|
629
|
+
* Create a Event-Based Face Verification session.
|
|
630
630
|
*
|
|
631
|
-
*
|
|
631
|
+
* Inspect the response before showing UI:
|
|
632
|
+
* - `is_required === false` → skip face capture; `reason` explains why.
|
|
633
|
+
* - `device_type === 'desktop'` → render `qr_payload` as a QR; the
|
|
634
|
+
* mobile device picks up the session via the connect endpoint.
|
|
635
|
+
* - `device_type === 'mobile'` → open the face capture modal directly.
|
|
636
|
+
*
|
|
637
|
+
* @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
|
|
632
638
|
*/
|
|
633
|
-
async
|
|
634
|
-
return this.
|
|
639
|
+
async createEventBasedFaceVerificationSession(request) {
|
|
640
|
+
return this.request("/api/v1/kyc/face/session", {
|
|
635
641
|
method: "POST",
|
|
636
642
|
body: JSON.stringify(request),
|
|
637
643
|
headers: this.getUserHeaders()
|
|
638
644
|
});
|
|
639
645
|
}
|
|
640
646
|
/**
|
|
641
|
-
* Submit a
|
|
647
|
+
* Submit a real-time face capture for an active Event-Based Face Verification session.
|
|
648
|
+
*
|
|
649
|
+
* **Mobile-only.** The server rejects desktop User-Agents with HTTP
|
|
650
|
+
* 400 (`face capture must be completed on a mobile device`). Use the
|
|
651
|
+
* QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
|
|
652
|
+
*
|
|
653
|
+
* The `data` field on the response carries `retries_remaining`,
|
|
654
|
+
* `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
|
|
655
|
+
* `freeze_account`, etc.) so the tenant app can act on a final failure.
|
|
642
656
|
*
|
|
643
|
-
* @param request -
|
|
657
|
+
* @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
|
|
644
658
|
*/
|
|
645
|
-
async
|
|
646
|
-
return this.
|
|
659
|
+
async submitEventBasedFaceVerificationSession(request) {
|
|
660
|
+
return this.request("/api/v1/kyc/face/submit", {
|
|
647
661
|
method: "POST",
|
|
648
662
|
body: JSON.stringify(request),
|
|
649
663
|
headers: this.getUserHeaders()
|
|
650
664
|
});
|
|
651
665
|
}
|
|
652
666
|
/**
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
|
|
658
|
-
|
|
667
|
+
* Look up the current state of a Event-Based Face Verification session by its
|
|
668
|
+
* session token. Useful for desktop pollers waiting on the mobile handoff.
|
|
669
|
+
*
|
|
670
|
+
* The lookup is scoped by the unguessable, server-issued session token (not
|
|
671
|
+
* the enumerable forward reference): the endpoint is public/unauthenticated,
|
|
672
|
+
* and scoping by the token is what prevents cross-tenant status reads.
|
|
673
|
+
*
|
|
674
|
+
* @param token - The session token returned by `createEventBasedFaceVerificationSession`.
|
|
675
|
+
*/
|
|
676
|
+
async getEventBasedFaceVerificationSessionStatus(token) {
|
|
677
|
+
return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(token)}`, {
|
|
659
678
|
method: "GET",
|
|
660
679
|
headers: this.getUserHeaders()
|
|
661
680
|
});
|
|
662
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* Fetch the Redis-backed handoff session for a token. Same backing
|
|
684
|
+
* store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
|
|
685
|
+
* callers poll `mobile_connected` to detect when a mobile device has
|
|
686
|
+
* scanned the QR and attached.
|
|
687
|
+
*
|
|
688
|
+
* @param token - The session token returned by `createEventBasedFaceVerificationSession`.
|
|
689
|
+
*/
|
|
690
|
+
async getHandoffSession(token) {
|
|
691
|
+
return this.request(
|
|
692
|
+
`/api/v1/kyc/session${this.buildQueryString({ token })}`,
|
|
693
|
+
{ headers: this.getUserHeaders() }
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Attach a mobile device to a desktop-initiated session. The mobile
|
|
698
|
+
* client calls this after scanning the QR code. The desktop poller
|
|
699
|
+
* sees `mobile_connected: true` on the next `getHandoffSession`.
|
|
700
|
+
*
|
|
701
|
+
* @param token - The session token transferred via the QR payload.
|
|
702
|
+
* @param isDisconnect - Pass true to release the session (default false).
|
|
703
|
+
*/
|
|
704
|
+
async connectMobileSession(token, isDisconnect = false) {
|
|
705
|
+
return this.request("/api/v1/kyc/session/connect", {
|
|
706
|
+
method: "PUT",
|
|
707
|
+
body: JSON.stringify({ token, is_disconnect: isDisconnect }),
|
|
708
|
+
headers: this.getUserHeaders()
|
|
709
|
+
});
|
|
710
|
+
}
|
|
663
711
|
/**
|
|
664
712
|
* Check KYC status for a user
|
|
665
713
|
*
|
|
@@ -1132,6 +1180,20 @@ var KycClient = class extends BaseClient {
|
|
|
1132
1180
|
// ============================================================================
|
|
1133
1181
|
};
|
|
1134
1182
|
|
|
1183
|
+
// src/kyc/types.ts
|
|
1184
|
+
var KYC_DECLINED_DESCRIPTIONS = {
|
|
1185
|
+
KYC_DOCUMENT_EXPIRED: "The submitted document has expired",
|
|
1186
|
+
KYC_DOCUMENT_INVALID: "The submitted document could not be verified",
|
|
1187
|
+
KYC_FACE_MISMATCH: "Face verification did not match the identity document",
|
|
1188
|
+
KYC_AGE_REQUIREMENT: "Age requirement not met",
|
|
1189
|
+
KYC_DUPLICATE_IDENTITY: "This identity has already been verified under another account",
|
|
1190
|
+
KYC_ADDRESS_MISMATCH: "Address verification failed",
|
|
1191
|
+
KYC_NAME_MISMATCH: "Name on document does not match the registered name",
|
|
1192
|
+
KYC_PROVIDER_REJECTED: "Identity verification was rejected by the verification provider",
|
|
1193
|
+
KYC_DECLINED: "Identity verification was declined"
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1196
|
+
exports.KYC_DECLINED_DESCRIPTIONS = KYC_DECLINED_DESCRIPTIONS;
|
|
1135
1197
|
exports.KycClient = KycClient;
|
|
1136
1198
|
//# sourceMappingURL=core.js.map
|
|
1137
1199
|
//# sourceMappingURL=core.js.map
|