habit-export-center
Version:
habit's front end solution to export list
24 lines (23 loc) • 716 B
TypeScript
import { ExportEntry, ExportRequest, ExportResponse } from '../types/export-types';
/**
* Hook to fetch and manage exports list
*/
export declare function useListExports(userKey: string, listEndpoint?: string, options?: {
refetchInterval?: number;
enabled?: boolean;
}): {
data: ExportEntry[];
isLoading: boolean;
error: Error;
refetch: () => Promise<void>;
};
/**
* Hook to create a new export
*/
export declare function useCreateExport(userKey: string, appId?: string, createEndpoint?: string, options?: {
onSuccess?: (data: ExportResponse) => void;
onError?: (error: Error) => void;
}): {
mutate: (req: ExportRequest) => Promise<ExportResponse>;
isPending: boolean;
};