@shware/analytics 8.13.1 → 8.15.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":"index.mjs","names":[],"sources":["../../src/bot/index.ts"],"sourcesContent":["import type { TrackTags } from '../track/types';\nimport { GENERIC_BOT } from './generic';\n\n/**\n * What kind of automated visitor a bot is, as the analytics tools that report bots separately\n * group them (PostHog's traffic categories, Cloudflare's verified bot categories, Matomo's\n * DeviceDetector). Stored next to the name so dashboards can group without re-deriving:\n *\n * - search_crawler: indexes pages for a search engine (Googlebot, Bingbot, Baiduspider)\n * - ai_crawler: collects content to train models (GPTBot, ClaudeBot, Meta-ExternalAgent)\n * - ai_search: indexes pages for an AI search product (OAI-SearchBot, PerplexityBot)\n * - ai_assistant: fetches a page because a person asked an assistant to (ChatGPT-User)\n * - advertising: works for an ad system — reviews landing pages, targets or verifies ads\n * (Meta-ExternalAds, AdsBot-Google, Mediapartners-Google)\n * - link_preview: renders the card of a link shared in a feed or a chat (facebookexternalhit)\n * - seo_tool: SEO, marketing and page-speed tools (AhrefsBot, Lighthouse, HubSpot)\n * - monitoring: uptime checks, synthetics and service callers (Pingdom, Stripe)\n * - headless_browser: a scripted browser (HeadlessChrome, Playwright, a WebDriver session)\n * - http_client: a library or command-line client (curl, python-requests)\n * - no_user_agent: a request without a user agent, which no browser sends\n * - other: automated by every sign, but none of the above\n */\nexport const BOT_CATEGORIES = [\n 'search_crawler',\n 'ai_crawler',\n 'ai_search',\n 'ai_assistant',\n 'advertising',\n 'link_preview',\n 'seo_tool',\n 'monitoring',\n 'headless_browser',\n 'http_client',\n 'no_user_agent',\n 'other',\n] as const;\n\nexport type BotCategory = (typeof BOT_CATEGORIES)[number];\n\n/**\n * The verdict, shaped like the columns a product stores it in (`is_bot`, `bot_name`,\n * `bot_category`). A person is `{ is_bot: false, bot_name: null, bot_category: null }`.\n */\nexport type Bot =\n | { is_bot: true; bot_name: string; bot_category: BotCategory }\n | { is_bot: false; bot_name: null; bot_category: null };\n\nexport const NOT_A_BOT: Bot = { is_bot: false, bot_name: null, bot_category: null };\n\n/**\n * Bots we can name, as `[name, category, pattern]`, tried in order; the first match wins.\n *\n * Where the list comes from (checked 2026-09-30):\n * - bowser's bot parsers (the ~25 named bots its `platform.type === 'bot'` reports), which this\n * replaces.\n * - PostHog's `bot_definitions.py` (web analytics traffic classification), for the bots and\n * categories an analytics product sees most.\n * - ai.robots.txt (`robots.json`), for AI crawlers, search bots, assistants and agents.\n * - The operators' own docs for the big ones: Google's crawler list, OpenAI's and Anthropic's\n * bot pages, Meta's web crawlers, Perplexity, Bing, Apple.\n * - Bots seen in production (Meta-ExternalAds, HubSpot, Bytespider).\n * Every entry was run against the real user agents in crawler-user-agents and PostHog's\n * fixtures, and bowser's browser fixtures were run to check no browser is taken for a bot\n * (Sogou's browser against its spider, Pinterest's in-app browser against its bot); see\n * `index.test.ts` for where to get them.\n *\n * The link above each entry is the operator's page about the bot, else its product page, else\n * its Known Agents profile (knownagents.com, formerly Dark Visitors) when the operator has none.\n *\n * Names are the operators' spelling of their user agent token. Order matters where one token\n * contains another or borrows a name: advertising and SEO tools come before the search engines\n * whose names they carry, and the more specific of Meta's, Anthropic's and Perplexity's tokens\n * come first. The long tail is left to the generic pattern, filed as `other` and named by\n * `nameOfUnknownBot`; add a bot here when it is worth its own category or name in a dashboard.\n */\nexport const NAMED_BOTS = [\n // advertising: before the search crawlers, AdsBot and Mediapartners carry Google's name\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalAds', 'advertising', /meta-externalads/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['facebookcatalog', 'advertising', /facebookcatalog/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['AdsBot-Google', 'advertising', /adsbot-google/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['Mediapartners-Google', 'advertising', /mediapartners-google/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['AdIdxBot', 'advertising', /adidxbot/i],\n // https://support.google.com/adwords/answer/2404197\n ['Google-AdWords', 'advertising', /google-adwords/i],\n // https://support.google.com/google-ads/answer/6095821\n ['Google-Ads-Conversions', 'advertising', /google-ads-conversions/i],\n // https://developers.openai.com/api/docs/bots\n ['OAI-AdsBot', 'advertising', /oai-adsbot/i],\n // https://businesshelp.snapchat.com/s/article/adsbot-crawler\n ['SnapchatAds', 'advertising', /snapchatads/i],\n // https://www.taboola.com\n ['Taboolabot', 'advertising', /taboolabot/i],\n\n // AI assistants and agents: a person asked for this page\n // https://developers.openai.com/api/docs/bots\n ['ChatGPT-User', 'ai_assistant', /chatgpt-user/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-User', 'ai_assistant', /claude-user/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-Web', 'ai_assistant', /claude-web/i],\n // https://docs.perplexity.ai/guides/bots\n ['Perplexity-User', 'ai_assistant', /perplexity-user/i],\n // https://duckduckgo.com/duckduckgo-help-pages/results/duckassistbot\n ['DuckAssistBot', 'ai_assistant', /duckassistbot/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalFetcher', 'ai_assistant', /meta-externalfetcher/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-User', 'ai_assistant', /mistralai-user/i],\n // https://knownagents.com/agents/manus-user\n ['Manus-User', 'ai_assistant', /manus-user/i],\n // https://developer.amazon.com/amazonbot\n ['Amzn-User', 'ai_assistant', /amzn-user/i],\n // https://knownagents.com/agents/amazon-qbusiness\n ['amazon-QBusiness', 'ai_assistant', /amazon-qbusiness/i],\n // https://docs.aws.amazon.com/bedrock-agentcore/\n ['Amazon-Bedrock-AgentCore-Browser', 'ai_assistant', /amazon-bedrock-agentcore/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-Agent', 'ai_assistant', /google-?agent/i],\n // https://gemini.google/overview/deep-research/\n ['Gemini-Deep-Research', 'ai_assistant', /gemini-deep-research/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-NotebookLM', 'ai_assistant', /google-notebooklm/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['Kimi-User', 'ai_assistant', /kimi-(?:user|agent)/i],\n // https://knownagents.com/agents/tongyibot\n ['TongyiBot', 'ai_assistant', /tongyibot/i],\n // https://knownagents.com/agents/yiyanbot\n ['YiyanBot', 'ai_assistant', /yiyanbot/i],\n // https://help.kagi.com/kagi/ai/kagi-ai.html\n ['kagi-fetcher', 'ai_assistant', /kagi-fetcher/i],\n // https://devin.ai\n ['Devin', 'ai_assistant', /\\bdevin\\/\\d/i],\n // https://knownagents.com/agents/novaact\n ['NovaAct', 'ai_assistant', /novaact/i],\n\n // AI search\n // https://developers.openai.com/api/docs/bots\n ['OAI-SearchBot', 'ai_search', /oai-searchbot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['Claude-SearchBot', 'ai_search', /claude-searchbot/i],\n // https://docs.perplexity.ai/guides/bots\n ['PerplexityBot', 'ai_search', /perplexitybot/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-WebIndexer', 'ai_search', /meta-webindexer/i],\n // https://developer.amazon.com/amazonbot\n ['Amazonbot', 'ai_search', /amazonbot/i],\n // https://knownagents.com/agents/youbot\n ['YouBot', 'ai_search', /youbot/i],\n // https://knownagents.com/agents/phindbot\n ['PhindBot', 'ai_search', /phindbot/i],\n // https://developer.amazon.com/amazonbot\n ['Amzn-SearchBot', 'ai_search', /amzn-searchbot/i],\n // https://knownagents.com/agents/azureai-searchbot\n ['AzureAI-SearchBot', 'ai_search', /azureai-searchbot/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['Kimi-SearchBot', 'ai_search', /kimi-searchbot/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-Index', 'ai_search', /mistralai-index/i],\n // https://knownagents.com/agents/exasearchbot\n ['ExaSearchBot', 'ai_search', /exasearchbot|\\bexabot/i],\n // https://knownagents.com/agents/tavilybot\n ['TavilyBot', 'ai_search', /tavilybot/i],\n // https://linkup.so/bot\n ['LinkupBot', 'ai_search', /linkupbot/i],\n // https://knownagents.com/agents/iaskspider\n ['iAskBot', 'ai_search', /iask(?:bot|spider)/i],\n ['Andibot', 'ai_search', /andibot/i],\n // https://developers.cloudflare.com/autorag\n ['Cloudflare-AutoRAG', 'ai_search', /cloudflare-autorag/i],\n\n // AI training\n // https://developers.openai.com/api/docs/bots\n ['GPTBot', 'ai_crawler', /gptbot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['ClaudeBot', 'ai_crawler', /claudebot/i],\n // https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler\n ['anthropic-ai', 'ai_crawler', /anthropic-ai/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Meta-ExternalAgent', 'ai_crawler', /meta-externalagent/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['FacebookBot', 'ai_crawler', /facebookbot/i],\n // https://knownagents.com/agents/bytespider\n ['Bytespider', 'ai_crawler', /bytespider/i],\n // https://commoncrawl.org/ccbot\n ['CCBot', 'ai_crawler', /ccbot/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-CloudVertexBot', 'ai_crawler', /google-cloudvertexbot/i],\n // https://knownagents.com/agents/cohere-training-data-crawler\n ['cohere-ai', 'ai_crawler', /cohere-(?:ai|training-data-crawler)/i],\n // https://www.diffbot.com/docs/crawl/faq/robots-txt\n ['Diffbot', 'ai_crawler', /diffbot/i],\n // https://knownagents.com/agents/webzio-extended\n ['Omgili', 'ai_crawler', /omgili|webzio-extended/i],\n // https://imagesift.com/about\n ['ImagesiftBot', 'ai_crawler', /imagesiftbot/i],\n // https://www.timpi.io\n ['Timpibot', 'ai_crawler', /timpibot/i],\n // https://knownagents.com/agents/ai2bot\n ['AI2Bot', 'ai_crawler', /ai2bot/i],\n // https://knownagents.com/agents/pangubot\n ['PanguBot', 'ai_crawler', /pangubot/i],\n // https://knownagents.com/agents/tiktokspider\n ['TikTokSpider', 'ai_crawler', /tiktokspider/i],\n // https://knownagents.com/agents/deepseekbot\n ['DeepSeekBot', 'ai_crawler', /deepseekbot/i],\n // https://knownagents.com/agents/doubaobot\n ['DoubaoBot', 'ai_crawler', /doubaobot/i],\n // https://knownagents.com/agents/erniebot\n ['ERNIEBot', 'ai_crawler', /erniebot/i],\n // https://knownagents.com/agents/qwenbot\n ['QwenBot', 'ai_crawler', /qwenbot/i],\n // https://www.kimi.ai/policies/kimi-crawlers\n ['KimiBot', 'ai_crawler', /kimibot/i],\n // https://knownagents.com/agents/chatglm-spider\n ['ChatGLM-Spider', 'ai_crawler', /chatglm-spider/i],\n // https://docs.mistral.ai/robots\n ['MistralAI-Training', 'ai_crawler', /mistralai-training/i],\n // https://knownagents.com/agents/yandexadditional\n ['YandexAdditional', 'ai_crawler', /yandexadditional/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-Extended', 'ai_crawler', /google-extended/i],\n // https://docs.aws.amazon.com/kendra/latest/dg/what-is-kendra.html\n ['Amazon Kendra', 'ai_crawler', /amazon-kendra|kendrabot/i],\n // https://knownagents.com/agents/bedrockbot\n ['bedrockbot', 'ai_crawler', /bedrockbot/i],\n // https://brightdata.com/brightbot\n ['Brightbot', 'ai_crawler', /brightbot/i],\n // https://firecrawl.dev\n ['FirecrawlAgent', 'ai_crawler', /firecrawl/i],\n // https://github.com/unclecode/crawl4ai\n ['Crawl4AI', 'ai_crawler', /crawl4ai/i],\n // https://apify.com/apify/website-content-crawler\n ['ApifyBot', 'ai_crawler', /apify/i],\n // https://github.com/rom1504/img2dataset\n ['img2dataset', 'ai_crawler', /img2dataset/i],\n // https://knownagents.com/agents/laion-huggingface-processor\n ['LAION', 'ai_crawler', /laion/i],\n // https://developers.cloudflare.com/browser-rendering/\n ['Cloudflare Browser Rendering', 'ai_crawler', /cloudflarebrowserrendering/i],\n\n // link previews\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['facebookexternalhit', 'link_preview', /facebookexternalhit/i],\n // https://developers.facebook.com/docs/sharing/webmasters/web-crawlers\n ['Facebot', 'link_preview', /facebot/i],\n // https://developer.x.com/en/docs/x-for-websites/cards/guides/getting-started\n ['Twitterbot', 'link_preview', /twitterbot/i],\n // https://www.linkedin.com/help/linkedin/answer/a521928\n ['LinkedInBot', 'link_preview', /linkedinbot/i],\n // https://api.slack.com/robots\n ['Slackbot', 'link_preview', /slackbot|slack-imgproxy/i],\n // https://discord.com\n ['Discordbot', 'link_preview', /discordbot/i],\n // https://core.telegram.org/bots\n ['TelegramBot', 'link_preview', /telegrambot/i],\n // https://www.whatsapp.com\n ['WhatsApp', 'link_preview', /^whatsapp\\//i],\n // https://www.pinterest.com/bot.html\n ['Pinterestbot', 'link_preview', /pinterestbot|^pinterest\\/0\\./i],\n // https://www.reddit.com\n ['redditbot', 'link_preview', /redditbot/i],\n // https://developers.snap.com/robots\n ['Snap URL Preview', 'link_preview', /snap url preview/i],\n // https://knownagents.com/agents/skypeuripreview\n ['SkypeUriPreview', 'link_preview', /skypeuripreview/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['BingPreview', 'link_preview', /bingpreview|microsoftpreview/i],\n // https://iframely.com/docs/about\n ['Iframely', 'link_preview', /iframely/i],\n // https://embed.ly\n ['Embedly', 'link_preview', /embedly/i],\n // https://devtalk.kakao.com/t/scrap/33984\n ['KakaoTalk-scrap', 'link_preview', /kakaotalk-scrap/i],\n // https://vk.com/dev/Share\n ['vkShare', 'link_preview', /vkshare/i],\n // https://www.viber.com\n ['Viber', 'link_preview', /^viber\\b|viber-crawler/i],\n // https://github.com/bluesky-social/indigo\n ['Bluesky Cardyb', 'link_preview', /cardyb/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-user-triggered-fetchers\n ['Google-PageRenderer', 'link_preview', /google-pagerenderer/i],\n // https://vercel.com\n ['vercel-screenshot', 'link_preview', /vercel-screenshot/i],\n\n // SEO, marketing and page-speed tools; before the search crawlers, Lighthouse and the\n // Search Console tester borrow Google's name\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Google-InspectionTool', 'seo_tool', /google-inspectiontool/i],\n // https://developer.chrome.com/docs/lighthouse\n ['Lighthouse', 'seo_tool', /chrome-lighthouse|google page speed insights/i],\n // https://gtmetrix.com\n ['GTmetrix', 'seo_tool', /gtmetrix/i],\n // https://ahrefs.com/robot\n ['AhrefsBot', 'seo_tool', /ahrefs(?:bot|siteaudit)/i],\n // https://www.semrush.com/bot/\n ['SemrushBot', 'seo_tool', /semrush/i],\n // https://mj12bot.com\n ['MJ12bot', 'seo_tool', /mj12bot/i],\n // https://moz.com/help/moz-procedures/crawlers/dotbot\n ['DotBot', 'seo_tool', /dotbot/i],\n // https://moz.com/help/moz-procedures/crawlers/rogerbot\n ['rogerbot', 'seo_tool', /rogerbot/i],\n // https://www.screamingfrog.co.uk/seo-spider/\n ['Screaming Frog', 'seo_tool', /screaming frog/i],\n // https://serpstatbot.com\n ['SerpstatBot', 'seo_tool', /serpstatbot/i],\n // https://webmeup-crawler.com\n ['BLEXBot', 'seo_tool', /blexbot/i],\n // https://dataforseo.com/dataforseo-bot\n ['DataForSeoBot', 'seo_tool', /dataforseobot/i],\n // https://knownagents.com/agents/hubspot-crawler\n ['HubSpot', 'seo_tool', /hubspot/i],\n // https://search.google.com/structured-data/testing-tool\n ['Google-Structured-Data-Testing-Tool', 'seo_tool', /google-structured-data-testing-tool/i],\n // https://www.webpagetest.org\n ['WebPageTest', 'seo_tool', /\\bptst\\/\\d/i],\n // https://www.dareboost.com\n ['DareBoost', 'seo_tool', /dareboost/i],\n // https://www.exensa.com/crawl\n ['Barkrowler', 'seo_tool', /barkrowler/i],\n // https://seranking.com/backlinks-crawler\n ['SE Ranking', 'seo_tool', /seranking|sebot-wa/i],\n // https://www.brightedge.com\n ['BrightEdge', 'seo_tool', /brightedge/i],\n // https://searchatlas.com\n ['SearchAtlas', 'seo_tool', /searchatlas/i],\n // https://www.siteimprove.com\n ['Siteimprove', 'seo_tool', /siteimprove/i],\n // https://www.dataprovider.com\n ['Dataprovider', 'seo_tool', /dataprovider\\.com/i],\n // https://www.meltwater.com\n ['Meltwater', 'seo_tool', /meltwater/i],\n // https://awario.com/bots.html\n ['Awario', 'seo_tool', /awario/i],\n\n // search engines\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Googlebot', 'search_crawler', /googlebot/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['Storebot-Google', 'search_crawler', /storebot-google/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers\n ['GoogleOther', 'search_crawler', /googleother/i],\n // https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0\n ['Bingbot', 'search_crawler', /bingbot/i],\n // https://support.apple.com/en-us/119829\n ['Applebot', 'search_crawler', /applebot/i],\n // https://www.baidu.com/search/spider.html\n ['Baiduspider', 'search_crawler', /baiduspider/i],\n // https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.html\n ['YandexBot', 'search_crawler', /yandex(?:\\w*bot|images|metrika)/i],\n // https://duckduckgo.com/duckduckgo-help-pages/results/duckduckbot\n ['DuckDuckBot', 'search_crawler', /duckduckbot/i],\n // https://help.yahoo.com/kb/SLN22600.html\n ['Yahoo Slurp', 'search_crawler', /yahoo!?[\\s/]*slurp/i],\n // https://www.sogou.com/docs/help/webmasters.htm#07\n ['Sogou', 'search_crawler', /sogou[\\w\\s-]*spider/i],\n // https://www.so.com/help/help_3_2.html\n ['360Spider', 'search_crawler', /360spider|haosouspider/i],\n // https://knownagents.com/agents/yisouspider\n ['YisouSpider', 'search_crawler', /yisouspider/i],\n // https://webmaster.petalsearch.com/site/petalbot\n ['PetalBot', 'search_crawler', /petalbot/i],\n // https://napoveda.seznam.cz/en/seznambot-intro/\n ['SeznamBot', 'search_crawler', /seznambot/i],\n // https://knownagents.com/agents/yeti\n ['Yeti', 'search_crawler', /\\byeti\\//i],\n // https://help2.line.me/linesearchbot/web/?contentId=50006055&lang=en\n ['Linespider', 'search_crawler', /linespider/i],\n // https://help.qwant.com/bot/\n ['Qwantbot', 'search_crawler', /qwant(?:bot|ify)/i],\n // https://help.coccoc.com/searchengine\n ['coccocbot', 'search_crawler', /coccocbot/i],\n // https://www.mojeek.com/bot.html\n ['MojeekBot', 'search_crawler', /mojeekbot/i],\n // https://search.brave.com/help/brave-search-crawler\n ['Bravebot', 'search_crawler', /bravebot/i],\n // https://bot.seekport.com\n ['SeekportBot', 'search_crawler', /seekport/i],\n // https://mwmbl.org\n ['mwmbl', 'search_crawler', /mwmbl/i],\n // https://archive.org/details/archive.org_bot\n ['Internet Archive', 'search_crawler', /archive\\.org_bot|ia_archiver|archive-it|archiveteam/i],\n\n // monitoring, synthetics, security and consent scanners, service callers\n // https://www.pingdom.com\n ['Pingdom', 'monitoring', /pingdom/i],\n // https://uptimerobot.com\n ['UptimeRobot', 'monitoring', /uptimerobot/i],\n // https://www.statuscake.com\n ['StatusCake', 'monitoring', /statuscake/i],\n // https://www.site24x7.com\n ['Site24x7', 'monitoring', /site24x7/i],\n // https://betterstack.com/docs/uptime/\n ['Better Stack', 'monitoring', /better ?uptime|betterstack/i],\n // https://docs.datadoghq.com/synthetics/\n ['Datadog', 'monitoring', /datadog/i],\n // https://www.checklyhq.com/docs/\n ['Checkly', 'monitoring', /checkly/i],\n // https://docs.newrelic.com/docs/synthetics/\n ['NewRelicPinger', 'monitoring', /newrelicpinger/i],\n // https://github.com/louislam/uptime-kuma\n ['Uptime-Kuma', 'monitoring', /uptime-kuma/i],\n // https://grafana.com/docs/grafana-cloud/testing/synthetic-monitoring/\n ['Grafana Synthetic Monitoring', 'monitoring', /grafanasyntheticmonitoring/i],\n // https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring\n ['Dynatrace', 'monitoring', /ruxitsynthetic|dynatrace/i],\n // https://docs.splunk.com/observability/en/synthetics/intro-synthetics.html\n ['Splunk', 'monitoring', /splunk/i],\n // https://www.catchpoint.com\n ['Catchpoint', 'monitoring', /catchpoint/i],\n // https://ghostinspector.com\n ['Ghost Inspector', 'monitoring', /ghost inspector/i],\n // https://docs.digitalocean.com/products/uptime/\n ['DigitalOcean Uptime', 'monitoring', /digitalocean uptime/i],\n // https://ohdear.app/docs/faq/what-is-the-oh-dear-checker\n ['OhDear', 'monitoring', /ohdear/i],\n // https://developers.google.com/crawling/docs/crawlers-fetchers/google-special-case-crawlers\n ['Google-Safety', 'monitoring', /google-safety/i],\n // https://www.cookiebot.com\n ['Cookiebot', 'monitoring', /cookiebot/i],\n // https://knownagents.com/agents/onetrust-cmp-scanner\n ['OneTrust', 'monitoring', /onetrust/i],\n // https://www.cookiehub.com\n ['CookieHub', 'monitoring', /cookiehub/i],\n // https://detectify.com/bot/\n ['Detectify', 'monitoring', /detectify/i],\n // https://about.censys.io\n ['CensysInspect', 'monitoring', /censysinspect/i],\n // https://www.bitsight.com\n ['BitSightBot', 'monitoring', /bitsightbot/i],\n // https://github.com/zmap/zgrab2\n ['zgrab', 'monitoring', /zgrab/i],\n // https://nmap.org/book/nse.html\n ['Nmap', 'monitoring', /nmap scripting engine/i],\n // https://docs.stripe.com/webhooks\n ['Stripe', 'monitoring', /stripe\\/1\\.0|stripebot|merchantsecurityscanner/i],\n\n // scripted browsers\n // https://developer.chrome.com/docs/chromium/headless\n ['HeadlessChrome', 'headless_browser', /headlesschrome/i],\n // https://phantomjs.org\n ['PhantomJS', 'headless_browser', /phantomjs/i],\n // https://slimerjs.org\n ['SlimerJS', 'headless_browser', /slimerjs/i],\n // https://playwright.dev\n ['Playwright', 'headless_browser', /playwright/i],\n // https://pptr.dev\n ['Puppeteer', 'headless_browser', /puppeteer/i],\n // https://www.selenium.dev\n ['Selenium', 'headless_browser', /selenium/i],\n // https://www.cypress.io\n ['Cypress', 'headless_browser', /cypress/i],\n // https://lightpanda.io\n ['Lightpanda', 'headless_browser', /lightpanda/i],\n // https://wkhtmltopdf.org\n ['wkhtmltopdf', 'headless_browser', /wkhtmltopdf/i],\n\n // libraries and command-line clients\n // https://curl.se\n ['curl', 'http_client', /^curl\\//i],\n // https://www.gnu.org/software/wget/\n ['Wget', 'http_client', /^wget\\//i],\n // https://requests.readthedocs.io\n ['python-requests', 'http_client', /python-requests/i],\n // https://docs.python.org/3/library/urllib.request.html\n ['python-urllib', 'http_client', /python-urllib/i],\n // https://docs.aiohttp.org\n ['aiohttp', 'http_client', /aiohttp/i],\n // https://www.python-httpx.org\n ['httpx', 'http_client', /python-httpx|^httpx\\//i],\n // https://scrapy.org\n ['Scrapy', 'http_client', /scrapy/i],\n // https://pkg.go.dev/net/http\n ['Go-http-client', 'http_client', /go-http-client/i],\n // https://github.com/square/okhttp\n ['okhttp', 'http_client', /^okhttp\\//i],\n // https://hc.apache.org/httpcomponents-client-5.5.x/\n ['Java', 'http_client', /^java\\/|apache-httpclient/i],\n // https://axios-http.com\n ['axios', 'http_client', /^axios\\//i],\n // https://github.com/node-fetch/node-fetch\n ['node-fetch', 'http_client', /node-fetch/i],\n // https://undici.nodejs.org\n ['undici', 'http_client', /^undici/i],\n // https://www.postman.com\n ['PostmanRuntime', 'http_client', /postmanruntime/i],\n // https://insomnia.rest\n ['insomnia', 'http_client', /^insomnia\\//i],\n // https://metacpan.org/pod/LWP\n ['libwww-perl', 'http_client', /libwww-perl/i],\n // https://docs.guzzlephp.org\n ['Guzzle', 'http_client', /guzzlehttp/i],\n // https://developers.google.com/apps-script/reference/url-fetch\n ['Google-Apps-Script', 'http_client', /google-apps-script/i],\n // https://support.google.com/docs/answer/3093339\n ['GoogleDocs', 'http_client', /googledocs/i],\n] as const satisfies readonly (readonly [string, BotCategory, RegExp])[];\n\nconst botishToken =\n /\\b([\\w.-]*?(?:bot|crawler|spider|scraper|fetcher|agent|preview|checker|monitor)[\\w-]*)\\b/i;\nconst botishWord = /^(?:bot|crawler|spider|scraper|fetcher|agent|preview|checker|monitor)$/i;\nconst compatibleToken = /compatible;\\s*([a-z][\\w.-]*(?: [a-z][\\w.-]*)?)/i;\nconst productTokens = /([a-z][\\w.-]*)\\/\\d/gi;\nconst browserToken =\n /^(?:mozilla|applewebkit|khtml|gecko|chrome|chromium|safari|version|mobile|firefox|edg|edge|opr|msie|trident)$/i;\n\n/**\n * A name for a bot that is not in the named table, from the first of: a token that sounds like\n * one (`Bytespider`, `ABEvalBot`), the name after `compatible;` (`Google-Read-Aloud`), a product\n * token that is not a browser's (`Barkrowler/0.5`), what the generic pattern matched. URLs and\n * email addresses are dropped first, as nearly every crawler links its docs.\n */\nexport function nameOfUnknownBot(userAgent: string, matched: string): string {\n const text = userAgent\n .replace(/\\+?https?:\\/\\/\\S+/gi, ' ')\n .replace(/[\\w.+-]+@[\\w-]+(?:\\.[\\w-]+)+/g, ' ');\n\n const botish = botishToken.exec(text)?.[1];\n if (botish && !botishWord.test(botish)) return botish.slice(0, 64);\n\n const compatible = compatibleToken.exec(text)?.[1];\n if (compatible && !browserToken.test(compatible)) return compatible.slice(0, 64);\n\n for (const [, product] of text.matchAll(productTokens)) {\n if (!browserToken.test(product)) return product.slice(0, 64);\n }\n\n return matched.replace(/^\\W+|\\W+$/g, '').slice(0, 64) || 'unknown';\n}\n\n/**\n * Whether a web visitor is a bot, which one, and what kind. Run on the server when the visitor\n * is created, with the tags it was created with: the user agent is the request's header\n * (`tags.user_agent`, which the server writes), not anything the client says about itself, so\n * the verdict can be recomputed from stored tags when the rules change.\n *\n * Call it for web visitors only: a native app's requests carry an HTTP library's user agent\n * (CFNetwork, okhttp) that would read as a bot, and no crawler runs the app.\n *\n * In order: a bot we can name; a browser driven by WebDriver (`tags.webdriver`, which the SDK\n * sets from `navigator.webdriver`, the one sign a scripted browser with a normal user agent\n * gives); anything the generic pattern calls automated; no user agent at all.\n */\nexport function botOf(tags: TrackTags): Bot {\n const userAgent = typeof tags.user_agent === 'string' ? tags.user_agent.trim() : '';\n\n for (const [name, category, pattern] of NAMED_BOTS) {\n if (pattern.test(userAgent)) return { is_bot: true, bot_name: name, bot_category: category };\n }\n\n const generic = userAgent ? GENERIC_BOT.exec(userAgent) : null;\n const unknownName = generic ? nameOfUnknownBot(userAgent, generic[0]) : null;\n\n // A scripted browser that says so in its user agent takes that name, else it is just WebDriver.\n if (tags.webdriver === true) {\n return { is_bot: true, bot_name: unknownName ?? 'WebDriver', bot_category: 'headless_browser' };\n }\n\n if (unknownName) return { is_bot: true, bot_name: unknownName, bot_category: 'other' };\n\n if (!userAgent)\n return { is_bot: true, bot_name: '(no user agent)', bot_category: 'no_user_agent' };\n\n return NOT_A_BOT;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAYA,MAAa,YAAiB;CAAE,QAAQ;CAAO,UAAU;CAAM,cAAc;AAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BlF,MAAa,aAAa;CAGxB;EAAC;EAAoB;EAAe;CAAmB;CAEvD;EAAC;EAAmB;EAAe;CAAkB;CAErD;EAAC;EAAiB;EAAe;CAAgB;CAEjD;EAAC;EAAwB;EAAe;CAAuB;CAE/D;EAAC;EAAY;EAAe;CAAW;CAEvC;EAAC;EAAkB;EAAe;CAAiB;CAEnD;EAAC;EAA0B;EAAe;CAAyB;CAEnE;EAAC;EAAc;EAAe;CAAa;CAE3C;EAAC;EAAe;E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eAAe;EAAa,cAAc;CAAmB;CAGhG,IAAI,aAAa,OAAO;EAAE,QAAQ;EAAM,UAAU;EAAa,cAAc;CAAQ;CAErF,IAAI,CAAC,WACH,OAAO;EAAE,QAAQ;EAAM,UAAU;EAAmB,cAAc;CAAgB;CAEpF,OAAO;AACT"}
package/dist/index.cjs CHANGED
@@ -5,10 +5,14 @@ const require_track_index = require("./track/index.cjs");
5
5
  const require_feedback_index = require("./feedback/index.cjs");
6
6
  const require_link_index = require("./link/index.cjs");
7
7
  const require_schema_index = require("./schema/index.cjs");
8
+ const require_bot_index = require("./bot/index.cjs");
8
9
  const require_utils_stripe = require("./utils/stripe.cjs");
9
10
  const require_hooks_use_track_impression = require("./hooks/use-track-impression.cjs");
10
11
  exports.ALL_ENVIRONMENTS = require_schema_index.ALL_ENVIRONMENTS;
11
12
  exports.ALL_PLATFORMS = require_schema_index.ALL_PLATFORMS;
13
+ exports.BOT_CATEGORIES = require_bot_index.BOT_CATEGORIES;
14
+ exports.NOT_A_BOT = require_bot_index.NOT_A_BOT;
15
+ exports.botOf = require_bot_index.botOf;
12
16
  exports.createFeedbackSchema = require_schema_index.createFeedbackSchema;
13
17
  exports.createLink = require_link_index.createLink;
14
18
  exports.createLinkSchema = require_schema_index.createLinkSchema;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AllowedPropertyValues, CustomEventProperties, Environment, Platform, TrackProperties, TrackTags, UTMParams, UserProvidedData } from "./track/types.cjs";
