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

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

export interface WorkflowUserEditable {
    nodes: Vapi.WorkflowUserEditableNodesItem[];
    /**
     * This is the model for the workflow.
     *
     * This can be overridden at node level using `nodes[n].model`.
     */
    model?: Vapi.WorkflowUserEditableModel | undefined;
    /**
     * This is the transcriber for the workflow.
     *
     * This can be overridden at node level using `nodes[n].transcriber`.
     */
    transcriber?: Vapi.WorkflowUserEditableTranscriber | undefined;
    /**
     * This is the voice for the workflow.
     *
     * This can be overridden at node level using `nodes[n].voice`.
     */
    voice?: Vapi.WorkflowUserEditableVoice | undefined;
    /**
     * This is the plan for observability of workflow's calls.
     *
     * Currently, only Langfuse is supported.
     */
    observabilityPlan?: Vapi.LangfuseObservabilityPlan | undefined;
    /**
     * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
     * You can also provide a custom sound by providing a URL to an audio file.
     */
    backgroundSound?: Vapi.WorkflowUserEditableBackgroundSound | undefined;
    /** This is a set of actions that will be performed on certain events. */
    hooks?: Vapi.WorkflowUserEditableHooksItem[] | undefined;
    /** These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
    credentials?: Vapi.WorkflowUserEditableCredentialsItem[] | undefined;
    /** This is the voicemail detection plan for the workflow. */
    voicemailDetection?: Vapi.WorkflowUserEditableVoicemailDetection | undefined;
    /**
     * This is the maximum duration of the call in seconds.
     *
     * After this duration, the call will automatically end.
     *
     * Default is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.
     */
    maxDurationSeconds?: number | undefined;
    name: string;
    edges: Vapi.Edge[];
    globalPrompt?: string | undefined;
    /**
     * This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
     *
     * The order of precedence is:
     *
     * 1. tool.server
     * 2. workflow.server / assistant.server
     * 3. phoneNumber.server
     * 4. org.server
     */
    server?: Vapi.Server | undefined;
    /** This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings. */
    compliancePlan?: Vapi.CompliancePlan | undefined;
    /** This is the plan for analysis of workflow's calls. Stored in `call.analysis`. */
    analysisPlan?: Vapi.AnalysisPlan | undefined;
    /** This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`. */
    artifactPlan?: Vapi.ArtifactPlan | undefined;
    /**
     * This is the plan for when the workflow nodes should start talking.
     *
     * You should configure this if you're running into these issues:
     * - The assistant is too slow to start talking after the customer is done speaking.
     * - The assistant is too fast to start talking after the customer is done speaking.
     * - The assistant is so fast that it's actually interrupting the customer.
     */
    startSpeakingPlan?: Vapi.StartSpeakingPlan | undefined;
    /**
     * This is the plan for when workflow nodes should stop talking on customer interruption.
     *
     * You should configure this if you're running into these issues:
     * - The assistant is too slow to recognize customer's interruption.
     * - The assistant is too fast to recognize customer's interruption.
     * - The assistant is getting interrupted by phrases that are just acknowledgments.
     * - The assistant is getting interrupted by background noises.
     * - The assistant is not properly stopping -- it starts talking right after getting interrupted.
     */
    stopSpeakingPlan?: Vapi.StopSpeakingPlan | undefined;
    /**
     * This is the plan for real-time monitoring of the workflow's calls.
     *
     * Usage:
     * - To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.
     * - To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.
     */
    monitorPlan?: Vapi.MonitorPlan | undefined;
    /**
     * This enables filtering of noise and background speech while the user is talking.
     *
     * Features:
     * - Smart denoising using Krisp
     * - Fourier denoising
     *
     * Both can be used together. Order of precedence:
     * - Smart denoising
     * - Fourier denoising
     */
    backgroundSpeechDenoisingPlan?: Vapi.BackgroundSpeechDenoisingPlan | undefined;
    /** These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
    credentialIds?: string[] | undefined;
    /** This is the plan for keypad input handling during workflow calls. */
    keypadInputPlan?: Vapi.KeypadInputPlan | undefined;
    /**
     * This is the message that the assistant will say if the call is forwarded to voicemail.
     *
     * If unspecified, it will hang up.
     */
    voicemailMessage?: string | undefined;
}
