JSPM

  • Created
  • Published
  • Downloads 87
  • Score
    100M100P100Q71953F
  • License MIT

Functional Types for Entities' functions

Package Exports

  • functional-types
  • functional-types/lib/FileType
  • functional-types/lib/Folder
  • functional-types/lib/Schema
  • functional-types/lib/TableAnnotation

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (functional-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

functional-types

functional-types

Index

Modules

functional-types

functional-types

Interfaces

functional-types"Folder/index"Attributes

Interface: Attributes

Hierarchy

  • Attributes

Index

Properties

Properties

folder

folder: string

Defined in src/Folder/index.ts:29


id

id: string

Defined in src/Folder/index.ts:28


name

name: string

Defined in src/Folder/index.ts:30


type

type: FT.FileType

Defined in src/Folder/index.ts:31

functional-types"Folder/index"Folder

Interface: Folder

Hierarchy

  • Folder

Index

Properties

Properties

created_at

created_at: string

Defined in src/Folder/index.ts:23


id

id: string

Defined in src/Folder/index.ts:21


name

name: string

Defined in src/Folder/index.ts:22


updated_at

updated_at: string

Defined in src/Folder/index.ts:24

functional-types"Folder/index"Metadata

Interface: Metadata

Hierarchy

  • Metadata

Index

Properties

Properties

bucket

bucket: string

Defined in src/Folder/index.ts:40


content_type

content_type: string

Defined in src/Folder/index.ts:42


created_at

created_at: string

Defined in src/Folder/index.ts:44


generation

generation: string

Defined in src/Folder/index.ts:41


id

id: string

Defined in src/Folder/index.ts:36


kind

kind: string

Defined in src/Folder/index.ts:35


media_link: string

Defined in src/Folder/index.ts:38


name

name: string

Defined in src/Folder/index.ts:39


self_link: string

Defined in src/Folder/index.ts:37


size

size: string

Defined in src/Folder/index.ts:43


updated_at

updated_at: string

Defined in src/Folder/index.ts:45

functional-types"Folder/index"Reference

Interface: Reference

Hierarchy

  • Reference

Index

Properties

Properties

file

file: string

Defined in src/Folder/index.ts:49

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"Schema/index"FileMatcher

Interface: FileMatcher

Hierarchy

Index

Properties

Properties

Optional child

child? : FileMatcher

Defined in src/Schema/index.ts:30


name

name: string

Inherited from Matcher.name

Defined in src/Schema/index.ts:25


regex

regex: string

Inherited from Matcher.regex

Defined in src/Schema/index.ts:24


timestamp_capture_group

timestamp_capture_group: number

Inherited from Matcher.timestamp_capture_group

Defined in src/Schema/index.ts:26


type

type: Type

Defined in src/Schema/index.ts:31

functional-types"Schema/index"Gettable

Interface: Gettable

Hierarchy

  • Gettable

Index

Properties

Properties

attributes

attributes: Matcher[]

Defined in src/Schema/index.ts:36


file

file: FileMatcher

Defined in src/Schema/index.ts:35

functional-types"Schema/index"Matcher

Interface: Matcher

Hierarchy

Index

Properties

Properties

name

name: string

Defined in src/Schema/index.ts:25


regex

regex: string

Defined in src/Schema/index.ts:24


timestamp_capture_group

timestamp_capture_group: number

Defined in src/Schema/index.ts:26

functional-types"Schema/index"Schema

Interface: Schema

Hierarchy

Index

Properties

Properties

created_at

created_at: Date

Defined in src/Schema/index.ts:44


gettables

gettables: Gettables

Defined in src/Schema/index.ts:43


id

id: string

Defined in src/Schema/index.ts:42


updated_at

updated_at: Date

Defined in src/Schema/index.ts:45

functional-types"Schema/index"VersionedSchema

Interface: VersionedSchema

Hierarchy

Index

Properties

Properties

created_at

created_at: Date

Inherited from Schema.created_at

Defined in src/Schema/index.ts:44


gettables

gettables: Gettables

Inherited from Schema.gettables

Defined in src/Schema/index.ts:43


id

id: string

Inherited from Schema.id

Defined in src/Schema/index.ts:42


schema_id

schema_id: string

Defined in src/Schema/index.ts:49


updated_at

updated_at: Date

Inherited from Schema.updated_at

Defined in src/Schema/index.ts:45

functional-types"TableAnnotation"TableAnnotation

Interface: TableAnnotation

Hierarchy

  • TableAnnotation

Index

Properties

Properties

boundingBoxesByPage

boundingBoxesByPage: BoundingBoxesByPage

Defined in src/TableAnnotation.ts:25


created_at

created_at: string

Defined in src/TableAnnotation.ts:26


file

file: string

Defined in src/TableAnnotation.ts:24


id

id: string

Defined in src/TableAnnotation.ts:23


updated_at

updated_at: string

Defined in src/TableAnnotation.ts:27

functional-types"TextAnnotation"Page

Interface: Page

Hierarchy

  • Page

Index

Properties

Properties

paragraphsById

paragraphsById: ParagraphsById

Defined in src/TextAnnotation.ts:68


wordsById

wordsById: WordsById

Defined in src/TextAnnotation.ts:67

functional-types"TextAnnotation"Paragraph

Interface: Paragraph

Hierarchy

  • Paragraph

Index

Properties

Properties

boundingPoly

boundingPoly: Poly

Defined in src/TextAnnotation.ts:58


confidence

confidence: number

Defined in src/TextAnnotation.ts:59


id

id: string

Defined in src/TextAnnotation.ts:57

functional-types"TextAnnotation"TextAnnotation

Interface: TextAnnotation

Hierarchy

  • TextAnnotation

Index

Properties

Properties

created_at

created_at: string

Defined in src/TextAnnotation.ts:75


file

file: string

Defined in src/TextAnnotation.ts:73


id

id: string

Defined in src/TextAnnotation.ts:72


pages

pages: Page[]

Defined in src/TextAnnotation.ts:74


updated_at

updated_at: string

Defined in src/TextAnnotation.ts:76

functional-types"TextAnnotation"Word

Interface: Word

Hierarchy

  • Word

Index

Properties

Properties

boundingPoly

boundingPoly: Poly

Defined in src/TextAnnotation.ts:51


breakType

breakType: BreakType

Defined in src/TextAnnotation.ts:50


confidence

confidence: number

Defined in src/TextAnnotation.ts:53


id

id: string

Defined in src/TextAnnotation.ts:48


paragraph

paragraph: string

Defined in src/TextAnnotation.ts:49


text

text: string

Defined in src/TextAnnotation.ts:52

functional-types"Vertex/index"BoundingBox

Interface: BoundingBox

Hierarchy

Index

Properties

Properties

boundingPoly

boundingPoly: Poly

Defined in src/Vertex/index.ts:50


columns

columns: Line[]

Defined in src/Vertex/index.ts:52


rows

rows: Line[]

Defined in src/Vertex/index.ts:51

functional-types"Vertex/index"Corners

Interface: Corners

Hierarchy

  • Corners

Index

Properties

Properties

end

end: Vertex

Defined in src/Vertex/index.ts:77


start

start: Vertex

Defined in src/Vertex/index.ts:76

functional-types"Vertex/index"LabeledBoundingBox

Interface: LabeledBoundingBox

Hierarchy

Index

Properties

Properties

boundingPoly

boundingPoly: Poly

Inherited from BoundingBox.boundingPoly

Defined in src/Vertex/index.ts:50


columns

columns: Line[]

Inherited from BoundingBox.columns

Defined in src/Vertex/index.ts:52


id

id: string

Defined in src/Vertex/index.ts:71


label

label: string

Defined in src/Vertex/index.ts:72


rows

rows: Line[]

Inherited from BoundingBox.rows

Defined in src/Vertex/index.ts:51

functional-types"Vertex/index"Rectangle

Interface: Rectangle

Hierarchy

  • Rectangle

Index

Properties

Properties

x0

x0: number

Defined in src/Vertex/index.ts:81


x1

x1: number

Defined in src/Vertex/index.ts:83


y0

y0: number

Defined in src/Vertex/index.ts:82


y1

y1: number

Defined in src/Vertex/index.ts:84

functional-types"Vertex/index"Vertex

Interface: Vertex

Hierarchy

  • Vertex

Index

Properties

Properties

x

x: number

Defined in src/Vertex/index.ts:38


y

y: number

Defined in src/Vertex/index.ts:39

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

Index

Properties

Properties

x

x: number

Overrides Vertex.x

Defined in src/Vision.ts:239


y

y: number

Overrides Vertex.y

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

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"DateTime"

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"FileType"

Module: "FileType"

Index

Type aliases

Variables

Functions

Type aliases

ContentType

Ƭ ContentType: DocumentContentType | ImageContentType

Defined in src/FileType.ts:26


DocumentContentType

Ƭ DocumentContentType: "application/pdf" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/json"

Defined in src/FileType.ts:19


DocumentType

Ƭ DocumentType: "pdf" | "excel" | "json"

Defined in src/FileType.ts:13


FileType

Ƭ FileType: DocumentType | ImageType

Defined in src/FileType.ts:17


ImageContentType

Ƭ ImageContentType: "image/png" | "image/jpeg"

Defined in src/FileType.ts:24


ImageType

Ƭ ImageType: "png" | "jpeg"

Defined in src/FileType.ts:15

Variables

Const contentTypes

contentTypes: ContentType[] = values(FileTypeToContentType)

Defined in src/FileType.ts:151

contentTypes: [ContentType]

Const documentTypes

documentTypes: DocumentType[] = keys(DocumentTypeToContentType)

Defined in src/FileType.ts:112

documentTypes: [DocumentType]

Const fileContentTypes

fileContentTypes: DocumentContentType[] = values( DocumentTypeToContentType )

Defined in src/FileType.ts:133

contentTypes: [DocumentContentType]

Const fileTypes

fileTypes: FileType[] = keys(FileTypeToContentType)

Defined in src/FileType.ts:126

fileTypes: [FileType]

Const fromContentType

fromContentType: function = prop( __, ContentTypeToFileType )

Defined in src/FileType.ts:252

fromContentType :: ContentType -> FileType
Type declaration:

▸ (contentType: ContentType): FileType

Parameters:

Name Type
contentType ContentType

Const fromDocumentContentType

fromDocumentContentType: function = prop(__, ContentTypeToDocumentType)

Defined in src/FileType.ts:234

fromDocumentContentType :: DocumentContentType -> DocumentType
Type declaration:

▸ (contentType: DocumentContentType): DocumentType

Parameters:

Name Type
contentType DocumentContentType

Const fromImageContentType

fromImageContentType: function = prop(__, ContentTypeToImageType)

Defined in src/FileType.ts:243

fromImageContentType :: DocumentContentType -> DocumentType
Type declaration:

▸ (contentType: ImageContentType): ImageType

Parameters:

Name Type
contentType ImageContentType

Const imageContentTypes

imageContentTypes: ImageContentType[] = values( ImageTypeToContentType )

Defined in src/FileType.ts:142

imageContentTypes: [DocumentContentType]

Const imageTypes

imageTypes: ImageType[] = keys(ImageTypeToContentType)

Defined in src/FileType.ts:119

imageTypes: [DocumentType]

Const toContentType

toContentType: function = prop( __, FileTypeToContentType )

Defined in src/FileType.ts:224

toContentType :: FileType -> ContentType
Type declaration:

▸ (fileType: FileType): ContentType

Parameters:

Name Type
fileType FileType

Const toDocumentContentType

toDocumentContentType: function = prop(__, DocumentTypeToContentType)

Defined in src/FileType.ts:206

toDocumentContentType :: DocumentType -> DocumentContentType
Type declaration:

▸ (fileType: DocumentType): DocumentContentType

Parameters:

Name Type
fileType DocumentType

Const toImageContentType

toImageContentType: function = prop(__, ImageTypeToContentType)

Defined in src/FileType.ts:215

toImageContentType :: DocumentType -> ImageContentType
Type declaration:

▸ (imageType: ImageType): ImageContentType

Parameters:

Name Type
imageType ImageType

Functions

Const isContentType

isContentType(a: unknown): a is ContentType

Defined in src/FileType.ts:198

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:182

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:158

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:174

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:190

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:166

isImageType :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is ImageType

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

Type aliases

File

Ƭ File: Attributes & object

Defined in src/Folder/index.ts:52


FilesByType

Ƭ FilesByType: Record‹FT.DocumentType, File[]›

Defined in src/Folder/index.ts:54

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:161

getAttributesFromName :: String -> Either Attributes Error
Type declaration:

▸ (name: string): E.Either‹Error, Omit‹Attributes, "type"››

Parameters:

Name Type
name string

Functions

Const fromMetadata

fromMetadata(metadata: Metadata): Left‹Error› | Right‹object›

Defined in src/Folder/index.ts:184

fromMetadata :: Metadata -> Either

Parameters:

Name Type
metadata Metadata

Returns: Left‹Error› | Right‹object›


Const isFile

isFile(a: unknown): a is File

Defined in src/Folder/index.ts:134

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:142

isFileArray :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is File[]


Const isFilesByType

isFilesByType(a: unknown): a is FilesByType

Defined in src/Folder/index.ts:150

isFilesByType :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is FilesByType


Const isFolder

isFolder(a: unknown): a is Folder

Defined in src/Folder/index.ts:61

isFolder -> bool

Parameters:

Name Type
a unknown

Returns: a is Folder


Const isMetadata

isMetadata(a: unknown): a is Metadata

Defined in src/Folder/index.ts:111

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:205

isReference :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is Reference


Const make

make(name: string): (Anonymous function)

Defined in src/Folder/index.ts:75

make :: String -> Folder

Parameters:

Name Type
name string

Returns: (Anonymous function)

functional-types"index"

Module: "index"

Index

References

References

F

F:


FT

FT:


L

L:


T

T:


V

V:

functional-types"Label"

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

functional-types"Schema/Arbitraries"

Module: "Schema/Arbitraries"

Index

Variables

Functions

Variables

Const regex

regex: nonEmptyString = nonEmptyString

Defined in src/Schema/Arbitraries.ts:85

Functions

Const fileMatcher

fileMatcher(): Arbitrary‹FileMatcher

Defined in src/Schema/Arbitraries.ts:100

Returns: Arbitrary‹FileMatcher


Const fileType

fileType(): Arbitrary‹Type

Defined in src/Schema/Arbitraries.ts:75

Returns: Arbitrary‹Type


Const gettable

gettable(): Arbitrary‹Gettable

Defined in src/Schema/Arbitraries.ts:105

Returns: Arbitrary‹Gettable


Const gettables

gettables(): Arbitrary‹Record‹string, Gettable››

Defined in src/Schema/Arbitraries.ts:112

Returns: Arbitrary‹Record‹string, Gettable››


Const invalidGettableObject

invalidGettableObject(): Arbitrary‹Dictionary‹unknown››

Defined in src/Schema/Arbitraries.ts:40

Returns: Arbitrary‹Dictionary‹unknown››


Const invalidMatcherObject

invalidMatcherObject(): Arbitrary‹Dictionary‹unknown››

Defined in src/Schema/Arbitraries.ts:20

Returns: Arbitrary‹Dictionary‹unknown››


Const invalidSchemaObject

invalidSchemaObject(): Arbitrary‹Dictionary‹unknown››

Defined in src/Schema/Arbitraries.ts:60

Returns: Arbitrary‹Dictionary‹unknown››


Const matcher

matcher(): Arbitrary‹Matcher

Defined in src/Schema/Arbitraries.ts:87

Returns: Arbitrary‹Matcher


Const nonEmptyString

nonEmptyString(): Arbitrary‹string›

Defined in src/Schema/Arbitraries.ts:12

Returns: Arbitrary‹string›


Const nonGettableObject

nonGettableObject(): Arbitrary‹unknown›

Defined in src/Schema/Arbitraries.ts:53

Returns: Arbitrary‹unknown›


Const nonMatcherObject

nonMatcherObject(): Arbitrary‹unknown›

Defined in src/Schema/Arbitraries.ts:29

Returns: Arbitrary‹unknown›


Const nonNumber

nonNumber(): Arbitrary‹unknown›

Defined in src/Schema/Arbitraries.ts:17

Returns: Arbitrary‹unknown›


Const nonSchemaObject

nonSchemaObject(): Arbitrary‹unknown›

Defined in src/Schema/Arbitraries.ts:68

Returns: Arbitrary‹unknown›


Const nonString

nonString(): Arbitrary‹unknown›

Defined in src/Schema/Arbitraries.ts:14

Returns: Arbitrary‹unknown›


Const schema

schema(): Arbitrary‹Schema

Defined in src/Schema/Arbitraries.ts:122

Returns: Arbitrary‹Schema


Const singletonFileMatcher

singletonFileMatcher(): Arbitrary‹FileMatcher

Defined in src/Schema/Arbitraries.ts:94

Returns: Arbitrary‹FileMatcher


Const versionedSchema

versionedSchema(): Arbitrary‹VersionedSchema

Defined in src/Schema/Arbitraries.ts:130

Returns: Arbitrary‹VersionedSchema

functional-types"Schema/index"

Module: "Schema/index"

Index

Interfaces

Type aliases

Functions

Type aliases

Dictionary

Ƭ Dictionary: Record‹string, A›

Defined in src/Schema/index.ts:21


Gettables

Ƭ Gettables: DictionaryGettable

Defined in src/Schema/index.ts:39


Type

Ƭ Type: "pdf" | "excel" | "json" | "pdf-region" | "excel-sheet" | "json-child"

Defined in src/Schema/index.ts:13

Functions

Const isGettable

isGettable(a: unknown): a is Gettable

Defined in src/Schema/index.ts:70

isGettable -> bool

Parameters:

Name Type
a unknown

Returns: a is Gettable


Const isGettables

isGettables(a: unknown): a is Gettables

Defined in src/Schema/index.ts:82

isGettables -> bool

Parameters:

Name Type
a unknown

Returns: a is Gettables


Const isMatcher

isMatcher(a: unknown): a is Matcher

Defined in src/Schema/index.ts:57

isMatcher -> bool

Parameters:

Name Type
a unknown

Returns: a is Matcher


Const isSchema

isSchema(a: unknown): a is Schema

Defined in src/Schema/index.ts:90

isSchema -> bool

Parameters:

Name Type
a unknown

Returns: a is Schema


Const isVersionedSchema

isVersionedSchema(a: unknown): a is VersionedSchema

Defined in src/Schema/index.ts:130

isVersionedSchema :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is VersionedSchema


Const makeSchema

makeSchema(gettables: object): object

Defined in src/Schema/index.ts:102

makeSchema :: Gettables -> Schema

Parameters:

Name Type
gettables object

Returns: object

  • created_at: Date = date

  • gettables(): object

  • id: string = getRandomId()

  • updated_at: Date = date


Const toVersionedSchema

toVersionedSchema(schema: Schema): object

Defined in src/Schema/index.ts:117

toVersionedSchema :: Schema -> VersionedSchema

Parameters:

Name Type
schema Schema

Returns: object

  • id: string = getRandomId()

  • schema_id: string = schema.id

functional-types"String"

Module: "String"

Index

Variables

Variables

Const getRandomId

getRandomId: IO‹string› = uuid

Defined in src/String.ts:9

getRandomId: IO String

functional-types"TableAnnotation"

Module: "TableAnnotation"

Index

Interfaces

Type aliases

Functions

Type aliases

BoundingBoxes

Ƭ BoundingBoxes: Dictionary‹WithHeaderLabeledBoundingBox› | LabeledBoundingBox

Defined in src/TableAnnotation.ts:16


BoundingBoxesByPage

Ƭ BoundingBoxesByPage: BoundingBoxes[]

Defined in src/TableAnnotation.ts:20


TableAnnotationBase

Ƭ TableAnnotationBase: Pick‹TableAnnotation, "file" | "boundingBoxesByPage"›

Defined in src/TableAnnotation.ts:30

Functions

Const isBoundingBoxes

isBoundingBoxes(a: unknown): a is BoundingBoxes

Defined in src/TableAnnotation.ts:40

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:51

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:71

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:59

isTableAnnotationBase :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is TableAnnotationBase


Const make

make(__namedParameters: object): (Anonymous function)

Defined in src/TableAnnotation.ts:86

make :: (String, BoundingBoxesByPage) -> 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

Functions

Type aliases

BreakType

Ƭ BreakType: "UNKNOWN" | "SPACE" | "SURE_SPACE" | "EOL_SURE_SPACE" | "HYPHEN" | "LINE_BREAK"

Defined in src/TextAnnotation.ts:30


ParagraphsById

Ƭ ParagraphsById: Dictionary‹Paragraph

Defined in src/TextAnnotation.ts:64


WordsById

Ƭ WordsById: Dictionary‹Word

Defined in src/TextAnnotation.ts:62

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:38


Const fromAnnotateImageResponse

fromAnnotateImageResponse: function = pipe( Vision.getPagesFromAnnotateImageResponse, map(fromVisionPage), A.array.sequence(IO.io) )

Defined in src/TextAnnotation.ts:276

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<Page, Page>((acc: Page, page: Page) => mergeDeepLeft(acc, page), { wordsById: {}, paragraphsById: {}, }) ) )

