Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): OpenAPI spec update via Stainless API #31

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 12
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-ca8da7974057afac39ab3f38dbd707d4db9ea11fa15d95061c82642ca4c79ef8.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-2aa0ec0ea99873da5dac6ecf610efdd6ccfe5601d2400f8c475d994cd47c2c36.yml
5 changes: 2 additions & 3 deletions src/writerai/resources/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from typing import List
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -42,7 +41,7 @@ def list(
*,
after: str | NotGiven = NOT_GIVEN,
before: str | NotGiven = NOT_GIVEN,
graph_id: List[str] | NotGiven = NOT_GIVEN,
graph_id: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
order: Literal["asc", "desc"] | 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 @@ -157,7 +156,7 @@ def list(
*,
after: str | NotGiven = NOT_GIVEN,
before: str | NotGiven = NOT_GIVEN,
graph_id: List[str] | NotGiven = NOT_GIVEN,
graph_id: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
order: Literal["asc", "desc"] | 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
3 changes: 1 addition & 2 deletions src/writerai/types/file_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from typing import List
from typing_extensions import Literal, TypedDict

__all__ = ["FileListParams"]
Expand All @@ -21,7 +20,7 @@ class FileListParams(TypedDict, total=False):
This parameter instructs the API to return the previous page of results.
"""

graph_id: List[str]
graph_id: str
"""The unique identifier of the graph to which the files belong."""

limit: int
Expand Down
12 changes: 2 additions & 10 deletions tests/api_resources/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ def test_method_list_with_all_params(self, client: Writer) -> None:
file = client.files.list(
after="after",
before="before",
graph_id=[
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
],
graph_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
limit=0,
order="asc",
)
Expand Down Expand Up @@ -115,11 +111,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncWriter) -> N
file = await async_client.files.list(
after="after",
before="before",
graph_id=[
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
],
graph_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
limit=0,
order="asc",
)
Expand Down