vesant-sdk 1.6.6 → 2.0.0-dev.40d1c39

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 (86) hide show
  1. package/README.md +14 -4
  2. package/dist/client-BJ87_Vv5.d.ts +430 -0
  3. package/dist/{client-ePzhQKp9.d.mts → client-BolQlL5e.d.mts} +1 -1
  4. package/dist/{client-ePzhQKp9.d.ts → client-BolQlL5e.d.ts} +1 -1
  5. package/dist/{client-BlCxjbY2.d.mts → client-Bvp-f05-.d.ts} +7 -7
  6. package/dist/{client-C_A7QLcB.d.ts → client-CIEa7xYG.d.mts} +7 -7
  7. package/dist/client-IAOGCBfm.d.mts +430 -0
  8. package/dist/compliance/index.d.mts +25 -429
  9. package/dist/compliance/index.d.ts +25 -429
  10. package/dist/compliance/index.js +137 -58
  11. package/dist/compliance/index.js.map +1 -1
  12. package/dist/compliance/index.mjs +137 -59
  13. package/dist/compliance/index.mjs.map +1 -1
  14. package/dist/decisions/index.d.mts +2 -2
  15. package/dist/decisions/index.d.ts +2 -2
  16. package/dist/decisions/index.js +1 -1
  17. package/dist/decisions/index.js.map +1 -1
  18. package/dist/decisions/index.mjs +1 -1
  19. package/dist/decisions/index.mjs.map +1 -1
  20. package/dist/geolocation/index.d.mts +4 -4
  21. package/dist/geolocation/index.d.ts +4 -4
  22. package/dist/geolocation/index.js +6 -24
  23. package/dist/geolocation/index.js.map +1 -1
  24. package/dist/geolocation/index.mjs +6 -24
  25. package/dist/geolocation/index.mjs.map +1 -1
  26. package/dist/index.d.mts +14 -71
  27. package/dist/index.d.ts +14 -71
  28. package/dist/index.js +190 -237
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +189 -236
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/kyc/core.d.mts +4 -4
  33. package/dist/kyc/core.d.ts +4 -4
  34. package/dist/kyc/core.js +24 -13
  35. package/dist/kyc/core.js.map +1 -1
  36. package/dist/kyc/core.mjs +24 -14
  37. package/dist/kyc/core.mjs.map +1 -1
  38. package/dist/kyc/index.d.mts +20 -27
  39. package/dist/kyc/index.d.ts +20 -27
  40. package/dist/kyc/index.js +24 -13
  41. package/dist/kyc/index.js.map +1 -1
  42. package/dist/kyc/index.mjs +24 -14
  43. package/dist/kyc/index.mjs.map +1 -1
  44. package/dist/react.d.mts +6 -6
  45. package/dist/react.d.ts +6 -6
  46. package/dist/react.js +18 -5
  47. package/dist/react.js.map +1 -1
  48. package/dist/react.mjs +18 -5
  49. package/dist/react.mjs.map +1 -1
  50. package/dist/risk-profile/index.d.mts +4 -4
  51. package/dist/risk-profile/index.d.ts +4 -4
  52. package/dist/risk-profile/index.js +1 -1
  53. package/dist/risk-profile/index.js.map +1 -1
  54. package/dist/risk-profile/index.mjs +1 -1
  55. package/dist/risk-profile/index.mjs.map +1 -1
  56. package/dist/scores/index.d.mts +2 -2
  57. package/dist/scores/index.d.ts +2 -2
  58. package/dist/scores/index.js +1 -1
  59. package/dist/scores/index.js.map +1 -1
  60. package/dist/scores/index.mjs +1 -1
  61. package/dist/scores/index.mjs.map +1 -1
  62. package/dist/tax/index.d.mts +6 -41
  63. package/dist/tax/index.d.ts +6 -41
  64. package/dist/tax/index.js +1 -36
  65. package/dist/tax/index.js.map +1 -1
  66. package/dist/tax/index.mjs +1 -36
  67. package/dist/tax/index.mjs.map +1 -1
  68. package/dist/{types-X5Md_dD_.d.ts → types-2utj53GK.d.ts} +2 -2
  69. package/dist/{types-1RzYeSal.d.mts → types-C4Zx0d_u.d.mts} +2 -2
  70. package/dist/{types-B4Ezqo7V.d.mts → types-QUCWam16.d.mts} +7 -1
  71. package/dist/{types-B4Ezqo7V.d.ts → types-QUCWam16.d.ts} +7 -1
  72. package/dist/webhooks/index.d.mts +181 -2
  73. package/dist/webhooks/index.d.ts +181 -2
  74. package/dist/webhooks/index.js +49 -7
  75. package/dist/webhooks/index.js.map +1 -1
  76. package/dist/webhooks/index.mjs +49 -7
  77. package/dist/webhooks/index.mjs.map +1 -1
  78. package/package.json +16 -13
  79. package/dist/fraud/index.d.mts +0 -80
  80. package/dist/fraud/index.d.ts +0 -80
  81. package/dist/fraud/index.js +0 -606
  82. package/dist/fraud/index.js.map +0 -1
  83. package/dist/fraud/index.mjs +0 -604
  84. package/dist/fraud/index.mjs.map +0 -1
  85. package/dist/index-B04H4xfJ.d.mts +0 -320
  86. package/dist/index-CItMPmLL.d.ts +0 -320
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { L as Logger, B as BaseClient, a as BaseClientConfig, R as RequestOptions } from './client-ePzhQKp9.js';
2
- export { d as CGSConfig, i as CircuitBreaker, C as CircuitBreakerConfig, g as CircuitBreakerState, h as CircuitBreakerStatus, j as RateLimitStatus, k as RateLimitTracker, b as RequestInterceptor, f as RequiredBaseClientConfig, e as RequiredCGSConfig, c as RequiredVesantConfig, V as VesantConfig } from './client-ePzhQKp9.js';
3
- export { A as APIResponse, C as CustomerStatus, E as EntityType, b as ErrorResponse, L as LocationCompliance, a as PaginatedResponse, P as PaginationParams, c as Result, R as RiskLevel, S as SuccessResponse, T as Timestamp, U as UUID, V as VerificationEventType } from './types-B4Ezqo7V.js';
4
- import { T as TransactionCreateDTO, a as TransactionCreateResponse } from './index-CItMPmLL.js';
5
- export { B as BaseWebhookEvent, C as ComplianceCheckFailedPayload, D as DecisionRecordedPayload, o as GeolocationBlockedPayload, G as GeolocationVerifiedPayload, J as JSONB, K as KycStatusChangedPayload, L as LabelAppliedPayload, p as LocationRequestCompletedPayload, P as ProfileCreatedPayload, n as ProfileUpdatedPayload, m as RiskCategoryChangedPayload, R as RiskScoreChangedPayload, r as TaxFormType, s as TaxReminderSentPayload, q as TaxReminderType, g as Transaction, t as TransactionCallbackPayload, h as TransactionClientConfig, c as TransactionMode, d as TransactionStatus, b as TransactionType, y as WebhookAnyHandler, u as WebhookEvent, x as WebhookEventHandler, l as WebhookEventType, W as WebhookHandler, w as WebhookHandlerConfig, i as WebhookMiddlewareOptions, f as WithholdingReason, e as WithholdingType, k as createNextWebhookHandler, j as createWebhookMiddleware, v as verifyWebhookSignature } from './index-CItMPmLL.js';
6
- export { B as APIError, p as AlertFilters, q as AlertListResponse, m as AlertSeverity, A as AlertStatus, n as AlertType, e as CipherTextCustomerData, b as CipherTextOptions, C as CipherTextPayload, a as CipherTextReason, c as CipherTextResult, l as ComplianceCheckResponse, w as CreateGeofenceRuleRequest, s as CreateJurisdictionRequest, Q as CreateLocationRequestRequest, r as DashboardMetrics, d as DecryptedCipherText, j as DeviceFingerprint, D as DeviceFingerprintRequest, k as DeviceTrustResult, h as GeoIPResult, u as GeofenceAction, i as GeofenceEvaluation, v as GeofenceRule, t as GeofenceRuleType, o as GeolocationAlert, G as GeolocationClient, F as GeolocationClientConfig, E as GeolocationConfigResponse, z as GeolocationRecord, J as JurisdictionConfig, Y as LocationCaptureRequest, _ as LocationCaptureResponse, P as LocationRequest, O as LocationRequestChannel, S as LocationRequestFilters, T as LocationRequestListResponse, R as LocationRequestResult, N as LocationRequestStatus, Z as LocationShareInfo, L as LocationVerification, W as ResendLocationRequestRequest, y as UpdateDeviceTrustRequest, x as UpdateGeofenceRuleRequest, U as UpdateJurisdictionRequest, K as UseAlertsOptions, M as UseAlertsResult, H as UseGeolocationOptions, I as UseGeolocationResult, a1 as UseLocationCaptureOptions, a2 as UseLocationCaptureResult, $ as UseLocationRequestsOptions, a0 as UseLocationRequestsResult, V as ValidateCipherTextRequest, f as ValidateCipherTextResponse, g as VerifyIPRequest, X as WiFiNetwork } from './client-C_A7QLcB.js';
1
+ import { L as Logger } from './client-BolQlL5e.js';
2
+ export { 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 RequestInterceptor, R as RequestOptions, i as RequiredBaseClientConfig, j as RequiredCGSConfig, k as RequiredVesantConfig, V as VesantConfig } from './client-BolQlL5e.js';
3
+ import { B as BlockReason } from './types-QUCWam16.js';
4
+ export { A as APIResponse, C as CustomerStatus, E as EntityType, b as ErrorResponse, L as LocationCompliance, a as PaginatedResponse, P as PaginationParams, c as Result, R as RiskLevel, S as SuccessResponse, T as Timestamp, U as UUID, V as VerificationEventType } from './types-QUCWam16.js';
5
+ export { BaseWebhookEvent, ComplianceCheckFailedPayload, DecisionRecordedPayload, GeolocationBlockedPayload, GeolocationVerifiedPayload, KycStatusChangedPayload, LabelAppliedPayload, LocationRequestCompletedPayload, ProfileCreatedPayload, ProfileUpdatedPayload, RiskCategoryChangedPayload, RiskScoreChangedPayload, WebhookAnyHandler, WebhookEvent, WebhookEventHandler, WebhookEventType, WebhookHandler, WebhookHandlerConfig, WebhookMiddlewareOptions, createNextWebhookHandler, createWebhookMiddleware, verifyWebhookSignature } from './webhooks/index.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 DeviceTrustResult, u as GeoIPResult, v as GeofenceAction, w as GeofenceEvaluation, x as GeofenceRule, y as GeofenceRuleType, z as GeolocationAlert, G as GeolocationClient, B as GeolocationClientConfig, E as GeolocationConfigResponse, F as GeolocationRecord, J as JurisdictionConfig, H as LocationCaptureRequest, I as LocationCaptureResponse, a as LocationRequest, K as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, M as LocationRequestResult, N as LocationRequestStatus, O as LocationShareInfo, L as LocationVerification, R as ResendLocationRequestRequest, U as UpdateDeviceTrustRequest, P as UpdateGeofenceRuleRequest, Q as UpdateJurisdictionRequest, S as UseAlertsOptions, T as UseAlertsResult, W as UseGeolocationOptions, X as UseGeolocationResult, Y as UseLocationCaptureOptions, Z as UseLocationCaptureResult, _ as UseLocationRequestsOptions, $ as UseLocationRequestsResult, a0 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a1 as VerifyIPRequest, a2 as WiFiNetwork } from './client-Bvp-f05-.js';
7
7
  export { decodeCipherText, generateCipherText, isCipherTextExpired } from './geolocation/index.js';
