@voiceflow/alexa-types
Version:
Alexa service types
106 lines (105 loc) • 6.54 kB
JavaScript
import { VoiceflowConstants } from '@voiceflow/voiceflow-types';
import { Locale } from './base.js';
import { AmazonIntent } from './intents.js';
import { SlotType } from './slots.js';
export const AmazonToVoiceflowIntentMap = {
[]: VoiceflowConstants.IntentName.NO,
[]: VoiceflowConstants.IntentName.YES,
[]: VoiceflowConstants.IntentName.STOP,
[]: VoiceflowConstants.IntentName.NEXT,
[]: VoiceflowConstants.IntentName.HELP,
[]: VoiceflowConstants.IntentName.PAUSE,
[]: VoiceflowConstants.IntentName.CANCEL,
[]: VoiceflowConstants.IntentName.RESUME,
[]: VoiceflowConstants.IntentName.REPEAT,
[]: VoiceflowConstants.IntentName.NONE,
[]: VoiceflowConstants.IntentName.PREVIOUS,
[]: VoiceflowConstants.IntentName.START_OVER,
};
export const VoiceflowToAmazonIntentMap = {
[]: AmazonIntent.NO,
[]: AmazonIntent.YES,
[]: AmazonIntent.STOP,
[]: AmazonIntent.NEXT,
[]: AmazonIntent.HELP,
[]: AmazonIntent.PAUSE,
[]: AmazonIntent.CANCEL,
[]: AmazonIntent.RESUME,
[]: AmazonIntent.REPEAT,
[]: AmazonIntent.FALLBACK,
[]: AmazonIntent.PREVIOUS,
[]: AmazonIntent.START_OVER,
};
export const AmazonToVoiceflowSlotMap = {
[]: VoiceflowConstants.SlotType.DATETIME,
[]: VoiceflowConstants.SlotType.DATETIME,
[]: VoiceflowConstants.SlotType.NUMBER,
[]: VoiceflowConstants.SlotType.NUMBER,
[]: VoiceflowConstants.SlotType.PHONENUMBER,
[]: VoiceflowConstants.SlotType.NAME,
[]: VoiceflowConstants.SlotType.NAME,
[]: VoiceflowConstants.SlotType.NAME,
[]: VoiceflowConstants.SlotType.NAME,
[]: VoiceflowConstants.SlotType.NAME,
[]: VoiceflowConstants.SlotType.ORDINAL,
};
export const VoiceflowToAmazonSlotMap = {
[]: SlotType.DATE,
[]: SlotType.NUMBER,
[]: SlotType.PHONENUMBER,
[]: SlotType.FIRSTNAME,
[]: SlotType.ORDINAL,
};
export const AmazonToVoiceflowLocaleMap = {
[]: VoiceflowConstants.Locale.EN_US,
[]: VoiceflowConstants.Locale.EN_US,
[]: VoiceflowConstants.Locale.EN_US,
[]: VoiceflowConstants.Locale.EN_US,
[]: VoiceflowConstants.Locale.EN_US,
[]: VoiceflowConstants.Locale.FR_CA,
[]: VoiceflowConstants.Locale.ES_ES,
[]: VoiceflowConstants.Locale.FR_FR,
[]: VoiceflowConstants.Locale.DE_DE,
[]: VoiceflowConstants.Locale.IT_IT,
[]: VoiceflowConstants.Locale.JA_JP,
[]: VoiceflowConstants.Locale.ES_ES,
[]: VoiceflowConstants.Locale.ES_MX,
[]: VoiceflowConstants.Locale.PT_BR,
[]: VoiceflowConstants.Locale.HI_IN,
};
export const VoiceflowToAmazonLocaleMap = {
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.DE_DE,
[]: Locale.EN_US,
[]: Locale.ES_ES,
[]: Locale.ES_MX,
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.FR_CA,
[]: Locale.FR_FR,
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.HI_IN,
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.IT_IT,
[]: Locale.JA_JP,
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.PT_BR,
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
[]: Locale.EN_US, // FIXME: Unsupported language by Alexa
};