From c3bd8eccaabcfa1b1066ea4438971ac59833af46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Behrendt?= Date: Wed, 18 Dec 2024 09:04:03 +0100 Subject: [PATCH] feat!: Remove old Git sync endpoints. Replaced with new repo sync (#735) --- doc/compiled.json | 2268 +++++-------------- main.yaml | 6 - parameters.yaml | 7 - paths.yaml | 34 - paths/bitbucket_syncs/export.yaml | 56 - paths/bitbucket_syncs/import.yaml | 52 - paths/bitbucket_syncs/index.yaml | 51 - paths/github_syncs/export.yaml | 49 - paths/github_syncs/import.yaml | 49 - paths/gitlab_syncs/destroy.yaml | 39 - paths/gitlab_syncs/export.yaml | 56 - paths/gitlab_syncs/history.yaml | 55 - paths/gitlab_syncs/import.yaml | 62 - paths/gitlab_syncs/index.yaml | 51 - paths/gitlab_syncs/show.yaml | 47 - paths/gitlab_syncs/update.yaml | 68 - schemas.yaml | 10 - schemas/bitbucket_sync.yaml | 33 - schemas/bitbucket_sync_export_response.yaml | 9 - schemas/gitlab_sync.yaml | 41 - schemas/gitlab_sync_export.yaml | 12 - schemas/gitlab_sync_history.yaml | 34 - 22 files changed, 578 insertions(+), 2511 deletions(-) delete mode 100644 paths/bitbucket_syncs/export.yaml delete mode 100644 paths/bitbucket_syncs/import.yaml delete mode 100644 paths/bitbucket_syncs/index.yaml delete mode 100644 paths/github_syncs/export.yaml delete mode 100644 paths/github_syncs/import.yaml delete mode 100644 paths/gitlab_syncs/destroy.yaml delete mode 100644 paths/gitlab_syncs/export.yaml delete mode 100644 paths/gitlab_syncs/history.yaml delete mode 100644 paths/gitlab_syncs/import.yaml delete mode 100644 paths/gitlab_syncs/index.yaml delete mode 100644 paths/gitlab_syncs/show.yaml delete mode 100644 paths/gitlab_syncs/update.yaml delete mode 100644 schemas/bitbucket_sync.yaml delete mode 100644 schemas/bitbucket_sync_export_response.yaml delete mode 100644 schemas/gitlab_sync.yaml delete mode 100644 schemas/gitlab_sync_export.yaml delete mode 100644 schemas/gitlab_sync_history.yaml diff --git a/doc/compiled.json b/doc/compiled.json index ca513dbc8..a42ee4f30 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -41,9 +41,6 @@ "name": "Authorizations", "description": "The endpoints provided by the Authorizations API are **only accessible via Basic authentication with email and password**.\n\nWhen creating a new authorization, the new access token for this authorization will be returned in the immediate response but not later, due to security reasons. When accessing authorizations later, you will only see the last eight chars of the token in plain text (`token_last_eight`) and the SHA256 digest of the token for reference (`hashed_token`).\n\nFor instructions on how authorization in general works, see our [Auth Guide](#overview--authentication).\n\n### Scopes\n\nWhen creating or updating an OAuth authorization, you can define a list of scopes to limit the access that can be performed by that authorization.\n\n#### Available Scopes\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ScopeDescription
readRead projects, locales, keys, translations, orders
writeWrite projects, locales, keys, translations but not orders
orders.createCreate and confirm orders
team.manageManage invitations and members
\n
\n" }, - { - "name": "Bitbucket Sync" - }, { "name": "Blacklisted Keys" }, @@ -75,12 +72,6 @@ { "name": "Formats" }, - { - "name": "GitHub Sync" - }, - { - "name": "GitLab Sync" - }, { "name": "Glossaries" }, @@ -250,9 +241,6 @@ { "name": "Integrations", "tags": [ - "Bitbucket Sync", - "GitHub Sync", - "GitLab Sync", "Webhooks", "Distributions", "Releases", @@ -447,183 +435,6 @@ } ] }, - "bitbucket_sync": { - "type": "object", - "title": "bitbucket_sync", - "properties": { - "id": { - "type": "string" - }, - "repository_name": { - "type": "string" - }, - "last_export_to_bitbucket_at": { - "type": "string", - "format": "date-time" - }, - "last_import_from_bitbucket_at": { - "type": "string", - "format": "date-time" - }, - "valid_phraseapp_yaml": { - "type": "boolean" - }, - "phraseapp_projects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/project_short" - } - } - }, - "example": { - "id": "aad1ar91-0331-4181-b90p-4crdnv0bd812", - "repository_name": "some-repository", - "last_export_to_bitbucket_at": "2015-01-28T09:52:53Z", - "last_import_from_bitbucket_at": "2015-01-28T09:52:53Z", - "valid_phraseapp_yaml": true, - "phraseapp_projects": [ - { - "id": "abcd1234cdef1234abcd1234cdef1234", - "name": "My Android Project", - "main_format": "xml", - "created_at": "2015-01-28T09:52:53Z", - "updated_at": "2015-01-28T09:52:53Z" - } - ] - } - }, - "bitbucket_sync_export_response": { - "type": "object", - "title": "bitbucket_sync_export_response", - "properties": { - "status_path": { - "type": "string" - } - }, - "example": { - "status_path": "https://bitbucket.sync.phraseapp.com/export_to_bitbucket_status" - } - }, - "gitlab_sync": { - "type": "object", - "title": "gitlab_sync", - "properties": { - "id": { - "type": "string" - }, - "project_id": { - "type": "string" - }, - "gitlab_project_id": { - "type": "integer" - }, - "gitlab_branch_name": { - "type": "string" - }, - "auto_import": { - "type": "boolean" - }, - "auto_import_secret": { - "type": "string" - }, - "auto_import_url": { - "type": "string" - }, - "self_hosted_api_url": { - "type": "string" - }, - "last_exported_at": { - "type": "string", - "format": "date-time" - }, - "last_imported_at": { - "type": "string", - "format": "date-time" - }, - "last_status": { - "type": "string" - } - }, - "example": { - "id": "abcd1234cdef1234abcd1234cdef1234", - "project_id": "ft5yufdh1234cdef1234abc5d12d4cdef123", - "gitlab_project_id": 18188930, - "gitlab_branch_name": "master", - "auto_import": true, - "auto_import_secret": "import_secret", - "auto_import_url": "import_url", - "self_hosted_api_url": "www.example.com/api/v4", - "last_exported_at": "2015-01-28T12:55:14.000+00:00", - "last_imported_at": "2015-01-28T12:55:14.000+00:00", - "last_status": "success" - } - }, - "gitlab_sync_export": { - "type": "object", - "title": "gitlab_sync_export", - "properties": { - "merge_request_id": { - "type": "integer" - }, - "merge_request_web_url": { - "type": "string" - } - }, - "example": { - "merge_request_id": 1234, - "merge_request_web_url": "https://gitlab.com/account/project/-/merge_requests/1234" - } - }, - "gitlab_sync_history": { - "type": "object", - "title": "gitlab_sync_history", - "properties": { - "status": { - "type": "string" - }, - "action": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - }, - "date": { - "type": "string", - "format": "date-time" - }, - "details": { - "type": "object" - } - }, - "example": { - "type": "history", - "attributes": { - "status": "success", - "action": "import", - "errors": [ - { - "error": "error type", - "message": "can't be blank" - } - ], - "date": "2015-01-28T12:55:14.000+00:00", - "details": { - "auto_import": false - } - } - } - }, "blacklisted_key": { "type": "object", "title": "blacklisted_key", @@ -4812,15 +4623,6 @@ "type": "string" } }, - "gitlab_sync_id": { - "in": "path", - "name": "gitlab_sync_id", - "description": "Gitlab Sync ID", - "required": true, - "schema": { - "type": "string" - } - }, "id": { "in": "path", "name": "id", @@ -12675,23 +12477,82 @@ "x-cli-version": "2.5" } }, - "/bitbucket_syncs": { + "/projects/{project_id}/keys/{key_id}/comments": { "get": { - "summary": "List Bitbucket syncs", - "description": "List all Bitbucket repositories for which synchronisation with Phrase Strings is activated.", - "operationId": "bitbucket_syncs/list", + "summary": "List comments", + "description": "List all comments for a key.", + "operationId": "comments/list", "tags": [ - "Bitbucket Sync" + "Comments" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "description": "Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.", - "example": "abcd1234", - "name": "account_id", + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/key_id" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "description": "specify the branch to use", + "example": "my-feature-branch", + "name": "branch", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "description": "Search query for comment messages", + "example": "Some comment content", + "name": "query", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "description": "Search comments by their assigned locales", + "example": [ + "someId" + ], + "name": "locale_ids", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "description": "Specify the filter for the comments", + "name": "filters", + "in": "query", + "schema": { + "type": "array", + "example": [ + "read", + "unread" + ], + "items": { + "type": "string" + } + } + }, + { + "description": "Order direction. Can be one of: asc, desc.", + "name": "order", "in": "query", + "example": "desc", "schema": { "type": "string" } @@ -12705,7 +12566,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/bitbucket_sync" + "$ref": "#/components/schemas/comment" } } } @@ -12741,39 +12602,90 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/bitbucket_syncs?account_id=abcd1234\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch&filters=unread&query=something&locale_ids=someId&order=desc\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X GET \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase bitbucket_sync list \\\n--account_id abcd1234 \\\n--access_token " + "source": "phrase comments list \\\n--project_id \\\n--key_id \\\n--branch \"my-feature-branch\" \\\n--filters unread \\\n--order desc \\\n--query \"Some comment content\" \\\n--locale_ids someId \\\n--access_token " } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "comments/list/parameters", + "properties": { + "branch": { + "description": "Specify the branch to use", + "type": "string", + "example": "my-feature-branch" + }, + "query": { + "description": "Search query for comment messages", + "type": "string", + "example": "Some comment content" + }, + "locale_ids": { + "description": "Search comments by their assigned locales", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "someId", + "otherId" + ] + }, + "filters": { + "description": "Specify filters to find comments by", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "read", + "unread" + ] + }, + "order": { + "description": "Specify ordering of comments", + "type": "string", + "example": "desc" + } + } + } + } + } + }, "x-cli-version": "2.5" - } - }, - "/bitbucket_syncs/{id}/export": { + }, "post": { - "summary": "Export from Phrase Strings to Bitbucket", - "description": "Export translations from Phrase Strings to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.

Note: Export is done asynchronously and may take several seconds depending on the project size.", - "operationId": "bitbucket_sync/export", + "summary": "Create a comment", + "description": "Create a new comment for a key.", + "operationId": "comment/create", "tags": [ - "Bitbucket Sync" + "Comments" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/id" + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/key_id" } ], "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/bitbucket_sync_export_response" + "$ref": "#/components/schemas/comment" } } }, @@ -12802,11 +12714,11 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/bitbucket_syncs/:id/export\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"account_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"branch\":\"my-feature-branch\", \"message\":\"Some message...\", \"locale_ids\": [\"someId\"]}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase bitbucket_sync export \\\n--id \\\n--data '{\"account_id\":\"abcd1234\"}' \\\n--access_token " + "source": "phrase comments create \\\n--project_id \\\n--key_id \\\n--data '{\"branch\":\"my-feature-branch\", \"message\": \"Some message...\", \"locale_ids\": [\"someId\"]}' \\\n--access_token " } ], "requestBody": { @@ -12815,12 +12727,31 @@ "application/json": { "schema": { "type": "object", - "title": "bitbucket_sync/export/parameters", + "title": "comment/create/parameters", + "required": [ + "message" + ], "properties": { - "account_id": { - "description": "Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.", + "message": { + "description": "Comment message", "type": "string", - "example": "abcd1234" + "example": "Some message..." + }, + "branch": { + "description": "specify the branch to use", + "type": "string", + "example": "my-feature-branch" + }, + "locale_ids": { + "description": "specify the locales for the comment", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "someId", + "someOtherId" + ] } } } @@ -12830,25 +12761,47 @@ "x-cli-version": "2.5" } }, - "/bitbucket_syncs/{id}/import": { - "post": { - "summary": "Import to Phrase Strings from Bitbucket", - "description": "Import translations from Bitbucket to Phrase Strings according to the .phraseapp.yml file within the Bitbucket repository.

Note: Import is done asynchronously and may take several seconds depending on the project size.", - "operationId": "bitbucket_sync/import", + "/projects/{project_id}/keys/{key_id}/comments/{id}": { + "get": { + "summary": "Get a single comment", + "description": "Get details on a single comment.", + "operationId": "comment/show", "tags": [ - "Bitbucket Sync" + "Comments" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, + { + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/key_id" + }, { "$ref": "#/components/parameters/id" + }, + { + "description": "specify the branch to use", + "example": "my-feature-branch", + "name": "branch", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/comment" + } + } + }, "headers": { "X-Rate-Limit-Limit": { "$ref": "#/components/headers/X-Rate-Limit-Limit" @@ -12874,39 +12827,19 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/bitbucket_syncs/:id/import\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"account_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN" }, { "lang": "CLI v2", - "source": "phrase bitbucket_sync import \\\n--id \\\n--data '{\"account_id\":\"abcd1234\"}' \\\n--access_token " + "source": "phrase comments show \\\n--project_id \\\n--key_id \\\n--id \\\n--branch my-feature-branch \\\n--access_token " } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "bitbucket_sync/import/parameters", - "properties": { - "account_id": { - "description": "Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.", - "type": "string", - "example": "abcd1234" - } - } - } - } - } - }, "x-cli-version": "2.5" - } - }, - "/projects/{project_id}/keys/{key_id}/comments": { - "get": { - "summary": "List comments", - "description": "List all comments for a key.", - "operationId": "comments/list", + }, + "patch": { + "summary": "Update a comment", + "description": "Update an existing comment.", + "operationId": "comment/update", "tags": [ "Comments" ], @@ -12921,66 +12854,7 @@ "$ref": "#/components/parameters/key_id" }, { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "description": "Search query for comment messages", - "example": "Some comment content", - "name": "query", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "description": "Search comments by their assigned locales", - "example": [ - "someId" - ], - "name": "locale_ids", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "description": "Specify the filter for the comments", - "name": "filters", - "in": "query", - "schema": { - "type": "array", - "example": [ - "read", - "unread" - ], - "items": { - "type": "string" - } - } - }, - { - "description": "Order direction. Can be one of: asc, desc.", - "name": "order", - "in": "query", - "example": "desc", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/id" } ], "responses": { @@ -12989,10 +12863,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/comment" - } + "$ref": "#/components/schemas/comment" } } }, @@ -13005,12 +12876,6 @@ }, "X-Rate-Limit-Reset": { "$ref": "#/components/headers/X-Rate-Limit-Reset" - }, - "Link": { - "$ref": "#/components/headers/Link" - }, - "Pagination": { - "$ref": "#/components/headers/Pagination" } } }, @@ -13027,11 +12892,11 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch&filters=unread&query=something&locale_ids=someId&order=desc\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X GET \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"branch\":\"my-feature-branch\",\"message\":\"Some message...\"}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase comments list \\\n--project_id \\\n--key_id \\\n--branch \"my-feature-branch\" \\\n--filters unread \\\n--order desc \\\n--query \"Some comment content\" \\\n--locale_ids someId \\\n--access_token " + "source": "phrase comments update \\\n--project_id \\\n--key_id \\\n--id \\\n--data '{\"branch\":\"my-feature-branch\", \"message\": \"Some message...\"}' \\\n--access_token " } ], "requestBody": { @@ -13040,44 +12905,17 @@ "application/json": { "schema": { "type": "object", - "title": "comments/list/parameters", + "title": "comment/update/parameters", "properties": { "branch": { - "description": "Specify the branch to use", + "description": "specify the branch to use", "type": "string", "example": "my-feature-branch" }, - "query": { - "description": "Search query for comment messages", - "type": "string", - "example": "Some comment content" - }, - "locale_ids": { - "description": "Search comments by their assigned locales", - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "someId", - "otherId" - ] - }, - "filters": { - "description": "Specify filters to find comments by", - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "read", - "unread" - ] - }, - "order": { - "description": "Specify ordering of comments", + "message": { + "description": "Comment message", "type": "string", - "example": "desc" + "example": "Some message..." } } } @@ -13086,10 +12924,10 @@ }, "x-cli-version": "2.5" }, - "post": { - "summary": "Create a comment", - "description": "Create a new comment for a key.", - "operationId": "comment/create", + "delete": { + "summary": "Delete a comment", + "description": "Delete an existing comment.", + "operationId": "comment/delete", "tags": [ "Comments" ], @@ -13102,29 +12940,23 @@ }, { "$ref": "#/components/parameters/key_id" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "description": "specify the branch to use", + "example": "my-feature-branch", + "name": "branch", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/comment" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } + "204": { + "$ref": "#/components/responses/204" }, "400": { "$ref": "#/components/responses/400" @@ -13139,264 +12971,7 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"branch\":\"my-feature-branch\", \"message\":\"Some message...\", \"locale_ids\": [\"someId\"]}' \\\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase comments create \\\n--project_id \\\n--key_id \\\n--data '{\"branch\":\"my-feature-branch\", \"message\": \"Some message...\", \"locale_ids\": [\"someId\"]}' \\\n--access_token " - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "comment/create/parameters", - "required": [ - "message" - ], - "properties": { - "message": { - "description": "Comment message", - "type": "string", - "example": "Some message..." - }, - "branch": { - "description": "specify the branch to use", - "type": "string", - "example": "my-feature-branch" - }, - "locale_ids": { - "description": "specify the locales for the comment", - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "someId", - "someOtherId" - ] - } - } - } - } - } - }, - "x-cli-version": "2.5" - } - }, - "/projects/{project_id}/keys/{key_id}/comments/{id}": { - "get": { - "summary": "Get a single comment", - "description": "Get details on a single comment.", - "operationId": "comment/show", - "tags": [ - "Comments" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/key_id" - }, - { - "$ref": "#/components/parameters/id" - }, - { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/comment" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN" - }, - { - "lang": "CLI v2", - "source": "phrase comments show \\\n--project_id \\\n--key_id \\\n--id \\\n--branch my-feature-branch \\\n--access_token " - } - ], - "x-cli-version": "2.5" - }, - "patch": { - "summary": "Update a comment", - "description": "Update an existing comment.", - "operationId": "comment/update", - "tags": [ - "Comments" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/key_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/comment" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"branch\":\"my-feature-branch\",\"message\":\"Some message...\"}' \\\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase comments update \\\n--project_id \\\n--key_id \\\n--id \\\n--data '{\"branch\":\"my-feature-branch\", \"message\": \"Some message...\"}' \\\n--access_token " - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "comment/update/parameters", - "properties": { - "branch": { - "description": "specify the branch to use", - "type": "string", - "example": "my-feature-branch" - }, - "message": { - "description": "Comment message", - "type": "string", - "example": "Some message..." - } - } - } - } - } - }, - "x-cli-version": "2.5" - }, - "delete": { - "summary": "Delete a comment", - "description": "Delete an existing comment.", - "operationId": "comment/delete", - "tags": [ - "Comments" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/key_id" - }, - { - "$ref": "#/components/parameters/id" - }, - { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE \\\n -d '{\"branch\":\"my-feature-branch\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE \\\n -d '{\"branch\":\"my-feature-branch\"}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", @@ -14431,820 +14006,51 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:comment_id/replies/:id/mark_as_unread\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"branch\":\"my-feature-branch\"}' \\\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase replies mark_as_unread \\\n--project_id \\\n--key_id \\\n--comment_id \\\n--id \\\n--data '{\"branch\":\"my-feature-branch\"]}' \\\n--access_token " - } - ], - "x-cli-version": "2.10" - } - }, - "/projects/{project_id}/webhooks": { - "get": { - "summary": "List webhooks", - "description": "List all webhooks for the given project.", - "operationId": "webhooks/list", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/webhook" - } - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - }, - "Link": { - "$ref": "#/components/headers/Link" - }, - "Pagination": { - "$ref": "#/components/headers/Pagination" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks\" \\\n -u USERNAME_OR_ACCESS_TOKEN" - }, - { - "lang": "CLI v2", - "source": "phrase webhooks list \\\n--project_id \\\n--access_token " - } - ], - "x-cli-version": "2.5" - }, - "post": { - "summary": "Create a webhook", - "description": "Create a new webhook.", - "operationId": "webhook/create", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - } - ], - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/webhook" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"callback_url\":\"http://example.com/hooks/phraseapp-notifications\",\"description\":\"My webhook for chat notifications\",\"events\":\"locales:create,translations:update\"}' \\\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase webhooks create \\\n--project_id \\\n--data '{\"callback_url\": \"http://example.com/hooks/phraseapp-notifications\", \"description\": \"My webhook for chat notifications\", \"events\": \"locales:create,translations:update\"}' \\\n--access_token " - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "webhook/create/parameters", - "required": [ - "callback_url" - ], - "properties": { - "callback_url": { - "description": "Callback URL to send requests to", - "type": "string", - "example": "http://example.com/hooks/phraseapp-notifications" - }, - "secret": { - "description": "Webhook secret used to calculate signature. If empty, the default project secret will be used.", - "type": "string", - "example": "secr3t" - }, - "description": { - "description": "Webhook description", - "type": "string", - "example": "My webhook for chat notifications" - }, - "events": { - "description": "List of event names to trigger the webhook (separated by comma)", - "type": "string", - "example": "locales:create,translations:update" - }, - "active": { - "description": "Whether webhook is active or inactive", - "type": "boolean", - "example": null - }, - "include_branches": { - "description": "If enabled, webhook will also be triggered for events from branches of the project specified.", - "type": "boolean", - "example": null - } - } - } - } - } - }, - "x-cli-version": "2.5" - } - }, - "/projects/{project_id}/webhooks/{id}": { - "get": { - "summary": "Get a single webhook", - "description": "Get details on a single webhook.", - "operationId": "webhook/show", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/webhook" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN" - }, - { - "lang": "CLI v2", - "source": "phrase webhooks show \\\n--project_id \\\n--id \\\n--access_token " - } - ], - "x-cli-version": "2.5" - }, - "patch": { - "summary": "Update a webhook", - "description": "Update an existing webhook.", - "operationId": "webhook/update", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/webhook" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"callback_url\":\"http://example.com/hooks/phraseapp-notifications\",\"description\":\"My webhook for chat notifications\",\"events\":\"locales:create,translations:update\"}' \\\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase webhooks update \\\n--project_id \\\n--id \\\n--data '{\"callback_url\": \"http://example.com/hooks/phraseapp-notifications\", \"description\": \"My webhook for chat notifications\", \"events\": \"locales:create,translations:update\"}' \\\n--access_token " - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "webhook/update/parameters", - "properties": { - "callback_url": { - "description": "Callback URL to send requests to", - "type": "string", - "example": "http://example.com/hooks/phraseapp-notifications" - }, - "secret": { - "description": "Webhook secret used to calculate signature. If empty, the default project secret will be used.", - "type": "string", - "example": "secr3t" - }, - "description": { - "description": "Webhook description", - "type": "string", - "example": "My webhook for chat notifications" - }, - "events": { - "description": "List of event names to trigger the webhook (separated by comma)", - "type": "string", - "example": "locales:create,translations:update" - }, - "active": { - "description": "Whether webhook is active or inactive", - "type": "boolean", - "example": null - }, - "include_branches": { - "description": "If enabled, webhook will also be triggered for events from branches of the project specified.", - "type": "boolean", - "example": null - } - } - } - } - } - }, - "x-cli-version": "2.5" - }, - "delete": { - "summary": "Delete a webhook", - "description": "Delete an existing webhook.", - "operationId": "webhook/delete", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE" - }, - { - "lang": "CLI v2", - "source": "phrase webhooks delete \\\n--project_id \\\n--id \\\n--access_token " - } - ], - "x-cli-version": "2.5" - } - }, - "/projects/{project_id}/webhooks/{id}/test": { - "post": { - "summary": "Test a webhook", - "description": "Perform a test request for a webhook.", - "operationId": "webhook/test", - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id/test\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST" - }, - { - "lang": "CLI v2", - "source": "phrase webhooks test \\\n--project_id \\\n--id \\\n--access_token " - } - ], - "x-cli-version": "2.5" - } - }, - "/projects/{project_id}/uploads": { - "post": { - "summary": "Upload a new file", - "description": "Upload a new language file. Creates necessary resources in your project.", - "operationId": "upload/create", - "tags": [ - "Uploads" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - } - ], - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/upload" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/uploads\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -F branch=my-feature-branch \\\n -F file=@/path/to/my/file.json \\\n -F file_format=json \\\n -F locale_id=abcd1234cdef1234abcd1234cdef1234 \\\n -F tags=awesome-feature,needs-proofreading \\\n -F locale_mapping[en]=2 \\\n -F format_options[foo]=bar" - }, - { - "lang": "CLI v2", - "source": "phrase uploads create \\\n--project_id \\\n--branch my-feature-branch \\\n--file /path/to/my/file.json \\\n--file_format json \\\n--locale_id abcd1234cdef1234abcd1234cdef1234 \\\n--tags awesome-feature,needs-proofreading \\\n--locale_mapping '{\"en\": \"2\"}' \\\n--format_options '{\"foo\": \"bar\"}' \\\n--access_token " - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "title": "upload/create/parameters", - "required": [ - "file", - "file_format", - "locale_id" - ], - "properties": { - "branch": { - "description": "specify the branch to use", - "type": "string", - "example": "my-feature-branch" - }, - "file": { - "description": "File to be imported", - "type": "string", - "format": "binary", - "example": "/path/to/my/file.json" - }, - "file_format": { - "description": "File format. Auto-detected when possible and not specified.", - "type": "string", - "example": "json" - }, - "locale_id": { - "description": "Locale of the file's content. Can be the name or id of the locale. Preferred is id.", - "type": "string", - "example": "abcd1234cdef1234abcd1234cdef1234" - }, - "tags": { - "description": "List of tags separated by comma to be associated with the new keys contained in the upload.", - "type": "string", - "example": "awesome-feature,needs-proofreading" - }, - "update_translations": { - "description": "Indicates whether existing translations should be updated with the file content.", - "type": "boolean", - "example": null - }, - "update_translation_keys": { - "description": "Pass `false` here to prevent new keys from being created and existing keys updated.", - "type": "boolean", - "default": true, - "example": null - }, - "update_translations_on_source_match": { - "description": "Update target translations only if the source translations of the uploaded multilingual file match the stored translations.", - "type": "boolean", - "default": false, - "example": null - }, - "update_descriptions": { - "description": "Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.", - "type": "boolean", - "example": null - }, - "convert_emoji": { - "description": "This option is obsolete. Providing the option will cause a bad request error.", - "type": "boolean", - "example": null, - "deprecated": true - }, - "skip_upload_tags": { - "description": "Indicates whether the upload should not create upload tags.", - "type": "boolean", - "example": null - }, - "skip_unverification": { - "description": "Indicates whether the upload should unverify updated translations.", - "type": "boolean", - "example": null - }, - "file_encoding": { - "description": "Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".", - "type": "string", - "example": null - }, - "locale_mapping": { - "description": "Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.", - "type": "object", - "properties": {}, - "example": "{\"en\": \"2\"}" - }, - "format_options": { - "description": "Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).", - "type": "object", - "properties": {}, - "example": "{\"foo\": \"bar\"}" - }, - "autotranslate": { - "description": "If set, translations for the uploaded language will be fetched automatically.", - "type": "boolean", - "example": null - }, - "mark_reviewed": { - "description": "Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.", - "type": "boolean", - "example": null - }, - "tag_only_affected_keys": { - "description": "Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`", - "type": "boolean", - "default": false, - "example": null - }, - "translation_key_prefix": { - "description": "This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.", - "type": "string", - "example": "prefix_" - } - } - } - } - } - }, - "x-cli-version": "2.12" - }, - "get": { - "summary": "List uploads", - "description": "List all uploads for the given project.", - "operationId": "uploads/list", - "tags": [ - "Uploads" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/upload" - } - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - }, - "Link": { - "$ref": "#/components/headers/Link" - }, - "Pagination": { - "$ref": "#/components/headers/Pagination" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/uploads?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN" - }, - { - "lang": "CLI v2", - "source": "phrase uploads list \\\n--project_id \\\n--branch my-feature-branch \\\n--access_token " - } - ], - "x-cli-version": "2.5" - } - }, - "/projects/{project_id}/uploads/{id}": { - "get": { - "summary": "Get a single upload", - "description": "View details and summary for a single upload.", - "operationId": "upload/show", - "tags": [ - "Uploads" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/project_id" - }, - { - "$ref": "#/components/parameters/id" - }, - { - "description": "specify the branch to use", - "example": "my-feature-branch", - "name": "branch", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/upload" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/uploads/:id?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:comment_id/replies/:id/mark_as_unread\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"branch\":\"my-feature-branch\"}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase uploads show \\\n--project_id \\\n--id \\\n--branch my-feature-branch \\\n--access_token " + "source": "phrase replies mark_as_unread \\\n--project_id \\\n--key_id \\\n--comment_id \\\n--id \\\n--data '{\"branch\":\"my-feature-branch\"]}' \\\n--access_token " } ], - "x-cli-version": "2.5" + "x-cli-version": "2.10" } }, - "/github_syncs/export": { - "post": { - "summary": "Export from Phrase Strings to GitHub", - "description": "Export translations from Phrase Strings to GitHub according to the .phraseapp.yml file within the GitHub repository.

Note: Export is done asynchronously and may take several seconds depending on the project size.", - "operationId": "github_sync/export", + "/projects/{project_id}/webhooks": { + "get": { + "summary": "List webhooks", + "description": "List all webhooks for the given project.", + "operationId": "webhooks/list", "tags": [ - "GitHub Sync" + "Webhooks" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/webhook" + } + } + } + }, "headers": { "X-Rate-Limit-Limit": { "$ref": "#/components/headers/X-Rate-Limit-Limit" @@ -15254,6 +14060,12 @@ }, "X-Rate-Limit-Reset": { "$ref": "#/components/headers/X-Rate-Limit-Reset" + }, + "Link": { + "$ref": "#/components/headers/Link" + }, + "Pagination": { + "$ref": "#/components/headers/Pagination" } } }, @@ -15263,9 +14075,6 @@ "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" - }, "429": { "$ref": "#/components/responses/429" } @@ -15273,50 +14082,40 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/github_syncs/export\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"project_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks\" \\\n -u USERNAME_OR_ACCESS_TOKEN" }, { "lang": "CLI v2", - "source": "UNAVAILABLE" + "source": "phrase webhooks list \\\n--project_id \\\n--access_token " } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "github_sync/export/parameters", - "properties": { - "project_id": { - "description": "Project ID to specify the actual project the GitHub export should be triggered in.", - "type": "string", - "example": "abcd1234" - } - } - } - } - } - }, "x-cli-version": "2.5" - } - }, - "/github_syncs/import": { + }, "post": { - "summary": "Import to Phrase Strings from GitHub", - "description": "Import files to Phrase Strings from your connected GitHub repository.

Note: Import is done asynchronously and may take several seconds depending on the project size.", - "operationId": "github_sync/import", + "summary": "Create a webhook", + "description": "Create a new webhook.", + "operationId": "webhook/create", "tags": [ - "GitHub Sync" + "Webhooks" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/project_id" } ], "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook" + } + } + }, "headers": { "X-Rate-Limit-Limit": { "$ref": "#/components/headers/X-Rate-Limit-Limit" @@ -15335,9 +14134,6 @@ "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" - }, "429": { "$ref": "#/components/responses/429" } @@ -15345,11 +14141,11 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/github_syncs/import\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"project_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"callback_url\":\"http://example.com/hooks/phraseapp-notifications\",\"description\":\"My webhook for chat notifications\",\"events\":\"locales:create,translations:update\"}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "UNAVAILABLE" + "source": "phrase webhooks create \\\n--project_id \\\n--data '{\"callback_url\": \"http://example.com/hooks/phraseapp-notifications\", \"description\": \"My webhook for chat notifications\", \"events\": \"locales:create,translations:update\"}' \\\n--access_token " } ], "requestBody": { @@ -15358,12 +14154,40 @@ "application/json": { "schema": { "type": "object", - "title": "github_sync/import/parameters", + "title": "webhook/create/parameters", + "required": [ + "callback_url" + ], "properties": { - "project_id": { - "description": "Project ID to specify the actual project the GitHub import should be triggered in.", + "callback_url": { + "description": "Callback URL to send requests to", "type": "string", - "example": "abcd1234" + "example": "http://example.com/hooks/phraseapp-notifications" + }, + "secret": { + "description": "Webhook secret used to calculate signature. If empty, the default project secret will be used.", + "type": "string", + "example": "secr3t" + }, + "description": { + "description": "Webhook description", + "type": "string", + "example": "My webhook for chat notifications" + }, + "events": { + "description": "List of event names to trigger the webhook (separated by comma)", + "type": "string", + "example": "locales:create,translations:update" + }, + "active": { + "description": "Whether webhook is active or inactive", + "type": "boolean", + "example": null + }, + "include_branches": { + "description": "If enabled, webhook will also be triggered for events from branches of the project specified.", + "type": "boolean", + "example": null } } } @@ -15373,26 +14197,23 @@ "x-cli-version": "2.5" } }, - "/gitlab_syncs": { + "/projects/{project_id}/webhooks/{id}": { "get": { - "summary": "List GitLab syncs", - "description": "List all GitLab Sync Settings for which synchronisation with Phrase Strings and GitLab is activated.", - "operationId": "gitlab_sync/list", + "summary": "Get a single webhook", + "description": "Get details on a single webhook.", + "operationId": "webhook/show", "tags": [ - "GitLab Sync" + "Webhooks" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", - "example": "abcd1234", - "name": "account_id", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/id" } ], "responses": { @@ -15401,10 +14222,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/gitlab_sync" - } + "$ref": "#/components/schemas/webhook" } } }, @@ -15417,12 +14235,6 @@ }, "X-Rate-Limit-Reset": { "$ref": "#/components/headers/X-Rate-Limit-Reset" - }, - "Link": { - "$ref": "#/components/headers/Link" - }, - "Pagination": { - "$ref": "#/components/headers/Pagination" } } }, @@ -15439,39 +14251,31 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs?account_id=abcd1234\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN" }, { "lang": "CLI v2", - "source": "phrase git_lab_sync list \\\n--account_id abcd1234 \\\n--access_token " + "source": "phrase webhooks show \\\n--project_id \\\n--id \\\n--access_token " } ], "x-cli-version": "2.5" - } - }, - "/gitlab_syncs/{id}": { - "get": { - "summary": "Get single Sync Setting", - "description": "Shows a single GitLab Sync Setting.", - "operationId": "gitlab_sync/show", + }, + "patch": { + "summary": "Update a webhook", + "description": "Update an existing webhook.", + "operationId": "webhook/update", "tags": [ - "GitLab Sync" + "Webhooks" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/id" + "$ref": "#/components/parameters/project_id" }, { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", - "example": "abcd1234", - "name": "account_id", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/id" } ], "responses": { @@ -15480,7 +14284,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/gitlab_sync" + "$ref": "#/components/schemas/webhook" } } }, @@ -15509,87 +14313,79 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs/:id?account_id=abcd1234\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"callback_url\":\"http://example.com/hooks/phraseapp-notifications\",\"description\":\"My webhook for chat notifications\",\"events\":\"locales:create,translations:update\"}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase git_lab_sync show \\\n--id \\\n--account_id abcd1234 \\\n--access_token " + "source": "phrase webhooks update \\\n--project_id \\\n--id \\\n--data '{\"callback_url\": \"http://example.com/hooks/phraseapp-notifications\", \"description\": \"My webhook for chat notifications\", \"events\": \"locales:create,translations:update\"}' \\\n--access_token " } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "webhook/update/parameters", + "properties": { + "callback_url": { + "description": "Callback URL to send requests to", + "type": "string", + "example": "http://example.com/hooks/phraseapp-notifications" + }, + "secret": { + "description": "Webhook secret used to calculate signature. If empty, the default project secret will be used.", + "type": "string", + "example": "secr3t" + }, + "description": { + "description": "Webhook description", + "type": "string", + "example": "My webhook for chat notifications" + }, + "events": { + "description": "List of event names to trigger the webhook (separated by comma)", + "type": "string", + "example": "locales:create,translations:update" + }, + "active": { + "description": "Whether webhook is active or inactive", + "type": "boolean", + "example": null + }, + "include_branches": { + "description": "If enabled, webhook will also be triggered for events from branches of the project specified.", + "type": "boolean", + "example": null + } + } + } + } + } + }, "x-cli-version": "2.5" }, - "put": { - "summary": "Update single Sync Setting", - "description": "Updates a single GitLab Sync Setting.", - "operationId": "gitlab_sync/update", + "delete": { + "summary": "Delete a webhook", + "description": "Delete an existing webhook.", + "operationId": "webhook/delete", "tags": [ - "GitLab Sync" + "Webhooks" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/id" - }, - { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", - "example": "abcd1234", - "name": "account_id", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "description": "Code of the related Phrase Strings Project.", - "example": "3456abcd", - "name": "phrase_project_code", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "description": "ID of the related GitLab Project.", - "example": 12345, - "name": "gitlab_project_id", - "in": "query", - "schema": { - "type": "integer" - } + "$ref": "#/components/parameters/project_id" }, { - "description": "Name of the GitLab Branch.", - "example": "feature-development", - "name": "gitlab_branch_name", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/gitlab_sync" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" }, "400": { "$ref": "#/components/responses/400" @@ -15604,42 +14400,49 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PUT \\\n -d '{\"account_id\":\"abcd1234\",\"phrase_project_code\":\"3456abcd\",\"gitlab_project_id\":12345,\"gitlab_branch_name\":\"feature-development\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE" }, { "lang": "CLI v2", - "source": "phrase git_lab_sync update \\\n--id \\\n--data '{\"account_id\":\"abcd1234\", \"phrase_project_code\":\"3456abcd\", \"gitlab_project_id\":\"12345\", \"gitlab_branch_name\":\"feature-development\"}' \\\n--access_token " + "source": "phrase webhooks delete \\\n--project_id \\\n--id \\\n--access_token " } ], "x-cli-version": "2.5" - }, - "delete": { - "summary": "Delete single Sync Setting", - "description": "Deletes a single GitLab Sync Setting.", - "operationId": "gitlab_sync/delete", + } + }, + "/projects/{project_id}/webhooks/{id}/test": { + "post": { + "summary": "Test a webhook", + "description": "Perform a test request for a webhook.", + "operationId": "webhook/test", "tags": [ - "GitLab Sync" + "Webhooks" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/id" + "$ref": "#/components/parameters/project_id" }, { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", - "example": "abcd1234", - "name": "account_id", - "in": "query", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/id" } ], "responses": { - "204": { - "$ref": "#/components/responses/204" + "200": { + "description": "OK", + "headers": { + "X-Rate-Limit-Limit": { + "$ref": "#/components/headers/X-Rate-Limit-Limit" + }, + "X-Rate-Limit-Remaining": { + "$ref": "#/components/headers/X-Rate-Limit-Remaining" + }, + "X-Rate-Limit-Reset": { + "$ref": "#/components/headers/X-Rate-Limit-Reset" + } + } }, "400": { "$ref": "#/components/responses/400" @@ -15654,42 +14457,39 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE \\\n -d '{\"account_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:id/test\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST" }, { "lang": "CLI v2", - "source": "phrase git_lab_sync delete \\\n--id \\\n--account_id abcd1234 \\\n--access_token " + "source": "phrase webhooks test \\\n--project_id \\\n--id \\\n--access_token " } ], "x-cli-version": "2.5" } }, - "/gitlab_syncs/{gitlab_sync_id}/import": { + "/projects/{project_id}/uploads": { "post": { - "summary": "Import from GitLab to Phrase", - "description": "Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository.

Note: Import is done asynchronously and may take several seconds depending on the project size.", - "operationId": "gitlab_sync/import", + "summary": "Upload a new file", + "description": "Upload a new language file. Creates necessary resources in your project.", + "operationId": "upload/create", "tags": [ - "GitLab Sync" + "Uploads" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/gitlab_sync_id" + "$ref": "#/components/parameters/project_id" } ], "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/upload" - } + "$ref": "#/components/schemas/upload" } } }, @@ -15702,12 +14502,6 @@ }, "X-Rate-Limit-Reset": { "$ref": "#/components/headers/X-Rate-Limit-Reset" - }, - "Link": { - "$ref": "#/components/headers/Link" - }, - "Pagination": { - "$ref": "#/components/headers/Pagination" } } }, @@ -15724,48 +14518,163 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/import\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"account_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/uploads\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -F branch=my-feature-branch \\\n -F file=@/path/to/my/file.json \\\n -F file_format=json \\\n -F locale_id=abcd1234cdef1234abcd1234cdef1234 \\\n -F tags=awesome-feature,needs-proofreading \\\n -F locale_mapping[en]=2 \\\n -F format_options[foo]=bar" }, { "lang": "CLI v2", - "source": "phrase git_lab_sync import \\\n--gitlab_sync_id \\\n--data '{\"account_id\":\"abcd1234\"}' \\\n--access_token " + "source": "phrase uploads create \\\n--project_id \\\n--branch my-feature-branch \\\n--file /path/to/my/file.json \\\n--file_format json \\\n--locale_id abcd1234cdef1234abcd1234cdef1234 \\\n--tags awesome-feature,needs-proofreading \\\n--locale_mapping '{\"en\": \"2\"}' \\\n--format_options '{\"foo\": \"bar\"}' \\\n--access_token " } ], "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { "type": "object", - "title": "gitlab_sync/import/parameters", + "title": "upload/create/parameters", + "required": [ + "file", + "file_format", + "locale_id" + ], "properties": { - "account_id": { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", + "branch": { + "description": "specify the branch to use", "type": "string", - "example": "abcd1234" + "example": "my-feature-branch" + }, + "file": { + "description": "File to be imported", + "type": "string", + "format": "binary", + "example": "/path/to/my/file.json" + }, + "file_format": { + "description": "File format. Auto-detected when possible and not specified.", + "type": "string", + "example": "json" + }, + "locale_id": { + "description": "Locale of the file's content. Can be the name or id of the locale. Preferred is id.", + "type": "string", + "example": "abcd1234cdef1234abcd1234cdef1234" + }, + "tags": { + "description": "List of tags separated by comma to be associated with the new keys contained in the upload.", + "type": "string", + "example": "awesome-feature,needs-proofreading" + }, + "update_translations": { + "description": "Indicates whether existing translations should be updated with the file content.", + "type": "boolean", + "example": null + }, + "update_translation_keys": { + "description": "Pass `false` here to prevent new keys from being created and existing keys updated.", + "type": "boolean", + "default": true, + "example": null + }, + "update_translations_on_source_match": { + "description": "Update target translations only if the source translations of the uploaded multilingual file match the stored translations.", + "type": "boolean", + "default": false, + "example": null + }, + "update_descriptions": { + "description": "Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.", + "type": "boolean", + "example": null + }, + "convert_emoji": { + "description": "This option is obsolete. Providing the option will cause a bad request error.", + "type": "boolean", + "example": null, + "deprecated": true + }, + "skip_upload_tags": { + "description": "Indicates whether the upload should not create upload tags.", + "type": "boolean", + "example": null + }, + "skip_unverification": { + "description": "Indicates whether the upload should unverify updated translations.", + "type": "boolean", + "example": null + }, + "file_encoding": { + "description": "Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".", + "type": "string", + "example": null + }, + "locale_mapping": { + "description": "Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.", + "type": "object", + "properties": {}, + "example": "{\"en\": \"2\"}" + }, + "format_options": { + "description": "Additional options available for specific formats. See our format guide for the [complete list](https://support.phrase.com/hc/en-us/articles/9652464547740-List-of-Supported-File-Types-Strings).", + "type": "object", + "properties": {}, + "example": "{\"foo\": \"bar\"}" + }, + "autotranslate": { + "description": "If set, translations for the uploaded language will be fetched automatically.", + "type": "boolean", + "example": null + }, + "mark_reviewed": { + "description": "Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.", + "type": "boolean", + "example": null + }, + "tag_only_affected_keys": { + "description": "Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`", + "type": "boolean", + "default": false, + "example": null + }, + "translation_key_prefix": { + "description": "This prefix will be added to all uploaded translation key names to prevent collisions. Use a meaningful prefix related to your project or file to keep key names organized.", + "type": "string", + "example": "prefix_" } } } } } }, - "x-cli-version": "2.5" - } - }, - "/gitlab_syncs/{gitlab_sync_id}/export": { - "post": { - "summary": "Export from Phrase Strings to GitLab", - "description": "Export translations from Phrase Strings to GitLab according to the .phraseapp.yml file within the GitLab repository.

Note: Export is done asynchronously and may take several seconds depending on the project size.", - "operationId": "gitlab_sync/export", + "x-cli-version": "2.12" + }, + "get": { + "summary": "List uploads", + "description": "List all uploads for the given project.", + "operationId": "uploads/list", "tags": [ - "GitLab Sync" + "Uploads" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/gitlab_sync_id" + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "description": "specify the branch to use", + "example": "my-feature-branch", + "name": "branch", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -15774,7 +14683,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/gitlab_sync_export" + "type": "array", + "items": { + "$ref": "#/components/schemas/upload" + } } } }, @@ -15787,6 +14699,12 @@ }, "X-Rate-Limit-Reset": { "$ref": "#/components/headers/X-Rate-Limit-Reset" + }, + "Link": { + "$ref": "#/components/headers/Link" + }, + "Pagination": { + "$ref": "#/components/headers/Pagination" } } }, @@ -15803,59 +14721,38 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/export\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"account_id\":\"abcd1234\"}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/uploads?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN" }, { "lang": "CLI v2", - "source": "phrase git_lab_sync export \\\n--gitlab_sync_id \\\n--data '{\"account_id\":\"abcd1234\"}' \\\n--access_token " + "source": "phrase uploads list \\\n--project_id \\\n--branch my-feature-branch \\\n--access_token " } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "gitlab_sync/export/parameters", - "properties": { - "account_id": { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", - "type": "string", - "example": "abcd1234" - } - } - } - } - } - }, "x-cli-version": "2.5" } }, - "/gitlab_syncs/{gitlab_sync_id}/history": { + "/projects/{project_id}/uploads/{id}": { "get": { - "summary": "History of single Sync Setting", - "description": "List history for a single Sync Setting.", - "operationId": "gitlab_sync/history", + "summary": "Get a single upload", + "description": "View details and summary for a single upload.", + "operationId": "upload/show", "tags": [ - "GitLab Sync" + "Uploads" ], "parameters": [ { "$ref": "#/components/parameters/X-PhraseApp-OTP" }, { - "$ref": "#/components/parameters/gitlab_sync_id" - }, - { - "$ref": "#/components/parameters/page" + "$ref": "#/components/parameters/project_id" }, { - "$ref": "#/components/parameters/per_page" + "$ref": "#/components/parameters/id" }, { - "description": "Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.", - "example": "abcd1234", - "name": "account_id", + "description": "specify the branch to use", + "example": "my-feature-branch", + "name": "branch", "in": "query", "schema": { "type": "string" @@ -15868,10 +14765,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/gitlab_sync_history" - } + "$ref": "#/components/schemas/upload" } } }, @@ -15884,12 +14778,6 @@ }, "X-Rate-Limit-Reset": { "$ref": "#/components/headers/X-Rate-Limit-Reset" - }, - "Link": { - "$ref": "#/components/headers/Link" - }, - "Pagination": { - "$ref": "#/components/headers/Pagination" } } }, @@ -15906,11 +14794,11 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/history?account_id=abcd1234\" \\\n -u USERNAME_OR_ACCESS_TOKEN" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/uploads/:id?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN" }, { "lang": "CLI v2", - "source": "phrase gitlab_syncs history \\\n--gitlab_sync_id \\\n--account_id abcd1234 \\\n--access_token " + "source": "phrase uploads show \\\n--project_id \\\n--id \\\n--branch my-feature-branch \\\n--access_token " } ], "x-cli-version": "2.5" diff --git a/main.yaml b/main.yaml index a7afecb6c..5f6ccc5f3 100644 --- a/main.yaml +++ b/main.yaml @@ -73,7 +73,6 @@ tags: - - name: Bitbucket Sync - name: Blacklisted Keys - name: Branches description: | @@ -119,8 +118,6 @@ tags: - name: Documents - name: Figma Attachments - name: Formats - - name: GitHub Sync - - name: GitLab Sync - name: Glossaries - name: Glossary Terms - name: Glossary Term Translations @@ -298,9 +295,6 @@ x-tagGroups: - Glossary Term Translations - name: Integrations tags: - - Bitbucket Sync - - GitHub Sync - - GitLab Sync - Webhooks - Distributions - Releases diff --git a/parameters.yaml b/parameters.yaml index 0a00f0d9e..143807527 100644 --- a/parameters.yaml +++ b/parameters.yaml @@ -179,13 +179,6 @@ locale_id_as_id: required: true schema: type: string -gitlab_sync_id: - in: path - name: gitlab_sync_id - description: Gitlab Sync ID - required: true - schema: - type: string id: in: path name: id diff --git a/paths.yaml b/paths.yaml index d6dd7dbfc..3ebdef731 100644 --- a/paths.yaml +++ b/paths.yaml @@ -224,15 +224,6 @@ "$ref": "./paths/authorizations/update.yaml" delete: "$ref": "./paths/authorizations/destroy.yaml" -"/bitbucket_syncs": - get: - "$ref": "./paths/bitbucket_syncs/index.yaml" -"/bitbucket_syncs/{id}/export": - post: - "$ref": "./paths/bitbucket_syncs/export.yaml" -"/bitbucket_syncs/{id}/import": - post: - "$ref": "./paths/bitbucket_syncs/import.yaml" "/projects/{project_id}/keys/{key_id}/comments": get: "$ref": "./paths/comments/index.yaml" @@ -301,31 +292,6 @@ "/projects/{project_id}/uploads/{id}": get: "$ref": "./paths/uploads/show.yaml" -"/github_syncs/export": - post: - "$ref": "./paths/github_syncs/export.yaml" -"/github_syncs/import": - post: - "$ref": "./paths/github_syncs/import.yaml" -"/gitlab_syncs": - get: - "$ref": "./paths/gitlab_syncs/index.yaml" -"/gitlab_syncs/{id}": - get: - "$ref": "./paths/gitlab_syncs/show.yaml" - put: - "$ref": "./paths/gitlab_syncs/update.yaml" - delete: - "$ref": "./paths/gitlab_syncs/destroy.yaml" -"/gitlab_syncs/{gitlab_sync_id}/import": - post: - "$ref": "./paths/gitlab_syncs/import.yaml" -"/gitlab_syncs/{gitlab_sync_id}/export": - post: - "$ref": "./paths/gitlab_syncs/export.yaml" -"/gitlab_syncs/{gitlab_sync_id}/history": - get: - "$ref": "./paths/gitlab_syncs/history.yaml" "/projects/{project_id}/translations/{translation_id}/versions": get: "$ref": "./paths/versions/index.yaml" diff --git a/paths/bitbucket_syncs/export.yaml b/paths/bitbucket_syncs/export.yaml deleted file mode 100644 index 399306204..000000000 --- a/paths/bitbucket_syncs/export.yaml +++ /dev/null @@ -1,56 +0,0 @@ ---- -summary: Export from Phrase Strings to Bitbucket -description: 'Export translations from Phrase Strings to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.

Note: Export is done asynchronously and may take several seconds depending on the project size.' -operationId: bitbucket_sync/export -tags: -- Bitbucket Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/id" -responses: - '200': - description: OK - content: - application/json: - schema: - "$ref": "../../schemas/bitbucket_sync_export_response.yaml#/bitbucket_sync_export_response" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/bitbucket_syncs/:id/export" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X POST \ - -d '{"account_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase bitbucket_sync export \ - --id \ - --data '{"account_id":"abcd1234"}' \ - --access_token -requestBody: - required: true - content: - application/json: - schema: - type: object - title: bitbucket_sync/export/parameters - properties: - account_id: - description: Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. - type: string - example: abcd1234 -x-cli-version: '2.5' diff --git a/paths/bitbucket_syncs/import.yaml b/paths/bitbucket_syncs/import.yaml deleted file mode 100644 index 7151b4dbe..000000000 --- a/paths/bitbucket_syncs/import.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -summary: Import to Phrase Strings from Bitbucket -description: 'Import translations from Bitbucket to Phrase Strings according to the .phraseapp.yml file within the Bitbucket repository.

Note: Import is done asynchronously and may take several seconds depending on the project size.' -operationId: bitbucket_sync/import -tags: -- Bitbucket Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/id" -responses: - '200': - description: OK - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/bitbucket_syncs/:id/import" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X POST \ - -d '{"account_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase bitbucket_sync import \ - --id \ - --data '{"account_id":"abcd1234"}' \ - --access_token -requestBody: - required: true - content: - application/json: - schema: - type: object - title: bitbucket_sync/import/parameters - properties: - account_id: - description: Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. - type: string - example: abcd1234 -x-cli-version: '2.5' diff --git a/paths/bitbucket_syncs/index.yaml b/paths/bitbucket_syncs/index.yaml deleted file mode 100644 index b89dfc579..000000000 --- a/paths/bitbucket_syncs/index.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -summary: List Bitbucket syncs -description: List all Bitbucket repositories for which synchronisation with Phrase Strings is activated. -operationId: bitbucket_syncs/list -tags: -- Bitbucket Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- description: Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. - example: abcd1234 - name: account_id - in: query - schema: - type: string -responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - "$ref": "../../schemas/bitbucket_sync.yaml#/bitbucket_sync" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - Link: - "$ref": "../../headers.yaml#/Link" - Pagination: - "$ref": "../../headers.yaml#/Pagination" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/bitbucket_syncs?account_id=abcd1234" \ - -u USERNAME_OR_ACCESS_TOKEN -- lang: CLI v2 - source: |- - phrase bitbucket_sync list \ - --account_id abcd1234 \ - --access_token -x-cli-version: '2.5' diff --git a/paths/github_syncs/export.yaml b/paths/github_syncs/export.yaml deleted file mode 100644 index 11e311388..000000000 --- a/paths/github_syncs/export.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -summary: Export from Phrase Strings to GitHub -description: 'Export translations from Phrase Strings to GitHub according to the .phraseapp.yml file within the GitHub repository.

Note: Export is done asynchronously and may take several seconds depending on the project size.' -operationId: github_sync/export -tags: -- GitHub Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -responses: - '200': - description: OK - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '422': - "$ref": "../../responses.yaml#/422" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/github_syncs/export" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X POST \ - -d '{"project_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: UNAVAILABLE -requestBody: - required: true - content: - application/json: - schema: - type: object - title: github_sync/export/parameters - properties: - project_id: - description: Project ID to specify the actual project the GitHub export should be triggered in. - type: string - example: abcd1234 -x-cli-version: '2.5' diff --git a/paths/github_syncs/import.yaml b/paths/github_syncs/import.yaml deleted file mode 100644 index d3a51d050..000000000 --- a/paths/github_syncs/import.yaml +++ /dev/null @@ -1,49 +0,0 @@ ---- -summary: Import to Phrase Strings from GitHub -description: 'Import files to Phrase Strings from your connected GitHub repository.

Note: Import is done asynchronously and may take several seconds depending on the project size.' -operationId: github_sync/import -tags: -- GitHub Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -responses: - '200': - description: OK - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '422': - "$ref": "../../responses.yaml#/422" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/github_syncs/import" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X POST \ - -d '{"project_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: UNAVAILABLE -requestBody: - required: true - content: - application/json: - schema: - type: object - title: github_sync/import/parameters - properties: - project_id: - description: Project ID to specify the actual project the GitHub import should be triggered in. - type: string - example: abcd1234 -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/destroy.yaml b/paths/gitlab_syncs/destroy.yaml deleted file mode 100644 index 1b70a2045..000000000 --- a/paths/gitlab_syncs/destroy.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -summary: Delete single Sync Setting -description: Deletes a single GitLab Sync Setting. -operationId: gitlab_sync/delete -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/id" -- description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - example: abcd1234 - name: account_id - in: query - schema: - type: string -responses: - '204': - "$ref": "../../responses.yaml#/204" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs/:id" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X DELETE \ - -d '{"account_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase git_lab_sync delete \ - --id \ - --account_id abcd1234 \ - --access_token -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/export.yaml b/paths/gitlab_syncs/export.yaml deleted file mode 100644 index ed28e1b36..000000000 --- a/paths/gitlab_syncs/export.yaml +++ /dev/null @@ -1,56 +0,0 @@ ---- -summary: Export from Phrase Strings to GitLab -description: 'Export translations from Phrase Strings to GitLab according to the .phraseapp.yml file within the GitLab repository.

Note: Export is done asynchronously and may take several seconds depending on the project size.' -operationId: gitlab_sync/export -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/gitlab_sync_id" -responses: - '200': - description: OK - content: - application/json: - schema: - "$ref": "../../schemas/gitlab_sync_export.yaml#/gitlab_sync_export" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/export" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X POST \ - -d '{"account_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase git_lab_sync export \ - --gitlab_sync_id \ - --data '{"account_id":"abcd1234"}' \ - --access_token -requestBody: - required: true - content: - application/json: - schema: - type: object - title: gitlab_sync/export/parameters - properties: - account_id: - description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - type: string - example: abcd1234 -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/history.yaml b/paths/gitlab_syncs/history.yaml deleted file mode 100644 index 9d9eaba09..000000000 --- a/paths/gitlab_syncs/history.yaml +++ /dev/null @@ -1,55 +0,0 @@ ---- -summary: History of single Sync Setting -description: List history for a single Sync Setting. -operationId: gitlab_sync/history -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/gitlab_sync_id" -- "$ref": "../../parameters.yaml#/page" -- "$ref": "../../parameters.yaml#/per_page" -- description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - example: abcd1234 - name: account_id - in: query - schema: - type: string -responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - "$ref": "../../schemas/gitlab_sync_history.yaml#/gitlab_sync_history" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - Link: - "$ref": "../../headers.yaml#/Link" - Pagination: - "$ref": "../../headers.yaml#/Pagination" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/history?account_id=abcd1234" \ - -u USERNAME_OR_ACCESS_TOKEN -- lang: CLI v2 - source: |- - phrase gitlab_syncs history \ - --gitlab_sync_id \ - --account_id abcd1234 \ - --access_token -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/import.yaml b/paths/gitlab_syncs/import.yaml deleted file mode 100644 index 6f4028d71..000000000 --- a/paths/gitlab_syncs/import.yaml +++ /dev/null @@ -1,62 +0,0 @@ ---- -summary: Import from GitLab to Phrase -description: 'Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository.

Note: Import is done asynchronously and may take several seconds depending on the project size.' -operationId: gitlab_sync/import -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/gitlab_sync_id" -responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - "$ref": "../../schemas/upload.yaml#/upload" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - Link: - "$ref": "../../headers.yaml#/Link" - Pagination: - "$ref": "../../headers.yaml#/Pagination" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs/:gitlab_sync_id/import" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X POST \ - -d '{"account_id":"abcd1234"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase git_lab_sync import \ - --gitlab_sync_id \ - --data '{"account_id":"abcd1234"}' \ - --access_token -requestBody: - required: true - content: - application/json: - schema: - type: object - title: gitlab_sync/import/parameters - properties: - account_id: - description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - type: string - example: abcd1234 -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/index.yaml b/paths/gitlab_syncs/index.yaml deleted file mode 100644 index 31280b9ff..000000000 --- a/paths/gitlab_syncs/index.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -summary: List GitLab syncs -description: List all GitLab Sync Settings for which synchronisation with Phrase Strings and GitLab is activated. -operationId: gitlab_sync/list -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - example: abcd1234 - name: account_id - in: query - schema: - type: string -responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - "$ref": "../../schemas/gitlab_sync.yaml#/gitlab_sync" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - Link: - "$ref": "../../headers.yaml#/Link" - Pagination: - "$ref": "../../headers.yaml#/Pagination" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs?account_id=abcd1234" \ - -u USERNAME_OR_ACCESS_TOKEN -- lang: CLI v2 - source: |- - phrase git_lab_sync list \ - --account_id abcd1234 \ - --access_token -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/show.yaml b/paths/gitlab_syncs/show.yaml deleted file mode 100644 index f4405dfe1..000000000 --- a/paths/gitlab_syncs/show.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -summary: Get single Sync Setting -description: Shows a single GitLab Sync Setting. -operationId: gitlab_sync/show -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/id" -- description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - example: abcd1234 - name: account_id - in: query - schema: - type: string -responses: - '200': - description: OK - content: - application/json: - schema: - "$ref": "../../schemas/gitlab_sync.yaml#/gitlab_sync" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs/:id?account_id=abcd1234" \ - -u USERNAME_OR_ACCESS_TOKEN -- lang: CLI v2 - source: |- - phrase git_lab_sync show \ - --id \ - --account_id abcd1234 \ - --access_token -x-cli-version: '2.5' diff --git a/paths/gitlab_syncs/update.yaml b/paths/gitlab_syncs/update.yaml deleted file mode 100644 index 6c0e52aad..000000000 --- a/paths/gitlab_syncs/update.yaml +++ /dev/null @@ -1,68 +0,0 @@ ---- -summary: Update single Sync Setting -description: Updates a single GitLab Sync Setting. -operationId: gitlab_sync/update -tags: -- GitLab Sync -parameters: -- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" -- "$ref": "../../parameters.yaml#/id" -- description: Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - example: abcd1234 - name: account_id - in: query - schema: - type: string -- description: Code of the related Phrase Strings Project. - example: 3456abcd - name: phrase_project_code - in: query - schema: - type: string -- description: ID of the related GitLab Project. - example: 12345 - name: gitlab_project_id - in: query - schema: - type: integer -- description: Name of the GitLab Branch. - example: feature-development - name: gitlab_branch_name - in: query - schema: - type: string -responses: - '200': - description: OK - content: - application/json: - schema: - "$ref": "../../schemas/gitlab_sync.yaml#/gitlab_sync" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" - '400': - "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" - '429': - "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/gitlab_syncs/:id" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X PUT \ - -d '{"account_id":"abcd1234","phrase_project_code":"3456abcd","gitlab_project_id":12345,"gitlab_branch_name":"feature-development"}' \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase git_lab_sync update \ - --id \ - --data '{"account_id":"abcd1234", "phrase_project_code":"3456abcd", "gitlab_project_id":"12345", "gitlab_branch_name":"feature-development"}' \ - --access_token -x-cli-version: '2.5' diff --git a/schemas.yaml b/schemas.yaml index 04a157e5e..2cdd8e6d7 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -4,16 +4,6 @@ schemas: "$ref": schemas/authorization.yaml#/authorization authorization_with_token: "$ref": schemas/authorization_with_token.yaml#/authorization_with_token - bitbucket_sync: - "$ref": schemas/bitbucket_sync.yaml#/bitbucket_sync - bitbucket_sync_export_response: - "$ref": schemas/bitbucket_sync_export_response.yaml#/bitbucket_sync_export_response - gitlab_sync: - "$ref": schemas/gitlab_sync.yaml#/gitlab_sync - gitlab_sync_export: - "$ref": schemas/gitlab_sync_export.yaml#/gitlab_sync_export - gitlab_sync_history: - "$ref": schemas/gitlab_sync_history.yaml#/gitlab_sync_history blacklisted_key: "$ref": schemas/blacklisted_key.yaml#/blacklisted_key comment: diff --git a/schemas/bitbucket_sync.yaml b/schemas/bitbucket_sync.yaml deleted file mode 100644 index 73e0e8eb0..000000000 --- a/schemas/bitbucket_sync.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -bitbucket_sync: - type: object - title: bitbucket_sync - properties: - id: - type: string - repository_name: - type: string - last_export_to_bitbucket_at: - type: string - format: date-time - last_import_from_bitbucket_at: - type: string - format: date-time - valid_phraseapp_yaml: - type: boolean - phraseapp_projects: - type: array - items: - "$ref": "./project_short.yaml#/project_short" - example: - id: aad1ar91-0331-4181-b90p-4crdnv0bd812 - repository_name: some-repository - last_export_to_bitbucket_at: '2015-01-28T09:52:53Z' - last_import_from_bitbucket_at: '2015-01-28T09:52:53Z' - valid_phraseapp_yaml: true - phraseapp_projects: - - id: abcd1234cdef1234abcd1234cdef1234 - name: My Android Project - main_format: xml - created_at: '2015-01-28T09:52:53Z' - updated_at: '2015-01-28T09:52:53Z' diff --git a/schemas/bitbucket_sync_export_response.yaml b/schemas/bitbucket_sync_export_response.yaml deleted file mode 100644 index 94bcc728f..000000000 --- a/schemas/bitbucket_sync_export_response.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -bitbucket_sync_export_response: - type: object - title: bitbucket_sync_export_response - properties: - status_path: - type: string - example: - status_path: https://bitbucket.sync.phraseapp.com/export_to_bitbucket_status diff --git a/schemas/gitlab_sync.yaml b/schemas/gitlab_sync.yaml deleted file mode 100644 index 0dd4bcce4..000000000 --- a/schemas/gitlab_sync.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -gitlab_sync: - type: object - title: gitlab_sync - properties: - id: - type: string - project_id: - type: string - gitlab_project_id: - type: integer - gitlab_branch_name: - type: string - auto_import: - type: boolean - auto_import_secret: - type: string - auto_import_url: - type: string - self_hosted_api_url: - type: string - last_exported_at: - type: string - format: date-time - last_imported_at: - type: string - format: date-time - last_status: - type: string - example: - id: abcd1234cdef1234abcd1234cdef1234 - project_id: ft5yufdh1234cdef1234abc5d12d4cdef123 - gitlab_project_id: 18188930 - gitlab_branch_name: master - auto_import: true - auto_import_secret: import_secret - auto_import_url: import_url - self_hosted_api_url: www.example.com/api/v4 - last_exported_at: '2015-01-28T12:55:14.000+00:00' - last_imported_at: '2015-01-28T12:55:14.000+00:00' - last_status: success diff --git a/schemas/gitlab_sync_export.yaml b/schemas/gitlab_sync_export.yaml deleted file mode 100644 index ed20e6cb7..000000000 --- a/schemas/gitlab_sync_export.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -gitlab_sync_export: - type: object - title: gitlab_sync_export - properties: - merge_request_id: - type: integer - merge_request_web_url: - type: string - example: - merge_request_id: 1234 - merge_request_web_url: https://gitlab.com/account/project/-/merge_requests/1234 diff --git a/schemas/gitlab_sync_history.yaml b/schemas/gitlab_sync_history.yaml deleted file mode 100644 index 285d303cd..000000000 --- a/schemas/gitlab_sync_history.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -gitlab_sync_history: - type: object - title: gitlab_sync_history - properties: - status: - type: string - action: - type: string - errors: - type: array - items: - type: object - properties: - error: - type: string - message: - type: string - date: - type: string - format: date-time - details: - type: object - example: - type: history - attributes: - status: success - action: import - errors: - - error: "error type" - message: "can't be blank" - date: '2015-01-28T12:55:14.000+00:00' - details: - auto_import: false