
<a name="readmemd"></a>

[functional-usecases](#globalsmd)

# functional-usecases



<a name="globalsmd"></a>

[functional-usecases](#globalsmd)

# functional-usecases

## Index

### Modules

* ["CloudStorage"](#modules_cloudstorage_md)
* ["Comparable"](#modules_comparable_md)
* ["ComparableSchema"](#modules_comparableschema_md)
* ["File"](#modules_file_md)
* ["Folder"](#modules_folder_md)
* ["Handlers/GetEntitiesHandler"](#modules_handlers_getentitieshandler_md)
* ["Handlers/GetEntityHandler"](#modules_handlers_getentityhandler_md)
* ["Handlers/GetFileInBucketsHandler"](#modules_handlers_getfileinbucketshandler_md)
* ["Handlers/GetFileModelHandler"](#modules_handlers_getfilemodelhandler_md)
* ["Handlers/ListEntitiesHandler"](#modules_handlers_listentitieshandler_md)
* ["Handlers/Request"](#modules_handlers_request_md)
* ["Handlers/index"](#modules_handlers_index_md)
* ["Schema"](#modules_schema_md)
* ["StorageObject"](#modules_storageobject_md)
* ["TableAnnotation"](#modules_tableannotation_md)
* ["Vertex"](#modules_vertex_md)

# Interfaces


<a name="interfaces_comparable_storagemd"></a>

[functional-usecases](#globalsmd) › ["Comparable"](#modules_comparable_md) › [Storage](#interfaces_comparable_storagemd)

## Interface: Storage

### Hierarchy

* **Storage**

### Index

#### Properties

* [annotation_bucket](#annotation_bucket)
* [cloud_storage](#cloud_storage)
* [comparable_bucket](#comparable_bucket)

### 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


<a name="interfaces_handlers_getentitieshandler_getentitiescallablesmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetEntitiesHandler"](#modules_handlers_getentitieshandler_md) › [GetEntitiesCallables](#interfaces_handlers_getentitieshandler_getentitiescallablesmd)

## Interface: GetEntitiesCallables ‹**Entity, Reference**›

### Type parameters

▪ **Entity**: *Model*

▪ **Reference**

### Hierarchy

* [Callables](#interfaces_handlers_request_callablesmd)‹Entity›

  ↳ **GetEntitiesCallables**

### Index

#### Properties

* [fromModel](#frommodel)
* [getModelFromReference](#getmodelfromreference)
* [getReferencesFromRequest](#getreferencesfromrequest)
* [predicate](#predicate)

### Properties

####  fromModel

• **fromModel**: *function*

*Inherited from [Callables](#interfaces_handlers_request_callablesmd).[fromModel](#frommodel)*

Defined in src/Handlers/Request.ts:29

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`model` | Model |

___

####  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](#interfaces_handlers_request_requestmd)): *Reference[]*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |

___

####  predicate

• **predicate**: *function*

*Inherited from [Callables](#interfaces_handlers_request_callablesmd).[predicate](#predicate)*

Defined in src/Handlers/Request.ts:28

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *boolean*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="interfaces_handlers_getentityhandler_getentitycallablesmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetEntityHandler"](#modules_handlers_getentityhandler_md) › [GetEntityCallables](#interfaces_handlers_getentityhandler_getentitycallablesmd)

## Interface: GetEntityCallables ‹**Entity, Reference**›

### Type parameters

▪ **Entity**: *Model*

▪ **Reference**

### Hierarchy

* [Callables](#interfaces_handlers_request_callablesmd)‹Entity›

  ↳ **GetEntityCallables**

### Index

#### Properties

* [fromModel](#frommodel)
* [getModelFromReference](#getmodelfromreference)
* [getReferenceFromRequest](#getreferencefromrequest)
* [predicate](#predicate)

### Properties

####  fromModel

• **fromModel**: *function*

*Inherited from [Callables](#interfaces_handlers_request_callablesmd).[fromModel](#frommodel)*

Defined in src/Handlers/Request.ts:29

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`model` | Model |

___

####  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](#interfaces_handlers_request_requestmd)): *Reference*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |

___

####  predicate

• **predicate**: *function*

*Inherited from [Callables](#interfaces_handlers_request_callablesmd).[predicate](#predicate)*

Defined in src/Handlers/Request.ts:28

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *boolean*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="interfaces_handlers_getfileinbucketshandler_callablesmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetFileInBucketsHandler"](#modules_handlers_getfileinbucketshandler_md) › [Callables](#interfaces_handlers_getfileinbucketshandler_callablesmd)

## Interface: Callables ‹**A, Model**›

### Type parameters

▪ **A**: *[Request](#interfaces_handlers_request_requestmd)*

▪ **Model**

### Hierarchy

* **Callables**

### Index

#### Properties

* [getPathFromReference](#getpathfromreference)
* [getReferenceFromRequest](#getreferencefromrequest)
* [predicate](#predicate)
* [requestPredicate](#requestpredicate)

### 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:**

Name | Type |
------ | ------ |
`request` | A |

___

####  predicate

• **predicate**: *function*

Defined in src/Handlers/GetFileInBucketsHandler.ts:29

##### Type declaration:

▸ (`a`: unknown): *a is Model*

**Parameters:**

Name | Type |
------ | ------ |
`a` | unknown |

___

####  requestPredicate

• **requestPredicate**: *function*

Defined in src/Handlers/GetFileInBucketsHandler.ts:26

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *request is A*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="interfaces_handlers_getfileinbucketshandler_storagemd"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetFileInBucketsHandler"](#modules_handlers_getfileinbucketshandler_md) › [Storage](#interfaces_handlers_getfileinbucketshandler_storagemd)

## Interface: Storage

### Hierarchy

* **Storage**

### Index

#### Properties

* [buckets](#buckets)
* [cloud_storage](#cloud_storage)

### Properties

####  buckets

• **buckets**: *string[]*

Defined in src/Handlers/GetFileInBucketsHandler.ts:20

___

####  cloud_storage

• **cloud_storage**: *CloudStorage*

Defined in src/Handlers/GetFileInBucketsHandler.ts:19


<a name="interfaces_handlers_getfilemodelhandler_callablesmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetFileModelHandler"](#modules_handlers_getfilemodelhandler_md) › [Callables](#interfaces_handlers_getfilemodelhandler_callablesmd)

## Interface: Callables ‹**A, Model**›

### Type parameters

▪ **A**: *[Request](#interfaces_handlers_request_requestmd)*

▪ **Model**

### Hierarchy

* **Callables**

### Index

#### Properties

* [getPathFromReference](#getpathfromreference)
* [getReferenceFromRequest](#getreferencefromrequest)
* [predicate](#predicate)
* [requestPredicate](#requestpredicate)

### Properties

####  getPathFromReference

• **getPathFromReference**: *function*

Defined in src/Handlers/GetFileModelHandler.ts:25

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`bucket` | any |

___

####  getReferenceFromRequest

• **getReferenceFromRequest**: *function*

Defined in src/Handlers/GetFileModelHandler.ts:24

##### Type declaration:

▸ (`request`: A): *Reference*

**Parameters:**

Name | Type |
------ | ------ |
`request` | A |

___

####  predicate

• **predicate**: *function*

Defined in src/Handlers/GetFileModelHandler.ts:26

##### Type declaration:

▸ (`a`: unknown): *a is Model*

**Parameters:**

Name | Type |
------ | ------ |
`a` | unknown |

___

####  requestPredicate

• **requestPredicate**: *function*

Defined in src/Handlers/GetFileModelHandler.ts:23

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *request is A*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="interfaces_handlers_getfilemodelhandler_storagemd"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetFileModelHandler"](#modules_handlers_getfilemodelhandler_md) › [Storage](#interfaces_handlers_getfilemodelhandler_storagemd)

## Interface: Storage

### Hierarchy

* **Storage**

### Index

#### Properties

* [bucket](#bucket)
* [cloud_storage](#cloud_storage)

### Properties

####  bucket

• **bucket**: *string*

Defined in src/Handlers/GetFileModelHandler.ts:19

___

####  cloud_storage

• **cloud_storage**: *CloudStorage*

Defined in src/Handlers/GetFileModelHandler.ts:18


<a name="interfaces_handlers_listentitieshandler_listentitiescallablesmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/ListEntitiesHandler"](#modules_handlers_listentitieshandler_md) › [ListEntitiesCallables](#interfaces_handlers_listentitieshandler_listentitiescallablesmd)

## Interface: ListEntitiesCallables ‹**Entity, Response**›

### Type parameters

▪ **Entity**: *Model*

▪ **Response**

### Hierarchy

* [Callables](#interfaces_handlers_request_callablesmd)‹Entity›

  ↳ **ListEntitiesCallables**

### Index

#### Properties

* [fromModel](#frommodel)
* [getModels](#getmodels)
* [getResponseFromEntity](#getresponsefromentity)
* [predicate](#predicate)

### Properties

####  fromModel

• **fromModel**: *function*

*Inherited from [Callables](#interfaces_handlers_request_callablesmd).[fromModel](#frommodel)*

Defined in src/Handlers/Request.ts:29

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`model` | Model |

___

####  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:**

Name | Type |
------ | ------ |
`entity` | Entity |

___

####  predicate

• **predicate**: *function*

*Inherited from [Callables](#interfaces_handlers_request_callablesmd).[predicate](#predicate)*

Defined in src/Handlers/Request.ts:28

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *boolean*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="interfaces_handlers_request_callablesmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/Request"](#modules_handlers_request_md) › [Callables](#interfaces_handlers_request_callablesmd)

## Interface: Callables ‹**Entity**›

### Type parameters

▪ **Entity**: *Model*

### Hierarchy

* **Callables**

  ↳ [GetEntitiesCallables](#interfaces_handlers_getentitieshandler_getentitiescallablesmd)

  ↳ [GetEntityCallables](#interfaces_handlers_getentityhandler_getentitycallablesmd)

  ↳ [ListEntitiesCallables](#interfaces_handlers_listentitieshandler_listentitiescallablesmd)

### Index

#### Properties

* [fromModel](#frommodel)
* [predicate](#predicate)

### Properties

####  fromModel

• **fromModel**: *function*

Defined in src/Handlers/Request.ts:29

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`model` | Model |

___

####  predicate

• **predicate**: *function*

Defined in src/Handlers/Request.ts:28

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *boolean*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="interfaces_handlers_request_requestmd"></a>

[functional-usecases](#globalsmd) › ["Handlers/Request"](#modules_handlers_request_md) › [Request](#interfaces_handlers_request_requestmd)

## Interface: Request

### Hierarchy

* **Request**

### Index

#### Properties

* [method](#method)

### Properties

####  method

• **method**: *"GET" | "POST" | string*

Defined in src/Handlers/Request.ts:9


<a name="interfaces_handlers_request_storagemd"></a>

[functional-usecases](#globalsmd) › ["Handlers/Request"](#modules_handlers_request_md) › [Storage](#interfaces_handlers_request_storagemd)

## Interface: Storage

### Hierarchy

* **Storage**

### Index

#### Properties

* [firestore](#firestore)
* [table](#table)

### Properties

####  firestore

• **firestore**: *Firestore*

Defined in src/Handlers/Request.ts:23

___

####  table

• **table**: *string*

Defined in src/Handlers/Request.ts:24


<a name="interfaces_schema_schemareferencemd"></a>

[functional-usecases](#globalsmd) › ["Schema"](#modules_schema_md) › [SchemaReference](#interfaces_schema_schemareferencemd)

## Interface: SchemaReference ‹**T**›

### Type parameters

▪ **T**: *[SchemaInstance](#schemainstance)*

### Hierarchy

* FilesReference & FolderReference

  ↳ **SchemaReference**

### Index

#### Properties

* [files](#files)
* [folder](#folder)
* [schema](#schema)

### Properties

####  files

• **files**: *string[]*

*Inherited from [SchemaReference](#interfaces_schema_schemareferencemd).[files](#files)*

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

___

####  folder

• **folder**: *string*

*Inherited from [SchemaReference](#interfaces_schema_schemareferencemd).[folder](#folder)*

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

___

####  schema

• **schema**: *T*

Defined in src/Schema.ts:35


<a name="interfaces_tableannotation_tableannotationmodelmd"></a>

[functional-usecases](#globalsmd) › ["TableAnnotation"](#modules_tableannotation_md) › [TableAnnotationModel](#interfaces_tableannotation_tableannotationmodelmd)

## Interface: TableAnnotationModel

### Hierarchy

* object

  ↳ **TableAnnotationModel**

### Index

#### Properties

* [boundingBoxesByPage](#boundingboxesbypage)

### Properties

####  boundingBoxesByPage

• **boundingBoxesByPage**: *[BoundingBoxesByPageModel](#boundingboxesbypagemodel)*

Defined in src/TableAnnotation.ts:40


<a name="interfaces_tableannotation_tablesmd"></a>

[functional-usecases](#globalsmd) › ["TableAnnotation"](#modules_tableannotation_md) › [Tables](#interfaces_tableannotation_tablesmd)

## Interface: Tables

### Hierarchy

* **Tables**

### Index

#### Properties

* [annotation_table](#annotation_table)
* [folder_table](#folder_table)

### Properties

####  annotation_table

• **annotation_table**: *string*

Defined in src/TableAnnotation.ts:134

___

####  folder_table

• **folder_table**: *string*

Defined in src/TableAnnotation.ts:133


<a name="interfaces_vertex_labeledboundingboxmodelmd"></a>

[functional-usecases](#globalsmd) › ["Vertex"](#modules_vertex_md) › [LabeledBoundingBoxModel](#interfaces_vertex_labeledboundingboxmodelmd)

## Interface: LabeledBoundingBoxModel

### Hierarchy

* object

  ↳ **LabeledBoundingBoxModel**

### Index

#### Properties

* [columns](#columns)
* [rows](#rows)

### Properties

####  columns

• **columns**: *[LineModel](#interfaces_vertex_linemodelmd)[]*

Defined in src/Vertex.ts:13

___

####  rows

• **rows**: *[LineModel](#interfaces_vertex_linemodelmd)[]*

Defined in src/Vertex.ts:12


<a name="interfaces_vertex_linemodelmd"></a>

[functional-usecases](#globalsmd) › ["Vertex"](#modules_vertex_md) › [LineModel](#interfaces_vertex_linemodelmd)

## Interface: LineModel

### Hierarchy

* **LineModel**

### Index

#### Properties

* [end](#end)
* [start](#start)

### Properties

####  end

• **end**: *Vertex*

Defined in src/Vertex.ts:7

___

####  start

• **start**: *Vertex*

Defined in src/Vertex.ts:6

# Modules


<a name="modules_cloudstorage_md"></a>

[functional-usecases](#globalsmd) › ["CloudStorage"](#modules_cloudstorage_md)

## Module: "CloudStorage"

### Index

#### Type aliases

* [FileModel](#filemodel)

#### Variables

* [fromFilename](#const-fromfilename)
* [getBufferFromModel](#const-getbufferfrommodel)
* [getNameFromFile](#const-getnamefromfile)

#### Functions

* [getListFilesOptionsFromFolder](#const-getlistfilesoptionsfromfolder)
* [getObjectFromBuffer](#const-getobjectfrombuffer)
* [getPathFromReference](#const-getpathfromreference)
* [storeFileModelToStorage](#const-storefilemodeltostorage)
* [toFilename](#const-tofilename)

### 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

```haskell
fromFilename :: String -> String
```

##### Type declaration:

▸ (`filename`: string): *string*

**Parameters:**

Name | Type |
------ | ------ |
`filename` | string |

___

#### `Const` getBufferFromModel

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

Defined in src/CloudStorage.ts:61

```haskell
getBufferFromModel :: Model -> Buffer
```

##### Type declaration:

▸ ‹**A**›(`model`: A): *Buffer*

**Type parameters:**

▪ **A**: *Model*

**Parameters:**

Name | Type |
------ | ------ |
`model` | A |

___

#### `Const` getNameFromFile

• **getNameFromFile**: *function* = prop('name')

Defined in src/CloudStorage.ts:85

```haskell
getNameFromFile :: File -> String
```

##### Type declaration:

▸ (`file`: File): *string*

**Parameters:**

Name | Type |
------ | ------ |
`file` | File |

### Functions

#### `Const` getListFilesOptionsFromFolder

▸ **getListFilesOptionsFromFolder**(`folder`: string): *object*

Defined in src/CloudStorage.ts:94

```haskell
getListFilesOptionsFromFolder :: File -> String
```

**Parameters:**

Name | Type |
------ | ------ |
`folder` | string |

**Returns:** *object*

* **prefix**: *string* = `${folder}/`

___

#### `Const` getObjectFromBuffer

▸ **getObjectFromBuffer**(`buffer`: Buffer‹›): *any*

Defined in src/CloudStorage.ts:53

```haskell
getObjectFromBuffer :: Buffer -> Object
```

**Parameters:**

Name | Type |
------ | ------ |
`buffer` | Buffer‹› |

**Returns:** *any*

___

#### `Const` getPathFromReference

▸ **getPathFromReference**(`bucket`: string): *(Anonymous function)*

Defined in src/CloudStorage.ts:41

```haskell
getPathFromReference :: String -> Reader Reference Path
```

**Parameters:**

Name | Type |
------ | ------ |
`bucket` | string |

**Returns:** *(Anonymous function)*

___

#### `Const` storeFileModelToStorage

▸ **storeFileModelToStorage**(`storage`: Storage‹›): *(Anonymous function)*

Defined in src/CloudStorage.ts:73

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

**Parameters:**

Name | Type |
------ | ------ |
`storage` | Storage‹› |

**Returns:** *(Anonymous function)*

___

#### `Const` toFilename

▸ **toFilename**(`file`: string): *string*

Defined in src/CloudStorage.ts:21

```haskell
toFilename :: String -> String
```

**Parameters:**

Name | Type |
------ | ------ |
`file` | string |

**Returns:** *string*


<a name="modules_comparable_md"></a>

[functional-usecases](#globalsmd) › ["Comparable"](#modules_comparable_md)

## Module: "Comparable"

### Index

#### Interfaces

* [Storage](#interfaces_comparable_storagemd)

#### Functions

* [listComparablesInStorage](#const-listcomparablesinstorage)
* [processComparablesInStorage](#const-processcomparablesinstorage)

### Functions

#### `Const` listComparablesInStorage

▸ **listComparablesInStorage**(`storage`: Storage‹›): *function*

Defined in src/Comparable.ts:141

**Parameters:**

Name | Type |
------ | ------ |
`storage` | Storage‹› |

**Returns:** *function*

▸ (`x`: V0): *T3*

**Parameters:**

Name | Type |
------ | ------ |
`x` | V0 |

___

#### `Const` processComparablesInStorage

▸ **processComparablesInStorage**‹**A**›(`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:**

Name | Type |
------ | ------ |
`a` | unknown |

▪ **makeComparables**: *MakeComparables‹A›*

**Returns:** *(Anonymous function)*


<a name="modules_comparableschema_md"></a>

[functional-usecases](#globalsmd) › ["ComparableSchema"](#modules_comparableschema_md)

## Module: "ComparableSchema"

### Index

#### Variables

* [fromModel](#const-frommodel)
* [toModel](#const-tomodel)

### 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:**

Name | Type |
------ | ------ |
`model` | Model |

___

#### `Const` toModel

• **toModel**: *function* = Serialized.serialize

Defined in src/ComparableSchema.ts:7

##### Type declaration:

▸ (`comparableSchema`: ComparableSchema): *Model*

**Parameters:**

Name | Type |
------ | ------ |
`comparableSchema` | ComparableSchema |


<a name="modules_file_md"></a>

[functional-usecases](#globalsmd) › ["File"](#modules_file_md)

## Module: "File"

### Index

#### Variables

* [fromIO](#const-fromio)
* [getBufferFrom](#const-getbufferfrom)
* [getBuffersInFolder](#const-getbuffersinfolder)
* [getFileNameFromPath](#const-getfilenamefrompath)
* [getFileNamesInFolder](#const-getfilenamesinfolder)
* [getFilePathsInFolder](#const-getfilepathsinfolder)
* [getFolderNameFromPath](#const-getfoldernamefrompath)
* [saveBufferTo](#const-savebufferto)

#### Functions

* [getBufferFromIO](#const-getbufferfromio)
* [saveBufferToIO](#const-savebuffertoio)

### 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:**

Name | Type |
------ | ------ |
`io` | IO‹A› |

___

#### `Const` getBufferFrom

• **getBufferFrom**: *function* = pipe(getBufferFromIO, fromIO)

Defined in src/File.ts:51

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`path` | string |

___

#### `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:**

Name | Type |
------ | ------ |
`folder` | string |

___

#### `Const` getFileNameFromPath

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

Defined in src/File.ts:82

##### Type declaration:

▸ (`path`: string): *string*

**Parameters:**

Name | Type |
------ | ------ |
`path` | string |

___

#### `Const` getFileNamesInFolder

• **getFileNamesInFolder**: *function* = pipe(getFilenamesInFolderIO, fromIO)

Defined in src/File.ts:61

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`folder` | string |

___

#### `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:**

Name | Type |
------ | ------ |
`folder` | string |

___

#### `Const` getFolderNameFromPath

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

Defined in src/File.ts:88

##### Type declaration:

▸ (`path`: string): *string*

**Parameters:**

Name | Type |
------ | ------ |
`path` | string |

___

#### `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:**

Name | Type |
------ | ------ |
`path` | string |

### Functions

#### `Const` getBufferFromIO

▸ **getBufferFromIO**(`path`: string): *(Anonymous function)*

Defined in src/File.ts:46

**Parameters:**

Name | Type |
------ | ------ |
`path` | string |

**Returns:** *(Anonymous function)*

___

#### `Const` saveBufferToIO

▸ **saveBufferToIO**(`path`: string): *(Anonymous function)*

Defined in src/File.ts:30

**Parameters:**

Name | Type |
------ | ------ |
`path` | string |

**Returns:** *(Anonymous function)*


<a name="modules_folder_md"></a>

[functional-usecases](#globalsmd) › ["Folder"](#modules_folder_md)

## Module: "Folder"

### Index

#### Type aliases

* [FoldersById](#foldersbyid)

#### Variables

* [getFoldersByIdInFirestore](#const-getfoldersbyidinfirestore)
* [getFoldersInFirestore](#const-getfoldersinfirestore)
* [getModelFromReference](#const-getmodelfromreference)

#### Functions

* [getModelsFromReference](#const-getmodelsfromreference)

### 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

```haskell
getFolderByIdInFirestore :: Firestore -> ReaderTaskEither String [Folder] Error
```

##### Type declaration:

▸ (`firestore`: Firestore): *ReaderTaskEither‹string, Error, [FoldersById](#foldersbyid)›*

**Parameters:**

Name | Type |
------ | ------ |
`firestore` | Firestore |

___

#### `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

```haskell
getFoldersInFirestore :: Firestore -> ReaderTaskEither String [Folder] Error
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`firestore` | Firestore |

___

#### `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

```haskell
getModelFromReference :: Firestore -> Reader String (ReaderTaskEither Reference Model Error)
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`firestore` | Firestore |

### Functions

#### `Const` getModelsFromReference

▸ **getModelsFromReference**(`firestore`: Firestore‹›): *(Anonymous function)*

Defined in src/Folder.ts:24

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

**Parameters:**

Name | Type |
------ | ------ |
`firestore` | Firestore‹› |

**Returns:** *(Anonymous function)*


<a name="modules_handlers_getentitieshandler_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetEntitiesHandler"](#modules_handlers_getentitieshandler_md)

## Module: "Handlers/GetEntitiesHandler"

### Index

#### Interfaces

* [GetEntitiesCallables](#interfaces_handlers_getentitieshandler_getentitiescallablesmd)


<a name="modules_handlers_getentityhandler_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetEntityHandler"](#modules_handlers_getentityhandler_md)

## Module: "Handlers/GetEntityHandler"

### Index

#### Interfaces

* [GetEntityCallables](#interfaces_handlers_getentityhandler_getentitycallablesmd)


<a name="modules_handlers_getfileinbucketshandler_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetFileInBucketsHandler"](#modules_handlers_getfileinbucketshandler_md)

## Module: "Handlers/GetFileInBucketsHandler"

### Index

#### Interfaces

* [Callables](#interfaces_handlers_getfileinbucketshandler_callablesmd)
* [Storage](#interfaces_handlers_getfileinbucketshandler_storagemd)


<a name="modules_handlers_getfilemodelhandler_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/GetFileModelHandler"](#modules_handlers_getfilemodelhandler_md)

## Module: "Handlers/GetFileModelHandler"

### Index

#### Interfaces

* [Callables](#interfaces_handlers_getfilemodelhandler_callablesmd)
* [Storage](#interfaces_handlers_getfilemodelhandler_storagemd)


<a name="modules_handlers_index_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/index"](#modules_handlers_index_md)

## Module: "Handlers/index"

### Index

#### References

* [Callables](#callables)
* [Request](#request)
* [RequestHandler](#requesthandler)
* [Storage](#storage)
* [isGetRequest](#isgetrequest)
* [isPostRequest](#ispostrequest)
* [makeGetEntitiesHandler](#makegetentitieshandler)
* [makeGetEntityHandler](#makegetentityhandler)
* [makeGetFileInBucketsHandler](#makegetfileinbucketshandler)
* [makeGetFileModelHandler](#makegetfilemodelhandler)
* [makeListEntitiesHandler](#makelistentitieshandler)

### References

####  Callables

• **Callables**:

___

####  Request

• **Request**:

___

####  RequestHandler

• **RequestHandler**:

___

####  Storage

• **Storage**:

___

####  isGetRequest

• **isGetRequest**:

___

####  isPostRequest

• **isPostRequest**:

___

####  makeGetEntitiesHandler

• **makeGetEntitiesHandler**:

___

####  makeGetEntityHandler

• **makeGetEntityHandler**:

___

####  makeGetFileInBucketsHandler

• **makeGetFileInBucketsHandler**:

___

####  makeGetFileModelHandler

• **makeGetFileModelHandler**:

___

####  makeListEntitiesHandler

• **makeListEntitiesHandler**:


<a name="modules_handlers_listentitieshandler_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/ListEntitiesHandler"](#modules_handlers_listentitieshandler_md)

## Module: "Handlers/ListEntitiesHandler"

### Index

#### Interfaces

* [ListEntitiesCallables](#interfaces_handlers_listentitieshandler_listentitiescallablesmd)


<a name="modules_handlers_request_md"></a>

[functional-usecases](#globalsmd) › ["Handlers/Request"](#modules_handlers_request_md)

## Module: "Handlers/Request"

### Index

#### Interfaces

* [Callables](#interfaces_handlers_request_callablesmd)
* [Request](#interfaces_handlers_request_requestmd)
* [Storage](#interfaces_handlers_request_storagemd)

#### Type aliases

* [RequestHandler](#requesthandler)

#### Variables

* [isGetRequest](#const-isgetrequest)
* [isPostRequest](#const-ispostrequest)

### Type aliases

####  RequestHandler

Ƭ **RequestHandler**: *function*

Defined in src/Handlers/Request.ts:32

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *Task‹Response‹Entity››*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |

### Variables

#### `Const` isGetRequest

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

Defined in src/Handlers/Request.ts:12

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *boolean*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |

___

#### `Const` isPostRequest

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

Defined in src/Handlers/Request.ts:17

##### Type declaration:

▸ (`request`: [Request](#interfaces_handlers_request_requestmd)): *boolean*

**Parameters:**

Name | Type |
------ | ------ |
`request` | [Request](#interfaces_handlers_request_requestmd) |


<a name="modules_schema_md"></a>

[functional-usecases](#globalsmd) › ["Schema"](#modules_schema_md)

## Module: "Schema"

### Index

#### Interfaces

* [SchemaReference](#interfaces_schema_schemareferencemd)

#### Type aliases

* [SchemaInstance](#schemainstance)
* [SchemaReferencesByFileType](#schemareferencesbyfiletype)

#### Variables

* [fromModel](#const-frommodel)
* [fromSchemaReferenceByFileType](#const-fromschemareferencebyfiletype)
* [toModel](#const-tomodel)
* [toSchemaReferencesByFileType](#const-toschemareferencesbyfiletype)

#### Functions

* [fromSchemaReference](#const-fromschemareference)
* [isSchemaReference](#const-isschemareference)
* [isSerializedSchemaReference](#const-isserializedschemareference)
* [toSchemaReference](#const-toschemareference)

### Type aliases

####  SchemaInstance

Ƭ **SchemaInstance**: *Schema | Schema*

Defined in src/Schema.ts:31

___

####  SchemaReferencesByFileType

Ƭ **SchemaReferencesByFileType**: *Record‹DocumentType, [SchemaReference](#interfaces_schema_schemareferencemd)‹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:**

Name | Type |
------ | ------ |
`model` | Model |

___

#### `Const` fromSchemaReferenceByFileType

• **fromSchemaReferenceByFileType**: *function* = mapObjIndexed(
  map(fromSchemaReference)
)

Defined in src/Schema.ts:96

##### Type declaration:

▸ (`referencesByFileTypes`: [SchemaReferencesByFileType](#schemareferencesbyfiletype)): *[SchemaReferencesByFileType](#schemareferencesbyfiletype)‹Schema›*

**Parameters:**

Name | Type |
------ | ------ |
`referencesByFileTypes` | [SchemaReferencesByFileType](#schemareferencesbyfiletype) |

___

#### `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:**

Name | Type |
------ | ------ |
`schema` | Schema |

___

#### `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](#schemareferencesbyfiletype)‹Schema›): *E.Either‹Error, [SchemaReferencesByFileType](#schemareferencesbyfiletype)›*

**Parameters:**

Name | Type |
------ | ------ |
`referencesByFileTypes` | [SchemaReferencesByFileType](#schemareferencesbyfiletype)‹Schema› |

### Functions

#### `Const` fromSchemaReference

▸ **fromSchemaReference**(`__namedParameters`: object): *[SchemaReference](#interfaces_schema_schemareferencemd)‹Schema›*

Defined in src/Schema.ts:70

**Parameters:**

▪ **__namedParameters**: *object*

Name | Type |
------ | ------ |
`reference` | reference |
`schema` | Schema |

**Returns:** *[SchemaReference](#interfaces_schema_schemareferencemd)‹Schema›*

___

#### `Const` isSchemaReference

▸ **isSchemaReference**(`a`: unknown): *a is SchemaReference*

Defined in src/Schema.ts:51

**Parameters:**

Name | Type |
------ | ------ |
`a` | unknown |

**Returns:** *a is SchemaReference*

___

#### `Const` isSerializedSchemaReference

▸ **isSerializedSchemaReference**(`a`: unknown): *a is SchemaReference‹Schema›*

Defined in src/Schema.ts:45

**Parameters:**

Name | Type |
------ | ------ |
`a` | unknown |

**Returns:** *a is SchemaReference‹Schema›*

___

#### `Const` toSchemaReference

▸ **toSchemaReference**(`__namedParameters`: object): *E.Either‹Error, [SchemaReference](#interfaces_schema_schemareferencemd)›*

Defined in src/Schema.ts:55

**Parameters:**

▪ **__namedParameters**: *object*

Name | Type |
------ | ------ |
`reference` | reference |
`serializedSchema` | Schema |

**Returns:** *E.Either‹Error, [SchemaReference](#interfaces_schema_schemareferencemd)›*


<a name="modules_storageobject_md"></a>

[functional-usecases](#globalsmd) › ["StorageObject"](#modules_storageobject_md)

## Module: "StorageObject"

### Index

#### Variables

* [getBufferFromCloudStorage](#const-getbufferfromcloudstorage)
* [getFileNameFromStorageObject](#const-getfilenamefromstorageobject)
* [getFolderNameFromPath](#const-getfoldernamefrompath)
* [getFolderNameFromStorageObject](#const-getfoldernamefromstorageobject)
* [getPathFromStorageObject](#const-getpathfromstorageobject)

#### Functions

* [getFileFromCloudStorage](#const-getfilefromcloudstorage)
* [getPathFromFilePath](#const-getpathfromfilepath)
* [getPathWithNameFromBucket](#const-getpathwithnamefrombucket)

### Variables

#### `Const` getBufferFromCloudStorage

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

Defined in src/StorageObject.ts:52

```haskell
getBufferFromCloudStorage :: CloudStorage -> ReaderTaskEither StorageObject Buffer Error
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`storage` | CloudStorage |

___

#### `Const` getFileNameFromStorageObject

• **getFileNameFromStorageObject**: *function* = pipe(getFolderNameFromStorageObject, concat)

Defined in src/StorageObject.ts:85

```haskell
getFileNameFromStorageObject :: StorageObject -> Reader String String
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`object` | StorageObject |

___

#### `Const` getFolderNameFromPath

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

Defined in src/StorageObject.ts:65

```haskell
getFolderNameFromPath :: String -> String
```

##### Type declaration:

▸ (`path`: string): *string*

**Parameters:**

Name | Type |
------ | ------ |
`path` | string |

___

#### `Const` getFolderNameFromStorageObject

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

Defined in src/StorageObject.ts:76

```haskell
getFolderNameFromStorageObject :: StorageObject -> String
```

##### Type declaration:

▸ (`object`: StorageObject): *string*

**Parameters:**

Name | Type |
------ | ------ |
`object` | StorageObject |

___

#### `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

```haskell
getPathFromStorageObject :: StorageObject -> Either Path Error
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`object` | StorageObject |

### Functions

#### `Const` getFileFromCloudStorage

▸ **getFileFromCloudStorage**(`storage`: Storage‹›): *function*

Defined in src/StorageObject.ts:44

```haskell
getFileFromCloudStorage :: CloudStorage -> ReaderTaskEither StorageObject File Error
```

**Parameters:**

Name | Type |
------ | ------ |
`storage` | Storage‹› |

**Returns:** *function*

▸ (`x0`: V0): *T2*

**Parameters:**

Name | Type |
------ | ------ |
`x0` | V0 |

___

#### `Const` getPathFromFilePath

▸ **getPathFromFilePath**(`bucket`: string): *(Anonymous function)*

Defined in src/StorageObject.ts:94

```haskell
getPathFromFilePath :: String -> Reader String Path
```

**Parameters:**

Name | Type |
------ | ------ |
`bucket` | string |

**Returns:** *(Anonymous function)*

___

#### `Const` getPathWithNameFromBucket

▸ **getPathWithNameFromBucket**(`bucket`: string): *function*

Defined in src/StorageObject.ts:108

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

**Parameters:**

Name | Type |
------ | ------ |
`bucket` | string |

**Returns:** *function*

▸ (`x0`: V0): *T2*

**Parameters:**

Name | Type |
------ | ------ |
`x0` | V0 |


<a name="modules_tableannotation_md"></a>

[functional-usecases](#globalsmd) › ["TableAnnotation"](#modules_tableannotation_md)

## Module: "TableAnnotation"

### Index

#### Interfaces

* [TableAnnotationModel](#interfaces_tableannotation_tableannotationmodelmd)
* [Tables](#interfaces_tableannotation_tablesmd)

#### Type aliases

* [BoundingBoxesByPageModel](#boundingboxesbypagemodel)

#### Variables

* [fromModel](#const-frommodel)
* [getDefaultModelFromReference](#const-getdefaultmodelfromreference)
* [getTableAnnotationsInFirestore](#const-gettableannotationsinfirestore)
* [toTableAnnotationModel](#const-totableannotationmodel)

#### Functions

* [getDefaultFromReference](#const-getdefaultfromreference)
* [getTableAnnotationsInActiveOfflineFolders](#const-gettableannotationsinactiveofflinefolders)

### Type aliases

####  BoundingBoxesByPageModel

Ƭ **BoundingBoxesByPageModel**: *Dictionary‹[LabeledBoundingBoxModel](#interfaces_vertex_labeledboundingboxmodelmd)›[]*

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

```haskell
fromModel :: Model -> Either Folder Error
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`model` | Model |

___

#### `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

```haskell
getDefaultModelFromReference :: Firestore -> Reader String (ReaderTaskEither Reference Model Error)
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`firestore` | Firestore |

___

#### `Const` getTableAnnotationsInFirestore

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

Defined in src/TableAnnotation.ts:124

```haskell
getTableAnnotationsInFirestore :: Firestore -> ReaderTaskEither String [TableAnnotation] Error
```

##### Type declaration:

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

**Parameters:**

Name | Type |
------ | ------ |
`firestore` | Firestore |

___

#### `Const` toTableAnnotationModel

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

Defined in src/TableAnnotation.ts:57

```haskell
toTableAnnotationModel :: TableAnnotation -> TableAnnotationModel
```

##### Type declaration:

▸ (`annotation`: TableAnnotation): *[TableAnnotationModel](#interfaces_tableannotation_tableannotationmodelmd)*

**Parameters:**

Name | Type |
------ | ------ |
`annotation` | TableAnnotation |

### Functions

#### `Const` getDefaultFromReference

▸ **getDefaultFromReference**(`reference`: Reference): *Task‹[TableAnnotationModel](#interfaces_tableannotation_tableannotationmodelmd)›*

Defined in src/TableAnnotation.ts:89

```haskell
getDefaultFromReference :: Reference -> TaskEither Model Never
```

**Parameters:**

Name | Type |
------ | ------ |
`reference` | Reference |

**Returns:** *Task‹[TableAnnotationModel](#interfaces_tableannotation_tableannotationmodelmd)›*

___

#### `Const` getTableAnnotationsInActiveOfflineFolders

▸ **getTableAnnotationsInActiveOfflineFolders**(`tables`: [Tables](#interfaces_tableannotation_tablesmd)): *function*

Defined in src/TableAnnotation.ts:144

```haskell
getTableAnnotationsInActiveOfflineFolders :: Storage -> TaskEither [TableAnnotation] Error
```

**Parameters:**

Name | Type |
------ | ------ |
`tables` | [Tables](#interfaces_tableannotation_tablesmd) |

**Returns:** *function*

▸ (`x0`: V0): *T2*

**Parameters:**

Name | Type |
------ | ------ |
`x0` | V0 |


<a name="modules_vertex_md"></a>

[functional-usecases](#globalsmd) › ["Vertex"](#modules_vertex_md)

## Module: "Vertex"

### Index

#### Interfaces

* [LabeledBoundingBoxModel](#interfaces_vertex_labeledboundingboxmodelmd)
* [LineModel](#interfaces_vertex_linemodelmd)

#### Variables

* [fromLabeledBoundingBoxModel](#const-fromlabeledboundingboxmodel)
* [toLabeledBoundingBoxModel](#const-tolabeledboundingboxmodel)
* [toLineModel](#const-tolinemodel)

#### Functions

* [fromLineModel](#const-fromlinemodel)

### Variables

#### `Const` fromLabeledBoundingBoxModel

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

Defined in src/Vertex.ts:53

```haskell
fromLabeledBoundingBoxModel :: LabeledBoundingBoxModel -> LabeledBoundingBox
```

##### Type declaration:

▸ (`boundingBoxModel`: [LabeledBoundingBoxModel](#interfaces_vertex_labeledboundingboxmodelmd)): *LabeledBoundingBox*

**Parameters:**

Name | Type |
------ | ------ |
`boundingBoxModel` | [LabeledBoundingBoxModel](#interfaces_vertex_labeledboundingboxmodelmd) |

___

#### `Const` toLabeledBoundingBoxModel

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

Defined in src/Vertex.ts:41

```haskell
toLabeledBoundingBoxModel :: LabeledBoundingBox -> LabeledBoundingBoxModel
```

##### Type declaration:

▸ (`boundingBox`: LabeledBoundingBox): *[LabeledBoundingBoxModel](#interfaces_vertex_labeledboundingboxmodelmd)*

**Parameters:**

Name | Type |
------ | ------ |
`boundingBox` | LabeledBoundingBox |

___

#### `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

```haskell
toLineModel :: Line -> LineModel
```

##### Type declaration:

▸ (`line`: Line): *[LineModel](#interfaces_vertex_linemodelmd)*

**Parameters:**

Name | Type |
------ | ------ |
`line` | Line |

### Functions

#### `Const` fromLineModel

▸ **fromLineModel**(`__namedParameters`: object): *[Vertex, Vertex]*

Defined in src/Vertex.ts:31

```haskell
fromLineModel :: LineModel -> Line
```

**Parameters:**

▪ **__namedParameters**: *object*

Name | Type |
------ | ------ |
`end` | Vertex |
`start` | Vertex |

**Returns:** *[Vertex, Vertex]*
