-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Migrate CookieSyncManager to TypeScript (#944)
- Loading branch information
1 parent
d019fe0
commit b6883b6
Showing
13 changed files
with
953 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
import { MPID } from "@mparticle/web-sdk"; | ||
import { Dictionary } from "./utils"; | ||
import { IConsentRules } from "./consent"; | ||
import { MPID } from '@mparticle/web-sdk'; | ||
import { Dictionary } from './utils'; | ||
import { IConsentRules } from './consent'; | ||
|
||
export type CookieSyncDates = Dictionary<number>; | ||
|
||
export interface IPixelConfiguration { | ||
name?: string; | ||
moduleId: number; | ||
esId?: number; | ||
isDebug?: boolean; | ||
isProduction?: boolean; | ||
settings: Dictionary<string>; | ||
frequencyCap: number; | ||
pixelUrl: string; | ||
redirectUrl: string; | ||
filteringConsentRuleValues?: IConsentRules; | ||
} | ||
export interface ICookieSyncManager { | ||
attemptCookieSync: (previousMPID: MPID, mpid: MPID, mpidIsNotInCookies: boolean) => void; | ||
attemptCookieSync: ( | ||
previousMPID: MPID, | ||
mpid: MPID, | ||
mpidIsNotInCookies?: boolean | ||
) => void; | ||
performCookieSync: ( | ||
url: string, | ||
moduleId: number, | ||
moduleId: string, | ||
mpid: MPID, | ||
cookieSyncDates: Dictionary<number>, | ||
cookieSyncDates: CookieSyncDates, | ||
filteringConsentRuleValues: IConsentRules, | ||
mpidIsNotInCookies: boolean, | ||
requiresConsent: boolean | ||
) => void; | ||
replaceAmpWithAmpersand: (string: string) => string; | ||
replaceMPID: (string: string, mpid: MPID) => string; | ||
|
||
/** | ||
* @deprecated replaceAmp has been deprecated, use replaceAmpersandWithAmp instead | ||
*/ | ||
replaceAmp: (string: string) => string; | ||
} | ||
combineUrlWithRedirect: ( | ||
mpid: MPID, | ||
pixelUrl: string, | ||
redirectUrl: string | ||
) => string; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.