Repository navigation
Closed
Labels
Description
WebhookDelivery and WebhookDeliveryAttempt objects
Goal
Define the WebhookDelivery and WebhookDeliveryAttempt objects within the shared-types folder.
Proposed Solution
Add WebhookDeliveryAttempts. WebhookDelivery objects as a first step for #[ISSUE]
The objects would roughly look like this - however it is okay for the implemetation to differ if there are any other ideas. We should add comments similar to other types in the shared-types folder:
export interface WebhookDelivery {
id: string;
event_id: string;
webhook_endpoint_id: string;
status: 'pending' | 'retrying' | 'succeeded' | 'failed';
next_attempt_at: number | null;
delivered_at: number | null;
claim_until: number | null;
attempts: WebhookDeliveryAttempt[];
}export interface WebhookDeliveryAttempt {
attempt_number: number;
attempted_at: number;
completed_at: number;
result: 'succeeded' | 'http_error' | 'timed_out' | 'network_error';
http_status: number | null;
duration_ms: number;
error: string | null;
url: string;
}A recovered delivery attempt might look like this:
{
"id": "whd_z_123",
"event_id": "evt_z_123",
"webhook_endpoint_id": "we_z_123",
"status": "succeeded",
"next_attempt_at": null,
"delivered_at": 1789240915,
"claim_until": null,
"attempts": [
{
"attempt_number": 1,
"attempted_at": 1789237274,
"completed_at": 1789237278,
"result": "http_error",
"http_status": 500,
"duration_ms": 3693,
"error": "HTTP 500",
"url": "https://example.com/webhooks"
},
{
"attempt_number": 2,
"attempted_at": 1789240915,
"completed_at": 1789240918,
"result": "succeeded",
"http_status": 200,
"duration_ms": 3206,
"error": null,
"url": "https://example.com/webhooks"
}
]
}Acceptance criteria
- All tests still pass
- The objects are added to the
shared-typesfolder with the correct comments. - The objects are well defined with the goal of completing [Epic] Webhook retry system #172.
- Only these new types are added to the
shared-typesfolder, no other changes are required.
Activity
Indo86 commentedon Sep 24, 2026
Hi @Benzilla, I'd like to work on this issue. I’ll keep the scope limited to the new shared types and follow the existing comments/style in shared-types.
Benzilla commentedon Sep 30, 2026
Closed by #175