vesant-sdk 1.7.2 → 1.8.0-dev.0a33430

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 (72) hide show
  1. package/README.md +5 -3
  2. package/dist/{client-B3DCAHlg.d.ts → client-4oLoc31v.d.ts} +2 -2
  3. package/dist/{client-fy3trF2K.d.ts → client-BaUekQT8.d.ts} +32 -10
  4. package/dist/{client-D23KhWeh.d.mts → client-CJI8VO1i.d.mts} +2 -2
  5. package/dist/{client-BwXMQA2a.d.mts → client-XDEhh9VN.d.mts} +32 -10
  6. package/dist/compliance/index.d.mts +3 -3
  7. package/dist/compliance/index.d.ts +3 -3
  8. package/dist/compliance/index.js +59 -5
  9. package/dist/compliance/index.js.map +1 -1
  10. package/dist/compliance/index.mjs +59 -5
  11. package/dist/compliance/index.mjs.map +1 -1
  12. package/dist/decisions/index.js +1 -1
  13. package/dist/decisions/index.js.map +1 -1
  14. package/dist/decisions/index.mjs +1 -1
  15. package/dist/decisions/index.mjs.map +1 -1
  16. package/dist/geolocation/index.d.mts +2 -2
  17. package/dist/geolocation/index.d.ts +2 -2
  18. package/dist/geolocation/index.js +40 -2
  19. package/dist/geolocation/index.js.map +1 -1
  20. package/dist/geolocation/index.mjs +40 -2
  21. package/dist/geolocation/index.mjs.map +1 -1
  22. package/dist/{index-DSDgS09k.d.ts → index-BosFSGan.d.ts} +57 -2
  23. package/dist/{index-C3zUKydT.d.mts → index-C49a7fg2.d.mts} +57 -2
  24. package/dist/index.d.mts +6 -6
  25. package/dist/index.d.ts +6 -6
  26. package/dist/index.js +118 -16
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +116 -17
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/kyc/core.d.mts +2 -2
  31. package/dist/kyc/core.d.ts +2 -2
  32. package/dist/kyc/core.js +53 -12
  33. package/dist/kyc/core.js.map +1 -1
  34. package/dist/kyc/core.mjs +53 -13
  35. package/dist/kyc/core.mjs.map +1 -1
  36. package/dist/kyc/index.d.mts +172 -16
  37. package/dist/kyc/index.d.ts +172 -16
  38. package/dist/kyc/index.js +53 -12
  39. package/dist/kyc/index.js.map +1 -1
  40. package/dist/kyc/index.mjs +53 -13
  41. package/dist/kyc/index.mjs.map +1 -1
  42. package/dist/react.d.mts +29 -4
  43. package/dist/react.d.ts +29 -4
  44. package/dist/react.js +23 -11
  45. package/dist/react.js.map +1 -1
  46. package/dist/react.mjs +23 -11
  47. package/dist/react.mjs.map +1 -1
  48. package/dist/risk-profile/index.d.mts +16 -6
  49. package/dist/risk-profile/index.d.ts +16 -6
  50. package/dist/risk-profile/index.js +19 -3
  51. package/dist/risk-profile/index.js.map +1 -1
  52. package/dist/risk-profile/index.mjs +19 -4
  53. package/dist/risk-profile/index.mjs.map +1 -1
  54. package/dist/scores/index.js +1 -1
  55. package/dist/scores/index.js.map +1 -1
  56. package/dist/scores/index.mjs +1 -1
  57. package/dist/scores/index.mjs.map +1 -1
  58. package/dist/tax/index.d.mts +1 -1
  59. package/dist/tax/index.d.ts +1 -1
  60. package/dist/tax/index.js +1 -1
  61. package/dist/tax/index.js.map +1 -1
  62. package/dist/tax/index.mjs +1 -1
  63. package/dist/tax/index.mjs.map +1 -1
  64. package/dist/{types-UGyDl1fd.d.ts → types-1kI4SsKB.d.ts} +44 -1
  65. package/dist/{types-BOFaMQxI.d.mts → types-DfbnIaW_.d.mts} +44 -1
  66. package/dist/webhooks/index.d.mts +1 -1
  67. package/dist/webhooks/index.d.ts +1 -1
  68. package/dist/webhooks/index.js +6 -0
  69. package/dist/webhooks/index.js.map +1 -1
  70. package/dist/webhooks/index.mjs +6 -1
  71. package/dist/webhooks/index.mjs.map +1 -1
  72. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { U as UUID, T as Timestamp, R as RiskLevel } from './types-CBQRNL-l.js';
1
+ import { R as RiskLevel, T as Timestamp, U as UUID } from './types-CBQRNL-l.js';
2
2
 
