import type { BaseResourceParamType } from '../models/mp-client-sdk'; export class Constants { static PLACEHOLDER_REGEX = new RegExp(/({{)([A-Z_0-9 -]+)(}})/gi); static MP_DL_EVT = 'mp_dl_event'; static CUST_EVT = 'custom_event'; // Tag Report - Status Constants static ST_OK = 200; // tag fired successfully static ST_VAL_FAIL = 400; // tag validation failed - meaning one of the items marked as mandatory was found empty static ST_ERR = 500; // tag was ok, but provider side failure. may be url is constructed wrong, or provider is down static ST_DEP_FAIL = 1000; // processing tag dependencies failed - may be missing parameters or attributes static ST_PR_BL = 1002; // provider is black listed in the data governance screen static ST_PR_EXC = 1001; // tag was found, but no provider was bundled. SDK build issue. Report with high importance static PR_TYP_JS = 'js'; static PR_TYP_IMG = 'img'; static PR_TYP_APP = 'app'; static PR_S_TYP_R = 'r'; static sortAscending = ( a: BaseResourceParamType, b: BaseResourceParamType ): number => (a.o > b.o ? 1 : -1); // this data structure is returned by the api and stored in this key // {"dId":"VNiBG7JNfoGAyvqxhxMqd","mId":"JW0FRrCtAj9K7uyNmL1ht","st":0} static KEY_MP_IDL_VISITOR_ID_INFO = 'mp_idl_visitor_info'; // visitor info data structure // {"visitId": "123123sdfsf", "visitCt": 1, "visitDepth": 1, visitVer: 1} static KEY_MP_IDL_VISIT_ID_INFO = 'mp_idl_visit_info'; static KEY_MP_DEBUG_ID = 'mp_debug_id'; static KEY_FBP = 'KEY_FBP'; static KEY_FIRST_OPEN = 'KEY_FOPEN'; } export const MP_VISIT_ID_COOKIE = 'mp_visit_id';