From 5b67169f0f45d8ea29997a9c5e54ade9d452eac6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 21 Mar 2024 21:19:18 +0000
Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#164)
---
api.md | 20 ++++----
.../intel/indicator_feeds/indicator_feeds.py | 30 +++++------
.../intel/indicator_feeds/permissions.py | 19 +++----
src/cloudflare/types/intel/__init__.py | 6 +--
...m.py => indicator_feed_create_response.py} | 4 +-
...data.py => indicator_feed_get_response.py} | 4 +-
.../intel/indicator_feed_list_response.py | 27 ++++++++--
...d.py => indicator_feed_update_response.py} | 4 +-
.../types/intel/indicator_feeds/__init__.py | 4 +-
.../intel_permission_list_item.py | 18 -------
...pdate.py => permission_create_response.py} | 4 +-
.../permission_delete_response.py | 12 +++++
.../permission_list_response.py | 20 ++++++--
.../intel/indicator_feeds/test_permissions.py | 35 ++++++-------
.../intel/test_indicator_feeds.py | 50 +++++++++----------
15 files changed, 142 insertions(+), 115 deletions(-)
rename src/cloudflare/types/intel/{intel_indicator_feed_item.py => indicator_feed_create_response.py} (87%)
rename src/cloudflare/types/intel/{intel_indicator_feed_metadata.py => indicator_feed_get_response.py} (90%)
rename src/cloudflare/types/intel/{intel_update_feed.py => indicator_feed_update_response.py} (81%)
delete mode 100644 src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py
rename src/cloudflare/types/intel/indicator_feeds/{intel_permissions_update.py => permission_create_response.py} (74%)
create mode 100644 src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py
diff --git a/api.md b/api.md
index a24d8f4e3aa..f33d822790b 100644
--- a/api.md
+++ b/api.md
@@ -3668,21 +3668,21 @@ Types:
```python
from cloudflare.types.intel import (
- IntelIndicatorFeedItem,
- IntelIndicatorFeedMetadata,
- IntelUpdateFeed,
+ IndicatorFeedCreateResponse,
+ IndicatorFeedUpdateResponse,
IndicatorFeedListResponse,
IndicatorFeedDataResponse,
+ IndicatorFeedGetResponse,
)
```
Methods:
-- client.intel.indicator_feeds.create(\*, account_id, \*\*params) -> IntelIndicatorFeedItem
-- client.intel.indicator_feeds.update(feed_id, \*, account_id, \*\*params) -> IntelUpdateFeed
+- client.intel.indicator_feeds.create(\*, account_id, \*\*params) -> IndicatorFeedCreateResponse
+- client.intel.indicator_feeds.update(feed_id, \*, account_id, \*\*params) -> IndicatorFeedUpdateResponse
- client.intel.indicator_feeds.list(\*, account_id) -> IndicatorFeedListResponse
- client.intel.indicator_feeds.data(feed_id, \*, account_id) -> str
-- client.intel.indicator_feeds.get(feed_id, \*, account_id) -> IntelIndicatorFeedMetadata
+- client.intel.indicator_feeds.get(feed_id, \*, account_id) -> IndicatorFeedGetResponse
### Permissions
@@ -3690,17 +3690,17 @@ Types:
```python
from cloudflare.types.intel.indicator_feeds import (
- IntelPermissionListItem,
- IntelPermissionsUpdate,
+ PermissionCreateResponse,
PermissionListResponse,
+ PermissionDeleteResponse,
)
```
Methods:
-- client.intel.indicator_feeds.permissions.create(\*, account_id, \*\*params) -> IntelPermissionsUpdate
+- client.intel.indicator_feeds.permissions.create(\*, account_id, \*\*params) -> PermissionCreateResponse
- client.intel.indicator_feeds.permissions.list(\*, account_id) -> PermissionListResponse
-- client.intel.indicator_feeds.permissions.delete(\*, account_id, \*\*params) -> IntelPermissionsUpdate
+- client.intel.indicator_feeds.permissions.delete(\*, account_id, \*\*params) -> PermissionDeleteResponse
## Sinkholes
diff --git a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py
index 78ae182975c..98e9e9e195e 100644
--- a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py
+++ b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py
@@ -29,10 +29,10 @@
)
from ...._wrappers import ResultWrapper
from ....types.intel import (
- IntelUpdateFeed,
- IntelIndicatorFeedItem,
+ IndicatorFeedGetResponse,
IndicatorFeedListResponse,
- IntelIndicatorFeedMetadata,
+ IndicatorFeedCreateResponse,
+ IndicatorFeedUpdateResponse,
indicator_feed_create_params,
indicator_feed_update_params,
)
@@ -68,7 +68,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelIndicatorFeedItem:
+ ) -> IndicatorFeedCreateResponse:
"""
Create new indicator feed
@@ -105,7 +105,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelIndicatorFeedItem], ResultWrapper[IntelIndicatorFeedItem]),
+ cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]),
)
def update(
@@ -120,7 +120,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelUpdateFeed:
+ ) -> IndicatorFeedUpdateResponse:
"""
Update indicator feed data
@@ -151,7 +151,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelUpdateFeed], ResultWrapper[IntelUpdateFeed]),
+ cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]),
)
def list(
@@ -243,7 +243,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelIndicatorFeedMetadata:
+ ) -> IndicatorFeedGetResponse:
"""
Get indicator feed metadata
@@ -271,7 +271,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelIndicatorFeedMetadata], ResultWrapper[IntelIndicatorFeedMetadata]),
+ cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]),
)
@@ -300,7 +300,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelIndicatorFeedItem:
+ ) -> IndicatorFeedCreateResponse:
"""
Create new indicator feed
@@ -337,7 +337,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelIndicatorFeedItem], ResultWrapper[IntelIndicatorFeedItem]),
+ cast_to=cast(Type[IndicatorFeedCreateResponse], ResultWrapper[IndicatorFeedCreateResponse]),
)
async def update(
@@ -352,7 +352,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelUpdateFeed:
+ ) -> IndicatorFeedUpdateResponse:
"""
Update indicator feed data
@@ -385,7 +385,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelUpdateFeed], ResultWrapper[IntelUpdateFeed]),
+ cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]),
)
async def list(
@@ -477,7 +477,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelIndicatorFeedMetadata:
+ ) -> IndicatorFeedGetResponse:
"""
Get indicator feed metadata
@@ -505,7 +505,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelIndicatorFeedMetadata], ResultWrapper[IntelIndicatorFeedMetadata]),
+ cast_to=cast(Type[IndicatorFeedGetResponse], ResultWrapper[IndicatorFeedGetResponse]),
)
diff --git a/src/cloudflare/resources/intel/indicator_feeds/permissions.py b/src/cloudflare/resources/intel/indicator_feeds/permissions.py
index 88c0690c081..5b6ebb29679 100644
--- a/src/cloudflare/resources/intel/indicator_feeds/permissions.py
+++ b/src/cloudflare/resources/intel/indicator_feeds/permissions.py
@@ -24,8 +24,9 @@
make_request_options,
)
from ....types.intel.indicator_feeds import (
- IntelPermissionsUpdate,
PermissionListResponse,
+ PermissionCreateResponse,
+ PermissionDeleteResponse,
permission_create_params,
permission_delete_params,
)
@@ -54,7 +55,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelPermissionsUpdate:
+ ) -> PermissionCreateResponse:
"""
Grant permission to indicator feed
@@ -91,7 +92,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
+ cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]),
)
def list(
@@ -145,7 +146,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelPermissionsUpdate:
+ ) -> PermissionDeleteResponse:
"""
Revoke permission to indicator feed
@@ -182,7 +183,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
+ cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]),
)
@@ -207,7 +208,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelPermissionsUpdate:
+ ) -> PermissionCreateResponse:
"""
Grant permission to indicator feed
@@ -244,7 +245,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
+ cast_to=cast(Type[PermissionCreateResponse], ResultWrapper[PermissionCreateResponse]),
)
async def list(
@@ -298,7 +299,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IntelPermissionsUpdate:
+ ) -> PermissionDeleteResponse:
"""
Revoke permission to indicator feed
@@ -335,7 +336,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IntelPermissionsUpdate], ResultWrapper[IntelPermissionsUpdate]),
+ cast_to=cast(Type[PermissionDeleteResponse], ResultWrapper[PermissionDeleteResponse]),
)
diff --git a/src/cloudflare/types/intel/__init__.py b/src/cloudflare/types/intel/__init__.py
index be13550b0db..617ad899335 100644
--- a/src/cloudflare/types/intel/__init__.py
+++ b/src/cloudflare/types/intel/__init__.py
@@ -12,19 +12,19 @@
from .intel_schemas_ip import IntelSchemasIP as IntelSchemasIP
from .whois_get_params import WhoisGetParams as WhoisGetParams
from .domain_get_params import DomainGetParams as DomainGetParams
-from .intel_update_feed import IntelUpdateFeed as IntelUpdateFeed
from .intel_domain_history import IntelDomainHistory as IntelDomainHistory
from .ip_list_get_response import IPListGetResponse as IPListGetResponse
from .sinkhole_list_response import SinkholeListResponse as SinkholeListResponse
from .intel_passive_dns_by_ip import IntelPassiveDNSByIP as IntelPassiveDNSByIP
from .domain_history_get_params import DomainHistoryGetParams as DomainHistoryGetParams
-from .intel_indicator_feed_item import IntelIndicatorFeedItem as IntelIndicatorFeedItem
from .domain_history_get_response import DomainHistoryGetResponse as DomainHistoryGetResponse
+from .indicator_feed_get_response import IndicatorFeedGetResponse as IndicatorFeedGetResponse
from .indicator_feed_create_params import IndicatorFeedCreateParams as IndicatorFeedCreateParams
from .indicator_feed_data_response import IndicatorFeedDataResponse as IndicatorFeedDataResponse
from .indicator_feed_list_response import IndicatorFeedListResponse as IndicatorFeedListResponse
from .indicator_feed_update_params import IndicatorFeedUpdateParams as IndicatorFeedUpdateParams
-from .intel_indicator_feed_metadata import IntelIndicatorFeedMetadata as IntelIndicatorFeedMetadata
from .intel_sinkholes_sinkhole_item import IntelSinkholesSinkholeItem as IntelSinkholesSinkholeItem
+from .indicator_feed_create_response import IndicatorFeedCreateResponse as IndicatorFeedCreateResponse
+from .indicator_feed_update_response import IndicatorFeedUpdateResponse as IndicatorFeedUpdateResponse
from .miscategorization_create_params import MiscategorizationCreateParams as MiscategorizationCreateParams
from .miscategorization_create_response import MiscategorizationCreateResponse as MiscategorizationCreateResponse
diff --git a/src/cloudflare/types/intel/intel_indicator_feed_item.py b/src/cloudflare/types/intel/indicator_feed_create_response.py
similarity index 87%
rename from src/cloudflare/types/intel/intel_indicator_feed_item.py
rename to src/cloudflare/types/intel/indicator_feed_create_response.py
index 338bb47f0d6..df05ab4b464 100644
--- a/src/cloudflare/types/intel/intel_indicator_feed_item.py
+++ b/src/cloudflare/types/intel/indicator_feed_create_response.py
@@ -5,10 +5,10 @@
from ..._models import BaseModel
-__all__ = ["IntelIndicatorFeedItem"]
+__all__ = ["IndicatorFeedCreateResponse"]
-class IntelIndicatorFeedItem(BaseModel):
+class IndicatorFeedCreateResponse(BaseModel):
id: Optional[int] = None
"""The unique identifier for the indicator feed"""
diff --git a/src/cloudflare/types/intel/intel_indicator_feed_metadata.py b/src/cloudflare/types/intel/indicator_feed_get_response.py
similarity index 90%
rename from src/cloudflare/types/intel/intel_indicator_feed_metadata.py
rename to src/cloudflare/types/intel/indicator_feed_get_response.py
index 164ff6c522d..1fd0e75e82b 100644
--- a/src/cloudflare/types/intel/intel_indicator_feed_metadata.py
+++ b/src/cloudflare/types/intel/indicator_feed_get_response.py
@@ -6,10 +6,10 @@
from ..._models import BaseModel
-__all__ = ["IntelIndicatorFeedMetadata"]
+__all__ = ["IndicatorFeedGetResponse"]
-class IntelIndicatorFeedMetadata(BaseModel):
+class IndicatorFeedGetResponse(BaseModel):
id: Optional[int] = None
"""The unique identifier for the indicator feed"""
diff --git a/src/cloudflare/types/intel/indicator_feed_list_response.py b/src/cloudflare/types/intel/indicator_feed_list_response.py
index 4299bcf11db..419628c0893 100644
--- a/src/cloudflare/types/intel/indicator_feed_list_response.py
+++ b/src/cloudflare/types/intel/indicator_feed_list_response.py
@@ -1,9 +1,28 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
+from datetime import datetime
-from .intel_indicator_feed_item import IntelIndicatorFeedItem
+from ..._models import BaseModel
-__all__ = ["IndicatorFeedListResponse"]
+__all__ = ["IndicatorFeedListResponse", "IndicatorFeedListResponseItem"]
-IndicatorFeedListResponse = List[IntelIndicatorFeedItem]
+
+class IndicatorFeedListResponseItem(BaseModel):
+ id: Optional[int] = None
+ """The unique identifier for the indicator feed"""
+
+ created_on: Optional[datetime] = None
+ """The date and time when the data entry was created"""
+
+ description: Optional[str] = None
+ """The description of the example test"""
+
+ modified_on: Optional[datetime] = None
+ """The date and time when the data entry was last modified"""
+
+ name: Optional[str] = None
+ """The name of the indicator feed"""
+
+
+IndicatorFeedListResponse = List[IndicatorFeedListResponseItem]
diff --git a/src/cloudflare/types/intel/intel_update_feed.py b/src/cloudflare/types/intel/indicator_feed_update_response.py
similarity index 81%
rename from src/cloudflare/types/intel/intel_update_feed.py
rename to src/cloudflare/types/intel/indicator_feed_update_response.py
index 467ec7eb404..c4983df11d5 100644
--- a/src/cloudflare/types/intel/intel_update_feed.py
+++ b/src/cloudflare/types/intel/indicator_feed_update_response.py
@@ -4,10 +4,10 @@
from ..._models import BaseModel
-__all__ = ["IntelUpdateFeed"]
+__all__ = ["IndicatorFeedUpdateResponse"]
-class IntelUpdateFeed(BaseModel):
+class IndicatorFeedUpdateResponse(BaseModel):
file_id: Optional[int] = None
"""Feed id"""
diff --git a/src/cloudflare/types/intel/indicator_feeds/__init__.py b/src/cloudflare/types/intel/indicator_feeds/__init__.py
index f0eebbb9425..e27400cd140 100644
--- a/src/cloudflare/types/intel/indicator_feeds/__init__.py
+++ b/src/cloudflare/types/intel/indicator_feeds/__init__.py
@@ -2,8 +2,8 @@
from __future__ import annotations
-from .intel_permissions_update import IntelPermissionsUpdate as IntelPermissionsUpdate
from .permission_create_params import PermissionCreateParams as PermissionCreateParams
from .permission_delete_params import PermissionDeleteParams as PermissionDeleteParams
from .permission_list_response import PermissionListResponse as PermissionListResponse
-from .intel_permission_list_item import IntelPermissionListItem as IntelPermissionListItem
+from .permission_create_response import PermissionCreateResponse as PermissionCreateResponse
+from .permission_delete_response import PermissionDeleteResponse as PermissionDeleteResponse
diff --git a/src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py b/src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py
deleted file mode 100644
index 026f5a318bb..00000000000
--- a/src/cloudflare/types/intel/indicator_feeds/intel_permission_list_item.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from ...._models import BaseModel
-
-__all__ = ["IntelPermissionListItem"]
-
-
-class IntelPermissionListItem(BaseModel):
- id: Optional[int] = None
- """The unique identifier for the indicator feed"""
-
- description: Optional[str] = None
- """The description of the example test"""
-
- name: Optional[str] = None
- """The name of the indicator feed"""
diff --git a/src/cloudflare/types/intel/indicator_feeds/intel_permissions_update.py b/src/cloudflare/types/intel/indicator_feeds/permission_create_response.py
similarity index 74%
rename from src/cloudflare/types/intel/indicator_feeds/intel_permissions_update.py
rename to src/cloudflare/types/intel/indicator_feeds/permission_create_response.py
index 1ec82a3a0ff..28d08cb1788 100644
--- a/src/cloudflare/types/intel/indicator_feeds/intel_permissions_update.py
+++ b/src/cloudflare/types/intel/indicator_feeds/permission_create_response.py
@@ -4,9 +4,9 @@
from ...._models import BaseModel
-__all__ = ["IntelPermissionsUpdate"]
+__all__ = ["PermissionCreateResponse"]
-class IntelPermissionsUpdate(BaseModel):
+class PermissionCreateResponse(BaseModel):
success: Optional[bool] = None
"""Whether the update succeeded or not"""
diff --git a/src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py b/src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py
new file mode 100644
index 00000000000..ef65a403a26
--- /dev/null
+++ b/src/cloudflare/types/intel/indicator_feeds/permission_delete_response.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ...._models import BaseModel
+
+__all__ = ["PermissionDeleteResponse"]
+
+
+class PermissionDeleteResponse(BaseModel):
+ success: Optional[bool] = None
+ """Whether the update succeeded or not"""
diff --git a/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py b/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py
index 95b1ad6c8d8..50538efec4f 100644
--- a/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py
+++ b/src/cloudflare/types/intel/indicator_feeds/permission_list_response.py
@@ -1,9 +1,21 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
-from .intel_permission_list_item import IntelPermissionListItem
+from ...._models import BaseModel
-__all__ = ["PermissionListResponse"]
+__all__ = ["PermissionListResponse", "PermissionListResponseItem"]
-PermissionListResponse = List[IntelPermissionListItem]
+
+class PermissionListResponseItem(BaseModel):
+ id: Optional[int] = None
+ """The unique identifier for the indicator feed"""
+
+ description: Optional[str] = None
+ """The description of the example test"""
+
+ name: Optional[str] = None
+ """The name of the indicator feed"""
+
+
+PermissionListResponse = List[PermissionListResponseItem]
diff --git a/tests/api_resources/intel/indicator_feeds/test_permissions.py b/tests/api_resources/intel/indicator_feeds/test_permissions.py
index e7abc518e4f..f7da59f2cda 100644
--- a/tests/api_resources/intel/indicator_feeds/test_permissions.py
+++ b/tests/api_resources/intel/indicator_feeds/test_permissions.py
@@ -10,8 +10,9 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types.intel.indicator_feeds import (
- IntelPermissionsUpdate,
PermissionListResponse,
+ PermissionCreateResponse,
+ PermissionDeleteResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -26,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None:
permission = client.intel.indicator_feeds.permissions.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -36,7 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
account_tag="823f45f16fd2f7e21e1e054aga4d2859",
feed_id=1,
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -48,7 +49,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -60,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -120,7 +121,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
permission = client.intel.indicator_feeds.permissions.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -130,7 +131,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_tag="823f45f16fd2f7e21e1e054aga4d2859",
feed_id=1,
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -142,7 +143,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -154,7 +155,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -176,7 +177,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
permission = await async_client.intel.indicator_feeds.permissions.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -186,7 +187,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
account_tag="823f45f16fd2f7e21e1e054aga4d2859",
feed_id=1,
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -198,7 +199,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = await response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -210,7 +211,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = await response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionCreateResponse, permission, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -270,7 +271,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
permission = await async_client.intel.indicator_feeds.permissions.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -280,7 +281,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_tag="823f45f16fd2f7e21e1e054aga4d2859",
feed_id=1,
)
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -292,7 +293,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = await response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -304,7 +305,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
permission = await response.parse()
- assert_matches_type(IntelPermissionsUpdate, permission, path=["response"])
+ assert_matches_type(PermissionDeleteResponse, permission, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py
index 1e15c4a011b..ad28b0440fe 100644
--- a/tests/api_resources/intel/test_indicator_feeds.py
+++ b/tests/api_resources/intel/test_indicator_feeds.py
@@ -10,10 +10,10 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types.intel import (
- IntelUpdateFeed,
- IntelIndicatorFeedItem,
+ IndicatorFeedGetResponse,
IndicatorFeedListResponse,
- IntelIndicatorFeedMetadata,
+ IndicatorFeedCreateResponse,
+ IndicatorFeedUpdateResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None:
indicator_feed = client.intel.indicator_feeds.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
description="example feed description",
name="example_feed_1",
)
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = response.parse()
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = response.parse()
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -81,7 +81,7 @@ def test_method_update(self, client: Cloudflare) -> None:
12,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -91,7 +91,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
source="@/Users/me/test.stix2",
)
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -104,7 +104,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = response.parse()
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -117,7 +117,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = response.parse()
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -225,7 +225,7 @@ def test_method_get(self, client: Cloudflare) -> None:
12,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -238,7 +238,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"
indicator_feed = response.parse()
- assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -251,7 +251,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = response.parse()
- assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -274,7 +274,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
indicator_feed = await async_client.intel.indicator_feeds.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -284,7 +284,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
description="example feed description",
name="example_feed_1",
)
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -296,7 +296,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = await response.parse()
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -308,7 +308,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = await response.parse()
- assert_matches_type(IntelIndicatorFeedItem, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedCreateResponse, indicator_feed, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -327,7 +327,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
12,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -337,7 +337,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
account_id="023e105f4ecef8ad9ca31a8372d0c353",
source="@/Users/me/test.stix2",
)
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -350,7 +350,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = await response.parse()
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -363,7 +363,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = await response.parse()
- assert_matches_type(IntelUpdateFeed, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedUpdateResponse, indicator_feed, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -471,7 +471,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
12,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -484,7 +484,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"
indicator_feed = await response.parse()
- assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -497,7 +497,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
indicator_feed = await response.parse()
- assert_matches_type(IntelIndicatorFeedMetadata, indicator_feed, path=["response"])
+ assert_matches_type(IndicatorFeedGetResponse, indicator_feed, path=["response"])
assert cast(Any, response.is_closed) is True