mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 22:29:24 +00:00
23 lines
897 B
TypeScript
23 lines
897 B
TypeScript
![]() |
import { useToolOperation } from '../shared/useToolOperation';
|
||
|
import { useCallback } from 'react';
|
||
|
|
||
|
interface AutomateParameters {
|
||
|
automationConfig?: any;
|
||
|
}
|
||
|
|
||
|
export function useAutomateOperation() {
|
||
|
const customProcessor = useCallback(async (params: AutomateParameters, files: File[]) => {
|
||
|
// For now, this is a placeholder - the automation execution will be implemented later
|
||
|
// This function would send the automation config to the backend pipeline endpoint
|
||
|
console.log('Automation execution not yet implemented', { params, files });
|
||
|
throw new Error('Automation execution not yet implemented');
|
||
|
}, []);
|
||
|
|
||
|
return useToolOperation<AutomateParameters>({
|
||
|
operationType: 'automate',
|
||
|
endpoint: '/api/v1/pipeline/handleData',
|
||
|
buildFormData: () => new FormData(), // Placeholder, not used with customProcessor
|
||
|
customProcessor,
|
||
|
filePrefix: 'automated_'
|
||
|
});
|
||
|
}
|