Webhook Event
Source: src/data/webhook-event/
Service
The webhook-event service is a stub (export {}). Not yet implemented.
Repository
WebhookEventRepository
| Method | Parameters | Returns |
|---|---|---|
| getById | (ctx: RequestContext, id: string) | Promise<WebhookEventRecord | null> |
| listByTenant | (ctx: RequestContext) | Promise<WebhookEventRecord[]> |
| create | (ctx: RequestContext, record: WebhookEventRecord) | Promise<void> |
| update | (ctx: RequestContext, id: string, patch: Partial<Omit<WebhookEventRecord, 'id' | 'tenantId'>>) | Promise<WebhookEventRecord> |
| delete | (ctx: RequestContext, id: string) | Promise<void> |
WebhookEventRecord
| Field | Type |
|---|---|
| id | string |
| tenantId | string |
| createdAt | Date |
| updatedAt | Date |
| data | Record<string, unknown> (optional) |
Validators
webhookProviderSchema
Enum: PAYPAL, CASHAPP_PAY, COINBASE_COMMERCE, DISCORD
webhookEventSchema
| Field | Type | Required | Default |
|---|---|---|---|
| tenantId | string | Yes | — |
| provider | webhookProviderSchema | Yes | — |
| eventId | string | Yes | — |
| receivedAt | Date (coerced) | Yes | — |
| payload | unknown | Yes | — |
Inferred Types
WebhookEvent—z.infer<typeof webhookEventSchema>WebhookProvider—z.infer<typeof webhookProviderSchema>