Defined in src/TextAnnotation.ts:259

fromVisionPage :: VisionPage -> IO Page
Type declaration:

▸ (page: Page): IO‹Page

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:168

getBreakTypeFromSymbols :: [VisionSymbol] -> DetectedBreak
Type declaration:

▸ (symbols: TextSymbol[]): BreakType

Parameters:

Name Type
symbols TextSymbol[]

Functions

Const fromAnnotateImageRequest

fromAnnotateImageRequest(request: AsyncAnnotateFileRequest): (Anonymous function)

Defined in src/TextAnnotation.ts:290

fromAnnotateImageRequest :: AsyncAnnotateFileRequest -> IO [Page]

Parameters:

Name Type
request AsyncAnnotateFileRequest

Returns: (Anonymous function)


Const fromVisionParagraph

fromVisionParagraph(visionParagraph: Paragraph): (Anonymous function)

Defined in src/TextAnnotation.ts:222

fromVisionParagraph :: VisionParagraph -> IO Page

Parameters:

Name Type
visionParagraph Paragraph

Returns: (Anonymous function)


Const fromVisionWord

fromVisionWord(word: Word): (Anonymous function)

Defined in src/TextAnnotation.ts:203

fromVisionWord :: VisionWord -> Word

Parameters:

Name Type
word Word

