From b44a10c973f17dc3fcc8637f6b027eb631abdd23 Mon Sep 17 00:00:00 2001 From: Matteo Ferrando Date: Thu, 14 Dec 2023 15:55:46 -0400 Subject: [PATCH] chore: update openapi client --- .../api/admin/handle_user_lock.py | 8 +--- ..._app_user_id_app_alias_or_id_status_get.py | 8 +--- .../api/billing/delete_payment_method.py | 12 ++--- .../api/billing/get_setup_intent_key.py | 8 +--- .../api/billing/get_user_price.py | 8 +--- .../api/billing/get_user_spending.py | 8 +--- .../api/billing/handle_stripe_webhook.py | 28 +++-------- .../api/billing/upcoming_invoice.py | 8 +--- .../api/billing/update_customer_budget.py | 8 +--- .../api/files/check_dir_hash.py | 12 ++--- .../openapi_fal_rest/api/files/delete.py | 8 +--- .../openapi_fal_rest/api/files/download.py | 8 +--- .../openapi_fal_rest/api/files/file_exists.py | 8 +--- .../api/files/upload_from_url.py | 8 +--- .../api/files/upload_local_file.py | 12 ++--- .../openapi_fal_rest/api/keys/create_key.py | 8 +--- .../openapi_fal_rest/api/keys/delete_key.py | 8 +--- .../api/tokens/create_token.py | 8 +--- .../get_gateway_request_stats_by_time.py | 48 +++---------------- .../api/usage/per_machine_usage_details.py | 4 +- .../models/body_upload_file.py | 5 +- .../models/body_upload_local_file.py | 5 +- ...ponse_get_gateway_request_stats_by_time.py | 20 ++------ .../models/grouped_usage_detail.py | 12 ++--- 24 files changed, 65 insertions(+), 205 deletions(-) diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/admin/handle_user_lock.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/admin/handle_user_lock.py index db3f2880..7b338387 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/admin/handle_user_lock.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/admin/handle_user_lock.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, str]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, str]]: if response.status_code == HTTPStatus.OK: response_200 = cast(str, response.json()) return response_200 @@ -54,9 +52,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, str]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, str]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/applications/get_status_applications_app_user_id_app_alias_or_id_status_get.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/applications/get_status_applications_app_user_id_app_alias_or_id_status_get.py index 9d4e7d70..646e6758 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/applications/get_status_applications_app_user_id_app_alias_or_id_status_get.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/applications/get_status_applications_app_user_id_app_alias_or_id_status_get.py @@ -33,9 +33,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, Status]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, Status]]: if response.status_code == HTTPStatus.OK: response_200 = Status.from_dict(response.json()) @@ -50,9 +48,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, Status]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, Status]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/delete_payment_method.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/delete_payment_method.py index f3b5213d..ddf0273d 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/delete_payment_method.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/delete_payment_method.py @@ -14,9 +14,7 @@ def _get_kwargs( *, client: Client, ) -> Dict[str, Any]: - url = "{}/billing/payment_methods/{payment_method_id}".format( - client.base_url, payment_method_id=payment_method_id - ) + url = "{}/billing/payment_methods/{payment_method_id}".format(client.base_url, payment_method_id=payment_method_id) headers: Dict[str, str] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -31,9 +29,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, bool]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, bool]]: if response.status_code == HTTPStatus.OK: response_200 = cast(bool, response.json()) return response_200 @@ -47,9 +43,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, bool]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, bool]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_setup_intent_key.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_setup_intent_key.py index d06419d8..a4eac7bb 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_setup_intent_key.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_setup_intent_key.py @@ -28,9 +28,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, str]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, str]]: if response.status_code == HTTPStatus.OK: response_200 = cast(str, response.json()) return response_200 @@ -44,9 +42,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, str]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, str]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_price.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_price.py index 87541013..84169cec 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_price.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_price.py @@ -41,9 +41,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, float]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, float]]: if response.status_code == HTTPStatus.OK: response_200 = cast(float, response.json()) return response_200 @@ -57,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, float]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, float]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_spending.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_spending.py index 88c7dee3..f9c81490 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_spending.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_spending.py @@ -47,9 +47,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, float]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, float]]: if response.status_code == HTTPStatus.OK: response_200 = cast(float, response.json()) return response_200 @@ -63,9 +61,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, float]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, float]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/handle_stripe_webhook.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/handle_stripe_webhook.py index aa937e7d..5a6288ec 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/handle_stripe_webhook.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/handle_stripe_webhook.py @@ -37,13 +37,9 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> Optional[ - Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook] -]: +) -> Optional[Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook]]: if response.status_code == HTTPStatus.OK: - response_200 = HandleStripeWebhookResponseHandleStripeWebhook.from_dict( - response.json() - ) + response_200 = HandleStripeWebhookResponseHandleStripeWebhook.from_dict(response.json()) return response_200 if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: @@ -58,9 +54,7 @@ def _parse_response( def _build_response( *, client: Client, response: httpx.Response -) -> Response[ - Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook] -]: +) -> Response[Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,9 +67,7 @@ def sync_detailed( *, client: Client, stripe_signature: Union[Unset, str] = UNSET, -) -> Response[ - Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook] -]: +) -> Response[Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook]]: """Handle Stripe Webhook Args: @@ -106,9 +98,7 @@ def sync( *, client: Client, stripe_signature: Union[Unset, str] = UNSET, -) -> Optional[ - Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook] -]: +) -> Optional[Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook]]: """Handle Stripe Webhook Args: @@ -132,9 +122,7 @@ async def asyncio_detailed( *, client: Client, stripe_signature: Union[Unset, str] = UNSET, -) -> Response[ - Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook] -]: +) -> Response[Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook]]: """Handle Stripe Webhook Args: @@ -163,9 +151,7 @@ async def asyncio( *, client: Client, stripe_signature: Union[Unset, str] = UNSET, -) -> Optional[ - Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook] -]: +) -> Optional[Union[HTTPValidationError, HandleStripeWebhookResponseHandleStripeWebhook]]: """Handle Stripe Webhook Args: diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/upcoming_invoice.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/upcoming_invoice.py index 08343199..c6c01964 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/upcoming_invoice.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/upcoming_invoice.py @@ -29,9 +29,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, Invoice]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, Invoice]]: if response.status_code == HTTPStatus.OK: response_200 = Invoice.from_dict(response.json()) @@ -46,9 +44,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, Invoice]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, Invoice]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/update_customer_budget.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/update_customer_budget.py index b43de544..de5d1bbf 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/update_customer_budget.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/billing/update_customer_budget.py @@ -38,9 +38,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, HTTPValidationError]]: if response.status_code == HTTPStatus.OK: response_200 = cast(Any, response.json()) return response_200 @@ -54,9 +52,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, HTTPValidationError]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py index 54c3537c..6ec7a76d 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py @@ -16,9 +16,7 @@ def _get_kwargs( client: Client, json_body: HashCheck, ) -> Dict[str, Any]: - url = "{}/files/dir/check_hash/{target_path}".format( - client.base_url, target_path=target_path - ) + url = "{}/files/dir/check_hash/{target_path}".format(client.base_url, target_path=target_path) headers: Dict[str, str] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,9 +34,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, bool]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, bool]]: if response.status_code == HTTPStatus.OK: response_200 = cast(bool, response.json()) return response_200 @@ -52,9 +48,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, bool]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, bool]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/delete.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/delete.py index cf9cf737..7d369487 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/delete.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/delete.py @@ -29,9 +29,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, bool]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, bool]]: if response.status_code == HTTPStatus.OK: response_200 = cast(bool, response.json()) return response_200 @@ -45,9 +43,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, bool]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, bool]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/download.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/download.py index fd55f372..080e6115 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/download.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/download.py @@ -29,9 +29,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, HTTPValidationError]]: if response.status_code == HTTPStatus.OK: response_200 = cast(Any, response.json()) return response_200 @@ -45,9 +43,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, HTTPValidationError]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/file_exists.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/file_exists.py index f5ee03ca..c54b608b 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/file_exists.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/file_exists.py @@ -37,9 +37,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[FileSpec, HTTPValidationError]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[FileSpec, HTTPValidationError]]: if response.status_code == HTTPStatus.OK: response_200 = FileSpec.from_dict(response.json()) @@ -54,9 +52,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[FileSpec, HTTPValidationError]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[FileSpec, HTTPValidationError]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_from_url.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_from_url.py index 6d263a1b..333a05e8 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_from_url.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_from_url.py @@ -34,9 +34,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, bool]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, bool]]: if response.status_code == HTTPStatus.OK: response_200 = cast(bool, response.json()) return response_200 @@ -50,9 +48,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, bool]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, bool]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py index 562e5a94..4e57b78a 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py @@ -17,9 +17,7 @@ def _get_kwargs( multipart_data: BodyUploadLocalFile, unzip: Union[Unset, None, bool] = False, ) -> Dict[str, Any]: - url = "{}/files/file/local/{target_path}".format( - client.base_url, target_path=target_path - ) + url = "{}/files/file/local/{target_path}".format(client.base_url, target_path=target_path) headers: Dict[str, str] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -43,9 +41,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, bool]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, bool]]: if response.status_code == HTTPStatus.OK: response_200 = cast(bool, response.json()) return response_200 @@ -59,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, bool]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, bool]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/create_key.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/create_key.py index 16405163..5320abff 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/create_key.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/create_key.py @@ -42,9 +42,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, NewUserKey]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, NewUserKey]]: if response.status_code == HTTPStatus.CREATED: response_201 = NewUserKey.from_dict(response.json()) @@ -59,9 +57,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, NewUserKey]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, NewUserKey]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/delete_key.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/delete_key.py index 43f1c80b..6539f8ce 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/delete_key.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/keys/delete_key.py @@ -29,9 +29,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[Any, HTTPValidationError]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, HTTPValidationError]]: if response.status_code == HTTPStatus.NO_CONTENT: response_204 = cast(Any, None) return response_204 @@ -45,9 +43,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[Any, HTTPValidationError]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, HTTPValidationError]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/tokens/create_token.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/tokens/create_token.py index 49c6d586..0d286f24 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/tokens/create_token.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/tokens/create_token.py @@ -33,9 +33,7 @@ def _get_kwargs( } -def _parse_response( - *, client: Client, response: httpx.Response -) -> Optional[Union[HTTPValidationError, str]]: +def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[HTTPValidationError, str]]: if response.status_code == HTTPStatus.CREATED: response_201 = cast(str, response.json()) return response_201 @@ -49,9 +47,7 @@ def _parse_response( return None -def _build_response( - *, client: Client, response: httpx.Response -) -> Response[Union[HTTPValidationError, str]]: +def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[HTTPValidationError, str]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/get_gateway_request_stats_by_time.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/get_gateway_request_stats_by_time.py index ac07e91d..2394f111 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/get_gateway_request_stats_by_time.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/get_gateway_request_stats_by_time.py @@ -64,18 +64,9 @@ def _get_kwargs( def _parse_response( *, client: Client, response: httpx.Response -) -> Optional[ - Union[ - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, - HTTPValidationError, - ] -]: +) -> Optional[Union[GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, HTTPValidationError]]: if response.status_code == HTTPStatus.OK: - response_200 = ( - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime.from_dict( - response.json() - ) - ) + response_200 = GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime.from_dict(response.json()) return response_200 if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY: @@ -90,12 +81,7 @@ def _parse_response( def _build_response( *, client: Client, response: httpx.Response -) -> Response[ - Union[ - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, - HTTPValidationError, - ] -]: +) -> Response[Union[GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, HTTPValidationError]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -111,12 +97,7 @@ def sync_detailed( end_time: datetime.datetime, timeframe: StatsTimeframe, app_aliases: Union[Unset, None, List[str]] = UNSET, -) -> Response[ - Union[ - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, - HTTPValidationError, - ] -]: +) -> Response[Union[GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, HTTPValidationError]]: """Get Gateway Request Stats By Time Args: @@ -156,12 +137,7 @@ def sync( end_time: datetime.datetime, timeframe: StatsTimeframe, app_aliases: Union[Unset, None, List[str]] = UNSET, -) -> Optional[ - Union[ - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, - HTTPValidationError, - ] -]: +) -> Optional[Union[GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, HTTPValidationError]]: """Get Gateway Request Stats By Time Args: @@ -194,12 +170,7 @@ async def asyncio_detailed( end_time: datetime.datetime, timeframe: StatsTimeframe, app_aliases: Union[Unset, None, List[str]] = UNSET, -) -> Response[ - Union[ - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, - HTTPValidationError, - ] -]: +) -> Response[Union[GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, HTTPValidationError]]: """Get Gateway Request Stats By Time Args: @@ -237,12 +208,7 @@ async def asyncio( end_time: datetime.datetime, timeframe: StatsTimeframe, app_aliases: Union[Unset, None, List[str]] = UNSET, -) -> Optional[ - Union[ - GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, - HTTPValidationError, - ] -]: +) -> Optional[Union[GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime, HTTPValidationError]]: """Get Gateway Request Stats By Time Args: diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/per_machine_usage_details.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/per_machine_usage_details.py index 0c18a018..79a8059c 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/per_machine_usage_details.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/api/usage/per_machine_usage_details.py @@ -15,9 +15,7 @@ def _get_kwargs( *, client: Client, ) -> Dict[str, Any]: - url = "{}/usage/machine_type/{machine_type}".format( - client.base_url, machine_type=machine_type - ) + url = "{}/usage/machine_type/{machine_type}".format(client.base_url, machine_type=machine_type) headers: Dict[str, str] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_file.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_file.py index 9af21068..c5c822ff 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_file.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_file.py @@ -36,10 +36,7 @@ def to_multipart(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update( - { - key: (None, str(value).encode(), "text/plain") - for key, value in self.additional_properties.items() - } + {key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()} ) field_dict.update( { diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py index ba52be5a..d2500fbb 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py @@ -36,10 +36,7 @@ def to_multipart(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update( - { - key: (None, str(value).encode(), "text/plain") - for key, value in self.additional_properties.items() - } + {key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()} ) field_dict.update( { diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time.py index 230482ba..e665c5c6 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time.py @@ -6,18 +6,14 @@ from ..models.gateway_stats_by_time import GatewayStatsByTime -T = TypeVar( - "T", bound="GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime" -) +T = TypeVar("T", bound="GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime") @attr.s(auto_attribs=True) class GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime: """ """ - additional_properties: Dict[str, List["GatewayStatsByTime"]] = attr.ib( - init=False, factory=dict - ) + additional_properties: Dict[str, List["GatewayStatsByTime"]] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: pass @@ -39,18 +35,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.gateway_stats_by_time import GatewayStatsByTime d = src_dict.copy() - get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time = ( - cls() - ) + get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time = cls() additional_properties = {} for prop_name, prop_dict in d.items(): additional_property = [] _additional_property = prop_dict for additional_property_item_data in _additional_property: - additional_property_item = GatewayStatsByTime.from_dict( - additional_property_item_data - ) + additional_property_item = GatewayStatsByTime.from_dict(additional_property_item_data) additional_property.append(additional_property_item) @@ -59,9 +51,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time.additional_properties = ( additional_properties ) - return ( - get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time - ) + return get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time @property def additional_keys(self) -> List[str]: diff --git a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/grouped_usage_detail.py b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/grouped_usage_detail.py index dc853212..8fda8b53 100644 --- a/projects/fal/openapi-fal-rest/openapi_fal_rest/models/grouped_usage_detail.py +++ b/projects/fal/openapi-fal-rest/openapi_fal_rest/models/grouped_usage_detail.py @@ -12,14 +12,14 @@ class GroupedUsageDetail: model_id (str): machine_type (str): request_count (int): - avg_duration (float): + median_duration (float): total_duration (float): """ model_id: str machine_type: str request_count: int - avg_duration: float + median_duration: float total_duration: float additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -27,7 +27,7 @@ def to_dict(self) -> Dict[str, Any]: model_id = self.model_id machine_type = self.machine_type request_count = self.request_count - avg_duration = self.avg_duration + median_duration = self.median_duration total_duration = self.total_duration field_dict: Dict[str, Any] = {} @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]: "model_id": model_id, "machine_type": machine_type, "request_count": request_count, - "avg_duration": avg_duration, + "median_duration": median_duration, "total_duration": total_duration, } ) @@ -53,7 +53,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: request_count = d.pop("request_count") - avg_duration = d.pop("avg_duration") + median_duration = d.pop("median_duration") total_duration = d.pop("total_duration") @@ -61,7 +61,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: model_id=model_id, machine_type=machine_type, request_count=request_count, - avg_duration=avg_duration, + median_duration=median_duration, total_duration=total_duration, )