1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "bomCsv": `sku,unit,quantity
12001-MOT,pcs,2
13002-SEN,pcs,10
14003-VLV,pcs,4`,
15 "quotesCsv": `supplier,sku,unit,currency,unit_price,moq
16Alfa,001-MOT,pcs,EUR,120,1
17Alfa,002-SEN,pcs,EUR,15,20
18Alfa,003-VLV,pcs,EUR,40,1
19Beta,001-MOT,pcs,EUR,110,1
20Beta,002-SEN,pcs,EUR,14,1
21Gamma,001-MOT,pcs,EUR,130,1
22Gamma,002-SEN,pcs,EUR,16,1
23Gamma,003-VLV,pcs,EUR,39,1`
24};
25
26
27const run = await client.actor("whyte2990/midas-quotecheck").call(input);
28
29
30console.log('Results from dataset');
31console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
32const { items } = await client.dataset(run.defaultDatasetId).listItems();
33items.forEach((item) => {
34 console.dir(item);
35});
36
37