trash models added, first attempt for remainign issues
This commit is contained in:
@@ -78,6 +78,12 @@ export interface ProcessingState {
|
||||
remaining_count: number;
|
||||
}
|
||||
|
||||
export interface CurrentProcessingResponse {
|
||||
state: ProcessingState | null;
|
||||
total_credits_used: number;
|
||||
current_stage: number;
|
||||
}
|
||||
|
||||
// NEW: Types for unified run_progress endpoint
|
||||
export interface StageProgress {
|
||||
number: number;
|
||||
@@ -257,11 +263,12 @@ export const automationService = {
|
||||
|
||||
/**
|
||||
* Get current processing state for active automation run
|
||||
* Returns state with total_credits_used for real-time credits tracking
|
||||
*/
|
||||
getCurrentProcessing: async (
|
||||
siteId: number,
|
||||
runId: string
|
||||
): Promise<ProcessingState | null> => {
|
||||
): Promise<CurrentProcessingResponse | null> => {
|
||||
const response = await fetchAPI(
|
||||
buildUrl('/current_processing/', { site_id: siteId, run_id: runId })
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user