ThreadSteps API
Thread Steps API
import { CodeBoltClient } from '@codebolt/clientsdk';
const client = new CodeBoltClient();
Quick Reference
| Method | Description |
|---|---|
bulkDelete | Bulk delete steps |
bulkUpdate | Bulk update steps |
complete | Complete a step |
create | Create a new step |
delete | Delete a step |
execute | Execute a step |
fail | Mark a step as failed |
getActiveSteps | Get active steps for a thread |
getById | Get a step by internal ID |
getByThreadId | Get steps by thread ID |
getNextExecutable | Get next executable step for a thread |
getStatistics | Get step statistics for a thread |
healthCheck | Health check for thread step service |
list | List all steps |
search | Search for a step by stepId |
skip | Skip a step |
update | Update a step |
updateStatus | Update step status |
Methods
bulkDelete
client.threadSteps.bulkDelete(data: BulkDeleteStepsRequest): Promise<void>
Bulk delete steps
| Parameter | Type | Required | Description |
|---|---|---|---|
data | BulkDeleteStepsRequest | Yes |
Returns: Promise<void>
bulkUpdate
client.threadSteps.bulkUpdate(data: BulkUpdateStepsRequest): Promise<void>
Bulk update steps
| Parameter | Type | Required | Description |
|---|---|---|---|
data | BulkUpdateStepsRequest | Yes |
Returns: Promise<void>
complete
client.threadSteps.complete(stepId: string, data?: CompleteStepRequest): Promise<ThreadStep>
Complete a step
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | |
data | CompleteStepRequest | No |
Returns: Promise<ThreadStep>
create
client.threadSteps.create(data: CreateStepRequest): Promise<ThreadStep>
Create a new step
| Parameter | Type | Required | Description |
|---|---|---|---|
data | CreateStepRequest | Yes |
Returns: Promise<ThreadStep>
delete
client.threadSteps.delete(stepId: string): Promise<void>
Delete a step
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes |
Returns: Promise<void>
execute
client.threadSteps.execute(stepId: string, data?: ExecuteStepRequest): Promise<ThreadStep>
Execute a step
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | |
data | ExecuteStepRequest | No |
Returns: Promise<ThreadStep>
fail
client.threadSteps.fail(stepId: string, data?: FailStepRequest): Promise<ThreadStep>
Mark a step as failed
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | |
data | FailStepRequest | No |
Returns: Promise<ThreadStep>
getActiveSteps
client.threadSteps.getActiveSteps(threadId: string): Promise<ThreadStep[]>
Get active steps for a thread
| Parameter | Type | Required | Description |
|---|---|---|---|
threadId | string | Yes |
Returns: Promise<ThreadStep[]>
getById
client.threadSteps.getById(id: string): Promise<ThreadStep>
Get a step by internal ID
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Returns: Promise<ThreadStep>
getByThreadId
client.threadSteps.getByThreadId(threadId: string): Promise<ThreadStep[]>
Get steps by thread ID
| Parameter | Type | Required | Description |
|---|---|---|---|
threadId | string | Yes |
Returns: Promise<ThreadStep[]>
getNextExecutable
client.threadSteps.getNextExecutable(threadId: string): Promise<ThreadStep | null>
Get next executable step for a thread
| Parameter | Type | Required | Description |
|---|---|---|---|
threadId | string | Yes |
Returns: Promise<ThreadStep | null>
getStatistics
client.threadSteps.getStatistics(threadId: string): Promise<StepStatistics>
Get step statistics for a thread
| Parameter | Type | Required | Description |
|---|---|---|---|
threadId | string | Yes |
Returns: Promise<StepStatistics>
healthCheck
client.threadSteps.healthCheck(): Promise<HealthCheckResponse>
Health check for thread step service
No parameters.
Returns: Promise<HealthCheckResponse>
list
client.threadSteps.list(params?: StepListParams): Promise<ThreadStep[]>
List all steps
| Parameter | Type | Required | Description |
|---|---|---|---|
params | StepListParams | No |
Returns: Promise<ThreadStep[]>
search
client.threadSteps.search(stepId: string): Promise<ThreadStep>
Search for a step by stepId
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes |
Returns: Promise<ThreadStep>
skip
client.threadSteps.skip(stepId: string, data?: SkipStepRequest): Promise<ThreadStep>
Skip a step
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | |
data | SkipStepRequest | No |
Returns: Promise<ThreadStep>
update
client.threadSteps.update(stepId: string, data: UpdateStepRequest): Promise<ThreadStep>
Update a step
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | |
data | UpdateStepRequest | Yes |
Returns: Promise<ThreadStep>
updateStatus
client.threadSteps.updateStatus(stepId: string, data: UpdateStepStatusRequest): Promise<ThreadStep>
Update step status
| Parameter | Type | Required | Description |
|---|---|---|---|
stepId | string | Yes | |
data | UpdateStepStatusRequest | Yes |
Returns: Promise<ThreadStep>