1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "personId": "p1",
14 "sourceCompany": "Beta",
15 "destinationCompany": "Acme",
16 "role": "Director AI",
17 "seniorityWeight": 12
18 },
19 {
20 "personId": "p2",
21 "sourceCompany": "Beta",
22 "destinationCompany": "Acme",
23 "role": "Engineer",
24 "seniorityWeight": 4
25 },
26 {
27 "personId": "p3",
28 "sourceCompany": "Gamma",
29 "destinationCompany": "Beta",
30 "role": "VP Sales",
31 "seniorityWeight": 12
32 }
33 ],
34 "previousItems": [
35 {
36 "personId": "p0",
37 "sourceCompany": "Beta",
38 "destinationCompany": "Acme",
39 "role": "Engineer",
40 "seniorityWeight": 4
41 }
42 ]
43};
44
45
46const run = await client.actor("quanmatrix/cross-company-talent-flow-intelligence").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56