feat(webhook): time-series histogram stats endpoint + frontend chart

This commit is contained in:
Александр Зимин
2026-05-12 14:30:22 +00:00
parent 91f4310a77
commit 5479142093
11 changed files with 1049 additions and 2 deletions
+18
View File
@@ -330,6 +330,24 @@ export type WebhookDeliveryPage = {
size: number
}
/** Один bucket histogram time-series stats. ISO ts + counts по status. */
export type WebhookStatsBucket = {
ts: string
pending: number
retrying: number
delivered: number
dlq: number
total: number
}
/** Response от GET /admin/webhooks/subscriptions/{id}/stats. */
export type WebhookDeliveryStats = {
bucketBy: 'hour' | 'day'
from: string
to: string
buckets: WebhookStatsBucket[]
}
// === Approval Workflow v2 ===
export type DraftStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'WITHDRAWN'