1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "validate-manifest",
12 "artifact": {
13 "name": "sample.json",
14 "mime_type": "application/json",
15 "size_bytes": 31,
16 "sha256": "368e9cedfb85b8fd10ff45e37e3440379fa6c53d6cd109cb0de2b8dcb1a1a5c8",
17 "entries": []
18 },
19 "validation_contract": {
20 "allowed_mime_types": [
21 "application/json"
22 ],
23 "max_bytes": 10485760
24 },
25 "idempotency_key": "store-manifest-example-0001"
26};
27
28
29const run = await client.actor("analytical_gratefulness/artifactguard-agent").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39