Files
old-tellall/backend/config/constants.js
2018-01-24 13:11:35 +01:00

43 lines
925 B
JavaScript

const constants = {};
constants.amazonResultCodes = {
OK:200,
ACCEPTED:202,
BAD_REQUEST:400,
UNAUTHORIZED:401,
NOT_FOUND:404,
CONFLICT:409,
PAYLOAD_TOO_LARGE:413
}
constants.apiResultCodes = {
GENERIC_ERROR : -1,
OK:0,
AMAZON_ERROR:1, //amazon api works, but error is some of the amazonResultCodes
AMAZON_FAIL:2, //amazon api doesn't work
DATABASE_ERROR:3,
NO_SKILL:4,
INCONSISTENT_STATE:5,
}
constants.HTTPResultCodes = {
INTERNAL_SERVER_ERROR : 500,
}
constants.SKILL_ID_LENGTH = 24;
constants.voiceResponseStrings = {
QUESTION_NOT_FOUND : 'Sorry, I didnt understand',
GENERIC_CONTINUE : 'Say something to continue',
DIDNT_ASK_ANYTHING : 'There was no question to answer to',
}
//Timing is given in [ms]
constants.voiceResponseTimings = {
PAUSE_BETWEEN_QUESTIONS : 650,
PAUSE_AFTER_WELCOME_MESSAGE : 650,
}
module.exports = constants;