cookie-consent/src/types.js
Pdn Technology 9a001197e1
Some checks are pending
CI / test (20) (push) Waiting to run
CI / test (22) (push) Waiting to run
Tema ayarları eklendi
2026-06-20 08:58:11 +03:00

47 lines
1.2 KiB
JavaScript

/**
* @typedef {Object} UserConsent
* @property {boolean} analytics
* @property {boolean} marketing
*/
/**
* @typedef {Object} RegionDefault
* @property {string[]} regions
* @property {"granted"|"denied"} [ad_storage]
* @property {"granted"|"denied"} [analytics_storage]
* @property {"granted"|"denied"} [ad_user_data]
* @property {"granted"|"denied"} [ad_personalization]
* @property {"granted"|"denied"} [functionality_storage]
* @property {"granted"|"denied"} [personalization_storage]
* @property {"granted"|"denied"} [security_storage]
*/
/**
* @typedef {Object} ConsentConfig
* @property {string} [storageKey]
* @property {number} [waitForUpdateMs]
* @property {boolean} [adsDataRedaction]
* @property {boolean} [urlPassthrough]
* @property {RegionDefault[]} [regionDefaults]
* @property {boolean} [debug]
* @property {(error: { reason: string, detail?: unknown }) => void} [onStorageError]
*/
/**
* @typedef {Object} ConsentResult
* @property {true} ok
* @property {UserConsent} consent
*/
/**
* @typedef {Object} ConsentError
* @property {false} ok
* @property {"invalid"|"storage"} reason
*/
/**
* @typedef {ConsentResult|ConsentError} PersistResult
*/
export {};