3
3
  /**
4
4
  * Pluggable dedup store for webhook replay protection.
@@ -189,6 +189,61 @@ type WebhookEventHandler<T extends WebhookEventType = WebhookEventType> = (event
189
189
  event_type: T;
190
190
  }>) => void | Promise<void>;
191
191
  type WebhookAnyHandler = (event: WebhookEvent) => void | Promise<void>;
192
+ /** Watchlist category an AML screening matched. */
193
+ type AmlCallbackCategory = 'sanction' | 'pep' | 'adverse_media' | 'fraud' | 'terrorism' | 'narcotics' | 'financial_crime' | 'warning' | 'fitness_probity' | 'previous_client' | 'unknown' | (string & Record<string, never>);
194
+ interface AmlBlockCallbackData {
195
+ /** Your customer identifier — the one the screening ran against. */
196
+ customer_id: string;
197
+ /** Screened full name. Omitted when the screening had no full name. */
198
+ customer_name?: string;
199
+ /**
200
+ * Derived from the number of matches against your tenant's risk thresholds —
201
+ * not from the category. A sanction match is not automatically `high`.
202
+ */
203
+ risk_level: RiskLevel;
204
+ /** The category that matched. `previous_client` is a match on your internal watchlist only. */
205
+ category: AmlCallbackCategory;
206
+ /** Total matches, including internal watchlist matches. */
207
+ hits_count: number;
208
+ /** Name of the AML alert rule that decided the block. */
209
+ applied_rule?: string;
210
+ /** ISO 8601 UTC time the screening ran. */
211
+ screened_at?: Timestamp;
212
+ }
213
+ /**
214
+ * Body POSTed to the webhook URL in your AML screening settings when a
215
+ * screening matches a watchlist and the governing alert rule carries the
216
+ * `block` reaction. Signed with `X-Webhook-Signature: sha256=<hex>`
217
+ * (HMAC-SHA256 of the raw body).
218
+ *
219
+ * Sent only for blocks — nothing is delivered for a clear screening or for a
220
+ * rule that only alerts. Screenings that run without a request from you (after
221
+ * an accepted KYC, or after a name or date-of-birth change) are reported only
222
+ * through this webhook.
223
+ */
224
+ interface AmlBlockCallbackEvent {
225
+ /** Always `"aml"` — dispatch on this. */
226
+ event: 'aml';
227
+ /** The screening reference you supplied, or a generated identifier for automatic screenings. */
228
+ reference: string;
229
+ /** The screening record ID — unique per screening, so dedup on it. */
230
+ resource_id: string;
231
+ /** Always `"blocked"`. */
232
+ status: 'blocked';
233
+ /** Always `true`. */
234
+ block: true;
235
+ /**
236
+ * Human-readable reason for display and audit. Wording is not stable — branch
237
+ * on `data.category` and `data.risk_level` instead.
238
+ */
239
+ block_reason: string;
240
+ data: AmlBlockCallbackData;
241
+ }
242
+ /**
243
+ * Type guard for the AML block webhook. Narrows an already signature-verified,
244
+ * parsed payload to {@link AmlBlockCallbackEvent}.
245
+ */
246
+ declare function isAmlBlockCallbackEvent(value: unknown): value is AmlBlockCallbackEvent;
192
247
 
193
248
  /**
194
249
  * Webhook event handler with signature verification and typed dispatch.
@@ -261,4 +316,4 @@ declare function createWebhookMiddleware(options: WebhookMiddlewareOptions): (re
261
316
  */
262
317
  declare function createNextWebhookHandler(options: WebhookMiddlewareOptions): (request: Request) => Promise<Response>;
263
318
 
264
- export { type BaseWebhookEvent as B, type ComplianceCheckFailedPayload as C, type DecisionRecordedPayload as D, type GeolocationBlockedPayload as G, InMemoryDedupStore as I, type KycStatusChangedPayload as K, type LabelAppliedPayload as L, type NotificationWebhookEvent as N, type ProfileCreatedPayload as P, type RiskCategoryChangedPayload as R, type TaxReminderSentPayload as T, type VerifyWebhookSignatureOptions as V, type WebhookAnyHandler as W, type GeolocationVerifiedPayload as a, type InMemoryDedupStoreOptions as b, type LocationRequestCompletedPayload as c, type ProfileUpdatedPayload as d, type RiskScoreChangedPayload as e, type WebhookDedupStore as f, type WebhookEvent as g, type WebhookEventHandler as h, type WebhookEventType as i, WebhookHandler as j, type WebhookHandlerConfig as k, type WebhookMiddlewareOptions as l, type WebhookNotification as m, createNextWebhookHandler as n, createWebhookMiddleware as o, verifyWebhookSignature as v };
319
+ export { type AmlBlockCallbackData as A, type BaseWebhookEvent as B, type ComplianceCheckFailedPayload as C, type DecisionRecordedPayload as D, type GeolocationBlockedPayload as G, InMemoryDedupStore as I, type KycStatusChangedPayload as K, type LabelAppliedPayload as L, type NotificationWebhookEvent as N, type ProfileCreatedPayload as P, type RiskCategoryChangedPayload as R, type TaxReminderSentPayload as T, type VerifyWebhookSignatureOptions as V, type WebhookAnyHandler as W, type AmlBlockCallbackEvent as a, type AmlCallbackCategory as b, type GeolocationVerifiedPayload as c, type InMemoryDedupStoreOptions as d, type LocationRequestCompletedPayload as e, type ProfileUpdatedPayload as f, type RiskScoreChangedPayload as g, type WebhookDedupStore as h, type WebhookEvent as i, type WebhookEventHandler as j, type WebhookEventType as k, WebhookHandler as l, type WebhookHandlerConfig as m, type WebhookMiddlewareOptions as n, type WebhookNotification as o, createNextWebhookHandler as p, createWebhookMiddleware as q, isAmlBlockCallbackEvent as r, verifyWebhookSignature as v };
@@ -1,4 +1,4 @@
1
- import { U as UUID, T as Timestamp, R as RiskLevel } from './types-CBQRNL-l.mjs';
1
+ import { R as RiskLevel, T as Timestamp, U as UUID } from './types-CBQRNL-l.mjs';
2
2
 