2
+ import { BOT_CATEGORIES, Bot, BotCategory, NOT_A_BOT, botOf } from "./bot/index.cjs";
2
3
  import { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema } from "./schema/index.cjs";
3
4
  import { sendFeedback } from "./feedback/index.cjs";
4
5
  import { useTrackImpression } from "./hooks/use-track-impression.cjs";
@@ -8,4 +9,4 @@ import { sendBeacon, track, trackAsync } from "./track/index.cjs";
8
9
  import { getVisitor, setVisitor } from "./visitor/index.cjs";
9
10
  import { Link, createLink, getLink } from "./link/index.cjs";
10
11
  import { stripeMinorUnits } from "./utils/stripe.cjs";
11
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type AllowedPropertyValues, type CreateFeedbackDTO, type CreateLinkDTO, type CustomEventProperties, type Environment, type Link, type Platform, type TrackProperties, type TrackTags, type UTMParams, type UserProvidedData, type VisitorProperties, createFeedbackSchema, createLink, createLinkSchema, createTrackEventSchema, createVisitorSchema, getLink, getVisitor, sendBeacon, sendFeedback, setVisitor, setupAnalytics, stripeMinorUnits, track, trackAsync, updateVisitorSchema, useTrackImpression };
12
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type AllowedPropertyValues, BOT_CATEGORIES, type Bot, type BotCategory, type CreateFeedbackDTO, type CreateLinkDTO, type CustomEventProperties, type Environment, type Link, NOT_A_BOT, type Platform, type TrackProperties, type TrackTags, type UTMParams, type UserProvidedData, type VisitorProperties, botOf, createFeedbackSchema, createLink, createLinkSchema, createTrackEventSchema, createVisitorSchema, getLink, getVisitor, sendBeacon, sendFeedback, setVisitor, setupAnalytics, stripeMinorUnits, track, trackAsync, updateVisitorSchema, useTrackImpression };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AllowedPropertyValues, CustomEventProperties, Environment, Platform, TrackProperties, TrackTags, UTMParams, UserProvidedData } from "./track/types.mjs";
2
+ import { BOT_CATEGORIES, Bot, BotCategory, NOT_A_BOT, botOf } from "./bot/index.mjs";
2
3
  import { ALL_ENVIRONMENTS, ALL_PLATFORMS, CreateFeedbackDTO, CreateLinkDTO, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema } from "./schema/index.mjs";
