---
title: JudgmentApi
seo:
  title: JudgmentApi — TypeScript SDK
  description: >-
    One method per public API route, named after the matching MCP tool.
    (TypeScript SDK)
description: One method per public API route, named after the matching MCP tool.
---

## addExamplesToDataset()

Insert examples to offline-test dataset ([`POST /v1/projects/{projectId}/datasets/{datasetIdentifier}/examples`](/documentation/reference/api/v1/post-v1-projects-by-project-id-datasets-by-dataset-identifier-examples)).

```typescript
async function addExamplesToDataset(init: { params: { path: { projectId: string; datasetIdentifier: string; } }; body: { examples } }): Promise<{ example_ids: string[]; version_added: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; datasetIdentifier: string; } }; body: { examples } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ example_ids: string[]; version_added: number; }>`

***

## addTestCases()

Add cases to a test suite's draft ([`POST /v1/projects/{projectId}/test-suites/{testSuiteId}/cases`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites-by-test-suite-id-cases)).

```typescript
async function addTestCases(init: { params: { path: { projectId: string; testSuiteId: string; } }; body: { cases } }): Promise<{ case_ids: string[]; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; } }; body: { cases } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ case_ids: string[]; }>`

***

## cancelTestRun()

Cancel test run ([`POST /v1/projects/{projectId}/test-runs/{testRunId}/cancel`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-runs-by-test-run-id-cancel)).

```typescript
async function cancelTestRun(init: { params: { path: { projectId: string; testRunId: string; } } }): Promise<{ test_run }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testRunId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_run }>`

***

## createArtifact()

Create artifact ([`POST /v1/projects/{projectId}/artifacts`](/documentation/reference/api/v1/post-v1-projects-by-project-id-artifacts)).

```typescript
async function createArtifact(init: { params: { path: { projectId: string; } }; body: { scope, name, filename, source_code } }): Promise<{ revision, artifact }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { scope, name, filename, source_code } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ revision, artifact }>`

***

## createDataset()

Create offline-test dataset ([`POST /v1/projects/{projectId}/datasets`](/documentation/reference/api/v1/post-v1-projects-by-project-id-datasets)).

```typescript
async function createDataset(init: { params: { path: { projectId: string; } }; body: { name, schema, examples?, overwrite, dataset_kind?, metadata? } }): Promise<{ detail, dataset_id, dataset }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { name, schema, examples?, overwrite, dataset_kind?, metadata? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ detail, dataset_id, dataset }>`

***

## createIssue()

Create issue ([`POST /v1/projects/{projectId}/issues`](/documentation/reference/api/v1/post-v1-projects-by-project-id-issues)).

```typescript
async function createIssue(init: { params: { path: { projectId: string; } }; body: { issue_key?, title, diagnosis, impact_summary?, priority?, production_activity?, agent_reasoning?, cited_items } }): Promise<{ issue: { id: string; issue_key: string; }; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { issue_key?, title, diagnosis, impact_summary?, priority?, production_activity?, agent_reasoning?, cited_items } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ issue: { id: string; issue_key: string; }; }>`

***

## createJudge()

Create judge ([`POST /v1/projects/{projectId}/judges`](/documentation/reference/api/v1/post-v1-projects-by-project-id-judges)).

```typescript
async function createJudge(init: { params: { path: { projectId: string; } }; body: { judge } }): Promise<{ judge_id: string; judge_version_id: string; implementation_id: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { judge } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judge_id: string; judge_version_id: string; implementation_id: string; }>`

***

## createMapper()

Create attribute mapper ([`POST /v1/projects/{projectId}/attribute-mappers`](/documentation/reference/api/v1/post-v1-projects-by-project-id-attribute-mappers)).

```typescript
async function createMapper(init: { params: { path: { projectId: string; } }; body: { name, rules, enabled?, override?, remove_source? } }): Promise<{ mapper }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { name, rules, enabled?, override?, remove_source? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ mapper }>`

***

## createProject()

Add new project ([`POST /v1/projects`](/documentation/reference/api/v1/post-v1-projects)).

```typescript
async function createProject(init: { body: { project_name } }): Promise<{ project, project_id }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ body: { project_name } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ project, project_id }>`

***

## createScheduledTask()

Create a scheduled task ([`POST /v1/projects/{projectId}/scheduled-tasks`](/documentation/reference/api/v1/post-v1-projects-by-project-id-scheduled-tasks)).

