diff --git a/webhook_schemas/downloads_complete.json b/webhook_schemas/downloads_complete.json new file mode 100644 index 000000000..7fbaf0a40 --- /dev/null +++ b/webhook_schemas/downloads_complete.json @@ -0,0 +1,167 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sent_at": { + "type": "string", + "format": "date-time" + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "gravatar_uid": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "username", + "name", + "gravatar_uid" + ] + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "main_format": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "main_format", + "created_at", + "updated_at" + ] + }, + "branch": { + "type": [ + "object", + "null" + ], + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "download": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "result": { + "type": [ + "object", + "null" + ], + "properties": { + "url": { + "type": [ + "string", + "null" + ] + } + } + }, + "params": { + "type": [ + "object", + "null" + ] + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "version_hash": { + "type": [ + "string", + "null" + ] + }, + "content_version_hash": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "status", + "result", + "params", + "error", + "created_at", + "completed_at" + ] + } + }, + "required": [ + "event", + "message", + "user", + "project", + "download" + ] +} \ No newline at end of file diff --git a/webhook_schemas/downloads_complete_example.json b/webhook_schemas/downloads_complete_example.json new file mode 100644 index 000000000..bf266be4d --- /dev/null +++ b/webhook_schemas/downloads_complete_example.json @@ -0,0 +1,38 @@ +{ + "event": "downloads:complete", + "message": "Download en.yml is ready in project Translation Project within branch new-feature-1: https://downloads.example.com/2025/02/07/a/b/ab12cd34ef56ab12cd34ef56ab12cd34?Expires=1739032800&Signature=example&Key-Pair-Id=EXAMPLE", + "sent_at": "2025-02-07 16:44:04 UTC", + "user": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "username": "john.smith", + "name": "John Smith", + "gravatar_uid": "1bc5edb4799fd8eec67c66122f47eb73" + }, + "project": { + "id": "b2abd3bd2c23ff0ac546e0a2d9aa0be1", + "name": "Translation Project", + "slug": "translation-project", + "main_format": "yml", + "project_image_url": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:18:13 UTC", + "point_of_contact": null + }, + "branch": { + "name": "new-feature-1" + }, + "download": { + "id": "6a2c1a0f0c4d4f3f9b8c7e5d4a3b2c1d", + "status": "completed", + "result": { + "url": "https://downloads.example.com/2025/02/07/a/b/ab12cd34ef56ab12cd34ef56ab12cd34?Expires=1739032800&Signature=example&Key-Pair-Id=EXAMPLE" + }, + "params": { + "file_format": "yml", + "tags": [] + }, + "error": null, + "created_at": "2025-02-07 16:18:13 UTC", + "completed_at": "2025-02-07 16:18:20 UTC" + } +} \ No newline at end of file