0.2.21 • Published 4 years ago

functional-usecases v0.2.21

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

functional-usecases

functional-usecases

functional-usecases

functional-usecases

Index

Modules

Interfaces

functional-usecases"Comparable"Storage

Interface: Storage

Hierarchy

  • Storage

Index

Properties

Properties

annotation_bucket

annotation_bucket: string

Defined in src/Comparable.ts:33


cloud_storage

cloud_storage: CloudStorage

Defined in src/Comparable.ts:32


comparable_bucket

comparable_bucket: string

Defined in src/Comparable.ts:34

functional-usecases"Handlers/GetEntitiesHandler"GetEntitiesCallables

Interface: GetEntitiesCallables ‹Entity, Reference

Type parameters

Entity: Model

Reference

Hierarchy

  • Callables‹Entity›

    GetEntitiesCallables

Index

Properties

Properties

fromModel

fromModel: function

Inherited from Callables.fromModel

Defined in src/Handlers/Request.ts:29

Type declaration:

▸ (model: Model): E.Either‹Error, Entity›

Parameters:

NameType
modelModel

getModelFromReference

getModelFromReference: ReaderTaskEither‹Reference, Error, Model›

Defined in src/Handlers/GetEntitiesHandler.ts:13


getReferencesFromRequest

getReferencesFromRequest: function

Defined in src/Handlers/GetEntitiesHandler.ts:14

Type declaration:

▸ (request: Request): Reference[]

Parameters:

NameType
requestRequest

predicate

predicate: function

Inherited from Callables.predicate

Defined in src/Handlers/Request.ts:28

Type declaration:

▸ (request: Request): boolean

Parameters:

NameType
requestRequest

functional-usecases"Handlers/GetEntityHandler"GetEntityCallables

Interface: GetEntityCallables ‹Entity, Reference

Type parameters

Entity: Model

Reference

Hierarchy

Index

Properties

Properties

fromModel

fromModel: function

Inherited from Callables.fromModel

Defined in src/Handlers/Request.ts:29

Type declaration:

▸ (model: Model): E.Either‹Error, Entity›

Parameters:

NameType
modelModel

getModelFromReference

getModelFromReference: ReaderTaskEither‹Reference, Error, Model›

Defined in src/Handlers/GetEntityHandler.ts:12


getReferenceFromRequest

getReferenceFromRequest: function

Defined in src/Handlers/GetEntityHandler.ts:13

Type declaration:

▸ (request: Request): Reference

Parameters:

NameType
requestRequest

predicate

predicate: function

Inherited from Callables.predicate

Defined in src/Handlers/Request.ts:28

Type declaration:

▸ (request: Request): boolean

Parameters:

NameType
requestRequest

functional-usecases"Handlers/GetFileInBucketsHandler"Callables

Interface: Callables ‹A, Model

Type parameters

A: Request

Model

Hierarchy

  • Callables

Index

Properties

Properties

getPathFromReference

getPathFromReference: GetPathFunction

Defined in src/Handlers/GetFileInBucketsHandler.ts:28


getReferenceFromRequest

getReferenceFromRequest: function

Defined in src/Handlers/GetFileInBucketsHandler.ts:27

Type declaration:

▸ (request: A): Reference

Parameters:

NameType
requestA

predicate

predicate: function

Defined in src/Handlers/GetFileInBucketsHandler.ts:29

Type declaration:

▸ (a: unknown): a is Model

Parameters:

NameType
aunknown

requestPredicate

requestPredicate: function

Defined in src/Handlers/GetFileInBucketsHandler.ts:26

Type declaration:

▸ (request: Request): request is A

Parameters:

NameType
requestRequest

functional-usecases"Handlers/GetFileInBucketsHandler"Storage

Interface: Storage

Hierarchy

  • Storage

Index

Properties

Properties

buckets

buckets: string[]

Defined in src/Handlers/GetFileInBucketsHandler.ts:20


