-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathconstants.js
39 lines (35 loc) · 1.09 KB
/
constants.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
33
34
35
36
37
38
39
// Types of emails that a user may subscribe to
const notificationType = Object.freeze({
grantAssignment: 'GRANT_ASSIGNMENT',
grantInterest: 'GRANT_INTEREST',
grantDigest: 'GRANT_DIGEST',
grantFinderUpdates: 'GRANT_FINDER_UPDATES',
});
const emailSubscriptionStatus = Object.freeze({
subscribed: 'SUBSCRIBED',
unsubscribed: 'UNSUBSCRIBED',
});
const defaultSubscriptionPreference = Object.freeze(
Object.assign(
...Object.values(notificationType).map(
(k) => ({ [k]: emailSubscriptionStatus.subscribed }),
),
),
);
const tags = Object.freeze(
{
emailTypes: {
passcode: 'passcode',
grantAssignment: 'grant_assignment',
auditReport: 'audit_report',
treasuryReport: 'treasury_report',
welcome: 'welcome',
grantDigest: 'grant_digest',
treasuryReportError: 'treasury_report_error',
auditReportError: 'audit_report_error',
},
},
);
module.exports = {
notificationType, emailSubscriptionStatus, defaultSubscriptionPreference, tags,
};