BaseModel
Base class for all models.
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.
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.
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.
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 |
BrickworksApiQuery
Class responsible for creating a query to the Brickworks API.
Declared In:
lib/classes/api_queries/BrickworksApiQuery.js
Declaration:
class BrickworksApiQuery
Properties:
| Property | Type | Optional | Description |
|---|---|---|---|
| schemaSlug | String | no | Unique identifier (appName/API name) of a schema |
| recordSlug | String | yes1 | Unique identifier (slug/slug) of a record |
| recordId | String | yes1 | Unique identifier (id/UUID) of a record |
| context | Object | yes | Key/value properties for {{ context.keyName }} inserts in the record |
| fieldContext | Object | yes | Additional properties for recommendation and many-to-one field types |
1 You must provide one of the identifiers.
Initializers:
constructor()
Removed symbols
ScreenViewResponse {#screenviewresponse}
Model representing a highest-priority customer screen view campaign.
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 {#screenviewaudience}
Model representing an audience of customer screen view.
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 |