vesant-sdk 2.0.0-dev.93ecc12 → 2.0.0-dev.9a74cc1

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.
@@ -21,7 +21,7 @@ declare function verifyWebhookSignature(payload: string, signature: string, secr
21
21
  * Webhook event types and payload definitions.
22
22
  */
23
23
 
24
- type WebhookEventType = 'risk.score.changed' | 'risk.category.changed' | 'profile.created' | 'profile.updated' | 'geolocation.verified' | 'geolocation.blocked' | 'kyc.status.changed' | 'kyc.approved' | 'kyc.declined' | 'decision.recorded' | 'label.applied' | 'location_request.completed' | 'compliance.check.failed';
24
+ type WebhookEventType = 'risk.score.changed' | 'risk.category.changed' | 'profile.created' | 'profile.updated' | 'geolocation.verified' | 'geolocation.blocked' | 'kyc.status.changed' | 'kyc.approved' | 'kyc.declined' | 'decision.recorded' | 'label.applied' | 'location_request.completed' | 'compliance.check.failed' | 'tax.reminder.sent';
25
25
  interface BaseWebhookEvent<T extends WebhookEventType = WebhookEventType, P = unknown> {
26
26
  id: UUID;
27
27
  type: T;
@@ -92,7 +92,15 @@ interface ComplianceCheckFailedPayload {
92
92
  reasons: string[];
93
93
  severity: string;
94
94
  }
95
- type WebhookEvent = BaseWebhookEvent<'risk.score.changed', RiskScoreChangedPayload> | BaseWebhookEvent<'risk.category.changed', RiskCategoryChangedPayload> | BaseWebhookEvent<'profile.created', ProfileCreatedPayload> | BaseWebhookEvent<'profile.updated', ProfileUpdatedPayload> | BaseWebhookEvent<'geolocation.verified', GeolocationVerifiedPayload> | BaseWebhookEvent<'geolocation.blocked', GeolocationBlockedPayload> | BaseWebhookEvent<'kyc.status.changed', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.approved', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.declined', KycStatusChangedPayload> | BaseWebhookEvent<'decision.recorded', DecisionRecordedPayload> | BaseWebhookEvent<'label.applied', LabelAppliedPayload> | BaseWebhookEvent<'location_request.completed', LocationRequestCompletedPayload> | BaseWebhookEvent<'compliance.check.failed', ComplianceCheckFailedPayload>;
95
+ interface TaxReminderSentPayload {
96
+ /** W-form the reminder is for (e.g. "W-9", "W-8BEN", "W-8BEN-E") */
97
+ form_type: string;
98
+ /** Sequential count of reminders sent in the current solicitation cycle */
99
+ reminder_count: number;
100
+ /** Configured maximum reminders per cycle (reminder_max_count) */
101
+ max_count: number;
102
+ }
103
+ type WebhookEvent = BaseWebhookEvent<'risk.score.changed', RiskScoreChangedPayload> | BaseWebhookEvent<'risk.category.changed', RiskCategoryChangedPayload> | BaseWebhookEvent<'profile.created', ProfileCreatedPayload> | BaseWebhookEvent<'profile.updated', ProfileUpdatedPayload> | BaseWebhookEvent<'geolocation.verified', GeolocationVerifiedPayload> | BaseWebhookEvent<'geolocation.blocked', GeolocationBlockedPayload> | BaseWebhookEvent<'kyc.status.changed', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.approved', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.declined', KycStatusChangedPayload> | BaseWebhookEvent<'decision.recorded', DecisionRecordedPayload> | BaseWebhookEvent<'label.applied', LabelAppliedPayload> | BaseWebhookEvent<'location_request.completed', LocationRequestCompletedPayload> | BaseWebhookEvent<'compliance.check.failed', ComplianceCheckFailedPayload> | BaseWebhookEvent<'tax.reminder.sent', TaxReminderSentPayload>;
96
104
  interface WebhookHandlerConfig {
97
105
  /** Webhook signing secret for signature verification */
98
106
  secret: string;
@@ -178,4 +186,4 @@ declare function createWebhookMiddleware(options: WebhookMiddlewareOptions): (re
178
186
  */
179
187
  declare function createNextWebhookHandler(options: WebhookMiddlewareOptions): (request: Request) => Promise<Response>;
180
188
 
181
- export { type BaseWebhookEvent, type ComplianceCheckFailedPayload, type DecisionRecordedPayload, type GeolocationBlockedPayload, type GeolocationVerifiedPayload, type KycStatusChangedPayload, type LabelAppliedPayload, type LocationRequestCompletedPayload, type ProfileCreatedPayload, type ProfileUpdatedPayload, type RiskCategoryChangedPayload, type RiskScoreChangedPayload, type WebhookAnyHandler, type WebhookEvent, type WebhookEventHandler, type WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookMiddlewareOptions, createNextWebhookHandler, createWebhookMiddleware, verifyWebhookSignature };
189
+ export { type BaseWebhookEvent, type ComplianceCheckFailedPayload, type DecisionRecordedPayload, type GeolocationBlockedPayload, type GeolocationVerifiedPayload, type KycStatusChangedPayload, type LabelAppliedPayload, type LocationRequestCompletedPayload, type ProfileCreatedPayload, type ProfileUpdatedPayload, type RiskCategoryChangedPayload, type RiskScoreChangedPayload, type TaxReminderSentPayload, type WebhookAnyHandler, type WebhookEvent, type WebhookEventHandler, type WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookMiddlewareOptions, createNextWebhookHandler, createWebhookMiddleware, verifyWebhookSignature };
@@ -21,7 +21,7 @@ declare function verifyWebhookSignature(payload: string, signature: string, secr
21
21
  * Webhook event types and payload definitions.
22
22
  */
23
23
 
24
- type WebhookEventType = 'risk.score.changed' | 'risk.category.changed' | 'profile.created' | 'profile.updated' | 'geolocation.verified' | 'geolocation.blocked' | 'kyc.status.changed' | 'kyc.approved' | 'kyc.declined' | 'decision.recorded' | 'label.applied' | 'location_request.completed' | 'compliance.check.failed';
24
+ type WebhookEventType = 'risk.score.changed' | 'risk.category.changed' | 'profile.created' | 'profile.updated' | 'geolocation.verified' | 'geolocation.blocked' | 'kyc.status.changed' | 'kyc.approved' | 'kyc.declined' | 'decision.recorded' | 'label.applied' | 'location_request.completed' | 'compliance.check.failed' | 'tax.reminder.sent';
25
25
  interface BaseWebhookEvent<T extends WebhookEventType = WebhookEventType, P = unknown> {
26
26
  id: UUID;
27
27
  type: T;
@@ -92,7 +92,15 @@ interface ComplianceCheckFailedPayload {
92
92
  reasons: string[];
93
93
  severity: string;
94
94
  }
95
- type WebhookEvent = BaseWebhookEvent<'risk.score.changed', RiskScoreChangedPayload> | BaseWebhookEvent<'risk.category.changed', RiskCategoryChangedPayload> | BaseWebhookEvent<'profile.created', ProfileCreatedPayload> | BaseWebhookEvent<'profile.updated', ProfileUpdatedPayload> | BaseWebhookEvent<'geolocation.verified', GeolocationVerifiedPayload> | BaseWebhookEvent<'geolocation.blocked', GeolocationBlockedPayload> | BaseWebhookEvent<'kyc.status.changed', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.approved', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.declined', KycStatusChangedPayload> | BaseWebhookEvent<'decision.recorded', DecisionRecordedPayload> | BaseWebhookEvent<'label.applied', LabelAppliedPayload> | BaseWebhookEvent<'location_request.completed', LocationRequestCompletedPayload> | BaseWebhookEvent<'compliance.check.failed', ComplianceCheckFailedPayload>;
95
+ interface TaxReminderSentPayload {
96
+ /** W-form the reminder is for (e.g. "W-9", "W-8BEN", "W-8BEN-E") */
97
+ form_type: string;
98
+ /** Sequential count of reminders sent in the current solicitation cycle */
99
+ reminder_count: number;
100
+ /** Configured maximum reminders per cycle (reminder_max_count) */
101
+ max_count: number;
102
+ }
103
+ type WebhookEvent = BaseWebhookEvent<'risk.score.changed', RiskScoreChangedPayload> | BaseWebhookEvent<'risk.category.changed', RiskCategoryChangedPayload> | BaseWebhookEvent<'profile.created', ProfileCreatedPayload> | BaseWebhookEvent<'profile.updated', ProfileUpdatedPayload> | BaseWebhookEvent<'geolocation.verified', GeolocationVerifiedPayload> | BaseWebhookEvent<'geolocation.blocked', GeolocationBlockedPayload> | BaseWebhookEvent<'kyc.status.changed', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.approved', KycStatusChangedPayload> | BaseWebhookEvent<'kyc.declined', KycStatusChangedPayload> | BaseWebhookEvent<'decision.recorded', DecisionRecordedPayload> | BaseWebhookEvent<'label.applied', LabelAppliedPayload> | BaseWebhookEvent<'location_request.completed', LocationRequestCompletedPayload> | BaseWebhookEvent<'compliance.check.failed', ComplianceCheckFailedPayload> | BaseWebhookEvent<'tax.reminder.sent', TaxReminderSentPayload>;
96
104
  interface WebhookHandlerConfig {
97
105
  /** Webhook signing secret for signature verification */
98
106
  secret: string;
@@ -178,4 +186,4 @@ declare function createWebhookMiddleware(options: WebhookMiddlewareOptions): (re
178
186
  */
179
187
  declare function createNextWebhookHandler(options: WebhookMiddlewareOptions): (request: Request) => Promise<Response>;
180
188
 
181
- export { type BaseWebhookEvent, type ComplianceCheckFailedPayload, type DecisionRecordedPayload, type GeolocationBlockedPayload, type GeolocationVerifiedPayload, type KycStatusChangedPayload, type LabelAppliedPayload, type LocationRequestCompletedPayload, type ProfileCreatedPayload, type ProfileUpdatedPayload, type RiskCategoryChangedPayload, type RiskScoreChangedPayload, type WebhookAnyHandler, type WebhookEvent, type WebhookEventHandler, type WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookMiddlewareOptions, createNextWebhookHandler, createWebhookMiddleware, verifyWebhookSignature };
189
+ export { type BaseWebhookEvent, type ComplianceCheckFailedPayload, type DecisionRecordedPayload, type GeolocationBlockedPayload, type GeolocationVerifiedPayload, type KycStatusChangedPayload, type LabelAppliedPayload, type LocationRequestCompletedPayload, type ProfileCreatedPayload, type ProfileUpdatedPayload, type RiskCategoryChangedPayload, type RiskScoreChangedPayload, type TaxReminderSentPayload, type WebhookAnyHandler, type WebhookEvent, type WebhookEventHandler, type WebhookEventType, WebhookHandler, type WebhookHandlerConfig, type WebhookMiddlewareOptions, createNextWebhookHandler, createWebhookMiddleware, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vesant-sdk",
3
- "version": "2.0.0-dev.93ecc12",
3
+ "version": "2.0.0-dev.9a74cc1",
4
4
  "workspaces": [
5
5
  "packages/*"
6
6
  ],