@transcend-io/airgap.js-types
Advanced tools
Comparing version 11.0.0 to 12.0.0
@@ -190,2 +190,4 @@ import * as t from 'io-ts'; | ||
export type CookieWatcher = (event: IPendingCookieMutation) => void; | ||
/** Event types (for purpose resolution) */ | ||
export type TrackingEventType = 'request' | 'cookie'; | ||
/** airgap.js API */ | ||
@@ -210,2 +212,11 @@ export type AirgapAPI = Readonly<{ | ||
resolve(url: Stringifiable, resolveOverrides?: boolean): Stringifiable; | ||
/** | ||
* Resolve consent status for given tracking purposes. Essential purposes override opted out unessential purposes. | ||
* | ||
* If `use` is not provided, consent is resolved for both request and cookie tracking event types. | ||
* @param trackingPurposes - Tracking purposes to resolve | ||
* @param use - Optional event type to use for tracking purpose resolution | ||
* @returns `true` if the applicable tracking purposes are consented. | ||
*/ | ||
isConsented(trackingPurposes: TrackingPurposes, use?: TrackingEventType): boolean; | ||
/** Get tracking consent */ | ||
@@ -212,0 +223,0 @@ getConsent(): TrackingConsentDetails; |
@@ -190,2 +190,4 @@ import * as t from 'io-ts'; | ||
export type CookieWatcher = (event: IPendingCookieMutation) => void; | ||
/** Event types (for purpose resolution) */ | ||
export type TrackingEventType = 'request' | 'cookie'; | ||
/** airgap.js API */ | ||
@@ -210,2 +212,11 @@ export type AirgapAPI = Readonly<{ | ||
resolve(url: Stringifiable, resolveOverrides?: boolean): Stringifiable; | ||
/** | ||
* Resolve consent status for given tracking purposes. Essential purposes override opted out unessential purposes. | ||
* | ||
* If `use` is not provided, consent is resolved for both request and cookie tracking event types. | ||
* @param trackingPurposes - Tracking purposes to resolve | ||
* @param use - Optional event type to use for tracking purpose resolution | ||
* @returns `true` if the applicable tracking purposes are consented. | ||
*/ | ||
isConsented(trackingPurposes: TrackingPurposes, use?: TrackingEventType): boolean; | ||
/** Get tracking consent */ | ||
@@ -212,0 +223,0 @@ getConsent(): TrackingConsentDetails; |
@@ -5,3 +5,3 @@ { | ||
"description": "TypeScript types for airgap.js interoperability with custom consent UIs", | ||
"version": "11.0.0", | ||
"version": "12.0.0", | ||
"homepage": "https://github.com/transcend-io/airgap.js-types", | ||
@@ -8,0 +8,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
445076
7624