-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconstants.js
More file actions
50 lines (45 loc) · 1.13 KB
/
constants.js
File metadata and controls
50 lines (45 loc) · 1.13 KB
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
import google from 'googleapis';
const OAuth2 = google.auth.OAuth2;
const messageConfirmation = (confirmation, cancellation) => ({
"text": "Is this correct?",
"type": "message",
"attachments": [
{
"text": "Is this correct?",
"fallback": "Correct details?",
"callback_id": "meeting_confirmation",
"color": "#3AA3E3",
"attachment_type": "default",
"actions": [
{
"name": "yes",
"text": "Yes",
"type": "button",
"value": confirmation
},
{
"name": "no",
"text": "No",
"type": "button",
"value": cancellation
}
]
}
]
});
const getGoogleAuth = () => {
return new OAuth2(
process.env.GOOGLE_CLIENT_ID,
process.env.GOOGLE_CLIENT_SECRET,
// 'http://localhost:3000/connect/callback'
'http://glacial-shelf-50059.herokuapp.com/connect/callback'
);
};
const getQueryParams = (msg, sessionId) => ({
v: 20150910,
lang: 'en',
timezone: '2017-07-18T15:32:48-0700',
query: msg,
sessionId: sessionId
});
export { messageConfirmation, getQueryParams, getGoogleAuth };