File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * Event types that can be received by the mini app from the client.
3+ *
4+ * @see https://core.telegram.org/api/bots/webapps#incoming-events-client-to-mini-app
5+ */
6+ export interface IncomingEventMap {
7+ back_button_pressed : void
8+
9+ settings_button_pressed : void
10+ }
11+
12+ /**
13+ * Event types that can be emitted by the mini app to the client.
14+ *
15+ * @see https://core.telegram.org/api/web-events#event-apis
16+ */
17+ export interface OutgoingEventMap {
18+ web_app_setup_back_button : {
19+ is_visible : boolean
20+ }
21+
22+ web_app_setup_settings_button : {
23+ is_visible : boolean
24+ }
25+
26+ web_app_trigger_haptic_feedback :
27+ | { type : 'impact' , impact_style : 'light' | 'medium' | 'heavy' | 'rigid' | 'soft' }
28+ | { type : 'notification' , notification_type : 'error' | 'success' | 'warning' }
29+ | { type : 'selection_change' }
30+ }
You can’t perform that action at this time.
0 commit comments