diff --git a/.stats.yml b/.stats.yml
index d5feb3a1b5f..b399723081a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 1254
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14edb011f329e0b47ce2b207acc1a5b84a48c3eace9ea30600bb4d5d745eaef.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c06ed89df76febdc32fc835c9d37220c0400821d24f9707c3484054e78e1d94e.yml
diff --git a/api.md b/api.md
index a2e72a6a5dd..5fd9ada828f 100644
--- a/api.md
+++ b/api.md
@@ -3328,7 +3328,7 @@ from cloudflare.types.intel.attack_surface_report import IssueTypeGetResponse
Methods:
-- client.intel.attack_surface_report.issue_types.get(\*, account_id) -> IssueTypeGetResponse
+- client.intel.attack_surface_report.issue_types.get(\*, account_id) -> Optional
### Issues
@@ -3349,10 +3349,10 @@ from cloudflare.types.intel.attack_surface_report import (
Methods:
- client.intel.attack_surface_report.issues.list(\*, account_id, \*\*params) -> SyncV4PagePagination[IssueListResponse]
-- client.intel.attack*surface_report.issues.class*(\*, account_id, \*\*params) -> IssueClassResponse
-- client.intel.attack_surface_report.issues.dismiss(issue_id, \*, account_id, \*\*params) -> IssueDismissResponse
-- client.intel.attack_surface_report.issues.severity(\*, account_id, \*\*params) -> IssueSeverityResponse
-- client.intel.attack_surface_report.issues.type(\*, account_id, \*\*params) -> IssueTypeResponse
+- client.intel.attack*surface_report.issues.class*(\*, account_id, \*\*params) -> Optional
+- client.intel.attack_surface_report.issues.dismiss(issue_id, \*, account_id, \*\*params) -> Optional
+- client.intel.attack_surface_report.issues.severity(\*, account_id, \*\*params) -> Optional
+- client.intel.attack_surface_report.issues.type(\*, account_id, \*\*params) -> Optional
# MagicTransit
diff --git a/src/cloudflare/resources/intel/attack_surface_report/issue_types.py b/src/cloudflare/resources/intel/attack_surface_report/issue_types.py
index 327ad759c0c..1ddbe050a27 100644
--- a/src/cloudflare/resources/intel/attack_surface_report/issue_types.py
+++ b/src/cloudflare/resources/intel/attack_surface_report/issue_types.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -43,7 +43,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueTypeGetResponse:
+ ) -> Optional[IssueTypeGetResponse]:
"""
Get Security Center Issues Types
@@ -67,9 +67,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[IssueTypeGetResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueTypeGetResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueTypeGetResponse], ResultWrapper[IssueTypeGetResponse]),
+ cast_to=cast(Type[Optional[IssueTypeGetResponse]], ResultWrapper[IssueTypeGetResponse]),
)
@@ -92,7 +92,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueTypeGetResponse:
+ ) -> Optional[IssueTypeGetResponse]:
"""
Get Security Center Issues Types
@@ -116,9 +116,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[IssueTypeGetResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueTypeGetResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueTypeGetResponse], ResultWrapper[IssueTypeGetResponse]),
+ cast_to=cast(Type[Optional[IssueTypeGetResponse]], ResultWrapper[IssueTypeGetResponse]),
)
diff --git a/src/cloudflare/resources/intel/attack_surface_report/issues.py b/src/cloudflare/resources/intel/attack_surface_report/issues.py
index d4f6cca2c9f..9eb4457b40e 100644
--- a/src/cloudflare/resources/intel/attack_surface_report/issues.py
+++ b/src/cloudflare/resources/intel/attack_surface_report/issues.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, List, Type, cast
+from typing import Any, List, Type, Optional, cast
import httpx
@@ -147,7 +147,7 @@ def class_(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueClassResponse:
+ ) -> Optional[IssueClassResponse]:
"""
Get Security Center Issue Counts by Class
@@ -187,9 +187,9 @@ def class_(
},
issue_class_params.IssueClassParams,
),
- post_parser=ResultWrapper[IssueClassResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueClassResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueClassResponse], ResultWrapper[IssueClassResponse]),
+ cast_to=cast(Type[Optional[IssueClassResponse]], ResultWrapper[IssueClassResponse]),
)
def dismiss(
@@ -204,7 +204,7 @@ def dismiss(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueDismissResponse:
+ ) -> Optional[IssueDismissResponse]:
"""
Archive Security Center Insight
@@ -224,7 +224,7 @@ def dismiss(
if not issue_id:
raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}")
return cast(
- IssueDismissResponse,
+ Optional[IssueDismissResponse],
self._put(
f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
body=maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
@@ -233,7 +233,7 @@ def dismiss(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[IssueDismissResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueDismissResponse]]._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[IssueDismissResponse]
@@ -262,7 +262,7 @@ def severity(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueSeverityResponse:
+ ) -> Optional[IssueSeverityResponse]:
"""
Get Security Center Issue Counts by Severity
@@ -302,9 +302,9 @@ def severity(
},
issue_severity_params.IssueSeverityParams,
),
- post_parser=ResultWrapper[IssueSeverityResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueSeverityResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueSeverityResponse], ResultWrapper[IssueSeverityResponse]),
+ cast_to=cast(Type[Optional[IssueSeverityResponse]], ResultWrapper[IssueSeverityResponse]),
)
def type(
@@ -328,7 +328,7 @@ def type(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueTypeResponse:
+ ) -> Optional[IssueTypeResponse]:
"""
Get Security Center Issue Counts by Type
@@ -368,9 +368,9 @@ def type(
},
issue_type_params.IssueTypeParams,
),
- post_parser=ResultWrapper[IssueTypeResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueTypeResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueTypeResponse], ResultWrapper[IssueTypeResponse]),
+ cast_to=cast(Type[Optional[IssueTypeResponse]], ResultWrapper[IssueTypeResponse]),
)
@@ -478,7 +478,7 @@ async def class_(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueClassResponse:
+ ) -> Optional[IssueClassResponse]:
"""
Get Security Center Issue Counts by Class
@@ -518,9 +518,9 @@ async def class_(
},
issue_class_params.IssueClassParams,
),
- post_parser=ResultWrapper[IssueClassResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueClassResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueClassResponse], ResultWrapper[IssueClassResponse]),
+ cast_to=cast(Type[Optional[IssueClassResponse]], ResultWrapper[IssueClassResponse]),
)
async def dismiss(
@@ -535,7 +535,7 @@ async def dismiss(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueDismissResponse:
+ ) -> Optional[IssueDismissResponse]:
"""
Archive Security Center Insight
@@ -555,7 +555,7 @@ async def dismiss(
if not issue_id:
raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}")
return cast(
- IssueDismissResponse,
+ Optional[IssueDismissResponse],
await self._put(
f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
body=await async_maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
@@ -564,7 +564,7 @@ async def dismiss(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[IssueDismissResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueDismissResponse]]._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[IssueDismissResponse]
@@ -593,7 +593,7 @@ async def severity(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueSeverityResponse:
+ ) -> Optional[IssueSeverityResponse]:
"""
Get Security Center Issue Counts by Severity
@@ -633,9 +633,9 @@ async def severity(
},
issue_severity_params.IssueSeverityParams,
),
- post_parser=ResultWrapper[IssueSeverityResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueSeverityResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueSeverityResponse], ResultWrapper[IssueSeverityResponse]),
+ cast_to=cast(Type[Optional[IssueSeverityResponse]], ResultWrapper[IssueSeverityResponse]),
)
async def type(
@@ -659,7 +659,7 @@ async def type(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IssueTypeResponse:
+ ) -> Optional[IssueTypeResponse]:
"""
Get Security Center Issue Counts by Type
@@ -699,9 +699,9 @@ async def type(
},
issue_type_params.IssueTypeParams,
),
- post_parser=ResultWrapper[IssueTypeResponse]._unwrapper,
+ post_parser=ResultWrapper[Optional[IssueTypeResponse]]._unwrapper,
),
- cast_to=cast(Type[IssueTypeResponse], ResultWrapper[IssueTypeResponse]),
+ cast_to=cast(Type[Optional[IssueTypeResponse]], ResultWrapper[IssueTypeResponse]),
)
diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py b/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py
index 4d96fa65072..dfdd7cf43f4 100644
--- a/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py
+++ b/src/cloudflare/types/intel/attack_surface_report/issue_list_response.py
@@ -53,7 +53,7 @@ class IssueListResponse(BaseModel):
messages: List[ResponseInfo]
- result: Result
-
success: Literal[True]
"""Whether the API call was successful"""
+
+ result: Optional[Result] = None
diff --git a/tests/api_resources/intel/attack_surface_report/test_issue_types.py b/tests/api_resources/intel/attack_surface_report/test_issue_types.py
index 904b3db245f..25b244d8989 100644
--- a/tests/api_resources/intel/attack_surface_report/test_issue_types.py
+++ b/tests/api_resources/intel/attack_surface_report/test_issue_types.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -22,7 +22,7 @@ def test_method_get(self, client: Cloudflare) -> None:
issue_type = client.intel.attack_surface_report.issue_types.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"])
+ assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -33,7 +33,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue_type = response.parse()
- assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"])
+ assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -44,7 +44,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue_type = response.parse()
- assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"])
+ assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -64,7 +64,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
issue_type = await async_client.intel.attack_surface_report.issue_types.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"])
+ assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -75,7 +75,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue_type = await response.parse()
- assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"])
+ assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -86,7 +86,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue_type = await response.parse()
- assert_matches_type(IssueTypeGetResponse, issue_type, path=["response"])
+ assert_matches_type(Optional[IssueTypeGetResponse], issue_type, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py
index 7f46dae5dca..c1e5f300928 100644
--- a/tests/api_resources/intel/attack_surface_report/test_issues.py
+++ b/tests/api_resources/intel/attack_surface_report/test_issues.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -87,7 +87,7 @@ def test_method_class(self, client: Cloudflare) -> None:
issue = client.intel.attack_surface_report.issues.class_(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
@parametrize
def test_method_class_with_all_params(self, client: Cloudflare) -> None:
@@ -105,7 +105,7 @@ def test_method_class_with_all_params(self, client: Cloudflare) -> None:
subject=["example.com", "example.com", "example.com"],
subject_neq=["example.com", "example.com", "example.com"],
)
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
@parametrize
def test_raw_response_class(self, client: Cloudflare) -> None:
@@ -116,7 +116,7 @@ def test_raw_response_class(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
@parametrize
def test_streaming_response_class(self, client: Cloudflare) -> None:
@@ -127,7 +127,7 @@ def test_streaming_response_class(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -144,7 +144,7 @@ def test_method_dismiss(self, client: Cloudflare) -> None:
"string",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None:
@@ -153,7 +153,7 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dismiss=True,
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
def test_raw_response_dismiss(self, client: Cloudflare) -> None:
@@ -165,7 +165,7 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
def test_streaming_response_dismiss(self, client: Cloudflare) -> None:
@@ -177,7 +177,7 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -200,7 +200,7 @@ def test_method_severity(self, client: Cloudflare) -> None:
issue = client.intel.attack_surface_report.issues.severity(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
@parametrize
def test_method_severity_with_all_params(self, client: Cloudflare) -> None:
@@ -218,7 +218,7 @@ def test_method_severity_with_all_params(self, client: Cloudflare) -> None:
subject=["example.com", "example.com", "example.com"],
subject_neq=["example.com", "example.com", "example.com"],
)
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
@parametrize
def test_raw_response_severity(self, client: Cloudflare) -> None:
@@ -229,7 +229,7 @@ def test_raw_response_severity(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
@parametrize
def test_streaming_response_severity(self, client: Cloudflare) -> None:
@@ -240,7 +240,7 @@ def test_streaming_response_severity(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -256,7 +256,7 @@ def test_method_type(self, client: Cloudflare) -> None:
issue = client.intel.attack_surface_report.issues.type(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
@parametrize
def test_method_type_with_all_params(self, client: Cloudflare) -> None:
@@ -274,7 +274,7 @@ def test_method_type_with_all_params(self, client: Cloudflare) -> None:
subject=["example.com", "example.com", "example.com"],
subject_neq=["example.com", "example.com", "example.com"],
)
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
@parametrize
def test_raw_response_type(self, client: Cloudflare) -> None:
@@ -285,7 +285,7 @@ def test_raw_response_type(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
@parametrize
def test_streaming_response_type(self, client: Cloudflare) -> None:
@@ -296,7 +296,7 @@ def test_streaming_response_type(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = response.parse()
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -374,7 +374,7 @@ async def test_method_class(self, async_client: AsyncCloudflare) -> None:
issue = await async_client.intel.attack_surface_report.issues.class_(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
@parametrize
async def test_method_class_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -392,7 +392,7 @@ async def test_method_class_with_all_params(self, async_client: AsyncCloudflare)
subject=["example.com", "example.com", "example.com"],
subject_neq=["example.com", "example.com", "example.com"],
)
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
@parametrize
async def test_raw_response_class(self, async_client: AsyncCloudflare) -> None:
@@ -403,7 +403,7 @@ async def test_raw_response_class(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
@parametrize
async def test_streaming_response_class(self, async_client: AsyncCloudflare) -> None:
@@ -414,7 +414,7 @@ async def test_streaming_response_class(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueClassResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueClassResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -431,7 +431,7 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None:
"string",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -440,7 +440,7 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dismiss=True,
)
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None:
@@ -452,7 +452,7 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
@parametrize
async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None:
@@ -464,7 +464,7 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueDismissResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -487,7 +487,7 @@ async def test_method_severity(self, async_client: AsyncCloudflare) -> None:
issue = await async_client.intel.attack_surface_report.issues.severity(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
@parametrize
async def test_method_severity_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -505,7 +505,7 @@ async def test_method_severity_with_all_params(self, async_client: AsyncCloudfla
subject=["example.com", "example.com", "example.com"],
subject_neq=["example.com", "example.com", "example.com"],
)
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
@parametrize
async def test_raw_response_severity(self, async_client: AsyncCloudflare) -> None:
@@ -516,7 +516,7 @@ async def test_raw_response_severity(self, async_client: AsyncCloudflare) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
@parametrize
async def test_streaming_response_severity(self, async_client: AsyncCloudflare) -> None:
@@ -527,7 +527,7 @@ async def test_streaming_response_severity(self, async_client: AsyncCloudflare)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueSeverityResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueSeverityResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -543,7 +543,7 @@ async def test_method_type(self, async_client: AsyncCloudflare) -> None:
issue = await async_client.intel.attack_surface_report.issues.type(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
@parametrize
async def test_method_type_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -561,7 +561,7 @@ async def test_method_type_with_all_params(self, async_client: AsyncCloudflare)
subject=["example.com", "example.com", "example.com"],
subject_neq=["example.com", "example.com", "example.com"],
)
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
@parametrize
async def test_raw_response_type(self, async_client: AsyncCloudflare) -> None:
@@ -572,7 +572,7 @@ async def test_raw_response_type(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
@parametrize
async def test_streaming_response_type(self, async_client: AsyncCloudflare) -> None:
@@ -583,7 +583,7 @@ async def test_streaming_response_type(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
issue = await response.parse()
- assert_matches_type(IssueTypeResponse, issue, path=["response"])
+ assert_matches_type(Optional[IssueTypeResponse], issue, path=["response"])
assert cast(Any, response.is_closed) is True