@oursprivacy/platform-sdk 1.48.0 → 1.50.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 (57) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/analytics.d.mts +62 -0
  12. package/resources/analytics.d.mts.map +1 -0
  13. package/resources/analytics.d.ts +62 -0
  14. package/resources/analytics.d.ts.map +1 -0
  15. package/resources/analytics.js +25 -0
  16. package/resources/analytics.js.map +1 -0
  17. package/resources/analytics.mjs +21 -0
  18. package/resources/analytics.mjs.map +1 -0
  19. package/resources/consent-settings.d.mts +9 -0
  20. package/resources/consent-settings.d.mts.map +1 -1
  21. package/resources/consent-settings.d.ts +9 -0
  22. package/resources/consent-settings.d.ts.map +1 -1
  23. package/resources/funnels.d.mts +88 -980
  24. package/resources/funnels.d.mts.map +1 -1
  25. package/resources/funnels.d.ts +88 -980
  26. package/resources/funnels.d.ts.map +1 -1
  27. package/resources/funnels.js +24 -19
  28. package/resources/funnels.js.map +1 -1
  29. package/resources/funnels.mjs +24 -19
  30. package/resources/funnels.mjs.map +1 -1
  31. package/resources/index.d.mts +2 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +2 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +3 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/web-scanners.d.mts +186 -15
  40. package/resources/web-scanners.d.mts.map +1 -1
  41. package/resources/web-scanners.d.ts +186 -15
  42. package/resources/web-scanners.d.ts.map +1 -1
  43. package/resources/web-scanners.js +55 -14
  44. package/resources/web-scanners.js.map +1 -1
  45. package/resources/web-scanners.mjs +55 -14
  46. package/resources/web-scanners.mjs.map +1 -1
  47. package/src/client.ts +23 -0
  48. package/src/resources/analytics.ts +98 -0
  49. package/src/resources/consent-settings.ts +16 -0
  50. package/src/resources/funnels.ts +114 -1616
  51. package/src/resources/index.ts +10 -0
  52. package/src/resources/web-scanners.ts +349 -14
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -10,6 +10,12 @@ export {
10
10
  type AllowedEventCreateParams,
11
11
  type AllowedEventUpdateParams,
12
12
  } from './allowed-events';
