1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "comparison": {
12 "baseline": [
13 {
14 "sku": "A-001",
15 "price": "29.00",
16 "stock": "12"
17 }
18 ],
19 "current": [
20 {
21 "sku": "A-001",
22 "price": "31.00",
23 "stock": "8"
24 }
25 ],
26 "keyField": "sku"
27 },
28 "rightsConfirmed": true
29};
30
31
32const run = await client.actor("autonome_bots/supplier-feed-change-checker").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42