1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "weekEnding": "2026-10-10",
12 "rows": [
13 {
14 "id": "ROW-1",
15 "workerId": "W-01",
16 "projectId": "P-01",
17 "classification": "Electrician",
18 "days": [
19 {
20 "regular": "8.00",
21 "overtime": "0.00"
22 },
23 {
24 "regular": "8.00",
25 "overtime": "0.00"
26 },
27 {
28 "regular": "8.00",
29 "overtime": "0.00"
30 },
31 {
32 "regular": "8.00",
33 "overtime": "0.00"
34 },
35 {
36 "regular": "8.00",
37 "overtime": "0.00"
38 },
39 {
40 "regular": "0.00",
41 "overtime": "0.00"
42 },
43 {
44 "regular": "0.00",
45 "overtime": "0.00"
46 }
47 ],
48 "regularRate": "30.00",
49 "overtimeRate": "45.00",
50 "cashFringeRate": "5.00",
51 "reportedHours": "39.00",
52 "reportedProjectGross": "1390.00"
53 }
54 ],
55 "workers": [
56 {
57 "workerId": "W-01",
58 "allJobsGross": "1400.00",
59 "deductions": [
60 {
61 "id": "TAX",
62 "amount": "200.00"
63 }
64 ],
65 "reportedDeductions": "200.00",
66 "reportedNet": "1200.00"
67 }
68 ]
69};
70
71
72const run = await client.actor("wheresprada/wh347-payroll-arithmetic-check").call(input);
73
74
75console.log('Results from dataset');
76console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
77const { items } = await client.dataset(run.defaultDatasetId).listItems();
78items.forEach((item) => {
79 console.dir(item);
80});
81
82