UNPKG

@voiceflow/voiceflow-types

Version:

Voiceflow 'voiceflow' project types

24 lines 1.3 kB
import { ProjectType } from '../constants'; import type { ChatMemberPlatformData, ChatPlatformData, ChatProject } from './chat'; import type { VoiceMemberPlatformData, VoicePlatformData, VoiceProject } from './voice'; export * from './chat'; export * from './voice'; export type SupportedProjectType = ProjectType.CHAT | ProjectType.VOICE; export interface PlatformDataPerType { [ProjectType.CHAT]: ChatPlatformData; [ProjectType.VOICE]: VoicePlatformData; } export interface ProjectPerType { [ProjectType.CHAT]: ChatProject; [ProjectType.VOICE]: VoiceProject; } export interface MemberPlatformDataPerType { [ProjectType.CHAT]: ChatMemberPlatformData; [ProjectType.VOICE]: VoiceMemberPlatformData; } export type Project = ProjectPerType[SupportedProjectType]; export type PlatformData = PlatformDataPerType[SupportedProjectType]; export type MemberPlatformData = MemberPlatformDataPerType[SupportedProjectType]; export declare const defaultPlatformData: <T extends SupportedProjectType>(type: T, platformData: Partial<PlatformDataPerType[T]>) => PlatformDataPerType[T]; export declare const defaultMemberPlatformData: <T extends SupportedProjectType>(type: T, platformData: Partial<MemberPlatformDataPerType[T]>) => MemberPlatformDataPerType[T]; //# sourceMappingURL=index.d.ts.map