import type { AnyTask, RetrieveRunResult } from "@trigger.dev/core/v3"; import type { CommonTriggerHookOptions } from "../utils/trigger-swr.js"; /** * Custom hook to retrieve and manage the state of a run by its ID. * * @template TTask - The type of the task associated with the run. * @param {string} runId - The unique identifier of the run to retrieve. * @param {CommonTriggerHookOptions} [options] - Optional configuration for the hook's behavior. * @returns {Object} An object containing the run data, error, loading state, validation state, and error state. * @returns {RetrieveRunResult | undefined} run - The retrieved run data. * @returns {Error | undefined} error - The error object if an error occurred. * @returns {boolean} isLoading - Indicates if the run data is currently being loaded. * @returns {boolean} isValidating - Indicates if the run data is currently being validated. * @returns {boolean} isError - Indicates if an error occurred during the retrieval of the run data. */ export declare function useRun(runId: string, options?: CommonTriggerHookOptions): { run: RetrieveRunResult | undefined; error: Error | undefined; isLoading: boolean; isValidating: boolean; isError: boolean; };