elasticsearch-store / utils/model
utils/model
Variables
schema
const
schema:object
JSON Schema
Type declaration
additionalProperties
additionalProperties:
boolean
=false
properties
properties:
object
properties._created
_created:
object
properties._created.format
format:
string
='date-time'
properties._deleted
_deleted:
object
properties._deleted.default
default:
boolean
=false
properties._deleted.type
type:
string
='boolean'
properties._key
_key:
object
properties._key.type
type:
string
='string'
properties._updated
_updated:
object
properties._updated.format
format:
string
='date-time'
properties.client_id
client_id:
object
properties.client_id.default
default:
number
=1
properties.client_id.minimum
minimum:
number
=0
properties.client_id.multipleOf
multipleOf:
number
=1.0
properties.client_id.type
type:
string
='number'
required
required:
string
[]
Source
elasticsearch-store/src/utils/model.ts:9
Functions
addDefaultSchema()
addDefaultSchema(
input
):Record
<string
,any
>
Parameters
Parameter | Type |
---|---|
input | Record <string , any > |
Returns
Record
<string
, any
>
Source
elasticsearch-store/src/utils/model.ts:53
makeRecordDataType()
makeRecordDataType(
arg
):DataType
Parameters
Parameter | Type |
---|---|
arg | object |
arg.description ? | string |
arg.fields | DataTypeFields |
arg.name | string |
Returns
DataType
Source
elasticsearch-store/src/utils/model.ts:35
mergeDefaults()
mergeDefaults<
T
>(source
,from
):T
Deep copy two levels deep (useful for mapping and schema)
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
source | T |
from | Partial <T > |
Returns
T
Source
elasticsearch-store/src/utils/model.ts:60
toInstanceName()
toInstanceName(
name
):string
Parameters
Parameter | Type |
---|---|
name | string |
Returns
string
Source
elasticsearch-store/src/utils/model.ts:79
uniqueFieldQuery()
uniqueFieldQuery(
field
):string
Parameters
Parameter | Type |
---|---|
field | string |
Returns
string