Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jul 12, 2024
1 parent 6205968 commit 90e8984
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 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: 12
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-5ec9075c9a60b855ae0ac9907a6c2a4c6216fb2087d8d47125aec013ebc5f3d5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-ca8da7974057afac39ab3f38dbd707d4db9ea11fa15d95061c82642ca4c79ef8.yml
5 changes: 3 additions & 2 deletions src/writerai/resources/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import List
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -41,7 +42,7 @@ def list(
*,
after: str | NotGiven = NOT_GIVEN,
before: str | NotGiven = NOT_GIVEN,
graph_id: str | NotGiven = NOT_GIVEN,
graph_id: List[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 @@ -156,7 +157,7 @@ def list(
*,
after: str | NotGiven = NOT_GIVEN,
before: str | NotGiven = NOT_GIVEN,
graph_id: str | NotGiven = NOT_GIVEN,
graph_id: List[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: 2 additions & 1 deletion src/writerai/types/file_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import List
from typing_extensions import Literal, TypedDict

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

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

limit: int
Expand Down
12 changes: 10 additions & 2 deletions tests/api_resources/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ 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",
graph_id=[
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
],
limit=0,
order="asc",
)
Expand Down Expand Up @@ -111,7 +115,11 @@ 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",
graph_id=[
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
],
limit=0,
order="asc",
)
Expand Down

0 comments on commit 90e8984

Please sign in to comment.