import api from './client'; export interface DefaultFlow { flow_type: string; display_name: string; activepieces_flow_id: string | null; is_modified: boolean; is_enabled: boolean; } export interface RestoreFlowResponse { success: boolean; flow_type: string; message: string; } export interface RestoreAllResponse { success: boolean; restored: string[]; failed: string[]; } export const getDefaultFlows = async (): Promise => { const response = await api.get('/activepieces/default-flows/'); return response.data.flows; }; export const restoreFlow = async (flowType: string): Promise => { const response = await api.post(`/activepieces/default-flows/${flowType}/restore/`); return response.data; }; export const restoreAllFlows = async (): Promise => { const response = await api.post('/activepieces/default-flows/restore-all/'); return response.data; };