UNPKG

@voiceflow/google-types

Version:
84 lines (83 loc) 2.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_INTENTS = exports.BUILT_IN_INTENTS = exports.isGoogleIntent = exports.GoogleStatusIntent = exports.GoogleIntent = void 0; var GoogleIntent; (function (GoogleIntent) { GoogleIntent["NO"] = "actions.intent.NO"; GoogleIntent["YES"] = "actions.intent.YES"; GoogleIntent["REPEAT"] = "actions.intent.REPEAT"; })(GoogleIntent || (exports.GoogleIntent = GoogleIntent = {})); var GoogleStatusIntent; (function (GoogleStatusIntent) { GoogleStatusIntent["MEDIA_PAUSE"] = "actions.intent.MEDIA_STATUS_PAUSED"; GoogleStatusIntent["MEDIA_STOP"] = "actions.intent.MEDIA_STATUS_STOPPED"; // eslint-disable-next-line no-secrets/no-secrets GoogleStatusIntent["MEDIA_FINISH"] = "actions.intent.MEDIA_STATUS_FINISHED"; GoogleStatusIntent["MEDIA_FAIL"] = "actions.intent.MEDIA_STATUS_FAILED"; })(GoogleStatusIntent || (exports.GoogleStatusIntent = GoogleStatusIntent = {})); const IntentSet = new Set(Object.values(GoogleIntent)); // check that intent is in the GoogleIntent enum, returning boolean const isGoogleIntent = (intent) => IntentSet.has(intent); exports.isGoogleIntent = isGoogleIntent; exports.BUILT_IN_INTENTS = [ { name: GoogleIntent.YES, slots: [], }, { name: GoogleIntent.NO, slots: [], }, { name: GoogleIntent.REPEAT, slots: [], }, { name: GoogleStatusIntent.MEDIA_PAUSE, slots: [], }, { name: GoogleStatusIntent.MEDIA_STOP, slots: [], }, { name: GoogleStatusIntent.MEDIA_FINISH, slots: [], }, { name: GoogleStatusIntent.MEDIA_FAIL, slots: [], }, ]; exports.DEFAULT_INTENTS = { // English (AU,CA,US,UK,IN) en: { defaults: [ { name: GoogleIntent.YES, samples: ['yes', 'yeah', 'yeah sure', 'yea', 'ok', 'okay', 'yup', 'ya', 'sure'], keep: ['yes'], }, { name: GoogleIntent.NO, samples: ['no', 'never mind', 'not yet', "no don't bother", 'nope', 'nay', 'nah', 'no way', 'negative'], }, ], builtIns: [ { name: GoogleIntent.REPEAT, samples: [ 'repeat', 'repeat please', 'please repeat', 'again', 'say again', 'can you repeat that', 'tell me what that was again', 'what did you say', 'say that one more time', ], }, ], }, };