cloud_storage

cloud_storage: CloudStorage

Defined in src/Handlers/GetFileInBucketsHandler.ts:19

functional-usecases"Handlers/GetFileModelHandler"Callables

Interface: Callables ‹A, Model

Type parameters

A: Request

Model

Hierarchy

  • Callables

Index

Properties

Properties

getPathFromReference

getPathFromReference: function

Defined in src/Handlers/GetFileModelHandler.ts:25

Type declaration:

▸ (bucket: any): Reader‹Reference, Path›

Parameters:

NameType
bucketany

getReferenceFromRequest

getReferenceFromRequest: function

Defined in src/Handlers/GetFileModelHandler.ts:24

Type declaration:

▸ (request: A): Reference

Parameters:

NameType
requestA

predicate

predicate: function

Defined in src/Handlers/GetFileModelHandler.ts:26

Type declaration:

▸ (a: unknown): a is Model

Parameters:

NameType
aunknown

requestPredicate

requestPredicate: function

Defined in src/Handlers/GetFileModelHandler.ts:23

Type declaration:

▸ (request: Request): request is A

Parameters:

NameType
requestRequest

functional-usecases"Handlers/GetFileModelHandler"Storage

Interface: Storage

Hierarchy

  • Storage

Index

Properties

Properties

bucket

bucket: string

Defined in src/Handlers/GetFileModelHandler.ts:19


cloud_storage

cloud_storage: CloudStorage

Defined in src/Handlers/GetFileModelHandler.ts:18

functional-usecases"Handlers/ListEntitiesHandler"ListEntitiesCallables

Interface: ListEntitiesCallables ‹Entity, Response

Type parameters

Entity: Model

Response

Hierarchy

  • Callables‹Entity›

    ListEntitiesCallables

Index

Properties

Properties

fromModel

fromModel: function

Inherited from Callables.fromModel

Defined in src/Handlers/Request.ts:29

Type declaration:

▸ (model: Model): E.Either‹Error, Entity›

Parameters:

NameType
modelModel

getModels

getModels: TaskEither‹Error, Model[]›

Defined in src/Handlers/ListEntitiesHandler.ts:12


getResponseFromEntity

getResponseFromEntity: function

Defined in src/Handlers/ListEntitiesHandler.ts:13

Type declaration:

▸ (entity: Entity): Response

Parameters:

NameType
entityEntity

predicate

predicate: function

Inherited from Callables.predicate

Defined in src/Handlers/Request.ts:28

Type declaration:

▸ (request: Request): boolean

Parameters:

NameType
requestRequest

functional-usecases"Handlers/Request"Callables

Interface: Callables ‹Entity

Type parameters

Entity: Model

Hierarchy

Index

Properties

Properties

fromModel

fromModel: function

Defined in src/Handlers/Request.ts:29

Type declaration:

▸ (model: Model): E.Either‹Error, Entity›

Parameters:

NameType
modelModel

predicate

predicate: function

Defined in src/Handlers/Request.ts:28

Type declaration:

▸ (request: Request): boolean

Parameters:

NameType
requestRequest

functional-usecases"Handlers/Request"Request

Interface: Request

Hierarchy

  • Request

Index

Properties

Properties

method

method: "GET" | "POST" | string

Defined in src/Handlers/Request.ts:9

functional-usecases"Handlers/Request"Storage

Interface: Storage

Hierarchy

  • Storage

Index

Properties

Properties

firestore

firestore: Firestore

Defined in src/Handlers/Request.ts:23


table

table: string

Defined in src/Handlers/Request.ts:24

functional-usecases"Schema"SchemaReference

Interface: SchemaReference ‹T

Type parameters

T: SchemaInstance

Hierarchy

  • FilesReference & FolderReference

    SchemaReference

Index

Properties

Properties

files

files: string[]

Inherited from SchemaReference.files

Defined in node_modules/functional-types/lib/Folder/index.d.ts:42


