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
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/scan-documents-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'

Expand All @@ -43,10 +43,10 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'

Expand All @@ -61,7 +61,7 @@ jobs:
github.repository == 'stainless-sdks/scan-documents-typescript' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand Down Expand Up @@ -91,10 +91,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/scan-documents-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: '20'

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
if: github.repository == 'Scan-Documents/node-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.SCAN_DOCUMENTS_NPM_TOKEN || secrets.NPM_TOKEN }}

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CHANGELOG.md
/ecosystem-tests/*/**
/node_modules
/deno
/packages/mcp-server/manifest.json

# don't format tsc output, will break source maps
dist
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.31"
".": "0.1.0-alpha.32"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 18
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scan-documents%2Fscan-documents-42f9aa9c3b2769584f60fa3742f3a004bdf2e3b5ba30a44535b0191654b1a51e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scan-documents/scan-documents-ffd61a85494402e24b39e7edee3c6d809b592ef671b3331812d017dd375445b3.yml
openapi_spec_hash: a0bab3e1411b24d8a662df98d227049a
config_hash: c1dd12e2ddf127e74f1b4981eef49e2b
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.1.0-alpha.32 (2026-05-19)

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

### Bug Fixes

* **typescript:** upgrade tsc-multi so that it works with Node 26 ([5033e84](https://github.com/Scan-Documents/node-sdk/commit/5033e84d00cb70a83950e35f9dddde7cca073479))


### Chores

* avoid formatting file that gets changed during releases ([ac1237d](https://github.com/Scan-Documents/node-sdk/commit/ac1237dd3fe8aba1b37187ec5b72bccbbe024513))
* **format:** run eslint and prettier separately ([9640cea](https://github.com/Scan-Documents/node-sdk/commit/9640cea81ed35dfbbfa210c5f66d4ee3088c4e12))
* redact api-key headers in debug logs ([8770cf0](https://github.com/Scan-Documents/node-sdk/commit/8770cf047221c69bb81cbdebb0b8869513e513ac))
* **tests:** remove redundant File import ([01b4d39](https://github.com/Scan-Documents/node-sdk/commit/01b4d39c3498d244001ec92d808bc64cc1789daf))


### Documentation

* update http mcp docs ([2328cbd](https://github.com/Scan-Documents/node-sdk/commit/2328cbdcff9e547dd615bbc2975ed6e314882dd7))

## 0.1.0-alpha.31 (2026-04-28)

Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/Scan-Documents/node-sdk/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)
Expand Down
3 changes: 0 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check
import tseslint from 'typescript-eslint';
import unusedImports from 'eslint-plugin-unused-imports';
import prettier from 'eslint-plugin-prettier';

export default tseslint.config(
{
Expand All @@ -14,11 +13,9 @@ export default tseslint.config(
plugins: {
'@typescript-eslint': tseslint.plugin,
'unused-imports': unusedImports,
prettier,
},
rules: {
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'unused-imports/no-unused-imports': 'error',
'no-restricted-imports': [
'error',
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scan-documents",
"version": "0.1.0-alpha.31",
"version": "0.1.0-alpha.32",
"description": "The official TypeScript library for the Scan Documents API",
"author": "Scan Documents <support@scan-documents.com>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -36,15 +36,14 @@
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
"eslint": "^9.39.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
"jest": "^29.4.0",
"prettier": "^3.0.0",
"publint": "^0.2.12",
"ts-jest": "^29.1.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "5.8.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "scan-documents-mcp",
"version": "0.1.0-alpha.31",
"version": "0.1.0-alpha.32",
"description": "The official MCP Server for the Scan Documents API",
"author": {
"name": "Scan Documents",
Expand Down
4 changes: 2 additions & 2 deletions 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.31",
"version": "0.1.0-alpha.32",
"description": "The official MCP Server for the Scan Documents API",
"author": "Scan Documents <support@scan-documents.com>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -74,7 +74,7 @@
"ts-jest": "^29.1.0",
"ts-morph": "^19.0.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0"
},
"imports": {
Expand Down
16 changes: 8 additions & 8 deletions packages/mcp-server/src/local-docs-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/image-operations/detect-documents \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq"\n }\'',
'curl https://api.scan-documents.com/v1/image-operations/detect-documents \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "callback_url": "https://example.com/callback"\n }\'',
},
},
},
Expand Down Expand Up @@ -408,7 +408,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/image-operations/warp \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "vertices": [\n {\n "x": 0,\n "y": 0\n },\n {\n "x": 100,\n "y": 10\n },\n {\n "x": 100,\n "y": 100\n },\n {\n "x": 0,\n "y": 90\n }\n ],\n "name": "Example Image"\n }\'',
'curl https://api.scan-documents.com/v1/image-operations/warp \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "vertices": [\n {\n "x": 0,\n "y": 0\n },\n {\n "x": 100,\n "y": 10\n },\n {\n "x": 100,\n "y": 100\n },\n {\n "x": 0,\n "y": 90\n }\n ],\n "callback_url": "https://example.com/callback",\n "name": "Example Image"\n }\'',
},
},
},
Expand Down Expand Up @@ -443,7 +443,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/image-operations/apply-effect \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "effect": "grayscale",\n "input": "file_avyrvozb9302uwhq",\n "name": "Example Image"\n }\'',
'curl https://api.scan-documents.com/v1/image-operations/apply-effect \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "effect": "grayscale",\n "input": "file_avyrvozb9302uwhq",\n "callback_url": "https://example.com/callback",\n "name": "Example Image"\n }\'',
},
},
},
Expand Down Expand Up @@ -480,7 +480,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/image-operations/scan \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "effect": "none",\n "input": "file_avyrvozb9302uwhq",\n "scan_mode": "standard",\n "name": "Example Image"\n }\'',
'curl https://api.scan-documents.com/v1/image-operations/scan \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "effect": "none",\n "input": "file_avyrvozb9302uwhq",\n "scan_mode": "standard",\n "callback_url": "https://example.com/callback",\n "name": "Example Image"\n }\'',
},
},
},
Expand Down Expand Up @@ -516,7 +516,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/pdf-operations/render \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "dpi": 300,\n "name": "File Name",\n "pages": "2-7"\n }\'',
'curl https://api.scan-documents.com/v1/pdf-operations/render \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "callback_url": "https://example.com/callback",\n "dpi": 300,\n "name": "File Name",\n "pages": "2-7"\n }\'',
},
},
},
Expand Down Expand Up @@ -546,7 +546,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/pdf-operations/split \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "name": "File Name"\n }\'',
'curl https://api.scan-documents.com/v1/pdf-operations/split \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "callback_url": "https://example.com/callback",\n "name": "File Name"\n }\'',
},
},
},
Expand Down Expand Up @@ -576,7 +576,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/pdf-operations/merge \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": [\n "file_avyrvozb9302uwhq"\n ],\n "name": "File Name"\n }\'',
'curl https://api.scan-documents.com/v1/pdf-operations/merge \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": [\n "file_avyrvozb9302uwhq"\n ],\n "callback_url": "https://example.com/callback",\n "name": "File Name"\n }\'',
},
},
},
Expand Down Expand Up @@ -606,7 +606,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
http: {
example:
'curl https://api.scan-documents.com/v1/pdf-operations/extract-pages \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "pages": "2-7",\n "name": "File Name"\n }\'',
'curl https://api.scan-documents.com/v1/pdf-operations/extract-pages \\\n -H \'Content-Type: application/json\' \\\n -H "x-api-key: $SCAN_DOCUMENTS_API_KEY" \\\n -d \'{\n "input": "file_avyrvozb9302uwhq",\n "pages": "2-7",\n "callback_url": "https://example.com/callback",\n "name": "File Name"\n }\'',
},
},
},
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 @@ -28,7 +28,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'scan_documents_api',
version: '0.1.0-alpha.31',
version: '0.1.0-alpha.32',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
6 changes: 3 additions & 3 deletions packages/mcp-server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3921,9 +3921,9 @@ ts-node@^10.5.0:
v8-compile-cache-lib "^3.0.1"
yn "3.1.1"

"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz":
version "1.1.9"
resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz#777f6f5d9e26bf0e94e5170990dd3a841d6707cd"
"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz":
version "1.1.11"
resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz#010247051be13b55abdc98f787c017285149f4f2"
dependencies:
debug "^4.3.7"
fast-glob "^3.3.2"
Expand Down
9 changes: 3 additions & 6 deletions scripts/fast-format
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ if ! [ -z "$ESLINT_FILES" ]; then
fi

echo "==> Running prettier --write"
# format things eslint didn't
PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
if ! [ -z "$PRETTIER_FILES" ]; then
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
if ! [ -z "$FILE_LIST" ]; then
cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown
fi
3 changes: 1 addition & 2 deletions scripts/format
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ echo "==> Running eslint --fix"
./node_modules/.bin/eslint --fix .

echo "==> Running prettier --write"
# format things eslint didn't
./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
./node_modules/.bin/prettier --write --cache --cache-strategy metadata .
3 changes: 3 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running prettier --check"
./node_modules/.bin/prettier --check .

echo "==> Running eslint"
./node_modules/.bin/eslint .

Expand Down
Loading
Loading