Skip to content

Commit

Permalink
feat(api): api update (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 19, 2024
1 parent 72da8d0 commit 89c7d18
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 69
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-9826c75ffb14d490923e03420eda5651ba07786b7d393709d91f6529f79f71e8.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-ba96a4f49e6eb2c6a60b5a452b7c60a50ab373ad44818fba7921dc842e20e56a.yml
6 changes: 5 additions & 1 deletion src/structify/resources/admin/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing import List, Optional

import httpx

Expand Down Expand Up @@ -52,6 +52,7 @@ def create(
*,
credit_count: Optional[int] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
feature_flags: Optional[List[str]] | NotGiven = NOT_GIVEN,
is_admin: bool | NotGiven = NOT_GIVEN,
test: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -84,6 +85,7 @@ def create(
{
"credit_count": credit_count,
"email": email,
"feature_flags": feature_flags,
"is_admin": is_admin,
"test": test,
},
Expand Down Expand Up @@ -138,6 +140,7 @@ async def create(
*,
credit_count: Optional[int] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
feature_flags: Optional[List[str]] | NotGiven = NOT_GIVEN,
is_admin: bool | NotGiven = NOT_GIVEN,
test: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -170,6 +173,7 @@ async def create(
{
"credit_count": credit_count,
"email": email,
"feature_flags": feature_flags,
"is_admin": is_admin,
"test": test,
},
Expand Down
4 changes: 3 additions & 1 deletion src/structify/types/admin/user.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing import List, Optional
from typing_extensions import Literal

from ..._models import BaseModel
Expand All @@ -11,4 +11,6 @@
class User(BaseModel):
email: str

feature_flags: Optional[List[str]] = None

user_type: Optional[Literal["Admin", "Public", "EndUser"]] = None
4 changes: 3 additions & 1 deletion src/structify/types/admin/user_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing import List, Optional
from typing_extensions import TypedDict

__all__ = ["UserCreateParams"]
Expand All @@ -13,6 +13,8 @@ class UserCreateParams(TypedDict, total=False):

email: Optional[str]

feature_flags: Optional[List[str]]

is_admin: bool

test: bool
2 changes: 2 additions & 0 deletions tests/api_resources/admin/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_method_create_with_all_params(self, client: Structify) -> None:
user = client.admin.users.create(
credit_count=0,
email="email",
feature_flags=["string"],
is_admin=True,
test=True,
)
Expand Down Expand Up @@ -92,6 +93,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncStructify)
user = await async_client.admin.users.create(
credit_count=0,
email="email",
feature_flags=["string"],
is_admin=True,
test=True,
)
Expand Down

0 comments on commit 89c7d18

Please sign in to comment.