@oursprivacy/platform-sdk 1.58.0 → 1.60.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.
@@ -246,11 +246,14 @@ export class WebScanners extends APIResource {
246
246
  * used to select the run) to read an earlier run. Cookies paginate with `limit`
247
247
  * and `offset` (a documented exception to the cursor-pagination standard, since
248
248
  * each run is an immutable snapshot); local-storage entries are returned in full.
249
+ * A missing id and an id this credential cannot access return the same 404.
249
250
  * Requires API-key scope or current OAuth user permission: webScanner:find
250
251
  *
251
252
  * @example
252
253
  * ```ts
253
- * const response = await client.webScanners.cookies('id');
254
+ * const response = await client.webScanners.cookies(
255
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
256
+ * );
254
257
  * ```
255
258
  */
256
259
  cookies(
@@ -268,14 +271,18 @@ export class WebScanners extends APIResource {
268
271
  * privacy policies and host coverage, a breakdown by risk and by category,
269
272
  * coverage (how many hosts are already covered by a CMP consent service or a
270
273
  * suppression rule vs. how many still need a decision), the new/removed host delta
271
- * versus the previous run, and up to 10 highest-risk hosts that still need a
272
- * decision. A null privacyPolicyUrl means that no policy was captured for the
273
- * hostname. Defaults to the latest run; pass `date` (an ISO-8601 timestamp; only
274
- * the calendar day is used to select the run) to read an earlier run. Clear a host
275
- * that needs a decision by adding it to a CMP consent service or creating a
276
- * suppression rule with `POST /rest/v1/web-scanner-rules`. When the scanner has no
277
- * completed runs, every count is 0 and `runDate` is null. Requires API-key scope
278
- * or current OAuth user permission: webScanner:find
274
+ * versus the previous run, up to 10 highest-risk hosts that still need a decision,
275
+ * the homepage consent check (which third parties were contacted before any
276
+ * choice, after Reject all, and with Global Privacy Control on), and the
277
+ * Content-Security-Policy gap for each first-party hostname. After a consent or
278
+ * CSP fix, trigger a full scan with `POST /rest/v1/web-scanners/{id}/trigger` and
279
+ * read this summary again to confirm it. A null privacyPolicyUrl means that no
280
+ * policy was captured for the hostname. Defaults to the latest run; pass `date`
281
+ * (an ISO-8601 timestamp; only the calendar day is used to select the run) to read
282
+ * an earlier run. Clear a host that needs a decision by adding it to a CMP consent
283
+ * service or creating a suppression rule with `POST /rest/v1/web-scanner-rules`.
284
+ * When the scanner has no completed runs, every count is 0 and `runDate` is null.
285
+ * Requires API-key scope or current OAuth user permission: webScanner:find
279
286
  *
280
287
  * @example
281
288
  * ```ts
@@ -965,6 +972,12 @@ export interface WebScannerSummaryResponse {
965
972
 
966
973
  coverage: WebScannerSummaryResponse.Coverage;
967
974
 
975
+ /**
976
+ * Content-Security-Policy result for each crawled first-party hostname, most
977
+ * serious gap first.
978
+ */
979
+ csp: Array<WebScannerSummaryResponse.Csp>;
980
+
968
981
  hostCount: number;
969
982
 
970
983
  localStorageCount: number;
@@ -1011,6 +1024,13 @@ export interface WebScannerSummaryResponse {
1011
1024
  */
1012
1025
  accessibility?: WebScannerSummaryResponse.Accessibility | null;
1013
1026
 
1027
+ /**
1028
+ * Consent check for this run: the homepage loaded before any choice, after Reject
1029
+ * all, after Accept all, and with Global Privacy Control on. Null when the run had
1030
+ * no consent check.
1031
+ */
1032
+ consentProbe?: WebScannerSummaryResponse.ConsentProbe | null;
1033
+
1014
1034
  coverageRevision?: string | null;
1015
1035
 
1016
1036
  delta?: WebScannerSummaryResponse.Delta | null;
@@ -1047,6 +1067,29 @@ export namespace WebScannerSummaryResponse {
1047
1067
  totalHostCount: number;
1048
1068
  }
1049
1069
 
1070
+ export interface Csp {
1071
+ /**
1072
+ * Third-party domains contacted from this hostname that the policy does not allow.
1073
+ */
1074
+ domainsNotInCsp: Array<string>;
1075
+
1076
+ /**
1077
+ * Whether pages on this hostname sent a Content-Security-Policy.
1078
+ */
1079
+ hasCsp: boolean;
1080
+
1081
+ /**
1082
+ * A crawled first-party hostname.
1083
+ */
1084
+ hostname: string;
1085
+
1086
+ /**
1087
+ * The most serious policy gap, graded the same way as the dashboard and PDF
1088
+ * report. Null when the policy allows every third-party domain the scan observed.
1089
+ */
1090
+ gap?: 'no_policy' | 'missing_script_src' | 'missing_connect_src' | 'unallowed_domains' | null;
1091
+ }
1092
+
1050
1093
  export interface PrivacyPolicy {
1051
1094
  hostnames: Array<string>;
1052
1095
 
@@ -1241,6 +1284,79 @@ export namespace WebScannerSummaryResponse {
1241
1284
  }
1242
1285
  }
1243
1286
 
1287
+ /**
1288
+ * Consent check for this run: the homepage loaded before any choice, after Reject
1289
+ * all, after Accept all, and with Global Privacy Control on. Null when the run had
1290
+ * no consent check.
1291
+ */
1292
+ export interface ConsentProbe {
1293
+ /**
1294
+ * Hosts contacted in a state where the visitor had not agreed. Empty when none
1295
+ * were observed. The Ours Privacy consent script host is never listed, since the
1296
+ * banner needs it; other contacted hosts may still be strictly necessary.
1297
+ */
1298
+ findings: Array<ConsentProbe.Finding>;
1299
+
1300
+ /**
1301
+ * The page loaded in each consent state.
1302
+ */
1303
+ requestedUrl: string;
1304
+
1305
+ /**
1306
+ * What each state captured. Empty until the check finishes.
1307
+ */
1308
+ states: Array<ConsentProbe.State>;
1309
+
1310
+ /**
1311
+ * ours_consent_not_installed means the page has no Ours Privacy Consent
1312
+ * Management, so the Reject all and Accept all states could not be driven; the
1313
+ * baseline and gpc states are still captured. A failed check, or one where Ours
1314
+ * Consent is not installed, is never a clean result.
1315
+ */
1316
+ status: 'queued' | 'in_progress' | 'completed' | 'ours_consent_not_installed' | 'failed';
1317
+
1318
+ /**
1319
+ * Why the check failed, or why Reject all and Accept all could not be tested.
1320
+ */
1321
+ cause?: string | null;
1322
+
1323
+ completedAt?: string | null;
1324
+ }
1325
+
1326
+ export namespace ConsentProbe {
1327
+ export interface Finding {
1328
+ hostnames: Array<string>;
1329
+
1330
+ /**
1331
+ * tracker_before_consent: contacted before any choice; reject_not_honored:
1332
+ * contacted after Reject all; gpc_not_honored: contacted with Global Privacy
1333
+ * Control on.
1334
+ */
1335
+ kind: 'tracker_before_consent' | 'reject_not_honored' | 'gpc_not_honored';
1336
+ }
1337
+
1338
+ export interface State {
1339
+ outcome: 'completed' | 'ours_consent_not_installed' | 'failed';
1340
+
1341
+ /**
1342
+ * baseline is before any consent choice; reject_all and accept_all follow the
1343
+ * matching banner choice; gpc loads with Global Privacy Control on.
1344
+ */
1345
+ state: 'baseline' | 'reject_all' | 'accept_all' | 'gpc';
1346
+
1347
+ cause?: string | null;
1348
+
1349
+ cookieNames?: Array<string> | null;
1350
+
1351
+ /**
1352
+ * Third-party hosts contacted in this state.
1353
+ */
1354
+ requestHostnames?: Array<string> | null;
1355
+
1356
+ storageKeys?: Array<string> | null;
1357
+ }
1358
+ }
1359
+
1244
1360
  export interface Delta {
1245
1361
  newHostCount: number;
1246
1362
 
@@ -1512,12 +1628,12 @@ export interface WebScannerCookiesParams {
1512
1628
  date?: string;
1513
1629
 
1514
1630
  /**
1515
- * Maximum number of findings to return. Defaults to 25; clamped to 1–100.
1631
+ * Maximum number of cookies to return, from 1 to 100. Defaults to 25.
1516
1632
  */
1517
1633
  limit?: number;
1518
1634
 
1519
1635
  /**
1520
- * Skip this many findings before returning. Use with `limit` for load-more paging.
1636
+ * Skip this many cookies before returning. Use with `limit` for load-more paging.
1521
1637
  */
1522
1638
  offset?: number | null;
1523
1639
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.58.0'; // x-release-please-version
1
+ export const VERSION = '1.60.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.58.0";
1
+ export declare const VERSION = "1.60.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.58.0";
1
+ export declare const VERSION = "1.60.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.58.0'; // x-release-please-version
4
+ exports.VERSION = '1.60.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.58.0'; // x-release-please-version
1
+ export const VERSION = '1.60.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map