import { ConsentCategoryPreferences } from "../../domain/consent"; /** * Google Consent Mode v2 consent signals. * Values can be 'granted', 'denied', or boolean. * @see https://developers.google.com/tag-platform/security/guides/consent */ export type GoogleConsentV2 = { /** Controls storage (such as cookies) related to advertising */ ad_storage?: 'granted' | 'denied' | boolean; /** Controls whether user data can be sent to Google for advertising purposes */ ad_user_data?: 'granted' | 'denied' | boolean; /** Controls personalized advertising */ ad_personalization?: 'granted' | 'denied' | boolean; /** Controls storage (such as cookies) related to analytics */ analytics_storage?: 'granted' | 'denied' | boolean; /** Controls storage related to functionality (e.g., language settings) */ functionality_storage?: 'granted' | 'denied' | boolean; /** Controls storage related to personalization (e.g., video recommendations) */ personalization_storage?: 'granted' | 'denied' | boolean; /** Controls storage related to security (e.g., authentication, fraud prevention) */ security_storage?: 'granted' | 'denied' | boolean; }; /** * Converts Google Consent Mode v2 signals to Journify CategoryPreferences. * * Mapping: * - advertising: ad_storage AND ad_user_data AND ad_personalization (all three must be granted) * - analytics: analytics_storage * - functional: functionality_storage * - marketing: ad_storage * - personalization: personalization_storage * * @example * ```TypeScript * import { fromGoogleConsentV2 } from 'journify'; * * journify.updateConsent(fromGoogleConsentV2({ * ad_storage: 'granted', * ad_user_data: 'granted', * ad_personalization: 'granted', * analytics_storage: 'denied', * functionality_storage: 'granted' * })); * ``` */ export declare function fromGoogleConsentV2(googleConsent: GoogleConsentV2): ConsentCategoryPreferences;