import type { UseApiClientOptions } from "./useApiClient.js"; /** * Base interface for task trigger instances. * * @template TOutput - The type of the output */ export interface WaitTokenInstance { /** Function to complete the waitpoint with an output */ complete: (output: TOutput) => void; /** Whether the waitpoint is currently being completed */ isLoading: boolean; /** Whether the waitpoint has been completed */ isCompleted: boolean; /** Any error that occurred during completion */ error?: Error; /** Whether the waitpoint is ready to be completed */ isReady: boolean; } /** * Hook to complete a waitpoint and manage its completion state. * * @template TOutput - The type of the output * @param {string} waitpointId - The identifier of the waitpoint to complete * @returns {WaitTokenInstance} An object containing the complete function, loading state, isCompleted, and any errors * * @example * ```ts * import type { myTask } from './path/to/task'; * const { complete, isLoading, isCompleted, error } = useWaitToken('waitpoint-id'); * * // Complete the waitpoint with an output * complete({ foo: 'bar' }); * ``` */ export declare function useWaitToken(waitpointId?: string, options?: UseApiClientOptions): WaitTokenInstance;