Skip to content

Commit 5489bd9

Browse files
feat(api): api update
1 parent f40aace commit 5489bd9

File tree

6 files changed

+158
-5
lines changed

6 files changed

+158
-5
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1807
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c42047fbab361b401a0b1c4e34f370b0131ace1fbd5c158ca49e14380902b0f2.yml
3-
openapi_spec_hash: 673783dfb96f15bec51a6b2952b10286
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9549aa97ab624d772eb415b46e62ee1e4566f98225b0646bb71ed9401aba5258.yml
3+
openapi_spec_hash: 30239dd700a4535babaca0dc86118d23
44
config_hash: 9f61e9f02b675e373b140471d52b670c

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def create(
201201
attacker_country: str | NotGiven = NOT_GIVEN,
202202
dataset_id: str | NotGiven = NOT_GIVEN,
203203
indicator: str | NotGiven = NOT_GIVEN,
204+
indicator_type: str | NotGiven = NOT_GIVEN,
204205
tags: List[str] | NotGiven = NOT_GIVEN,
205206
target_country: str | NotGiven = NOT_GIVEN,
206207
target_industry: str | NotGiven = NOT_GIVEN,
@@ -244,6 +245,7 @@ def create(
244245
"attacker_country": attacker_country,
245246
"dataset_id": dataset_id,
246247
"indicator": indicator,
248+
"indicator_type": indicator_type,
247249
"tags": tags,
248250
"target_country": target_country,
249251
"target_industry": target_industry,
@@ -595,6 +597,7 @@ async def create(
595597
attacker_country: str | NotGiven = NOT_GIVEN,
596598
dataset_id: str | NotGiven = NOT_GIVEN,
597599
indicator: str | NotGiven = NOT_GIVEN,
600+
indicator_type: str | NotGiven = NOT_GIVEN,
598601
tags: List[str] | NotGiven = NOT_GIVEN,
599602
target_country: str | NotGiven = NOT_GIVEN,
600603
target_industry: str | NotGiven = NOT_GIVEN,
@@ -638,6 +641,7 @@ async def create(
638641
"attacker_country": attacker_country,
639642
"dataset_id": dataset_id,
640643
"indicator": indicator,
644+
"indicator_type": indicator_type,
641645
"tags": tags,
642646
"target_country": target_country,
643647
"target_industry": target_industry,

src/cloudflare/types/cloudforce_one/threat_event_bulk_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class Data(TypedDict, total=False):
4949

5050
indicator: str
5151

52+
indicator_type: Annotated[str, PropertyInfo(alias="indicatorType")]
53+
5254
tags: List[str]
5355

5456
target_country: Annotated[str, PropertyInfo(alias="targetCountry")]

src/cloudflare/types/cloudforce_one/threat_event_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class ThreatEventCreateParams(TypedDict, total=False):
3535

3636
indicator: str
3737

38+
indicator_type: Annotated[str, PropertyInfo(alias="indicatorType")]
39+
3840
tags: List[str]
3941

4042
target_country: Annotated[str, PropertyInfo(alias="targetCountry")]
Lines changed: 146 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,158 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from pydantic import Field as FieldInfo
4+
35
from ....._models import BaseModel
46

5-
__all__ = ["HealthGetResponse", "Items"]
7+
__all__ = [
8+
"HealthGetResponse",
9+
"Properties",
10+
"PropertiesDurationMs",
11+
"PropertiesOk",
12+
"PropertiesShards",
13+
"PropertiesShardsItems",
14+
"PropertiesShardsItemsProperties",
15+
"PropertiesShardsItemsPropertiesDatasetID",
16+
"PropertiesShardsItemsPropertiesDate",
17+
"PropertiesShardsItemsPropertiesHealthCheckMs",
18+
"PropertiesShardsItemsPropertiesPageCount",
19+
"PropertiesShardsItemsPropertiesPageSize",
20+
"PropertiesShardsItemsPropertiesSizeBytes",
21+
"PropertiesShardsItemsPropertiesSizeMB",
22+
"PropertiesShardsItemsPropertiesStartupMs",
23+
"PropertiesShardsItemsPropertiesTableStats",
24+
"PropertiesShardsItemsPropertiesTableStatsAdditionalProperties",
25+
"PropertiesShardsItemsPropertiesTimedOut",
26+
"PropertiesShardsItemsPropertiesTotalMs",
27+
"PropertiesTotalShards",
28+
"PropertiesTotalSizeBytes",
29+
"PropertiesTotalSizeMB",
30+
]
31+
32+
33+
class PropertiesDurationMs(BaseModel):
34+
type: str
35+
36+
37+
class PropertiesOk(BaseModel):
38+
type: str
39+
40+
41+
class PropertiesShardsItemsPropertiesDatasetID(BaseModel):
42+
type: str
43+
44+
45+
class PropertiesShardsItemsPropertiesDate(BaseModel):
46+
type: str
47+
48+
49+
class PropertiesShardsItemsPropertiesHealthCheckMs(BaseModel):
50+
type: str
651

752

8-
class Items(BaseModel):
53+
class PropertiesShardsItemsPropertiesPageCount(BaseModel):
954
type: str
1055

1156

57+
class PropertiesShardsItemsPropertiesPageSize(BaseModel):
58+
type: str
59+
60+
61+
class PropertiesShardsItemsPropertiesSizeBytes(BaseModel):
62+
type: str
63+
64+
65+
class PropertiesShardsItemsPropertiesSizeMB(BaseModel):
66+
type: str
67+
68+
69+
class PropertiesShardsItemsPropertiesStartupMs(BaseModel):
70+
type: str
71+
72+
73+
class PropertiesShardsItemsPropertiesTableStatsAdditionalProperties(BaseModel):
74+
type: str
75+
76+
77+
class PropertiesShardsItemsPropertiesTableStats(BaseModel):
78+
additional_properties: PropertiesShardsItemsPropertiesTableStatsAdditionalProperties = FieldInfo(
79+
alias="additionalProperties"
80+
)
81+
82+
type: str
83+
84+
85+
class PropertiesShardsItemsPropertiesTimedOut(BaseModel):
86+
type: str
87+
88+
89+
class PropertiesShardsItemsPropertiesTotalMs(BaseModel):
90+
type: str
91+
92+
93+
class PropertiesShardsItemsProperties(BaseModel):
94+
dataset_id: PropertiesShardsItemsPropertiesDatasetID = FieldInfo(alias="datasetId")
95+
96+
date: PropertiesShardsItemsPropertiesDate
97+
98+
health_check_ms: PropertiesShardsItemsPropertiesHealthCheckMs = FieldInfo(alias="healthCheckMs")
99+
100+
page_count: PropertiesShardsItemsPropertiesPageCount = FieldInfo(alias="pageCount")
101+
102+
page_size: PropertiesShardsItemsPropertiesPageSize = FieldInfo(alias="pageSize")
103+
104+
size_bytes: PropertiesShardsItemsPropertiesSizeBytes = FieldInfo(alias="sizeBytes")
105+
106+
size_mb: PropertiesShardsItemsPropertiesSizeMB = FieldInfo(alias="sizeMB")
107+
108+
startup_ms: PropertiesShardsItemsPropertiesStartupMs = FieldInfo(alias="startupMs")
109+
110+
table_stats: PropertiesShardsItemsPropertiesTableStats = FieldInfo(alias="tableStats")
111+
112+
timed_out: PropertiesShardsItemsPropertiesTimedOut = FieldInfo(alias="timedOut")
113+
114+
total_ms: PropertiesShardsItemsPropertiesTotalMs = FieldInfo(alias="totalMs")
115+
116+
117+
class PropertiesShardsItems(BaseModel):
118+
properties: PropertiesShardsItemsProperties
119+
120+
type: str
121+
122+
123+
class PropertiesShards(BaseModel):
124+
items: PropertiesShardsItems
125+
126+
type: str
127+
128+
129+
class PropertiesTotalShards(BaseModel):
130+
type: str
131+
132+
133+
class PropertiesTotalSizeBytes(BaseModel):
134+
type: str
135+
136+
137+
class PropertiesTotalSizeMB(BaseModel):
138+
type: str
139+
140+
141+
class Properties(BaseModel):
142+
duration_ms: PropertiesDurationMs = FieldInfo(alias="durationMs")
143+
144+
ok: PropertiesOk
145+
146+
shards: PropertiesShards
147+
148+
total_shards: PropertiesTotalShards = FieldInfo(alias="totalShards")
149+
150+
total_size_bytes: PropertiesTotalSizeBytes = FieldInfo(alias="totalSizeBytes")
151+
152+
total_size_mb: PropertiesTotalSizeMB = FieldInfo(alias="totalSizeMB")
153+
154+
12155
class HealthGetResponse(BaseModel):
13-
items: Items
156+
properties: Properties
14157

15158
type: str

tests/api_resources/cloudforce_one/test_threat_events.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
5757
attacker_country="CN",
5858
dataset_id="durableObjectName",
5959
indicator="domain.com",
60+
indicator_type="domain",
6061
tags=["malware"],
6162
target_country="US",
6263
target_industry="Agriculture",
@@ -475,6 +476,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
475476
attacker_country="CN",
476477
dataset_id="durableObjectName",
477478
indicator="domain.com",
479+
indicator_type="domain",
478480
tags=["malware"],
479481
target_country="US",
480482
target_industry="Agriculture",

0 commit comments

Comments
 (0)