-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
34 lines (24 loc) · 868 Bytes
/
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
const authentication = require('./authentication');
const middleware = require('./middleware');
const NewLevelTrigger = require('./triggers/new_level');
const NewLessonTrigger = require('./triggers/new_lesson');
const NewReviewTrigger = require('./triggers/new_review');
const App = {
version: require('./package.json').version, // eslint-disable-line global-require
platformVersion: require('zapier-platform-core').version, // eslint-disable-line global-require
authentication,
beforeRequest: [
middleware.includeBearerToken,
middleware.includeWanikaniRevision,
],
afterResponse: [middleware.checkForErrors],
resources: {},
triggers: {
[NewLevelTrigger.key]: NewLevelTrigger,
[NewLessonTrigger.key]: NewLessonTrigger,
[NewReviewTrigger.key]: NewReviewTrigger,
},
searches: {},
creates: {},
};
module.exports = App;