Returns: (Anonymous function)


Const isBreakType

isBreakType(a: unknown): a is BreakType

Defined in src/TextAnnotation.ts:84

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:135

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:146

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:107

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:127

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:154

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:92

isWord :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is Word


Const isWordsById

isWordsById(a: unknown): a is WordsById

Defined in src/TextAnnotation.ts:119

isWordsById :: a -> bool

Parameters:

Name Type
a unknown

Returns: a is WordsById

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

Functions

Type aliases

Line

Ƭ Line: [Vertex, Vertex]

Defined in src/Vertex/index.ts:42


Poly

Ƭ Poly: [Vertex, Vertex, Vertex, Vertex]

Defined in src/Vertex/index.ts:47

[TopLeft, TopRight, BottomLeft, BottomRight]


WithHeader

Ƭ WithHeader: WithHeaderRow‹A› | WithHeaderColumn‹A›

Defined in src/Vertex/index.ts:63


WithHeaderColumn

Ƭ WithHeaderColumn: A & object

Defined in src/Vertex/index.ts:59


WithHeaderRow

Ƭ WithHeaderRow: A & object

Defined in src/Vertex/index.ts:55


WithHeaders

Ƭ WithHeaders: WithHeaderRow‹A› & WithHeaderColumn‹A›

Defined in src/Vertex/index.ts:67

