Skip to content

Commit

Permalink
feat(api): api update (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 15, 2025
1 parent e5feac3 commit c898d59
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 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: 71
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-1d9e75129793e68b316a1e185b6fbfa934ef5ac774d1e2453f6a86d8964eeb22.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-a3d40078d5e3218e71c847061bac29f1234b67b1558424be994882a9fa147a78.yml
8 changes: 4 additions & 4 deletions src/structify/resources/admin/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def create(
*,
credit_count: Optional[int] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
feature_flags: Optional[List[Literal["pdf_parsing", "labeler", "none"]]] | NotGiven = NOT_GIVEN,
is_admin: bool | NotGiven = NOT_GIVEN,
permission: Optional[List[Literal["pdf_parsing", "labeler", "none"]]] | 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.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -81,8 +81,8 @@ def create(
{
"credit_count": credit_count,
"email": email,
"feature_flags": feature_flags,
"is_admin": is_admin,
"permission": permission,
"test": test,
},
user_create_params.UserCreateParams,
Expand Down Expand Up @@ -138,8 +138,8 @@ async def create(
*,
credit_count: Optional[int] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
feature_flags: Optional[List[Literal["pdf_parsing", "labeler", "none"]]] | NotGiven = NOT_GIVEN,
is_admin: bool | NotGiven = NOT_GIVEN,
permission: Optional[List[Literal["pdf_parsing", "labeler", "none"]]] | 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.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -166,8 +166,8 @@ async def create(
{
"credit_count": credit_count,
"email": email,
"feature_flags": feature_flags,
"is_admin": is_admin,
"permission": permission,
"test": test,
},
user_create_params.UserCreateParams,
Expand Down
2 changes: 1 addition & 1 deletion src/structify/types/admin/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
class User(BaseModel):
email: str

feature_flags: Optional[List[Literal["pdf_parsing", "labeler", "none"]]] = None
permissions: Optional[List[Literal["pdf_parsing", "labeler", "none"]]] = None

user_type: Optional[Literal["Admin", "Public", "EndUser"]] = None
4 changes: 2 additions & 2 deletions src/structify/types/admin/user_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class UserCreateParams(TypedDict, total=False):

email: Optional[str]

feature_flags: Optional[List[Literal["pdf_parsing", "labeler", "none"]]]

is_admin: bool

permission: Optional[List[Literal["pdf_parsing", "labeler", "none"]]]

test: bool
4 changes: 4 additions & 0 deletions src/structify/types/token_response.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List
from typing_extensions import Literal

from .._models import BaseModel

Expand All @@ -8,3 +10,5 @@

class TokenResponse(BaseModel):
token: str

permissions: List[Literal["pdf_parsing", "labeler", "none"]]
4 changes: 2 additions & 2 deletions tests/api_resources/admin/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def test_method_create_with_all_params(self, client: Structify) -> None:
user = client.admin.users.create(
credit_count=0,
email="email",
feature_flags=["pdf_parsing"],
is_admin=True,
permission=["pdf_parsing"],
test=True,
)
assert_matches_type(TokenResponse, user, path=["response"])
Expand Down Expand Up @@ -93,8 +93,8 @@ 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=["pdf_parsing"],
is_admin=True,
permission=["pdf_parsing"],
test=True,
)
assert_matches_type(TokenResponse, user, path=["response"])
Expand Down

0 comments on commit c898d59

Please sign in to comment.