Skip to content

Commit 6b7d814

Browse files
feat(api): update via SDK Studio (#349)
1 parent fe916e5 commit 6b7d814

11 files changed

Lines changed: 37 additions & 31 deletions

File tree

api.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
```python
44
from cloudflare.types import (
5+
ASN,
56
AuditLog,
67
CloudflareTunnel,
78
ErrorData,
@@ -3525,15 +3526,9 @@ Methods:
35253526

35263527
## ASN
35273528

3528-
Types:
3529-
3530-
```python
3531-
from cloudflare.types.intel import IntelASN
3532-
```
3533-
35343529
Methods:
35353530

3536-
- <code title="get /accounts/{account_id}/intel/asn/{asn}">client.intel.asn.<a href="./src/cloudflare/resources/intel/asn/asn.py">get</a>(asn, \*, account_id) -> <a href="./src/cloudflare/types/intel/intel_asn.py">IntelASN</a></code>
3531+
- <code title="get /accounts/{account_id}/intel/asn/{asn}">client.intel.asn.<a href="./src/cloudflare/resources/intel/asn/asn.py">get</a>(asn, \*, account_id) -> <a href="./src/cloudflare/types/shared/asn.py">ASN</a></code>
35373532

35383533
### Subnets
35393534

src/cloudflare/resources/intel/asn/asn.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
async_to_streamed_response_wrapper,
2525
)
2626
from ...._wrappers import ResultWrapper
27-
from ....types.intel import IntelASN
2827
from ...._base_client import (
2928
make_request_options,
3029
)
30+
from ....types.shared import asn
3131

3232
__all__ = ["ASN", "AsyncASN"]
3333

@@ -47,7 +47,7 @@ def with_streaming_response(self) -> ASNWithStreamingResponse:
4747

4848
def get(
4949
self,
50-
asn: IntelASN,
50+
asn: asn.ASN,
5151
*,
5252
account_id: str,
5353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -56,7 +56,7 @@ def get(
5656
extra_query: Query | None = None,
5757
extra_body: Body | None = None,
5858
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
59-
) -> IntelASN:
59+
) -> asn.ASN:
6060
"""
6161
Get ASN Overview
6262
@@ -80,9 +80,9 @@ def get(
8080
extra_query=extra_query,
8181
extra_body=extra_body,
8282
timeout=timeout,
83-
post_parser=ResultWrapper[IntelASN]._unwrapper,
83+
post_parser=ResultWrapper[asn.ASN]._unwrapper,
8484
),
85-
cast_to=cast(Type[IntelASN], ResultWrapper[int]),
85+
cast_to=cast(Type[asn.ASN], ResultWrapper[int]),
8686
)
8787

8888

@@ -101,7 +101,7 @@ def with_streaming_response(self) -> AsyncASNWithStreamingResponse:
101101

102102
async def get(
103103
self,
104-
asn: IntelASN,
104+
asn: asn.ASN,
105105
*,
106106
account_id: str,
107107
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -110,7 +110,7 @@ async def get(
110110
extra_query: Query | None = None,
111111
extra_body: Body | None = None,
112112
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
113-
) -> IntelASN:
113+
) -> asn.ASN:
114114
"""
115115
Get ASN Overview
116116
@@ -134,9 +134,9 @@ async def get(
134134
extra_query=extra_query,
135135
extra_body=extra_body,
136136
timeout=timeout,
137-
post_parser=ResultWrapper[IntelASN]._unwrapper,
137+
post_parser=ResultWrapper[asn.ASN]._unwrapper,
138138
),
139-
cast_to=cast(Type[IntelASN], ResultWrapper[int]),
139+
cast_to=cast(Type[asn.ASN], ResultWrapper[int]),
140140
)
141141

142142

src/cloudflare/resources/intel/asn/subnets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
async_to_raw_response_wrapper,
1414
async_to_streamed_response_wrapper,
1515
)
16-
from ....types.intel import IntelASN
1716
from ...._base_client import (
1817
make_request_options,
1918
)
19+
from ....types.shared import ASN
2020
from ....types.intel.asn import SubnetGetResponse
2121

2222
__all__ = ["Subnets", "AsyncSubnets"]
@@ -33,7 +33,7 @@ def with_streaming_response(self) -> SubnetsWithStreamingResponse:
3333

3434
def get(
3535
self,
36-
asn: IntelASN,
36+
asn: ASN,
3737
*,
3838
account_id: str,
3939
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -79,7 +79,7 @@ def with_streaming_response(self) -> AsyncSubnetsWithStreamingResponse:
7979

8080
async def get(
8181
self,
82-
asn: IntelASN,
82+
asn: ASN,
8383
*,
8484
account_id: str,
8585
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/cloudflare/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from .shared import (
6+
ASN as ASN,
67
Role as Role,
78
Member as Member,
89
Result as Result,

src/cloudflare/types/intel/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from .ip_list import IPList as IPList
1010
from .sinkhole import Sinkhole as Sinkhole
1111
from .dns_param import DNSParam as DNSParam
12-
from .intel_asn import IntelASN as IntelASN
1312
from .ip_get_params import IPGetParams as IPGetParams
1413
from .domain_history import DomainHistory as DomainHistory
1514
from .dns_list_params import DNSListParams as DNSListParams

src/cloudflare/types/intel/asn/subnet_get_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from typing import List, Optional
44

5+
from ...shared import ASN
56
from ...._models import BaseModel
6-
from ..intel_asn import IntelASN
77

88
__all__ = ["SubnetGetResponse"]
99

1010

1111
class SubnetGetResponse(BaseModel):
12-
asn: Optional[IntelASN] = None
12+
asn: Optional[ASN] = None
1313

1414
count: Optional[float] = None
1515
"""Total results returned based on your search parameters."""

src/cloudflare/types/shared/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .asn import ASN as ASN
34
from .role import Role as Role
45
from .member import Member as Member
56
from .result import Result as Result
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33

4-
__all__ = ["IntelASN"]
54

6-
IntelASN = int
5+
6+
__all__ = ["ASN"]
7+
8+
ASN = int
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .asn import ASN as ASN
34
from .permission_grant import PermissionGrant as PermissionGrant
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
__all__ = ["ASN"]
6+
7+
ASN = int

0 commit comments

Comments
 (0)