Variables

Const areaOf

areaOf: function = converge(multiply, [ widthOf, heightOf, ])

Defined in src/Vertex/index.ts:552

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:426

getBottomLeft :: Poly -> Vertex
Type declaration:

▸ (poly: Poly): Vertex

Parameters:

Name Type
poly Poly

Const getBottomRight

getBottomRight: function = nth(3)

Defined in src/Vertex/index.ts:433

getBottomRight :: Poly -> Vertex
Type declaration:

▸ (poly: Poly): Vertex

Parameters:

Name Type
poly Poly

Const getCornersFromPoly

getCornersFromPoly: function = applySpec({ start: head, end: last, })

Defined in src/Vertex/index.ts:275

getCornersFromPoly :: Poly -> Corners
Type declaration:

▸ (poly: Poly): Corners

Parameters:

Name Type
poly Poly

Const getTopLeft

getTopLeft: function = nth(0)

Defined in src/Vertex/index.ts:412

getTopLeft :: Poly -> Vertex
Type declaration:

▸ (poly: Poly): Vertex

Parameters:

Name Type
poly Poly

Const getTopRight

getTopRight: function = nth(1)

Defined in src/Vertex/index.ts:419

getTopRight :: Poly -> Vertex
Type declaration:

▸ (poly: Poly): Vertex

