Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions webhook_schemas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Webhook Schemas

JSON schemas for the Phrase Strings webhooks

https://support.phrase.com/hc/en-us/articles/5784125630620-Webhooks-Strings


193 changes: 193 additions & 0 deletions webhook_schemas/branches_create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"event": {
"type": "string"
},
"message": {
"type": "string"
},
"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": {
"base_project_id": {
"type": [
"string",
"null"
]
},
"branch_project_id": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"merged_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"merged_by": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"gravatar_uid": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"username",
"name",
"gravatar_uid"
]
},
"created_by": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"gravatar_uid": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"username",
"name",
"gravatar_uid"
]
},
"state": {
"type": "string"
}
},
"required": [
"name",
"base_project_id",
"branch_project_id",
"created_at",
"updated_at",
"merged_at",
"state",
"created_by",
"merged_by"
]
}
},
"required": [
"event",
"message",
"user",
"project",
"branch"
]
}
36 changes: 36 additions & 0 deletions webhook_schemas/branches_create_example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"event": "branches:create",
"message": "john.smith created branch new-feature-1 in project Translation Project",
"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",
"base_project_id": "b2abd3bd2c23ff0ac546e0a2d9aa0be1",
"branch_project_id": "8228978fc13f5eb3c4cbbe8ac9882b64",
"created_at": "2025-02-07 16:18:13 UTC",
"updated_at": "2025-02-07 16:44:04 UTC",
"merged_at": null,
"state": "initialized",
"created_by": {
"id": "24b9a53ad72e198ca332fba91bb95f57",
"username": "john.smith",
"name": "John Smith",
"gravatar_uid": "1bc5edb4799fd8eec67c66122f47eb73"
},
"merged_by": null
}
}
Loading
Loading