vesant-sdk 1.8.0-dev.2b9e28d → 1.8.0-dev.2d679f1

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.
Files changed (60) hide show
  1. package/README.md +2 -2
  2. package/dist/{client-DUHC-68_.d.ts → client-BPALLldd.d.ts} +1 -1
  3. package/dist/{client-5q4whhGu.d.mts → client-_OhkfnyJ.d.mts} +1 -1
  4. package/dist/compliance/index.d.mts +2 -2
  5. package/dist/compliance/index.d.ts +2 -2
  6. package/dist/compliance/index.js +26 -9
  7. package/dist/compliance/index.js.map +1 -1
  8. package/dist/compliance/index.mjs +26 -9
  9. package/dist/compliance/index.mjs.map +1 -1
  10. package/dist/decisions/index.js +7 -6
  11. package/dist/decisions/index.js.map +1 -1
  12. package/dist/decisions/index.mjs +7 -6
  13. package/dist/decisions/index.mjs.map +1 -1
  14. package/dist/geolocation/index.js +7 -6
  15. package/dist/geolocation/index.js.map +1 -1
  16. package/dist/geolocation/index.mjs +7 -6
  17. package/dist/geolocation/index.mjs.map +1 -1
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.js +57 -167
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +55 -168
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/kyc/core.d.mts +2 -2
  25. package/dist/kyc/core.d.ts +2 -2
  26. package/dist/kyc/core.js +37 -164
  27. package/dist/kyc/core.js.map +1 -1
  28. package/dist/kyc/core.mjs +36 -165
  29. package/dist/kyc/core.mjs.map +1 -1
  30. package/dist/kyc/index.d.mts +218 -218
  31. package/dist/kyc/index.d.ts +218 -218
  32. package/dist/kyc/index.js +37 -164
  33. package/dist/kyc/index.js.map +1 -1
  34. package/dist/kyc/index.mjs +36 -165
  35. package/dist/kyc/index.mjs.map +1 -1
  36. package/dist/react.d.mts +16 -114
  37. package/dist/react.d.ts +16 -114
  38. package/dist/react.js +8 -186
  39. package/dist/react.js.map +1 -1
  40. package/dist/react.mjs +9 -184
  41. package/dist/react.mjs.map +1 -1
  42. package/dist/risk-profile/index.d.mts +16 -6
  43. package/dist/risk-profile/index.d.ts +16 -6
  44. package/dist/risk-profile/index.js +25 -8
  45. package/dist/risk-profile/index.js.map +1 -1
  46. package/dist/risk-profile/index.mjs +25 -9
  47. package/dist/risk-profile/index.mjs.map +1 -1
  48. package/dist/scores/index.js +7 -6
  49. package/dist/scores/index.js.map +1 -1
  50. package/dist/scores/index.mjs +7 -6
  51. package/dist/scores/index.mjs.map +1 -1
  52. package/dist/tax/index.d.mts +1 -1
  53. package/dist/tax/index.d.ts +1 -1
  54. package/dist/tax/index.js +7 -6
  55. package/dist/tax/index.js.map +1 -1
  56. package/dist/tax/index.mjs +7 -6
  57. package/dist/tax/index.mjs.map +1 -1
  58. package/dist/{types-BOFaMQxI.d.mts → types-DbvVph_0.d.mts} +45 -2
  59. package/dist/{types-UGyDl1fd.d.ts → types-qXamJr2q.d.ts} +45 -2
  60. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -6,10 +6,10 @@ export { A as AmlBlockCallbackData, a as AmlBlockCallbackEvent, b as AmlCallback
6
6
  export { A as APIError, d as AlertFilters, e as AlertListResponse, f as AlertSeverity, g as AlertStatus, h as AlertType, C as CipherTextCustomerData, i as CipherTextOptions, j as CipherTextPayload, k as CipherTextReason, l as CipherTextResult, m as ComplianceCheckResponse, n as CreateGeofenceRuleRequest, o as CreateJurisdictionRequest, p as CreateLocationRequestRequest, q as DashboardMetrics, r as DecryptedCipherText, s as DeviceFingerprint, D as DeviceFingerprintRequest, t as DeviceSignalsEnvelope, u as DeviceTrustResult, v as GeoIPResult, w as GeofenceAction, x as GeofenceEvaluation, y as GeofenceRule, z as GeofenceRuleType, B as GeolocationAlert, G as GeolocationClient, E as GeolocationClientConfig, F as GeolocationConfigResponse, H as GeolocationRecord, J as JurisdictionConfig, 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, L as LocationVerification, R as ResendLocationRequestRequest, S as SignalsNonce, U as UpdateDeviceTrustRequest, Q as UpdateGeofenceRuleRequest, T as UpdateJurisdictionRequest, W as UseAlertsOptions, X as UseAlertsResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult, a2 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a3 as VerifyIPRequest } from './client-BaUekQT8.js';
7
7
  export { GpsIntegrityInput, GpsIntegrityOptions, GpsIntegrityResult, assessGpsIntegrity, collectDeviceSignals, decodeCipherText, generateCipherText, gpsIntegrityInputFromPosition, isCipherTextExpired, probeGeolocationPermission } from './geolocation/index.js';
8
8
  export { RiskProfileClient } from './risk-profile/index.js';
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-UGyDl1fd.js';
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, d as ProfileUpdateHeldResponse, R as RiskCategory, e as RiskConfiguration, f as RiskDashboardMetrics, g as RiskFactor, h as RiskFactorType, i as RiskHistory, S as ScreeningStatus, U as UpdateProfileRequest, j as UpdateProfileResult, k as isProfileUpdateHeld } from './types-qXamJr2q.js';
10
10
  export { sdkReasons } from './compliance/index.js';
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-DUHC-68_.js';
12
- 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, KycCustomerData, KycCustomerProfile, KycDeclinedCode, KycDisclosureConsent, KycDocumentExpiredCallbackEvent, KycHandoffSession, KycOtherReason, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycRequestReason, KycRequestReasonCode, KycSkipOptions, KycStatus, KycTriggerEvent, KycVerificationTriggers, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedAddressDocumentType, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult, isKycDocumentExpiredCallbackEvent } from './kyc/index.js';
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-BPALLldd.js';
12
+ export { AccountSensitiveActionTrigger, CheckKycStatusRequest, CheckKycStatusResponse, CreateEventBasedFaceVerificationSessionRequest, CreateEventBasedFaceVerificationSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, EventBasedFaceVerificationCallback, EventBasedFaceVerificationDeviceType, EventBasedFaceVerificationEvent, EventBasedFaceVerificationFrequencyTrigger, EventBasedFaceVerificationReactionResult, EventBasedFaceVerificationReactions, EventBasedFaceVerificationThresholdTrigger, EventBasedFaceVerificationTriggers, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycCallbackReactions, KycClient, KycClientConfig, KycCustomerData, KycCustomerProfile, KycDeclinedCode, KycDisclosureConsent, KycDocumentExpiredCallbackEvent, KycHandoffSession, KycOtherReason, KycPagination, KycPreferences, KycRequest, KycRequestReason, KycRequestReasonCode, KycSkipOptions, KycStatus, KycStatusCallbackEvent, KycTriggerEvent, KycVerificationTriggers, Name, ProfileChangeCallbackEvent, ProfileChangeField, ProfileChangeStatus, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedAddressDocumentType, SupportedDocumentType, UpdateKycPreferencesRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycSubmissionOptions, UseKycSubmissionResult, isKycDocumentExpiredCallbackEvent, isKycStatusCallbackEvent, isProfileChangeCallbackEvent } from './kyc/index.js';
13
13
  export { CTPFormStatus, CTPTINStatus, ComplianceStats, ComplianceStatsFilters, CustomerTaxProfileDocuments, CustomerTaxProfileRecord, CustomerType, DocumentRequestBreakdown, EmailSendingMethod, EnableWithholdingInput, EnableWithholdingResponse, GlobalTaxRule, ReRequestTaxFormInput, RemindersRunResult, 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
@@ -633,19 +633,20 @@ var BaseClient = class {
633
633
  * Handle error responses from API
634
634
  */
635
635
  handleErrorResponse(status, data, requestId) {
636
- const message = data.error || data.message || `HTTP ${status}`;
636
+ const structured = data.error && typeof data.error === "object" && !Array.isArray(data.error) ? data.error : void 0;
637
+ const message = typeof data.error === "string" && data.error || typeof structured?.message === "string" && structured.message || typeof data.message === "string" && data.message || `HTTP ${status}`;
637
638
  const createError = () => {
638
639
  switch (status) {
639
640
  case 400:
640
- return new VesantError(message, "BAD_REQUEST", 400);
641
+ return new VesantError(message, "BAD_REQUEST", 400, structured);
641
642
  case 401:
642
643
  return new AuthenticationError(message);
643
644
  case 403:
644
- return new VesantError(message, "FORBIDDEN", 403);
645
+ return new VesantError(message, "FORBIDDEN", 403, structured);
645
646
  case 404:
646
- return new VesantError(message, "NOT_FOUND", 404);
647
+ return new VesantError(message, "NOT_FOUND", 404, structured);
647
648
  case 409:
648
- return new VesantError(message, "DUPLICATE_PROFILE", 409);
649
+ return new VesantError(message, "DUPLICATE_PROFILE", 409, structured);
649
650
  case 429: {
650
651
  const retryAfter = data.retry_after || data.retryAfter;
651
652
  return new RateLimitError(retryAfter);
@@ -656,7 +657,7 @@ var BaseClient = class {
656
657
  case 504:
657
658
  return new ServiceUnavailableError(message);
658
659
  default:
659
- return new VesantError(message, "UNKNOWN_ERROR", status);
660
+ return new VesantError(message, "UNKNOWN_ERROR", status, structured);
660
661
  }
661
662
  };
662
663
  const error = createError();
@@ -1659,17 +1660,27 @@ var RiskProfileClient = class extends BaseClient {
1659
1660
  /**
1660
1661
  * Update customer profile
1661
1662
  *
1663
+ * Omitted fields keep their stored values. When the tenant has the
1664
+ * **On Account Sensitive Action** KYC trigger enabled and the update changes
1665
+ * the customer's name, date of birth or residential address, Vesant applies
1666
+ * the other fields, holds the sensitive ones and answers `202` with a
1667
+ * {@link ProfileUpdateHeldResponse} instead of the profile. Narrow with
1668
+ * {@link isProfileUpdateHeld}, then request a `profile_change` submit link.
1669
+ *
1662
1670
  * @param profileId - Profile UUID
1663
1671
  * @param updates - Fields to update
1664
- * @returns Updated customer profile
1672
+ * @returns Updated customer profile, or the held change
1665
1673
  *
1666
1674
  * @example
1667
1675
  * ```typescript
1668
- * const updated = await client.updateProfile(profileId, {
1676
+ * const result = await client.updateProfile(profileId, {
1669
1677
  * location: 'New York, USA',
1670
1678
  * location_compliance: 'compliant',
1671
1679
  * last_recorded_activity: new Date().toISOString()
1672
1680
  * });
1681
+ * if (isProfileUpdateHeld(result)) {
1682
+ * // name / DOB / address held: start KYC with trigger_event 'profile_change'
1683
+ * }
1673
1684
  * ```
1674
1685
  */
1675
1686
  async updateProfile(profileId, updates, requestOptions) {
@@ -1709,6 +1720,11 @@ var RiskProfileClient = class extends BaseClient {
1709
1720
  }
1710
1721
  };
1711
1722
 
1723
+ // src/risk-profile/types.ts
1724
+ function isProfileUpdateHeld(result) {
1725
+ return typeof result === "object" && result !== null && result.status === "kyc_required" && result.kyc_required === true;
1726
+ }
1727
+
1712
1728
  // src/compliance/block-reasons.ts
1713
1729
  var sdkReasons = {
1714
1730
  // Jurisdiction
@@ -2239,11 +2255,12 @@ var ComplianceClient = class {
2239
2255
  if (profileResult) {
2240
2256
  profile = profileResult;
2241
2257
  if (!isBlocked && this.shouldUpdateProfile(profile, geoVerification.location.city)) {
2242
- profile = await this.riskClient.updateProfile(profile.id, {
2258
+ const updated = await this.riskClient.updateProfile(profile.id, {
2243
2259
  last_recorded_activity: (/* @__PURE__ */ new Date()).toISOString(),
2244
2260
  location: `${geoVerification.location.city}, ${geoVerification.location.country}`,
2245
2261
  location_compliance: geoVerification.is_compliant ? "compliant" : "non-compliant"
2246
2262
  }, requestOptions);
2263
+ profile = isProfileUpdateHeld(updated) ? updated.profile : updated;
2247
2264
  }
2248
2265
  } else {
2249
2266
  if (this.config.autoCreateProfiles && this.config.debug) {
@@ -3189,77 +3206,24 @@ var KycClient = class extends BaseClient {
3189
3206
  }, void 0, requestOptions);
3190
3207
  }
3191
3208
  /**
3192
- * Get a KYC request by ID
3209
+ * Get a KYC record by ID
3210
+ *
3211
+ * Works with your tenant API key. Each entry in `proofs` carries a
3212
+ * short-lived `link` for downloading that document, and `reference` holds
3213
+ * your own customer reference (the `forward_reference`).
3193
3214
  *
3194
- * @param id - KYC request ID
3195
- * @returns KYC request details including proofs and alerts
3215
+ * @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
3216
+ * @returns KYC record including proofs (with download links) and alerts
3196
3217
  *
3197
3218
  * @example
3198
3219
  * ```typescript
3199
3220
  * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
3200
3221
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
3222
+ * kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
3201
3223
  * ```
3202
3224
  */
3203
3225
  async getKycRequest(id) {
3204
- return this.request(`/api/v1/kyc/requests/${id}`);
3205
- }
3206
- /**
3207
- * List KYC requests with filters and pagination
3208
- *
3209
- * @param filters - Optional filters (status, search, date range)
3210
- * @param pagination - Optional pagination (page, page_size)
3211
- * @returns Paginated list of KYC requests
3212
- *
3213
- * @example
3214
- * ```typescript
3215
- * const requests = await client.listKycRequests(
3216
- * { status: "pending", search: "john" },
3217
- * { page: 1, page_size: 20 }
3218
- * );
3219
- * console.log(`Found ${requests.total} pending requests`);
3220
- * ```
3221
- */
3222
- async listKycRequests(filters, pagination) {
3223
- const params = {};
3224
- if (filters) {
3225
- addFilterParam(params, "status", filters.status);
3226
- addSimpleParams(params, filters, ["search", "fromDate", "toDate", "sortBy", "order"]);
3227
- }
3228
- if (pagination) {
3229
- if (pagination.page) params.page = pagination.page;
3230
- if (pagination.page_size) params.limit = pagination.page_size;
3231
- }
3232
- return this.request(
3233
- `/api/v1/kyc/requests${this.buildQueryString(params)}`,
3234
- { headers: this.getUserHeaders() }
3235
- );
3236
- }
3237
- /**
3238
- * Update KYC request status (accept/decline)
3239
- *
3240
- * @param request - Status update request with reference, status, and reason
3241
- *
3242
- * @example
3243
- * ```typescript
3244
- * // Accept a KYC request
3245
- * await client.updateKycStatus({
3246
- * reference: "kyc-ref-123",
3247
- * status: "accepted",
3248
- * reason: "All documents verified successfully"
3249
- * });
3250
- *
3251
- * // Decline a KYC request
3252
- * await client.updateKycStatus({
3253
- * reference: "kyc-ref-456",
3254
- * status: "declined",
3255
- * reason: "Document expired"
3256
- * });
3257
- * ```
3258
- */
3259
- async updateKycStatus(request) {
3260
- await this.request("/api/v1/kyc/status", {
3261
- method: "PUT",
3262
- body: JSON.stringify(request),
3226
+ return this.request(`/api/v1/kyc/${encodeURIComponent(id)}`, {
3263
3227
  headers: this.getUserHeaders()
3264
3228
  });
3265
3229
  }
@@ -3291,63 +3255,28 @@ var KycClient = class extends BaseClient {
3291
3255
  /**
3292
3256
  * Get downloadable URLs for KYC proofs/documents
3293
3257
  *
3294
- * @param kycId - KYC request ID
3295
- * @returns Array of proof download URLs with expiration
3258
+ * Derived from the `proofs` of `getKycRequest`: the platform attaches a
3259
+ * short-lived download link to every proof on the KYC record, so no
3260
+ * separate endpoint is needed. Proofs without a link are omitted.
3261
+ *
3262
+ * @param kycId - KYC record ID
3263
+ * @returns Array of proof download URLs
3296
3264
  *
3297
3265
  * @example
3298
3266
  * ```typescript
3299
3267
  * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
3300
3268
  * proofs.forEach(proof => {
3301
- * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
3269
+ * console.log(`${proof.type}: ${proof.url}`);
3302
3270
  * });
3303
3271
  * ```
3304
3272
  */
3305
3273
  async getProofDownloadURLs(kycId) {
3306
- return this.request(
3307
- `/api/v1/kyc/proofs/${kycId}`,
3308
- { headers: this.getUserHeaders() }
3309
- );
3310
- }
3311
- // ============================================================================
3312
- // KYC Overview & Statistics
3313
- // ============================================================================
3314
- /**
3315
- * Get KYC overview statistics
3316
- *
3317
- * @param fromDate - Optional start date (ISO 8601)
3318
- * @param toDate - Optional end date (ISO 8601)
3319
- * @returns KYC statistics including counts by status
3320
- *
3321
- * @example
3322
- * ```typescript
3323
- * const overview = await client.getOverview(
3324
- * "2024-01-01T00:00:00Z",
3325
- * "2024-12-31T23:59:59Z"
3326
- * );
3327
- * console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
3328
- * console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
3329
- * ```
3330
- */
3331
- async getOverview(fromDate, toDate) {
3332
- const params = {};
3333
- if (fromDate) params.fromDate = fromDate;
3334
- if (toDate) params.toDate = toDate;
3335
- return this.request(
3336
- `/api/v1/kyc/overview${this.buildQueryString(params)}`
3337
- );
3274
+ const kyc = await this.getKycRequest(kycId);
3275
+ return (kyc.proofs ?? []).filter((proof) => typeof proof.link === "string" && proof.link !== "").map((proof) => ({ id: proof.id, type: proof.type, url: proof.link }));
3338
3276
  }
3339
3277
  // ============================================================================
3340
3278
  // Alert Management
3341
3279
  // ============================================================================
3342
- /**
3343
- * Get a KYC alert by ID
3344
- *
3345
- * @param alertId - Alert ID
3346
- * @returns Alert details
3347
- */
3348
- async getAlert(alertId) {
3349
- return this.request(`/api/v1/kyc/alerts/${alertId}`);
3350
- }
3351
3280
  /**
3352
3281
  * List KYC alerts with filters and pagination
3353
3282
  *
@@ -3367,6 +3296,9 @@ var KycClient = class extends BaseClient {
3367
3296
  * );
3368
3297
  * console.log(`Found ${alerts.total} alerts`);
3369
3298
  * ```
3299
+ *
3300
+ * @remarks Works with a tenant API key and returns the alerts raised for
3301
+ * your tenant's customers.
3370
3302
  */
3371
3303
  async listAlerts(filters, pagination) {
3372
3304
  const params = {};
@@ -3386,66 +3318,15 @@ var KycClient = class extends BaseClient {
3386
3318
  `/api/v1/kyc/alerts${this.buildQueryString(params)}`
3387
3319
  );
3388
3320
  }
3389
- /**
3390
- * Update a KYC alert
3391
- *
3392
- * @param alertId - Alert ID
3393
- * @param update - Fields to update (status, assigned_for, reason, alert_type)
3394
- *
3395
- * @example
3396
- * ```typescript
3397
- * // Assign an alert
3398
- * await client.updateAlert("alert_123", {
3399
- * assigned_for: "analyst_user_id",
3400
- * status: "in_progress"
3401
- * });
3402
- *
3403
- * // Resolve an alert
3404
- * await client.updateAlert("alert_123", {
3405
- * status: "resolved",
3406
- * reason: "Customer verified via phone call"
3407
- * });
3408
- *
3409
- * // Escalate an alert
3410
- * await client.updateAlert("alert_123", {
3411
- * status: "escalated",
3412
- * assigned_for: "manager_user_id",
3413
- * reason: "Requires senior review - suspicious documents"
3414
- * });
3415
- * ```
3416
- */
3417
- async updateAlert(alertId, update) {
3418
- await this.request(`/api/v1/kyc/alerts/${alertId}`, {
3419
- method: "PUT",
3420
- body: JSON.stringify(update),
3421
- headers: this.getUserHeaders()
3422
- });
3423
- }
3424
3321
  // ============================================================================
3425
3322
  // KYC Preferences
3426
3323
  // ============================================================================
3427
- /**
3428
- * Get KYC preferences for the tenant
3429
- *
3430
- * @returns KYC preferences configuration
3431
- *
3432
- * @example
3433
- * ```typescript
3434
- * const prefs = await client.getPreferences();
3435
- * console.log(`Face verification required: ${prefs.is_face_verification_required}`);
3436
- * console.log(`Required documents: ${prefs.required_document_count}`);
3437
- * ```
3438
- */
3439
- async getPreferences() {
3440
- return this.request("/api/v1/kyc/preferences");
3441
- }
3442
3324
  /**
3443
3325
  * Update KYC preferences for the tenant
3444
3326
  *
3445
3327
  * @deprecated KYC preferences are managed in the Vesant console; the
3446
3328
  * platform exposes no update operation to the SDK, so this call always
3447
- * fails. Use `getPreferences()` to read them. This method will be removed
3448
- * in a future release.
3329
+ * fails. This method will be removed in a future release.
3449
3330
  *
3450
3331
  * @param update - Fields to update
3451
3332
  * @returns Updated preferences
@@ -3608,6 +3489,12 @@ var KYC_DECLINED_DESCRIPTIONS = {
3608
3489
  function isKycDocumentExpiredCallbackEvent(value) {
3609
3490
  return typeof value === "object" && value !== null && value.event === "kyc_document_expired";
3610
3491
  }
3492
+ function isKycStatusCallbackEvent(value) {
3493
+ return typeof value === "object" && value !== null && value.event === "kyc";
3494
+ }
3495
+ function isProfileChangeCallbackEvent(value) {
3496
+ return typeof value === "object" && value !== null && value.event === "profile_change";
3497
+ }
3611
3498
 
3612
3499
  // src/tax/client.ts
3613
3500
  var TaxClient = class extends BaseClient {
@@ -3940,6 +3827,9 @@ exports.gpsIntegrityInputFromPosition = gpsIntegrityInputFromPosition;
3940
3827
  exports.isAmlBlockCallbackEvent = isAmlBlockCallbackEvent;
3941
3828
  exports.isCipherTextExpired = isCipherTextExpired;
3942
3829
  exports.isKycDocumentExpiredCallbackEvent = isKycDocumentExpiredCallbackEvent;
3830
+ exports.isKycStatusCallbackEvent = isKycStatusCallbackEvent;
3831
+ exports.isProfileChangeCallbackEvent = isProfileChangeCallbackEvent;
3832
+ exports.isProfileUpdateHeld = isProfileUpdateHeld;
3943
3833
  exports.noopLogger = noopLogger;
3944
3834
  exports.paginate = paginate;
3945
3835
  exports.probeGeolocationPermission = probeGeolocationPermission;