Parameters:

Name Type
poly Poly

Const getX

getX: function = pipe(head, prop<'x', number>('x'))

Defined in src/Vertex/index.ts:343

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:357

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:336

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:350

getYs :: [Line] -> [Float]
Type declaration:

▸ (lines: Line[]): number[]

Parameters:

Name Type
lines Line[]

Const heightOf

heightOf: function = converge(subtract, [ pipe(getBottomLeft, prop('y')), pipe(getTopLeft, prop('y')), ])

Defined in src/Vertex/index.ts:542

heightOf :: Poly -> Float
Type declaration:

▸ (poly: Poly): number

Parameters:

Name Type
poly Poly

Const widthOf

widthOf: function = converge(subtract, [ pipe(getTopRight, prop('x')), pipe(getTopLeft, prop('x')), ])

Defined in src/Vertex/index.ts:532

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:395

append :: BoundingBox -> ([Float], [Float]) -> BoundingBox

Type parameters:

A: BoundingBox

Parameters:

Name Type
boundingBox A

Returns: (Anonymous function)


Const containedBy

containedBy(p0: Poly): function

Defined in src/Vertex/index.ts:623

containedBy :: Poly -> Reader Poly Float

Parameters:

Name Type
p0 Poly

Returns: function

▸ (...a: keyof any[]): any