3
4
  import { sendFeedback } from "./feedback/index.mjs";
4
5
  import { useTrackImpression } from "./hooks/use-track-impression.mjs";
@@ -8,4 +9,4 @@ import { sendBeacon, track, trackAsync } from "./track/index.mjs";
8
9
  import { getVisitor, setVisitor } from "./visitor/index.mjs";
9
10
  import { Link, createLink, getLink } from "./link/index.mjs";
10
11
  import { stripeMinorUnits } from "./utils/stripe.mjs";
11
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type AllowedPropertyValues, type CreateFeedbackDTO, type CreateLinkDTO, type CustomEventProperties, type Environment, type Link, type Platform, type TrackProperties, type TrackTags, type UTMParams, type UserProvidedData, type VisitorProperties, createFeedbackSchema, createLink, createLinkSchema, createTrackEventSchema, createVisitorSchema, getLink, getVisitor, sendBeacon, sendFeedback, setVisitor, setupAnalytics, stripeMinorUnits, track, trackAsync, updateVisitorSchema, useTrackImpression };
12
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, type AllowedPropertyValues, BOT_CATEGORIES, type Bot, type BotCategory, type CreateFeedbackDTO, type CreateLinkDTO, type CustomEventProperties, type Environment, type Link, NOT_A_BOT, type Platform, type TrackProperties, type TrackTags, type UTMParams, type UserProvidedData, type VisitorProperties, botOf, createFeedbackSchema, createLink, createLinkSchema, createTrackEventSchema, createVisitorSchema, getLink, getVisitor, sendBeacon, sendFeedback, setVisitor, setupAnalytics, stripeMinorUnits, track, trackAsync, updateVisitorSchema, useTrackImpression };
package/dist/index.mjs CHANGED
@@ -4,6 +4,7 @@ import { sendBeacon, track, trackAsync } from "./track/index.mjs";
4
4
  import { sendFeedback } from "./feedback/index.mjs";
