2018-01-12 01:56:17 +01:00
|
|
|
const constants = {};
|
|
|
|
|
|
|
|
|
|
constants.amazonResultCodes = {
|
2018-01-16 16:56:56 +01:00
|
|
|
OK:200,
|
|
|
|
|
ACCEPTED:202,
|
|
|
|
|
BAD_REQUEST:400,
|
|
|
|
|
UNAUTHORIZED:401,
|
|
|
|
|
NOT_FOUND:404,
|
|
|
|
|
CONFLICT:409,
|
|
|
|
|
PAYLOAD_TOO_LARGE:413
|
2018-01-12 01:56:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constants.apiResultCodes = {
|
2018-01-16 16:56:56 +01:00
|
|
|
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,
|
2018-01-19 22:54:50 +01:00
|
|
|
INCONSISTENT_STATE:5,
|
2018-01-12 01:56:17 +01:00
|
|
|
}
|
|
|
|
|
|
2018-01-16 16:56:56 +01:00
|
|
|
constants.HTTPResultCodes = {
|
|
|
|
|
INTERNAL_SERVER_ERROR : 500,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constants.SKILL_ID_LENGTH = 24;
|
2018-01-12 01:56:17 +01:00
|
|
|
|
2018-01-18 22:07:23 +01:00
|
|
|
constants.voiceResponseStrings = {
|
2018-01-19 16:29:47 +01:00
|
|
|
QUESTION_NOT_FOUND : 'Sorry, I didnt understand',
|
2018-01-18 22:07:23 +01:00
|
|
|
GENERIC_CONTINUE : 'Would you like to continue'
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-23 01:40:19 +01:00
|
|
|
//Timing is given in [ms]
|
2018-01-23 01:41:34 +01:00
|
|
|
constants.voiceResponseTimings = {
|
2018-01-23 01:40:19 +01:00
|
|
|
PAUSE_BETWEEN_QUESTIONS : 650,
|
|
|
|
|
PAUSE_AFTER_WELCOME_MESSAGE : 650,
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-12 01:56:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = constants;
|