functional-types
functional-types
Index
Modules
- "AnnotationPair"
- "Array/Arbitraries"
- "Array/index"
- "Comparable"
- "ComparableSchema"
- "Comparison"
- "DateTime"
- "DocumentAnnotation"
- "Excel"
- "FileType"
- "Folder/Arbitraries"
- "Folder/index"
- "Json"
- "Label"
- "Response"
- "Schema"
- "Serialize/Arbitraries"
- "Serialize/ComparableSchema"
- "Serialize/Schema"
- "Serialize/index"
- "String"
- "TableAnnotation"
- "TextAnnotation"
- "Types"
- "Vertex/Arbitraries"
- "Vertex/index"
- "Vision"
- "fp-ts/Reader"
- "fp-ts/ReaderIO"
- "fp-ts/TaskEither"
- "index"
Interfaces
functional-types › "AnnotationPair" › AnnotationPair
Interface: AnnotationPair
Hierarchy
- AnnotationPair
Index
Properties
Properties
left
• left: TableAnnotation
Defined in src/AnnotationPair.ts:7
right
• right: TextAnnotation
Defined in src/AnnotationPair.ts:8
functional-types › "Comparable" › Annotation
Interface: Annotation
Hierarchy
- Annotation
Index
Properties
Properties
file
• file: string
Defined in src/Comparable.ts:151
functional-types › "Comparable" › Comparable
Interface: Comparable <T>
Type parameters
▪ T
Hierarchy
- Comparable
Index
Properties
Properties
attributes
• attributes: Tree‹T›
Defined in src/Comparable.ts:111
created_at
• created_at: string
Defined in src/Comparable.ts:112
files
• files: string[]
Defined in src/Comparable.ts:110
id
• id: string
Defined in src/Comparable.ts:108
schema_id
• schema_id: string
Defined in src/Comparable.ts:109
updated_at
• updated_at: string
Defined in src/Comparable.ts:113
functional-types › "Comparable" › ComparableView
Interface: ComparableView
Hierarchy
-
object
↳ ComparableView
Index
Properties
Properties
attributes
• attributes: TreeView
Defined in src/Comparable.ts:129
functional-types › "Comparable" › FromLeafOptions
Interface: FromLeafOptions
Hierarchy
-
↳ FromLeafOptions
Index
Properties
Properties
Optional
key
• key? : Predicate
Inherited from FromTableOptions.key
Defined in src/Comparable.ts:139
Optional
mergeKey
• mergeKey? : boolean
Inherited from FromTableOptions.mergeKey
Defined in src/Comparable.ts:140
predicate
• predicate: Predicate
Defined in src/Comparable.ts:145
splitBy
• splitBy: Direction
Inherited from FromTableOptions.splitBy
Defined in src/Comparable.ts:141
functional-types › "Comparable" › FromTableOptions
Interface: FromTableOptions
Hierarchy
-
FromTableOptions
Index
Properties
Properties
Optional
key
• key? : Predicate
Defined in src/Comparable.ts:139
Optional
mergeKey
• mergeKey? : boolean
Defined in src/Comparable.ts:140
splitBy
• splitBy: Direction
Defined in src/Comparable.ts:141
functional-types › "Comparable" › Leaf
Interface: Leaf
Hierarchy
- Leaf
Index
Properties
Properties
Optional
metadata
• metadata? : Metadata
Defined in src/Comparable.ts:96
value
• value: string
Defined in src/Comparable.ts:95
functional-types › "Comparable" › Metadata
Interface: Metadata
Hierarchy
- Metadata
Index
Properties
Properties
Optional
bounding_poly
• bounding_poly? : Poly
Defined in src/Comparable.ts:89
Optional
excel_position
• excel_position? : Position
Defined in src/Comparable.ts:90
Optional
json_position
• json_position? : Reference
Defined in src/Comparable.ts:91
functional-types › "Comparable" › PartitionedGettables
Interface: PartitionedGettables <T>
Type parameters
▪ T: Annotation
Hierarchy
- PartitionedGettables
Index
Properties
Properties
annotation
• annotation: T
Defined in src/Comparable.ts:155
gettables
• gettables: S.Gettables
Defined in src/Comparable.ts:156
functional-types › "Comparable" › Partitions
Interface: Partitions
Hierarchy
- Partitions
Index
Properties
Properties
branchByLabel
• branchByLabel: Dictionary‹Branch›
Defined in src/Comparable.ts:133
cellByLabel
• cellByLabel: Dictionary‹D.CellByName›
Defined in src/Comparable.ts:135
tableByLabel
• tableByLabel: Dictionary‹D.TableByName›
Defined in src/Comparable.ts:134
functional-types › "Comparable" › Tree
Interface: Tree <T>
Type parameters
▪ T
Hierarchy
- Tree
Indexable
- [ index: string]: Node‹T›
functional-types › "ComparableSchema" › ComparableSchema
Interface: ComparableSchema
Hierarchy
-
↳ ComparableSchema
Index
Properties
Properties
created_at
• created_at: string
Defined in src/ComparableSchema.ts:27
id
• id: string
Defined in src/ComparableSchema.ts:25
left
• left: SchemaPath
Defined in src/Types.ts:21
name
• name: string
Defined in src/ComparableSchema.ts:26
right
• right: SchemaPath
Defined in src/Types.ts:22
updated_at
• updated_at: string
Defined in src/ComparableSchema.ts:28
functional-types › "Comparison" › Comparison
Interface: Comparison
Hierarchy
-
object
↳ Comparison
Index
Properties
Properties
file_type
• file_type: Pair‹DocumentType›
Defined in src/Comparison.ts:32
files
• files: Pair‹string[]›
Defined in src/Comparison.ts:30
schema_id
• schema_id: Pair‹string›
Defined in src/Comparison.ts:31
functional-types › "Comparison" › Leaf
Interface: Leaf
Hierarchy
- Leaf
Index
Properties
Properties
details
• details: string
Defined in src/Comparison.ts:18
label
• label: string
Defined in src/Comparison.ts:16
metadata
• metadata: Metadata
Defined in src/Comparison.ts:21
order
• order: Pair‹number›
Defined in src/Comparison.ts:20
severity
• severity: Severity
Defined in src/Comparison.ts:17
value
• value: Pair‹string›
Defined in src/Comparison.ts:19
functional-types › "DocumentAnnotation" › Branch
Interface: Branch
Hierarchy
-
↳ Branch
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
children
• children: Tree[]
Defined in src/DocumentAnnotation.ts:107
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
Optional
parent
• parent? : Branch
Defined in src/DocumentAnnotation.ts:106
functional-types › "DocumentAnnotation" › Cell
Interface: Cell
Hierarchy
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
text
• text: string
Defined in src/DocumentAnnotation.ts:78
words
• words: Word[]
Defined in src/DocumentAnnotation.ts:77
functional-types › "DocumentAnnotation" › Descendant
Interface: Descendant
Hierarchy
↳ Branch
↳ Descendant
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
children
• children: Leaf[]
Defined in src/DocumentAnnotation.ts:111
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
Optional
parent
• parent? : Branch
Defined in src/DocumentAnnotation.ts:106
functional-types › "DocumentAnnotation" › DocumentAnnotation
Interface: DocumentAnnotation
Hierarchy
- DocumentAnnotation
Index
Properties
Properties
created_at
• created_at: string
Defined in src/DocumentAnnotation.ts:126
file
• file: string
Defined in src/DocumentAnnotation.ts:124
forestByPage
• forestByPage: ForestByPage
Defined in src/DocumentAnnotation.ts:125
id
• id: string
Defined in src/DocumentAnnotation.ts:123
updated_at
• updated_at: string
Defined in src/DocumentAnnotation.ts:127
functional-types › "DocumentAnnotation" › Node
Interface: Node
Hierarchy
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/DocumentAnnotation.ts:73
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
functional-types › "DocumentAnnotation" › Table
Interface: Table
Hierarchy
-
↳ Table
Index
Properties
- boundingPoly
- cellById
- columnHeaders
- id
- intersectHeader
- label
- mergedColumnHeader
- mergedRowHeader
- rowHeaders
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
cellById
• cellById: TableCellById
Defined in src/DocumentAnnotation.ts:96
columnHeaders
• columnHeaders: Cell[]
Defined in src/DocumentAnnotation.ts:92
id
• id: string
Defined in src/DocumentAnnotation.ts:71
intersectHeader
• intersectHeader: Cell
Defined in src/DocumentAnnotation.ts:93
label
• label: string
Defined in src/DocumentAnnotation.ts:72
mergedColumnHeader
• mergedColumnHeader: Cell
Defined in src/DocumentAnnotation.ts:95
mergedRowHeader
• mergedRowHeader: Cell
Defined in src/DocumentAnnotation.ts:94
rowHeaders
• rowHeaders: Cell[]
Defined in src/DocumentAnnotation.ts:91
functional-types › "DocumentAnnotation" › TableCell
Interface: TableCell
Hierarchy
↳ Cell
↳ TableCell
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
columnHeader
• columnHeader: Cell
Defined in src/DocumentAnnotation.ts:85
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
rowHeader
• rowHeader: Cell
Defined in src/DocumentAnnotation.ts:84
text
• text: string
Defined in src/DocumentAnnotation.ts:78
words
• words: Word[]
Defined in src/DocumentAnnotation.ts:77
functional-types › "Excel" › Excel
Interface: Excel
Hierarchy
- Excel
Index
Properties
Properties
file
• file: string
Defined in src/Excel.ts:28
sheetByName
• sheetByName: SheetByName
Defined in src/Excel.ts:29
functional-types › "Excel" › Position
Interface: Position
Hierarchy
- Position
Index
Properties
Properties
cell
• cell: string
Defined in src/Excel.ts:19
file
• file: string
Defined in src/Excel.ts:17
sheet
• sheet: string
Defined in src/Excel.ts:18
functional-types › "Folder/index" › Attributes
Interface: Attributes
Hierarchy
- Attributes
Index
Properties
Properties
folder
• folder: string
Defined in src/Folder/index.ts:57
id
• id: string
Defined in src/Folder/index.ts:56
name
• name: string
Defined in src/Folder/index.ts:58
type
• type: FT.FileType
Defined in src/Folder/index.ts:59
functional-types › "Folder/index" › FilesReference
Interface: FilesReference
Hierarchy
- FilesReference
Index
Properties
Properties
files
• files: string[]
Defined in src/Folder/index.ts:85
functional-types › "Folder/index" › Folder
Interface: Folder
Hierarchy
- Folder
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Folder/index.ts:50
Optional
deleted_at
• deleted_at? : string
Defined in src/Folder/index.ts:52
id
• id: string
Defined in src/Folder/index.ts:47
name
• name: string
Defined in src/Folder/index.ts:48
tags
• tags: Tag[]
Defined in src/Folder/index.ts:49
updated_at
• updated_at: string
Defined in src/Folder/index.ts:51
functional-types › "Folder/index" › FolderReference
Interface: FolderReference
Hierarchy
- FolderReference
Index
Properties
Properties
folder
• folder: string
Defined in src/Folder/index.ts:81
functional-types › "Folder/index" › Metadata
Interface: Metadata
Hierarchy
- Metadata
Index
Properties
Properties
bucket
• bucket: string
Defined in src/Folder/index.ts:68
content_type
• content_type: string
Defined in src/Folder/index.ts:70
created_at
• created_at: string
Defined in src/Folder/index.ts:72
generation
• generation: string
Defined in src/Folder/index.ts:69
id
• id: string
Defined in src/Folder/index.ts:64
kind
• kind: string
Defined in src/Folder/index.ts:63
media_link
• media_link: string
Defined in src/Folder/index.ts:66
name
• name: string
Defined in src/Folder/index.ts:67
self_link
• self_link: string
Defined in src/Folder/index.ts:65
size
• size: string
Defined in src/Folder/index.ts:71
updated_at
• updated_at: string
Defined in src/Folder/index.ts:73
functional-types › "Folder/index" › Reference
Interface: Reference
Hierarchy
- Reference
Index
Properties
Properties
file
• file: string
Defined in src/Folder/index.ts:77
functional-types › "Label" › Label
Interface: Label
Hierarchy
- Label
Index
Properties
Properties
color
• color: string
Defined in src/Label.ts:6
id
• id: string
Defined in src/Label.ts:4
name
• name: string
Defined in src/Label.ts:5
functional-types › "Response" › Failure
Interface: Failure
Hierarchy
- Failure
Index
Properties
Properties
error
• error: string
Defined in src/Response.ts:25
functional-types › "Response" › Success
Interface: Success <T>
Type parameters
▪ T
Hierarchy
- Success
Index
Properties
Properties
message
• message: string
Defined in src/Response.ts:20
payload
• payload: T
Defined in src/Response.ts:21
functional-types › "Schema" › Filters
Interface: Filters
Hierarchy
- Filters
Index
Properties
Properties
Optional
keys
• keys? : RegExp[]
Defined in src/Schema.ts:43
Optional
values
• values? : RegExp[]
Defined in src/Schema.ts:44
functional-types › "Schema" › Gettable
Interface: Gettable
Hierarchy
- Gettable
Index
Properties
Properties
attribute
• attribute: Path
Defined in src/Schema.ts:86
file
• file: FilePath
Defined in src/Schema.ts:85
Optional
options
• options? : GettableOptions
Defined in src/Schema.ts:87
functional-types › "Schema" › GettableOptions
Interface: GettableOptions
Hierarchy
- GettableOptions
Index
Properties
Properties
Optional
direction
• direction? : Direction
Defined in src/Schema.ts:72
Optional
dividend
• dividend? : boolean
Defined in src/Schema.ts:81
Optional
end
• end? : RegExp
Defined in src/Schema.ts:79
Optional
filters
• filters? : Filters
Defined in src/Schema.ts:78
Optional
key
• key? : RegExp
Defined in src/Schema.ts:73
Optional
lifts
• lifts? : RegExp[]
Defined in src/Schema.ts:76
Optional
merge_type
• merge_type? : MergeType[]
Defined in src/Schema.ts:71
Optional
multiplies
• multiplies? : Multiply[]
Defined in src/Schema.ts:80
Optional
rejects
• rejects? : Filters
Defined in src/Schema.ts:77
Optional
replacements
• replacements? : Replacements
Defined in src/Schema.ts:74
Optional
unnest
• unnest? : number
Defined in src/Schema.ts:75
functional-types › "Schema" › Multiply
Interface: Multiply
Hierarchy
- Multiply
Index
Properties
Properties
pattern
• pattern: RegExp
Defined in src/Schema.ts:66
scale
• scale: number
Defined in src/Schema.ts:67
functional-types › "Schema" › Predicate
Interface: Predicate
Hierarchy
- Predicate
Index
Properties
Properties
Optional
properties
• properties? : Property[]
Defined in src/Schema.ts:54
value
• value: RegExp
Defined in src/Schema.ts:53
functional-types › "Schema" › Property
Interface: Property
Hierarchy
- Property
Index
Properties
Properties
pattern
• pattern: RegExp
Defined in src/Schema.ts:49
property
• property: string
Defined in src/Schema.ts:48
functional-types › "Schema" › Replacement
Interface: Replacement
Hierarchy
- Replacement
Index
Properties
Properties
pattern
• pattern: RegExp
Defined in src/Schema.ts:32
value
• value: string
Defined in src/Schema.ts:33
functional-types › "Schema" › Replacements
Interface: Replacements
Hierarchy
- Replacements
Index
Properties
Properties
Optional
keys
• keys? : Replacement[]
Defined in src/Schema.ts:37
Optional
leaf_values
• leaf_values? : Replacement[]
Defined in src/Schema.ts:39
Optional
values
• values? : Replacement[]
Defined in src/Schema.ts:38
functional-types › "Schema" › Schema
Interface: Schema
Hierarchy
- Schema
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Schema.ts:103
file_type
• file_type: DocumentType
Defined in src/Schema.ts:101
files
• files: FilePath[]
Defined in src/Schema.ts:100
gettables
• gettables: Gettables
Defined in src/Schema.ts:99
id
• id: string
Defined in src/Schema.ts:97
name
• name: string
Defined in src/Schema.ts:98
Optional
options
• options? : SchemaOptions
Defined in src/Schema.ts:102
updated_at
• updated_at: string
Defined in src/Schema.ts:104
functional-types › "Schema" › SchemaOptions
Interface: SchemaOptions
Hierarchy
- SchemaOptions
Index
Properties
Properties
Optional
merge
• merge? : boolean
Defined in src/Schema.ts:93
functional-types › "Serialize/ComparableSchema" › ComparableSchema
Interface: ComparableSchema
Hierarchy
-
↳ ComparableSchema
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Serialize/ComparableSchema.ts:13
id
• id: string
Defined in src/Serialize/ComparableSchema.ts:11
left
• left: SchemaPath
Defined in src/Types.ts:21
name
• name: string
Defined in src/Serialize/ComparableSchema.ts:12
right
• right: SchemaPath
Defined in src/Types.ts:22
updated_at
• updated_at: string
Defined in src/Serialize/ComparableSchema.ts:14
functional-types › "Serialize/Schema" › Filters
Interface: Filters
Hierarchy
- Filters
Index
Properties
Properties
Optional
keys
• keys? : string[]
Defined in src/Serialize/Schema.ts:45
Optional
values
• values? : string[]
Defined in src/Serialize/Schema.ts:46
functional-types › "Serialize/Schema" › Gettable
Interface: Gettable
Hierarchy
- Gettable
Index
Properties
Properties
attribute
• attribute: Path
Defined in src/Serialize/Schema.ts:86
file
• file: FilePath
Defined in src/Serialize/Schema.ts:85
Optional
options
• options? : GettableOptions
Defined in src/Serialize/Schema.ts:87
functional-types › "Serialize/Schema" › GettableOptions
Interface: GettableOptions
Hierarchy
- GettableOptions
Index
Properties
Properties
Optional
direction
• direction? : Direction
Defined in src/Serialize/Schema.ts:72
Optional
dividend
• dividend? : boolean
Defined in src/Serialize/Schema.ts:81
Optional
end
• end? : string
Defined in src/Serialize/Schema.ts:79
Optional
filters
• filters? : Filters
Defined in src/Serialize/Schema.ts:78
Optional
key
• key? : string
Defined in src/Serialize/Schema.ts:73
Optional
lifts
• lifts? : string[]
Defined in src/Serialize/Schema.ts:76
Optional
merge_type
• merge_type? : MergeType[]
Defined in src/Serialize/Schema.ts:71
Optional
multiplies
• multiplies? : Multiply[]
Defined in src/Serialize/Schema.ts:80
Optional
rejects
• rejects? : Filters
Defined in src/Serialize/Schema.ts:77
Optional
replacements
• replacements? : Replacements
Defined in src/Serialize/Schema.ts:74
Optional
unnest
• unnest? : number
Defined in src/Serialize/Schema.ts:75
functional-types › "Serialize/Schema" › Multiply
Interface: Multiply
Hierarchy
- Multiply
Index
Properties
Properties
pattern
• pattern: string
Defined in src/Serialize/Schema.ts:66
scale
• scale: number
Defined in src/Serialize/Schema.ts:67
functional-types › "Serialize/Schema" › Predicate
Interface: Predicate
Hierarchy
- Predicate
Index
Properties
Properties
Optional
properties
• properties? : Property[]
Defined in src/Serialize/Schema.ts:56
value
• value: string
Defined in src/Serialize/Schema.ts:55
functional-types › "Serialize/Schema" › Property
Interface: Property
Hierarchy
- Property
Index
Properties
Properties
pattern
• pattern: string
Defined in src/Serialize/Schema.ts:51
property
• property: string
Defined in src/Serialize/Schema.ts:50
functional-types › "Serialize/Schema" › Replacement
Interface: Replacement
Hierarchy
- Replacement
Index
Properties
Properties
pattern
• pattern: string
Defined in src/Serialize/Schema.ts:35
value
• value: string
Defined in src/Serialize/Schema.ts:36
functional-types › "Serialize/Schema" › Replacements
Interface: Replacements
Hierarchy
- Replacements
Index
Properties
Properties
Optional
keys
• keys? : Replacement[]
Defined in src/Serialize/Schema.ts:40
Optional
values
• values? : Replacement[]
Defined in src/Serialize/Schema.ts:41
functional-types › "Serialize/Schema" › Schema
Interface: Schema
Hierarchy
- Schema
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Serialize/Schema.ts:103
file_type
• file_type: DocumentType
Defined in src/Serialize/Schema.ts:101
files
• files: FilePath[]
Defined in src/Serialize/Schema.ts:100
gettables
• gettables: Gettables
Defined in src/Serialize/Schema.ts:99
id
• id: string
Defined in src/Serialize/Schema.ts:97
name
• name: string
Defined in src/Serialize/Schema.ts:98
Optional
options
• options? : SchemaOptions
Defined in src/Serialize/Schema.ts:102
updated_at
• updated_at: string
Defined in src/Serialize/Schema.ts:104
functional-types › "Serialize/Schema" › SchemaOptions
Interface: SchemaOptions
Hierarchy
- SchemaOptions
Index
Properties
Properties
Optional
merge
• merge? : boolean
Defined in src/Serialize/Schema.ts:93
functional-types › "TableAnnotation" › TableAnnotation
Interface: TableAnnotation
Hierarchy
- TableAnnotation
Index
Properties
Properties
boundingBoxesByPage
• boundingBoxesByPage: BoundingBoxesByPage
Defined in src/TableAnnotation.ts:34
created_at
• created_at: string
Defined in src/TableAnnotation.ts:35
file
• file: string
Defined in src/TableAnnotation.ts:33
id
• id: string
Defined in src/TableAnnotation.ts:32
updated_at
• updated_at: string
Defined in src/TableAnnotation.ts:36
functional-types › "TextAnnotation" › Page
Interface: Page
Hierarchy
- Page
Index
Properties
Properties
paragraphsById
• paragraphsById: ParagraphsById
Defined in src/TextAnnotation.ts:72
wordsById
• wordsById: WordsById
Defined in src/TextAnnotation.ts:71
functional-types › "TextAnnotation" › Paragraph
Interface: Paragraph
Hierarchy
- Paragraph
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/TextAnnotation.ts:62
confidence
• confidence: number
Defined in src/TextAnnotation.ts:63
id
• id: string
Defined in src/TextAnnotation.ts:61
functional-types › "TextAnnotation" › TextAnnotation
Interface: TextAnnotation
Hierarchy
- TextAnnotation
Index
Properties
Properties
created_at
• created_at: string
Defined in src/TextAnnotation.ts:79
file
• file: string
Defined in src/TextAnnotation.ts:77
id
• id: string
Defined in src/TextAnnotation.ts:76
pages
• pages: Page[]
Defined in src/TextAnnotation.ts:78
updated_at
• updated_at: string
Defined in src/TextAnnotation.ts:80
functional-types › "TextAnnotation" › Word
Interface: Word
Hierarchy
- Word
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/TextAnnotation.ts:55
breakType
• breakType: BreakType
Defined in src/TextAnnotation.ts:54
confidence
• confidence: number
Defined in src/TextAnnotation.ts:57
id
• id: string
Defined in src/TextAnnotation.ts:52
paragraph
• paragraph: string
Defined in src/TextAnnotation.ts:53
text
• text: string
Defined in src/TextAnnotation.ts:56
functional-types › "Types" › Pair
Interface: Pair <T>
Type parameters
▪ T
Hierarchy
-
Pair
Index
Properties
Properties
left
• left: T
Defined in src/Types.ts:21
right
• right: T
Defined in src/Types.ts:22
functional-types › "Vertex/index" › BoundingBox
Interface: BoundingBox
Hierarchy
-
BoundingBox
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/Vertex/index.ts:63
columns
• columns: Line[]
Defined in src/Vertex/index.ts:65
rows
• rows: Line[]
Defined in src/Vertex/index.ts:64
functional-types › "Vertex/index" › Corners
Interface: Corners
Hierarchy
- Corners
Index
Properties
Properties
end
• end: Vertex
Defined in src/Vertex/index.ts:99
start
• start: Vertex
Defined in src/Vertex/index.ts:98
functional-types › "Vertex/index" › LabeledBoundingBox
Interface: LabeledBoundingBox
Hierarchy
-
↳ LabeledBoundingBox
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from BoundingBox.boundingPoly
Defined in src/Vertex/index.ts:63
columns
• columns: Line[]
Inherited from BoundingBox.columns
Defined in src/Vertex/index.ts:65
id
• id: string
Defined in src/Vertex/index.ts:92
label
• label: string
Defined in src/Vertex/index.ts:93
rows
• rows: Line[]
Inherited from BoundingBox.rows
Defined in src/Vertex/index.ts:64
Optional
score
• score? : number
Defined in src/Vertex/index.ts:94
functional-types › "Vertex/index" › Rectangle
Interface: Rectangle
Hierarchy
- Rectangle
Index
Properties
Properties
x0
• x0: number
Defined in src/Vertex/index.ts:103
x1
• x1: number
Defined in src/Vertex/index.ts:105
y0
• y0: number
Defined in src/Vertex/index.ts:104
y1
• y1: number
Defined in src/Vertex/index.ts:106
functional-types › "Vertex/index" › Vertex
Interface: Vertex
Hierarchy
- Vertex
Index
Properties
Properties
x
• x: number
Defined in src/Vertex/index.ts:51
y
• y: number
Defined in src/Vertex/index.ts:52
functional-types › "Vision" › AnnotateImageRequest
Interface: AnnotateImageRequest
Hierarchy
- AnnotateImageRequest
Index
Properties
Properties
Optional
features
• features? : Feature[]
Defined in src/Vision.ts:48
image
• image: Image
Defined in src/Vision.ts:47
Optional
imageContext
• imageContext? : ImageContext
Defined in src/Vision.ts:49
functional-types › "Vision" › AnnotateImageResponse
Interface: AnnotateImageResponse
Hierarchy
- AnnotateImageResponse
Index
Properties
Properties
Optional
fullTextAnnotation
• fullTextAnnotation? : TextAnnotation
Defined in src/Vision.ts:63
Optional
labelAnnotations
• labelAnnotations? : EntityAnnotation[]
Defined in src/Vision.ts:54
Optional
textAnnotations
• textAnnotations? : EntityAnnotation[]
Defined in src/Vision.ts:57
functional-types › "Vision" › AsyncAnnotateFileRequest
Interface: AsyncAnnotateFileRequest
Hierarchy
- AsyncAnnotateFileRequest
Index
Properties
Properties
features
• features: Feature[]
Defined in src/Vision.ts:16
Optional
imageContext
• imageContext? : ImageContext
Defined in src/Vision.ts:17
inputConfig
• inputConfig: InputConfig
Defined in src/Vision.ts:15
outputConfig
• outputConfig: OutputConfig
Defined in src/Vision.ts:18
Optional
responses
• responses? : AnnotateImageResponse[]
Defined in src/Vision.ts:19
functional-types › "Vision" › Block
Interface: Block
Hierarchy
- Block
Index
Properties
Properties
blockType
• blockType: BlockType
Defined in src/Vision.ts:152
boundingBox
• boundingBox: BoundingPoly
Defined in src/Vision.ts:150
Optional
confidence
• confidence? : number
Defined in src/Vision.ts:153
paragraphs
• paragraphs: Paragraph[]
Defined in src/Vision.ts:151
Optional
property
• property? : TextProperty
Defined in src/Vision.ts:139
functional-types › "Vision" › BoundingPoly
Interface: BoundingPoly
Hierarchy
- BoundingPoly
Index
Properties
Properties
Optional
normalizedVertices
• normalizedVertices? : NormalizedVertex[]
Defined in src/Vision.ts:212
Optional
vertices
• vertices? : Vertex[]
Defined in src/Vision.ts:211
functional-types › "Vision" › DetectedBreak
Interface: DetectedBreak
Hierarchy
- DetectedBreak
Index
Properties
Properties
Optional
isPrefix
• isPrefix? : boolean
Defined in src/Vision.ts:199
type
• type: BreakType
Defined in src/Vision.ts:196
functional-types › "Vision" › DetectedLanguage
Interface: DetectedLanguage
Hierarchy
- DetectedLanguage
Index
Properties
Properties
Optional
confidence
• confidence? : number
Defined in src/Vision.ts:192
languageCode
• languageCode: string
Defined in src/Vision.ts:191
functional-types › "Vision" › EntityAnnotation
Interface: EntityAnnotation
Hierarchy
- EntityAnnotation
Index
Properties
Properties
Optional
boundingPoly
• boundingPoly? : BoundingPoly
Defined in src/Vision.ts:99
confidence
• confidence: number
Defined in src/Vision.ts:97
description
• description: string
Defined in src/Vision.ts:95
locale
• locale: string
Defined in src/Vision.ts:94
locations
• locations: LocationInfo[]
Defined in src/Vision.ts:100
mid
• mid: string
Defined in src/Vision.ts:93
properties
• properties: Property[]
Defined in src/Vision.ts:101
score
• score: number
Defined in src/Vision.ts:96
topicality
• topicality: number
Defined in src/Vision.ts:98
functional-types › "Vision" › Feature
Interface: Feature
Hierarchy
- Feature
Index
Properties
Properties
Optional
maxResult
• maxResult? : number
Defined in src/Vision.ts:78
Optional
model
• model? : "builtin/stable" | "builtin/latest"
Defined in src/Vision.ts:79
type
• type: Type
Defined in src/Vision.ts:77
functional-types › "Vision" › GcsDestination
Interface: GcsDestination
Hierarchy
- GcsDestination
Index
Properties
Properties
uri
• uri: string
Defined in src/Vision.ts:43
functional-types › "Vision" › GcsSource
Interface: GcsSource
Hierarchy
- GcsSource
Index
Properties
Properties
uri
• uri: string
Defined in src/Vision.ts:29
functional-types › "Vision" › Image
Interface: Image
Hierarchy
- Image
Index
Properties
Properties
Optional
content
• content? : Buffer
Defined in src/Vision.ts:67
Optional
source
• source? : ImageSource
Defined in src/Vision.ts:68
functional-types › "Vision" › ImageContext
Interface: ImageContext
Hierarchy
- ImageContext
Index
Properties
Properties
cropHintsParams
• cropHintsParams: unknown
Defined in src/Vision.ts:87
languageHints
• languageHints: string[]
Defined in src/Vision.ts:86
latLongRect
• latLongRect: unknown
Defined in src/Vision.ts:85
productSearchParams
• productSearchParams: unknown
Defined in src/Vision.ts:88
webDetectionParams
• webDetectionParams: unknown
Defined in src/Vision.ts:89
functional-types › "Vision" › ImageSource
Interface: ImageSource
Hierarchy
- ImageSource
Index
Properties
Properties
Optional
gcsImageUri
• gcsImageUri? : string
Defined in src/Vision.ts:72
Optional
imageUri
• imageUri? : string
Defined in src/Vision.ts:73
functional-types › "Vision" › InputConfig
Interface: InputConfig
Hierarchy
- InputConfig
Index
Properties
Properties
Optional
content
• content? : Buffer
Defined in src/Vision.ts:24
gcsSource
• gcsSource: GcsSource
Defined in src/Vision.ts:23
mimeType
• mimeType: string
Defined in src/Vision.ts:25
functional-types › "Vision" › LatLng
Interface: LatLng
Hierarchy
- LatLng
Index
Properties
Properties
latitude
• latitude: number
Defined in src/Vision.ts:250
longitude
• longitude: number
Defined in src/Vision.ts:252
functional-types › "Vision" › LocationInfo
Interface: LocationInfo
Hierarchy
- LocationInfo
Index
Properties
Properties
latLng
• latLng: LatLng
Defined in src/Vision.ts:216
functional-types › "Vision" › NormalizedVertex
Interface: NormalizedVertex
Hierarchy
-
↳ NormalizedVertex
Index
Properties
Properties
x
• x: number
Defined in src/Vision.ts:239
y
• y: number
Defined in src/Vision.ts:240
functional-types › "Vision" › OutputConfig
Interface: OutputConfig
Hierarchy
- OutputConfig
Index
Properties
Properties
Optional
batchSize
• batchSize? : number
Defined in src/Vision.ts:38
gcsDestination
• gcsDestination: GcsDestination
Defined in src/Vision.ts:39
functional-types › "Vision" › Page
Interface: Page
Hierarchy
- Page
Index
Properties
Properties
blocks
• blocks: Block[]
Defined in src/Vision.ts:127
Optional
confidence
• confidence? : number
Defined in src/Vision.ts:130
height
• height: number
Defined in src/Vision.ts:125
property
• property: TextProperty
Defined in src/Vision.ts:118
width
• width: number
Defined in src/Vision.ts:124
functional-types › "Vision" › Paragraph
Interface: Paragraph
Hierarchy
- Paragraph
Index
Properties
Properties
boundingBox
• boundingBox: BoundingPoly
Defined in src/Vision.ts:158
confidence
• confidence: number
Defined in src/Vision.ts:160
Optional
property
• property? : TextProperty
Defined in src/Vision.ts:157
words
• words: Word[]
Defined in src/Vision.ts:159
functional-types › "Vision" › Property
Interface: Property
Hierarchy
- Property
Index
Properties
Properties
name
• name: string
Defined in src/Vision.ts:220
uint64Value
• uint64Value: number
Defined in src/Vision.ts:222
value
• value: string
Defined in src/Vision.ts:221
functional-types › "Vision" › TextAnnotation
Interface: TextAnnotation
Hierarchy
- TextAnnotation
Index
Properties
Properties
pages
• pages: Page[]
Defined in src/Vision.ts:110
text
• text: string
Defined in src/Vision.ts:113
functional-types › "Vision" › TextProperty
Interface: TextProperty
Hierarchy
- TextProperty
Index
Properties
Properties
Optional
detectedBreak
• detectedBreak? : DetectedBreak
Defined in src/Vision.ts:135
detectedLanguages
• detectedLanguages: DetectedLanguage[]
Defined in src/Vision.ts:134
functional-types › "Vision" › TextSymbol
Interface: TextSymbol
Hierarchy
- TextSymbol
Index
Properties
Properties
Optional
boundingBox
• boundingBox? : BoundingPoly
Defined in src/Vision.ts:181
confidence
• confidence: number
Defined in src/Vision.ts:183
property
• property: TextProperty
Defined in src/Vision.ts:180
text
• text: string
Defined in src/Vision.ts:182
functional-types › "Vision" › Vertex
Interface: Vertex
Hierarchy
-
Vertex
Index
Properties
Properties
x
• x: number
Defined in src/Vision.ts:230
y
• y: number
Defined in src/Vision.ts:231
functional-types › "Vision" › Word
Interface: Word
Hierarchy
- Word
Index
Properties
Properties
boundingBox
• boundingBox: BoundingPoly
Defined in src/Vision.ts:174
confidence
• confidence: number
Defined in src/Vision.ts:176
Optional
property
• property? : TextProperty
Defined in src/Vision.ts:173
symbols
• symbols: TextSymbol[]
Defined in src/Vision.ts:175
Modules
functional-types › "AnnotationPair"
Module: "AnnotationPair"
Index
Interfaces
Functions
Functions
Const
isAnnotationPair
▸ isAnnotationPair(a
: unknown): a is AnnotationPair
Defined in src/AnnotationPair.ts:11
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is AnnotationPair
functional-types › "Array/Arbitraries"
Module: "Array/Arbitraries"
Index
Functions
Functions
Const
arrays
▸ arrays(): Arbitrary‹object›
Defined in src/Array/Arbitraries.ts:4
Returns: Arbitrary‹object›
functional-types › "Array/index"
Module: "Array/index"
Index
Functions
Functions
Const
includesAll
▸ includesAll<A>(a
: A[]): (Anonymous function)
Defined in src/Array/index.ts:9
includesAll :: [a] -> Reader [a] bool
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
a |
A[] |
Returns: (Anonymous function)
functional-types › "Comparable"
Module: "Comparable"
Index
Interfaces
- Annotation
- Comparable
- ComparableView
- FromLeafOptions
- FromTableOptions
- Leaf
- Metadata
- PartitionedGettables
- Partitions
- Tree
Type aliases
- AnnotationTransducer
- ComparableBase
- ComparableBasePredicate
- ComparablePredicate
- ComparablesByType
- Direction
- FromBranchOptions
- MakeComparables
- Mapping
- Node
- Path
- Predicate
- SchemaTransducer
- TreeByFile
- TreePredicate
- TreeView
Variables
- applyGettables
- applySchema
- applySchemaToDocumentAnnotations
- fromForest
- fromForestByLabel
- fromForestByPage
- fromTable
- fromTableByName
- getBranchOptionsFromGettables
- getKeysFromPredicate
- getLeafOptionsFromGettable
- getPredicateFromPathSegment
- hasNameSatisfyingFilePath
- isComparable
- isTree
- makeComparables
- mergeComparables
- nameSatisfiesFilePath
- postProcessTree
- view
Functions
- applyPath
- applySchemaWith
- filtersNode
- filtersTree
- findKeyFromPredicate
- findLeafFromPredicate
- fromBranch
- fromCell
- fromCellByName
- getKeyFromPredicate
- getTableOptions
- isComparableBaseSatisfying
- isComparableSatisfying
- isComparablesByType
- isLeaf
- isMetadata
- isTreeSatisfying
- leafs
- liftNode
- liftTree
- makeComparable
- makeComparablesWith
- makeLeaf
- partition
- partitionGettables
- rejectsNode
- rejectsTree
- satisfyProperties
- setKeys
- splitTable
- translateLeafValue
- translateNode
- translateTree
- unnest
- viewTree
Type aliases
AnnotationTransducer
Ƭ AnnotationTransducer: function
Defined in src/Comparable.ts:159
Type declaration:
▸ (annotation
: A): Reader‹S.Gettables, Tree›
Parameters:
Name | Type |
---|---|
annotation |
A |
ComparableBase
Ƭ ComparableBase: Omit‹Comparable‹T›, "id" | "created_at" | "updated_at"›
Defined in src/Comparable.ts:116
ComparableBasePredicate
Ƭ ComparableBasePredicate: TypePredicate‹ComparableBase‹T››
Defined in src/Comparable.ts:172
ComparablePredicate
Ƭ ComparablePredicate: TypePredicate‹Comparable‹T››
Defined in src/Comparable.ts:173
ComparablesByType
Ƭ ComparablesByType: Record‹FT.DocumentType, Comparable‹T›[]›
Defined in src/Comparable.ts:121
Direction
Ƭ Direction: "column" | "row"
Defined in src/Comparable.ts:83
FromBranchOptions
Ƭ FromBranchOptions: FromLeafOptions[]
Defined in src/Comparable.ts:148
MakeComparables
Ƭ MakeComparables: function
Defined in src/Comparable.ts:167
Type declaration:
▸ (annotations
: A[]): RIO.ReaderIO‹Schema, Comparable[]›
Parameters:
Name | Type |
---|---|
annotations |
A[] |
Mapping
Ƭ Mapping: Dictionary‹string›
Defined in src/Comparable.ts:86
Node
Ƭ Node: Tree‹T› | T
Defined in src/Comparable.ts:105
Path
Ƭ Path: Predicate[]
Defined in src/Comparable.ts:85
Predicate
Ƭ Predicate: function
Defined in src/Comparable.ts:84
Type declaration:
▸ (value
: string): boolean
Parameters:
Name | Type |
---|---|
value |
string |
SchemaTransducer
Ƭ SchemaTransducer: function
Defined in src/Comparable.ts:163
Type declaration:
▸ (annotations
: A[]): Reader‹Schema, TreeByFile›
Parameters:
Name | Type |
---|---|
annotations |
A[] |
TreeByFile
Ƭ TreeByFile: Dictionary‹Tree‹T››
Defined in src/Comparable.ts:103
TreePredicate
Ƭ TreePredicate: TypePredicate‹Tree‹T››
Defined in src/Comparable.ts:171
TreeView
Ƭ TreeView: Dictionary‹TreeView | string›
Defined in src/Comparable.ts:126
Variables
Const
applyGettables
• applyGettables: function = pipe( pipe(fromForestByLabel, R.local(getBranchOptionsFromGettables)), R.map<Tree, R.Reader<S.Gettable, O.Option>>( pipe(applyPath, R.local<S.Gettable, S.Path>(prop('attribute'))) ), R.chain( mapObjIndexed as ( fa: R.Reader<S.Gettable, O.Option> ) => R.Reader<S.Gettables, Dictionary<O.Option>> ), R.map(filter(O.isSome)), R.map(mapObjIndexed((some: O.Some) => some.value)) )
Defined in src/Comparable.ts:1011
applyGettables :: ForestByLabel -> Reader Gettables Tree
Type declaration:
▸ (forest
: D.ForestByLabel): Reader‹S.Gettables, Tree›
Parameters:
Name | Type |
---|---|
forest |
D.ForestByLabel |
Const
applySchema
• applySchema: function = applySchemaToDocumentAnnotations
Defined in src/Comparable.ts:1276
applySchema :: [DocumentAnnotation] -> Reader Schema TreeByFile
Type declaration:
▸ (annotations
: DocumentAnnotation[]): Reader‹Schema, TreeByFile›
Parameters:
Name | Type |
---|---|
annotations |
DocumentAnnotation[] |
Const
applySchemaToDocumentAnnotations
• applySchemaToDocumentAnnotations: function = applySchemaWith( pipe(prop('forestByPage'), D.mergeForestByPage, applyGettables) )
Defined in src/Comparable.ts:1266
applySchemaToDocumentAnnotations :: [DocumentAnnotation] -> Reader Schema TreeByFile
Type declaration:
▸ (annotations
: DocumentAnnotation[]): Reader‹Schema, TreeByFile›
Parameters:
Name | Type |
---|---|
annotations |
DocumentAnnotation[] |
Const
fromForest
• fromForest: function = pipe(D.mergeForest, fromForestByLabel)
Defined in src/Comparable.ts:685
fromForest :: Forest -> Reader FromBranchOptions Tree
Type declaration:
▸ (forest
: D.Forest): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
forest |
D.Forest |
Const
fromForestByLabel
• fromForestByLabel: function = pipe( mapObjIndexed(fromBranch), sequenceS(R.reader) )
Defined in src/Comparable.ts:673
fromForestByLabel :: ForestByLabel -> Reader FromBranchOptions Tree
Type declaration:
▸ (forest
: D.ForestByLabel): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
forest |
D.ForestByLabel |
Const
fromForestByPage
• fromForestByPage: function = pipe( D.mergeForestByPage, fromForestByLabel )
Defined in src/Comparable.ts:694
fromForestByPage :: ForestByPage -> Reader FromBranchOptions Tree
Type declaration:
▸ (forestByPage
: D.ForestByPage): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
forestByPage |
D.ForestByPage |
Const
fromTable
• fromTable: function = pipe(splitTable, R.chain(setKeys))
Defined in src/Comparable.ts:493
fromTable :: Table -> Reader FromTableOptions Tree
Type declaration:
▸ (table
: Table): Reader‹FromTableOptions, Tree›
Parameters:
Name | Type |
---|---|
table |
Table |
Const
fromTableByName
• fromTableByName: function = pipe( mapObjIndexed<D.Table, R.Reader<FromBranchOptions, O.Option>, string>( (table, key) => pipe(getTableOptions(key), O.map(fromTable(table))) ), sequenceS(R.reader), R.map( pipe( mapObjIndexed<O.Option, Tree | false>( O.getOrElse<Tree | false>(() => false) ), reject<Tree | false>(equals(false)) as R.Reader< Dictionary<Tree | false>, Tree > ) ) )
Defined in src/Comparable.ts:593
fromTableByName :: TableByName -> Reader FromBranchOptions Tree
Type declaration:
▸ (tables
: D.TableByName): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
tables |
D.TableByName |
Const
getBranchOptionsFromGettables
• getBranchOptionsFromGettables: function = pipe( values as R.Reader<S.Gettables, S.Gettable[]>, arrayMap(getLeafOptionsFromGettable) )
Defined in src/Comparable.ts:788
getBranchOptionsFromGettables :: Gettables -> FromBranchOptions
Type declaration:
▸ (gettables
: S.Gettables): FromBranchOptions
Parameters:
Name | Type |
---|---|
gettables |
S.Gettables |
Const
getKeysFromPredicate
• getKeysFromPredicate: function = pipe( mapObjIndexed((node: Tree, key: string) => pipe(getKeyFromPredicate, R.map(O.getOrElse(() => key)))(node) ), sequenceS(R.reader) )
Defined in src/Comparable.ts:458
getKeysFromPredicate :: Tree -> Reader Predicate String
Type declaration:
▸ (tree
: Tree): Reader‹Predicate, Mapping›
Parameters:
Name | Type |
---|---|
tree |
Tree |
Const
getLeafOptionsFromGettable
• getLeafOptionsFromGettable: function = applySpec({ predicate: getPredicateFromGettable, key: getKeyPredicateFromGettable, mergeKey: hasMergeType('header'), splitBy: getDirectionFromGettable, })
Defined in src/Comparable.ts:774
getLeafOptionsFromGettable :: Gettable -> FromLeafOptions
Type declaration:
▸ (gettable
: Gettable): FromLeafOptions
Parameters:
Name | Type |
---|---|
gettable |
Gettable |
Const
getPredicateFromPathSegment
• getPredicateFromPathSegment: function = pipe(when(S.isPredicate, prop('value')), regExpTest)
Defined in src/Comparable.ts:800
getPredicateFromPathSegment :: PathSegment -> Predicate
Type declaration:
▸ (segment
: PathSegment): Predicate
Parameters:
Name | Type |
---|---|
segment |
PathSegment |
Const
hasNameSatisfyingFilePath
• hasNameSatisfyingFilePath: function = pipe(nameSatisfiesFilePath, any)
Defined in src/Comparable.ts:1041
hasNameSatisfyingFilePath :: FilePath -> Reader [String] Bool
Type declaration:
▸ (filepath
: S.FilePath): Reader‹string[], boolean›
Parameters:
Name | Type |
---|---|
filepath |
S.FilePath |
Const
isComparable
• isComparable: ComparablePredicate‹Leaf› = isComparableSatisfying( isLeaf )
Defined in src/Comparable.ts:287
isComparable :: a -> bool
Const
isTree
• isTree: TreePredicate‹Leaf› = isTreeSatisfying(isLeaf)
Defined in src/Comparable.ts:235
isTree :: a -> bool
Const
makeComparables
• makeComparables: MakeComparables‹DocumentAnnotation› = pipe( reject(propSatisfies(isEmpty, 'forestByPage')), makeComparablesWith(applySchema) )
Defined in src/Comparable.ts:1378
makeComparables :: [DocumentAnnotation] -> ReaderIO Schema [Comparable]
Const
mergeComparables
• mergeComparables: function = pipe( reduce< Comparable | Record<string, unknown>, Comparable | Record<string, unknown>
( (acc, value) => mergeDeepRight( acc, assoc( 'files', concat( (acc.files ?? []) as string[], (value.files ?? []) as string[] ), value ) ), {} ), O.fromPredicate(isComparable), O.map( evolve({ files: uniq, }) as R.Reader<Comparable, Comparable> ) )
Defined in src/Comparable.ts:1307
mergeComparables :: [Comparable] -> Comparable
Type declaration:
▸ (comparables
: Comparable[]): O.Option‹Comparable›
Parameters:
Name | Type |
---|---|
comparables |
Comparable[] |
Const
nameSatisfiesFilePath
• nameSatisfiesFilePath: function = pipe(head, regExpTest)
Defined in src/Comparable.ts:1032
nameSatisfiesFilePath :: String -> Reader FilePath Bool
Type declaration:
▸ (filepath
: S.FilePath): Reader‹string, boolean›
Parameters:
Name | Type |
---|---|
filepath |
S.FilePath |
Const
postProcessTree
• postProcessTree: function = pipe( mergeTreeFromGettables, R.chain(rejectsTree), R.chain(filtersTree), R.chain(unnestTreeFromGettables), R.chain(translateTree), R.chain(liftTree) )
Defined in src/Comparable.ts:1227
postProcessTree :: Tree -> Reader Gettables Tree
Type declaration:
▸ (tree
: Tree): Reader‹S.Gettables, Tree›
Parameters:
Name | Type |
---|---|
tree |
Tree |
Const
view
• view: function = evolve({ attributes: viewTree, })
Defined in src/Comparable.ts:715
view :: Comparable -> ComparableView
Type declaration:
▸ (comparable
: Comparable): ComparableView
Parameters:
Name | Type |
---|---|
comparable |
Comparable |
Functions
Const
applyPath
▸ applyPath(node
: Leaf | Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:838
applyPath :: Tree -> Reader Path (Option Tree)
Parameters:
Name | Type |
---|---|
node |
Leaf | Tree‹Leaf› |
Returns: (Anonymous function)
Const
applySchemaWith
▸ applySchemaWith<A>(fa
: function): function
Defined in src/Comparable.ts:1245
applySchemaWith :: Reader (PartitionedGettables A) Tree -> [A] -> Reader Schema TreeByFile
Type parameters:
▪ A: Annotation
Parameters:
▪ fa: function
▸ (annotation
: A): Reader‹S.Gettables, Tree›
Parameters:
Name | Type |
---|---|
annotation |
A |
Returns: function
▸ (x0
: V0): T2
Parameters:
Name | Type |
---|---|
x0 |
V0 |
Const
filtersNode
▸ filtersNode(node
: Leaf | Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:984
filtersNode :: Node -> Reader Filters Node
Parameters:
Name | Type |
---|---|
node |
Leaf | Tree‹Leaf› |
Returns: (Anonymous function)
Const
filtersTree
▸ filtersTree(tree
: Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:1143
filtersTree :: Tree -> Reader Gettables Tree
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: (Anonymous function)
Const
findKeyFromPredicate
▸ findKeyFromPredicate(tree
: Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:420
findKeyFromPredicate :: Tree -> Reader Predicate (Option String)
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: (Anonymous function)
Const
findLeafFromPredicate
▸ findLeafFromPredicate(tree
: Tree‹Leaf›): Reader‹function, None | Some‹Leaf››
Defined in src/Comparable.ts:432
findLeafFromPredicate :: Tree -> Reader Predicate (Option Node)
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: Reader‹function, None | Some‹Leaf››
fromBranch
▸ fromBranch(branch
: Branch): Reader‹FromBranchOptions, Tree›
Defined in src/Comparable.ts:640
fromBranch :: Branch -> Reader FromBranchOptions Tree
Parameters:
Name | Type |
---|---|
branch |
Branch |
Returns: Reader‹FromBranchOptions, Tree›
Const
fromCell
▸ fromCell(cell
: Cell): object
Defined in src/Comparable.ts:618
fromCell :: Cell -> Node
Parameters:
Name | Type |
---|---|
cell |
Cell |
Returns: object
-
value: string = cell.text
-
### metadata: object
Const
fromCellByName
▸ fromCellByName(cells
: Dictionary‹Cell›): (Anonymous function)
Defined in src/Comparable.ts:632
fromCellByName :: CellByName -> Reader FromBranchOptions Node
Parameters:
Name | Type |
---|---|
cells |
Dictionary‹Cell› |
Returns: (Anonymous function)
Const
getKeyFromPredicate
▸ getKeyFromPredicate(tree
: Tree‹Leaf›): Reader‹function, None | Some‹string››
Defined in src/Comparable.ts:446
getKeyFromPredicate :: Tree -> Reader Predicate (Option String)
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: Reader‹function, None | Some‹string››
Const
getTableOptions
▸ getTableOptions(key
: string): function
Defined in src/Comparable.ts:582
getTableOptions :: String -> Reader FromBranchOptions (Option FromTableOptions)
Parameters:
Name | Type |
---|---|
key |
string |
Returns: function
▸ (x0
: V0): T2
Parameters:
Name | Type |
---|---|
x0 |
V0 |
isComparableBaseSatisfying
▸ isComparableBaseSatisfying<T>(predicate
: TypePredicate‹T›): ComparableBasePredicate‹T›
Defined in src/Comparable.ts:242
isComparableBaseSatisfying :: a -> bool
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
predicate |
TypePredicate‹T› |
Returns: ComparableBasePredicate‹T›
isComparableSatisfying
▸ isComparableSatisfying<T>(predicate
: TypePredicate‹T›): ComparablePredicate‹T›
Defined in src/Comparable.ts:265
isComparableSatisfying :: a -> bool
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
predicate |
TypePredicate‹T› |
Returns: ComparablePredicate‹T›
Const
isComparablesByType
▸ isComparablesByType(a
: unknown): a is ComparablesByType
Defined in src/Comparable.ts:296
isComparablesByType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ComparablesByType
Const
isLeaf
▸ isLeaf(a
: unknown): a is Leaf
Defined in src/Comparable.ts:193
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Leaf
Const
isMetadata
▸ isMetadata(a
: unknown): a is Metadata
Defined in src/Comparable.ts:180
isMetadata :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Metadata
isTreeSatisfying
▸ isTreeSatisfying<T>(predicate
: TypePredicate‹T›): TreePredicate‹T›
Defined in src/Comparable.ts:205
isTreeSatisfying :: a -> bool
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
predicate |
TypePredicate‹T› |
Returns: TreePredicate‹T›
Const
leafs
▸ leafs<T>(predicate
: TypePredicate‹T›): Reader‹Tree‹T›, T[]›
Defined in src/Comparable.ts:311
leafs :: Tree -> Leaf[]
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
predicate |
TypePredicate‹T› |
Returns: Reader‹Tree‹T›, T[]›
Const
liftNode
▸ liftNode(node
: Leaf | Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:938
liftNode :: Node -> Reader Path Node
Parameters:
Name | Type |
---|---|
node |
Leaf | Tree‹Leaf› |
Returns: (Anonymous function)
Const
liftTree
▸ liftTree(tree
: Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:1117
liftTree :: Tree -> Reader Gettables Tree
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: (Anonymous function)
Const
makeComparable
▸ makeComparable(tree
: Tree‹Leaf›, file
: string): (Anonymous function)
Defined in src/Comparable.ts:1288
makeComparables :: (Tree, String) -> ReaderIO Schema Comparable
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
file |
string |
Returns: (Anonymous function)
Const
makeComparablesWith
▸ makeComparablesWith(fa
: function): function
Defined in src/Comparable.ts:1343
makeComparablesWith :: [DocumentAnnotation] -> ReaderIO Schema [Comparable]
Parameters:
▪ fa: function
▸ (annotations
: A[]): Reader‹Schema, TreeByFile›
Parameters:
Name | Type |
---|---|
annotations |
A[] |
Returns: function
▸ (x
: V0): T3
Parameters:
Name | Type |
---|---|
x |
V0 |
Const
makeLeaf
▸ makeLeaf(value
: string): object
Defined in src/Comparable.ts:364
makeLeaf :: String -> Leaf
Parameters:
Name | Type |
---|---|
value |
string |
Returns: object
- value: string
Const
partition
▸ partition(branch
: Branch): (Anonymous function)
Defined in src/Comparable.ts:560
partition :: Descendant -> Reader FromBranchOptions Format DescendantByLabel
Parameters:
Name | Type |
---|---|
branch |
Branch |
Returns: (Anonymous function)
Const
partitionGettables
▸ partitionGettables<T>(annotations
: T[]): function
Defined in src/Comparable.ts:1062
partitionGettables :: [DocumentAnnotation] -> Reader Gettables (Dictionary Gettables)
Type parameters:
▪ T: Annotation
Parameters:
Name | Type |
---|---|
annotations |
T[] |
Returns: function
▸ (x
: V0): T5
Parameters:
Name | Type |
---|---|
x |
V0 |
Const
rejectsNode
▸ rejectsNode(node
: Leaf | Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:957
rejectsNode :: Node -> Reader Filters Node
Parameters:
Name | Type |
---|---|
node |
Leaf | Tree‹Leaf› |
Returns: (Anonymous function)
Const
rejectsTree
▸ rejectsTree(tree
: Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:1130
rejectsTree :: Tree -> Reader Gettables Tree
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: (Anonymous function)
Const
satisfyProperties
▸ satisfyProperties(node
: Leaf | Tree‹Leaf›): function
Defined in src/Comparable.ts:822
satisfyProperties :: Tree -> Reader [Property] Bool
Parameters:
Name | Type |
---|---|
node |
Leaf | Tree‹Leaf› |
Returns: function
▸ (list
: keyof T[]): boolean
Parameters:
Name | Type |
---|---|
list |
keyof T[] |
Const
setKeys
▸ setKeys(tree
: Tree‹Leaf›): Reader‹FromTableOptions, object›
Defined in src/Comparable.ts:472
setKeys :: Tree -> Reader PredicateStr Tree
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: Reader‹FromTableOptions, object›
Const
splitTable
▸ splitTable(table
: Table): (Anonymous function)
Defined in src/Comparable.ts:392
splitTable :: Table -> Reader Direction Tree
Parameters:
Name | Type |
---|---|
table |
Table |
Returns: (Anonymous function)
Const
translateLeafValue
▸ translateLeafValue(leaf
: Leaf): (Anonymous function)
Defined in src/Comparable.ts:887
translateLeafValue :: Leaf -> Reader Replacements Leaf
Parameters:
Name | Type |
---|---|
leaf |
Leaf |
Returns: (Anonymous function)
Const
translateNode
▸ translateNode(node
: Leaf | Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:901
translateNode :: Node -> Reader Replacements Node
Parameters:
Name | Type |
---|---|
node |
Leaf | Tree‹Leaf› |
Returns: (Anonymous function)
Const
translateTree
▸ translateTree(tree
: Tree‹Leaf›): (Anonymous function)
Defined in src/Comparable.ts:1104
translateTree :: Tree -> Reader Gettables Tree
Parameters:
Name | Type |
---|---|
tree |
Tree‹Leaf› |
Returns: (Anonymous function)
Const
unnest
▸ unnest(key
: string): function
Defined in src/Comparable.ts:373
unnest :: String -> Reader Tree Tree
Parameters:
Name | Type |
---|---|
key |
string |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
viewTree
▸ viewTree(tree
: Tree): TreeView
Defined in src/Comparable.ts:706
viewTree :: Tree -> TreeView
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: TreeView
functional-types › "ComparableSchema"
Module: "ComparableSchema"
Index
Interfaces
Type aliases
Functions
- isComparableSchema
- isComparableSchemaBase
- isSchemaPath
- makeComparablePairs
- makeComparableSchema
- satisfySchemaPath
Type aliases
ComparablePair
Ƭ ComparablePair: Pair‹Comparable›
Defined in src/ComparableSchema.ts:36
ComparableSchemaBase
Ƭ ComparableSchemaBase: Omit‹ComparableSchema, "created_at" | "updated_at"›
Defined in src/ComparableSchema.ts:31
SchemaPath
Ƭ SchemaPath: RegExp | [RegExp]
Defined in src/ComparableSchema.ts:22
Functions
Const
isComparableSchema
▸ isComparableSchema(a
: unknown): a is ComparableSchema
Defined in src/ComparableSchema.ts:70
isComparableSchema :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ComparableSchema
Const
isComparableSchemaBase
▸ isComparableSchemaBase(a
: unknown): a is ComparableSchemaBase
Defined in src/ComparableSchema.ts:58
isComparableSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ComparableSchemaBase
Const
isSchemaPath
▸ isSchemaPath(a
: unknown): a is SchemaPath
Defined in src/ComparableSchema.ts:50
isSchemaPath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaPath
Const
makeComparablePairs
▸ makeComparablePairs(__namedParameters
: object): function
Defined in src/ComparableSchema.ts:131
makeComparablePairs :: ComparableSchema -> Reader [Comparables] [ComparablePair]
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
leftPath |
RegExp‹› | [RegExp‹›] |
rightPath |
RegExp‹› | [RegExp‹›] |
Returns: function
▸ (): T2
Const
makeComparableSchema
▸ makeComparableSchema(base
: object): (Anonymous function)
Defined in src/ComparableSchema.ts:115
makeComparableSchema :: ComparableSchemaBase -> IO ComparableSchema
Parameters:
Name | Type |
---|---|
base |
object |
Returns: (Anonymous function)
Const
satisfySchemaPath
▸ satisfySchemaPath(schemaPath
: RegExp‹› | [RegExp‹›]): (Anonymous function)
Defined in src/ComparableSchema.ts:95
satisfySchemaPath :: SchemaPath -> Reader Schema Bool
Parameters:
Name | Type |
---|---|
schemaPath |
RegExp‹› | [RegExp‹›] |
Returns: (Anonymous function)
functional-types › "Comparison"
Module: "Comparison"
Index
Interfaces
Type aliases
Functions
Type aliases
Node
Ƭ Node: C.Node‹Leaf›
Defined in src/Comparison.ts:24
Severity
Ƭ Severity: "error" | "info" | "warning"
Defined in src/Comparison.ts:13
Tree
Defined in src/Comparison.ts:26
Functions
isComparison
▸ isComparison(a
: unknown): a is Comparison
Defined in src/Comparison.ts:79
isComparison :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Comparison
Const
isLeaf
▸ isLeaf(a
: unknown): a is Leaf
Defined in src/Comparison.ts:48
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Leaf
Const
isNode
▸ isNode(a
: unknown): a is Node
Defined in src/Comparison.ts:71
isNode :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Node
Const
isSeverity
▸ isSeverity(a
: unknown): a is Severity
Defined in src/Comparison.ts:40
isSeverity :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Severity
Const
isTree
▸ isTree(a
: unknown): a is Tree
Defined in src/Comparison.ts:64
isTree :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Tree
Module: "DateTime"
Index
Variables
Functions
Variables
Const
getCurrentUnixTimestamp
• getCurrentUnixTimestamp: function = Date.now
Defined in src/DateTime.ts:14
getCurrentUnixTimestamp :: () -> Int
Type declaration:
▸ (): number
Functions
Const
getCurrentDate
▸ getCurrentDate(): Date
Defined in src/DateTime.ts:21
getCurrentDate :: () -> Date
Returns: Date
Const
getCurrentISOString
▸ getCurrentISOString(): string
Defined in src/DateTime.ts:28
getCurrentISOString :: () -> string
Returns: string
Const
getUnixTimestamp
▸ getUnixTimestamp(date
: Date): number
Defined in src/DateTime.ts:6
getUnixTimestamp :: Date -> Int
Parameters:
Name | Type |
---|---|
date |
Date |
Returns: number
functional-types › "DocumentAnnotation"
Module: "DocumentAnnotation"
Index
Interfaces
Type aliases
- CellByName
- DocumentAnnotationBase
- Forest
- ForestByLabel
- ForestByPage
- Leaf
- TableBase
- TableByName
- TableCellById
- TextCell
- TextTableCell
- Tree
Variables
Functions
- isBranch
- isCell
- isCellArray
- isDocumentAnnotation
- isForest
- isForestByPage
- isLeaf
- isNode
- isTable
- isTableCell
- isTableCellById
- isTree
- makeCell
- makeForestByPage
- makeNode
- makeTable
- makeTableCell
- makeTextCell
- makeTextTableCell
Type aliases
CellByName
Ƭ CellByName: Dictionary‹Cell›
Defined in src/DocumentAnnotation.ts:81
DocumentAnnotationBase
Ƭ DocumentAnnotationBase: Pick‹DocumentAnnotation, "file" | "forestByPage"›
Defined in src/DocumentAnnotation.ts:130
Forest
Ƭ Forest: Dictionary‹Tree›
Defined in src/DocumentAnnotation.ts:116
ForestByLabel
Ƭ ForestByLabel: Dictionary‹Branch›
Defined in src/DocumentAnnotation.ts:120
ForestByPage
Ƭ ForestByPage: Forest[]
Defined in src/DocumentAnnotation.ts:118
Leaf
Defined in src/DocumentAnnotation.ts:103
TableBase
Ƭ TableBase: Omit‹Table, "id" | "label" | "boundingPoly"›
Defined in src/DocumentAnnotation.ts:101
TableByName
Ƭ TableByName: Dictionary‹Table›
Defined in src/DocumentAnnotation.ts:99
TableCellById
Ƭ TableCellById: Dictionary‹TableCell›
Defined in src/DocumentAnnotation.ts:88
TextCell
Ƭ TextCell: Pick‹Cell, "text"›
Defined in src/DocumentAnnotation.ts:135
TextTableCell
Ƭ TextTableCell: TextCell & object
Defined in src/DocumentAnnotation.ts:137
Tree
Defined in src/DocumentAnnotation.ts:114
Variables
Const
getKeyFromLeaf
• getKeyFromLeaf: function = ifElse( isTable, path(['intersectHeader', 'text']), prop('text') )
Defined in src/DocumentAnnotation.ts:672
getKeyFromLeaf :: Leaf -> String
Type declaration:
▸ (leaf
: Leaf): string
Parameters:
Name | Type |
---|---|
leaf |
Leaf |
Const
make
• make: function = pipe( sequenceS(R.reader)({ file: getFileNameIO, forestByPage: makeForestByPage, }), sequenceS(R.reader), R.map(sequenceS(IO.io)), RIO.chainIOK(fromDocumentBase) )
Defined in src/DocumentAnnotation.ts:615
makeComparableSchema :: TableAnnotation -> ReaderIO TextAnnotation DocumentAnnotation
Type declaration:
▸ (tableAnnotation
: TableAnnotation): RIO.ReaderIO‹TextAnnotation, DocumentAnnotation›
Parameters:
Name | Type |
---|---|
tableAnnotation |
TableAnnotation |
Const
makeForest
• makeForest: function = pipe( values, makeTrees, RIO.map(reduce((acc: Forest, child: Tree) => assoc(child.id, child, acc), {})) )
Defined in src/DocumentAnnotation.ts:544
makeForest :: BoundingBoxes -> ReaderIO Page Forest
Type declaration:
▸ (boundingBoxes
: BoundingBoxes): RIO.ReaderIO‹Page, Forest›
Parameters:
Name | Type |
---|---|
boundingBoxes |
BoundingBoxes |
Const
makeLeaf
• makeLeaf: function = ifElse(hasRowsOrColumns, makeTable, makeCell)
Defined in src/DocumentAnnotation.ts:471
makeLeaf :: LabeledBoundingBox -> ReaderIO Page Leaf
Type declaration:
▸ (boundingBox
: LabeledBoundingBox): RIO.ReaderIO‹Page, Leaf›
Parameters:
Name | Type |
---|---|
boundingBox |
LabeledBoundingBox |
Const
mergeForest
• mergeForest: function = pipe( values as R.Reader<Forest, Tree[]>, reduce<Tree, Dictionary>((acc, newTree: Tree) => { const { label } = newTree;
const oldTree = acc[label];
const accChildren = oldTree?.children || [];
const newChildren = isLeaf(newTree) ? [newTree] : newTree.children;
const id = oldTree ? `${oldTree.id},${newTree.id}` : newTree.id;
const boundingPoly = oldTree
? unions(oldTree.boundingPoly)(newTree.boundingPoly)
: newTree.boundingPoly;
const children = concat(accChildren, newChildren);
const tree = { id, label, boundingPoly, children };
return assoc(label, tree, acc);
}, {}) )
Defined in src/DocumentAnnotation.ts:681
mergeForest :: Forest -> ForestByLabel
Type declaration:
▸ (forest
: Forest): ForestByLabel
Parameters:
Name | Type |
---|---|
forest |
Forest |
Const
mergeForestByPage
• mergeForestByPage: function = pipe(mergeAll, mergeForest)
Defined in src/DocumentAnnotation.ts:704
mergeForestByPage :: ForestByPage -> ForestByLabel
Type declaration:
▸ (forestByPage
: ForestByPage): ForestByLabel
Parameters:
Name | Type |
---|---|
forestByPage |
ForestByPage |
Const
toTextCell
• toTextCell: function = pick(['text'])
Defined in src/DocumentAnnotation.ts:654
toTextCell: Cell -> TextCell
Type declaration:
Parameters:
Name | Type |
---|---|
cell |
Cell |
Const
toTextTableCell
• toTextTableCell: function = pipe( evolve({ rowHeader: toTextCell, columnHeader: toTextCell, }), pick(['text', 'rowHeader', 'columnHeader']) )
Defined in src/DocumentAnnotation.ts:661
toTextTableCell :: TableCell -> TextTableCell
Type declaration:
▸ (tableCell
: TableCell): TextTableCell
Parameters:
Name | Type |
---|---|
tableCell |
TableCell |
Functions
Const
isBranch
▸ isBranch(a
: unknown): a is Branch
Defined in src/DocumentAnnotation.ts:233
isBranch :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Branch
Const
isCell
▸ isCell(a
: unknown): a is Cell
Defined in src/DocumentAnnotation.ts:160
isCell :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Cell
Const
isCellArray
▸ isCellArray(a
: unknown): a is Cell[]
Defined in src/DocumentAnnotation.ts:172
isCellArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Cell[]
Const
isDocumentAnnotation
▸ isDocumentAnnotation(a
: unknown): a is DocumentAnnotation
Defined in src/DocumentAnnotation.ts:272
isDocumentAnnotation :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is DocumentAnnotation
Const
isForest
▸ isForest(a
: unknown): a is Forest
Defined in src/DocumentAnnotation.ts:256
isForest :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Forest
Const
isForestByPage
▸ isForestByPage(a
: unknown): a is ForestByPage
Defined in src/DocumentAnnotation.ts:264
isForestByPage :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ForestByPage
Const
isLeaf
▸ isLeaf(a
: unknown): a is Leaf
Defined in src/DocumentAnnotation.ts:226
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Leaf
Const
isNode
▸ isNode(a
: unknown): a is Node
Defined in src/DocumentAnnotation.ts:147
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Node
Const
isTable
▸ isTable(a
: unknown): a is Table
Defined in src/DocumentAnnotation.ts:210
isTable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Table
Const
isTableCell
▸ isTableCell(a
: unknown): a is TableCell
Defined in src/DocumentAnnotation.ts:180
isTableCell :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableCell
Const
isTableCellById
▸ isTableCellById(a
: unknown): a is TableCellById
Defined in src/DocumentAnnotation.ts:192
isTableCellById :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableCellById
Const
isTree
▸ isTree(a
: unknown): a is Tree
Defined in src/DocumentAnnotation.ts:249
isTree :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Tree
Const
makeCell
▸ makeCell(boundingBox
: LabeledBoundingBox): (Anonymous function)
Defined in src/DocumentAnnotation.ts:302
makeCell :: LabeledBoundingBox -> ReaderIO Page Cell
Parameters:
Name | Type |
---|---|
boundingBox |
LabeledBoundingBox |
Returns: (Anonymous function)
Const
makeForestByPage
▸ makeForestByPage(tableAnnotation
: TableAnnotation): (Anonymous function)
Defined in src/DocumentAnnotation.ts:582
makeForestByPage :: TableAnnotation -> ReaderIO TextAnnotation ForestByPage
Parameters:
Name | Type |
---|---|
tableAnnotation |
TableAnnotation |
Returns: (Anonymous function)
Const
makeNode
▸ makeNode(__namedParameters
: object): (Anonymous function)
Defined in src/DocumentAnnotation.ts:286
makeNode :: LabeledBoundingBox -> IO Node
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
boundingPoly |
[Vertex, Vertex, Vertex, Vertex] |
label |
string |
Returns: (Anonymous function)
Const
makeTable
▸ makeTable(boundingBox
: LabeledBoundingBox): (Anonymous function)
Defined in src/DocumentAnnotation.ts:388
makeTable :: LabeledBoundingBox -> ReaderIO Page Table
Parameters:
Name | Type |
---|---|
boundingBox |
LabeledBoundingBox |
Returns: (Anonymous function)
Const
makeTableCell
▸ makeTableCell(rowHeader
: Cell, columnHeader
: Cell): function
Defined in src/DocumentAnnotation.ts:325
makeTableCell :: (Cell, Cell) -> LabeledBoundingBox -> ReaderIO Page TableCell
Parameters:
Name | Type |
---|---|
rowHeader |
Cell |
columnHeader |
Cell |
Returns: function
▸ (x0
: V0): T2
Parameters:
Name | Type |
---|---|
x0 |
V0 |
Const
makeTextCell
▸ makeTextCell(text
: string): object
Defined in src/DocumentAnnotation.ts:632
makeTextCell :: String -> TextCell
Parameters:
Name | Type |
---|---|
text |
string |
Returns: object
- text: string
Const
makeTextTableCell
▸ makeTextTableCell(text
: string, rowHeader
: string, columnHeader
: string): object
Defined in src/DocumentAnnotation.ts:643
makeTextTableCell :: (String, String, String) -> TextTableCell
Parameters:
Name | Type |
---|---|
text |
string |
rowHeader |
string |
columnHeader |
string |
Returns: object
-
columnHeader(): object
-
rowHeader(): object
Module: "Excel"
Index
Interfaces
Type aliases
Functions
Type aliases
Cell
Ƭ Cell: string
Defined in src/Excel.ts:22
Row
Ƭ Row: Dictionary‹Cell›
Defined in src/Excel.ts:23
Sheet
Ƭ Sheet: Row[]
Defined in src/Excel.ts:24
SheetByName
Ƭ SheetByName: Dictionary‹Sheet›
Defined in src/Excel.ts:25
Functions
Const
isCell
▸ isCell(a
: unknown): a is Row
Defined in src/Excel.ts:50
isCell :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Row
Const
isExcel
▸ isExcel(a
: unknown): a is Excel
Defined in src/Excel.ts:82
isExcel :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Excel
Const
isPosition
▸ isPosition(a
: unknown): a is Position
Defined in src/Excel.ts:37
isPosition :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Position
Const
isRow
▸ isRow(a
: unknown): a is Row
Defined in src/Excel.ts:58
isRow :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Row
Const
isSheet
▸ isSheet(a
: unknown): a is Row
Defined in src/Excel.ts:66
isSheet :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Row
Const
isSheetByName
▸ isSheetByName(a
: unknown): a is SheetByName
Defined in src/Excel.ts:74
isSheetByName :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SheetByName
Module: "FileType"
Index
Type aliases
- ArchiveContentType
- ArchiveType
- ContentType
- DocumentContentType
- DocumentType
- FileType
- ImageContentType
- ImageType
- LegacyDocumentContentType
- LegacyDocumentType
Variables
- archiveContentTypes
- archiveTypes
- contentTypes
- documentContentTypes
- documentTypes
- fileContentTypes
- fileTypes
- fromArchiveContentType
- fromContentType
- fromDocumentContentType
- fromImageContentType
- fromLegacyDocumentContentType
- imageContentTypes
- imageTypes
- legacyDocumentContentTypes
- legacyDocumentTypes
- toArchiveContentType
- toContentType
- toDocumentContentType
- toImageContentType
- toLegacyDocumentContentType
Functions
- isArchiveContentType
- isArchiveType
- isContentType
- isDocumentContentType
- isDocumentType
- isFileType
- isImageContentType
- isImageType
- isLegacyDocumentContentType
- isLegacyDocumentType
- toUnionContentType
Type aliases
ArchiveContentType
Ƭ ArchiveContentType: "application/zip" | "application/x-zip" | "application/x-zip-compressed"
Defined in src/FileType.ts:35
ArchiveType
Ƭ ArchiveType: "zip"
Defined in src/FileType.ts:18
ContentType
Ƭ ContentType: DocumentContentType | LegacyDocumentContentType | ArchiveContentType | ImageContentType
Defined in src/FileType.ts:42
DocumentContentType
Ƭ DocumentContentType: "application/pdf" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/json"
Defined in src/FileType.ts:28
DocumentType
Ƭ DocumentType: "pdf" | "excel" | "json"
Defined in src/FileType.ts:14
FileType
Ƭ FileType: DocumentType | LegacyDocumentType | ArchiveType | ImageType
Defined in src/FileType.ts:22
ImageContentType
Ƭ ImageContentType: "image/png" | "image/jpeg"
Defined in src/FileType.ts:40
ImageType
Ƭ ImageType: "png" | "jpeg"
Defined in src/FileType.ts:20
LegacyDocumentContentType
Ƭ LegacyDocumentContentType: "application/vnd.ms-excel"
Defined in src/FileType.ts:33
LegacyDocumentType
Ƭ LegacyDocumentType: "ms-excel"
Defined in src/FileType.ts:16
Variables
Const
archiveContentTypes
• archiveContentTypes: ArchiveContentType[] = keys( ContentTypeToArchiveType )
Defined in src/FileType.ts:257
archiveContentTypes: [ArchiveContentType]
Const
archiveTypes
• archiveTypes: ArchiveType[] = keys(ArchiveTypeToContentType)
Defined in src/FileType.ts:211
archiveTypes: [ArchiveType]
Const
contentTypes
• contentTypes: ContentType[] = values(FileTypeToContentType)
Defined in src/FileType.ts:275
contentTypes: [ContentType]
Const
documentContentTypes
• documentContentTypes: DocumentContentType[] = fileContentTypes
Defined in src/FileType.ts:241
documentContentTypes: [DocumentContentType]
Const
documentTypes
• documentTypes: DocumentType[] = keys(DocumentTypeToContentType)
Defined in src/FileType.ts:196
documentTypes: [DocumentType]
Const
fileContentTypes
• fileContentTypes: DocumentContentType[] = values( DocumentTypeToContentType )
Defined in src/FileType.ts:232
fileContentTypes: [DocumentContentType]
Const
fileTypes
• fileTypes: FileType[] = keys(FileTypeToContentType)
Defined in src/FileType.ts:225
fileTypes: [FileType]
Const
fromArchiveContentType
• fromArchiveContentType: function = prop(__, ContentTypeToArchiveType)
Defined in src/FileType.ts:449
fromArchiveContentType :: ArchiveContentType -> ArchiveType
Type declaration:
▸ (contentType
: ArchiveContentType): ArchiveType
Parameters:
Name | Type |
---|---|
contentType |
ArchiveContentType |
Const
fromContentType
• fromContentType: function = prop( __, ContentTypeToFileType )
Defined in src/FileType.ts:467
fromContentType :: ContentType -> FileType
Type declaration:
▸ (contentType
: ContentType): FileType
Parameters:
Name | Type |
---|---|
contentType |
ContentType |
Const
fromDocumentContentType
• fromDocumentContentType: function = prop(__, ContentTypeToDocumentType)
Defined in src/FileType.ts:431
fromDocumentContentType :: DocumentContentType -> DocumentType
Type declaration:
▸ (contentType
: DocumentContentType): DocumentType
Parameters:
Name | Type |
---|---|
contentType |
DocumentContentType |
Const
fromImageContentType
• fromImageContentType: function = prop(__, ContentTypeToImageType)
Defined in src/FileType.ts:458
fromImageContentType :: DocumentContentType -> DocumentType
Type declaration:
▸ (contentType
: ImageContentType): ImageType
Parameters:
Name | Type |
---|---|
contentType |
ImageContentType |
Const
fromLegacyDocumentContentType
• fromLegacyDocumentContentType: function = prop(__, ContentTypeToLegacyDocumentType)
Defined in src/FileType.ts:440
fromLegacyDocumentContentType :: LegacyDocumentContentType -> LegacyDocumentType
Type declaration:
▸ (contentType
: LegacyDocumentContentType): LegacyDocumentType
Parameters:
Name | Type |
---|---|
contentType |
LegacyDocumentContentType |
Const
imageContentTypes
• imageContentTypes: ImageContentType[] = values( ImageTypeToContentType )
Defined in src/FileType.ts:266
imageContentTypes: [DocumentContentType]
Const
imageTypes
• imageTypes: ImageType[] = keys(ImageTypeToContentType)
Defined in src/FileType.ts:218
imageTypes: [DocumentType]
Const
legacyDocumentContentTypes
• legacyDocumentContentTypes: LegacyDocumentContentType[] = values( LegacyDocumentTypeToContentType )
Defined in src/FileType.ts:248
legacyDocumentContentTypes: [DocumentContentType]
Const
legacyDocumentTypes
• legacyDocumentTypes: LegacyDocumentType[] = keys( LegacyDocumentTypeToContentType )
Defined in src/FileType.ts:202
legacyDocumentTypes: [LegacyDocumentType]
Const
toArchiveContentType
• toArchiveContentType: function = prop(__, ArchiveTypeToContentType)
Defined in src/FileType.ts:389
toArchiveContentType :: ArchiveType -> ArchiveContentType
Type declaration:
▸ (fileType
: ArchiveType): ArchiveContentType
Parameters:
Name | Type |
---|---|
fileType |
ArchiveType |
Const
toContentType
• toContentType: function = prop( __, FileTypeToContentType )
Defined in src/FileType.ts:407
toContentType :: FileType -> ContentType
Type declaration:
▸ (fileType
: FileType): ContentType
Parameters:
Name | Type |
---|---|
fileType |
FileType |
Const
toDocumentContentType
• toDocumentContentType: function = prop(__, DocumentTypeToContentType)
Defined in src/FileType.ts:371
toDocumentContentType :: DocumentType -> DocumentContentType
Type declaration:
▸ (fileType
: DocumentType): DocumentContentType
Parameters:
Name | Type |
---|---|
fileType |
DocumentType |
Const
toImageContentType
• toImageContentType: function = prop(__, ImageTypeToContentType)
Defined in src/FileType.ts:398
toImageContentType :: DocumentType -> ImageContentType
Type declaration:
▸ (imageType
: ImageType): ImageContentType
Parameters:
Name | Type |
---|---|
imageType |
ImageType |
Const
toLegacyDocumentContentType
• toLegacyDocumentContentType: function = prop(__, LegacyDocumentTypeToContentType)
Defined in src/FileType.ts:380
toLegacyDocumentContentType :: LegacyDocumentType -> LegacyDocumentContentType
Type declaration:
▸ (fileType
: LegacyDocumentType): LegacyDocumentContentType
Parameters:
Name | Type |
---|---|
fileType |
LegacyDocumentType |
Functions
Const
isArchiveContentType
▸ isArchiveContentType(a
: unknown): a is ArchiveContentType
Defined in src/FileType.ts:342
isArchiveContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ArchiveContentType
Const
isArchiveType
▸ isArchiveType(a
: unknown): a is ArchiveType
Defined in src/FileType.ts:298
isArchiveType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ArchiveType
Const
isContentType
▸ isContentType(a
: unknown): a is ContentType
Defined in src/FileType.ts:358
isContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ContentType
Const
isDocumentContentType
▸ isDocumentContentType(a
: unknown): a is DocumentContentType
Defined in src/FileType.ts:324
isDocumentContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is DocumentContentType
Const
isDocumentType
▸ isDocumentType(a
: unknown): a is DocumentType
Defined in src/FileType.ts:282
isDocumentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is DocumentType
Const
isFileType
▸ isFileType(a
: unknown): a is ImageType
Defined in src/FileType.ts:314
isFileType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ImageType
Const
isImageContentType
▸ isImageContentType(a
: unknown): a is ImageContentType
Defined in src/FileType.ts:350
isDocumentContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ImageContentType
Const
isImageType
▸ isImageType(a
: unknown): a is ImageType
Defined in src/FileType.ts:306
isImageType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ImageType
Const
isLegacyDocumentContentType
▸ isLegacyDocumentContentType(a
: unknown): a is LegacyDocumentContentType
Defined in src/FileType.ts:332
isLegacyDocumentContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is LegacyDocumentContentType
Const
isLegacyDocumentType
▸ isLegacyDocumentType(a
: unknown): a is LegacyDocumentType
Defined in src/FileType.ts:290
isLegacyDocumentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is LegacyDocumentType
Const
toUnionContentType
▸ toUnionContentType(fileType
: "pdf" | "excel" | "json" | "ms-excel" | "zip" | "png" | "jpeg"): string
Defined in src/FileType.ts:417
toUnionContentType :: FileType -> String
Parameters:
Name | Type |
---|---|
fileType |
"pdf" | "excel" | "json" | "ms-excel" | "zip" | "png" | "jpeg" |
Returns: string
functional-types › "Folder/Arbitraries"
Module: "Folder/Arbitraries"
Index
Functions
Functions
Const
file
▸ file(): Arbitrary‹File›
Defined in src/Folder/Arbitraries.ts:47
Returns: Arbitrary‹File›
Const
filesByType
▸ filesByType(): Arbitrary‹FilesByType›
Defined in src/Folder/Arbitraries.ts:57
Returns: Arbitrary‹FilesByType›
Const
folder
▸ folder(): Arbitrary‹Folder›
Defined in src/Folder/Arbitraries.ts:29
Returns: Arbitrary‹Folder›
Const
invalidFolderObject
▸ invalidFolderObject(): Arbitrary‹Record‹string, any››
Defined in src/Folder/Arbitraries.ts:5
Returns: Arbitrary‹Record‹string, any››
Const
metadata
▸ metadata(): Arbitrary‹Metadata›
Defined in src/Folder/Arbitraries.ts:32
Returns: Arbitrary‹Metadata›
Const
nonFolderObject
▸ nonFolderObject(): Arbitrary‹unknown›
Defined in src/Folder/Arbitraries.ts:15
Returns: Arbitrary‹unknown›
functional-types › "Folder/index"
Module: "Folder/index"
Index
Interfaces
Type aliases
Variables
Functions
- deleteFolder
- fromMetadata
- isDeleted
- isFile
- isFileArray
- isFileReferences
- isFilesByType
- isFilesReference
- isFolder
- isFolderReference
- isMetadata
- isReference
- isRelationship
- isTag
- make
- makeFolderReference
- makeReference
- makeRelationship
Type aliases
File
Ƭ File: Attributes & object
Defined in src/Folder/index.ts:90
FileReferences
Ƭ FileReferences: FilesReference & FolderReference
Defined in src/Folder/index.ts:88
FilesByType
Ƭ FilesByType: Record‹FT.DocumentType, File[]›
Defined in src/Folder/index.ts:92
Relationship
Ƭ Relationship: string & RelationshipBrand
Defined in src/Folder/index.ts:37
Tag
Ƭ Tag: "offline" | "online" | "singapore" | "hong_kong" | Relationship
Defined in src/Folder/index.ts:39
Variables
Const
getAttributesFromName
• getAttributesFromName: function = pipe( split('/'), E.fromPredicate( (segments: string[]) => segments.length >= 2, () => new Error('Invalid file name format.') ), E.map(([folder, ...names]: string[]) => { const name = names.join('/'); return { id: join('/')([folder, name]), folder, name, }; }) )
Defined in src/Folder/index.ts:246
getAttributesFromName :: String -> Either Attributes Error
Type declaration:
▸ (name
: string): E.Either‹Error, Omit‹Attributes, "type"››
Parameters:
Name | Type |
---|---|
name |
string |
Const
getFileNameFromId
• getFileNameFromId: function = pipe( split('/'), last as R.Reader<string[], string> )
Defined in src/Folder/index.ts:330
getFileNameFromId :: String -> String
Type declaration:
▸ (id
: string): string
Parameters:
Name | Type |
---|---|
id |
string |
Const
getFolderFromReference
• getFolderFromReference: function = prop('folder')
Defined in src/Folder/index.ts:359
getFolderFromReference :: FolderReference -> String
Type declaration:
▸ (reference
: FolderReference): string
Parameters:
Name | Type |
---|---|
reference |
FolderReference |
Const
getRelated
• getRelated: function = pipe( prop('tags'), filter(isRelationship), map(replace(/^has:/, '')) )
Defined in src/Folder/index.ts:376
getRelated :: Folder -> [String]
Type declaration:
▸ (folder
: Folder): string[]
Parameters:
Name | Type |
---|---|
folder |
Folder |
Functions
Const
deleteFolder
▸ deleteFolder(folder
: Folder): (Anonymous function)
Defined in src/Folder/index.ts:162
deleteFolder :: Folder -> IO Folder
Parameters:
Name | Type |
---|---|
folder |
Folder |
Returns: (Anonymous function)
Const
fromMetadata
▸ fromMetadata(metadata
: Metadata): Left‹Error› | Right‹object›
Defined in src/Folder/index.ts:269
fromMetadata :: Metadata -> Either
Parameters:
Name | Type |
---|---|
metadata |
Metadata |
Returns: Left‹Error› | Right‹object›
Const
isDeleted
▸ isDeleted(folder
: Folder): boolean
Defined in src/Folder/index.ts:135
isDeleted -> bool
Parameters:
Name | Type |
---|---|
folder |
Folder |
Returns: boolean
Const
isFile
▸ isFile(a
: unknown): a is File
Defined in src/Folder/index.ts:219
isFile :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is File
Const
isFileArray
▸ isFileArray(a
: unknown): a is File[]
Defined in src/Folder/index.ts:227
isFileArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is File[]
Const
isFileReferences
▸ isFileReferences(a
: unknown): a is FileReferences
Defined in src/Folder/index.ts:309
isFileReferences :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FileReferences
Const
isFilesByType
▸ isFilesByType(a
: unknown): a is FilesByType
Defined in src/Folder/index.ts:235
isFilesByType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilesByType
Const
isFilesReference
▸ isFilesReference(a
: unknown): a is FilesReference
Defined in src/Folder/index.ts:298
isFilesReference :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilesReference
Const
isFolder
▸ isFolder(a
: unknown): a is Folder
Defined in src/Folder/index.ts:119
isFolder -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Folder
Const
isFolderReference
▸ isFolderReference(a
: unknown): a is FolderReference
Defined in src/Folder/index.ts:351
isFolderReference :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FolderReference
Const
isMetadata
▸ isMetadata(a
: unknown): a is Metadata
Defined in src/Folder/index.ts:196
isMetadata :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Metadata
Const
isReference
▸ isReference(a
: unknown): a is Reference
Defined in src/Folder/index.ts:290
isReference :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Reference
Const
isRelationship
▸ isRelationship(a
: unknown): a is Relationship
Defined in src/Folder/index.ts:99
isRelationship -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Relationship
Const
isTag
▸ isTag(a
: unknown): a is Tag
Defined in src/Folder/index.ts:107
isTag -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Tag
Const
make
▸ make(name
: string, tags
: "offline" | "online" | "singapore" | "hong_kong" | string & RelationshipBrand[]): (Anonymous function)
Defined in src/Folder/index.ts:143
make :: String -> Folder
Parameters:
Name | Type |
---|---|
name |
string |
tags |
"offline" | "online" | "singapore" | "hong_kong" | string & RelationshipBrand[] |
Returns: (Anonymous function)
Const
makeFolderReference
▸ makeFolderReference(folder
: string): object
Defined in src/Folder/index.ts:340
makeFolderReference :: String -> FolderReference
Parameters:
Name | Type |
---|---|
folder |
string |
Returns: object
- folder: string
Const
makeReference
▸ makeReference(file
: string): object
Defined in src/Folder/index.ts:321
makeReference :: String -> Reference
Parameters:
Name | Type |
---|---|
file |
string |
Returns: object
- file: string
Const
makeRelationship
▸ makeRelationship(target
: string): string & RelationshipBrand
Defined in src/Folder/index.ts:368
makeRelationship :: String -> Relationship
Parameters:
Name | Type |
---|---|
target |
string |
Returns: string & RelationshipBrand
functional-types › "fp-ts/Reader"
Module: "fp-ts/Reader"
Index
Functions
Functions
Const
flip
▸ flip<R, A, B>(fa
: function): function
Defined in src/fp-ts/Reader.ts:8
flip :: (A -> Reader R B) -> (R -> Reader A B)
Type parameters:
▪ R
▪ A
▪ B
Parameters:
▪ fa: function
▸ (ma
: A): Reader‹R, B›
Parameters:
Name | Type |
---|---|
ma |
A |
Returns: function
▸ (ma
: R): Reader‹A, B›
Parameters:
Name | Type |
---|---|
ma |
R |
functional-types › "fp-ts/ReaderIO"
Module: "fp-ts/ReaderIO"
Index
Type aliases
Variables
Functions
Type aliases
ReaderIO
Ƭ ReaderIO: Reader‹R, IO‹A››
Defined in src/fp-ts/ReaderIO.ts:6
Variables
Const
chainIOK
• chainIOK: function = pipe(IO.chain, R.map)
Defined in src/fp-ts/ReaderIO.ts:22
map :: ( A -> IO B ) -> ReaderIO R A -> ReaderIO R B
Type declaration:
▸ <A, B>(f
: function): function
Type parameters:
▪ A
▪ B
Parameters:
▪ f: function
▸ (a
: A): IO‹B›
Parameters:
Name | Type |
---|---|
a |
A |
▸ <R>(fa
: ReaderIO‹R, A›): ReaderIO‹R, B›
Type parameters:
▪ R
Parameters:
Name | Type |
---|---|
fa |
ReaderIO‹R, A› |
Const
fromReader
• fromReader: function = R.map( IO.of )
Defined in src/fp-ts/ReaderIO.ts:55
fromReader :: Reader R A -> ReaderIO R A
Type declaration:
▸ <R, A>(r
: Reader‹R, A›): ReaderIO‹R, A›
Type parameters:
▪ R
▪ A
Parameters:
Name | Type |
---|---|
r |
Reader‹R, A› |
Const
map
• map: function = pipe(IO.map, R.map)
Defined in src/fp-ts/ReaderIO.ts:13
map :: ( A -> B ) -> ReaderIO R A -> ReaderIO R B
Type declaration:
▸ <R, A, B>(f
: function): function
Type parameters:
▪ R
▪ A
▪ B
Parameters:
▪ f: function
▸ (a
: A): B
Parameters:
Name | Type |
---|---|
a |
A |
▸ (fa
: ReaderIO‹R, A›): ReaderIO‹R, B›
Parameters:
Name | Type |
---|---|
fa |
ReaderIO‹R, A› |
Functions
Const
chain
▸ chain<R, A, B>(f
: function): function
Defined in src/fp-ts/ReaderIO.ts:43
chain :: ( A -> ReaderIO R B ) -> ReaderIO R A -> ReaderIO R B
Type parameters:
▪ R
▪ A
▪ B
Parameters:
▪ f: function
▸ (a
: A): ReaderIO‹R, B›
Parameters:
Name | Type |
---|---|
a |
A |
Returns: function
▸ (fa
: ReaderIO‹R, A›): ReaderIO‹R, B›
Parameters:
Name | Type |
---|---|
fa |
ReaderIO‹R, A› |
Const
chainReaderK
▸ chainReaderK<R, A, B>(f
: function): function
Defined in src/fp-ts/ReaderIO.ts:31
map :: ( A -> Reader R B ) -> ReaderIO R A -> ReaderIO R B
Type parameters:
▪ R
▪ A
▪ B
Parameters:
▪ f: function
▸ (a
: A): Reader‹R, B›
Parameters:
Name | Type |
---|---|
a |
A |
Returns: function
▸ (fa
: ReaderIO‹R, A›): ReaderIO‹R, B›
Parameters:
Name | Type |
---|---|
fa |
ReaderIO‹R, A› |
Const
sequenceReaderIO
▸ sequenceReaderIO<R, A>(r
: ReaderIO‹R, A›[]): ReaderIO‹R, A[]›
Defined in src/fp-ts/ReaderIO.ts:64
sequenceReaderIO :: [Reader a IO] -> Reader a [IO]
Type parameters:
▪ R
▪ A
Parameters:
Name | Type |
---|---|
r |
ReaderIO‹R, A›[] |
Returns: ReaderIO‹R, A[]›
functional-types › "fp-ts/TaskEither"
Module: "fp-ts/TaskEither"
Index
Functions
Functions
Const
fromTask
▸ fromTask(task
: Task‹A›): TaskEither‹Error, A›
Defined in src/fp-ts/TaskEither.ts:10
fromThunk :: Task -> TaskEither
Parameters:
Name | Type |
---|---|
task |
Task‹A› |
Returns: TaskEither‹Error, A›
Module: "index"
Index
References
- ArrayPredicate
- Pair
- PairPredicate
- TypePredicate
- fromPair
- isArray
- isArraySatisfying
- isBoolean
- isDictionary
- isNat
- isNotEmpty
- isNotNil
- isNumber
- isPair
- isPairSatisfying
- isRegExp
- isString
- isStringArray
- propSatisfiesIfExists
- toPair
References
ArrayPredicate
• ArrayPredicate:
Pair
• Pair:
PairPredicate
• PairPredicate:
TypePredicate
• TypePredicate:
fromPair
• fromPair:
isArray
• isArray:
isArraySatisfying
• isArraySatisfying:
isBoolean
• isBoolean:
isDictionary
• isDictionary:
isNat
• isNat:
isNotEmpty
• isNotEmpty:
isNotNil
• isNotNil:
isNumber
• isNumber:
isPair
• isPair:
isPairSatisfying
• isPairSatisfying:
isRegExp
• isRegExp:
isString
• isString:
isStringArray
• isStringArray:
propSatisfiesIfExists
• propSatisfiesIfExists:
toPair
• toPair:
Module: "Json"
Index
Type aliases
Functions
Type aliases
Json
Ƭ Json: Dictionary‹unknown›
Defined in src/Json.ts:3
Functions
Const
isJson
▸ isJson(a
: unknown): a is Json
Defined in src/Json.ts:6
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Json
Module: "Label"
Index
Interfaces
Type aliases
Variables
Functions
Type aliases
ColorMappings
Ƭ ColorMappings: Record‹string, string›
Defined in src/Label.ts:9
Variables
Const
toColorMappings
• toColorMappings: function = reduce( (acc: ColorMappings, label: Label) => assoc(label.id, label.color)(acc), {} )
Defined in src/Label.ts:29
toColorMappings :: [Label] -> ColorMappings
Type declaration:
▸ (labels
: Label[]): ColorMappings
Parameters:
Name | Type |
---|---|
labels |
Label[] |
Functions
Const
isLabel
▸ isLabel(a
: unknown): a is Label
Defined in src/Label.ts:16
isLabel :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Label
Module: "Response"
Index
Interfaces
Type aliases
Variables
Functions
Type aliases
Response
Ƭ Response: Success‹T› | Failure
Defined in src/Response.ts:28
Status
Ƭ Status: 400 | 200
Defined in src/Response.ts:30
Variables
Const
fromEither
• fromEither: function = ifElse( E.isRight, pipe(prop('right'), success), pipe(prop('left'), fromError) )
Defined in src/Response.ts:80
fromEither :: Either Error a -> Response a
Type declaration:
▸ <A>(either
: E.Either‹Error, A›): Response‹A›
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
either |
E.Either‹Error, A› |
Const
getPayload
• getPayload: function = prop('payload')
Defined in src/Response.ts:155
getPayload :: Success a -> a
Type declaration:
▸ <A>(response
: Success‹A›): A
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
response |
Success‹A› |
Const
getStatusFromResponse
• getStatusFromResponse: function = ifElse( isSuccess, () => 200, () => 400 )
Defined in src/Response.ts:103
getStatusFromResponse :: Response -> Status
Type declaration:
▸ (response
: Response‹unknown›): Status
Parameters:
Name | Type |
---|---|
response |
Response‹unknown› |
Const
toEither
• toEither: function = ifElse( isSuccess, E.right, pipe((failure: Failure): Error => new Error(failure.error), E.left) )
Defined in src/Response.ts:142
toEither :: Response -> Either Response Error
Type declaration:
▸ <A>(response
: Response‹A›): E.Either‹Error, Success‹A››
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
response |
Response‹A› |
Const
toEmptyResponse
• toEmptyResponse: function = unless(isFailure, () => undefined)
Defined in src/Response.ts:172
toEmptyResponse :: Response -> Empty | Failure
Type declaration:
▸ <T>(response
: Response‹T›): Failure | undefined
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
response |
Response‹T› |
Functions
Const
fromError
▸ fromError(error
: Error): object
Defined in src/Response.ts:61
fromError :: Error -> Failure
Parameters:
Name | Type |
---|---|
error |
Error |
Returns: object
- error: string = error.message
Const
fromPredicate
▸ fromPredicate(predicate
: function, onFalse
: function): function
Defined in src/Response.ts:119
fromPredicate :: PredicateStr -> Response
Parameters:
▪ predicate: function
▸ (a
: unknown): a is A
Parameters:
Name | Type |
---|---|
a |
unknown |
▪ onFalse: function
▸ (a
: unknown): Error
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
Const
getPayloadOrElse
▸ getPayloadOrElse(onFailure
: function): function
Defined in src/Response.ts:164
getPayloadOrElse :: ((Failure) -> E) -> Reader (Response a) a
Parameters:
▪ onFailure: function
▸ (failure
: Failure): E
Parameters:
Name | Type |
---|---|
failure |
Failure |
Returns: function
▸ (a
: any): any
Parameters:
Name | Type |
---|---|
a |
any |
Const
isFailure
▸ isFailure(a
: unknown): a is Failure
Defined in src/Response.ts:45
isFailure :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Failure
Const
isResponse
▸ isResponse(a
: unknown): a is Response
Defined in src/Response.ts:53
isResponse :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Response
Const
isSuccess
▸ isSuccess(a
: unknown): a is Success
Defined in src/Response.ts:37
isSuccess :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Success
Const
map
▸ map<A, B>(fa
: function): function
Defined in src/Response.ts:129
map :: (A -> B) -> Reader (Response A) (Response B)
Type parameters:
▪ A
▪ B
Parameters:
▪ fa: function
▸ (a
: A): B
Parameters:
Name | Type |
---|---|
a |
A |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
Const
success
▸ success(a
: A): object
Defined in src/Response.ts:70
success :: a -> Success
Parameters:
Name | Type |
---|---|
a |
A |
Returns: object
-
message: string = ""
-
payload: A = a
Const
withMessage
▸ withMessage<A>(message
: any): function
Defined in src/Response.ts:95
withMessage :: string -> Reader (Response a) (Response a)`
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
message |
any |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
Module: "Schema"
Index
Interfaces
- Filters
- Gettable
- GettableOptions
- Multiply
- Predicate
- Property
- Replacement
- Replacements
- Schema
- SchemaOptions
Type aliases
Functions
- isDirection
- isFilePath
- isFilePathArray
- isFilters
- isGettable
- isGettableOptions
- isGettables
- isMergeType
- isMergeTypeArray
- isMultiply
- isPath
- isPathSegment
- isPredicate
- isProperty
- isReplacement
- isReplacements
- isSchema
- isSchemaBase
- isSchemaOptions
- makeSchema
Type aliases
FilePath
Ƭ FilePath: [RegExp]
Defined in src/Schema.ts:61
Gettables
Ƭ Gettables: Dictionary‹Gettable›
Defined in src/Schema.ts:90
MergeType
Ƭ MergeType: "header" | "table" | "key"
Defined in src/Schema.ts:63
Path
Ƭ Path: PathSegment[]
Defined in src/Schema.ts:59
PathSegment
Ƭ PathSegment: RegExp | Predicate
Defined in src/Schema.ts:57
SchemaBase
Ƭ SchemaBase: Omit‹Schema, "created_at" | "updated_at"›
Defined in src/Schema.ts:107
Functions
Const
isDirection
▸ isDirection(a
: unknown): a is Direction
Defined in src/Schema.ts:222
isDirection :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Direction
Const
isFilePath
▸ isFilePath(a
: unknown): a is FilePath
Defined in src/Schema.ts:190
isFilePath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath
Const
isFilePathArray
▸ isFilePathArray(a
: unknown): a is FilePath[]
Defined in src/Schema.ts:198
isFilePathArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath[]
Const
isFilters
▸ isFilters(a
: unknown): a is Filters
Defined in src/Schema.ts:142
isFilters :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Filters
Const
isGettable
▸ isGettable(a
: unknown): a is Gettable
Defined in src/Schema.ts:262
isGettable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettable
Const
isGettableOptions
▸ isGettableOptions(a
: unknown): a is GettableOptions
Defined in src/Schema.ts:242
isGettableOptions :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is GettableOptions
Const
isGettables
▸ isGettables(a
: unknown): a is Gettables
Defined in src/Schema.ts:274
isGettables :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettables
Const
isMergeType
▸ isMergeType(a
: unknown): a is MergeType
Defined in src/Schema.ts:206
isMergeType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is MergeType
Const
isMergeTypeArray
▸ isMergeTypeArray(a
: unknown): a is MergeType[]
Defined in src/Schema.ts:214
isMergeTypeArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is MergeType[]
Const
isMultiply
▸ isMultiply(a
: unknown): a is Multiply
Defined in src/Schema.ts:230
isMultiply :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Multiply
Const
isPath
▸ isPath(a
: unknown): a is Path
Defined in src/Schema.ts:182
isPath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Path
Const
isPathSegment
▸ isPathSegment(a
: unknown): a is PathSegment
Defined in src/Schema.ts:174
isPathSegment :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is PathSegment
Const
isPredicate
▸ isPredicate(a
: unknown): a is Predicate
Defined in src/Schema.ts:162
isPredicate :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Predicate
Const
isProperty
▸ isProperty(a
: unknown): a is Property
Defined in src/Schema.ts:154
isProperty :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Property
Const
isReplacement
▸ isReplacement(a
: unknown): a is Replacement
Defined in src/Schema.ts:114
isReplacement :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacement
Const
isReplacements
▸ isReplacements(a
: unknown): a is Replacements
Defined in src/Schema.ts:126
isReplacements :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacements
Const
isSchema
▸ isSchema(a
: unknown): a is Schema
Defined in src/Schema.ts:306
isSchema :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Schema
Const
isSchemaBase
▸ isSchemaBase(a
: unknown): a is SchemaBase
Defined in src/Schema.ts:290
isSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaBase
Const
isSchemaOptions
▸ isSchemaOptions(a
: unknown): a is SchemaOptions
Defined in src/Schema.ts:282
isSchemaOptions :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaOptions
Const
makeSchema
▸ makeSchema(schemaBase
: SchemaBase): (Anonymous function)
Defined in src/Schema.ts:318
makeSchema :: SchemaBase -> IO Schema
Parameters:
Name | Type |
---|---|
schemaBase |
SchemaBase |
Returns: (Anonymous function)
functional-types › "Serialize/Arbitraries"
Module: "Serialize/Arbitraries"
Index
Functions
Functions
Const
regExp
▸ regExp(): Arbitrary‹RegExp›
Defined in src/Serialize/Arbitraries.ts:4
Returns: Arbitrary‹RegExp›
Const
serializable
▸ serializable(): Arbitrary‹Serializable›
Defined in src/Serialize/Arbitraries.ts:7
Returns: Arbitrary‹Serializable›
functional-types › "Serialize/ComparableSchema"
Module: "Serialize/ComparableSchema"
Index
Interfaces
Type aliases
Functions
Type aliases
ComparableSchemaBase
Ƭ ComparableSchemaBase: Omit‹ComparableSchema, "created_at" | "updated_at"›
Defined in src/Serialize/ComparableSchema.ts:17
SchemaPath
Ƭ SchemaPath: string | [string]
Defined in src/Serialize/ComparableSchema.ts:8
Functions
deserialize
▸ deserialize(deserializable
: ComparableSchema): E.Either‹Error, ComparableSchema›
Defined in src/Serialize/ComparableSchema.ts:89
deserialize :: Schema -> SerializableSchema
Parameters:
Name | Type |
---|---|
deserializable |
ComparableSchema |
Returns: E.Either‹Error, ComparableSchema›
▸ deserialize(deserializable
: ComparableSchemaBase): E.Either‹Error, Deserialized.ComparableSchemaBase›
Defined in src/Serialize/ComparableSchema.ts:93
Parameters:
Name | Type |
---|---|
deserializable |
ComparableSchemaBase |
Returns: E.Either‹Error, Deserialized.ComparableSchemaBase›
Const
isComparableSchema
▸ isComparableSchema(a
: unknown): a is ComparableSchema
Defined in src/Serialize/ComparableSchema.ts:54
isComparableSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ComparableSchema
Const
isComparableSchemaBase
▸ isComparableSchemaBase(a
: unknown): a is ComparableSchemaBase
Defined in src/Serialize/ComparableSchema.ts:42
isComparableSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ComparableSchemaBase
Const
isSchemaPath
▸ isSchemaPath(a
: unknown): a is SchemaPath
Defined in src/Serialize/ComparableSchema.ts:34
isSchemaPath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaPath
serialize
▸ serialize(serializable
: ComparableSchema): ComparableSchema
Defined in src/Serialize/ComparableSchema.ts:66
serialize :: SerializableSchema -> Schema
Parameters:
Name | Type |
---|---|
serializable |
ComparableSchema |
Returns: ComparableSchema
▸ serialize(serializable
: Deserialized.ComparableSchemaBase): ComparableSchemaBase
Defined in src/Serialize/ComparableSchema.ts:70
Parameters:
Name | Type |
---|---|
serializable |
Deserialized.ComparableSchemaBase |
Returns: ComparableSchemaBase
functional-types › "Serialize/index"
Module: "Serialize/index"
Index
Type aliases
Variables
Functions
Type aliases
Deserializable
Ƭ Deserializable: string | number | boolean | Deserializable[] | Dictionary‹Deserializable›
Defined in src/Serialize/index.ts:33
Serializable
Ƭ Serializable: string | number | boolean | RegExp | Serializable[] | Dictionary‹Serializable›
Defined in src/Serialize/index.ts:25
Variables
Const
deserializeArray
• deserializeArray: function = values
Defined in src/Serialize/index.ts:98
deserializeArray :: Dictionary A -> [A]
Type declaration:
▸ <A>(array
: Dictionary‹A›): A[]
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
array |
Dictionary‹A› |
Const
deserializeRegExp
• deserializeRegExp: function = pipe( E.fromPredicate( isRegExp, () => new Error('String is not a serialized RegExp instance.') ), E.chain( pipe((regExpStr: string) => { const expression = replace(regExpValidator, '$1', regExpStr); const flag = replace(regExpValidator, '$2', regExpStr); return E.tryCatch((): RegExp => new RegExp(expression, flag), E.toError); }) ) )
Defined in src/Serialize/index.ts:65
deserializeRegExp :: String -> Either RegExp Error
Type declaration:
▸ (regExpStr
: string): E.Either‹Error, RegExp›
Parameters:
Name | Type |
---|---|
regExpStr |
string |
Const
serializeRegExp
• serializeRegExp: function = pipe( toString as R.Reader<RegExp, string>, concat('REGEXP') )
Defined in src/Serialize/index.ts:47
serializeRegExp :: RegExp -> String
Type declaration:
▸ (regExp
: RegExp): string
Parameters:
Name | Type |
---|---|
regExp |
RegExp |
Functions
deserialize
▸ deserialize(value
: Deserializable): E.Either‹Error, Serializable›
Defined in src/Serialize/index.ts:118
deserialize :: Deserializable -> Either Serializable Error
Parameters:
Name | Type |
---|---|
value |
Deserializable |
Returns: E.Either‹Error, Serializable›
Const
isRegExp
▸ isRegExp(a
: unknown): a is string
Defined in src/Serialize/index.ts:57
isRegExp :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is string
serialize
▸ serialize(value
: Serializable): Deserializable
Defined in src/Serialize/index.ts:105
serialize :: Serializable -> Deserializable
Parameters:
Name | Type |
---|---|
value |
Serializable |
Returns: Deserializable
Const
serializeArray
▸ serializeArray<A>(array
: A[]): Dictionary‹A›
Defined in src/Serialize/index.ts:86
serializeArray :: [A] -> Dictionary A
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
array |
A[] |
Returns: Dictionary‹A›
functional-types › "Serialize/Schema"
Module: "Serialize/Schema"
Index
Interfaces
- Filters
- Gettable
- GettableOptions
- Multiply
- Predicate
- Property
- Replacement
- Replacements
- Schema
- SchemaOptions
Type aliases
Functions
- deserialize
- isFilePath
- isFilePathArray
- isFilters
- isGettable
- isGettableOptions
- isGettables
- isMultiply
- isPath
- isPathSegment
- isPredicate
- isProperty
- isReplacement
- isReplacements
- isSchema
- isSchemaBase
- serialize
Type aliases
FilePath
Ƭ FilePath: [string]
Defined in src/Serialize/Schema.ts:63
Gettables
Ƭ Gettables: Dictionary‹Gettable›
Defined in src/Serialize/Schema.ts:90
Path
Ƭ Path: PathSegment[]
Defined in src/Serialize/Schema.ts:61
PathSegment
Ƭ PathSegment: string | Predicate
Defined in src/Serialize/Schema.ts:59
SchemaBase
Ƭ SchemaBase: Omit‹Schema, "created_at" | "updated_at"›
Defined in src/Serialize/Schema.ts:107
Functions
deserialize
▸ deserialize(deserializable
: SchemaBase): E.Either‹Error, Deserialized.SchemaBase›
Defined in src/Serialize/Schema.ts:298
deserialize :: Schema -> SerializableSchema
Parameters:
Name | Type |
---|---|
deserializable |
SchemaBase |
Returns: E.Either‹Error, Deserialized.SchemaBase›
▸ deserialize(deserializable
: Schema): E.Either‹Error, Schema›
Defined in src/Serialize/Schema.ts:302
Parameters:
Name | Type |
---|---|
deserializable |
Schema |
Returns: E.Either‹Error, Schema›
Const
isFilePath
▸ isFilePath(a
: unknown): a is FilePath
Defined in src/Serialize/Schema.ts:188
isFilePath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath
Const
isFilePathArray
▸ isFilePathArray(a
: unknown): a is FilePath[]
Defined in src/Serialize/Schema.ts:196
isFilePathArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath[]
Const
isFilters
▸ isFilters(a
: unknown): a is Filters
Defined in src/Serialize/Schema.ts:138
isFilters :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Filters
Const
isGettable
▸ isGettable(a
: unknown): a is Gettable
Defined in src/Serialize/Schema.ts:234
isGettable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettable
Const
isGettableOptions
▸ isGettableOptions(a
: unknown): a is GettableOptions
Defined in src/Serialize/Schema.ts:214
isGettableOptions :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is GettableOptions
Const
isGettables
▸ isGettables(a
: unknown): a is Gettables
Defined in src/Serialize/Schema.ts:246
isGettables :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettables
Const
isMultiply
▸ isMultiply(a
: unknown): a is Multiply
Defined in src/Serialize/Schema.ts:204
isMultiply :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Multiply
Const
isPath
▸ isPath(a
: unknown): a is Path
Defined in src/Serialize/Schema.ts:180
isPath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Path
Const
isPathSegment
▸ isPathSegment(a
: unknown): a is PathSegment
Defined in src/Serialize/Schema.ts:172
isPathSegment :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is PathSegment
Const
isPredicate
▸ isPredicate(a
: unknown): a is Predicate
Defined in src/Serialize/Schema.ts:160
isPredicate :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Predicate
Const
isProperty
▸ isProperty(a
: unknown): a is Property
Defined in src/Serialize/Schema.ts:150
isProperty :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Property
Const
isReplacement
▸ isReplacement(a
: unknown): a is Replacement
Defined in src/Serialize/Schema.ts:114
isReplacement :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacement
Const
isReplacements
▸ isReplacements(a
: unknown): a is Replacements
Defined in src/Serialize/Schema.ts:126
isReplacements :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacements
Const
isSchema
▸ isSchema(a
: unknown): a is Schema
Defined in src/Serialize/Schema.ts:270
isSchema :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Schema
Const
isSchemaBase
▸ isSchemaBase(a
: unknown): a is SchemaBase
Defined in src/Serialize/Schema.ts:254
isSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaBase
serialize
▸ serialize(serializable
: Schema): Schema
Defined in src/Serialize/Schema.ts:282
serialize :: SerializableSchema -> Schema
Parameters:
Name | Type |
---|---|
serializable |
Schema |
Returns: Schema
▸ serialize(serializable
: Deserialized.SchemaBase): SchemaBase
Defined in src/Serialize/Schema.ts:283
Parameters:
Name | Type |
---|---|
serializable |
Deserialized.SchemaBase |
Returns: SchemaBase
Module: "String"
Index
Functions
Functions
Const
getRandomId
▸ getRandomId(): string
Defined in src/String.ts:9
getRandomId: IO String
Returns: string
functional-types › "TableAnnotation"
Module: "TableAnnotation"
Index
Interfaces
Type aliases
Variables
Functions
Type aliases
BoundingBox
Ƭ BoundingBox: WithHeader‹LabeledBoundingBox› | LabeledBoundingBox
Defined in src/TableAnnotation.ts:26
BoundingBoxes
Ƭ BoundingBoxes: Dictionary‹BoundingBox›
Defined in src/TableAnnotation.ts:27
BoundingBoxesByPage
Ƭ BoundingBoxesByPage: BoundingBoxes[]
Defined in src/TableAnnotation.ts:29
TableAnnotationBase
Ƭ TableAnnotationBase: Pick‹TableAnnotation, "file" | "boundingBoxesByPage"›
Defined in src/TableAnnotation.ts:39
Variables
Const
rejectsEmptyBoundingBoxes
• rejectsEmptyBoundingBoxes: function = evolve({ boundingBoxesByPage: map(reject(propSatisfies(isEmptyPoly, 'boundingPoly'))), }) as (annotations: A) => A
Defined in src/TableAnnotation.ts:104
rejectsEmptyBoundingBoxes :: TableAnnotationBase -> TableAnnotationBase
Type declaration:
▸ <A>(annotations
: A): A
Type parameters:
▪ A: TableAnnotationBase
Parameters:
Name | Type |
---|---|
annotations |
A |
Const
toBoundingBoxes
• toBoundingBoxes: function = reduce( (acc: BoundingBoxes, value) => assoc(value.id, value, acc), {} )
Defined in src/TableAnnotation.ts:93
toBoundingBoxes :: [BoundingBox] -> BoundingBoxes
Type declaration:
▸ (boundingBoxes
: Array‹WithHeader‹LabeledBoundingBox› | LabeledBoundingBox›): BoundingBoxes
Parameters:
Name | Type |
---|---|
boundingBoxes |
Array‹WithHeader‹LabeledBoundingBox› | LabeledBoundingBox› |
Functions
Const
isBoundingBoxes
▸ isBoundingBoxes(a
: unknown): a is BoundingBoxes
Defined in src/TableAnnotation.ts:49
isBoundingBoxes :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BoundingBoxes
Const
isBoundingBoxesByPage
▸ isBoundingBoxesByPage(a
: unknown): a is BoundingBoxesByPage
Defined in src/TableAnnotation.ts:60
isBoundingBoxesByPage :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BoundingBoxesByPage
Const
isTableAnnotation
▸ isTableAnnotation(a
: unknown): a is TableAnnotation
Defined in src/TableAnnotation.ts:80
isTableAnnotation :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableAnnotation
Const
isTableAnnotationBase
▸ isTableAnnotationBase(a
: unknown): a is TableAnnotationBase
Defined in src/TableAnnotation.ts:68
isTableAnnotationBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableAnnotationBase
Const
make
▸ make(__namedParameters
: object): (Anonymous function)
Defined in src/TableAnnotation.ts:117
makeComparableSchema :: TableAnnotationBase -> IO TableAnnotation
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
boundingBoxesByPage |
Dictionary‹LabeledBoundingBox | LabeledBoundingBox & object | LabeledBoundingBox & object›[] |
file |
string |
Returns: (Anonymous function)
functional-types › "TextAnnotation"
Module: "TextAnnotation"
Index
Interfaces
Type aliases
Variables
- breakTypes
- fromAnnotateImageResponse
- fromVisionPage
- getBreakTypeFromSymbols
- getStringFromBreakType
- getTextFromWords
Functions
- fromAnnotateImageRequest
- fromVisionParagraph
- fromVisionWord
- isBreakType
- isPage
- isPages
- isParagraph
- isParagraphsById
- isTextAnnotation
- isWord
- isWordArray
- isWordsById
Type aliases
BreakType
Ƭ BreakType: "UNKNOWN" | "SPACE" | "SURE_SPACE" | "EOL_SURE_SPACE" | "HYPHEN" | "LINE_BREAK"
Defined in src/TextAnnotation.ts:34
ParagraphsById
Ƭ ParagraphsById: Dictionary‹Paragraph›
Defined in src/TextAnnotation.ts:68
WordsById
Ƭ WordsById: Dictionary‹Word›
Defined in src/TextAnnotation.ts:66
Variables
Const
breakTypes
• breakTypes: BreakType[] = [ 'UNKNOWN', 'SPACE', 'SURE_SPACE', // Sure space (very wide) 'EOL_SURE_SPACE', // Line-wrapping break 'HYPHEN', // End-line hyphen that is not present in text 'LINE_BREAK', ]
Defined in src/TextAnnotation.ts:42
Const
fromAnnotateImageResponse
• fromAnnotateImageResponse: function = pipe( Vision.getPagesFromAnnotateImageResponse, map(fromVisionPage), A.array.sequence(IO.io) )
Defined in src/TextAnnotation.ts:304
fromAnnotateImageResponse :: AnnotateImageResponse -> IO [Page]
Type declaration:
▸ (response
: AnnotateImageResponse): IO‹Page[]›
Parameters:
Name | Type |
---|---|
response |
AnnotateImageResponse |
Const
fromVisionPage
• fromVisionPage: function = pipe( Vision.getParagraphsFromPage, map(fromVisionParagraph), A.array.sequence(IO.io), IO.map( reduce((acc: Page, page: Page) => mergeDeepLeft(acc, page) as Page, { wordsById: {}, paragraphsById: {}, }) ) )
Defined in src/TextAnnotation.ts:287
fromVisionPage :: VisionPage -> IO Page
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getBreakTypeFromSymbols
• getBreakTypeFromSymbols: function = pipe( last, path(['property', 'detectedBreak', 'type']), O.fromPredicate(isBreakType), O.getOrElse(() => 'UNKNOWN') )
Defined in src/TextAnnotation.ts:196
getBreakTypeFromSymbols :: [VisionSymbol] -> DetectedBreak
Type declaration:
▸ (symbols
: TextSymbol[]): BreakType
Parameters:
Name | Type |
---|---|
symbols |
TextSymbol[] |
Const
getStringFromBreakType
• getStringFromBreakType: function = prop( __, breakTypeMappings )
Defined in src/TextAnnotation.ts:348
getStringFromBreakType :: BreakType -> String
Type declaration:
▸ (breakType
: BreakType): string
Parameters:
Name | Type |
---|---|
breakType |
BreakType |
Const
getTextFromWords
• getTextFromWords: function = pipe( reduce( (acc: string, word: Word) => acc + word.text + getStringFromBreakType(word.breakType), '' ), replace(/\n$/, ''), trim )
Defined in src/TextAnnotation.ts:358
getTextFromWords :: [Word] -> String
Type declaration:
▸ (words
: Word[]): string
Parameters:
Name | Type |
---|---|
words |
Word[] |
Functions
Const
fromAnnotateImageRequest
▸ fromAnnotateImageRequest(request
: AsyncAnnotateFileRequest): (Anonymous function)
Defined in src/TextAnnotation.ts:319
fromAnnotateImageRequest :: AsyncAnnotateFileRequest -> IO [Page]
Parameters:
Name | Type |
---|---|
request |
AsyncAnnotateFileRequest |
Returns: (Anonymous function)
Const
fromVisionParagraph
▸ fromVisionParagraph(visionParagraph
: Paragraph): (Anonymous function)
Defined in src/TextAnnotation.ts:250
fromVisionParagraph :: VisionParagraph -> IO Page
Parameters:
Name | Type |
---|---|
visionParagraph |
Paragraph |
Returns: (Anonymous function)
Const
fromVisionWord
▸ fromVisionWord(word
: Word): (Anonymous function)
Defined in src/TextAnnotation.ts:231
fromVisionWord :: VisionWord -> Word
Parameters:
Name | Type |
---|---|
word |
Word |
Returns: (Anonymous function)
Const
isBreakType
▸ isBreakType(a
: unknown): a is BreakType
Defined in src/TextAnnotation.ts:88
isBreakType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BreakType
Const
isPage
▸ isPage(a
: unknown): a is Page
Defined in src/TextAnnotation.ts:163
isPage :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Page
Const
isPages
▸ isPages(a
: unknown): a is Page
Defined in src/TextAnnotation.ts:174
isPages :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Page
Const
isParagraph
▸ isParagraph(a
: unknown): a is Paragraph
Defined in src/TextAnnotation.ts:127
isParagraph :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Paragraph
Const
isParagraphsById
▸ isParagraphsById(a
: unknown): a is ParagraphsById
Defined in src/TextAnnotation.ts:155
isWordsById :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ParagraphsById
Const
isTextAnnotation
▸ isTextAnnotation(a
: unknown): a is TextAnnotation
Defined in src/TextAnnotation.ts:182
isTextAnnotation :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TextAnnotation
Const
isWord
▸ isWord(a
: unknown): a is Word
Defined in src/TextAnnotation.ts:96
isWord :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Word
Const
isWordArray
▸ isWordArray(a
: unknown): a is Word[]
Defined in src/TextAnnotation.ts:119
isWordArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Word[]
Const
isWordsById
▸ isWordsById(a
: unknown): a is WordsById
Defined in src/TextAnnotation.ts:139
isWordsById :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is WordsById
Module: "Types"
Index
Interfaces
Type aliases
Variables
Functions
- fromPair
- isArray
- isArraySatisfying
- isBoolean
- isDictionary
- isNat
- isNumber
- isPair
- isPairSatisfying
- isRegExp
- isString
- isStringArray
- propSatisfiesIfExists
Type aliases
ArrayPredicate
Ƭ ArrayPredicate: TypePredicate‹T[]›
Defined in src/Types.ts:27
PairPredicate
Ƭ PairPredicate: TypePredicate‹Pair‹T››
Defined in src/Types.ts:29
TypePredicate
Ƭ TypePredicate: function
Defined in src/Types.ts:25
Type declaration:
▸ (a
: unknown): a is T
Parameters:
Name | Type |
---|---|
a |
unknown |
Variables
Const
isNotEmpty
• isNotEmpty: function = pipe(isEmpty, not)
Defined in src/Types.ts:175
isNotEmpty :: a -> bool
Type declaration:
▸ (a
: unknown): boolean
Parameters:
Name | Type |
---|---|
a |
unknown |
Const
isNotNil
• isNotNil: function = pipe(isNil, not)
Defined in src/Types.ts:107
isNotNil :: a -> bool
Type declaration:
▸ (a
: unknown): boolean
Parameters:
Name | Type |
---|---|
a |
unknown |
Const
toPair
• toPair: function = pipe( split(';'), ([left, right]): Pair => ({ left, right: right ?? '' }) )
Defined in src/Types.ts:86
toPair :: String -> Pair String
Type declaration:
▸ (pairStr
: string): Pair‹string›
Parameters:
Name | Type |
---|---|
pairStr |
string |
Functions
Const
fromPair
▸ fromPair(__namedParameters
: object): string
Defined in src/Types.ts:78
fromPair :: Pair String -> String
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
left |
string |
right |
string |
Returns: string
Const
isArray
▸ isArray(a
: unknown): a is unknown[]
Defined in src/Types.ts:143
isArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is unknown[]
isArraySatisfying
▸ isArraySatisfying<T>(predicate
: TypePredicate‹T›): ArrayPredicate‹T›
Defined in src/Types.ts:36
isArraySatisfying :: a -> bool
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
predicate |
TypePredicate‹T› |
Returns: ArrayPredicate‹T›
Const
isBoolean
▸ isBoolean(a
: unknown): a is boolean
Defined in src/Types.ts:158
isBoolean :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is boolean
Const
isDictionary
▸ isDictionary(a
: unknown): a is Dictionary
Defined in src/Types.ts:150
isDictionary :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Dictionary
Const
isNat
▸ isNat(a
: unknown): a is number
Defined in src/Types.ts:128
isNat :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is number
Const
isNumber
▸ isNumber(a
: unknown): a is number
Defined in src/Types.ts:121
isNumber :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is number
Const
isPair
▸ isPair(a
: unknown): a is Pair
Defined in src/Types.ts:51
isPair :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Pair
isPairSatisfying
▸ isPairSatisfying<T>(predicate
: TypePredicate‹T›): PairPredicate‹T›
Defined in src/Types.ts:59
isPairSatisfying :: a -> bool
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
predicate |
TypePredicate‹T› |
Returns: PairPredicate‹T›
Const
isRegExp
▸ isRegExp(a
: unknown): a is RegExp
Defined in src/Types.ts:114
isRegExp :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is RegExp
Const
isString
▸ isString(a
: unknown): a is string
Defined in src/Types.ts:136
isString :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is string
Const
isStringArray
▸ isStringArray(a
: unknown): a is string[]
Defined in src/Types.ts:166
isStringArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is string[]
Const
propSatisfiesIfExists
▸ propSatisfiesIfExists(pred
: function, name
: string): function
Defined in src/Types.ts:99
propSatisfiesIfExists :: (Pred, String) -> Reader a bool
Parameters:
▪ pred: function
▸ (a
: unknown): boolean
Parameters:
Name | Type |
---|---|
a |
unknown |
▪ name: string
Returns: function
▸ (...a
: keyof A[]): boolean
Parameters:
Name | Type |
---|---|
...a |
keyof A[] |
functional-types › "Vertex/Arbitraries"
Module: "Vertex/Arbitraries"
Index
Functions
Functions
Const
boundingBox
▸ boundingBox(): Arbitrary‹BoundingBox›
Defined in src/Vertex/Arbitraries.ts:38
Returns: Arbitrary‹BoundingBox›
Const
overlaps
▸ overlaps(): Arbitrary‹[Poly, Poly]›
Defined in src/Vertex/Arbitraries.ts:31
Returns: Arbitrary‹[Poly, Poly]›
Const
poly
▸ poly(): Arbitrary‹Poly›
Defined in src/Vertex/Arbitraries.ts:21
Returns: Arbitrary‹Poly›
Const
separates
▸ separates(): Arbitrary‹[Poly, Poly]›
Defined in src/Vertex/Arbitraries.ts:24
Returns: Arbitrary‹[Poly, Poly]›
Const
vertex
▸ vertex(): Arbitrary‹Vertex›
Defined in src/Vertex/Arbitraries.ts:15
Returns: Arbitrary‹Vertex›
Const
withHeaderArguments
▸ withHeaderArguments(): Arbitrary‹object›
Defined in src/Vertex/Arbitraries.ts:50
Returns: Arbitrary‹object›
functional-types › "Vertex/index"
Module: "Vertex/index"
Index
Interfaces
Type aliases
Variables
- areaOf
- getBottomLeft
- getBottomRight
- getCornersFromPoly
- getTopLeft
- getTopRight
- getX
- getXs
- getY
- getYs
- heightOf
- isEmptyPoly
- unionOf
- widthOf
Functions
- append
- containedBy
- contains
- getChildlessBoundingBoxes
- hasColumns
- hasHeader
- hasHeaderColumn
- hasHeaderRow
- hasHeaders
- hasRows
- hasRowsOrColumns
- intersects
- isBoundingBox
- isLabeledBoundingBox
- isLine
- isPoly
- isVertex
- lengthOf
- makeBoundingBox
- makeLabeledBoundingBox
- makeLine
- makePoly
- makeVertex
- ratioContainedBy
- ratioContaining
- sortPoly
- splitByXs
- splitByYs
- toPoly
- toRectangle
- unions
- withHeader
- withHeaderColumn
- withHeaderRow
Type aliases
Line
Defined in src/Vertex/index.ts:55
Poly
Ƭ Poly: [Vertex, Vertex, Vertex, Vertex]
Defined in src/Vertex/index.ts:60
[TopLeft, TopRight, BottomLeft, BottomRight]
WithColumns
Ƭ WithColumns: A & object
Defined in src/Vertex/index.ts:72
WithHeader
Ƭ WithHeader: WithHeaderRow‹A› | WithHeaderColumn‹A›
Defined in src/Vertex/index.ts:84
WithHeaderColumn
Ƭ WithHeaderColumn: A & object
Defined in src/Vertex/index.ts:80
WithHeaderRow
Ƭ WithHeaderRow: A & object
Defined in src/Vertex/index.ts:76
WithHeaders
Ƭ WithHeaders: WithHeaderRow‹A› & WithHeaderColumn‹A›
Defined in src/Vertex/index.ts:88
WithRows
Ƭ WithRows: A & object
Defined in src/Vertex/index.ts:68
Variables
Const
areaOf
• areaOf: function = converge(multiply, [ widthOf, heightOf, ])
Defined in src/Vertex/index.ts:667
areaOf :: Poly -> Float
Type declaration:
▸ (poly
: Poly): number
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getBottomLeft
• getBottomLeft: function = nth(2)
Defined in src/Vertex/index.ts:535
getBottomLeft :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getBottomRight
• getBottomRight: function = nth(3)
Defined in src/Vertex/index.ts:542
getBottomRight :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getCornersFromPoly
• getCornersFromPoly: function = applySpec({ start: head, end: last, }) as R.Reader<Poly, Corners>
Defined in src/Vertex/index.ts:330
getCornersFromPoly :: Poly -> Corners
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getTopLeft
• getTopLeft: function = nth(0)
Defined in src/Vertex/index.ts:521
getTopLeft :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getTopRight
• getTopRight: function = nth(1)
Defined in src/Vertex/index.ts:528
getTopRight :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getX
• getX: function = pipe(head, prop<'x', number>('x'))
Defined in src/Vertex/index.ts:440
getX :: Line -> Float
Type declaration:
▸ (line
: Line): number
Parameters:
Name | Type |
---|---|
line |
Line |
Const
getXs
• getXs: function = map(getX)
Defined in src/Vertex/index.ts:454
getXs :: [Line] -> [Float]
Type declaration:
▸ (lines
: Line[]): number[]
Parameters:
Name | Type |
---|---|
lines |
Line[] |
Const
getY
• getY: function = pipe(head, prop<'y', number>('y'))
Defined in src/Vertex/index.ts:433
getY :: Line -> Float
Type declaration:
▸ (line
: Line): number
Parameters:
Name | Type |
---|---|
line |
Line |
Const
getYs
• getYs: function = map(getY)
Defined in src/Vertex/index.ts:447
getYs :: [Line] -> [Float]
Type declaration:
▸ (lines
: Line[]): number[]
Parameters:
Name | Type |
---|---|
lines |
Line[] |
Const
heightOf
• heightOf: function = pipe( converge(subtract, [ pipe(getBottomLeft, prop('y')), pipe(getTopLeft, prop('y')), ]), Math.abs )
Defined in src/Vertex/index.ts:654
heightOf :: Poly -> Float
Type declaration:
▸ (poly
: Poly): number
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
isEmptyPoly
• isEmptyPoly: function = pipe(areaOf, gte(0))
Defined in src/Vertex/index.ts:677
isEmpty :: Poly -> Bool
Type declaration:
▸ (poly
: Poly): boolean
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
unionOf
• unionOf: function = converge( reduce((acc: Poly, value: Poly) => unions(acc)(value)), [head, tail] )
Defined in src/Vertex/index.ts:767
unionOf :: [Poly] -> Poly
Type declaration:
Parameters:
Name | Type |
---|---|
polygons |
Poly[] |
Const
widthOf
• widthOf: function = pipe( converge(subtract, [ pipe(getTopRight, prop('x')), pipe(getTopLeft, prop('x')), ]), Math.abs )
Defined in src/Vertex/index.ts:641
widthOf :: Poly -> Float
Type declaration:
▸ (poly
: Poly): number
Parameters:
Name | Type |
---|---|
poly |
Poly |
Functions
Const
append
▸ append<A>(boundingBox
: A): (Anonymous function)
Defined in src/Vertex/index.ts:504
append :: BoundingBox -> ([Float], [Float]) -> BoundingBox
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
boundingBox |
A |
Returns: (Anonymous function)
Const
containedBy
▸ containedBy(container
: [Vertex, Vertex, Vertex, Vertex], threshold
: number): (Anonymous function)
Defined in src/Vertex/index.ts:821
containedBy :: Poly -> Reader Poly bool
Parameters:
Name | Type | Default |
---|---|---|
container |
[Vertex, Vertex, Vertex, Vertex] | - |
threshold |
number | 0.8 |
Returns: (Anonymous function)
Const
contains
▸ contains(containee
: [Vertex, Vertex, Vertex, Vertex], threshold
: number): (Anonymous function)
Defined in src/Vertex/index.ts:805
contains :: Poly -> Reader Poly bool
Parameters:
Name | Type | Default |
---|---|---|
containee |
[Vertex, Vertex, Vertex, Vertex] | - |
threshold |
number | 0.8 |
Returns: (Anonymous function)
Const
getChildlessBoundingBoxes
▸ getChildlessBoundingBoxes(boundingBoxes
: LabeledBoundingBox[]): any[]
Defined in src/Vertex/index.ts:866
getChildlessBoundingBoxes :: [BoundingBox] -> [BoundingBox]
Parameters:
Name | Type |
---|---|
boundingBoxes |
LabeledBoundingBox[] |
Returns: any[]
Const
hasColumns
▸ hasColumns<A>(a
: A): a is WithColumns
Defined in src/Vertex/index.ts:182
hasColumns :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasHeader
▸ hasHeader<A>(a
: A): a is WithHeader
Defined in src/Vertex/index.ts:217
hasHeader :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasHeaderColumn
▸ hasHeaderColumn<A>(a
: A): a is WithHeaderColumn
Defined in src/Vertex/index.ts:208
hasHeaderColumn :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Returns: a is WithHeaderColumn
Const
hasHeaderRow
▸ hasHeaderRow<A>(a
: A): a is WithHeaderRow
Defined in src/Vertex/index.ts:199
hasHeaderRow :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasHeaders
▸ hasHeaders<A>(a
: A): a is WithHeaders
Defined in src/Vertex/index.ts:225
hasHeaders :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasRows
▸ hasRows<A>(a
: A): a is WithRows
Defined in src/Vertex/index.ts:174
hasRows :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasRowsOrColumns
▸ hasRowsOrColumns<A>(a
: A): a is WithRows | WithColumns
Defined in src/Vertex/index.ts:190
hasRowsOrColumns :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Returns: a is WithRows | WithColumns
Const
intersects
▸ intersects(p0
: Poly): (Anonymous function)
Defined in src/Vertex/index.ts:719
intersects :: Poly -> Reader Poly (Option Poly)
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: (Anonymous function)
Const
isBoundingBox
▸ isBoundingBox(a
: unknown): a is BoundingBox
Defined in src/Vertex/index.ts:162
isBoundingBox :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BoundingBox
Const
isLabeledBoundingBox
▸ isLabeledBoundingBox(a
: unknown): a is LabeledBoundingBox
Defined in src/Vertex/index.ts:461
isLabeledBoundingBox :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is LabeledBoundingBox
Const
isLine
▸ isLine(a
: unknown): a is Line
Defined in src/Vertex/index.ts:122
isLine :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Line
Const
isPoly
▸ isPoly(a
: unknown): a is Poly
Defined in src/Vertex/index.ts:134
isPoly :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Poly
Const
isVertex
▸ isVertex(a
: unknown): a is Vertex
Defined in src/Vertex/index.ts:114
isVertex :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Vertex
Const
lengthOf
▸ lengthOf(__namedParameters
: [any, any]): number
Defined in src/Vertex/index.ts:684
lengthOf :: Line -> Float
Parameters:
Name | Type |
---|---|
__namedParameters |
[any, any] |
Returns: number
Const
makeBoundingBox
▸ makeBoundingBox(poly
: Poly, ys
: number[], xs
: number[]): BoundingBox
Defined in src/Vertex/index.ts:414
makeBoundingBox :: (Poly, [Float], [Float]) -> BoundingBox
Parameters:
Name | Type |
---|---|
poly |
Poly |
ys |
number[] |
xs |
number[] |
Returns: BoundingBox
Const
makeLabeledBoundingBox
▸ makeLabeledBoundingBox(id
: string, label
: string, poly
: Poly, ys
: number[], xs
: number[], score?
: number): LabeledBoundingBox
Defined in src/Vertex/index.ts:474
makeLabeledBoundingBox :: (String, String, Poly, [Float], [Float]) -> LabeledBoundingBox
Parameters:
Name | Type |
---|---|
id |
string |
label |
string |
poly |
Poly |
ys |
number[] |
xs |
number[] |
score? |
number |
Returns: LabeledBoundingBox
Const
makeLine
▸ makeLine(x0
: number, y0
: number, x1
: number, y1
: number): Line
Defined in src/Vertex/index.ts:240
makeVertex :: (Float, Float, Float, Float) -> Line
Parameters:
Name | Type |
---|---|
x0 |
number |
y0 |
number |
x1 |
number |
y1 |
number |
Returns: Line
Const
makePoly
▸ makePoly(...coords
: [number, number, number, number]): Poly
Defined in src/Vertex/index.ts:305
makePoly :: (Float, Float, Float, Float) -> Poly
Parameters:
Name | Type |
---|---|
...coords |
[number, number, number, number] |
Returns: Poly
Const
makeVertex
▸ makeVertex(x
: number, y
: number): Vertex
Defined in src/Vertex/index.ts:233
makeVertex :: (Float, Float) -> Vertex
Parameters:
Name | Type |
---|---|
x |
number |
y |
number |
Returns: Vertex
Const
ratioContainedBy
▸ ratioContainedBy(p0
: Poly): function
Defined in src/Vertex/index.ts:777
ratioContainedBy :: Poly -> Reader Poly Float
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: function
▸ (...a
: keyof any[]): any
Parameters:
Name | Type |
---|---|
...a |
keyof any[] |
Const
ratioContaining
▸ ratioContaining(p0
: Poly): (Anonymous function)
Defined in src/Vertex/index.ts:793
ratioContaining :: Poly -> Reader Poly Float
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: (Anonymous function)
Const
sortPoly
▸ sortPoly(__namedParameters
: [Vertex, Vertex, Vertex]): [Vertex, Vertex, Vertex, Vertex]
Defined in src/Vertex/index.ts:317
sortPoly :: Poly -> Poly
Parameters:
Name | Type |
---|---|
__namedParameters |
[Vertex, Vertex, Vertex] |
Returns: [Vertex, Vertex, Vertex, Vertex]
Const
splitByXs
▸ splitByXs(xs
: number[]): (Anonymous function)
Defined in src/Vertex/index.ts:847
splitByXs :: [number] -> Reader Poly [Poly]
Parameters:
Name | Type |
---|---|
xs |
number[] |
Returns: (Anonymous function)
Const
splitByYs
▸ splitByYs(ys
: number[]): (Anonymous function)
Defined in src/Vertex/index.ts:830
splitByYs :: [number] -> Reader Poly [Poly]
Parameters:
Name | Type |
---|---|
ys |
number[] |
Returns: (Anonymous function)
Const
toPoly
▸ toPoly(__namedParameters
: object): [Vertex, Vertex, Vertex, Vertex]
Defined in src/Vertex/index.ts:711
toPoly :: Rectangle -> Poly
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
x0 |
number |
x1 |
number |
y0 |
number |
y1 |
number |
Returns: [Vertex, Vertex, Vertex, Vertex]
Const
toRectangle
▸ toRectangle(__namedParameters
: [Vertex, Vertex, Vertex, Vertex]): object
Defined in src/Vertex/index.ts:694
toRectangle :: Poly -> Rectangle
Parameters:
Name | Type |
---|---|
__namedParameters |
[Vertex, Vertex, Vertex, Vertex] |
Returns: object
-
x0: number = topLeft.x
-
x1: number = bottomRight.x
-
y0: number = topRight.y
-
y1: number = bottomLeft.y
Const
unions
▸ unions(p0
: Poly): (Anonymous function)
Defined in src/Vertex/index.ts:745
unions :: Poly -> Reader Poly Poly
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: (Anonymous function)
Const
withHeader
▸ withHeader(vertex
: Vertex): (Anonymous function)
Defined in src/Vertex/index.ts:626
withHeader :: Vertex -> ReaderEither BoundingBox (WithHeader BoundingBox) BoundingBox
Parameters:
Name | Type |
---|---|
vertex |
Vertex |
Returns: (Anonymous function)
Const
withHeaderColumn
▸ withHeaderColumn(x
: number): (Anonymous function)
Defined in src/Vertex/index.ts:589
withHeaderColumn :: Float -> ReaderEither BoundingBox BoundingBox (WithHeaderColumn BoundingBox)
Parameters:
Name | Type |
---|---|
x |
number |
Returns: (Anonymous function)
Const
withHeaderRow
▸ withHeaderRow(y
: number): (Anonymous function)
Defined in src/Vertex/index.ts:551
withHeaderRow :: Float -> ReaderEither BoundingBox BoundingBox (WithHeaderRow BoundingBox)
Parameters:
Name | Type |
---|---|
y |
number |
Returns: (Anonymous function)
Module: "Vision"
Index
Interfaces
- AnnotateImageRequest
- AnnotateImageResponse
- AsyncAnnotateFileRequest
- Block
- BoundingPoly
- DetectedBreak
- DetectedLanguage
- EntityAnnotation
- Feature
- GcsDestination
- GcsSource
- Image
- ImageContext
- ImageSource
- InputConfig
- LatLng
- LocationInfo
- NormalizedVertex
- OutputConfig
- Page
- Paragraph
- Property
- TextAnnotation
- TextProperty
- TextSymbol
- Vertex
- Word
Type aliases
Variables
- getBlocksFromPage
- getFileIdFromAnnotateImageRequest
- getPagesFromAnnotateImageRequest
- getPagesFromAnnotateImageResponse
- getParagraphsFromBlock
- getParagraphsFromPage
- getSymbolsFromWord
- getTextFromSymbol
- getTextFromWord
- getWordsFromPage
- getWordsFromParagraph
Type aliases
BlockType
Ƭ BlockType: "UNKNOWN" | "TEXT" | "TABLE" | "PICTURE" | "RULER" | "BARCODE" | string
Defined in src/Vision.ts:163
BreakType
Ƭ BreakType: "UNKNOWN" | "SPACE" | "SURE_SPACE" | "EOL_SURE_SPACE" | "HYPHEN" | "LINE_BREAK"
Defined in src/Vision.ts:202
Type
Ƭ Type: string
Defined in src/Vision.ts:82
Variables
Const
getBlocksFromPage
• getBlocksFromPage: function = R.prop('blocks')
Defined in src/Vision.ts:305
getBlocksFromPage :: Page -> [Block]
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getFileIdFromAnnotateImageRequest
• getFileIdFromAnnotateImageRequest: function = pipe( path(['inputConfig', 'gcsSource', 'uri']), split('/'), takeLast(2) as (segments: string[]) => string[], join('/') )
Defined in src/Vision.ts:360
getFileIdFromAnnotateImageRequest :: AnnotateImageRequest -> String
Type declaration:
▸ (request
: AsyncAnnotateFileRequest): string
Parameters:
Name | Type |
---|---|
request |
AsyncAnnotateFileRequest |
Const
getPagesFromAnnotateImageRequest
• getPagesFromAnnotateImageRequest: function = pipe( prop('responses') as ( request: AsyncAnnotateFileRequest ) => AsyncAnnotateFileRequest['responses'], defaultTo([]), map(getPagesFromAnnotateImageResponse), unnest )
Defined in src/Vision.ts:344
getPagesFromAnnotateImageRequest :: AnnotateImageRequest -> [Page]
Type declaration:
▸ (request
: AsyncAnnotateFileRequest): Page[]
Parameters:
Name | Type |
---|---|
request |
AsyncAnnotateFileRequest |
Const
getPagesFromAnnotateImageResponse
• getPagesFromAnnotateImageResponse: function = pipe( path(['fullTextAnnotation', 'pages']), defaultTo([]) as (pages: Page[] | undefined) => Page[] )
Defined in src/Vision.ts:332
getPagesFromAnnotateImageResponse :: AnnotateImageResponse -> [Page]
Type declaration:
▸ (response
: AnnotateImageResponse): Page[]
Parameters:
Name | Type |
---|---|
response |
AnnotateImageResponse |
Const
getParagraphsFromBlock
• getParagraphsFromBlock: function = R.prop( 'paragraphs' )
Defined in src/Vision.ts:296
getParagraphsFromBlock :: Block -> [Paragraph]
Type declaration:
Parameters:
Name | Type |
---|---|
block |
Block |
Const
getParagraphsFromPage
• getParagraphsFromPage: function = R.pipe( getBlocksFromPage, R.chain(getParagraphsFromBlock) )
Defined in src/Vision.ts:312
getParagraphsFromPage :: Page -> [Paragraph]
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getSymbolsFromWord
• getSymbolsFromWord: function = R.prop( 'symbols' )
Defined in src/Vision.ts:267
getSymbolsFromWord :: Word -> [TextSymbol]
Type declaration:
▸ (word
: Word): TextSymbol[]
Parameters:
Name | Type |
---|---|
word |
Word |
Const
getTextFromSymbol
• getTextFromSymbol: function = R.prop('text')
Defined in src/Vision.ts:260
getTextFromSymbol :: TextSymbol -> String
Type declaration:
▸ (symbol
: TextSymbol): string
Parameters:
Name | Type |
---|---|
symbol |
TextSymbol |
Const
getTextFromWord
• getTextFromWord: function = R.pipe( getSymbolsFromWord, R.map(getTextFromSymbol), R.join('') )
Defined in src/Vision.ts:276
getTextFromWord :: Word -> String
Type declaration:
▸ (word
: Word): string
Parameters:
Name | Type |
---|---|
word |
Word |
Const
getWordsFromPage
• getWordsFromPage: function = R.pipe( getParagraphsFromPage, R.chain(getWordsFromParagraph) )
Defined in src/Vision.ts:322
getWordsFromPage :: Page -> [Word]
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getWordsFromParagraph
• getWordsFromParagraph: function = R.prop( 'words' )
Defined in src/Vision.ts:287
getWordsFromParagraph :: Paragraph -> [Word]
Type declaration:
▸ (paragraph
: Paragraph): Word[]
Parameters:
Name | Type |
---|---|
paragraph |
Paragraph |