@oursprivacy/platform-sdk 1.46.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.
Files changed (160) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +20 -11
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -11
  5. package/client.d.ts.map +1 -1
  6. package/client.js +11 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +11 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/attribution.d.mts +9 -1
  12. package/resources/attribution.d.mts.map +1 -1
  13. package/resources/attribution.d.ts +9 -1
  14. package/resources/attribution.d.ts.map +1 -1
  15. package/resources/consent-settings.d.mts +48 -0
  16. package/resources/consent-settings.d.mts.map +1 -1
  17. package/resources/consent-settings.d.ts +48 -0
  18. package/resources/consent-settings.d.ts.map +1 -1
  19. package/resources/conversion-journey-summaries.d.mts +38 -0
  20. package/resources/conversion-journey-summaries.d.mts.map +1 -1
  21. package/resources/conversion-journey-summaries.d.ts +38 -0
  22. package/resources/conversion-journey-summaries.d.ts.map +1 -1
  23. package/resources/conversion-journey-summaries.js +38 -0
  24. package/resources/conversion-journey-summaries.js.map +1 -1
  25. package/resources/conversion-journey-summaries.mjs +38 -0
  26. package/resources/conversion-journey-summaries.mjs.map +1 -1
  27. package/resources/data-governance.d.mts +5 -5
  28. package/resources/data-governance.d.mts.map +1 -1
  29. package/resources/data-governance.d.ts +5 -5
  30. package/resources/data-governance.d.ts.map +1 -1
  31. package/resources/destinations.d.mts +7 -27
  32. package/resources/destinations.d.mts.map +1 -1
  33. package/resources/destinations.d.ts +7 -27
  34. package/resources/destinations.d.ts.map +1 -1
  35. package/resources/experiment-variants.d.mts +4 -2
  36. package/resources/experiment-variants.d.mts.map +1 -1
  37. package/resources/experiment-variants.d.ts +4 -2
  38. package/resources/experiment-variants.d.ts.map +1 -1
  39. package/resources/experiments.d.mts +677 -102
  40. package/resources/experiments.d.mts.map +1 -1
  41. package/resources/experiments.d.ts +677 -102
  42. package/resources/experiments.d.ts.map +1 -1
  43. package/resources/experiments.js +32 -2
  44. package/resources/experiments.js.map +1 -1
  45. package/resources/experiments.mjs +32 -2
  46. package/resources/experiments.mjs.map +1 -1
  47. package/resources/funnels.d.mts +172 -22
  48. package/resources/funnels.d.mts.map +1 -1
  49. package/resources/funnels.d.ts +172 -22
  50. package/resources/funnels.d.ts.map +1 -1
  51. package/resources/funnels.js +10 -2
  52. package/resources/funnels.js.map +1 -1
  53. package/resources/funnels.mjs +10 -2
  54. package/resources/funnels.mjs.map +1 -1
  55. package/resources/heatmap-pages.d.mts +42 -14
  56. package/resources/heatmap-pages.d.mts.map +1 -1
  57. package/resources/heatmap-pages.d.ts +42 -14
  58. package/resources/heatmap-pages.d.ts.map +1 -1
  59. package/resources/heatmap-pages.js +11 -7
  60. package/resources/heatmap-pages.js.map +1 -1
  61. package/resources/heatmap-pages.mjs +11 -7
  62. package/resources/heatmap-pages.mjs.map +1 -1
  63. package/resources/index.d.mts +8 -5
  64. package/resources/index.d.mts.map +1 -1
  65. package/resources/index.d.ts +8 -5
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js +7 -1
  68. package/resources/index.js.map +1 -1
  69. package/resources/index.mjs +3 -0
  70. package/resources/index.mjs.map +1 -1
  71. package/resources/mappings.d.mts +2 -2
  72. package/resources/mappings.d.mts.map +1 -1
  73. package/resources/mappings.d.ts +2 -2
  74. package/resources/mappings.d.ts.map +1 -1
  75. package/resources/session-replays.d.mts +91 -0
  76. package/resources/session-replays.d.mts.map +1 -0
  77. package/resources/session-replays.d.ts +91 -0
  78. package/resources/session-replays.d.ts.map +1 -0
  79. package/resources/session-replays.js +24 -0
  80. package/resources/session-replays.js.map +1 -0
  81. package/resources/session-replays.mjs +20 -0
  82. package/resources/session-replays.mjs.map +1 -0
  83. package/resources/short-links.d.mts +138 -37
  84. package/resources/short-links.d.mts.map +1 -1
  85. package/resources/short-links.d.ts +138 -37
  86. package/resources/short-links.d.ts.map +1 -1
  87. package/resources/short-links.js +27 -12
  88. package/resources/short-links.js.map +1 -1
  89. package/resources/short-links.mjs +27 -12
  90. package/resources/short-links.mjs.map +1 -1
  91. package/resources/sources.d.mts +10 -6
  92. package/resources/sources.d.mts.map +1 -1
  93. package/resources/sources.d.ts +10 -6
  94. package/resources/sources.d.ts.map +1 -1
  95. package/resources/tag-manager-tags.d.mts +2 -2
  96. package/resources/tag-manager-tags.d.ts +2 -2
  97. package/resources/tag-manager-tags.js +2 -2
  98. package/resources/tag-manager-tags.mjs +2 -2
  99. package/resources/tag-manager-triggers.d.mts +18 -1
  100. package/resources/tag-manager-triggers.d.mts.map +1 -1
  101. package/resources/tag-manager-triggers.d.ts +18 -1
  102. package/resources/tag-manager-triggers.d.ts.map +1 -1
  103. package/resources/translation-widgets.d.mts +62 -0
  104. package/resources/translation-widgets.d.mts.map +1 -0
  105. package/resources/translation-widgets.d.ts +62 -0
  106. package/resources/translation-widgets.d.ts.map +1 -0
  107. package/resources/translation-widgets.js +18 -0
  108. package/resources/translation-widgets.js.map +1 -0
  109. package/resources/translation-widgets.mjs +14 -0
  110. package/resources/translation-widgets.mjs.map +1 -0
  111. package/resources/video-channels.d.mts +17 -17
  112. package/resources/video-channels.d.mts.map +1 -1
  113. package/resources/video-channels.d.ts +17 -17
  114. package/resources/video-channels.d.ts.map +1 -1
  115. package/resources/video-channels.js +17 -16
  116. package/resources/video-channels.js.map +1 -1
  117. package/resources/video-channels.mjs +17 -16
  118. package/resources/video-channels.mjs.map +1 -1
  119. package/resources/web-analytics.d.mts +345 -0
  120. package/resources/web-analytics.d.mts.map +1 -0
  121. package/resources/web-analytics.d.ts +345 -0
  122. package/resources/web-analytics.d.ts.map +1 -0
  123. package/resources/web-analytics.js +61 -0
  124. package/resources/web-analytics.js.map +1 -0
  125. package/resources/web-analytics.mjs +57 -0
  126. package/resources/web-analytics.mjs.map +1 -0
  127. package/resources/web-scanners.d.mts +314 -14
  128. package/resources/web-scanners.d.mts.map +1 -1
  129. package/resources/web-scanners.d.ts +314 -14
  130. package/resources/web-scanners.d.ts.map +1 -1
  131. package/resources/web-scanners.js +139 -13
  132. package/resources/web-scanners.js.map +1 -1
  133. package/resources/web-scanners.mjs +139 -13
  134. package/resources/web-scanners.mjs.map +1 -1
  135. package/src/client.ts +116 -19
  136. package/src/resources/attribution.ts +11 -1
  137. package/src/resources/consent-settings.ts +56 -0
  138. package/src/resources/conversion-journey-summaries.ts +38 -0
  139. package/src/resources/data-governance.ts +5 -5
  140. package/src/resources/destinations.ts +18 -115
  141. package/src/resources/experiment-variants.ts +4 -2
  142. package/src/resources/experiments.ts +812 -101
  143. package/src/resources/funnels.ts +276 -21
  144. package/src/resources/heatmap-pages.ts +49 -14
  145. package/src/resources/index.ts +47 -3
  146. package/src/resources/mappings.ts +2 -2
  147. package/src/resources/session-replays.ts +138 -0
  148. package/src/resources/short-links.ts +164 -36
  149. package/src/resources/sources.ts +11 -0
  150. package/src/resources/tag-manager-tags.ts +2 -2
  151. package/src/resources/tag-manager-triggers.ts +18 -1
  152. package/src/resources/translation-widgets.ts +97 -0
  153. package/src/resources/video-channels.ts +19 -18
  154. package/src/resources/web-analytics.ts +494 -0
  155. package/src/resources/web-scanners.ts +443 -13
  156. package/src/version.ts +1 -1
  157. package/version.d.mts +1 -1
  158. package/version.d.ts +1 -1
  159. package/version.js +1 -1
  160. 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, the