5
5
  import { createLink, getLink } from "./link/index.mjs";
6
6
  import { ALL_ENVIRONMENTS, ALL_PLATFORMS, createFeedbackSchema, createLinkSchema, createTrackEventSchema, createVisitorSchema, updateVisitorSchema } from "./schema/index.mjs";
7
+ import { BOT_CATEGORIES, NOT_A_BOT, botOf } from "./bot/index.mjs";
7
8
  import { stripeMinorUnits } from "./utils/stripe.mjs";
8
9
  import { useTrackImpression } from "./hooks/use-track-impression.mjs";
9
- export { ALL_ENVIRONMENTS, ALL_PLATFORMS, createFeedbackSchema, createLink, createLinkSchema, createTrackEventSchema, createVisitorSchema, getLink, getVisitor, sendBeacon, sendFeedback, setVisitor, setupAnalytics, stripeMinorUnits, track, trackAsync, updateVisitorSchema, useTrackImpression };
10
+ export { ALL_ENVIRONMENTS, ALL_PLATFORMS, BOT_CATEGORIES, NOT_A_BOT, botOf, createFeedbackSchema, createLink, createLinkSchema, createTrackEventSchema, createVisitorSchema, getLink, getVisitor, sendBeacon, sendFeedback, setVisitor, setupAnalytics, stripeMinorUnits, track, trackAsync, updateVisitorSchema, useTrackImpression };
@@ -70,6 +70,7 @@ const tagsSchema = (0, zod_mini.object)({
70
70
  screen_width: (0, zod_mini.optional)((0, zod_mini.number)()),
71
71
  screen_height: (0, zod_mini.optional)((0, zod_mini.number)()),
72
72
  screen_resolution: (0, zod_mini.optional)((0, zod_mini.pipe)((0, zod_mini.string)().check((0, zod_mini.regex)(/^\d+x\d+$/)), (0, zod_mini.transform)((v) => v))),
73
+ webdriver: (0, zod_mini.optional)((0, zod_mini.boolean)()),
73
74
  release: (0, zod_mini.optional)((0, zod_mini.string)()),
74
75
  language: (0, zod_mini.optional)((0, zod_mini.string)()),
75
76
  time_zone: (0, zod_mini.optional)((0, zod_mini.string)()),
@@ -136,7 +137,37 @@ const visitorPropertiesSchema = (0, zod_mini.optional)((0, zod_mini.pipe)((0, zo
136
137
  (0, zod_mini.boolean)(),
137
138
  (0, zod_mini.null)()
138
139
  ])), (0, zod_mini.transform)(takeProperties)));