8
8
  export { RiskProfileClient } from './risk-profile/index.js';
9
- export { d as CreateCustomerProfileRequest, d as CreateProfileRequest, C as CustomerProfile, e as CustomerProfileFilters, f as CustomerProfileListResponse, E as EmploymentType, L as LegalForm, P as ProfileDetailsResponse, e as ProfileFilters, f as ProfileListResponse, R as RiskCategory, h as RiskConfiguration, g as RiskDashboardMetrics, a as RiskFactor, b as RiskFactorType, c as RiskHistory, S as ScreeningStatus, U as UpdateProfileRequest } from './types-X5Md_dD_.js';
10
- export { ComplianceClient, ComplianceLocationRequestInput, ComplianceLocationRequestResult, CurrencyRates, DEFAULT_CURRENCY_RATES, EventVerificationRequest, EventVerificationResponse, LoginVerificationRequest, LoginVerificationResponse, RegistrationVerificationRequest, RegistrationVerificationResponse, TransactionRiskResult, TransactionVerificationRequest, TransactionVerificationResponse } from './compliance/index.js';
11
- export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, KycTriggerEvent, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.js';
12
- export { CTPFormStatus, CTPTINStatus, ComplianceStats, ComplianceStatsFilters, CustomerTaxProfileDocuments, CustomerTaxProfileRecord, CustomerType, DocumentRequestBreakdown, EmailSendingMethod, EnableWithholdingInput, EnableWithholdingResponse, GlobalTaxRule, ReRequestTaxFormInput, RunRemindersResponse, TINCheckResult, TINStatusBreakdown, TaxClient, TaxClientConfig, TaxRuleApprovalStatus, TaxRuleVersion, TaxRules, TransactionAction, TreatyCountry, TreatyCountryListResponse, UpdateReminderConfigInput, UpdateTaxRulesInput, WFormCountBreakdown, WFormStatusBreakdown } from './tax/index.js';
13
- export { FraudClient, FraudDecision, FraudEventType, FraudReactionType, FraudScoreRequest, FraudScoreResponseData, FraudScoreResponseEnvelope, FraudScoreResponseMetadata, TenantAction } from './fraud/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-2utj53GK.js';
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-BJ87_Vv5.js';
12
+ export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.js';
13
+ export { CTPFormStatus, CTPTINStatus, ComplianceStats, ComplianceStatsFilters, CustomerTaxProfileDocuments, CustomerTaxProfileRecord, CustomerType, DocumentRequestBreakdown, EmailSendingMethod, EnableWithholdingInput, EnableWithholdingResponse, GlobalTaxRule, ReRequestTaxFormInput, TINCheckResult, TINStatusBreakdown, TaxClient, TaxClientConfig, TaxRuleApprovalStatus, TaxRuleVersion, TaxRules, TransactionAction, TreatyCountry, TreatyCountryListResponse, UpdateTaxRulesInput, WFormCountBreakdown, WFormStatusBreakdown } from './tax/index.js';
14
14
 