Parameters:

Name Type
...a keyof any[]

Const contains

contains(p0: Poly): (Anonymous function)

Defined in src/Vertex/index.ts:637

contains :: Poly -> Reader Poly Float

Parameters:

Name Type
p0 Poly

Returns: (Anonymous function)


Const hasHeader

hasHeader<**A**>(a: A): a is WithHeader

Defined in src/Vertex/index.ts:162

hasHeader :: a -> bool

Type parameters:

A: BoundingBox

Parameters:

Name Type
a A

Returns: a is WithHeader


Const hasHeaderColumn

hasHeaderColumn<**A**>(a: A): a is WithHeaderColumn

Defined in src/Vertex/index.ts:153

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:144

hasHeaderRow :: a -> bool

Type parameters:

A: BoundingBox

Parameters:

Name Type
a A

Returns: a is WithHeaderRow


Const hasHeaders

hasHeaders<**A**>(a: A): a is WithHeaders

Defined in src/Vertex/index.ts:170

hasHeaders :: a -> bool

Type parameters:

A: BoundingBox

Parameters:

Name Type
a A

Returns: a is WithHeaders


Const intersects

intersects(p0: Poly): (Anonymous function)

Defined in src/Vertex/index.ts:597

intersects :: Poly -> Reader Poly Poly

