Skip to content

Commit ff73ba2

Browse files
feat(api): api update
1 parent 4876ef7 commit ff73ba2

File tree

197 files changed

+12014
-2260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+12014
-2260
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: 1741
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1275196e3f721bb51d5293558a64f10e71a492cb107d88242147bd58f94310d9.yml
3-
openapi_spec_hash: 3875d70a6134a2081a6c8c1de038901d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-67f1e6a1c9002584a0b224367460a0322a4a0591334123eb4630caf4c278e4b4.yml
3+
openapi_spec_hash: 2f45d30f8bbb348c3105378c8ba3e96c
44
config_hash: f6c4a93139a93cfd16a678e54b5fb249

src/cloudflare/resources/radar/bgp/routes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def realtime(
243243
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
244244
) -> RouteRealtimeResponse:
245245
"""
246-
Retrieves realtime routes for prefixes using public realtime data collectors
247-
(RouteViews and RIPE RIS).
246+
Retrieves real-time BGP routes for a prefix, using public real-time data
247+
collectors (RouteViews and RIPE RIS).
248248
249249
Args:
250250
format: Format in which results will be returned.
@@ -539,8 +539,8 @@ async def realtime(
539539
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
540540
) -> RouteRealtimeResponse:
541541
"""
542-
Retrieves realtime routes for prefixes using public realtime data collectors
543-
(RouteViews and RIPE RIS).
542+
Retrieves real-time BGP routes for a prefix, using public real-time data
543+
collectors (RouteViews and RIPE RIS).
544544
545545
Args:
546546
format: Format in which results will be returned.

src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,89 @@
22

33
from typing import Dict, List, Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from pydantic import Field as FieldInfo
78

89
from ....._models import BaseModel
910

10-
__all__ = ["SummaryUserAgentResponse", "Meta", "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation"]
11-
12-
13-
class MetaDateRange(BaseModel):
14-
end_time: datetime = FieldInfo(alias="endTime")
15-
"""Adjusted end of date range."""
16-
17-
start_time: datetime = FieldInfo(alias="startTime")
18-
"""Adjusted start of date range."""
11+
__all__ = [
12+
"SummaryUserAgentResponse",
13+
"Meta",
14+
"MetaConfidenceInfo",
15+
"MetaConfidenceInfoAnnotation",
16+
"MetaDateRange",
17+
"MetaUnit",
18+
]
1919

2020

2121
class MetaConfidenceInfoAnnotation(BaseModel):
2222
data_source: str = FieldInfo(alias="dataSource")
2323

2424
description: str
2525

26+
end_time: datetime = FieldInfo(alias="endTime")
27+
2628
event_type: str = FieldInfo(alias="eventType")
2729

2830
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
31+
"""Whether event is a single point in time or a time range."""
2932

30-
end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)
31-
32-
linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None)
33+
linked_url: str = FieldInfo(alias="linkedUrl")
3334

34-
start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None)
35+
start_time: datetime = FieldInfo(alias="startTime")
3536

3637

3738
class MetaConfidenceInfo(BaseModel):
38-
annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None
39+
annotations: List[MetaConfidenceInfoAnnotation]
3940

40-
level: Optional[int] = None
41+
level: int
42+
"""Provides an indication of how much confidence Cloudflare has in the data."""
43+
44+
45+
class MetaDateRange(BaseModel):
46+
end_time: datetime = FieldInfo(alias="endTime")
47+
"""Adjusted end of date range."""
48+
49+
start_time: datetime = FieldInfo(alias="startTime")
50+
"""Adjusted start of date range."""
51+
52+
53+
class MetaUnit(BaseModel):
54+
name: str
55+
56+
value: str
4157

4258

4359
class Meta(BaseModel):
60+
confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
61+
4462
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
4563

46-
last_updated: str = FieldInfo(alias="lastUpdated")
64+
last_updated: datetime = FieldInfo(alias="lastUpdated")
65+
"""Timestamp of the last dataset update."""
4766

48-
normalization: str
67+
normalization: Literal[
68+
"PERCENTAGE",
69+
"MIN0_MAX",
70+
"MIN_MAX",
71+
"RAW_VALUES",
72+
"PERCENTAGE_CHANGE",
73+
"ROLLING_AVERAGE",
74+
"OVERLAPPED_PERCENTAGE",
75+
]
76+
"""Normalization method applied to the results.
4977
50-
confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
78+
Refer to
79+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
80+
"""
81+
82+
units: List[MetaUnit]
83+
"""Measurement units for the results."""
5184

5285

5386
class SummaryUserAgentResponse(BaseModel):
5487
meta: Meta
88+
"""Metadata for the results."""
5589

5690
summary_0: Dict[str, str]

src/cloudflare/types/radar/ai/inference/summary_model_response.py

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,89 @@
22

33
from typing import Dict, List, Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from pydantic import Field as FieldInfo
78

89
from ....._models import BaseModel
910

10-
__all__ = ["SummaryModelResponse", "Meta", "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation"]
11-
12-
13-
class MetaDateRange(BaseModel):
14-
end_time: datetime = FieldInfo(alias="endTime")
15-
"""Adjusted end of date range."""
16-
17-
start_time: datetime = FieldInfo(alias="startTime")
18-
"""Adjusted start of date range."""
11+
__all__ = [
12+
"SummaryModelResponse",
13+
"Meta",
14+
"MetaConfidenceInfo",
15+
"MetaConfidenceInfoAnnotation",
16+
"MetaDateRange",
17+
"MetaUnit",
18+
]
1919

2020

2121
class MetaConfidenceInfoAnnotation(BaseModel):
2222
data_source: str = FieldInfo(alias="dataSource")
2323

