Skip to content

Commit ab740ed

Browse files
authored
fix(dashboard): correct webhook example payload to match v2 schema (#324)
## Summary - Updated the webhook example payload shown in the webhook add/edit dialog to match the actual payload emitted by the backend. - Bumped the version to `v2`, switched all field names to snake_case, removed the non-existent `eventData` field, and added the new `event_category` and `event_label` fields. ## Test plan - [ ] Open the dashboard webhook settings, start adding a webhook, and verify the example payload matches a real delivery.
1 parent 5fa0e6c commit ab740ed

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

src/features/dashboard/settings/webhooks/constants.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@ export const WEBHOOK_EVENTS = [
99
export type WebhookEvent = (typeof WEBHOOK_EVENTS)[number]
1010

1111
export const WEBHOOK_EXAMPLE_PAYLOAD = `{
12-
"version": "v1",
1312
"id": "<UUID>",
13+
"version": "v2",
1414
"type": "sandbox.lifecycle.created",
15-
"eventData": null,
16-
"sandboxBuildId": "<UUID>",
17-
"sandboxExecutionId": "<UUID>",
18-
"sandboxId": "<SANDBOX_ID>",
19-
"sandboxTeamId": "<UUID>",
20-
"sandboxTemplateId": "<TEMPLATE_ID>",
21-
"timestamp": "<ISO_8601_TIMESTAMP>"
15+
"timestamp": "<ISO_8601_TIMESTAMP>",
16+
"event_category": "lifecycle",
17+
"event_label": "create",
18+
"sandbox_id": "<SANDBOX_ID>",
19+
"sandbox_execution_id": "<UUID>",
20+
"sandbox_template_id": "<TEMPLATE_ID>",
21+
"sandbox_build_id": "<UUID>",
22+
"sandbox_team_id": "<UUID>"
2223
}
2324
24-
// Payload structure may vary by event type.
25+
// Payload structure may vary by event type.
2526
// See docs for full schema.`
2627

2728
export const WEBHOOK_SIGNATURE_VALIDATION_DOCS_URL =

0 commit comments

Comments
 (0)