vesant-sdk 1.0.4
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 +247 -0
- package/dist/client-CA9Wr_qb.d.ts +1108 -0
- package/dist/client-DMNkESa0.d.mts +1108 -0
- package/dist/compliance/index.d.mts +543 -0
- package/dist/compliance/index.d.ts +543 -0
- package/dist/compliance/index.js +2133 -0
- package/dist/compliance/index.js.map +1 -0
- package/dist/compliance/index.mjs +2130 -0
- package/dist/compliance/index.mjs.map +1 -0
- package/dist/geolocation/index.d.mts +73 -0
- package/dist/geolocation/index.d.ts +73 -0
- package/dist/geolocation/index.js +1100 -0
- package/dist/geolocation/index.js.map +1 -0
- package/dist/geolocation/index.mjs +1094 -0
- package/dist/geolocation/index.mjs.map +1 -0
- package/dist/index.d.mts +50 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +2968 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2948 -0
- package/dist/index.mjs.map +1 -0
- package/dist/kyc/core.d.mts +3 -0
- package/dist/kyc/core.d.ts +3 -0
- package/dist/kyc/core.js +773 -0
- package/dist/kyc/core.js.map +1 -0
- package/dist/kyc/core.mjs +771 -0
- package/dist/kyc/core.mjs.map +1 -0
- package/dist/kyc/index.d.mts +734 -0
- package/dist/kyc/index.d.ts +734 -0
- package/dist/kyc/index.js +773 -0
- package/dist/kyc/index.js.map +1 -0
- package/dist/kyc/index.mjs +771 -0
- package/dist/kyc/index.mjs.map +1 -0
- package/dist/react.d.mts +487 -0
- package/dist/react.d.ts +487 -0
- package/dist/react.js +1122 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +1102 -0
- package/dist/react.mjs.map +1 -0
- package/dist/risk-profile/index.d.mts +228 -0
- package/dist/risk-profile/index.d.ts +228 -0
- package/dist/risk-profile/index.js +548 -0
- package/dist/risk-profile/index.js.map +1 -0
- package/dist/risk-profile/index.mjs +546 -0
- package/dist/risk-profile/index.mjs.map +1 -0
- package/dist/types-Bnsnejor.d.mts +150 -0
- package/dist/types-Bnsnejor.d.ts +150 -0
- package/dist/types-CFupjwi8.d.ts +213 -0
- package/dist/types-CqOLbaXk.d.mts +213 -0
- package/package.json +94 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { B as BaseClient, a as BaseClientConfig } from '../types-Bnsnejor.js';
|
|
2
|
+
export { g as EntityType } from '../types-Bnsnejor.js';
|
|
3
|
+
import { d as CreateProfileRequest, C as CustomerProfile, P as ProfileDetailsResponse, U as UpdateProfileRequest, e as ProfileFilters, f as ProfileListResponse, g as RiskDashboardMetrics, h as RiskConfiguration } from '../types-CFupjwi8.js';
|
|
4
|
+
export { E as EmploymentType, L as LegalForm, R as RiskCategory, a as RiskFactor, b as RiskFactorType, c as RiskHistory, S as ScreeningStatus } from '../types-CFupjwi8.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* RiskProfileClient - Customer Risk Profile Management
|
|
8
|
+
*
|
|
9
|
+
* Provides methods to create, retrieve, and manage customer risk profiles
|
|
10
|
+
* in the Vesant Compliance Platform.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare class RiskProfileClient extends BaseClient {
|
|
14
|
+
constructor(config: BaseClientConfig);
|
|
15
|
+
/**
|
|
16
|
+
* Create a new customer risk profile
|
|
17
|
+
*
|
|
18
|
+
* @param request - Profile creation data
|
|
19
|
+
* @returns Created customer profile
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const profile = await client.createProfile({
|
|
24
|
+
* customer_id: 'CUST-12345',
|
|
25
|
+
* entity_type: 'individual',
|
|
26
|
+
* customer_status: 'active',
|
|
27
|
+
* full_name: 'John Doe',
|
|
28
|
+
* email_address: 'john@example.com',
|
|
29
|
+
* date_of_birth: '1990-01-15',
|
|
30
|
+
* country_of_residence: 'US'
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
createProfile(request: CreateProfileRequest): Promise<CustomerProfile>;
|
|
35
|
+
/**
|
|
36
|
+
* Get customer profile by customer ID
|
|
37
|
+
*
|
|
38
|
+
* Note: This searches for the profile using the customer_id field.
|
|
39
|
+
* Returns the first matching profile for the tenant.
|
|
40
|
+
*
|
|
41
|
+
* @param customerId - Customer ID to search for
|
|
42
|
+
* @returns Customer profile
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const profile = await client.getProfile('CUST-12345');
|
|
47
|
+
* console.log('Risk score:', profile.risk_score);
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
getProfile(customerId: string): Promise<CustomerProfile>;
|
|
51
|
+
/**
|
|
52
|
+
* Get profile by UUID
|
|
53
|
+
*
|
|
54
|
+
* @param profileId - Profile UUID
|
|
55
|
+
* @returns Customer profile
|
|
56
|
+
*/
|
|
57
|
+
getProfileById(profileId: string): Promise<CustomerProfile>;
|
|
58
|
+
/**
|
|
59
|
+
* Get detailed profile information including risk factors and history
|
|
60
|
+
*
|
|
61
|
+
* @param profileId - Profile UUID
|
|
62
|
+
* @returns Detailed profile response with risk factors and history
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const details = await client.getProfileDetails(profileId);
|
|
67
|
+
* console.log('Risk factors:', details.risk_factors);
|
|
68
|
+
* console.log('Risk history:', details.risk_history);
|
|
69
|
+
* console.log('Alert counts:', {
|
|
70
|
+
* watchlist: details.watchlist_alert_count,
|
|
71
|
+
* fraud: details.fraud_alert_count,
|
|
72
|
+
* geo: details.geolocation_alert_count
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
getProfileDetails(profileId: string): Promise<ProfileDetailsResponse>;
|
|
77
|
+
/**
|
|
78
|
+
* Update customer profile
|
|
79
|
+
*
|
|
80
|
+
* @param profileId - Profile UUID
|
|
81
|
+
* @param updates - Fields to update
|
|
82
|
+
* @returns Updated customer profile
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const updated = await client.updateProfile(profileId, {
|
|
87
|
+
* location: 'New York, USA',
|
|
88
|
+
* location_compliance: 'compliant',
|
|
89
|
+
* last_recorded_activity: new Date().toISOString()
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
updateProfile(profileId: string, updates: UpdateProfileRequest): Promise<CustomerProfile>;
|
|
94
|
+
/**
|
|
95
|
+
* Manually recalculate risk score for a profile
|
|
96
|
+
*
|
|
97
|
+
* Triggers immediate risk score recalculation based on current risk factors.
|
|
98
|
+
*
|
|
99
|
+
* @param profileId - Profile UUID
|
|
100
|
+
* @param reason - Optional reason for recalculation
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* await client.recalculateRiskScore(profileId, 'Manual review completed');
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
recalculateRiskScore(profileId: string, reason?: string): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Query profiles with advanced filters
|
|
110
|
+
*
|
|
111
|
+
* @param filters - Filter criteria and pagination
|
|
112
|
+
* @returns Paginated list of profiles
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const results = await client.queryProfiles({
|
|
117
|
+
* risk_category: ['high', 'critical'],
|
|
118
|
+
* kyc_status: ['pending'],
|
|
119
|
+
* is_pep: true,
|
|
120
|
+
* page: 1,
|
|
121
|
+
* page_size: 20,
|
|
122
|
+
* sort_by: 'risk_score',
|
|
123
|
+
* sort_order: 'desc'
|
|
124
|
+
* });
|
|
125
|
+
*
|
|
126
|
+
* console.log(`Found ${results.total} high-risk profiles`);
|
|
127
|
+
* results.data.forEach(profile => {
|
|
128
|
+
* console.log(`${profile.full_name}: ${profile.risk_score}`);
|
|
129
|
+
* });
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
queryProfiles(filters?: ProfileFilters): Promise<ProfileListResponse>;
|
|
133
|
+
/**
|
|
134
|
+
* Search profiles by text (searches name, email, customer_id, account_number)
|
|
135
|
+
*
|
|
136
|
+
* @param searchText - Text to search for
|
|
137
|
+
* @param limit - Maximum results to return (default: 10)
|
|
138
|
+
* @returns Array of matching profiles
|
|
139
|
+
*/
|
|
140
|
+
searchProfiles(searchText: string, limit?: number): Promise<CustomerProfile[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Get all high-risk profiles (high + critical)
|
|
143
|
+
*
|
|
144
|
+
* @param limit - Maximum results to return (default: 50)
|
|
145
|
+
* @returns Array of high-risk profiles
|
|
146
|
+
*/
|
|
147
|
+
getHighRiskProfiles(limit?: number): Promise<CustomerProfile[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Get profiles requiring PEP review
|
|
150
|
+
*
|
|
151
|
+
* @param limit - Maximum results to return (default: 50)
|
|
152
|
+
* @returns Array of PEP profiles
|
|
153
|
+
*/
|
|
154
|
+
getPEPProfiles(limit?: number): Promise<CustomerProfile[]>;
|
|
155
|
+
/**
|
|
156
|
+
* Get profiles with sanctions matches
|
|
157
|
+
*
|
|
158
|
+
* @param limit - Maximum results to return (default: 50)
|
|
159
|
+
* @returns Array of sanctioned profiles
|
|
160
|
+
*/
|
|
161
|
+
getSanctionedProfiles(limit?: number): Promise<CustomerProfile[]>;
|
|
162
|
+
/**
|
|
163
|
+
* Get risk dashboard metrics and statistics
|
|
164
|
+
*
|
|
165
|
+
* @param startDate - Optional start date for metrics (ISO format)
|
|
166
|
+
* @param endDate - Optional end date for metrics (ISO format)
|
|
167
|
+
* @returns Dashboard metrics
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const metrics = await client.getDashboardMetrics();
|
|
172
|
+
* console.log('Total risky profiles:', metrics.total_risky_profiles);
|
|
173
|
+
* console.log('Critical profiles:', metrics.total_critical_profiles);
|
|
174
|
+
* console.log('Average risk score:', metrics.average_risk_score);
|
|
175
|
+
*
|
|
176
|
+
* metrics.risk_distribution.forEach(item => {
|
|
177
|
+
* console.log(`${item.category}: ${item.count} (${item.percentage}%)`);
|
|
178
|
+
* });
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
getDashboardMetrics(startDate?: string, endDate?: string): Promise<RiskDashboardMetrics>;
|
|
182
|
+
/**
|
|
183
|
+
* Get or create profile (idempotent operation)
|
|
184
|
+
*
|
|
185
|
+
* Attempts to get existing profile by customer_id, creates if not found.
|
|
186
|
+
*
|
|
187
|
+
* @param customerId - Customer ID
|
|
188
|
+
* @param createRequest - Profile data to use if creating new profile
|
|
189
|
+
* @returns Existing or newly created profile
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* const profile = await client.getOrCreateProfile('CUST-123', {
|
|
194
|
+
* customer_id: 'CUST-123',
|
|
195
|
+
* entity_type: 'individual',
|
|
196
|
+
* full_name: 'John Doe',
|
|
197
|
+
* email_address: 'john@example.com'
|
|
198
|
+
* });
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
getOrCreateProfile(customerId: string, createRequest: CreateProfileRequest): Promise<CustomerProfile>;
|
|
202
|
+
/**
|
|
203
|
+
* Batch get profiles by customer IDs
|
|
204
|
+
*
|
|
205
|
+
* @param customerIds - Array of customer IDs
|
|
206
|
+
* @returns Array of profiles (may be less than input if some not found)
|
|
207
|
+
*/
|
|
208
|
+
batchGetProfiles(customerIds: string[]): Promise<CustomerProfile[]>;
|
|
209
|
+
/**
|
|
210
|
+
* Get risk configuration for tenant
|
|
211
|
+
*
|
|
212
|
+
* Returns the risk scoring weights and thresholds configured for the tenant.
|
|
213
|
+
*
|
|
214
|
+
* @returns Risk configuration
|
|
215
|
+
*/
|
|
216
|
+
getRiskConfiguration(): Promise<RiskConfiguration>;
|
|
217
|
+
/**
|
|
218
|
+
* Update risk configuration for tenant
|
|
219
|
+
*
|
|
220
|
+
* Updates risk scoring weights and/or thresholds.
|
|
221
|
+
*
|
|
222
|
+
* @param config - Configuration updates
|
|
223
|
+
* @returns Updated risk configuration
|
|
224
|
+
*/
|
|
225
|
+
updateRiskConfiguration(config: Partial<RiskConfiguration>): Promise<RiskConfiguration>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export { CreateProfileRequest, CustomerProfile, ProfileDetailsResponse, ProfileFilters, ProfileListResponse, RiskConfiguration, RiskDashboardMetrics, RiskProfileClient, UpdateProfileRequest };
|