Skip to content

Commit e704323

Browse files
docs(api): updates to API spec
1 parent 2016cda commit e704323

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 32
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-07dea48ea85e600712dcdfd99a688f6a9cb8dd1f56d0a06e0ab54fc8a98a89b1.yml
3-
openapi_spec_hash: 0d30ab04c227bf53f3109dc4d861e5dc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-86cece3af9ac57e8d575e7e1a9fbb834f7ea6a635267ba6e1a87f277293d8e85.yml
3+
openapi_spec_hash: 3e7e420d10e8ad4a68db3c0877e7c949
44
config_hash: c0c9f57ab19252f82cf765939edc61de

src/writerai/resources/files.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def list(
9393
*,
9494
after: str | NotGiven = NOT_GIVEN,
9595
before: str | NotGiven = NOT_GIVEN,
96+
file_type: str | NotGiven = NOT_GIVEN,
9697
graph_id: str | NotGiven = NOT_GIVEN,
9798
limit: int | NotGiven = NOT_GIVEN,
9899
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
@@ -115,6 +116,9 @@ def list(
115116
before: The ID of the first object in the previous page. This parameter instructs the
116117
API to return the previous page of results.
117118
119+
file_type: The extensions of the files to retrieve. Separate multiple extensions with a
120+
comma. For example: `pdf,jpg,docx`.
121+
118122
graph_id: The unique identifier of the graph to which the files belong.
119123
120124
limit: Specifies the maximum number of objects returned in a page. The default value
@@ -146,6 +150,7 @@ def list(
146150
{
147151
"after": after,
148152
"before": before,
153+
"file_type": file_type,
149154
"graph_id": graph_id,
150155
"limit": limit,
151156
"order": order,
@@ -356,6 +361,7 @@ def list(
356361
*,
357362
after: str | NotGiven = NOT_GIVEN,
358363
before: str | NotGiven = NOT_GIVEN,
364+
file_type: str | NotGiven = NOT_GIVEN,
359365
graph_id: str | NotGiven = NOT_GIVEN,
360366
limit: int | NotGiven = NOT_GIVEN,
361367
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
@@ -378,6 +384,9 @@ def list(
378384
before: The ID of the first object in the previous page. This parameter instructs the
379385
API to return the previous page of results.
380386
387+
file_type: The extensions of the files to retrieve. Separate multiple extensions with a
388+
comma. For example: `pdf,jpg,docx`.
389+
381390
graph_id: The unique identifier of the graph to which the files belong.
382391
383392
limit: Specifies the maximum number of objects returned in a page. The default value
@@ -409,6 +418,7 @@ def list(
409418
{
410419
"after": after,
411420
"before": before,
421+
"file_type": file_type,
412422
"graph_id": graph_id,
413423
"limit": limit,
414424
"order": order,

src/writerai/types/file_list_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ class FileListParams(TypedDict, total=False):
2020
This parameter instructs the API to return the previous page of results.
2121
"""
2222

23+
file_type: str
24+
"""The extensions of the files to retrieve.
25+
26+
Separate multiple extensions with a comma. For example: `pdf,jpg,docx`.
27+
"""
28+
2329
graph_id: str
2430
"""The unique identifier of the graph to which the files belong."""
2531

tests/api_resources/test_files.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def test_method_list_with_all_params(self, client: Writer) -> None:
7878
file = client.files.list(
7979
after="after",
8080
before="before",
81+
file_type="file_type",
8182
graph_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
8283
limit=0,
8384
order="asc",
@@ -320,6 +321,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncWriter) -> N
320321
file = await async_client.files.list(
321322
after="after",
322323
before="before",
324+
file_type="file_type",
323325
graph_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
324326
limit=0,
325327
order="asc",

0 commit comments

Comments
 (0)