3
3
  /**
4
4
  * Pluggable dedup store for webhook replay protection.
@@ -189,6 +189,61 @@ type WebhookEventHandler<T extends WebhookEventType = WebhookEventType> = (event
189
189
  event_type: T;
190
190
  }>) => void | Promise<void>;
191
191
  type WebhookAnyHandler = (event: WebhookEvent) => void | Promise<void>;
192
+ /** Watchlist category an AML screening matched. */
193
+ type AmlCallbackCategory = 'sanction' | 'pep' | 'adverse_media' | 'fraud' | 'terrorism' | 'narcotics' | 'financial_crime' | 'warning' | 'fitness_probity' | 'previous_client' | 'unknown' | (string & Record<string, never>);
194
+ interface AmlBlockCallbackData {
195
+ /** Your customer identifier — the one the screening ran against. */
196
+ customer_id: string;
197
+ /** Screened full name. Omitted when the screening had no full name. */
198
+ customer_name?: string;
199
+ /**
200
+ * Derived from the number of matches against your tenant's risk thresholds —
201
+ * not from the category. A sanction match is not automatically `high`.
202
+ */
203
+ risk_level: RiskLevel;
204
+ /** The category that matched. `previous_client` is a match on your internal watchlist only. */
205
+ category: AmlCallbackCategory;
206
+ /** Total matches, including internal watchlist matches. */
207
+ hits_count: number;
208
+ /** Name of the AML alert rule that decided the block. */
209
+ applied_rule?: string;
210
+ /** ISO 8601 UTC time the screening ran. */
211
+ screened_at?: Timestamp;
212
+ }
213
+ /**
214
+ * Body POSTed to the webhook URL in your AML screening settings when a
215
+ * screening matches a watchlist and the governing alert rule carries the
216
+ * `block` reaction. Signed with `X-Webhook-Signature: sha256=<hex>`
217
+ * (HMAC-SHA256 of the raw body).
218
+ *
219
+ * Sent only for blocks — nothing is delivered for a clear screening or for a
220
+ * rule that only alerts. Screenings that run without a request from you (after
221
+ * an accepted KYC, or after a name or date-of-birth change) are reported only
222
+ * through this webhook.
223
+ */
224
+ interface AmlBlockCallbackEvent {
225
+ /** Always `"aml"` — dispatch on this. */
226
+ event: 'aml';
227
+ /** The screening reference you supplied, or a generated identifier for automatic screenings. */
228
+ reference: string;
229
+ /** The screening record ID — unique per screening, so dedup on it. */
230
+ resource_id: string;
231
+ /** Always `"blocked"`. */
232
+ status: 'blocked';
233
+ /** Always `true`. */
234
+ block: true;
235
+ /**
236
+ * Human-readable reason for display and audit. Wording is not stable — branch
237
+ * on `data.category` and `data.risk_level` instead.
238
+ */
239
+ block_reason: string;
240
+ data: AmlBlockCallbackData;
241
+ }
242
+ /**
243
+ * Type guard for the AML block webhook. Narrows an already signature-verified,
244
+ * parsed payload to {@link AmlBlockCallbackEvent}.
245
+ */
246
+ declare function isAmlBlockCallbackEvent(value: unknown): value is AmlBlockCallbackEvent;
192
247
 
193
248
  /**
194
249
  * Webhook event handler with signature verification and typed dispatch.
@@ -261,4 +316,4 @@ declare function createWebhookMiddleware(options: WebhookMiddlewareOptions): (re
261
316
  */
262
317
  declare function createNextWebhookHandler(options: WebhookMiddlewareOptions): (request: Request) => Promise<Response>;
263
318
 
