Skip to main content

Class: TypedSearchAttributes

Constructors​

Constructor​

new TypedSearchAttributes(initialAttributes?): TypedSearchAttributes

Parameters​

initialAttributes?​

SearchAttributePair[]

Returns​

TypedSearchAttributes

Methods​

copy()​

copy(): TypedSearchAttributes

Returns a deep copy of the given TypedSearchAttributes instance

Returns​

TypedSearchAttributes


get()​

get<T>(key): IndexedValueTypeMapping[T] | undefined

Type Parameters​

T​

T extends SearchAttributeType

Parameters​

key​

SearchAttributeKey<T>

Returns​

IndexedValueTypeMapping[T] | undefined


getAll()​

getAll(): SearchAttributePair[]

Returns​

SearchAttributePair[]


updateCopy()​

updateCopy(updates): TypedSearchAttributes

Returns a copy of the current TypedSearchAttributes instance with the updated attributes.

Parameters​

updates​

SearchAttributeUpdatePair[]

Returns​

TypedSearchAttributes


getKeyFromUntyped()​

static getKeyFromUntyped(key, value): SearchAttributeKey<SearchAttributeType> | undefined

Parameters​

key​

string

value​

SearchAttributeValueOrReadonly

Returns​

SearchAttributeKey<SearchAttributeType> | undefined


toMetadataType()​

static toMetadataType(type): string

Parameters​

type​

SearchAttributeType

Returns​

string


toSearchAttributeType()​

static toSearchAttributeType(type): SearchAttributeType | undefined

Parameters​

type​

string

Returns​

SearchAttributeType | undefined