58
- * per-account cooldown has not elapsed, or the request was otherwise rejected; the
59
- * reason is in the response `error` field. Requires scope: webScanner:trigger
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, coverage
96
- * (how many hosts are already covered by a CMP consent service or a suppression
97
- * rule vs. how many still need a decision), the new/removed host delta versus the
98
- * previous run, and up to 10 highest-risk hosts that still need a decision. A null
99
- * privacyPolicyUrl means that no policy was captured for the hostname. Defaults to
100
- * the latest run; pass `date` (an ISO-8601 timestamp; only the calendar day is used
101
- * to select the run) to read an earlier run. Clear a host that needs a decision by
102
- * adding it to a CMP consent service or creating a suppression rule with
103
- * `POST /rest/v1/web-scanner-rules`. When the scanner has no completed runs, every
104
- * count is 0 and `runDate` is null. Requires scope: webScanner:find
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","sourceR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AAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,EAAE,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CACd,EAAU,EACV,QAA6D,EAAE,EAC/D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,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, the
55
- * per-account cooldown has not elapsed, or the request was otherwise rejected; the
56
- * reason is in the response `error` field. Requires scope: webScanner:trigger
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, coverage
93
- * (how many hosts are already covered by a CMP consent service or a suppression
94
- * rule vs. how many still need a decision), the new/removed host delta versus the
95
- * previous run, and up to 10 highest-risk hosts that still need a decision. A null
96
- * privacyPolicyUrl means that no policy was captured for the hostname. Defaults to
97
- * the latest run; pass `date` (an ISO-8601 timestamp; only the calendar day is used
98
- * to select the run) to read an earlier run. Clear a host that needs a decision by
99
- * adding it to a CMP consent service or creating a suppression rule with
100
- * `POST /rest/v1/web-scanner-rules`. When the scanner has no completed runs, every
101
- * count is 0 and `runDate` is null. Requires scope: webScanner:find
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;;;;OAIG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;;OAQG;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;;OAEG;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;;;;;;;OAOG;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;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAU,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,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