Responses
BaseModel
Base class for all models.
Declared In:
lib/classes/models/BaseModel.js
Declaration:
interface ModelMappable {
toObject(): object;
}
abstract class BaseModel implements ModelMappable
ClientAccountInformation
Model representating the customer information.
Declared In:
lib/classes/models/Client/ClientAccountInformation.js
Related To:
ClientSex
ClientAgreements
Inherits From:
BaseModel
Declaration:
class ClientAccountInformation extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
clientId | number | no | Customer’s ID |
string | no | Customer’s email | |
phone | string | yes | Customer’s phone |
customId | string | yes | Customer’s custom ID |
uuid | string | no | Customer’s UUID |
firstName | string | yes | Customer’s first name |
lastName | string | yes | Customer’s last name |
displayName | string | yes | Customer’s display name |
sex | ClientSex | no | Customer’s sex |
company | string | yes | Customer’s company |
address | string | yes | Customer’s address |
city | string | yes | Customer’s city |
province | string | yes | Customer’s province |
zipCode | string | yes | Customer’s ZIP code |
countryCode | string | yes | Customer’s country code |
birthDate | string | yes | Customer’s birthdate |
lastActivityDate | Date | no | Customer’s last activity date |
avatarUrl | string | yes | Customer’s avatar URL |
anonymous | boolean | no | Customer’s anonymous flag |
agreements | ClientAgreements | no | Customer’s agreements |
attributes | Array | yes | Customer’s attributes |
tags | Array |
yes | Customer’s tags |
ClientSex
Declared In:
lib/classes/models/Client/ClientSex.js
Declaration:
enum ClientSex {
NotSpecified = 'NOT_SPECIFIED',
Male = 'MALE',
Female = 'FEMALE',
Other = 'OTHER',
}
Functions:
Converts from ClientSex to string.
function ClientSexToString(clientSex: ClientSex): string
Converts from string to ClientSex.
function ClientSexFromString(string: string): ClientSex
ClientAgreements
Declared In:
lib/classes/models/Client/ClientAgreements.js
Inherits From:
BaseModel
Declaration:
interface IClientAgreements {
email?: boolean;
sms?: boolean;
push?: boolean;
bluetooth?: boolean;
rfid?: boolean;
wifi?: boolean;
}
class ClientAgreements extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
boolean | no | Email agreement | |
sms | boolean | no | SMS agreement |
push | boolean | no | Push notifications agreement |
bluetooth | boolean | no | Bluetooth agreement |
rfid | boolean | no | RFID agreement |
wifi | boolean | no | WIFI agreement |
Initializers:
constructor()
constructor(modelObject?: IClientAgreements)
Token
Declared In:
lib/classes/models/Token/Token.js
Related To:
TokenOrigin
Inherits From:
BaseModel
Declaration:
class Token extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
tokenString | string | no | Token as a raw string |
tokenOrigin | TokenOrigin | no | Token’s origin |
expirationDate | string | yes | Token’s expiration time |
TokenOrigin
Declared In:
lib/classes/models/Token/TokenOrigin.js
Declaration:
enum TokenOrigin {
Unknown = 'UNKNOWN',
Synerise = 'SYNERISE',
Facebook = 'FACEBOOK',
Oauth = 'OAUTH',
}
Functions:
Converts from TokenOrigin to string.
function TokenOriginToString(tokenOrigin: TokenOrigin): string
Converts from string to TokenOrigin.
function TokenOriginFromString(string: string): TokenOrigin
PromotionResponse
Declared In:
lib/classes/models/Promotions/PromotionResponse.js
Related To:
Promotion
Inherits From:
BaseModel
Declaration:
class PromotionResponse extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
totalCount | number | no | Total count of promotions |
totalPages | number | no | Total count of pages |
page | number | no | Current page |
limit | number | no | Limit of promotions per page |
code | number | no | HTTP code of the response |
items | Array |
no | List of promotion items |
Promotion
Declared In:
lib/classes/models/Promotions/Promotion.js
Related To:
PromotionResponse
PromotionStatus
PromotionType
PromotionDiscountType
Inherits From:
BaseModel
Declaration:
class Promotion extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
uuid | string | no | Promotion’s UUID |
code | string | no | Promotion’s code |
status | PromotionStatus | yes | Promotion’s status |
type | PromotionType | yes | Promotion’s type |
details | PromotionDetails | yes | Promotion’s details |
redeemLimitPerClient | number | yes | Redemption limit per customer |
redeemQuantityPerActivation | number | yes | Redemption quantity per activation |
currentRedeemedQuantity | number | no | Current redemption quantity |
currentRedeemLimit | number | no | Current redemption limit |
activationCounter | number | no | Promotion’s activation counter |
possibleRedeems | number | no | Maximum number of promotion redemptions |
requireRedeemedPoints | number | yes | Required redeemed points |
discountType | PromotionDiscountType | yes | Discount type |
discountValue | number | no | Discount value |
discountMode | PromotionDiscountMode | no | Discount mode |
discountModeDetails | PromotionDiscountModeDetails | yes | Discount mode details |
priority | number | no | Promotion’s priority |
price | number | no | Item price |
itemScope | PromotionItemScope | no | Promotion’s item scope |
minBasketValue | number | yes | Minimum basket value |
maxBasketValue | number | yes | Maximum basket value |
name | string | no | Promotion’s name |
headline | string | yes | Promotion’s headline |
descriptionText | string | yes | Promotion’s description |
images | [Array |
yes | List of promotion images |
startAt | Date | yes | Start time of a promotion |
expireAt | Date | yes | Expiration time of the promotion |
lastingAt | Date | yes | How long the promotion lasts |
lastingTime | number | yes | Duration of the promotion in seconds |
displayFrom | string | yes | Date as a string when the promotion starts being displayed |
displayTo | string | yes | Date as a string when the promotions ends being displayed |
catalogIndexItems | Array |
yes | List of item indexes |
params | object | yes | Promotion’s custom parameters |
tags | Array | yes | Promotion’s custom tags |
PromotionStatus
Declared In:
lib/classes/models/Promotions/PromotionStatus.js
Related To:
Promotion
Declaration:
enum PromotionStatus {
None = 'NONE',
Active = 'ACTIVE',
Assigned = 'ASSIGNED',
Redeemed = 'REDEEMED',
}
Functions:
Converts from PromotionStatus to string.
function PromotionStatusToString(promotionStatus: PromotionStatus): string
Converts from string to PromotionStatus.
function PromotionStatusFromString(string: string): PromotionStatus
PromotionType
Declared In:
lib/classes/models/Promotions/PromotionType.js
Related To:
Promotion
Declaration:
enum PromotionType {
Unknown = 'UNKNOWN',
MembersOnly = 'MEMBERS_ONLY',
Custom = 'CUSTOM',
General = 'GENERAL',
}
Functions:
Converts from PromotionType to string.
function PromotionTypeToString(promotionType: PromotionType): string
Converts from string to PromotionType.
function PromotionTypeFromString(string: string): PromotionType
PromotionDiscountType
Declared In:
lib/classes/models/Promotions/PromotionDiscountType.js
Related To:
Promotion
Declaration:
enum PromotionDiscountType {
None = 'NONE',
Percent = 'PERCENT',
Amount = 'AMOUNT',
TwoForOne = '2_FOR_1',
Points = 'POINTS',
Multibuy = 'MULTIBUY',
}
Functions:
Converts from PromotionDiscountType to string.
function PromotionDiscountTypeToString(promotionDiscountType: PromotionDiscountType): string
Converts from string to PromotionDiscountType.
function PromotionDiscountTypeFromString(string: string): PromotionDiscountType
AssignVoucherResponse
Declared In:
lib/classes/models/Vouchers/AssignVoucherResponse.js
Related To:
AssignVoucherData
Inherits From:
BaseModel
Declaration:
class AssignVoucherResponse extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
message | string | no | Message from the Voucher assignment response |
assignVoucherData | AssignVoucherData | yes | List of vouchers in a pool |
AssignVoucherData
Declared In:
lib/classes/models/Vouchers/AssignVoucherData.js
Related To:
AssignVoucherResponse
Inherits From:
BaseModel
Declaration:
class AssignVoucherData extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
code | string | no | Voucher’s code |
expireIn | Date | yes | Voucher’s expiration date |
redeemAt | Date | yes | Voucher’s redeem date |
assignedAt | Date | yes | Voucher’s assignment date |
createdAt | Date | no | Voucher’s creation date |
updatedAt | Date | no | Voucher’s update date |
VoucherCodesResponse
Declared In:
lib/classes/models/Vouchers/VoucherCodesResponse.js
Related To:
VoucherCodesData
Inherits From:
BaseModel
Declaration:
class VoucherCodesResponse extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
items | Array<VoucherCodesData> | no | List of voucher items |
VoucherCodesData
Declared In:
lib/classes/models/Vouchers/VoucherCodesData.js
Inherits From:
BaseModel
Declaration:
class VoucherCodesData extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
code | string | no | Voucher’s code |
status | VoucherCodeStatus | no | Voucher’s status |
clientId | string | no | ID of the customer to whom the voucher is assigned |
clientUuid | string | no | UUID of the customer to whom the voucher is assigned |
poolUuid | string | no | Voucher’s pool ID |
expireIn | string | no | Voucher’s expiration date |
redeemAt | Date | no | Voucher’s redemption date |
assignedAt | Date | no | Voucher’s assignment date |
createdAt | Date | no | Voucher’s creation date |
updatedAt | Date | no | Voucher’s update date |
VoucherCodeStatus
Declared In:
lib/classes/models/Vouchers/VoucherCodeStatus.js
Declaration:
enum VoucherCodeStatus {
Unassigned = 'UNASSIGNED',
Assigned = 'ASSIGNED',
Redeemed = 'REDEEMED',
Canceled = 'CANCELED',
}
Functions:
Converts from VoucherCodeStatus to string.
function VoucherCodeStatusToString(voucherCodeStatus: VoucherCodeStatus): string
Converts from string to VoucherCodeStatus.
function VoucherCodeStatusFromString(string: string): VoucherCodeStatus
RecommendationResponse
Declared In:
lib/classes/content/RecommendationResponse.js
Related To:
Recommendation
Inherits From:
BaseModel
Declaration:
class RecommendationResponse extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
name | string | no | Recommendation’s name |
campaignHash | string | no | Campaign hash |
campaignID | string | no | Campaign ID |
items | Array |
no | List of items in the recommendation |
Recommendation
Model representating a recommendation item data.
Declared In:
lib/classes/Content/Recommendation.js
Related To:
RecommendationResponse
Inherits From:
BaseModel
Declaration:
class Recommendation extends BaseModel
Properties:
Property | Type | Optional | Description |
---|---|---|---|
itemID | string | no | Product’s GTIN |
attributes | Record<string, any> | no | Product’s recommendation attributes |
ScreenViewResponse
Model representing a highest-priority customer screen view campaign.
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 | Screen view’s path |
name | string | no | Screen view’s name |
priority | number | no | Screen view’s priority |
descriptionText | string | yes | Screen view’s description |
data | object | no | Screen view’s data |
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.
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 |