1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "vendors": [
12 {
13 "id": "stripe",
14 "name": "Stripe",
15 "criticality": "high",
16 "owner": "Procurement",
17 "tags": [
18 "payments",
19 "renewal-q3",
20 "strategic vendor"
21 ],
22 "urlPacks": {
23 "pricing": [
24 {
25 "id": "stripe-pricing",
26 "name": "Stripe Pricing",
27 "url": "https://stripe.com/pricing",
28 "includePatterns": [
29 "pricing",
30 "annual",
31 "enterprise",
32 "billing"
33 ],
34 "excludePatterns": [
35 "cookie",
36 "sign in"
37 ]
38 }
39 ],
40 "terms": [
41 {
42 "id": "stripe-terms",
43 "name": "Stripe Services Agreement",
44 "url": "https://stripe.com/legal/ssa",
45 "includePatterns": [
46 "fees",
47 "renewal",
48 "termination",
49 "liability"
50 ],
51 "excludePatterns": [
52 "cookie",
53 "sign in"
54 ]
55 }
56 ],
57 "privacy": [
58 {
59 "id": "stripe-privacy",
60 "name": "Stripe Privacy Policy",
61 "url": "https://stripe.com/privacy",
62 "includePatterns": [
63 "processing",
64 "data",
65 "retention",
66 "subprocessor",
67 "transfer"
68 ],
69 "excludePatterns": [
70 "cookie",
71 "sign in"
72 ]
73 }
74 ],
75 "security": [
76 {
77 "id": "stripe-security",
78 "name": "Stripe Security",
79 "url": "https://stripe.com/docs/security/stripe",
80 "includePatterns": [
81 "security",
82 "incident",
83 "encryption",
84 "compliance"
85 ],
86 "excludePatterns": [
87 "cookie",
88 "sign in"
89 ]
90 }
91 ],
92 "status": [
93 {
94 "id": "stripe-status",
95 "name": "Stripe Status",
96 "url": "https://status.stripe.com/",
97 "includePatterns": [
98 "incident",
99 "degraded",
100 "maintenance",
101 "operational"
102 ],
103 "excludePatterns": [
104 "cookie"
105 ]
106 }
107 ],
108 "changelog": [
109 {
110 "id": "stripe-changelog",
111 "name": "Stripe Changelog",
112 "url": "https://docs.stripe.com/changelog",
113 "includePatterns": [
114 "billing",
115 "pricing",
116 "deprecated",
117 "breaking"
118 ],
119 "excludePatterns": [
120 "cookie",
121 "sign in"
122 ]
123 }
124 ]
125 }
126 }
127 ]
128};
129
130
131const run = await client.actor("taroyamada/vendor-change-monitor").call(input);
132
133
134console.log('Results from dataset');
135console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
136const { items } = await client.dataset(run.defaultDatasetId).listItems();
137items.forEach((item) => {
138 console.dir(item);
139});
140
141