@oursprivacy/platform-sdk 1.49.0 → 1.51.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 (122) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +15 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +15 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -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/destinations.d.mts +7 -7
  24. package/resources/destinations.d.mts.map +1 -1
  25. package/resources/destinations.d.ts +7 -7
  26. package/resources/destinations.d.ts.map +1 -1
  27. package/resources/experiments.d.mts +661 -35
  28. package/resources/experiments.d.mts.map +1 -1
  29. package/resources/experiments.d.ts +661 -35
  30. package/resources/experiments.d.ts.map +1 -1
  31. package/resources/experiments.js +27 -19
  32. package/resources/experiments.js.map +1 -1
  33. package/resources/experiments.mjs +27 -19
  34. package/resources/experiments.mjs.map +1 -1
  35. package/resources/funnels.d.mts +88 -980
  36. package/resources/funnels.d.mts.map +1 -1
  37. package/resources/funnels.d.ts +88 -980
  38. package/resources/funnels.d.ts.map +1 -1
  39. package/resources/funnels.js +24 -19
  40. package/resources/funnels.js.map +1 -1
  41. package/resources/funnels.mjs +24 -19
  42. package/resources/funnels.mjs.map +1 -1
  43. package/resources/index.d.mts +6 -3
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +6 -3
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +7 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +3 -0
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/journey-flows.d.mts +4155 -0
  52. package/resources/journey-flows.d.mts.map +1 -0
  53. package/resources/journey-flows.d.ts +4155 -0
  54. package/resources/journey-flows.d.ts.map +1 -0
  55. package/resources/journey-flows.js +90 -0
  56. package/resources/journey-flows.js.map +1 -0
  57. package/resources/journey-flows.mjs +86 -0
  58. package/resources/journey-flows.mjs.map +1 -0
  59. package/resources/short-links.d.mts +40 -0
  60. package/resources/short-links.d.mts.map +1 -1
  61. package/resources/short-links.d.ts +40 -0
  62. package/resources/short-links.d.ts.map +1 -1
  63. package/resources/sources.d.mts +20 -0
  64. package/resources/sources.d.mts.map +1 -1
  65. package/resources/sources.d.ts +20 -0
  66. package/resources/sources.d.ts.map +1 -1
  67. package/resources/test-events.d.mts +203 -0
  68. package/resources/test-events.d.mts.map +1 -0
  69. package/resources/test-events.d.ts +203 -0
  70. package/resources/test-events.d.ts.map +1 -0
  71. package/resources/test-events.js +87 -0
  72. package/resources/test-events.js.map +1 -0
  73. package/resources/test-events.mjs +83 -0
  74. package/resources/test-events.mjs.map +1 -0
  75. package/resources/video-channels.d.mts +13 -0
  76. package/resources/video-channels.d.mts.map +1 -1
  77. package/resources/video-channels.d.ts +13 -0
  78. package/resources/video-channels.d.ts.map +1 -1
  79. package/resources/videos.d.mts +160 -2
  80. package/resources/videos.d.mts.map +1 -1
  81. package/resources/videos.d.ts +160 -2
  82. package/resources/videos.d.ts.map +1 -1
  83. package/resources/videos.js +32 -2
  84. package/resources/videos.js.map +1 -1
  85. package/resources/videos.mjs +32 -2
  86. package/resources/videos.mjs.map +1 -1
  87. package/resources/web-analytics.d.mts +9 -9
  88. package/resources/web-analytics.d.mts.map +1 -1
  89. package/resources/web-analytics.d.ts +9 -9
  90. package/resources/web-analytics.d.ts.map +1 -1
  91. package/resources/web-analytics.js +2 -2
  92. package/resources/web-analytics.js.map +1 -1
  93. package/resources/web-analytics.mjs +2 -2
  94. package/resources/web-analytics.mjs.map +1 -1
  95. package/resources/web-scanners.d.mts +156 -17
  96. package/resources/web-scanners.d.mts.map +1 -1
  97. package/resources/web-scanners.d.ts +156 -17
  98. package/resources/web-scanners.d.ts.map +1 -1
  99. package/resources/web-scanners.js +59 -14
  100. package/resources/web-scanners.js.map +1 -1
  101. package/resources/web-scanners.mjs +59 -14
  102. package/resources/web-scanners.mjs.map +1 -1
  103. package/src/client.ts +103 -4
  104. package/src/resources/analytics.ts +98 -0
  105. package/src/resources/consent-settings.ts +16 -0
  106. package/src/resources/destinations.ts +7 -0
  107. package/src/resources/experiments.ts +808 -35
  108. package/src/resources/funnels.ts +114 -1616
  109. package/src/resources/index.ts +47 -2
  110. package/src/resources/journey-flows.ts +8244 -0
  111. package/src/resources/short-links.ts +47 -0
  112. package/src/resources/sources.ts +24 -0
  113. package/src/resources/test-events.ts +286 -0
  114. package/src/resources/video-channels.ts +22 -0
  115. package/src/resources/videos.ts +279 -2
  116. package/src/resources/web-analytics.ts +13 -13
  117. package/src/resources/web-scanners.ts +247 -16
  118. package/src/version.ts +1 -1
  119. package/version.d.mts +1 -1
  120. package/version.d.ts +1 -1
  121. package/version.js +1 -1
  122. package/version.mjs +1 -1
