Skip to content

Commit e2478c5

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#279)
1 parent 192ef64 commit e2478c5

File tree

7 files changed

+36
-23
lines changed

7 files changed

+36
-23
lines changed

api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7221,7 +7221,7 @@ Types:
72217221
```python
72227222
from cloudflare.types.cloudforce_one import (
72237223
Item,
7224-
List,
7224+
ListItem,
72257225
Quota,
72267226
RequestConstants,
72277227
RequestTypes,
@@ -7233,7 +7233,7 @@ Methods:
72337233

72347234
- <code title="post /accounts/{account_identifier}/cloudforce-one/requests/new">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">create</a>(account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/request_create_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/item.py">Item</a></code>
72357235
- <code title="put /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">update</a>(request_identifier, \*, account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/request_update_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/item.py">Item</a></code>
7236-
- <code title="post /accounts/{account_identifier}/cloudforce-one/requests">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">list</a>(account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/request_list_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/list.py">SyncV4PagePaginationArray[List]</a></code>
7236+
- <code title="post /accounts/{account_identifier}/cloudforce-one/requests">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">list</a>(account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/request_list_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/list_item.py">SyncV4PagePaginationArray[ListItem]</a></code>
72377237
- <code title="delete /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">delete</a>(request_identifier, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/request_delete_response.py">RequestDeleteResponse</a></code>
72387238
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/constants">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">constants</a>(account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/request_constants.py">RequestConstants</a></code>
72397239
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/{request_identifier}">client.cloudforce_one.requests.<a href="./src/cloudflare/resources/cloudforce_one/requests/requests.py">get</a>(request_identifier, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/item.py">Item</a></code>

src/cloudflare/resources/cloudforce_one/requests/requests.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, List, Type, Union, cast
5+
from typing import Any, Type, Union, cast
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -45,8 +45,8 @@
4545
)
4646
from ....types.cloudforce_one import (
4747
Item,
48-
List,
4948
Quota,
49+
ListItem,
5050
RequestTypes,
5151
RequestConstants,
5252
RequestDeleteResponse,
@@ -233,7 +233,7 @@ def list(
233233
extra_query: Query | None = None,
234234
extra_body: Body | None = None,
235235
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236-
) -> SyncV4PagePaginationArray[List]:
236+
) -> SyncV4PagePaginationArray[ListItem]:
237237
"""
238238
List Requests
239239
@@ -272,7 +272,7 @@ def list(
272272
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
273273
return self._get_api_list(
274274
f"/accounts/{account_identifier}/cloudforce-one/requests",
275-
page=SyncV4PagePaginationArray[List],
275+
page=SyncV4PagePaginationArray[ListItem],
276276
body=maybe_transform(
277277
{
278278
"page": page,
@@ -291,7 +291,7 @@ def list(
291291
options=make_request_options(
292292
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
293293
),
294-
model=List,
294+
model=ListItem,
295295
method="post",
296296
)
297297

@@ -681,7 +681,7 @@ def list(
681681
extra_query: Query | None = None,
682682
extra_body: Body | None = None,
683683
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
684-
) -> AsyncPaginator[List, AsyncV4PagePaginationArray[List]]:
684+
) -> AsyncPaginator[ListItem, AsyncV4PagePaginationArray[ListItem]]:
685685
"""
686686
List Requests
687687
@@ -720,7 +720,7 @@ def list(
720720
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
721721
return self._get_api_list(
722722
f"/accounts/{account_identifier}/cloudforce-one/requests",
723-
page=AsyncV4PagePaginationArray[List],
723+
page=AsyncV4PagePaginationArray[ListItem],
724724
body=maybe_transform(
725725
{
726726
"page": page,
@@ -739,7 +739,7 @@ def list(
739739
options=make_request_options(
740740
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
741741
),
742-
model=List,
742+
model=ListItem,
743743
method="post",
744744
)
745745

src/cloudflare/types/cloudforce_one/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from __future__ import annotations
44

55
from .item import Item as Item
6-
from .list import List as List
76
from .quota import Quota as Quota
7+
from .list_item import ListItem as ListItem
88
from .request_types import RequestTypes as RequestTypes
99
from .request_constants import RequestConstants as RequestConstants
1010
from .request_list_params import RequestListParams as RequestListParams

src/cloudflare/types/cloudforce_one/list.py src/cloudflare/types/cloudforce_one/list_item.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
3+
from typing import Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

77
from ..._models import BaseModel
88

9-
__all__ = ["List"]
9+
__all__ = ["ListItem"]
1010

1111

12-
class List(BaseModel):
12+
class ListItem(BaseModel):
1313
id: str
1414
"""UUID"""
1515

src/cloudflare/types/rules/lists/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from .list_item import ListItem as ListItem
56
from .list_cursor import ListCursor as ListCursor
67
from .item_list_params import ItemListParams as ItemListParams
78
from .operation_status import OperationStatus as OperationStatus
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
5+
from ...._models import BaseModel
6+
7+
__all__ = ["ListItem"]
8+
9+
10+
class ListItem(BaseModel):
11+
operation_id: Optional[str] = None
12+
"""The unique operation ID of the asynchronous action."""

tests/api_resources/cloudforce_one/test_requests.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
1414
from cloudflare.types.cloudforce_one import (
1515
Item,
16-
List,
1716
Quota,
17+
ListItem,
1818
RequestTypes,
1919
RequestConstants,
2020
RequestDeleteResponse,
@@ -155,7 +155,7 @@ def test_method_list(self, client: Cloudflare) -> None:
155155
page=0,
156156
per_page=10,
157157
)
158-
assert_matches_type(SyncV4PagePaginationArray[List], request, path=["response"])
158+
assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"])
159159

160160
@pytest.mark.skip()
161161
@parametrize
@@ -173,7 +173,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
173173
sort_order="asc",
174174
status="open",
175175
)
176-
assert_matches_type(SyncV4PagePaginationArray[List], request, path=["response"])
176+
assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"])
177177

178178
@pytest.mark.skip()
179179
@parametrize
@@ -187,7 +187,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
187187
assert response.is_closed is True
188188
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
189189
request = response.parse()
190-
assert_matches_type(SyncV4PagePaginationArray[List], request, path=["response"])
190+
assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"])
191191

192192
@pytest.mark.skip()
193193
@parametrize
@@ -201,7 +201,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
201201
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
202202

203203
request = response.parse()
204-
assert_matches_type(SyncV4PagePaginationArray[List], request, path=["response"])
204+
assert_matches_type(SyncV4PagePaginationArray[ListItem], request, path=["response"])
205205

206206
assert cast(Any, response.is_closed) is True
207207

@@ -578,7 +578,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
578578
page=0,
579579
per_page=10,
580580
)
581-
assert_matches_type(AsyncV4PagePaginationArray[List], request, path=["response"])
581+
assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"])
582582

583583
@pytest.mark.skip()
584584
@parametrize
@@ -596,7 +596,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
596596
sort_order="asc",
597597
status="open",
598598
)
599-
assert_matches_type(AsyncV4PagePaginationArray[List], request, path=["response"])
599+
assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"])
600600

601601
@pytest.mark.skip()
602602
@parametrize
@@ -610,7 +610,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
610610
assert response.is_closed is True
611611
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
612612
request = await response.parse()
613-
assert_matches_type(AsyncV4PagePaginationArray[List], request, path=["response"])
613+
assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"])
614614

615615
@pytest.mark.skip()
616616
@parametrize
@@ -624,7 +624,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
624624
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
625625

626626
request = await response.parse()
627-
assert_matches_type(AsyncV4PagePaginationArray[List], request, path=["response"])
627+
assert_matches_type(AsyncV4PagePaginationArray[ListItem], request, path=["response"])
628628

629629
assert cast(Any, response.is_closed) is True
630630

0 commit comments

Comments
 (0)