vesant-sdk 1.8.0-dev.31d63f0 → 1.8.0-dev.5c1c65a
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 +5 -3
- package/dist/{client-DUHC-68_.d.ts → client-4oLoc31v.d.ts} +1 -1
- package/dist/{client-5q4whhGu.d.mts → client-CJI8VO1i.d.mts} +1 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +19 -3
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +19 -3
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +72 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -15
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +2 -2
- package/dist/kyc/core.d.ts +2 -2
- package/dist/kyc/core.js +52 -11
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +52 -12
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +156 -12
- package/dist/kyc/index.d.ts +156 -12
- package/dist/kyc/index.js +52 -11
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +52 -12
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +21 -3
- package/dist/react.d.ts +21 -3
- package/dist/react.js +8 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +8 -1
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +16 -6
- package/dist/risk-profile/index.d.ts +16 -6
- package/dist/risk-profile/index.js +18 -2
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +18 -3
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/tax/index.d.mts +1 -1
- package/dist/tax/index.d.ts +1 -1
- package/dist/{types-UGyDl1fd.d.ts → types-1kI4SsKB.d.ts} +44 -1
- package/dist/{types-BOFaMQxI.d.mts → types-DfbnIaW_.d.mts} +44 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -352,9 +352,11 @@ interface ComplianceClientConfig {
|
|
|
352
352
|
| `requestKycSubmitLink(request)` | Generate a KYC submission link |
|
|
353
353
|
| `checkKycStatus(request)` | Check KYC verification status |
|
|
354
354
|
| `submitVerification(request)` | Submit document verification |
|
|
355
|
-
| `
|
|
356
|
-
| `
|
|
357
|
-
| `
|
|
355
|
+
| `getKycRequest(id)` | Get a KYC record with proof download links |
|
|
356
|
+
| `getProofDownloadURLs(id)` | Download links for a record's proofs |
|
|
357
|
+
| `listKycRequests(filters)` | List KYC requests (console session only) |
|
|
358
|
+
| `getPreferences()` | Get KYC preferences (console session only) |
|
|
359
|
+
| `listAlerts(filters)` | List KYC alerts (console session only) |
|
|
358
360
|
| `createEventBasedFaceVerificationSession(request)` | Start a face re-verification session (backend) |
|
|
359
361
|
| `submitEventBasedFaceVerificationSession(request)` | Submit a face capture for a session |
|
|
360
362
|
| `getEventBasedFaceVerificationSessionStatus(token)` | Look up a session's current result |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { D as DeviceFingerprintRequest, L as LocationVerification, V as ValidateCipherTextResponse, a as LocationRequest, G as GeolocationClient, b as LocationRequestFilters, c as LocationRequestListResponse } from './client-BaUekQT8.js';
|
|
2
2
|
import { RiskProfileClient } from './risk-profile/index.js';
|
|
3
3
|
import { V as VesantConfig, R as RequestOptions } from './client-q9fN8Hhf.js';
|
|
4
|
-
import { C as CustomerProfile } from './types-
|
|
4
|
+
import { C as CustomerProfile } from './types-1kI4SsKB.js';
|
|
5
5
|
import { E as EntityType, B as BlockReason, P as PaginationParams } from './types-CBQRNL-l.js';
|
|
6
6
|
|
|
7
7
|
interface RegistrationVerificationRequest {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { D as DeviceFingerprintRequest, L as LocationVerification, V as ValidateCipherTextResponse, a as LocationRequest, G as GeolocationClient, b as LocationRequestFilters, c as LocationRequestListResponse } from './client-XDEhh9VN.mjs';
|
|
2
2
|
import { RiskProfileClient } from './risk-profile/index.mjs';
|
|
3
3
|
import { V as VesantConfig, R as RequestOptions } from './client-q9fN8Hhf.mjs';
|
|
4
|
-
import { C as CustomerProfile } from './types-
|
|
4
|
+
import { C as CustomerProfile } from './types-DfbnIaW_.mjs';
|
|
5
5
|
import { E as EntityType, B as BlockReason, P as PaginationParams } from './types-CBQRNL-l.mjs';
|
|
6
6
|
|
|
7
7
|
interface RegistrationVerificationRequest {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { B as BlockReason } from '../types-CBQRNL-l.mjs';
|
|
2
|
-
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-
|
|
2
|
+
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-CJI8VO1i.mjs';
|
|
3
3
|
export { p as CreateLocationRequestRequest, I as LocationCaptureRequest, K as LocationCaptureResponse, a as LocationRequest, M as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, N as LocationRequestResult, O as LocationRequestStatus, P as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-XDEhh9VN.mjs';
|
|
4
4
|
import '../risk-profile/index.mjs';
|
|
5
5
|
import '../client-q9fN8Hhf.mjs';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-DfbnIaW_.mjs';
|
|
7
7
|
|
|
8
8
|
declare const sdkReasons: {
|
|
9
9
|
jurisdictionBlocked: (country: string, countryISO: string) => BlockReason;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { B as BlockReason } from '../types-CBQRNL-l.js';
|
|
2
|
-
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-
|
|
2
|
+
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-4oLoc31v.js';
|
|
3
3
|
export { p as CreateLocationRequestRequest, I as LocationCaptureRequest, K as LocationCaptureResponse, a as LocationRequest, M as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, N as LocationRequestResult, O as LocationRequestStatus, P as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-BaUekQT8.js';
|
|
4
4
|
import '../risk-profile/index.js';
|
|
5
5
|
import '../client-q9fN8Hhf.js';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-1kI4SsKB.js';
|
|
7
7
|
|
|
8
8
|
declare const sdkReasons: {
|
|
9
9
|
jurisdictionBlocked: (country: string, countryISO: string) => BlockReason;
|
package/dist/compliance/index.js
CHANGED
|
@@ -1524,17 +1524,27 @@ var RiskProfileClient = class extends BaseClient {
|
|
|
1524
1524
|
/**
|
|
1525
1525
|
* Update customer profile
|
|
1526
1526
|
*
|
|
1527
|
+
* Omitted fields keep their stored values. When the tenant has the
|
|
1528
|
+
* **On Account Sensitive Action** KYC trigger enabled and the update changes
|
|
1529
|
+
* the customer's name, date of birth or residential address, Vesant applies
|
|
1530
|
+
* the other fields, holds the sensitive ones and answers `202` with a
|
|
1531
|
+
* {@link ProfileUpdateHeldResponse} instead of the profile. Narrow with
|
|
1532
|
+
* {@link isProfileUpdateHeld}, then request a `profile_change` submit link.
|
|
1533
|
+
*
|
|
1527
1534
|
* @param profileId - Profile UUID
|
|
1528
1535
|
* @param updates - Fields to update
|
|
1529
|
-
* @returns Updated customer profile
|
|
1536
|
+
* @returns Updated customer profile, or the held change
|
|
1530
1537
|
*
|
|
1531
1538
|
* @example
|
|
1532
1539
|
* ```typescript
|
|
1533
|
-
* const
|
|
1540
|
+
* const result = await client.updateProfile(profileId, {
|
|
1534
1541
|
* location: 'New York, USA',
|
|
1535
1542
|
* location_compliance: 'compliant',
|
|
1536
1543
|
* last_recorded_activity: new Date().toISOString()
|
|
1537
1544
|
* });
|
|
1545
|
+
* if (isProfileUpdateHeld(result)) {
|
|
1546
|
+
* // name / DOB / address held: start KYC with trigger_event 'profile_change'
|
|
1547
|
+
* }
|
|
1538
1548
|
* ```
|
|
1539
1549
|
*/
|
|
1540
1550
|
async updateProfile(profileId, updates, requestOptions) {
|
|
@@ -1574,6 +1584,11 @@ var RiskProfileClient = class extends BaseClient {
|
|
|
1574
1584
|
}
|
|
1575
1585
|
};
|
|
1576
1586
|
|
|
1587
|
+
// src/risk-profile/types.ts
|
|
1588
|
+
function isProfileUpdateHeld(result) {
|
|
1589
|
+
return typeof result === "object" && result !== null && result.status === "kyc_required" && result.kyc_required === true;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1577
1592
|
// src/compliance/types.ts
|
|
1578
1593
|
var DEFAULT_CURRENCY_RATES = {
|
|
1579
1594
|
USD: 1,
|
|
@@ -2029,11 +2044,12 @@ var ComplianceClient = class {
|
|
|
2029
2044
|
if (profileResult) {
|
|
2030
2045
|
profile = profileResult;
|
|
2031
2046
|
if (!isBlocked && this.shouldUpdateProfile(profile, geoVerification.location.city)) {
|
|
2032
|
-
|
|
2047
|
+
const updated = await this.riskClient.updateProfile(profile.id, {
|
|
2033
2048
|
last_recorded_activity: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2034
2049
|
location: `${geoVerification.location.city}, ${geoVerification.location.country}`,
|
|
2035
2050
|
location_compliance: geoVerification.is_compliant ? "compliant" : "non-compliant"
|
|
2036
2051
|
}, requestOptions);
|
|
2052
|
+
profile = isProfileUpdateHeld(updated) ? updated.profile : updated;
|
|
2037
2053
|
}
|
|
2038
2054
|
} else {
|
|
2039
2055
|
if (this.config.autoCreateProfiles && this.config.debug) {
|