unstructured-transform-client 0.18.18
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/LICENSE +21 -0
- package/README.md +210 -0
- package/dist/_generated/apis/ExtractApi.d.ts +43 -0
- package/dist/_generated/apis/ExtractApi.js +70 -0
- package/dist/_generated/apis/JobsApi.d.ts +117 -0
- package/dist/_generated/apis/JobsApi.js +211 -0
- package/dist/_generated/apis/ParseApi.d.ts +79 -0
- package/dist/_generated/apis/ParseApi.js +111 -0
- package/dist/_generated/apis/UploadApi.d.ts +78 -0
- package/dist/_generated/apis/UploadApi.js +172 -0
- package/dist/_generated/apis/index.d.ts +4 -0
- package/dist/_generated/apis/index.js +6 -0
- package/dist/_generated/index.d.ts +3 -0
- package/dist/_generated/index.js +5 -0
- package/dist/_generated/models/Citation.d.ts +31 -0
- package/dist/_generated/models/Citation.js +44 -0
- package/dist/_generated/models/DocumentMetadata.d.ts +30 -0
- package/dist/_generated/models/DocumentMetadata.js +43 -0
- package/dist/_generated/models/Element.d.ts +43 -0
- package/dist/_generated/models/Element.js +56 -0
- package/dist/_generated/models/ElementMetadata.d.ts +40 -0
- package/dist/_generated/models/ElementMetadata.js +51 -0
- package/dist/_generated/models/ErrorCode.d.ts +46 -0
- package/dist/_generated/models/ErrorCode.js +64 -0
- package/dist/_generated/models/ExtractRequest.d.ts +40 -0
- package/dist/_generated/models/ExtractRequest.js +49 -0
- package/dist/_generated/models/ExtractionResult.d.ts +37 -0
- package/dist/_generated/models/ExtractionResult.js +47 -0
- package/dist/_generated/models/FieldMetadata.d.ts +31 -0
- package/dist/_generated/models/FieldMetadata.js +42 -0
- package/dist/_generated/models/JobAccepted.d.ts +67 -0
- package/dist/_generated/models/JobAccepted.js +73 -0
- package/dist/_generated/models/JobOperation.d.ts +25 -0
- package/dist/_generated/models/JobOperation.js +43 -0
- package/dist/_generated/models/JobPage.d.ts +35 -0
- package/dist/_generated/models/JobPage.js +48 -0
- package/dist/_generated/models/JobResult.d.ts +61 -0
- package/dist/_generated/models/JobResult.js +64 -0
- package/dist/_generated/models/JobResultState.d.ts +26 -0
- package/dist/_generated/models/JobResultState.js +44 -0
- package/dist/_generated/models/JobStatus.d.ts +29 -0
- package/dist/_generated/models/JobStatus.js +47 -0
- package/dist/_generated/models/JobSummary.d.ts +74 -0
- package/dist/_generated/models/JobSummary.js +86 -0
- package/dist/_generated/models/Locator.d.ts +45 -0
- package/dist/_generated/models/Locator.js +57 -0
- package/dist/_generated/models/ModelError.d.ts +35 -0
- package/dist/_generated/models/ModelError.js +48 -0
- package/dist/_generated/models/OutputFormat.d.ts +25 -0
- package/dist/_generated/models/OutputFormat.js +43 -0
- package/dist/_generated/models/ParseResult.d.ts +87 -0
- package/dist/_generated/models/ParseResult.js +98 -0
- package/dist/_generated/models/SourceFile.d.ts +42 -0
- package/dist/_generated/models/SourceFile.js +56 -0
- package/dist/_generated/models/TransformStatus.d.ts +26 -0
- package/dist/_generated/models/TransformStatus.js +44 -0
- package/dist/_generated/models/TransformWarning.d.ts +34 -0
- package/dist/_generated/models/TransformWarning.js +47 -0
- package/dist/_generated/models/UploadResult.d.ts +38 -0
- package/dist/_generated/models/UploadResult.js +52 -0
- package/dist/_generated/models/index.d.ts +23 -0
- package/dist/_generated/models/index.js +25 -0
- package/dist/_generated/runtime.d.ts +196 -0
- package/dist/_generated/runtime.js +398 -0
- package/dist/client.d.ts +145 -0
- package/dist/client.js +259 -0
- package/dist/files.d.ts +32 -0
- package/dist/files.js +46 -0
- package/dist/hostHeaders.d.ts +36 -0
- package/dist/hostHeaders.js +133 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +35 -0
- package/dist/multipart.d.ts +50 -0
- package/dist/multipart.js +65 -0
- package/dist/outcome.d.ts +45 -0
- package/dist/outcome.js +40 -0
- package/dist/retry.d.ts +16 -0
- package/dist/retry.js +181 -0
- package/dist/sse.d.ts +50 -0
- package/dist/sse.js +140 -0
- package/dist/version.d.ts +10 -0
- package/dist/version.js +10 -0
- package/package.json +41 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ErrorCode } from './ErrorCode.js';
|
|
13
|
+
/**
|
|
14
|
+
* A machine-readable code and an actionable message.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ModelError
|
|
17
|
+
*/
|
|
18
|
+
export interface ModelError {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
code: ErrorCode;
|
|
23
|
+
/**
|
|
24
|
+
* What went wrong, and what to do about it.
|
|
25
|
+
*/
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the ModelError interface.
|
|
30
|
+
*/
|
|
31
|
+
export declare function instanceOfModelError(value: object): value is ModelError;
|
|
32
|
+
export declare function ModelErrorFromJSON(json: any): ModelError;
|
|
33
|
+
export declare function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError;
|
|
34
|
+
export declare function ModelErrorToJSON(json: any): ModelError;
|
|
35
|
+
export declare function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Unstructured Transform API
|
|
5
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ErrorCodeFromJSON, ErrorCodeToJSON, } from './ErrorCode.js';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ModelError interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfModelError(value) {
|
|
19
|
+
if (!('code' in value) || value['code'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function ModelErrorFromJSON(json) {
|
|
26
|
+
return ModelErrorFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function ModelErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'code': ErrorCodeFromJSON(json['code']),
|
|
34
|
+
'message': json['message'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function ModelErrorToJSON(json) {
|
|
38
|
+
return ModelErrorToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function ModelErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'code': ErrorCodeToJSON(value['code']),
|
|
46
|
+
'message': value['message'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Shape of the parsed output.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const OutputFormat: {
|
|
17
|
+
readonly Markdown: "markdown";
|
|
18
|
+
readonly Elements: "elements";
|
|
19
|
+
};
|
|
20
|
+
export type OutputFormat = typeof OutputFormat[keyof typeof OutputFormat];
|
|
21
|
+
export declare function instanceOfOutputFormat(value: any): boolean;
|
|
22
|
+
export declare function OutputFormatFromJSON(json: any): OutputFormat;
|
|
23
|
+
export declare function OutputFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutputFormat;
|
|
24
|
+
export declare function OutputFormatToJSON(value?: OutputFormat | null): any;
|
|
25
|
+
export declare function OutputFormatToJSONTyped(value: any, ignoreDiscriminator: boolean): OutputFormat;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Unstructured Transform API
|
|
5
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Shape of the parsed output.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const OutputFormat = {
|
|
19
|
+
Markdown: 'markdown',
|
|
20
|
+
Elements: 'elements',
|
|
21
|
+
};
|
|
22
|
+
export function instanceOfOutputFormat(value) {
|
|
23
|
+
for (const key in OutputFormat) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(OutputFormat, key)) {
|
|
25
|
+
if (OutputFormat[key] === value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
export function OutputFormatFromJSON(json) {
|
|
33
|
+
return OutputFormatFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function OutputFormatFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
export function OutputFormatToJSON(value) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
export function OutputFormatToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { TransformWarning } from './TransformWarning.js';
|
|
13
|
+
import type { DocumentMetadata } from './DocumentMetadata.js';
|
|
14
|
+
import type { TransformStatus } from './TransformStatus.js';
|
|
15
|
+
import type { Element } from './Element.js';
|
|
16
|
+
import type { ExtractionResult } from './ExtractionResult.js';
|
|
17
|
+
import type { SourceFile } from './SourceFile.js';
|
|
18
|
+
/**
|
|
19
|
+
* Parse operation metadata plus the canonical document, possibly before extraction has finished.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface ParseResult
|
|
22
|
+
*/
|
|
23
|
+
export interface ParseResult {
|
|
24
|
+
/**
|
|
25
|
+
* Underlying job id, for support and tracing.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
status: TransformStatus;
|
|
32
|
+
/**
|
|
33
|
+
* The effective profile used for raw-document partitioning.
|
|
34
|
+
*/
|
|
35
|
+
profile: ParseResultProfileEnum | null;
|
|
36
|
+
/**
|
|
37
|
+
* Rendered Markdown projection when requested; null when elements are requested.
|
|
38
|
+
*/
|
|
39
|
+
markdown: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* The document envelope version.
|
|
42
|
+
*/
|
|
43
|
+
formatVersion: ParseResultFormatVersionEnum;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
metadata: DocumentMetadata;
|
|
48
|
+
/**
|
|
49
|
+
* Completed extraction results are available only after extraction has finished.
|
|
50
|
+
*/
|
|
51
|
+
extractedData: Array<ExtractionResult> | null;
|
|
52
|
+
/**
|
|
53
|
+
* Notes about a result that still succeeded.
|
|
54
|
+
*/
|
|
55
|
+
warnings?: Array<TransformWarning>;
|
|
56
|
+
/**
|
|
57
|
+
* Public document elements.
|
|
58
|
+
*/
|
|
59
|
+
elements: Array<Element>;
|
|
60
|
+
/**
|
|
61
|
+
* The associated original uploaded source file, when known.
|
|
62
|
+
*/
|
|
63
|
+
source: SourceFile | null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @export
|
|
67
|
+
*/
|
|
68
|
+
export declare const ParseResultProfileEnum: {
|
|
69
|
+
readonly Balanced: "balanced";
|
|
70
|
+
readonly Best: "best";
|
|
71
|
+
};
|
|
72
|
+
export type ParseResultProfileEnum = typeof ParseResultProfileEnum[keyof typeof ParseResultProfileEnum];
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export declare const ParseResultFormatVersionEnum: {
|
|
77
|
+
readonly _20: "2.0";
|
|
78
|
+
};
|
|
79
|
+
export type ParseResultFormatVersionEnum = typeof ParseResultFormatVersionEnum[keyof typeof ParseResultFormatVersionEnum];
|
|
80
|
+
/**
|
|
81
|
+
* Check if a given object implements the ParseResult interface.
|
|
82
|
+
*/
|
|
83
|
+
export declare function instanceOfParseResult(value: object): value is ParseResult;
|
|
84
|
+
export declare function ParseResultFromJSON(json: any): ParseResult;
|
|
85
|
+
export declare function ParseResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ParseResult;
|
|
86
|
+
export declare function ParseResultToJSON(json: any): ParseResult;
|
|
87
|
+
export declare function ParseResultToJSONTyped(value?: ParseResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Unstructured Transform API
|
|
5
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { TransformWarningFromJSON, TransformWarningToJSON, } from './TransformWarning.js';
|
|
15
|
+
import { DocumentMetadataFromJSON, DocumentMetadataToJSON, } from './DocumentMetadata.js';
|
|
16
|
+
import { TransformStatusFromJSON, TransformStatusToJSON, } from './TransformStatus.js';
|
|
17
|
+
import { ElementFromJSON, ElementToJSON, } from './Element.js';
|
|
18
|
+
import { ExtractionResultFromJSON, ExtractionResultToJSON, } from './ExtractionResult.js';
|
|
19
|
+
import { SourceFileFromJSON, SourceFileToJSON, } from './SourceFile.js';
|
|
20
|
+
/**
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export const ParseResultProfileEnum = {
|
|
24
|
+
Balanced: 'balanced',
|
|
25
|
+
Best: 'best',
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export const ParseResultFormatVersionEnum = {
|
|
31
|
+
_20: '2.0',
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the ParseResult interface.
|
|
35
|
+
*/
|
|
36
|
+
export function instanceOfParseResult(value) {
|
|
37
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('profile' in value) || value['profile'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('markdown' in value) || value['markdown'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if ((!('formatVersion' in value) && !('format_version' in value)) || (value['formatVersion'] === undefined && value['format_version'] === undefined))
|
|
46
|
+
return false;
|
|
47
|
+
if (value['formatVersion'] !== '2.0' && value['format_version'] !== '2.0')
|
|
48
|
+
return false;
|
|
49
|
+
if (!('metadata' in value) || value['metadata'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if ((!('extractedData' in value) && !('extracted_data' in value)) || (value['extractedData'] === undefined && value['extracted_data'] === undefined))
|
|
52
|
+
return false;
|
|
53
|
+
if (!('elements' in value) || value['elements'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
if (!('source' in value) || value['source'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
export function ParseResultFromJSON(json) {
|
|
60
|
+
return ParseResultFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
export function ParseResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
'id': json['id'],
|
|
68
|
+
'status': TransformStatusFromJSON(json['status']),
|
|
69
|
+
'profile': json['profile'],
|
|
70
|
+
'markdown': json['markdown'],
|
|
71
|
+
'formatVersion': json['format_version'],
|
|
72
|
+
'metadata': DocumentMetadataFromJSON(json['metadata']),
|
|
73
|
+
'extractedData': (json['extracted_data'] == null ? null : json['extracted_data'].map(ExtractionResultFromJSON)),
|
|
74
|
+
'warnings': json['warnings'] == null ? undefined : (json['warnings'].map(TransformWarningFromJSON)),
|
|
75
|
+
'elements': (json['elements'].map(ElementFromJSON)),
|
|
76
|
+
'source': SourceFileFromJSON(json['source']),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export function ParseResultToJSON(json) {
|
|
80
|
+
return ParseResultToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
export function ParseResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
'id': value['id'],
|
|
88
|
+
'status': TransformStatusToJSON(value['status']),
|
|
89
|
+
'profile': value['profile'],
|
|
90
|
+
'markdown': value['markdown'],
|
|
91
|
+
'format_version': value['formatVersion'],
|
|
92
|
+
'metadata': DocumentMetadataToJSON(value['metadata']),
|
|
93
|
+
'extracted_data': (value['extractedData'] == null ? null : value['extractedData'].map(ExtractionResultToJSON)),
|
|
94
|
+
'warnings': value['warnings'] == null ? undefined : (value['warnings'].map(TransformWarningToJSON)),
|
|
95
|
+
'elements': (value['elements'].map(ElementToJSON)),
|
|
96
|
+
'source': SourceFileToJSON(value['source']),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A source file retained in the same 24-hour scratch storage used by explicit uploads. Polling jobs or downloading results does not extend this expiry. Callers may retrieve it with GET /api/v2/upload/{file_id} while it exists, and may delete it with DELETE /api/v2/upload/{file_id} without deleting the job or its result.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SourceFile
|
|
16
|
+
*/
|
|
17
|
+
export interface SourceFile {
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the uploaded source file.
|
|
20
|
+
*/
|
|
21
|
+
fileId: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* The filename supplied with the source document, when available.
|
|
24
|
+
*/
|
|
25
|
+
filename: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* The detected MIME type of the source file.
|
|
28
|
+
*/
|
|
29
|
+
mimetype: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* When the source file will be automatically deleted.
|
|
32
|
+
*/
|
|
33
|
+
expiresAt: Date | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the SourceFile interface.
|
|
37
|
+
*/
|
|
38
|
+
export declare function instanceOfSourceFile(value: object): value is SourceFile;
|
|
39
|
+
export declare function SourceFileFromJSON(json: any): SourceFile;
|
|
40
|
+
export declare function SourceFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceFile;
|
|
41
|
+
export declare function SourceFileToJSON(json: any): SourceFile;
|
|
42
|
+
export declare function SourceFileToJSONTyped(value?: SourceFile | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Unstructured Transform API
|
|
5
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { parseDateTime, serializeDateTime } from '../runtime.js';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the SourceFile interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfSourceFile(value) {
|
|
19
|
+
if ((!('fileId' in value) && !('file_id' in value)) || (value['fileId'] === undefined && value['file_id'] === undefined))
|
|
20
|
+
return false;
|
|
21
|
+
if (!('filename' in value) || value['filename'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('mimetype' in value) || value['mimetype'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if ((!('expiresAt' in value) && !('expires_at' in value)) || (value['expiresAt'] === undefined && value['expires_at'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function SourceFileFromJSON(json) {
|
|
30
|
+
return SourceFileFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function SourceFileFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'fileId': json['file_id'],
|
|
38
|
+
'filename': json['filename'],
|
|
39
|
+
'mimetype': json['mimetype'],
|
|
40
|
+
'expiresAt': (json['expires_at'] == null ? null : parseDateTime(json['expires_at'])),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function SourceFileToJSON(json) {
|
|
44
|
+
return SourceFileToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function SourceFileToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'file_id': value['fileId'],
|
|
52
|
+
'filename': value['filename'],
|
|
53
|
+
'mimetype': value['mimetype'],
|
|
54
|
+
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : serializeDateTime(value['expiresAt']),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Document processing or terminal status.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const TransformStatus: {
|
|
17
|
+
readonly Processing: "processing";
|
|
18
|
+
readonly Completed: "completed";
|
|
19
|
+
readonly CompletedWithWarnings: "completed_with_warnings";
|
|
20
|
+
};
|
|
21
|
+
export type TransformStatus = typeof TransformStatus[keyof typeof TransformStatus];
|
|
22
|
+
export declare function instanceOfTransformStatus(value: any): boolean;
|
|
23
|
+
export declare function TransformStatusFromJSON(json: any): TransformStatus;
|
|
24
|
+
export declare function TransformStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransformStatus;
|
|
25
|
+
export declare function TransformStatusToJSON(value?: TransformStatus | null): any;
|
|
26
|
+
export declare function TransformStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): TransformStatus;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Unstructured Transform API
|
|
5
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Document processing or terminal status.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const TransformStatus = {
|
|
19
|
+
Processing: 'processing',
|
|
20
|
+
Completed: 'completed',
|
|
21
|
+
CompletedWithWarnings: 'completed_with_warnings',
|
|
22
|
+
};
|
|
23
|
+
export function instanceOfTransformStatus(value) {
|
|
24
|
+
for (const key in TransformStatus) {
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(TransformStatus, key)) {
|
|
26
|
+
if (TransformStatus[key] === value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
export function TransformStatusFromJSON(json) {
|
|
34
|
+
return TransformStatusFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function TransformStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
export function TransformStatusToJSON(value) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
export function TransformStatusToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface TransformWarning
|
|
16
|
+
*/
|
|
17
|
+
export interface TransformWarning {
|
|
18
|
+
/**
|
|
19
|
+
* Stable identifier, safe to branch on.
|
|
20
|
+
*/
|
|
21
|
+
code: string;
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable detail.
|
|
24
|
+
*/
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the TransformWarning interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function instanceOfTransformWarning(value: object): value is TransformWarning;
|
|
31
|
+
export declare function TransformWarningFromJSON(json: any): TransformWarning;
|
|
32
|
+
export declare function TransformWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransformWarning;
|
|
33
|
+
export declare function TransformWarningToJSON(json: any): TransformWarning;
|
|
34
|
+
export declare function TransformWarningToJSONTyped(value?: TransformWarning | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Unstructured Transform API
|
|
5
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the TransformWarning interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfTransformWarning(value) {
|
|
18
|
+
if (!('code' in value) || value['code'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function TransformWarningFromJSON(json) {
|
|
25
|
+
return TransformWarningFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function TransformWarningFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'code': json['code'],
|
|
33
|
+
'message': json['message'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function TransformWarningToJSON(json) {
|
|
37
|
+
return TransformWarningToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function TransformWarningToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'code': value['code'],
|
|
45
|
+
'message': value['message'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unstructured Transform API
|
|
3
|
+
* One document in, the parsed document back. A single call takes a document and returns structured output — no job graph, no strategy selection, no model provider setup, and no polling loop. An optional schema switches the request from parse-only to parse-then-extract.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The result of uploading a file.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UploadResult
|
|
16
|
+
*/
|
|
17
|
+
export interface UploadResult {
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the uploaded file.
|
|
20
|
+
*/
|
|
21
|
+
fileId: string;
|
|
22
|
+
/**
|
|
23
|
+
* The detected MIME type of the file.
|
|
24
|
+
*/
|
|
25
|
+
mimetype: string;
|
|
26
|
+
/**
|
|
27
|
+
* When the file will be automatically deleted.
|
|
28
|
+
*/
|
|
29
|
+
expiresAt: Date;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the UploadResult interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfUploadResult(value: object): value is UploadResult;
|
|
35
|
+
export declare function UploadResultFromJSON(json: any): UploadResult;
|
|
36
|
+
export declare function UploadResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadResult;
|
|
37
|
+
export declare function UploadResultToJSON(json: any): UploadResult;
|
|
38
|
+
export declare function UploadResultToJSONTyped(value?: UploadResult | null, ignoreDiscriminator?: boolean): any;
|