Skip to content

feat(api): api update #2160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1381
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-34e58184c8582fbfa6e469d190a541a701067980fa9d9158ed1ffc1eed88d681.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d6dc39cc9dc12992f205f2436d49fb9c8b2e58090dfbbfbeec2d431ab75349a7.yml
12 changes: 4 additions & 8 deletions src/cloudflare/resources/ai_gateway/ai_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def list(
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
Expand All @@ -246,8 +245,6 @@ def list(
List Gateways

Args:
id: gateway id

order_by: Order By Column Name

order_by_direction: Order By Direction
Expand All @@ -272,7 +269,6 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"id": id,
"order_by": order_by,
"order_by_direction": order_by_direction,
"page": page,
Expand Down Expand Up @@ -300,6 +296,8 @@ def delete(
Delete a Gateway

Args:
id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -532,7 +530,6 @@ def list(
self,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
Expand All @@ -548,8 +545,6 @@ def list(
List Gateways

Args:
id: gateway id

order_by: Order By Column Name

order_by_direction: Order By Direction
Expand All @@ -574,7 +569,6 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"id": id,
"order_by": order_by,
"order_by_direction": order_by_direction,
"page": page,
Expand Down Expand Up @@ -602,6 +596,8 @@ async def delete(
Delete a Gateway

Args:
id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
28 changes: 20 additions & 8 deletions src/cloudflare/resources/ai_gateway/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def create(
Create a new Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -124,6 +126,8 @@ def update(
Update a Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -163,9 +167,7 @@ def list(
gateway_id: str,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
enable: bool | NotGiven = NOT_GIVEN,
filters: Iterable[dataset_list_params.Filter] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
Expand All @@ -183,6 +185,8 @@ def list(
List Datasets

Args:
gateway_id: gateway id

order_by: Order By Column Name

order_by_direction: Order By Direction
Expand Down Expand Up @@ -211,9 +215,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"id": id,
"enable": enable,
"filters": filters,
"name": name,
"order_by": order_by,
"order_by_direction": order_by_direction,
Expand Down Expand Up @@ -244,6 +246,8 @@ def delete(
Delete a Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -287,6 +291,8 @@ def get(
Fetch a Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -353,6 +359,8 @@ async def create(
Create a new Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -405,6 +413,8 @@ async def update(
Update a Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -444,9 +454,7 @@ def list(
gateway_id: str,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
enable: bool | NotGiven = NOT_GIVEN,
filters: Iterable[dataset_list_params.Filter] | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
Expand All @@ -464,6 +472,8 @@ def list(
List Datasets

Args:
gateway_id: gateway id

order_by: Order By Column Name

order_by_direction: Order By Direction
Expand Down Expand Up @@ -492,9 +502,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"id": id,
"enable": enable,
"filters": filters,
"name": name,
"order_by": order_by,
"order_by_direction": order_by_direction,
Expand Down Expand Up @@ -525,6 +533,8 @@ async def delete(
Delete a Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -568,6 +578,8 @@ async def get(
Fetch a Dataset

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
40 changes: 24 additions & 16 deletions src/cloudflare/resources/ai_gateway/evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> EvaluationCreateResponse:
"""
Create a new Evaluations
Create a new Evaluation

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -108,15 +110,13 @@ def list(
gateway_id: str,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
processed: bool | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
total_logs: float | 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 @@ -125,9 +125,11 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncV4PagePaginationArray[EvaluationListResponse]:
"""
List Evaluationss
List Evaluations

Args:
gateway_id: gateway id

order_by: Order By Column Name

order_by_direction: Order By Direction
Expand Down Expand Up @@ -156,15 +158,13 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"id": id,
"name": name,
"order_by": order_by,
"order_by_direction": order_by_direction,
"page": page,
"per_page": per_page,
"processed": processed,
"search": search,
"total_logs": total_logs,
},
evaluation_list_params.EvaluationListParams,
),
Expand All @@ -186,9 +186,11 @@ def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> EvaluationDeleteResponse:
"""
Delete a Evaluations
Delete a Evaluation

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -229,9 +231,11 @@ def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> EvaluationGetResponse:
"""
Fetch a Evaluations
Fetch a Evaluation

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -295,9 +299,11 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> EvaluationCreateResponse:
"""
Create a new Evaluations
Create a new Evaluation

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -335,15 +341,13 @@ def list(
gateway_id: str,
*,
account_id: str,
id: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
order_by: str | NotGiven = NOT_GIVEN,
order_by_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
processed: bool | NotGiven = NOT_GIVEN,
search: str | NotGiven = NOT_GIVEN,
total_logs: float | 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 @@ -352,9 +356,11 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[EvaluationListResponse, AsyncV4PagePaginationArray[EvaluationListResponse]]:
"""
List Evaluationss
List Evaluations

Args:
gateway_id: gateway id

order_by: Order By Column Name

order_by_direction: Order By Direction
Expand Down Expand Up @@ -383,15 +389,13 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"id": id,
"name": name,
"order_by": order_by,
"order_by_direction": order_by_direction,
"page": page,
"per_page": per_page,
"processed": processed,
"search": search,
"total_logs": total_logs,
},
evaluation_list_params.EvaluationListParams,
),
Expand All @@ -413,9 +417,11 @@ async def delete(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> EvaluationDeleteResponse:
"""
Delete a Evaluations
Delete a Evaluation

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -456,9 +462,11 @@ async def get(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> EvaluationGetResponse:
"""
Fetch a Evaluations
Fetch a Evaluation

Args:
gateway_id: gateway id

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
3 changes: 0 additions & 3 deletions src/cloudflare/types/ai_gateway/ai_gateway_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
class AIGatewayListParams(TypedDict, total=False):
account_id: Required[str]

id: str
"""gateway id"""

order_by: str
"""Order By Column Name"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class DatasetCreateResponse(BaseModel):
filters: List[Filter]

gateway_id: str
"""gateway id"""

modified_at: datetime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class DatasetDeleteResponse(BaseModel):
filters: List[Filter]

gateway_id: str
"""gateway id"""

modified_at: datetime

Expand Down
Loading