Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Consts for LUIS entities.
const PARTY_SIZE_ENTITY = LUIS_ENTITIES.number;
const DATE_TIME_ENTITY = LUIS_ENTITIES.datetime;
const LOCATION_ENTITY = LUIS_ENTITIES.cafeLocation;
const CONFIRMATION_ENTITY = LUIS_ENTITIES.confirmationList;
const FOUR_WEEKS = '4';
const MAX_PARTY_SIZE = 10;
// Date constraints for reservations
/* Date for reservations must be:
- a date in this week .OR.
- a date in the next 4 weeks
*/
const reservationDateConstraints = [
creator.thisWeek,
creator.nextWeeksFromToday(FOUR_WEEKS)
];
// Time constraints for reservations
// Time for reservations must be daytime
const reservationTimeConstraints = [
creator.daytime
];
/**
* Reservation property class.
* - This is a self contained class that exposes a bunch of public methods to
* evaluate if we have a complete instance (all required properties filled in)
* - Generate reply text
* - based on missing properties
* - with all information that's already been captured