```typescript
async function createScheduledTask(init: { params: { path: { projectId: string; } }; body: { name, description?, instructions?, mode?, tool_permission_mode?, schedule?, slack_channel_ids? } }): Promise<{ task }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { name, description?, instructions?, mode?, tool_permission_mode?, schedule?, slack_channel_ids? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ task }>`

***

## createSupabaseArtifactRevision()

Create artifact revision ([`POST /v1/projects/{projectId}/artifacts/{artifactId}/revisions`](/documentation/reference/api/v1/post-v1-projects-by-project-id-artifacts-by-artifact-id-revisions)).

```typescript
async function createSupabaseArtifactRevision(init: { params: { path: { projectId: string; artifactId: string; } }; body: { version, filename, source_code } }): Promise<{ revision }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; artifactId: string; } }; body: { version, filename, source_code } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ revision }>`

***

## createTestConfig()

Create test config ([`POST /v1/projects/{projectId}/test-configs`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-configs)).

```typescript
async function createTestConfig(init: { params: { path: { projectId: string; } }; body: { name, description?, dataset_id?, dataset_name?, judge_ids?, judges? } }): Promise<{ test_config }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { name, description?, dataset_id?, dataset_name?, judge_ids?, judges? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_config }>`

***

## createTestSuite()

Create a test suite ([`POST /v1/projects/{projectId}/test-suites`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites)).

```typescript
async function createTestSuite(init: { params: { path: { projectId: string; } }; body: { name, description?, labels? } }): Promise<{ test_suite_id, name, description, labels, version, created_at, updated_at }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { name, description?, labels? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_suite_id, name, description, labels, version, created_at, updated_at }>`

***

## createTestSuiteDraft()

Copy the published cases into the draft to edit ([`POST /v1/projects/{projectId}/test-suites/{testSuiteId}/draft`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites-by-test-suite-id-draft)).

```typescript
async function createTestSuiteDraft(init: { params: { path: { projectId: string; testSuiteId: string; } } }): Promise<{ version: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ version: number; }>`

***

## deleteDataset()

Delete offline-test dataset ([`DELETE /v1/projects/{projectId}/datasets/{datasetIdentifier}`](/documentation/reference/api/v1/delete-v1-projects-by-project-id-datasets-by-dataset-identifier)).

```typescript
async function deleteDataset(init: { params: { path: { projectId: string; datasetIdentifier: string; } } }): Promise<{ status: string; message: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; datasetIdentifier: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ status: string; message: string; }>`

***

## deleteJudge()

Delete judge ([`DELETE /v1/projects/{projectId}/judges/{judgeId}`](/documentation/reference/api/v1/delete-v1-projects-by-project-id-judges-by-judge-id)).

```typescript
async function deleteJudge(init: { params: { path: { projectId: string; judgeId: string; } } }): Promise<{ deleted_count: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; judgeId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ deleted_count: number; }>`

***

## deleteMapper()

Delete attribute mapper ([`DELETE /v1/projects/{projectId}/attribute-mappers/{configId}`](/documentation/reference/api/v1/delete-v1-projects-by-project-id-attribute-mappers-by-config-id)).

```typescript
async function deleteMapper(init: { params: { path: { projectId: string; configId: string; } } }): Promise<{ success: boolean; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; configId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ success: boolean; }>`

***

## deleteTestConfig()

Delete test config ([`DELETE /v1/projects/{projectId}/test-configs/{testConfigId}`](/documentation/reference/api/v1/delete-v1-projects-by-project-id-test-configs-by-test-config-id)).

```typescript
async function deleteTestConfig(init: { params: { path: { projectId: string; testConfigId: string; } } }): Promise<{ status: string; message: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testConfigId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ status: string; message: string; }>`

***

## deleteTestSuite()

Delete a test suite with its runs ([`DELETE /v1/projects/{projectId}/test-suites/{testSuiteId}`](/documentation/reference/api/v1/delete-v1-projects-by-project-id-test-suites-by-test-suite-id)).

```typescript
async function deleteTestSuite(init: { params: { path: { projectId: string; testSuiteId: string; } } }): Promise<{ test_suite_id: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_suite_id: string; }>`

***

## discardTestSuiteDraft()

Throw away the draft's changes ([`POST /v1/projects/{projectId}/test-suites/{testSuiteId}/discard`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites-by-test-suite-id-discard)).

```typescript
async function discardTestSuiteDraft(init: { params: { path: { projectId: string; testSuiteId: string; } } }): Promise<{ discarded: boolean; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ discarded: boolean; }>`

***

## discoverSchema()

