Skip to content

Commit 99c9845

Browse files
feat(radar): add compromised credential endpoints (#2552)
1 parent 45d91e2 commit 99c9845

20 files changed

+1775
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 1651
1+
configured_endpoints: 1655
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ed9f898b31619623e50d660d04beca50e44987bfd3eb3a6ff98d3bca2a9c569.yml

api.md

+34
Original file line numberDiff line numberDiff line change
@@ -8230,6 +8230,40 @@ Methods:
82308230

82318231
- <code title="get /radar/robots_txt/top/user_agents/directive">client.radar.robots_txt.top.user_agents.<a href="./src/cloudflare/resources/radar/robots_txt/top/user_agents.py">directive</a>(\*\*<a href="src/cloudflare/types/radar/robots_txt/top/user_agent_directive_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/robots_txt/top/user_agent_directive_response.py">UserAgentDirectiveResponse</a></code>
82328232

8233+
## LeakedCredentials
8234+
8235+
### Summary
8236+
8237+
Types:
8238+
8239+
```python
8240+
from cloudflare.types.radar.leaked_credentials import (
8241+
SummaryBotClassResponse,
8242+
SummaryCompromisedResponse,
8243+
)
8244+
```
8245+
8246+
Methods:
8247+
8248+
- <code title="get /radar/leaked_credential_checks/summary/bot_class">client.radar.leaked_credentials.summary.<a href="./src/cloudflare/resources/radar/leaked_credentials/summary.py">bot_class</a>(\*\*<a href="src/cloudflare/types/radar/leaked_credentials/summary_bot_class_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/leaked_credentials/summary_bot_class_response.py">SummaryBotClassResponse</a></code>
8249+
- <code title="get /radar/leaked_credential_checks/summary/compromised">client.radar.leaked_credentials.summary.<a href="./src/cloudflare/resources/radar/leaked_credentials/summary.py">compromised</a>(\*\*<a href="src/cloudflare/types/radar/leaked_credentials/summary_compromised_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/leaked_credentials/summary_compromised_response.py">SummaryCompromisedResponse</a></code>
8250+
8251+
### TimeseriesGroups
8252+
8253+
Types:
8254+
8255+
```python
8256+
from cloudflare.types.radar.leaked_credentials import (
8257+
TimeseriesGroupBotClassResponse,
8258+
TimeseriesGroupCompromisedResponse,
8259+
)
8260+
```
8261+
8262+
Methods:
8263+
8264+
- <code title="get /radar/leaked_credential_checks/timeseries_groups/bot_class">client.radar.leaked_credentials.timeseries_groups.<a href="./src/cloudflare/resources/radar/leaked_credentials/timeseries_groups.py">bot_class</a>(\*\*<a href="src/cloudflare/types/radar/leaked_credentials/timeseries_group_bot_class_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/leaked_credentials/timeseries_group_bot_class_response.py">TimeseriesGroupBotClassResponse</a></code>
8265+
- <code title="get /radar/leaked_credential_checks/timeseries_groups/compromised">client.radar.leaked_credentials.timeseries_groups.<a href="./src/cloudflare/resources/radar/leaked_credentials/timeseries_groups.py">compromised</a>(\*\*<a href="src/cloudflare/types/radar/leaked_credentials/timeseries_group_compromised_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/leaked_credentials/timeseries_group_compromised_response.py">TimeseriesGroupCompromisedResponse</a></code>
8266+
82338267
# BotManagement
82348268

82358269
Types:

src/cloudflare/resources/radar/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@
144144
TrafficAnomaliesResourceWithStreamingResponse,
145145
AsyncTrafficAnomaliesResourceWithStreamingResponse,
146146
)
147+
from .leaked_credentials import (
148+
LeakedCredentialsResource,
149+
AsyncLeakedCredentialsResource,
150+
LeakedCredentialsResourceWithRawResponse,
151+
AsyncLeakedCredentialsResourceWithRawResponse,
152+
LeakedCredentialsResourceWithStreamingResponse,
153+
AsyncLeakedCredentialsResourceWithStreamingResponse,
154+
)
147155
from .tcp_resets_timeouts import (
148156
TCPResetsTimeoutsResource,
149157
AsyncTCPResetsTimeoutsResource,
@@ -262,6 +270,12 @@
262270
"AsyncRobotsTXTResourceWithRawResponse",
263271
"RobotsTXTResourceWithStreamingResponse",
264272
"AsyncRobotsTXTResourceWithStreamingResponse",
273+
"LeakedCredentialsResource",
274+
"AsyncLeakedCredentialsResource",
275+
"LeakedCredentialsResourceWithRawResponse",
276+
"AsyncLeakedCredentialsResourceWithRawResponse",
277+
"LeakedCredentialsResourceWithStreamingResponse",
278+
"AsyncLeakedCredentialsResourceWithStreamingResponse",
265279
"RadarResource",
266280
"AsyncRadarResource",
267281
"RadarResourceWithRawResponse",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .summary import (
4+
SummaryResource,
5+
AsyncSummaryResource,
6+
SummaryResourceWithRawResponse,
7+
AsyncSummaryResourceWithRawResponse,
8+
SummaryResourceWithStreamingResponse,
9+
AsyncSummaryResourceWithStreamingResponse,
10+
)
11+
from .timeseries_groups import (
12+
TimeseriesGroupsResource,
13+
AsyncTimeseriesGroupsResource,
14+
TimeseriesGroupsResourceWithRawResponse,
15+
AsyncTimeseriesGroupsResourceWithRawResponse,
16+
TimeseriesGroupsResourceWithStreamingResponse,
17+
AsyncTimeseriesGroupsResourceWithStreamingResponse,
18+
)
19+
from .leaked_credentials import (
20+
LeakedCredentialsResource,
21+
AsyncLeakedCredentialsResource,
22+
LeakedCredentialsResourceWithRawResponse,
23+
AsyncLeakedCredentialsResourceWithRawResponse,
24+
LeakedCredentialsResourceWithStreamingResponse,
25+
AsyncLeakedCredentialsResourceWithStreamingResponse,
26+
)
27+
28+
__all__ = [
29+
"SummaryResource",
30+
"AsyncSummaryResource",
31+
"SummaryResourceWithRawResponse",
32+
"AsyncSummaryResourceWithRawResponse",
33+
"SummaryResourceWithStreamingResponse",
34+
"AsyncSummaryResourceWithStreamingResponse",
35+
"TimeseriesGroupsResource",
36+
"AsyncTimeseriesGroupsResource",
37+
"TimeseriesGroupsResourceWithRawResponse",
38+
"AsyncTimeseriesGroupsResourceWithRawResponse",
39+
"TimeseriesGroupsResourceWithStreamingResponse",
40+
"AsyncTimeseriesGroupsResourceWithStreamingResponse",
41+
"LeakedCredentialsResource",
42+
"AsyncLeakedCredentialsResource",
43+
"LeakedCredentialsResourceWithRawResponse",
44+
"AsyncLeakedCredentialsResourceWithRawResponse",
45+
"LeakedCredentialsResourceWithStreamingResponse",
46+
"AsyncLeakedCredentialsResourceWithStreamingResponse",
47+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from .summary import (
6+
SummaryResource,
7+
AsyncSummaryResource,
8+
SummaryResourceWithRawResponse,
9+
AsyncSummaryResourceWithRawResponse,
10+
SummaryResourceWithStreamingResponse,
11+
AsyncSummaryResourceWithStreamingResponse,
12+
)
13+
from ...._compat import cached_property
14+
from ...._resource import SyncAPIResource, AsyncAPIResource
15+
from .timeseries_groups import (
16+
TimeseriesGroupsResource,
17+
AsyncTimeseriesGroupsResource,
18+
TimeseriesGroupsResourceWithRawResponse,
19+
AsyncTimeseriesGroupsResourceWithRawResponse,
20+
TimeseriesGroupsResourceWithStreamingResponse,
21+
AsyncTimeseriesGroupsResourceWithStreamingResponse,
22+
)
23+
24+
__all__ = ["LeakedCredentialsResource", "AsyncLeakedCredentialsResource"]
25+
26+
27+
class LeakedCredentialsResource(SyncAPIResource):
28+
@cached_property
29+
def summary(self) -> SummaryResource:
30+
return SummaryResource(self._client)
31+
32+
@cached_property
33+
def timeseries_groups(self) -> TimeseriesGroupsResource:
34+
return TimeseriesGroupsResource(self._client)
35+
36+
@cached_property
37+
def with_raw_response(self) -> LeakedCredentialsResourceWithRawResponse:
38+
"""
39+
This property can be used as a prefix for any HTTP method call to return
40+
the raw response object instead of the parsed content.
41+
42+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
43+
"""
44+
return LeakedCredentialsResourceWithRawResponse(self)
45+
46+
@cached_property
47+
def with_streaming_response(self) -> LeakedCredentialsResourceWithStreamingResponse:
48+
"""
49+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
50+
51+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
52+
"""
53+
return LeakedCredentialsResourceWithStreamingResponse(self)
54+
55+
56+
class AsyncLeakedCredentialsResource(AsyncAPIResource):
57+
@cached_property
58+
def summary(self) -> AsyncSummaryResource:
59+
return AsyncSummaryResource(self._client)
60+
61+
@cached_property
62+
def timeseries_groups(self) -> AsyncTimeseriesGroupsResource:
63+
return AsyncTimeseriesGroupsResource(self._client)
64+
65+
@cached_property
66+
def with_raw_response(self) -> AsyncLeakedCredentialsResourceWithRawResponse:
67+
"""
68+
This property can be used as a prefix for any HTTP method call to return
69+
the raw response object instead of the parsed content.
70+
71+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
72+
"""
73+
return AsyncLeakedCredentialsResourceWithRawResponse(self)
74+
75+
@cached_property
76+
def with_streaming_response(self) -> AsyncLeakedCredentialsResourceWithStreamingResponse:
77+
"""
78+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
79+
80+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
81+
"""
82+
return AsyncLeakedCredentialsResourceWithStreamingResponse(self)
83+
84+
85+
class LeakedCredentialsResourceWithRawResponse:
86+
def __init__(self, leaked_credentials: LeakedCredentialsResource) -> None:
87+
self._leaked_credentials = leaked_credentials
88+
89+
@cached_property
90+
def summary(self) -> SummaryResourceWithRawResponse:
91+
return SummaryResourceWithRawResponse(self._leaked_credentials.summary)
92+
93+
@cached_property
94+
def timeseries_groups(self) -> TimeseriesGroupsResourceWithRawResponse:
95+
return TimeseriesGroupsResourceWithRawResponse(self._leaked_credentials.timeseries_groups)
96+
97+
98+
class AsyncLeakedCredentialsResourceWithRawResponse:
99+
def __init__(self, leaked_credentials: AsyncLeakedCredentialsResource) -> None:
100+
self._leaked_credentials = leaked_credentials
101+
102+
@cached_property
103+
def summary(self) -> AsyncSummaryResourceWithRawResponse:
104+
return AsyncSummaryResourceWithRawResponse(self._leaked_credentials.summary)
105+
106+
@cached_property
107+
def timeseries_groups(self) -> AsyncTimeseriesGroupsResourceWithRawResponse:
108+
return AsyncTimeseriesGroupsResourceWithRawResponse(self._leaked_credentials.timeseries_groups)
109+
110+
111+
class LeakedCredentialsResourceWithStreamingResponse:
112+
def __init__(self, leaked_credentials: LeakedCredentialsResource) -> None:
113+
self._leaked_credentials = leaked_credentials
114+
115+
@cached_property
116+
def summary(self) -> SummaryResourceWithStreamingResponse:
117+
return SummaryResourceWithStreamingResponse(self._leaked_credentials.summary)
118+
119+
@cached_property
120+
def timeseries_groups(self) -> TimeseriesGroupsResourceWithStreamingResponse:
121+
return TimeseriesGroupsResourceWithStreamingResponse(self._leaked_credentials.timeseries_groups)
122+
123+
124+
class AsyncLeakedCredentialsResourceWithStreamingResponse:
125+
def __init__(self, leaked_credentials: AsyncLeakedCredentialsResource) -> None:
126+
self._leaked_credentials = leaked_credentials
127+
128+
@cached_property
129+
def summary(self) -> AsyncSummaryResourceWithStreamingResponse:
130+
return AsyncSummaryResourceWithStreamingResponse(self._leaked_credentials.summary)
131+
132+
@cached_property
133+
def timeseries_groups(self) -> AsyncTimeseriesGroupsResourceWithStreamingResponse:
134+
return AsyncTimeseriesGroupsResourceWithStreamingResponse(self._leaked_credentials.timeseries_groups)

0 commit comments

Comments
 (0)