vesant-sdk 2.0.0-next.8662ecc → 2.0.0-next.c8fef46
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +54 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -10
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +1 -1
- package/dist/kyc/core.d.ts +1 -1
- package/dist/kyc/core.js +54 -10
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +54 -10
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +246 -18
- package/dist/kyc/index.d.ts +246 -18
- package/dist/kyc/index.js +54 -10
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +54 -10
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +37 -2
- package/dist/react.d.ts +37 -2
- package/dist/react.js +603 -272
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +603 -272
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ export { RiskProfileClient } from './risk-profile/index.mjs';
|
|
|
9
9
|
export { a as CreateCustomerProfileRequest, a as CreateProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse, E as EmploymentType, L as LegalForm, c as ProfileDetailsResponse, P as ProfileFilters, b as ProfileListResponse, R as RiskCategory, d as RiskConfiguration, e as RiskDashboardMetrics, f as RiskFactor, g as RiskFactorType, h as RiskHistory, S as ScreeningStatus, U as UpdateProfileRequest } from './types-C4Zx0d_u.mjs';
|
|
10
10
|
export { sdkReasons } from './compliance/index.mjs';
|
|
11
11
|
export { C as ComplianceClient, a as ComplianceLocationRequestInput, b as ComplianceLocationRequestResult, c as CurrencyRates, D as DEFAULT_CURRENCY_RATES, E as EventVerificationRequest, d as EventVerificationResponse, L as LoginVerificationRequest, e as LoginVerificationResponse, R as RegistrationVerificationRequest, f as RegistrationVerificationResponse, T as TransactionRiskResult, g as TransactionVerificationRequest, h as TransactionVerificationResponse } from './client-IAOGCBfm.mjs';
|
|
12
|
-
export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.mjs';
|
|
12
|
+
export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, 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, ReuseKycCallback, ReuseKycDeviceType, ReuseKycEvent, ReuseKycFrequencyTrigger, ReuseKycReactionResult, ReuseKycReactions, ReuseKycThresholdTrigger, ReuseKycTriggers, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.mjs';
|
|
13
13
|
export { CTPFormStatus, CTPTINStatus, ComplianceStats, ComplianceStatsFilters, CustomerTaxProfileDocuments, CustomerTaxProfileRecord, CustomerType, DocumentRequestBreakdown, EmailSendingMethod, EnableWithholdingInput, EnableWithholdingResponse, GlobalTaxRule, ReRequestTaxFormInput, TINCheckResult, TINStatusBreakdown, TaxClient, TaxClientConfig, TaxRuleApprovalStatus, TaxRuleVersion, TaxRules, TransactionAction, TreatyCountry, TreatyCountryListResponse, UpdateTaxRulesInput, WFormCountBreakdown, WFormStatusBreakdown } from './tax/index.mjs';
|
|
14
14
|
|
|
15
15
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { RiskProfileClient } from './risk-profile/index.js';
|
|
|
9
9
|
export { a as CreateCustomerProfileRequest, a as CreateProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse, E as EmploymentType, L as LegalForm, c as ProfileDetailsResponse, P as ProfileFilters, b as ProfileListResponse, R as RiskCategory, d as RiskConfiguration, e as RiskDashboardMetrics, f as RiskFactor, g as RiskFactorType, h as RiskHistory, S as ScreeningStatus, U as UpdateProfileRequest } from './types-2utj53GK.js';
|
|
10
10
|
export { sdkReasons } from './compliance/index.js';
|
|
11
11
|
export { C as ComplianceClient, a as ComplianceLocationRequestInput, b as ComplianceLocationRequestResult, c as CurrencyRates, D as DEFAULT_CURRENCY_RATES, E as EventVerificationRequest, d as EventVerificationResponse, L as LoginVerificationRequest, e as LoginVerificationResponse, R as RegistrationVerificationRequest, f as RegistrationVerificationResponse, T as TransactionRiskResult, g as TransactionVerificationRequest, h as TransactionVerificationResponse } from './client-BJ87_Vv5.js';
|
|
12
|
-
export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.js';
|
|
12
|
+
export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, 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, ReuseKycCallback, ReuseKycDeviceType, ReuseKycEvent, ReuseKycFrequencyTrigger, ReuseKycReactionResult, ReuseKycReactions, ReuseKycThresholdTrigger, ReuseKycTriggers, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.js';
|
|
13
13
|
export { CTPFormStatus, CTPTINStatus, ComplianceStats, ComplianceStatsFilters, CustomerTaxProfileDocuments, CustomerTaxProfileRecord, CustomerType, DocumentRequestBreakdown, EmailSendingMethod, EnableWithholdingInput, EnableWithholdingResponse, GlobalTaxRule, ReRequestTaxFormInput, TINCheckResult, TINStatusBreakdown, TaxClient, TaxClientConfig, TaxRuleApprovalStatus, TaxRuleVersion, TaxRules, TransactionAction, TreatyCountry, TreatyCountryListResponse, UpdateTaxRulesInput, WFormCountBreakdown, WFormStatusBreakdown } from './tax/index.js';
|
|
14
14
|
|
|
15
15
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2730,40 +2730,84 @@ var KycClient = class extends BaseClient {
|
|
|
2730
2730
|
});
|
|
2731
2731
|
}
|
|
2732
2732
|
/**
|
|
2733
|
-
* Create a
|
|
2733
|
+
* Create a Re-Use KYC session.
|
|
2734
2734
|
*
|
|
2735
|
-
*
|
|
2735
|
+
* Inspect the response before showing UI:
|
|
2736
|
+
* - `is_required === false` → skip face capture; `reason` explains why.
|
|
2737
|
+
* - `device_type === 'desktop'` → render `qr_payload` as a QR; the
|
|
2738
|
+
* mobile device picks up the session via the connect endpoint.
|
|
2739
|
+
* - `device_type === 'mobile'` → open the face capture modal directly.
|
|
2740
|
+
*
|
|
2741
|
+
* @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
|
|
2736
2742
|
*/
|
|
2737
2743
|
async createReuseKycSession(request) {
|
|
2738
|
-
return this.
|
|
2744
|
+
return this.request("/api/v1/kyc/face/session", {
|
|
2739
2745
|
method: "POST",
|
|
2740
2746
|
body: JSON.stringify(request),
|
|
2741
2747
|
headers: this.getUserHeaders()
|
|
2742
2748
|
});
|
|
2743
2749
|
}
|
|
2744
2750
|
/**
|
|
2745
|
-
* Submit a
|
|
2751
|
+
* Submit a real-time face capture for an active Re-Use KYC session.
|
|
2752
|
+
*
|
|
2753
|
+
* **Mobile-only.** The server rejects desktop User-Agents with HTTP
|
|
2754
|
+
* 400 (`face capture must be completed on a mobile device`). Use the
|
|
2755
|
+
* QR handoff from `createReuseKycSession` for desktop callers.
|
|
2756
|
+
*
|
|
2757
|
+
* The `data` field on the response carries `retries_remaining`,
|
|
2758
|
+
* `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
|
|
2759
|
+
* `freeze_account`, etc.) so the tenant app can act on a final failure.
|
|
2746
2760
|
*
|
|
2747
|
-
* @param request -
|
|
2761
|
+
* @param request - Token from `createReuseKycSession`, plus the base64 selfie.
|
|
2748
2762
|
*/
|
|
2749
2763
|
async submitReuseKycSession(request) {
|
|
2750
|
-
return this.
|
|
2764
|
+
return this.request("/api/v1/kyc/face/submit", {
|
|
2751
2765
|
method: "POST",
|
|
2752
2766
|
body: JSON.stringify(request),
|
|
2753
2767
|
headers: this.getUserHeaders()
|
|
2754
2768
|
});
|
|
2755
2769
|
}
|
|
2756
2770
|
/**
|
|
2757
|
-
*
|
|
2758
|
-
*
|
|
2759
|
-
*
|
|
2760
|
-
*
|
|
2771
|
+
* Look up the current state of a Re-Use KYC session by its forward
|
|
2772
|
+
* reference. Useful for desktop pollers waiting on the mobile handoff.
|
|
2773
|
+
*
|
|
2774
|
+
* @param reference - The reference used when the session was created.
|
|
2775
|
+
*/
|
|
2761
2776
|
async getReuseKycSessionStatus(reference) {
|
|
2762
2777
|
return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(reference)}`, {
|
|
2763
2778
|
method: "GET",
|
|
2764
2779
|
headers: this.getUserHeaders()
|
|
2765
2780
|
});
|
|
2766
2781
|
}
|
|
2782
|
+
/**
|
|
2783
|
+
* Fetch the Redis-backed handoff session for a token. Same backing
|
|
2784
|
+
* store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
|
|
2785
|
+
* callers poll `mobile_connected` to detect when a mobile device has
|
|
2786
|
+
* scanned the QR and attached.
|
|
2787
|
+
*
|
|
2788
|
+
* @param token - The session token returned by `createReuseKycSession`.
|
|
2789
|
+
*/
|
|
2790
|
+
async getHandoffSession(token) {
|
|
2791
|
+
return this.request(
|
|
2792
|
+
`/api/v1/kyc/session${this.buildQueryString({ token })}`,
|
|
2793
|
+
{ headers: this.getUserHeaders() }
|
|
2794
|
+
);
|
|
2795
|
+
}
|
|
2796
|
+
/**
|
|
2797
|
+
* Attach a mobile device to a desktop-initiated session. The mobile
|
|
2798
|
+
* client calls this after scanning the QR code. The desktop poller
|
|
2799
|
+
* sees `mobile_connected: true` on the next `getHandoffSession`.
|
|
2800
|
+
*
|
|
2801
|
+
* @param token - The session token transferred via the QR payload.
|
|
2802
|
+
* @param isDisconnect - Pass true to release the session (default false).
|
|
2803
|
+
*/
|
|
2804
|
+
async connectMobileSession(token, isDisconnect = false) {
|
|
2805
|
+
return this.request("/api/v1/kyc/session/connect", {
|
|
2806
|
+
method: "PUT",
|
|
2807
|
+
body: JSON.stringify({ token, is_disconnect: isDisconnect }),
|
|
2808
|
+
headers: this.getUserHeaders()
|
|
2809
|
+
});
|
|
2810
|
+
}
|
|
2767
2811
|
/**
|
|
2768
2812
|
* Check KYC status for a user
|
|
2769
2813
|
*
|