260710_1
This commit is contained in:
@@ -14,6 +14,23 @@ export interface DashboardUser {
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface WorkflowStageState {
|
||||
stage_no: number;
|
||||
stage_key: string;
|
||||
state: "NOT_STARTED" | "IN_PROGRESS" | "COMPLETE" | "FAILED" | "STALE";
|
||||
progress_percent: number;
|
||||
params?: any | null;
|
||||
message?: string | null;
|
||||
started_at?: string | null;
|
||||
completed_at?: string | null;
|
||||
}
|
||||
|
||||
export interface WorkflowState {
|
||||
project_id: string;
|
||||
current_stage: number;
|
||||
stages: WorkflowStageState[];
|
||||
}
|
||||
|
||||
export interface ProjectItem {
|
||||
id: string;
|
||||
company_id?: number | null;
|
||||
@@ -27,6 +44,7 @@ export interface ProjectItem {
|
||||
owner_name?: string | null;
|
||||
workflow_stage: number;
|
||||
progress_percent: number;
|
||||
workflow_state?: WorkflowState;
|
||||
updated_at?: string | null;
|
||||
}
|
||||
|
||||
@@ -348,3 +366,9 @@ export function deleteProjectAutomation(automationId: number): Promise<unknown>
|
||||
export function executeProjectAutomation(automationId: number): Promise<unknown> {
|
||||
return request(`/dashboard/automations/${automationId}/execute`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function fetchProjectWorkflowState(projectId: string): Promise<WorkflowState> {
|
||||
return request(`/projects/${projectId}/workflow-state`, {
|
||||
method: "GET",
|
||||
}) as Promise<WorkflowState>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user