Skip to content

Commit

Permalink
feat(api): api update (#2223)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Nov 27, 2024
1 parent 3a31c57 commit bb1e9fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1436
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-83d644e928810036deb1b08729305b0adf41c6e1bfbb58e6427c999fdaa85eca.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8c1088ba96368f5f19f6d33654ae76942cfd4f0e3b7f418add2c67b01a6085dc.yml
8 changes: 8 additions & 0 deletions src/cloudflare/resources/ai_gateway/ai_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ def list(
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -249,6 +250,8 @@ def list(
order_by_direction: Order By Direction
search: Search by id
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -273,6 +276,7 @@ def list(
"order_by_direction": order_by_direction,
"page": page,
"per_page": per_page,
"search": search,
},
ai_gateway_list_params.AIGatewayListParams,
),
Expand Down Expand Up @@ -534,6 +538,7 @@ def list(
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -549,6 +554,8 @@ def list(
order_by_direction: Order By Direction
search: Search by id
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -573,6 +580,7 @@ def list(
"order_by_direction": order_by_direction,
"page": page,
"per_page": per_page,
"search": search,
},
ai_gateway_list_params.AIGatewayListParams,
),
Expand Down
3 changes: 3 additions & 0 deletions src/cloudflare/types/ai_gateway/ai_gateway_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ class AIGatewayListParams(TypedDict, total=False):
page: int

per_page: int

search: str
"""Search by id"""
2 changes: 2 additions & 0 deletions tests/api_resources/test_ai_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
order_by_direction="asc",
page=1,
per_page=1,
search="search",
)
assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"])

Expand Down Expand Up @@ -540,6 +541,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
order_by_direction="asc",
page=1,
per_page=1,
search="search",
)
assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"])

Expand Down

0 comments on commit bb1e9fe

Please sign in to comment.