mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
Add files via upload
This commit is contained in:
68
src/vite-env.d.ts
vendored
Normal file
68
src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string
|
||||
readonly VITE_TELEGRAM_BOT_USERNAME?: string
|
||||
readonly VITE_APP_NAME?: string
|
||||
readonly VITE_APP_LOGO?: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
|
||||
// Telegram WebApp types
|
||||
interface TelegramWebApp {
|
||||
initData: string
|
||||
initDataUnsafe: {
|
||||
user?: {
|
||||
id: number
|
||||
first_name: string
|
||||
last_name?: string
|
||||
username?: string
|
||||
language_code?: string
|
||||
}
|
||||
auth_date: number
|
||||
hash: string
|
||||
}
|
||||
ready: () => void
|
||||
expand: () => void
|
||||
close: () => void
|
||||
openLink: (url: string, options?: { try_instant_view?: boolean }) => void
|
||||
openTelegramLink: (url: string) => void
|
||||
openInvoice: (url: string, callback?: (status: 'paid' | 'cancelled' | 'failed' | 'pending') => void) => void
|
||||
MainButton: {
|
||||
text: string
|
||||
color: string
|
||||
textColor: string
|
||||
isVisible: boolean
|
||||
isActive: boolean
|
||||
show: () => void
|
||||
hide: () => void
|
||||
enable: () => void
|
||||
disable: () => void
|
||||
onClick: (callback: () => void) => void
|
||||
offClick: (callback: () => void) => void
|
||||
}
|
||||
BackButton: {
|
||||
isVisible: boolean
|
||||
show: () => void
|
||||
hide: () => void
|
||||
onClick: (callback: () => void) => void
|
||||
offClick: (callback: () => void) => void
|
||||
}
|
||||
themeParams: {
|
||||
bg_color?: string
|
||||
text_color?: string
|
||||
hint_color?: string
|
||||
link_color?: string
|
||||
button_color?: string
|
||||
button_text_color?: string
|
||||
}
|
||||
}
|
||||
|
||||
interface Window {
|
||||
Telegram?: {
|
||||
WebApp: TelegramWebApp
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user