unstructured-transform-client 0.18.95 → 0.18.97
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 +20 -0
- package/dist/_generated/apis/ExtractApi.d.ts +2 -2
- package/dist/_generated/apis/ExtractApi.js +2 -2
- package/dist/_generated/apis/ParseApi.d.ts +2 -2
- package/dist/_generated/apis/ParseApi.js +2 -2
- package/dist/_generated/apis/UploadApi.d.ts +2 -2
- package/dist/_generated/apis/UploadApi.js +2 -2
- package/dist/_generated/models/ElementMetadata.d.ts +4 -0
- package/dist/_generated/models/ElementMetadata.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -235,3 +235,23 @@ so `0.18.x` of this package describes `0.18.x` of the API.
|
|
|
235
235
|
Everything exported from the package root is public. The `_generated` directory
|
|
236
236
|
is not — it is produced from the OpenAPI contract at build time and may be
|
|
237
237
|
reorganised without notice.
|
|
238
|
+
|
|
239
|
+
## Parse element confidence
|
|
240
|
+
|
|
241
|
+
Request `output="elements"` in Python or `output: "elements"` in TypeScript
|
|
242
|
+
on Parse or Jobs GET to read stored element confidence. No extra `include`
|
|
243
|
+
option is needed. Read `element.metadata.parse_confidence` in Python and
|
|
244
|
+
`element.metadata.parseConfidence` in TypeScript. Terminal SSE event data
|
|
245
|
+
retains the wire name `result.elements[].metadata.parse_confidence`.
|
|
246
|
+
|
|
247
|
+
The wire value is a number from 0 to 1, rounded to four decimal places, or
|
|
248
|
+
null when unavailable. Historical responses may omit the field. Treat null
|
|
249
|
+
and omission as unavailable, never as zero. Custom validators pinned to an older
|
|
250
|
+
closed metadata schema must update that schema to accept the added field.
|
|
251
|
+
The score measures agreement
|
|
252
|
+
with OCR text; it is not a calibrated probability of correctness. All element
|
|
253
|
+
types can carry a score. Internal scoring details are not public fields.
|
|
254
|
+
|
|
255
|
+
The API consumes stored scores and does not calculate them. Adding this field
|
|
256
|
+
does not enable upstream scoring or establish deployment readiness. Extract
|
|
257
|
+
confidence is separate future work; extraction `data` keeps its natural shape.
|
|
@@ -31,12 +31,12 @@ export declare class ExtractApi extends runtime.BaseAPI {
|
|
|
31
31
|
*/
|
|
32
32
|
extractRunRequestOpts(requestParameters: ExtractRunRequest): Promise<runtime.RequestOpts>;
|
|
33
33
|
/**
|
|
34
|
-
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
34
|
+
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
35
35
|
* Extract fields from a parse or document
|
|
36
36
|
*/
|
|
37
37
|
extractRunRaw(requestParameters: ExtractRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ParseResult>>;
|
|
38
38
|
/**
|
|
39
|
-
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
39
|
+
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
40
40
|
* Extract fields from a parse or document
|
|
41
41
|
*/
|
|
42
42
|
extractRun(requestParameters: ExtractRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ParseResult>;
|
|
@@ -51,7 +51,7 @@ export class ExtractApi extends runtime.BaseAPI {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
54
|
+
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
55
55
|
* Extract fields from a parse or document
|
|
56
56
|
*/
|
|
57
57
|
async extractRunRaw(requestParameters, initOverrides) {
|
|
@@ -60,7 +60,7 @@ export class ExtractApi extends runtime.BaseAPI {
|
|
|
60
60
|
return new runtime.JSONApiResponse(response, (jsonValue) => ParseResultFromJSON(jsonValue));
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
63
|
+
* Takes either a parse ID or a document and a schema, then returns the fields. Multipart input is limited to 100 MB (104857600 bytes). Supported extensions are bmp, docx, heic, jpeg, jpg, pdf, png, pptx, and tiff.
|
|
64
64
|
* Extract fields from a parse or document
|
|
65
65
|
*/
|
|
66
66
|
async extractRun(requestParameters, initOverrides) {
|
|
@@ -63,12 +63,12 @@ export declare class ParseApi extends runtime.BaseAPI {
|
|
|
63
63
|
*/
|
|
64
64
|
parseRunRequestOpts(requestParameters: ParseRunRequest): Promise<runtime.RequestOpts>;
|
|
65
65
|
/**
|
|
66
|
-
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
66
|
+
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
67
67
|
* Parse a document
|
|
68
68
|
*/
|
|
69
69
|
parseRunRaw(requestParameters: ParseRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ParseResult>>;
|
|
70
70
|
/**
|
|
71
|
-
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
71
|
+
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
72
72
|
* Parse a document
|
|
73
73
|
*/
|
|
74
74
|
parseRun(requestParameters?: ParseRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ParseResult>;
|
|
@@ -88,7 +88,7 @@ export class ParseApi extends runtime.BaseAPI {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
91
|
+
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
92
92
|
* Parse a document
|
|
93
93
|
*/
|
|
94
94
|
async parseRunRaw(requestParameters, initOverrides) {
|
|
@@ -97,7 +97,7 @@ export class ParseApi extends runtime.BaseAPI {
|
|
|
97
97
|
return new runtime.JSONApiResponse(response, (jsonValue) => ParseResultFromJSON(jsonValue));
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
100
|
+
* Give us a document, get the parsed document back. For progress while a document processes, send Prefer wait=0, then open the 202\'s Location URL with Accept text/event-stream. Supplying schema adds an extraction step to the same job, so the document is parsed once. profile is optional; omitting it defaults to balanced. input is limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
101
101
|
* Parse a document
|
|
102
102
|
*/
|
|
103
103
|
async parseRun(requestParameters = {}, initOverrides) {
|
|
@@ -66,12 +66,12 @@ export declare class UploadApi extends runtime.BaseAPI {
|
|
|
66
66
|
*/
|
|
67
67
|
uploadRunRequestOpts(requestParameters: UploadRunRequest): Promise<runtime.RequestOpts>;
|
|
68
68
|
/**
|
|
69
|
-
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
69
|
+
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
70
70
|
* Upload a file
|
|
71
71
|
*/
|
|
72
72
|
uploadRunRaw(requestParameters: UploadRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadResult>>;
|
|
73
73
|
/**
|
|
74
|
-
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
74
|
+
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
75
75
|
* Upload a file
|
|
76
76
|
*/
|
|
77
77
|
uploadRun(requestParameters: UploadRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadResult>;
|
|
@@ -153,7 +153,7 @@ export class UploadApi extends runtime.BaseAPI {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
156
|
+
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
157
157
|
* Upload a file
|
|
158
158
|
*/
|
|
159
159
|
async uploadRunRaw(requestParameters, initOverrides) {
|
|
@@ -162,7 +162,7 @@ export class UploadApi extends runtime.BaseAPI {
|
|
|
162
162
|
return new runtime.JSONApiResponse(response, (jsonValue) => UploadResultFromJSON(jsonValue));
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
|
-
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
165
|
+
* Upload a file to 24-hour scratch storage for subsequent parse/extract operations. Direct raw Parse and raw-document Extract inputs are materialized through this same storage with the same expiry and deletion behavior. Limited to 100 MB (104857600 bytes) and to the supported extensions: bmp, docx, heic, jpeg, jpg, pdf, png, pptx, tiff.
|
|
166
166
|
* Upload a file
|
|
167
167
|
*/
|
|
168
168
|
async uploadRun(requestParameters, initOverrides) {
|
|
@@ -29,6 +29,10 @@ export interface ElementMetadata {
|
|
|
29
29
|
* Table HTML projection when requested.
|
|
30
30
|
*/
|
|
31
31
|
textAsHtml: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Agreement with OCR text rounded to four decimal places, or null when unavailable.
|
|
34
|
+
*/
|
|
35
|
+
parseConfidence?: number | null;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* Check if a given object implements the ElementMetadata interface.
|
|
@@ -34,6 +34,7 @@ export function ElementMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
34
34
|
'pageNumber': json['page_number'],
|
|
35
35
|
'coordinates': json['coordinates'],
|
|
36
36
|
'textAsHtml': json['text_as_html'],
|
|
37
|
+
'parseConfidence': json['parse_confidence'] === undefined ? undefined : json['parse_confidence'] === null ? null : json['parse_confidence'],
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
export function ElementMetadataToJSON(json) {
|
|
@@ -47,5 +48,6 @@ export function ElementMetadataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
47
48
|
'page_number': value['pageNumber'],
|
|
48
49
|
'coordinates': value['coordinates'],
|
|
49
50
|
'text_as_html': value['textAsHtml'],
|
|
51
|
+
'parse_confidence': value['parseConfidence'],
|
|
50
52
|
};
|
|
51
53
|
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED