Skip to content

Commit c78ef5e

Browse files
chore(api): update composite API spec
1 parent c40349d commit c78ef5e

File tree

6 files changed

+3
-263
lines changed

6 files changed

+3
-263
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1822
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-61cd3679b8ba826c1cad824187669331d2b46243621b09df0b340b2f3642a548.yml
3-
openapi_spec_hash: 8503f433c7f5df490bbc0844d0dff1c1
1+
configured_endpoints: 1821
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3fb0eea5e310caf8b039633b2f2b863b390040808ebaa7d3c31b91bda68f0edd.yml
3+
openapi_spec_hash: 89e80a6f9cbebf986352a288fa3b5569
44
config_hash: 0ce5789fc4b59ae352e68d00847570c2

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9169,7 +9169,6 @@ from cloudflare.types.cloudforce_one import (
91699169
ThreatEventDeleteResponse,
91709170
ThreatEventBulkCreateResponse,
91719171
ThreatEventEditResponse,
9172-
ThreatEventGetResponse,
91739172
)
91749173
```
91759174

@@ -9180,7 +9179,6 @@ Methods:
91809179
- <code title="delete /accounts/{account_id}/cloudforce-one/events/{event_id}">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">delete</a>(event_id, \*, account_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_delete_response.py">ThreatEventDeleteResponse</a></code>
91819180
- <code title="post /accounts/{account_id}/cloudforce-one/events/create/bulk">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">bulk_create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_bulk_create_response.py">ThreatEventBulkCreateResponse</a></code>
91829181
- <code title="patch /accounts/{account_id}/cloudforce-one/events/{event_id}">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">edit</a>(event_id, \*, account_id, \*\*<a href="src/cloudflare/types/cloudforce_one/threat_event_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_edit_response.py">ThreatEventEditResponse</a></code>
9183-
- <code title="get /accounts/{account_id}/cloudforce-one/events/{event_id}">client.cloudforce_one.threat_events.<a href="./src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py">get</a>(event_id, \*, account_id) -> <a href="./src/cloudflare/types/cloudforce_one/threat_event_get_response.py">ThreatEventGetResponse</a></code>
91849182

91859183
### Attackers
91869184

src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
threat_event_create_params,
9898
threat_event_bulk_create_params,
9999
)
100-
from ....types.cloudforce_one.threat_event_get_response import ThreatEventGetResponse
101100
from ....types.cloudforce_one.threat_event_edit_response import ThreatEventEditResponse
102101
from ....types.cloudforce_one.threat_event_list_response import ThreatEventListResponse
103102
from ....types.cloudforce_one.threat_event_create_response import ThreatEventCreateResponse
@@ -458,46 +457,6 @@ def edit(
458457
cast_to=ThreatEventEditResponse,
459458
)
460459

461-
def get(
462-
self,
463-
event_id: str,
464-
*,
465-
account_id: str,
466-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
467-
# The extra values given here take precedence over values defined on the client or passed to this method.
468-
extra_headers: Headers | None = None,
469-
extra_query: Query | None = None,
470-
extra_body: Body | None = None,
471-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
472-
) -> ThreatEventGetResponse:
473-
"""
474-
Reads an event
475-
476-
Args:
477-
account_id: Account ID.
478-
479-
event_id: Event UUID.
480-
481-
extra_headers: Send extra headers
482-
483-
extra_query: Add additional query parameters to the request
484-
485-
extra_body: Add additional JSON properties to the request
486-
487-
timeout: Override the client-level default timeout for this request, in seconds
488-
"""
489-
if not account_id:
490-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
491-
if not event_id:
492-
raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
493-
return self._get(
494-
f"/accounts/{account_id}/cloudforce-one/events/{event_id}",
495-
options=make_request_options(
496-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
497-
),
498-
cast_to=ThreatEventGetResponse,
499-
)
500-
501460

502461
class AsyncThreatEventsResource(AsyncAPIResource):
503462
@cached_property
@@ -850,46 +809,6 @@ async def edit(
850809
cast_to=ThreatEventEditResponse,
851810
)
852811

853-
async def get(
854-
self,
855-
event_id: str,
856-
*,
857-
account_id: str,
858-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
859-
# The extra values given here take precedence over values defined on the client or passed to this method.
860-
extra_headers: Headers | None = None,
861-
extra_query: Query | None = None,
862-
extra_body: Body | None = None,
863-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
864-
) -> ThreatEventGetResponse:
865-
"""
866-
Reads an event
867-
868-
Args:
869-
account_id: Account ID.
870-
871-
event_id: Event UUID.
872-
873-
extra_headers: Send extra headers
874-
875-
extra_query: Add additional query parameters to the request
876-
877-
extra_body: Add additional JSON properties to the request
878-
879-
timeout: Override the client-level default timeout for this request, in seconds
880-
"""
881-
if not account_id:
882-
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
883-
if not event_id:
884-
raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}")
885-
return await self._get(
886-
f"/accounts/{account_id}/cloudforce-one/events/{event_id}",
887-
options=make_request_options(
888-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
889-
),
890-
cast_to=ThreatEventGetResponse,
891-
)
892-
893812

894813
class ThreatEventsResourceWithRawResponse:
895814
def __init__(self, threat_events: ThreatEventsResource) -> None:
@@ -910,9 +829,6 @@ def __init__(self, threat_events: ThreatEventsResource) -> None:
910829
self.edit = to_raw_response_wrapper(
911830
threat_events.edit,
912831
)
913-
self.get = to_raw_response_wrapper(
914-
threat_events.get,
915-
)
916832

917833
@cached_property
918834
def attackers(self) -> AttackersResourceWithRawResponse:
@@ -970,9 +886,6 @@ def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
970886
self.edit = async_to_raw_response_wrapper(
971887
threat_events.edit,
972888
)
973-
self.get = async_to_raw_response_wrapper(
974-
threat_events.get,
975-
)
976889

977890
@cached_property
978891
def attackers(self) -> AsyncAttackersResourceWithRawResponse:
@@ -1030,9 +943,6 @@ def __init__(self, threat_events: ThreatEventsResource) -> None:
1030943
self.edit = to_streamed_response_wrapper(
1031944
threat_events.edit,
1032945
)
1033-
self.get = to_streamed_response_wrapper(
1034-
threat_events.get,
1035-
)
1036946

1037947
@cached_property
1038948
def attackers(self) -> AttackersResourceWithStreamingResponse:
@@ -1090,9 +1000,6 @@ def __init__(self, threat_events: AsyncThreatEventsResource) -> None:
10901000
self.edit = async_to_streamed_response_wrapper(
10911001
threat_events.edit,
10921002
)
1093-
self.get = async_to_streamed_response_wrapper(
1094-
threat_events.get,
1095-
)
10961003

10971004
@cached_property
10981005
def attackers(self) -> AsyncAttackersResourceWithStreamingResponse:

src/cloudflare/types/cloudforce_one/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from .request_delete_response import RequestDeleteResponse as RequestDeleteResponse
1515
from .threat_event_edit_params import ThreatEventEditParams as ThreatEventEditParams
1616
from .threat_event_list_params import ThreatEventListParams as ThreatEventListParams
17-
from .threat_event_get_response import ThreatEventGetResponse as ThreatEventGetResponse
1817
from .threat_event_create_params import ThreatEventCreateParams as ThreatEventCreateParams
1918
from .threat_event_edit_response import ThreatEventEditResponse as ThreatEventEditResponse
2019
from .threat_event_list_response import ThreatEventListResponse as ThreatEventListResponse

src/cloudflare/types/cloudforce_one/threat_event_get_response.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

tests/api_resources/cloudforce_one/test_threat_events.py

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from tests.utils import assert_matches_type
1212
from cloudflare._utils import parse_datetime
1313
from cloudflare.types.cloudforce_one import (
14-
ThreatEventGetResponse,
1514
ThreatEventEditResponse,
1615
ThreatEventListResponse,
1716
ThreatEventCreateResponse,
@@ -396,58 +395,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
396395
account_id="account_id",
397396
)
398397

399-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
400-
@parametrize
401-
def test_method_get(self, client: Cloudflare) -> None:
402-
threat_event = client.cloudforce_one.threat_events.get(
403-
event_id="event_id",
404-
account_id="account_id",
405-
)
406-
assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"])
407-
408-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
409-
@parametrize
410-
def test_raw_response_get(self, client: Cloudflare) -> None:
411-
response = client.cloudforce_one.threat_events.with_raw_response.get(
412-
event_id="event_id",
413-
account_id="account_id",
414-
)
415-
416-
assert response.is_closed is True
417-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
418-
threat_event = response.parse()
419-
assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"])
420-
421-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
422-
@parametrize
423-
def test_streaming_response_get(self, client: Cloudflare) -> None:
424-
with client.cloudforce_one.threat_events.with_streaming_response.get(
425-
event_id="event_id",
426-
account_id="account_id",
427-
) as response:
428-
assert not response.is_closed
429-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
430-
431-
threat_event = response.parse()
432-
assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"])
433-
434-
assert cast(Any, response.is_closed) is True
435-
436-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
437-
@parametrize
438-
def test_path_params_get(self, client: Cloudflare) -> None:
439-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
440-
client.cloudforce_one.threat_events.with_raw_response.get(
441-
event_id="event_id",
442-
account_id="",
443-
)
444-
445-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
446-
client.cloudforce_one.threat_events.with_raw_response.get(
447-
event_id="",
448-
account_id="account_id",
449-
)
450-
451398

452399
class TestAsyncThreatEvents:
453400
parametrize = pytest.mark.parametrize(
@@ -824,55 +771,3 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
824771
event_id="",
825772
account_id="account_id",
826773
)
827-
828-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
829-
@parametrize
830-
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
831-
threat_event = await async_client.cloudforce_one.threat_events.get(
832-
event_id="event_id",
833-
account_id="account_id",
834-
)
835-
assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"])
836-
837-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
838-
@parametrize
839-
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
840-
response = await async_client.cloudforce_one.threat_events.with_raw_response.get(
841-
event_id="event_id",
842-
account_id="account_id",
843-
)
844-
845-
assert response.is_closed is True
846-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
847-
threat_event = await response.parse()
848-
assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"])
849-
850-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
851-
@parametrize
852-
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
853-
async with async_client.cloudforce_one.threat_events.with_streaming_response.get(
854-
event_id="event_id",
855-
account_id="account_id",
856-
) as response:
857-
assert not response.is_closed
858-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
859-
860-
threat_event = await response.parse()
861-
assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"])
862-
863-
assert cast(Any, response.is_closed) is True
864-
865-
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
866-
@parametrize
867-
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
868-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
869-
await async_client.cloudforce_one.threat_events.with_raw_response.get(
870-
event_id="event_id",
871-
account_id="",
872-
)
873-
874-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"):
875-
await async_client.cloudforce_one.threat_events.with_raw_response.get(
876-
event_id="",
877-
account_id="account_id",
878-
)

0 commit comments

Comments
 (0)