264
- export { type BaseWebhookEvent as B, type ComplianceCheckFailedPayload as C, type DecisionRecordedPayload as D, type GeolocationBlockedPayload as G, InMemoryDedupStore as I, type KycStatusChangedPayload as K, type LabelAppliedPayload as L, type NotificationWebhookEvent as N, type ProfileCreatedPayload as P, type RiskCategoryChangedPayload as R, type TaxReminderSentPayload as T, type VerifyWebhookSignatureOptions as V, type WebhookAnyHandler as W, type GeolocationVerifiedPayload as a, type InMemoryDedupStoreOptions as b, type LocationRequestCompletedPayload as c, type ProfileUpdatedPayload as d, type RiskScoreChangedPayload as e, type WebhookDedupStore as f, type WebhookEvent as g, type WebhookEventHandler as h, type WebhookEventType as i, WebhookHandler as j, type WebhookHandlerConfig as k, type WebhookMiddlewareOptions as l, type WebhookNotification as m, createNextWebhookHandler as n, createWebhookMiddleware as o, verifyWebhookSignature as v };
319
+ export { type AmlBlockCallbackData as A, type BaseWebhookEvent as B, type ComplianceCheckFailedPayload as C, type DecisionRecordedPayload as D, type GeolocationBlockedPayload as G, InMemoryDedupStore as I, type KycStatusChangedPayload as K, type LabelAppliedPayload as L, type NotificationWebhookEvent as N, type ProfileCreatedPayload as P, type RiskCategoryChangedPayload as R, type TaxReminderSentPayload as T, type VerifyWebhookSignatureOptions as V, type WebhookAnyHandler as W, type AmlBlockCallbackEvent as a, type AmlCallbackCategory as b, type GeolocationVerifiedPayload as c, type InMemoryDedupStoreOptions as d, type LocationRequestCompletedPayload as e, type ProfileUpdatedPayload as f, type RiskScoreChangedPayload as g, type WebhookDedupStore as h, type WebhookEvent as i, type WebhookEventHandler as j, type WebhookEventType as k, WebhookHandler as l, type WebhookHandlerConfig as m, type WebhookMiddlewareOptions as n, type WebhookNotification as o, createNextWebhookHandler as p, createWebhookMiddleware as q, isAmlBlockCallbackEvent as r, verifyWebhookSignature as v };
package/dist/index.d.mts CHANGED
@@ -2,14 +2,14 @@ import { L as Logger } from './client-q9fN8Hhf.mjs';
2
2
  export { A as AuthCredential, B as BaseClient, a as BaseClientConfig, C as CGSConfig, b as CircuitBreaker, c as CircuitBreakerConfig, d as CircuitBreakerState, e as CircuitBreakerStatus, f as RateLimitStatus, g as RateLimitTracker, h as RefreshingTokenProvider, i as RefreshingTokenProviderOptions, j as RequestInterceptor, R as RequestOptions, k as RequiredBaseClientConfig, l as RequiredCGSConfig, m as RequiredVesantConfig, S as StaticApiKeyProvider, T as TokenProvider, n as TokenProviderContext, V as VesantConfig } from './client-q9fN8Hhf.mjs';
3
3
  import { a as PaginatedResponse } from './types-CBQRNL-l.mjs';
4
4
  export { A as APIResponse, B as BlockReason, C as CustomerStatus, E as EntityType, b as ErrorResponse, L as LocationCompliance, P as PaginationParams, c as Reason, d as Result, R as RiskLevel, S as SuccessResponse, T as Timestamp, U as UUID, V as VerificationEventType } from './types-CBQRNL-l.mjs';
5
- export { B as BaseWebhookEvent, C as ComplianceCheckFailedPayload, D as DecisionRecordedPayload, G as GeolocationBlockedPayload, a as GeolocationVerifiedPayload, I as InMemoryDedupStore, b as InMemoryDedupStoreOptions, K as KycStatusChangedPayload, L as LabelAppliedPayload, c as LocationRequestCompletedPayload, N as NotificationWebhookEvent, P as ProfileCreatedPayload, d as ProfileUpdatedPayload, R as RiskCategoryChangedPayload, e as RiskScoreChangedPayload, T as TaxReminderSentPayload, V as VerifyWebhookSignatureOptions, W as WebhookAnyHandler, f as WebhookDedupStore, g as WebhookEvent, h as WebhookEventHandler, i as WebhookEventType, j as WebhookHandler, k as WebhookHandlerConfig, l as WebhookMiddlewareOptions, m as WebhookNotification, n as createNextWebhookHandler, o as createWebhookMiddleware, v as verifyWebhookSignature } from './index-C3zUKydT.mjs';
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-BwXMQA2a.mjs';
5
+ export { A as AmlBlockCallbackData, a as AmlBlockCallbackEvent, b as AmlCallbackCategory, B as BaseWebhookEvent, C as ComplianceCheckFailedPayload, D as DecisionRecordedPayload, G as GeolocationBlockedPayload, c as GeolocationVerifiedPayload, I as InMemoryDedupStore, d as InMemoryDedupStoreOptions, K as KycStatusChangedPayload, L as LabelAppliedPayload, e as LocationRequestCompletedPayload, N as NotificationWebhookEvent, P as ProfileCreatedPayload, f as ProfileUpdatedPayload, R as RiskCategoryChangedPayload, g as RiskScoreChangedPayload, T as TaxReminderSentPayload, V as VerifyWebhookSignatureOptions, W as WebhookAnyHandler, h as WebhookDedupStore, i as WebhookEvent, j as WebhookEventHandler, k as WebhookEventType, l as WebhookHandler, m as WebhookHandlerConfig, n as WebhookMiddlewareOptions, o as WebhookNotification, p as createNextWebhookHandler, q as createWebhookMiddleware, r as isAmlBlockCallbackEvent, v as verifyWebhookSignature } from './index-C49a7fg2.mjs';
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-XDEhh9VN.mjs';
7
7
  export { GpsIntegrityInput, GpsIntegrityOptions, GpsIntegrityResult, assessGpsIntegrity, collectDeviceSignals, decodeCipherText, generateCipherText, gpsIntegrityInputFromPosition, isCipherTextExpired, probeGeolocationPermission } from './geolocation/index.mjs';
