mirror of
https://github.com/langgenius/dify.git
synced 2026-09-05 16:55:14 +08:00
Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: fatelei <fatelei@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: 姜涵煦 <hanxujiang@jianghanxudeMacBook-Pro-2.local> Co-authored-by: L1nSn0w <l1nsn0w@qq.com> Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import './types/i18n'
|
|
import './types/jsx'
|
|
import './types/assets'
|
|
|
|
declare global {
|
|
// Google Analytics gtag types
|
|
type GtagEventParams = {
|
|
[key: string]: unknown
|
|
}
|
|
|
|
type Gtag = {
|
|
(command: 'config', targetId: string, config?: GtagEventParams): void
|
|
(command: 'event', eventName: string, eventParams?: GtagEventParams): void
|
|
(command: 'js', date: Date): void
|
|
(command: 'set', config: GtagEventParams): void
|
|
}
|
|
|
|
// eslint-disable-next-line ts/consistent-type-definitions -- interface required for declaration merging
|
|
interface Window {
|
|
gtag?: Gtag
|
|
dataLayer?: unknown[]
|
|
/**
|
|
* Optional analytics bridge injected by the standalone Marketplace host.
|
|
* Absent in Dify console builds; see `utils/marketplace-site-track.ts`.
|
|
*/
|
|
__marketplaceTracking__?: {
|
|
track: (eventName: string, properties?: Record<string, unknown>) => void
|
|
rememberReferrer: (itemId: string, section: 'banner' | 'search' | 'list' | 'direct') => void
|
|
markSearch: (query: string) => void
|
|
flushSearch: (resultCount: number) => void
|
|
markFilter: (filter: {
|
|
filter_type: 'type_tab' | 'category' | 'language'
|
|
selection_mode: 'single' | 'multi'
|
|
filter_value: string
|
|
selected_values: string[]
|
|
}) => void
|
|
flushFilter: (resultCount: number) => void
|
|
}
|
|
}
|
|
}
|