folder

folder: string

Inherited from SchemaReference.folder

Defined in node_modules/functional-types/lib/Folder/index.d.ts:39


schema

schema: T

Defined in src/Schema.ts:35

functional-usecases"TableAnnotation"TableAnnotationModel

Interface: TableAnnotationModel

Hierarchy

  • object

    TableAnnotationModel

Index

Properties

Properties

boundingBoxesByPage

boundingBoxesByPage: BoundingBoxesByPageModel

Defined in src/TableAnnotation.ts:40

functional-usecases"TableAnnotation"Tables

Interface: Tables

Hierarchy

  • Tables

Index

Properties

Properties

annotation_table

annotation_table: string

Defined in src/TableAnnotation.ts:134


folder_table

folder_table: string

Defined in src/TableAnnotation.ts:133

functional-usecases"Vertex"LabeledBoundingBoxModel

Interface: LabeledBoundingBoxModel

Hierarchy

  • object

    LabeledBoundingBoxModel

Index

Properties

Properties

columns

columns: LineModel[]

Defined in src/Vertex.ts:13


rows

rows: LineModel[]

Defined in src/Vertex.ts:12

functional-usecases"Vertex"LineModel

Interface: LineModel

Hierarchy

  • LineModel

Index

Properties

Properties

end

end: Vertex

Defined in src/Vertex.ts:7


start

start: Vertex

Defined in src/Vertex.ts:6

Modules

functional-usecases"CloudStorage"

Module: "CloudStorage"

Index

Type aliases

Variables

Functions

Type aliases

FileModel

Ƭ FileModel: Model & Reference

Defined in src/CloudStorage.ts:14

Variables

Const fromFilename

fromFilename: function = replace( /\/output.json$/, '' )

Defined in src/CloudStorage.ts:29

fromFilename :: String -> String
Type declaration:

▸ (filename: string): string

Parameters:

NameType
filenamestring

Const getBufferFromModel

getBufferFromModel: function = pipe( JSON.stringify, Buffer.from )

Defined in src/CloudStorage.ts:61

getBufferFromModel :: Model -> Buffer
Type declaration:

▸ ‹A›(model: A): Buffer

Type parameters:

A: Model

Parameters:

NameType
modelA

Const getNameFromFile

getNameFromFile: function = prop('name')

Defined in src/CloudStorage.ts:85

getNameFromFile :: File -> String
Type declaration:

▸ (file: File): string

Parameters:

NameType
fileFile

Functions

Const getListFilesOptionsFromFolder

getListFilesOptionsFromFolder(folder: string): object

Defined in src/CloudStorage.ts:94

getListFilesOptionsFromFolder :: File -> String

Parameters:

NameType
folderstring

Returns: object

  • prefix: string = ${folder}/

Const getObjectFromBuffer

getObjectFromBuffer(buffer: Buffer‹›): any

Defined in src/CloudStorage.ts:53

getObjectFromBuffer :: Buffer -> Object

Parameters:

NameType
bufferBuffer‹›

Returns: any


Const getPathFromReference

getPathFromReference(bucket: string): (Anonymous function)

Defined in src/CloudStorage.ts:41

getPathFromReference :: String -> Reader Reference Path

Parameters:

NameType
bucketstring

Returns: (Anonymous function)


Const storeFileModelToStorage

storeFileModelToStorage(storage: Storage‹›): (Anonymous function)

Defined in src/CloudStorage.ts:73

storeFileModelToStorage :: Storage -> Reader String (ReaderTaskEither Reference File Error)

Parameters:

NameType
storageStorage‹›

Returns: (Anonymous function)


Const toFilename

toFilename(file: string): string

Defined in src/CloudStorage.ts:21

toFilename :: String -> String

Parameters:

NameType
filestring

Returns: string

functional-usecases"Comparable"

Module: "Comparable"

Index

Interfaces

Functions

Functions

Const listComparablesInStorage

