import type { DashgramError } from "../errors"; export type TrackLevel = 1 | 2 | 3; export type EventSource = "auto" | "manual"; export interface DashgramConfig { projectId: string; trackLevel?: TrackLevel; apiUrl?: string; batchSize?: number; flushInterval?: number; debug?: boolean; disabled?: boolean; onError?: (error: DashgramError) => void; } export interface Telemetry { ip?: string; platform?: string; user_agent?: string; timezone?: string; theme?: string; } export type EventProperties = Record; export interface WebAppEvent { eventId: string; type: string; initData: Record; properties?: unknown; telemetry?: Telemetry; source?: string; level?: number; timestamp: number; } export interface WebAppTrackRequest { origin?: string; updates: WebAppEvent[]; } export interface TelegramWebApp { initData?: string; initDataUnsafe?: { user?: { id: number; first_name?: string; last_name?: string; username?: string; language_code?: string; }; }; platform?: string; version?: string; themeParams?: Record; colorScheme?: "light" | "dark"; isExpanded?: boolean; viewportHeight?: number; viewportStableHeight?: number; safeAreaInset?: { top: number; bottom: number; left: number; right: number; }; contentSafeAreaInset?: { top: number; bottom: number; left: number; right: number; }; MainButton?: { text?: string; isVisible?: boolean; isActive?: boolean; isProgressVisible?: boolean; }; SecondaryButton?: { text?: string; isVisible?: boolean; isActive?: boolean; isProgressVisible?: boolean; }; BiometricManager?: { isInited?: boolean; isBiometricAvailable?: boolean; biometricType?: "finger" | "face" | "unknown"; isAccessRequested?: boolean; isAccessGranted?: boolean; isBiometricTokenSaved?: boolean; deviceId?: string; }; LocationManager?: { isInited?: boolean; isLocationAvailable?: boolean; isAccessRequested?: boolean; isAccessGranted?: boolean; }; Accelerometer?: { isStarted?: boolean; x?: number; y?: number; z?: number; }; Gyroscope?: { isStarted?: boolean; x?: number; y?: number; z?: number; }; DeviceOrientation?: { isStarted?: boolean; absolute?: boolean; alpha?: number; beta?: number; gamma?: number; }; onEvent?: (event: string, callback: (eventType: string, eventData?: unknown) => void) => void; offEvent?: (event: string, callback: (eventType: string, eventData?: unknown) => void) => void; openLink?: (url: string, options?: { try_instant_view?: boolean; }) => void; openTelegramLink?: (url: string) => void; switchInlineQuery?: (query: string, chooseChatTypes?: string[]) => void; shareToStory?: (mediaUrl: string, params?: unknown) => void; close?: (options?: { return_back?: boolean; }) => void; exitFullscreen?: () => void; openInvoice?: (slug: string, callback?: (status: string) => void) => void; requestAccess?: (accessType: string, callback?: (status: string) => void) => void; requestContact?: (callback?: (status: string) => void) => void; requestPhone?: (callback?: (status: string) => void) => void; requestLocation?: (callback?: (status: string, location?: unknown) => void) => void; checkLocation?: (callback?: (isAvailable: boolean, location?: unknown) => void) => void; } export interface TelegramWindow extends Window { Telegram?: { WebApp?: TelegramWebApp; }; } //# sourceMappingURL=index.d.ts.map