Skip to content

Commit ac664a5

Browse files
authored
Merge pull request #60 from reductoai/release-please--branches--main--changes--next--components--reductoai
release: 0.14.0
2 parents 414ea14 + 860cb50 commit ac664a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3021
-2939
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: CI
22
on:
33
push:
4-
branches-ignore:
5-
- 'generated'
6-
- 'codegen/**'
7-
- 'integrated/**'
8-
- 'stl-preview-head/**'
9-
- 'stl-preview-base/**'
4+
branches:
5+
- '**'
6+
- '!integrated/**'
7+
- '!stl-preview-head/**'
8+
- '!stl-preview-base/**'
9+
- '!generated'
10+
- '!codegen/**'
11+
- 'codegen/stl/**'
1012
pull_request:
1113
branches-ignore:
1214
- 'stl-preview-head/**'
@@ -19,7 +21,7 @@ jobs:
1921
runs-on: ${{ github.repository == 'stainless-sdks/reductoai-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2022
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
2123
steps:
22-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2325

2426
- name: Set up Node
2527
uses: actions/setup-node@v4
@@ -41,7 +43,7 @@ jobs:
4143
contents: read
4244
id-token: write
4345
steps:
44-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@v6
4547

4648
- name: Set up Node
4749
uses: actions/setup-node@v4
@@ -55,14 +57,18 @@ jobs:
5557
run: ./scripts/build
5658

5759
- name: Get GitHub OIDC Token
58-
if: github.repository == 'stainless-sdks/reductoai-node'
60+
if: |-
61+
github.repository == 'stainless-sdks/reductoai-node' &&
62+
!startsWith(github.ref, 'refs/heads/stl/')
5963
id: github-oidc
60-
uses: actions/github-script@v6
64+
uses: actions/github-script@v8
6165
with:
6266
script: core.setOutput('github_token', await core.getIDToken());
6367

6468
- name: Upload tarball
65-
if: github.repository == 'stainless-sdks/reductoai-node'
69+
if: |-
70+
github.repository == 'stainless-sdks/reductoai-node' &&
71+
!startsWith(github.ref, 'refs/heads/stl/')
6672
env:
6773
URL: https://pkg.stainless.com/s
6874
AUTH: ${{ steps.github-oidc.outputs.github_token }}
@@ -74,7 +80,7 @@ jobs:
7480
runs-on: ${{ github.repository == 'stainless-sdks/reductoai-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
7581
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
7682
steps:
77-
- uses: actions/checkout@v4
83+
- uses: actions/checkout@v6
7884

7985
- name: Set up Node
8086
uses: actions/setup-node@v4

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Set up Node
2020
uses: actions/setup-node@v3

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'reductoai/reducto-node-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616

1717
- name: Check release environment
1818
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.prism.log
2+
.stdy.log
23
node_modules
34
yarn-error.log
45
codegen.log

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 16
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/reducto%2Freductoai-af6e6c678515bd54067a0bbe911a064a8bf6e14ecdb26ecc915f5c0bb2bab579.yml
3-
openapi_spec_hash: b7f1b74e7f52a511d90eb8fecb4e0987
4-
config_hash: 12c16025a3b7554fa6377191d68b1903
1+
configured_endpoints: 17
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/reducto%2Freductoai-a7d4d4927e87215a1579a2e32662922b0a58150641c0009dad505fc48fcf301b.yml
3+
openapi_spec_hash: b11bdb290665a5ac0778f2cbbaaffea4
4+
config_hash: db384d1185f4b249044f9ad6a988384f

CHANGELOG.md

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

3+
## 0.14.0 (2026-03-24)
4+
5+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/reductoai/reducto-node-sdk/compare/v0.13.0...v0.14.0)
6+
7+
### Features
8+
9+
* **api:** api update ([30c30e1](https://github.com/reductoai/reducto-node-sdk/commit/30c30e1f01b7b4c61dbfa1b5be2131f6bf8b393e))
10+
* **api:** api update ([d11ad60](https://github.com/reductoai/reducto-node-sdk/commit/d11ad6012aba58e5a6742e214bdf9c2330aa838a))
11+
* **api:** api update ([9c1a856](https://github.com/reductoai/reducto-node-sdk/commit/9c1a85657c3d6d94eac9cf7f938771e4ff3aeef8))
12+
* **api:** api update ([380fa3b](https://github.com/reductoai/reducto-node-sdk/commit/380fa3b5cd05dbad8a001bdcab6ab61bfc4f0cc7))
13+
* **api:** api update ([7809f77](https://github.com/reductoai/reducto-node-sdk/commit/7809f7722c1c2c553ad3337229b9388977254e4e))
14+
* **api:** api update ([1f987fb](https://github.com/reductoai/reducto-node-sdk/commit/1f987fb226f1e4c2d6dc2f7a93ccdd3f79b17165))
15+
* **api:** api update ([ee1424c](https://github.com/reductoai/reducto-node-sdk/commit/ee1424c6ce3726ac2e0a8b14799b23bdd7cf5b80))
16+
* **api:** api update ([f2e686f](https://github.com/reductoai/reducto-node-sdk/commit/f2e686fbdd7e79a93975813553f00c3d6a3f27da))
17+
* **api:** api update ([4835bff](https://github.com/reductoai/reducto-node-sdk/commit/4835bffb9fb214136f5e943351d16c2077e16d2f))
18+
* **api:** api update ([fe7b7b2](https://github.com/reductoai/reducto-node-sdk/commit/fe7b7b2bdede6e7d91e298ac57f16f64582012a5))
19+
* **api:** api update ([1f64e17](https://github.com/reductoai/reducto-node-sdk/commit/1f64e171a54adf2bb387601da2b7c2db4a1fd6ae))
20+
* **api:** api update ([0b036c8](https://github.com/reductoai/reducto-node-sdk/commit/0b036c88555b3699b280979e2784e68c99d480a3))
21+
* **api:** api update ([37d1e9b](https://github.com/reductoai/reducto-node-sdk/commit/37d1e9b68358ae4ec9f8e9fa43c522b491b65d48))
22+
* **api:** api update ([3fff9d0](https://github.com/reductoai/reducto-node-sdk/commit/3fff9d03440d49dd7dc42293bdccdcd96bea5c26))
23+
* **api:** api update ([4234099](https://github.com/reductoai/reducto-node-sdk/commit/42340999ca0976567bff5f8297af3438640ea481))
24+
* **api:** api update ([375f898](https://github.com/reductoai/reducto-node-sdk/commit/375f89847c91462034a3a358a67f6368f4043e95))
25+
* **api:** api update ([6f83d8b](https://github.com/reductoai/reducto-node-sdk/commit/6f83d8b5c62ebf40488fae811ad2efca06f45c7c))
26+
* **api:** api update ([3885830](https://github.com/reductoai/reducto-node-sdk/commit/3885830b959fefe73a7b26dc3a2ecff719b4a9f2))
27+
* **api:** api update ([95c7a86](https://github.com/reductoai/reducto-node-sdk/commit/95c7a86249bf78b6164d648e34c161213ef098dd))
28+
* **api:** api update ([1a746fc](https://github.com/reductoai/reducto-node-sdk/commit/1a746fc043c060a266bf87cd575945cb8077290f))
29+
* **api:** api update ([6398260](https://github.com/reductoai/reducto-node-sdk/commit/6398260030d99c5707906aa51e0574580001468c))
30+
* **api:** api update ([3104233](https://github.com/reductoai/reducto-node-sdk/commit/31042333c8bdb44df5be843d72a6ce73114ddbec))
31+
* **api:** api update ([31a32f1](https://github.com/reductoai/reducto-node-sdk/commit/31a32f15eed8d855d3f17794a6ba0a01a8c7bc37))
32+
* **api:** api update ([869f688](https://github.com/reductoai/reducto-node-sdk/commit/869f688baf43a76936766a10e2e39fb2d92730c5))
33+
* **api:** api update ([1bc5ebb](https://github.com/reductoai/reducto-node-sdk/commit/1bc5ebb13d723d2f2dd08b22cf9de56c2f1f581e))
34+
* **api:** api update ([de2dad4](https://github.com/reductoai/reducto-node-sdk/commit/de2dad4e85c0e2846737a1b282aea23529c33bc5))
35+
* **api:** api update ([21a0bc0](https://github.com/reductoai/reducto-node-sdk/commit/21a0bc0317272966c09e56229dc1b43c63b74e23))
36+
* **api:** api update ([816ec6b](https://github.com/reductoai/reducto-node-sdk/commit/816ec6b489eed42d237f92431e3546145f7efa2f))
37+
* **api:** manual updates ([fd3f6e2](https://github.com/reductoai/reducto-node-sdk/commit/fd3f6e2467d1900ea41884a633521b2453781e2e))
38+
* **api:** manual updates ([7ed517c](https://github.com/reductoai/reducto-node-sdk/commit/7ed517cc2583869fc0964e19d0752da82703a6f4))
39+
* **api:** manual updates ([eb92503](https://github.com/reductoai/reducto-node-sdk/commit/eb92503eabed860922088a06479431f285b9511f))
40+
* **api:** manual updates ([12a3fa2](https://github.com/reductoai/reducto-node-sdk/commit/12a3fa257c3011beb28467c1ba8371f6c8fc2f22))
41+
* **files:** add support for string alternative to file upload type ([6ab83a7](https://github.com/reductoai/reducto-node-sdk/commit/6ab83a76b2c240a44721ab2018c3af8cf94d7512))
42+
43+
44+
### Bug Fixes
45+
46+
* **client:** preserve URL params already embedded in path ([59c9805](https://github.com/reductoai/reducto-node-sdk/commit/59c9805592e28602db91d80e1681e080bb861511))
47+
* **docs/contributing:** correct pnpm link command ([cff59cc](https://github.com/reductoai/reducto-node-sdk/commit/cff59cca0aab03a23198288cd1ea11b0cc95f2ce))
48+
* **mcp:** correct code tool API endpoint ([2c26c48](https://github.com/reductoai/reducto-node-sdk/commit/2c26c48cc5540089e4ca1717296638b4552784eb))
49+
* **mcp:** return correct lines on typescript errors ([497e0ee](https://github.com/reductoai/reducto-node-sdk/commit/497e0ee1cb2d898b7fbee174363573393995148d))
50+
51+
52+
### Chores
53+
54+
* break long lines in snippets into multiline ([9d52de4](https://github.com/reductoai/reducto-node-sdk/commit/9d52de4d7faa0b0a61a3ed55a0416270f26d2d51))
55+
* **ci:** skip uploading artifacts on stainless-internal branches ([3b9dcfc](https://github.com/reductoai/reducto-node-sdk/commit/3b9dcfcde4abfd3212ca1d06dfb63d1c26717c26))
56+
* **ci:** upgrade `actions/github-script` ([ce9af3a](https://github.com/reductoai/reducto-node-sdk/commit/ce9af3a38224880fa4475a831e129c7420e3d85a))
57+
* **client:** do not parse responses with empty content-length ([7d0ca9a](https://github.com/reductoai/reducto-node-sdk/commit/7d0ca9acdfea271373512a7c5b2b6868220e627f))
58+
* fix typo in descriptions ([9c4fa8a](https://github.com/reductoai/reducto-node-sdk/commit/9c4fa8a091e22f01e029b1e898b1ea0b7df8d110))
59+
* **internal:** codegen related update ([75d075b](https://github.com/reductoai/reducto-node-sdk/commit/75d075b2b4fc068ce0c7d13ffb5aadbc35163ea0))
60+
* **internal:** codegen related update ([12de323](https://github.com/reductoai/reducto-node-sdk/commit/12de3239143efba43a97f884ab454a6f9bf2fdfd))
61+
* **internal:** codegen related update ([ba4aea5](https://github.com/reductoai/reducto-node-sdk/commit/ba4aea56bea1bc533d8c9dfa72fead39e214817c))
62+
* **internal:** move stringifyQuery implementation to internal function ([77fbeb6](https://github.com/reductoai/reducto-node-sdk/commit/77fbeb61508bc627e19d5cf52ce87d803041135b))
63+
* **internal:** remove mock server code ([c2d42e0](https://github.com/reductoai/reducto-node-sdk/commit/c2d42e0f5e7e41318f9fb1199e6530b2bc3b8765))
64+
* **internal:** tweak CI branches ([40eb8b0](https://github.com/reductoai/reducto-node-sdk/commit/40eb8b09d0a7712d602df15702b53c5e8ba514ce))
65+
* **internal:** update `actions/checkout` version ([ca6f81a](https://github.com/reductoai/reducto-node-sdk/commit/ca6f81aebf40afce8fdd8ec6fe35d32b90c48eef))
66+
* **internal:** update gitignore ([e62d6d4](https://github.com/reductoai/reducto-node-sdk/commit/e62d6d4cd49c300976983b5a1710ccb2907673c0))
67+
* **internal:** upgrade babel, qs, js-yaml ([93ee721](https://github.com/reductoai/reducto-node-sdk/commit/93ee721b989715136efdb83704739985a87947db))
68+
* update mock server docs ([3036bda](https://github.com/reductoai/reducto-node-sdk/commit/3036bda24c93ab49d3b76e45bd895815b923b27e))
69+
370
## 0.13.0 (2025-12-02)
471

572
Full Changelog: [v0.12.0...v0.13.0](https://github.com/reductoai/reducto-node-sdk/compare/v0.12.0...v0.13.0)

CONTRIBUTING.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,11 @@ $ yarn link reductoai
6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -global reductoai
63+
$ pnpm link --global reductoai
6464
```
6565

6666
## Running tests
6767

68-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
69-
70-
```sh
71-
$ npx prism mock path/to/your/openapi.yml
72-
```
73-
7468
```sh
7569
$ yarn run test
7670
```

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Reducto
189+
Copyright 2026 Reducto
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const client = new Reducto({
2727
environment: 'eu', // or 'production' | 'au'; defaults to 'production'
2828
});
2929

30-
const response = await client.parse.run({ input: 'https://pdfobject.com/pdf/sample.pdf' });
30+
const parse = await client.parse.create({ input: 'https://pdfobject.com/pdf/sample.pdf' });
3131
```
3232

3333
### Request & Response types
@@ -43,42 +43,12 @@ const client = new Reducto({
4343
environment: 'eu', // or 'production' | 'au'; defaults to 'production'
4444
});
4545

46-
const params: Reducto.ParseRunParams = { input: 'https://pdfobject.com/pdf/sample.pdf' };
47-
const response: Reducto.ParseRunResponse = await client.parse.run(params);
46+
const params: Reducto.ParseCreateParams = { input: 'https://pdfobject.com/pdf/sample.pdf' };
47+
const parse: Reducto.ParseCreateResponse = await client.parse.create(params);
4848
```
4949

5050
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
5151

52-
## File uploads
53-
54-
Request parameters that correspond to file uploads can be passed in many different forms:
55-
56-
- `File` (or an object with the same structure)
57-
- a `fetch` `Response` (or an object with the same structure)
58-
- an `fs.ReadStream`
59-
- the return value of our `toFile` helper
60-
61-
```ts
62-
import fs from 'fs';
63-
import fetch from 'node-fetch';
64-
import Reducto, { toFile } from 'reductoai';
65-
66-
const client = new Reducto();
67-
68-
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
69-
await client.upload({ file: fs.createReadStream('/path/to/file') });
70-
71-
// Or if you have the web `File` API you can pass a `File` instance:
72-
await client.upload({ file: new File(['my bytes'], 'file') });
73-
74-
// You can also pass a `fetch` `Response`:
75-
await client.upload({ file: await fetch('https://somesite/file') });
76-
77-
// Finally, if none of the above are convenient, you can use our `toFile` helper:
78-
await client.upload({ file: await toFile(Buffer.from('my bytes'), 'file') });
79-
await client.upload({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });
80-
```
81-
8252
## Handling errors
8353

8454
When the library is unable to connect to the API,
@@ -87,8 +57,8 @@ a subclass of `APIError` will be thrown:
8757

8858
<!-- prettier-ignore -->
8959
```ts
90-
const response = await client.parse
91-
.run({ input: 'https://pdfobject.com/pdf/sample.pdf' })
60+
const parse = await client.parse
61+
.create({ input: 'https://pdfobject.com/pdf/sample.pdf' })
9262
.catch(async (err) => {
9363
if (err instanceof Reducto.APIError) {
9464
console.log(err.status); // 400
@@ -129,7 +99,7 @@ const client = new Reducto({
12999
});
130100

131101
// Or, configure per-request:
132-
await client.parse.run({ input: 'https://pdfobject.com/pdf/sample.pdf' }, {
102+
await client.parse.create({ input: 'https://pdfobject.com/pdf/sample.pdf' }, {
133103
maxRetries: 5,
134104
});
135105
```
@@ -146,7 +116,7 @@ const client = new Reducto({
146116
});
147117

148118
// Override per-request:
149-
await client.parse.run({ input: 'https://pdfobject.com/pdf/sample.pdf' }, {
119+
await client.parse.create({ input: 'https://pdfobject.com/pdf/sample.pdf' }, {
150120
timeout: 5 * 1000,
151121
});
152122
```
@@ -167,15 +137,17 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
167137
```ts
168138
const client = new Reducto();
169139

170-
const response = await client.parse.run({ input: 'https://pdfobject.com/pdf/sample.pdf' }).asResponse();
140+
const response = await client.parse
141+
.create({ input: 'https://pdfobject.com/pdf/sample.pdf' })
142+
.asResponse();
171143
console.log(response.headers.get('X-My-Header'));
172144
console.log(response.statusText); // access the underlying Response object
173145

174-
const { data: response, response: raw } = await client.parse
175-
.run({ input: 'https://pdfobject.com/pdf/sample.pdf' })
146+
const { data: parse, response: raw } = await client.parse
147+
.create({ input: 'https://pdfobject.com/pdf/sample.pdf' })
176148
.withResponse();
177149
console.log(raw.headers.get('X-My-Header'));
178-
console.log(response);
150+
console.log(parse);
179151
```
180152

181153
### Making custom/undocumented requests
@@ -279,7 +251,7 @@ const client = new Reducto({
279251
});
280252

281253
// Override per-request:
282-
await client.parse.run(
254+
await client.parse.create(
283255
{ input: 'https://pdfobject.com/pdf/sample.pdf' },
284256
{
285257
httpAgent: new http.Agent({ keepAlive: false }),

0 commit comments

Comments
 (0)