listComparablesInStorage(storage: Storage‹›): function

Defined in src/Comparable.ts:141

Parameters:

NameType
storageStorage‹›

Returns: function

▸ (x: V0): T3

Parameters:

NameType
xV0

Const processComparablesInStorage

processComparablesInStorageA›(predicate: function, makeComparables: MakeComparables‹A›): (Anonymous function)

Defined in src/Comparable.ts:69

Type parameters:

A: Annotation

Parameters:

predicate: function

▸ (a: unknown): a is A

Parameters:

NameType
aunknown

makeComparables: MakeComparables‹A›

Returns: (Anonymous function)

functional-usecases"ComparableSchema"

Module: "ComparableSchema"

Index

Variables

Variables

Const fromModel

fromModel: function = E.fromPredicate( Serialized.isComparableSchema, () => new Error('Model is not a comparableSchema.') )

Defined in src/ComparableSchema.ts:11

Type declaration:

▸ (model: Model): E.Either‹Error, ComparableSchema›

Parameters:

NameType
modelModel

Const toModel

toModel: function = Serialized.serialize

Defined in src/ComparableSchema.ts:7

Type declaration:

▸ (comparableSchema: ComparableSchema): Model

Parameters:

NameType
comparableSchemaComparableSchema

functional-usecases"File"

Module: "File"

Index

Variables

Functions

Variables

Const fromIO

fromIO: function = partialRight(IOE.tryCatch, E.toError)

Defined in src/File.ts:23

Type declaration:

▸ ‹A›(io: IO‹A›): IOEither‹Error, A›

Type parameters:

A

Parameters:

NameType
ioIO‹A›

Const getBufferFrom

getBufferFrom: function = pipe(getBufferFromIO, fromIO)

Defined in src/File.ts:51

Type declaration:

▸ (path: string): IOEither‹Error, Buffer›

Parameters:

NameType
pathstring

Const getBuffersInFolder

getBuffersInFolder: function = pipe( getFilePathsInFolder, IOE.chain(pipe(map(getBufferFrom), array.sequence(IOE.ioEither))) )

Defined in src/File.ts:74

Type declaration:

▸ (folder: string): IOEither‹Error, Buffer[]›

Parameters:

NameType
folderstring

Const getFileNameFromPath

getFileNameFromPath: function = pipe( split('/'), last as R.Reader<string[], string> )

Defined in src/File.ts:82

Type declaration:

▸ (path: string): string

Parameters:

NameType
pathstring

Const getFileNamesInFolder

getFileNamesInFolder: function = pipe(getFilenamesInFolderIO, fromIO)

Defined in src/File.ts:61

Type declaration:

▸ (folder: string): IOEither‹Error, string[]›

Parameters:

NameType
folderstring

Const getFilePathsInFolder

getFilePathsInFolder: function = converge(call, pipe(identity, concat, map, IOE.map), getFileNamesInFolder, )

Defined in src/File.ts:66

Type declaration:

▸ (folder: string): IOEither‹Error, string[]›

Parameters:

NameType
folderstring

Const getFolderNameFromPath

getFolderNameFromPath: function = pipe( split('/'), dropLast(1), join('/'), flip(concat)('/') )

Defined in src/File.ts:88

Type declaration:

▸ (path: string): string

Parameters:

NameType
pathstring

Const saveBufferTo

saveBufferTo: function = pipe( saveBufferToIO, R.map(fromIO) )

Defined in src/File.ts:38

Type declaration:

▸ (path: string): Reader‹Buffer, IOEither‹Error, string››

Parameters:

NameType
pathstring

Functions

Const getBufferFromIO

getBufferFromIO(path: string): (Anonymous function)

Defined in src/File.ts:46

Parameters:

NameType
pathstring

Returns: (Anonymous function)


Const saveBufferToIO

saveBufferToIO(path: string): (Anonymous function)

Defined in src/File.ts:30

Parameters:

NameType
pathstring

