@luwiostack/cookie-consent 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors.cjs","names":["toConsentVendor","ConsentError","ConsentError","REQUIRED_CATEGORY","isConsentCategoryId"],"sources":["../src/vendors/define-vendor.ts","../src/vendors/google-transfers.ts","../src/vendors/time.ts","../src/vendors/google-ads.ts","../src/vendors/google-analytics.ts","../src/vendors/google-maps.ts","../src/vendors/google-recaptcha.ts","../src/vendors/hotjar.ts","../src/vendors/linkedin-insight.ts","../src/vendors/meta-pixel.ts","../src/vendors/tiktok-pixel.ts","../src/vendors/vimeo.ts","../src/vendors/youtube.ts","../src/vendors/presets.ts","../src/vendors/from-data.ts"],"sourcesContent":["import { ConsentError } from '../errors'\nimport { toConsentVendor } from '../machine-names'\nimport type {\n ConsentCookie,\n ConsentCookieDeclaration,\n ConsentTransfer,\n ConsentTransferDeclaration,\n ConsentVendor,\n} from '../types'\n\nexport interface VendorPresetOptions<Name extends string = string> {\n /**\n * Only these of the preset's cookies — for when your integration doesn't set them all (e.g. no\n * Google Signals). Default: every cookie in the preset. An unknown name is a type error and throws.\n */\n cookies?: readonly Name[]\n /** Your own cookies on top, for anything this vendor sets in your setup that the preset lacks. */\n extra?: readonly ConsentCookieDeclaration[]\n}\n\n/** A ready-made vendor: call it (optionally narrowing or extending its cookies) to get a `ConsentVendor`. */\nexport interface VendorPreset<Name extends string = string> {\n (options?: VendorPresetOptions<Name>): ConsentVendor\n /** The vendor id. */\n readonly id: string\n /** The translation key of its name — its id as a machine name. */\n readonly machine_name: string\n /** Every cookie the preset declares, each with its translation keys. */\n readonly cookies: readonly ConsentCookie[]\n /** Its countries outside the EEA, with their translation keys. */\n readonly transfers?: readonly ConsentTransfer[]\n}\n\nexport interface VendorDefinition<C extends readonly ConsentCookieDeclaration[]> {\n /** Stable id; its machine name (the translation key of its name, and its cookies' prefix) derives from it. */\n id: string\n privacy_policy_url?: string\n /** Its countries outside the EEA; `[]` when the data stays in the EEA. */\n transfers?: readonly ConsentTransferDeclaration[]\n cookies: C\n}\n\n/**\n * Define a reusable vendor preset — how every preset in `@luwiostack/cookie-consent/vendors` is built, and\n * the way to package your own (an in-house widget you use across apps). Cookie names are inferred as\n * literals, so the preset's `cookies` option only accepts names it declares.\n *\n * Translation keys follow the package catalogs: `t(vendor.machine_name)` is the vendor's name and\n * `t(cookie.machine_name)` a cookie's purpose (the vendor's machine name plus the cookie name).\n *\n * @throws {ConsentError} when two cookie names come out as the same machine name.\n */\nexport function defineVendor<const C extends readonly ConsentCookieDeclaration[]>(\n definition: VendorDefinition<C>,\n): VendorPreset<C[number]['name']> {\n const { id, privacy_policy_url, transfers } = definition\n // Resolved once: the machine names, and a clash between two cookie names fails here.\n const { machine_name, cookies, transfers: presented } = toConsentVendor(definition)\n const preset = (options: VendorPresetOptions<C[number]['name']> = {}): ConsentVendor => {\n let picked: readonly ConsentCookie[] = cookies\n if (options.cookies) {\n const known = new Set(cookies.map((c) => c.name))\n for (const name of options.cookies) {\n if (!known.has(name)) {\n throw new ConsentError(\n `Vendor \"${id}\" has no cookie \"${name}\" — use \\`extra\\` to add one.`,\n )\n }\n }\n const wanted = new Set<string>(options.cookies)\n picked = cookies.filter((c) => wanted.has(c.name))\n }\n for (const cookie of (options.extra ?? []) as unknown[]) {\n const name = (cookie as { name?: unknown } | null)?.name\n if (\n typeof cookie !== 'object' ||\n cookie === null ||\n typeof name !== 'string' ||\n name === ''\n ) {\n throw new ConsentError(`Vendor \"${id}\": every extra cookie needs a non-empty name.`)\n }\n }\n return toConsentVendor({\n id,\n ...(privacy_policy_url ? { privacy_policy_url } : {}),\n ...(transfers !== undefined ? { transfers } : {}),\n cookies: [...picked, ...(options.extra ?? [])],\n })\n }\n return Object.assign(preset, {\n id,\n machine_name,\n cookies,\n ...(presented !== undefined ? { transfers: presented } : {}),\n })\n}\n","import type { ConsentTransferDeclaration } from '../types'\n\n// Google's transfers outside the EEA, shared by every Google preset: its data-center countries,\n// the US under Google LLC's DPF certification, the others under adequacy decisions or SCCs.\n// Sources:\n// https://policies.google.com/privacy/frameworks\n// https://datacenters.google/locations/\n// https://www.dataprivacyframework.gov/list (Google LLC: active)\n// https://business.safety.google/controllerterms/\nexport const GOOGLE_TRANSFERS: readonly ConsentTransferDeclaration[] = [\n { country: 'CL', safeguards: ['scc'] },\n { country: 'GB', safeguards: ['adequacy'] },\n { country: 'JP', safeguards: ['adequacy'] },\n { country: 'MY', safeguards: ['scc'] },\n { country: 'SG', safeguards: ['scc'] },\n { country: 'TW', safeguards: ['scc'] },\n { country: 'US', safeguards: ['dpf', 'scc'] },\n { country: 'UY', safeguards: ['adequacy'] },\n]\n","// Lifetimes in the presets are milliseconds, like every duration in @luwiostack/cookie-consent.\nexport const MINUTE = 60 * 1000\nexport const HOUR = 60 * MINUTE\nexport const DAY = 24 * HOUR\n","import { defineVendor } from './define-vendor'\nimport { GOOGLE_TRANSFERS } from './google-transfers'\nimport { DAY, MINUTE } from './time'\n\n// Google Ads — the cookies a standard integration sets for visitors.\n// Sources:\n// https://business.safety.google/adscookies/\n// https://policies.google.com/technologies/cookies\n// Note: IDE is 13 months in the EEA, Switzerland and UK (24 months elsewhere). _gac_* is only set when Google\n// Analytics is linked to Google Ads. Domains from adscookies: _gcl_* / _gac_* on the partner (site's) domain,\n// IDE / test_cookie on doubleclick.net; ar_debug is also set on googleadservices.com and google-analytics.com.\nexport const googleAds = /* @__PURE__ */ defineVendor({\n id: 'google_ads',\n privacy_policy_url: 'https://policies.google.com/privacy',\n transfers: GOOGLE_TRANSFERS,\n cookies: [\n { name: '_gcl_au', category: 'marketing', max_age: 90 * DAY },\n { name: '_gcl_aw', category: 'marketing', max_age: 90 * DAY },\n { name: '_gcl_dc', category: 'marketing', max_age: 90 * DAY },\n { name: '_gac_*', category: 'marketing', max_age: 90 * DAY },\n { name: 'IDE', category: 'marketing', max_age: 390 * DAY, domain: '.doubleclick.net' },\n {\n name: 'test_cookie',\n category: 'marketing',\n max_age: 15 * MINUTE,\n domain: '.doubleclick.net',\n },\n { name: 'ar_debug', category: 'marketing', max_age: 90 * DAY, domain: '.doubleclick.net' },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { GOOGLE_TRANSFERS } from './google-transfers'\nimport { DAY } from './time'\n\n// Google Analytics — the cookies a standard integration sets for visitors.\n// Sources:\n// https://support.google.com/analytics/answer/11397207\n// https://business.safety.google/adscookies/\n// https://policies.google.com/technologies/cookies\n// Note: both cookies are first-party.\nexport const googleAnalytics = /* @__PURE__ */ defineVendor({\n id: 'google_analytics',\n privacy_policy_url: 'https://policies.google.com/privacy',\n transfers: GOOGLE_TRANSFERS,\n cookies: [\n { name: '_ga', category: 'statistics', max_age: 730 * DAY },\n { name: '_ga_*', category: 'statistics', max_age: 730 * DAY },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { GOOGLE_TRANSFERS } from './google-transfers'\nimport { DAY } from './time'\n\n// Google Maps — the cookies a standard integration sets for visitors.\n// Sources:\n// https://policies.google.com/technologies/cookies\n// https://policies.google.com/technologies/cookies/embedded?hl=en\n// https://business.safety.google/adscookies/ (NID on google.com)\n// Note: Google publishes no list for Maps embeds; these are the general google.com cookies from \"How Google\n// uses cookies\". What's set depends on the visitor's existing Google cookies, sign-in and region. AEC's\n// .google.com is observed in www.google.com's Set-Cookie; SOCS's is undocumented, taken as the same.\nexport const googleMaps = /* @__PURE__ */ defineVendor({\n id: 'google_maps',\n privacy_policy_url: 'https://policies.google.com/privacy',\n transfers: GOOGLE_TRANSFERS,\n cookies: [\n { name: 'NID', category: 'marketing', max_age: 180 * DAY, domain: '.google.com' },\n { name: 'AEC', category: 'necessary', max_age: 180 * DAY, domain: '.google.com' },\n { name: 'SOCS', category: 'necessary', max_age: 390 * DAY, domain: '.google.com' },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { GOOGLE_TRANSFERS } from './google-transfers'\nimport { DAY } from './time'\n\n// Google reCAPTCHA — the cookies a standard integration sets for visitors.\n// Sources:\n// https://developers.google.com/recaptcha/docs/faq\n// https://cookiedatabase.org/cookie/google-recaptcha/_grecaptcha/\n// Note: Google documents _GRECAPTCHA's name, purpose and www.google.com domain, not its lifetime; 6 months is\n// from Cookiedatabase.org and matches www.google.com/recaptcha's Set-Cookie.\nexport const googleRecaptcha = /* @__PURE__ */ defineVendor({\n id: 'google_recaptcha',\n privacy_policy_url: 'https://policies.google.com/privacy',\n transfers: GOOGLE_TRANSFERS,\n cookies: [\n { name: '_GRECAPTCHA', category: 'necessary', max_age: 180 * DAY, domain: 'www.google.com' },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { DAY, MINUTE } from './time'\n\n// Hotjar — the cookies a standard integration sets for visitors.\n// Sources:\n// https://help.hotjar.com/hc/en-us/articles/36819973371409-Cookies-Set-by-the-Hotjar-Tracking-Code\n// https://help.hotjar.com/hc/en-us/articles/36820023091089 (hosted in AWS eu-west-1, Ireland)\n// https://contentsquare.com/privacy-center/subprocessors/\n// Note: Short-lived test cookies and two survey cookies are left out. All cookies are first-party. Tracking\n// data stays in the EEA; the UK support affiliate works under intercompany SCCs (US subprocessors serve only\n// User Tests and Interviews, not the tracking code).\nexport const hotjar = /* @__PURE__ */ defineVendor({\n id: 'hotjar',\n privacy_policy_url: 'https://www.hotjar.com/legal/policies/privacy/',\n transfers: [{ country: 'GB', safeguards: ['scc'] }],\n cookies: [\n { name: '_hjSessionUser_*', category: 'statistics', max_age: 365 * DAY },\n { name: '_hjSession_*', category: 'statistics', max_age: 30 * MINUTE },\n { name: '_hjHasCachedUserAttributes', category: 'statistics', max_age: 'session' },\n { name: '_hjUserAttributesHash', category: 'statistics', max_age: 2 * MINUTE },\n {\n name: '_hjUserAttributes',\n category: 'statistics',\n type: 'local_storage',\n max_age: 'persistent',\n },\n { name: 'hjViewportId', category: 'statistics', type: 'session_storage', max_age: 'session' },\n {\n name: 'hjActiveViewportIds',\n category: 'statistics',\n type: 'local_storage',\n max_age: 'session',\n },\n { name: '_hjDonePolls', category: 'statistics', max_age: 365 * DAY },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { DAY } from './time'\n\n// LinkedIn Insight Tag — the cookies a standard integration sets for visitors.\n// Sources:\n// https://www.linkedin.com/legal/l/cookie-table\n// https://www.linkedin.com/legal/privacy-policy\n// https://www.dataprivacyframework.gov/list (LinkedIn Corporation: active)\n// Note: The logged-in-only bscookie and _guid (LinkedIn's own Google Ads) are left out. The cookie table lists\n// ln_or both on the first-party domain and on .linkedin.com; it's taken as first-party, like li_fat_id.\nexport const linkedinInsight = /* @__PURE__ */ defineVendor({\n id: 'linkedin_insight',\n privacy_policy_url: 'https://www.linkedin.com/legal/privacy-policy',\n transfers: [{ country: 'US', safeguards: ['dpf', 'scc'] }],\n cookies: [\n { name: 'li_fat_id', category: 'marketing', max_age: 30 * DAY },\n { name: 'ln_or', category: 'marketing', max_age: DAY },\n { name: 'bcookie', category: 'marketing', max_age: 365 * DAY, domain: '.linkedin.com' },\n { name: 'lidc', category: 'marketing', max_age: DAY, domain: '.linkedin.com' },\n { name: 'li_sugr', category: 'marketing', max_age: 90 * DAY, domain: '.linkedin.com' },\n {\n name: 'UserMatchHistory',\n category: 'marketing',\n max_age: 30 * DAY,\n domain: '.linkedin.com',\n },\n {\n name: 'AnalyticsSyncHistory',\n category: 'marketing',\n max_age: 30 * DAY,\n domain: '.linkedin.com',\n },\n { name: 'li_gc', category: 'necessary', max_age: 180 * DAY, domain: '.linkedin.com' },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { DAY } from './time'\n\n// Meta Pixel — the cookies a standard integration sets for visitors.\n// Sources:\n// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n// https://www.facebook.com/policies/cookies/\n// https://web.archive.org/web/20220522135037/https://www.facebook.com/policies/cookies\n// https://privacycenter.instagram.com/policy/?subpage=9.subpage.3-HowDoWeSafeguard\n// https://www.dataprivacyframework.gov/list (Meta Platforms, Inc.: active)\n// Note: Meta's current cookie policy names no cookies; the 90-day lifetimes of _fbp / fr come from earlier\n// versions of Meta's own policy, and _fbc's from Meta's Conversions API docs. _fbp and _fbc are first-party\n// (fbevents.js writes them on the site's domain); fr's .facebook.com is undocumented, taken from the pixel\n// requests going to facebook.com. Transfers: the US under DPF, the adequacy countries Meta names; other\n// countries under SCCs are not named.\nexport const metaPixel = /* @__PURE__ */ defineVendor({\n id: 'meta_pixel',\n privacy_policy_url: 'https://www.facebook.com/privacy/policy/',\n transfers: [\n { country: 'AR', safeguards: ['adequacy'] },\n { country: 'CA', safeguards: ['adequacy'] },\n { country: 'CH', safeguards: ['adequacy'] },\n { country: 'GB', safeguards: ['adequacy'] },\n { country: 'IL', safeguards: ['adequacy'] },\n { country: 'NZ', safeguards: ['adequacy'] },\n { country: 'US', safeguards: ['dpf'] },\n ],\n cookies: [\n { name: '_fbp', category: 'marketing', max_age: 90 * DAY },\n { name: '_fbc', category: 'marketing', max_age: 90 * DAY },\n { name: 'fr', category: 'marketing', max_age: 90 * DAY, domain: '.facebook.com' },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { DAY } from './time'\n\n// TikTok Pixel — the cookies a standard integration sets for visitors.\n// Sources:\n// https://ads.tiktok.com/help/article/using-cookies-with-tiktok-pixel\n// https://www.tiktok.com/legal/page/eea/transferee-countries/en\n// Note: TikTok's lifetimes are 13 months from last use (rolling). ttcsid* covers ttcsid and ttcsid_<pixel code>.\n// _ttp also has a third-party variant on .tiktok.com; the first-party one is declared. _pangle is read, not\n// set, by the pixel. Transfers: storage and group remote access, per TikTok's EEA transferee list; no TikTok\n// entity is DPF-certified.\nexport const tiktokPixel = /* @__PURE__ */ defineVendor({\n id: 'tiktok_pixel',\n privacy_policy_url: 'https://www.tiktok.com/legal/page/eea/privacy-policy/en',\n transfers: [\n { country: 'AU', safeguards: ['scc'] },\n { country: 'BR', safeguards: ['scc'] },\n { country: 'CA', safeguards: ['adequacy'] },\n { country: 'CN', safeguards: ['scc'] },\n { country: 'GB', safeguards: ['adequacy'] },\n { country: 'IL', safeguards: ['adequacy'] },\n { country: 'JP', safeguards: ['adequacy'] },\n { country: 'KR', safeguards: ['adequacy'] },\n { country: 'MY', safeguards: ['scc'] },\n { country: 'PH', safeguards: ['scc'] },\n { country: 'SG', safeguards: ['scc'] },\n { country: 'US', safeguards: ['scc'] },\n ],\n cookies: [\n { name: '_ttp', category: 'marketing', max_age: 390 * DAY },\n { name: 'ttcsid*', category: 'marketing', max_age: 390 * DAY },\n { name: 'ttclid', category: 'marketing', max_age: 390 * DAY },\n {\n name: '_pangle',\n category: 'marketing',\n max_age: 390 * DAY,\n domain: 'analytics.pangle-ads.com',\n },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { DAY, MINUTE } from './time'\n\n// Vimeo — the cookies a standard integration sets for visitors.\n// Sources:\n// https://help.vimeo.com/hc/en-us/articles/26080940921361-Vimeo-Player-Cookies\n// https://vimeo.com/cookie_policy\n// https://vimeo.com/legal/privacy/policy.md\n// https://www.dataprivacyframework.gov/list (Vimeo.com, Inc.: active)\n// Note: Feature-specific cookies (passwords, webinars, live chat) are left out; Cloudflare's __cf_bm / _cfuvid /\n// cf_clearance come from Vimeo's own player-cookie article. Vimeo documents no domains: the player's config\n// sets .vimeo.com (vuid, player) and __cf_bm is observed on vimeo.com; the rest are taken as .vimeo.com.\nexport const vimeo = /* @__PURE__ */ defineVendor({\n id: 'vimeo',\n privacy_policy_url: 'https://vimeo.com/privacy',\n transfers: [{ country: 'US', safeguards: ['dpf', 'scc'] }],\n cookies: [\n { name: 'vuid', category: 'statistics', max_age: 730 * DAY, domain: '.vimeo.com' },\n { name: 'player', category: 'preferences', max_age: 365 * DAY, domain: '.vimeo.com' },\n { name: 'player_clearance', category: 'necessary', max_age: 7 * DAY, domain: '.vimeo.com' },\n { name: '__cf_bm', category: 'necessary', max_age: 30 * MINUTE, domain: '.vimeo.com' },\n { name: '_cfuvid', category: 'necessary', max_age: 'session', domain: '.vimeo.com' },\n { name: 'cf_clearance', category: 'necessary', max_age: 365 * DAY, domain: '.vimeo.com' },\n ],\n})\n","import { defineVendor } from './define-vendor'\nimport { GOOGLE_TRANSFERS } from './google-transfers'\nimport { DAY } from './time'\n\n// YouTube — the cookies a standard integration sets for visitors.\n// Sources:\n// https://policies.google.com/technologies/cookies\n// https://business.safety.google/adscookies/\n// https://support.google.com/youtube/answer/171780\n// https://cookiedatabase.org/\n// Note: Google is moving VISITOR_INFO1_LIVE to __Secure-YNID, so both are listed. youtube-nocookie.com still\n// uses storage, so treat it as needing consent too. Domains: YSC / VISITOR_INFO1_LIVE from adscookies, the\n// rest observed in the embed's Set-Cookie or, for __Secure-YENID and PREF (undocumented), taken as the\n// embed's .youtube.com.\nexport const youtube = /* @__PURE__ */ defineVendor({\n id: 'youtube',\n privacy_policy_url: 'https://policies.google.com/privacy',\n transfers: GOOGLE_TRANSFERS,\n cookies: [\n { name: 'YSC', category: 'marketing', max_age: 'session', domain: '.youtube.com' },\n { name: '__Secure-YNID', category: 'marketing', max_age: 180 * DAY, domain: '.youtube.com' },\n {\n name: 'VISITOR_INFO1_LIVE',\n category: 'marketing',\n max_age: 180 * DAY,\n domain: '.youtube.com',\n },\n { name: '__Secure-YENID', category: 'marketing', max_age: 390 * DAY, domain: '.youtube.com' },\n {\n name: '__Secure-ROLLOUT_TOKEN',\n category: 'marketing',\n max_age: 180 * DAY,\n domain: '.youtube.com',\n },\n { name: 'PREF', category: 'preferences', max_age: 240 * DAY, domain: '.youtube.com' },\n ],\n})\n","import { googleAds } from './google-ads'\nimport { googleAnalytics } from './google-analytics'\nimport { googleMaps } from './google-maps'\nimport { googleRecaptcha } from './google-recaptcha'\nimport { hotjar } from './hotjar'\nimport { linkedinInsight } from './linkedin-insight'\nimport { metaPixel } from './meta-pixel'\nimport { tiktokPixel } from './tiktok-pixel'\nimport { vimeo } from './vimeo'\nimport { youtube } from './youtube'\n\n/**\n * Every preset by its id — for when the set of vendors is decided at runtime (a backend that turns\n * integrations on and off sends `\"google_analytics\"`, not code). Importing this map bundles every\n * preset; import the named presets instead when your vendors are fixed in code.\n */\nexport const vendorPresets = {\n google_analytics: googleAnalytics,\n hotjar,\n google_ads: googleAds,\n meta_pixel: metaPixel,\n linkedin_insight: linkedinInsight,\n tiktok_pixel: tiktokPixel,\n youtube,\n vimeo,\n google_maps: googleMaps,\n google_recaptcha: googleRecaptcha,\n} as const\n\n/** The id of a shipped preset — `'google_analytics'`, `'meta_pixel'`, … */\nexport type VendorPresetId = keyof typeof vendorPresets\n","import { type ConsentCategoryId, isConsentCategoryId, REQUIRED_CATEGORY } from '../categories'\nimport { ConsentError } from '../errors'\nimport type {\n ConsentCategoriesConfig,\n ConsentCookieDeclaration,\n ConsentVendorDeclaration,\n} from '../types'\nimport { type VendorPresetId, vendorPresets } from './presets'\n\n/**\n * The serializable consent config — what a backend sends when it decides which integrations are on\n * (a back office where an admin enables Google Analytics, or the YouTube embed without tracking).\n * JSON only: per category, the vendors used in it — a preset id, a preset reference narrowed or\n * extended, or a full declaration when there's no preset. A vendor brings only its cookies of the\n * category it's listed under (plus its necessary ones). snake_case, like every dataset.\n *\n * ```json\n * {\n * \"policy_version\": 7,\n * \"categories\": {\n * \"statistics\": [\"google_analytics\"],\n * \"preferences\": [\"youtube\"],\n * \"marketing\": [\n * { \"preset\": \"google_ads\", \"cookies\": [\"_gcl_au\", \"IDE\"] },\n * { \"id\": \"acme_chat\", \"cookies\": [{ \"name\": \"acme_id\", \"category\": \"marketing\", \"max_age\": 31536000000 }] }\n * ]\n * }\n * }\n * ```\n */\nexport interface ConsentConfigData {\n /** Bump it whenever the set of vendors changes, so every visitor is asked again. Default `1`. */\n policy_version?: string | number\n /** How long a decision stays valid, in milliseconds. Default: 365 days. */\n max_age?: number\n /** Per category, the vendors used in it. */\n categories: Partial<Record<ConsentCategoryId, readonly ConsentVendorData[]>>\n}\n\n/** A vendor in the data: a preset id, a preset reference, or a full declaration of your own. */\nexport type ConsentVendorData = VendorPresetId | ConsentPresetVendorData | ConsentVendorDeclaration\n\n/** A shipped preset by id, optionally narrowed (`cookies`) or extended (`extra`). */\nexport interface ConsentPresetVendorData {\n preset: VendorPresetId\n cookies?: readonly string[]\n extra?: readonly ConsentCookieDeclaration[]\n}\n\n/** The part of `createConsent`'s config that data describes. */\nexport interface ConsentConfigFromData {\n categories: ConsentCategoriesConfig\n policyVersion?: string | number\n maxAge?: number\n}\n\n/** What only the app knows, merged into the data's config. */\nexport interface ConsentConfigFromDataOptions {\n /**\n * The app's own strictly necessary vendors (its session cookie, CSRF token, the consent record),\n * declared in code. Put under `necessary`, ahead of the data's categories. Once the app declares\n * them, the data may not list `necessary` itself: strictly necessary cookies are the app's to\n * declare, never the backend's.\n */\n necessary?: readonly ConsentVendorDeclaration[]\n}\n\nconst isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\nfunction presetFor(id: unknown, where: string) {\n if (typeof id === 'string' && Object.hasOwn(vendorPresets, id)) {\n return vendorPresets[id as VendorPresetId] as (\n options?: Record<string, unknown>,\n ) => ConsentVendorDeclaration\n }\n throw new ConsentError(`${where}: unknown vendor preset \"${String(id)}\".`)\n}\n\nfunction vendorFromData(raw: unknown, where: string): ConsentVendorDeclaration {\n if (typeof raw === 'string') return presetFor(raw, where)()\n if (!isObject(raw)) throw new ConsentError(`${where}: must be a preset id or an object.`)\n if ('preset' in raw) {\n const preset = presetFor(raw.preset, where)\n if (raw.cookies !== undefined && !Array.isArray(raw.cookies)) {\n throw new ConsentError(`${where} (\"${raw.preset}\"): cookies must be an array of names.`)\n }\n if (raw.extra !== undefined && !Array.isArray(raw.extra)) {\n throw new ConsentError(`${where} (\"${raw.preset}\"): extra must be an array of cookies.`)\n }\n // The preset itself rejects a cookie name it doesn't declare.\n return preset({ cookies: raw.cookies, extra: raw.extra })\n }\n // A full declaration — createConsent validates its id, cookies, categories and lifetimes.\n return raw as unknown as ConsentVendorDeclaration\n}\n\n/**\n * Turn backend data into `createConsent` options: per category, preset ids and references become\n * full vendor declarations (from `vendorPresets`); full declarations pass through. Pass the app's\n * own strictly necessary vendors as `necessary`, then spread the result and add what else only the\n * app knows:\n *\n * ```ts\n * const consent = createConsent({\n * ...consentConfigFromData(config.consent, { necessary: [mySite] }),\n * onChange,\n * })\n * ```\n *\n * Checks the shape as it goes — the data comes over the wire — and `createConsent` then validates\n * the rest (a vendor without cookies of its category, cookie names, lifetimes).\n *\n * @throws {ConsentError} for a malformed shape, an unknown category or preset, a cookie a preset\n * doesn't declare, or — when the app passes `necessary` — a `necessary` category in the data.\n */\nexport function consentConfigFromData(\n data: ConsentConfigData,\n options: ConsentConfigFromDataOptions = {},\n): ConsentConfigFromData {\n if (!isObject(data)) throw new ConsentError('Consent config data must be an object.')\n if (!isObject(data.categories)) {\n throw new ConsentError('Consent config data needs a \"categories\" object.')\n }\n const categories: Record<string, readonly ConsentVendorDeclaration[]> = {}\n if (options.necessary !== undefined) {\n if (Object.hasOwn(data.categories, REQUIRED_CATEGORY)) {\n throw new ConsentError(\n `Consent config data may not list \"${REQUIRED_CATEGORY}\": the app declares its strictly necessary vendors itself.`,\n )\n }\n if (!Array.isArray(options.necessary)) {\n throw new ConsentError(`The app's \"${REQUIRED_CATEGORY}\" vendors must be an array.`)\n }\n categories[REQUIRED_CATEGORY] = options.necessary\n }\n for (const [id, list] of Object.entries(data.categories)) {\n if (!isConsentCategoryId(id)) throw new ConsentError(`Unknown consent category \"${id}\".`)\n if (!Array.isArray(list)) throw new ConsentError(`Category \"${id}\": vendors must be an array.`)\n categories[id] = list.map((raw: unknown, index) =>\n vendorFromData(raw, `Category \"${id}\", vendor #${index + 1}`),\n )\n }\n return {\n categories,\n ...(data.policy_version !== undefined ? { policyVersion: data.policy_version } : {}),\n ...(data.max_age !== undefined ? { maxAge: data.max_age } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAoDA,SAAgB,aACd,YACiC;CACjC,MAAM,EAAE,IAAI,oB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@ -0,0 +1,171 @@
1
+ import { S as ConsentCategoryId, _ as ConsentVendorDeclaration, a as ConsentCookieDeclaration, g as ConsentVendor, i as ConsentCookie, m as ConsentTransferDeclaration, p as ConsentTransfer, t as ConsentCategoriesConfig } from "./types-ByyibBUg.cjs";
2
+ //#region src/vendors/define-vendor.d.ts
3
+ interface VendorPresetOptions<Name extends string = string> {
4
+ /**
5
+ * Only these of the preset's cookies — for when your integration doesn't set them all (e.g. no
6
+ * Google Signals). Default: every cookie in the preset. An unknown name is a type error and throws.
7
+ */
8
+ cookies?: readonly Name[];
9
+ /** Your own cookies on top, for anything this vendor sets in your setup that the preset lacks. */
10
+ extra?: readonly ConsentCookieDeclaration[];
11
+ }
12
+ /** A ready-made vendor: call it (optionally narrowing or extending its cookies) to get a `ConsentVendor`. */
13
+ interface VendorPreset<Name extends string = string> {
14
+ (options?: VendorPresetOptions<Name>): ConsentVendor;
15
+ /** The vendor id. */
16
+ readonly id: string;
17
+ /** The translation key of its name — its id as a machine name. */
18
+ readonly machine_name: string;
19
+ /** Every cookie the preset declares, each with its translation keys. */
20
+ readonly cookies: readonly ConsentCookie[];
21
+ /** Its countries outside the EEA, with their translation keys. */
22
+ readonly transfers?: readonly ConsentTransfer[];
23
+ }
24
+ interface VendorDefinition<C extends readonly ConsentCookieDeclaration[]> {
25
+ /** Stable id; its machine name (the translation key of its name, and its cookies' prefix) derives from it. */
26
+ id: string;
27
+ privacy_policy_url?: string;
28
+ /** Its countries outside the EEA; `[]` when the data stays in the EEA. */
29
+ transfers?: readonly ConsentTransferDeclaration[];
30
+ cookies: C;
31
+ }
32
+ /**
33
+ * Define a reusable vendor preset — how every preset in `@luwiostack/cookie-consent/vendors` is built, and
34
+ * the way to package your own (an in-house widget you use across apps). Cookie names are inferred as
35
+ * literals, so the preset's `cookies` option only accepts names it declares.
36
+ *
37
+ * Translation keys follow the package catalogs: `t(vendor.machine_name)` is the vendor's name and
38
+ * `t(cookie.machine_name)` a cookie's purpose (the vendor's machine name plus the cookie name).
39
+ *
40
+ * @throws {ConsentError} when two cookie names come out as the same machine name.
41
+ */
42
+ declare function defineVendor<const C extends readonly ConsentCookieDeclaration[]>(definition: VendorDefinition<C>): VendorPreset<C[number]['name']>;
43
+ //#endregion
44
+ //#region src/vendors/presets.d.ts
45
+ /**
46
+ * Every preset by its id — for when the set of vendors is decided at runtime (a backend that turns
47
+ * integrations on and off sends `"google_analytics"`, not code). Importing this map bundles every
48
+ * preset; import the named presets instead when your vendors are fixed in code.
49
+ */
50
+ declare const vendorPresets: {
51
+ readonly google_analytics: VendorPreset<"_ga" | "_ga_*">;
52
+ readonly hotjar: VendorPreset<"_hjDonePolls" | "_hjHasCachedUserAttributes" | "_hjSessionUser_*" | "_hjSession_*" | "_hjUserAttributes" | "_hjUserAttributesHash" | "hjActiveViewportIds" | "hjViewportId">;
53
+ readonly google_ads: VendorPreset<"IDE" | "_gac_*" | "_gcl_au" | "_gcl_aw" | "_gcl_dc" | "ar_debug" | "test_cookie">;
54
+ readonly meta_pixel: VendorPreset<"_fbc" | "_fbp" | "fr">;
55
+ readonly linkedin_insight: VendorPreset<"AnalyticsSyncHistory" | "UserMatchHistory" | "bcookie" | "li_fat_id" | "li_gc" | "li_sugr" | "lidc" | "ln_or">;
56
+ readonly tiktok_pixel: VendorPreset<"_pangle" | "_ttp" | "ttclid" | "ttcsid*">;
57
+ readonly youtube: VendorPreset<"PREF" | "VISITOR_INFO1_LIVE" | "YSC" | "__Secure-ROLLOUT_TOKEN" | "__Secure-YENID" | "__Secure-YNID">;
58
+ readonly vimeo: VendorPreset<"__cf_bm" | "_cfuvid" | "cf_clearance" | "player" | "player_clearance" | "vuid">;
59
+ readonly google_maps: VendorPreset<"AEC" | "NID" | "SOCS">;
60
+ readonly google_recaptcha: VendorPreset<"_GRECAPTCHA">;
61
+ };
62
+ /** The id of a shipped preset — `'google_analytics'`, `'meta_pixel'`, … */
63
+ type VendorPresetId = keyof typeof vendorPresets;
64
+ //#endregion
65
+ //#region src/vendors/from-data.d.ts
66
+ /**
67
+ * The serializable consent config — what a backend sends when it decides which integrations are on
68
+ * (a back office where an admin enables Google Analytics, or the YouTube embed without tracking).
69
+ * JSON only: per category, the vendors used in it — a preset id, a preset reference narrowed or
70
+ * extended, or a full declaration when there's no preset. A vendor brings only its cookies of the
71
+ * category it's listed under (plus its necessary ones). snake_case, like every dataset.
72
+ *
73
+ * ```json
74
+ * {
75
+ * "policy_version": 7,
76
+ * "categories": {
77
+ * "statistics": ["google_analytics"],
78
+ * "preferences": ["youtube"],
79
+ * "marketing": [
80
+ * { "preset": "google_ads", "cookies": ["_gcl_au", "IDE"] },
81
+ * { "id": "acme_chat", "cookies": [{ "name": "acme_id", "category": "marketing", "max_age": 31536000000 }] }
82
+ * ]
83
+ * }
84
+ * }
85
+ * ```
86
+ */
87
+ interface ConsentConfigData {
88
+ /** Bump it whenever the set of vendors changes, so every visitor is asked again. Default `1`. */
89
+ policy_version?: string | number;
90
+ /** How long a decision stays valid, in milliseconds. Default: 365 days. */
91
+ max_age?: number;
92
+ /** Per category, the vendors used in it. */
93
+ categories: Partial<Record<ConsentCategoryId, readonly ConsentVendorData[]>>;
94
+ }
95
+ /** A vendor in the data: a preset id, a preset reference, or a full declaration of your own. */
96
+ type ConsentVendorData = VendorPresetId | ConsentPresetVendorData | ConsentVendorDeclaration;
97
+ /** A shipped preset by id, optionally narrowed (`cookies`) or extended (`extra`). */
98
+ interface ConsentPresetVendorData {
99
+ preset: VendorPresetId;
100
+ cookies?: readonly string[];
101
+ extra?: readonly ConsentCookieDeclaration[];
102
+ }
103
+ /** The part of `createConsent`'s config that data describes. */
104
+ interface ConsentConfigFromData {
105
+ categories: ConsentCategoriesConfig;
106
+ policyVersion?: string | number;
107
+ maxAge?: number;
108
+ }
109
+ /** What only the app knows, merged into the data's config. */
110
+ interface ConsentConfigFromDataOptions {
111
+ /**
112
+ * The app's own strictly necessary vendors (its session cookie, CSRF token, the consent record),
113
+ * declared in code. Put under `necessary`, ahead of the data's categories. Once the app declares
114
+ * them, the data may not list `necessary` itself: strictly necessary cookies are the app's to
115
+ * declare, never the backend's.
116
+ */
117
+ necessary?: readonly ConsentVendorDeclaration[];
118
+ }
119
+ /**
120
+ * Turn backend data into `createConsent` options: per category, preset ids and references become
121
+ * full vendor declarations (from `vendorPresets`); full declarations pass through. Pass the app's
122
+ * own strictly necessary vendors as `necessary`, then spread the result and add what else only the
123
+ * app knows:
124
+ *
125
+ * ```ts
126
+ * const consent = createConsent({
127
+ * ...consentConfigFromData(config.consent, { necessary: [mySite] }),
128
+ * onChange,
129
+ * })
130
+ * ```
131
+ *
132
+ * Checks the shape as it goes — the data comes over the wire — and `createConsent` then validates
133
+ * the rest (a vendor without cookies of its category, cookie names, lifetimes).
134
+ *
135
+ * @throws {ConsentError} for a malformed shape, an unknown category or preset, a cookie a preset
136
+ * doesn't declare, or — when the app passes `necessary` — a `necessary` category in the data.
137
+ */
138
+ declare function consentConfigFromData(data: ConsentConfigData, options?: ConsentConfigFromDataOptions): ConsentConfigFromData;
139
+ //#endregion
140
+ //#region src/vendors/google-ads.d.ts
141
+ declare const googleAds: VendorPreset<"IDE" | "_gac_*" | "_gcl_au" | "_gcl_aw" | "_gcl_dc" | "ar_debug" | "test_cookie">;
142
+ //#endregion
143
+ //#region src/vendors/google-analytics.d.ts
144
+ declare const googleAnalytics: VendorPreset<"_ga" | "_ga_*">;
145
+ //#endregion
146
+ //#region src/vendors/google-maps.d.ts
147
+ declare const googleMaps: VendorPreset<"AEC" | "NID" | "SOCS">;
148
+ //#endregion
149
+ //#region src/vendors/google-recaptcha.d.ts
150
+ declare const googleRecaptcha: VendorPreset<"_GRECAPTCHA">;
151
+ //#endregion
152
+ //#region src/vendors/hotjar.d.ts
153
+ declare const hotjar: VendorPreset<"_hjDonePolls" | "_hjHasCachedUserAttributes" | "_hjSessionUser_*" | "_hjSession_*" | "_hjUserAttributes" | "_hjUserAttributesHash" | "hjActiveViewportIds" | "hjViewportId">;
154
+ //#endregion
155
+ //#region src/vendors/linkedin-insight.d.ts
156
+ declare const linkedinInsight: VendorPreset<"AnalyticsSyncHistory" | "UserMatchHistory" | "bcookie" | "li_fat_id" | "li_gc" | "li_sugr" | "lidc" | "ln_or">;
157
+ //#endregion
158
+ //#region src/vendors/meta-pixel.d.ts
159
+ declare const metaPixel: VendorPreset<"_fbc" | "_fbp" | "fr">;
160
+ //#endregion
161
+ //#region src/vendors/tiktok-pixel.d.ts
162
+ declare const tiktokPixel: VendorPreset<"_pangle" | "_ttp" | "ttclid" | "ttcsid*">;
163
+ //#endregion
164
+ //#region src/vendors/vimeo.d.ts
165
+ declare const vimeo: VendorPreset<"__cf_bm" | "_cfuvid" | "cf_clearance" | "player" | "player_clearance" | "vuid">;
166
+ //#endregion
167
+ //#region src/vendors/youtube.d.ts
168
+ declare const youtube: VendorPreset<"PREF" | "VISITOR_INFO1_LIVE" | "YSC" | "__Secure-ROLLOUT_TOKEN" | "__Secure-YENID" | "__Secure-YNID">;
169
+ //#endregion
170
+ export { type ConsentConfigData, type ConsentConfigFromData, type ConsentConfigFromDataOptions, type ConsentPresetVendorData, type ConsentVendorData, type VendorDefinition, type VendorPreset, type VendorPresetId, type VendorPresetOptions, consentConfigFromData, defineVendor, googleAds, googleAnalytics, googleMaps, googleRecaptcha, hotjar, linkedinInsight, metaPixel, tiktokPixel, vendorPresets, vimeo, youtube };
171
+ //# sourceMappingURL=vendors.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors.d.cts","names":[],"sources":["../src/vendors/define-vendor.ts","../src/vendors/presets.ts","../src/vendors/from-data.ts","../src/vendors/google-ads.ts","../src/vendors/google-analytics.ts","../src/vendors/google-maps.ts","../src/vendors/google-recaptcha.ts","../src/vendors/hotjar.ts","../src/vendors/linkedin-insight.ts","../src/vendors/meta-pixel.ts","../src/vendors/tiktok-pixel.ts","../src/vendors/vimeo.ts","../src/vendors/youtube.ts"],"mappings":";;UAUiB,oBAAoB;;;;;EAKnC,mBAAmB;;EAEnB,iBAAiB;;;UAIF,aAAa;GAC3B,UAAU,oBAAoB,QAAQ;;WAE9B;;WAEA;;WAEA,kBAAkB;;WAElB,qBAAqB;;UAGf,iBAAiB,mBAAmB;;EAEnD;EACA;;EAEA,qBAAqB;EACrB,SAAS;;;;;;;;;;;;iBAaK,mBAAmB,mBAAmB,4BACpD,YAAY,iBAAiB,KAC5B,aAAa;;;;;;;;cCtCH;6BAAA;;;;;;;;;;;;KAcD,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;UCAzB;;EAEf;;EAEA;;EAEA,YAAY,QAAQ,OAAO,4BAA4B;;;KAI7C,oBAAoB,iBAAiB,0BAA0B;;UAG1D;EACf,QAAQ;EACR;EACA,iBAAiB;;;UAIF;EACf,YAAY;EACZ;EACA;;;UAIe;;;;;;;EAOf,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAoDP,sBACd,MAAM,mBACN,UAAS,+BACR;;;cC5GU,WAAA;;;cCDA,iBAAA;;;cCEA,YAAA;;;cCFA,iBAAA;;;cCCA,QAAA;;;cCDA,iBAAA;;;cCKA,WAAA;;;cCJA,aAAA;;;cCCA,OAAA;;;cCEA,SAAA"}
@@ -0,0 +1,171 @@
1
+ import { S as ConsentCategoryId, _ as ConsentVendorDeclaration, a as ConsentCookieDeclaration, g as ConsentVendor, i as ConsentCookie, m as ConsentTransferDeclaration, p as ConsentTransfer, t as ConsentCategoriesConfig } from "./types-ByyibBUg.mjs";
2
+ //#region src/vendors/define-vendor.d.ts
3
+ interface VendorPresetOptions<Name extends string = string> {
4
+ /**
5
+ * Only these of the preset's cookies — for when your integration doesn't set them all (e.g. no
6
+ * Google Signals). Default: every cookie in the preset. An unknown name is a type error and throws.
7
+ */
8
+ cookies?: readonly Name[];
9
+ /** Your own cookies on top, for anything this vendor sets in your setup that the preset lacks. */
10
+ extra?: readonly ConsentCookieDeclaration[];
11
+ }
12
+ /** A ready-made vendor: call it (optionally narrowing or extending its cookies) to get a `ConsentVendor`. */
13
+ interface VendorPreset<Name extends string = string> {
14
+ (options?: VendorPresetOptions<Name>): ConsentVendor;
15
+ /** The vendor id. */
16
+ readonly id: string;
17
+ /** The translation key of its name — its id as a machine name. */
18
+ readonly machine_name: string;
19
+ /** Every cookie the preset declares, each with its translation keys. */
20
+ readonly cookies: readonly ConsentCookie[];
21
+ /** Its countries outside the EEA, with their translation keys. */
22
+ readonly transfers?: readonly ConsentTransfer[];
23
+ }
24
+ interface VendorDefinition<C extends readonly ConsentCookieDeclaration[]> {
25
+ /** Stable id; its machine name (the translation key of its name, and its cookies' prefix) derives from it. */
26
+ id: string;
27
+ privacy_policy_url?: string;
28
+ /** Its countries outside the EEA; `[]` when the data stays in the EEA. */
29
+ transfers?: readonly ConsentTransferDeclaration[];
30
+ cookies: C;
31
+ }
32
+ /**
33
+ * Define a reusable vendor preset — how every preset in `@luwiostack/cookie-consent/vendors` is built, and
34
+ * the way to package your own (an in-house widget you use across apps). Cookie names are inferred as
35
+ * literals, so the preset's `cookies` option only accepts names it declares.
36
+ *
37
+ * Translation keys follow the package catalogs: `t(vendor.machine_name)` is the vendor's name and
38
+ * `t(cookie.machine_name)` a cookie's purpose (the vendor's machine name plus the cookie name).
39
+ *
40
+ * @throws {ConsentError} when two cookie names come out as the same machine name.
41
+ */
42
+ declare function defineVendor<const C extends readonly ConsentCookieDeclaration[]>(definition: VendorDefinition<C>): VendorPreset<C[number]['name']>;
43
+ //#endregion
44
+ //#region src/vendors/presets.d.ts
45
+ /**
46
+ * Every preset by its id — for when the set of vendors is decided at runtime (a backend that turns
47
+ * integrations on and off sends `"google_analytics"`, not code). Importing this map bundles every
48
+ * preset; import the named presets instead when your vendors are fixed in code.
49
+ */
50
+ declare const vendorPresets: {
51
+ readonly google_analytics: VendorPreset<"_ga" | "_ga_*">;
52
+ readonly hotjar: VendorPreset<"_hjDonePolls" | "_hjHasCachedUserAttributes" | "_hjSessionUser_*" | "_hjSession_*" | "_hjUserAttributes" | "_hjUserAttributesHash" | "hjActiveViewportIds" | "hjViewportId">;
53
+ readonly google_ads: VendorPreset<"IDE" | "_gac_*" | "_gcl_au" | "_gcl_aw" | "_gcl_dc" | "ar_debug" | "test_cookie">;
54
+ readonly meta_pixel: VendorPreset<"_fbc" | "_fbp" | "fr">;
55
+ readonly linkedin_insight: VendorPreset<"AnalyticsSyncHistory" | "UserMatchHistory" | "bcookie" | "li_fat_id" | "li_gc" | "li_sugr" | "lidc" | "ln_or">;
56
+ readonly tiktok_pixel: VendorPreset<"_pangle" | "_ttp" | "ttclid" | "ttcsid*">;
57
+ readonly youtube: VendorPreset<"PREF" | "VISITOR_INFO1_LIVE" | "YSC" | "__Secure-ROLLOUT_TOKEN" | "__Secure-YENID" | "__Secure-YNID">;
58
+ readonly vimeo: VendorPreset<"__cf_bm" | "_cfuvid" | "cf_clearance" | "player" | "player_clearance" | "vuid">;
59
+ readonly google_maps: VendorPreset<"AEC" | "NID" | "SOCS">;
60
+ readonly google_recaptcha: VendorPreset<"_GRECAPTCHA">;
61
+ };
62
+ /** The id of a shipped preset — `'google_analytics'`, `'meta_pixel'`, … */
63
+ type VendorPresetId = keyof typeof vendorPresets;
64
+ //#endregion
65
+ //#region src/vendors/from-data.d.ts
66
+ /**
67
+ * The serializable consent config — what a backend sends when it decides which integrations are on
68
+ * (a back office where an admin enables Google Analytics, or the YouTube embed without tracking).
69
+ * JSON only: per category, the vendors used in it — a preset id, a preset reference narrowed or
70
+ * extended, or a full declaration when there's no preset. A vendor brings only its cookies of the
71
+ * category it's listed under (plus its necessary ones). snake_case, like every dataset.
72
+ *
73
+ * ```json
74
+ * {
75
+ * "policy_version": 7,
76
+ * "categories": {
77
+ * "statistics": ["google_analytics"],
78
+ * "preferences": ["youtube"],
79
+ * "marketing": [
80
+ * { "preset": "google_ads", "cookies": ["_gcl_au", "IDE"] },
81
+ * { "id": "acme_chat", "cookies": [{ "name": "acme_id", "category": "marketing", "max_age": 31536000000 }] }
82
+ * ]
83
+ * }
84
+ * }
85
+ * ```
86
+ */
87
+ interface ConsentConfigData {
88
+ /** Bump it whenever the set of vendors changes, so every visitor is asked again. Default `1`. */
89
+ policy_version?: string | number;
90
+ /** How long a decision stays valid, in milliseconds. Default: 365 days. */
91
+ max_age?: number;
92
+ /** Per category, the vendors used in it. */
93
+ categories: Partial<Record<ConsentCategoryId, readonly ConsentVendorData[]>>;
94
+ }
95
+ /** A vendor in the data: a preset id, a preset reference, or a full declaration of your own. */
96
+ type ConsentVendorData = VendorPresetId | ConsentPresetVendorData | ConsentVendorDeclaration;
97
+ /** A shipped preset by id, optionally narrowed (`cookies`) or extended (`extra`). */
98
+ interface ConsentPresetVendorData {
99
+ preset: VendorPresetId;
100
+ cookies?: readonly string[];
101
+ extra?: readonly ConsentCookieDeclaration[];
102
+ }
103
+ /** The part of `createConsent`'s config that data describes. */
104
+ interface ConsentConfigFromData {
105
+ categories: ConsentCategoriesConfig;
106
+ policyVersion?: string | number;
107
+ maxAge?: number;
108
+ }
109
+ /** What only the app knows, merged into the data's config. */
110
+ interface ConsentConfigFromDataOptions {
111
+ /**
112
+ * The app's own strictly necessary vendors (its session cookie, CSRF token, the consent record),
113
+ * declared in code. Put under `necessary`, ahead of the data's categories. Once the app declares
114
+ * them, the data may not list `necessary` itself: strictly necessary cookies are the app's to
115
+ * declare, never the backend's.
116
+ */
117
+ necessary?: readonly ConsentVendorDeclaration[];
118
+ }
119
+ /**
120
+ * Turn backend data into `createConsent` options: per category, preset ids and references become
121
+ * full vendor declarations (from `vendorPresets`); full declarations pass through. Pass the app's
122
+ * own strictly necessary vendors as `necessary`, then spread the result and add what else only the
123
+ * app knows:
124
+ *
125
+ * ```ts
126
+ * const consent = createConsent({
127
+ * ...consentConfigFromData(config.consent, { necessary: [mySite] }),
128
+ * onChange,
129
+ * })
130
+ * ```
131
+ *
132
+ * Checks the shape as it goes — the data comes over the wire — and `createConsent` then validates
133
+ * the rest (a vendor without cookies of its category, cookie names, lifetimes).
134
+ *
135
+ * @throws {ConsentError} for a malformed shape, an unknown category or preset, a cookie a preset
136
+ * doesn't declare, or — when the app passes `necessary` — a `necessary` category in the data.
137
+ */
138
+ declare function consentConfigFromData(data: ConsentConfigData, options?: ConsentConfigFromDataOptions): ConsentConfigFromData;
139
+ //#endregion
140
+ //#region src/vendors/google-ads.d.ts
141
+ declare const googleAds: VendorPreset<"IDE" | "_gac_*" | "_gcl_au" | "_gcl_aw" | "_gcl_dc" | "ar_debug" | "test_cookie">;
142
+ //#endregion
143
+ //#region src/vendors/google-analytics.d.ts
144
+ declare const googleAnalytics: VendorPreset<"_ga" | "_ga_*">;
145
+ //#endregion
146
+ //#region src/vendors/google-maps.d.ts
147
+ declare const googleMaps: VendorPreset<"AEC" | "NID" | "SOCS">;
148
+ //#endregion
149
+ //#region src/vendors/google-recaptcha.d.ts
150
+ declare const googleRecaptcha: VendorPreset<"_GRECAPTCHA">;
151
+ //#endregion
152
+ //#region src/vendors/hotjar.d.ts
153
+ declare const hotjar: VendorPreset<"_hjDonePolls" | "_hjHasCachedUserAttributes" | "_hjSessionUser_*" | "_hjSession_*" | "_hjUserAttributes" | "_hjUserAttributesHash" | "hjActiveViewportIds" | "hjViewportId">;
154
+ //#endregion
155
+ //#region src/vendors/linkedin-insight.d.ts
156
+ declare const linkedinInsight: VendorPreset<"AnalyticsSyncHistory" | "UserMatchHistory" | "bcookie" | "li_fat_id" | "li_gc" | "li_sugr" | "lidc" | "ln_or">;
157
+ //#endregion
158
+ //#region src/vendors/meta-pixel.d.ts
159
+ declare const metaPixel: VendorPreset<"_fbc" | "_fbp" | "fr">;
160
+ //#endregion
161
+ //#region src/vendors/tiktok-pixel.d.ts
162
+ declare const tiktokPixel: VendorPreset<"_pangle" | "_ttp" | "ttclid" | "ttcsid*">;
163
+ //#endregion
164
+ //#region src/vendors/vimeo.d.ts
165
+ declare const vimeo: VendorPreset<"__cf_bm" | "_cfuvid" | "cf_clearance" | "player" | "player_clearance" | "vuid">;
166
+ //#endregion
167
+ //#region src/vendors/youtube.d.ts
168
+ declare const youtube: VendorPreset<"PREF" | "VISITOR_INFO1_LIVE" | "YSC" | "__Secure-ROLLOUT_TOKEN" | "__Secure-YENID" | "__Secure-YNID">;
169
+ //#endregion
170
+ export { type ConsentConfigData, type ConsentConfigFromData, type ConsentConfigFromDataOptions, type ConsentPresetVendorData, type ConsentVendorData, type VendorDefinition, type VendorPreset, type VendorPresetId, type VendorPresetOptions, consentConfigFromData, defineVendor, googleAds, googleAnalytics, googleMaps, googleRecaptcha, hotjar, linkedinInsight, metaPixel, tiktokPixel, vendorPresets, vimeo, youtube };
171
+ //# sourceMappingURL=vendors.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors.d.mts","names":[],"sources":["../src/vendors/define-vendor.ts","../src/vendors/presets.ts","../src/vendors/from-data.ts","../src/vendors/google-ads.ts","../src/vendors/google-analytics.ts","../src/vendors/google-maps.ts","../src/vendors/google-recaptcha.ts","../src/vendors/hotjar.ts","../src/vendors/linkedin-insight.ts","../src/vendors/meta-pixel.ts","../src/vendors/tiktok-pixel.ts","../src/vendors/vimeo.ts","../src/vendors/youtube.ts"],"mappings":";;UAUiB,oBAAoB;;;;;EAKnC,mBAAmB;;EAEnB,iBAAiB;;;UAIF,aAAa;GAC3B,UAAU,oBAAoB,QAAQ;;WAE9B;;WAEA;;WAEA,kBAAkB;;WAElB,qBAAqB;;UAGf,iBAAiB,mBAAmB;;EAEnD;EACA;;EAEA,qBAAqB;EACrB,SAAS;;;;;;;;;;;;iBAaK,mBAAmB,mBAAmB,4BACpD,YAAY,iBAAiB,KAC5B,aAAa;;;;;;;;cCtCH;6BAAA;;;;;;;;;;;;KAcD,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;UCAzB;;EAEf;;EAEA;;EAEA,YAAY,QAAQ,OAAO,4BAA4B;;;KAI7C,oBAAoB,iBAAiB,0BAA0B;;UAG1D;EACf,QAAQ;EACR;EACA,iBAAiB;;;UAIF;EACf,YAAY;EACZ;EACA;;;UAIe;;;;;;;EAOf,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAoDP,sBACd,MAAM,mBACN,UAAS,+BACR;;;cC5GU,WAAA;;;cCDA,iBAAA;;;cCEA,YAAA;;;cCFA,iBAAA;;;cCCA,QAAA;;;cCDA,iBAAA;;;cCKA,WAAA;;;cCJA,aAAA;;;cCCA,OAAA;;;cCEA,SAAA"}