@@ -21,12 +21,16 @@ export class WebScanners extends APIResource {
21
21
  }
22
22
 
23
23
  /**
24
- * Create a new web scanner for a root domain. A first scan is enqueued
25
- * automatically after creation on a best-effort basis. `rootDomain` is required;
26
- * missing, empty, or malformed values are rejected as HTTP 400. Everything else
27
- * falls back to defaults (`status: Enabled`, `urlLimit: 100`, no excluded
28
- * patterns, no extra seed URLs). The returned entity is the created scanner row
29
- * and may not yet reflect async scan-state changes. Requires scope:
24
+ * Create a new web scanner for a root domain. Call GET /rest/v1/web-scanners first
25
+ * to check for an existing scanner: each successful request creates a new scanner,
26
+ * even when the root domain is already used. If the response is ambiguous, check
27
+ * the list before retrying to avoid creating a duplicate. A first scan is enqueued
28
+ * automatically after creation on a best-effort basis; the returned entity may not
29
+ * yet reflect asynchronous scan-state changes. `rootDomain` is required; missing,
30
+ * empty, or malformed values are rejected as HTTP 400. Everything else falls back
31
+ * to defaults (`status: Enabled`, `urlLimit: 100`, `scanSchedule: weekly`, no
32
+ * excluded patterns, no extra seed URLs). Invalid configuration or account limits
33
+ * return HTTP 409. Requires scope: `webScanner:create`. Requires scope:
30
34
  * webScanner:create
31
35
  *
32
36
  * @example
@@ -205,14 +209,15 @@ export class WebScanners extends APIResource {
205
209
  * List the third-party trackers (requests) found on a scan run, with their risk,
206
210
  * category, the pages they were seen on, redacted deterministic PII/PHI data-flow
207
211
  * 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
212
+ * Data-flow findings include only recipient metadata, categories, source
213
+ * locations, safe query/body field names when available, and counts; matched
214
+ * query, body, and pathname values are never returned. Defaults to the latest run;
215
+ * pass `date` (an ISO-8601 timestamp; only the calendar day is used to select the
216
+ * run) to read an earlier run. Documented exception to the cursor-pagination
217
+ * standard: paginates with `limit` and `offset` because each run is an immutable
218
+ * snapshot. A host that is neither covered (`coveredByCmp: false`) nor matched by
219
+ * a suppression rule still needs a triage decision — resolve it by adding the host
220
+ * to a CMP consent service or by creating a suppression rule with
216
221
  * `POST /rest/v1/web-scanner-rules`. Use `GET /rest/v1/web-scanners/{id}/summary`
217
222
  * for the rolled-up counts. Requires scope: webScanner:find
218
223
  *
@@ -278,6 +283,56 @@ export class WebScanners extends APIResource {
278
283
  ): APIPromise<WebScannerSummaryResponse> {
279
284
  return this._client.get(path`/rest/v1/web-scanners/${id}/summary`, { query, ...options });
280
285
  }
286
+
287
+ /**
288
+ * List every normalized host in the selected scan run that is neither covered by a
289
+ * current CMP consent service nor matched by an active suppression rule. Results
290
+ * are sorted by risk and hostname. Continue with pagination.nextCursor while
291
+ * preserving runRevision and coverageRevision; changed evidence returns HTTP 400
292
+ * and requires restarting from the first page. Historical runs are evaluated
293
+ * against current coverage configuration. Requires scope: webScanner:find
294
+ *
295
+ * @example
296
+ * ```ts
297
+ * const response = await client.webScanners.decisionQueue(
298
+ * 'id',
299
+ * );
300
+ * ```
301
+ */
302
+ decisionQueue(
303
+ id: string,
304
+ query: WebScannerDecisionQueueParams | null | undefined = {},
305
+ options?: RequestOptions,
306
+ ): APIPromise<WebScannerDecisionQueueResponse> {
307
+ return this._client.get(path`/rest/v1/web-scanners/${id}/decision-queue`, { query, ...options });
308
+ }
309
+
310
+ /**
311
+ * Resolve one hostname from a revision-bound Web Scanner decision queue by
312
+ * creating an exact-host suppression rule. The request is bound to the reviewed
313
+ * run, and retrying the same idempotency key returns the recorded outcome without
314
+ * repeating the write. Requires scope: webScanner:update
315
+ *
316
+ * @example
317
+ * ```ts
318
+ * const response =
319
+ * await client.webScanners.resolveCoverageGap('id', {
320
+ * coverageRevision: 'x',
321
+ * hostname: 'x',
322
+ * idempotencyKey: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
323
+ * runDate: '2019-12-27T18:11:19.117Z',
324
+ * runRevision: 'x',
325
+ * suppression: { reason: 'ignore' },
326
+ * });
327
+ * ```
328
+ */
329
+ resolveCoverageGap(
330
+ id: string,
331
+ body: WebScannerResolveCoverageGapParams,
332
+ options?: RequestOptions,
333
+ ): APIPromise<WebScannerResolveCoverageGapResponse> {
334
+ return this._client.post(path`/rest/v1/web-scanners/${id}/resolve-coverage-gap`, { body, ...options });
335
+ }
281
336
  }
