Miscellaneous

BaseModel

Base class for all models.

WARNING: This is an abstract class and it is not meant to be instantiated directly.

Declared In:
lib/classes/models/BaseModel.js

Declaration:

interface ModelMappable {
  toObject(): object;
}

abstract class BaseModel implements ModelMappable


BaseApiQuery

Object for setting parameters to facilitate fetching promotions from the API.

WARNING: This is an abstract class and it is not meant to be instantiated directly.

Declared In:
lib/classes/models/api_queries/BaseApiQuery.js

Declaration:

interface IApiQuerySorting {
  property: string;
  order: ApiQuerySortingOrder;
}

class BaseApiQuery

Properties:

Property Type Optional Default Description
limit number no 100 Limit of items per page in the response
page number no 1 Page number
sorting Array yes [] Specifies sorting rules for items in the response
includeMeta boolean no false Specifies if meta data should be included in the response


ApiQuerySortingOrder

Declared In:
lib/classes/api_queries/BaseApiQuery.js

Declaration:

enum ApiQuerySortingOrder {
  Ascending = 'asc',
  Descending = 'desc',
}



Error

Declared In:
lib/classes/types/Error.js

Declaration:

class Error

Properties:

Property Type Optional Description
code number yes Error code
message string yes Error message

Initializers:

constructor(code: number, message: string)



ScreenViewApiQuery

The object to set parameters easily for fetching screen views from API.

Declared In:
lib/classes/api_queries/ScreenViewApiQuery.js

Declaration:

class ScreenViewApiQuery

Properties:

Property Type Optional Default Description
feedSlug string no null Identifies a specific screen view feed
productId string yes null Item identifier

Initializers:

constructor()



ScreenView

Model representing a highest-priority customer screen view campaign.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
lib/classes/content/ScreenView.js

Related To:
ScreenViewAudienceInfo

Inherits From:
BaseModel

Declaration:

class ScreenView extends BaseModel

Properties:

Property Type Optional Description
identifier string no Screen view’s ID
name string no Screen view’s name
hashString string no Screen view’s hash
path string no URL of the screen view’s definition
priority number no Screen View’s priority (1-99, where 1 is the highest)
audience ScreenViewAudienceInfo no Audience of a screen view
data any no Content of the screen view
createdAt Date no Screen view’s creation date
updatedAt Date no Screen view’s update date


ScreenViewAudienceInfo

Model representing an audience of customer screen view.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
lib/classes/content/ScreenViewAudienceInfo.js

Related To:
ScreenView

Inherits From:
BaseModel

Declaration:

class ScreenViewAudienceInfo extends BaseModel

Properties:

Property Type Optional Description
segments string yes Audience’s segments
query string yes Audience’s query
targetType string yes Audience’s target type


ScreenViewResponse

Model representing a highest-priority customer screen view campaign.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
lib/classes/content/ScreenViewResponse.js

Related To:
ScreenViewAudience

Inherits From:
BaseModel

Declaration:

class ScreenViewResponse extends BaseModel

Properties:

Property Type Optional Description
audience ScreenViewAudience no Audience of a screen view
identifier string no Screen view’s ID
hashString string no Screen view’s hash
path string no URL of the screen view’s definition
name string no Screen view’s name
priority number no Screen View’s priority (1-99, where 1 is the highest)
descriptionText string yes Screen view’s description
data any no Content of the screen view
version string no Version of a screen view
parentVersion string yes Parent version of a screen view
createdAt Date no Screen view’s creation date
updatedAt Date no Screen view’s update date
deletedAt Date yes Screen view’s deletion date


ScreenViewAudience

Model representing an audience of customer screen view.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
lib/classes/content/ScreenViewAudience.js

Related To:
ScreenViewResponse

Inherits From:
BaseModel

Declaration:

class ScreenViewAudience extends BaseModel

Properties:

Property Type Optional Description
IDs Array yes Audience’s identifiers
query string yes Audience’s query
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker