Class

DataManager

DataManager(config, dependencies)

Provides logic for data. Stores bucket with help of dataStore if it's provided
Constructor

# new DataManager(config, dependencies)

Parameters:
Name Type Description
config Config
dependencies Object
apiManager ApiManagerInterface
bucketingManager BucketingManagerInterface
ruleManager RuleManagerInterface
loggerManager LogManagerInterface
Implements:
  • DataManagerInterface

View Source src/data-manager.ts, line 21

Classes

DataManager
DataManager

Members

# dataStoreManager

dataStoreManager setter

View Source src/data-manager.ts, line 78

# dataStoreManager

dataStoreManager getter

View Source src/data-manager.ts, line 89

Methods

# convert(visitorId, goalId, goalRuleopt, goalData, segments) → {boolean}

Process conversion event
Parameters:
Name Type Attributes Description
visitorId Id
goalId Id
goalRule Record.<string, any> <optional>
An object of key-value pairs that are used for goal matching
goalData Array.<Record.<GoalDataKey, number>> An array of object of key-value pairs
segments SegmentsData

View Source src/data-manager.ts, line 763

boolean

# data() → {ConfigData}

data getter

View Source src/data-manager.ts, line 664

ConfigData

# dataStoreManager() → {DataStoreManagerInterface}

dataStoreManager getter

View Source src/data-manager.ts, line 676

DataStoreManagerInterface

# filterMatchedRecordsWithRule(items, visitorProperties) → {Array.<Record.<string, any>>}

Get audiences that meet the visitorProperties
Parameters:
Name Type Description
items Array.<Record.<any, any>>
visitorProperties Object

View Source src/data-manager.ts, line 771

Array.<Record.<string, any>>

# getBucketing(visitorId, key, visitorProperties, locationProperties, environmentopt) → {BucketedVariation|null}

Retrieve variation for visitor
Parameters:
Name Type Attributes Description
visitorId string
key string
visitorProperties Record.<string, any>
locationProperties string
environment string <optional>

View Source src/data-manager.ts, line 741

BucketedVariation | null

# getBucketingById(visitorId, id, visitorProperties, locationProperties, environmentopt) → {BucketedVariation|null}

Retrieve variation for Visitor
Parameters:
Name Type Attributes Description
visitorId string
id Id
visitorProperties Record.<string, any>
locationProperties string
environment string <optional>

View Source src/data-manager.ts, line 752

BucketedVariation | null

# getEntities(keys, entityType) → {Array.<Entity>}

Find the entity in list by keys
Parameters:
Name Type Description
keys Array.<string>
entityType string

View Source src/data-manager.ts, line 813

Array.<Entity>

# getEntitiesByIds(ids, entityType) → {Array.<Entity>}

Find the entity in list by ids
Parameters:
Name Type Description
ids Array.<Id>
entityType string

View Source src/data-manager.ts, line 829

Array.<Entity>

# getEntitiesList(entityType) → {Array.<(Entity|Id)>}

Get list of data entities
Parameters:
Name Type Description
entityType string

View Source src/data-manager.ts, line 778

Array.<(Entity|Id)>

# getEntitiesListObject(entityType, fieldopt) → {Record.<string, Entity>}

Get list of data entities grouped by field
Parameters:
Name Type Attributes Description
entityType string
field IdentityField <optional>

View Source src/data-manager.ts, line 786

Record.<string, Entity>

# getEntity(key, entityType) → {Entity|null}

Find the entity in list by id
Parameters:
Name Type Description
key string
entityType string

View Source src/data-manager.ts, line 805

Entity | null

# getEntityById(id, entityType) → {Entity|null}

Find the entity in list by id
Parameters:
Name Type Description
id Id
entityType string

View Source src/data-manager.ts, line 821

Entity | null

# getItemsByIds(ids, path) → {Array.<Record.<string, any>>}

Find the items in list by ids
Parameters:
Name Type Description
ids Array.<Id>
path String

View Source src/data-manager.ts, line 845

Array.<Record.<string, any>>

# getItemsByKeys(keys, path) → {Array.<Record.<string, any>>}

Find the items in list by keys
Parameters:
Name Type Description
keys Array.<string>
path string

View Source src/data-manager.ts, line 837

Array.<Record.<string, any>>

# getSubItem(entityType, entityIdentity, subEntityType, subEntityIdentity, identityField, subIdentityField) → {Record.<any, any>|null}

Find nested item
Parameters:
Name Type Description
entityType string
entityIdentity string | number
subEntityType string
subEntityIdentity string | number
identityField IdentityField
subIdentityField IdentityField

View Source src/data-manager.ts, line 857

Record.<any, any> | null

# isValidConfigData(data) → {boolean}

Validates data object
Parameters:
Name Type Description
data

View Source src/data-manager.ts, line 864

boolean