automation fixes
This commit is contained in:
@@ -47,6 +47,13 @@ export interface RunHistoryItem {
|
||||
current_stage: number;
|
||||
}
|
||||
|
||||
export interface PipelineStage {
|
||||
number: number;
|
||||
name: string;
|
||||
pending: number;
|
||||
type: 'AI' | 'Local' | 'Manual';
|
||||
}
|
||||
|
||||
function buildUrl(endpoint: string, params?: Record<string, any>): string {
|
||||
let url = `/v1/automation${endpoint}`;
|
||||
if (params) {
|
||||
@@ -141,4 +148,11 @@ export const automationService = {
|
||||
}> => {
|
||||
return fetchAPI(buildUrl('/estimate/', { site_id: siteId }));
|
||||
},
|
||||
|
||||
/**
|
||||
* Get pipeline overview with pending counts for all stages
|
||||
*/
|
||||
getPipelineOverview: async (siteId: number): Promise<{ stages: PipelineStage[] }> => {
|
||||
return fetchAPI(buildUrl('/pipeline_overview/', { site_id: siteId }));
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user