Workflow Types
Types for workflow stages and use case workflow status.
WorkflowStageStep
Workflow stage step enumeration for use case progression.
Enum Values
| Value | Description |
|---|---|
assessment | - |
evidence_collection | - |
clear | - |
rejected | - |
from credoai import WorkflowStageStep
value = WorkflowStageStep.ASSESSMENT
WorkflowStageType
Workflow stage type enumeration.
Enum Values
| Value | Description |
|---|---|
start | - |
intermediate | - |
end | - |
from credoai import WorkflowStageType
value = WorkflowStageType.START
WorkflowStageCreate
Schema for creating a workflow stage.
Note: Only intermediate stages can be created via the API. Start and end stages are system-managed.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | str | ✓ | - |
description | Any | - | |
assessment_required | bool | - | |
evidence_collection_required | bool | - | |
parent_id | str | ✓ | ID of the parent stage (new stage will be inserted after this) |
Example
from credoai import WorkflowStageCreate
obj = WorkflowStageCreate(
name="example",
parent_id="example",
)
WorkflowStageResponse
Schema for a workflow stage response.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
name | str | ✓ | - |
description | Any | - | |
type | WorkflowStageType | ✓ | - |
assessment_required | bool | - | |
evidence_collection_required | bool | - | |
parent_id | Any | - | |
child_id | Any | - |
Example
from credoai import WorkflowStageResponse
obj = WorkflowStageResponse(
id="example",
name="example",
type=None,
)
WorkflowStageUpdate
Schema for updating a workflow stage.
Note: Stage type cannot be changed after creation. Start and end stages cannot be modified.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | Any | - | |
description | Any | - | |
assessment_required | Any | - | |
evidence_collection_required | Any | - |
Example
from credoai import WorkflowStageUpdate
obj = WorkflowStageUpdate(
)
WorkflowStageCreateRequest
Request wrapper for WorkflowStageCreate with validation and JSON:API support. Combines the WorkflowStageCreate data model with client request functionality, providing automatic validation and JSON:API format conversion for API requests.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | str | ✓ | - |
description | ForwardRef('Optional[Any]') | - | |
assessment_required | ForwardRef('Optional[bool]') | Example: False | |
evidence_collection_required | ForwardRef('Optional[bool]') | Example: False | |
parent_id | str | ✓ | ID of the parent stage (new stage will be inserted after this) |
Example
from credoai import WorkflowStageCreateRequest
obj = WorkflowStageCreateRequest(
name="example",
parent_id="example",
)
WorkflowStageResponseWrapper
Response wrapper for WorkflowStageResponse with metadata and validation. Extends ClientResponse to provide type-safe access to WorkflowStageResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('WorkflowStageResponse') | ✓ | Validated response data |
Example
from credoai import WorkflowStageResponseWrapper
obj = WorkflowStageResponseWrapper(
status_code=123,
data=None,
)