-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshared.ts
More file actions
81 lines (69 loc) · 1.98 KB
/
shared.ts
File metadata and controls
81 lines (69 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
/**
* One logical block of content from a parsed page.
*/
export interface ParsedBlock {
/**
* Unique ID of the block
*/
id: string;
/**
* The normalized bounding box of the block, as relative percentages of the page
* width and height
*/
bounding_box: ParsedBlock.BoundingBox;
/**
* The Markdown representation of the block
*/
markdown: string;
/**
* The type of the block
*/
type: 'heading' | 'text' | 'table' | 'figure';
/**
* The confidence level of this block categorized as 'low', 'medium', or 'high'.
* Only available for blocks of type 'table' currently.
*/
confidence_level?: 'low' | 'medium' | 'high';
/**
* The level of the block in the document hierarchy, starting at 0 for the
* root-level title block. Only present if `enable_document_hierarchy` was set to
* true in the request.
*/
hierarchy_level?: number;
/**
* The page (0-indexed) that this block belongs to. Only set for heading blocks
* that are returned in the table of contents.
*/
page_index?: number;
/**
* The IDs of the parent in the document hierarchy, sorted from root-level to
* bottom. For root-level heading blocks, this will be an empty list. Only present
* if `enable_document_hierarchy` was set to true in the request.
*/
parent_ids?: Array<string>;
}
export namespace ParsedBlock {
/**
* The normalized bounding box of the block, as relative percentages of the page
* width and height
*/
export interface BoundingBox {
/**
* The x-coordinate of the top-left corner of the bounding box
*/
x0: number;
/**
* The x-coordinate of the bottom-right corner of the bounding box
*/
x1: number;
/**
* The y-coordinate of the top-left corner of the bounding box
*/
y0: number;
/**
* The y-coordinate of the bottom-right corner of the bounding box
*/
y1: number;
}
}