Skip to content

Commit

Permalink
Update customerPrivacy.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
andershagbard committed Sep 29, 2023
1 parent 45b3027 commit 2a56494
Showing 1 changed file with 42 additions and 13 deletions.
55 changes: 42 additions & 13 deletions global/modules/customerPrivacy.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,44 @@
type YesNo = '' | 'yes' | 'no';

export default interface CustomerPrivacy {
getCCPAConsent(): string
getRegulation(): string
getShopPrefs(): {
limit: string[]
}
getTrackingConsent(): string
isRegulationEnforced(): boolean
setCCPAConsent(consented: boolean, callback: CallableFunction): void
setTrackingConsent(consented: boolean, callback: CallableFunction): void
shouldShowCCPABanner(): boolean
shouldShowGDPRBanner(): boolean
userCanBeTracked(): boolean
userDataCanBeSold(): boolean
analyticsProcessingAllowed(): boolean;
currentVisitorConsent(): {
marketing: YesNo;
analytics: YesNo;
preferences: YesNo;
sale_of_data: YesNo;
gpc: YesNo;
};
doesMerchantSupportGranularConsent(): boolean;
firstPartyMarketingAllowed(): boolean;
getCCPAConsent(): YesNo;
getRegulation(): string;
getShopPrefs(): { limit: Array<string> };
getTrackingConsent(): YesNo;
isRegulationEnforced(): boolean;
preferencesProcessingAllowed(): boolean;
saleOfDataRegion(): boolean;
setCCPAConsent(consent: boolean, callback: () => void): void;
setTrackingConsent(
consent: {
analytics?: boolean;
marketing?: boolean;
preferences?: boolean;
sale_of_data?: boolean;
},
callback: () => void,
): void;
shouldShowBanner(): boolean;
thirdPartyMarketingAllowed(): boolean;

/** @deprecated Use consent as an object instead */
setTrackingConsent(consent: boolean, callback: () => void): void;
/** @deprecated Use saleOfDataRegion instead */
shouldShowCCPABanner(): boolean;
/** @deprecated Use shouldShowBanner instead */
shouldShowGDPRBanner(): boolean;
/** @deprecated */
userCanBeTracked(): boolean;
/** @deprecated */
userDataCanBeSold(): boolean;
}

0 comments on commit 2a56494

Please sign in to comment.