Returns: (Anonymous function)

functional-usecases"Folder"

Module: "Folder"

Index

Type aliases

Variables

Functions

Type aliases

FoldersById

Ƭ FoldersById: Dictionary‹Folder›

Defined in src/Folder.ts:15

Variables

Const getFoldersByIdInFirestore

getFoldersByIdInFirestore: function = pipe( getFoldersInFirestore, RTE.map( reduce<Folder, FoldersById>( (acc, folder) => assoc(folder.id, folder, acc), {} ) ) )

Defined in src/Folder.ts:73

getFolderByIdInFirestore :: Firestore -> ReaderTaskEither String [Folder] Error
Type declaration:

▸ (firestore: Firestore): ReaderTaskEither‹string, Error, FoldersById

Parameters:

NameType
firestoreFirestore

Const getFoldersInFirestore

getFoldersInFirestore: function = pipe( getModelsInFirestore, RTE.chainEitherK( E.fromPredicate( isArraySatisfying(isFolder), () => new Error('Models is not a Folder Array.') ) ) )

Defined in src/Folder.ts:56

getFoldersInFirestore :: Firestore -> ReaderTaskEither String [Folder] Error
Type declaration:

▸ (firestore: Firestore): ReaderTaskEither‹string, Error, Folder[]›

Parameters:

NameType
firestoreFirestore

Const getModelFromReference

getModelFromReference: function = pipe( getModelsFromReference, R.map( RTE.chainEitherK<Error, Model[], Model>( pipe( E.fromPredicate( pipe(isEmpty, not), () => new Error('Item does not exist.') ), E.map(head as R.Reader<Model[], Model>) ) ) ) )

Defined in src/Folder.ts:34

getModelFromReference :: Firestore -> Reader String (ReaderTaskEither Reference Model Error)
Type declaration:

▸ (firestore: Firestore): Reader‹string, ReaderTaskEither‹Reference, Error, Model››

Parameters:

NameType
firestoreFirestore

Functions

Const getModelsFromReference

getModelsFromReference(firestore: Firestore‹›): (Anonymous function)

Defined in src/Folder.ts:24

getModelsFromReference :: Firestore -> Reader String (ReaderTaskEither Reference [Model] Error)

Parameters:

NameType
firestoreFirestore‹›

Returns: (Anonymous function)

functional-usecases"Handlers/GetEntitiesHandler"

Module: "Handlers/GetEntitiesHandler"

Index

Interfaces

functional-usecases"Handlers/GetEntityHandler"

Module: "Handlers/GetEntityHandler"

Index

Interfaces

functional-usecases"Handlers/GetFileInBucketsHandler"

Module: "Handlers/GetFileInBucketsHandler"

Index

Interfaces

functional-usecases"Handlers/GetFileModelHandler"

Module: "Handlers/GetFileModelHandler"

Index

Interfaces

functional-usecases"Handlers/index"

Module: "Handlers/index"

Index

References

References

Callables

Callables:


Request

Request:


RequestHandler

RequestHandler:


Storage

Storage:


isGetRequest

isGetRequest:


isPostRequest

isPostRequest:


makeGetEntitiesHandler

makeGetEntitiesHandler:


makeGetEntityHandler

makeGetEntityHandler:


makeGetFileInBucketsHandler

makeGetFileInBucketsHandler:


makeGetFileModelHandler

makeGetFileModelHandler:


makeListEntitiesHandler

makeListEntitiesHandler:

functional-usecases"Handlers/ListEntitiesHandler"

Module: "Handlers/ListEntitiesHandler"

Index

Interfaces

functional-usecases"Handlers/Request"

Module: "Handlers/Request"

Index

Interfaces

Type aliases

Variables

Type aliases

RequestHandler

Ƭ RequestHandler: function

Defined in src/Handlers/Request.ts:32

Type declaration:

▸ (request: Request): Task‹Response‹Entity››

Parameters:

