diff --git a/doc/compiled.json b/doc/compiled.json index d4f793f44..49e53c6cf 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -10378,6 +10378,44 @@ "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" + } + } } ], "responses": { @@ -10421,13 +10459,58 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch\" \\\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\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X GET \\\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--access_token " + "source": "phrase comments list \\\n--project_id \\\n--key_id \\\n--branch \"my-feature-branch\" \\\n--filters unread \\\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" + ] + } + } + } + } + } + }, "x-cli-version": "2.5" }, "post": { @@ -11292,6 +11375,30 @@ "schema": { "type": "string" } + }, + { + "description": "Search query for comment messages", + "example": "Some comment content", + "name": "query", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "description": "Specify the filter for the comments", + "name": "filters", + "in": "query", + "schema": { + "type": "array", + "example": [ + "read", + "unread" + ], + "items": { + "type": "string" + } + } } ], "responses": { @@ -11338,13 +11445,47 @@ "x-code-samples": [ { "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:comment_id/replies\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X GET \\\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/:comment_id/replies?branch=my-feature-branch&filters=unread&query=something\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X GET \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", - "source": "phrase replies list \\\n--project_id \\\n--key_id \\\n--comment_id \\\n--data '{\"branch\":\"my-feature-branch\"]}' \\\n--access_token " + "source": "phrase replies list \\\n--project_id \\\n--key_id \\\n--comment_id \\\n--branch \"my-feature-branch\" \\\n--filters unread \\\n--query \"Some comment content\" \\\n--access_token " } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "replies/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" + }, + "filters": { + "description": "Specify filters to find comments by", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "read", + "unread" + ] + } + } + } + } + } + }, "x-cli-version": "2.10" }, "post": { diff --git a/paths/comment_replies/index.yaml b/paths/comment_replies/index.yaml index eecc133a6..ef7e6a9cd 100644 --- a/paths/comment_replies/index.yaml +++ b/paths/comment_replies/index.yaml @@ -17,6 +17,20 @@ parameters: in: query schema: type: string +- description: Search query for comment messages + example: Some comment content + name: query + in: query + schema: + type: string +- description: Specify the filter for the comments + name: filters + in: query + schema: + type: array + example: [read, unread] + items: + type: string responses: '200': description: OK @@ -46,10 +60,9 @@ responses: x-code-samples: - lang: Curl source: |- - curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:comment_id/replies" \ + curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:comment_id/replies?branch=my-feature-branch&filters=unread&query=something" \ -u USERNAME_OR_ACCESS_TOKEN \ -X GET \ - -d '{"branch":"my-feature-branch"}' \ -H 'Content-Type: application/json' - lang: CLI v2 source: |- @@ -57,6 +70,30 @@ x-code-samples: --project_id \ --key_id \ --comment_id \ - --data '{"branch":"my-feature-branch"]}' \ + --branch "my-feature-branch" \ + --filters unread \ + --query "Some comment content" \ --access_token +requestBody: + required: true + content: + application/json: + schema: + type: object + title: replies/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 + filters: + description: Specify filters to find comments by + type: array + items: + type: string + example: [read, unread] x-cli-version: '2.10' diff --git a/paths/comments/index.yaml b/paths/comments/index.yaml index 3bccf6d87..c349ac129 100644 --- a/paths/comments/index.yaml +++ b/paths/comments/index.yaml @@ -16,6 +16,28 @@ parameters: 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 responses: '200': description: OK @@ -43,13 +65,46 @@ responses: x-code-samples: - lang: Curl source: |- - curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch" \ - -u USERNAME_OR_ACCESS_TOKEN + curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch&filters=unread&query=something&locale_ids=someId" \ + -u USERNAME_OR_ACCESS_TOKEN \ + -X GET \ + -H 'Content-Type: application/json' - lang: CLI v2 source: |- phrase comments list \ --project_id \ --key_id \ - --branch my-feature-branch \ + --branch "my-feature-branch" \ + --filters unread \ + --query "Some comment content" \ + --locale_ids someId \ --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] x-cli-version: '2.5'