@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/dist/index.d.cts
CHANGED
|
@@ -1700,7 +1700,7 @@ type PublicExtractNode = {
|
|
|
1700
1700
|
/**
|
|
1701
1701
|
* Use Images
|
|
1702
1702
|
*
|
|
1703
|
-
*
|
|
1703
|
+
* Retired — accepted for compatibility, ignored. Extraction reads the parsed text only.
|
|
1704
1704
|
*/
|
|
1705
1705
|
use_images?: boolean;
|
|
1706
1706
|
};
|
|
@@ -1751,6 +1751,12 @@ type PublicIfElseNode = {
|
|
|
1751
1751
|
* PublicParseNode
|
|
1752
1752
|
*/
|
|
1753
1753
|
type PublicParseNode = {
|
|
1754
|
+
/**
|
|
1755
|
+
* Annotation Reading
|
|
1756
|
+
*
|
|
1757
|
+
* Standard mode, experimental: re-read handwritten numbers inside larger blocks on their own high-resolution crop, and mark handwriting in the markdown as <handwritten>. Ignored in agentic, lite and flash.
|
|
1758
|
+
*/
|
|
1759
|
+
annotation_reading?: boolean;
|
|
1754
1760
|
/**
|
|
1755
1761
|
* Cache
|
|
1756
1762
|
*
|
|
@@ -1981,8 +1987,7 @@ type ResultsResponseV3 = {
|
|
|
1981
1987
|
* Flat single-run read: lifecycle status plus results inline.
|
|
1982
1988
|
*
|
|
1983
1989
|
* `results` is `null` until the run reaches `processed`, then carries the
|
|
1984
|
-
*
|
|
1985
|
-
* returns — no separate results endpoint, no 412 while in flight.
|
|
1990
|
+
* results envelope — no separate results endpoint, no 412 while in flight.
|
|
1986
1991
|
*/
|
|
1987
1992
|
type RunDetailV3 = {
|
|
1988
1993
|
/**
|
|
@@ -2004,7 +2009,7 @@ type RunDetailV3 = {
|
|
|
2004
2009
|
*/
|
|
2005
2010
|
id: string;
|
|
2006
2011
|
/**
|
|
2007
|
-
* Extraction results envelope; `null` until `status` is `processed`.
|
|
2012
|
+
* Extraction results envelope; `null` until `status` is `processed`.
|
|
2008
2013
|
*/
|
|
2009
2014
|
results?: ResultsResponseV3 | null;
|
|
2010
2015
|
/**
|
|
@@ -2865,6 +2870,7 @@ declare class WorkflowBuilder {
|
|
|
2865
2870
|
lookupFiles?: string[];
|
|
2866
2871
|
lookupSuggestion?: string;
|
|
2867
2872
|
lookupReasoningEffort?: ReasoningEffort;
|
|
2873
|
+
/** @deprecated Retired: the server ignores it. */
|
|
2868
2874
|
useImages?: boolean;
|
|
2869
2875
|
}): this;
|
|
2870
2876
|
validate(rules: ValidationRule[], opts?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1700,7 +1700,7 @@ type PublicExtractNode = {
|
|
|
1700
1700
|
/**
|
|
1701
1701
|
* Use Images
|
|
1702
1702
|
*
|
|
1703
|
-
*
|
|
1703
|
+
* Retired — accepted for compatibility, ignored. Extraction reads the parsed text only.
|
|
1704
1704
|
*/
|
|
1705
1705
|
use_images?: boolean;
|
|
1706
1706
|
};
|
|
@@ -1751,6 +1751,12 @@ type PublicIfElseNode = {
|
|
|
1751
1751
|
* PublicParseNode
|
|
1752
1752
|
*/
|
|
1753
1753
|
type PublicParseNode = {
|
|
1754
|
+
/**
|
|
1755
|
+
* Annotation Reading
|
|
1756
|
+
*
|
|
1757
|
+
* Standard mode, experimental: re-read handwritten numbers inside larger blocks on their own high-resolution crop, and mark handwriting in the markdown as <handwritten>. Ignored in agentic, lite and flash.
|
|
1758
|
+
*/
|
|
1759
|
+
annotation_reading?: boolean;
|
|
1754
1760
|
/**
|
|
1755
1761
|
* Cache
|
|
1756
1762
|
*
|
|
@@ -1981,8 +1987,7 @@ type ResultsResponseV3 = {
|
|
|
1981
1987
|
* Flat single-run read: lifecycle status plus results inline.
|
|
1982
1988
|
*
|
|
1983
1989
|
* `results` is `null` until the run reaches `processed`, then carries the
|
|
1984
|
-
*
|
|
1985
|
-
* returns — no separate results endpoint, no 412 while in flight.
|
|
1990
|
+
* results envelope — no separate results endpoint, no 412 while in flight.
|
|
1986
1991
|
*/
|
|
1987
1992
|
type RunDetailV3 = {
|
|
1988
1993
|
/**
|
|
@@ -2004,7 +2009,7 @@ type RunDetailV3 = {
|
|
|
2004
2009
|
*/
|
|
2005
2010
|
id: string;
|
|
2006
2011
|
/**
|
|
2007
|
-
* Extraction results envelope; `null` until `status` is `processed`.
|
|
2012
|
+
* Extraction results envelope; `null` until `status` is `processed`.
|
|
2008
2013
|
*/
|
|
2009
2014
|
results?: ResultsResponseV3 | null;
|
|
2010
2015
|
/**
|
|
@@ -2865,6 +2870,7 @@ declare class WorkflowBuilder {
|
|
|
2865
2870
|
lookupFiles?: string[];
|
|
2866
2871
|
lookupSuggestion?: string;
|
|
2867
2872
|
lookupReasoningEffort?: ReasoningEffort;
|
|
2873
|
+
/** @deprecated Retired: the server ignores it. */
|
|
2868
2874
|
useImages?: boolean;
|
|
2869
2875
|
}): this;
|
|
2870
2876
|
validate(rules: ValidationRule[], opts?: {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@anyformat/sdk",
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.8.0",
|
|
5
5
|
description: "TypeScript SDK for the AnyFormat API",
|
|
6
6
|
license: "MIT",
|
|
7
7
|
author: "Anyformat <info@anyformat.ai>",
|
|
@@ -23,7 +23,7 @@ var package_default = {
|
|
|
23
23
|
node: ">=18"
|
|
24
24
|
},
|
|
25
25
|
scripts: {
|
|
26
|
-
"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/
|
|
26
|
+
"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"',
|
|
27
27
|
"gen:client": "openapi-ts",
|
|
28
28
|
gen: "bun run gen:spec && bun run gen:client",
|
|
29
29
|
"gen:check": "bun run gen && git diff --exit-code -- openapi src/sdk",
|
|
@@ -1484,8 +1484,7 @@ var WorkflowBuilder = class {
|
|
|
1484
1484
|
extraction_schema: { fields },
|
|
1485
1485
|
...lookupFileUploads.length > 0 ? { lookup_file_uploads: lookupFileUploads } : {},
|
|
1486
1486
|
...opts.lookupSuggestion !== void 0 ? { lookup_suggestion: opts.lookupSuggestion } : {},
|
|
1487
|
-
...opts.lookupReasoningEffort !== void 0 ? { lookup_reasoning_effort: opts.lookupReasoningEffort } : {}
|
|
1488
|
-
...opts.useImages !== void 0 ? { use_images: opts.useImages } : {}
|
|
1487
|
+
...opts.lookupReasoningEffort !== void 0 ? { lookup_reasoning_effort: opts.lookupReasoningEffort } : {}
|
|
1489
1488
|
};
|
|
1490
1489
|
this.extracts.push([node, branchId]);
|
|
1491
1490
|
return this;
|