8
8
  export { RiskProfileClient } from './risk-profile/index.mjs';
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-BOFaMQxI.mjs';
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-DfbnIaW_.mjs';
10
10
  export { sdkReasons } from './compliance/index.mjs';
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-D23KhWeh.mjs';
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.mjs';
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-CJI8VO1i.mjs';
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, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycRequestReason, KycRequestReasonCode, KycSkipOptions, KycStatus, KycTriggerEvent, KycVerificationTriggers, Name, ProfileChangeCallbackEvent, ProfileChangeField, ProfileChangeStatus, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedAddressDocumentType, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult, isKycDocumentExpiredCallbackEvent, isProfileChangeCallbackEvent } from './kyc/index.mjs';
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.mjs';
14
14
 
15
15
  /**
@@ -83,6 +83,6 @@ declare const noopLogger: Logger;
83
83
  /**
84
84
  * Single source of truth for the SDK version.
85
85
  */
86
- declare const SDK_VERSION = "1.7.2";
86
+ declare const SDK_VERSION = "1.8.0";
87
87
 
88
88
  export { AuthenticationError, CGSError, CircuitBreakerOpenError, ComplianceBlockedError, ComplianceError, Logger, NetworkError, PaginatedResponse, RateLimitError, SDK_VERSION, ServiceUnavailableError, TimeoutError, ValidationError, VesantError, collectAll, createConsoleLogger, noopLogger, paginate };
package/dist/index.d.ts CHANGED
@@ -2,14 +2,14 @@ import { L as Logger } from './client-q9fN8Hhf.js';
2
2
  export { A as AuthCredential, B as BaseClient, a as BaseClientConfig, C as CGSConfig, b as CircuitBreaker, c as CircuitBreakerConfig, d as CircuitBreakerState, e as CircuitBreakerStatus, f as RateLimitStatus, g as RateLimitTracker, h as RefreshingTokenProvider, i as RefreshingTokenProviderOptions, j as RequestInterceptor, R as RequestOptions, k as RequiredBaseClientConfig, l as RequiredCGSConfig, m as RequiredVesantConfig, S as StaticApiKeyProvider, T as TokenProvider, n as TokenProviderContext, V as VesantConfig } from './client-q9fN8Hhf.js';
3
3
  import { a as PaginatedResponse } from './types-CBQRNL-l.js';
4
4
  export { A as APIResponse, B as BlockReason, C as CustomerStatus, E as EntityType, b as ErrorResponse, L as LocationCompliance, P as PaginationParams, c as Reason, d as Result, R as RiskLevel, S as SuccessResponse, T as Timestamp, U as UUID, V as VerificationEventType } from './types-CBQRNL-l.js';
5
- export { B as BaseWebhookEvent, C as ComplianceCheckFailedPayload, D as DecisionRecordedPayload, G as GeolocationBlockedPayload, a as GeolocationVerifiedPayload, I as InMemoryDedupStore, b as InMemoryDedupStoreOptions, K as KycStatusChangedPayload, L as LabelAppliedPayload, c as LocationRequestCompletedPayload, N as NotificationWebhookEvent, P as ProfileCreatedPayload, d as ProfileUpdatedPayload, R as RiskCategoryChangedPayload, e as RiskScoreChangedPayload, T as TaxReminderSentPayload, V as VerifyWebhookSignatureOptions, W as WebhookAnyHandler, f as WebhookDedupStore, g as WebhookEvent, h as WebhookEventHandler, i as WebhookEventType, j as WebhookHandler, k as WebhookHandlerConfig, l as WebhookMiddlewareOptions, m as WebhookNotification, n as createNextWebhookHandler, o as createWebhookMiddleware, v as verifyWebhookSignature } from './index-DSDgS09k.js';
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-fy3trF2K.js';
5
+ export { A as AmlBlockCallbackData, a as AmlBlockCallbackEvent, b as AmlCallbackCategory, B as BaseWebhookEvent, C as ComplianceCheckFailedPayload, D as DecisionRecordedPayload, G as GeolocationBlockedPayload, c as GeolocationVerifiedPayload, I as InMemoryDedupStore, d as InMemoryDedupStoreOptions, K as KycStatusChangedPayload, L as LabelAppliedPayload, e as LocationRequestCompletedPayload, N as NotificationWebhookEvent, P as ProfileCreatedPayload, f as ProfileUpdatedPayload, R as RiskCategoryChangedPayload, g as RiskScoreChangedPayload, T as TaxReminderSentPayload, V as VerifyWebhookSignatureOptions, W as WebhookAnyHandler, h as WebhookDedupStore, i as WebhookEvent, j as WebhookEventHandler, k as WebhookEventType, l as WebhookHandler, m as WebhookHandlerConfig, n as WebhookMiddlewareOptions, o as WebhookNotification, p as createNextWebhookHandler, q as createWebhookMiddleware, r as isAmlBlockCallbackEvent, v as verifyWebhookSignature } from './index-BosFSGan.js';
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-1kI4SsKB.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-B3DCAHlg.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-4oLoc31v.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, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycRequestReason, KycRequestReasonCode, KycSkipOptions, KycStatus, KycTriggerEvent, KycVerificationTriggers, Name, ProfileChangeCallbackEvent, ProfileChangeField, ProfileChangeStatus, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedAddressDocumentType, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult, isKycDocumentExpiredCallbackEvent, 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
  /**
@@ -83,6 +83,6 @@ declare const noopLogger: Logger;
83
83
  /**
84
84
  * Single source of truth for the SDK version.
85
85
  */
