import { AirgapAuth, AirgapAuthMap } from "./core.mjs"; import { ViewState } from "./enums/viewState.mjs"; import { ObjByString } from "@transcend-io/type-utils"; import * as t from "io-ts"; import { ConsentManagerSupportedTranslationValue, LocaleValue } from "@transcend-io/internationalization"; //#region src/ui.d.ts /** Transcend Smart Quarantine API (window.transcend) */ type PreInitTranscendAPI = { /** Ready event subscriber */ready(callback: (transcend: TranscendAPI) => void): void; /** Ready event dispatch queue */ readyQueue: ((transcend: TranscendAPI) => void)[]; }; /** showConsentManager() */ interface ShowConsentManagerOptions { /** View state */ viewState?: ViewState; } /** * Input for fetching a policy from Transcend and inserting template variables */ type GetTranscendPolicies = { /** The language to fetch policy for - defaults to currently selected language key */locale?: LocaleValue; /** Template variables to dynamically inject into the policy */ variables?: ObjByString; /** * The UUID of the policies defined in Transcend to fetch * * This can be pulled from the URL * @see https://app.transcend.io/privacy-center/policies */ policyIds?: string[]; /** * The titles of the policies defined in Transcend to fetch * * This can be pulled from the URL * @see https://app.transcend.io/privacy-center/policies */ policyTitles?: string[]; }; /** * The returning Transcend policy */ type TranscendPolicy = { /** The policy UUID */id: string; /** The policy title */ title: string; /** The policy content */ content: string; }; /** * Transcend Consent Manager external methods */ type ConsentManagerAPI = Readonly<{ /** Possible ViewState values */viewStates: Set; /** Expose an option to grab the current view state */ getViewState: () => ViewState; /** Get the current active language */ getPolicies: (input?: GetTranscendPolicies) => Promise; /** Callback that sets any dynamic variables that should be exposed to the consent UI messages */ setUiVariables: (variables: ObjByString) => Promise; /** Get the current value of Transcend UI variables */ getUiVariables: () => ObjByString; /** Set consent change authorization key */ setAuth?: (key: AirgapAuthMap['key']) => void; /** Change the current privacy policy URL */ setPrivacyPolicy: (privacyPolicyLink: string) => void; /** Change the current secondary policy URL */ setSecondaryPolicy: (privacyPolicyLink: string) => void; /** Show consent manager unless recently dismissed */ autoShowConsentManager(options?: ShowConsentManagerOptions): Promise; /** Show consent manager */ showConsentManager(options?: ShowConsentManagerOptions): Promise; /** Set the current active language */ setActiveLocale(locale: ConsentManagerSupportedTranslationValue): Promise; /** Get the currently active locale */ getActiveLocale: () => ConsentManagerSupportedTranslationValue; /** Toggle consent manager */ toggleConsentManager(options?: ShowConsentManagerOptions): Promise; /** Hide consent manager */ hideConsentManager(): Promise; /** Opt out of the sale of personal info & show a disclosure */ doNotSell(auth: AirgapAuth, options?: ShowConsentManagerOptions): Promise; /** Opt out of all purposes */ optOutNotice(auth: AirgapAuth, options?: ShowConsentManagerOptions): Promise; /** Sets local tcf string (does not sync to xdi or preference store) */ setTCFConsent?: (auth: AirgapAuth, tcString: string) => Promise; /** UI version */ version?: string; }> & EventTarget; /** * `transcend` event types */ type TranscendEventType = 'view-state-change'; /** 'view-state-change' custom event details */ type ViewStateEventDetails = { /** The new, now-current view state */viewState: ViewState; /** The previous view state */ previousViewState: ViewState | null; }; /** Transcend Smart Quarantine API (window.transcend) */ type TranscendAPI = PreInitTranscendAPI & ConsentManagerAPI; /** * Customer theming */ declare const ConsentManagerTheme: t.TypeC<{ /** Primary color */primaryColor: t.StringC; /** Font color */ fontColor: t.StringC; }>; /** Type override */ type ConsentManagerTheme = t.TypeOf; /** * Mobile-first responsive breakpoints * No media query for mobile, which is the default */ declare const ConsentManagerBreakpoints: t.TypeC<{ /** In px, at or above this width is tablet */tablet: t.StringC; /** In px, at or above this width is desktop */ desktop: t.StringC; }>; /** Type override */ type ConsentManagerBreakpoints = t.TypeOf; /** * TODO: https://transcend.height.app/T-19149 - remove * @deprecated */ declare const PrivacyRegimeToInitialViewStateInput: t.PartialC<{ Unknown: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; CPRA: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; GDPR: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; LGPD: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; CDPA: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; CPA: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; NEVADA_SB220: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; nFADP: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; US_DNSS: t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>; }>; /** * TODO: https://transcend.height.app/T-19149 - remove * @deprecated */ type PrivacyRegimeToInitialViewStateInput = t.TypeOf; /** * TODO: https://transcend.height.app/T-19149 - remove * @deprecated */ declare const PrivacyRegimeToInitialViewState: t.RecordC, t.KeyofC<{ QuickOptions: unknown; QuickOptions3: unknown; AcceptAll: unknown; AcceptAllRejectAllToggle: unknown; AcceptAllOrMoreChoices: unknown; AcceptOrRejectAll: unknown; AcceptOrRejectAllOrMoreChoices: unknown; AcceptOrRejectAnalytics: unknown; AcceptOrRejectAdvertising: unknown; NoticeAndDoNotSell: unknown; DoNotSellExplainer: unknown; CompleteOptionsToggles: unknown; PrivacyPolicyNotice: unknown; PrivacyPolicyNoticeWithCloseButton: unknown; CompleteOptions: unknown; CompleteOptionsInverted: unknown; Hidden: unknown; }>>; /** * TODO: https://transcend.height.app/T-19149 - remove * @deprecated */ type PrivacyRegimeToInitialViewState = t.TypeOf; declare const ExperienceToInitialViewState: t.RecordC>; /** type overload */ type ExperienceToInitialViewState = t.TypeOf; declare const RequiredConsentManagerConfig: t.TypeC<{ /** Customer theming */theme: t.TypeC<{ /** Primary color */primaryColor: t.StringC; /** Font color */ fontColor: t.StringC; }>; /** A set of responsive breakpoints */ breakpoints: t.TypeC<{ /** In px, at or above this width is tablet */tablet: t.StringC; /** In px, at or above this width is desktop */ desktop: t.StringC; }>; /** The privacy policy URL to redirect to */ privacyPolicy: t.StringC; /** The secondary policy URL to redirect to */ secondaryPolicy: t.StringC; /** Custom CSS stylesheet */ css: t.StringC; /** Path to localizations directory */ messages: t.StringC; /** What state the consent manager should launch in */ initialViewStateByPrivacyRegime: t.RecordC>; /** What state the consent manager should go to when dismissed */ dismissedViewState: t.KeyofC<{ Collapsed: unknown; Closed: unknown; }>; }>; /** type overload */ type RequiredConsentManagerConfig = t.TypeOf; declare const OptionalConsentManagerConfig: t.PartialC<{ /** The set of enabled languages - CSV of ConsentManagerSupportedTranslationValue */languages: t.StringC; /** The override value for the consent banner z-index */ uiZIndex: t.StringC; /** * The override value for the consent banner shadow root state * * Potential values: 'closed' (default) and 'open' */ uiShadowRoot: t.StringC; /** * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute * Potential values: `'on'` (default) or `'off'` * */ autofocus: t.KeyofC<{ on: null; off: null; }>; }>; /** type overload */ type OptionalConsentManagerConfig = t.TypeOf; /** Consent manager UI configuration */ declare const ConsentManagerConfig: t.IntersectionC<[t.TypeC<{ /** Customer theming */theme: t.TypeC<{ /** Primary color */primaryColor: t.StringC; /** Font color */ fontColor: t.StringC; }>; /** A set of responsive breakpoints */ breakpoints: t.TypeC<{ /** In px, at or above this width is tablet */tablet: t.StringC; /** In px, at or above this width is desktop */ desktop: t.StringC; }>; /** The privacy policy URL to redirect to */ privacyPolicy: t.StringC; /** The secondary policy URL to redirect to */ secondaryPolicy: t.StringC; /** Custom CSS stylesheet */ css: t.StringC; /** Path to localizations directory */ messages: t.StringC; /** What state the consent manager should launch in */ initialViewStateByPrivacyRegime: t.RecordC>; /** What state the consent manager should go to when dismissed */ dismissedViewState: t.KeyofC<{ Collapsed: unknown; Closed: unknown; }>; }>, t.PartialC<{ /** The set of enabled languages - CSV of ConsentManagerSupportedTranslationValue */languages: t.StringC; /** The override value for the consent banner z-index */ uiZIndex: t.StringC; /** * The override value for the consent banner shadow root state * * Potential values: 'closed' (default) and 'open' */ uiShadowRoot: t.StringC; /** * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute * Potential values: `'on'` (default) or `'off'` * */ autofocus: t.KeyofC<{ on: null; off: null; }>; }>]>; /** Type override */ type ConsentManagerConfig = t.TypeOf; /** Input for Consent manager UI configuration */ declare const ConsentManagerConfigInput: t.PartialC<{ /** Customer theming */theme: t.TypeC<{ /** Primary color */primaryColor: t.StringC; /** Font color */ fontColor: t.StringC; }>; /** A set of responsive breakpoints */ breakpoints: t.TypeC<{ /** In px, at or above this width is tablet */tablet: t.StringC; /** In px, at or above this width is desktop */ desktop: t.StringC; }>; /** The privacy policy URL to redirect to */ privacyPolicy: t.StringC; /** The secondary policy URL to redirect to */ secondaryPolicy: t.StringC; /** Custom CSS stylesheet */ css: t.StringC; /** Path to localizations directory */ messages: t.StringC; /** What state the consent manager should launch in */ initialViewStateByPrivacyRegime: t.RecordC>; /** What state the consent manager should go to when dismissed */ dismissedViewState: t.KeyofC<{ Collapsed: unknown; Closed: unknown; }>; /** The set of enabled languages - CSV of ConsentManagerSupportedTranslationValue */ languages: t.StringC; /** The override value for the consent banner z-index */ uiZIndex: t.StringC; /** * The override value for the consent banner shadow root state * * Potential values: 'closed' (default) and 'open' */ uiShadowRoot: t.StringC; /** * The override value for whether to focus on the first descendant of the root arg w/data-initialFocus attribute * Potential values: `'on'` (default) or `'off'` * */ autofocus: t.KeyofC<{ on: null; off: null; }>; }>; /** Type override */ type ConsentManagerConfigInput = t.TypeOf; declare const TCFConfig: t.TypeC<{ /** Path to vendor-list.json */vendorList: t.StringC; /** Custom CSS stylesheet */ css: t.StringC; /** Path to localizations directory */ messages: t.StringC; }>; /** Type override */ type TCFConfig = t.TypeOf; /** Configuration that are passed directly to the TCF module, not via airgap.j */ declare const TCFBundledDataConfig: t.PartialC<{ /** Mapping of TCF Purpose ID to airgap tracking types */purposeMap: t.ArrayC]>>; /** These TCF purposes cannot be processed on the basis of legitimate interests */ restrictLegitimateInterestPurposes: t.ArrayC; /** Vendors that Transcend Consent regulates because they haven't registered with IAB TCF */ nonTcfVendors: t.ArrayC; }>, t.PartialC<{ description: t.StringC; privacyPolicyUrl: t.StringC; additionalConsentProviderId: t.NumberC; }>]>>; /** Comma separated list of languages to support in the UI */ languages: t.StringC; /** Default locale to use for the UI internationalization */ locale: t.StringC; /** * Whether or not to enable integration between Google Consent Mode and TCF. * More docs here https://developers.google.com/tag-platform/security/guides/implement-TCF-strings#cmp-api */ enableAdvertiserConsentMode: t.BooleanC; }>; /** Type override */ type TCFBundledDataConfig = t.TypeOf; /** Input for Consent manager UI configuration */ declare const TCFConfigInput: t.PartialC<{ /** Path to vendor-list.json */vendorList: t.StringC; /** Custom CSS stylesheet */ css: t.StringC; /** Path to localizations directory */ messages: t.StringC; }>; /** Type override */ type TCFConfigInput = t.TypeOf; /** * Properties exposed on `self` by the Transcend Smart Quarantine */ type TranscendView = Window & { /** Transcend Smart Quarantine API */transcend: TranscendAPI; }; declare const DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME: ExperienceToInitialViewState; //#endregion export { ConsentManagerAPI, ConsentManagerBreakpoints, ConsentManagerConfig, ConsentManagerConfigInput, ConsentManagerTheme, DEFAULT_VIEW_STATE_BY_PRIVACY_REGIME, ExperienceToInitialViewState, GetTranscendPolicies, OptionalConsentManagerConfig, PreInitTranscendAPI, PrivacyRegimeToInitialViewState, PrivacyRegimeToInitialViewStateInput, RequiredConsentManagerConfig, ShowConsentManagerOptions, TCFBundledDataConfig, TCFConfig, TCFConfigInput, TranscendAPI, TranscendEventType, TranscendPolicy, TranscendView, ViewStateEventDetails }; //# sourceMappingURL=ui.d.mts.map