UNPKG

@voiceflow/base-types

Version:

Voiceflow base project types

95 lines 2.92 kB
import type { AnyRecord } from '@voiceflow/common'; import type { NodeType } from '../../node/constants.js'; import type { BaseCommand, BaseNote, Intent, Slot, Variable } from '../base/index.js'; import type { KnowledgeBase } from '../project/knowledgeBase.js'; import type { CanvasTemplate } from './canvasTemplate.js'; import type { Domain } from './domain.js'; import type { NLUUnclassifiedData } from './nluUnclassifiedData.js'; import type { Prototype } from './prototype.js'; export * from './canvasTemplate.js'; export * from './domain.js'; export * from './nluUnclassifiedData.js'; export * from './prototype.js'; export interface PrototypeVariableState { id: string; name: string; startFrom: { diagramID: string; stepID: string; } | null; variables: Record<string, string | number | boolean | null>; } export interface PlatformData<Settings extends AnyRecord = AnyRecord, Publishing extends AnyRecord = AnyRecord> { slots: Slot[]; intents: Intent[]; settings: Settings; publishing: Publishing; } export interface DiagramResponse { blockID: string; diagramID: string; blockName: string; blockColor: string; diagramName: string; blockContent: string; } export declare enum FolderItemType { FOLDER = "FOLDER", DIAGRAM = "DIAGRAM" } export interface FolderItem { type: FolderItemType; sourceID: string; } export interface Folder { id: string; name: string; items: FolderItem[]; } export interface NLUModel { modelID: string; } export type DefaultStepColors = Partial<Record<NodeType, string>>; export interface CustomBlock { key: string; name: string; parameters: Record<string, { id: string; name: string; }>; body: string; stop: boolean; paths: string[]; defaultPath: number; } export interface Model<_PlatformData extends PlatformData, Command extends BaseCommand = BaseCommand, Locale extends string = string, SurveyContextExt extends AnyRecord = AnyRecord> { _id: string; _version?: number; creatorID: number; projectID: string; rootDiagramID: string; name: string; notes?: Record<string, BaseNote>; domains?: Domain[]; folders?: Record<string, Folder>; variables: Variable[]; prototype?: Prototype<Command, Locale, SurveyContextExt>; components?: FolderItem[]; platformData: _PlatformData; canvasTemplates?: CanvasTemplate[]; templateDiagramID?: string; defaultStepColors?: DefaultStepColors; model?: NLUModel; manualSave: boolean; autoSaveFromRestore: boolean; customBlocks?: Record<string, CustomBlock>; knowledgeBase?: KnowledgeBase; /** * @deprecated replaced with domains */ topics?: FolderItem[]; nluUnclassifiedData?: NLUUnclassifiedData[]; updatedAt?: string; publishedAt?: string | null; } //# sourceMappingURL=index.d.ts.map