Discover the virtual SQL schema ([`GET /v1/sql/schema`](/documentation/reference/api/v1/get-v1-sql-schema)).

```typescript
async function discoverSchema(init?: FetchOptions): Promise<{ schema: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init?` | `FetchOptions` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ schema: string; }>`

***

## evaluateAllTraces()

Evaluate recent traces ([`POST /v1/projects/{projectId}/traces/evaluate-all`](/documentation/reference/api/v1/post-v1-projects-by-project-id-traces-evaluate-all)).

```typescript
async function evaluateAllTraces(init: { params: { path: { projectId: string; } }; body: { judge_names?, limit? } }): Promise<{ enqueued: boolean; limit: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { judge_names?, limit? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ enqueued: boolean; limit: number; }>`

***

## evaluateTraces()

Evaluate stored traces ([`POST /v1/projects/{projectId}/traces/evaluate`](/documentation/reference/api/v1/post-v1-projects-by-project-id-traces-evaluate)).

```typescript
async function evaluateTraces(init: { params: { path: { projectId: string; } }; body: { trace_ids, judge_names? } }): Promise<{ enqueued: boolean; trace_count: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { trace_ids, judge_names? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ enqueued: boolean; trace_count: number; }>`

***

## getArtifactRevision()

Get artifact revision ([`GET /v1/projects/{projectId}/artifact-revisions`](/documentation/reference/api/v1/get-v1-projects-by-project-id-artifact-revisions)).

```typescript
async function getArtifactRevision(init: { params: { path: { projectId: string; }; query?: { revision_id?: string; artifact_id?: string; version?: number; } } }): Promise<{ revision }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { revision_id?: string; artifact_id?: string; version?: number; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ revision }>`

***

## getConversationDisplayRules()

Get conversation display rules ([`GET /v1/projects/{projectId}/conversation-display-rules`](/documentation/reference/api/v1/get-v1-projects-by-project-id-conversation-display-rules)).

```typescript
async function getConversationDisplayRules(init: { params: { path: { projectId: string; } } }): Promise<{ rules: { pattern: string; replacement: string; }[]; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ rules: { pattern: string; replacement: string; }[]; }>`

***

## getDataset()

Fetch dataset page ([`GET /v1/projects/{projectId}/datasets/{datasetIdentifier}/page`](/documentation/reference/api/v1/get-v1-projects-by-project-id-datasets-by-dataset-identifier-page)).

```typescript
async function getDataset(init: { params: { path: { projectId: string; datasetIdentifier: string; }; query?: { version?: number; limit?: number; cursor_created_at?: string; cursor_example_id?: string; } } }): Promise<{ dataset, entries, metadata }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; datasetIdentifier: string; }; query?: { version?: number; limit?: number; cursor_created_at?: string; cursor_example_id?: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ dataset, entries, metadata }>`

***

## getIssue()

Get issue ([`GET /v1/projects/{projectId}/issues/{issueId}`](/documentation/reference/api/v1/get-v1-projects-by-project-id-issues-by-issue-id)).

```typescript
async function getIssue(init: { params: { path: { projectId: string; issueId: string; } } }): Promise<{ issue }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; issueId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ issue }>`

***

## getJudge()

Get judge ([`POST /v1/projects/{projectId}/judges/{judgeId}/lookup`](/documentation/reference/api/v1/post-v1-projects-by-project-id-judges-by-judge-id-lookup)).

```typescript
async function getJudge(init: { params: { path: { projectId: string; judgeId: string; } }; body: { include_code_url?, version? } }): Promise<{ optimistic_eval_eligibility, judge }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; judgeId: string; } }; body: { include_code_url?, version? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ optimistic_eval_eligibility, judge }>`

***

## getJudgeLabel()

Get judge label ([`GET /v1/projects/{projectId}/behaviors/{behaviorId}/analytics`](/documentation/reference/api/v1/get-v1-projects-by-project-id-behaviors-by-behavior-id-analytics)).

```typescript
async function getJudgeLabel(init: { params: { path: { projectId: string; behaviorId: string; }; query?: { start_date?: string; end_date?: string; } } }): Promise<{ start_time, end_time, granularity, data, summaries }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; behaviorId: string; }; query?: { start_date?: string; end_date?: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ start_time, end_time, granularity, data, summaries }>`

***

## getMapper()

Get attribute mapper ([`GET /v1/projects/{projectId}/attribute-mappers/{configId}`](/documentation/reference/api/v1/get-v1-projects-by-project-id-attribute-mappers-by-config-id)).

```typescript
async function getMapper(init: { params: { path: { projectId: string; configId: string; } } }): Promise<{ mapper }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; configId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ mapper }>`

***

## getScheduledTask()

Get a scheduled task ([`GET /v1/projects/{projectId}/scheduled-tasks/{taskId}`](/documentation/reference/api/v1/get-v1-projects-by-project-id-scheduled-tasks-by-task-id)).

```typescript
async function getScheduledTask(init: { params: { path: { projectId: string; taskId: string; } } }): Promise<{ task }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; taskId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ task }>`

***

## getTestRun()

Fetch test run ([`GET /v1/projects/{projectId}/test-runs/{testRunId}`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-runs-by-test-run-id)).

```typescript
async function getTestRun(init: { params: { path: { projectId: string; testRunId: string; } } }): Promise<{ test_run, ui_results_url? }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testRunId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_run, ui_results_url? }>`

***

## getTestRunItems()

Fetch test run items ([`GET /v1/projects/{projectId}/test-runs/{testRunId}/items`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-runs-by-test-run-id-items)).

```typescript
async function getTestRunItems(init: { params: { path: { projectId: string; testRunId: string; }; query?: { limit?: number; cursor?: string; } } }): Promise<{ results, has_more, next_cursor, ui_results_url? }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testRunId: string; }; query?: { limit?: number; cursor?: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ results, has_more, next_cursor, ui_results_url? }>`

***

## getTestSuiteRunResults()

Get test run results ([`GET /v1/projects/{projectId}/test-suites/runs/{runId}/results`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-suites-runs-by-run-id-results)).

```typescript
async function getTestSuiteRunResults(init: { params: { path: { projectId: string; runId: string; } } }): Promise<{ results }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; runId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ results }>`

***

## getTraceHealth()

Get trace health for one trace ([`GET /v1/projects/{projectId}/trace-health/traces/{traceId}`](/documentation/reference/api/v1/get-v1-projects-by-project-id-trace-health-traces-by-trace-id)).

```typescript
async function getTraceHealth(init: { params: { path: { projectId: string; traceId: string; }; query?: { category?: "trace_health" | "conversation_view"; } } }): Promise<{ trace_health }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; traceId: string; }; query?: { category?: "trace_health" \| "conversation_view"; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ trace_health }>`

***

## getTraceHealthSummary()

Get trace health summary ([`GET /v1/projects/{projectId}/trace-health/summary`](/documentation/reference/api/v1/get-v1-projects-by-project-id-trace-health-summary)).

```typescript
async function getTraceHealthSummary(init: { params: { path: { projectId: string; }; query: { category?: "trace_health" | "conversation_view"; start_time: string; end_time: string; } } }): Promise<{ summary }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query: { category?: "trace_health" \| "conversation_view"; start_time: string; end_time: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ summary }>`

***

## listDatasets()

Fetch offline-test datasets ([`GET /v1/projects/{projectId}/datasets`](/documentation/reference/api/v1/get-v1-projects-by-project-id-datasets)).

```typescript
async function listDatasets(init: { params: { path: { projectId: string; } } }): Promise<{ dataset_id, organization_id?, project_id?, name, schema?, current_version?, created_at?, updated_at?, creat...
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ dataset_id, organization_id?, project_id?, name, schema?, current_version?, created_at?, updated_at?, creat...`

***

## listIssues()

List issues ([`GET /v1/projects/{projectId}/issues`](/documentation/reference/api/v1/get-v1-projects-by-project-id-issues)).

```typescript
async function listIssues(init: { params: { path: { projectId: string; }; query?: { user_status?: "needs_review" | "ignored" | "resolved" | "merged" | "monitored"; production_activity?: "new" | "ongoing" | "increasing" | "recurring"; priority?: "low" | "medium" | "high" | "critical"; } } }): Promise<{ issues }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { user_status?: "needs_review" \| "ignored" \| "resolved" \| "merged" \| "monitored"; production_activity?: "new" \| "ongoing" \| "increasing" \| "recurring"; priority?: "low" \| "medium" \| "high" \| "critical"; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ issues }>`

***

## listJudgeActionGroups()

List judge action groups ([`GET /v1/projects/{projectId}/judges/action-groups`](/documentation/reference/api/v1/get-v1-projects-by-project-id-judges-action-groups)).

```typescript
async function listJudgeActionGroups(init: { params: { path: { projectId: string; }; query?: { version?: "latest" | "production"; } } }): Promise<{ action_groups }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { version?: "latest" \| "production"; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ action_groups }>`

***

## listJudges()

List judges ([`GET /v1/projects/{projectId}/judges`](/documentation/reference/api/v1/get-v1-projects-by-project-id-judges)).

```typescript
async function listJudges(init: { params: { path: { projectId: string; }; query?: { version?: "latest" | "production"; } } }): Promise<{ judges }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { version?: "latest" \| "production"; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judges }>`

***

## listMappers()

List attribute mappers ([`GET /v1/projects/{projectId}/attribute-mappers`](/documentation/reference/api/v1/get-v1-projects-by-project-id-attribute-mappers)).

```typescript
async function listMappers(init: { params: { path: { projectId: string; } } }): Promise<{ mappers }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ mappers }>`

***

## listMemoryEntries()

List memory entries ([`GET /v1/projects/{projectId}/memory/entries`](/documentation/reference/api/v1/get-v1-projects-by-project-id-memory-entries)).

```typescript
async function listMemoryEntries(init: { params: { path: { projectId: string; } } }): Promise<{ entries: { id: string; name: string; type: "folder" | "file"; created_at: string; updated_at: string; }[]; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ entries: { id: string; name: string; type: "folder" | "file"; created_at: string; updated_at: string; }[]; }>`

***

## listOrganizations()

List organization memberships ([`GET /v1/organizations/memberships`](/documentation/reference/api/v1/get-v1-organizations-memberships)).

```typescript
async function listOrganizations(init?: FetchOptions): Promise<{ organizations }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init?` | `FetchOptions` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ organizations }>`

