1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "documents": [
12 {
13 "id": "legacy-file",
14 "product_type": "networked packaging machine",
15 "text": "Technical File — Automatic Packaging Machine Model PK-200. Contents: 1. General description of the machinery and intended use. 2. Risk assessment carried out per EN ISO 12100, hazards identified and reduced. 3. Guards and interlocks for moving parts. 4. Emergency stop function per EN ISO 13850. 5. Control system safety, performance level PL d per EN ISO 13849. 6. Overall drawing and circuit diagrams. 7. Harmonised standards applied. 8. EU Declaration of Conformity. 9. Instructions for use. The machine connects to the plant network for remote diagnostics and receives firmware over the network."
16 },
17 {
18 "id": "modern-file",
19 "product_type": "collaborative robot",
20 "text": "Technical documentation for collaborative robot CR-10. Includes: general description and intended use; documented iterative risk assessment; guarding strategy; emergency stop; functional safety of the control system (SIL 2); cybersecurity — protection against corruption of safety software and secure remote access; secure firmware update mechanism; human-robot collaborative operation safety per ISO/TS 15066; harmonised standards applied; test reports; EU Declaration of Conformity; conformity assessment via Notified Body; instructions for use."
21 }
22 ]
23};
24
25
26const run = await client.actor("jadelike_zine/eu-machinery-techfile-gap-checker").call(input);
27
28
29console.log('Results from dataset');
30console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
31const { items } = await client.dataset(run.defaultDatasetId).listItems();
32items.forEach((item) => {
33 console.dir(item);
34});
35
36