Skip to content

Commit

Permalink
doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
guyroyse committed Feb 24, 2022
1 parent 39d7998 commit 18313fb
Show file tree
Hide file tree
Showing 20 changed files with 1,557 additions and 198 deletions.
105 changes: 86 additions & 19 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ redis-om

### Classes

- [AbstractSearch](classes/AbstractSearch.md)
- [Circle](classes/Circle.md)
- [Client](classes/Client.md)
- [Entity](classes/Entity.md)
- [RawSearch](classes/RawSearch.md)
- [RedisError](classes/RedisError.md)
- [Repository](classes/Repository.md)
- [Schema](classes/Schema.md)
Expand All @@ -17,19 +20,25 @@ redis-om

### Interfaces

- [ArrayField](interfaces/ArrayField.md)
- [BooleanField](interfaces/BooleanField.md)
- [DateField](interfaces/DateField.md)
- [Field](interfaces/Field.md)
- [NumericField](interfaces/NumericField.md)
- [NumberField](interfaces/NumberField.md)
- [PointField](interfaces/PointField.md)
- [StringArrayField](interfaces/StringArrayField.md)
- [StringField](interfaces/StringField.md)
- [TextField](interfaces/TextField.md)

### Type aliases

- [CircleFunction](README.md#circlefunction)
- [EntityConstructor](README.md#entityconstructor)
- [EntityCreationData](README.md#entitycreationdata)
- [EntityData](README.md#entitydata)
- [EntityValue](README.md#entityvalue)
- [FieldDefinition](README.md#fielddefinition)
- [IdStrategy](README.md#idstrategy)
- [Point](README.md#point)
- [SchemaDefinition](README.md#schemadefinition)
- [SchemaOptions](README.md#schemaoptions)
- [SearchDataStructure](README.md#searchdatastructure)
Expand All @@ -38,9 +47,35 @@ redis-om

## Type aliases

### CircleFunction

Ƭ **CircleFunction**: (`circle`: [`Circle`](classes/Circle.md)) => [`Circle`](classes/Circle.md)

#### Type declaration

▸ (`circle`): [`Circle`](classes/Circle.md)

A function that defines a circle for `.inCircle` searches.

##### Parameters

| Name | Type |
| :------ | :------ |
| `circle` | [`Circle`](classes/Circle.md) |

##### Returns

[`Circle`](classes/Circle.md)

#### Defined in

[lib/search/where-point.ts:9](https://github.com/redis/redis-om-node/blob/39d7998/lib/search/where-point.ts#L9)

___

### EntityConstructor

Ƭ **EntityConstructor**<`TEntity`\>: (`schemaDef`: [`SchemaDefinition`](README.md#schemadefinition), `id`: `string`, `data?`: [`EntityData`](README.md#entitydata)) => `TEntity`
Ƭ **EntityConstructor**<`TEntity`\>: (`schema`: [`Schema`](classes/Schema.md)<`any`\>, `id`: `string`, `data?`: [`EntityData`](README.md#entitydata)) => `TEntity`

#### Type parameters

Expand All @@ -50,58 +85,70 @@ redis-om

#### Type declaration

• (`schemaDef`, `id`, `data?`)
• (`schema`, `id`, `data?`)

A constructor that creates an [Entity](classes/Entity.md) of type TEntity.

##### Parameters

| Name | Type |
| :------ | :------ |
| `schemaDef` | [`SchemaDefinition`](README.md#schemadefinition) |
| `schema` | [`Schema`](classes/Schema.md)<`any`\> |
| `id` | `string` |
| `data?` | [`EntityData`](README.md#entitydata) |

#### Defined in

[lib/entity/entity.ts:12](https://github.com/redis/redis-om-node/blob/ee688a6/lib/entity/entity.ts#L12)
[lib/entity/entity.ts:18](https://github.com/redis/redis-om-node/blob/39d7998/lib/entity/entity.ts#L18)

___

### EntityCreationData

Ƭ **EntityCreationData**: `Record`<`string`, `number` \| `boolean` \| `string` \| `string`[] \| ``null``\>
Ƭ **EntityCreationData**: `Record`<`string`, `number` \| `boolean` \| `string` \| `string`[] \| [`Point`](README.md#point) \| `Date` \| ``null``\>

Initialization data for [Entity](classes/Entity.md) creation when calling
[Repository.createEntity](classes/Repository.md#createentity) or [Repository.createAndSave](classes/Repository.md#createandsave).

#### Defined in

[lib/repository/repository.ts:14](https://github.com/redis/redis-om-node/blob/ee688a6/lib/repository/repository.ts#L14)
[lib/repository/repository.ts:15](https://github.com/redis/redis-om-node/blob/39d7998/lib/repository/repository.ts#L15)

___

### EntityData

Ƭ **EntityData**: `Record`<`string`, `number` \| `boolean` \| `string` \| `string`[]\>
Ƭ **EntityData**: `Record`<`string`, [`EntityValue`](README.md#entityvalue)\>

A JavaScript object containing the underlying data of an [Entity](classes/Entity.md).

#### Defined in

[lib/entity/entity.ts:6](https://github.com/redis/redis-om-node/blob/ee688a6/lib/entity/entity.ts#L6)
[lib/entity/entity.ts:12](https://github.com/redis/redis-om-node/blob/39d7998/lib/entity/entity.ts#L12)

___

### EntityValue

Ƭ **EntityValue**: `number` \| `boolean` \| `string` \| [`Point`](README.md#point) \| `Date` \| `string`[]

Valid values for properties of an [Entity](classes/Entity.md).

#### Defined in

[lib/entity/entity.ts:7](https://github.com/redis/redis-om-node/blob/39d7998/lib/entity/entity.ts#L7)

___

### FieldDefinition

Ƭ **FieldDefinition**: [`NumericField`](interfaces/NumericField.md) \| [`StringField`](interfaces/StringField.md) \| [`BooleanField`](interfaces/BooleanField.md) \| [`ArrayField`](interfaces/ArrayField.md)
Ƭ **FieldDefinition**: [`StringField`](interfaces/StringField.md) \| [`TextField`](interfaces/TextField.md) \| [`NumberField`](interfaces/NumberField.md) \| [`BooleanField`](interfaces/BooleanField.md) \| [`PointField`](interfaces/PointField.md) \| [`DateField`](interfaces/DateField.md) \| [`StringArrayField`](interfaces/StringArrayField.md)

Contains instructions telling how to map a property on an [Entity](classes/Entity.md) to Redis.

#### Defined in

[lib/schema/schema-definitions.ts:54](https://github.com/redis/redis-om-node/blob/ee688a6/lib/schema/schema-definitions.ts#L54)
[lib/schema/schema-definitions.ts:77](https://github.com/redis/redis-om-node/blob/39d7998/lib/schema/schema-definitions.ts#L77)

___

Expand All @@ -121,7 +168,26 @@ A function that generates random [Entity IDs](classes/Entity.md#entityid).

#### Defined in

[lib/schema/schema-definitions.ts:62](https://github.com/redis/redis-om-node/blob/ee688a6/lib/schema/schema-definitions.ts#L62)
[lib/schema/schema-definitions.ts:85](https://github.com/redis/redis-om-node/blob/39d7998/lib/schema/schema-definitions.ts#L85)

___

### Point

Ƭ **Point**: `Object`

Defines a point on the globe using longitude and latitude.

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `latitude` | `number` | The latitude of the point. |
| `longitude` | `number` | The longitude of the point. |

#### Defined in

[lib/schema/schema-definitions.ts:2](https://github.com/redis/redis-om-node/blob/39d7998/lib/schema/schema-definitions.ts#L2)

___

Expand All @@ -133,7 +199,7 @@ Group of [FieldDefinition](README.md#fielddefinition)s that define the schema fo

#### Defined in

[lib/schema/schema-definitions.ts:59](https://github.com/redis/redis-om-node/blob/ee688a6/lib/schema/schema-definitions.ts#L59)
[lib/schema/schema-definitions.ts:82](https://github.com/redis/redis-om-node/blob/39d7998/lib/schema/schema-definitions.ts#L82)

___

Expand All @@ -147,16 +213,17 @@ Configuration options for a [Schema](classes/Schema.md).

| Name | Type | Description |
| :------ | :------ | :------ |
| `dataStructure?` | [`SearchDataStructure`](README.md#searchdatastructure) | The data structure used to store the [Entity](classes/Entity.md) in Redis. |
| `dataStructure?` | [`SearchDataStructure`](README.md#searchdatastructure) | The data structure used to store the [Entity](classes/Entity.md) in Redis. Can be set to either `JSON` or `HASH`. Defaults to JSON. |
| `idStrategy?` | [`IdStrategy`](README.md#idstrategy) | A function that generates a random [Entity ID](classes/Entity.md#entityid). Defaults to a function that generates [ULIDs](https://github.com/ulid/spec). Combined with prefix to generate a Redis key. If prefix is `Foo` and idStratgey returns `12345` then the generated key would be `Foo:12345`. |
| `indexHashName?` | `string` | The name used by Redis OM to store the hash of the index for this [Schema](classes/Schema.md). Defaults to prefix followed by `:index:hash`. So, for a prefix of `Foo`, it would use `Foo:index:hash`. |
| `indexName?` | `string` | The name used by RediSearch to store the index for this [Schema](classes/Schema.md). Defaults to prefix followed by `:index`. So, for a prefix of `Foo`, it would use `Foo:index`. |
| `prefix?` | `string` | The string that comes before the ID when creating Redis keys for [Entities](classes/Entity.md). Defaults to the class name of the [Entity](classes/Entity.md). Combined with the results of idStrategy to generate a key. If prefix is `Foo` and idStrategy returns `12345` then the generated key would be `Foo:12345`. |
| `stopWords?` | `string`[] | Stop words to be used by this schema. If `useStopWords` is anything other than `CUSTOM`, this option is ignored. |
| `useStopWords?` | [`StopWordOptions`](README.md#stopwordoptions) | Configures the usage of stop words. Valid values are `OFF`, `DEFAULT`, and `CUSTOM`. Setting this to `OFF` disables all stop words. Setting this to `DEFAULT` uses the stop words intrinsic to RediSearch. Setting this to `CUSTOM` tells RediSearch to use the stop words in `stopWords`. |

#### Defined in

[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/ee688a6/lib/schema/schema-options.ts#L7)
[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/39d7998/lib/schema/schema-options.ts#L7)

___

Expand All @@ -168,7 +235,7 @@ The type of data structure in Redis to map objects to.

#### Defined in

[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/ee688a6/lib/client.ts#L21)
[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/39d7998/lib/client.ts#L21)

___

Expand All @@ -180,7 +247,7 @@ Valid values for how to use stop words for a given [Schema](classes/Schema.md).

#### Defined in

[lib/schema/schema-definitions.ts:65](https://github.com/redis/redis-om-node/blob/ee688a6/lib/schema/schema-definitions.ts#L65)
[lib/schema/schema-definitions.ts:88](https://github.com/redis/redis-om-node/blob/39d7998/lib/schema/schema-definitions.ts#L88)

___

Expand Down Expand Up @@ -212,4 +279,4 @@ A function that takes a [Search](classes/Search.md) and returns a [Search](class

#### Defined in

[lib/search/search.ts:22](https://github.com/redis/redis-om-node/blob/ee688a6/lib/search/search.ts#L22)
[lib/search/search.ts:24](https://github.com/redis/redis-om-node/blob/39d7998/lib/search/search.ts#L24)
Loading

0 comments on commit 18313fb

Please sign in to comment.