Parameters:

Name Type
p0 Poly

Returns: (Anonymous function)


Const isBoundingBox

isBoundingBox(a: unknown): a is BoundingBox

Defined in src/Vertex/index.ts:132

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:364

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:100

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:112

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:92

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:562

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:317

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[]): LabeledBoundingBox

Defined in src/Vertex/index.ts:372

makeLabeledBoundingBox :: (String, String, Poly, [Float], [Float]) -> LabeledBoundingBox

Parameters:

Name Type
id string
label string
poly Poly
ys number[]
xs number[]

Returns: LabeledBoundingBox


Const makeLine

makeLine(x0: number, y0: number, x1: number, y1: number): Line

Defined in src/Vertex/index.ts:185

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:250

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:178

makeVertex :: (Float, Float) -> Vertex

Parameters:

Name Type
x number
y number

Returns: Vertex


Const sortPoly

sortPoly(__namedParameters: [Vertex, Vertex, Vertex]): [Vertex, Vertex, Vertex, Vertex]

Defined in src/Vertex/index.ts:262

sortPoly :: Poly -> Poly

Parameters:

Name Type
__namedParameters [Vertex, Vertex, Vertex]

Returns: [Vertex, Vertex, Vertex, Vertex]


Const toPoly

toPoly(__namedParameters: object): [Vertex, Vertex, Vertex, Vertex]

Defined in src/Vertex/index.ts:589

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:572

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 withHeader

withHeader(vertex: Vertex): (Anonymous function)

Defined in src/Vertex/index.ts:517

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:480

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:442

withHeaderRow :: Float -> ReaderEither BoundingBox BoundingBox (WithHeaderRow BoundingBox)

Parameters:

Name Type
y number

Returns: (Anonymous function)

functional-types"Vision"

Module: "Vision"

Index

Interfaces

Type aliases

Variables

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:

▸ (page: Page): Block[]

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:

▸ (block: Block): Paragraph[]

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:

▸ (page: Page): Paragraph[]

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:

▸ (page: Page): Word[]

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