15
15
  /**
16
16
  * Error hierarchy for Vesant SDK
@@ -40,7 +40,7 @@ declare class ServiceUnavailableError extends VesantError {
40
40
  constructor(message?: string);
41
41
  }
42
42
  declare class ComplianceBlockedError extends VesantError {
43
- constructor(reasons: string[]);
43
+ constructor(reasons: BlockReason[]);
44
44
  }
45
45
  declare class AuthenticationError extends VesantError {
46
46
  constructor(message?: string);
@@ -67,63 +67,6 @@ declare const noopLogger: Logger;
67
67
  /**
68
68
  * Single source of truth for the SDK version.
69
69
  */
70
- declare const SDK_VERSION = "1.6.6";
70
+ declare const SDK_VERSION = "2.0.0";
71
71
 
72
- /**
73
- * TransactionClient - TypeScript SDK for the Transaction Monitoring service
74
- *
75
- * Provides a thin wrapper around the TM service endpoints. Currently only the
76
- * creation endpoint is implemented, but additional helpers (list, getById,
77
- * etc.) can be added later.
78
- */
79
-
80
- declare class TransactionClient extends BaseClient {
81
- constructor(config: BaseClientConfig);
82
- /**
83
- * Submit a new transaction record to the monitoring service.
84
- *
85
- * The gateway endpoint is `POST /api/v1/tm/transactions` and returns 201
86
- * with no body on success. The SDK method resolves to `void` to reflect
87
- * that behaviour.
88
- *
89
- * @param request - Data required to create the transaction
90
- * @param requestOptions - Optional request options (e.g. AbortSignal)
91
- *
92
- * @example
93
- * ```ts
94
- * const client = new TransactionClient({
95
- * baseURL: process.env.API_GATEWAY_URL!,
96
- * tenantId: 'tenant-123',
97
- * apiKey: 'pk_test_...',
98
- * });
99
- *
100
- * await client.createTransaction({
101
- * tx_id: 'tx-1',
102
- * reference: 'ref-1',
103
- * tenant_id: 'tenant-123',
104
- * customer_id: 'cust-1',
105
- * transaction_type: 'deposit',
106
- * transaction_mode: 'ach',
107
- * amount: '100.00',
108
- * currency: 'USD',
109
- * status: 'pending',
110
- * source_account: 'acct-1',
111
- * destination_account: 'acct-2',
112
- * country: 'US',
113
- * ip_address: '10.0.0.1',
114
- * metadata: {},
115
- * benificiary_comment: '',
116
- * transaction_date: new Date().toISOString(),
117
- * });
118
- * ```
119
- */
120
- createTransaction(request: TransactionCreateDTO, requestOptions?: RequestOptions): Promise<TransactionCreateResponse>;
121
- /**
122
- *
123
- * @param transactionId tx_id of the transaction
124
- * @param requestOptions optional request options (e.g. AbortSignal)
125
- */
126
- getTransaction(transactionId: string, requestOptions?: RequestOptions): Promise<void>;
127
- }
128
-
129
- export { AuthenticationError, BaseClient, BaseClientConfig, CGSError, CircuitBreakerOpenError, ComplianceBlockedError, ComplianceError, Logger, NetworkError, RateLimitError, RequestOptions, SDK_VERSION, ServiceUnavailableError, TimeoutError, TransactionClient, TransactionCreateDTO, TransactionCreateResponse, ValidationError, VesantError, createConsoleLogger, noopLogger };
72
+ export { AuthenticationError, BlockReason, CGSError, CircuitBreakerOpenError, ComplianceBlockedError, ComplianceError, Logger, NetworkError, RateLimitError, SDK_VERSION, ServiceUnavailableError, TimeoutError, ValidationError, VesantError, createConsoleLogger, noopLogger };