@voiceflow/base-types
Version:
Voiceflow base project types
50 lines • 1.75 kB
TypeScript
import type { CarouselLayout } from '../node/carousel.js';
import type { AIModelParams } from '../utils/ai.js';
import type { Nullable } from '@voiceflow/common';
import type { Utils } from '../node/index.js';
export declare enum RepeatType {
OFF = "OFF",
ALL = "ALL",
DIALOG = "DIALOG"
}
export declare enum SessionType {
RESUME = "resume",
RESTART = "restart"
}
export interface RestartSession {
type: SessionType.RESTART;
}
export interface ResumeSession<Prompt = unknown> {
type: SessionType.RESUME;
resume: Nullable<Prompt>;
follow: Nullable<Prompt>;
}
export type Session<Prompt = unknown> = RestartSession | ResumeSession<Prompt>;
export declare enum GlobalNoMatchType {
STATIC = "static",
GENERATIVE = "generative"
}
export interface Settings<Prompt = unknown> {
error: Nullable<Prompt>;
repeat: RepeatType;
session: Session<Prompt>;
defaultCanvasNodeVisibility: Nullable<Utils.CanvasNodeVisibility>;
defaultCarouselLayout?: Nullable<CarouselLayout>;
defaultVoice?: Nullable<string>;
deepgramASR?: any;
globalNoReply?: {
prompt?: Nullable<Prompt> | undefined;
delay?: number | undefined;
enabled?: boolean;
};
globalNoMatch?: {
type: GlobalNoMatchType.STATIC;
prompt: Nullable<Prompt> | undefined;
} | {
type: GlobalNoMatchType.GENERATIVE;
prompt: AIModelParams;
};
intentConfidence?: number;
}
export declare const defaultSettings: <Prompt>({ error, repeat, session, defaultVoice, defaultCanvasNodeVisibility, defaultCarouselLayout, globalNoMatch, globalNoReply, deepgramASR, intentConfidence, }?: Partial<Settings<Prompt>>) => Settings<Prompt>;
//# sourceMappingURL=settings.d.ts.map