@oursprivacy/platform-sdk 1.58.0 → 1.59.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.
@@ -268,14 +268,18 @@ export class WebScanners extends APIResource {
268
268
  * privacy policies and host coverage, a breakdown by risk and by category,
269
269
  * coverage (how many hosts are already covered by a CMP consent service or a
270
270
  * 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
271
+ * versus the previous run, up to 10 highest-risk hosts that still need a decision,
272
+ * the homepage consent check (which third parties were contacted before any
273
+ * choice, after Reject all, and with Global Privacy Control on), and the
274
+ * Content-Security-Policy gap for each first-party hostname. After a consent or
275
+ * CSP fix, trigger a full scan with `POST /rest/v1/web-scanners/{id}/trigger` and
276
+ * read this summary again to confirm it. A null privacyPolicyUrl means that no
277
+ * policy was captured for the hostname. Defaults to the latest run; pass `date`
278
+ * (an ISO-8601 timestamp; only the calendar day is used to select the run) to read
279
+ * an earlier run. Clear a host that needs a decision by adding it to a CMP consent
280
+ * service or creating a suppression rule with `POST /rest/v1/web-scanner-rules`.
281
+ * When the scanner has no completed runs, every count is 0 and `runDate` is null.
282
+ * Requires API-key scope or current OAuth user permission: webScanner:find
279
283
  *
280
284
  * @example
281
285
  * ```ts
@@ -965,6 +969,12 @@ export interface WebScannerSummaryResponse {
965
969
 
966
970
  coverage: WebScannerSummaryResponse.Coverage;
967
971
 
972
+ /**
973
+ * Content-Security-Policy result for each crawled first-party hostname, most
974
+ * serious gap first.
975
+ */
976
+ csp: Array<WebScannerSummaryResponse.Csp>;
977
+
968
978
  hostCount: number;
969
979
 
970
980
  localStorageCount: number;
@@ -1011,6 +1021,13 @@ export interface WebScannerSummaryResponse {
1011
1021
  */
1012
1022
  accessibility?: WebScannerSummaryResponse.Accessibility | null;
1013
1023
 
1024
+ /**
1025
+ * Consent check for this run: the homepage loaded before any choice, after Reject
1026
+ * all, after Accept all, and with Global Privacy Control on. Null when the run had
1027
+ * no consent check.
1028
+ */
1029
+ consentProbe?: WebScannerSummaryResponse.ConsentProbe | null;
1030
+
1014
1031
  coverageRevision?: string | null;
1015
1032
 
1016
1033
  delta?: WebScannerSummaryResponse.Delta | null;
@@ -1047,6 +1064,29 @@ export namespace WebScannerSummaryResponse {
1047
1064
  totalHostCount: number;
1048
1065
  }
1049
1066
 
1067
+ export interface Csp {
1068
+ /**
1069
+ * Third-party domains contacted from this hostname that the policy does not allow.
1070
+ */
1071
+ domainsNotInCsp: Array<string>;
1072
+
1073
+ /**
1074
+ * Whether pages on this hostname sent a Content-Security-Policy.
1075
+ */
1076
+ hasCsp: boolean;
1077
+
1078
+ /**
1079
+ * A crawled first-party hostname.
1080
+ */
1081
+ hostname: string;
1082
+
1083
+ /**
1084
+ * The most serious policy gap, graded the same way as the dashboard and PDF
1085
+ * report. Null when the policy allows every third-party domain the scan observed.
1086
+ */
1087
+ gap?: 'no_policy' | 'missing_script_src' | 'missing_connect_src' | 'unallowed_domains' | null;
1088
+ }
1089
+
1050
1090
  export interface PrivacyPolicy {
1051
1091
  hostnames: Array<string>;
1052
1092
 
@@ -1241,6 +1281,79 @@ export namespace WebScannerSummaryResponse {
1241
1281
  }
1242
1282
  }
1243
1283
 
1284
+ /**
1285
+ * Consent check for this run: the homepage loaded before any choice, after Reject
1286
+ * all, after Accept all, and with Global Privacy Control on. Null when the run had
1287
+ * no consent check.
1288
+ */
1289
+ export interface ConsentProbe {
1290
+ /**
1291
+ * Hosts contacted in a state where the visitor had not agreed. Empty when none
1292
+ * were observed. The Ours Privacy consent script host is never listed, since the
1293
+ * banner needs it; other contacted hosts may still be strictly necessary.
1294
+ */
1295
+ findings: Array<ConsentProbe.Finding>;
1296
+
1297
+ /**
1298
+ * The page loaded in each consent state.
1299
+ */
1300
+ requestedUrl: string;
1301
+
1302
+ /**
1303
+ * What each state captured. Empty until the check finishes.
1304
+ */
1305
+ states: Array<ConsentProbe.State>;
1306
+
1307
+ /**
1308
+ * ours_consent_not_installed means the page has no Ours Privacy Consent
1309
+ * Management, so the Reject all and Accept all states could not be driven; the
1310
+ * baseline and gpc states are still captured. A failed check, or one where Ours
1311
+ * Consent is not installed, is never a clean result.
1312
+ */
1313
+ status: 'queued' | 'in_progress' | 'completed' | 'ours_consent_not_installed' | 'failed';
1314
+
1315
+ /**
1316
+ * Why the check failed, or why Reject all and Accept all could not be tested.
1317
+ */
1318
+ cause?: string | null;
1319
+
1320
+ completedAt?: string | null;
1321
+ }
1322
+
1323
+ export namespace ConsentProbe {
1324
+ export interface Finding {
1325
+ hostnames: Array<string>;
1326
+
1327
+ /**
1328
+ * tracker_before_consent: contacted before any choice; reject_not_honored:
1329
+ * contacted after Reject all; gpc_not_honored: contacted with Global Privacy
1330
+ * Control on.
1331
+ */
1332
+ kind: 'tracker_before_consent' | 'reject_not_honored' | 'gpc_not_honored';
1333
+ }
1334
+
1335
+ export interface State {
1336
+ outcome: 'completed' | 'ours_consent_not_installed' | 'failed';
1337
+
1338
+ /**
1339
+ * baseline is before any consent choice; reject_all and accept_all follow the
1340
+ * matching banner choice; gpc loads with Global Privacy Control on.
1341
+ */
1342
+ state: 'baseline' | 'reject_all' | 'accept_all' | 'gpc';
1343
+
1344
+ cause?: string | null;
1345
+
1346
+ cookieNames?: Array<string> | null;
1347
+
1348
+ /**
1349
+ * Third-party hosts contacted in this state.
1350
+ */
1351
+ requestHostnames?: Array<string> | null;
1352
+
1353
+ storageKeys?: Array<string> | null;
1354
+ }
1355
+ }
1356
+
1244
1357
  export interface Delta {
1245
1358
  newHostCount: number;
1246
1359
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.58.0'; // x-release-please-version
1
+ export const VERSION = '1.59.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.59.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.59.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.59.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.59.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map