139
- const createTrackEventSchema = (0, zod_mini.array)((0, zod_mini.object)({
140
+ /**
141
+ * How far an event's time may be from the server's before the client clock it was stamped with is
142
+ * taken as wrong. A batch legitimately arrives late — a tab frozen in the background, a
143
+ * session_start held back after a failed batch — by hours, not days; a phone set to another year
144
+ * writes its sessions into that year.
145
+ */
146
+ const MAX_CLOCK_SKEW = 864e5;
147
+ /**
148
+ * Puts the events stamped by a wrong client clock onto the server's, where they are parsed. Only
149
+ * the events outside `MAX_CLOCK_SKEW` move, so one bad event cannot drag the rest of its batch
150
+ * along: they move together by their own latest one — the wrong clock at sending — keeping their
151
+ * order and spacing, and one still out after that (a batch mixing two wrong clocks) is on no clock
152
+ * at all and takes the server's time. Corrected rather than rejected, for the same reason values
153
+ * are truncated: a wrong clock should cost the event its time, not the batch its events.
154
+ */
155
+ function alignClock(events, now = Date.now()) {
156
+ const within = (time) => Math.abs(now - time) <= MAX_CLOCK_SKEW;
157
+ const times = events.map((event) => Date.parse(event.timestamp));
158
+ const wrong = times.filter((time) => !within(time));
159
+ if (wrong.length === 0) return events;
160
+ const offset = now - Math.max(...wrong);
161
+ return events.map((event, i) => {
162
+ if (within(times[i])) return event;
163
+ const shifted = times[i] + offset;
164
+ return {
165
+ ...event,
166
+ timestamp: new Date(within(shifted) ? shifted : now).toISOString()
167
+ };
168
+ });
169
+ }
170
+ const createTrackEventSchema = (0, zod_mini.pipe)((0, zod_mini.array)((0, zod_mini.object)({
140
171
  name: (0, zod_mini.string)().check((0, zod_mini.trim)(), (0, zod_mini.minLength)(1), (0, zod_mini.maxLength)(64)),
141
172
  visitor_id: (0, zod_mini.uuid)(),
142
173
  session_id: (0, zod_mini.uuid)(),
@@ -145,7 +176,7 @@ const createTrackEventSchema = (0, zod_mini.array)((0, zod_mini.object)({
145
176
  timestamp: zod_mini.iso.datetime(),
146
177
  tags: tagsSchema,
147
178
  properties: propertiesSchema
148
- })).check((0, zod_mini.minLength)(1), (0, zod_mini.maxLength)(100));
179
+ })).check((0, zod_mini.minLength)(1), (0, zod_mini.maxLength)(100)), (0, zod_mini.transform)((events) => alignClock(events)));
149
180
  const createVisitorSchema = (0, zod_mini.object)({
150
181
  device_id: (0, zod_mini.string)().check((0, zod_mini.trim)(), (0, zod_mini.minLength)(1), (0, zod_mini.maxLength)(36)),
151
182
  platform: (0, zod_mini.enum)(ALL_PLATFORMS),
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["pipe","string","transform","array","record","union","number","boolean","_null","object","optional","trim","minLength","maxLength","regex","uuid","_enum","iso","toLowerCase","email","e164","toUpperCase","url"],"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n enum as _enum,\n null as _null,\n array,\n boolean,\n e164,\n email,\n iso,\n maxLength,\n minLength,\n number,\n object,\n optional,\n pipe,\n record,\n regex,\n string,\n toLowerCase,\n toUpperCase,\n transform,\n trim,\n union,\n url,\n uuid,\n type z,\n} from 'zod/mini';\nimport type { Environment, Platform } from '../track/types';\n\nconst MAX_KEY_LENGTH = 128;\nconst MAX_VALUE_LENGTH = 512;\nconst MAX_PROPERTIES = 64;\n\n/**\n * Truncated rather than rejected. These schemas validate a whole batch at once, so refusing one\n * oversized value costs every event that traveled with it — and the values that overrun are the\n * ones derived from the page (a link's text, a URL carrying a long query), which no client can\n * bound in advance. A shortened value is worth more than a lost batch.\n */\nconst propertyText = pipe(\n string(),\n transform((value) => value.slice(0, MAX_VALUE_LENGTH))\n);\n\n/**\n * Keys are written by hand in instrumentation code, so an unusable one is a mistake in the host\n * rather than something the visitor typed. It is still dropped rather than rejected, for the same\n * reason: the mistake should cost that property, not the batch it happens to be in. Truncating a\n * key is not an option — two long keys would silently become one field.\n *\n * The key schema below is deliberately permissive so that this transform is reached at all; the\n * trimming it used to do happens here instead. `MAX_PROPERTIES` keeps the first N in insertion\n * order.\n */\nfunction takeProperties<T>(data: Record<string, T>): Record<string, T> {\n const result: Record<string, T> = {};\n let count = 0;\n for (const [rawKey, value] of Object.entries(data)) {\n if (count >= MAX_PROPERTIES) break;\n const key = rawKey.trim();\n if (!key || key.length > MAX_KEY_LENGTH) continue;\n result[key] = value;\n count++;\n }\n return result;\n}\n\n/**\n * Capped at GA4's own item-list limit, and truncated rather than rejected like every other\n * property limit here: an unbounded array is the one field a caller could still blow a batch\n * up with after the value and key limits.\n */\nconst MAX_ITEMS = 200;\n\nconst items = pipe(\n array(\n pipe(\n record(string(), union([propertyText, number(), boolean(), _null()])),\n transform(takeProperties)\n )\n ),\n transform((list) => list.slice(0, MAX_ITEMS))\n);\n\nexport const ALL_PLATFORMS = [\n 'ios',\n 'android',\n 'web',\n 'macos',\n 'windows',\n 'linux',\n 'unknown',\n] as const satisfies Platform[];\n\nexport const ALL_ENVIRONMENTS = ['development', 'production'] as const satisfies Environment[];\n\nexport const tagsSchema = object({\n os: optional(string()),\n os_name: optional(string()),\n os_version: optional(string()),\n browser: optional(string()),\n browser_name: optional(string()),\n browser_version: optional(string()),\n device: optional(string()),\n device_id: optional(string().check(trim(), minLength(1), maxLength(36))),\n device_type: optional(string()),\n device_vendor: optional(string()),\n device_pixel_ratio: optional(number()),\n screen_width: optional(number()),\n screen_height: optional(number()),\n screen_resolution: optional(\n pipe(\n string().check(regex(/^\\d+x\\d+$/)),\n transform((v) => v as `${number}x${number}`)\n )\n ),\n release: optional(string()),\n language: optional(string()),\n time_zone: optional(string()),\n page_location: optional(string()),\n page_referrer: optional(string()),\n page_title: optional(string()),\n page_load_id: optional(string()),\n /**\n * @deprecated Renamed to `page_location` in 7.0.0. Accepted so that events from clients\n * still on an older SDK are not stripped of their page URL at this boundary — a browser\n * bundle stays cached long after a backend deploys. Remove once those clients are gone;\n * `pageLocation` in `server/page-location.ts` is the only reader.\n */\n source_url: optional(string()),\n // app info\n advertising_id: optional(string()),\n install_referrer: optional(string()),\n // Meta Ads\n fbc: optional(string()),\n fbp: optional(string()),\n fbclid: optional(string()),\n ad_id: optional(string()),\n ad_name: optional(string()),\n adset_id: optional(string()),\n adset_name: optional(string()),\n campaign_id: optional(string()),\n campaign_name: optional(string()),\n placement: optional(string()),\n // Google Ads\n gclid: optional(string()),\n gclsrc: optional(string()),\n gad_source: optional(string()),\n gad_campaignid: optional(string()),\n // Reddit ads\n rdt_cid: optional(string()),\n rdt_uuid: optional(string()),\n // click ids\n dclid: optional(string()),\n ko_click_id: optional(string()),\n li_fat_id: optional(string()),\n msclkid: optional(string()),\n sccid: optional(string()),\n ttclid: optional(string()),\n twclid: optional(string()),\n wbraid: optional(string()),\n gbraid: optional(string()),\n yclid: optional(string()),\n // utm params\n utm_source: optional(string()),\n utm_medium: optional(string()),\n utm_campaign: optional(string()),\n utm_term: optional(string()),\n utm_content: optional(string()),\n utm_id: optional(string()),\n utm_source_platform: optional(string()),\n utm_creative_format: optional(string()),\n utm_marketing_tactic: optional(string()),\n});\n\nexport const propertiesSchema = optional(\n pipe(\n record(string(), union([propertyText, number(), boolean(), _null(), items])),\n transform(takeProperties)\n )\n);\n\n/** Visitor properties differ from event properties only in taking no nested item lists. */\nconst visitorPropertiesSchema = optional(\n pipe(\n record(string(), union([propertyText, number(), boolean(), _null()])),\n transform(takeProperties)\n )\n);\n\nexport const createTrackEventSchema = array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\n session_id: uuid(),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n timestamp: iso.datetime(),\n tags: tagsSchema,\n properties: propertiesSchema,\n })\n).check(minLength(1), maxLength(100));\n\nexport const createVisitorSchema = object({\n device_id: string().check(trim(), minLength(1), maxLength(36)),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n tags: tagsSchema,\n properties: visitorPropertiesSchema,\n});\n\nconst emailValue = pipe(string().check(trim(), toLowerCase(), maxLength(320)), email());\n\n/** E.164: a plus sign (+) prefix, country code, then digits only, no dashes/parens/spaces. */\nconst phoneValue = pipe(string().check(trim()), e164());\n\nconst addressValue = object({\n first_name: optional(string().check(trim(), maxLength(128))),\n last_name: optional(string().check(trim(), maxLength(128))),\n street: optional(string().check(trim(), maxLength(256))),\n city: optional(string().check(trim(), maxLength(128))),\n /** User province, state, or region. Example: `Hampshire` */\n region: optional(string().check(trim(), maxLength(128))),\n postal_code: optional(string().check(trim(), maxLength(32))),\n /** 2-letter country code, per the ISO 3166-1 alpha-2 standard. Example: `UK` */\n country: optional(string().check(trim(), toUpperCase(), regex(/^[A-Z]{2}$/))),\n});\n\n/**\n * User-provided data (UPD) used for enhanced conversions, Customer Match, and demographics.\n * Values are sent unhashed; Google normalizes and hashes them before they reach its servers.\n *\n * Multiple values may be sent to increase the match rate: up to 3 emails, 3 phone numbers, and\n * 2 addresses.\n *\n * @see https://support.google.com/analytics/answer/14078702\n * @see https://support.google.com/google-ads/answer/13258081\n */\nexport const userProvidedDataSchema = object({\n email: optional(union([emailValue, array(emailValue).check(minLength(1), maxLength(3))])),\n phone_number: optional(union([phoneValue, array(phoneValue).check(minLength(1), maxLength(3))])),\n address: optional(union([addressValue, array(addressValue).check(minLength(1), maxLength(2))])),\n});\n\nexport const updateVisitorSchema = object({\n user_id: optional(uuid()),\n user_data: optional(userProvidedDataSchema),\n tags: tagsSchema,\n properties: visitorPropertiesSchema,\n});\n\nexport const createFeedbackSchema = object({\n name: string().check(minLength(1), maxLength(256)),\n email: email().check(maxLength(320)),\n message: string().check(minLength(1), maxLength(65536)),\n});\n\nconst noEmptyString = pipe(\n string().check(maxLength(256)),\n transform((v) => (v ? v : undefined))\n);\n\n/**\n * The schema for creating a link.\n * @see https://support.google.com/analytics/answer/10917952\n * */\nexport const createLinkSchema = object({\n /** The URL that the user is redirected to. */\n url: url().check(minLength(1), maxLength(1024)), // required\n\n /**\n * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4\n * data import. Use the same IDs that you use when uploading campaign cost data.\n */\n utm_id: optional(noEmptyString),\n\n /** Referrer, for example: google, newsletter4, billboard */\n utm_source: string().check(minLength(1), maxLength(256)), // required\n\n /** Marketing medium, for example: cpc, banner, email */\n utm_medium: string().check(minLength(1), maxLength(256)), // required\n\n /** Product, slogan, promo code, for example, spring_sale */\n utm_campaign: string().check(minLength(1), maxLength(256)), // required\n\n /** Paid keyword */\n utm_term: optional(noEmptyString),\n\n /**\n * Use to differentiate creatives. For example, if you have two call-to-action links within the\n * same email message, you can use utm_content and set different values for each so you can tell\n * which version is more effective.\n */\n utm_content: optional(noEmptyString),\n\n /**\n * The platform responsible for directing traffic to a given Analytics property (such as a buying\n * platform that sets budgets and targeting criteria or a platform that manages organic traffic\n * data). For example, Search Ads 360 or Display & Video 360.\n */\n utm_source_platform: optional(noEmptyString),\n\n /**\n * Type of creative, for example, display, native, video, search, utm_creative_format is not\n * currently reported in Google Analytics 4 properties.\n */\n utm_creative_format: optional(noEmptyString),\n\n /**\n * Targeting criteria applied to a campaign, for example, remarketing, prospecting,\n * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.\n * */\n utm_marketing_tactic: optional(noEmptyString),\n});\n\nexport type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\nexport type CreateLinkDTO = z.output<typeof createLinkSchema>;\nexport type CreateVisitorDTO = z.output<typeof createVisitorSchema>;\nexport type UserProvidedDataDTO = z.output<typeof userProvidedDataSchema>;\nexport type UpdateVisitorDTO = z.output<typeof updateVisitorSchema>;\n"],"mappings":";;;AA4BA,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,iBAAiB;;;;;;;AAQvB,MAAM,gBAAA,GAAeA,SAAAA,KAAAA,EAAAA,GACnBC,SAAAA,OAAAA,CAAO,IAAA,GACPC,SAAAA,UAAAA,EAAW,UAAU,MAAM,MAAM,GAAG,gBAAgB,CAAC,CACvD;;;;;;;;;;;AAYA,SAAS,eAAkB,MAA4C;CACrE,MAAM,SAA4B,CAAC;CACnC,IAAI,QAAQ;CACZ,KAAK,MAAM,CAAC,QAAQ,UAAU,OAAO,QAAQ,IAAI,GAAG;EAClD,IAAI,SAAS,gBAAgB;EAC7B,MAAM,MAAM,OAAO,KAAK;EACxB,IAAI,CAAC,OAAO,IAAI,SAAS,gBAAgB;EACzC,OAAO,OAAO;EACd;CACF;CACA,OAAO;AACT;;;;;;AAOA,MAAM,YAAY;AAElB,MAAM,SAAA,GAAQF,SAAAA,KAAAA,EAAAA,GACZG,SAAAA,MAAAA,EAAAA,GACEH,SAAAA,KAAAA,EAAAA,GACEI,SAAAA,OAAAA,EAAAA,GAAOH,SAAAA,OAAAA,CAAO,IAAA,GAAGI,SAAAA,MAA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AAAA,OAAAA,CAAO,CAAC,CAAC,OAAA,GAAMY,SAAAA,UAAAA,CAAU,GAAG,CAAC,IAAA,GAC7BX,SAAAA,UAAAA,EAAW,MAAO,IAAI,IAAI,KAAA,CAAU,CACtC;;;;;AAMA,MAAa,oBAAA,GAAmBO,SAAAA,OAAAA,CAAO;;CAErC,MAAA,GAAKa,SAAAA,IAAAA,CAAI,CAAC,CAAC,OAAA,GAAMV,SAAAA,UAAAA,CAAU,CAAC,IAAA,GAAGC,SAAAA,UAAAA,CAAU,IAAI,CAAC;;;;;CAM9C,SAAA,GAAQH,SAAAA,SAAAA,CAAS,aAAa;;CAG9B,aAAA,GAAYT,SAAAA,OAAAA,CAAO,CAAC,CAAC,OAAA,GAAMW,SAAAA,UAAAA,CAAU,CAAC,IAAA,GAAGC,SAAAA,UAAAA,CAAU,GAAG,CAAC;;CAGvD,aAAA,GAAYZ,SAAAA,OAAAA,CAAO,CAAC,CAAC,OAAA,GAAMW,SAAAA,UAAAA,CAAU,CAAC,IAAA,GAAGC,SAAAA,UAAAA,CAAU,GAAG,CAAC;;CAGvD,eAAA,GAAcZ,SAAAA,OAAAA,CAAO,CAAC,CAAC,OAAA,GAAMW,SAAAA,UAAAA,CAAU,CAAC,IAAA,GAAGC,SAAAA,UAAAA,CAAU,GAAG,CAAC;;CAGzD,WAAA,GAAUH,SAAAA,SAAAA,CAAS,aAAa;;;;;;CAOhC,cAAA,GAAaA,SAAAA,SAAAA,CAAS,aAAa;;;;;;CAOnC,sBAAA,GAAqBA,SAAAA,SAAAA,CAAS,aAAa;;;;;CAM3C,sBAAA,GAAqBA,SAAAA,SAAAA,CAAS,aAAa;;;;;CAM3C,uBAAA,GAAsBA,SAAAA,SAAAA,CAAS,aAAa;AAC9C,CAAC"}
1
+ {"version":3,"file":"index.cjs","names":["pipe","string","transform","array","record","union","number","boolean","_null","object","optional","trim","minLength","maxLength","regex","uuid","_enum","iso","toLowerCase","email","e164","toUpperCase","url"],"sources":["../../src/schema/index.ts"],"sourcesContent":["import {\n enum as _enum,\n null as _null,\n array,\n boolean,\n e164,\n email,\n iso,\n maxLength,\n minLength,\n number,\n object,\n optional,\n pipe,\n record,\n regex,\n string,\n toLowerCase,\n toUpperCase,\n transform,\n trim,\n union,\n url,\n uuid,\n type z,\n} from 'zod/mini';\nimport type { Environment, Platform } from '../track/types';\n\nconst MAX_KEY_LENGTH = 128;\nconst MAX_VALUE_LENGTH = 512;\nconst MAX_PROPERTIES = 64;\n\n/**\n * Truncated rather than rejected. These schemas validate a whole batch at once, so refusing one\n * oversized value costs every event that traveled with it — and the values that overrun are the\n * ones derived from the page (a link's text, a URL carrying a long query), which no client can\n * bound in advance. A shortened value is worth more than a lost batch.\n */\nconst propertyText = pipe(\n string(),\n transform((value) => value.slice(0, MAX_VALUE_LENGTH))\n);\n\n/**\n * Keys are written by hand in instrumentation code, so an unusable one is a mistake in the host\n * rather than something the visitor typed. It is still dropped rather than rejected, for the same\n * reason: the mistake should cost that property, not the batch it happens to be in. Truncating a\n * key is not an option — two long keys would silently become one field.\n *\n * The key schema below is deliberately permissive so that this transform is reached at all; the\n * trimming it used to do happens here instead. `MAX_PROPERTIES` keeps the first N in insertion\n * order.\n */\nfunction takeProperties<T>(data: Record<string, T>): Record<string, T> {\n const result: Record<string, T> = {};\n let count = 0;\n for (const [rawKey, value] of Object.entries(data)) {\n if (count >= MAX_PROPERTIES) break;\n const key = rawKey.trim();\n if (!key || key.length > MAX_KEY_LENGTH) continue;\n result[key] = value;\n count++;\n }\n return result;\n}\n\n/**\n * Capped at GA4's own item-list limit, and truncated rather than rejected like every other\n * property limit here: an unbounded array is the one field a caller could still blow a batch\n * up with after the value and key limits.\n */\nconst MAX_ITEMS = 200;\n\nconst items = pipe(\n array(\n pipe(\n record(string(), union([propertyText, number(), boolean(), _null()])),\n transform(takeProperties)\n )\n ),\n transform((list) => list.slice(0, MAX_ITEMS))\n);\n\nexport const ALL_PLATFORMS = [\n 'ios',\n 'android',\n 'web',\n 'macos',\n 'windows',\n 'linux',\n 'unknown',\n] as const satisfies Platform[];\n\nexport const ALL_ENVIRONMENTS = ['development', 'production'] as const satisfies Environment[];\n\nexport const tagsSchema = object({\n os: optional(string()),\n os_name: optional(string()),\n os_version: optional(string()),\n browser: optional(string()),\n browser_name: optional(string()),\n browser_version: optional(string()),\n device: optional(string()),\n device_id: optional(string().check(trim(), minLength(1), maxLength(36))),\n device_type: optional(string()),\n device_vendor: optional(string()),\n device_pixel_ratio: optional(number()),\n screen_width: optional(number()),\n screen_height: optional(number()),\n screen_resolution: optional(\n pipe(\n string().check(regex(/^\\d+x\\d+$/)),\n transform((v) => v as `${number}x${number}`)\n )\n ),\n webdriver: optional(boolean()),\n release: optional(string()),\n language: optional(string()),\n time_zone: optional(string()),\n page_location: optional(string()),\n page_referrer: optional(string()),\n page_title: optional(string()),\n page_load_id: optional(string()),\n /**\n * @deprecated Renamed to `page_location` in 7.0.0. Accepted so that events from clients\n * still on an older SDK are not stripped of their page URL at this boundary — a browser\n * bundle stays cached long after a backend deploys. Remove once those clients are gone;\n * `pageLocation` in `server/page-location.ts` is the only reader.\n */\n source_url: optional(string()),\n // app info\n advertising_id: optional(string()),\n install_referrer: optional(string()),\n // Meta Ads\n fbc: optional(string()),\n fbp: optional(string()),\n fbclid: optional(string()),\n ad_id: optional(string()),\n ad_name: optional(string()),\n adset_id: optional(string()),\n adset_name: optional(string()),\n campaign_id: optional(string()),\n campaign_name: optional(string()),\n placement: optional(string()),\n // Google Ads\n gclid: optional(string()),\n gclsrc: optional(string()),\n gad_source: optional(string()),\n gad_campaignid: optional(string()),\n // Reddit ads\n rdt_cid: optional(string()),\n rdt_uuid: optional(string()),\n // click ids\n dclid: optional(string()),\n ko_click_id: optional(string()),\n li_fat_id: optional(string()),\n msclkid: optional(string()),\n sccid: optional(string()),\n ttclid: optional(string()),\n twclid: optional(string()),\n wbraid: optional(string()),\n gbraid: optional(string()),\n yclid: optional(string()),\n // utm params\n utm_source: optional(string()),\n utm_medium: optional(string()),\n utm_campaign: optional(string()),\n utm_term: optional(string()),\n utm_content: optional(string()),\n utm_id: optional(string()),\n utm_source_platform: optional(string()),\n utm_creative_format: optional(string()),\n utm_marketing_tactic: optional(string()),\n});\n\nexport const propertiesSchema = optional(\n pipe(\n record(string(), union([propertyText, number(), boolean(), _null(), items])),\n transform(takeProperties)\n )\n);\n\n/** Visitor properties differ from event properties only in taking no nested item lists. */\nconst visitorPropertiesSchema = optional(\n pipe(\n record(string(), union([propertyText, number(), boolean(), _null()])),\n transform(takeProperties)\n )\n);\n\n/**\n * How far an event's time may be from the server's before the client clock it was stamped with is\n * taken as wrong. A batch legitimately arrives late — a tab frozen in the background, a\n * session_start held back after a failed batch — by hours, not days; a phone set to another year\n * writes its sessions into that year.\n */\nconst MAX_CLOCK_SKEW = 24 * 60 * 60 * 1000;\n\n/**\n * Puts the events stamped by a wrong client clock onto the server's, where they are parsed. Only\n * the events outside `MAX_CLOCK_SKEW` move, so one bad event cannot drag the rest of its batch\n * along: they move together by their own latest one — the wrong clock at sending — keeping their\n * order and spacing, and one still out after that (a batch mixing two wrong clocks) is on no clock\n * at all and takes the server's time. Corrected rather than rejected, for the same reason values\n * are truncated: a wrong clock should cost the event its time, not the batch its events.\n */\nfunction alignClock<T extends { timestamp: string }>(events: T[], now = Date.now()): T[] {\n const within = (time: number) => Math.abs(now - time) <= MAX_CLOCK_SKEW;\n const times = events.map((event) => Date.parse(event.timestamp));\n const wrong = times.filter((time) => !within(time));\n if (wrong.length === 0) return events;\n const offset = now - Math.max(...wrong);\n return events.map((event, i) => {\n if (within(times[i])) return event;\n const shifted = times[i] + offset;\n return { ...event, timestamp: new Date(within(shifted) ? shifted : now).toISOString() };\n });\n}\n\nexport const createTrackEventSchema = pipe(\n array(\n object({\n name: string().check(trim(), minLength(1), maxLength(64)),\n visitor_id: uuid(),\n session_id: uuid(),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n timestamp: iso.datetime(),\n tags: tagsSchema,\n properties: propertiesSchema,\n })\n ).check(minLength(1), maxLength(100)),\n transform((events) => alignClock(events))\n);\n\nexport const createVisitorSchema = object({\n device_id: string().check(trim(), minLength(1), maxLength(36)),\n platform: _enum(ALL_PLATFORMS),\n environment: _enum(ALL_ENVIRONMENTS),\n tags: tagsSchema,\n properties: visitorPropertiesSchema,\n});\n\nconst emailValue = pipe(string().check(trim(), toLowerCase(), maxLength(320)), email());\n\n/** E.164: a plus sign (+) prefix, country code, then digits only, no dashes/parens/spaces. */\nconst phoneValue = pipe(string().check(trim()), e164());\n\nconst addressValue = object({\n first_name: optional(string().check(trim(), maxLength(128))),\n last_name: optional(string().check(trim(), maxLength(128))),\n street: optional(string().check(trim(), maxLength(256))),\n city: optional(string().check(trim(), maxLength(128))),\n /** User province, state, or region. Example: `Hampshire` */\n region: optional(string().check(trim(), maxLength(128))),\n postal_code: optional(string().check(trim(), maxLength(32))),\n /** 2-letter country code, per the ISO 3166-1 alpha-2 standard. Example: `UK` */\n country: optional(string().check(trim(), toUpperCase(), regex(/^[A-Z]{2}$/))),\n});\n\n/**\n * User-provided data (UPD) used for enhanced conversions, Customer Match, and demographics.\n * Values are sent unhashed; Google normalizes and hashes them before they reach its servers.\n *\n * Multiple values may be sent to increase the match rate: up to 3 emails, 3 phone numbers, and\n * 2 addresses.\n *\n * @see https://support.google.com/analytics/answer/14078702\n * @see https://support.google.com/google-ads/answer/13258081\n */\nexport const userProvidedDataSchema = object({\n email: optional(union([emailValue, array(emailValue).check(minLength(1), maxLength(3))])),\n phone_number: optional(union([phoneValue, array(phoneValue).check(minLength(1), maxLength(3))])),\n address: optional(union([addressValue, array(addressValue).check(minLength(1), maxLength(2))])),\n});\n\nexport const updateVisitorSchema = object({\n user_id: optional(uuid()),\n user_data: optional(userProvidedDataSchema),\n tags: tagsSchema,\n properties: visitorPropertiesSchema,\n});\n\nexport const createFeedbackSchema = object({\n name: string().check(minLength(1), maxLength(256)),\n email: email().check(maxLength(320)),\n message: string().check(minLength(1), maxLength(65536)),\n});\n\nconst noEmptyString = pipe(\n string().check(maxLength(256)),\n transform((v) => (v ? v : undefined))\n);\n\n/**\n * The schema for creating a link.\n * @see https://support.google.com/analytics/answer/10917952\n * */\nexport const createLinkSchema = object({\n /** The URL that the user is redirected to. */\n url: url().check(minLength(1), maxLength(1024)), // required\n\n /**\n * Campaign ID. Used to identify a specific campaign or promotion. This is a required key for GA4\n * data import. Use the same IDs that you use when uploading campaign cost data.\n */\n utm_id: optional(noEmptyString),\n\n /** Referrer, for example: google, newsletter4, billboard */\n utm_source: string().check(minLength(1), maxLength(256)), // required\n\n /** Marketing medium, for example: cpc, banner, email */\n utm_medium: string().check(minLength(1), maxLength(256)), // required\n\n /** Product, slogan, promo code, for example, spring_sale */\n utm_campaign: string().check(minLength(1), maxLength(256)), // required\n\n /** Paid keyword */\n utm_term: optional(noEmptyString),\n\n /**\n * Use to differentiate creatives. For example, if you have two call-to-action links within the\n * same email message, you can use utm_content and set different values for each so you can tell\n * which version is more effective.\n */\n utm_content: optional(noEmptyString),\n\n /**\n * The platform responsible for directing traffic to a given Analytics property (such as a buying\n * platform that sets budgets and targeting criteria or a platform that manages organic traffic\n * data). For example, Search Ads 360 or Display & Video 360.\n */\n utm_source_platform: optional(noEmptyString),\n\n /**\n * Type of creative, for example, display, native, video, search, utm_creative_format is not\n * currently reported in Google Analytics 4 properties.\n */\n utm_creative_format: optional(noEmptyString),\n\n /**\n * Targeting criteria applied to a campaign, for example, remarketing, prospecting,\n * utm_marketing_tactic is not currently reported in Google Analytics 4 properties.\n * */\n utm_marketing_tactic: optional(noEmptyString),\n});\n\nexport type CreateTrackEventDTO = z.output<typeof createTrackEventSchema>;\nexport type CreateFeedbackDTO = z.output<typeof createFeedbackSchema>;\nexport type CreateLinkDTO = z.output<typeof createLinkSchema>;\nexport type CreateVisitorDTO = z.output<typeof createVisitorSchema>;\nexport type UserProvidedDataDTO = z.output<typeof userProvidedDataSchema>;\nexport type UpdateVisitorDTO = z.output<typeof updateV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,aAAa;;;;;CAM3C,sBAAA,GAAqBA,SAAAA,SAAAA,CAAS,aAAa;;;;;CAM3C,uBAAA,GAAsBA,SAAAA,SAAAA,CAAS,aAAa;AAC9C,CAAC"}
@@ -17,6 +17,7 @@ export declare const tagsSchema: z.ZodMiniObject<{
17
17
  screen_width: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
18
18
  screen_height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
19
19
  screen_resolution: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`${number}x${number}`, string>>>;
20
+ webdriver: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
20
21
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
21
22
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
22
23
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -64,7 +65,7 @@ export declare const tagsSchema: z.ZodMiniObject<{
64
65
  utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniString<string>>;
65
66
  }, z.core.$strip>;
66
67
  export declare const propertiesSchema: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
67
- export declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
68
+ export declare const createTrackEventSchema: z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniObject<{
68
69
  name: z.ZodMiniString<string>;
69
70
  visitor_id: z.ZodMiniUUID;
70
71
  session_id: z.ZodMiniUUID;
@@ -97,6 +98,7 @@ export declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
97
98
  screen_width: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
98
99
  screen_height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
99
100
  screen_resolution: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`${number}x${number}`, string>>>;
101
+ webdriver: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
100
102
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
101
103
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
102
104
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -144,7 +146,147 @@ export declare const createTrackEventSchema: z.ZodMiniArray<z.ZodMiniObject<{
144
146
  utm_marketing_tactic: z.ZodMiniOptional<z.ZodMiniString<string>>;
145
147
  }, z.core.$strip>;
146
148
  properties: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull, z.ZodMiniPipe<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<string, string>>, z.ZodMiniNumber<number>, z.ZodMiniBoolean<boolean>, z.ZodMiniNull]>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>, z.ZodMiniTransform<Record<string, string | number | boolean | null>[], Record<string, string | number | boolean | null>[]>>]>>, z.ZodMiniTransform<Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>, Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null>>>>;
147
- }, z.core.$strip>>;
149
+ }, z.core.$strip>>, z.ZodMiniTransform<{
150
+ name: string;
151
+ visitor_id: string;
152
+ session_id: string;
153
+ platform: "android" | "ios" | "linux" | "macos" | "unknown" | "web" | "windows";
154
+ environment: "development" | "production";
155
+ timestamp: string;
156
+ tags: {
157
+ os?: string | undefined;
158
+ os_name?: string | undefined;
159
+ os_version?: string | undefined;
160
+ browser?: string | undefined;
161
+ browser_name?: string | undefined;
162
+ browser_version?: string | undefined;
163
+ device?: string | undefined;
164
+ device_id?: string | undefined;
165
+ device_type?: string | undefined;
166
+ device_vendor?: string | undefined;
167
+ device_pixel_ratio?: number | undefined;
168
+ screen_width?: number | undefined;
169
+ screen_height?: number | undefined;
170
+ screen_resolution?: `${number}x${number}` | undefined;
171
+ webdriver?: boolean | undefined;
172
+ release?: string | undefined;
173
+ language?: string | undefined;
174
+ time_zone?: string | undefined;
175
+ page_location?: string | undefined;
176
+ page_referrer?: string | undefined;
177
+ page_title?: string | undefined;
178
+ page_load_id?: string | undefined;
179
+ source_url?: string | undefined;
180
+ advertising_id?: string | undefined;
181
+ install_referrer?: string | undefined;
182
+ fbc?: string | undefined;
183
+ fbp?: string | undefined;
184
+ fbclid?: string | undefined;
185
+ ad_id?: string | undefined;
186
+ ad_name?: string | undefined;
187
+ adset_id?: string | undefined;
188
+ adset_name?: string | undefined;
189
+ campaign_id?: string | undefined;
190
+ campaign_name?: string | undefined;
191
+ placement?: string | undefined;
192
+ gclid?: string | undefined;
193
+ gclsrc?: string | undefined;
194
+ gad_source?: string | undefined;
195
+ gad_campaignid?: string | undefined;
196
+ rdt_cid?: string | undefined;
197
+ rdt_uuid?: string | undefined;
198
+ dclid?: string | undefined;
199
+ ko_click_id?: string | undefined;
200
+ li_fat_id?: string | undefined;
201
+ msclkid?: string | undefined;
202
+ sccid?: string | undefined;
203
+ ttclid?: string | undefined;
204
+ twclid?: string | undefined;
205
+ wbraid?: string | undefined;
206
+ gbraid?: string | undefined;
207
+ yclid?: string | undefined;
208
+ utm_source?: string | undefined;
209
+ utm_medium?: string | undefined;
210
+ utm_campaign?: string | undefined;
211
+ utm_term?: string | undefined;
212
+ utm_content?: string | undefined;
213
+ utm_id?: string | undefined;
214
+ utm_source_platform?: string | undefined;
215
+ utm_creative_format?: string | undefined;
216
+ utm_marketing_tactic?: string | undefined;
217
+ };
218
+ properties?: Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null> | undefined;
219
+ }[], {
220
+ name: string;
221
+ visitor_id: string;
222
+ session_id: string;
223
+ platform: "android" | "ios" | "linux" | "macos" | "unknown" | "web" | "windows";
224
+ environment: "development" | "production";
225
+ timestamp: string;
226
+ tags: {
227
+ os?: string | undefined;
228
+ os_name?: string | undefined;
229
+ os_version?: string | undefined;
230
+ browser?: string | undefined;
231
+ browser_name?: string | undefined;
232
+ browser_version?: string | undefined;
233
+ device?: string | undefined;
234
+ device_id?: string | undefined;
235
+ device_type?: string | undefined;
236
+ device_vendor?: string | undefined;
237
+ device_pixel_ratio?: number | undefined;
238
+ screen_width?: number | undefined;
239
+ screen_height?: number | undefined;
240
+ screen_resolution?: `${number}x${number}` | undefined;
241
+ webdriver?: boolean | undefined;
242
+ release?: string | undefined;
243
+ language?: string | undefined;
244
+ time_zone?: string | undefined;
245
+ page_location?: string | undefined;
246
+ page_referrer?: string | undefined;
247
+ page_title?: string | undefined;
248
+ page_load_id?: string | undefined;
249
+ source_url?: string | undefined;
250
+ advertising_id?: string | undefined;
251
+ install_referrer?: string | undefined;
252
+ fbc?: string | undefined;
253
+ fbp?: string | undefined;
254
+ fbclid?: string | undefined;
255
+ ad_id?: string | undefined;
256
+ ad_name?: string | undefined;
257
+ adset_id?: string | undefined;
258
+ adset_name?: string | undefined;
259
+ campaign_id?: string | undefined;
260
+ campaign_name?: string | undefined;
261
+ placement?: string | undefined;
262
+ gclid?: string | undefined;
263
+ gclsrc?: string | undefined;
264
+ gad_source?: string | undefined;
265
+ gad_campaignid?: string | undefined;
266
+ rdt_cid?: string | undefined;
267
+ rdt_uuid?: string | undefined;
268
+ dclid?: string | undefined;
269
+ ko_click_id?: string | undefined;
270
+ li_fat_id?: string | undefined;
271
+ msclkid?: string | undefined;
272
+ sccid?: string | undefined;
273
+ ttclid?: string | undefined;
274
+ twclid?: string | undefined;
275
+ wbraid?: string | undefined;
276
+ gbraid?: string | undefined;
277
+ yclid?: string | undefined;
278
+ utm_source?: string | undefined;
279
+ utm_medium?: string | undefined;
280
+ utm_campaign?: string | undefined;
281
+ utm_term?: string | undefined;
282
+ utm_content?: string | undefined;
283
+ utm_id?: string | undefined;
284
+ utm_source_platform?: string | undefined;
285
+ utm_creative_format?: string | undefined;
286
+ utm_marketing_tactic?: string | undefined;
287
+ };
288
+ properties?: Record<string, string | number | boolean | Record<string, string | number | boolean | null>[] | null> | undefined;
289
+ }[]>>;
148
290
  export declare const createVisitorSchema: z.ZodMiniObject<{
149
291
  device_id: z.ZodMiniString<string>;
150
292
  platform: z.ZodMiniEnum<{
@@ -175,6 +317,7 @@ export declare const createVisitorSchema: z.ZodMiniObject<{
175
317
  screen_width: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
176
318
  screen_height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
177
319
  screen_resolution: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`${number}x${number}`, string>>>;
320
+ webdriver: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
178
321
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
179
322
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
180
323
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -292,6 +435,7 @@ export declare const updateVisitorSchema: z.ZodMiniObject<{
292
435
  screen_width: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
293
436
  screen_height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
294
437
  screen_resolution: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<`${number}x${number}`, string>>>;
438
+ webdriver: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
295
439
  release: z.ZodMiniOptional<z.ZodMiniString<string>>;
296
440
  language: z.ZodMiniOptional<z.ZodMiniString<string>>;
297
441
  time_zone: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/schema/index.ts"],"mappings":";;qBAmFa;qBAUA;qBAEA,YAAU,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ErB,EAAA,KAAA;qBAEW,kBAAgB,EAAA,gBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,mCAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,aAAA,EAAA,YAAA,EAAA,aAAA,EAAA,YAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,mCAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,gBAAA,EAAA,iBAAA,kDAAA,qDAAA,EAAA,iBAAA,oDAAA,yDAAA,EAAA,iBAAA,2CAAA,4DAAA,2CAAA;qBAehB,wBAAsB,EAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWE,EAAA,KAAA;qBAExB,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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