From fef83d34a5f110f78c0003b2bcec9e5b4c7138ac Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 21 Feb 2024 21:09:45 +0000
Subject: [PATCH] feat: update via SDK Studio (#61)
---
.stats.yml | 2 +-
api.md | 233 ++++-
src/resources/cache/cache-reserve.ts | 96 +++
src/resources/cache/cache.ts | 2 +
src/resources/cache/index.ts | 2 +
.../radar/annotations/annotations.ts | 2 +
src/resources/radar/annotations/index.ts | 8 +-
src/resources/radar/annotations/outages.ts | 143 ++++
src/resources/radar/attacks/layer7/index.ts | 32 +-
src/resources/radar/attacks/layer7/layer7.ts | 121 ++-
src/resources/radar/attacks/layer7/summary.ts | 601 +++++++++----
.../radar/attacks/layer7/timeseries-groups.ts | 808 +++++++++++++-----
.../radar/attacks/layer7/top/ases.ts | 155 ++++
.../radar/attacks/layer7/top/index.ts | 1 +
.../radar/attacks/layer7/top/locations.ts | 53 +-
src/resources/radar/attacks/layer7/top/top.ts | 75 +-
src/resources/radar/bgp/bgp.ts | 8 +-
src/resources/radar/bgp/index.ts | 2 +-
src/resources/radar/bgp/top/ases.ts | 204 +++++
src/resources/radar/bgp/top/index.ts | 4 +
src/resources/radar/bgp/top/top.ts | 135 +++
src/resources/radar/bgp/tops/ases.ts | 77 --
src/resources/radar/bgp/tops/index.ts | 4 -
src/resources/radar/bgp/tops/tops.ts | 14 -
src/resources/radar/email/security/index.ts | 1 +
.../radar/email/security/security.ts | 3 +
.../radar/email/security/top/ases/arc.ts | 179 ++++
.../radar/email/security/top/ases/ases.ts | 210 +++++
.../radar/email/security/top/ases/dkim.ts | 179 ++++
.../radar/email/security/top/ases/dmarc.ts | 179 ++++
.../radar/email/security/top/ases/index.ts | 9 +
.../email/security/top/ases/malicious.ts | 187 ++++
.../radar/email/security/top/ases/spam.ts | 184 ++++
.../radar/email/security/top/ases/spf.ts | 179 ++++
.../radar/email/security/top/index.ts | 5 +
.../radar/email/security/top/locations/arc.ts | 179 ++++
.../email/security/top/locations/dkim.ts | 179 ++++
.../email/security/top/locations/dmarc.ts | 179 ++++
.../email/security/top/locations/index.ts | 9 +
.../email/security/top/locations/locations.ts | 210 +++++
.../email/security/top/locations/malicious.ts | 187 ++++
.../email/security/top/locations/spam.ts | 184 ++++
.../radar/email/security/top/locations/spf.ts | 179 ++++
src/resources/radar/email/security/top/top.ts | 19 +
src/resources/radar/quality/index.ts | 8 +-
src/resources/radar/quality/iqi.ts | 118 +++
src/resources/radar/quality/quality.ts | 2 +
src/resources/request-tracers/index.ts | 2 +-
.../request-tracers/request-tracers.ts | 1 +
src/resources/request-tracers/traces.ts | 83 +-
.../api-resources/cache/cache-reserve.test.ts | 34 +
.../radar/annotations/outages.test.ts | 40 +
.../radar/attacks/layer7/layer7.test.ts | 5 +-
.../radar/attacks/layer7/summary.test.ts | 88 +-
.../attacks/layer7/timeseries-groups.test.ts | 103 ++-
.../radar/attacks/layer7/top/ases.test.ts | 54 ++
.../attacks/layer7/top/locations.test.ts | 7 +-
.../radar/attacks/layer7/top/top.test.ts | 10 +-
.../api-resources/radar/bgp/top/ases.test.ts | 87 ++
.../{tops/ases.test.ts => top/top.test.ts} | 23 +-
.../radar/email/security/top/ases/arc.test.ts | 59 ++
.../email/security/top/ases/ases.test.ts | 59 ++
.../email/security/top/ases/dkim.test.ts | 59 ++
.../email/security/top/ases/dmarc.test.ts | 59 ++
.../email/security/top/ases/malicious.test.ts | 62 ++
.../email/security/top/ases/spam.test.ts | 60 ++
.../radar/email/security/top/ases/spf.test.ts | 59 ++
.../email/security/top/locations/arc.test.ts | 59 ++
.../email/security/top/locations/dkim.test.ts | 59 ++
.../security/top/locations/dmarc.test.ts | 59 ++
.../security/top/locations/locations.test.ts | 59 ++
.../security/top/locations/malicious.test.ts | 62 ++
.../email/security/top/locations/spam.test.ts | 60 ++
.../email/security/top/locations/spf.test.ts | 59 ++
tests/api-resources/radar/quality/iqi.test.ts | 29 +
75 files changed, 6135 insertions(+), 815 deletions(-)
create mode 100644 src/resources/radar/attacks/layer7/top/ases.ts
create mode 100644 src/resources/radar/bgp/top/ases.ts
create mode 100644 src/resources/radar/bgp/top/index.ts
create mode 100644 src/resources/radar/bgp/top/top.ts
delete mode 100644 src/resources/radar/bgp/tops/ases.ts
delete mode 100644 src/resources/radar/bgp/tops/index.ts
delete mode 100644 src/resources/radar/bgp/tops/tops.ts
create mode 100644 src/resources/radar/email/security/top/ases/arc.ts
create mode 100644 src/resources/radar/email/security/top/ases/ases.ts
create mode 100644 src/resources/radar/email/security/top/ases/dkim.ts
create mode 100644 src/resources/radar/email/security/top/ases/dmarc.ts
create mode 100644 src/resources/radar/email/security/top/ases/index.ts
create mode 100644 src/resources/radar/email/security/top/ases/malicious.ts
create mode 100644 src/resources/radar/email/security/top/ases/spam.ts
create mode 100644 src/resources/radar/email/security/top/ases/spf.ts
create mode 100644 src/resources/radar/email/security/top/index.ts
create mode 100644 src/resources/radar/email/security/top/locations/arc.ts
create mode 100644 src/resources/radar/email/security/top/locations/dkim.ts
create mode 100644 src/resources/radar/email/security/top/locations/dmarc.ts
create mode 100644 src/resources/radar/email/security/top/locations/index.ts
create mode 100644 src/resources/radar/email/security/top/locations/locations.ts
create mode 100644 src/resources/radar/email/security/top/locations/malicious.ts
create mode 100644 src/resources/radar/email/security/top/locations/spam.ts
create mode 100644 src/resources/radar/email/security/top/locations/spf.ts
create mode 100644 src/resources/radar/email/security/top/top.ts
create mode 100644 tests/api-resources/radar/attacks/layer7/top/ases.test.ts
create mode 100644 tests/api-resources/radar/bgp/top/ases.test.ts
rename tests/api-resources/radar/bgp/{tops/ases.test.ts => top/top.test.ts} (69%)
create mode 100644 tests/api-resources/radar/email/security/top/ases/arc.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/ases/ases.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/ases/dkim.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/ases/dmarc.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/ases/malicious.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/ases/spam.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/ases/spf.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/arc.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/dkim.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/dmarc.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/locations.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/malicious.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/spam.test.ts
create mode 100644 tests/api-resources/radar/email/security/top/locations/spf.test.ts
diff --git a/.stats.yml b/.stats.yml
index 0692994e46..ea03a65f6b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1 +1 @@
-configured_endpoints: 1168
+configured_endpoints: 1209
diff --git a/api.md b/api.md
index 4201a33d1e..cb53d987c3 100644
--- a/api.md
+++ b/api.md
@@ -815,12 +815,16 @@ Methods:
Types:
- CacheReserveListResponse
+- CacheReserveClearResponse
- CacheReserveEditResponse
+- CacheReserveStatusResponse
Methods:
- client.cache.cacheReserve.list(zoneId) -> CacheReserveListResponse
+- client.cache.cacheReserve.clear(zoneId) -> CacheReserveClearResponse
- client.cache.cacheReserve.edit(zoneId, { ...params }) -> CacheReserveEditResponse
+- client.cache.cacheReserve.status(zoneId) -> CacheReserveStatusResponse
## TieredCacheSmartTopology
@@ -3971,6 +3975,7 @@ Methods:
Types:
+- EJbHDUdxTrace
- TraceCreateResponse
Methods:
@@ -5267,10 +5272,12 @@ Methods:
Types:
+- OutageGetResponse
- OutageLocationsResponse
Methods:
+- client.radar.annotations.outages.get({ ...params }) -> OutageGetResponse
- client.radar.annotations.outages.locations({ ...params }) -> OutageLocationsResponse
## BGP
@@ -5293,17 +5300,27 @@ Methods:
- client.radar.bgp.leaks.events({ ...params }) -> LeakEventsResponse
-### Tops
+### Top
+
+Types:
+
+- TopPrefixesResponse
+
+Methods:
+
+- client.radar.bgp.top.prefixes({ ...params }) -> TopPrefixesResponse
#### Ases
Types:
-- AsePrefixesResponse
+- AseGetResponse
+- AsePrefixesResponse
Methods:
-- client.radar.bgp.tops.ases.prefixes({ ...params }) -> AsePrefixesResponse
+- client.radar.bgp.top.ases.get({ ...params }) -> AseGetResponse
+- client.radar.bgp.top.ases.prefixes({ ...params }) -> AsePrefixesResponse
### Hijacks
@@ -5485,6 +5502,148 @@ Methods:
### Security
+#### Top
+
+##### Ases
+
+Types:
+
+- AseGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.get({ ...params }) -> AseGetResponse
+
+###### Arc
+
+Types:
+
+- ArcGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.arc.get(arc, { ...params }) -> ArcGetResponse
+
+###### DKIM
+
+Types:
+
+- DKIMGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.dkim.get(dkim, { ...params }) -> DKIMGetResponse
+
+###### Dmarc
+
+Types:
+
+- DmarcGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.dmarc.get(dmarc, { ...params }) -> DmarcGetResponse
+
+###### Malicious
+
+Types:
+
+- MaliciousGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.malicious.get(malicious, { ...params }) -> MaliciousGetResponse
+
+###### Spam
+
+Types:
+
+- SpamGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.spam.get(spam, { ...params }) -> SpamGetResponse
+
+###### SPF
+
+Types:
+
+- SPFGetResponse
+
+Methods:
+
+- client.radar.email.security.top.ases.spf.get(spf, { ...params }) -> SPFGetResponse
+
+##### Locations
+
+Types:
+
+- LocationGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.get({ ...params }) -> LocationGetResponse
+
+###### Arc
+
+Types:
+
+- ArcGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.arc.get(arc, { ...params }) -> ArcGetResponse
+
+###### DKIM
+
+Types:
+
+- DKIMGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.dkim.get(dkim, { ...params }) -> DKIMGetResponse
+
+###### Dmarc
+
+Types:
+
+- DmarcGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.dmarc.get(dmarc, { ...params }) -> DmarcGetResponse
+
+###### Malicious
+
+Types:
+
+- MaliciousGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.malicious.get(malicious, { ...params }) -> MaliciousGetResponse
+
+###### Spam
+
+Types:
+
+- SpamGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.spam.get(spam, { ...params }) -> SpamGetResponse
+
+###### SPF
+
+Types:
+
+- SPFGetResponse
+
+Methods:
+
+- client.radar.email.security.top.locations.spf.get(spf, { ...params }) -> SPFGetResponse
+
#### Summary
Types:
@@ -5609,51 +5768,51 @@ Types:
Methods:
-- client.radar.attacks.layer7.timeseries({ ...params }) -> Layer7TimeseriesResponse
+- client.radar.attacks.layer7.timeseries({ ...params }) -> Layer7TimeseriesResponse
#### Summary
Types:
-- SummaryBitrateResponse
-- SummaryDurationResponse
- SummaryGetResponse
+- SummaryHTTPMethodResponse
+- SummaryHTTPVersionResponse
- SummaryIPVersionResponse
-- SummaryProtocolResponse
-- SummaryVectorResponse
+- SummaryManagedRulesResponse
+- SummaryMitigationProductResponse
Methods:
-- client.radar.attacks.layer7.summary.bitrate({ ...params }) -> SummaryBitrateResponse
-- client.radar.attacks.layer7.summary.duration({ ...params }) -> SummaryDurationResponse
-- client.radar.attacks.layer7.summary.get({ ...params }) -> SummaryGetResponse
-- client.radar.attacks.layer7.summary.ipVersion({ ...params }) -> SummaryIPVersionResponse
-- client.radar.attacks.layer7.summary.protocol({ ...params }) -> SummaryProtocolResponse
-- client.radar.attacks.layer7.summary.vector({ ...params }) -> SummaryVectorResponse
+- client.radar.attacks.layer7.summary.get({ ...params }) -> SummaryGetResponse
+- client.radar.attacks.layer7.summary.httpMethod({ ...params }) -> SummaryHTTPMethodResponse
+- client.radar.attacks.layer7.summary.httpVersion({ ...params }) -> SummaryHTTPVersionResponse
+- client.radar.attacks.layer7.summary.ipVersion({ ...params }) -> SummaryIPVersionResponse
+- client.radar.attacks.layer7.summary.managedRules({ ...params }) -> SummaryManagedRulesResponse
+- client.radar.attacks.layer7.summary.mitigationProduct({ ...params }) -> SummaryMitigationProductResponse
#### TimeseriesGroups
Types:
-- TimeseriesGroupBitrateResponse
-- TimeseriesGroupDurationResponse
- TimeseriesGroupGetResponse
+- TimeseriesGroupHTTPMethodResponse
+- TimeseriesGroupHTTPVersionResponse
- TimeseriesGroupIndustryResponse
- TimeseriesGroupIPVersionResponse
-- TimeseriesGroupProtocolResponse
-- TimeseriesGroupVectorResponse
+- TimeseriesGroupManagedRulesResponse
+- TimeseriesGroupMitigationProductResponse
- TimeseriesGroupVerticalResponse
Methods:
-- client.radar.attacks.layer7.timeseriesGroups.bitrate({ ...params }) -> TimeseriesGroupBitrateResponse
-- client.radar.attacks.layer7.timeseriesGroups.duration({ ...params }) -> TimeseriesGroupDurationResponse
-- client.radar.attacks.layer7.timeseriesGroups.get({ ...params }) -> TimeseriesGroupGetResponse
-- client.radar.attacks.layer7.timeseriesGroups.industry({ ...params }) -> TimeseriesGroupIndustryResponse
-- client.radar.attacks.layer7.timeseriesGroups.ipVersion({ ...params }) -> TimeseriesGroupIPVersionResponse
-- client.radar.attacks.layer7.timeseriesGroups.protocol({ ...params }) -> TimeseriesGroupProtocolResponse
-- client.radar.attacks.layer7.timeseriesGroups.vector({ ...params }) -> TimeseriesGroupVectorResponse
-- client.radar.attacks.layer7.timeseriesGroups.vertical({ ...params }) -> TimeseriesGroupVerticalResponse
+- client.radar.attacks.layer7.timeseriesGroups.get({ ...params }) -> TimeseriesGroupGetResponse
+- client.radar.attacks.layer7.timeseriesGroups.httpMethod({ ...params }) -> TimeseriesGroupHTTPMethodResponse
+- client.radar.attacks.layer7.timeseriesGroups.httpVersion({ ...params }) -> TimeseriesGroupHTTPVersionResponse
+- client.radar.attacks.layer7.timeseriesGroups.industry({ ...params }) -> TimeseriesGroupIndustryResponse
+- client.radar.attacks.layer7.timeseriesGroups.ipVersion({ ...params }) -> TimeseriesGroupIPVersionResponse
+- client.radar.attacks.layer7.timeseriesGroups.managedRules({ ...params }) -> TimeseriesGroupManagedRulesResponse
+- client.radar.attacks.layer7.timeseriesGroups.mitigationProduct({ ...params }) -> TimeseriesGroupMitigationProductResponse
+- client.radar.attacks.layer7.timeseriesGroups.vertical({ ...params }) -> TimeseriesGroupVerticalResponse
#### Top
@@ -5665,9 +5824,9 @@ Types:
Methods:
-- client.radar.attacks.layer7.top.attacks({ ...params }) -> TopAttacksResponse
-- client.radar.attacks.layer7.top.industry({ ...params }) -> TopIndustryResponse
-- client.radar.attacks.layer7.top.vertical({ ...params }) -> TopVerticalResponse
+- client.radar.attacks.layer7.top.attacks({ ...params }) -> TopAttacksResponse
+- client.radar.attacks.layer7.top.industry({ ...params }) -> TopIndustryResponse
+- client.radar.attacks.layer7.top.vertical({ ...params }) -> TopVerticalResponse
##### Locations
@@ -5678,8 +5837,18 @@ Types:
Methods:
-- client.radar.attacks.layer7.top.locations.origin({ ...params }) -> LocationOriginResponse
-- client.radar.attacks.layer7.top.locations.target({ ...params }) -> LocationTargetResponse
+- client.radar.attacks.layer7.top.locations.origin({ ...params }) -> LocationOriginResponse
+- client.radar.attacks.layer7.top.locations.target({ ...params }) -> LocationTargetResponse
+
+##### Ases
+
+Types:
+
+- AseOriginResponse
+
+Methods:
+
+- client.radar.attacks.layer7.top.ases.origin({ ...params }) -> AseOriginResponse
## Emails
@@ -5970,10 +6139,12 @@ Methods:
Types:
- IqiSummaryResponse
+- IqiTimeseriesGroupsResponse
Methods:
- client.radar.quality.iqi.summary({ ...params }) -> IqiSummaryResponse
+- client.radar.quality.iqi.timeseriesGroups({ ...params }) -> IqiTimeseriesGroupsResponse
### Speed
diff --git a/src/resources/cache/cache-reserve.ts b/src/resources/cache/cache-reserve.ts
index f2e983abde..ac4f4216c2 100644
--- a/src/resources/cache/cache-reserve.ts
+++ b/src/resources/cache/cache-reserve.ts
@@ -21,6 +21,20 @@ export class CacheReserve extends APIResource {
)._thenUnwrap((obj) => obj.result);
}
+ /**
+ * You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
+ * disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
+ * You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind
+ * that you cannot undo or cancel this operation.
+ */
+ clear(zoneId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.post(`/zones/${zoneId}/cache/cache_reserve_clear`, options) as Core.APIPromise<{
+ result: CacheReserveClearResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
/**
* Increase cache lifetimes by automatically storing all cacheable files into
* Cloudflare's persistent object storage buckets. Requires Cache Reserve
@@ -40,6 +54,20 @@ export class CacheReserve extends APIResource {
}>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
+ * disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
+ * You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind
+ * that you cannot undo or cancel this operation.
+ */
+ status(zoneId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.get(`/zones/${zoneId}/cache/cache_reserve_clear`, options) as Core.APIPromise<{
+ result: CacheReserveStatusResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
}
/**
@@ -67,6 +95,39 @@ export interface CacheReserveListResponse {
value: 'on' | 'off';
}
+/**
+ * You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
+ * disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
+ * You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind
+ * that you cannot undo or cancel this operation.
+ */
+export interface CacheReserveClearResponse {
+ /**
+ * ID of the zone setting.
+ */
+ id: 'cache_reserve_clear';
+
+ /**
+ * last time this setting was modified.
+ */
+ modified_on: string | null;
+
+ /**
+ * The time that the latest Cache Reserve Clear operation started.
+ */
+ start_ts: string;
+
+ /**
+ * The current state of the Cache Reserve Clear operation.
+ */
+ state: 'In-progress' | 'Completed';
+
+ /**
+ * The time that the latest Cache Reserve Clear operation completed.
+ */
+ end_ts?: string;
+}
+
/**
* Increase cache lifetimes by automatically storing all cacheable files into
* Cloudflare's persistent object storage buckets. Requires Cache Reserve
@@ -92,6 +153,39 @@ export interface CacheReserveEditResponse {
value: 'on' | 'off';
}
+/**
+ * You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
+ * disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
+ * You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind
+ * that you cannot undo or cancel this operation.
+ */
+export interface CacheReserveStatusResponse {
+ /**
+ * ID of the zone setting.
+ */
+ id: 'cache_reserve_clear';
+
+ /**
+ * last time this setting was modified.
+ */
+ modified_on: string | null;
+
+ /**
+ * The time that the latest Cache Reserve Clear operation started.
+ */
+ start_ts: string;
+
+ /**
+ * The current state of the Cache Reserve Clear operation.
+ */
+ state: 'In-progress' | 'Completed';
+
+ /**
+ * The time that the latest Cache Reserve Clear operation completed.
+ */
+ end_ts?: string;
+}
+
export interface CacheReserveEditParams {
/**
* Value of the Cache Reserve zone setting.
@@ -101,6 +195,8 @@ export interface CacheReserveEditParams {
export namespace CacheReserve {
export import CacheReserveListResponse = CacheReserveAPI.CacheReserveListResponse;
+ export import CacheReserveClearResponse = CacheReserveAPI.CacheReserveClearResponse;
export import CacheReserveEditResponse = CacheReserveAPI.CacheReserveEditResponse;
+ export import CacheReserveStatusResponse = CacheReserveAPI.CacheReserveStatusResponse;
export import CacheReserveEditParams = CacheReserveAPI.CacheReserveEditParams;
}
diff --git a/src/resources/cache/cache.ts b/src/resources/cache/cache.ts
index 547fd486cc..79740a6119 100644
--- a/src/resources/cache/cache.ts
+++ b/src/resources/cache/cache.ts
@@ -108,7 +108,9 @@ export namespace Cache {
export import CachePurgeParams = CacheAPI.CachePurgeParams;
export import CacheReserve = CacheReserveAPI.CacheReserve;
export import CacheReserveListResponse = CacheReserveAPI.CacheReserveListResponse;
+ export import CacheReserveClearResponse = CacheReserveAPI.CacheReserveClearResponse;
export import CacheReserveEditResponse = CacheReserveAPI.CacheReserveEditResponse;
+ export import CacheReserveStatusResponse = CacheReserveAPI.CacheReserveStatusResponse;
export import CacheReserveEditParams = CacheReserveAPI.CacheReserveEditParams;
export import TieredCacheSmartTopology = TieredCacheSmartTopologyAPI.TieredCacheSmartTopology;
export import TieredCacheSmartTopologyDeleteResponse = TieredCacheSmartTopologyAPI.TieredCacheSmartTopologyDeleteResponse;
diff --git a/src/resources/cache/index.ts b/src/resources/cache/index.ts
index 4e30c997b7..2fb8f15600 100644
--- a/src/resources/cache/index.ts
+++ b/src/resources/cache/index.ts
@@ -3,7 +3,9 @@
export { CachePurgeResponse, CachePurgeParams, Cache } from './cache';
export {
CacheReserveListResponse,
+ CacheReserveClearResponse,
CacheReserveEditResponse,
+ CacheReserveStatusResponse,
CacheReserveEditParams,
CacheReserve,
} from './cache-reserve';
diff --git a/src/resources/radar/annotations/annotations.ts b/src/resources/radar/annotations/annotations.ts
index d3ab7962bb..5889558c9b 100644
--- a/src/resources/radar/annotations/annotations.ts
+++ b/src/resources/radar/annotations/annotations.ts
@@ -9,6 +9,8 @@ export class Annotations extends APIResource {
export namespace Annotations {
export import Outages = OutagesAPI.Outages;
+ export import OutageGetResponse = OutagesAPI.OutageGetResponse;
export import OutageLocationsResponse = OutagesAPI.OutageLocationsResponse;
+ export import OutageGetParams = OutagesAPI.OutageGetParams;
export import OutageLocationsParams = OutagesAPI.OutageLocationsParams;
}
diff --git a/src/resources/radar/annotations/index.ts b/src/resources/radar/annotations/index.ts
index 359b5e3af4..0aeb472a62 100644
--- a/src/resources/radar/annotations/index.ts
+++ b/src/resources/radar/annotations/index.ts
@@ -1,4 +1,10 @@
// File generated from our OpenAPI spec by Stainless.
export { Annotations } from './annotations';
-export { OutageLocationsResponse, OutageLocationsParams, Outages } from './outages';
+export {
+ OutageGetResponse,
+ OutageLocationsResponse,
+ OutageGetParams,
+ OutageLocationsParams,
+ Outages,
+} from './outages';
diff --git a/src/resources/radar/annotations/outages.ts b/src/resources/radar/annotations/outages.ts
index 893d05d356..324cd2a45e 100644
--- a/src/resources/radar/annotations/outages.ts
+++ b/src/resources/radar/annotations/outages.ts
@@ -6,6 +6,25 @@ import { isRequestOptions } from 'cloudflare/core';
import * as OutagesAPI from 'cloudflare/resources/radar/annotations/outages';
export class Outages extends APIResource {
+ /**
+ * Get latest Internet outages and anomalies.
+ */
+ get(query?: OutageGetParams, options?: Core.RequestOptions): Core.APIPromise;
+ get(options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ query: OutageGetParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.get({}, query);
+ }
+ return (
+ this._client.get('/radar/annotations/outages', { query, ...options }) as Core.APIPromise<{
+ result: OutageGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
/**
* Get the number of outages for locations.
*/
@@ -29,6 +48,70 @@ export class Outages extends APIResource {
}
}
+export interface OutageGetResponse {
+ annotations: Array;
+}
+
+export namespace OutageGetResponse {
+ export interface Annotation {
+ id: string;
+
+ asns: Array;
+
+ asnsDetails: Array;
+
+ dataSource: string;
+
+ eventType: string;
+
+ locations: Array;
+
+ locationsDetails: Array;
+
+ outage: Annotation.Outage;
+
+ startDate: string;
+
+ description?: string;
+
+ endDate?: string;
+
+ linkedUrl?: string;
+
+ scope?: string;
+ }
+
+ export namespace Annotation {
+ export interface AsnsDetail {
+ asn: string;
+
+ name: string;
+
+ locations?: AsnsDetail.Locations;
+ }
+
+ export namespace AsnsDetail {
+ export interface Locations {
+ code: string;
+
+ name: string;
+ }
+ }
+
+ export interface LocationsDetail {
+ code: string;
+
+ name: string;
+ }
+
+ export interface Outage {
+ outageCause: string;
+
+ outageType: string;
+ }
+ }
+}
+
export interface OutageLocationsResponse {
annotations: Array;
}
@@ -43,6 +126,64 @@ export namespace OutageLocationsResponse {
}
}
+export interface OutageGetParams {
+ /**
+ * Single ASN as integer.
+ */
+ asn?: number;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: string;
+
+ /**
+ * Shorthand date ranges for the last X days - use when you don't need specific
+ * start and end dates.
+ */
+ dateRange?:
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl';
+
+ /**
+ * Start of the date range (inclusive).
+ */
+ dateStart?: string;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Location Alpha2 code.
+ */
+ location?: string;
+
+ /**
+ * Number of objects to skip before grabbing results.
+ */
+ offset?: number;
+}
+
export interface OutageLocationsParams {
/**
* End of the date range (inclusive).
@@ -87,6 +228,8 @@ export interface OutageLocationsParams {
}
export namespace Outages {
+ export import OutageGetResponse = OutagesAPI.OutageGetResponse;
export import OutageLocationsResponse = OutagesAPI.OutageLocationsResponse;
+ export import OutageGetParams = OutagesAPI.OutageGetParams;
export import OutageLocationsParams = OutagesAPI.OutageLocationsParams;
}
diff --git a/src/resources/radar/attacks/layer7/index.ts b/src/resources/radar/attacks/layer7/index.ts
index d34526e841..1b8f616a4c 100644
--- a/src/resources/radar/attacks/layer7/index.ts
+++ b/src/resources/radar/attacks/layer7/index.ts
@@ -2,36 +2,36 @@
export { Layer7TimeseriesResponse, Layer7TimeseriesParams, Layer7 } from './layer7';
export {
- SummaryBitrateResponse,
- SummaryDurationResponse,
SummaryGetResponse,
+ SummaryHTTPMethodResponse,
+ SummaryHTTPVersionResponse,
SummaryIPVersionResponse,
- SummaryProtocolResponse,
- SummaryVectorResponse,
- SummaryBitrateParams,
- SummaryDurationParams,
+ SummaryManagedRulesResponse,
+ SummaryMitigationProductResponse,
SummaryGetParams,
+ SummaryHTTPMethodParams,
+ SummaryHTTPVersionParams,
SummaryIPVersionParams,
- SummaryProtocolParams,
- SummaryVectorParams,
+ SummaryManagedRulesParams,
+ SummaryMitigationProductParams,
Summary,
} from './summary';
export {
- TimeseriesGroupBitrateResponse,
- TimeseriesGroupDurationResponse,
TimeseriesGroupGetResponse,
+ TimeseriesGroupHTTPMethodResponse,
+ TimeseriesGroupHTTPVersionResponse,
TimeseriesGroupIndustryResponse,
TimeseriesGroupIPVersionResponse,
- TimeseriesGroupProtocolResponse,
- TimeseriesGroupVectorResponse,
+ TimeseriesGroupManagedRulesResponse,
+ TimeseriesGroupMitigationProductResponse,
TimeseriesGroupVerticalResponse,
- TimeseriesGroupBitrateParams,
- TimeseriesGroupDurationParams,
TimeseriesGroupGetParams,
+ TimeseriesGroupHTTPMethodParams,
+ TimeseriesGroupHTTPVersionParams,
TimeseriesGroupIndustryParams,
TimeseriesGroupIPVersionParams,
- TimeseriesGroupProtocolParams,
- TimeseriesGroupVectorParams,
+ TimeseriesGroupManagedRulesParams,
+ TimeseriesGroupMitigationProductParams,
TimeseriesGroupVerticalParams,
TimeseriesGroups,
} from './timeseries-groups';
diff --git a/src/resources/radar/attacks/layer7/layer7.ts b/src/resources/radar/attacks/layer7/layer7.ts
index db9ddc6d62..1cf7582677 100644
--- a/src/resources/radar/attacks/layer7/layer7.ts
+++ b/src/resources/radar/attacks/layer7/layer7.ts
@@ -16,7 +16,8 @@ export class Layer7 extends APIResource {
top: TopAPI.Top = new TopAPI.Top(this._client);
/**
- * Get attacks change over time by bytes.
+ * Get a timeseries of Layer 7 attacks. Values represent HTTP requests and are
+ * normalized using min-max by default.
*/
timeseries(
query?: Layer7TimeseriesParams,
@@ -31,7 +32,7 @@ export class Layer7 extends APIResource {
return this.timeseries({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries', { query, ...options }) as Core.APIPromise<{
+ this._client.get('/radar/attacks/layer7/timeseries', { query, ...options }) as Core.APIPromise<{
result: Layer7TimeseriesResponse;
}>
)._thenUnwrap((obj) => obj.result);
@@ -39,12 +40,60 @@ export class Layer7 extends APIResource {
}
export interface Layer7TimeseriesResponse {
- meta: unknown;
+ meta: Layer7TimeseriesResponse.Meta;
serie_0: Layer7TimeseriesResponse.Serie0;
}
export namespace Layer7TimeseriesResponse {
+ export interface Meta {
+ aggInterval: string;
+
+ dateRange: Array;
+
+ lastUpdated: string;
+
+ confidenceInfo?: Meta.ConfidenceInfo;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface ConfidenceInfo {
+ annotations?: Array;
+
+ level?: number;
+ }
+
+ export namespace ConfidenceInfo {
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ eventType: string;
+
+ isInstantaneous: unknown;
+
+ endTime?: string;
+
+ linkedUrl?: string;
+
+ startTime?: string;
+ }
+ }
+ }
+
export interface Serie0 {
timestamps: Array;
@@ -67,6 +116,19 @@ export interface Layer7TimeseriesParams {
*/
asn?: Array;
+ /**
+ * Array of L7 attack types.
+ */
+ attack?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* End of the date range (inclusive).
*/
@@ -100,22 +162,11 @@ export interface Layer7TimeseriesParams {
*/
dateStart?: Array;
- /**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
- */
- direction?: 'ORIGIN' | 'TARGET';
-
/**
* Format results are returned in.
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
* `-` to exclude from results. For example, `-US,PT` excludes results from the US,
@@ -123,11 +174,6 @@ export interface Layer7TimeseriesParams {
*/
location?: Array;
- /**
- * Measurement units, eg. bytes.
- */
- metric?: 'BYTES' | 'BYTES_OLD';
-
/**
* Array of names that will be used to name the series in responses.
*/
@@ -138,45 +184,40 @@ export interface Layer7TimeseriesParams {
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
*/
normalization?: 'PERCENTAGE_CHANGE' | 'MIN0_MAX';
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
export namespace Layer7 {
export import Layer7TimeseriesResponse = Layer7API.Layer7TimeseriesResponse;
export import Layer7TimeseriesParams = Layer7API.Layer7TimeseriesParams;
export import Summary = SummaryAPI.Summary;
- export import SummaryBitrateResponse = SummaryAPI.SummaryBitrateResponse;
- export import SummaryDurationResponse = SummaryAPI.SummaryDurationResponse;
export import SummaryGetResponse = SummaryAPI.SummaryGetResponse;
+ export import SummaryHTTPMethodResponse = SummaryAPI.SummaryHTTPMethodResponse;
+ export import SummaryHTTPVersionResponse = SummaryAPI.SummaryHTTPVersionResponse;
export import SummaryIPVersionResponse = SummaryAPI.SummaryIPVersionResponse;
- export import SummaryProtocolResponse = SummaryAPI.SummaryProtocolResponse;
- export import SummaryVectorResponse = SummaryAPI.SummaryVectorResponse;
- export import SummaryBitrateParams = SummaryAPI.SummaryBitrateParams;
- export import SummaryDurationParams = SummaryAPI.SummaryDurationParams;
+ export import SummaryManagedRulesResponse = SummaryAPI.SummaryManagedRulesResponse;
+ export import SummaryMitigationProductResponse = SummaryAPI.SummaryMitigationProductResponse;
export import SummaryGetParams = SummaryAPI.SummaryGetParams;
+ export import SummaryHTTPMethodParams = SummaryAPI.SummaryHTTPMethodParams;
+ export import SummaryHTTPVersionParams = SummaryAPI.SummaryHTTPVersionParams;
export import SummaryIPVersionParams = SummaryAPI.SummaryIPVersionParams;
- export import SummaryProtocolParams = SummaryAPI.SummaryProtocolParams;
- export import SummaryVectorParams = SummaryAPI.SummaryVectorParams;
+ export import SummaryManagedRulesParams = SummaryAPI.SummaryManagedRulesParams;
+ export import SummaryMitigationProductParams = SummaryAPI.SummaryMitigationProductParams;
export import TimeseriesGroups = TimeseriesGroupsAPI.TimeseriesGroups;
- export import TimeseriesGroupBitrateResponse = TimeseriesGroupsAPI.TimeseriesGroupBitrateResponse;
- export import TimeseriesGroupDurationResponse = TimeseriesGroupsAPI.TimeseriesGroupDurationResponse;
export import TimeseriesGroupGetResponse = TimeseriesGroupsAPI.TimeseriesGroupGetResponse;
+ export import TimeseriesGroupHTTPMethodResponse = TimeseriesGroupsAPI.TimeseriesGroupHTTPMethodResponse;
+ export import TimeseriesGroupHTTPVersionResponse = TimeseriesGroupsAPI.TimeseriesGroupHTTPVersionResponse;
export import TimeseriesGroupIndustryResponse = TimeseriesGroupsAPI.TimeseriesGroupIndustryResponse;
export import TimeseriesGroupIPVersionResponse = TimeseriesGroupsAPI.TimeseriesGroupIPVersionResponse;
- export import TimeseriesGroupProtocolResponse = TimeseriesGroupsAPI.TimeseriesGroupProtocolResponse;
- export import TimeseriesGroupVectorResponse = TimeseriesGroupsAPI.TimeseriesGroupVectorResponse;
+ export import TimeseriesGroupManagedRulesResponse = TimeseriesGroupsAPI.TimeseriesGroupManagedRulesResponse;
+ export import TimeseriesGroupMitigationProductResponse = TimeseriesGroupsAPI.TimeseriesGroupMitigationProductResponse;
export import TimeseriesGroupVerticalResponse = TimeseriesGroupsAPI.TimeseriesGroupVerticalResponse;
- export import TimeseriesGroupBitrateParams = TimeseriesGroupsAPI.TimeseriesGroupBitrateParams;
- export import TimeseriesGroupDurationParams = TimeseriesGroupsAPI.TimeseriesGroupDurationParams;
export import TimeseriesGroupGetParams = TimeseriesGroupsAPI.TimeseriesGroupGetParams;
+ export import TimeseriesGroupHTTPMethodParams = TimeseriesGroupsAPI.TimeseriesGroupHTTPMethodParams;
+ export import TimeseriesGroupHTTPVersionParams = TimeseriesGroupsAPI.TimeseriesGroupHTTPVersionParams;
export import TimeseriesGroupIndustryParams = TimeseriesGroupsAPI.TimeseriesGroupIndustryParams;
export import TimeseriesGroupIPVersionParams = TimeseriesGroupsAPI.TimeseriesGroupIPVersionParams;
- export import TimeseriesGroupProtocolParams = TimeseriesGroupsAPI.TimeseriesGroupProtocolParams;
- export import TimeseriesGroupVectorParams = TimeseriesGroupsAPI.TimeseriesGroupVectorParams;
+ export import TimeseriesGroupManagedRulesParams = TimeseriesGroupsAPI.TimeseriesGroupManagedRulesParams;
+ export import TimeseriesGroupMitigationProductParams = TimeseriesGroupsAPI.TimeseriesGroupMitigationProductParams;
export import TimeseriesGroupVerticalParams = TimeseriesGroupsAPI.TimeseriesGroupVerticalParams;
export import Top = TopAPI.Top;
export import TopAttacksResponse = TopAPI.TopAttacksResponse;
diff --git a/src/resources/radar/attacks/layer7/summary.ts b/src/resources/radar/attacks/layer7/summary.ts
index ef28bf8d86..bedcd3cc9d 100644
--- a/src/resources/radar/attacks/layer7/summary.ts
+++ b/src/resources/radar/attacks/layer7/summary.ts
@@ -7,66 +7,67 @@ import * as SummaryAPI from 'cloudflare/resources/radar/attacks/layer7/summary';
export class Summary extends APIResource {
/**
- * Percentage distribution of attacks by bitrate.
+ * Percentage distribution of mitigation techniques in Layer 7 attacks.
*/
- bitrate(
- query?: SummaryBitrateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise;
- bitrate(options?: Core.RequestOptions): Core.APIPromise;
- bitrate(
- query: SummaryBitrateParams | Core.RequestOptions = {},
+ get(query?: SummaryGetParams, options?: Core.RequestOptions): Core.APIPromise;
+ get(options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ query: SummaryGetParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.bitrate({}, query);
+ return this.get({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/summary/bitrate', { query, ...options }) as Core.APIPromise<{
- result: SummaryBitrateResponse;
+ this._client.get('/radar/attacks/layer7/summary', { query, ...options }) as Core.APIPromise<{
+ result: SummaryGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Percentage distribution of attacks by duration.
+ * Percentage distribution of attacks by http method used.
*/
- duration(
- query?: SummaryDurationParams,
+ httpMethod(
+ query?: SummaryHTTPMethodParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- duration(options?: Core.RequestOptions): Core.APIPromise;
- duration(
- query: SummaryDurationParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ httpMethod(options?: Core.RequestOptions): Core.APIPromise;
+ httpMethod(
+ query: SummaryHTTPMethodParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.duration({}, query);
+ return this.httpMethod({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/summary/duration', { query, ...options }) as Core.APIPromise<{
- result: SummaryDurationResponse;
- }>
+ this._client.get('/radar/attacks/layer7/summary/http_method', {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: SummaryHTTPMethodResponse }>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Percentage distribution of network protocols in layer 3/4 attacks over a given
- * time period.
+ * Percentage distribution of attacks by http version used.
*/
- get(query?: SummaryGetParams, options?: Core.RequestOptions): Core.APIPromise;
- get(options?: Core.RequestOptions): Core.APIPromise;
- get(
- query: SummaryGetParams | Core.RequestOptions = {},
+ httpVersion(
+ query?: SummaryHTTPVersionParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise;
+ httpVersion(options?: Core.RequestOptions): Core.APIPromise;
+ httpVersion(
+ query: SummaryHTTPVersionParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.get({}, query);
+ return this.httpVersion({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/summary', { query, ...options }) as Core.APIPromise<{
- result: SummaryGetResponse;
- }>
+ this._client.get('/radar/attacks/layer7/summary/http_version', {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: SummaryHTTPVersionResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -86,68 +87,69 @@ export class Summary extends APIResource {
return this.ipVersion({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/summary/ip_version', { query, ...options }) as Core.APIPromise<{
+ this._client.get('/radar/attacks/layer7/summary/ip_version', { query, ...options }) as Core.APIPromise<{
result: SummaryIPVersionResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Percentage distribution of attacks by protocol used.
+ * Percentage distribution of attacks by managed rules used.
*/
- protocol(
- query?: SummaryProtocolParams,
+ managedRules(
+ query?: SummaryManagedRulesParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- protocol(options?: Core.RequestOptions): Core.APIPromise;
- protocol(
- query: SummaryProtocolParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ managedRules(options?: Core.RequestOptions): Core.APIPromise;
+ managedRules(
+ query: SummaryManagedRulesParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.protocol({}, query);
+ return this.managedRules({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/summary/protocol', { query, ...options }) as Core.APIPromise<{
- result: SummaryProtocolResponse;
- }>
+ this._client.get('/radar/attacks/layer7/summary/managed_rules', {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: SummaryManagedRulesResponse }>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Percentage distribution of attacks by vector.
+ * Percentage distribution of attacks by mitigation product used.
*/
- vector(query?: SummaryVectorParams, options?: Core.RequestOptions): Core.APIPromise;
- vector(options?: Core.RequestOptions): Core.APIPromise;
- vector(
- query: SummaryVectorParams | Core.RequestOptions = {},
+ mitigationProduct(
+ query?: SummaryMitigationProductParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise;
+ mitigationProduct(options?: Core.RequestOptions): Core.APIPromise;
+ mitigationProduct(
+ query: SummaryMitigationProductParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.vector({}, query);
+ return this.mitigationProduct({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/summary/vector', { query, ...options }) as Core.APIPromise<{
- result: SummaryVectorResponse;
- }>
+ this._client.get('/radar/attacks/layer7/summary/mitigation_product', {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: SummaryMitigationProductResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
-export interface SummaryBitrateResponse {
- meta: SummaryBitrateResponse.Meta;
+export interface SummaryGetResponse {
+ meta: SummaryGetResponse.Meta;
- summary_0: SummaryBitrateResponse.Summary0;
+ summary_0: SummaryGetResponse.Summary0;
}
-export namespace SummaryBitrateResponse {
+export namespace SummaryGetResponse {
export interface Meta {
dateRange: Array;
- lastUpdated: string;
-
- normalization: string;
-
confidenceInfo?: Meta.ConfidenceInfo;
}
@@ -190,25 +192,29 @@ export namespace SummaryBitrateResponse {
}
export interface Summary0 {
- _1_GBPS_TO_10_GBPS: string;
+ ACCESS_RULES: string;
- _10_GBPS_TO_100_GBPS: string;
+ API_SHIELD: string;
- _500_MBPS_TO_1_GBPS: string;
+ BOT_MANAGEMENT: string;
- OVER_100_GBPS: string;
+ DATA_LOSS_PREVENTION: string;
- UNDER_500_MBPS: string;
+ DDOS: string;
+
+ IP_REPUTATION: string;
+
+ WAF: string;
}
}
-export interface SummaryDurationResponse {
- meta: SummaryDurationResponse.Meta;
+export interface SummaryHTTPMethodResponse {
+ meta: SummaryHTTPMethodResponse.Meta;
- summary_0: SummaryDurationResponse.Summary0;
+ summary_0: SummaryHTTPMethodResponse.Summary0;
}
-export namespace SummaryDurationResponse {
+export namespace SummaryHTTPMethodResponse {
export interface Meta {
dateRange: Array;
@@ -258,30 +264,26 @@ export namespace SummaryDurationResponse {
}
export interface Summary0 {
- _1_HOUR_TO_3_HOURS: string;
-
- _10_MINS_TO_20_MINS: string;
-
- _20_MINS_TO_40_MINS: string;
-
- _40_MINS_TO_1_HOUR: string;
+ GET: string;
- OVER_3_HOURS: string;
-
- UNDER_10_MINS: string;
+ POST: string;
}
}
-export interface SummaryGetResponse {
- meta: SummaryGetResponse.Meta;
+export interface SummaryHTTPVersionResponse {
+ meta: SummaryHTTPVersionResponse.Meta;
- summary_0: SummaryGetResponse.Summary0;
+ summary_0: SummaryHTTPVersionResponse.Summary0;
}
-export namespace SummaryGetResponse {
+export namespace SummaryHTTPVersionResponse {
export interface Meta {
dateRange: Array;
+ lastUpdated: string;
+
+ normalization: string;
+
confidenceInfo?: Meta.ConfidenceInfo;
}
@@ -324,13 +326,11 @@ export namespace SummaryGetResponse {
}
export interface Summary0 {
- gre: string;
+ 'HTTP/1.x': string;
- icmp: string;
+ 'HTTP/2': string;
- tcp: string;
-
- udp: string;
+ 'HTTP/3': string;
}
}
@@ -396,13 +396,13 @@ export namespace SummaryIPVersionResponse {
}
}
-export interface SummaryProtocolResponse {
- meta: SummaryProtocolResponse.Meta;
+export interface SummaryManagedRulesResponse {
+ meta: SummaryManagedRulesResponse.Meta;
- summary_0: SummaryProtocolResponse.Summary0;
+ summary_0: SummaryManagedRulesResponse.Summary0;
}
-export namespace SummaryProtocolResponse {
+export namespace SummaryManagedRulesResponse {
export interface Meta {
dateRange: Array;
@@ -452,23 +452,19 @@ export namespace SummaryProtocolResponse {
}
export interface Summary0 {
- GRE: string;
-
- ICMP: string;
-
- TCP: string;
+ Bot: string;
- UDP: string;
+ 'HTTP Anomaly': string;
}
}
-export interface SummaryVectorResponse {
- meta: SummaryVectorResponse.Meta;
+export interface SummaryMitigationProductResponse {
+ meta: SummaryMitigationProductResponse.Meta;
- summary_0: Record>;
+ summary_0: SummaryMitigationProductResponse.Summary0;
}
-export namespace SummaryVectorResponse {
+export namespace SummaryMitigationProductResponse {
export interface Meta {
dateRange: Array;
@@ -516,9 +512,22 @@ export namespace SummaryVectorResponse {
}
}
}
+
+ export interface Summary0 {
+ DDOS: string;
+
+ WAF: string;
+ }
}
-export interface SummaryBitrateParams {
+export interface SummaryGetParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -552,22 +561,11 @@ export interface SummaryBitrateParams {
*/
dateStart?: Array;
- /**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
- */
- direction?: 'ORIGIN' | 'TARGET';
-
/**
* Format results are returned in.
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
* `-` to exclude from results. For example, `-US,PT` excludes results from the US,
@@ -579,14 +577,16 @@ export interface SummaryBitrateParams {
* Array of names that will be used to name the series in responses.
*/
name?: Array;
+}
+export interface SummaryHTTPMethodParams {
/**
- * Array of L3/4 attack types.
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
*/
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
-}
+ asn?: Array;
-export interface SummaryDurationParams {
/**
* End of the date range (inclusive).
*/
@@ -621,15 +621,14 @@ export interface SummaryDurationParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -644,17 +643,25 @@ export interface SummaryDurationParams {
location?: Array;
/**
- * Array of names that will be used to name the series in responses.
+ * Array of L7 mitigation products.
*/
- name?: Array;
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
/**
- * Array of L3/4 attack types.
+ * Array of names that will be used to name the series in responses.
*/
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
+ name?: Array;
}
-export interface SummaryGetParams {
+export interface SummaryHTTPVersionParams {
/**
* Array of comma separated list of ASNs, start with `-` to exclude from results.
* For example, `-174, 3356` excludes results from AS174, but includes results from
@@ -700,6 +707,63 @@ export interface SummaryGetParams {
*/
format?: 'JSON' | 'CSV';
+ /**
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for ip version.
+ */
+ ipVersion?: Array<'IPv4' | 'IPv6'>;
+
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
* `-` to exclude from results. For example, `-US,PT` excludes results from the US,
@@ -707,6 +771,19 @@ export interface SummaryGetParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
@@ -714,6 +791,13 @@ export interface SummaryGetParams {
}
export interface SummaryIPVersionParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -748,15 +832,66 @@ export interface SummaryIPVersionParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http method.
*/
- format?: 'JSON' | 'CSV';
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
+ */
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
@@ -765,18 +900,33 @@ export interface SummaryIPVersionParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
name?: Array;
+}
+export interface SummaryManagedRulesParams {
/**
- * Array of L3/4 attack types.
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
*/
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
-}
+ asn?: Array;
-export interface SummaryProtocolParams {
/**
* End of the date range (inclusive).
*/
@@ -811,15 +961,66 @@ export interface SummaryProtocolParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http method.
*/
- format?: 'JSON' | 'CSV';
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
+ */
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -833,13 +1034,33 @@ export interface SummaryProtocolParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
name?: Array;
}
-export interface SummaryVectorParams {
+export interface SummaryMitigationProductParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -874,15 +1095,66 @@ export interface SummaryVectorParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Filter for http method.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
/**
- * Format results are returned in.
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -900,24 +1172,19 @@ export interface SummaryVectorParams {
* Array of names that will be used to name the series in responses.
*/
name?: Array;
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
export namespace Summary {
- export import SummaryBitrateResponse = SummaryAPI.SummaryBitrateResponse;
- export import SummaryDurationResponse = SummaryAPI.SummaryDurationResponse;
export import SummaryGetResponse = SummaryAPI.SummaryGetResponse;
+ export import SummaryHTTPMethodResponse = SummaryAPI.SummaryHTTPMethodResponse;
+ export import SummaryHTTPVersionResponse = SummaryAPI.SummaryHTTPVersionResponse;
export import SummaryIPVersionResponse = SummaryAPI.SummaryIPVersionResponse;
- export import SummaryProtocolResponse = SummaryAPI.SummaryProtocolResponse;
- export import SummaryVectorResponse = SummaryAPI.SummaryVectorResponse;
- export import SummaryBitrateParams = SummaryAPI.SummaryBitrateParams;
- export import SummaryDurationParams = SummaryAPI.SummaryDurationParams;
+ export import SummaryManagedRulesResponse = SummaryAPI.SummaryManagedRulesResponse;
+ export import SummaryMitigationProductResponse = SummaryAPI.SummaryMitigationProductResponse;
export import SummaryGetParams = SummaryAPI.SummaryGetParams;
+ export import SummaryHTTPMethodParams = SummaryAPI.SummaryHTTPMethodParams;
+ export import SummaryHTTPVersionParams = SummaryAPI.SummaryHTTPVersionParams;
export import SummaryIPVersionParams = SummaryAPI.SummaryIPVersionParams;
- export import SummaryProtocolParams = SummaryAPI.SummaryProtocolParams;
- export import SummaryVectorParams = SummaryAPI.SummaryVectorParams;
+ export import SummaryManagedRulesParams = SummaryAPI.SummaryManagedRulesParams;
+ export import SummaryMitigationProductParams = SummaryAPI.SummaryMitigationProductParams;
}
diff --git a/src/resources/radar/attacks/layer7/timeseries-groups.ts b/src/resources/radar/attacks/layer7/timeseries-groups.ts
index 53192fd83a..ec1aa04384 100644
--- a/src/resources/radar/attacks/layer7/timeseries-groups.ts
+++ b/src/resources/radar/attacks/layer7/timeseries-groups.ts
@@ -7,71 +7,71 @@ import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/attacks/layer7/
export class TimeseriesGroups extends APIResource {
/**
- * Percentage distribution of attacks by bitrate over time.
+ * Get a time series of the percentual distribution of mitigation techniques, over
+ * time.
*/
- bitrate(
- query?: TimeseriesGroupBitrateParams,
+ get(
+ query?: TimeseriesGroupGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- bitrate(options?: Core.RequestOptions): Core.APIPromise;
- bitrate(
- query: TimeseriesGroupBitrateParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ get(options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ query: TimeseriesGroupGetParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.bitrate({}, query);
+ return this.get({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/bitrate', {
- query,
- ...options,
- }) as Core.APIPromise<{ result: TimeseriesGroupBitrateResponse }>
+ this._client.get('/radar/attacks/layer7/timeseries_groups', { query, ...options }) as Core.APIPromise<{
+ result: TimeseriesGroupGetResponse;
+ }>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Percentage distribution of attacks by duration over time.
+ * Percentage distribution of attacks by http method used over time.
*/
- duration(
- query?: TimeseriesGroupDurationParams,
+ httpMethod(
+ query?: TimeseriesGroupHTTPMethodParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- duration(options?: Core.RequestOptions): Core.APIPromise;
- duration(
- query: TimeseriesGroupDurationParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ httpMethod(options?: Core.RequestOptions): Core.APIPromise;
+ httpMethod(
+ query: TimeseriesGroupHTTPMethodParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.duration({}, query);
+ return this.httpMethod({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/duration', {
+ this._client.get('/radar/attacks/layer7/timeseries_groups/http_method', {
query,
...options,
- }) as Core.APIPromise<{ result: TimeseriesGroupDurationResponse }>
+ }) as Core.APIPromise<{ result: TimeseriesGroupHTTPMethodResponse }>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Get a timeseries of the percentage distribution of network protocols in Layer
- * 3/4 attacks.
+ * Percentage distribution of attacks by http version used over time.
*/
- get(
- query?: TimeseriesGroupGetParams,
+ httpVersion(
+ query?: TimeseriesGroupHTTPVersionParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- get(options?: Core.RequestOptions): Core.APIPromise;
- get(
- query: TimeseriesGroupGetParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ httpVersion(options?: Core.RequestOptions): Core.APIPromise;
+ httpVersion(
+ query: TimeseriesGroupHTTPVersionParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.get({}, query);
+ return this.httpVersion({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups', { query, ...options }) as Core.APIPromise<{
- result: TimeseriesGroupGetResponse;
- }>
+ this._client.get('/radar/attacks/layer7/timeseries_groups/http_version', {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: TimeseriesGroupHTTPVersionResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -91,7 +91,7 @@ export class TimeseriesGroups extends APIResource {
return this.industry({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/industry', {
+ this._client.get('/radar/attacks/layer7/timeseries_groups/industry', {
query,
...options,
}) as Core.APIPromise<{ result: TimeseriesGroupIndustryResponse }>
@@ -114,7 +114,7 @@ export class TimeseriesGroups extends APIResource {
return this.ipVersion({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/ip_version', {
+ this._client.get('/radar/attacks/layer7/timeseries_groups/ip_version', {
query,
...options,
}) as Core.APIPromise<{ result: TimeseriesGroupIPVersionResponse }>
@@ -122,48 +122,48 @@ export class TimeseriesGroups extends APIResource {
}
/**
- * Percentage distribution of attacks by protocol used over time.
+ * Percentage distribution of attacks by managed rules used over time.
*/
- protocol(
- query?: TimeseriesGroupProtocolParams,
+ managedRules(
+ query?: TimeseriesGroupManagedRulesParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- protocol(options?: Core.RequestOptions): Core.APIPromise;
- protocol(
- query: TimeseriesGroupProtocolParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ managedRules(options?: Core.RequestOptions): Core.APIPromise;
+ managedRules(
+ query: TimeseriesGroupManagedRulesParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.protocol({}, query);
+ return this.managedRules({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/protocol', {
+ this._client.get('/radar/attacks/layer7/timeseries_groups/managed_rules', {
query,
...options,
- }) as Core.APIPromise<{ result: TimeseriesGroupProtocolResponse }>
+ }) as Core.APIPromise<{ result: TimeseriesGroupManagedRulesResponse }>
)._thenUnwrap((obj) => obj.result);
}
/**
- * Percentage distribution of attacks by vector used over time.
+ * Percentage distribution of attacks by mitigation product used over time.
*/
- vector(
- query?: TimeseriesGroupVectorParams,
+ mitigationProduct(
+ query?: TimeseriesGroupMitigationProductParams,
options?: Core.RequestOptions,
- ): Core.APIPromise;
- vector(options?: Core.RequestOptions): Core.APIPromise;
- vector(
- query: TimeseriesGroupVectorParams | Core.RequestOptions = {},
+ ): Core.APIPromise;
+ mitigationProduct(options?: Core.RequestOptions): Core.APIPromise;
+ mitigationProduct(
+ query: TimeseriesGroupMitigationProductParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
if (isRequestOptions(query)) {
- return this.vector({}, query);
+ return this.mitigationProduct({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/vector', {
+ this._client.get('/radar/attacks/layer7/timeseries_groups/mitigation_product', {
query,
...options,
- }) as Core.APIPromise<{ result: TimeseriesGroupVectorResponse }>
+ }) as Core.APIPromise<{ result: TimeseriesGroupMitigationProductResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -183,7 +183,7 @@ export class TimeseriesGroups extends APIResource {
return this.vertical({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/timeseries_groups/vertical', {
+ this._client.get('/radar/attacks/layer7/timeseries_groups/vertical', {
query,
...options,
}) as Core.APIPromise<{ result: TimeseriesGroupVerticalResponse }>
@@ -191,52 +191,6 @@ export class TimeseriesGroups extends APIResource {
}
}
-export interface TimeseriesGroupBitrateResponse {
- meta: unknown;
-
- serie_0: TimeseriesGroupBitrateResponse.Serie0;
-}
-
-export namespace TimeseriesGroupBitrateResponse {
- export interface Serie0 {
- _1_GBPS_TO_10_GBPS: Array;
-
- _10_GBPS_TO_100_GBPS: Array;
-
- _500_MBPS_TO_1_GBPS: Array;
-
- OVER_100_GBPS: Array;
-
- timestamps: Array;
-
- UNDER_500_MBPS: Array;
- }
-}
-
-export interface TimeseriesGroupDurationResponse {
- meta: unknown;
-
- serie_0: TimeseriesGroupDurationResponse.Serie0;
-}
-
-export namespace TimeseriesGroupDurationResponse {
- export interface Serie0 {
- _1_HOUR_TO_3_HOURS: Array;
-
- _10_MINS_TO_20_MINS: Array;
-
- _20_MINS_TO_40_MINS: Array;
-
- _40_MINS_TO_1_HOUR: Array;
-
- OVER_3_HOURS: Array;
-
- timestamps: Array;
-
- UNDER_10_MINS: Array;
- }
-}
-
export interface TimeseriesGroupGetResponse {
meta: TimeseriesGroupGetResponse.Meta;
@@ -293,15 +247,49 @@ export namespace TimeseriesGroupGetResponse {
}
export interface Serie0 {
- gre: Array;
+ ACCESS_RULES: Array;
+
+ API_SHIELD: Array;
- icmp: Array;
+ BOT_MANAGEMENT: Array;
- tcp: Array;
+ DATA_LOSS_PREVENTION: Array;
+
+ DDOS: Array;
+
+ IP_REPUTATION: Array;
timestamps: Array;
- udp: Array;
+ WAF: Array;
+ }
+}
+
+export interface TimeseriesGroupHTTPMethodResponse {
+ meta: unknown;
+
+ serie_0: TimeseriesGroupHTTPMethodResponse.Serie0;
+}
+
+export namespace TimeseriesGroupHTTPMethodResponse {
+ export interface Serie0 {
+ GET: Array;
+
+ timestamps: Array;
+ }
+}
+
+export interface TimeseriesGroupHTTPVersionResponse {
+ meta: unknown;
+
+ serie_0: TimeseriesGroupHTTPVersionResponse.Serie0;
+}
+
+export namespace TimeseriesGroupHTTPVersionResponse {
+ export interface Serie0 {
+ 'HTTP/1.x': Array;
+
+ timestamps: Array;
}
}
@@ -334,36 +322,31 @@ export namespace TimeseriesGroupIPVersionResponse {
}
}
-export interface TimeseriesGroupProtocolResponse {
+export interface TimeseriesGroupManagedRulesResponse {
meta: unknown;
- serie_0: TimeseriesGroupProtocolResponse.Serie0;
+ serie_0: TimeseriesGroupManagedRulesResponse.Serie0;
}
-export namespace TimeseriesGroupProtocolResponse {
+export namespace TimeseriesGroupManagedRulesResponse {
export interface Serie0 {
- GRE: Array;
-
- ICMP: Array;
-
- TCP: Array;
+ Bot: Array;
timestamps: Array;
-
- UDP: Array;
}
}
-export interface TimeseriesGroupVectorResponse {
+export interface TimeseriesGroupMitigationProductResponse {
meta: unknown;
- serie_0: TimeseriesGroupVectorResponse.Serie0;
+ serie_0: TimeseriesGroupMitigationProductResponse.Serie0;
}
-export namespace TimeseriesGroupVectorResponse {
+export namespace TimeseriesGroupMitigationProductResponse {
export interface Serie0 {
+ DDOS: Array;
+
timestamps: Array;
- [k: string]: Array;
}
}
@@ -380,7 +363,7 @@ export namespace TimeseriesGroupVerticalResponse {
}
}
-export interface TimeseriesGroupBitrateParams {
+export interface TimeseriesGroupGetParams {
/**
* Aggregation interval results should be returned in (for example, in 15 minutes
* or 1 hour intervals). Refer to
@@ -388,6 +371,13 @@ export interface TimeseriesGroupBitrateParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -421,22 +411,11 @@ export interface TimeseriesGroupBitrateParams {
*/
dateStart?: Array;
- /**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
- */
- direction?: 'ORIGIN' | 'TARGET';
-
/**
* Format results are returned in.
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
* `-` to exclude from results. For example, `-US,PT` excludes results from the US,
@@ -448,20 +427,9 @@ export interface TimeseriesGroupBitrateParams {
* Array of names that will be used to name the series in responses.
*/
name?: Array;
-
- /**
- * Normalization method applied. Refer to
- * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
- */
- normalization?: 'PERCENTAGE' | 'MIN0_MAX';
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
-export interface TimeseriesGroupDurationParams {
+export interface TimeseriesGroupHTTPMethodParams {
/**
* Aggregation interval results should be returned in (for example, in 15 minutes
* or 1 hour intervals). Refer to
@@ -469,6 +437,13 @@ export interface TimeseriesGroupDurationParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -503,15 +478,14 @@ export interface TimeseriesGroupDurationParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -525,6 +499,19 @@ export interface TimeseriesGroupDurationParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
@@ -535,14 +522,9 @@ export interface TimeseriesGroupDurationParams {
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
*/
normalization?: 'PERCENTAGE' | 'MIN0_MAX';
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
-export interface TimeseriesGroupGetParams {
+export interface TimeseriesGroupHTTPVersionParams {
/**
* Aggregation interval results should be returned in (for example, in 15 minutes
* or 1 hour intervals). Refer to
@@ -595,6 +577,63 @@ export interface TimeseriesGroupGetParams {
*/
format?: 'JSON' | 'CSV';
+ /**
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for ip version.
+ */
+ ipVersion?: Array<'IPv4' | 'IPv6'>;
+
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
* `-` to exclude from results. For example, `-US,PT` excludes results from the US,
@@ -602,10 +641,29 @@ export interface TimeseriesGroupGetParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
name?: Array;
+
+ /**
+ * Normalization method applied. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization?: 'PERCENTAGE' | 'MIN0_MAX';
}
export interface TimeseriesGroupIndustryParams {
@@ -616,6 +674,13 @@ export interface TimeseriesGroupIndustryParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -650,15 +715,66 @@ export interface TimeseriesGroupIndustryParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -678,6 +794,19 @@ export interface TimeseriesGroupIndustryParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
@@ -698,6 +827,13 @@ export interface TimeseriesGroupIPVersionParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -732,15 +868,66 @@ export interface TimeseriesGroupIPVersionParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
@@ -749,6 +936,19 @@ export interface TimeseriesGroupIPVersionParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
@@ -759,14 +959,9 @@ export interface TimeseriesGroupIPVersionParams {
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
*/
normalization?: 'PERCENTAGE' | 'MIN0_MAX';
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
-export interface TimeseriesGroupProtocolParams {
+export interface TimeseriesGroupManagedRulesParams {
/**
* Aggregation interval results should be returned in (for example, in 15 minutes
* or 1 hour intervals). Refer to
@@ -774,6 +969,13 @@ export interface TimeseriesGroupProtocolParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -808,15 +1010,66 @@ export interface TimeseriesGroupProtocolParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -830,6 +1083,19 @@ export interface TimeseriesGroupProtocolParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
@@ -842,7 +1108,7 @@ export interface TimeseriesGroupProtocolParams {
normalization?: 'PERCENTAGE' | 'MIN0_MAX';
}
-export interface TimeseriesGroupVectorParams {
+export interface TimeseriesGroupMitigationProductParams {
/**
* Aggregation interval results should be returned in (for example, in 15 minutes
* or 1 hour intervals). Refer to
@@ -850,6 +1116,13 @@ export interface TimeseriesGroupVectorParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -883,27 +1156,72 @@ export interface TimeseriesGroupVectorParams {
*/
dateStart?: Array;
- /**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
- */
- direction?: 'ORIGIN' | 'TARGET';
-
/**
* Format results are returned in.
*/
format?: 'JSON' | 'CSV';
/**
- * Filter for ip version.
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
*/
- ipVersion?: Array<'IPv4' | 'IPv6'>;
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
- * Limit the number of objects (eg browsers, verticals, etc) to the top items over
- * the time range.
+ * Filter for ip version.
*/
- limitPerGroup?: number;
+ ipVersion?: Array<'IPv4' | 'IPv6'>;
/**
* Array of comma separated list of locations (alpha-2 country codes). Start with
@@ -922,11 +1240,6 @@ export interface TimeseriesGroupVectorParams {
* [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
*/
normalization?: 'PERCENTAGE' | 'MIN0_MAX';
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
export interface TimeseriesGroupVerticalParams {
@@ -937,6 +1250,13 @@ export interface TimeseriesGroupVerticalParams {
*/
aggInterval?: '15m' | '1h' | '1d' | '1w';
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -971,15 +1291,66 @@ export interface TimeseriesGroupVerticalParams {
dateStart?: Array;
/**
- * Together with the `location` parameter, will apply the filter to origin or
- * target location.
+ * Format results are returned in.
*/
- direction?: 'ORIGIN' | 'TARGET';
+ format?: 'JSON' | 'CSV';
/**
- * Format results are returned in.
+ * Filter for http method.
+ */
+ httpMethod?: Array<
+ | 'GET'
+ | 'POST'
+ | 'DELETE'
+ | 'PUT'
+ | 'HEAD'
+ | 'PURGE'
+ | 'OPTIONS'
+ | 'PROPFIND'
+ | 'MKCOL'
+ | 'PATCH'
+ | 'ACL'
+ | 'BCOPY'
+ | 'BDELETE'
+ | 'BMOVE'
+ | 'BPROPFIND'
+ | 'BPROPPATCH'
+ | 'CHECKIN'
+ | 'CHECKOUT'
+ | 'CONNECT'
+ | 'COPY'
+ | 'LABEL'
+ | 'LOCK'
+ | 'MERGE'
+ | 'MKACTIVITY'
+ | 'MKWORKSPACE'
+ | 'MOVE'
+ | 'NOTIFY'
+ | 'ORDERPATCH'
+ | 'POLL'
+ | 'PROPPATCH'
+ | 'REPORT'
+ | 'SEARCH'
+ | 'SUBSCRIBE'
+ | 'TRACE'
+ | 'UNCHECKOUT'
+ | 'UNLOCK'
+ | 'UNSUBSCRIBE'
+ | 'UPDATE'
+ | 'VERSIONCONTROL'
+ | 'BASELINECONTROL'
+ | 'XMSENUMATTS'
+ | 'RPC_OUT_DATA'
+ | 'RPC_IN_DATA'
+ | 'JSON'
+ | 'COOK'
+ | 'TRACK'
+ >;
+
+ /**
+ * Filter for http version.
*/
- format?: 'JSON' | 'CSV';
+ httpVersion?: Array<'HTTPv1' | 'HTTPv2' | 'HTTPv3'>;
/**
* Filter for ip version.
@@ -999,6 +1370,19 @@ export interface TimeseriesGroupVerticalParams {
*/
location?: Array;
+ /**
+ * Array of L7 mitigation products.
+ */
+ mitigationProduct?: Array<
+ | 'DDOS'
+ | 'WAF'
+ | 'BOT_MANAGEMENT'
+ | 'ACCESS_RULES'
+ | 'IP_REPUTATION'
+ | 'API_SHIELD'
+ | 'DATA_LOSS_PREVENTION'
+ >;
+
/**
* Array of names that will be used to name the series in responses.
*/
@@ -1012,20 +1396,20 @@ export interface TimeseriesGroupVerticalParams {
}
export namespace TimeseriesGroups {
- export import TimeseriesGroupBitrateResponse = TimeseriesGroupsAPI.TimeseriesGroupBitrateResponse;
- export import TimeseriesGroupDurationResponse = TimeseriesGroupsAPI.TimeseriesGroupDurationResponse;
export import TimeseriesGroupGetResponse = TimeseriesGroupsAPI.TimeseriesGroupGetResponse;
+ export import TimeseriesGroupHTTPMethodResponse = TimeseriesGroupsAPI.TimeseriesGroupHTTPMethodResponse;
+ export import TimeseriesGroupHTTPVersionResponse = TimeseriesGroupsAPI.TimeseriesGroupHTTPVersionResponse;
export import TimeseriesGroupIndustryResponse = TimeseriesGroupsAPI.TimeseriesGroupIndustryResponse;
export import TimeseriesGroupIPVersionResponse = TimeseriesGroupsAPI.TimeseriesGroupIPVersionResponse;
- export import TimeseriesGroupProtocolResponse = TimeseriesGroupsAPI.TimeseriesGroupProtocolResponse;
- export import TimeseriesGroupVectorResponse = TimeseriesGroupsAPI.TimeseriesGroupVectorResponse;
+ export import TimeseriesGroupManagedRulesResponse = TimeseriesGroupsAPI.TimeseriesGroupManagedRulesResponse;
+ export import TimeseriesGroupMitigationProductResponse = TimeseriesGroupsAPI.TimeseriesGroupMitigationProductResponse;
export import TimeseriesGroupVerticalResponse = TimeseriesGroupsAPI.TimeseriesGroupVerticalResponse;
- export import TimeseriesGroupBitrateParams = TimeseriesGroupsAPI.TimeseriesGroupBitrateParams;
- export import TimeseriesGroupDurationParams = TimeseriesGroupsAPI.TimeseriesGroupDurationParams;
export import TimeseriesGroupGetParams = TimeseriesGroupsAPI.TimeseriesGroupGetParams;
+ export import TimeseriesGroupHTTPMethodParams = TimeseriesGroupsAPI.TimeseriesGroupHTTPMethodParams;
+ export import TimeseriesGroupHTTPVersionParams = TimeseriesGroupsAPI.TimeseriesGroupHTTPVersionParams;
export import TimeseriesGroupIndustryParams = TimeseriesGroupsAPI.TimeseriesGroupIndustryParams;
export import TimeseriesGroupIPVersionParams = TimeseriesGroupsAPI.TimeseriesGroupIPVersionParams;
- export import TimeseriesGroupProtocolParams = TimeseriesGroupsAPI.TimeseriesGroupProtocolParams;
- export import TimeseriesGroupVectorParams = TimeseriesGroupsAPI.TimeseriesGroupVectorParams;
+ export import TimeseriesGroupManagedRulesParams = TimeseriesGroupsAPI.TimeseriesGroupManagedRulesParams;
+ export import TimeseriesGroupMitigationProductParams = TimeseriesGroupsAPI.TimeseriesGroupMitigationProductParams;
export import TimeseriesGroupVerticalParams = TimeseriesGroupsAPI.TimeseriesGroupVerticalParams;
}
diff --git a/src/resources/radar/attacks/layer7/top/ases.ts b/src/resources/radar/attacks/layer7/top/ases.ts
new file mode 100644
index 0000000000..ebb5d325d1
--- /dev/null
+++ b/src/resources/radar/attacks/layer7/top/ases.ts
@@ -0,0 +1,155 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as AsesAPI from 'cloudflare/resources/radar/attacks/layer7/top/ases';
+
+export class Ases extends APIResource {
+ /**
+ * Get the top origin Autonomous Systems of and by layer 7 attacks. Values are a
+ * percentage out of the total layer 7 attacks. The origin Autonomous Systems is
+ * determined by the client IP.
+ */
+ origin(query?: AseOriginParams, options?: Core.RequestOptions): Core.APIPromise;
+ origin(options?: Core.RequestOptions): Core.APIPromise;
+ origin(
+ query: AseOriginParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.origin({}, query);
+ }
+ return (
+ this._client.get('/radar/attacks/layer7/top/ases/origin', { query, ...options }) as Core.APIPromise<{
+ result: AseOriginResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface AseOriginResponse {
+ meta: AseOriginResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace AseOriginResponse {
+ export interface Meta {
+ dateRange: Array;
+
+ lastUpdated: string;
+
+ confidenceInfo?: Meta.ConfidenceInfo;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface ConfidenceInfo {
+ annotations?: Array;
+
+ level?: number;
+ }
+
+ export namespace ConfidenceInfo {
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ eventType: string;
+
+ isInstantaneous: unknown;
+
+ endTime?: string;
+
+ linkedUrl?: string;
+
+ startTime?: string;
+ }
+ }
+ }
+
+ export interface Top0 {
+ originAsn: string;
+
+ originAsnName: string;
+
+ rank: number;
+
+ value: string;
+ }
+}
+
+export interface AseOriginParams {
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * For example, use `7d` and `7dControl` to compare this week with the previous
+ * week. Use this parameter or set specific start and end dates (`dateStart` and
+ * `dateEnd` parameters).
+ */
+ dateRange?: Array<
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl'
+ >;
+
+ /**
+ * Array of datetimes to filter the start of a series.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Array of comma separated list of locations (alpha-2 country codes). Start with
+ * `-` to exclude from results. For example, `-US,PT` excludes results from the US,
+ * but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names that will be used to name the series in responses.
+ */
+ name?: Array;
+}
+
+export namespace Ases {
+ export import AseOriginResponse = AsesAPI.AseOriginResponse;
+ export import AseOriginParams = AsesAPI.AseOriginParams;
+}
diff --git a/src/resources/radar/attacks/layer7/top/index.ts b/src/resources/radar/attacks/layer7/top/index.ts
index bb58406b48..e8f88b3747 100644
--- a/src/resources/radar/attacks/layer7/top/index.ts
+++ b/src/resources/radar/attacks/layer7/top/index.ts
@@ -1,5 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
+export { AseOriginResponse, AseOriginParams, Ases } from './ases';
export {
LocationOriginResponse,
LocationTargetResponse,
diff --git a/src/resources/radar/attacks/layer7/top/locations.ts b/src/resources/radar/attacks/layer7/top/locations.ts
index 6f4ef7834b..85264525d7 100644
--- a/src/resources/radar/attacks/layer7/top/locations.ts
+++ b/src/resources/radar/attacks/layer7/top/locations.ts
@@ -7,7 +7,9 @@ import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer7/top/loc
export class Locations extends APIResource {
/**
- * Get the origin locations of attacks.
+ * Get the top origin locations of and by layer 7 attacks. Values are a percentage
+ * out of the total layer 7 attacks. The origin location is determined by the
+ * client IP.
*/
origin(
query?: LocationOriginParams,
@@ -22,7 +24,7 @@ export class Locations extends APIResource {
return this.origin({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/top/locations/origin', {
+ this._client.get('/radar/attacks/layer7/top/locations/origin', {
query,
...options,
}) as Core.APIPromise<{ result: LocationOriginResponse }>
@@ -30,7 +32,9 @@ export class Locations extends APIResource {
}
/**
- * Get the target locations of attacks.
+ * Get the top target locations of and by layer 7 attacks. Values are a percentage
+ * out of the total layer 7 attacks. The target location is determined by the
+ * attacked zone's billing country, when available.
*/
target(
query?: LocationTargetParams,
@@ -45,7 +49,7 @@ export class Locations extends APIResource {
return this.target({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/top/locations/target', {
+ this._client.get('/radar/attacks/layer7/top/locations/target', {
query,
...options,
}) as Core.APIPromise<{ result: LocationTargetResponse }>
@@ -182,6 +186,13 @@ export namespace LocationTargetResponse {
}
export interface LocationOriginParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -220,32 +231,15 @@ export interface LocationOriginParams {
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Limit the number of objects in the response.
*/
limit?: number;
- /**
- * Array of comma separated list of locations (alpha-2 country codes). Start with
- * `-` to exclude from results. For example, `-US,PT` excludes results from the US,
- * but includes results from PT.
- */
- location?: Array;
-
/**
* Array of names that will be used to name the series in responses.
*/
name?: Array;
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
export interface LocationTargetParams {
@@ -287,32 +281,15 @@ export interface LocationTargetParams {
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Limit the number of objects in the response.
*/
limit?: number;
- /**
- * Array of comma separated list of locations (alpha-2 country codes). Start with
- * `-` to exclude from results. For example, `-US,PT` excludes results from the US,
- * but includes results from PT.
- */
- location?: Array;
-
/**
* Array of names that will be used to name the series in responses.
*/
name?: Array;
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
export namespace Locations {
diff --git a/src/resources/radar/attacks/layer7/top/top.ts b/src/resources/radar/attacks/layer7/top/top.ts
index 23568c1efb..cd8966883d 100644
--- a/src/resources/radar/attacks/layer7/top/top.ts
+++ b/src/resources/radar/attacks/layer7/top/top.ts
@@ -4,16 +4,19 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as TopAPI from 'cloudflare/resources/radar/attacks/layer7/top/top';
+import * as AsesAPI from 'cloudflare/resources/radar/attacks/layer7/top/ases';
import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer7/top/locations';
export class Top extends APIResource {
locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client);
+ ases: AsesAPI.Ases = new AsesAPI.Ases(this._client);
/**
* Get the top attacks from origin to target location. Values are a percentage out
- * of the total layer 3 attacks (with billing country). You can optionally limit
- * the number of attacks per origin/target location (useful if all the top attacks
- * are from or to the same location).
+ * of the total layer 7 attacks (with billing country). The attack magnitude can be
+ * defined by the number of mitigated requests or by the number of zones affected.
+ * You can optionally limit the number of attacks per origin/target location
+ * (useful if all the top attacks are from or to the same location).
*/
attacks(query?: TopAttacksParams, options?: Core.RequestOptions): Core.APIPromise;
attacks(options?: Core.RequestOptions): Core.APIPromise;
@@ -25,7 +28,7 @@ export class Top extends APIResource {
return this.attacks({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/top/attacks', { query, ...options }) as Core.APIPromise<{
+ this._client.get('/radar/attacks/layer7/top/attacks', { query, ...options }) as Core.APIPromise<{
result: TopAttacksResponse;
}>
)._thenUnwrap((obj) => obj.result);
@@ -44,7 +47,7 @@ export class Top extends APIResource {
return this.industry({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/top/industry', { query, ...options }) as Core.APIPromise<{
+ this._client.get('/radar/attacks/layer7/top/industry', { query, ...options }) as Core.APIPromise<{
result: TopIndustryResponse;
}>
)._thenUnwrap((obj) => obj.result);
@@ -63,7 +66,7 @@ export class Top extends APIResource {
return this.vertical({}, query);
}
return (
- this._client.get('/radar/attacks/layer3/top/vertical', { query, ...options }) as Core.APIPromise<{
+ this._client.get('/radar/attacks/layer7/top/vertical', { query, ...options }) as Core.APIPromise<{
result: TopVerticalResponse;
}>
)._thenUnwrap((obj) => obj.result);
@@ -128,6 +131,10 @@ export namespace TopAttacksResponse {
originCountryName: string;
+ targetCountryAlpha2: string;
+
+ targetCountryName: string;
+
value: string;
}
}
@@ -253,6 +260,13 @@ export namespace TopVerticalResponse {
}
export interface TopAttacksParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -291,11 +305,6 @@ export interface TopAttacksParams {
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Limit the number of objects in the response.
*/
@@ -322,17 +331,25 @@ export interface TopAttacksParams {
location?: Array;
/**
- * Array of names that will be used to name the series in responses.
+ * Attack magnitude can be defined by total requests mitigated or by total zones
+ * attacked.
*/
- name?: Array;
+ magnitude?: 'AFFECTED_ZONES' | 'MITIGATED_REQUESTS';
/**
- * Array of L3/4 attack types.
+ * Array of names that will be used to name the series in responses.
*/
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
+ name?: Array;
}
export interface TopIndustryParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
/**
* End of the date range (inclusive).
*/
@@ -371,11 +388,6 @@ export interface TopIndustryParams {
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Limit the number of objects in the response.
*/
@@ -392,14 +404,16 @@ export interface TopIndustryParams {
* Array of names that will be used to name the series in responses.
*/
name?: Array;
+}
+export interface TopVerticalParams {
/**
- * Array of L3/4 attack types.
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
*/
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
-}
+ asn?: Array;
-export interface TopVerticalParams {
/**
* End of the date range (inclusive).
*/
@@ -438,11 +452,6 @@ export interface TopVerticalParams {
*/
format?: 'JSON' | 'CSV';
- /**
- * Filter for ip version.
- */
- ipVersion?: Array<'IPv4' | 'IPv6'>;
-
/**
* Limit the number of objects in the response.
*/
@@ -459,11 +468,6 @@ export interface TopVerticalParams {
* Array of names that will be used to name the series in responses.
*/
name?: Array;
-
- /**
- * Array of L3/4 attack types.
- */
- protocol?: Array<'UDP' | 'TCP' | 'ICMP' | 'GRE'>;
}
export namespace Top {
@@ -478,4 +482,7 @@ export namespace Top {
export import LocationTargetResponse = LocationsAPI.LocationTargetResponse;
export import LocationOriginParams = LocationsAPI.LocationOriginParams;
export import LocationTargetParams = LocationsAPI.LocationTargetParams;
+ export import Ases = AsesAPI.Ases;
+ export import AseOriginResponse = AsesAPI.AseOriginResponse;
+ export import AseOriginParams = AsesAPI.AseOriginParams;
}
diff --git a/src/resources/radar/bgp/bgp.ts b/src/resources/radar/bgp/bgp.ts
index 89a224bc43..7ff7567093 100644
--- a/src/resources/radar/bgp/bgp.ts
+++ b/src/resources/radar/bgp/bgp.ts
@@ -7,11 +7,11 @@ import * as BGPAPI from 'cloudflare/resources/radar/bgp/bgp';
import * as HijacksAPI from 'cloudflare/resources/radar/bgp/hijacks';
import * as LeaksAPI from 'cloudflare/resources/radar/bgp/leaks';
import * as RoutesAPI from 'cloudflare/resources/radar/bgp/routes';
-import * as TopsAPI from 'cloudflare/resources/radar/bgp/tops/tops';
+import * as TopAPI from 'cloudflare/resources/radar/bgp/top/top';
export class BGP extends APIResource {
leaks: LeaksAPI.Leaks = new LeaksAPI.Leaks(this._client);
- tops: TopsAPI.Tops = new TopsAPI.Tops(this._client);
+ top: TopAPI.Top = new TopAPI.Top(this._client);
hijacks: HijacksAPI.Hijacks = new HijacksAPI.Hijacks(this._client);
routes: RoutesAPI.Routes = new RoutesAPI.Routes(this._client);
@@ -177,7 +177,9 @@ export namespace BGP {
export import Leaks = LeaksAPI.Leaks;
export import LeakEventsResponse = LeaksAPI.LeakEventsResponse;
export import LeakEventsParams = LeaksAPI.LeakEventsParams;
- export import Tops = TopsAPI.Tops;
+ export import Top = TopAPI.Top;
+ export import TopPrefixesResponse = TopAPI.TopPrefixesResponse;
+ export import TopPrefixesParams = TopAPI.TopPrefixesParams;
export import Hijacks = HijacksAPI.Hijacks;
export import HijackEventsResponse = HijacksAPI.HijackEventsResponse;
export import HijackEventsParams = HijacksAPI.HijackEventsParams;
diff --git a/src/resources/radar/bgp/index.ts b/src/resources/radar/bgp/index.ts
index e02bcf5ce3..7f123791d8 100644
--- a/src/resources/radar/bgp/index.ts
+++ b/src/resources/radar/bgp/index.ts
@@ -12,4 +12,4 @@ export {
RouteStatsParams,
Routes,
} from './routes';
-export { Tops } from './tops/index';
+export { TopPrefixesResponse, TopPrefixesParams, Top } from './top/index';
diff --git a/src/resources/radar/bgp/top/ases.ts b/src/resources/radar/bgp/top/ases.ts
new file mode 100644
index 0000000000..8ef0d0d261
--- /dev/null
+++ b/src/resources/radar/bgp/top/ases.ts
@@ -0,0 +1,204 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as AsesAPI from 'cloudflare/resources/radar/bgp/top/ases';
+
+export class Ases extends APIResource {
+ /**
+ * Get the top autonomous systems (AS) by BGP updates (announcements only). Values
+ * are a percentage out of the total updates.
+ */
+ get(query?: AseGetParams, options?: Core.RequestOptions): Core.APIPromise;
+ get(options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ query: AseGetParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.get({}, query);
+ }
+ return (
+ this._client.get('/radar/bgp/top/ases', { query, ...options }) as Core.APIPromise<{
+ result: AseGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Get the full list of autonomous systems on the global routing table ordered by
+ * announced prefixes count. The data comes from public BGP MRT data archives and
+ * updates every 2 hours.
+ */
+ prefixes(query?: AsePrefixesParams, options?: Core.RequestOptions): Core.APIPromise;
+ prefixes(options?: Core.RequestOptions): Core.APIPromise;
+ prefixes(
+ query: AsePrefixesParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.prefixes({}, query);
+ }
+ return (
+ this._client.get('/radar/bgp/top/ases/prefixes', { query, ...options }) as Core.APIPromise<{
+ result: AsePrefixesResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface AseGetResponse {
+ meta: AseGetResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace AseGetResponse {
+ export interface Meta {
+ dateRange: Array;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+ }
+
+ export interface Top0 {
+ asn: number;
+
+ ASName: string;
+
+ /**
+ * Percentage of updates by this AS out of the total updates by all autonomous
+ * systems.
+ */
+ value: string;
+ }
+}
+
+export interface AsePrefixesResponse {
+ asns: Array;
+
+ meta: AsePrefixesResponse.Meta;
+}
+
+export namespace AsePrefixesResponse {
+ export interface Asn {
+ asn: number;
+
+ country: string;
+
+ name: string;
+
+ pfxs_count: number;
+ }
+
+ export interface Meta {
+ data_time: string;
+
+ query_time: string;
+
+ total_peers: number;
+ }
+}
+
+export interface AseGetParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * For example, use `7d` and `7dControl` to compare this week with the previous
+ * week. Use this parameter or set specific start and end dates (`dateStart` and
+ * `dateEnd` parameters).
+ */
+ dateRange?: Array<
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl'
+ >;
+
+ /**
+ * Array of datetimes to filter the start of a series.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Array of names that will be used to name the series in responses.
+ */
+ name?: Array;
+
+ /**
+ * Array of BGP network prefixes.
+ */
+ prefix?: Array;
+
+ /**
+ * Array of BGP update types.
+ */
+ updateType?: Array<'ANNOUNCEMENT' | 'WITHDRAWAL'>;
+}
+
+export interface AsePrefixesParams {
+ /**
+ * Alpha-2 country code.
+ */
+ country?: string;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Maximum number of ASes to return
+ */
+ limit?: number;
+}
+
+export namespace Ases {
+ export import AseGetResponse = AsesAPI.AseGetResponse;
+ export import AsePrefixesResponse = AsesAPI.AsePrefixesResponse;
+ export import AseGetParams = AsesAPI.AseGetParams;
+ export import AsePrefixesParams = AsesAPI.AsePrefixesParams;
+}
diff --git a/src/resources/radar/bgp/top/index.ts b/src/resources/radar/bgp/top/index.ts
new file mode 100644
index 0000000000..f38212d753
--- /dev/null
+++ b/src/resources/radar/bgp/top/index.ts
@@ -0,0 +1,4 @@
+// File generated from our OpenAPI spec by Stainless.
+
+export { AseGetResponse, AsePrefixesResponse, AseGetParams, AsePrefixesParams, Ases } from './ases';
+export { TopPrefixesResponse, TopPrefixesParams, Top } from './top';
diff --git a/src/resources/radar/bgp/top/top.ts b/src/resources/radar/bgp/top/top.ts
new file mode 100644
index 0000000000..b425cec00f
--- /dev/null
+++ b/src/resources/radar/bgp/top/top.ts
@@ -0,0 +1,135 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as TopAPI from 'cloudflare/resources/radar/bgp/top/top';
+import * as AsesAPI from 'cloudflare/resources/radar/bgp/top/ases';
+
+export class Top extends APIResource {
+ ases: AsesAPI.Ases = new AsesAPI.Ases(this._client);
+
+ /**
+ * Get the top network prefixes by BGP updates. Values are a percentage out of the
+ * total BGP updates.
+ */
+ prefixes(query?: TopPrefixesParams, options?: Core.RequestOptions): Core.APIPromise;
+ prefixes(options?: Core.RequestOptions): Core.APIPromise;
+ prefixes(
+ query: TopPrefixesParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.prefixes({}, query);
+ }
+ return (
+ this._client.get('/radar/bgp/top/prefixes', { query, ...options }) as Core.APIPromise<{
+ result: TopPrefixesResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface TopPrefixesResponse {
+ meta: TopPrefixesResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace TopPrefixesResponse {
+ export interface Meta {
+ dateRange: Array;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+ }
+
+ export interface Top0 {
+ prefix: string;
+
+ value: string;
+ }
+}
+
+export interface TopPrefixesParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * For example, use `7d` and `7dControl` to compare this week with the previous
+ * week. Use this parameter or set specific start and end dates (`dateStart` and
+ * `dateEnd` parameters).
+ */
+ dateRange?: Array<
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl'
+ >;
+
+ /**
+ * Array of datetimes to filter the start of a series.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Array of names that will be used to name the series in responses.
+ */
+ name?: Array;
+
+ /**
+ * Array of BGP update types.
+ */
+ updateType?: Array<'ANNOUNCEMENT' | 'WITHDRAWAL'>;
+}
+
+export namespace Top {
+ export import TopPrefixesResponse = TopAPI.TopPrefixesResponse;
+ export import TopPrefixesParams = TopAPI.TopPrefixesParams;
+ export import Ases = AsesAPI.Ases;
+ export import AseGetResponse = AsesAPI.AseGetResponse;
+ export import AsePrefixesResponse = AsesAPI.AsePrefixesResponse;
+ export import AseGetParams = AsesAPI.AseGetParams;
+ export import AsePrefixesParams = AsesAPI.AsePrefixesParams;
+}
diff --git a/src/resources/radar/bgp/tops/ases.ts b/src/resources/radar/bgp/tops/ases.ts
deleted file mode 100644
index 3fbfff0102..0000000000
--- a/src/resources/radar/bgp/tops/ases.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import * as Core from 'cloudflare/core';
-import { APIResource } from 'cloudflare/resource';
-import { isRequestOptions } from 'cloudflare/core';
-import * as AsesAPI from 'cloudflare/resources/radar/bgp/tops/ases';
-
-export class Ases extends APIResource {
- /**
- * Get the full list of autonomous systems on the global routing table ordered by
- * announced prefixes count. The data comes from public BGP MRT data archives and
- * updates every 2 hours.
- */
- prefixes(query?: AsePrefixesParams, options?: Core.RequestOptions): Core.APIPromise;
- prefixes(options?: Core.RequestOptions): Core.APIPromise;
- prefixes(
- query: AsePrefixesParams | Core.RequestOptions = {},
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- if (isRequestOptions(query)) {
- return this.prefixes({}, query);
- }
- return (
- this._client.get('/radar/bgp/top/ases/prefixes', { query, ...options }) as Core.APIPromise<{
- result: AsePrefixesResponse;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-export interface AsePrefixesResponse {
- asns: Array;
-
- meta: AsePrefixesResponse.Meta;
-}
-
-export namespace AsePrefixesResponse {
- export interface Asn {
- asn: number;
-
- country: string;
-
- name: string;
-
- pfxs_count: number;
- }
-
- export interface Meta {
- data_time: string;
-
- query_time: string;
-
- total_peers: number;
- }
-}
-
-export interface AsePrefixesParams {
- /**
- * Alpha-2 country code.
- */
- country?: string;
-
- /**
- * Format results are returned in.
- */
- format?: 'JSON' | 'CSV';
-
- /**
- * Maximum number of ASes to return
- */
- limit?: number;
-}
-
-export namespace Ases {
- export import AsePrefixesResponse = AsesAPI.AsePrefixesResponse;
- export import AsePrefixesParams = AsesAPI.AsePrefixesParams;
-}
diff --git a/src/resources/radar/bgp/tops/index.ts b/src/resources/radar/bgp/tops/index.ts
deleted file mode 100644
index 9670979e66..0000000000
--- a/src/resources/radar/bgp/tops/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-export { AsePrefixesResponse, AsePrefixesParams, Ases } from './ases';
-export { Tops } from './tops';
diff --git a/src/resources/radar/bgp/tops/tops.ts b/src/resources/radar/bgp/tops/tops.ts
deleted file mode 100644
index f9cd1467d5..0000000000
--- a/src/resources/radar/bgp/tops/tops.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import { APIResource } from 'cloudflare/resource';
-import * as AsesAPI from 'cloudflare/resources/radar/bgp/tops/ases';
-
-export class Tops extends APIResource {
- ases: AsesAPI.Ases = new AsesAPI.Ases(this._client);
-}
-
-export namespace Tops {
- export import Ases = AsesAPI.Ases;
- export import AsePrefixesResponse = AsesAPI.AsePrefixesResponse;
- export import AsePrefixesParams = AsesAPI.AsePrefixesParams;
-}
diff --git a/src/resources/radar/email/security/index.ts b/src/resources/radar/email/security/index.ts
index 0f1c040757..1fcec611d9 100644
--- a/src/resources/radar/email/security/index.ts
+++ b/src/resources/radar/email/security/index.ts
@@ -25,3 +25,4 @@ export {
TimeseriesGroupDKIMParams,
TimeseriesGroups,
} from './timeseries-groups';
+export { Top } from './top/index';
diff --git a/src/resources/radar/email/security/security.ts b/src/resources/radar/email/security/security.ts
index f0fd4dae1a..c909af7649 100644
--- a/src/resources/radar/email/security/security.ts
+++ b/src/resources/radar/email/security/security.ts
@@ -3,8 +3,10 @@
import { APIResource } from 'cloudflare/resource';
import * as SummaryAPI from 'cloudflare/resources/radar/email/security/summary';
import * as TimeseriesGroupsAPI from 'cloudflare/resources/radar/email/security/timeseries-groups';
+import * as TopAPI from 'cloudflare/resources/radar/email/security/top/top';
export class Security extends APIResource {
+ top: TopAPI.Top = new TopAPI.Top(this._client);
summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client);
timeseriesGroups: TimeseriesGroupsAPI.TimeseriesGroups = new TimeseriesGroupsAPI.TimeseriesGroups(
this._client,
@@ -12,6 +14,7 @@ export class Security extends APIResource {
}
export namespace Security {
+ export import Top = TopAPI.Top;
export import Summary = SummaryAPI.Summary;
export import SummaryArcResponse = SummaryAPI.SummaryArcResponse;
export import SummaryDKIMResponse = SummaryAPI.SummaryDKIMResponse;
diff --git a/src/resources/radar/email/security/top/ases/arc.ts b/src/resources/radar/email/security/top/ases/arc.ts
new file mode 100644
index 0000000000..1881194c9d
--- /dev/null
+++ b/src/resources/radar/email/security/top/ases/arc.ts
@@ -0,0 +1,179 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as ArcAPI from 'cloudflare/resources/radar/email/security/top/ases/arc';
+
+export class Arc extends APIResource {
+ /**
+ * Get the top autonomous systems (AS) by emails ARC validation.
+ */
+ get(
+ arc: 'PASS' | 'NONE' | 'FAIL',
+ query?: ArcGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ get(arc: 'PASS' | 'NONE' | 'FAIL', options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ arc: 'PASS' | 'NONE' | 'FAIL',
+ query: ArcGetParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.get(arc, {}, query);
+ }
+ return (
+ this._client.get(`/radar/email/security/top/ases/arc/${arc}`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: ArcGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface ArcGetResponse {
+ meta: ArcGetResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace ArcGetResponse {
+ export interface Meta {
+ dateRange: Array;
+
+ lastUpdated: string;
+
+ confidenceInfo?: Meta.ConfidenceInfo;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface ConfidenceInfo {
+ annotations?: Array;
+
+ level?: number;
+ }
+
+ export namespace ConfidenceInfo {
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ eventType: string;
+
+ isInstantaneous: unknown;
+
+ endTime?: string;
+
+ linkedUrl?: string;
+
+ startTime?: string;
+ }
+ }
+ }
+
+ export interface Top0 {
+ clientASN: number;
+
+ clientASName: string;
+
+ value: string;
+ }
+}
+
+export interface ArcGetParams {
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * For example, use `7d` and `7dControl` to compare this week with the previous
+ * week. Use this parameter or set specific start and end dates (`dateStart` and
+ * `dateEnd` parameters).
+ */
+ dateRange?: Array<
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl'
+ >;
+
+ /**
+ * Array of datetimes to filter the start of a series.
+ */
+ dateStart?: Array;
+
+ /**
+ * Filter for dkim.
+ */
+ dkim?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Filter for dmarc.
+ */
+ dmarc?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Array of comma separated list of locations (alpha-2 country codes). Start with
+ * `-` to exclude from results. For example, `-US,PT` excludes results from the US,
+ * but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names that will be used to name the series in responses.
+ */
+ name?: Array;
+
+ /**
+ * Filter for spf.
+ */
+ spf?: Array<'PASS' | 'NONE' | 'FAIL'>;
+}
+
+export namespace Arc {
+ export import ArcGetResponse = ArcAPI.ArcGetResponse;
+ export import ArcGetParams = ArcAPI.ArcGetParams;
+}
diff --git a/src/resources/radar/email/security/top/ases/ases.ts b/src/resources/radar/email/security/top/ases/ases.ts
new file mode 100644
index 0000000000..1dfcfb2ea9
--- /dev/null
+++ b/src/resources/radar/email/security/top/ases/ases.ts
@@ -0,0 +1,210 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as AsesAPI from 'cloudflare/resources/radar/email/security/top/ases/ases';
+import * as ArcAPI from 'cloudflare/resources/radar/email/security/top/ases/arc';
+import * as DKIMAPI from 'cloudflare/resources/radar/email/security/top/ases/dkim';
+import * as DmarcAPI from 'cloudflare/resources/radar/email/security/top/ases/dmarc';
+import * as MaliciousAPI from 'cloudflare/resources/radar/email/security/top/ases/malicious';
+import * as SpamAPI from 'cloudflare/resources/radar/email/security/top/ases/spam';
+import * as SPFAPI from 'cloudflare/resources/radar/email/security/top/ases/spf';
+
+export class Ases extends APIResource {
+ arc: ArcAPI.Arc = new ArcAPI.Arc(this._client);
+ dkim: DKIMAPI.DKIM = new DKIMAPI.DKIM(this._client);
+ dmarc: DmarcAPI.Dmarc = new DmarcAPI.Dmarc(this._client);
+ malicious: MaliciousAPI.Malicious = new MaliciousAPI.Malicious(this._client);
+ spam: SpamAPI.Spam = new SpamAPI.Spam(this._client);
+ spf: SPFAPI.SPF = new SPFAPI.SPF(this._client);
+
+ /**
+ * Get the top autonomous systems (AS) by email messages. Values are a percentage
+ * out of the total emails.
+ */
+ get(query?: AseGetParams, options?: Core.RequestOptions): Core.APIPromise;
+ get(options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ query: AseGetParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.get({}, query);
+ }
+ return (
+ this._client.get('/radar/email/security/top/ases', { query, ...options }) as Core.APIPromise<{
+ result: AseGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface AseGetResponse {
+ meta: AseGetResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace AseGetResponse {
+ export interface Meta {
+ dateRange: Array;
+
+ lastUpdated: string;
+
+ confidenceInfo?: Meta.ConfidenceInfo;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface ConfidenceInfo {
+ annotations?: Array;
+
+ level?: number;
+ }
+
+ export namespace ConfidenceInfo {
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ eventType: string;
+
+ isInstantaneous: unknown;
+
+ endTime?: string;
+
+ linkedUrl?: string;
+
+ startTime?: string;
+ }
+ }
+ }
+
+ export interface Top0 {
+ clientASN: number;
+
+ clientASName: string;
+
+ value: string;
+ }
+}
+
+export interface AseGetParams {
+ /**
+ * Filter for arc (Authenticated Received Chain).
+ */
+ arc?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * For example, use `7d` and `7dControl` to compare this week with the previous
+ * week. Use this parameter or set specific start and end dates (`dateStart` and
+ * `dateEnd` parameters).
+ */
+ dateRange?: Array<
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl'
+ >;
+
+ /**
+ * Array of datetimes to filter the start of a series.
+ */
+ dateStart?: Array;
+
+ /**
+ * Filter for dkim.
+ */
+ dkim?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Filter for dmarc.
+ */
+ dmarc?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Array of comma separated list of locations (alpha-2 country codes). Start with
+ * `-` to exclude from results. For example, `-US,PT` excludes results from the US,
+ * but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names that will be used to name the series in responses.
+ */
+ name?: Array;
+
+ /**
+ * Filter for spf.
+ */
+ spf?: Array<'PASS' | 'NONE' | 'FAIL'>;
+}
+
+export namespace Ases {
+ export import AseGetResponse = AsesAPI.AseGetResponse;
+ export import AseGetParams = AsesAPI.AseGetParams;
+ export import Arc = ArcAPI.Arc;
+ export import ArcGetResponse = ArcAPI.ArcGetResponse;
+ export import ArcGetParams = ArcAPI.ArcGetParams;
+ export import DKIM = DKIMAPI.DKIM;
+ export import DKIMGetResponse = DKIMAPI.DKIMGetResponse;
+ export import DKIMGetParams = DKIMAPI.DKIMGetParams;
+ export import Dmarc = DmarcAPI.Dmarc;
+ export import DmarcGetResponse = DmarcAPI.DmarcGetResponse;
+ export import DmarcGetParams = DmarcAPI.DmarcGetParams;
+ export import Malicious = MaliciousAPI.Malicious;
+ export import MaliciousGetResponse = MaliciousAPI.MaliciousGetResponse;
+ export import MaliciousGetParams = MaliciousAPI.MaliciousGetParams;
+ export import Spam = SpamAPI.Spam;
+ export import SpamGetResponse = SpamAPI.SpamGetResponse;
+ export import SpamGetParams = SpamAPI.SpamGetParams;
+ export import SPF = SPFAPI.SPF;
+ export import SPFGetResponse = SPFAPI.SPFGetResponse;
+ export import SPFGetParams = SPFAPI.SPFGetParams;
+}
diff --git a/src/resources/radar/email/security/top/ases/dkim.ts b/src/resources/radar/email/security/top/ases/dkim.ts
new file mode 100644
index 0000000000..b16e721795
--- /dev/null
+++ b/src/resources/radar/email/security/top/ases/dkim.ts
@@ -0,0 +1,179 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as DKIMAPI from 'cloudflare/resources/radar/email/security/top/ases/dkim';
+
+export class DKIM extends APIResource {
+ /**
+ * Get the top autonomous systems (AS), by email DKIM validation.
+ */
+ get(
+ dkim: 'PASS' | 'NONE' | 'FAIL',
+ query?: DKIMGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ get(dkim: 'PASS' | 'NONE' | 'FAIL', options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ dkim: 'PASS' | 'NONE' | 'FAIL',
+ query: DKIMGetParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.get(dkim, {}, query);
+ }
+ return (
+ this._client.get(`/radar/email/security/top/ases/dkim/${dkim}`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: DKIMGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface DKIMGetResponse {
+ meta: DKIMGetResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace DKIMGetResponse {
+ export interface Meta {
+ dateRange: Array;
+
+ lastUpdated: string;
+
+ confidenceInfo?: Meta.ConfidenceInfo;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface ConfidenceInfo {
+ annotations?: Array;
+
+ level?: number;
+ }
+
+ export namespace ConfidenceInfo {
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ eventType: string;
+
+ isInstantaneous: unknown;
+
+ endTime?: string;
+
+ linkedUrl?: string;
+
+ startTime?: string;
+ }
+ }
+ }
+
+ export interface Top0 {
+ clientASN: number;
+
+ clientASName: string;
+
+ value: string;
+ }
+}
+
+export interface DKIMGetParams {
+ /**
+ * Filter for arc (Authenticated Received Chain).
+ */
+ arc?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * For example, use `7d` and `7dControl` to compare this week with the previous
+ * week. Use this parameter or set specific start and end dates (`dateStart` and
+ * `dateEnd` parameters).
+ */
+ dateRange?: Array<
+ | '1d'
+ | '2d'
+ | '7d'
+ | '14d'
+ | '28d'
+ | '12w'
+ | '24w'
+ | '52w'
+ | '1dControl'
+ | '2dControl'
+ | '7dControl'
+ | '14dControl'
+ | '28dControl'
+ | '12wControl'
+ | '24wControl'
+ >;
+
+ /**
+ * Array of datetimes to filter the start of a series.
+ */
+ dateStart?: Array;
+
+ /**
+ * Filter for dmarc.
+ */
+ dmarc?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Format results are returned in.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limit the number of objects in the response.
+ */
+ limit?: number;
+
+ /**
+ * Array of comma separated list of locations (alpha-2 country codes). Start with
+ * `-` to exclude from results. For example, `-US,PT` excludes results from the US,
+ * but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names that will be used to name the series in responses.
+ */
+ name?: Array;
+
+ /**
+ * Filter for spf.
+ */
+ spf?: Array<'PASS' | 'NONE' | 'FAIL'>;
+}
+
+export namespace DKIM {
+ export import DKIMGetResponse = DKIMAPI.DKIMGetResponse;
+ export import DKIMGetParams = DKIMAPI.DKIMGetParams;
+}
diff --git a/src/resources/radar/email/security/top/ases/dmarc.ts b/src/resources/radar/email/security/top/ases/dmarc.ts
new file mode 100644
index 0000000000..27550b9b75
--- /dev/null
+++ b/src/resources/radar/email/security/top/ases/dmarc.ts
@@ -0,0 +1,179 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import * as Core from 'cloudflare/core';
+import { APIResource } from 'cloudflare/resource';
+import { isRequestOptions } from 'cloudflare/core';
+import * as DmarcAPI from 'cloudflare/resources/radar/email/security/top/ases/dmarc';
+
+export class Dmarc extends APIResource {
+ /**
+ * Get the top autonomous systems (AS) by emails DMARC validation.
+ */
+ get(
+ dmarc: 'PASS' | 'NONE' | 'FAIL',
+ query?: DmarcGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ get(dmarc: 'PASS' | 'NONE' | 'FAIL', options?: Core.RequestOptions): Core.APIPromise;
+ get(
+ dmarc: 'PASS' | 'NONE' | 'FAIL',
+ query: DmarcGetParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.get(dmarc, {}, query);
+ }
+ return (
+ this._client.get(`/radar/email/security/top/ases/dmarc/${dmarc}`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: DmarcGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface DmarcGetResponse {
+ meta: DmarcGetResponse.Meta;
+
+ top_0: Array;
+}
+
+export namespace DmarcGetResponse {
+ export interface Meta {
+ dateRange: Array;
+
+ lastUpdated: string;
+
+ confidenceInfo?: Meta.ConfidenceInfo;
+ }
+
+ export namespace Meta {
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface ConfidenceInfo {
+ annotations?: Array;
+
+ level?: number;
+ }
+
+ export namespace ConfidenceInfo {
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ eventType: string;
+
+ isInstantaneous: unknown;
+
+ endTime?: string;
+
+ linkedUrl?: string;
+
+ startTime?: string;
+ }
+ }
+ }
+
+ export interface Top0 {
+ clientASN: number;
+
+ clientASName: string;
+
+ value: string;
+ }
+}
+
+export interface DmarcGetParams {
+ /**
+ * Filter for arc (Authenticated Received Chain).
+ */
+ arc?: Array<'PASS' | 'NONE' | 'FAIL'>;
+
+ /**
+ * Array of comma separated list of ASNs, start with `-` to exclude from results.
+ * For example, `-174, 3356` excludes results from AS174, but includes results from
+ * AS3356.
+ */
+ asn?: Array