86
- declare const SDK_VERSION = "1.7.2";
86
+ declare const SDK_VERSION = "1.8.0";
87
87
 
88
88
  export { AuthenticationError, CGSError, CircuitBreakerOpenError, ComplianceBlockedError, ComplianceError, Logger, NetworkError, PaginatedResponse, RateLimitError, SDK_VERSION, ServiceUnavailableError, TimeoutError, ValidationError, VesantError, collectAll, createConsoleLogger, noopLogger, paginate };
package/dist/index.js CHANGED
@@ -298,7 +298,7 @@ var noopLogger = {
298
298
  };
299
299
 
300
300
  // src/core/version.ts
301
- var SDK_VERSION = "1.7.2";
301
+ var SDK_VERSION = "1.8.0";
302
302
 
303
303
  // src/shared/browser-utils.ts
304
304
  function generateUUID() {
@@ -1104,6 +1104,7 @@ function isCipherTextExpired(cipherText) {
1104
1104
  }
1105
1105
 
1106
1106
  // src/geolocation/client.ts
1107
+ var DEFAULT_GPS_CONFIG_TTL_MS = 5 * 60 * 1e3;
1107
1108
  var GeolocationClient = class extends BaseClient {
1108
1109
  constructor(config) {
1109
1110
  const baseConfig = {
@@ -1119,6 +1120,8 @@ var GeolocationClient = class extends BaseClient {
1119
1120
  environment: config.environment
1120
1121
  };
1121
1122
  super(baseConfig);
1123
+ this.gpsConfigCache = null;
1124
+ this.gpsConfigTtlMs = config.gpsConfigTtlMs ?? DEFAULT_GPS_CONFIG_TTL_MS;
1122
1125
  }
1123
1126
  // ============================================================================
1124
1127
  // IP Verification & Compliance
@@ -1204,7 +1207,42 @@ var GeolocationClient = class extends BaseClient {
1204
1207
  * ```
1205
1208
  */
1206
1209
  async getGPSConfig(requestOptions) {
1207
- return this.requestWithRetry("/api/v1/geo/config", void 0, void 0, void 0, requestOptions);
1210
+ const cached = this.gpsConfigCache;
1211
+ if (cached && cached.expiresAt > Date.now()) {
1212
+ return cached.value;
1213
+ }
1214
+ return this.refreshGPSConfig(requestOptions);
1215
+ }
1216
+ /**
1217
+ * Re-read the tenant's GPS requirement configuration, ignoring any copy held
1218
+ * from an earlier read.
1219
+ *
1220
+ * These requirements are edited in the compliance console while your
1221
+ * application is running. `getGPSConfig` reuses a fetched copy for a short
1222
+ * period so a long-lived session does not call the API on every event; call
1223
+ * this when you need a change to take effect immediately — for example right
1224
+ * after an administrator saves new settings.
1225
+ *
1226
+ * @returns The current GPS requirement config per event type
1227
+ *
1228
+ * @example
1229
+ * ```typescript
1230
+ * const config = await client.refreshGPSConfig();
1231
+ * if (config.require_gps.login) {
1232
+ * // GPS is now required for login
1233
+ * }
1234
+ * ```
1235
+ */
1236
+ async refreshGPSConfig(requestOptions) {
1237
+ const value = await this.requestWithRetry(
1238
+ "/api/v1/geo/config",
1239
+ void 0,
1240
+ void 0,
1241
+ void 0,
1242
+ requestOptions
1243
+ );
1244
+ this.gpsConfigCache = { value, expiresAt: Date.now() + this.gpsConfigTtlMs };
1245
+ return value;
1208
1246
  }
1209
1247
  /**
1210
1248
  * Mint a short-lived, single-use device-signals nonce.
@@ -1621,17 +1659,27 @@ var RiskProfileClient = class extends BaseClient {
1621
1659
  /**
1622
1660
  * Update customer profile
1623
1661
  *
1662
+ * Omitted fields keep their stored values. When the tenant has the
1663
+ * **On Account Sensitive Action** KYC trigger enabled and the update changes
1664
+ * the customer's name, date of birth or residential address, Vesant applies
1665
+ * the other fields, holds the sensitive ones and answers `202` with a
1666
+ * {@link ProfileUpdateHeldResponse} instead of the profile. Narrow with
1667
+ * {@link isProfileUpdateHeld}, then request a `profile_change` submit link.
1668
+ *
1624
1669
  * @param profileId - Profile UUID
1625
1670
  * @param updates - Fields to update
1626
- * @returns Updated customer profile
1671
+ * @returns Updated customer profile, or the held change
1627
1672
  *
1628
1673
  * @example
1629
1674
  * ```typescript
1630
- * const updated = await client.updateProfile(profileId, {
1675
+ * const result = await client.updateProfile(profileId, {
1631
1676
  * location: 'New York, USA',
1632
1677
  * location_compliance: 'compliant',
1633
1678
  * last_recorded_activity: new Date().toISOString()
1634
1679
  * });
1680
+ * if (isProfileUpdateHeld(result)) {
1681
+ * // name / DOB / address held: start KYC with trigger_event 'profile_change'
1682
+ * }
1635
1683
  * ```
1636
1684
  */
1637
1685
  async updateProfile(profileId, updates, requestOptions) {
@@ -1671,6 +1719,11 @@ var RiskProfileClient = class extends BaseClient {
1671
1719
  }
1672
1720
  };
1673
1721
 
1722
+ // src/risk-profile/types.ts
1723
+ function isProfileUpdateHeld(result) {
1724
+ return typeof result === "object" && result !== null && result.status === "kyc_required" && result.kyc_required === true;
1725
+ }
1726
+
1674
1727
  // src/compliance/block-reasons.ts
1675
1728
  var sdkReasons = {
1676
1729
  // Jurisdiction
@@ -2201,11 +2254,12 @@ var ComplianceClient = class {
2201
2254
  if (profileResult) {
2202
2255
  profile = profileResult;
2203
2256
  if (!isBlocked && this.shouldUpdateProfile(profile, geoVerification.location.city)) {
2204
- profile = await this.riskClient.updateProfile(profile.id, {
2257
+ const updated = await this.riskClient.updateProfile(profile.id, {
2205
2258
  last_recorded_activity: (/* @__PURE__ */ new Date()).toISOString(),
2206
2259
  location: `${geoVerification.location.city}, ${geoVerification.location.country}`,
2207
2260
  location_compliance: geoVerification.is_compliant ? "compliant" : "non-compliant"
2208
2261
  }, requestOptions);
2262
+ profile = isProfileUpdateHeld(updated) ? updated.profile : updated;
2209
2263
  }
2210
2264
  } else {
2211
2265
  if (this.config.autoCreateProfiles && this.config.debug) {
@@ -3151,19 +3205,26 @@ var KycClient = class extends BaseClient {
3151
3205
  }, void 0, requestOptions);
3152
3206
  }
3153
3207
  /**
3154
- * Get a KYC request by ID
3208
+ * Get a KYC record by ID
3209
+ *
3210
+ * Works with your tenant API key. Each entry in `proofs` carries a
3211
+ * short-lived `link` for downloading that document, and `reference` holds
3212
+ * your own customer reference (the `forward_reference`).
3155
3213
  *
3156
- * @param id - KYC request ID
3157
- * @returns KYC request details including proofs and alerts
3214
+ * @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
3215
+ * @returns KYC record including proofs (with download links) and alerts
3158
3216
  *
3159
3217
  * @example
3160
3218
  * ```typescript
3161
3219
  * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
3162
3220
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
3221
+ * kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
3163
3222
  * ```
3164
3223
  */
3165
3224
  async getKycRequest(id) {
3166
- return this.request(`/api/v1/kyc/requests/${id}`);
3225
+ return this.request(`/api/v1/kyc/${encodeURIComponent(id)}`, {
3226
+ headers: this.getUserHeaders()
3227
+ });
3167
3228
  }
3168
3229
  /**
3169
3230
  * List KYC requests with filters and pagination
@@ -3180,6 +3241,10 @@ var KycClient = class extends BaseClient {
3180
3241
  * );
3181
3242
  * console.log(`Found ${requests.total} pending requests`);
3182
3243
  * ```
3244
+ *
3245
+ * @remarks Console session only. This endpoint accepts a Vesant console
3246
+ * (dashboard login) token, not a tenant API key; called with an API key it
3247
+ * fails with `AuthenticationError` or a permission error.
3183
3248
  */
3184
3249
  async listKycRequests(filters, pagination) {
3185
3250
  const params = {};
@@ -3217,6 +3282,10 @@ var KycClient = class extends BaseClient {
3217
3282
  * reason: "Document expired"
3218
3283
  * });
3219
3284
  * ```
3285
+ *
3286
+ * @remarks Console session only. This endpoint accepts a Vesant console
3287
+ * (dashboard login) token, not a tenant API key; called with an API key it
3288
+ * fails with `AuthenticationError` or a permission error.
3220
3289
  */
3221
3290
  async updateKycStatus(request) {
3222
3291
  await this.request("/api/v1/kyc/status", {
@@ -3253,22 +3322,24 @@ var KycClient = class extends BaseClient {
3253
3322
  /**
3254
3323
  * Get downloadable URLs for KYC proofs/documents
3255
3324
  *
3256
- * @param kycId - KYC request ID
3257
- * @returns Array of proof download URLs with expiration
3325
+ * Derived from the `proofs` of `getKycRequest`: the platform attaches a
3326
+ * short-lived download link to every proof on the KYC record, so no
3327
+ * separate endpoint is needed. Proofs without a link are omitted.
3328
+ *
3329
+ * @param kycId - KYC record ID
3330
+ * @returns Array of proof download URLs
3258
3331
  *
3259
3332
  * @example
3260
3333
  * ```typescript
3261
3334
  * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
3262
3335
  * proofs.forEach(proof => {
3263
- * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
3336
+ * console.log(`${proof.type}: ${proof.url}`);
3264
3337
  * });
3265
3338
  * ```
3266
3339
  */
3267
3340
  async getProofDownloadURLs(kycId) {
3268
- return this.request(
3269
- `/api/v1/kyc/proofs/${kycId}`,
3270
- { headers: this.getUserHeaders() }
3271
- );
3341
+ const kyc = await this.getKycRequest(kycId);
3342
+ return (kyc.proofs ?? []).filter((proof) => typeof proof.link === "string" && proof.link !== "").map((proof) => ({ id: proof.id, type: proof.type, url: proof.link }));
3272
3343
  }
3273
3344
  // ============================================================================
3274
3345
  // KYC Overview & Statistics
@@ -3289,6 +3360,10 @@ var KycClient = class extends BaseClient {
3289
3360
  * console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
3290
3361
  * console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
3291
3362
  * ```
3363
+ *
3364
+ * @remarks Console session only. This endpoint accepts a Vesant console
3365
+ * (dashboard login) token, not a tenant API key; called with an API key it
3366
+ * fails with `AuthenticationError` or a permission error.
3292
3367
  */
3293
3368
  async getOverview(fromDate, toDate) {
3294
3369
  const params = {};
@@ -3306,6 +3381,10 @@ var KycClient = class extends BaseClient {
3306
3381
  *
3307
3382
  * @param alertId - Alert ID
3308
3383
  * @returns Alert details
3384
+ *
3385
+ * @remarks Console session only. This endpoint accepts a Vesant console
3386
+ * (dashboard login) token, not a tenant API key; called with an API key it
3387
+ * fails with `AuthenticationError` or a permission error.
3309
3388
  */
3310
3389
  async getAlert(alertId) {
3311
3390
  return this.request(`/api/v1/kyc/alerts/${alertId}`);
@@ -3329,6 +3408,10 @@ var KycClient = class extends BaseClient {
3329
3408
  * );
3330
3409
  * console.log(`Found ${alerts.total} alerts`);
3331
3410
  * ```
3411
+ *
3412
+ * @remarks Console session only. This endpoint accepts a Vesant console
3413
+ * (dashboard login) token, not a tenant API key; called with an API key it
3414
+ * fails with `AuthenticationError` or a permission error.
3332
3415
  */
3333
3416
  async listAlerts(filters, pagination) {
3334
3417
  const params = {};
@@ -3375,6 +3458,10 @@ var KycClient = class extends BaseClient {
3375
3458
  * reason: "Requires senior review - suspicious documents"
3376
3459
  * });
3377
3460
  * ```
3461
+ *
3462
+ * @remarks Console session only. This endpoint accepts a Vesant console
3463
+ * (dashboard login) token, not a tenant API key; called with an API key it
3464
+ * fails with `AuthenticationError` or a permission error.
3378
3465
  */
3379
3466
  async updateAlert(alertId, update) {
3380
3467
  await this.request(`/api/v1/kyc/alerts/${alertId}`, {
@@ -3397,6 +3484,10 @@ var KycClient = class extends BaseClient {
3397
3484
  * console.log(`Face verification required: ${prefs.is_face_verification_required}`);
3398
3485
  * console.log(`Required documents: ${prefs.required_document_count}`);
3399
3486
  * ```
3487
+ *
3488
+ * @remarks Console session only. This endpoint accepts a Vesant console
3489
+ * (dashboard login) token, not a tenant API key; called with an API key it
3490
+ * fails with `AuthenticationError` or a permission error.
3400
3491
  */
3401
3492
  async getPreferences() {
3402
3493
  return this.request("/api/v1/kyc/preferences");
@@ -3570,6 +3661,9 @@ var KYC_DECLINED_DESCRIPTIONS = {
3570
3661
  function isKycDocumentExpiredCallbackEvent(value) {
3571
3662
  return typeof value === "object" && value !== null && value.event === "kyc_document_expired";
3572
3663
  }
3664
+ function isProfileChangeCallbackEvent(value) {
3665
+ return typeof value === "object" && value !== null && value.event === "profile_change";
3666
+ }
3573
3667
 
3574
3668
  // src/tax/client.ts
3575
3669
  var TaxClient = class extends BaseClient {
@@ -3859,6 +3953,11 @@ function buildHandler(options) {
3859
3953
  return handler;
3860
3954
  }
3861
3955
 
3956
+ // src/webhooks/types.ts
3957
+ function isAmlBlockCallbackEvent(value) {
3958
+ return typeof value === "object" && value !== null && value.event === "aml" && value.block === true;
3959
+ }
3960
+
3862
3961
  exports.AuthenticationError = AuthenticationError;
3863
3962
  exports.BaseClient = BaseClient;
3864
3963
  exports.CGSError = CGSError;
@@ -3894,8 +3993,11 @@ exports.createWebhookMiddleware = createWebhookMiddleware;
3894
3993
  exports.decodeCipherText = decodeCipherText;
3895
3994
  exports.generateCipherText = generateCipherText;
3896
3995
  exports.gpsIntegrityInputFromPosition = gpsIntegrityInputFromPosition;
3996
+ exports.isAmlBlockCallbackEvent = isAmlBlockCallbackEvent;
3897
3997
  exports.isCipherTextExpired = isCipherTextExpired;
3898
3998
  exports.isKycDocumentExpiredCallbackEvent = isKycDocumentExpiredCallbackEvent;
3999
+ exports.isProfileChangeCallbackEvent = isProfileChangeCallbackEvent;
4000
+ exports.isProfileUpdateHeld = isProfileUpdateHeld;
3899
4001
  exports.noopLogger = noopLogger;
3900
4002
  exports.paginate = paginate;
3901
4003
  exports.probeGeolocationPermission = probeGeolocationPermission;