Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 22, 2024
1 parent dac6964 commit 08b81ed
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 23 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: 38
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/plastic-labs%2Fhoncho-a370506bdacaf58567fea52cb6312d99b0e211dd67c8d1ffb896fcf6abfee16b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/plastic-labs%2Fhoncho-9c3f3823cc0decee65ba1dd592f62942ba230629e291b01f5b6e8b6088dd87c1.yml
6 changes: 3 additions & 3 deletions src/honcho/resources/apps/apps.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 Dict, Optional

import httpx

Expand Down Expand Up @@ -54,7 +54,7 @@ def create(
self,
*,
name: str,
metadata: Optional[object] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, object]] | 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 Down Expand Up @@ -269,7 +269,7 @@ async def create(
self,
*,
name: str,
metadata: Optional[object] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, object]] | 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 Down
10 changes: 5 additions & 5 deletions src/honcho/resources/apps/users/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 Dict, Optional

import httpx

Expand Down Expand Up @@ -70,7 +70,7 @@ def create(
app_id: str,
*,
name: str,
metadata: Optional[object] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, object]] | 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 Down Expand Up @@ -117,7 +117,7 @@ def update(
user_id: str,
*,
app_id: str,
metadata: Optional[object] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN,
name: Optional[str] | 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 Down Expand Up @@ -371,7 +371,7 @@ async def create(
app_id: str,
*,
name: str,
metadata: Optional[object] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, object]] | 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 Down Expand Up @@ -418,7 +418,7 @@ async def update(
user_id: str,
*,
app_id: str,
metadata: Optional[object] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN,
name: Optional[str] | 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 Down
3 changes: 2 additions & 1 deletion src/honcho/types/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict
from datetime import datetime

from .._models import BaseModel
Expand All @@ -12,6 +13,6 @@ class App(BaseModel):

created_at: datetime

metadata: object
metadata: Dict[str, object]

name: str
4 changes: 2 additions & 2 deletions src/honcho/types/app_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 Dict, Optional
from typing_extensions import Required, TypedDict

__all__ = ["AppCreateParams"]
Expand All @@ -11,4 +11,4 @@
class AppCreateParams(TypedDict, total=False):
name: Required[str]

metadata: Optional[object]
metadata: Optional[Dict[str, object]]
3 changes: 2 additions & 1 deletion src/honcho/types/apps/user.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict
from datetime import datetime

from ..._models import BaseModel
Expand All @@ -14,6 +15,6 @@ class User(BaseModel):

created_at: datetime

metadata: object
metadata: Dict[str, object]

name: str
4 changes: 2 additions & 2 deletions src/honcho/types/apps/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 Dict, Optional
from typing_extensions import Required, TypedDict

__all__ = ["UserCreateParams"]
Expand All @@ -11,4 +11,4 @@
class UserCreateParams(TypedDict, total=False):
name: Required[str]

metadata: Optional[object]
metadata: Optional[Dict[str, object]]
4 changes: 2 additions & 2 deletions src/honcho/types/apps/user_update_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 Dict, Optional
from typing_extensions import Required, TypedDict

__all__ = ["UserUpdateParams"]
Expand All @@ -11,6 +11,6 @@
class UserUpdateParams(TypedDict, total=False):
app_id: Required[str]

metadata: Optional[object]
metadata: Optional[Dict[str, object]]

name: Optional[str]
8 changes: 4 additions & 4 deletions tests/api_resources/apps/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_method_create_with_all_params(self, client: Honcho) -> None:
user = client.apps.users.create(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
name="string",
metadata={},
metadata={"foo": "bar"},
)
assert_matches_type(User, user, path=["response"])

Expand Down Expand Up @@ -82,7 +82,7 @@ def test_method_update_with_all_params(self, client: Honcho) -> None:
user = client.apps.users.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
app_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
metadata={},
metadata={"foo": "bar"},
name="string",
)
assert_matches_type(User, user, path=["response"])
Expand Down Expand Up @@ -337,7 +337,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncHoncho) ->
user = await async_client.apps.users.create(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
name="string",
metadata={},
metadata={"foo": "bar"},
)
assert_matches_type(User, user, path=["response"])

Expand Down Expand Up @@ -388,7 +388,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncHoncho) ->
user = await async_client.apps.users.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
app_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
metadata={},
metadata={"foo": "bar"},
name="string",
)
assert_matches_type(User, user, path=["response"])
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/test_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_method_create(self, client: Honcho) -> None:
def test_method_create_with_all_params(self, client: Honcho) -> None:
app = client.apps.create(
name="string",
metadata={},
metadata={"foo": "bar"},
)
assert_matches_type(App, app, path=["response"])

Expand Down Expand Up @@ -232,7 +232,7 @@ async def test_method_create(self, async_client: AsyncHoncho) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncHoncho) -> None:
app = await async_client.apps.create(
name="string",
metadata={},
metadata={"foo": "bar"},
)
assert_matches_type(App, app, path=["response"])

Expand Down

0 comments on commit 08b81ed

Please sign in to comment.