Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

987 B
Raw Blame
import type { Dispatch, ReactNode, SetStateAction } from 'react'

export interface DevTelemetryEvent {
  id: string
  timestamp: number
  source: 'client' | 'server'
  eventType: string
  eventName: string
  distinctId?: string
  properties?: Record<string, unknown>
}

export interface ServerTelemetryEvent {
  id: string
  timestamp: number
  sessionId: string
  eventType: 'capture' | 'identify' | 'groupIdentify' | 'alias'
  eventName: string
  distinctId: string
  properties?: Record<string, unknown>
  groups?: Record<string, string | number>
}

export interface DevToolbarConfig {
  apiUrl: string
}

export interface ExtraTab {
  id: string
  label: string
  content: ReactNode
}

export interface DevTelemetryToolbarContextType {
  isAvailable: boolean
  isEnabled: boolean
  isOpen: boolean
  setIsOpen: (open: boolean) => void
  enableToolbar: () => void
  events: DevTelemetryEvent[]
  setEvents: Dispatch<SetStateAction<DevTelemetryEvent[]>>
  dismissToolbar: () => void
}