2424
description: str
2525

26+
end_time: datetime = FieldInfo(alias="endTime")
27+
2628
event_type: str = FieldInfo(alias="eventType")
2729

2830
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
31+
"""Whether event is a single point in time or a time range."""
2932

30-
end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)
31-
32-
linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None)
33+
linked_url: str = FieldInfo(alias="linkedUrl")
3334

34-
start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None)
35+
start_time: datetime = FieldInfo(alias="startTime")
3536

3637

3738
class MetaConfidenceInfo(BaseModel):
38-
annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None
39+
annotations: List[MetaConfidenceInfoAnnotation]
3940

40-
level: Optional[int] = None
41+
level: int
42+
"""Provides an indication of how much confidence Cloudflare has in the data."""
43+
44+
45+
class MetaDateRange(BaseModel):
46+
end_time: datetime = FieldInfo(alias="endTime")
47+
"""Adjusted end of date range."""
48+
49+
start_time: datetime = FieldInfo(alias="startTime")
50+
"""Adjusted start of date range."""
51+
52+
53+
class MetaUnit(BaseModel):
54+
name: str
55+
56+
value: str
4157

4258

4359
class Meta(BaseModel):
60+
confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
61+
4462
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
4563

46-
last_updated: str = FieldInfo(alias="lastUpdated")
64+
last_updated: datetime = FieldInfo(alias="lastUpdated")
65+
"""Timestamp of the last dataset update."""
4766

48-
normalization: str
67+
normalization: Literal[
68+
"PERCENTAGE",
69+
"MIN0_MAX",
70+
"MIN_MAX",
71+
"RAW_VALUES",
72+
"PERCENTAGE_CHANGE",
73+
"ROLLING_AVERAGE",
74+
"OVERLAPPED_PERCENTAGE",
75+
]
76+
"""Normalization method applied to the results.
4977
50-
confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
78+
Refer to
79+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
80+
"""
81+
82+
units: List[MetaUnit]
83+
"""Measurement units for the results."""
5184

5285

5386
class SummaryModelResponse(BaseModel):
5487
meta: Meta
88+
"""Metadata for the results."""
5589

5690
summary_0: Dict[str, str]

src/cloudflare/types/radar/ai/inference/summary_task_response.py

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,89 @@
22

33
from typing import Dict, List, Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from pydantic import Field as FieldInfo
78

89
from ....._models import BaseModel
910

10-
__all__ = ["SummaryTaskResponse", "Meta", "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation"]
11-
12-
13-
class MetaDateRange(BaseModel):
14-
end_time: datetime = FieldInfo(alias="endTime")
15-
"""Adjusted end of date range."""
16-
17-
start_time: datetime = FieldInfo(alias="startTime")
18-
"""Adjusted start of date range."""
11+
__all__ = [
12+
"SummaryTaskResponse",
13+
"Meta",
14+
"MetaConfidenceInfo",
15+
"MetaConfidenceInfoAnnotation",
16+
"MetaDateRange",
17+
"MetaUnit",
18+
]
1919

2020

2121
class MetaConfidenceInfoAnnotation(BaseModel):
2222
data_source: str = FieldInfo(alias="dataSource")
2323

2424
description: str
2525

26+
end_time: datetime = FieldInfo(alias="endTime")
27+
2628
event_type: str = FieldInfo(alias="eventType")
2729

2830
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
31+
"""Whether event is a single point in time or a time range."""
2932

30-
end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)
31-
32-
linked_url: Optional[str] = FieldInfo(alias="linkedUrl", default=None)
33+
linked_url: str = FieldInfo(alias="linkedUrl")
3334

34-
start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None)
35+
start_time: datetime = FieldInfo(alias="startTime")
3536

3637

3738
class MetaConfidenceInfo(BaseModel):
38-
annotations: Optional[List[MetaConfidenceInfoAnnotation]] = None
39+
annotations: List[MetaConfidenceInfoAnnotation]
3940

40-
level: Optional[int] = None
41+
level: int
42+
"""Provides an indication of how much confidence Cloudflare has in the data."""
43+
44+
45+
class MetaDateRange(BaseModel):
46+
end_time: datetime = FieldInfo(alias="endTime")
47+
"""Adjusted end of date range."""
48+
49+
start_time: datetime = FieldInfo(alias="startTime")
50+
"""Adjusted start of date range."""
51+
52+
53+
class MetaUnit(BaseModel):
54+
name: str
55+
56+
value: str
4157

4258

4359
class Meta(BaseModel):
60+
confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
61+
4462
date_range: List[MetaDateRange] = FieldInfo(alias="dateRange")
4563

46-
last_updated: str = FieldInfo(alias="lastUpdated")
64+
last_updated: datetime = FieldInfo(alias="lastUpdated")
65+
"""Timestamp of the last dataset update."""
4766

48-
normalization: str
67+
normalization: Literal[
68+
"PERCENTAGE",
69+
"MIN0_MAX",
70+
"MIN_MAX",
71+
"RAW_VALUES",
72+
"PERCENTAGE_CHANGE",
73+
"ROLLING_AVERAGE",
74+
"OVERLAPPED_PERCENTAGE",
75+
]
76+
"""Normalization method applied to the results.
4977
50-
confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None)
78+
Refer to
79+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
80+
"""
81+
82+
units: List[MetaUnit]
83+
"""Measurement units for the results."""
5184

5285

5386
class SummaryTaskResponse(BaseModel):
5487
meta: Meta
88+
"""Metadata for the results."""
5589

5690
summary_0: Dict[str, str]

0 commit comments

Comments
 (0)