• Processes an outline request to generate structured JSON data based on a specified outline schema. Delegates to an internal context-isolated function to ensure clean execution.

    Type Parameters

    • Data extends unknown = any

      The type of the outline data, extending IOutlineData.

    • Param extends unknown = any

      The type of the input param, extending IOutlineParam.

    Parameters

    • outlineName: string

      The unique name of the outline schema to process.

    • Optionalparam: any

      The input param to process, defaults to an empty object.

    Returns Promise<IOutlineResult<Data, Param>>

    A promise resolving to the outline result, containing the processed data, history, and validation status.

    // Example usage
    const result = await json<"MyOutline", { query: string }>("MyOutline", { query: "example" });
    console.log(result.isValid, result.data); // Logs validation status and data