UNPKG

@voiceflow/alexa-types

Version:
109 lines (108 loc) 9.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceflowToAmazonLocaleMap = exports.AmazonToVoiceflowLocaleMap = exports.VoiceflowToAmazonSlotMap = exports.AmazonToVoiceflowSlotMap = exports.VoiceflowToAmazonIntentMap = exports.AmazonToVoiceflowIntentMap = void 0; const voiceflow_types_1 = require("@voiceflow/voiceflow-types"); const base_1 = require("./base"); const intents_1 = require("./intents"); const slots_1 = require("./slots"); exports.AmazonToVoiceflowIntentMap = { [intents_1.AmazonIntent.NO]: voiceflow_types_1.VoiceflowConstants.IntentName.NO, [intents_1.AmazonIntent.YES]: voiceflow_types_1.VoiceflowConstants.IntentName.YES, [intents_1.AmazonIntent.STOP]: voiceflow_types_1.VoiceflowConstants.IntentName.STOP, [intents_1.AmazonIntent.NEXT]: voiceflow_types_1.VoiceflowConstants.IntentName.NEXT, [intents_1.AmazonIntent.HELP]: voiceflow_types_1.VoiceflowConstants.IntentName.HELP, [intents_1.AmazonIntent.PAUSE]: voiceflow_types_1.VoiceflowConstants.IntentName.PAUSE, [intents_1.AmazonIntent.CANCEL]: voiceflow_types_1.VoiceflowConstants.IntentName.CANCEL, [intents_1.AmazonIntent.RESUME]: voiceflow_types_1.VoiceflowConstants.IntentName.RESUME, [intents_1.AmazonIntent.REPEAT]: voiceflow_types_1.VoiceflowConstants.IntentName.REPEAT, [intents_1.AmazonIntent.FALLBACK]: voiceflow_types_1.VoiceflowConstants.IntentName.NONE, [intents_1.AmazonIntent.PREVIOUS]: voiceflow_types_1.VoiceflowConstants.IntentName.PREVIOUS, [intents_1.AmazonIntent.START_OVER]: voiceflow_types_1.VoiceflowConstants.IntentName.START_OVER, }; exports.VoiceflowToAmazonIntentMap = { [voiceflow_types_1.VoiceflowConstants.IntentName.NO]: intents_1.AmazonIntent.NO, [voiceflow_types_1.VoiceflowConstants.IntentName.YES]: intents_1.AmazonIntent.YES, [voiceflow_types_1.VoiceflowConstants.IntentName.STOP]: intents_1.AmazonIntent.STOP, [voiceflow_types_1.VoiceflowConstants.IntentName.NEXT]: intents_1.AmazonIntent.NEXT, [voiceflow_types_1.VoiceflowConstants.IntentName.HELP]: intents_1.AmazonIntent.HELP, [voiceflow_types_1.VoiceflowConstants.IntentName.PAUSE]: intents_1.AmazonIntent.PAUSE, [voiceflow_types_1.VoiceflowConstants.IntentName.CANCEL]: intents_1.AmazonIntent.CANCEL, [voiceflow_types_1.VoiceflowConstants.IntentName.RESUME]: intents_1.AmazonIntent.RESUME, [voiceflow_types_1.VoiceflowConstants.IntentName.REPEAT]: intents_1.AmazonIntent.REPEAT, [voiceflow_types_1.VoiceflowConstants.IntentName.NONE]: intents_1.AmazonIntent.FALLBACK, [voiceflow_types_1.VoiceflowConstants.IntentName.PREVIOUS]: intents_1.AmazonIntent.PREVIOUS, [voiceflow_types_1.VoiceflowConstants.IntentName.START_OVER]: intents_1.AmazonIntent.START_OVER, }; exports.AmazonToVoiceflowSlotMap = { [slots_1.SlotType.TIME]: voiceflow_types_1.VoiceflowConstants.SlotType.DATETIME, [slots_1.SlotType.DATE]: voiceflow_types_1.VoiceflowConstants.SlotType.DATETIME, [slots_1.SlotType.FOUR_DIGIT_NUMBER]: voiceflow_types_1.VoiceflowConstants.SlotType.NUMBER, [slots_1.SlotType.NUMBER]: voiceflow_types_1.VoiceflowConstants.SlotType.NUMBER, [slots_1.SlotType.PHONENUMBER]: voiceflow_types_1.VoiceflowConstants.SlotType.PHONENUMBER, [slots_1.SlotType.PERSON]: voiceflow_types_1.VoiceflowConstants.SlotType.NAME, [slots_1.SlotType.DE_FIRST_NAME]: voiceflow_types_1.VoiceflowConstants.SlotType.NAME, [slots_1.SlotType.GB_FIRST_NAME]: voiceflow_types_1.VoiceflowConstants.SlotType.NAME, [slots_1.SlotType.US_FIRST_NAME]: voiceflow_types_1.VoiceflowConstants.SlotType.NAME, [slots_1.SlotType.FIRSTNAME]: voiceflow_types_1.VoiceflowConstants.SlotType.NAME, [slots_1.SlotType.ORDINAL]: voiceflow_types_1.VoiceflowConstants.SlotType.ORDINAL, }; exports.VoiceflowToAmazonSlotMap = { [voiceflow_types_1.VoiceflowConstants.SlotType.DATETIME]: slots_1.SlotType.DATE, [voiceflow_types_1.VoiceflowConstants.SlotType.NUMBER]: slots_1.SlotType.NUMBER, [voiceflow_types_1.VoiceflowConstants.SlotType.PHONENUMBER]: slots_1.SlotType.PHONENUMBER, [voiceflow_types_1.VoiceflowConstants.SlotType.NAME]: slots_1.SlotType.FIRSTNAME, [voiceflow_types_1.VoiceflowConstants.SlotType.ORDINAL]: slots_1.SlotType.ORDINAL, }; exports.AmazonToVoiceflowLocaleMap = { [base_1.Locale.EN_US]: voiceflow_types_1.VoiceflowConstants.Locale.EN_US, [base_1.Locale.EN_AU]: voiceflow_types_1.VoiceflowConstants.Locale.EN_US, [base_1.Locale.EN_CA]: voiceflow_types_1.VoiceflowConstants.Locale.EN_US, [base_1.Locale.EN_IN]: voiceflow_types_1.VoiceflowConstants.Locale.EN_US, [base_1.Locale.EN_GB]: voiceflow_types_1.VoiceflowConstants.Locale.EN_US, [base_1.Locale.FR_CA]: voiceflow_types_1.VoiceflowConstants.Locale.FR_CA, [base_1.Locale.ES_US]: voiceflow_types_1.VoiceflowConstants.Locale.ES_ES, [base_1.Locale.FR_FR]: voiceflow_types_1.VoiceflowConstants.Locale.FR_FR, [base_1.Locale.DE_DE]: voiceflow_types_1.VoiceflowConstants.Locale.DE_DE, [base_1.Locale.IT_IT]: voiceflow_types_1.VoiceflowConstants.Locale.IT_IT, [base_1.Locale.JA_JP]: voiceflow_types_1.VoiceflowConstants.Locale.JA_JP, [base_1.Locale.ES_ES]: voiceflow_types_1.VoiceflowConstants.Locale.ES_ES, [base_1.Locale.ES_MX]: voiceflow_types_1.VoiceflowConstants.Locale.ES_MX, [base_1.Locale.PT_BR]: voiceflow_types_1.VoiceflowConstants.Locale.PT_BR, [base_1.Locale.HI_IN]: voiceflow_types_1.VoiceflowConstants.Locale.HI_IN, }; exports.VoiceflowToAmazonLocaleMap = { [voiceflow_types_1.VoiceflowConstants.Locale.AR_AR]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.BG_BG]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.CA_ES]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.CS_CZ]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.DA_DK]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.DE_DE]: base_1.Locale.DE_DE, [voiceflow_types_1.VoiceflowConstants.Locale.EN_US]: base_1.Locale.EN_US, [voiceflow_types_1.VoiceflowConstants.Locale.ES_ES]: base_1.Locale.ES_ES, [voiceflow_types_1.VoiceflowConstants.Locale.ES_MX]: base_1.Locale.ES_MX, [voiceflow_types_1.VoiceflowConstants.Locale.ET_EE]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.FR_CA]: base_1.Locale.FR_CA, [voiceflow_types_1.VoiceflowConstants.Locale.FR_FR]: base_1.Locale.FR_FR, [voiceflow_types_1.VoiceflowConstants.Locale.GU_IN]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.HE_IL]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.HI_IN]: base_1.Locale.HI_IN, [voiceflow_types_1.VoiceflowConstants.Locale.HU_HU]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.IT_IT]: base_1.Locale.IT_IT, [voiceflow_types_1.VoiceflowConstants.Locale.JA_JP]: base_1.Locale.JA_JP, [voiceflow_types_1.VoiceflowConstants.Locale.KO_KR]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.MR_IN]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.NL_BE]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.NL_NL]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.PL_PL]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.PT_BR]: base_1.Locale.PT_BR, [voiceflow_types_1.VoiceflowConstants.Locale.PT_PT]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.RO_RO]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.RU_RU]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.TA_IN]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.TE_IN]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.TR_TR]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.UK_UA]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.VI_VN]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.ZH_CN]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa [voiceflow_types_1.VoiceflowConstants.Locale.ZH_TW]: base_1.Locale.EN_US, // FIXME: Unsupported language by Alexa };