// This file was auto-generated by Fern from our API Definition.

import type * as Vapi from "../index.js";

export interface ConversationNode {
    /**
     * This is the model for the node.
     *
     * This overrides `workflow.model`.
     */
    model?: Vapi.ConversationNodeModel | undefined;
    /**
     * This is the transcriber for the node.
     *
     * This overrides `workflow.transcriber`.
     */
    transcriber?: Vapi.ConversationNodeTranscriber | undefined;
    /**
     * This is the voice for the node.
     *
     * This overrides `workflow.voice`.
     */
    voice?: Vapi.ConversationNodeVoice | undefined;
    /**
     * These are the tools that the conversation node can use during the call. To use existing tools, use `toolIds`.
     *
     * Both `tools` and `toolIds` can be used together.
     */
    tools?: Vapi.ConversationNodeToolsItem[] | undefined;
    /**
     * These are the tools that the conversation node can use during the call. To use transient tools, use `tools`.
     *
     * Both `tools` and `toolIds` can be used together.
     */
    toolIds?: string[] | undefined;
    prompt?: string | undefined;
    /** This is the plan for the global node. */
    globalNodePlan?: Vapi.GlobalNodePlan | undefined;
    /**
     * This is the plan that controls the variable extraction from the user's responses.
     *
     * Usage:
     * Use `schema` to specify what you want to extract from the user's responses.
     * ```json
     * {
     *   "schema": {
     *     "type": "object",
     *     "properties": {
     *       "user": {
     *         "type": "object",
     *         "properties": {
     *           "name": {
     *             "type": "string"
     *           },
     *           "age": {
     *             "type": "number"
     *           }
     *         }
     *       }
     *     }
     *   }
     * }
     * ```
     *
     * This will be extracted as `{{ user.name }}` and `{{ user.age }}` respectively.
     *
     * (Optional) Use `aliases` to create new variables.
     *
     * ```json
     * {
     *   "aliases": [
     *     {
     *       "key": "userAge",
     *       "value": "{{user.age}}"
     *     },
     *     {
     *       "key": "userName",
     *       "value": "{{user.name}}"
     *     }
     *   ]
     * }
     * ```
     *
     * This will be extracted as `{{ userAge }}` and `{{ userName }}` respectively.
     *
     * Note: The `schema` field is required for Conversation nodes if you want to extract variables from the user's responses. `aliases` is just a convenience.
     */
    variableExtractionPlan?: Vapi.VariableExtractionPlan | undefined;
    name: string;
    /** This is whether or not the node is the start of the workflow. */
    isStart?: boolean | undefined;
    /** This is for metadata you want to store on the task. */
    metadata?: Record<string, unknown> | undefined;
}