NameType
requestRequest

Variables

Const isGetRequest

isGetRequest: function = propSatisfies( equals('GET'), 'method' )

Defined in src/Handlers/Request.ts:12

Type declaration:

▸ (request: Request): boolean

Parameters:

NameType
requestRequest

Const isPostRequest

isPostRequest: function = propSatisfies( equals('POST'), 'method' )

Defined in src/Handlers/Request.ts:17

Type declaration:

▸ (request: Request): boolean

Parameters:

NameType
requestRequest

functional-usecases"Schema"

Module: "Schema"

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

SchemaInstance

Ƭ SchemaInstance: Schema | Schema

Defined in src/Schema.ts:31


SchemaReferencesByFileType

Ƭ SchemaReferencesByFileType: Record‹DocumentType, SchemaReference‹T›[]›

Defined in src/Schema.ts:38

Variables

Const fromModel

fromModel: function = pipe( E.fromPredicate(isDeserializable, () => new Error('Model is not a schema.')), E.map( evolve({ files: deserializeArray, }) as R.Reader<Deserializable, Model> ), E.chain( E.fromPredicate( Serialized.isSchema, () => new Error('Model is not a schema.') ) ) )

Defined in src/Schema.ts:118

Type declaration:

▸ (model: Model): E.Either‹Error, Schema›

Parameters:

NameType
modelModel

Const fromSchemaReferenceByFileType

fromSchemaReferenceByFileType: function = mapObjIndexed( map(fromSchemaReference) )

Defined in src/Schema.ts:96

Type declaration:

▸ (referencesByFileTypes: SchemaReferencesByFileType): SchemaReferencesByFileType‹Schema›

Parameters:

NameType
referencesByFileTypesSchemaReferencesByFileType

Const toModel

toModel: function = pipe( Serialized.serialize, evolve({ files: serializeArray, }) as R.Reader<Serialized.Schema, Model> )

Defined in src/Schema.ts:110

Type declaration:

▸ (schema: Schema): Model

Parameters:

NameType
schemaSchema

Const toSchemaReferencesByFileType

toSchemaReferencesByFileType: function = pipe( mapObjIndexed( pipe(map(toSchemaReference), A.array.sequence(E.either)) ) as R.Reader< SchemaReferencesByFileType<Serialized.Schema>, Record<DocumentType, E.Either<Error, SchemaReference[]>>

, sequenceS(E.either) )

Defined in src/Schema.ts:83

Type declaration:

▸ (referencesByFileTypes: SchemaReferencesByFileType‹Schema›): E.Either‹Error, SchemaReferencesByFileType

Parameters:

NameType
referencesByFileTypesSchemaReferencesByFileType‹Schema›

Functions

Const fromSchemaReference

fromSchemaReference(__namedParameters: object): SchemaReference‹Schema›

Defined in src/Schema.ts:70

Parameters:

__namedParameters: object

NameType
referencereference
schemaSchema

Returns: SchemaReference‹Schema›


Const isSchemaReference

isSchemaReference(a: unknown): a is SchemaReference

Defined in src/Schema.ts:51

Parameters:

NameType
aunknown

Returns: a is SchemaReference


Const isSerializedSchemaReference

isSerializedSchemaReference(a: unknown): a is SchemaReference‹Schema›

Defined in src/Schema.ts:45

Parameters:

NameType
aunknown

Returns: a is SchemaReference‹Schema›


Const toSchemaReference

toSchemaReference(__namedParameters: object): E.Either‹Error, SchemaReference

Defined in src/Schema.ts:55

Parameters:

__namedParameters: object

NameType
referencereference
serializedSchemaSchema

Returns: E.Either‹Error, SchemaReference

functional-usecases"StorageObject"

Module: "StorageObject"

Index

Variables

Functions

Variables

Const getBufferFromCloudStorage

getBufferFromCloudStorage: function = pipe( getFileFromCloudStorage, RTE.fromReaderEither, RTE.chainTaskEitherK(getBufferFromFile) )

