-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
85 lines (47 loc) · 2.58 KB
/
index.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
const {onRequest} = require("firebase-functions/v2/https");
const { getToken, validateUsersEmailPhone } = require('./utils/validation');
const { getFilteredParticipants, getParticipants, identifyParticipant } = require('./utils/submission');
const { submitParticipantsData, updateParticipantData, getBigQueryData } = require('./utils/sites');
const { getParticipantNotification, sendScheduledNotifications } = require('./utils/notifications');
const { connectApp } = require('./utils/connectApp');
const { biospecimenAPIs } = require('./utils/biospecimen');
const { incentiveCompleted, eligibleForIncentive } = require('./utils/incentive');
const { dashboard } = require('./utils/dashboard');
const { importToBigQuery, firestoreExport, exportNotificationsToBucket, importNotificationsToBigquery } = require('./utils/events');
const { participantDataCleanup } = require('./utils/participantDataCleanup');
const { webhook } = require('./utils/webhook');
const { heartbeat } = require('./utils/heartbeat');
const { physicalActivity } = require('./utils/reports');
// API End-Points for Sites
exports.incentiveCompleted = incentiveCompleted;
exports.participantsEligibleForIncentive = eligibleForIncentive;
exports.getParticipantToken = getToken;
exports.validateUsersEmailPhone = validateUsersEmailPhone;
exports.getFilteredParticipants = getFilteredParticipants;
exports.getParticipants = getParticipants;
exports.identifyParticipant = identifyParticipant;
exports.submitParticipantsData = submitParticipantsData;
exports.updateParticipantData = updateParticipantData;
exports.getBigQueryData = getBigQueryData;
exports.getParticipantNotification = getParticipantNotification;
// End-Point for Site Manager Dashboard
exports.dashboard = dashboard;
// End-Point for Connect PWA
exports.app = connectApp;
// End-Point for Biospecimen Dashboard
exports.biospecimen = biospecimenAPIs;
// End-Point for Scheduled Notifications Handler
exports.sendScheduledNotificationsGen2 = onRequest(sendScheduledNotifications);
// End-Points for Exporting Firestore to Big Query
exports.importToBigQuery = importToBigQuery;
exports.scheduleFirestoreDataExport = firestoreExport;
exports.exportNotificationsToBucket = exportNotificationsToBucket;
exports.importNotificationsToBigquery = importNotificationsToBigquery;
// End-Points for Participant Data Cleaning
exports.participantDataCleanup = participantDataCleanup;
// End-Points for Event Webhook
exports.webhook = webhook;
// End-Points for Public Heartbeat
exports.heartbeat = heartbeat;
// End-Points for Return of Information
exports.physicalActivity = physicalActivity;