@nuxt/scripts 1.0.0-beta.13 → 1.0.0-beta.15
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.
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{48AF9EJD.js → C4LyqEA2.js} +1 -1
- package/dist/client/_nuxt/{DP0kj6Xn.js → C4oLgKn5.js} +1 -1
- package/dist/client/_nuxt/{C4Cj8gBr.js → CAywURt7.js} +4 -4
- package/dist/client/_nuxt/{Bk6ed9rg.js → CSWa0Nc-.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/0f5f1d62-f186-4aef-a618-dcef5ec637c1.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/registry.mjs +13 -0
- package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +9 -0
- package/dist/runtime/components/ScriptVimeoPlayer.vue +12 -9
- package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +9 -0
- package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +2 -2
- package/dist/runtime/components/ScriptYouTubePlayer.vue +2 -0
- package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +2 -2
- package/dist/runtime/registry/npm.d.ts +1 -1
- package/dist/runtime/registry/npm.js +1 -3
- package/dist/types-source.d.mts +375 -0
- package/dist/types-source.d.ts +375 -0
- package/dist/types-source.mjs +1199 -0
- package/package.json +10 -5
- package/dist/client/_nuxt/builds/meta/0e95b1cc-8751-4000-8cb4-a6ef270b636f.json +0 -1
|
@@ -0,0 +1,1199 @@
|
|
|
1
|
+
import { object, pipe, string, minLength, optional, boolean, number, union, literal, array, record, any, custom } from 'valibot';
|
|
2
|
+
|
|
3
|
+
const clarity = [
|
|
4
|
+
{
|
|
5
|
+
name: "ClarityFunctions",
|
|
6
|
+
kind: "type",
|
|
7
|
+
code: "type ClarityFunctions = ((fn: 'start', options: { content: boolean, cookies: string[], dob: number, expire: number, projectId: string, upload: string }) => void)\n & ((fn: 'identify', id: string, session?: string, page?: string, userHint?: string) => Promise<{\n id: string\n session: string\n page: string\n userHint: string\n }>)\n & ((fn: 'consent', enabled?: boolean) => void)\n & ((fn: 'set', key: any, value: any) => void)\n & ((fn: 'event', value: any) => void)\n & ((fn: 'upgrade', upgradeReason: any) => void)\n & ((fn: string, ...args: any[]) => void)"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: "ClarityApi",
|
|
11
|
+
kind: "interface",
|
|
12
|
+
code: "export interface ClarityApi {\n clarity: ClarityFunctions & {\n q: any[]\n v: string\n }\n}"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "ClarityOptions",
|
|
16
|
+
kind: "const",
|
|
17
|
+
code: "export const ClarityOptions = object({\n /**\n * The Clarity token.\n */\n id: pipe(string(), minLength(10)),\n})"
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
const crisp = [
|
|
21
|
+
{
|
|
22
|
+
name: "CrispOptions",
|
|
23
|
+
kind: "const",
|
|
24
|
+
code: "export const CrispOptions = object({\n /**\n * The Crisp ID.\n */\n id: string(),\n /**\n * Extra configuration options. Used to configure the locale.\n * Same as CRISP_RUNTIME_CONFIG.\n * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/language-customization/\n */\n runtimeConfig: optional(object({\n locale: optional(string()),\n })),\n /**\n * Associated a session, equivalent to using CRISP_TOKEN_ID variable.\n * Same as CRISP_TOKEN_ID.\n * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/session-continuity/\n */\n tokenId: optional(string()),\n /**\n * Restrict the domain that the Crisp cookie is set on.\n * Same as CRISP_COOKIE_DOMAIN.\n * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/\n */\n cookieDomain: optional(string()),\n /**\n * The cookie expiry in seconds.\n * Same as CRISP_COOKIE_EXPIRATION.\n * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/#change-cookie-expiration-date\n */\n cookieExpiry: optional(number()),\n})"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "CrispApi",
|
|
28
|
+
kind: "interface",
|
|
29
|
+
code: "export interface CrispApi {\n push: (...args: any[]) => void\n is: (name: 'chat:opened' | 'chat:closed' | 'chat:visible' | 'chat:hidden' | 'chat:small' | 'chat:large' | 'session:ongoing' | 'website:available' | 'overlay:opened' | 'overlay:closed' | string) => boolean\n set: (name: 'message:text' | 'session:data' | 'session:segments' | 'session:event' | 'user:email' | 'user:phone' | 'user:nickname' | 'user:avatar' | 'user:company' | string, value: any) => void\n get: (name: 'chat:unread:count' | 'message:text' | 'session:identifier' | 'session:data' | 'user:email' | 'user:phone' | 'user:nickname' | 'user:avatar' | 'user:company' | string) => any\n do: (name: 'chat:open' | 'chat:close' | 'chat:toggle' | 'chat:show' | 'chat:hide' | 'helpdesk:search' | 'helpdesk:article:open' | 'helpdesk:query' | 'overlay:open' | 'overlay:close' | 'message:send' | 'message:show' | 'message:read' | 'message:thread:start' | 'message:thread:end' | 'session:reset' | 'trigger:run' | string, arg2?: any) => any\n on: (name: 'session:loaded' | 'chat:initiated' | 'chat:opened' | 'chat:closed' | 'message:sent' | 'message:received' | 'message:compose:sent' | 'message:compose:received' | 'user:email:changed' | 'user:phone:changed' | 'user:nickname:changed' | 'user:avatar:changed' | 'website:availability:changed' | 'helpdesk:queried' | string, callback: (...args: any[]) => any) => void\n off: (name: 'session:loaded' | 'chat:initiated' | 'chat:opened' | 'chat:closed' | 'message:sent' | 'message:received' | 'message:compose:sent' | 'message:compose:received' | 'user:email:changed' | 'user:phone:changed' | 'user:nickname:changed' | 'user:avatar:changed' | 'website:availability:changed' | 'helpdesk:queried' | string, callback: (...args: any[]) => any) => void\n config: (options: any) => void\n help: () => void\n [key: string]: any\n}"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "ScriptCrispProps",
|
|
33
|
+
kind: "interface",
|
|
34
|
+
code: "interface ScriptCrispProps {\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n id: string\n runtimeConfig?: {\n locale: string\n }\n tokenId?: string\n cookieDomain?: string\n cookieExpiry?: number\n}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "ScriptCrispDefaults",
|
|
38
|
+
kind: "const",
|
|
39
|
+
code: "const ScriptCrispDefaults = {\n \"trigger\": \"'click'\"\n}"
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
const hotjar = [
|
|
43
|
+
{
|
|
44
|
+
name: "HotjarApi",
|
|
45
|
+
kind: "interface",
|
|
46
|
+
code: "export interface HotjarApi {\n hj: ((event: 'identify', userId: string, attributes?: Record<string, any>) => void) & ((event: 'stateChange', path: string) => void) & ((event: 'event', eventName: string) => void) & ((event: string, arg?: string) => void) & ((...params: any[]) => void) & {\n q: any[]\n }\n}"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "HotjarOptions",
|
|
50
|
+
kind: "const",
|
|
51
|
+
code: "export const HotjarOptions = object({\n id: number(),\n sv: optional(number()),\n})"
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
const intercom = [
|
|
55
|
+
{
|
|
56
|
+
name: "IntercomOptions",
|
|
57
|
+
kind: "const",
|
|
58
|
+
code: "export const IntercomOptions = object({\n app_id: string(),\n api_base: optional(union([literal('https://api-iam.intercom.io'), literal('https://api-iam.eu.intercom.io'), literal('https://api-iam.au.intercom.io')])),\n name: optional(string()),\n email: optional(string()),\n user_id: optional(string()),\n // customizing the messenger\n alignment: optional(union([literal('left'), literal('right')])),\n horizontal_padding: optional(number()),\n vertical_padding: optional(number()),\n})"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "IntercomApi",
|
|
62
|
+
kind: "interface",
|
|
63
|
+
code: "export interface IntercomApi {\n Intercom: ((event: 'boot', data?: InferInput<typeof IntercomOptions>) => void)\n & ((event: 'shutdown') => void)\n & ((event: 'update', options?: InferInput<typeof IntercomOptions>) => void)\n & ((event: 'hide') => void)\n & ((event: 'show') => void)\n & ((event: 'showSpace', spaceName: 'home' | 'messages' | 'help' | 'news' | 'tasks' | 'tickets' | string) => void)\n & ((event: 'showMessages') => void)\n & ((event: 'showNewMessage', content?: string) => void)\n & ((event: 'onHide', fn: () => void) => void)\n & ((event: 'onShow', fn: () => void) => void)\n & ((event: 'onUnreadCountChange', fn: () => void) => void)\n & ((event: 'trackEvent', eventName: string, metadata?: Record<string, any>) => void)\n & ((event: 'getVisitorId') => Promise<string>)\n & ((event: 'startTour', tourId: string | number) => void)\n & ((event: 'showArticle', articleId: string | number) => void)\n & ((event: 'showNews', newsItemId: string | number) => void)\n & ((event: 'startSurvey', surveyId: string | number) => void)\n & ((event: 'startChecklist', checklistId: string | number) => void)\n & ((event: 'showTicket', ticketId: string | number) => void)\n & ((event: 'showConversation', conversationId: string | number) => void)\n & ((event: 'onUserEmailSupplied', fn: () => void) => void)\n & ((event: string, ...params: any[]) => void)\n}"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "ScriptIntercomProps",
|
|
67
|
+
kind: "interface",
|
|
68
|
+
code: "interface ScriptIntercomProps {\n appId: string\n apiBase?: string\n name?: string\n email?: string\n userId?: string\n // customizing the messenger\n alignment?: 'left' | 'right'\n horizontalPadding?: number\n verticalPadding?: number\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n}"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "ScriptIntercomDefaults",
|
|
72
|
+
kind: "const",
|
|
73
|
+
code: "const ScriptIntercomDefaults = {\n \"trigger\": \"'click'\"\n}"
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
const npm = [
|
|
77
|
+
{
|
|
78
|
+
name: "Provider",
|
|
79
|
+
kind: "type",
|
|
80
|
+
code: "type Provider = 'jsdelivr' | 'cdnjs' | 'unpkg'"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "NpmOptions",
|
|
84
|
+
kind: "const",
|
|
85
|
+
code: "export const NpmOptions = object({\n packageName: string(),\n file: optional(string()),\n version: optional(string()),\n provider: optional(union([literal('jsdelivr'), literal('cdnjs'), literal('unpkg')])),\n})"
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
const paypal = [
|
|
89
|
+
{
|
|
90
|
+
name: "PayPalApi",
|
|
91
|
+
kind: "interface",
|
|
92
|
+
code: "export interface PayPalApi {\n paypal: PayPalNamespace\n}"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "PayPalOptions",
|
|
96
|
+
kind: "const",
|
|
97
|
+
code: "export const PayPalOptions = object({\n clientId: string(),\n buyerCountry: optional(string()),\n commit: optional(string()),\n components: optional(union([string(), array(string())])),\n currency: optional(string()),\n debug: optional(union([string(), boolean()])),\n disableFunding: optional(union([string(), array(string())])),\n enableFunding: optional(union([string(), array(string())])),\n integrationDate: optional(string()),\n intent: optional(string()),\n locale: optional(string()),\n /**\n * loadScript() supports an array for merchantId, even though\n * merchant-id technically may not contain multiple values.\n * For an array with a length of > 1 it automatically sets\n * merchantId to \"*\" and moves the actual values to dataMerchantId\n */\n merchantId: optional(union([string(), array(string())])),\n partnerAttributionId: optional(string()),\n vault: optional(union([string(), boolean()])),\n // own props\n sandbox: optional(boolean()),\n})"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "ScriptPayPalButtonsProps",
|
|
101
|
+
kind: "interface",
|
|
102
|
+
code: "interface ScriptPayPalButtonsProps {\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n * The client id for the paypal script.\n */\n clientId?: string\n /**\n * The options for the paypal buttons.\n */\n buttonOptions?: PayPalButtonsComponentOptions\n /**\n * The paypal script options.\n */\n paypalScriptOptions?: Partial<PayPalInput>\n /**\n * Disables the paypal buttons.\n */\n disabled?: boolean\n}"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "ScriptPayPalButtonsDefaults",
|
|
106
|
+
kind: "const",
|
|
107
|
+
code: "const ScriptPayPalButtonsDefaults = {\n \"trigger\": \"'visible'\",\n \"clientId\": \"'test'\",\n \"disabled\": \"false\",\n \"buttonOptions\": \"() => ({})\",\n \"paypalScriptOptions\": \"() => ({})\"\n}"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "ScriptPayPalMarksProps",
|
|
111
|
+
kind: "interface",
|
|
112
|
+
code: "interface ScriptPayPalMarksProps {\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n * The client id for the paypal script.\n */\n clientId?: string\n /**\n * The options for the paypal marks.\n */\n marksOptions?: PayPalMarksComponentOptions\n /**\n * The paypal script options.\n */\n paypalScriptOptions?: Partial<PayPalInput>\n}"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "ScriptPayPalMarksDefaults",
|
|
116
|
+
kind: "const",
|
|
117
|
+
code: "const ScriptPayPalMarksDefaults = {\n \"trigger\": \"'visible'\",\n \"clientId\": \"'test'\",\n \"marksOptions\": \"() => ({})\",\n \"paypalScriptOptions\": \"() => ({})\"\n}"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "ScriptPayPalMessagesProps",
|
|
121
|
+
kind: "interface",
|
|
122
|
+
code: "interface ScriptPayPalMessagesProps {\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n * The client id for the paypal script.\n */\n clientId?: string\n /**\n * The options for the paypal buttons.\n */\n messagesOptions?: PayPalMessagesComponentOptions\n /**\n * The merchant id for the paypal script.\n */\n merchantId?: string\n /**\n * The partner attribution id for the paypal script.\n */\n partnerAttributionId?: string\n /**\n * The options for the paypal scipt.\n */\n paypalScriptOptions?: Partial<PayPalInput>\n}"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "ScriptPayPalMessagesDefaults",
|
|
126
|
+
kind: "const",
|
|
127
|
+
code: "const ScriptPayPalMessagesDefaults = {\n \"trigger\": \"'visible'\",\n \"clientId\": \"'test'\",\n \"paypalScriptOptions\": \"() => ({})\",\n \"messagesOptions\": \"() => ({})\"\n}"
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
const posthog = [
|
|
131
|
+
{
|
|
132
|
+
name: "PostHogOptions",
|
|
133
|
+
kind: "const",
|
|
134
|
+
code: "export const PostHogOptions = object({\n apiKey: string(),\n region: optional(union([literal('us'), literal('eu')])),\n apiHost: optional(string()),\n autocapture: optional(boolean()),\n capturePageview: optional(union([boolean(), literal('history_change')])),\n capturePageleave: optional(boolean()),\n disableSessionRecording: optional(boolean()),\n config: optional(record(string(), any())),\n})"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "PostHogApi",
|
|
138
|
+
kind: "interface",
|
|
139
|
+
code: "export interface PostHogApi {\n posthog: PostHog\n}"
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
const segment = [
|
|
143
|
+
{
|
|
144
|
+
name: "SegmentOptions",
|
|
145
|
+
kind: "const",
|
|
146
|
+
code: "export const SegmentOptions = object({\n writeKey: string(),\n analyticsKey: optional(string()),\n})"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "AnalyticsApi",
|
|
150
|
+
kind: "interface",
|
|
151
|
+
code: "interface AnalyticsApi {\n track: (event: string, properties?: Record<string, any>) => void\n page: (name?: string, properties?: Record<string, any>) => void\n identify: (userId: string, traits?: Record<string, any>, options?: Record<string, any>) => void\n group: (groupId: string, traits?: Record<string, any>, options?: Record<string, any>) => void\n alias: (userId: string, previousId: string, options?: Record<string, any>) => void\n reset: () => void\n /**\n * @internal\n */\n methods: string[]\n /**\n * @internal\n */\n factory: (method: string) => (...args: any[]) => AnalyticsApi\n /**\n * @internal\n */\n push: (args: any[]) => void\n}"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "SegmentApi",
|
|
155
|
+
kind: "type",
|
|
156
|
+
code: "export type SegmentApi = Pick<AnalyticsApi, 'track' | 'page' | 'identify' | 'group' | 'alias' | 'reset'>"
|
|
157
|
+
}
|
|
158
|
+
];
|
|
159
|
+
const stripe = [
|
|
160
|
+
{
|
|
161
|
+
name: "StripeOptions",
|
|
162
|
+
kind: "const",
|
|
163
|
+
code: "export const StripeOptions = object({\n advancedFraudSignals: optional(boolean()),\n})"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "StripeApi",
|
|
167
|
+
kind: "interface",
|
|
168
|
+
code: "export interface StripeApi {\n Stripe: StripeConstructor\n}"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "ScriptStripePricingTableProps",
|
|
172
|
+
kind: "interface",
|
|
173
|
+
code: "interface ScriptStripePricingTableProps {\n trigger?: ElementScriptTrigger\n publishableKey: string\n pricingTableId: string\n clientReferenceId?: string\n customerEmail?: string\n customerSessionClientSecret?: string\n}"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "ScriptStripePricingTableDefaults",
|
|
177
|
+
kind: "const",
|
|
178
|
+
code: "const ScriptStripePricingTableDefaults = {\n \"trigger\": \"'visible'\"\n}"
|
|
179
|
+
}
|
|
180
|
+
];
|
|
181
|
+
const registryTypes = {
|
|
182
|
+
clarity: clarity,
|
|
183
|
+
"cloudflare-web-analytics": [
|
|
184
|
+
{
|
|
185
|
+
name: "CloudflareWebAnalyticsApi",
|
|
186
|
+
kind: "interface",
|
|
187
|
+
code: "export interface CloudflareWebAnalyticsApi {\n __cfBeacon: {\n load: 'single'\n spa: boolean\n token: string\n }\n}"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: "CloudflareWebAnalyticsOptions",
|
|
191
|
+
kind: "const",
|
|
192
|
+
code: "export const CloudflareWebAnalyticsOptions = object({\n /**\n * The Cloudflare Web Analytics token.\n */\n token: pipe(string(), minLength(32)),\n /**\n * Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API’s pushState function\n * and listening to the onpopstate. Hash-based router is not supported.\n *\n * @default true\n */\n spa: optional(boolean()),\n})"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
crisp: crisp,
|
|
196
|
+
"databuddy-analytics": [
|
|
197
|
+
{
|
|
198
|
+
name: "DatabuddyAnalyticsOptions",
|
|
199
|
+
kind: "const",
|
|
200
|
+
code: "export const DatabuddyAnalyticsOptions = object({\n // Required\n clientId: string(),\n\n // Advanced\n scriptUrl: optional(string()), // defaults to https://cdn.databuddy.cc/databuddy.js\n apiUrl: optional(string()), // defaults to https://basket.databuddy.cc\n disabled: optional(boolean()),\n\n // Core tracking (enabled by default by SDK)\n trackScreenViews: optional(boolean()),\n trackPerformance: optional(boolean()),\n trackSessions: optional(boolean()),\n\n // Optional tracking\n trackWebVitals: optional(boolean()),\n trackErrors: optional(boolean()),\n trackOutgoingLinks: optional(boolean()),\n trackScrollDepth: optional(boolean()),\n trackEngagement: optional(boolean()),\n trackInteractions: optional(boolean()),\n trackAttributes: optional(boolean()),\n trackHashChanges: optional(boolean()),\n trackExitIntent: optional(boolean()),\n trackBounceRate: optional(boolean()),\n\n // Performance options\n enableBatching: optional(boolean()),\n batchSize: optional(number()),\n batchTimeout: optional(number()),\n enableRetries: optional(boolean()),\n maxRetries: optional(number()),\n initialRetryDelay: optional(number()),\n samplingRate: optional(number()),\n\n // SDK metadata\n sdk: optional(string()),\n sdkVersion: optional(string()),\n\n // Observability & logging (accepted by SDK config)\n enableObservability: optional(boolean()),\n observabilityService: optional(string()),\n observabilityEnvironment: optional(string()),\n observabilityVersion: optional(string()),\n enableLogging: optional(boolean()),\n enableTracing: optional(boolean()),\n enableErrorTracking: optional(boolean()),\n})"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "DatabuddyAnalyticsApi",
|
|
204
|
+
kind: "interface",
|
|
205
|
+
code: "export interface DatabuddyAnalyticsApi {\n /**\n * Track a custom event.\n * @param eventName Name of the event (use snake_case)\n * @param properties Optional event properties\n */\n track: (eventName: string, properties?: Record<string, any>) => Promise<any> | any | void\n\n /**\n * Manually record a page / screen view. Useful for SPA route changes.\n * @param path Optional path to record (defaults to current location)\n * @param properties Optional additional properties for the screen view\n */\n screenView: (path?: string, properties?: Record<string, any>) => void\n\n /**\n * Set properties that will be attached to all future events (e.g. user_id).\n * @param properties Key/value map of properties to attach globally\n */\n setGlobalProperties: (properties: Record<string, any>) => void\n\n /**\n * Track a custom event alias (compatibility helper present on the global)\n * @param eventName Name of the event\n * @param properties Optional event properties\n */\n trackCustomEvent: (eventName: string, properties?: Record<string, any>) => void\n\n /**\n * Clears session and anonymous identifiers (useful on logout).\n */\n clear: () => void\n\n /**\n * Force immediate sending of any queued/batched events.\n */\n flush: () => void\n}"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"fathom-analytics": [
|
|
209
|
+
{
|
|
210
|
+
name: "FathomAnalyticsOptions",
|
|
211
|
+
kind: "const",
|
|
212
|
+
code: "export const FathomAnalyticsOptions = object({\n /**\n * The Fathom Analytics site ID.\n */\n site: string(),\n /**\n * The Fathom Analytics tracking mode.\n */\n spa: optional(union([literal('auto'), literal('history'), literal('hash')])),\n /**\n * Automatically track page views.\n */\n auto: optional(boolean()),\n /**\n * Enable canonical URL tracking.\n */\n canonical: optional(boolean()),\n /**\n * Honor Do Not Track requests.\n */\n honorDnt: optional(boolean()),\n})"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "FathomAnalyticsApi",
|
|
216
|
+
kind: "interface",
|
|
217
|
+
code: "export interface FathomAnalyticsApi {\n beacon: (ctx: { url: string, referrer?: string }) => void\n blockTrackingForMe: () => void\n enableTrackingForMe: () => void\n isTrackingEnabled: () => boolean\n send: (type: string, data: unknown) => void\n setSite: (siteId: string) => void\n sideId: string\n trackPageview: (ctx?: { url: string, referrer?: string }) => void\n trackGoal: (goalId: string, cents: number) => void\n trackEvent: (eventName: string, value: { _value: number }) => void\n}"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"google-adsense": [
|
|
221
|
+
{
|
|
222
|
+
name: "GoogleAdsenseOptions",
|
|
223
|
+
kind: "const",
|
|
224
|
+
code: "export const GoogleAdsenseOptions = object({\n /**\n * The Google Adsense ID.\n */\n client: optional(string()),\n /**\n * Enable or disable Auto Ads.\n */\n autoAds: optional(boolean()),\n})"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "GoogleAdsenseApi",
|
|
228
|
+
kind: "interface",
|
|
229
|
+
code: "export interface GoogleAdsenseApi {\n /**\n * The Google Adsense API.\n */\n adsbygoogle: any[] & { loaded?: boolean }\n}"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "ScriptGoogleAdsenseProps",
|
|
233
|
+
kind: "interface",
|
|
234
|
+
code: "interface ScriptGoogleAdsenseProps {\n dataAdClient: string\n dataAdSlot: string\n dataAdFormat?: 'auto' | 'rectangle' | 'vertical' | 'horizontal' | 'fluid' | 'autorelaxed'\n dataAdLayout?: 'in-article' | 'in-feed' | 'fixed'\n dataFullWidthResponsive?: boolean\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n}"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "ScriptGoogleAdsenseDefaults",
|
|
238
|
+
kind: "const",
|
|
239
|
+
code: "const ScriptGoogleAdsenseDefaults = {\n \"dataFullWidthResponsive\": \"true\",\n \"dataAdFormat\": \"undefined\"\n}"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"google-analytics": [
|
|
243
|
+
{
|
|
244
|
+
name: "GtagCustomParams",
|
|
245
|
+
kind: "type",
|
|
246
|
+
code: "export type GtagCustomParams = Record<string, any>"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "ConsentStatus",
|
|
250
|
+
kind: "type",
|
|
251
|
+
code: "export type ConsentStatus = 'granted' | 'denied'"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: "ConsentOptions",
|
|
255
|
+
kind: "interface",
|
|
256
|
+
code: "export interface ConsentOptions {\n ad_user_data?: ConsentStatus\n ad_personalization?: ConsentStatus\n ad_storage?: ConsentStatus\n analytics_storage?: ConsentStatus\n functionality_storage?: ConsentStatus\n personalization_storage?: ConsentStatus\n security_storage?: ConsentStatus\n wait_for_update?: number\n region?: string[]\n}"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "ConfigParams",
|
|
260
|
+
kind: "interface",
|
|
261
|
+
code: "export interface ConfigParams extends GtagCustomParams {\n send_page_view?: boolean\n transport_url?: string\n cookie_domain?: string\n cookie_prefix?: string\n cookie_expires?: number\n cookie_update?: boolean\n cookie_flags?: string\n user_id?: string\n}"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: "EventParameters",
|
|
265
|
+
kind: "interface",
|
|
266
|
+
code: "export interface EventParameters extends GtagCustomParams {\n value?: number\n currency?: string\n transaction_id?: string\n items?: Array<{\n item_id?: string\n item_name?: string\n item_category?: string\n item_variant?: string\n price?: number\n quantity?: number\n [key: string]: any\n }>\n [key: string]: any\n}"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: "DefaultEventName",
|
|
270
|
+
kind: "type",
|
|
271
|
+
code: "export type DefaultEventName\n = | 'add_payment_info'\n | 'add_shipping_info'\n | 'add_to_cart'\n | 'add_to_wishlist'\n | 'begin_checkout'\n | 'purchase'\n | 'refund'\n | 'remove_from_cart'\n | 'select_item'\n | 'select_promotion'\n | 'view_cart'\n | 'view_item'\n | 'view_item_list'\n | 'view_promotion'\n | 'login'\n | 'sign_up'\n | 'search'\n | 'page_view'\n | 'screen_view'\n | string"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "GTag",
|
|
275
|
+
kind: "interface",
|
|
276
|
+
code: "export interface GTag {\n // Initialize gtag.js with timestamp\n (command: 'js', value: Date): void\n\n // Configure a GA4 property\n (command: 'config', targetId: string, configParams?: ConfigParams): void\n\n // Get a value from gtag\n (command: 'get', targetId: string, fieldName: string, callback?: (field: any) => void): void\n\n // Send an event to GA4\n (command: 'event', eventName: DefaultEventName, eventParams?: EventParameters): void\n\n // Set default parameters for all subsequent events\n (command: 'set', params: GtagCustomParams): void\n\n // Update consent state\n (command: 'consent', consentArg: 'default' | 'update', consentParams: ConsentOptions): void\n}"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: "DataLayerObject",
|
|
280
|
+
kind: "interface",
|
|
281
|
+
code: "export interface DataLayerObject {\n event?: string\n [key: string]: any\n}"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: "DataLayer",
|
|
285
|
+
kind: "type",
|
|
286
|
+
code: "export type DataLayer = Array<DataLayerObject>"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "GoogleAnalyticsApi",
|
|
290
|
+
kind: "interface",
|
|
291
|
+
code: "export interface GoogleAnalyticsApi {\n gtag: GTag\n dataLayer: DataLayer\n}"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "GoogleAnalyticsOptions",
|
|
295
|
+
kind: "const",
|
|
296
|
+
code: "export const GoogleAnalyticsOptions = object({\n id: optional(string()), // The GA4 measurement ID (format: G-XXXXXXXX)\n l: optional(string()), // Optional global name for dataLayer (defaults to 'dataLayer')\n})"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"google-maps": [
|
|
300
|
+
{
|
|
301
|
+
name: "GoogleMapsOptions",
|
|
302
|
+
kind: "const",
|
|
303
|
+
code: "export const GoogleMapsOptions = object({\n apiKey: string(),\n libraries: optional(array(string())),\n language: optional(string()),\n region: optional(string()),\n v: optional(union([literal('weekly'), literal('quarterly'), literal('beta'), literal('alpha'), string()])),\n})"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: "MapsNamespace",
|
|
307
|
+
kind: "type",
|
|
308
|
+
code: "type MapsNamespace = typeof window.google.maps"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: "GoogleMapsApi",
|
|
312
|
+
kind: "interface",
|
|
313
|
+
code: "export interface GoogleMapsApi {\n maps: Promise<MapsNamespace>\n}"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: "ScriptGoogleMapsProps",
|
|
317
|
+
kind: "interface",
|
|
318
|
+
code: "interface ScriptGoogleMapsProps {\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n * Is Google Maps being rendered above the fold?\n * This will load the placeholder image with higher priority.\n */\n aboveTheFold?: boolean\n /**\n * Defines the Google Maps API key. Must have access to the Static Maps API as well.\n */\n apiKey?: string\n /**\n * A latitude / longitude of where to focus the map.\n */\n center?: google.maps.LatLng | google.maps.LatLngLiteral | `${string},${string}`\n /**\n * Should a marker be displayed on the map where the centre is.\n */\n centerMarker?: boolean\n /**\n * Options for the map.\n */\n mapOptions?: google.maps.MapOptions\n /**\n * Defines the region of the map.\n */\n region?: string\n /**\n * Defines the language of the map\n */\n language?: string\n /**\n * Defines the version of google maps js API\n */\n version?: string\n /**\n * Defines the width of the map.\n */\n width?: number | string\n /**\n * Defines the height of the map\n */\n height?: number | string\n /**\n * Customize the placeholder image attributes.\n *\n * @see https://developers.google.com/maps/documentation/maps-static/start.\n */\n placeholderOptions?: PlaceholderOptions\n /**\n * Customize the placeholder image attributes.\n */\n placeholderAttrs?: ImgHTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Extra Markers to add to the map.\n */\n markers?: (`${string},${string}` | google.maps.marker.AdvancedMarkerElementOptions)[]\n /**\n * Map IDs for light and dark color modes.\n * When provided, the map will automatically switch styles based on color mode.\n * Requires @nuxtjs/color-mode or manual colorMode prop.\n */\n mapIds?: { light?: string, dark?: string }\n /**\n * Manual color mode control. When provided, overrides auto-detection from @nuxtjs/color-mode.\n * Accepts 'light', 'dark', or a reactive ref.\n */\n colorMode?: 'light' | 'dark'\n}"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: "ScriptGoogleMapsDefaults",
|
|
322
|
+
kind: "const",
|
|
323
|
+
code: "const ScriptGoogleMapsDefaults = {\n \"trigger\": \"['mouseenter', 'mouseover', 'mousedown']\",\n \"width\": \"640\",\n \"height\": \"400\",\n \"centerMarker\": \"true\"\n}"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
name: "ScriptGoogleMapsAdvancedMarkerElementProps",
|
|
327
|
+
kind: "interface",
|
|
328
|
+
code: "interface ScriptGoogleMapsAdvancedMarkerElementProps {\n options?: Omit<google.maps.marker.AdvancedMarkerElementOptions, 'map'>\n}"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "ScriptGoogleMapsCircleProps",
|
|
332
|
+
kind: "interface",
|
|
333
|
+
code: "interface ScriptGoogleMapsCircleProps {\n options?: Omit<google.maps.CircleOptions, 'map'>\n}"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: "ScriptGoogleMapsHeatmapLayerProps",
|
|
337
|
+
kind: "interface",
|
|
338
|
+
code: "interface ScriptGoogleMapsHeatmapLayerProps {\n options?: Omit<google.maps.visualization.HeatmapLayerOptions, 'map'>\n}"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: "ScriptGoogleMapsInfoWindowProps",
|
|
342
|
+
kind: "interface",
|
|
343
|
+
code: "interface ScriptGoogleMapsInfoWindowProps {\n options?: google.maps.InfoWindowOptions\n}"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: "ScriptGoogleMapsMarkerProps",
|
|
347
|
+
kind: "interface",
|
|
348
|
+
code: "interface ScriptGoogleMapsMarkerProps {\n options?: Omit<google.maps.MarkerOptions, 'map'>\n}"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "ScriptGoogleMapsMarkerClustererProps",
|
|
352
|
+
kind: "interface",
|
|
353
|
+
code: "interface ScriptGoogleMapsMarkerClustererProps {\n options?: Omit<MarkerClustererOptions, 'map'>\n}"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: "ScriptGoogleMapsPinElementProps",
|
|
357
|
+
kind: "interface",
|
|
358
|
+
code: "interface ScriptGoogleMapsPinElementProps {\n options?: Omit<google.maps.marker.PinElementOptions, 'map'>\n}"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "ScriptGoogleMapsPolygonProps",
|
|
362
|
+
kind: "interface",
|
|
363
|
+
code: "interface ScriptGoogleMapsPolygonProps {\n options?: Omit<google.maps.PolygonOptions, 'map'>\n}"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
name: "ScriptGoogleMapsPolylineProps",
|
|
367
|
+
kind: "interface",
|
|
368
|
+
code: "interface ScriptGoogleMapsPolylineProps {\n options?: Omit<google.maps.PolylineOptions, 'map'>\n}"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: "ScriptGoogleMapsRectangleProps",
|
|
372
|
+
kind: "interface",
|
|
373
|
+
code: "interface ScriptGoogleMapsRectangleProps {\n options?: Omit<google.maps.RectangleOptions, 'map'>\n}"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"google-recaptcha": [
|
|
377
|
+
{
|
|
378
|
+
name: "GoogleRecaptchaOptions",
|
|
379
|
+
kind: "const",
|
|
380
|
+
code: "export const GoogleRecaptchaOptions = object({\n siteKey: string(),\n // Use enterprise.js instead of api.js\n enterprise: optional(boolean()),\n // Use recaptcha.net (works in China)\n recaptchaNet: optional(boolean()),\n // Language code\n hl: optional(string()),\n})"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "GoogleRecaptchaApi",
|
|
384
|
+
kind: "interface",
|
|
385
|
+
code: "export interface GoogleRecaptchaApi {\n grecaptcha: {\n ready: (callback: () => void) => void\n execute: (siteKey: string, options: { action: string }) => Promise<string>\n enterprise?: {\n ready: (callback: () => void) => void\n execute: (siteKey: string, options: { action: string }) => Promise<string>\n }\n }\n}"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"google-sign-in": [
|
|
389
|
+
{
|
|
390
|
+
name: "CredentialResponse",
|
|
391
|
+
kind: "interface",
|
|
392
|
+
code: "export interface CredentialResponse {\n credential: string // JWT token\n select_by: 'auto' | 'user' | 'user_1tap' | 'user_2tap' | 'btn' | 'btn_confirm' | 'btn_add_session' | 'btn_confirm_add_session'\n clientId?: string\n}"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: "IdConfiguration",
|
|
396
|
+
kind: "interface",
|
|
397
|
+
code: "export interface IdConfiguration {\n client_id: string\n auto_select?: boolean\n callback?: (response: CredentialResponse) => void\n login_uri?: string\n native_callback?: (response: CredentialResponse) => void\n cancel_on_tap_outside?: boolean\n prompt_parent_id?: string\n nonce?: string\n context?: 'signin' | 'signup' | 'use'\n state_cookie_domain?: string\n ux_mode?: 'popup' | 'redirect'\n allowed_parent_origin?: string | string[]\n intermediate_iframe_close_callback?: () => void\n itp_support?: boolean\n login_hint?: string\n hd?: string\n use_fedcm_for_prompt?: boolean\n}"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
name: "GsiButtonConfiguration",
|
|
401
|
+
kind: "interface",
|
|
402
|
+
code: "export interface GsiButtonConfiguration {\n type?: 'standard' | 'icon'\n theme?: 'outline' | 'filled_blue' | 'filled_black'\n size?: 'large' | 'medium' | 'small'\n text?: 'signin_with' | 'signup_with' | 'continue_with' | 'signin'\n shape?: 'rectangular' | 'pill' | 'circle' | 'square'\n logo_alignment?: 'left' | 'center'\n width?: string | number\n locale?: string\n click_listener?: () => void\n // FedCM support for button flow (mandatory from August 2025)\n use_fedcm?: boolean\n}"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: "MomentType",
|
|
406
|
+
kind: "type",
|
|
407
|
+
code: "export type MomentType\n = | 'display'\n | 'skipped'\n | 'dismissed'"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "MomentNotification",
|
|
411
|
+
kind: "interface",
|
|
412
|
+
code: "export interface MomentNotification {\n isDisplayMoment: () => boolean\n isDisplayed: () => boolean\n isNotDisplayed: () => boolean\n getNotDisplayedReason: () =>\n | 'browser_not_supported'\n | 'invalid_client'\n | 'missing_client_id'\n | 'opt_out_or_no_session'\n | 'secure_http_required'\n | 'suppressed_by_user'\n | 'unregistered_origin'\n | 'unknown_reason'\n isSkippedMoment: () => boolean\n getSkippedReason: () =>\n | 'auto_cancel'\n | 'user_cancel'\n | 'tap_outside'\n | 'issuing_failed'\n isDismissedMoment: () => boolean\n getDismissedReason: () =>\n | 'credential_returned'\n | 'cancel_called'\n | 'flow_restarted'\n getMomentType: () => MomentType\n}"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
name: "RevocationResponse",
|
|
416
|
+
kind: "interface",
|
|
417
|
+
code: "export interface RevocationResponse {\n successful: boolean\n error?: string\n}"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "AccountsNamespace",
|
|
421
|
+
kind: "type",
|
|
422
|
+
code: "type AccountsNamespace = typeof google.accounts"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: "GoogleSignInApi",
|
|
426
|
+
kind: "interface",
|
|
427
|
+
code: "export interface GoogleSignInApi {\n accounts: AccountsNamespace\n}"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "GoogleSignInOptions",
|
|
431
|
+
kind: "const",
|
|
432
|
+
code: "export const GoogleSignInOptions = object({\n clientId: string(),\n // Auto-select credentials if only one is available\n autoSelect: optional(boolean()),\n // Context for One Tap (signin, signup, or use)\n context: optional(union([literal('signin'), literal('signup'), literal('use')])),\n // FedCM API support (Privacy Sandbox) - mandatory from August 2025\n useFedcmForPrompt: optional(boolean()),\n // Cancel One Tap if user clicks outside\n cancelOnTapOutside: optional(boolean()),\n // UX mode: popup or redirect\n uxMode: optional(union([literal('popup'), literal('redirect')])),\n // Login URI for redirect flow\n loginUri: optional(string()),\n // ITP (Intelligent Tracking Prevention) support\n itpSupport: optional(boolean()),\n // Allowed parent origins for iframe embedding\n allowedParentOrigin: optional(union([string(), array(string())])),\n // Hosted domain - restrict to specific Google Workspace domain\n hd: optional(string()),\n})"
|
|
433
|
+
}
|
|
434
|
+
],
|
|
435
|
+
"google-tag-manager": [
|
|
436
|
+
{
|
|
437
|
+
name: "DataLayerItem",
|
|
438
|
+
kind: "type",
|
|
439
|
+
code: "export type DataLayerItem = Parameters<GTag> | Record<string, unknown>"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: "DataLayer",
|
|
443
|
+
kind: "type",
|
|
444
|
+
code: "export type DataLayer = Array<DataLayerItem>"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: "DataLayerPush",
|
|
448
|
+
kind: "interface",
|
|
449
|
+
code: "export interface DataLayerPush {\n (...args: Parameters<GTag>): void\n (obj: Record<string, unknown> | any[]): void\n}"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
name: "GoogleTagManagerDataLayerApi",
|
|
453
|
+
kind: "interface",
|
|
454
|
+
code: "export interface GoogleTagManagerDataLayerApi {\n name: string\n push: DataLayerPush\n set: (config: Record<string, unknown>) => void\n get: <T = unknown>(key: string) => T\n reset: () => void\n listeners: Array<() => void>\n}"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
name: "GoogleTagManagerDataLayerStatus",
|
|
458
|
+
kind: "interface",
|
|
459
|
+
code: "export interface GoogleTagManagerDataLayerStatus {\n dataLayer: {\n gtmDom: boolean\n gtmLoad: boolean\n subscribers: number\n [key: string]: unknown\n }\n}"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
name: "GoogleTagManagerContainer",
|
|
463
|
+
kind: "interface",
|
|
464
|
+
code: "export interface GoogleTagManagerContainer {\n callback: () => void\n dataLayer: GoogleTagManagerDataLayerApi\n state: Record<string, unknown>\n}"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
name: "GoogleTagManagerInstance",
|
|
468
|
+
kind: "interface",
|
|
469
|
+
code: "export interface GoogleTagManagerInstance extends GoogleTagManagerDataLayerStatus {\n [containerId: string]: GoogleTagManagerContainer | any\n}"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
name: "GoogleTagManagerApi",
|
|
473
|
+
kind: "interface",
|
|
474
|
+
code: "export interface GoogleTagManagerApi {\n google_tag_manager: GoogleTagManagerInstance\n dataLayer: DataLayer & {\n push: DataLayerPush\n }\n}"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
name: "GoogleTagManagerOptions",
|
|
478
|
+
kind: "const",
|
|
479
|
+
code: "export const GoogleTagManagerOptions = object({\n /** GTM container ID (format: GTM-XXXXXX) */\n id: string(),\n\n /** Optional dataLayer variable name */\n l: optional(string()),\n\n /** Authentication token for environment-specific container versions */\n auth: optional(string()),\n\n /** Preview environment name */\n preview: optional(string()),\n\n /** Forces GTM cookies to take precedence when true */\n cookiesWin: optional(union([boolean(), literal('x')])),\n\n /** Enables debug mode when true */\n debug: optional(union([boolean(), literal('x')])),\n\n /** No Personal Advertising - disables advertising features when true */\n npa: optional(union([boolean(), literal('1')])),\n\n /** Custom dataLayer name (alternative to \"l\" property) */\n dataLayer: optional(string()),\n\n /** Environment name for environment-specific container */\n envName: optional(string()),\n\n /** Referrer policy for analytics requests */\n authReferrerPolicy: optional(string()),\n\n /** Default consent settings for GTM */\n defaultConsent: optional(record(string(), union([string(), number()]))),\n})"
|
|
480
|
+
}
|
|
481
|
+
],
|
|
482
|
+
hotjar: hotjar,
|
|
483
|
+
"instagram-embed": [
|
|
484
|
+
{
|
|
485
|
+
name: "InstagramEmbedOptions",
|
|
486
|
+
kind: "const",
|
|
487
|
+
code: "export const InstagramEmbedOptions = object({\n /**\n * The Instagram post URL to embed\n * e.g., https://www.instagram.com/p/ABC123/\n */\n postUrl: string(),\n /**\n * Whether to include captions in the embed\n * @default true\n */\n captions: optional(boolean()),\n /**\n * Custom API endpoint for fetching embed HTML\n * @default '/api/_scripts/instagram-embed'\n */\n apiEndpoint: optional(string()),\n})"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: "ScriptInstagramEmbedProps",
|
|
491
|
+
kind: "interface",
|
|
492
|
+
code: "interface ScriptInstagramEmbedProps {\n /**\n * The Instagram post URL to embed\n * e.g., https://www.instagram.com/p/ABC123/\n */\n postUrl: string\n /**\n * Whether to include captions in the embed\n * @default true\n */\n captions?: boolean\n /**\n * Custom API endpoint for fetching embed HTML\n * @default '/api/_scripts/instagram-embed'\n */\n apiEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: "ScriptInstagramEmbedDefaults",
|
|
496
|
+
kind: "const",
|
|
497
|
+
code: "const ScriptInstagramEmbedDefaults = {\n \"captions\": \"true\",\n \"apiEndpoint\": \"'/api/_scripts/instagram-embed'\"\n}"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
intercom: intercom,
|
|
501
|
+
"lemon-squeezy": [
|
|
502
|
+
{
|
|
503
|
+
name: "LemonSqueezyEventPayload",
|
|
504
|
+
kind: "type",
|
|
505
|
+
code: "export type LemonSqueezyEventPayload = { event: 'Checkout.Success', data: Record<string, any> }\n & { event: 'Checkout.ViewCart', data: Record<string, any> }\n & { event: 'GA.ViewCart', data: Record<string, any> }\n & { event: 'PaymentMethodUpdate.Mounted' }\n & { event: 'PaymentMethodUpdate.Closed' }\n & { event: 'PaymentMethodUpdate.Updated' }\n & { event: string }"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: "LemonSqueezyApi",
|
|
509
|
+
kind: "interface",
|
|
510
|
+
code: "export interface LemonSqueezyApi {\n /**\n * Initialises Lemon.js on your page.\n */\n Setup: (options: {\n eventHandler: (event: LemonSqueezyEventPayload) => void\n }) => void\n /**\n * Refreshes `lemonsqueezy-button` listeners on the page.\n */\n Refresh: () => void\n\n Url: {\n /**\n * Opens a given Lemon Squeezy URL, typically these are Checkout or Payment Details Update overlays.\n * @param url - The URL to open.\n */\n Open: (url: string) => void\n\n /**\n * Closes the current opened Lemon Squeezy overlay checkout window.\n */\n Close: () => void\n }\n Affiliate: {\n /**\n * Retrieve the affiliate tracking ID\n */\n GetID: () => string\n\n /**\n * Append the affiliate tracking parameter to the given URL\n * @param url - The URL to append the affiliate tracking parameter to.\n */\n Build: (url: string) => string\n }\n Loader: {\n /**\n * Show the Lemon.js loader.\n */\n Show: () => void\n\n /**\n * Hide the Lemon.js loader.\n */\n Hide: () => void\n }\n}"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: "ScriptLemonSqueezyProps",
|
|
514
|
+
kind: "interface",
|
|
515
|
+
code: "interface ScriptLemonSqueezyProps {\n trigger?: ElementScriptTrigger\n}"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
name: "ScriptLemonSqueezyDefaults",
|
|
519
|
+
kind: "const",
|
|
520
|
+
code: "const ScriptLemonSqueezyDefaults = {\n \"trigger\": \"'visible'\"\n}"
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
"matomo-analytics": [
|
|
524
|
+
{
|
|
525
|
+
name: "MatomoAnalyticsOptions",
|
|
526
|
+
kind: "const",
|
|
527
|
+
code: "export const MatomoAnalyticsOptions = object({\n matomoUrl: optional(string()),\n siteId: optional(union([string(), number()])),\n cloudId: optional(string()),\n trackerUrl: optional(string()),\n trackPageView: optional(boolean()),\n enableLinkTracking: optional(boolean()),\n disableCookies: optional(boolean()),\n watch: optional(boolean()),\n})"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
name: "MatomoAnalyticsApi",
|
|
531
|
+
kind: "interface",
|
|
532
|
+
code: "interface MatomoAnalyticsApi {\n _paq: unknown[]\n}"
|
|
533
|
+
}
|
|
534
|
+
],
|
|
535
|
+
"meta-pixel": [
|
|
536
|
+
{
|
|
537
|
+
name: "StandardEvents",
|
|
538
|
+
kind: "type",
|
|
539
|
+
code: "type StandardEvents = 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent'"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: "EventObjectProperties",
|
|
543
|
+
kind: "interface",
|
|
544
|
+
code: "interface EventObjectProperties {\n content_category?: string\n content_ids?: string[]\n content_name?: string\n content_type?: string\n contents?: { id: string, quantity: number }[]\n currency?: string\n delivery_category?: 'in_store' | 'curbside' | 'home_delivery'\n num_items?: number\n predicted_ltv?: number\n search_string?: string\n status?: 'completed' | 'updated' | 'viewed' | 'added_to_cart' | 'removed_from_cart' | string\n value?: number\n [key: string]: any\n}"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: "ConsentAction",
|
|
548
|
+
kind: "type",
|
|
549
|
+
code: "type ConsentAction = 'grant' | 'revoke'"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
name: "FbqArgs",
|
|
553
|
+
kind: "type",
|
|
554
|
+
code: "type FbqArgs\n = | ['track', StandardEvents, EventObjectProperties?]\n | ['trackCustom', string, EventObjectProperties?]\n | ['trackSingle', string, StandardEvents, EventObjectProperties?]\n | ['trackSingleCustom', string, string, EventObjectProperties?]\n | ['init', string]\n | ['init', number, Record<string, any>?]\n | ['consent', ConsentAction]\n // fallback: allow any fbq call signature not covered above\n | [string, ...any[]]"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
name: "FbqFns",
|
|
558
|
+
kind: "type",
|
|
559
|
+
code: "type FbqFns = (...args: FbqArgs) => void"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "MetaPixelApi",
|
|
563
|
+
kind: "interface",
|
|
564
|
+
code: "export interface MetaPixelApi {\n fbq: FbqFns & {\n push: FbqFns\n loaded: boolean\n version: string\n queue: any[]\n }\n _fbq: MetaPixelApi['fbq']\n callMethod?: FbqFns\n}"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: "MetaPixelOptions",
|
|
568
|
+
kind: "const",
|
|
569
|
+
code: "export const MetaPixelOptions = object({\n id: union([string(), number()]),\n})"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
npm: npm,
|
|
573
|
+
paypal: paypal,
|
|
574
|
+
"plausible-analytics": [
|
|
575
|
+
{
|
|
576
|
+
name: "PlausibleAnalyticsOptions",
|
|
577
|
+
kind: "interface",
|
|
578
|
+
code: "export interface PlausibleAnalyticsOptions {\n /**\n * Unique script ID for your site (recommended - new format as of October 2025)\n * Get this from your Plausible dashboard under Site Installation\n *\n * Extract it from your Plausible script URL:\n * ```\n * <script src=\"https://plausible.io/js/pa-gYyxvZhkMzdzXBAtSeSNz.js\"></script>\n * ^^^^^^^^^^^^^^^^^^^^^^^^^^\n * scriptId: 'gYyxvZhkMzdzXBAtSeSNz'\n * ```\n * @example 'gYyxvZhkMzdzXBAtSeSNz'\n */\n scriptId?: string\n /**\n * Your site domain\n * @deprecated Use `scriptId` instead (new October 2025 format)\n * @example 'example.com'\n */\n domain?: string\n /**\n * Script extensions for additional features\n * @deprecated Use init options like `hashBasedRouting`, `captureOnLocalhost`, etc. instead (new October 2025 format)\n */\n extension?: 'hash' | 'outbound-links' | 'file-downloads' | 'tagged-events' | 'revenue' | 'pageview-props' | 'compat' | 'local' | 'manual' | Array<'hash' | 'outbound-links' | 'file-downloads' | 'tagged-events' | 'revenue' | 'pageview-props' | 'compat' | 'local' | 'manual'>\n /** Custom properties to track with every pageview */\n customProperties?: Record<string, any>\n /** Custom tracking endpoint URL */\n endpoint?: string\n /** Configure file download tracking */\n fileDownloads?: {\n /** File extensions to track (default: pdf, xlsx, docx, txt, rtf, csv, exe, key, pps, ppt, pptx, 7z, pkg, rar, gz, zip, avi, mov, mp4, mpeg, wmv, midi, mp3, wav, wma, dmg) */\n fileExtensions?: string[]\n }\n /** Enable hash-based routing for single-page apps */\n hashBasedRouting?: boolean\n /** Set to false to manually trigger pageviews */\n autoCapturePageviews?: boolean\n /** Enable tracking on localhost */\n captureOnLocalhost?: boolean\n /** Enable form submission tracking */\n trackForms?: boolean\n}"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
name: "PlausibleInitOptions",
|
|
582
|
+
kind: "interface",
|
|
583
|
+
code: "export interface PlausibleInitOptions {\n customProperties?: Record<string, any>\n endpoint?: string\n fileDownloads?: {\n fileExtensions?: string[]\n }\n hashBasedRouting?: boolean\n autoCapturePageviews?: boolean\n captureOnLocalhost?: boolean\n}"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
name: "PlausibleFunction",
|
|
587
|
+
kind: "type",
|
|
588
|
+
code: "export type PlausibleFunction = ((event: '404', options: Record<string, any>) => void)\n & ((event: 'event', options: Record<string, any>) => void)\n & ((...params: any[]) => void) & {\n q: any[]\n init: (options: PlausibleInitOptions) => void\n }"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: "PlausibleAnalyticsApi",
|
|
592
|
+
kind: "interface",
|
|
593
|
+
code: "export interface PlausibleAnalyticsApi {\n plausible: PlausibleFunction\n}"
|
|
594
|
+
}
|
|
595
|
+
],
|
|
596
|
+
posthog: posthog,
|
|
597
|
+
"reddit-pixel": [
|
|
598
|
+
{
|
|
599
|
+
name: "RdtFns",
|
|
600
|
+
kind: "type",
|
|
601
|
+
code: "type RdtFns\n = & ((event: 'init', id: string) => void)\n & ((event: 'track', eventName: string) => void)"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
name: "RedditPixelApi",
|
|
605
|
+
kind: "interface",
|
|
606
|
+
code: "export interface RedditPixelApi {\n rdt: RdtFns & {\n sendEvent: (rdt: RedditPixelApi['rdt'], args: unknown[]) => void\n callQueue: unknown[]\n }\n}"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
name: "RedditPixelOptions",
|
|
610
|
+
kind: "const",
|
|
611
|
+
code: "export const RedditPixelOptions = object({\n id: string(),\n})"
|
|
612
|
+
}
|
|
613
|
+
],
|
|
614
|
+
"rybbit-analytics": [
|
|
615
|
+
{
|
|
616
|
+
name: "RybbitAnalyticsOptions",
|
|
617
|
+
kind: "const",
|
|
618
|
+
code: "export const RybbitAnalyticsOptions = object({\n siteId: union([string(), number()]), // required\n autoTrackPageview: optional(boolean()),\n trackSpa: optional(boolean()),\n trackQuery: optional(boolean()),\n trackOutbound: optional(boolean()),\n trackErrors: optional(boolean()),\n sessionReplay: optional(boolean()),\n webVitals: optional(boolean()),\n skipPatterns: optional(array(string())),\n maskPatterns: optional(array(string())),\n debounce: optional(number()),\n apiKey: optional(string()),\n})"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
name: "RybbitAnalyticsApi",
|
|
622
|
+
kind: "interface",
|
|
623
|
+
code: "export interface RybbitAnalyticsApi {\n /**\n * Tracks a page view\n */\n pageview: () => void\n\n /**\n * Tracks a custom event\n * @param name Name of the event\n * @param properties Optional properties for the event\n */\n event: (name: string, properties?: Record<string, any>) => void\n\n /**\n * Sets a custom user ID for tracking logged-in users\n * @param userId The user ID to set (will be stored in localStorage)\n */\n identify: (userId: string) => void\n\n /**\n * Clears the stored user ID\n */\n clearUserId: () => void\n\n /**\n * Gets the currently set user ID\n * @returns The current user ID or null if not set\n */\n getUserId: () => string | null\n /**\n * @deprecated use top level functions instead\n */\n rybbit: RybbitAnalyticsApi\n}"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
name: "RybbitQueueState",
|
|
627
|
+
kind: "interface",
|
|
628
|
+
code: "interface RybbitQueueState {\n queue: Array<[string, ...any[]]>\n flushed: boolean\n}"
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
segment: segment,
|
|
632
|
+
"snapchat-pixel": [
|
|
633
|
+
{
|
|
634
|
+
name: "StandardEvents",
|
|
635
|
+
kind: "type",
|
|
636
|
+
code: "type StandardEvents = 'PAGE_VIEW' | 'VIEW_CONTENT' | 'ADD_CART' | 'SIGN_UP' | 'SAVE' | 'START_CHECKOUT' | 'APP_OPEN' | 'ADD_BILLING' | 'SEARCH' | 'SUBSCRIBE' | 'AD_CLICK' | 'AD_VIEW' | 'COMPLETE_TUTORIAL' | 'LEVEL_COMPLETE' | 'INVITE' | 'LOGIN' | 'SHARE' | 'RESERVE' | 'ACHIEVEMENT_UNLOCKED' | 'ADD_TO_WISHLIST' | 'SPENT_CREDITS' | 'RATE' | 'START_TRIAL' | 'LIST_VIEW'"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
name: "EventObjectProperties",
|
|
640
|
+
kind: "interface",
|
|
641
|
+
code: "interface EventObjectProperties {\n price?: number\n client_dedup_id?: string\n currency?: string\n transaction_id?: string\n item_ids?: string[]\n item_category?: string\n description?: string\n search_string?: string\n number_items?: number\n payment_info_available?: 0 | 1\n sign_up_method?: string\n success?: 0 | 1\n brands?: string[]\n delivery_method?: 'in_store' | 'curbside' | 'delivery'\n customer_status?: 'new' | 'returning' | 'reactivated'\n event_tag?: string\n [key: string]: any\n}"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
name: "InitObjectPropertiesSchema",
|
|
645
|
+
kind: "const",
|
|
646
|
+
code: "export const InitObjectPropertiesSchema = object({\n user_email: optional(string()),\n ip_address: optional(string()),\n user_phone_number: optional(string()),\n user_hashed_email: optional(string()),\n user_hashed_phone_number: optional(string()),\n firstname: optional(string()),\n lastname: optional(string()),\n geo_city: optional(string()),\n geo_region: optional(string()),\n geo_postal_code: optional(string()),\n geo_country: optional(string()),\n age: optional(string()),\n})"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
name: "InitObjectProperties",
|
|
650
|
+
kind: "type",
|
|
651
|
+
code: "type InitObjectProperties = InferInput<typeof InitObjectPropertiesSchema>"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
name: "SnapTrFns",
|
|
655
|
+
kind: "type",
|
|
656
|
+
code: "type SnapTrFns\n = ((event: 'track', eventName: StandardEvents | '', data?: EventObjectProperties) => void)\n & ((event: 'init', id: string, data?: Record<string, any>) => void)\n & ((event: 'init', id: string, data?: InitObjectProperties) => void)\n & ((event: string, ...params: any[]) => void)"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
name: "SnapPixelApi",
|
|
660
|
+
kind: "interface",
|
|
661
|
+
code: "export interface SnapPixelApi {\n snaptr: SnapTrFns & {\n push: SnapTrFns\n loaded: boolean\n version: string\n queue: any[]\n }\n _snaptr: SnapPixelApi['snaptr']\n handleRequest?: SnapTrFns\n}"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
name: "SnapTrPixelOptions",
|
|
665
|
+
kind: "const",
|
|
666
|
+
code: "export const SnapTrPixelOptions = object({\n id: string(),\n trackPageView: optional(boolean()),\n ...(InitObjectPropertiesSchema?.entries || {}),\n})"
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
stripe: stripe,
|
|
670
|
+
"tiktok-pixel": [
|
|
671
|
+
{
|
|
672
|
+
name: "StandardEvents",
|
|
673
|
+
kind: "type",
|
|
674
|
+
code: "type StandardEvents\n = 'ViewContent'\n | 'ClickButton'\n | 'Search'\n | 'AddToWishlist'\n | 'AddToCart'\n | 'InitiateCheckout'\n | 'AddPaymentInfo'\n | 'CompletePayment'\n | 'PlaceAnOrder'\n | 'Contact'\n | 'Download'\n | 'SubmitForm'\n | 'CompleteRegistration'\n | 'Subscribe'"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: "EventProperties",
|
|
678
|
+
kind: "interface",
|
|
679
|
+
code: "interface EventProperties {\n content_id?: string\n content_type?: string\n content_name?: string\n contents?: Array<{ content_id: string, content_type?: string, content_name?: string, price?: number, quantity?: number }>\n currency?: string\n value?: number\n description?: string\n query?: string\n [key: string]: any\n}"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
name: "IdentifyProperties",
|
|
683
|
+
kind: "interface",
|
|
684
|
+
code: "interface IdentifyProperties {\n email?: string\n phone_number?: string\n external_id?: string\n}"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
name: "TtqFns",
|
|
688
|
+
kind: "type",
|
|
689
|
+
code: "type TtqFns\n = ((cmd: 'track', event: StandardEvents | string, properties?: EventProperties) => void)\n & ((cmd: 'page') => void)\n & ((cmd: 'identify', properties: IdentifyProperties) => void)\n & ((cmd: string, ...args: any[]) => void)"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: "TikTokPixelApi",
|
|
693
|
+
kind: "interface",
|
|
694
|
+
code: "export interface TikTokPixelApi {\n ttq: TtqFns & {\n push: TtqFns\n loaded: boolean\n queue: any[]\n }\n}"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
name: "TikTokPixelOptions",
|
|
698
|
+
kind: "const",
|
|
699
|
+
code: "export const TikTokPixelOptions = object({\n id: string(),\n trackPageView: optional(boolean()), // default true\n})"
|
|
700
|
+
}
|
|
701
|
+
],
|
|
702
|
+
"umami-analytics": [
|
|
703
|
+
{
|
|
704
|
+
name: "UmamiAnalyticsOptions",
|
|
705
|
+
kind: "const",
|
|
706
|
+
code: "export const UmamiAnalyticsOptions = object({\n websiteId: string(), // required\n /**\n * By default, Umami will send data to wherever the script is located.\n * You can override this to send data to another location.\n */\n hostUrl: optional(string()),\n /**\n * By default, Umami tracks all pageviews and events for you automatically.\n * You can disable this behavior and track events yourself using the tracker functions.\n * https://umami.is/docs/tracker-functions\n */\n autoTrack: optional(boolean()),\n /**\n * If you want the tracker to only run on specific domains, you can add them to your tracker script.\n * This is a comma delimited list of domain names.\n * Helps if you are working in a staging/development environment.\n */\n domains: optional(array(string())),\n /**\n * If you want the tracker to collect events under a specific tag.\n * Events can be filtered in the dashboard by a specific tag.\n */\n tag: optional(string()),\n /**\n * Function that will be called before data is sent to Umami.\n * The function takes two parameters: type and payload.\n * Return the payload to continue sending, or return a falsy value to cancel.\n */\n beforeSend: optional(union([\n custom<(type: string, payload: Record<string, any>) => Record<string, any> | null | false>(input => typeof input === 'function'),\n string(),\n ])),\n})"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: "UmamiAnalyticsApi",
|
|
710
|
+
kind: "interface",
|
|
711
|
+
code: "export interface UmamiAnalyticsApi {\n track: ((payload?: Record<string, any>) => void) & ((event_name: string, event_data: Record<string, any>) => void)\n identify: (session_data?: Record<string, any> | string) => void\n}"
|
|
712
|
+
}
|
|
713
|
+
],
|
|
714
|
+
"vimeo-player": [
|
|
715
|
+
{
|
|
716
|
+
name: "Constructor",
|
|
717
|
+
kind: "type",
|
|
718
|
+
code: "type Constructor<T extends new (...args: any) => any> = T extends new (...args: infer A) => infer R ? new (...args: A) => R : never"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: "VimeoPlayerApi",
|
|
722
|
+
kind: "interface",
|
|
723
|
+
code: "export interface VimeoPlayerApi {\n Vimeo: {\n Player: Constructor<typeof Vimeo>\n }\n}"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
name: "ScriptVimeoPlayerProps",
|
|
727
|
+
kind: "interface",
|
|
728
|
+
code: "interface ScriptVimeoPlayerProps {\n // custom\n trigger?: ElementScriptTrigger\n placeholderAttrs?: ImgHTMLAttributes\n rootAttrs?: HTMLAttributes\n aboveTheFold?: boolean\n vimeoOptions?: VimeoOptions\n id?: number | undefined\n url?: string | undefined\n ratio?: string\n /**\n * Object-fit for the placeholder image.\n *\n * @default 'contain'\n */\n placeholderObjectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down'\n}"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: "ScriptVimeoPlayerDefaults",
|
|
732
|
+
kind: "const",
|
|
733
|
+
code: "const ScriptVimeoPlayerDefaults = {\n \"trigger\": \"'mousedown'\",\n \"ratio\": \"'16/9'\",\n \"placeholderObjectFit\": \"'contain'\"\n}"
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"x-embed": [
|
|
737
|
+
{
|
|
738
|
+
name: "XEmbedTweetData",
|
|
739
|
+
kind: "interface",
|
|
740
|
+
code: "export interface XEmbedTweetData {\n id_str: string\n text: string\n created_at: string\n favorite_count: number\n conversation_count: number\n user: {\n name: string\n screen_name: string\n profile_image_url_https: string\n verified?: boolean\n is_blue_verified?: boolean\n }\n entities?: {\n media?: Array<{\n media_url_https: string\n type: string\n sizes: Record<string, { w: number, h: number }>\n }>\n urls?: Array<{\n url: string\n expanded_url: string\n display_url: string\n }>\n }\n photos?: Array<{\n url: string\n width: number\n height: number\n }>\n video?: {\n poster: string\n variants: Array<{ type: string, src: string }>\n }\n quoted_tweet?: XEmbedTweetData\n parent?: {\n user: {\n screen_name: string\n }\n }\n}"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
name: "XEmbedOptions",
|
|
744
|
+
kind: "const",
|
|
745
|
+
code: "export const XEmbedOptions = object({\n /**\n * The tweet ID to embed\n */\n tweetId: string(),\n /**\n * Optional: Custom API endpoint for fetching tweet data\n * @default '/api/_scripts/x-embed'\n */\n apiEndpoint: optional(string()),\n /**\n * Optional: Custom image proxy endpoint\n * @default '/api/_scripts/x-embed-image'\n */\n imageProxyEndpoint: optional(string()),\n})"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
name: "ScriptXEmbedProps",
|
|
749
|
+
kind: "interface",
|
|
750
|
+
code: "interface ScriptXEmbedProps {\n /**\n * The tweet ID to embed\n */\n tweetId: string\n /**\n * Custom API endpoint for fetching tweet data\n * @default '/_scripts/x-embed'\n */\n apiEndpoint?: string\n /**\n * Custom image proxy endpoint\n * @default '/_scripts/x-embed-image'\n */\n imageProxyEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
name: "ScriptXEmbedDefaults",
|
|
754
|
+
kind: "const",
|
|
755
|
+
code: "const ScriptXEmbedDefaults = {\n \"apiEndpoint\": \"'/api/_scripts/x-embed'\",\n \"imageProxyEndpoint\": \"'/api/_scripts/x-embed-image'\"\n}"
|
|
756
|
+
}
|
|
757
|
+
],
|
|
758
|
+
"x-pixel": [
|
|
759
|
+
{
|
|
760
|
+
name: "ContentProperties",
|
|
761
|
+
kind: "interface",
|
|
762
|
+
code: "interface ContentProperties {\n content_type?: string | null\n content_id?: string | number | null\n content_name?: string | null\n content_price?: string | number | null\n num_items?: string | number | null\n content_group_id?: string | number | null\n}"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: "EventObjectProperties",
|
|
766
|
+
kind: "interface",
|
|
767
|
+
code: "interface EventObjectProperties {\n // this is the same as Twitter events\n value?: string | number | null\n currency?: string | null\n conversion_id?: string | number | null\n email_address?: string | null\n phone_number?: string | null\n contents: ContentProperties[]\n}"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
name: "TwqFns",
|
|
771
|
+
kind: "type",
|
|
772
|
+
code: "type TwqFns\n = ((event: 'event', eventId: string, data?: EventObjectProperties) => void)\n & ((event: 'config', id: string) => void)\n & ((event: string, ...params: any[]) => void)"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: "XPixelApi",
|
|
776
|
+
kind: "interface",
|
|
777
|
+
code: "export interface XPixelApi {\n twq: TwqFns & {\n loaded: boolean\n version: string\n queue: any[]\n }\n}"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
name: "XPixelOptions",
|
|
781
|
+
kind: "const",
|
|
782
|
+
code: "export const XPixelOptions = object({\n id: string(),\n version: optional(string()),\n})"
|
|
783
|
+
}
|
|
784
|
+
],
|
|
785
|
+
"youtube-player": [
|
|
786
|
+
{
|
|
787
|
+
name: "YouTubePlayerApi",
|
|
788
|
+
kind: "interface",
|
|
789
|
+
code: "export interface YouTubePlayerApi {\n YT: MaybePromise<{\n Player: YT.Player\n PlayerState: YT.PlayerState\n get: (k: string) => any\n loaded: 0 | 1\n loading: 0 | 1\n ready: (f: () => void) => void\n scan: () => void\n setConfig: (config: YT.PlayerOptions) => void\n subscribe: <EventName extends keyof YT.Events>(\n event: EventName,\n listener: YT.Events[EventName],\n context?: any,\n ) => void\n unsubscribe: <EventName extends keyof YT.Events>(\n event: EventName,\n listener: YT.Events[EventName],\n context?: any,\n ) => void\n }>\n}"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
name: "ScriptYouTubePlayerProps",
|
|
793
|
+
kind: "interface",
|
|
794
|
+
code: "interface ScriptYouTubePlayerProps {\n placeholderAttrs?: ImgHTMLAttributes\n rootAttrs?: HTMLAttributes\n aboveTheFold?: boolean\n trigger?: ElementScriptTrigger\n videoId: string\n playerVars?: YT.PlayerVars\n width?: number\n height?: number\n ratio?: string\n /**\n * Whether to use youtube-nocookie.com for embedding.\n *\n * @default false\n */\n cookies?: boolean\n playerOptions?: YT.PlayerOptions\n thumbnailSize?: YoutubeThumbnailSize\n webp?: boolean\n /**\n * Object-fit for the placeholder image.\n *\n * @default 'cover'\n */\n placeholderObjectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down'\n}"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
name: "ScriptYouTubePlayerDefaults",
|
|
798
|
+
kind: "const",
|
|
799
|
+
code: "const ScriptYouTubePlayerDefaults = {\n \"cookies\": \"false\",\n \"trigger\": \"'mousedown'\",\n \"thumbnailSize\": \"'hq720'\",\n \"webp\": \"true\",\n \"playerVars\": \"{ autoplay: 0, playsinline: 1 }\",\n \"width\": \"640\",\n \"height\": \"360\",\n \"ratio\": \"'16/9'\",\n \"placeholderObjectFit\": \"'cover'\"\n}"
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
"carbon-ads": [
|
|
803
|
+
{
|
|
804
|
+
name: "ScriptCarbonAdsProps",
|
|
805
|
+
kind: "interface",
|
|
806
|
+
code: "interface ScriptCarbonAdsProps {\n serve: string\n placement: string\n format: string\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n}"
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
const ClarityOptions = object({
|
|
812
|
+
/**
|
|
813
|
+
* The Clarity token.
|
|
814
|
+
*/
|
|
815
|
+
id: pipe(string(), minLength(10))
|
|
816
|
+
});
|
|
817
|
+
const CloudflareWebAnalyticsOptions = object({
|
|
818
|
+
/**
|
|
819
|
+
* The Cloudflare Web Analytics token.
|
|
820
|
+
*/
|
|
821
|
+
token: pipe(string(), minLength(32)),
|
|
822
|
+
/**
|
|
823
|
+
* Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API’s pushState function
|
|
824
|
+
* and listening to the onpopstate. Hash-based router is not supported.
|
|
825
|
+
*
|
|
826
|
+
* @default true
|
|
827
|
+
*/
|
|
828
|
+
spa: optional(boolean())
|
|
829
|
+
});
|
|
830
|
+
const CrispOptions = object({
|
|
831
|
+
/**
|
|
832
|
+
* The Crisp ID.
|
|
833
|
+
*/
|
|
834
|
+
id: string(),
|
|
835
|
+
/**
|
|
836
|
+
* Extra configuration options. Used to configure the locale.
|
|
837
|
+
* Same as CRISP_RUNTIME_CONFIG.
|
|
838
|
+
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/language-customization/
|
|
839
|
+
*/
|
|
840
|
+
runtimeConfig: optional(object({
|
|
841
|
+
locale: optional(string())
|
|
842
|
+
})),
|
|
843
|
+
/**
|
|
844
|
+
* Associated a session, equivalent to using CRISP_TOKEN_ID variable.
|
|
845
|
+
* Same as CRISP_TOKEN_ID.
|
|
846
|
+
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/session-continuity/
|
|
847
|
+
*/
|
|
848
|
+
tokenId: optional(string()),
|
|
849
|
+
/**
|
|
850
|
+
* Restrict the domain that the Crisp cookie is set on.
|
|
851
|
+
* Same as CRISP_COOKIE_DOMAIN.
|
|
852
|
+
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/
|
|
853
|
+
*/
|
|
854
|
+
cookieDomain: optional(string()),
|
|
855
|
+
/**
|
|
856
|
+
* The cookie expiry in seconds.
|
|
857
|
+
* Same as CRISP_COOKIE_EXPIRATION.
|
|
858
|
+
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/#change-cookie-expiration-date
|
|
859
|
+
*/
|
|
860
|
+
cookieExpiry: optional(number())
|
|
861
|
+
});
|
|
862
|
+
const DatabuddyAnalyticsOptions = object({
|
|
863
|
+
// Required
|
|
864
|
+
clientId: string(),
|
|
865
|
+
// Advanced
|
|
866
|
+
scriptUrl: optional(string()),
|
|
867
|
+
// defaults to https://cdn.databuddy.cc/databuddy.js
|
|
868
|
+
apiUrl: optional(string()),
|
|
869
|
+
// defaults to https://basket.databuddy.cc
|
|
870
|
+
disabled: optional(boolean()),
|
|
871
|
+
// Core tracking (enabled by default by SDK)
|
|
872
|
+
trackScreenViews: optional(boolean()),
|
|
873
|
+
trackPerformance: optional(boolean()),
|
|
874
|
+
trackSessions: optional(boolean()),
|
|
875
|
+
// Optional tracking
|
|
876
|
+
trackWebVitals: optional(boolean()),
|
|
877
|
+
trackErrors: optional(boolean()),
|
|
878
|
+
trackOutgoingLinks: optional(boolean()),
|
|
879
|
+
trackScrollDepth: optional(boolean()),
|
|
880
|
+
trackEngagement: optional(boolean()),
|
|
881
|
+
trackInteractions: optional(boolean()),
|
|
882
|
+
trackAttributes: optional(boolean()),
|
|
883
|
+
trackHashChanges: optional(boolean()),
|
|
884
|
+
trackExitIntent: optional(boolean()),
|
|
885
|
+
trackBounceRate: optional(boolean()),
|
|
886
|
+
// Performance options
|
|
887
|
+
enableBatching: optional(boolean()),
|
|
888
|
+
batchSize: optional(number()),
|
|
889
|
+
batchTimeout: optional(number()),
|
|
890
|
+
enableRetries: optional(boolean()),
|
|
891
|
+
maxRetries: optional(number()),
|
|
892
|
+
initialRetryDelay: optional(number()),
|
|
893
|
+
samplingRate: optional(number()),
|
|
894
|
+
// SDK metadata
|
|
895
|
+
sdk: optional(string()),
|
|
896
|
+
sdkVersion: optional(string()),
|
|
897
|
+
// Observability & logging (accepted by SDK config)
|
|
898
|
+
enableObservability: optional(boolean()),
|
|
899
|
+
observabilityService: optional(string()),
|
|
900
|
+
observabilityEnvironment: optional(string()),
|
|
901
|
+
observabilityVersion: optional(string()),
|
|
902
|
+
enableLogging: optional(boolean()),
|
|
903
|
+
enableTracing: optional(boolean()),
|
|
904
|
+
enableErrorTracking: optional(boolean())
|
|
905
|
+
});
|
|
906
|
+
const FathomAnalyticsOptions = object({
|
|
907
|
+
/**
|
|
908
|
+
* The Fathom Analytics site ID.
|
|
909
|
+
*/
|
|
910
|
+
site: string(),
|
|
911
|
+
/**
|
|
912
|
+
* The Fathom Analytics tracking mode.
|
|
913
|
+
*/
|
|
914
|
+
spa: optional(union([literal("auto"), literal("history"), literal("hash")])),
|
|
915
|
+
/**
|
|
916
|
+
* Automatically track page views.
|
|
917
|
+
*/
|
|
918
|
+
auto: optional(boolean()),
|
|
919
|
+
/**
|
|
920
|
+
* Enable canonical URL tracking.
|
|
921
|
+
*/
|
|
922
|
+
canonical: optional(boolean()),
|
|
923
|
+
/**
|
|
924
|
+
* Honor Do Not Track requests.
|
|
925
|
+
*/
|
|
926
|
+
honorDnt: optional(boolean())
|
|
927
|
+
});
|
|
928
|
+
const GoogleAdsenseOptions = object({
|
|
929
|
+
/**
|
|
930
|
+
* The Google Adsense ID.
|
|
931
|
+
*/
|
|
932
|
+
client: optional(string()),
|
|
933
|
+
/**
|
|
934
|
+
* Enable or disable Auto Ads.
|
|
935
|
+
*/
|
|
936
|
+
autoAds: optional(boolean())
|
|
937
|
+
});
|
|
938
|
+
const GoogleAnalyticsOptions = object({
|
|
939
|
+
id: optional(string()),
|
|
940
|
+
// The GA4 measurement ID (format: G-XXXXXXXX)
|
|
941
|
+
l: optional(string())
|
|
942
|
+
// Optional global name for dataLayer (defaults to 'dataLayer')
|
|
943
|
+
});
|
|
944
|
+
const GoogleMapsOptions = object({
|
|
945
|
+
apiKey: string(),
|
|
946
|
+
libraries: optional(array(string())),
|
|
947
|
+
language: optional(string()),
|
|
948
|
+
region: optional(string()),
|
|
949
|
+
v: optional(union([literal("weekly"), literal("quarterly"), literal("beta"), literal("alpha"), string()]))
|
|
950
|
+
});
|
|
951
|
+
const GoogleRecaptchaOptions = object({
|
|
952
|
+
siteKey: string(),
|
|
953
|
+
// Use enterprise.js instead of api.js
|
|
954
|
+
enterprise: optional(boolean()),
|
|
955
|
+
// Use recaptcha.net (works in China)
|
|
956
|
+
recaptchaNet: optional(boolean()),
|
|
957
|
+
// Language code
|
|
958
|
+
hl: optional(string())
|
|
959
|
+
});
|
|
960
|
+
const GoogleSignInOptions = object({
|
|
961
|
+
clientId: string(),
|
|
962
|
+
// Auto-select credentials if only one is available
|
|
963
|
+
autoSelect: optional(boolean()),
|
|
964
|
+
// Context for One Tap (signin, signup, or use)
|
|
965
|
+
context: optional(union([literal("signin"), literal("signup"), literal("use")])),
|
|
966
|
+
// FedCM API support (Privacy Sandbox) - mandatory from August 2025
|
|
967
|
+
useFedcmForPrompt: optional(boolean()),
|
|
968
|
+
// Cancel One Tap if user clicks outside
|
|
969
|
+
cancelOnTapOutside: optional(boolean()),
|
|
970
|
+
// UX mode: popup or redirect
|
|
971
|
+
uxMode: optional(union([literal("popup"), literal("redirect")])),
|
|
972
|
+
// Login URI for redirect flow
|
|
973
|
+
loginUri: optional(string()),
|
|
974
|
+
// ITP (Intelligent Tracking Prevention) support
|
|
975
|
+
itpSupport: optional(boolean()),
|
|
976
|
+
// Allowed parent origins for iframe embedding
|
|
977
|
+
allowedParentOrigin: optional(union([string(), array(string())])),
|
|
978
|
+
// Hosted domain - restrict to specific Google Workspace domain
|
|
979
|
+
hd: optional(string())
|
|
980
|
+
});
|
|
981
|
+
const GoogleTagManagerOptions = object({
|
|
982
|
+
/** GTM container ID (format: GTM-XXXXXX) */
|
|
983
|
+
id: string(),
|
|
984
|
+
/** Optional dataLayer variable name */
|
|
985
|
+
l: optional(string()),
|
|
986
|
+
/** Authentication token for environment-specific container versions */
|
|
987
|
+
auth: optional(string()),
|
|
988
|
+
/** Preview environment name */
|
|
989
|
+
preview: optional(string()),
|
|
990
|
+
/** Forces GTM cookies to take precedence when true */
|
|
991
|
+
cookiesWin: optional(union([boolean(), literal("x")])),
|
|
992
|
+
/** Enables debug mode when true */
|
|
993
|
+
debug: optional(union([boolean(), literal("x")])),
|
|
994
|
+
/** No Personal Advertising - disables advertising features when true */
|
|
995
|
+
npa: optional(union([boolean(), literal("1")])),
|
|
996
|
+
/** Custom dataLayer name (alternative to "l" property) */
|
|
997
|
+
dataLayer: optional(string()),
|
|
998
|
+
/** Environment name for environment-specific container */
|
|
999
|
+
envName: optional(string()),
|
|
1000
|
+
/** Referrer policy for analytics requests */
|
|
1001
|
+
authReferrerPolicy: optional(string()),
|
|
1002
|
+
/** Default consent settings for GTM */
|
|
1003
|
+
defaultConsent: optional(record(string(), union([string(), number()])))
|
|
1004
|
+
});
|
|
1005
|
+
const HotjarOptions = object({
|
|
1006
|
+
id: number(),
|
|
1007
|
+
sv: optional(number())
|
|
1008
|
+
});
|
|
1009
|
+
const InstagramEmbedOptions = object({
|
|
1010
|
+
/**
|
|
1011
|
+
* The Instagram post URL to embed
|
|
1012
|
+
* e.g., https://www.instagram.com/p/ABC123/
|
|
1013
|
+
*/
|
|
1014
|
+
postUrl: string(),
|
|
1015
|
+
/**
|
|
1016
|
+
* Whether to include captions in the embed
|
|
1017
|
+
* @default true
|
|
1018
|
+
*/
|
|
1019
|
+
captions: optional(boolean()),
|
|
1020
|
+
/**
|
|
1021
|
+
* Custom API endpoint for fetching embed HTML
|
|
1022
|
+
* @default '/api/_scripts/instagram-embed'
|
|
1023
|
+
*/
|
|
1024
|
+
apiEndpoint: optional(string())
|
|
1025
|
+
});
|
|
1026
|
+
const IntercomOptions = object({
|
|
1027
|
+
app_id: string(),
|
|
1028
|
+
api_base: optional(union([literal("https://api-iam.intercom.io"), literal("https://api-iam.eu.intercom.io"), literal("https://api-iam.au.intercom.io")])),
|
|
1029
|
+
name: optional(string()),
|
|
1030
|
+
email: optional(string()),
|
|
1031
|
+
user_id: optional(string()),
|
|
1032
|
+
// customizing the messenger
|
|
1033
|
+
alignment: optional(union([literal("left"), literal("right")])),
|
|
1034
|
+
horizontal_padding: optional(number()),
|
|
1035
|
+
vertical_padding: optional(number())
|
|
1036
|
+
});
|
|
1037
|
+
const MatomoAnalyticsOptions = object({
|
|
1038
|
+
matomoUrl: optional(string()),
|
|
1039
|
+
siteId: optional(union([string(), number()])),
|
|
1040
|
+
cloudId: optional(string()),
|
|
1041
|
+
trackerUrl: optional(string()),
|
|
1042
|
+
trackPageView: optional(boolean()),
|
|
1043
|
+
enableLinkTracking: optional(boolean()),
|
|
1044
|
+
disableCookies: optional(boolean()),
|
|
1045
|
+
watch: optional(boolean())
|
|
1046
|
+
});
|
|
1047
|
+
const MetaPixelOptions = object({
|
|
1048
|
+
id: union([string(), number()])
|
|
1049
|
+
});
|
|
1050
|
+
const NpmOptions = object({
|
|
1051
|
+
packageName: string(),
|
|
1052
|
+
file: optional(string()),
|
|
1053
|
+
version: optional(string()),
|
|
1054
|
+
provider: optional(union([literal("jsdelivr"), literal("cdnjs"), literal("unpkg")]))
|
|
1055
|
+
});
|
|
1056
|
+
const PayPalOptions = object({
|
|
1057
|
+
clientId: string(),
|
|
1058
|
+
buyerCountry: optional(string()),
|
|
1059
|
+
commit: optional(string()),
|
|
1060
|
+
components: optional(union([string(), array(string())])),
|
|
1061
|
+
currency: optional(string()),
|
|
1062
|
+
debug: optional(union([string(), boolean()])),
|
|
1063
|
+
disableFunding: optional(union([string(), array(string())])),
|
|
1064
|
+
enableFunding: optional(union([string(), array(string())])),
|
|
1065
|
+
integrationDate: optional(string()),
|
|
1066
|
+
intent: optional(string()),
|
|
1067
|
+
locale: optional(string()),
|
|
1068
|
+
/**
|
|
1069
|
+
* loadScript() supports an array for merchantId, even though
|
|
1070
|
+
* merchant-id technically may not contain multiple values.
|
|
1071
|
+
* For an array with a length of > 1 it automatically sets
|
|
1072
|
+
* merchantId to "*" and moves the actual values to dataMerchantId
|
|
1073
|
+
*/
|
|
1074
|
+
merchantId: optional(union([string(), array(string())])),
|
|
1075
|
+
partnerAttributionId: optional(string()),
|
|
1076
|
+
vault: optional(union([string(), boolean()])),
|
|
1077
|
+
// own props
|
|
1078
|
+
sandbox: optional(boolean())
|
|
1079
|
+
});
|
|
1080
|
+
const PostHogOptions = object({
|
|
1081
|
+
apiKey: string(),
|
|
1082
|
+
region: optional(union([literal("us"), literal("eu")])),
|
|
1083
|
+
apiHost: optional(string()),
|
|
1084
|
+
autocapture: optional(boolean()),
|
|
1085
|
+
capturePageview: optional(union([boolean(), literal("history_change")])),
|
|
1086
|
+
capturePageleave: optional(boolean()),
|
|
1087
|
+
disableSessionRecording: optional(boolean()),
|
|
1088
|
+
config: optional(record(string(), any()))
|
|
1089
|
+
});
|
|
1090
|
+
const RedditPixelOptions = object({
|
|
1091
|
+
id: string()
|
|
1092
|
+
});
|
|
1093
|
+
const RybbitAnalyticsOptions = object({
|
|
1094
|
+
siteId: union([string(), number()]),
|
|
1095
|
+
// required
|
|
1096
|
+
autoTrackPageview: optional(boolean()),
|
|
1097
|
+
trackSpa: optional(boolean()),
|
|
1098
|
+
trackQuery: optional(boolean()),
|
|
1099
|
+
trackOutbound: optional(boolean()),
|
|
1100
|
+
trackErrors: optional(boolean()),
|
|
1101
|
+
sessionReplay: optional(boolean()),
|
|
1102
|
+
webVitals: optional(boolean()),
|
|
1103
|
+
skipPatterns: optional(array(string())),
|
|
1104
|
+
maskPatterns: optional(array(string())),
|
|
1105
|
+
debounce: optional(number()),
|
|
1106
|
+
apiKey: optional(string())
|
|
1107
|
+
});
|
|
1108
|
+
const SegmentOptions = object({
|
|
1109
|
+
writeKey: string(),
|
|
1110
|
+
analyticsKey: optional(string())
|
|
1111
|
+
});
|
|
1112
|
+
const InitObjectPropertiesSchema = object({
|
|
1113
|
+
user_email: optional(string()),
|
|
1114
|
+
ip_address: optional(string()),
|
|
1115
|
+
user_phone_number: optional(string()),
|
|
1116
|
+
user_hashed_email: optional(string()),
|
|
1117
|
+
user_hashed_phone_number: optional(string()),
|
|
1118
|
+
firstname: optional(string()),
|
|
1119
|
+
lastname: optional(string()),
|
|
1120
|
+
geo_city: optional(string()),
|
|
1121
|
+
geo_region: optional(string()),
|
|
1122
|
+
geo_postal_code: optional(string()),
|
|
1123
|
+
geo_country: optional(string()),
|
|
1124
|
+
age: optional(string())
|
|
1125
|
+
});
|
|
1126
|
+
const SnapTrPixelOptions = object({
|
|
1127
|
+
id: string(),
|
|
1128
|
+
trackPageView: optional(boolean()),
|
|
1129
|
+
...InitObjectPropertiesSchema?.entries || {}
|
|
1130
|
+
});
|
|
1131
|
+
const StripeOptions = object({
|
|
1132
|
+
advancedFraudSignals: optional(boolean())
|
|
1133
|
+
});
|
|
1134
|
+
const TikTokPixelOptions = object({
|
|
1135
|
+
id: string(),
|
|
1136
|
+
trackPageView: optional(boolean())
|
|
1137
|
+
// default true
|
|
1138
|
+
});
|
|
1139
|
+
const UmamiAnalyticsOptions = object({
|
|
1140
|
+
websiteId: string(),
|
|
1141
|
+
// required
|
|
1142
|
+
/**
|
|
1143
|
+
* By default, Umami will send data to wherever the script is located.
|
|
1144
|
+
* You can override this to send data to another location.
|
|
1145
|
+
*/
|
|
1146
|
+
hostUrl: optional(string()),
|
|
1147
|
+
/**
|
|
1148
|
+
* By default, Umami tracks all pageviews and events for you automatically.
|
|
1149
|
+
* You can disable this behavior and track events yourself using the tracker functions.
|
|
1150
|
+
* https://umami.is/docs/tracker-functions
|
|
1151
|
+
*/
|
|
1152
|
+
autoTrack: optional(boolean()),
|
|
1153
|
+
/**
|
|
1154
|
+
* If you want the tracker to only run on specific domains, you can add them to your tracker script.
|
|
1155
|
+
* This is a comma delimited list of domain names.
|
|
1156
|
+
* Helps if you are working in a staging/development environment.
|
|
1157
|
+
*/
|
|
1158
|
+
domains: optional(array(string())),
|
|
1159
|
+
/**
|
|
1160
|
+
* If you want the tracker to collect events under a specific tag.
|
|
1161
|
+
* Events can be filtered in the dashboard by a specific tag.
|
|
1162
|
+
*/
|
|
1163
|
+
tag: optional(string()),
|
|
1164
|
+
/**
|
|
1165
|
+
* Function that will be called before data is sent to Umami.
|
|
1166
|
+
* The function takes two parameters: type and payload.
|
|
1167
|
+
* Return the payload to continue sending, or return a falsy value to cancel.
|
|
1168
|
+
*/
|
|
1169
|
+
beforeSend: optional(union([
|
|
1170
|
+
custom((input) => typeof input === "function"),
|
|
1171
|
+
string()
|
|
1172
|
+
]))
|
|
1173
|
+
});
|
|
1174
|
+
const XEmbedOptions = object({
|
|
1175
|
+
/**
|
|
1176
|
+
* The tweet ID to embed
|
|
1177
|
+
*/
|
|
1178
|
+
tweetId: string(),
|
|
1179
|
+
/**
|
|
1180
|
+
* Optional: Custom API endpoint for fetching tweet data
|
|
1181
|
+
* @default '/api/_scripts/x-embed'
|
|
1182
|
+
*/
|
|
1183
|
+
apiEndpoint: optional(string()),
|
|
1184
|
+
/**
|
|
1185
|
+
* Optional: Custom image proxy endpoint
|
|
1186
|
+
* @default '/api/_scripts/x-embed-image'
|
|
1187
|
+
*/
|
|
1188
|
+
imageProxyEndpoint: optional(string())
|
|
1189
|
+
});
|
|
1190
|
+
const XPixelOptions = object({
|
|
1191
|
+
id: string(),
|
|
1192
|
+
version: optional(string())
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
function getRegistryTypes() {
|
|
1196
|
+
return registryTypes;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
export { ClarityOptions, CloudflareWebAnalyticsOptions, CrispOptions, DatabuddyAnalyticsOptions, FathomAnalyticsOptions, GoogleAdsenseOptions, GoogleAnalyticsOptions, GoogleMapsOptions, GoogleRecaptchaOptions, GoogleSignInOptions, GoogleTagManagerOptions, HotjarOptions, InitObjectPropertiesSchema, InstagramEmbedOptions, IntercomOptions, MatomoAnalyticsOptions, MetaPixelOptions, NpmOptions, PayPalOptions, PostHogOptions, RedditPixelOptions, RybbitAnalyticsOptions, SegmentOptions, SnapTrPixelOptions, StripeOptions, TikTokPixelOptions, UmamiAnalyticsOptions, XEmbedOptions, XPixelOptions, getRegistryTypes };
|