Defined in src/StorageObject.ts:52

getBufferFromCloudStorage :: CloudStorage -> ReaderTaskEither StorageObject Buffer Error
Type declaration:

▸ (storage: CloudStorage): ReaderTaskEither‹StorageObject, Error, Buffer›

Parameters:

NameType
storageCloudStorage

Const getFileNameFromStorageObject

getFileNameFromStorageObject: function = pipe(getFolderNameFromStorageObject, concat)

Defined in src/StorageObject.ts:85

getFileNameFromStorageObject :: StorageObject -> Reader String String
Type declaration:

▸ (object: StorageObject): Reader‹string, string›

Parameters:

NameType
objectStorageObject

Const getFolderNameFromPath

getFolderNameFromPath: function = pipe( split('/'), dropLast(1), join('/') )

Defined in src/StorageObject.ts:65

getFolderNameFromPath :: String -> String
Type declaration:

▸ (path: string): string

Parameters:

NameType
pathstring

Const getFolderNameFromStorageObject

getFolderNameFromStorageObject: function = pipe(prop<string, string>('name'), getFolderNameFromPath)

Defined in src/StorageObject.ts:76

getFolderNameFromStorageObject :: StorageObject -> String
Type declaration:

▸ (object: StorageObject): string

Parameters:

NameType
objectStorageObject

Const getPathFromStorageObject

getPathFromStorageObject: function = pipe( E.fromPredicate( allPass(has('bucket'), has('name')), () => new Error('StorageObject missing properties "bucket" and "name".') ), E.map( (object: StorageObject): Path => ({ bucket: object.bucket, filename: object.name, }) ) )

Defined in src/StorageObject.ts:22

getPathFromStorageObject :: StorageObject -> Either Path Error
Type declaration:

▸ (object: StorageObject): E.Either‹Error, Path›

Parameters:

NameType
objectStorageObject

Functions

Const getFileFromCloudStorage

getFileFromCloudStorage(storage: Storage‹›): function

Defined in src/StorageObject.ts:44

getFileFromCloudStorage :: CloudStorage -> ReaderTaskEither StorageObject File Error

Parameters:

NameType
storageStorage‹›

Returns: function

▸ (x0: V0): T2

Parameters:

NameType
x0V0

Const getPathFromFilePath

getPathFromFilePath(bucket: string): (Anonymous function)

Defined in src/StorageObject.ts:94

getPathFromFilePath :: String -> Reader String Path

Parameters:

NameType
bucketstring

Returns: (Anonymous function)


Const getPathWithNameFromBucket

getPathWithNameFromBucket(bucket: string): function

Defined in src/StorageObject.ts:108

getPathWithNameFromBucket :: String -> Reader StorageObject (Reader String Path)

Parameters:

NameType
bucketstring

Returns: function

▸ (x0: V0): T2

Parameters:

NameType
x0V0

functional-usecases"TableAnnotation"

Module: "TableAnnotation"

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

BoundingBoxesByPageModel

Ƭ BoundingBoxesByPageModel: Dictionary‹LabeledBoundingBoxModel›[]

Defined in src/TableAnnotation.ts:36

Variables

Const fromModel

fromModel: function = pipe( serialize, E.map(evolveModel), E.chain( E.fromPredicate( isTableAnnotation, () => new Error('Model is not a TableAnnotation.') ) ), E.map(rejectsEmptyBoundingBoxes) )

Defined in src/TableAnnotation.ts:68

fromModel :: Model -> Either Folder Error
Type declaration:

▸ (model: Model): E.Either‹Error, TableAnnotation›

Parameters:

NameType
modelModel

Const getDefaultModelFromReference

getDefaultModelFromReference: function = pipe( getModelFromReference, R.map( pipe( RTE.fold<Reference, Error, Model, Model>( () => getDefaultFromReference, RT.of ), RTE.rightReaderTask ) ) )

