vesant-sdk 1.7.2-dev.617dd44 → 1.7.2-dev.9ef17db

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 (42) hide show
  1. package/README.md +4 -0
  2. package/dist/{client-D23KhWeh.d.mts → client-5q4whhGu.d.mts} +1 -1
  3. package/dist/{client-fy3trF2K.d.ts → client-BaUekQT8.d.ts} +32 -10
  4. package/dist/{client-B3DCAHlg.d.ts → client-DUHC-68_.d.ts} +1 -1
  5. package/dist/{client-BwXMQA2a.d.mts → client-XDEhh9VN.d.mts} +32 -10
  6. package/dist/compliance/index.d.mts +2 -2
  7. package/dist/compliance/index.d.ts +2 -2
  8. package/dist/compliance/index.js +39 -1
  9. package/dist/compliance/index.js.map +1 -1
  10. package/dist/compliance/index.mjs +39 -1
  11. package/dist/compliance/index.mjs.map +1 -1
  12. package/dist/geolocation/index.d.mts +2 -2
  13. package/dist/geolocation/index.d.ts +2 -2
  14. package/dist/geolocation/index.js +39 -1
  15. package/dist/geolocation/index.js.map +1 -1
  16. package/dist/geolocation/index.mjs +39 -1
  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 +113 -30
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +113 -31
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/kyc/core.d.mts +1 -1
  25. package/dist/kyc/core.d.ts +1 -1
  26. package/dist/kyc/core.js +74 -29
  27. package/dist/kyc/core.js.map +1 -1
  28. package/dist/kyc/core.mjs +74 -30
  29. package/dist/kyc/core.mjs.map +1 -1
  30. package/dist/kyc/index.d.mts +334 -65
  31. package/dist/kyc/index.d.ts +334 -65
  32. package/dist/kyc/index.js +74 -29
  33. package/dist/kyc/index.js.map +1 -1
  34. package/dist/kyc/index.mjs +74 -30
  35. package/dist/kyc/index.mjs.map +1 -1
  36. package/dist/react.d.mts +126 -48
  37. package/dist/react.d.ts +126 -48
  38. package/dist/react.js +257 -35
  39. package/dist/react.js.map +1 -1
  40. package/dist/react.mjs +255 -36
  41. package/dist/react.mjs.map +1 -1
  42. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3,13 +3,13 @@ export { A as AuthCredential, B as BaseClient, a as BaseClientConfig, C as CGSCo
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
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';
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
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';
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, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } 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-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';
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
@@ -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.
@@ -2923,19 +2961,27 @@ var KycClient = class extends BaseClient {
2923
2961
  *
2924
2962
  * Generates a link that the user can visit to submit their KYC documents.
2925
2963
  *
2964
+ * Pass the `trigger_event` that matches the user action so the tenant's
2965
+ * trigger preferences decide whether verification is required; inspect
2966
+ * `kyc_required` and `reason` on the response before redirecting.
2967
+ *
2926
2968
  * Optionally pass the customer's registered identity data as
2927
2969
  * `customer_data` (same shape as the geolocation `customer_data` block).
2928
2970
  * It seeds the customer's risk profile so document verification can
2929
2971
  * cross-check the submitted document against trusted reference data;
2930
2972
  * fields never overwrite data already on the profile.
2931
2973
  *
2932
- * @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
2933
- * @returns Response containing the redirect link and KYC ID
2974
+ * The call is made once and is not retried: each request creates a new
2975
+ * KYC record and link, so a retry after a timeout would leave duplicates.
2976
+ *
2977
+ * @param request - Request containing the user ID, trigger event, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
2978
+ * @returns Response containing the redirect link, KYC ID, `kyc_required`, `can_skip` and `reason`
2934
2979
  *
2935
2980
  * @example
2936
2981
  * ```typescript
2937
2982
  * const result = await client.requestKycSubmitLink({
2938
2983
  * user_id: "user_123",
2984
+ * trigger_event: "onboarding",
2939
2985
  * redirect_url: "https://merchant.com/kyc-complete", // optional
2940
2986
  * callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
2941
2987
  * customer_data: { // optional - seeds the risk profile for document cross-checks
@@ -2948,25 +2994,25 @@ var KycClient = class extends BaseClient {
2948
2994
  * }
2949
2995
  * });
2950
2996
  *
2997
+ * if (!result.kyc_required) return proceed();
2951
2998
  * console.log(`Redirect user to: ${result.link}`);
2952
2999
  * console.log(`KYC ID: ${result.kyc_id}`);
2953
3000
  * ```
2954
3001
  */
2955
3002
  async requestKycSubmitLink(request, requestOptions) {
2956
- return this.requestWithRetry("/api/v1/kyc/request", {
3003
+ return this.request("/api/v1/kyc/request", {
2957
3004
  method: "POST",
2958
3005
  body: JSON.stringify(request),
2959
3006
  headers: this.getUserHeaders()
2960
- }, void 0, void 0, requestOptions);
3007
+ }, void 0, requestOptions);
2961
3008
  }
2962
3009
  /**
2963
3010
  * Create a Event-Based Face Verification session.
2964
3011
  *
2965
3012
  * Inspect the response before showing UI:
2966
- * - `is_required === false` → skip face capture; `reason` explains why.
2967
- * - `device_type === 'desktop'` render `qr_payload` as a QR; the
2968
- * mobile device picks up the session via the connect endpoint.
2969
- * - `device_type === 'mobile'` → open the face capture modal directly.
3013
+ * - `is_required === false` → skip face verification; `reason` explains why.
3014
+ * - `verification_url` presentembed the hosted journey and poll status.
3015
+ * - `verification_url` absent → use the local camera / QR fallback.
2970
3016
  *
2971
3017
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
2972
3018
  */
@@ -2980,9 +3026,9 @@ var KycClient = class extends BaseClient {
2980
3026
  /**
2981
3027
  * Submit a real-time face capture for an active Event-Based Face Verification session.
2982
3028
  *
2983
- * **Mobile-only.** The server rejects desktop User-Agents with HTTP
2984
- * 400 (`face capture must be completed on a mobile device`). Use the
2985
- * QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
3029
+ * Works from any device: the platform does not inspect the User-Agent.
3030
+ * `FaceCaptureModal` decides between direct capture and the QR handoff
3031
+ * on the client; custom UIs may submit from desktop or mobile alike.
2986
3032
  *
2987
3033
  * The `data` field on the response carries `retries_remaining`,
2988
3034
  * `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
@@ -3013,11 +3059,28 @@ var KycClient = class extends BaseClient {
3013
3059
  headers: this.getUserHeaders()
3014
3060
  });
3015
3061
  }
3062
+ /**
3063
+ * Mint a fresh hosted verification journey for the next attempt on an
3064
+ * active session whose previous hosted-journey attempt was declined.
3065
+ * Only valid while the session is active and attempts remain; the
3066
+ * response carries the new `verification_url` to embed. Used internally
3067
+ * by `FaceCaptureModal`'s Try Again flow in hosted-journey mode.
3068
+ *
3069
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
3070
+ */
3071
+ async retryEventBasedFaceVerificationJourney(token) {
3072
+ return this.request("/api/v1/kyc/face/onsite/journey", {
3073
+ method: "POST",
3074
+ body: JSON.stringify({ token }),
3075
+ headers: this.getUserHeaders()
3076
+ });
3077
+ }
3016
3078
  /**
3017
3079
  * Fetch the Redis-backed handoff session for a token. Same backing
3018
- * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
3019
- * callers poll `mobile_connected` to detect when a mobile device has
3020
- * scanned the QR and attached.
3080
+ * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). The
3081
+ * Event-Based Face Verification database session still expires after
3082
+ * 10 minutes. Desktop callers poll `mobile_connected` to detect when a
3083
+ * mobile device has scanned the QR and attached.
3021
3084
  *
3022
3085
  * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
3023
3086
  */
@@ -3046,25 +3109,30 @@ var KycClient = class extends BaseClient {
3046
3109
  * Check KYC status for a user
3047
3110
  *
3048
3111
  * Returns the current KYC status:
3049
- * - "complete" → KYC verified, show "Continue to Login"
3050
- * - "processing" → Under review, show "Continue to Login"
3051
- * - "failed" / "declined" Show error + retry option
3052
- * - "pending" / "in_progress" Keep polling
3112
+ * - "accepted" / "review.pending" → verified (limited access while under review)
3113
+ * - "pending" → documents submitted, verification running: keep polling
3114
+ * - "awaiting_kyc" nothing submitted yet; check `link_expired` before
3115
+ * re-surfacing or re-requesting the link. Never treat as in progress.
3116
+ * - "declined" → show `additional_data.declined_reasons` (fallback
3117
+ * `declined_reason`) with a retry option
3053
3118
  *
3054
- * @param request - Request containing user_id and token
3055
- * @returns Response with kyc_status and message (reason)
3119
+ * @param request - Request containing user_id and kyc_id
3120
+ * @returns Response with status, verification flags and, once terminal, the full record in `additional_data`
3056
3121
  *
3057
3122
  * @example
3058
3123
  * ```typescript
3059
3124
  * const result = await client.checkKycStatus({
3060
3125
  * user_id: "user_123",
3061
- * token: "auth_token_xyz"
3126
+ * kyc_id: "550e8400-e29b-41d4-a716-446655440000"
3062
3127
  * });
3063
3128
  *
3064
- * if (result.kyc_status === 'complete') {
3065
- * // Show "Continue to Login"
3066
- * } else if (result.kyc_status === 'failed' || result.kyc_status === 'declined') {
3129
+ * if (result.status === 'accepted' || result.status === 'review.pending') {
3130
+ * // Grant access
3131
+ * } else if (result.status === 'declined') {
3132
+ * const reasons = result.additional_data?.declined_reasons;
3067
3133
  * // Show error + retry option
3134
+ * } else if (result.status === 'awaiting_kyc') {
3135
+ * // Prompt to verify; request a new link when result.link_expired is true
3068
3136
  * } else {
3069
3137
  * // Keep polling
3070
3138
  * }
@@ -3086,7 +3154,9 @@ var KycClient = class extends BaseClient {
3086
3154
  /**
3087
3155
  * Submit a document verification request with OCR
3088
3156
  *
3089
- * Uses requestWithRetry() for automatic retry on transient failures.
3157
+ * The call is made once and is not retried: every submission is processed
3158
+ * and billed, and the platform does not replay this route from an
3159
+ * idempotency key. Retry explicitly if the request fails.
3090
3160
  *
3091
3161
  * @param request - Document verification request with documents and customer info
3092
3162
  * @returns Verification response with status and reference
@@ -3112,11 +3182,11 @@ var KycClient = class extends BaseClient {
3112
3182
  * ```
3113
3183
  */
3114
3184
  async submitVerification(request, requestOptions) {
3115
- return this.requestWithRetry("/api/v1/kyc/submit", {
3185
+ return this.request("/api/v1/kyc/submit", {
3116
3186
  method: "POST",
3117
3187
  body: JSON.stringify(request),
3118
3188
  headers: this.getUserHeaders()
3119
- }, void 0, void 0, requestOptions);
3189
+ }, void 0, requestOptions);
3120
3190
  }
3121
3191
  /**
3122
3192
  * Get a KYC request by ID
@@ -3173,14 +3243,14 @@ var KycClient = class extends BaseClient {
3173
3243
  * ```typescript
3174
3244
  * // Accept a KYC request
3175
3245
  * await client.updateKycStatus({
3176
- * reference: "shufti_ref_123",
3246
+ * reference: "kyc-ref-123",
3177
3247
  * status: "accepted",
3178
3248
  * reason: "All documents verified successfully"
3179
3249
  * });
3180
3250
  *
3181
3251
  * // Decline a KYC request
3182
3252
  * await client.updateKycStatus({
3183
- * reference: "shufti_ref_456",
3253
+ * reference: "kyc-ref-456",
3184
3254
  * status: "declined",
3185
3255
  * reason: "Document expired"
3186
3256
  * });
@@ -3196,6 +3266,10 @@ var KycClient = class extends BaseClient {
3196
3266
  /**
3197
3267
  * Request additional documents from customer
3198
3268
  *
3269
+ * @deprecated The platform does not expose this operation; the call always
3270
+ * fails. Request additional documents from the Vesant console instead.
3271
+ * This method will be removed in a future release.
3272
+ *
3199
3273
  * @param request - Request with KYC ID and document types needed
3200
3274
  *
3201
3275
  * @example
@@ -3368,6 +3442,11 @@ var KycClient = class extends BaseClient {
3368
3442
  /**
3369
3443
  * Update KYC preferences for the tenant
3370
3444
  *
3445
+ * @deprecated KYC preferences are managed in the Vesant console; the
3446
+ * 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.
3449
+ *
3371
3450
  * @param update - Fields to update
3372
3451
  * @returns Updated preferences
3373
3452
  *
@@ -3526,6 +3605,9 @@ var KYC_DECLINED_DESCRIPTIONS = {
3526
3605
  KYC_PROVIDER_REJECTED: "Identity verification was rejected by the verification provider",
3527
3606
  KYC_DECLINED: "Identity verification was declined"
3528
3607
  };
3608
+ function isKycDocumentExpiredCallbackEvent(value) {
3609
+ return typeof value === "object" && value !== null && value.event === "kyc_document_expired";
3610
+ }
3529
3611
 
3530
3612
  // src/tax/client.ts
3531
3613
  var TaxClient = class extends BaseClient {
@@ -3851,6 +3933,7 @@ exports.decodeCipherText = decodeCipherText;
3851
3933
  exports.generateCipherText = generateCipherText;
3852
3934
  exports.gpsIntegrityInputFromPosition = gpsIntegrityInputFromPosition;
3853
3935
  exports.isCipherTextExpired = isCipherTextExpired;
3936
+ exports.isKycDocumentExpiredCallbackEvent = isKycDocumentExpiredCallbackEvent;
3854
3937
  exports.noopLogger = noopLogger;
3855
3938
  exports.paginate = paginate;
3856
3939
  exports.probeGeolocationPermission = probeGeolocationPermission;