Skip to content
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.3"
".": "0.1.0-alpha.4"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 17
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scan-documents%2Fscan-documents-04f736d0a9ae5151fec360201288ee49dc02cc4f60adf1ff17c5e3a0bbb639b4.yml
openapi_spec_hash: e9d1be2b0eae296e605a9a79af48ab63
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scan-documents%2Fscan-documents-41af66c2f2ba90b745f6c36d89d31281f16d916521b98a8f510ec3a8f90a1efb.yml
openapi_spec_hash: 0c629cd46c640a055b0cfa5d88aad337
config_hash: ee078a284af580362c78b746a0c811c2
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.1.0-alpha.4 (2025-05-21)

Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/Scan-Documents/node-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)

### Features

* **api:** update via SDK Studio ([825db67](https://github.com/Scan-Documents/node-sdk/commit/825db6702da4376ec6ae5977469a0e572b053957))


### Documentation

* readme changes ([d33adb0](https://github.com/Scan-Documents/node-sdk/commit/d33adb0d480cea87d13f65a66ce987d32a040fad))

## 0.1.0-alpha.3 (2025-05-21)

Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/Scan-Documents/node-sdk/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This library provides convenient access to the Scan Documents REST API from server-side TypeScript or JavaScript.

The REST API documentation can be found on [scan-documents.com](https://scan-documents.com/docs). The full API of this library can be found in [api.md](api.md).
The REST API documentation can be found on [Scan Documents](https://scan-documents.com/docs). The full API of this library can be found in [api.md](api.md).

It is generated with [Stainless](https://www.stainless.com/).

Expand Down Expand Up @@ -87,6 +87,26 @@ await client.files.upload({ file: await toFile(Buffer.from('my bytes'), 'file'),
await client.files.upload({ file: await toFile(new Uint8Array([0, 1, 2]), 'file'), name: 'File Name' });
```


## Task operations

Operations can be found under the `imageOperations` and `pdfOperations` resources.

```ts
import ScanDocuments from 'scan-documents';

const client = new ScanDocuments({
apiKey: process.env['SCAN_DOCUMENTS_API_KEY'], // This is the default and can be omitted
});

const applyEffectResponse = await client.imageOperations.applyEffect({
effect: 'grayscale',
input: 'file_avyrvozb9302uwhq',
});

console.log(applyEffectResponse);
```

## Handling errors

When the library is unable to connect to the API,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scan-documents",
"version": "0.1.0-alpha.3",
"version": "0.1.0-alpha.4",
"description": "The official TypeScript library for the Scan Documents API",
"author": "Scan Documents <support@scan-documents.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scan-documents-mcp",
"version": "0.1.0-alpha.3",
"version": "0.1.0-alpha.4",
"description": "The official MCP Server for the Scan Documents API",
"author": "Scan Documents <support@scan-documents.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export { endpoints } from './tools';
export const server = new McpServer(
{
name: 'scan_documents_api',
version: '0.1.0-alpha.3',
version: '0.1.0-alpha.4',
},
{
capabilities: {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class Files extends APIResource {
download(id: string, options?: RequestOptions): APIPromise<Response> {
return this._client.get(path`/v1/files/${id}/download`, {
...options,
headers: buildHeaders([{ Accept: 'image/*' }, options?.headers]),
headers: buildHeaders([{ Accept: 'image/png' }, options?.headers]),
__binaryResponse: true,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.1.0-alpha.3'; // x-release-please-version
export const VERSION = '0.1.0-alpha.4'; // x-release-please-version