UNPKG

@voiceflow/google-types

Version:
27 lines (26 loc) 1.13 kB
import { VoiceflowConstants } from '@voiceflow/voiceflow-types'; import { defaultChatMemberPlatformData, defaultChatPlatformData } from './chat/index.js'; import { defaultVoiceMemberPlatformData, defaultVoicePlatformData } from './voice/index.js'; export * from './base.js'; export * from './chat/index.js'; export * from './voice/index.js'; export const defaultPlatformData = (type, platformData) => { switch (type) { case VoiceflowConstants.ProjectType.CHAT: return defaultChatPlatformData(platformData); case VoiceflowConstants.ProjectType.VOICE: return defaultVoicePlatformData(platformData); default: throw new Error(`Unknown project type: ${type}`); } }; export const defaultMemberPlatformData = (type, platformData) => { switch (type) { case VoiceflowConstants.ProjectType.CHAT: return defaultChatMemberPlatformData(platformData); case VoiceflowConstants.ProjectType.VOICE: return defaultVoiceMemberPlatformData(platformData); default: throw new Error(`Unknown project type: ${type}`); } };