cloudflare 6.0.0 → 6.1.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 (133) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +1 -1
  3. package/resources/aisearch/instances/instances.d.ts +42 -0
  4. package/resources/aisearch/instances/instances.d.ts.map +1 -1
  5. package/resources/aisearch/instances/instances.js.map +1 -1
  6. package/resources/aisearch/instances/instances.mjs.map +1 -1
  7. package/resources/aisearch/namespaces/instances/instances.d.ts +42 -0
  8. package/resources/aisearch/namespaces/instances/instances.d.ts.map +1 -1
  9. package/resources/aisearch/namespaces/instances/instances.js.map +1 -1
  10. package/resources/aisearch/namespaces/instances/instances.mjs.map +1 -1
  11. package/resources/billing/usage.d.ts +3 -1
  12. package/resources/billing/usage.d.ts.map +1 -1
  13. package/resources/email-security/submissions.d.ts +6 -0
  14. package/resources/email-security/submissions.d.ts.map +1 -1
  15. package/resources/email-security/submissions.js.map +1 -1
  16. package/resources/email-security/submissions.mjs.map +1 -1
  17. package/resources/intel/indicator-feeds/indicator-feeds.d.ts +91 -1
  18. package/resources/intel/indicator-feeds/indicator-feeds.d.ts.map +1 -1
  19. package/resources/intel/indicator-feeds/indicator-feeds.js.map +1 -1
  20. package/resources/intel/indicator-feeds/indicator-feeds.mjs.map +1 -1
  21. package/resources/radar/dns/dns.d.ts +3 -3
  22. package/resources/radar/dns/dns.d.ts.map +1 -1
  23. package/resources/radar/dns/dns.js.map +1 -1
  24. package/resources/radar/dns/dns.mjs.map +1 -1
  25. package/resources/security-center/insights/audit-logs.d.ts +192 -0
  26. package/resources/security-center/insights/audit-logs.d.ts.map +1 -0
  27. package/resources/security-center/insights/audit-logs.js +64 -0
  28. package/resources/security-center/insights/audit-logs.js.map +1 -0
  29. package/resources/security-center/insights/audit-logs.mjs +58 -0
  30. package/resources/security-center/insights/audit-logs.mjs.map +1 -0
  31. package/resources/security-center/insights/class.d.ts +8 -0
  32. package/resources/security-center/insights/class.d.ts.map +1 -1
  33. package/resources/security-center/insights/class.js.map +1 -1
  34. package/resources/security-center/insights/class.mjs.map +1 -1
  35. package/resources/security-center/insights/classification.d.ts +77 -0
  36. package/resources/security-center/insights/classification.d.ts.map +1 -0
  37. package/resources/security-center/insights/classification.js +43 -0
  38. package/resources/security-center/insights/classification.js.map +1 -0
  39. package/resources/security-center/insights/classification.mjs +39 -0
  40. package/resources/security-center/insights/classification.mjs.map +1 -0
  41. package/resources/security-center/insights/context.d.ts +31 -0
  42. package/resources/security-center/insights/context.d.ts.map +1 -0
  43. package/resources/security-center/insights/context.js +26 -0
  44. package/resources/security-center/insights/context.js.map +1 -0
  45. package/resources/security-center/insights/context.mjs +22 -0
  46. package/resources/security-center/insights/context.mjs.map +1 -0
  47. package/resources/security-center/insights/index.d.ts +3 -0
  48. package/resources/security-center/insights/index.d.ts.map +1 -1
  49. package/resources/security-center/insights/index.js +9 -1
  50. package/resources/security-center/insights/index.js.map +1 -1
  51. package/resources/security-center/insights/index.mjs +3 -0
  52. package/resources/security-center/insights/index.mjs.map +1 -1
  53. package/resources/security-center/insights/insights.d.ts +30 -0
  54. package/resources/security-center/insights/insights.d.ts.map +1 -1
  55. package/resources/security-center/insights/insights.js +22 -0
  56. package/resources/security-center/insights/insights.js.map +1 -1
  57. package/resources/security-center/insights/insights.mjs +22 -0
  58. package/resources/security-center/insights/insights.mjs.map +1 -1
  59. package/resources/security-center/insights/severity.d.ts +8 -0
  60. package/resources/security-center/insights/severity.d.ts.map +1 -1
  61. package/resources/security-center/insights/severity.js.map +1 -1
  62. package/resources/security-center/insights/severity.mjs.map +1 -1
  63. package/resources/security-center/insights/type.d.ts +7 -0
  64. package/resources/security-center/insights/type.d.ts.map +1 -1
  65. package/resources/security-center/insights/type.js.map +1 -1
  66. package/resources/security-center/insights/type.mjs.map +1 -1
  67. package/resources/zero-trust/access/logs/access-requests.d.ts +19 -8
  68. package/resources/zero-trust/access/logs/access-requests.d.ts.map +1 -1
  69. package/resources/zero-trust/access/logs/scim/updates.d.ts +20 -8
  70. package/resources/zero-trust/access/logs/scim/updates.d.ts.map +1 -1
  71. package/resources/zero-trust/access/logs/scim/updates.js.map +1 -1
  72. package/resources/zero-trust/access/logs/scim/updates.mjs.map +1 -1
  73. package/resources/zero-trust/devices/deployment-groups.d.ts +203 -0
  74. package/resources/zero-trust/devices/deployment-groups.d.ts.map +1 -0
  75. package/resources/zero-trust/devices/deployment-groups.js +111 -0
  76. package/resources/zero-trust/devices/deployment-groups.js.map +1 -0
  77. package/resources/zero-trust/devices/deployment-groups.mjs +106 -0
  78. package/resources/zero-trust/devices/deployment-groups.mjs.map +1 -0
  79. package/resources/zero-trust/devices/devices.d.ts +4 -0
  80. package/resources/zero-trust/devices/devices.d.ts.map +1 -1
  81. package/resources/zero-trust/devices/devices.js +5 -0
  82. package/resources/zero-trust/devices/devices.js.map +1 -1
  83. package/resources/zero-trust/devices/devices.mjs +5 -0
  84. package/resources/zero-trust/devices/devices.mjs.map +1 -1
  85. package/resources/zero-trust/devices/index.d.ts +1 -0
  86. package/resources/zero-trust/devices/index.d.ts.map +1 -1
  87. package/resources/zero-trust/devices/index.js +4 -1
  88. package/resources/zero-trust/devices/index.js.map +1 -1
  89. package/resources/zero-trust/devices/index.mjs +1 -0
  90. package/resources/zero-trust/devices/index.mjs.map +1 -1
  91. package/resources/zero-trust/identity-providers/scim/groups.d.ts +10 -4
  92. package/resources/zero-trust/identity-providers/scim/groups.d.ts.map +1 -1
  93. package/resources/zero-trust/identity-providers/scim/groups.js.map +1 -1
  94. package/resources/zero-trust/identity-providers/scim/groups.mjs.map +1 -1
  95. package/resources/zero-trust/identity-providers/scim/users.d.ts +10 -4
  96. package/resources/zero-trust/identity-providers/scim/users.d.ts.map +1 -1
  97. package/resources/zero-trust/identity-providers/scim/users.js.map +1 -1
  98. package/resources/zero-trust/identity-providers/scim/users.mjs.map +1 -1
  99. package/resources/zones/settings.d.ts +52 -2
  100. package/resources/zones/settings.d.ts.map +1 -1
  101. package/resources/zones/zones.d.ts +6 -0
  102. package/resources/zones/zones.d.ts.map +1 -1
  103. package/resources/zones/zones.js.map +1 -1
  104. package/resources/zones/zones.mjs.map +1 -1
  105. package/src/resources/aisearch/instances/instances.ts +49 -0
  106. package/src/resources/aisearch/namespaces/instances/instances.ts +49 -0
  107. package/src/resources/billing/usage.ts +3 -1
  108. package/src/resources/email-security/submissions.ts +7 -0
  109. package/src/resources/intel/indicator-feeds/indicator-feeds.ts +107 -1
  110. package/src/resources/radar/dns/dns.ts +7 -4
  111. package/src/resources/security-center/api.md +32 -0
  112. package/src/resources/security-center/insights/audit-logs.ts +313 -0
  113. package/src/resources/security-center/insights/class.ts +8 -0
  114. package/src/resources/security-center/insights/classification.ts +127 -0
  115. package/src/resources/security-center/insights/context.ts +46 -0
  116. package/src/resources/security-center/insights/index.ts +15 -0
  117. package/src/resources/security-center/insights/insights.ts +62 -0
  118. package/src/resources/security-center/insights/severity.ts +8 -0
  119. package/src/resources/security-center/insights/type.ts +7 -0
  120. package/src/resources/zero-trust/access/logs/access-requests.ts +19 -8
  121. package/src/resources/zero-trust/access/logs/scim/updates.ts +20 -8
  122. package/src/resources/zero-trust/api.md +15 -0
  123. package/src/resources/zero-trust/devices/deployment-groups.ts +302 -0
  124. package/src/resources/zero-trust/devices/devices.ts +29 -0
  125. package/src/resources/zero-trust/devices/index.ts +11 -0
  126. package/src/resources/zero-trust/identity-providers/scim/groups.ts +10 -4
  127. package/src/resources/zero-trust/identity-providers/scim/users.ts +10 -4
  128. package/src/resources/zones/settings.ts +60 -0
  129. package/src/resources/zones/zones.ts +7 -0
  130. package/src/version.ts +1 -1
  131. package/version.d.ts +1 -1
  132. package/version.js +1 -1
  133. package/version.mjs +1 -1
