vesant-sdk 1.7.1-dev.ec505dc → 1.7.1-dev.fe54858

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 (41) hide show
  1. package/dist/{client-BY4Quazn.d.ts → client-B3DCAHlg.d.ts} +1 -1
  2. package/dist/{client-Yxat9wAO.d.mts → client-BwXMQA2a.d.mts} +35 -1
  3. package/dist/{client-CX1jcLNZ.d.mts → client-D23KhWeh.d.mts} +1 -1
  4. package/dist/{client-C-u9lE8N.d.ts → client-fy3trF2K.d.ts} +35 -1
  5. package/dist/compliance/index.d.mts +2 -2
  6. package/dist/compliance/index.d.ts +2 -2
  7. package/dist/compliance/index.js +46 -1
  8. package/dist/compliance/index.js.map +1 -1
  9. package/dist/compliance/index.mjs +46 -1
  10. package/dist/compliance/index.mjs.map +1 -1
  11. package/dist/geolocation/index.d.mts +2 -2
  12. package/dist/geolocation/index.d.ts +2 -2
  13. package/dist/geolocation/index.js +46 -1
  14. package/dist/geolocation/index.js.map +1 -1
  15. package/dist/geolocation/index.mjs +46 -1
  16. package/dist/geolocation/index.mjs.map +1 -1
  17. package/dist/index.d.mts +3 -3
  18. package/dist/index.d.ts +3 -3
  19. package/dist/index.js +50 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +50 -2
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/kyc/core.d.mts +1 -1
  24. package/dist/kyc/core.d.ts +1 -1
  25. package/dist/kyc/core.js +4 -0
  26. package/dist/kyc/core.js.map +1 -1
  27. package/dist/kyc/core.mjs +4 -1
  28. package/dist/kyc/core.mjs.map +1 -1
  29. package/dist/kyc/index.d.mts +122 -16
  30. package/dist/kyc/index.d.ts +122 -16
  31. package/dist/kyc/index.js +4 -0
  32. package/dist/kyc/index.js.map +1 -1
  33. package/dist/kyc/index.mjs +4 -1
  34. package/dist/kyc/index.mjs.map +1 -1
  35. package/dist/react.d.mts +2 -2
  36. package/dist/react.d.ts +2 -2
  37. package/dist/react.js +3 -0
  38. package/dist/react.js.map +1 -1
  39. package/dist/react.mjs +3 -0
  40. package/dist/react.mjs.map +1 -1
  41. 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, U as UpdateDeviceTrustRequest, Q as UpdateGeofenceRuleRequest, S as UpdateJurisdictionRequest, T as UseAlertsOptions, W as UseAlertsResult, X as UseGeolocationOptions, Y as UseGeolocationResult, Z as UseLocationCaptureOptions, _ as UseLocationCaptureResult, $ as UseLocationRequestsOptions, a0 as UseLocationRequestsResult, a1 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a2 as VerifyIPRequest } from './client-C-u9lE8N.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';
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-BY4Quazn.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-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, KycDocumentExpiredCallbackEvent, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycRequestReason, KycRequestReasonCode, KycStatus, KycTriggerEvent, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, 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
@@ -1206,6 +1206,49 @@ var GeolocationClient = class extends BaseClient {
1206
1206
  async getGPSConfig(requestOptions) {
1207
1207
  return this.requestWithRetry("/api/v1/geo/config", void 0, void 0, void 0, requestOptions);
1208
1208
  }
1209
+ /**
1210
+ * Mint a short-lived, single-use device-signals nonce.
1211
+ *
1212
+ * The nonce is bound to the tenant, user, and event type and is consumed
1213
+ * server-side during validation, so a captured device-signals envelope cannot
1214
+ * be replayed. `validateCipherText` mints and attaches one automatically; call
1215
+ * this directly only if you manage the nonce yourself.
1216
+ *
1217
+ * @param userId - User ID the nonce is bound to
1218
+ * @param eventType - Event type the nonce is bound to (login, registration, ...)
1219
+ * @returns The nonce and its expiry
1220
+ */
1221
+ async fetchSignalsNonce(userId, eventType, requestOptions) {
1222
+ if (!userId?.trim()) {
1223
+ throw new ValidationError("userId is required and must be a non-empty string", ["userId"]);
1224
+ }
1225
+ const request = { user_id: userId, event_type: eventType };
1226
+ return this.request(
1227
+ "/api/v1/geo/signals-token",
1228
+ {
1229
+ method: "POST",
1230
+ body: JSON.stringify(request)
1231
+ },
1232
+ void 0,
1233
+ requestOptions
1234
+ );
1235
+ }
1236
+ /**
1237
+ * Best-effort nonce mint for validation. Returns undefined if minting fails —
1238
+ * the server is the sole authority and blocks when a nonce is required, so this
1239
+ * never downgrades security on the client's say-so.
1240
+ */
1241
+ async resolveSignalsNonce(userId, eventType, requestOptions) {
1242
+ try {
1243
+ const { nonce } = await this.fetchSignalsNonce(userId, eventType, requestOptions);
1244
+ return nonce;
1245
+ } catch (err) {
1246
+ this.logger.warn(
1247
+ `Failed to mint device-signals nonce; proceeding without it: ${err instanceof Error ? err.message : String(err)}`
1248
+ );
1249
+ return void 0;
1250
+ }
1251
+ }
1209
1252
  // ============================================================================
1210
1253
  // CipherText Validation
1211
1254
  // ============================================================================
@@ -1257,12 +1300,14 @@ var GeolocationClient = class extends BaseClient {
1257
1300
  if (!userId?.trim()) {
1258
1301
  throw new ValidationError("userId is required and must be a non-empty string", ["userId"]);
1259
1302
  }
1303
+ const nonce = await this.resolveSignalsNonce(userId, eventType, requestOptions);
1260
1304
  const request = {
1261
1305
  cipher_text: cipherText,
1262
1306
  user_id: userId,
1263
1307
  event_type: eventType,
1264
1308
  expected_ip: expectedIP,
1265
- customer_data: customerData
1309
+ customer_data: customerData,
1310
+ nonce
1266
1311
  };
1267
1312
  return this.requestWithRetry(
1268
1313
  "/api/v1/geo/validate-ciphertext",
@@ -3481,6 +3526,9 @@ var KYC_DECLINED_DESCRIPTIONS = {
3481
3526
  KYC_PROVIDER_REJECTED: "Identity verification was rejected by the verification provider",
3482
3527
  KYC_DECLINED: "Identity verification was declined"
3483
3528
  };
3529
+ function isKycDocumentExpiredCallbackEvent(value) {
3530
+ return typeof value === "object" && value !== null && value.event === "kyc_document_expired";
3531
+ }
3484
3532
 
3485
3533
  // src/tax/client.ts
3486
3534
  var TaxClient = class extends BaseClient {
@@ -3806,6 +3854,7 @@ exports.decodeCipherText = decodeCipherText;
3806
3854
  exports.generateCipherText = generateCipherText;
3807
3855
  exports.gpsIntegrityInputFromPosition = gpsIntegrityInputFromPosition;
3808
3856
  exports.isCipherTextExpired = isCipherTextExpired;
3857
+ exports.isKycDocumentExpiredCallbackEvent = isKycDocumentExpiredCallbackEvent;
3809
3858
  exports.noopLogger = noopLogger;
3810
3859
  exports.paginate = paginate;
3811
3860
  exports.probeGeolocationPermission = probeGeolocationPermission;