@anyformat/sdk 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/dist/index.cjs +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -270,9 +270,7 @@ bun run gen # dump both OpenAPI artifacts offline + regenerate src/sdk
|
|
|
270
270
|
bun run gen:check # regenerate and fail if the committed output drifted
|
|
271
271
|
```
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
`openapi/v2.json` stays as the frozen v2 surface guard (the dump script's
|
|
275
|
-
`--surface v2` output must remain byte-identical). `gen:check` runs in CI and
|
|
273
|
+
The committed artifact `openapi/v3.json` feeds the generated client. `gen:check` runs in CI and
|
|
276
274
|
as a pre-commit hook (scoped to changes under `anyformat/services/api` and
|
|
277
275
|
`anyformat/workflow`) so the committed SDK can never fall behind the backend.
|
|
278
276
|
The SDK's own `tsc` then fails to compile if a backend model change alters a
|
|
@@ -305,5 +303,5 @@ Every knob is an option on `.parse({...})` / `.extract(fields, {...})`. `parse`
|
|
|
305
303
|
`cache`; **agentic-only** `effort` (`"low"`/`"mid"`/`"accurate"`); **lite**: no knobs of its own — one
|
|
306
304
|
OCR-only recipe that never reads `promptHint`; **flash-only** `scannedPages` (`"skip"`/`"fail"`) — no model call, no OCR.
|
|
307
305
|
|
|
308
|
-
**`.extract(fields, {...})`** — `mode` (`"standard"`/`"agentic"`/`"max"`/`"lite"`),
|
|
306
|
+
**`.extract(fields, {...})`** — `mode` (`"standard"`/`"agentic"`/`"max"`/`"lite"`),
|
|
309
307
|
`lookupSuggestion`, `lookupReasoningEffort` (`"minimal"`/`"low"`/`"medium"`/`"high"`), `lookupFiles`.
|
package/dist/index.cjs
CHANGED
|
@@ -52,7 +52,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
52
52
|
// package.json
|
|
53
53
|
var package_default = {
|
|
54
54
|
name: "@anyformat/sdk",
|
|
55
|
-
version: "1.
|
|
55
|
+
version: "1.8.0",
|
|
56
56
|
description: "TypeScript SDK for the AnyFormat API",
|
|
57
57
|
license: "MIT",
|
|
58
58
|
author: "Anyformat <info@anyformat.ai>",
|
|
@@ -74,7 +74,7 @@ var package_default = {
|
|
|
74
74
|
node: ">=18"
|
|
75
75
|
},
|
|
76
76
|
scripts: {
|
|
77
|
-
"gen:spec": 'ROOT=$(unset GIT_DIR && git rev-parse --show-toplevel) && cd "$ROOT/anyformat/services/api" && uv run python "$ROOT/anyformat/libs/public/sdk-js/scripts/dump_openapi.py" "$ROOT/anyformat/libs/public/sdk-js/openapi/
|
|
77
|
+
"gen:spec": 'ROOT=$(unset GIT_DIR && git rev-parse --show-toplevel) && cd "$ROOT/anyformat/services/api" && uv run python "$ROOT/anyformat/libs/public/sdk-js/scripts/dump_openapi.py" "$ROOT/anyformat/libs/public/sdk-js/openapi/v3.json"',
|
|
78
78
|
"gen:client": "openapi-ts",
|
|
79
79
|
gen: "bun run gen:spec && bun run gen:client",
|
|
80
80
|
"gen:check": "bun run gen && git diff --exit-code -- openapi src/sdk",
|
|
@@ -1535,8 +1535,7 @@ var WorkflowBuilder = class {
|
|
|
1535
1535
|
extraction_schema: { fields },
|
|
1536
1536
|
...lookupFileUploads.length > 0 ? { lookup_file_uploads: lookupFileUploads } : {},
|
|
1537
1537
|
...opts.lookupSuggestion !== void 0 ? { lookup_suggestion: opts.lookupSuggestion } : {},
|
|
1538
|
-
...opts.lookupReasoningEffort !== void 0 ? { lookup_reasoning_effort: opts.lookupReasoningEffort } : {}
|
|
1539
|
-
...opts.useImages !== void 0 ? { use_images: opts.useImages } : {}
|
|
1538
|
+
...opts.lookupReasoningEffort !== void 0 ? { lookup_reasoning_effort: opts.lookupReasoningEffort } : {}
|
|
1540
1539
|
};
|
|
1541
1540
|
this.extracts.push([node, branchId]);
|
|
1542
1541
|
return this;
|