feat(api): api update

This commit is contained in:
stainless-app[bot] 2025-05-27 19:15:04 +00:00
parent 32626187b1
commit e0fa8ba5d6
4 changed files with 40 additions and 40 deletions

View file

@ -1,4 +1,4 @@
configured_endpoints: 1742
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3b51a8438b19d990825fc00ef8ed9f6cc863b2579179bc0601f299768e302f2f.yml
openapi_spec_hash: daa336247981d3f53458f78895c2a857
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8e8969caf4e9f8a99d0ec6d14c2b8a1190bb328b6ab1c30087e547ab1261a36e.yml
openapi_spec_hash: 1b84773b57a1458614db701e30e7fca8
config_hash: 85703bb37ad4f7b8bfeea6f128f351a0

View file

@ -20,7 +20,7 @@ class TestHealth:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
health = client.cloudforce_one.threat_events.datasets.health.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(HealthGetResponse, health, path=["response"])
@ -28,7 +28,7 @@ class TestHealth:
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.datasets.health.with_raw_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -40,7 +40,7 @@ class TestHealth:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -66,7 +66,7 @@ class TestAsyncHealth:
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
health = await async_client.cloudforce_one.threat_events.datasets.health.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(HealthGetResponse, health, path=["response"])
@ -74,7 +74,7 @@ class TestAsyncHealth:
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.datasets.health.with_raw_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -86,7 +86,7 @@ class TestAsyncHealth:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed

View file

@ -113,7 +113,7 @@ class TestCategories:
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
category = client.cloudforce_one.threat_events.categories.delete(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(CategoryDeleteResponse, category, path=["response"])
@ -122,7 +122,7 @@ class TestCategories:
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.categories.with_raw_response.delete(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -135,7 +135,7 @@ class TestCategories:
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.categories.with_streaming_response.delete(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -159,7 +159,7 @@ class TestCategories:
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
category = client.cloudforce_one.threat_events.categories.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(CategoryEditResponse, category, path=["response"])
@ -168,7 +168,7 @@ class TestCategories:
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
category = client.cloudforce_one.threat_events.categories.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
kill_chain=0,
mitre_attack=["T1234"],
@ -181,7 +181,7 @@ class TestCategories:
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.categories.with_raw_response.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -194,7 +194,7 @@ class TestCategories:
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.categories.with_streaming_response.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -218,7 +218,7 @@ class TestCategories:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
category = client.cloudforce_one.threat_events.categories.get(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(CategoryGetResponse, category, path=["response"])
@ -227,7 +227,7 @@ class TestCategories:
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.categories.with_raw_response.get(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -240,7 +240,7 @@ class TestCategories:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.categories.with_streaming_response.get(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -354,7 +354,7 @@ class TestAsyncCategories:
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
category = await async_client.cloudforce_one.threat_events.categories.delete(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(CategoryDeleteResponse, category, path=["response"])
@ -363,7 +363,7 @@ class TestAsyncCategories:
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.delete(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -376,7 +376,7 @@ class TestAsyncCategories:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.delete(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -400,7 +400,7 @@ class TestAsyncCategories:
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
category = await async_client.cloudforce_one.threat_events.categories.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(CategoryEditResponse, category, path=["response"])
@ -409,7 +409,7 @@ class TestAsyncCategories:
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
category = await async_client.cloudforce_one.threat_events.categories.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
kill_chain=0,
mitre_attack=["T1234"],
@ -422,7 +422,7 @@ class TestAsyncCategories:
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -435,7 +435,7 @@ class TestAsyncCategories:
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.edit(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -459,7 +459,7 @@ class TestAsyncCategories:
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
category = await async_client.cloudforce_one.threat_events.categories.get(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(CategoryGetResponse, category, path=["response"])
@ -468,7 +468,7 @@ class TestAsyncCategories:
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.get(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -481,7 +481,7 @@ class TestAsyncCategories:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.get(
category_id="category_id",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed

View file

@ -101,7 +101,7 @@ class TestDatasets:
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
dataset = client.cloudforce_one.threat_events.datasets.edit(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
is_public=True,
name="x",
@ -112,7 +112,7 @@ class TestDatasets:
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.datasets.with_raw_response.edit(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
is_public=True,
name="x",
@ -127,7 +127,7 @@ class TestDatasets:
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.datasets.with_streaming_response.edit(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
is_public=True,
name="x",
@ -155,7 +155,7 @@ class TestDatasets:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
dataset = client.cloudforce_one.threat_events.datasets.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(DatasetGetResponse, dataset, path=["response"])
@ -164,7 +164,7 @@ class TestDatasets:
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.cloudforce_one.threat_events.datasets.with_raw_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -177,7 +177,7 @@ class TestDatasets:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.cloudforce_one.threat_events.datasets.with_streaming_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed
@ -336,7 +336,7 @@ class TestAsyncDatasets:
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
dataset = await async_client.cloudforce_one.threat_events.datasets.edit(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
is_public=True,
name="x",
@ -347,7 +347,7 @@ class TestAsyncDatasets:
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.edit(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
is_public=True,
name="x",
@ -362,7 +362,7 @@ class TestAsyncDatasets:
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.edit(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
is_public=True,
name="x",
@ -390,7 +390,7 @@ class TestAsyncDatasets:
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
dataset = await async_client.cloudforce_one.threat_events.datasets.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
assert_matches_type(DatasetGetResponse, dataset, path=["response"])
@ -399,7 +399,7 @@ class TestAsyncDatasets:
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
)
@ -412,7 +412,7 @@ class TestAsyncDatasets:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.get(
dataset_id="dataset_id",
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id=0,
) as response:
assert not response.is_closed