# ReviewService

> The ReviewService methods and their request and response messages.

Source: https://engramsfactory.com/docs/api/review/

Generated from [`review.proto`](https://github.com/cortexapps/engrams/blob/main/crates/engram-protocol/proto/engram/app/v1/review.proto). Every method is
`POST /rpc/engram.app.v1.ReviewService/<Method>` with a JSON or protobuf body and an
`x-api-key` header.

## Methods

| Method | Request | Response |
|---|---|---|
| `ListReviews` | [`ListReviewsRequest`](#listreviewsrequest) | [`ListReviewsResponse`](#listreviewsresponse) |
| `GetReview` | [`GetReviewRequest`](#getreviewrequest) | [`GetReviewResponse`](#getreviewresponse) |
| `RetryReview` | [`RetryReviewRequest`](#retryreviewrequest) | [`RetryReviewResponse`](#retryreviewresponse) |

## Messages

### FindingCounts

| Field | Type |
|---|---|
| `critical` | `int32` |
| `high` | `int32` |
| `medium` | `int32` |
| `low` | `int32` |
| `total` | `int32` |

### GetReviewRequest

| Field | Type |
|---|---|
| `id` | `string` |

### GetReviewResponse

| Field | Type |
|---|---|
| `review` | [`Review`](#review) |
| `findings` | repeated [`ReviewFinding`](#reviewfinding) |
| `verdicts` | repeated [`ReviewVerdict`](#reviewverdict) |
| `passes` | repeated [`Review`](#review) |
| `events` | repeated [`ReviewEvent`](#reviewevent) |

### ListReviewsRequest

| Field | Type |
|---|---|
| `repos` | repeated `string` |
| `search` | `string` |
| `authors` | repeated `string` |
| `pr_states` | repeated `string` |
| `statuses` | repeated `string` |
| `severities` | repeated `string` |
| `page` | `int32` |
| `page_size` | `int32` |

### ListReviewsResponse

| Field | Type |
|---|---|
| `reviews` | repeated [`Review`](#review) |
| `total_count` | `int32` |
| `facets` | [`ReviewFacets`](#reviewfacets) |

### RetryReviewRequest

| Field | Type |
|---|---|
| `id` | `string` |

### RetryReviewResponse

| Field | Type |
|---|---|
| `workflow_id` | `string` |
| `review_id` | `string` (optional) |

### Review

| Field | Type |
|---|---|
| `id` | `string` |
| `repo` | `string` |
| `pr_number` | `int32` |
| `task_id` | `string` |
| `head_sha` | `string` |
| `base_sha` | `string` |
| `trigger` | `string` |
| `status` | `string` |
| `github_review_id` | `string` (optional) |
| `summary_md` | `string` (optional) |
| `created_at` | `google.protobuf.Timestamp` |
| `updated_at` | `google.protobuf.Timestamp` |
| `finding_counts` | [`FindingCounts`](#findingcounts) |
| `finder_session_id` | `string` (optional) |
| `verifier_session_id` | `string` (optional) |
| `pr_title` | `string` (optional) |
| `pr_author` | `string` (optional) |
| `head_branch` | `string` (optional) |
| `base_branch` | `string` (optional) |
| `pr_state` | `string` (optional) |
| `additions` | `int32` (optional) |
| `deletions` | `int32` (optional) |
| `changed_files` | `int32` (optional) |
| `target_id` | `string` |
| `provider` | `string` |
| `provider_id` | `string` (optional) |
| `pr_url` | `string` (optional) |
| `active` | `bool` |
| `human_trigger` | `bool` |
| `automation_run_id` | `string` (optional) |

### ReviewEvent

| Field | Type |
|---|---|
| `id` | `string` |
| `review_id` | `string` |
| `kind` | `string` |
| `detail` | `string` (optional) |
| `created_at` | `google.protobuf.Timestamp` |

### ReviewFacets

| Field | Type |
|---|---|
| `repos` | repeated `string` |
| `authors` | repeated `string` |
| `pr_states` | repeated `string` |
| `statuses` | repeated `string` |

### ReviewFinding

| Field | Type |
|---|---|
| `id` | `string` |
| `review_id` | `string` |
| `path` | `string` |
| `start_line` | `int32` (optional) |
| `end_line` | `int32` (optional) |
| `side` | `string` (optional) |
| `category` | `string` |
| `severity` | `string` |
| `confidence` | `string` |
| `title` | `string` |
| `body_md` | `string` |
| `suggested_fix` | `string` (optional) |
| `evidence` | repeated `string` |
| `state` | `string` |
| `verdict_reason` | `string` (optional) |
| `github_thread_id` | `string` (optional) |
| `resolution` | `string` (optional) |
| `session_id` | `string` |
| `created_at` | `google.protobuf.Timestamp` |

### ReviewVerdict

| Field | Type |
|---|---|
| `finding_id` | `string` |
| `verdict` | `string` |
| `confidence` | `string` |
| `reasoning` | `string` |
| `session_id` | `string` |