@@ -325,6 +325,13 @@ export interface InstanceCreateResponse {
325
325
 
326
326
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
327
327
 
328
+ /**
329
+ * Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
330
+ * (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
331
+ * (72h), 518400 (6d).
332
+ */
333
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
334
+
328
335
  chunk_overlap?: number;
329
336
 
330
337
  chunk_size?: number;
@@ -705,6 +712,13 @@ export interface InstanceUpdateResponse {
705
712
 
706
713
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
707
714
 
715
+ /**
716
+ * Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
717
+ * (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
718
+ * (72h), 518400 (6d).
719
+ */
720
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
721
+
708
722
  chunk_overlap?: number;
709
723
 
710
724
  chunk_size?: number;
@@ -1085,6 +1099,13 @@ export interface InstanceListResponse {
1085
1099
 
1086
1100
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
1087
1101
 
1102
+ /**
1103
+ * Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
1104
+ * (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
1105
+ * (72h), 518400 (6d).
1106
+ */
1107
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
1108
+
1088
1109
  chunk_overlap?: number;
1089
1110
 
1090
1111
  chunk_size?: number;
@@ -1465,6 +1486,13 @@ export interface InstanceDeleteResponse {
1465
1486
 
1466
1487
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
1467
1488
 
1489
+ /**
1490
+ * Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
1491
+ * (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
1492
+ * (72h), 518400 (6d).
1493
+ */
1494
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
1495
+
1468
1496
  chunk_overlap?: number;
1469
1497
 
1470
1498
  chunk_size?: number;
@@ -1915,6 +1943,13 @@ export interface InstanceReadResponse {
1915
1943
 
1916
1944
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
1917
1945
 
1946
+ /**
1947
+ * Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600
1948
+ * (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200
1949
+ * (72h), 518400 (6d).
1950
+ */
1951
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
1952
+
1918
1953
  chunk_overlap?: number;
1919
1954
 
1920
1955
  chunk_size?: number;
@@ -2419,6 +2454,13 @@ export interface InstanceCreateParams {
2419
2454
  */
2420
2455
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
2421
2456
 
2457
+ /**
2458
+ * Body param: Cache entry TTL in seconds. Allowed values: 600 (10min), 1800
2459
+ * (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800
2460
+ * (48h), 259200 (72h), 518400 (6d).
2461
+ */
2462
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
2463
+
2422
2464
  /**
2423
2465
  * Body param
2424
2466
  */
@@ -2852,6 +2894,13 @@ export interface InstanceUpdateParams {
2852
2894
  */
2853
2895
  cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
2854
2896
 
2897
+ /**
2898
+ * Body param: Cache entry TTL in seconds. Allowed values: 600 (10min), 1800
2899
+ * (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800
2900
+ * (48h), 259200 (72h), 518400 (6d).
2901
+ */
2902
+ cache_ttl?: 600 | 1800 | 3600 | 7200 | 21600 | 43200 | 86400 | 172800 | 259200 | 518400;
2903
+
2855
2904
  /**
2856
2905
  * Body param
2857
2906
  */
@@ -57,7 +57,9 @@ export namespace UsagePaygoResponse {
57
57
  ConsumedQuantity: number;
58
58
 
59
59
  /**
60
- * Specifies the unit of measurement for consumed quantity.
60
+ * A display name for the unit of measurement used for the product (for example,
61
+ * "GB-months", "GB-seconds"). May be empty when the unit is implicit in the
62
+ * service name.
61
63
  */
62
64
  ConsumedUnit: string;
63
65
 
@@ -96,6 +96,13 @@ export interface SubmissionListParams extends V4PagePaginationArrayParams {
96
96
  */
97
97
  end?: string;
98
98
 
99
+ /**
100
+ * Query param: When true, return only submissions that were escalated by an end
101
+ * user (vs. by the security team). When false, return only submissions that were
102
+ * not escalated by an end user. When omitted, no filter is applied.
103
+ */
104
+ escalated_from_user?: boolean;
105
+
99
106
  /**
100
107
  * Query param
101
108
  */
@@ -307,6 +307,16 @@ export interface IndicatorFeedGetResponse {
307
307
  */
308
308
  is_public?: boolean;
309
309
 
310
+ /**
311
+ * Summary of indicator counts from the last successful upload to this feed.
312
+ * Populated by the custom-threat-feeds loader at the end of each successful load.
313
+ * Absent (omitted) when no upload has completed successfully or the upload errored
314
+ * before the summary write. Surfaces silent-failure paths so operators can see
315
+ * when their indicators were dropped (popularity allowlist, expired valid_until,
316
+ * etc.) without reading loader logs.
317
+ */
318
+ last_upload_summary?: IndicatorFeedGetResponse.LastUploadSummary;
319
+
310
320
  /**
311
321
  * Status of the latest snapshot uploaded
312
322
  */
@@ -325,7 +335,7 @@ export interface IndicatorFeedGetResponse {
325
335
  /**
326
336
  * The unique identifier for the provider
327
337
  */
328
- provider_id?: string;
338
+ provider_id?: number;
329
339
 
330
340
  /**
331
341
  * The provider of the indicator feed
@@ -333,6 +343,102 @@ export interface IndicatorFeedGetResponse {
333
343
  provider_name?: string;
334
344
  }
335
345
 
346
+ export namespace IndicatorFeedGetResponse {
347
+ /**
348
+ * Summary of indicator counts from the last successful upload to this feed.
349
+ * Populated by the custom-threat-feeds loader at the end of each successful load.
350
+ * Absent (omitted) when no upload has completed successfully or the upload errored
351
+ * before the summary write. Surfaces silent-failure paths so operators can see
352
+ * when their indicators were dropped (popularity allowlist, expired valid_until,
353
+ * etc.) without reading loader logs.
354
+ */
355
+ export interface LastUploadSummary {
356
+ /**
357
+ * Net delta applied to feed indicators by this upload. Snapshot uploads emit both
358
+ * _\_added and _\_removed; delta-add emits only _\_added; delta-remove emits only
359
+ * _\_removed.
360
+ */
361
+ persisted?: LastUploadSummary.Persisted;
362
+
363
+ /**
364
+ * Counts of indicators that were uploaded but did not reach QuickSilver, broken
365
+ * down by reason.
366
+ */
367
+ skipped?: LastUploadSummary.Skipped;
368
+
369
+ /**
370
+ * Indicator counts from the unified file the loader received
371
+ */
372
+ uploaded?: LastUploadSummary.Uploaded;
373
+ }
374
+
375
+ export namespace LastUploadSummary {
376
+ /**
377
+ * Net delta applied to feed indicators by this upload. Snapshot uploads emit both
378
+ * _\_added and _\_removed; delta-add emits only _\_added; delta-remove emits only
379
+ * _\_removed.
380
+ */
381
+ export interface Persisted {
382
+ domains_added?: number;
383
+
384
+ domains_removed?: number;
385
+
386
+ ips_added?: number;
387
+
388
+ ips_removed?: number;
389
+
390
+ urls_added?: number;
391
+
392
+ urls_removed?: number;
393
+ }
394
+
395
+ /**
396
+ * Counts of indicators that were uploaded but did not reach QuickSilver, broken
397
+ * down by reason.
398
+ */
399
+ export interface Skipped {
400
+ /**
401
+ * Domains filtered by the global popularity allowlist at QS provisioning time.
402
+ * Popular domains (bing.com, naver.com, etc.) are protected from
403
+ * custom-threat-feed enforcement.
404
+ */
405
+ allowlisted_domains?: number;
406
+
407
+ /**
408
+ * Indicators in the upload whose valid_until is already in the past. These are not
409
+ * added to QS; the expiration cron handles cleanup.
410
+ */
411
+ expired_indicators?: number;
412
+
413
+ /**
414
+ * Reserved for future use. Currently always 0 — the unifier aborts the entire
415
+ * upload on a single bad indicator.
416
+ */
417
+ invalid_indicators?: number;
418
+ }
419
+
420
+ /**
421
+ * Indicator counts from the unified file the loader received
422
+ */
423
+ export interface Uploaded {
424
+ /**
425
+ * Number of domain indicators in the upload
426
+ */
427
+ domains?: number;
428
+
429
+ /**
430
+ * Number of IP indicators in the upload
431
+ */
432
+ ips?: number;
433
+
434
+ /**
435
+ * Number of URL indicators in the upload
436
+ */
437
+ urls?: number;
438
+ }
439
+ }
440
+ }
441
+
336
442
  export interface IndicatorFeedCreateParams {
337
443
  /**
338
444
  * Path param: Identifier
@@ -186,7 +186,8 @@ export class DNS extends APIResource {
186
186
  | 'QUERY_TYPE'
187
187
  | 'RESPONSE_CODE'
188
188
  | 'RESPONSE_TTL'
189
- | 'TLD',
189
+ | 'TLD'
190
+ | 'TLD_DNS_MAGNITUDE',
190
191
  query?: DNSTimeseriesGroupsV2Params,
191
192
  options?: Core.RequestOptions,
192
193
  ): Core.APIPromise<DNSTimeseriesGroupsV2Response>;
@@ -204,7 +205,8 @@ export class DNS extends APIResource {
204
205
  | 'QUERY_TYPE'
205
206
  | 'RESPONSE_CODE'
206
207
  | 'RESPONSE_TTL'
207
- | 'TLD',
208
+ | 'TLD'
209
+ | 'TLD_DNS_MAGNITUDE',
208
210
  options?: Core.RequestOptions,
209
211
  ): Core.APIPromise<DNSTimeseriesGroupsV2Response>;
210
212
  timeseriesGroupsV2(
@@ -221,7 +223,8 @@ export class DNS extends APIResource {
221
223
  | 'QUERY_TYPE'
222
224
  | 'RESPONSE_CODE'
223
225
  | 'RESPONSE_TTL'
224
- | 'TLD',
226
+ | 'TLD'
227
+ | 'TLD_DNS_MAGNITUDE',
225
228
  query: DNSTimeseriesGroupsV2Params | Core.RequestOptions = {},
226
229
  options?: Core.RequestOptions,
227
230
  ): Core.APIPromise<DNSTimeseriesGroupsV2Response> {
@@ -1213,7 +1216,7 @@ export interface DNSTimeseriesGroupsV2Params {
1213
1216
  * Normalization method applied to the results. Refer to
1214
1217
  * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
1215
1218
  */
1216
- normalization?: 'PERCENTAGE' | 'MIN0_MAX';
1219
+ normalization?: 'PERCENTAGE' | 'MIN0_MAX' | 'RANK';
1217
1220
 
1218
1221
  /**
1219
1222
  * Filters results by DNS transport protocol.
@@ -41,3 +41,35 @@ Types:
41
41
  Methods:
42
42
 
43
43
  - <code title="get /{accounts_or_zones}/{account_or_zone_id}/security-center/insights/type">client.securityCenter.insights.type.<a href="./src/resources/security-center/insights/type.ts">get</a>({ ...params }) -> TypeGetResponse</code>
44
+
45
+ ### AuditLogs
46
+
47
+ Types:
48
+
49
+ - <code><a href="./src/resources/security-center/insights/audit-logs.ts">AuditLogListResponse</a></code>
50
+ - <code><a href="./src/resources/security-center/insights/audit-logs.ts">AuditLogListByInsightResponse</a></code>
51
+
52
+ Methods:
53
+
54
+ - <code title="get /{accounts_or_zones}/{account_or_zone_id}/security-center/insights/audit-log">client.securityCenter.insights.auditLogs.<a href="./src/resources/security-center/insights/audit-logs.ts">list</a>({ ...params }) -> AuditLogListResponsesCursorPagination</code>
55
+ - <code title="get /{accounts_or_zones}/{account_or_zone_id}/security-center/insights/{issue_id}/audit-log">client.securityCenter.insights.auditLogs.<a href="./src/resources/security-center/insights/audit-logs.ts">listByInsight</a>(issueId, { ...params }) -> AuditLogListByInsightResponsesCursorPagination</code>
56
+
57
+ ### Classification
58
+
59
+ Types:
60
+
61
+ - <code><a href="./src/resources/security-center/insights/classification.ts">ClassificationUpdateResponse</a></code>
62
+
63
+ Methods:
64
+
65
+ - <code title="patch /{accounts_or_zones}/{account_or_zone_id}/security-center/insights/{issue_id}/classification">client.securityCenter.insights.classification.<a href="./src/resources/security-center/insights/classification.ts">update</a>(issueId, { ...params }) -> ClassificationUpdateResponse</code>
66
+
67
+ ### Context
68
+
69
+ Types:
70
+
71
+ - <code><a href="./src/resources/security-center/insights/context.ts">ContextGetResponse</a></code>
72
+
73
+ Methods:
74
+
75
+ - <code title="get /accounts/{account_id}/security-center/insights/{issue_id}/context">client.securityCenter.insights.context.<a href="./src/resources/security-center/insights/context.ts">get</a>(issueId, { ...params }) -> ContextGetResponse</code>
@@ -0,0 +1,313 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../resource';
4
+ import { isRequestOptions } from '../../../core';
5
+ import * as Core from '../../../core';
6
+ import { CloudflareError } from '../../../error';
7
+ import { CursorPagination, type CursorPaginationParams } from '../../../pagination';
8
+
9
+ export class AuditLogs extends APIResource {
10
+ /**
11
+ * Lists audit log entries for all Security Center insights in the account or zone,
12
+ * showing changes to insight status and classification.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * // Automatically fetches more pages as needed.
17
+ * for await (const auditLogListResponse of client.securityCenter.insights.auditLogs.list(
18
+ * { account_id: 'account_id' },
19
+ * )) {
20
+ * // ...
21
+ * }
22
+ * ```
23
+ */
24
+ list(
25
+ params?: AuditLogListParams,
26
+ options?: Core.RequestOptions,
27
+ ): Core.PagePromise<AuditLogListResponsesCursorPagination, AuditLogListResponse>;
28
+ list(
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<AuditLogListResponsesCursorPagination, AuditLogListResponse>;
31
+ list(
32
+ params: AuditLogListParams | Core.RequestOptions = {},
33
+ options?: Core.RequestOptions,
34
+ ): Core.PagePromise<AuditLogListResponsesCursorPagination, AuditLogListResponse> {
35
+ if (isRequestOptions(params)) {
36
+ return this.list({}, params);
37
+ }
38
+ const { account_id, zone_id, ...query } = params;
39
+ if (!account_id && !zone_id) {
40
+ throw new CloudflareError('You must provide either account_id or zone_id.');
41
+ }
42
+ if (account_id && zone_id) {
43
+ throw new CloudflareError('You cannot provide both account_id and zone_id.');
44
+ }
45
+ const { accountOrZone, accountOrZoneId } =
46
+ account_id ?
47
+ {
48
+ accountOrZone: 'accounts',
49
+ accountOrZoneId: account_id,
50
+ }
51
+ : {
52
+ accountOrZone: 'zones',
53
+ accountOrZoneId: zone_id,
54
+ };
55
+ return this._client.getAPIList(
56
+ `/${accountOrZone}/${accountOrZoneId}/security-center/insights/audit-log`,
57
+ AuditLogListResponsesCursorPagination,
58
+ { query, ...options },
59
+ );
60
+ }
61
+
62
+ /**
63
+ * Lists audit log entries for a specific Security Center insight, showing changes
64
+ * to its status and classification over time.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * // Automatically fetches more pages as needed.
69
+ * for await (const auditLogListByInsightResponse of client.securityCenter.insights.auditLogs.listByInsight(
70
+ * 'issue_id',
71
+ * { account_id: 'account_id' },
72
+ * )) {
73
+ * // ...
74
+ * }
75
+ * ```
76
+ */
77
+ listByInsight(
78
+ issueId: string,
79
+ params?: AuditLogListByInsightParams,
80
+ options?: Core.RequestOptions,
81
+ ): Core.PagePromise<AuditLogListByInsightResponsesCursorPagination, AuditLogListByInsightResponse>;
82
+ listByInsight(
83
+ issueId: string,
84
+ options?: Core.RequestOptions,
85
+ ): Core.PagePromise<AuditLogListByInsightResponsesCursorPagination, AuditLogListByInsightResponse>;
86
+ listByInsight(
87
+ issueId: string,
88
+ params: AuditLogListByInsightParams | Core.RequestOptions = {},
89
+ options?: Core.RequestOptions,
90
+ ): Core.PagePromise<AuditLogListByInsightResponsesCursorPagination, AuditLogListByInsightResponse> {
91
+ if (isRequestOptions(params)) {
92
+ return this.listByInsight(issueId, {}, params);
93
+ }
94
+ const { account_id, zone_id, ...query } = params;
95
+ if (!account_id && !zone_id) {
96
+ throw new CloudflareError('You must provide either account_id or zone_id.');
97
+ }
98
+ if (account_id && zone_id) {
99
+ throw new CloudflareError('You cannot provide both account_id and zone_id.');
100
+ }
101
+ const { accountOrZone, accountOrZoneId } =
102
+ account_id ?
103
+ {
104
+ accountOrZone: 'accounts',
105
+ accountOrZoneId: account_id,
106
+ }
107
+ : {
108
+ accountOrZone: 'zones',
109
+ accountOrZoneId: zone_id,
110
+ };
111
+ return this._client.getAPIList(
112
+ `/${accountOrZone}/${accountOrZoneId}/security-center/insights/${issueId}/audit-log`,
113
+ AuditLogListByInsightResponsesCursorPagination,
114
+ { query, ...options },
115
+ );
116
+ }
117
+ }
118
+
119
+ export class AuditLogListResponsesCursorPagination extends CursorPagination<AuditLogListResponse> {}
120
+
121
+ export class AuditLogListByInsightResponsesCursorPagination extends CursorPagination<AuditLogListByInsightResponse> {}
122
+
123
+ export interface AuditLogListResponse {
124
+ /**
125
+ * UUIDv7 identifier for the audit log entry, time-ordered.
126
+ */
127
+ id?: string;
128
+
129
+ /**
130
+ * The timestamp when the change occurred.
131
+ */
132
+ changed_at?: string;
133
+
134
+ /**
135
+ * The actor that made the change. 'system' for automated changes, or a user
136
+ * identifier.
137
+ */
138
+ changed_by?: string;
139
+
140
+ /**
141
+ * The value of the field after the change. Null if the field was cleared.
142
+ */
143
+ current_value?: string | null;
144
+
145
+ /**
146
+ * The field that was changed.
147
+ */
148
+ field_changed?: 'status' | 'user_classification';
149
+
150
+ /**
151
+ * The ID of the insight this audit log entry relates to.
152
+ */
153
+ issue_id?: string;
154
+
155
+ /**
156
+ * The value of the field before the change. Null if the field was not previously
157
+ * set.
158
+ */
159
+ previous_value?: string | null;
160
+
161
+ /**
162
+ * Optional rationale provided for the change.
163
+ */
164
+ rationale?: string | null;
165
+
166
+ /**
167
+ * The zone ID associated with the insight. Only present for zone-level insights.
168
+ */
169
+ zone_id?: number;
170
+ }
171
+
172
+ export interface AuditLogListByInsightResponse {
173
+ /**
174
+ * UUIDv7 identifier for the audit log entry, time-ordered.
175
+ */
176
+ id?: string;
177
+
178
+ /**
179
+ * The timestamp when the change occurred.
180
+ */
181
+ changed_at?: string;
182
+
183
+ /**
184
+ * The actor that made the change. 'system' for automated changes, or a user
185
+ * identifier.
186
+ */
187
+ changed_by?: string;
188
+
189
+ /**
190
+ * The value of the field after the change. Null if the field was cleared.
191
+ */
192
+ current_value?: string | null;
193
+
194
+ /**
195
+ * The field that was changed.
196
+ */
197
+ field_changed?: 'status' | 'user_classification';
198
+
199
+ /**
200
+ * The ID of the insight this audit log entry relates to.
201
+ */
202
+ issue_id?: string;
203
+
204
+ /**
205
+ * The value of the field before the change. Null if the field was not previously
206
+ * set.
207
+ */
208
+ previous_value?: string | null;
209
+
210
+ /**
211
+ * Optional rationale provided for the change.
212
+ */
213
+ rationale?: string | null;
214
+
215
+ /**
216
+ * The zone ID associated with the insight. Only present for zone-level insights.
217
+ */
218
+ zone_id?: number;
219
+ }
220
+
221
+ export interface AuditLogListParams extends CursorPaginationParams {
222
+ /**
223
+ * Path param: The Account ID to use for this endpoint. Mutually exclusive with the
224
+ * Zone ID.
225
+ */
226
+ account_id?: string;
227
+
228
+ /**
229
+ * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
230
+ * Account ID.
231
+ */
232
+ zone_id?: string;
233
+
234
+ /**
235
+ * Query param: Filter entries changed before this timestamp (RFC 3339).
236
+ */
237
+ before?: string;
238
+
239
+ /**
240
+ * Query param: Filter by the actor that made the change.
241
+ */
242
+ changed_by?: string;
243
+
244
+ /**
245
+ * Query param: Filter by the field that was changed.
246
+ */
247
+ field_changed?: 'status' | 'user_classification';
248
+
249
+ /**
250
+ * Query param: Sort order for results. Use 'asc' for oldest first or 'desc' for
251
+ * newest first.
252
+ */
253
+ order?: 'asc' | 'desc';
254
+
255
+ /**
256
+ * Query param: Filter entries changed at or after this timestamp (RFC 3339).
257
+ */
258
+ since?: string;
259
+ }
260
+
261
+ export interface AuditLogListByInsightParams extends CursorPaginationParams {
262
+ /**
263
+ * Path param: The Account ID to use for this endpoint. Mutually exclusive with the
264
+ * Zone ID.
265
+ */
266
+ account_id?: string;
267
+
268
+ /**
269
+ * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the
270
+ * Account ID.
271
+ */
272
+ zone_id?: string;
273
+
274
+ /**
275
+ * Query param: Filter entries changed before this timestamp (RFC 3339).
276
+ */
277
+ before?: string;
278
+
279
+ /**
280
+ * Query param: Filter by the actor that made the change.
281
+ */
282
+ changed_by?: string;
283
+
284
+ /**
285
+ * Query param: Filter by the field that was changed.
286
+ */
287
+ field_changed?: 'status' | 'user_classification';
288
+
289
+ /**
290
+ * Query param: Sort order for results. Use 'asc' for oldest first or 'desc' for
291
+ * newest first.
292
+ */
293
+ order?: 'asc' | 'desc';
294
+
295
+ /**
296
+ * Query param: Filter entries changed at or after this timestamp (RFC 3339).
297
+ */
298
+ since?: string;
299
+ }
300
+
301
+ AuditLogs.AuditLogListResponsesCursorPagination = AuditLogListResponsesCursorPagination;
302
+ AuditLogs.AuditLogListByInsightResponsesCursorPagination = AuditLogListByInsightResponsesCursorPagination;
303
+
304
+ export declare namespace AuditLogs {
305
+ export {
306
+ type AuditLogListResponse as AuditLogListResponse,
307
+ type AuditLogListByInsightResponse as AuditLogListByInsightResponse,
308
+ AuditLogListResponsesCursorPagination as AuditLogListResponsesCursorPagination,
309
+ AuditLogListByInsightResponsesCursorPagination as AuditLogListByInsightResponsesCursorPagination,
310
+ type AuditLogListParams as AuditLogListParams,
311
+ type AuditLogListByInsightParams as AuditLogListByInsightParams,
312
+ };
313
+ }
@@ -9,6 +9,14 @@ import { CloudflareError } from '../../../error';
9
9
  export class Class extends APIResource {
10
10
  /**
11
11
  * Retrieves Security Center insight counts aggregated by classification class.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const classes =
16
+ * await client.securityCenter.insights.class.get({
17
+ * account_id: 'account_id',
18
+ * });
19
+ * ```
12
20
  */
13
21
  get(params?: ClassGetParams, options?: Core.RequestOptions): Core.APIPromise<ClassGetResponse>;
14
22
  get(options?: Core.RequestOptions): Core.APIPromise<ClassGetResponse>;