Skip to main content

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

ParameterType
inputRecord<string, any>

Returns

Record<string, any>

Source

elasticsearch-store/src/utils/model.ts:53


makeRecordDataType()

makeRecordDataType(arg): DataType

Parameters

ParameterType
argobject
arg.description?string
arg.fieldsDataTypeFields
arg.namestring

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

ParameterType
sourceT
fromPartial<T>

Returns

T

Source

elasticsearch-store/src/utils/model.ts:60


toInstanceName()

toInstanceName(name): string

Parameters

ParameterType
namestring

Returns

string

Source

elasticsearch-store/src/utils/model.ts:79


uniqueFieldQuery()

uniqueFieldQuery(field): string

Parameters

ParameterType
fieldstring

Returns

string

Source

elasticsearch-store/src/utils/model.ts:85