Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.2 KB
Raw Blame
import './types/i18n'
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
  }

  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
    }
  }
}