Defined in src/TableAnnotation.ts:104

getDefaultModelFromReference :: Firestore -> Reader String (ReaderTaskEither Reference Model Error)
Type declaration:

▸ (firestore: Firestore): Reader‹string, ReaderTaskEither‹Reference, Error, Model››

Parameters:

NameType
firestoreFirestore

Const getTableAnnotationsInFirestore

getTableAnnotationsInFirestore: function = pipe( getModelsInFirestore ) as ( firestore: Firestore ) => RTE.ReaderTaskEither<string, Error, TableAnnotation[]>

Defined in src/TableAnnotation.ts:124

getTableAnnotationsInFirestore :: Firestore -> ReaderTaskEither String [TableAnnotation] Error
Type declaration:

▸ (firestore: Firestore): ReaderTaskEither‹string, Error, TableAnnotation[]›

Parameters:

NameType
firestoreFirestore

Const toTableAnnotationModel

toTableAnnotationModel: function = evolve({ boundingBoxesByPage: map(map(toLabeledBoundingBoxModel)), }) as (annotation: TableAnnotation) => TableAnnotationModel

Defined in src/TableAnnotation.ts:57

toTableAnnotationModel :: TableAnnotation -> TableAnnotationModel
Type declaration:

▸ (annotation: TableAnnotation): TableAnnotationModel

Parameters:

NameType
annotationTableAnnotation

Functions

Const getDefaultFromReference

getDefaultFromReference(reference: Reference): Task‹TableAnnotationModel

Defined in src/TableAnnotation.ts:89

getDefaultFromReference :: Reference -> TaskEither Model Never

Parameters:

NameType
referenceReference

Returns: Task‹TableAnnotationModel


Const getTableAnnotationsInActiveOfflineFolders

getTableAnnotationsInActiveOfflineFolders(tables: Tables): function

Defined in src/TableAnnotation.ts:144

getTableAnnotationsInActiveOfflineFolders :: Storage -> TaskEither [TableAnnotation] Error

Parameters:

NameType
tablesTables

Returns: function

▸ (x0: V0): T2

Parameters:

NameType
x0V0

functional-usecases"Vertex"

Module: "Vertex"

Index

Interfaces

Variables

Functions

Variables

Const fromLabeledBoundingBoxModel

fromLabeledBoundingBoxModel: function = evolve({ rows: map(fromLineModel), columns: map(fromLineModel), })

Defined in src/Vertex.ts:53

fromLabeledBoundingBoxModel :: LabeledBoundingBoxModel -> LabeledBoundingBox
Type declaration:

▸ (boundingBoxModel: LabeledBoundingBoxModel): LabeledBoundingBox

Parameters:

NameType
boundingBoxModelLabeledBoundingBoxModel

Const toLabeledBoundingBoxModel

toLabeledBoundingBoxModel: function = evolve({ rows: map(toLineModel), columns: map(toLineModel), })

Defined in src/Vertex.ts:41

toLabeledBoundingBoxModel :: LabeledBoundingBox -> LabeledBoundingBoxModel
Type declaration:

▸ (boundingBox: LabeledBoundingBox): LabeledBoundingBoxModel

Parameters:

NameType
boundingBoxLabeledBoundingBox

Const toLineModel

toLineModel: function = applySpec({ start: head as R.Reader<Line, Vertex>, end: last as R.Reader<Line, Vertex>, })

Defined in src/Vertex.ts:21

toLineModel :: Line -> LineModel
Type declaration:

▸ (line: Line): LineModel

Parameters:

NameType
lineLine

Functions

Const fromLineModel

fromLineModel(__namedParameters: object): Vertex, Vertex

Defined in src/Vertex.ts:31

fromLineModel :: LineModel -> Line

Parameters:

__namedParameters: object

NameType
endVertex
startVertex

Returns: Vertex, Vertex

0.2.21

4 years ago

0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.3

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago