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,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
|
+
* The operation that created the job.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const JobOperation = {
|
|
19
|
+
Parse: 'parse',
|
|
20
|
+
Extract: 'extract',
|
|
21
|
+
};
|
|
22
|
+
export function instanceOfJobOperation(value) {
|
|
23
|
+
for (const key in JobOperation) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(JobOperation, key)) {
|
|
25
|
+
if (JobOperation[key] === value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
export function JobOperationFromJSON(json) {
|
|
33
|
+
return JobOperationFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function JobOperationFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
export function JobOperationToJSON(value) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
export function JobOperationToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
@@ -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 { JobSummary } from './JobSummary.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface JobPage
|
|
17
|
+
*/
|
|
18
|
+
export interface JobPage {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
jobs: Array<JobSummary>;
|
|
23
|
+
/**
|
|
24
|
+
* Opaque cursor for the next page, or null at the end.
|
|
25
|
+
*/
|
|
26
|
+
nextCursor: string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the JobPage interface.
|
|
30
|
+
*/
|
|
31
|
+
export declare function instanceOfJobPage(value: object): value is JobPage;
|
|
32
|
+
export declare function JobPageFromJSON(json: any): JobPage;
|
|
33
|
+
export declare function JobPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobPage;
|
|
34
|
+
export declare function JobPageToJSON(json: any): JobPage;
|
|
35
|
+
export declare function JobPageToJSONTyped(value?: JobPage | 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 { JobSummaryFromJSON, JobSummaryToJSON, } from './JobSummary.js';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the JobPage interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfJobPage(value) {
|
|
19
|
+
if (!('jobs' in value) || value['jobs'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if ((!('nextCursor' in value) && !('next_cursor' in value)) || (value['nextCursor'] === undefined && value['next_cursor'] === undefined))
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function JobPageFromJSON(json) {
|
|
26
|
+
return JobPageFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function JobPageFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'jobs': (json['jobs'].map(JobSummaryFromJSON)),
|
|
34
|
+
'nextCursor': json['next_cursor'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function JobPageToJSON(json) {
|
|
38
|
+
return JobPageToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function JobPageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'jobs': (value['jobs'].map(JobSummaryToJSON)),
|
|
46
|
+
'next_cursor': value['nextCursor'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { JobStatus } from './JobStatus.js';
|
|
13
|
+
import type { ParseResult } from './ParseResult.js';
|
|
14
|
+
import type { SourceFile } from './SourceFile.js';
|
|
15
|
+
/**
|
|
16
|
+
* A job's state, carrying parsed content as soon as it is available.
|
|
17
|
+
* @export
|
|
18
|
+
* @interface JobResult
|
|
19
|
+
*/
|
|
20
|
+
export interface JobResult {
|
|
21
|
+
/**
|
|
22
|
+
* Identifies one piece of work, whichever path submitted it. The same id the blocking call returns.
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
status: JobStatus;
|
|
29
|
+
/**
|
|
30
|
+
* The document's original uploaded filename.
|
|
31
|
+
*/
|
|
32
|
+
filename?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* The authoritative source/input file ID. This is the ID accepted by GET /api/v2/upload/{fileId}, never a job ID, result artifact ID, storage key, or signed URL. Null for legacy or unassociated jobs.
|
|
35
|
+
*/
|
|
36
|
+
fileId: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* True after cancellation has been requested for this job.
|
|
39
|
+
*/
|
|
40
|
+
cancellationRequested?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The associated original uploaded source file, when known.
|
|
43
|
+
*/
|
|
44
|
+
source?: SourceFile | null;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
error?: Error;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
result?: ParseResult;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the JobResult interface.
|
|
56
|
+
*/
|
|
57
|
+
export declare function instanceOfJobResult(value: object): value is JobResult;
|
|
58
|
+
export declare function JobResultFromJSON(json: any): JobResult;
|
|
59
|
+
export declare function JobResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobResult;
|
|
60
|
+
export declare function JobResultToJSON(json: any): JobResult;
|
|
61
|
+
export declare function JobResultToJSONTyped(value?: JobResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { JobStatusFromJSON, JobStatusToJSON, } from './JobStatus.js';
|
|
15
|
+
import { ParseResultFromJSON, ParseResultToJSON, } from './ParseResult.js';
|
|
16
|
+
import { SourceFileFromJSON, SourceFileToJSON, } from './SourceFile.js';
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the JobResult interface.
|
|
19
|
+
*/
|
|
20
|
+
export function instanceOfJobResult(value) {
|
|
21
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if ((!('fileId' in value) && !('file_id' in value)) || (value['fileId'] === undefined && value['file_id'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function JobResultFromJSON(json) {
|
|
30
|
+
return JobResultFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function JobResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'id': json['id'],
|
|
38
|
+
'status': JobStatusFromJSON(json['status']),
|
|
39
|
+
'filename': json['filename'] === undefined ? undefined : json['filename'] === null ? null : json['filename'],
|
|
40
|
+
'fileId': json['file_id'],
|
|
41
|
+
'cancellationRequested': json['cancellation_requested'] == null ? undefined : json['cancellation_requested'],
|
|
42
|
+
'source': json['source'] === undefined ? undefined : json['source'] === null ? null : SourceFileFromJSON(json['source']),
|
|
43
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
44
|
+
'result': json['result'] == null ? undefined : ParseResultFromJSON(json['result']),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function JobResultToJSON(json) {
|
|
48
|
+
return JobResultToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function JobResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'id': value['id'],
|
|
56
|
+
'status': JobStatusToJSON(value['status']),
|
|
57
|
+
'filename': value['filename'],
|
|
58
|
+
'file_id': value['fileId'],
|
|
59
|
+
'cancellation_requested': value['cancellationRequested'],
|
|
60
|
+
'source': SourceFileToJSON(value['source']),
|
|
61
|
+
'error': value['error'],
|
|
62
|
+
'result': ParseResultToJSON(value['result']),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -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
|
+
* Whether a result can be retrieved for this job.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const JobResultState: {
|
|
17
|
+
readonly NotReady: "not_ready";
|
|
18
|
+
readonly Available: "available";
|
|
19
|
+
readonly Unavailable: "unavailable";
|
|
20
|
+
};
|
|
21
|
+
export type JobResultState = typeof JobResultState[keyof typeof JobResultState];
|
|
22
|
+
export declare function instanceOfJobResultState(value: any): boolean;
|
|
23
|
+
export declare function JobResultStateFromJSON(json: any): JobResultState;
|
|
24
|
+
export declare function JobResultStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobResultState;
|
|
25
|
+
export declare function JobResultStateToJSON(value?: JobResultState | null): any;
|
|
26
|
+
export declare function JobResultStateToJSONTyped(value: any, ignoreDiscriminator: boolean): JobResultState;
|
|
@@ -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
|
+
* Whether a result can be retrieved for this job.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const JobResultState = {
|
|
19
|
+
NotReady: 'not_ready',
|
|
20
|
+
Available: 'available',
|
|
21
|
+
Unavailable: 'unavailable',
|
|
22
|
+
};
|
|
23
|
+
export function instanceOfJobResultState(value) {
|
|
24
|
+
for (const key in JobResultState) {
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(JobResultState, key)) {
|
|
26
|
+
if (JobResultState[key] === value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
export function JobResultStateFromJSON(json) {
|
|
34
|
+
return JobResultStateFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function JobResultStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
export function JobResultStateToJSON(value) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
export function JobResultStateToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 public job lifecycle status.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const JobStatus: {
|
|
17
|
+
readonly Queued: "queued";
|
|
18
|
+
readonly Processing: "processing";
|
|
19
|
+
readonly Failed: "failed";
|
|
20
|
+
readonly Completed: "completed";
|
|
21
|
+
readonly CompletedWithWarnings: "completed_with_warnings";
|
|
22
|
+
readonly Cancelled: "cancelled";
|
|
23
|
+
};
|
|
24
|
+
export type JobStatus = typeof JobStatus[keyof typeof JobStatus];
|
|
25
|
+
export declare function instanceOfJobStatus(value: any): boolean;
|
|
26
|
+
export declare function JobStatusFromJSON(json: any): JobStatus;
|
|
27
|
+
export declare function JobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobStatus;
|
|
28
|
+
export declare function JobStatusToJSON(value?: JobStatus | null): any;
|
|
29
|
+
export declare function JobStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): JobStatus;
|
|
@@ -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
|
+
* A public job lifecycle status.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const JobStatus = {
|
|
19
|
+
Queued: 'queued',
|
|
20
|
+
Processing: 'processing',
|
|
21
|
+
Failed: 'failed',
|
|
22
|
+
Completed: 'completed',
|
|
23
|
+
CompletedWithWarnings: 'completed_with_warnings',
|
|
24
|
+
Cancelled: 'cancelled',
|
|
25
|
+
};
|
|
26
|
+
export function instanceOfJobStatus(value) {
|
|
27
|
+
for (const key in JobStatus) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(JobStatus, key)) {
|
|
29
|
+
if (JobStatus[key] === value) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
export function JobStatusFromJSON(json) {
|
|
37
|
+
return JobStatusFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function JobStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
export function JobStatusToJSON(value) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
export function JobStatusToJSONTyped(value, ignoreDiscriminator) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { JobStatus } from './JobStatus.js';
|
|
13
|
+
import type { JobOperation } from './JobOperation.js';
|
|
14
|
+
import type { SourceFile } from './SourceFile.js';
|
|
15
|
+
import type { JobResultState } from './JobResultState.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface JobSummary
|
|
20
|
+
*/
|
|
21
|
+
export interface JobSummary {
|
|
22
|
+
/**
|
|
23
|
+
* Identifies one piece of work, whichever path submitted it. The same id the blocking call returns.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
operation: JobOperation;
|
|
30
|
+
/**
|
|
31
|
+
* The document's original uploaded filename.
|
|
32
|
+
*/
|
|
33
|
+
filename?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* The authoritative source/input file ID. This is the ID accepted by GET /api/v2/upload/{fileId}, never a job ID, result artifact ID, storage key, or signed URL. Null for legacy or unassociated jobs.
|
|
36
|
+
*/
|
|
37
|
+
fileId: string | null;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
status: JobStatus;
|
|
42
|
+
/**
|
|
43
|
+
* When the job was created.
|
|
44
|
+
*/
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
/**
|
|
47
|
+
* When the job status last changed.
|
|
48
|
+
*/
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
/**
|
|
51
|
+
* When the job reached a terminal status.
|
|
52
|
+
*/
|
|
53
|
+
completedAt: Date | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
resultState: JobResultState;
|
|
58
|
+
/**
|
|
59
|
+
* When the result stops being retrievable, if known.
|
|
60
|
+
*/
|
|
61
|
+
resultExpiresAt: Date | null;
|
|
62
|
+
/**
|
|
63
|
+
* The associated original uploaded source file, when known.
|
|
64
|
+
*/
|
|
65
|
+
source: SourceFile | null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the JobSummary interface.
|
|
69
|
+
*/
|
|
70
|
+
export declare function instanceOfJobSummary(value: object): value is JobSummary;
|
|
71
|
+
export declare function JobSummaryFromJSON(json: any): JobSummary;
|
|
72
|
+
export declare function JobSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobSummary;
|
|
73
|
+
export declare function JobSummaryToJSON(json: any): JobSummary;
|
|
74
|
+
export declare function JobSummaryToJSONTyped(value?: JobSummary | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
import { JobStatusFromJSON, JobStatusToJSON, } from './JobStatus.js';
|
|
16
|
+
import { JobOperationFromJSON, JobOperationToJSON, } from './JobOperation.js';
|
|
17
|
+
import { SourceFileFromJSON, SourceFileToJSON, } from './SourceFile.js';
|
|
18
|
+
import { JobResultStateFromJSON, JobResultStateToJSON, } from './JobResultState.js';
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the JobSummary interface.
|
|
21
|
+
*/
|
|
22
|
+
export function instanceOfJobSummary(value) {
|
|
23
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('operation' in value) || value['operation'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('fileId' in value) && !('file_id' in value)) || (value['fileId'] === undefined && value['file_id'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if ((!('updatedAt' in value) && !('updated_at' in value)) || (value['updatedAt'] === undefined && value['updated_at'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('completedAt' in value) && !('completed_at' in value)) || (value['completedAt'] === undefined && value['completed_at'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
if ((!('resultState' in value) && !('result_state' in value)) || (value['resultState'] === undefined && value['result_state'] === undefined))
|
|
38
|
+
return false;
|
|
39
|
+
if ((!('resultExpiresAt' in value) && !('result_expires_at' in value)) || (value['resultExpiresAt'] === undefined && value['result_expires_at'] === undefined))
|
|
40
|
+
return false;
|
|
41
|
+
if (!('source' in value) || value['source'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
export function JobSummaryFromJSON(json) {
|
|
46
|
+
return JobSummaryFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function JobSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'id': json['id'],
|
|
54
|
+
'operation': JobOperationFromJSON(json['operation']),
|
|
55
|
+
'filename': json['filename'] === undefined ? undefined : json['filename'] === null ? null : json['filename'],
|
|
56
|
+
'fileId': json['file_id'],
|
|
57
|
+
'status': JobStatusFromJSON(json['status']),
|
|
58
|
+
'createdAt': (json['created_at'] == null ? json['created_at'] : parseDateTime(json['created_at'])),
|
|
59
|
+
'updatedAt': (json['updated_at'] == null ? json['updated_at'] : parseDateTime(json['updated_at'])),
|
|
60
|
+
'completedAt': (json['completed_at'] == null ? null : parseDateTime(json['completed_at'])),
|
|
61
|
+
'resultState': JobResultStateFromJSON(json['result_state']),
|
|
62
|
+
'resultExpiresAt': (json['result_expires_at'] == null ? null : parseDateTime(json['result_expires_at'])),
|
|
63
|
+
'source': SourceFileFromJSON(json['source']),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function JobSummaryToJSON(json) {
|
|
67
|
+
return JobSummaryToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
export function JobSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
'id': value['id'],
|
|
75
|
+
'operation': JobOperationToJSON(value['operation']),
|
|
76
|
+
'filename': value['filename'],
|
|
77
|
+
'file_id': value['fileId'],
|
|
78
|
+
'status': JobStatusToJSON(value['status']),
|
|
79
|
+
'created_at': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
80
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : serializeDateTime(value['updatedAt']),
|
|
81
|
+
'completed_at': value['completedAt'] == null ? value['completedAt'] : serializeDateTime(value['completedAt']),
|
|
82
|
+
'result_state': JobResultStateToJSON(value['resultState']),
|
|
83
|
+
'result_expires_at': value['resultExpiresAt'] == null ? value['resultExpiresAt'] : serializeDateTime(value['resultExpiresAt']),
|
|
84
|
+
'source': SourceFileToJSON(value['source']),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 Locator
|
|
16
|
+
*/
|
|
17
|
+
export interface Locator {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
type: LocatorTypeEnum;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
elementId: string;
|
|
26
|
+
/**
|
|
27
|
+
* Supplementary context. Not an identity or join key.
|
|
28
|
+
*/
|
|
29
|
+
elementIndex?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const LocatorTypeEnum: {
|
|
35
|
+
readonly Element: "element";
|
|
36
|
+
};
|
|
37
|
+
export type LocatorTypeEnum = typeof LocatorTypeEnum[keyof typeof LocatorTypeEnum];
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the Locator interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfLocator(value: object): value is Locator;
|
|
42
|
+
export declare function LocatorFromJSON(json: any): Locator;
|
|
43
|
+
export declare function LocatorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Locator;
|
|
44
|
+
export declare function LocatorToJSON(json: any): Locator;
|
|
45
|
+
export declare function LocatorToJSONTyped(value?: Locator | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const LocatorTypeEnum = {
|
|
18
|
+
Element: 'element',
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the Locator interface.
|
|
22
|
+
*/
|
|
23
|
+
export function instanceOfLocator(value) {
|
|
24
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (value['type'] !== 'element')
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('elementId' in value) && !('element_id' in value)) || (value['elementId'] === undefined && value['element_id'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function LocatorFromJSON(json) {
|
|
33
|
+
return LocatorFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function LocatorFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'type': json['type'],
|
|
41
|
+
'elementId': json['element_id'],
|
|
42
|
+
'elementIndex': json['element_index'] == null ? undefined : json['element_index'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function LocatorToJSON(json) {
|
|
46
|
+
return LocatorToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function LocatorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'type': value['type'],
|
|
54
|
+
'element_id': value['elementId'],
|
|
55
|
+
'element_index': value['elementIndex'],
|
|
56
|
+
};
|
|
57
|
+
}
|