Skip to content

Commit cf521a7

Browse files
release: 2.3.0-rc.1 (#230)
* docs(api): updates to API spec * chore(internal): remove redundant imports config * chore(internal): move publish config * chore: update @stainless-api/prism-cli to v5.15.0 * chore(internal): update comment in script * docs(api): updates to API spec * docs(api): updates to API spec * codegen metadata * codegen metadata * feat(api): add web KG and web search * release: 2.3.0-rc.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 9d38d02 commit cf521a7

28 files changed

Lines changed: 1038 additions & 91 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.2.1"
2+
".": "2.3.0-rc.1"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 32
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-fab7a71148b6f413a4425ca9f2ce3d42557b65d35ab28c6f64daa7fce6d0ffe2.yml
3-
openapi_spec_hash: 0ead6944545bc40172176e15cc704633
4-
config_hash: c0c9f57ab19252f82cf765939edc61de
1+
configured_endpoints: 33
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-0bbaae2a69204cb3ccf6dc4fbb0cef810a4e8c78f09ac639e253e84df0add53a.yml
3+
openapi_spec_hash: 0a9be554ca3af860e3831bd776e50f56
4+
config_hash: 7a38bab086b53b43d2a719cb4d883264

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Changelog
22

3+
## 2.3.0-rc.1 (2025-08-12)
4+
5+
Full Changelog: [v2.2.1...v2.3.0-rc.1](https://github.com/writer/writer-node/compare/v2.2.1...v2.3.0-rc.1)
6+
7+
### Features
8+
9+
* **api:** add web KG and web search ([aec5c23](https://github.com/writer/writer-node/commit/aec5c23cad2e5bac761f25bc494de4d22d74ed76))
10+
11+
12+
### Chores
13+
14+
* **internal:** move publish config ([549fdb5](https://github.com/writer/writer-node/commit/549fdb505cd153213fd710af88e4f3661b058cc4))
15+
* **internal:** remove redundant imports config ([629582b](https://github.com/writer/writer-node/commit/629582b9916e249ff314002fe84ff43ee2eebe26))
16+
* **internal:** update comment in script ([0cbef20](https://github.com/writer/writer-node/commit/0cbef206554b08c09a77d1b935b3a7130f97bb98))
17+
* update @stainless-api/prism-cli to v5.15.0 ([4eb486f](https://github.com/writer/writer-node/commit/4eb486fddcf185c23e0e4d41d8e27fa65a284ef6))
18+
19+
20+
### Documentation
21+
22+
* **api:** updates to API spec ([1bcdf1c](https://github.com/writer/writer-node/commit/1bcdf1ccce44d6e5ba0aaf41c7bde1fadf1b9cf1))
23+
* **api:** updates to API spec ([b7625d0](https://github.com/writer/writer-node/commit/b7625d0b3f0c4f1696a906106fd98c83b198b7c5))
24+
* **api:** updates to API spec ([bd08c45](https://github.com/writer/writer-node/commit/bd08c45f41c3bf89d0c5395b40742e68ece6902f))
25+
326
## 2.2.1 (2025-07-16)
427

528
Full Changelog: [v2.2.0...v2.2.1](https://github.com/writer/writer-node/compare/v2.2.0...v2.2.1)

MIGRATION.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ The `for await` syntax **is not affected**. This still works as-is:
253253

254254
```ts
255255
// Automatically fetches more pages as needed.
256-
for await (const graph of client.graphs.list()) {
257-
console.log(graph);
256+
for await (const graphListResponse of client.graphs.list()) {
257+
console.log(graphListResponse);
258258
}
259259
```
260260

@@ -276,10 +276,10 @@ Page classes for individual methods are now type aliases:
276276

277277
```ts
278278
// Before
279-
export class GraphsCursorPage extends CursorPage<Graph> {}
279+
export class GraphListResponsesCursorPage extends CursorPage<GraphListResponse> {}
280280

281281
// After
282-
export type GraphsCursorPage = CursorPage<Graph>;
282+
export type GraphListResponsesCursorPage = CursorPage<GraphListResponse>;
283283
```
284284

285285
If you were importing these classes at runtime, you'll need to switch to importing the base class or only import them at the type-level.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,22 +283,22 @@ List methods in the Writer API are paginated.
283283
You can use the `for await … of` syntax to iterate through items across all pages:
284284

285285
```ts
286-
async function fetchAllGraphs(params) {
287-
const allGraphs = [];
286+
async function fetchAllGraphListResponses(params) {
287+
const allGraphListResponses = [];
288288
// Automatically fetches more pages as needed.
289-
for await (const graph of client.graphs.list()) {
290-
allGraphs.push(graph);
289+
for await (const graphListResponse of client.graphs.list()) {
290+
allGraphListResponses.push(graphListResponse);
291291
}
292-
return allGraphs;
292+
return allGraphListResponses;
293293
}
294294
```
295295

296296
Alternatively, you can request a single page at a time:
297297

298298
```ts
299299
let page = await client.graphs.list();
300-
for (const graph of page.data) {
301-
console.log(graph);
300+
for (const graphListResponse of page.data) {
301+
console.log(graphListResponse);
302302
}
303303

304304
// Convenience methods are provided for manually paginating:

api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,18 @@ Types:
103103
- <code><a href="./src/resources/graphs.ts">Question</a></code>
104104
- <code><a href="./src/resources/graphs.ts">QuestionResponseChunk</a></code>
105105
- <code><a href="./src/resources/graphs.ts">GraphCreateResponse</a></code>
106+
- <code><a href="./src/resources/graphs.ts">GraphRetrieveResponse</a></code>
106107
- <code><a href="./src/resources/graphs.ts">GraphUpdateResponse</a></code>
108+
- <code><a href="./src/resources/graphs.ts">GraphListResponse</a></code>
107109
- <code><a href="./src/resources/graphs.ts">GraphDeleteResponse</a></code>
108110
- <code><a href="./src/resources/graphs.ts">GraphRemoveFileFromGraphResponse</a></code>
109111

110112
Methods:
111113

112114
- <code title="post /v1/graphs">client.graphs.<a href="./src/resources/graphs.ts">create</a>({ ...params }) -> GraphCreateResponse</code>
113-
- <code title="get /v1/graphs/{graph_id}">client.graphs.<a href="./src/resources/graphs.ts">retrieve</a>(graphID) -> Graph</code>
115+
- <code title="get /v1/graphs/{graph_id}">client.graphs.<a href="./src/resources/graphs.ts">retrieve</a>(graphID) -> GraphRetrieveResponse</code>
114116
- <code title="put /v1/graphs/{graph_id}">client.graphs.<a href="./src/resources/graphs.ts">update</a>(graphID, { ...params }) -> GraphUpdateResponse</code>
115-
- <code title="get /v1/graphs">client.graphs.<a href="./src/resources/graphs.ts">list</a>({ ...params }) -> GraphsCursorPage</code>
117+
- <code title="get /v1/graphs">client.graphs.<a href="./src/resources/graphs.ts">list</a>({ ...params }) -> GraphListResponsesCursorPage</code>
116118
- <code title="delete /v1/graphs/{graph_id}">client.graphs.<a href="./src/resources/graphs.ts">delete</a>(graphID) -> GraphDeleteResponse</code>
117119
- <code title="post /v1/graphs/{graph_id}/file">client.graphs.<a href="./src/resources/graphs.ts">addFileToGraph</a>(graphID, { ...params }) -> File</code>
118120
- <code title="post /v1/graphs/question">client.graphs.<a href="./src/resources/graphs.ts">question</a>({ ...params }) -> Question</code>
@@ -142,12 +144,14 @@ Types:
142144
- <code><a href="./src/resources/tools/tools.ts">ToolAIDetectResponse</a></code>
143145
- <code><a href="./src/resources/tools/tools.ts">ToolContextAwareSplittingResponse</a></code>
144146
- <code><a href="./src/resources/tools/tools.ts">ToolParsePdfResponse</a></code>
147+
- <code><a href="./src/resources/tools/tools.ts">ToolWebSearchResponse</a></code>
145148

146149
Methods:
147150

148151
- <code title="post /v1/tools/ai-detect">client.tools.<a href="./src/resources/tools/tools.ts">aiDetect</a>({ ...params }) -> ToolAIDetectResponse</code>
149152
- <code title="post /v1/tools/context-aware-splitting">client.tools.<a href="./src/resources/tools/tools.ts">contextAwareSplitting</a>({ ...params }) -> ToolContextAwareSplittingResponse</code>
150153
- <code title="post /v1/tools/pdf-parser/{file_id}">client.tools.<a href="./src/resources/tools/tools.ts">parsePdf</a>(fileID, { ...params }) -> ToolParsePdfResponse</code>
154+
- <code title="post /v1/tools/web-search">client.tools.<a href="./src/resources/tools/tools.ts">webSearch</a>({ ...params }) -> ToolWebSearchResponse</code>
151155

152156
## Comprehend
153157

bin/publish-npm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ else
5858
fi
5959

6060
# Publish with the appropriate tag
61-
yarn publish --access public --tag "$TAG"
61+
yarn publish --tag "$TAG"

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "writer-sdk",
3-
"version": "2.2.1",
3+
"version": "2.3.0-rc.1",
44
"description": "The official TypeScript library for the Writer API",
55
"author": "Writer <dev-feedback@writer.com>",
66
"types": "dist/index.d.ts",
@@ -13,6 +13,9 @@
1313
"**/*"
1414
],
1515
"private": false,
16+
"publishConfig": {
17+
"access": "public"
18+
},
1619
"scripts": {
1720
"test": "./scripts/test",
1821
"build": "./scripts/build",
@@ -48,10 +51,6 @@
4851
"prettier-2": "npm:prettier@^2",
4952
"zod": "^3.23.8"
5053
},
51-
"imports": {
52-
"writer-sdk": ".",
53-
"writer-sdk/*": "./src/*"
54-
},
5554
"bin": {
5655
"writer-sdk": "bin/cli"
5756
},

scripts/mock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24-
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
24+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
2525

2626
# Wait for server to come online
2727
echo -n "Waiting for server"
@@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then
3737

3838
echo
3939
else
40-
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
40+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
4141
fi

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ elif ! prism_is_running ; then
4343
echo -e "To run the server, pass in the path or url of your OpenAPI"
4444
echo -e "spec to the prism command:"
4545
echo
46-
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
46+
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
4747
echo
4848

4949
exit 1

0 commit comments

Comments
 (0)