@oursprivacy/platform-sdk 1.45.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +25 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +25 -13
- package/client.d.ts.map +1 -1
- package/client.js +14 -2
- package/client.js.map +1 -1
- package/client.mjs +14 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/attribution.d.mts +9 -1
- package/resources/attribution.d.mts.map +1 -1
- package/resources/attribution.d.ts +9 -1
- package/resources/attribution.d.ts.map +1 -1
- package/resources/consent-settings.d.mts +48 -0
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +48 -0
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/conversion-journey-summaries.d.mts +38 -0
- package/resources/conversion-journey-summaries.d.mts.map +1 -1
- package/resources/conversion-journey-summaries.d.ts +38 -0
- package/resources/conversion-journey-summaries.d.ts.map +1 -1
- package/resources/conversion-journey-summaries.js +38 -0
- package/resources/conversion-journey-summaries.js.map +1 -1
- package/resources/conversion-journey-summaries.mjs +38 -0
- package/resources/conversion-journey-summaries.mjs.map +1 -1
- package/resources/data-governance.d.mts +5 -5
- package/resources/data-governance.d.mts.map +1 -1
- package/resources/data-governance.d.ts +5 -5
- package/resources/data-governance.d.ts.map +1 -1
- package/resources/destinations.d.mts +7 -27
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +7 -27
- package/resources/destinations.d.ts.map +1 -1
- package/resources/experiment-variants.d.mts +4 -2
- package/resources/experiment-variants.d.mts.map +1 -1
- package/resources/experiment-variants.d.ts +4 -2
- package/resources/experiment-variants.d.ts.map +1 -1
- package/resources/experiments.d.mts +677 -102
- package/resources/experiments.d.mts.map +1 -1
- package/resources/experiments.d.ts +677 -102
- package/resources/experiments.d.ts.map +1 -1
- package/resources/experiments.js +32 -2
- package/resources/experiments.js.map +1 -1
- package/resources/experiments.mjs +32 -2
- package/resources/experiments.mjs.map +1 -1
- package/resources/funnels.d.mts +172 -22
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +172 -22
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +10 -2
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +10 -2
- package/resources/funnels.mjs.map +1 -1
- package/resources/heatmap-pages.d.mts +42 -14
- package/resources/heatmap-pages.d.mts.map +1 -1
- package/resources/heatmap-pages.d.ts +42 -14
- package/resources/heatmap-pages.d.ts.map +1 -1
- package/resources/heatmap-pages.js +11 -7
- package/resources/heatmap-pages.js.map +1 -1
- package/resources/heatmap-pages.mjs +11 -7
- package/resources/heatmap-pages.mjs.map +1 -1
- package/resources/index.d.mts +10 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mappings.d.mts +2 -2
- package/resources/mappings.d.mts.map +1 -1
- package/resources/mappings.d.ts +2 -2
- package/resources/mappings.d.ts.map +1 -1
- package/resources/personalization-properties.d.mts +547 -0
- package/resources/personalization-properties.d.mts.map +1 -0
- package/resources/personalization-properties.d.ts +547 -0
- package/resources/personalization-properties.d.ts.map +1 -0
- package/resources/personalization-properties.js +100 -0
- package/resources/personalization-properties.js.map +1 -0
- package/resources/personalization-properties.mjs +96 -0
- package/resources/personalization-properties.mjs.map +1 -0
- package/resources/session-replays.d.mts +91 -0
- package/resources/session-replays.d.mts.map +1 -0
- package/resources/session-replays.d.ts +91 -0
- package/resources/session-replays.d.ts.map +1 -0
- package/resources/session-replays.js +24 -0
- package/resources/session-replays.js.map +1 -0
- package/resources/session-replays.mjs +20 -0
- package/resources/session-replays.mjs.map +1 -0
- package/resources/short-links.d.mts +138 -37
- package/resources/short-links.d.mts.map +1 -1
- package/resources/short-links.d.ts +138 -37
- package/resources/short-links.d.ts.map +1 -1
- package/resources/short-links.js +27 -12
- package/resources/short-links.js.map +1 -1
- package/resources/short-links.mjs +27 -12
- package/resources/short-links.mjs.map +1 -1
- package/resources/sources.d.mts +10 -6
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +10 -6
- package/resources/sources.d.ts.map +1 -1
- package/resources/tag-manager-tags.d.mts +2 -2
- package/resources/tag-manager-tags.d.ts +2 -2
- package/resources/tag-manager-tags.js +2 -2
- package/resources/tag-manager-tags.mjs +2 -2
- package/resources/tag-manager-triggers.d.mts +18 -1
- package/resources/tag-manager-triggers.d.mts.map +1 -1
- package/resources/tag-manager-triggers.d.ts +18 -1
- package/resources/tag-manager-triggers.d.ts.map +1 -1
- package/resources/translation-widgets.d.mts +62 -0
- package/resources/translation-widgets.d.mts.map +1 -0
- package/resources/translation-widgets.d.ts +62 -0
- package/resources/translation-widgets.d.ts.map +1 -0
- package/resources/translation-widgets.js +18 -0
- package/resources/translation-widgets.js.map +1 -0
- package/resources/translation-widgets.mjs +14 -0
- package/resources/translation-widgets.mjs.map +1 -0
- package/resources/versions.d.mts +52 -1
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts +52 -1
- package/resources/versions.d.ts.map +1 -1
- package/resources/versions.js +20 -0
- package/resources/versions.js.map +1 -1
- package/resources/versions.mjs +20 -0
- package/resources/versions.mjs.map +1 -1
- package/resources/video-channels.d.mts +17 -17
- package/resources/video-channels.d.mts.map +1 -1
- package/resources/video-channels.d.ts +17 -17
- package/resources/video-channels.d.ts.map +1 -1
- package/resources/video-channels.js +17 -16
- package/resources/video-channels.js.map +1 -1
- package/resources/video-channels.mjs +17 -16
- package/resources/video-channels.mjs.map +1 -1
- package/resources/web-analytics.d.mts +345 -0
- package/resources/web-analytics.d.mts.map +1 -0
- package/resources/web-analytics.d.ts +345 -0
- package/resources/web-analytics.d.ts.map +1 -0
- package/resources/web-analytics.js +61 -0
- package/resources/web-analytics.js.map +1 -0
- package/resources/web-analytics.mjs +57 -0
- package/resources/web-analytics.mjs.map +1 -0
- package/resources/web-scanners.d.mts +314 -14
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +314 -14
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.js +139 -13
- package/resources/web-scanners.js.map +1 -1
- package/resources/web-scanners.mjs +139 -13
- package/resources/web-scanners.mjs.map +1 -1
- package/src/client.ts +147 -19
- package/src/resources/attribution.ts +11 -1
- package/src/resources/consent-settings.ts +56 -0
- package/src/resources/conversion-journey-summaries.ts +38 -0
- package/src/resources/data-governance.ts +5 -5
- package/src/resources/destinations.ts +18 -115
- package/src/resources/experiment-variants.ts +4 -2
- package/src/resources/experiments.ts +812 -101
- package/src/resources/funnels.ts +276 -21
- package/src/resources/heatmap-pages.ts +49 -14
- package/src/resources/index.ts +61 -3
- package/src/resources/mappings.ts +2 -2
- package/src/resources/personalization-properties.ts +662 -0
- package/src/resources/session-replays.ts +138 -0
- package/src/resources/short-links.ts +164 -36
- package/src/resources/sources.ts +11 -0
- package/src/resources/tag-manager-tags.ts +2 -2
- package/src/resources/tag-manager-triggers.ts +18 -1
- package/src/resources/translation-widgets.ts +97 -0
- package/src/resources/versions.ts +95 -0
- package/src/resources/video-channels.ts +19 -18
- package/src/resources/web-analytics.ts +494 -0
- package/src/resources/web-scanners.ts +443 -13
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -9,6 +9,11 @@ class WebScanners extends resource_1.APIResource {
|
|
|
9
9
|
* List every web scanner for this account. Not paginated — accounts have a small
|
|
10
10
|
* number of scanners in practice, so the response always fits in a single page.
|
|
11
11
|
* Requires scope: webScanner:list
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const webScanners = await client.webScanners.list();
|
|
16
|
+
* ```
|
|
12
17
|
*/
|
|
13
18
|
list(options) {
|
|
14
19
|
return this._client.get('/rest/v1/web-scanners', options);
|
|
@@ -21,12 +26,24 @@ class WebScanners extends resource_1.APIResource {
|
|
|
21
26
|
* patterns, no extra seed URLs). The returned entity is the created scanner row
|
|
22
27
|
* and may not yet reflect async scan-state changes. Requires scope:
|
|
23
28
|
* webScanner:create
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const webScanner = await client.webScanners.create({
|
|
33
|
+
* rootDomain: 'x',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
24
36
|
*/
|
|
25
37
|
create(body, options) {
|
|
26
38
|
return this._client.post('/rest/v1/web-scanners', { body, ...options });
|
|
27
39
|
}
|
|
28
40
|
/**
|
|
29
41
|
* Find a single web scanner by ID. Requires scope: webScanner:find
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const webScanner = await client.webScanners.retrieve('id');
|
|
46
|
+
* ```
|
|
30
47
|
*/
|
|
31
48
|
retrieve(id, options) {
|
|
32
49
|
return this._client.get((0, path_1.path) `/rest/v1/web-scanners/${id}`, options);
|
|
@@ -38,6 +55,11 @@ class WebScanners extends resource_1.APIResource {
|
|
|
38
55
|
* and malformed, the request is rejected as HTTP 400. Use
|
|
39
56
|
* `POST /rest/v1/web-scanners/{id}/trigger` to start a new scan after edits.
|
|
40
57
|
* Requires scope: webScanner:update
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const webScanner = await client.webScanners.update('id');
|
|
62
|
+
* ```
|
|
41
63
|
*/
|
|
42
64
|
update(id, body, options) {
|
|
43
65
|
return this._client.patch((0, path_1.path) `/rest/v1/web-scanners/${id}`, { body, ...options });
|
|
@@ -45,6 +67,11 @@ class WebScanners extends resource_1.APIResource {
|
|
|
45
67
|
/**
|
|
46
68
|
* Delete a web scanner. Associated suppression rules are deleted in the same
|
|
47
69
|
* operation. Requires scope: webScanner:delete
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const webScanner = await client.webScanners.delete('id');
|
|
74
|
+
* ```
|
|
48
75
|
*/
|
|
49
76
|
delete(id, options) {
|
|
50
77
|
return this._client.delete((0, path_1.path) `/rest/v1/web-scanners/${id}`, options);
|
|
@@ -54,13 +81,96 @@ class WebScanners extends resource_1.APIResource {
|
|
|
54
81
|
* `{}`). A successful response means the request was accepted; because the scan
|
|
55
82
|
* starts asynchronously, the returned entity may still reflect pre-trigger values
|
|
56
83
|
* for fields like `scanStatus` and `lastScanStartedAt`. The trigger is
|
|
57
|
-
* rate-limited: a 409 is returned if another scan is already in flight,
|
|
58
|
-
*
|
|
59
|
-
* reason is in the response `error` field. Requires
|
|
84
|
+
* rate-limited: a 409 is returned if another scan is already in flight, or if this
|
|
85
|
+
* production monitor has `urlLimit >= 5000` and its previous scan completed within
|
|
86
|
+
* the last 10 minutes; the reason is in the response `error` field. Requires
|
|
87
|
+
* scope: webScanner:trigger
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const response = await client.webScanners.trigger('id');
|
|
92
|
+
* ```
|
|
60
93
|
*/
|
|
61
94
|
trigger(id, options) {
|
|
62
95
|
return this._client.post((0, path_1.path) `/rest/v1/web-scanners/${id}/trigger`, options);
|
|
63
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Start a normal full scan with short-lived credentials supplied by your
|
|
99
|
+
* scheduler. Every in-scope page in this scan uses the credentials. Set
|
|
100
|
+
* `scanSchedule` to `manual` when your scheduler should be the only source of
|
|
101
|
+
* scans. Credential values are not returned or included in scan results. Requires
|
|
102
|
+
* scope: webScanner:trigger
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* const response = await client.webScanners.authenticatedScan(
|
|
107
|
+
* 'id',
|
|
108
|
+
* {
|
|
109
|
+
* credentials: [
|
|
110
|
+
* {
|
|
111
|
+
* location: 'header',
|
|
112
|
+
* name: 'Authorization',
|
|
113
|
+
* value: 'Bearer YOUR_TOKEN',
|
|
114
|
+
* },
|
|
115
|
+
* ],
|
|
116
|
+
* expiresInHours: 2,
|
|
117
|
+
* },
|
|
118
|
+
* );
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
authenticatedScan(id, body, options) {
|
|
122
|
+
return this._client.post((0, path_1.path) `/rest/v1/web-scanners/${id}/authenticated-scan`, { body, ...options });
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Queue an isolated verification capture for one exact in-scope page. This does
|
|
126
|
+
* not update monitor history, inventory counts, or the monitor-wide last-scanned
|
|
127
|
+
* timestamp. Poll the verification-run endpoint with the returned id for terminal
|
|
128
|
+
* evidence. Requires scope: webScanner:trigger
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const response = await client.webScanners.targetedScan(
|
|
133
|
+
* 'id',
|
|
134
|
+
* { targetUrl: 'https://example.com/privacy' },
|
|
135
|
+
* );
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
targetedScan(id, body, options) {
|
|
139
|
+
return this._client.post((0, path_1.path) `/rest/v1/web-scanners/${id}/targeted-scan`, { body, ...options });
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Read a UUID-addressed one-page verification run. The run is isolated from normal
|
|
143
|
+
* monitor history and is returned only when it belongs to the requested scanner.
|
|
144
|
+
* Requires scope: webScanner:find
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* const response = await client.webScanners.verificationRun(
|
|
149
|
+
* 'id',
|
|
150
|
+
* { runId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
151
|
+
* );
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
verificationRun(id, query, options) {
|
|
155
|
+
return this._client.get((0, path_1.path) `/rest/v1/web-scanners/${id}/verification-run`, { query, ...options });
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* List the one-page verification runs recorded for this scanner, newest first,
|
|
159
|
+
* each with its own capture counts. This is how a fix is compared against the
|
|
160
|
+
* attempts before it without reading each run individually. Verification runs are
|
|
161
|
+
* isolated from monitor history and never affect inventory counts or the
|
|
162
|
+
* monitor-wide last-scanned timestamp. Requires scope: webScanner:find
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```ts
|
|
166
|
+
* const response = await client.webScanners.verificationRuns(
|
|
167
|
+
* 'id',
|
|
168
|
+
* );
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
verificationRuns(id, query = {}, options) {
|
|
172
|
+
return this._client.get((0, path_1.path) `/rest/v1/web-scanners/${id}/verification-runs`, { query, ...options });
|
|
173
|
+
}
|
|
64
174
|
/**
|
|
65
175
|
* List the third-party trackers (requests) found on a scan run, with their risk,
|
|
66
176
|
* category, the pages they were seen on, and whether each host is already covered
|
|
@@ -73,6 +183,11 @@ class WebScanners extends resource_1.APIResource {
|
|
|
73
183
|
* or by creating a suppression rule with `POST /rest/v1/web-scanner-rules`. Use
|
|
74
184
|
* `GET /rest/v1/web-scanners/{id}/summary` for the rolled-up counts. Requires
|
|
75
185
|
* scope: webScanner:find
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```ts
|
|
189
|
+
* const response = await client.webScanners.findings('id');
|
|
190
|
+
* ```
|
|
76
191
|
*/
|
|
77
192
|
findings(id, query = {}, options) {
|
|
78
193
|
return this._client.get((0, path_1.path) `/rest/v1/web-scanners/${id}/findings`, { query, ...options });
|
|
@@ -84,6 +199,11 @@ class WebScanners extends resource_1.APIResource {
|
|
|
84
199
|
* and `offset` (a documented exception to the cursor-pagination standard, since
|
|
85
200
|
* each run is an immutable snapshot); local-storage entries are returned in full.
|
|
86
201
|
* Requires scope: webScanner:find
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* const response = await client.webScanners.cookies('id');
|
|
206
|
+
* ```
|
|
87
207
|
*/
|
|
88
208
|
cookies(id, query = {}, options) {
|
|
89
209
|
return this._client.get((0, path_1.path) `/rest/v1/web-scanners/${id}/cookies`, { query, ...options });
|
|
@@ -92,16 +212,22 @@ class WebScanners extends resource_1.APIResource {
|
|
|
92
212
|
* Compliance summary for a scan run — the rolled-up "what does this site look
|
|
93
213
|
* like, and what still needs a decision" view, assembled server-side so you do not
|
|
94
214
|
* have to page every finding. Includes total host/vendor/cookie counts, captured
|
|
95
|
-
* privacy policies and host coverage, a breakdown by risk and by category,
|
|
96
|
-
* (how many hosts are already covered by a CMP consent service or a
|
|
97
|
-
* rule vs. how many still need a decision), the new/removed host delta
|
|
98
|
-
* previous run, and up to 10 highest-risk hosts that still need a
|
|
99
|
-
* privacyPolicyUrl means that no policy was captured for the
|
|
100
|
-
* the latest run; pass `date` (an ISO-8601 timestamp; only
|
|
101
|
-
* to select the run) to read an earlier run. Clear a host
|
|
102
|
-
* adding it to a CMP consent service or creating a
|
|
103
|
-
* `POST /rest/v1/web-scanner-rules`. When the scanner has no
|
|
104
|
-
* count is 0 and `runDate` is null. Requires scope:
|
|
215
|
+
* privacy policies and host coverage, a breakdown by risk and by category,
|
|
216
|
+
* coverage (how many hosts are already covered by a CMP consent service or a
|
|
217
|
+
* suppression rule vs. how many still need a decision), the new/removed host delta
|
|
218
|
+
* versus the previous run, and up to 10 highest-risk hosts that still need a
|
|
219
|
+
* decision. A null privacyPolicyUrl means that no policy was captured for the
|
|
220
|
+
* hostname. Defaults to the latest run; pass `date` (an ISO-8601 timestamp; only
|
|
221
|
+
* the calendar day is used to select the run) to read an earlier run. Clear a host
|
|
222
|
+
* that needs a decision by adding it to a CMP consent service or creating a
|
|
223
|
+
* suppression rule with `POST /rest/v1/web-scanner-rules`. When the scanner has no
|
|
224
|
+
* completed runs, every count is 0 and `runDate` is null. Requires scope:
|
|
225
|
+
* webScanner:find
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```ts
|
|
229
|
+
* const response = await client.webScanners.summary('id');
|
|
230
|
+
* ```
|
|
105
231
|
*/
|
|
106
232
|
summary(id, query = {}, options) {
|
|
107
233
|
return this._client.get((0, path_1.path) `/rest/v1/web-scanners/${id}/summary`, { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-scanners.js","sourceRoot":"","sources":["../src/resources/web-scanners.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"web-scanners.js","sourceRoot":"","sources":["../src/resources/web-scanners.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAU,EACV,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,EAAE,EAAE,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O,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CACN,EAAU,EACV,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,OAAO,CACL,EAAU,EACV,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CACL,EAAU,EACV,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;CACF;AAhRD,kCAgRC"}
|
|
@@ -6,6 +6,11 @@ export class WebScanners extends APIResource {
|
|
|
6
6
|
* List every web scanner for this account. Not paginated — accounts have a small
|
|
7
7
|
* number of scanners in practice, so the response always fits in a single page.
|
|
8
8
|
* Requires scope: webScanner:list
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const webScanners = await client.webScanners.list();
|
|
13
|
+
* ```
|
|
9
14
|
*/
|
|
10
15
|
list(options) {
|
|
11
16
|
return this._client.get('/rest/v1/web-scanners', options);
|
|
@@ -18,12 +23,24 @@ export class WebScanners extends APIResource {
|
|
|
18
23
|
* patterns, no extra seed URLs). The returned entity is the created scanner row
|
|
19
24
|
* and may not yet reflect async scan-state changes. Requires scope:
|
|
20
25
|
* webScanner:create
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const webScanner = await client.webScanners.create({
|
|
30
|
+
* rootDomain: 'x',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
21
33
|
*/
|
|
22
34
|
create(body, options) {
|
|
23
35
|
return this._client.post('/rest/v1/web-scanners', { body, ...options });
|
|
24
36
|
}
|
|
25
37
|
/**
|
|
26
38
|
* Find a single web scanner by ID. Requires scope: webScanner:find
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const webScanner = await client.webScanners.retrieve('id');
|
|
43
|
+
* ```
|
|
27
44
|
*/
|
|
28
45
|
retrieve(id, options) {
|
|
29
46
|
return this._client.get(path `/rest/v1/web-scanners/${id}`, options);
|
|
@@ -35,6 +52,11 @@ export class WebScanners extends APIResource {
|
|
|
35
52
|
* and malformed, the request is rejected as HTTP 400. Use
|
|
36
53
|
* `POST /rest/v1/web-scanners/{id}/trigger` to start a new scan after edits.
|
|
37
54
|
* Requires scope: webScanner:update
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const webScanner = await client.webScanners.update('id');
|
|
59
|
+
* ```
|
|
38
60
|
*/
|
|
39
61
|
update(id, body, options) {
|
|
40
62
|
return this._client.patch(path `/rest/v1/web-scanners/${id}`, { body, ...options });
|
|
@@ -42,6 +64,11 @@ export class WebScanners extends APIResource {
|
|
|
42
64
|
/**
|
|
43
65
|
* Delete a web scanner. Associated suppression rules are deleted in the same
|
|
44
66
|
* operation. Requires scope: webScanner:delete
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const webScanner = await client.webScanners.delete('id');
|
|
71
|
+
* ```
|
|
45
72
|
*/
|
|
46
73
|
delete(id, options) {
|
|
47
74
|
return this._client.delete(path `/rest/v1/web-scanners/${id}`, options);
|
|
@@ -51,13 +78,96 @@ export class WebScanners extends APIResource {
|
|
|
51
78
|
* `{}`). A successful response means the request was accepted; because the scan
|
|
52
79
|
* starts asynchronously, the returned entity may still reflect pre-trigger values
|
|
53
80
|
* for fields like `scanStatus` and `lastScanStartedAt`. The trigger is
|
|
54
|
-
* rate-limited: a 409 is returned if another scan is already in flight,
|
|
55
|
-
*
|
|
56
|
-
* reason is in the response `error` field. Requires
|
|
81
|
+
* rate-limited: a 409 is returned if another scan is already in flight, or if this
|
|
82
|
+
* production monitor has `urlLimit >= 5000` and its previous scan completed within
|
|
83
|
+
* the last 10 minutes; the reason is in the response `error` field. Requires
|
|
84
|
+
* scope: webScanner:trigger
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const response = await client.webScanners.trigger('id');
|
|
89
|
+
* ```
|
|
57
90
|
*/
|
|
58
91
|
trigger(id, options) {
|
|
59
92
|
return this._client.post(path `/rest/v1/web-scanners/${id}/trigger`, options);
|
|
60
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Start a normal full scan with short-lived credentials supplied by your
|
|
96
|
+
* scheduler. Every in-scope page in this scan uses the credentials. Set
|
|
97
|
+
* `scanSchedule` to `manual` when your scheduler should be the only source of
|
|
98
|
+
* scans. Credential values are not returned or included in scan results. Requires
|
|
99
|
+
* scope: webScanner:trigger
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const response = await client.webScanners.authenticatedScan(
|
|
104
|
+
* 'id',
|
|
105
|
+
* {
|
|
106
|
+
* credentials: [
|
|
107
|
+
* {
|
|
108
|
+
* location: 'header',
|
|
109
|
+
* name: 'Authorization',
|
|
110
|
+
* value: 'Bearer YOUR_TOKEN',
|
|
111
|
+
* },
|
|
112
|
+
* ],
|
|
113
|
+
* expiresInHours: 2,
|
|
114
|
+
* },
|
|
115
|
+
* );
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
authenticatedScan(id, body, options) {
|
|
119
|
+
return this._client.post(path `/rest/v1/web-scanners/${id}/authenticated-scan`, { body, ...options });
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Queue an isolated verification capture for one exact in-scope page. This does
|
|
123
|
+
* not update monitor history, inventory counts, or the monitor-wide last-scanned
|
|
124
|
+
* timestamp. Poll the verification-run endpoint with the returned id for terminal
|
|
125
|
+
* evidence. Requires scope: webScanner:trigger
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* const response = await client.webScanners.targetedScan(
|
|
130
|
+
* 'id',
|
|
131
|
+
* { targetUrl: 'https://example.com/privacy' },
|
|
132
|
+
* );
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
targetedScan(id, body, options) {
|
|
136
|
+
return this._client.post(path `/rest/v1/web-scanners/${id}/targeted-scan`, { body, ...options });
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Read a UUID-addressed one-page verification run. The run is isolated from normal
|
|
140
|
+
* monitor history and is returned only when it belongs to the requested scanner.
|
|
141
|
+
* Requires scope: webScanner:find
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```ts
|
|
145
|
+
* const response = await client.webScanners.verificationRun(
|
|
146
|
+
* 'id',
|
|
147
|
+
* { runId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
148
|
+
* );
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
verificationRun(id, query, options) {
|
|
152
|
+
return this._client.get(path `/rest/v1/web-scanners/${id}/verification-run`, { query, ...options });
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* List the one-page verification runs recorded for this scanner, newest first,
|
|
156
|
+
* each with its own capture counts. This is how a fix is compared against the
|
|
157
|
+
* attempts before it without reading each run individually. Verification runs are
|
|
158
|
+
* isolated from monitor history and never affect inventory counts or the
|
|
159
|
+
* monitor-wide last-scanned timestamp. Requires scope: webScanner:find
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* const response = await client.webScanners.verificationRuns(
|
|
164
|
+
* 'id',
|
|
165
|
+
* );
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
verificationRuns(id, query = {}, options) {
|
|
169
|
+
return this._client.get(path `/rest/v1/web-scanners/${id}/verification-runs`, { query, ...options });
|
|
170
|
+
}
|
|
61
171
|
/**
|
|
62
172
|
* List the third-party trackers (requests) found on a scan run, with their risk,
|
|
63
173
|
* category, the pages they were seen on, and whether each host is already covered
|
|
@@ -70,6 +180,11 @@ export class WebScanners extends APIResource {
|
|
|
70
180
|
* or by creating a suppression rule with `POST /rest/v1/web-scanner-rules`. Use
|
|
71
181
|
* `GET /rest/v1/web-scanners/{id}/summary` for the rolled-up counts. Requires
|
|
72
182
|
* scope: webScanner:find
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* const response = await client.webScanners.findings('id');
|
|
187
|
+
* ```
|
|
73
188
|
*/
|
|
74
189
|
findings(id, query = {}, options) {
|
|
75
190
|
return this._client.get(path `/rest/v1/web-scanners/${id}/findings`, { query, ...options });
|
|
@@ -81,6 +196,11 @@ export class WebScanners extends APIResource {
|
|
|
81
196
|
* and `offset` (a documented exception to the cursor-pagination standard, since
|
|
82
197
|
* each run is an immutable snapshot); local-storage entries are returned in full.
|
|
83
198
|
* Requires scope: webScanner:find
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const response = await client.webScanners.cookies('id');
|
|
203
|
+
* ```
|
|
84
204
|
*/
|
|
85
205
|
cookies(id, query = {}, options) {
|
|
86
206
|
return this._client.get(path `/rest/v1/web-scanners/${id}/cookies`, { query, ...options });
|
|
@@ -89,16 +209,22 @@ export class WebScanners extends APIResource {
|
|
|
89
209
|
* Compliance summary for a scan run — the rolled-up "what does this site look
|
|
90
210
|
* like, and what still needs a decision" view, assembled server-side so you do not
|
|
91
211
|
* have to page every finding. Includes total host/vendor/cookie counts, captured
|
|
92
|
-
* privacy policies and host coverage, a breakdown by risk and by category,
|
|
93
|
-
* (how many hosts are already covered by a CMP consent service or a
|
|
94
|
-
* rule vs. how many still need a decision), the new/removed host delta
|
|
95
|
-
* previous run, and up to 10 highest-risk hosts that still need a
|
|
96
|
-
* privacyPolicyUrl means that no policy was captured for the
|
|
97
|
-
* the latest run; pass `date` (an ISO-8601 timestamp; only
|
|
98
|
-
* to select the run) to read an earlier run. Clear a host
|
|
99
|
-
* adding it to a CMP consent service or creating a
|
|
100
|
-
* `POST /rest/v1/web-scanner-rules`. When the scanner has no
|
|
101
|
-
* count is 0 and `runDate` is null. Requires scope:
|
|
212
|
+
* privacy policies and host coverage, a breakdown by risk and by category,
|
|
213
|
+
* coverage (how many hosts are already covered by a CMP consent service or a
|
|
214
|
+
* suppression rule vs. how many still need a decision), the new/removed host delta
|
|
215
|
+
* versus the previous run, and up to 10 highest-risk hosts that still need a
|
|
216
|
+
* decision. A null privacyPolicyUrl means that no policy was captured for the
|
|
217
|
+
* hostname. Defaults to the latest run; pass `date` (an ISO-8601 timestamp; only
|
|
218
|
+
* the calendar day is used to select the run) to read an earlier run. Clear a host
|
|
219
|
+
* that needs a decision by adding it to a CMP consent service or creating a
|
|
220
|
+
* suppression rule with `POST /rest/v1/web-scanner-rules`. When the scanner has no
|
|
221
|
+
* completed runs, every count is 0 and `runDate` is null. Requires scope:
|
|
222
|
+
* webScanner:find
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* const response = await client.webScanners.summary('id');
|
|
227
|
+
* ```
|
|
102
228
|
*/
|
|
103
229
|
summary(id, query = {}, options) {
|
|
104
230
|
return this._client.get(path `/rest/v1/web-scanners/${id}/summary`, { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-scanners.mjs","sourceRoot":"","sources":["../src/resources/web-scanners.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"web-scanners.mjs","sourceRoot":"","sources":["../src/resources/web-scanners.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,yBAAyB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAU,EACV,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,yBAAyB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,O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