@voiceflow/base-types
Version:
Voiceflow base project types
60 lines • 2.15 kB
TypeScript
import { NodeType } from '../../node';
/** Similar to {@link NodeType}, but for runtime logging */
export declare enum StepLogKind {
TEXT = "text",
SPEAK = "speak",
AUDIO = "audio",
VISUALS = "visuals",
CARD = "card",
CAROUSEL = "carousel",
BUTTONS = "buttons",
CHOICE = "choice",
CAPTURE = "capture",
PROMPT = "prompt",
INTENT = "intent",
CONDITION = "condition",
SET = "set",
RANDOM = "random",
FLOW = "flow",
EXIT = "exit",
API = "api",
/** @deprecated Will be removed soon */
GOOGLE_SHEETS = "google_sheets",
CUSTOM_CODE = "custom_code",
CUSTOM_ACTION = "custom_action",
START = "start"
}
export declare enum GlobalLogKind {
CONVERSATION_START = "conversation_start",
NLU_INTENT_RESOLVED = "nlu.intent_resolved"
}
declare const NODE_TYPE_TO_STEP_LOG_KIND: {
readonly text: StepLogKind.TEXT;
readonly speak: StepLogKind.SPEAK;
readonly start: StepLogKind.START;
readonly card: StepLogKind.CARD;
readonly carousel: StepLogKind.CAROUSEL;
readonly buttons: StepLogKind.BUTTONS;
readonly set: StepLogKind.SET;
readonly setV2: StepLogKind.SET;
readonly if: StepLogKind.CONDITION;
readonly ifV2: StepLogKind.CONDITION;
readonly random: StepLogKind.RANDOM;
readonly capture: StepLogKind.CAPTURE;
readonly captureV2: StepLogKind.CAPTURE;
readonly api: StepLogKind.API;
/** @deprecated */
readonly google_sheets: StepLogKind.GOOGLE_SHEETS;
readonly intent: StepLogKind.INTENT;
readonly code: StepLogKind.CUSTOM_CODE;
readonly exit: StepLogKind.EXIT;
readonly prompt: StepLogKind.PROMPT;
readonly visual: StepLogKind.VISUALS;
};
type MappableNodeType = keyof typeof NODE_TYPE_TO_STEP_LOG_KIND;
type NonMappableNodeType = Exclude<NodeType, MappableNodeType>;
export declare function nodeTypeToStepLogKind(nodeType: MappableNodeType): StepLogKind;
export declare function nodeTypeToStepLogKind(nodeType: NonMappableNodeType): undefined;
export declare function nodeTypeToStepLogKind(nodeType: NodeType): StepLogKind | undefined;
export {};
//# sourceMappingURL=kinds.d.ts.map