ReferenceSDKClient
Reviews
SDK reference for reviews — Human-in-the-loop reviews that pause graph execution until approved or rejected.
Human-in-the-loop reviews that pause graph execution until approved or rejected.
listReviews
List pending reviews. Reviews are created when nodes with review config pause execution.
GET
Usage:
const result = await swirls.client.reviews.listReviews({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
status | "pending" | "approved" | "rejected" | No | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |
getReview
Get a review by ID with execution details
GET
Usage:
const result = await swirls.client.reviews.getReview({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
nodeExecutionId | string | |
graphExecutionId | string | |
nodeId | string | |
status | string | |
title | string | |
description | string | null | |
content | string | |
reviewedBy | string | null | |
reviewedAt | unknown | null | |
output | unknown | |
waitTokenId | string | null | |
createdAt | unknown | |
orgId | string | null | |
userId | string | |
nodeExecution | object | |
node | object | |
graphExecution | object |
approveReview
Approve a review to continue graph execution
POST
Usage:
const result = await swirls.client.reviews.approveReview({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
formData | unknown | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
nodeExecutionId | string | |
graphExecutionId | string | |
nodeId | string | |
status | string | |
title | string | |
description | string | null | |
content | string | |
reviewedBy | string | null | |
reviewedAt | unknown | null | |
output | unknown | |
waitTokenId | string | null | |
createdAt | unknown | |
orgId | string | null | |
userId | string |
rejectReview
Reject a review to stop graph execution
POST
Usage:
const result = await swirls.client.reviews.rejectReview({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
reason | string | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
nodeExecutionId | string | |
graphExecutionId | string | |
nodeId | string | |
status | string | |
title | string | |
description | string | null | |
content | string | |
reviewedBy | string | null | |
reviewedAt | unknown | null | |
output | unknown | |
waitTokenId | string | null | |
createdAt | unknown | |
orgId | string | null | |
userId | string |