1- import { isEmpty , replaceAmpWithAmpersand , replaceMPID } from './utils' ;
1+ import { Dictionary , isEmpty , replaceAmpWithAmpersand , replaceMPID } from './utils' ;
22import Constants from './constants' ;
3- import { CookieSyncDates , ICookieSyncManager , IPixelConfiguration } from './cookieSyncManager.interfaces' ;
43import { MParticleWebSDK } from './sdkRuntimeModels' ;
54import { MPID } from '@mparticle/web-sdk' ;
65import { IConsentRules } from './consent' ;
@@ -10,6 +9,42 @@ const { InformationMessages } = Messages;
109
1110export const DAYS_IN_MILLISECONDS = 1000 * 60 * 60 * 24 ;
1211
12+ export type CookieSyncDates = Dictionary < number > ;
13+
14+ export interface IPixelConfiguration {
15+ name ?: string ;
16+ moduleId : number ;
17+ esId ?: number ;
18+ isDebug ?: boolean ;
19+ isProduction ?: boolean ;
20+ settings : Dictionary < string > ;
21+ frequencyCap : number ;
22+ pixelUrl : string ;
23+ redirectUrl : string ;
24+ filteringConsentRuleValues ?: IConsentRules ;
25+ }
26+ export interface ICookieSyncManager {
27+ attemptCookieSync : (
28+ previousMPID : MPID ,
29+ mpid : MPID ,
30+ mpidIsNotInCookies ?: boolean
31+ ) => void ;
32+ performCookieSync : (
33+ url : string ,
34+ moduleId : string ,
35+ mpid : MPID ,
36+ cookieSyncDates : CookieSyncDates ,
37+ filteringConsentRuleValues : IConsentRules ,
38+ mpidIsNotInCookies : boolean ,
39+ requiresConsent : boolean
40+ ) => void ;
41+ combineUrlWithRedirect : (
42+ mpid : MPID ,
43+ pixelUrl : string ,
44+ redirectUrl : string
45+ ) => string ;
46+ }
47+
1348const hasFrequencyCapExpired = (
1449 frequencyCap : number ,
1550 lastSyncDate ?: number ,
0 commit comments