282
337
 
283
338
  export interface WebScannerListResponse {
@@ -844,7 +899,7 @@ export namespace WebScannerFindingsResponse {
844
899
  | 'phone'
845
900
  | 'ssn';
846
901
 
847
- source: 'query_parameter' | 'request_body';
902
+ source: 'query_parameter' | 'request_body' | 'url_path';
848
903
 
849
904
  encoding?: string | null;
850
905
 
@@ -948,9 +1003,13 @@ export interface WebScannerSummaryResponse {
948
1003
  */
949
1004
  accessibility?: WebScannerSummaryResponse.Accessibility | null;
950
1005
 
1006
+ coverageRevision?: string | null;
1007
+
951
1008
  delta?: WebScannerSummaryResponse.Delta | null;
952
1009
 
953
1010
  runDate?: string | null;
1011
+
1012
+ runRevision?: string | null;
954
1013
  }
955
1014
 
956
1015
  export namespace WebScannerSummaryResponse {
@@ -1098,7 +1157,7 @@ export namespace WebScannerSummaryResponse {
1098
1157
  | 'phone'
1099
1158
  | 'ssn';
1100
1159
 
1101
- source: 'query_parameter' | 'request_body';
1160
+ source: 'query_parameter' | 'request_body' | 'url_path';
1102
1161
 
1103
1162
  encoding?: string | null;
1104
1163
 
@@ -1181,6 +1240,117 @@ export namespace WebScannerSummaryResponse {
1181
1240
  }
1182
1241
  }
1183
1242
 
1243
+ export interface WebScannerDecisionQueueResponse {
1244
+ entities: Array<WebScannerDecisionQueueResponse.Entity>;
1245
+
1246
+ pagination: WebScannerDecisionQueueResponse.Pagination;
1247
+
1248
+ scannerId: string;
1249
+
1250
+ total: number;
1251
+
1252
+ coverageRevision?: string | null;
1253
+
1254
+ runDate?: string | null;
1255
+
1256
+ runRevision?: string | null;
1257
+ }
1258
+
1259
+ export namespace WebScannerDecisionQueueResponse {
1260
+ export interface Entity {
1261
+ hostname: string;
1262
+
1263
+ seenOn: Array<string>;
1264
+
1265
+ category?: string | null;
1266
+
1267
+ dataFlow?: Entity.DataFlow | null;
1268
+
1269
+ displayName?: string | null;
1270
+
1271
+ risk?: string | null;
1272
+ }
1273
+
1274
+ export namespace Entity {
1275
+ export interface DataFlow {
1276
+ categories: Array<
1277
+ | 'credit_card'
1278
+ | 'date_of_birth'
1279
+ | 'diagnosis'
1280
+ | 'email'
1281
+ | 'health_condition'
1282
+ | 'health_plan_id'
1283
+ | 'ip_address'
1284
+ | 'medical_record_number'
1285
+ | 'medication'
1286
+ | 'phone'
1287
+ | 'ssn'
1288
+ >;
1289
+
1290
+ recipient: DataFlow.Recipient;
1291
+
1292
+ requestCount: number;
1293
+
1294
+ signals: Array<DataFlow.Signal>;
1295
+ }
1296
+
1297
+ export namespace DataFlow {
1298
+ export interface Recipient {
1299
+ hostname: string;
1300
+
1301
+ category?: string | null;
1302
+
1303
+ displayName?: string | null;
1304
+
1305
+ risk?: string | null;
1306
+ }
1307
+
1308
+ export interface Signal {
1309
+ category:
1310
+ | 'credit_card'
1311
+ | 'date_of_birth'
1312
+ | 'diagnosis'
1313
+ | 'email'
1314
+ | 'health_condition'
1315
+ | 'health_plan_id'
1316
+ | 'ip_address'
1317
+ | 'medical_record_number'
1318
+ | 'medication'
1319
+ | 'phone'
1320
+ | 'ssn';
1321
+
1322
+ source: 'query_parameter' | 'request_body' | 'url_path';
1323
+
1324
+ encoding?: string | null;
1325
+
1326
+ field?: string | null;
1327
+ }
1328
+ }
1329
+ }
1330
+
1331
+ export interface Pagination {
1332
+ hasMore: boolean;
1333
+
1334
+ nextCursor?: string | null;
1335
+ }
1336
+ }
1337
+
1338
+ export interface WebScannerResolveCoverageGapResponse {
1339
+ committedCoverageRevision: string;
1340
+
1341
+ coverageSource: 'cmp' | 'suppression';
1342
+
1343
+ effectState: 'preexisting_coverage' | 'suppression_active';
1344
+
1345
+ hostname: string;
1346
+
1347
+ status: 'already_resolved' | 'applied' | 'replayed';
1348
+
1349
+ coveredByVendorLabel?: string | null;
1350
+
1351
+ suppressionRuleId?: string | null;
1352
+ }
1353
+
1184
1354
  export interface WebScannerCreateParams {
1185
1355
  /**
1186
1356
  * Root domain to crawl (e.g. `example.com`). Required on create. Missing or empty
@@ -1200,6 +1370,9 @@ export interface WebScannerCreateParams {
1200
1370
  */
1201
1371
  includedUrls?: Array<string> | null;
1202
1372
 
1373
+ /**
1374
+ * Optional display name for this web scanner.
1375
+ */
1203
1376
  name?: string | null;
1204
1377
 
1205
1378
  /**
@@ -1210,6 +1383,9 @@ export interface WebScannerCreateParams {
1210
1383
  */
1211
1384
  scanSchedule?: 'daily' | 'manual' | 'monthly' | 'weekly';
1212
1385
 
1386
+ /**
1387
+ * Whether this web scanner is enabled. Defaults to `Enabled`.
1388
+ */
1213
1389
  status?: 'Disabled' | 'Enabled';
1214
1390
 
1215
1391
  /**
@@ -1339,12 +1515,63 @@ export interface WebScannerCookiesParams {
1339
1515
  }
1340
1516
 
1341
1517
  export interface WebScannerSummaryParams {
1518
+ coverageRevision?: string;
1519
+
1342
1520
  /**
1343
1521
  * Which scan run to read, as an ISO-8601 timestamp. Only the UTC calendar day is
1344
1522
  * used to select the run; the time component is ignored. Defaults to the most
1345
1523
  * recent run when omitted.
1346
1524
  */
1347
1525
  date?: string;
1526
+
1527
+ runRevision?: string;
1528
+ }
1529
+
1530
+ export interface WebScannerDecisionQueueParams {
1531
+ coverageRevision?: string;
1532
+
1533
+ /**
1534
+ * Opaque pagination cursor from pagination.nextCursor in the previous response. Do
1535
+ * not decode or modify it. Malformed cursors return 400 Bad Request.
1536
+ */
1537
+ cursor?: string;
1538
+
1539
+ /**
1540
+ * Which scan run to read, as an ISO-8601 timestamp. Only the UTC calendar day is
1541
+ * used to select the run; the time component is ignored. Defaults to the most
1542
+ * recent run when omitted.
1543
+ */
1544
+ date?: string;
1545
+
1546
+ /**
1547
+ * Maximum number of items to return. Defaults to 25; values below 1 are clamped to
1548
+ * 1 and values above 100 are clamped to 100.
1549
+ */
1550
+ limit?: number | null;
1551
+
1552
+ runRevision?: string;
1553
+ }
1554
+
1555
+ export interface WebScannerResolveCoverageGapParams {
1556
+ coverageRevision: string;
1557
+
1558
+ hostname: string;
1559
+
1560
+ idempotencyKey: string;
1561
+
1562
+ runDate: string;
1563
+
1564
+ runRevision: string;
1565
+
1566
+ suppression: WebScannerResolveCoverageGapParams.Suppression;
1567
+ }
1568
+
1569
+ export namespace WebScannerResolveCoverageGapParams {
1570
+ export interface Suppression {
1571
+ reason: 'ignore' | 'baa' | 'internal' | 'approved' | 'compliant' | 'firstParty' | 'other';
1572
+
1573
+ notes?: string | null;
1574
+ }
1348
1575
  }
1349
1576
 
1350
1577
  export declare namespace WebScanners {
@@ -1362,6 +1589,8 @@ export declare namespace WebScanners {
1362
1589
  type WebScannerFindingsResponse as WebScannerFindingsResponse,
1363
1590
  type WebScannerCookiesResponse as WebScannerCookiesResponse,
1364
1591
  type WebScannerSummaryResponse as WebScannerSummaryResponse,
1592
+ type WebScannerDecisionQueueResponse as WebScannerDecisionQueueResponse,
1593
+ type WebScannerResolveCoverageGapResponse as WebScannerResolveCoverageGapResponse,
1365
1594
  type WebScannerCreateParams as WebScannerCreateParams,
1366
1595
  type WebScannerUpdateParams as WebScannerUpdateParams,
1367
1596
  type WebScannerAuthenticatedScanParams as WebScannerAuthenticatedScanParams,
@@ -1371,5 +1600,7 @@ export declare namespace WebScanners {
1371
1600
  type WebScannerFindingsParams as WebScannerFindingsParams,
1372
1601
  type WebScannerCookiesParams as WebScannerCookiesParams,
1373
1602
  type WebScannerSummaryParams as WebScannerSummaryParams,
1603
+ type WebScannerDecisionQueueParams as WebScannerDecisionQueueParams,
1604
+ type WebScannerResolveCoverageGapParams as WebScannerResolveCoverageGapParams,
1374
1605
  };
1375
1606
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.49.0'; // x-release-please-version
1
+ export const VERSION = '1.51.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.49.0";
1
+ export declare const VERSION = "1.51.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.49.0";
1
+ export declare const VERSION = "1.51.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.49.0'; // x-release-please-version
4
+ exports.VERSION = '1.51.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.49.0'; // x-release-please-version
1
+ export const VERSION = '1.51.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map