feat: workflow run status & time
This commit is contained in:
@@ -13,6 +13,9 @@ export interface WorkflowModel extends BaseModel {
|
||||
content?: WorkflowNode;
|
||||
draft?: WorkflowNode;
|
||||
hasDraft?: boolean;
|
||||
lastRunId?: string;
|
||||
lastRunStatus?: string;
|
||||
lastRunTime?: string;
|
||||
}
|
||||
|
||||
export const WORKFLOW_TRIGGERS = Object.freeze({
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
export interface WorkflowRunModel extends BaseModel {
|
||||
workflowId: string;
|
||||
status: string;
|
||||
trigger: string;
|
||||
startedAt: ISO8601String;
|
||||
endedAt: ISO8601String;
|
||||
logs: WorkflowRunLog[];
|
||||
error: string;
|
||||
succeeded: boolean;
|
||||
}
|
||||
|
||||
export type WorkflowRunLog = {
|
||||
@@ -18,3 +21,12 @@ export type WorkflowRunLogOutput = {
|
||||
content: string;
|
||||
error: string;
|
||||
};
|
||||
|
||||
export const WORKFLOW_RUN_STATUSES = Object.freeze({
|
||||
PENDING: "pending",
|
||||
RUNNING: "running",
|
||||
SUCCEEDED: "succeeded",
|
||||
FAILED: "failed",
|
||||
} as const);
|
||||
|
||||
export type WorkflorRunStatusType = (typeof WORKFLOW_RUN_STATUSES)[keyof typeof WORKFLOW_RUN_STATUSES];
|
||||
|
||||
Reference in New Issue
Block a user