From 111b884961218efc991964499e61ce4c9333f7b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 02:12:04 +0000 Subject: [PATCH] feat(api): api update (#732) --- .stats.yml | 2 +- src/structify/resources/admin/users.py | 50 ++++++++++++-------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6956f836..91dd2a5d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-ba96a4f49e6eb2c6a60b5a452b7c60a50ab373ad44818fba7921dc842e20e56a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-f3209b903a708d713a30c384f8c2bcbec38426785f7cca5fb3482966a36b4412.yml diff --git a/src/structify/resources/admin/users.py b/src/structify/resources/admin/users.py index ac9c9c33..d5c3041b 100644 --- a/src/structify/resources/admin/users.py +++ b/src/structify/resources/admin/users.py @@ -76,21 +76,18 @@ def create( """ return self._post( "/admin/users/create", + body=maybe_transform( + { + "credit_count": credit_count, + "email": email, + "feature_flags": feature_flags, + "is_admin": is_admin, + "test": test, + }, + user_create_params.UserCreateParams, + ), options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "credit_count": credit_count, - "email": email, - "feature_flags": feature_flags, - "is_admin": is_admin, - "test": test, - }, - user_create_params.UserCreateParams, - ), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), cast_to=TokenResponse, ) @@ -164,21 +161,18 @@ async def create( """ return await self._post( "/admin/users/create", + body=await async_maybe_transform( + { + "credit_count": credit_count, + "email": email, + "feature_flags": feature_flags, + "is_admin": is_admin, + "test": test, + }, + user_create_params.UserCreateParams, + ), options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "credit_count": credit_count, - "email": email, - "feature_flags": feature_flags, - "is_admin": is_admin, - "test": test, - }, - user_create_params.UserCreateParams, - ), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), cast_to=TokenResponse, )