diff --git a/webhook_schemas/check_issues_create.json b/webhook_schemas/check_issues_create.json new file mode 100644 index 000000000..469501387 --- /dev/null +++ b/webhook_schemas/check_issues_create.json @@ -0,0 +1,214 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sent_at": { + "type": "string", + "format": "date-time" + }, + "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", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "check_issue": { + "type": "object", + "title": "check_issue", + "properties": { + "id": { + "type": "string" + }, + "check_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dismissed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "solved_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "translation": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": [ + "string", + "null" + ] + }, + "unverified": { + "type": "boolean" + }, + "excluded": { + "type": "boolean" + }, + "plural_suffix": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "key": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "plural": { + "type": "boolean" + }, + "use_ordinal_rules": { + "type": "boolean" + }, + "data_type": { + "type": [ + "string", + "null" + ] + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "plural", + "use_ordinal_rules", + "data_type", + "tags" + ] + }, + "locale": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "code" + ] + } + }, + "required": [ + "id", + "content", + "created_at", + "updated_at", + "key", + "locale" + ] + } + }, + "required": [ + "id", + "check_name", + "state", + "description", + "dismissed_at", + "solved_at", + "created_at", + "updated_at", + "translation" + ] + } + }, + "required": [ + "event", + "message", + "project", + "check_issue" + ] +} diff --git a/webhook_schemas/check_issues_create_example.json b/webhook_schemas/check_issues_create_example.json new file mode 100644 index 000000000..06b9c404a --- /dev/null +++ b/webhook_schemas/check_issues_create_example.json @@ -0,0 +1,50 @@ +{ + "event": "check_issues:create", + "message": "Phrase detected a new check issue \"Translation exceeds the maximum number of allowed characters\" on key \"homepage.title\" in locale German (de) in project Translation Project", + "sent_at": "2025-02-07 16:44:04 UTC", + "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" + }, + "check_issue": { + "id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4", + "check_name": "translation_content_length", + "state": "active", + "description": "Translation exceeds the maximum number of allowed characters by 12 characters (content is 42 characters, limit is 30)", + "dismissed_at": null, + "solved_at": null, + "created_at": "2025-02-07 16:44:04 UTC", + "updated_at": "2025-02-07 16:44:04 UTC", + "translation": { + "id": "68740d06f87390fd357f12e0d7ddb9a2", + "content": "Willkommen auf unserer brandneuen Startseite mit allen Neuigkeiten", + "unverified": true, + "excluded": false, + "plural_suffix": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:44:04 UTC", + "key": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "name": "homepage.title", + "plural": false, + "use_ordinal_rules": false, + "data_type": null, + "tags": [] + }, + "locale": { + "id": "9c1a2b3c4d5e6f708192a3b4c5d6e7f8", + "name": "German (de)", + "code": "de" + } + } + } +} diff --git a/webhook_schemas/check_issues_dismiss.json b/webhook_schemas/check_issues_dismiss.json new file mode 100644 index 000000000..7276f3251 --- /dev/null +++ b/webhook_schemas/check_issues_dismiss.json @@ -0,0 +1,243 @@ +{ + "$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", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "check_issue": { + "type": "object", + "title": "check_issue", + "properties": { + "id": { + "type": "string" + }, + "check_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dismissed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "solved_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "translation": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": [ + "string", + "null" + ] + }, + "unverified": { + "type": "boolean" + }, + "excluded": { + "type": "boolean" + }, + "plural_suffix": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "key": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "plural": { + "type": "boolean" + }, + "use_ordinal_rules": { + "type": "boolean" + }, + "data_type": { + "type": [ + "string", + "null" + ] + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "plural", + "use_ordinal_rules", + "data_type", + "tags" + ] + }, + "locale": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "code" + ] + } + }, + "required": [ + "id", + "content", + "created_at", + "updated_at", + "key", + "locale" + ] + } + }, + "required": [ + "id", + "check_name", + "state", + "description", + "dismissed_at", + "solved_at", + "created_at", + "updated_at", + "translation" + ] + } + }, + "required": [ + "event", + "message", + "project", + "check_issue" + ] +} diff --git a/webhook_schemas/check_issues_dismiss_example.json b/webhook_schemas/check_issues_dismiss_example.json new file mode 100644 index 000000000..888eb01ae --- /dev/null +++ b/webhook_schemas/check_issues_dismiss_example.json @@ -0,0 +1,56 @@ +{ + "event": "check_issues:dismiss", + "message": "john.smith dismissed check issue \"Translation exceeds the maximum number of allowed characters\" on key \"homepage.title\" in locale German (de) in project Translation Project", + "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" + }, + "check_issue": { + "id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4", + "check_name": "translation_content_length", + "state": "dismissed", + "description": "Translation exceeds the maximum number of allowed characters by 12 characters (content is 42 characters, limit is 30)", + "dismissed_at": "2025-02-07 16:44:04 UTC", + "solved_at": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:44:04 UTC", + "translation": { + "id": "68740d06f87390fd357f12e0d7ddb9a2", + "content": "Willkommen auf unserer brandneuen Startseite mit allen Neuigkeiten", + "unverified": true, + "excluded": false, + "plural_suffix": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:18:13 UTC", + "key": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "name": "homepage.title", + "plural": false, + "use_ordinal_rules": false, + "data_type": null, + "tags": [] + }, + "locale": { + "id": "9c1a2b3c4d5e6f708192a3b4c5d6e7f8", + "name": "German (de)", + "code": "de" + } + } + } +} diff --git a/webhook_schemas/check_issues_resolve.json b/webhook_schemas/check_issues_resolve.json new file mode 100644 index 000000000..469501387 --- /dev/null +++ b/webhook_schemas/check_issues_resolve.json @@ -0,0 +1,214 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "event": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sent_at": { + "type": "string", + "format": "date-time" + }, + "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", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "check_issue": { + "type": "object", + "title": "check_issue", + "properties": { + "id": { + "type": "string" + }, + "check_name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dismissed_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "solved_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "translation": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": [ + "string", + "null" + ] + }, + "unverified": { + "type": "boolean" + }, + "excluded": { + "type": "boolean" + }, + "plural_suffix": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "key": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "plural": { + "type": "boolean" + }, + "use_ordinal_rules": { + "type": "boolean" + }, + "data_type": { + "type": [ + "string", + "null" + ] + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "plural", + "use_ordinal_rules", + "data_type", + "tags" + ] + }, + "locale": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "code" + ] + } + }, + "required": [ + "id", + "content", + "created_at", + "updated_at", + "key", + "locale" + ] + } + }, + "required": [ + "id", + "check_name", + "state", + "description", + "dismissed_at", + "solved_at", + "created_at", + "updated_at", + "translation" + ] + } + }, + "required": [ + "event", + "message", + "project", + "check_issue" + ] +} diff --git a/webhook_schemas/check_issues_resolve_example.json b/webhook_schemas/check_issues_resolve_example.json new file mode 100644 index 000000000..ac9144d00 --- /dev/null +++ b/webhook_schemas/check_issues_resolve_example.json @@ -0,0 +1,50 @@ +{ + "event": "check_issues:resolve", + "message": "Phrase resolved check issue \"Translation exceeds the maximum number of allowed characters\" on key \"homepage.title\" in locale German (de) in project Translation Project", + "sent_at": "2025-02-07 16:44:04 UTC", + "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" + }, + "check_issue": { + "id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4", + "check_name": "translation_content_length", + "state": "solved", + "description": "Translation exceeds the maximum number of allowed characters by 12 characters (content is 42 characters, limit is 30)", + "dismissed_at": null, + "solved_at": "2025-02-07 16:50:00 UTC", + "created_at": "2025-02-07 16:44:04 UTC", + "updated_at": "2025-02-07 16:50:00 UTC", + "translation": { + "id": "68740d06f87390fd357f12e0d7ddb9a2", + "content": "Willkommen", + "unverified": true, + "excluded": false, + "plural_suffix": null, + "created_at": "2025-02-07 16:18:13 UTC", + "updated_at": "2025-02-07 16:50:00 UTC", + "key": { + "id": "24b9a53ad72e198ca332fba91bb95f57", + "name": "homepage.title", + "plural": false, + "use_ordinal_rules": false, + "data_type": null, + "tags": [] + }, + "locale": { + "id": "9c1a2b3c4d5e6f708192a3b4c5d6e7f8", + "name": "German (de)", + "code": "de" + } + } + } +}