1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "connectDescriptor": {
12 "key": "com.example.connect-app",
13 "name": "Example Connect App",
14 "baseUrl": "https://app.example.com",
15 "authentication": {
16 "type": "jwt"
17 },
18 "lifecycle": {
19 "installed": "/installed"
20 },
21 "enableLicensing": true,
22 "scopes": [
23 "READ"
24 ],
25 "modules": {
26 "jiraIssueGlances": [
27 {
28 "key": "example-glance",
29 "name": {
30 "value": "Example"
31 },
32 "url": "/glance"
33 }
34 ]
35 }
36 },
37 "forgeManifestYaml": `app:
38 id: ari:cloud:ecosystem::app/00000000-0000-0000-0000-000000000000
39 connect:
40 key: com.example.connect-app
41 remote: connect-backend
42 licensing:
43 enabled: true
44modules:
45 jira:issueContext:
46 - key: example-context
47 resource: main
48resources:
49 - key: main
50 path: static/app/build
51remotes:
52 - key: connect-backend
53 baseUrl: https://app.example.com
54 operations:
55 - compute
56permissions:
57 scopes: []`,
58 "releaseGate": {
59 "enabled": false,
60 "failOnSeverity": "high",
61 "failOnNotAvailableModule": true
62 }
63};
64
65
66const run = await client.actor("venturesome_lunar/atlassian-app-change-impact-auditor").call(input);
67
68
69console.log('Results from dataset');
70console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
71const { items } = await client.dataset(run.defaultDatasetId).listItems();
72items.forEach((item) => {
73 console.dir(item);
74});
75
76