UNPKG

c15t

Version:

<div align="center"> <img src="https://c15t.com/logo-icon.png" alt="c15t Logo" width="64" height="64" /> <h1>c15t</h1> <p>Transform privacy consent from a compliance checkbox into a fully observable system</p>

142 lines 4.19 kB
/** * @packageDocumentation * Central export point for all consent management types and interfaces. * This module aggregates and re-exports all type definitions needed for implementing * GDPR-compliant consent management. */ /** * @module * Compliance and Privacy Types * * @remarks * Exports types related to privacy compliance and consent management: * - Region-specific compliance settings * - Consent state tracking * - Privacy preferences * - Namespace configuration * * @example * Import compliance-related types: * ```typescript * import type { * ComplianceRegion, * ComplianceSettings, * PrivacySettings * } from 'c15t/types'; * * const euSettings: ComplianceSettings = { * enabled: true, * appliesGlobally: false, * applies: true * }; * * const region: ComplianceRegion = 'gdpr'; * ``` */ export type { ComplianceRegion, ComplianceSettings, ConsentBannerResponse, ConsentState, HasConsentedProps, JurisdictionInfo, LocationInfo, NamespaceProps, PrivacySettings, } from './types/compliance'; export type { GTMConfiguration } from './libs/gtm'; /** * @module * API Endpoints * * @remarks * Exports the API endpoints for the consent management system. */ export { API_ENDPOINTS } from './client/types'; /** * @module * GDPR Consent Types * * @remarks * Exports types and constants for GDPR-specific consent management: * - Consent category definitions * - Consent type configurations * - Predefined consent settings * * @example * Import and use GDPR-related types: * ```typescript * import { * type AllConsentNames, * type ConsentType, * consentTypes * } from 'c15t/types'; * * function isOptionalConsent(type: AllConsentNames): boolean { * const config = consentTypes.find(c => c.name === type); * return config ? !config.disabled && !config.defaultValue : false; * } * ``` */ export { type AllConsentNames, type ConsentType, consentTypes, } from './types/gdpr'; /** * @module * Callback Types * * @remarks * Exports types for consent management callbacks and event handlers: * - Generic callback function type * - Consent-specific callback configurations * * @example * Import and use callback types: * ```typescript * import type { * CallbackFunction, * Callbacks * } from 'c15t/types'; * * const callbacks: Callbacks = { * onConsentGiven: () => { * console.log('Consent granted'); * initializeAnalytics(); * }, * onError: (error) => { * console.error('Consent error:', error); * } * }; * ``` * * @example * Create typed callback functions: * ```typescript * const errorHandler: CallbackFunction<string> = * (message) => console.error(message); * * const readyHandler: CallbackFunction = * () => console.log('System ready'); * ``` */ export type { CallbackFunction, Callbacks } from './types/callbacks'; /** * @module * Translation Types * * @remarks * Exports types for translation configuration and translations: * - Translation configuration * - Translation types * - Cookie banner translations * - Consent manager dialog translations * - Consent manager widget translations */ export type { ConsentManagerDialogTranslations, CommonTranslations, ConsentTypeTranslations, ConsentTypesTranslations, CookieBannerTranslations, TranslationConfig, Translations, } from '@c15t/translations'; /** * @module * Client Types * * @remarks * Export client types and implementations */ export * from './client'; export type { FetchOptions, ResponseContext, } from './client/types'; export * from './types/compliance'; export { createConsentManagerStore } from './store'; export type { StoreConfig, StoreOptions } from './store'; export type { PrivacyConsentState } from './store.type'; export { createTrackingBlocker } from './libs/tracking-blocker'; export type { TrackingBlockerConfig } from './libs/tracking-blocker'; export { defaultTranslationConfig } from './translations'; export { deepMergeTranslations, mergeTranslationConfigs, detectBrowserLanguage, prepareTranslationConfig, } from '@c15t/translations'; export type { ContractsInputs, ContractsOutputs } from '@c15t/backend'; //# sourceMappingURL=index.d.ts.map