-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodels.js
32 lines (31 loc) · 1.1 KB
/
models.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
let cal = require("ical-booking");
module.exports = {
icalmodels: cal.models,
interval: {
MINUTE: 0,
HOURLY: 1,
DAILY: 2,
WEEKLY: 3,
MONTHLY: 4
},
settings: function (i) {
return {
"defaultEmail": i.defaultEmail,
"smartlockId": i.smartlockId,
"smtp": {
"service": (i.smtp != null) ? i.smtp.service : null,
"auth": {
"user": (i.smtp != null) ? i.smtp.auth.user : null,
"pass": (i.smtp != null) ? i.smtp.auth.pass : null
}
},
"nukiApiKey": i.nukiApiKey,
"interval": i.interval,
"hoursBeforeBooking": (i.hoursBeforeBooking == null) ? 36 : i.hoursBeforeBooking,
"onlyNotifyOnChanges": (i.onlyNotifyOnChanges == null) ? false : i.onlyNotifyOnChanges,
"checkIn": (i.checkIn == null) ? 15 * 60 : i.checkIn,
"checkOut": (i.checkOut == null) ? 11 * 60 : i.checkOut,
"remoteAllowed": (i.remoteAllowed == null) ? false : i.remoteAllowed,
}
}
}