***

## listProjects()

List project summaries ([`GET /v1/projects/summaries`](/documentation/reference/api/v1/get-v1-projects-summaries)).

```typescript
async function listProjects(init?: FetchOptions): Promise<{ projects }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init?` | `FetchOptions` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ projects }>`

***

## listScheduledTasks()

List scheduled tasks ([`GET /v1/projects/{projectId}/scheduled-tasks`](/documentation/reference/api/v1/get-v1-projects-by-project-id-scheduled-tasks)).

```typescript
async function listScheduledTasks(init: { params: { path: { projectId: string; } } }): Promise<{ tasks }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ tasks }>`

***

## listTestCases()

List test cases in a version or the draft ([`GET /v1/projects/{projectId}/test-suites/{testSuiteId}/cases`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-suites-by-test-suite-id-cases)).

```typescript
async function listTestCases(init: { params: { path: { projectId: string; testSuiteId: string; }; query?: { version?: string; offset?: number; limit?: number; } } }): Promise<{ version, cases, next_offset }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; }; query?: { version?: string; offset?: number; limit?: number; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ version, cases, next_offset }>`

***

## listTestConfigs()

Fetch test configs ([`GET /v1/projects/{projectId}/test-configs`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-configs)).

```typescript
async function listTestConfigs(init: { params: { path: { projectId: string; }; query?: { dataset_id?: string; } } }): Promise<{ test_configs }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { dataset_id?: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_configs }>`

***

## listTestRuns()

Fetch test runs ([`GET /v1/projects/{projectId}/test-runs`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-runs)).

```typescript
async function listTestRuns(init: { params: { path: { projectId: string; }; query?: { test_config_id?: string; dataset_id?: string; status?: "pending" | "running" | "completed" | "error" | "cancelled"; limit?: number; } } }): Promise<{ test_runs }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { test_config_id?: string; dataset_id?: string; status?: "pending" \| "running" \| "completed" \| "error" \| "cancelled"; limit?: number; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_runs }>`

***

## listTestSuiteRuns()

List test runs ([`GET /v1/projects/{projectId}/test-suites/{testSuiteId}/runs`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-suites-by-test-suite-id-runs)).

```typescript
async function listTestSuiteRuns(init: { params: { path: { projectId: string; testSuiteId: string; }; query?: { offset?: number; limit?: number; } } }): Promise<{ runs, next_offset }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; }; query?: { offset?: number; limit?: number; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ runs, next_offset }>`

***

## listTestSuites()

List test suites ([`GET /v1/projects/{projectId}/test-suites`](/documentation/reference/api/v1/get-v1-projects-by-project-id-test-suites)).

```typescript
async function listTestSuites(init: { params: { path: { projectId: string; }; query?: { offset?: number; limit?: number; } } }): Promise<{ test_suites, next_offset }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; }; query?: { offset?: number; limit?: number; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_suites, next_offset }>`

***

## listTraceHealthFailures()

List traces failing a trace health check ([`GET /v1/projects/{projectId}/trace-health/checks/{checkId}/traces`](/documentation/reference/api/v1/get-v1-projects-by-project-id-trace-health-checks-by-check-id-traces)).

```typescript
async function listTraceHealthFailures(init: { params: { path: { projectId: string; checkId: string; }; query: { category?: "trace_health" | "conversation_view"; start_time: string; end_time: string; limit?: number; cursor_trace_started_at?: string; cursor_trace_id?: string; } } }): Promise<{ traces, has_more, next_cursor }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; checkId: string; }; query: { category?: "trace_health" \| "conversation_view"; start_time: string; end_time: string; limit?: number; cursor_trace_started_at?: string; cursor_trace_id?: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ traces, has_more, next_cursor }>`

***

## publishTestSuite()

Publish the draft as the next version ([`POST /v1/projects/{projectId}/test-suites/{testSuiteId}/publish`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites-by-test-suite-id-publish)).

```typescript
async function publishTestSuite(init: { params: { path: { projectId: string; testSuiteId: string; } } }): Promise<{ version: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ version: number; }>`

***

## readMemoryFiles()

Fetch memory files ([`POST /v1/projects/{projectId}/memory/files/fetch`](/documentation/reference/api/v1/post-v1-projects-by-project-id-memory-files-fetch)).

```typescript
async function readMemoryFiles(init: { params: { path: { projectId: string; } }; body: { ids?, names? } }): Promise<{ files }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { ids?, names? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ files }>`

***

## removeExamplesFromDataset()

Remove examples from offline-test dataset ([`POST /v1/projects/{projectId}/datasets/{datasetIdentifier}/examples/remove`](/documentation/reference/api/v1/post-v1-projects-by-project-id-datasets-by-dataset-identifier-examples-remove)).

```typescript
async function removeExamplesFromDataset(init: { params: { path: { projectId: string; datasetIdentifier: string; } }; body: { example_ids } }): Promise<{ removed_example_ids: string[]; version_created: number; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; datasetIdentifier: string; } }; body: { example_ids } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ removed_example_ids: string[]; version_created: number; }>`

***

## removeTestCase()

Remove a case from the draft ([`DELETE /v1/projects/{projectId}/test-suites/{testSuiteId}/cases/{caseId}`](/documentation/reference/api/v1/delete-v1-projects-by-project-id-test-suites-by-test-suite-id-cases-by-case-id)).

```typescript
async function removeTestCase(init: { params: { path: { projectId: string; testSuiteId: string; caseId: string; } } }): Promise<{ case_id: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; caseId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ case_id: string; }>`

***

## runTest()

Prepare and queue test run ([`POST /v1/projects/{projectId}/test-runs`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-runs)).

```typescript
async function runTest(init: { params: { path: { projectId: string; } }; body: { test_run_id?, test_config_id, name?, dataset_version_id?, dataset_version_number?, judge_versions?, source?, agent_errors?, agent_traces? } }): Promise<{ test_run, dataset, dataset_version, examples, judges, evaluation_runs, ui_results_url }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { test_run_id?, test_config_id, name?, dataset_version_id?, dataset_version_number?, judge_versions?, source?, agent_errors?, agent_traces? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_run, dataset, dataset_version, examples, judges, evaluation_runs, ui_results_url }>`

***

## scoreTestRun()

Score a test run ([`POST /v1/projects/{projectId}/test-suites/runs/{runId}/score`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites-runs-by-run-id-score)).

```typescript
async function scoreTestRun(init: { params: { path: { projectId: string; runId: string; } } }): Promise<{ run_id: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; runId: string; } } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ run_id: string; }>`

***

## searchMemoryFiles()

Search memory files ([`POST /v1/projects/{projectId}/memory/search`](/documentation/reference/api/v1/post-v1-projects-by-project-id-memory-search)).

```typescript
async function searchMemoryFiles(init: { params: { path: { projectId: string; } }; body: { query, limit? } }): Promise<{ results }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { query, limit? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ results }>`

***

## setConversationDisplayRules()

Replace conversation display rules ([`PUT /v1/projects/{projectId}/conversation-display-rules`](/documentation/reference/api/v1/put-v1-projects-by-project-id-conversation-display-rules)).

```typescript
async function setConversationDisplayRules(init: { params: { path: { projectId: string; } }; body: { rules } }): Promise<{ rules: { pattern: string; replacement: string; }[]; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { rules } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ rules: { pattern: string; replacement: string; }[]; }>`

***

## setJudgeActionGroups()

Set judge action groups ([`POST /v1/projects/{projectId}/judges/{judgeId}/action-groups`](/documentation/reference/api/v1/post-v1-projects-by-project-id-judges-by-judge-id-action-groups)).

```typescript
async function setJudgeActionGroups(init: { params: { path: { projectId: string; judgeId: string; } }; body: { source_version, target_version, promote_to_production, action_groups } }): Promise<{ judge_id: string; judge_version_id: string | null; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; judgeId: string; } }; body: { source_version, target_version, promote_to_production, action_groups } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judge_id: string; judge_version_id: string | null; }>`

***

## setJudgeOptimisticEvalEnabled()

Set judge version optimistic eval ([`PUT /v1/projects/{projectId}/judges/{judgeId}/versions/{judgeVersionId}/optimistic-eval`](/documentation/reference/api/v1/put-v1-projects-by-project-id-judges-by-judge-id-versions-by-judge-version-id-optimistic-eval)).

```typescript
async function setJudgeOptimisticEvalEnabled(init: { params: { path: { projectId: string; judgeId: string; judgeVersionId: string; } }; body: { enabled } }): Promise<{ judge_id: string; judge_version_id: string; optimistic_eval_enabled: boolean; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; judgeId: string; judgeVersionId: string; } }; body: { enabled } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judge_id: string; judge_version_id: string; optimistic_eval_enabled: boolean; }>`

***

## setJudgePreprocessorArtifactRevision()

Set judge version preprocessing artifact ([`PUT /v1/projects/{projectId}/judges/{judgeId}/versions/{judgeVersionId}/preprocessor-artifact-revision`](/documentation/reference/api/v1/put-v1-projects-by-project-id-judges-by-judge-id-versions-by-judge-version-id-preprocessor-artifact-revision)).

```typescript
async function setJudgePreprocessorArtifactRevision(init: { params: { path: { projectId: string; judgeId: string; judgeVersionId: string; } }; body: { preprocessor_artifact_revision_id } }): Promise<{ judge_id, judge_version_id, preprocessor_artifact_revision_id, optimistic_eval_enabled }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; judgeId: string; judgeVersionId: string; } }; body: { preprocessor_artifact_revision_id } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judge_id, judge_version_id, preprocessor_artifact_revision_id, optimistic_eval_enabled }>`

***

## sqlQuery()

Run a tenant-scoped virtual SQL query ([`POST /v1/projects/{projectId}/sql`](/documentation/reference/api/v1/post-v1-projects-by-project-id-sql)).

```typescript
async function sqlQuery(init: { params: { path: { projectId: string; } }; body: { sql } }): Promise<{ catalog_version, columns, rows, row_count, elapsed_ms }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { sql } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ catalog_version, columns, rows, row_count, elapsed_ms }>`

***

## startTestSuiteRun()

Start a test run ([`POST /v1/projects/{projectId}/test-suites/{testSuiteId}/runs`](/documentation/reference/api/v1/post-v1-projects-by-project-id-test-suites-by-test-suite-id-runs)).

```typescript
async function startTestSuiteRun(init: { params: { path: { projectId: string; testSuiteId: string; } }; body: { case_filter?, candidate?, candidate_meta?, trigger } }): Promise<{ run_id, test_suite_version, cases }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; } }; body: { case_filter?, candidate?, candidate_meta?, trigger } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ run_id, test_suite_version, cases }>`

***

## testOptimisticEvalCandidate()

Test optimistic eval candidate ([`POST /v1/projects/{projectId}/artifacts/optimistic-eval-tests`](/documentation/reference/api/v1/post-v1-projects-by-project-id-artifacts-optimistic-eval-tests)).

```typescript
async function testOptimisticEvalCandidate(init: { params: { path: { projectId: string; } }; body: { trace_id, source_code, judge_id, judge_version_id } }): Promise<{ judge_id, judge_version_id, judge_major_version, judge_minor_version, score_type, trace_id, result, ordinar...
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { trace_id, source_code, judge_id, judge_version_id } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judge_id, judge_version_id, judge_major_version, judge_minor_version, score_type, trace_id, result, ordinar...`

***

## testPreprocessingCandidate()

Test preprocessing candidate ([`POST /v1/projects/{projectId}/artifacts/preprocessing-tests`](/documentation/reference/api/v1/post-v1-projects-by-project-id-artifacts-preprocessing-tests)).

```typescript
async function testPreprocessingCandidate(init: { params: { path: { projectId: string; } }; body: { trace_id, source_code } }): Promise<{ result }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { trace_id, source_code } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ result }>`

***

## updateIssue()

Update issue ([`PATCH /v1/projects/{projectId}/issues/{issueId}`](/documentation/reference/api/v1/patch-v1-projects-by-project-id-issues-by-issue-id)).

```typescript
async function updateIssue(init: { params: { path: { projectId: string; issueId: string; } }; body: { title?, diagnosis?, impact_summary?, priority?, production_activity?, agent_reasoning?, cited_items?, user_status?, judge_id?, behavior_id?, message? } }): Promise<{ issue }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; issueId: string; } }; body: { title?, diagnosis?, impact_summary?, priority?, production_activity?, agent_reasoning?, cited_items?, user_status?, judge_id?, behavior_id?, message? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ issue }>`

***

## updateJudge()

Update judge ([`PATCH /v1/projects/{projectId}/judges/{judgeId}`](/documentation/reference/api/v1/patch-v1-projects-by-project-id-judges-by-judge-id)).

```typescript
async function updateJudge(init: { params: { path: { projectId: string; judgeId: string; } }; body: { update } }): Promise<{ judge_id: string; judge_version_id: string | null; implementation_id: string | null; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; judgeId: string; } }; body: { update } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ judge_id: string; judge_version_id: string | null; implementation_id: string | null; }>`

***

## updateJudgeLabel()

Update judge label ([`PATCH /v1/projects/{projectId}/behaviors/{behaviorId}`](/documentation/reference/api/v1/patch-v1-projects-by-project-id-behaviors-by-behavior-id)).

```typescript
async function updateJudgeLabel(init: { params: { path: { projectId: string; behaviorId: string; } }; body: { description? } }): Promise<{ behavior }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; behaviorId: string; } }; body: { description? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ behavior }>`

***

## updateMapper()

Update attribute mapper ([`PATCH /v1/projects/{projectId}/attribute-mappers/{configId}`](/documentation/reference/api/v1/patch-v1-projects-by-project-id-attribute-mappers-by-config-id)).

```typescript
async function updateMapper(init: { params: { path: { projectId: string; configId: string; } }; body: { name?, rules?, enabled?, override?, remove_source? } }): Promise<{ mapper }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; configId: string; } }; body: { name?, rules?, enabled?, override?, remove_source? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ mapper }>`

***

## updateScheduledTask()

Update a scheduled task ([`PATCH /v1/projects/{projectId}/scheduled-tasks/{taskId}`](/documentation/reference/api/v1/patch-v1-projects-by-project-id-scheduled-tasks-by-task-id)).

```typescript
async function updateScheduledTask(init: { params: { path: { projectId: string; taskId: string; } }; body: { name?, description?, instructions?, mode?, tool_permission_mode?, schedule?, slack_channel_ids? } }): Promise<{ task, message }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; taskId: string; } }; body: { name?, description?, instructions?, mode?, tool_permission_mode?, schedule?, slack_channel_ids? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ task, message }>`

***

## updateTestCase()

Replace a case in the draft ([`PUT /v1/projects/{projectId}/test-suites/{testSuiteId}/cases/{caseId}`](/documentation/reference/api/v1/put-v1-projects-by-project-id-test-suites-by-test-suite-id-cases-by-case-id)).

```typescript
async function updateTestCase(init: { params: { path: { projectId: string; testSuiteId: string; caseId: string; } }; body: { name?, input, expected?, tags?, metadata? } }): Promise<{ case_id: string; }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testSuiteId: string; caseId: string; } }; body: { name?, input, expected?, tags?, metadata? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ case_id: string; }>`

***

## updateTestConfig()

Update test config ([`PATCH /v1/projects/{projectId}/test-configs/{testConfigId}`](/documentation/reference/api/v1/patch-v1-projects-by-project-id-test-configs-by-test-config-id)).

```typescript
async function updateTestConfig(init: { params: { path: { projectId: string; testConfigId: string; } }; body: { name?, description? } }): Promise<{ test_config }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; testConfigId: string; } }; body: { name?, description? } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ test_config }>`

***

## writeMemoryFile()

Write a memory file ([`PUT /v1/projects/{projectId}/memory/files`](/documentation/reference/api/v1/put-v1-projects-by-project-id-memory-files)).

```typescript
async function writeMemoryFile(init: { params: { path: { projectId: string; } }; body: { name, body } }): Promise<{ file }>
```

### Parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `init` | `{ params: { path: { projectId: string; } }; body: { name, body } }` | - | params fills the URL path and query string. body lists the JSON body fields; the REST API reference has their full schema. Also accepts fetch options such as headers and signal. |

### Returns

`Promise<{ file }>`
