Skip to main content

Class: TypedSearchAttributes

common.TypedSearchAttributes

Constructors

constructor

new TypedSearchAttributes(initialAttributes?): TypedSearchAttributes

Parameters

NameType
initialAttributes?SearchAttributePair[]

Returns

TypedSearchAttributes

Methods

copy

copy(): TypedSearchAttributes

Returns a deep copy of the given TypedSearchAttributes instance

Returns

TypedSearchAttributes


get

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

Type parameters

NameType
Textends SearchAttributeType

Parameters

NameType
keySearchAttributeKey<T>

Returns

undefined | IndexedValueTypeMapping[T]


getAll

getAll(): SearchAttributePair[]

Returns

SearchAttributePair[]


updateCopy

updateCopy(updates): TypedSearchAttributes

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

Parameters

NameType
updatesSearchAttributeUpdatePair[]

Returns

TypedSearchAttributes


getKeyFromUntyped

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

Parameters

NameType
keystring
valueSearchAttributeValueOrReadonly

Returns

undefined | SearchAttributeKey<SearchAttributeType>


toMetadataType

toMetadataType(type): string

Parameters

NameType
typeSearchAttributeType

Returns

string


toSearchAttributeType

toSearchAttributeType(type): undefined | SearchAttributeType

Parameters

NameType
typestring

Returns

undefined | SearchAttributeType