-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.js
More file actions
75 lines (65 loc) · 2.88 KB
/
Copy pathindex.js
File metadata and controls
75 lines (65 loc) · 2.88 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
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
const zapierCore = require('zapier-platform-core');
const apifyApp = require('./package.json');
const authentication = require('./src/authentication');
const { parseDataApiObject, setApifyRequestHeaders, validateApiResponse } = require('./src/request_helpers');
const taskRunFinishedTrigger = require('./src/triggers/task_run_finished');
const tasksTrigger = require('./src/triggers/tasks');
const actorRunFinishedTrigger = require('./src/triggers/actor_run_finished');
const actorsTrigger = require('./src/triggers/actors');
const actorsWithStoreTrigger = require('./src/triggers/actors_with_store');
const getActorAdditionalFieldsTest = require('./src/triggers/actor_additional_fields');
const getActorDatasetOutputFieldsTest = require('./src/triggers/actor_dataset_additional_output_fields');
const taskRunCreate = require('./src/creates/task_run');
const actorRunCreate = require('./src/creates/actor_run');
const scrapeSingleUrlCreate = require('./src/creates/scrape_single_url');
const setValueCreate = require('./src/creates/set_value');
const taskLastRunSearch = require('./src/searches/task_last_run');
const actorLastRunSearch = require('./src/searches/actor_last_run');
const getValueSearch = require('./src/searches/get_value');
const fetchItemsSearch = require('./src/searches/fetch_items');
/**
* Apify APP definition
*/
const App = {
version: apifyApp.version,
platformVersion: zapierCore.version,
authentication,
beforeRequest: [
setApifyRequestHeaders,
],
afterResponse: [
parseDataApiObject,
validateApiResponse,
],
// If you want to define optional resources to simplify creation of triggers, searches, creates - do that here!
resources: {
},
// If you want your trigger to show up, you better include it here!
triggers: {
[taskRunFinishedTrigger.key]: taskRunFinishedTrigger,
[tasksTrigger.key]: tasksTrigger,
[actorRunFinishedTrigger.key]: actorRunFinishedTrigger,
[actorsTrigger.key]: actorsTrigger,
[getActorAdditionalFieldsTest.key]: getActorAdditionalFieldsTest,
[getActorDatasetOutputFieldsTest.key]: getActorDatasetOutputFieldsTest,
[actorsWithStoreTrigger.key]: actorsWithStoreTrigger,
},
hydrators: {
...getValueSearch.hydrators,
},
// If you want your searches to show up, you better include it here!
searches: {
[taskLastRunSearch.key]: taskLastRunSearch,
[actorLastRunSearch.key]: actorLastRunSearch,
[getValueSearch.perform.key]: getValueSearch.perform,
[fetchItemsSearch.key]: fetchItemsSearch,
},
// If you want your creates to show up, you better include it here!
creates: {
[taskRunCreate.key]: taskRunCreate,
[actorRunCreate.key]: actorRunCreate,
[setValueCreate.key]: setValueCreate,
[scrapeSingleUrlCreate.key]: scrapeSingleUrlCreate,
},
};
module.exports = App;