13
+ export {
14
+ Analytics,
15
+ type AnalyticsQueryCatalogResponse,
16
+ type AnalyticsPropertySuggestionsResponse,
17
+ type AnalyticsPropertySuggestionsParams,
18
+ } from './analytics';
13
19
  export {
14
20
  Attribution,
15
21
  type AttributionInitialResponse,
@@ -445,6 +451,8 @@ export {
445
451
  type WebScannerFindingsResponse,
446
452
  type WebScannerCookiesResponse,
447
453
  type WebScannerSummaryResponse,
454
+ type WebScannerDecisionQueueResponse,
455
+ type WebScannerResolveCoverageGapResponse,
448
456
  type WebScannerCreateParams,
449
457
  type WebScannerUpdateParams,
450
458
  type WebScannerAuthenticatedScanParams,
@@ -454,4 +462,6 @@ export {
454
462
  type WebScannerFindingsParams,
455
463
  type WebScannerCookiesParams,
456
464
  type WebScannerSummaryParams,
465
+ type WebScannerDecisionQueueParams,
466
+ type WebScannerResolveCoverageGapParams,
457
467
  } from './web-scanners';
@@ -182,10 +182,9 @@ export class WebScanners extends APIResource {
182
182
 
183
183
  /**
184
184
  * List the one-page verification runs recorded for this scanner, newest first,
185
- * each with its own capture counts. This is how a fix is compared against the
186
- * attempts before it without reading each run individually. Verification runs are
187
- * isolated from monitor history and never affect inventory counts or the
188
- * monitor-wide last-scanned timestamp. Requires scope: webScanner:find
185
+ * each with its own capture counts. Verification runs are isolated from monitor
186
+ * history and never affect inventory counts or the monitor-wide last-scanned
187
+ * timestamp. Requires scope: webScanner:find
189
188
  *
190
189
  * @example
191
190
  * ```ts
@@ -204,16 +203,18 @@ export class WebScanners extends APIResource {
204
203
 
205
204
  /**
206
205
  * List the third-party trackers (requests) found on a scan run, with their risk,
207
- * category, the pages they were seen on, and whether each host is already covered
208
- * by a CMP consent service. Defaults to the latest run; pass `date` (an ISO-8601
209
- * timestamp; only the calendar day is used to select the run) to read an earlier
210
- * run. Documented exception to the cursor-pagination standard: paginates with
211
- * `limit` and `offset` because each run is an immutable snapshot. A host that is
212
- * neither covered (`coveredByCmp: false`) nor matched by a suppression rule still
213
- * needs a triage decision — resolve it by adding the host to a CMP consent service
214
- * or by creating a suppression rule with `POST /rest/v1/web-scanner-rules`. Use
215
- * `GET /rest/v1/web-scanners/{id}/summary` for the rolled-up counts. Requires
216
- * scope: webScanner:find
206
+ * category, the pages they were seen on, redacted deterministic PII/PHI data-flow
207
+ * metadata, and whether each host is already covered by a CMP consent service.
208
+ * Data-flow findings include only recipient metadata, categories, safe field
209
+ * names, and counts; query and body values are never returned. Defaults to the
210
+ * latest run; pass `date` (an ISO-8601 timestamp; only the calendar day is used to
211
+ * select the run) to read an earlier run. Documented exception to the
212
+ * cursor-pagination standard: paginates with `limit` and `offset` because each run
213
+ * is an immutable snapshot. A host that is neither covered (`coveredByCmp: false`)
214
+ * nor matched by a suppression rule still needs a triage decision — resolve it by
215
+ * adding the host to a CMP consent service or by creating a suppression rule with
216
+ * `POST /rest/v1/web-scanner-rules`. Use `GET /rest/v1/web-scanners/{id}/summary`
217
+ * for the rolled-up counts. Requires scope: webScanner:find
217
218
  *
218
219
  * @example
219
220
  * ```ts
@@ -277,6 +278,56 @@ export class WebScanners extends APIResource {
277
278
  ): APIPromise<WebScannerSummaryResponse> {
278
279
  return this._client.get(path`/rest/v1/web-scanners/${id}/summary`, { query, ...options });
279
280
  }
281
+
282
+ /**
283
+ * List every normalized host in the selected scan run that is neither covered by a
284
+ * current CMP consent service nor matched by an active suppression rule. Results
285
+ * are sorted by risk and hostname. Continue with pagination.nextCursor while
286
+ * preserving runRevision and coverageRevision; changed evidence returns HTTP 400
287
+ * and requires restarting from the first page. Historical runs are evaluated
288
+ * against current coverage configuration. Requires scope: webScanner:find
289
+ *
290
+ * @example
291
+ * ```ts
292
+ * const response = await client.webScanners.decisionQueue(
293
+ * 'id',
294
+ * );
295
+ * ```
296
+ */
297
+ decisionQueue(
298
+ id: string,
299
+ query: WebScannerDecisionQueueParams | null | undefined = {},
300
+ options?: RequestOptions,
301
+ ): APIPromise<WebScannerDecisionQueueResponse> {
302
+ return this._client.get(path`/rest/v1/web-scanners/${id}/decision-queue`, { query, ...options });
303
+ }
304
+
305
+ /**
306
+ * Resolve one hostname from a revision-bound Web Scanner decision queue by
307
+ * creating an exact-host suppression rule. The request is bound to the reviewed
308
+ * run, and retrying the same idempotency key returns the recorded outcome without
309
+ * repeating the write. Requires scope: webScanner:update
310
+ *
311
+ * @example
312
+ * ```ts
313
+ * const response =
314
+ * await client.webScanners.resolveCoverageGap('id', {
315
+ * coverageRevision: 'x',
316
+ * hostname: 'x',
317
+ * idempotencyKey: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
318
+ * runDate: '2019-12-27T18:11:19.117Z',
319
+ * runRevision: 'x',
320
+ * suppression: { reason: 'ignore' },
321
+ * });
322
+ * ```
323
+ */
324
+ resolveCoverageGap(
325
+ id: string,
326
+ body: WebScannerResolveCoverageGapParams,
327
+ options?: RequestOptions,
328
+ ): APIPromise<WebScannerResolveCoverageGapResponse> {
329
+ return this._client.post(path`/rest/v1/web-scanners/${id}/resolve-coverage-gap`, { body, ...options });
330
+ }
280
331
  }
281
332
 
282
333
  export interface WebScannerListResponse {
@@ -776,6 +827,8 @@ export namespace WebScannerFindingsResponse {
776
827
 
777
828
  coveredByVendorLabel?: string | null;
778
829
 
830
+ dataFlow?: Item.DataFlow | null;
831
+
779
832
  displayName?: string | null;
780
833
 
781
834
  privacyKeywords?: Array<string> | null;
@@ -793,6 +846,61 @@ export namespace WebScannerFindingsResponse {
793
846
 
794
847
  value?: string | null;
795
848
  }
849
+
850
+ export interface DataFlow {
851
+ categories: Array<
852
+ | 'credit_card'
853
+ | 'date_of_birth'
854
+ | 'diagnosis'
855
+ | 'email'
856
+ | 'health_condition'
857
+ | 'health_plan_id'
858
+ | 'ip_address'
859
+ | 'medical_record_number'
860
+ | 'medication'
861
+ | 'phone'
862
+ | 'ssn'
863
+ >;
864
+
865
+ recipient: DataFlow.Recipient;
866
+
867
+ requestCount: number;
868
+
869
+ signals: Array<DataFlow.Signal>;
870
+ }
871
+
872
+ export namespace DataFlow {
873
+ export interface Recipient {
874
+ hostname: string;
875
+
876
+ category?: string | null;
877
+
878
+ displayName?: string | null;
879
+
880
+ risk?: string | null;
881
+ }
882
+
883
+ export interface Signal {
884
+ category:
885
+ | 'credit_card'
886
+ | 'date_of_birth'
887
+ | 'diagnosis'
888
+ | 'email'
889
+ | 'health_condition'
890
+ | 'health_plan_id'
891
+ | 'ip_address'
892
+ | 'medical_record_number'
893
+ | 'medication'
894
+ | 'phone'
895
+ | 'ssn';
896
+
897
+ source: 'query_parameter' | 'request_body';
898
+
899
+ encoding?: string | null;
900
+
901
+ field?: string | null;
902
+ }
903
+ }
796
904
  }
797
905
  }
798
906
 
@@ -890,9 +998,13 @@ export interface WebScannerSummaryResponse {
890
998
  */
891
999
  accessibility?: WebScannerSummaryResponse.Accessibility | null;
892
1000
 
1001
+ coverageRevision?: string | null;
1002
+
893
1003
  delta?: WebScannerSummaryResponse.Delta | null;
894
1004
 
895
1005
  runDate?: string | null;
1006
+
1007
+ runRevision?: string | null;
896
1008
  }
897
1009
 
898
1010
  export namespace WebScannerSummaryResponse {
@@ -973,6 +1085,8 @@ export namespace WebScannerSummaryResponse {
973
1085
 
974
1086
  coveredByVendorLabel?: string | null;
975
1087
 
1088
+ dataFlow?: TopUncoveredHost.DataFlow | null;
1089
+
976
1090
  displayName?: string | null;
977
1091
 
978
1092
  privacyKeywords?: Array<string> | null;
@@ -990,6 +1104,61 @@ export namespace WebScannerSummaryResponse {
990
1104
 
991
1105
  value?: string | null;
992
1106
  }
1107
+
1108
+ export interface DataFlow {
1109
+ categories: Array<
1110
+ | 'credit_card'
1111
+ | 'date_of_birth'
1112
+ | 'diagnosis'
1113
+ | 'email'
1114
+ | 'health_condition'
1115
+ | 'health_plan_id'
1116
+ | 'ip_address'
1117
+ | 'medical_record_number'
1118
+ | 'medication'
1119
+ | 'phone'
1120
+ | 'ssn'
1121
+ >;
1122
+
1123
+ recipient: DataFlow.Recipient;
1124
+
1125
+ requestCount: number;
1126
+
1127
+ signals: Array<DataFlow.Signal>;
1128
+ }
1129
+
1130
+ export namespace DataFlow {
1131
+ export interface Recipient {
1132
+ hostname: string;
1133
+
1134
+ category?: string | null;
1135
+
1136
+ displayName?: string | null;
1137
+
1138
+ risk?: string | null;
1139
+ }
1140
+
1141
+ export interface Signal {
1142
+ category:
1143
+ | 'credit_card'
1144
+ | 'date_of_birth'
1145
+ | 'diagnosis'
1146
+ | 'email'
1147
+ | 'health_condition'
1148
+ | 'health_plan_id'
1149
+ | 'ip_address'
1150
+ | 'medical_record_number'
1151
+ | 'medication'
1152
+ | 'phone'
1153
+ | 'ssn';
1154
+
1155
+ source: 'query_parameter' | 'request_body';
1156
+
1157
+ encoding?: string | null;
1158
+
1159
+ field?: string | null;
1160
+ }
1161
+ }
993
1162
  }
994
1163
 
995
1164
  /**
@@ -1066,6 +1235,117 @@ export namespace WebScannerSummaryResponse {
1066
1235
  }
1067
1236
  }
1068
1237
 
1238
+ export interface WebScannerDecisionQueueResponse {
1239
+ entities: Array<WebScannerDecisionQueueResponse.Entity>;
1240
+
1241
+ pagination: WebScannerDecisionQueueResponse.Pagination;
1242
+
1243
+ scannerId: string;
1244
+
1245
+ total: number;
1246
+
1247
+ coverageRevision?: string | null;
1248
+
1249
+ runDate?: string | null;
1250
+
1251
+ runRevision?: string | null;
1252
+ }
1253
+
1254
+ export namespace WebScannerDecisionQueueResponse {
1255
+ export interface Entity {
1256
+ hostname: string;
1257
+
1258
+ seenOn: Array<string>;
1259
+
1260
+ category?: string | null;
1261
+
1262
+ dataFlow?: Entity.DataFlow | null;
1263
+
1264
+ displayName?: string | null;
1265
+
1266
+ risk?: string | null;
1267
+ }
1268
+
1269
+ export namespace Entity {
1270
+ export interface DataFlow {
1271
+ categories: Array<
1272
+ | 'credit_card'
1273
+ | 'date_of_birth'
1274
+ | 'diagnosis'
1275
+ | 'email'
1276
+ | 'health_condition'
1277
+ | 'health_plan_id'
1278
+ | 'ip_address'
1279
+ | 'medical_record_number'
1280
+ | 'medication'
1281
+ | 'phone'
1282
+ | 'ssn'
1283
+ >;
1284
+
1285
+ recipient: DataFlow.Recipient;
1286
+
1287
+ requestCount: number;
1288
+
1289
+ signals: Array<DataFlow.Signal>;
1290
+ }
1291
+
1292
+ export namespace DataFlow {
1293
+ export interface Recipient {
1294
+ hostname: string;
1295
+
1296
+ category?: string | null;
1297
+
1298
+ displayName?: string | null;
1299
+
1300
+ risk?: string | null;
1301
+ }
1302
+
1303
+ export interface Signal {
1304
+ category:
1305
+ | 'credit_card'
1306
+ | 'date_of_birth'
1307
+ | 'diagnosis'
1308
+ | 'email'
1309
+ | 'health_condition'
1310
+ | 'health_plan_id'
1311
+ | 'ip_address'
1312
+ | 'medical_record_number'
1313
+ | 'medication'
1314
+ | 'phone'
1315
+ | 'ssn';
1316
+
1317
+ source: 'query_parameter' | 'request_body';
1318
+
1319
+ encoding?: string | null;
1320
+
1321
+ field?: string | null;
1322
+ }
1323
+ }
1324
+ }
1325
+
1326
+ export interface Pagination {
1327
+ hasMore: boolean;
1328
+
1329
+ nextCursor?: string | null;
1330
+ }
1331
+ }
1332
+
1333
+ export interface WebScannerResolveCoverageGapResponse {
1334
+ committedCoverageRevision: string;
1335
+
1336
+ coverageSource: 'cmp' | 'suppression';
1337
+
1338
+ effectState: 'preexisting_coverage' | 'suppression_active';
1339
+
1340
+ hostname: string;
1341
+
1342
+ status: 'already_resolved' | 'applied' | 'replayed';
1343
+
1344
+ coveredByVendorLabel?: string | null;
1345
+
1346
+ suppressionRuleId?: string | null;
1347
+ }
1348
+
1069
1349
  export interface WebScannerCreateParams {
1070
1350
  /**
1071
1351
  * Root domain to crawl (e.g. `example.com`). Required on create. Missing or empty
@@ -1224,12 +1504,63 @@ export interface WebScannerCookiesParams {
1224
1504
  }
1225
1505
 
1226
1506
  export interface WebScannerSummaryParams {
1507
+ coverageRevision?: string;
1508
+
1509
+ /**
1510
+ * Which scan run to read, as an ISO-8601 timestamp. Only the UTC calendar day is
1511
+ * used to select the run; the time component is ignored. Defaults to the most
1512
+ * recent run when omitted.
1513
+ */
1514
+ date?: string;
1515
+
1516
+ runRevision?: string;
1517
+ }
1518
+
1519
+ export interface WebScannerDecisionQueueParams {
1520
+ coverageRevision?: string;
1521
+
1522
+ /**
1523
+ * Opaque pagination cursor from pagination.nextCursor in the previous response. Do
1524
+ * not decode or modify it. Malformed cursors return 400 Bad Request.
1525
+ */
1526
+ cursor?: string;
1527
+
1227
1528
  /**
1228
1529
  * Which scan run to read, as an ISO-8601 timestamp. Only the UTC calendar day is
1229
1530
  * used to select the run; the time component is ignored. Defaults to the most
1230
1531
  * recent run when omitted.
1231
1532
  */
1232
1533
  date?: string;
1534
+
1535
+ /**
1536
+ * Maximum number of items to return. Defaults to 25; values below 1 are clamped to
1537
+ * 1 and values above 100 are clamped to 100.
1538
+ */
1539
+ limit?: number | null;
1540
+
1541
+ runRevision?: string;
1542
+ }
1543
+
1544
+ export interface WebScannerResolveCoverageGapParams {
1545
+ coverageRevision: string;
1546
+
1547
+ hostname: string;
1548
+
1549
+ idempotencyKey: string;
1550
+
1551
+ runDate: string;
1552
+
1553
+ runRevision: string;
1554
+
1555
+ suppression: WebScannerResolveCoverageGapParams.Suppression;
1556
+ }
1557
+
1558
+ export namespace WebScannerResolveCoverageGapParams {
1559
+ export interface Suppression {
1560
+ reason: 'ignore' | 'baa' | 'internal' | 'approved' | 'compliant' | 'firstParty' | 'other';
1561
+
1562
+ notes?: string | null;
1563
+ }
1233
1564
  }
1234
1565
 
1235
1566
  export declare namespace WebScanners {
@@ -1247,6 +1578,8 @@ export declare namespace WebScanners {
1247
1578
  type WebScannerFindingsResponse as WebScannerFindingsResponse,
1248
1579
  type WebScannerCookiesResponse as WebScannerCookiesResponse,
1249
1580
  type WebScannerSummaryResponse as WebScannerSummaryResponse,
1581
+ type WebScannerDecisionQueueResponse as WebScannerDecisionQueueResponse,
1582
+ type WebScannerResolveCoverageGapResponse as WebScannerResolveCoverageGapResponse,
1250
1583
  type WebScannerCreateParams as WebScannerCreateParams,
1251
1584
  type WebScannerUpdateParams as WebScannerUpdateParams,
1252
1585
  type WebScannerAuthenticatedScanParams as WebScannerAuthenticatedScanParams,
@@ -1256,5 +1589,7 @@ export declare namespace WebScanners {
1256
1589
  type WebScannerFindingsParams as WebScannerFindingsParams,
1257
1590
  type WebScannerCookiesParams as WebScannerCookiesParams,
1258
1591
  type WebScannerSummaryParams as WebScannerSummaryParams,
1592
+ type WebScannerDecisionQueueParams as WebScannerDecisionQueueParams,
1593
+ type WebScannerResolveCoverageGapParams as WebScannerResolveCoverageGapParams,
1259
1594
  };
1260
1595
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.48.0'; // x-release-please-version
1
+ export const VERSION = '1.50.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.48.0";
1
+ export declare const VERSION = "1.50.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.48.0";
1
+ export declare const VERSION = "1.50.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.48.0'; // x-release-please-version
4
+ exports.VERSION = '1.50.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.48.0'; // x-release-please-version
1
+ export const VERSION = '1.50.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map