@apiteam/twa-bridge 7.7.0-beta.2 → 8.0.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -3
- package/package.json +1 -1
- package/solid/index.d.ts +318 -711
- package/solid/index.js +1 -1
- package/solid/index.mjs +1 -1
- package/react/index.d.ts +0 -1003
- package/react/index.js +0 -1
- package/react/index.mjs +0 -1
- package/react/package.json +0 -17
package/solid/index.d.ts
CHANGED
|
@@ -1,588 +1,178 @@
|
|
|
1
1
|
import * as solid_js from 'solid-js';
|
|
2
|
+
import { Context, Component } from 'solid-js';
|
|
3
|
+
import { JSX } from 'solid-js/jsx-runtime';
|
|
2
4
|
|
|
3
5
|
declare const createIsViewportChanged: () => solid_js.Accessor<{
|
|
4
6
|
height: number;
|
|
5
|
-
width?: number
|
|
7
|
+
width?: number;
|
|
6
8
|
is_expanded: boolean;
|
|
7
9
|
is_state_stable: boolean;
|
|
8
10
|
}>;
|
|
9
11
|
|
|
10
|
-
type Close = () => {
|
|
12
|
+
type Close = (eventData?: SenderData[typeof MethodClose]) => {
|
|
11
13
|
status: boolean | typeof NOT_SUPPORTED;
|
|
12
14
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Closes Mini App.
|
|
15
|
-
*
|
|
16
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-close
|
|
17
|
-
*/
|
|
18
15
|
declare const close: Close;
|
|
19
|
-
/**
|
|
20
|
-
* Method support check
|
|
21
|
-
*/
|
|
22
16
|
declare const supportClose: () => boolean;
|
|
23
17
|
|
|
24
|
-
type CloseScanQrPopup = () => {
|
|
18
|
+
type CloseScanQrPopup = (eventData?: SenderData[typeof MethodCloseScanQrPopup]) => {
|
|
25
19
|
status: boolean | typeof NOT_SUPPORTED;
|
|
26
20
|
};
|
|
27
|
-
/**
|
|
28
|
-
* Closes a QR scanner. The Telegram application creates the scan_qr_popup_closed event.
|
|
29
|
-
*
|
|
30
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-close-scan-qr-popup
|
|
31
|
-
*/
|
|
32
21
|
declare const closeScanQrPopup: CloseScanQrPopup;
|
|
33
|
-
/**
|
|
34
|
-
* Method support check
|
|
35
|
-
*/
|
|
36
22
|
declare const supportCloseScanQrPopup: () => boolean;
|
|
37
23
|
|
|
38
|
-
type DataSend = (eventData: {
|
|
39
|
-
/**
|
|
40
|
-
* Data to send to a bot. Should not have size of more than 4096 bytes.
|
|
41
|
-
*/
|
|
42
|
-
data: string;
|
|
43
|
-
}) => {
|
|
24
|
+
type DataSend = (eventData: SenderData[typeof MethodDataSend]) => {
|
|
44
25
|
status: boolean | typeof NOT_SUPPORTED;
|
|
45
26
|
};
|
|
46
|
-
/**
|
|
47
|
-
* Sends data to the bot. When this method is called, a service message is sent to the bot containing the data of the length up to 4096 bytes.
|
|
48
|
-
*
|
|
49
|
-
* Then, Mini App will be closed.
|
|
50
|
-
*
|
|
51
|
-
* To get more information, take a look at web_app_data field in the class Message.
|
|
52
|
-
*
|
|
53
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-data-send
|
|
54
|
-
*/
|
|
55
27
|
declare const dataSend: DataSend;
|
|
56
|
-
/**
|
|
57
|
-
* Method support check
|
|
58
|
-
*/
|
|
59
28
|
declare const supportDataSend: () => boolean;
|
|
60
29
|
|
|
61
|
-
type Expand = () => {
|
|
30
|
+
type Expand = (props?: SenderData[typeof MethodExpand]) => {
|
|
62
31
|
status: boolean | typeof NOT_SUPPORTED;
|
|
63
32
|
};
|
|
64
|
-
/**
|
|
65
|
-
* Closes Mini App.
|
|
66
|
-
*/
|
|
67
33
|
declare const expand: Expand;
|
|
68
|
-
/**
|
|
69
|
-
* Method support check
|
|
70
|
-
*/
|
|
71
34
|
declare const supportExpand: () => boolean;
|
|
72
35
|
|
|
73
|
-
type IframeReady = (eventData: {
|
|
74
|
-
/**
|
|
75
|
-
* Optional. True, if current Mini App supports native reloading.
|
|
76
|
-
*/
|
|
77
|
-
reload_supported?: boolean;
|
|
78
|
-
}) => {
|
|
36
|
+
type IframeReady = (eventData: SenderData[typeof MethodIframeReady]) => {
|
|
79
37
|
status: boolean | typeof NOT_SUPPORTED;
|
|
80
38
|
};
|
|
81
|
-
/**
|
|
82
|
-
* Notifies parent iframe about the current frame is ready.
|
|
83
|
-
* This method is only used in the Web version of Telegram.
|
|
84
|
-
* As a result, Mini App will receive set_custom_style event.
|
|
85
|
-
*
|
|
86
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#iframe-ready
|
|
87
|
-
*/
|
|
88
39
|
declare const iframeReady: IframeReady;
|
|
89
|
-
/**
|
|
90
|
-
* Method support check
|
|
91
|
-
*/
|
|
92
40
|
declare const supportIframeReady: () => boolean;
|
|
93
41
|
|
|
94
|
-
type IframeWillReload = () => {
|
|
42
|
+
type IframeWillReload = (eventData: SenderData[typeof MethodIframeReady]) => {
|
|
95
43
|
status: boolean | typeof NOT_SUPPORTED;
|
|
96
44
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Notifies parent iframe about the current iframe is going to reload.
|
|
99
|
-
*
|
|
100
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#iframe-will-reload
|
|
101
|
-
*/
|
|
102
45
|
declare const iframeWillReload: IframeWillReload;
|
|
103
|
-
/**
|
|
104
|
-
* Method support check
|
|
105
|
-
*/
|
|
106
46
|
declare const supportIframeWillReload: () => boolean;
|
|
107
47
|
|
|
108
|
-
type InvokeCustomMethod = (eventData: {
|
|
109
|
-
/**
|
|
110
|
-
* Current invocation unique identifier.
|
|
111
|
-
*
|
|
112
|
-
* Default: () => randomReqId
|
|
113
|
-
*/
|
|
114
|
-
req_id?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Method name.
|
|
117
|
-
*/
|
|
118
|
-
method: string;
|
|
119
|
-
/**
|
|
120
|
-
* Parameters according to method.
|
|
121
|
-
*/
|
|
122
|
-
params: unknown;
|
|
123
|
-
}) => Promise<{
|
|
48
|
+
type InvokeCustomMethod = (eventData: SenderData[typeof MethodInvokeCustomMethod]) => Promise<{
|
|
124
49
|
status: boolean | typeof NOT_SUPPORTED;
|
|
125
50
|
data?: EventsData[typeof EventCustomMethodInvoked];
|
|
126
51
|
}>;
|
|
127
|
-
/**
|
|
128
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-invoke-custom-method
|
|
129
|
-
*/
|
|
130
52
|
declare const invokeCustomMethod: InvokeCustomMethod;
|
|
131
|
-
/**
|
|
132
|
-
* Method support check
|
|
133
|
-
*/
|
|
134
53
|
declare const supportInvokeCustomMethod: () => boolean;
|
|
135
54
|
|
|
136
|
-
type OpenInvoice = (eventData: {
|
|
137
|
-
/**
|
|
138
|
-
* Invoice unique identifier.
|
|
139
|
-
*/
|
|
140
|
-
slug: string;
|
|
141
|
-
}) => {
|
|
55
|
+
type OpenInvoice = (eventData: SenderData[typeof MethodOpenInvoice]) => {
|
|
142
56
|
status: boolean | typeof NOT_SUPPORTED;
|
|
143
57
|
};
|
|
144
|
-
/**
|
|
145
|
-
* Opens an invoice by its specified slug.
|
|
146
|
-
*
|
|
147
|
-
* More information about invoices in this documentation.
|
|
148
|
-
*
|
|
149
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-invoice
|
|
150
|
-
*/
|
|
151
58
|
declare const openInvoice: OpenInvoice;
|
|
152
|
-
/**
|
|
153
|
-
* Method support check
|
|
154
|
-
*/
|
|
155
59
|
declare const supportOpenInvoice: () => boolean;
|
|
156
60
|
|
|
157
|
-
type OpenLink = (eventData: {
|
|
158
|
-
/**
|
|
159
|
-
* URL to be opened by Telegram application. Should be a full path with https protocol.
|
|
160
|
-
*/
|
|
161
|
-
url: string;
|
|
162
|
-
/**
|
|
163
|
-
* Optional. Link will be opened in Instant View mode if possible.
|
|
164
|
-
*/
|
|
165
|
-
try_instant_view?: boolean;
|
|
166
|
-
}) => {
|
|
61
|
+
type OpenLink = (eventData: SenderData[typeof MethodOpenLink]) => {
|
|
167
62
|
status: boolean | typeof NOT_SUPPORTED;
|
|
168
63
|
};
|
|
169
|
-
/**
|
|
170
|
-
* Opens link in the default browser.
|
|
171
|
-
*
|
|
172
|
-
* Mini App will not be closed.
|
|
173
|
-
*
|
|
174
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-link
|
|
175
|
-
*/
|
|
176
64
|
declare const openLink: OpenLink;
|
|
177
|
-
/**
|
|
178
|
-
* Method support check
|
|
179
|
-
*/
|
|
180
65
|
declare const supportOpenLink: () => boolean;
|
|
181
66
|
|
|
182
|
-
type
|
|
183
|
-
/**
|
|
184
|
-
* Identifier of the button, 0-64 characters.
|
|
185
|
-
*/
|
|
186
|
-
id: string;
|
|
187
|
-
type: 'default' | 'destructive' | 'ok' | 'close' | 'cancel';
|
|
188
|
-
/**
|
|
189
|
-
* The text to be displayed on the button, 0-64 characters. Ignored when type is ok, close or cancel.
|
|
190
|
-
*/
|
|
191
|
-
text: string;
|
|
192
|
-
};
|
|
193
|
-
type OpenPopup = (eventData: {
|
|
194
|
-
/**
|
|
195
|
-
* The text to be displayed in the popup title, 0-64 characters
|
|
196
|
-
*/
|
|
197
|
-
title: string;
|
|
198
|
-
/**
|
|
199
|
-
* The message to be displayed in the body of the popup, 1-256 characters
|
|
200
|
-
*/
|
|
201
|
-
message: string;
|
|
202
|
-
/**
|
|
203
|
-
* List of buttons to be displayed in the popup, 1-3 buttons
|
|
204
|
-
*/
|
|
205
|
-
buttons: PopupButton[];
|
|
206
|
-
}) => Promise<{
|
|
67
|
+
type OpenPopup = (eventData: SenderData[typeof MethodOpenPopup]) => Promise<{
|
|
207
68
|
status: boolean | typeof NOT_SUPPORTED;
|
|
208
69
|
data?: EventsData['popup_closed'];
|
|
209
70
|
}>;
|
|
210
|
-
/**
|
|
211
|
-
* Opens a new popup. When user closes the popup, Telegram creates the popup_closed event.
|
|
212
|
-
*
|
|
213
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-popup
|
|
214
|
-
*/
|
|
215
71
|
declare const openPopup: OpenPopup;
|
|
216
|
-
/**
|
|
217
|
-
* Method support check
|
|
218
|
-
*/
|
|
219
72
|
declare const supportOpenPopup: () => boolean;
|
|
220
73
|
|
|
221
|
-
type OpenScanQrPopup = (eventData: {
|
|
222
|
-
/**
|
|
223
|
-
* Optional. Text to be displayed in the QR scanner.
|
|
224
|
-
*/
|
|
225
|
-
text?: string;
|
|
226
|
-
/**
|
|
227
|
-
* [Custom] Optional. Сlose QR scanner after receiving data
|
|
228
|
-
*/
|
|
229
|
-
is_close?: boolean;
|
|
230
|
-
}) => Promise<{
|
|
74
|
+
type OpenScanQrPopup = (eventData: SenderData[typeof MethodOpenScanQrPopup]) => Promise<{
|
|
231
75
|
status: boolean | typeof NOT_SUPPORTED | 'closed';
|
|
232
76
|
data?: EventsData[typeof EventQrTextReceived];
|
|
233
77
|
}>;
|
|
234
|
-
/**
|
|
235
|
-
* Opens a QR scanner.
|
|
236
|
-
*
|
|
237
|
-
* When the scanner was closed, the Telegram application creates the scan_qr_popup_closed event.
|
|
238
|
-
*
|
|
239
|
-
* When the scanner reads QR, Telegram creates the qr_text_received event.
|
|
240
|
-
*
|
|
241
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-close-scan-qr-popup
|
|
242
|
-
*/
|
|
243
78
|
declare const openScanQrPopup: OpenScanQrPopup;
|
|
244
|
-
/**
|
|
245
|
-
* Method support check
|
|
246
|
-
*/
|
|
247
79
|
declare const supportOpenScanQrPopup: () => boolean;
|
|
248
80
|
|
|
249
|
-
type OpenTgLink = (eventData: {
|
|
250
|
-
/**
|
|
251
|
-
* Should be a value taken from the link of this format: https://t.me/{path_full}.
|
|
252
|
-
*
|
|
253
|
-
* Can additionally contain query parameters.
|
|
254
|
-
*/
|
|
255
|
-
path_full: string;
|
|
256
|
-
}) => {
|
|
81
|
+
type OpenTgLink = (eventData: SenderData[typeof MethodOpenTgLink]) => {
|
|
257
82
|
status: boolean | typeof NOT_SUPPORTED;
|
|
258
83
|
};
|
|
259
|
-
/**
|
|
260
|
-
* Opens the Telegram link by its pathname and query parameters.
|
|
261
|
-
*
|
|
262
|
-
* The link will be opened in the Telegram app, Mini App will be closed.
|
|
263
|
-
*
|
|
264
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-tg-link
|
|
265
|
-
*/
|
|
266
84
|
declare const openTgLink: OpenTgLink;
|
|
267
|
-
/**
|
|
268
|
-
* Method support check
|
|
269
|
-
*/
|
|
270
85
|
declare const supportOpenTgLink: () => boolean;
|
|
271
86
|
|
|
272
|
-
type ReadTextFromClipboard = (eventData
|
|
273
|
-
/**
|
|
274
|
-
* Unique request identifier. Should be any unique string to handle the generated event appropriately.
|
|
275
|
-
*
|
|
276
|
-
* Default: () => randomReqId
|
|
277
|
-
*/
|
|
278
|
-
req_id?: string;
|
|
279
|
-
}) => Promise<{
|
|
87
|
+
type ReadTextFromClipboard = (eventData?: SenderData[typeof MethodReadTextFromClipboard]) => Promise<{
|
|
280
88
|
status: boolean | typeof NOT_SUPPORTED;
|
|
281
89
|
data?: EventsData[typeof EventClipboardTextReceived];
|
|
282
90
|
}>;
|
|
283
|
-
/**
|
|
284
|
-
* Reads text from the clipboard.
|
|
285
|
-
*
|
|
286
|
-
* The method accepts a request identifier which is used to appropriately retrieve the method execution result from the clipboard_text_received event.
|
|
287
|
-
*
|
|
288
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-read-text-from-clipboard
|
|
289
|
-
*/
|
|
290
91
|
declare const readTextFromClipboard: ReadTextFromClipboard;
|
|
291
|
-
/**
|
|
292
|
-
* Method support check
|
|
293
|
-
*/
|
|
294
92
|
declare const supportReadTextFromClipboard: () => boolean;
|
|
295
93
|
|
|
296
|
-
type Ready = () => {
|
|
94
|
+
type Ready = (eventData?: SenderData[typeof MethodReady]) => {
|
|
297
95
|
status: boolean | typeof NOT_SUPPORTED;
|
|
298
96
|
};
|
|
299
|
-
/**
|
|
300
|
-
* Notifies Telegram about current application is ready to be shown.
|
|
301
|
-
*
|
|
302
|
-
* This method will make Telegram to remove application loader and display Mini App.
|
|
303
|
-
*
|
|
304
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-ready
|
|
305
|
-
*/
|
|
306
97
|
declare const ready: Ready;
|
|
307
|
-
/**
|
|
308
|
-
* Method support check
|
|
309
|
-
*/
|
|
310
98
|
declare const supportReady: () => boolean;
|
|
311
99
|
|
|
312
|
-
type RequestPhone = () => Promise<{
|
|
100
|
+
type RequestPhone = (eventData?: SenderData[typeof MethodRequestPhone]) => Promise<{
|
|
313
101
|
status: boolean | typeof NOT_SUPPORTED;
|
|
314
102
|
}>;
|
|
315
|
-
/**
|
|
316
|
-
* Requests access to current user's phone.
|
|
317
|
-
*
|
|
318
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-phone
|
|
319
|
-
*/
|
|
320
103
|
declare const requestPhone: RequestPhone;
|
|
321
|
-
/**
|
|
322
|
-
* Method support check
|
|
323
|
-
*/
|
|
324
104
|
declare const supportRequestPhone: () => boolean;
|
|
325
105
|
|
|
326
|
-
type RequestTheme = () => {
|
|
106
|
+
type RequestTheme = (eventData?: SenderData[typeof MethodRequestTheme]) => {
|
|
327
107
|
status: boolean | typeof NOT_SUPPORTED;
|
|
328
108
|
};
|
|
329
|
-
/**
|
|
330
|
-
* Requests current theme from Telegram.
|
|
331
|
-
*
|
|
332
|
-
* As a result, Telegram will create theme_changed event.
|
|
333
|
-
*
|
|
334
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-theme
|
|
335
|
-
*/
|
|
336
109
|
declare const requestTheme: RequestTheme;
|
|
337
|
-
/**
|
|
338
|
-
* Method support check
|
|
339
|
-
*/
|
|
340
110
|
declare const supportRequestTheme: () => boolean;
|
|
341
111
|
|
|
342
|
-
type RequestViewport = () => {
|
|
112
|
+
type RequestViewport = (eventData?: SenderData[typeof MethodRequestViewport]) => {
|
|
343
113
|
status: boolean | typeof NOT_SUPPORTED;
|
|
344
114
|
};
|
|
345
|
-
/**
|
|
346
|
-
* Requests current viewport information from Telegram.
|
|
347
|
-
*
|
|
348
|
-
* As a result, Telegram will create viewport_changed event.
|
|
349
|
-
*
|
|
350
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-viewport
|
|
351
|
-
*/
|
|
352
115
|
declare const requestViewport: RequestViewport;
|
|
353
|
-
/**
|
|
354
|
-
* Method support check
|
|
355
|
-
*/
|
|
356
116
|
declare const supportRequestViewport: () => boolean;
|
|
357
117
|
|
|
358
|
-
type RequestWriteAccess = () => {
|
|
118
|
+
type RequestWriteAccess = (eventData?: SenderData[typeof MethodRequestWriteAccess]) => {
|
|
359
119
|
status: boolean | typeof NOT_SUPPORTED;
|
|
360
120
|
};
|
|
361
|
-
/**
|
|
362
|
-
* Requests write message access to current user.
|
|
363
|
-
*
|
|
364
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-viewport
|
|
365
|
-
*/
|
|
366
121
|
declare const requestWriteAccess: RequestWriteAccess;
|
|
367
|
-
/**
|
|
368
|
-
* Method support check
|
|
369
|
-
*/
|
|
370
122
|
declare const supportRequestWriteAccess: () => boolean;
|
|
371
123
|
|
|
372
|
-
type SetBackgroundColor = (eventData: {
|
|
373
|
-
/**
|
|
374
|
-
* The Mini App background color in #RRGGBB format.
|
|
375
|
-
*/
|
|
376
|
-
color: string;
|
|
377
|
-
}) => {
|
|
124
|
+
type SetBackgroundColor = (eventData: SenderData[typeof MethodSetBackgroundColor]) => {
|
|
378
125
|
status: boolean | typeof NOT_SUPPORTED;
|
|
379
126
|
};
|
|
380
|
-
/**
|
|
381
|
-
* Updates the Mini App background color.
|
|
382
|
-
*
|
|
383
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-set-background-color
|
|
384
|
-
*/
|
|
385
127
|
declare const setBackgroundColor: SetBackgroundColor;
|
|
386
|
-
/**
|
|
387
|
-
* Method support check
|
|
388
|
-
*/
|
|
389
128
|
declare const supportSetBackgroundColor: () => boolean;
|
|
390
129
|
|
|
391
|
-
type SetHeaderColor = (eventData: {
|
|
392
|
-
/**
|
|
393
|
-
* The Mini App header color key. Could be either bg_color or secondary_bg_color.
|
|
394
|
-
*/
|
|
395
|
-
color_key?: 'bg_color' | 'secondary_bg_color';
|
|
396
|
-
/**
|
|
397
|
-
* Color in HEX format.
|
|
398
|
-
*/
|
|
399
|
-
color?: string;
|
|
400
|
-
}) => {
|
|
130
|
+
type SetHeaderColor = (eventData: SenderData[typeof MethodSetHeaderColor]) => {
|
|
401
131
|
status: boolean | typeof NOT_SUPPORTED;
|
|
402
132
|
};
|
|
403
|
-
/**
|
|
404
|
-
* Updates the Mini App header color. This method should accept color_key or color property.
|
|
405
|
-
*
|
|
406
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-set-header-color
|
|
407
|
-
*/
|
|
408
133
|
declare const setHeaderColor: SetHeaderColor;
|
|
409
|
-
/**
|
|
410
|
-
* Method support check
|
|
411
|
-
*/
|
|
412
134
|
declare const supportSetHeaderColor: () => boolean;
|
|
413
135
|
|
|
414
|
-
type
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
136
|
+
type SetBottomBarColor = (eventData: SenderData[typeof MethodSetBottomBarColor]) => {
|
|
137
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
138
|
+
};
|
|
139
|
+
declare const setBottomBarColor: SetBottomBarColor;
|
|
140
|
+
declare const supportSetBottomBarColor: () => boolean;
|
|
141
|
+
|
|
142
|
+
type SetupBackButton = (eventData: SenderData[typeof MethodSetupBackButton]) => {
|
|
420
143
|
status: boolean | typeof NOT_SUPPORTED;
|
|
421
144
|
};
|
|
422
|
-
/**
|
|
423
|
-
* Updates the Back Button settings.
|
|
424
|
-
*
|
|
425
|
-
* https://docs.telegram-mini-apps.com/platform/ui/back-button
|
|
426
|
-
*/
|
|
427
145
|
declare const setupBackButton: SetupBackButton;
|
|
428
|
-
/**
|
|
429
|
-
* Method support check
|
|
430
|
-
*/
|
|
431
146
|
declare const supportSetupBackButton: () => boolean;
|
|
432
147
|
|
|
433
|
-
type SetupClosingBehavior = (eventData: {
|
|
434
|
-
/**
|
|
435
|
-
* Will user be prompted in case, an application is going to be closed.
|
|
436
|
-
*/
|
|
437
|
-
need_confirmation: boolean;
|
|
438
|
-
}) => {
|
|
148
|
+
type SetupClosingBehavior = (eventData: SenderData[typeof MethodSetupClosingBehavior]) => {
|
|
439
149
|
status: boolean | typeof NOT_SUPPORTED;
|
|
440
150
|
};
|
|
441
|
-
/**
|
|
442
|
-
* Updates current closing behavior.
|
|
443
|
-
*
|
|
444
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-closing-behavior
|
|
445
|
-
*/
|
|
446
151
|
declare const setupClosingBehavior: SetupClosingBehavior;
|
|
447
|
-
/**
|
|
448
|
-
* Method support check
|
|
449
|
-
*/
|
|
450
152
|
declare const supportSetupClosingBehavior: () => boolean;
|
|
451
153
|
|
|
452
|
-
type SetupMainButton = (eventData: {
|
|
453
|
-
/**
|
|
454
|
-
* Optional. Should the Main Button be displayed.
|
|
455
|
-
*/
|
|
456
|
-
is_visible?: boolean;
|
|
457
|
-
/**
|
|
458
|
-
* Optional. Should the Main Button be enabled.
|
|
459
|
-
*/
|
|
460
|
-
is_active?: boolean;
|
|
461
|
-
/**
|
|
462
|
-
* Optional. Should loader inside the Main Button be displayed. Use this property in case, some operation takes time. This loader will make user notified about it.
|
|
463
|
-
*/
|
|
464
|
-
is_progress_visible?: boolean;
|
|
465
|
-
/**
|
|
466
|
-
* Optional. Text inside the Main Button.
|
|
467
|
-
*/
|
|
468
|
-
text?: string;
|
|
469
|
-
/**
|
|
470
|
-
* Optional. The Main Button background color in #RRGGBB format.
|
|
471
|
-
*/
|
|
472
|
-
color?: string;
|
|
473
|
-
/**
|
|
474
|
-
* Optional. The Main Button text color in #RRGGBB format.
|
|
475
|
-
*/
|
|
476
|
-
text_color?: string;
|
|
477
|
-
}) => {
|
|
154
|
+
type SetupMainButton = (eventData: SenderData[typeof MethodSetupMainButton]) => {
|
|
478
155
|
status: boolean | typeof NOT_SUPPORTED;
|
|
479
156
|
};
|
|
480
|
-
/**
|
|
481
|
-
* Updates the Main Button settings.
|
|
482
|
-
*
|
|
483
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-main-button
|
|
484
|
-
*/
|
|
485
157
|
declare const setupMainButton: SetupMainButton;
|
|
486
|
-
/**
|
|
487
|
-
* Method support check
|
|
488
|
-
*/
|
|
489
158
|
declare const supportSetupMainButton: () => boolean;
|
|
490
159
|
|
|
491
|
-
type SetupSettingsButton = (eventData: {
|
|
492
|
-
/**
|
|
493
|
-
* Should the Settings Button be displayed.
|
|
494
|
-
*/
|
|
495
|
-
is_visible: boolean;
|
|
496
|
-
}) => {
|
|
160
|
+
type SetupSettingsButton = (eventData: SenderData[typeof MethodSetupSettingsButton]) => {
|
|
497
161
|
status: boolean | typeof NOT_SUPPORTED;
|
|
498
162
|
};
|
|
499
|
-
/**
|
|
500
|
-
* Updates current state of Settings Button.
|
|
501
|
-
*
|
|
502
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-settings-button
|
|
503
|
-
*/
|
|
504
163
|
declare const setupSettingsButton: SetupSettingsButton;
|
|
505
|
-
/**
|
|
506
|
-
* Method support check
|
|
507
|
-
*/
|
|
508
164
|
declare const supportSetupSettingsButton: () => boolean;
|
|
509
165
|
|
|
510
|
-
type SwitchInlineQuery = (eventData: {
|
|
511
|
-
/**
|
|
512
|
-
* Text which should be inserted in the input after the current bot name. Max length is 256 symbols.
|
|
513
|
-
*/
|
|
514
|
-
query: string;
|
|
515
|
-
/**
|
|
516
|
-
* List of chat types which could be chosen to send the message. Could be empty list. Values:
|
|
517
|
-
*
|
|
518
|
-
* users, bots, groups, channels
|
|
519
|
-
*/
|
|
520
|
-
chat_types: ['users', 'bots', 'groups', 'channels'];
|
|
521
|
-
}) => {
|
|
166
|
+
type SwitchInlineQuery = (eventData: SenderData[typeof MethodSwitchInlineQuery]) => {
|
|
522
167
|
status: boolean | typeof NOT_SUPPORTED;
|
|
523
168
|
};
|
|
524
|
-
/**
|
|
525
|
-
* Inserts the bot's username and the specified inline query in the current chat's input field.
|
|
526
|
-
*
|
|
527
|
-
* Query may be empty, in which case only the bot's username will be inserted.
|
|
528
|
-
*
|
|
529
|
-
* The client prompts the user to choose a specific chat, then opens that chat and inserts the bot's username and the specified inline query in the input field.
|
|
530
|
-
*
|
|
531
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-switch-inline-query
|
|
532
|
-
*/
|
|
533
169
|
declare const switchInlineQuery: SwitchInlineQuery;
|
|
534
|
-
/**
|
|
535
|
-
* Method support check
|
|
536
|
-
*/
|
|
537
170
|
declare const supportSwitchInlineQuery: () => boolean;
|
|
538
171
|
|
|
539
|
-
type TriggerHapticFeedback = (eventData: {
|
|
540
|
-
/**
|
|
541
|
-
* Type of haptic event. Values:
|
|
542
|
-
*
|
|
543
|
-
* impact - when there's a collision involving UI components.
|
|
544
|
-
*
|
|
545
|
-
* notification - when some action execution has been completed.
|
|
546
|
-
*
|
|
547
|
-
* selection_change - when the user changes their selection.
|
|
548
|
-
*/
|
|
549
|
-
type: 'impact' | 'notification' | 'selection_change';
|
|
550
|
-
/**
|
|
551
|
-
* Required when type is impact. Values:
|
|
552
|
-
*
|
|
553
|
-
* light - indicates a collision between small or lightweight UI objects
|
|
554
|
-
*
|
|
555
|
-
* medium - indicates a collision between medium-sized or medium-weight UI objects
|
|
556
|
-
*
|
|
557
|
-
* heavy - indicates a collision between large or heavyweight UI objects
|
|
558
|
-
*
|
|
559
|
-
* rigid - indicates a collision between hard or inflexible UI objects
|
|
560
|
-
*
|
|
561
|
-
* soft - indicates a collision between soft or flexible UI objects
|
|
562
|
-
*/
|
|
563
|
-
impact_style: 'light' | 'medium' | 'heavy' | 'rigid' | 'soft';
|
|
564
|
-
/**
|
|
565
|
-
* Required when type is notification. Values:
|
|
566
|
-
*
|
|
567
|
-
* error - indicates that a task or action has failed
|
|
568
|
-
*
|
|
569
|
-
* success - indicates that a task or action has completed successfully
|
|
570
|
-
*
|
|
571
|
-
* warning - indicates that a task or action produced a warning
|
|
572
|
-
*/
|
|
573
|
-
notification_type: 'error' | 'success' | 'warning';
|
|
574
|
-
}) => {
|
|
172
|
+
type TriggerHapticFeedback = (eventData: SenderData[typeof MethodTriggerHapticFeedback]) => {
|
|
575
173
|
status: boolean | typeof NOT_SUPPORTED;
|
|
576
174
|
};
|
|
577
|
-
/**
|
|
578
|
-
* Generates the haptic feedback event.
|
|
579
|
-
*
|
|
580
|
-
* Original: https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-trigger-haptic-feedback
|
|
581
|
-
*/
|
|
582
175
|
declare const triggerHapticFeedback: TriggerHapticFeedback;
|
|
583
|
-
/**
|
|
584
|
-
* Method support check
|
|
585
|
-
*/
|
|
586
176
|
declare const supportTriggerHapticFeedback: () => boolean;
|
|
587
177
|
|
|
588
178
|
type SessionStorageSet = ({ key, value }: {
|
|
@@ -591,339 +181,194 @@ type SessionStorageSet = ({ key, value }: {
|
|
|
591
181
|
}) => {
|
|
592
182
|
status: boolean | typeof NOT_SUPPORTED;
|
|
593
183
|
};
|
|
594
|
-
/**
|
|
595
|
-
* sessions storage set.
|
|
596
|
-
*/
|
|
597
184
|
declare const sessionStorageSet: SessionStorageSet;
|
|
598
|
-
/**
|
|
599
|
-
* Method support check
|
|
600
|
-
*/
|
|
601
185
|
declare const supportSessionStorageSet: () => boolean;
|
|
602
186
|
|
|
603
187
|
type SessionStorageGet = ({ key }: {
|
|
604
188
|
key: string;
|
|
605
189
|
}) => {
|
|
190
|
+
is_json: boolean;
|
|
606
191
|
status: boolean | typeof NOT_SUPPORTED;
|
|
607
192
|
value?: any;
|
|
608
193
|
};
|
|
609
|
-
/**
|
|
610
|
-
* sessions storage get.
|
|
611
|
-
*/
|
|
612
194
|
declare const sessionStorageGet: SessionStorageGet;
|
|
613
|
-
/**
|
|
614
|
-
* Method support check
|
|
615
|
-
*/
|
|
616
195
|
declare const supportSessionStorageGet: () => boolean;
|
|
617
196
|
|
|
618
|
-
type SetupSwipeBehavior = (
|
|
619
|
-
allow_vertical_swipe: boolean;
|
|
620
|
-
}) => {
|
|
197
|
+
type SetupSwipeBehavior = (eventData: SenderData[typeof MethodSetupSwipeBehavior]) => {
|
|
621
198
|
status: boolean | typeof NOT_SUPPORTED;
|
|
622
199
|
};
|
|
623
|
-
/**
|
|
624
|
-
* sessions storage set.
|
|
625
|
-
*/
|
|
626
200
|
declare const setupSwipeBehavior: SetupSwipeBehavior;
|
|
627
|
-
/**
|
|
628
|
-
* Method support check
|
|
629
|
-
*/
|
|
630
201
|
declare const supportSetupSwipeBehavior: () => boolean;
|
|
631
202
|
|
|
203
|
+
type ShareToStory = (eventData?: SenderData[typeof MethodShareToStory]) => {
|
|
204
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
205
|
+
};
|
|
206
|
+
declare const shareToStory: ShareToStory;
|
|
207
|
+
declare const supportShareToStory: () => boolean;
|
|
208
|
+
|
|
209
|
+
type CheckHomeScreen = (eventData: SenderData[typeof MethodCheckHomeScreen]) => Promise<{
|
|
210
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
211
|
+
data?: EventsData[typeof EventCheckHomeScreen];
|
|
212
|
+
}>;
|
|
213
|
+
declare const checkHomeScreen: CheckHomeScreen;
|
|
214
|
+
declare const supportCheckHomeScreen: () => boolean;
|
|
215
|
+
|
|
216
|
+
type AddToHomeScreen = (eventData?: SenderData[typeof MethodAddToHomeScreen]) => {
|
|
217
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
218
|
+
};
|
|
219
|
+
declare const addToHomeScreen: AddToHomeScreen;
|
|
220
|
+
declare const supportAddToHomeScreen: () => boolean;
|
|
221
|
+
|
|
222
|
+
type RequestSafeAreaInset = (eventData?: SenderData[typeof MethodRequestSafeArea]) => {
|
|
223
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
224
|
+
};
|
|
225
|
+
declare const requestSafeAreaInset: RequestSafeAreaInset;
|
|
226
|
+
declare const supportRequestSafeAreaInset: () => boolean;
|
|
227
|
+
|
|
228
|
+
type RequestContentSafeAreaInset = (eventData?: SenderData[typeof MethodRequestContentSafeArea]) => {
|
|
229
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
230
|
+
};
|
|
231
|
+
declare const requestContentSafeAreaInset: RequestContentSafeAreaInset;
|
|
232
|
+
declare const supportRequestContentSafeAreaInset: () => boolean;
|
|
233
|
+
|
|
234
|
+
type SetupFullScreen = (eventData?: SenderData[typeof MethodRequestFullscreen]) => {
|
|
235
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
236
|
+
};
|
|
237
|
+
declare const setupFullScreen: SetupFullScreen;
|
|
238
|
+
declare const supportSetupFullScreen: () => boolean;
|
|
239
|
+
|
|
240
|
+
type SetupOrientation = (eventData?: SenderData[typeof MethodToggleOrientationLock]) => {
|
|
241
|
+
status: boolean | typeof NOT_SUPPORTED;
|
|
242
|
+
};
|
|
243
|
+
declare const setupOrientation: SetupOrientation;
|
|
244
|
+
declare const supportSetupOrientation: () => boolean;
|
|
245
|
+
|
|
632
246
|
type User = {
|
|
633
|
-
/**
|
|
634
|
-
* Optional. True, if this user added the bot to the attachment menu.
|
|
635
|
-
*/
|
|
636
247
|
added_to_attachment_menu?: boolean;
|
|
637
|
-
/**
|
|
638
|
-
* Optional. True, if this user allowed the bot to message them.
|
|
639
|
-
*/
|
|
640
248
|
allows_write_to_pm?: boolean;
|
|
641
|
-
/**
|
|
642
|
-
* Optional. Has the user purchased Telegram Premium.
|
|
643
|
-
*/
|
|
644
249
|
is_premium?: boolean;
|
|
645
|
-
/**
|
|
646
|
-
* Bot or user name.
|
|
647
|
-
*/
|
|
648
250
|
first_name: string;
|
|
649
|
-
/**
|
|
650
|
-
* Bot or user ID.
|
|
651
|
-
*/
|
|
652
251
|
id: number;
|
|
653
|
-
/**
|
|
654
|
-
* Optional. Is the user a bot.
|
|
655
|
-
*/
|
|
656
252
|
is_bot?: boolean;
|
|
657
|
-
/**
|
|
658
|
-
* Optional. User's last name.
|
|
659
|
-
*/
|
|
660
253
|
last_name?: string;
|
|
661
|
-
/**
|
|
662
|
-
* Optional. IETF user's language.
|
|
663
|
-
*/
|
|
664
254
|
language_code: string;
|
|
665
|
-
/**
|
|
666
|
-
* Optional. Link to the user's or bot's photo.
|
|
667
|
-
*
|
|
668
|
-
* Photos can have formats .jpeg and .svg.
|
|
669
|
-
*
|
|
670
|
-
* It is returned only for Mini Apps opened through the attachment menu.
|
|
671
|
-
*/
|
|
672
255
|
photo_url?: string;
|
|
673
|
-
/**
|
|
674
|
-
* Optional. Login of the bot or user.
|
|
675
|
-
*/
|
|
676
256
|
username?: string;
|
|
677
257
|
};
|
|
678
258
|
type Chat = {
|
|
679
|
-
/**
|
|
680
|
-
* Unique chat ID.
|
|
681
|
-
*/
|
|
682
259
|
id: number;
|
|
683
|
-
/**
|
|
684
|
-
* Chat type. Values:
|
|
685
|
-
*
|
|
686
|
-
* group, supergroup, channel
|
|
687
|
-
*/
|
|
688
260
|
type: 'group' | 'supergroup' | 'channel';
|
|
689
|
-
/**
|
|
690
|
-
* Chat title.
|
|
691
|
-
*/
|
|
692
261
|
title: string;
|
|
693
|
-
/**
|
|
694
|
-
* Optional. Chat photo link. The photo can have .jpeg and .svg formats.
|
|
695
|
-
*
|
|
696
|
-
* It is returned only for Mini Apps opened through the attachments menu.
|
|
697
|
-
*/
|
|
698
262
|
photo_url?: string;
|
|
699
|
-
/**
|
|
700
|
-
* Optional. Chat user login.
|
|
701
|
-
*/
|
|
702
263
|
username?: string;
|
|
703
264
|
};
|
|
704
|
-
type GetInitData =
|
|
705
|
-
/**
|
|
706
|
-
* The date the initialization data was created.
|
|
707
|
-
*
|
|
708
|
-
* Is a number representing a Unix timestamp.
|
|
709
|
-
*/
|
|
265
|
+
type GetInitData = {
|
|
710
266
|
auth_date: number;
|
|
711
|
-
/**
|
|
712
|
-
* Optional. The number of seconds after which a message can be sent via the method answerWebAppQuery.
|
|
713
|
-
*/
|
|
714
267
|
can_send_after?: number;
|
|
715
|
-
/**
|
|
716
|
-
* Optional. An object containing information about the chat with the bot in which the Mini Apps was launched.
|
|
717
|
-
*
|
|
718
|
-
* It is returned only for Mini Apps opened through the attachments menu.
|
|
719
|
-
*/
|
|
720
268
|
chat?: Chat;
|
|
721
|
-
/**
|
|
722
|
-
* Optional. The type of chat from which the Mini Apps was opened. Values:
|
|
723
|
-
*
|
|
724
|
-
* sender, private, group, supergroup, channel
|
|
725
|
-
*
|
|
726
|
-
* Returned only for applications opened by direct link.
|
|
727
|
-
*/
|
|
728
269
|
chat_type?: 'sender' | 'private' | 'group' | 'supergroup' | 'channel';
|
|
729
|
-
/**
|
|
730
|
-
* Optional. A global identifier indicating the chat from which the Mini Apps was opened.
|
|
731
|
-
*
|
|
732
|
-
* Returned only for applications opened by direct link.
|
|
733
|
-
*/
|
|
734
270
|
chat_instance?: string;
|
|
735
|
-
/**
|
|
736
|
-
* Initialization data signature.
|
|
737
|
-
*/
|
|
738
271
|
hash: string;
|
|
739
|
-
/**
|
|
740
|
-
* Optional. The unique session ID of the Mini App. Used in the process of sending a message via the method answerWebAppQuery.
|
|
741
|
-
*/
|
|
742
272
|
query_id?: string;
|
|
743
|
-
/**
|
|
744
|
-
* Optional. An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu.
|
|
745
|
-
*
|
|
746
|
-
* Returned only for private chats and only for Mini Apps launched via the attachment menu.
|
|
747
|
-
*/
|
|
748
273
|
receiver?: User;
|
|
749
|
-
/**
|
|
750
|
-
* Optional. The value of the startattach or startapp query parameter specified in the link. It is returned only for Mini Apps opened through the attachment menu.
|
|
751
|
-
*/
|
|
752
274
|
start_param?: string;
|
|
753
|
-
/**
|
|
754
|
-
* Optional. An object containing information about the current user.
|
|
755
|
-
*/
|
|
756
275
|
user?: User;
|
|
276
|
+
} | undefined;
|
|
277
|
+
declare const getInitData: () => GetInitData;
|
|
278
|
+
|
|
279
|
+
type ThemeParams = {
|
|
280
|
+
bg_color: string;
|
|
281
|
+
text_color: string;
|
|
282
|
+
hint_color: string;
|
|
283
|
+
link_color: string;
|
|
284
|
+
button_color: string;
|
|
285
|
+
button_text_color: string;
|
|
286
|
+
secondary_bg_color: string;
|
|
287
|
+
header_bg_color: string;
|
|
288
|
+
bottom_bar_bg_color: string;
|
|
289
|
+
accent_text_color: string;
|
|
290
|
+
section_bg_color: string;
|
|
291
|
+
section_header_text_color: string;
|
|
292
|
+
section_separator_color: string;
|
|
293
|
+
subtitle_text_color: string;
|
|
294
|
+
destructive_text_color: string;
|
|
757
295
|
};
|
|
758
|
-
|
|
759
|
-
* In the list of launch parameters, initialization data is located in the tgWebAppData parameter.
|
|
760
|
-
*
|
|
761
|
-
* It is a set of data mostly related to a specific user who launched the Mini App.
|
|
762
|
-
*
|
|
763
|
-
* Original: https://docs.telegram-mini-apps.com/platform/launch-parameters/init-data#init-data
|
|
764
|
-
*/
|
|
765
|
-
declare const getInitData: GetInitData;
|
|
296
|
+
declare const getThemeParams: (theme_params?: ThemeParams) => ThemeParams;
|
|
766
297
|
|
|
767
298
|
type Sender = (eventType: string, eventData?: any) => void;
|
|
768
|
-
/**
|
|
769
|
-
* EDIT
|
|
770
|
-
*
|
|
771
|
-
* window.parent.postMessage(JSON.stringify({ eventType, eventData }), 'https://web.telegram.org');
|
|
772
|
-
* window['TelegramWebviewProxy'].postEvent(eventType, JSON.stringify(eventData));
|
|
773
|
-
*/
|
|
774
299
|
declare const sender: Sender;
|
|
775
300
|
|
|
776
|
-
|
|
777
|
-
declare const
|
|
301
|
+
declare const EventBackButtonPressed = "back_button_pressed";
|
|
302
|
+
declare const EventClipboardTextReceived = "clipboard_text_received";
|
|
303
|
+
declare const EventCustomMethodInvoked = "custom_method_invoked";
|
|
304
|
+
declare const EventInvoiceClosed = "invoice_closed";
|
|
305
|
+
declare const EventMainButtonPressed = "main_button_pressed";
|
|
306
|
+
declare const EventPhoneRequested = "phone_requested";
|
|
307
|
+
declare const EventPopupClosed = "popup_closed";
|
|
308
|
+
declare const EventReloadIframe = "reload_iframe";
|
|
309
|
+
declare const EventQrTextReceived = "qr_text_received";
|
|
310
|
+
declare const EventScanQrPopupClosed = "scan_qr_popup_closed";
|
|
311
|
+
declare const EventSetCustomStyle = "set_custom_style";
|
|
312
|
+
declare const EventSettingsButtonPressed = "settings_button_pressed";
|
|
313
|
+
declare const EventThemeChanged = "theme_changed";
|
|
314
|
+
declare const EventViewportChanged = "viewport_changed";
|
|
315
|
+
declare const EventWriteAccessRequested = "write_access_requested";
|
|
316
|
+
declare const EventSafeAreaChanged = "safe_area_changed";
|
|
317
|
+
declare const EventContentSafeAreaChanged = "content_safe_area_changed";
|
|
318
|
+
declare const EventCheckHomeScreen = "web_app_check_home_screen";
|
|
319
|
+
|
|
320
|
+
type GetPlatform = () => 'phone' | 'web' | 'desktop';
|
|
321
|
+
declare const TG_WEB = "web";
|
|
322
|
+
declare const TG_PHONE = "phone";
|
|
323
|
+
declare const TG_DESKTOP = "desktop";
|
|
324
|
+
declare const getPlatform: GetPlatform;
|
|
325
|
+
|
|
326
|
+
declare const NOT_SUPPORTED = "not_supported";
|
|
778
327
|
|
|
779
328
|
type EventsData = {
|
|
780
|
-
/**
|
|
781
|
-
* User clicked the Back Button.
|
|
782
|
-
*/
|
|
783
329
|
back_button_pressed: undefined;
|
|
784
|
-
/**
|
|
785
|
-
* Telegram application attempted to extract text from clipboard.
|
|
786
|
-
*/
|
|
787
330
|
clipboard_text_received: {
|
|
788
|
-
/**
|
|
789
|
-
* Passed during the web_app_read_text_from_clipboard method invocation req_id value.
|
|
790
|
-
*/
|
|
791
331
|
req_id: string;
|
|
792
|
-
/**
|
|
793
|
-
* Optional. Data extracted from the clipboard. The returned value will have the type string only in the case, application has access to the clipboard.
|
|
794
|
-
*/
|
|
795
332
|
data?: string | null;
|
|
796
333
|
};
|
|
797
|
-
/**
|
|
798
|
-
* Custom method invocation completed.
|
|
799
|
-
*/
|
|
800
334
|
custom_method_invoked: {
|
|
801
|
-
/**
|
|
802
|
-
* Unique identifier of this invocation.
|
|
803
|
-
*/
|
|
804
335
|
req_id: string;
|
|
805
|
-
/**
|
|
806
|
-
* Optional. Method invocation successful result.
|
|
807
|
-
*/
|
|
808
336
|
result?: unknown;
|
|
809
|
-
/**
|
|
810
|
-
* Optional. Method invocation error code.
|
|
811
|
-
*/
|
|
812
337
|
error?: string;
|
|
813
338
|
};
|
|
814
|
-
/**
|
|
815
|
-
* An invoice was closed.
|
|
816
|
-
*/
|
|
817
339
|
invoice_closed: {
|
|
818
|
-
/**
|
|
819
|
-
* Passed during the web_app_open_invoice method invocation slug value.
|
|
820
|
-
*/
|
|
821
340
|
slug: string;
|
|
822
|
-
/**
|
|
823
|
-
* Invoice status. Values:
|
|
824
|
-
*
|
|
825
|
-
* paid - invoice was paid
|
|
826
|
-
*
|
|
827
|
-
* failed - invoice failed
|
|
828
|
-
*
|
|
829
|
-
* pending - invoice is currently pending
|
|
830
|
-
*
|
|
831
|
-
* cancelled - invoice was cancelled
|
|
832
|
-
*/
|
|
833
341
|
status: 'paid' | 'failed' | 'pending' | 'cancelled';
|
|
834
342
|
};
|
|
835
|
-
/**
|
|
836
|
-
* User clicked the Main Button.
|
|
837
|
-
*/
|
|
838
343
|
main_button_pressed: undefined;
|
|
839
|
-
/**
|
|
840
|
-
* Application received phone access request status.
|
|
841
|
-
*/
|
|
842
344
|
phone_requested: {
|
|
843
|
-
/**
|
|
844
|
-
* Request status. Can only be sent
|
|
845
|
-
*/
|
|
846
345
|
status: 'sent';
|
|
847
346
|
};
|
|
848
|
-
/**
|
|
849
|
-
* Popup was closed.
|
|
850
|
-
*/
|
|
851
347
|
popup_closed: {
|
|
852
|
-
/**
|
|
853
|
-
* Optional. Identifier of the clicked button.
|
|
854
|
-
*
|
|
855
|
-
* In case, the popup was closed without clicking any button, this property will be omitted.
|
|
856
|
-
*/
|
|
857
348
|
button_id?: string;
|
|
858
349
|
};
|
|
859
|
-
/**
|
|
860
|
-
* Parent iframe requested current iframe reload.
|
|
861
|
-
*/
|
|
862
350
|
reload_iframe: undefined;
|
|
863
|
-
/**
|
|
864
|
-
* The QR scanner scanned some QR and extracted its content.
|
|
865
|
-
*/
|
|
866
351
|
qr_text_received: {
|
|
867
|
-
/**
|
|
868
|
-
* Optional. Data extracted from the QR.
|
|
869
|
-
*/
|
|
870
352
|
data?: string;
|
|
871
353
|
};
|
|
872
|
-
/**
|
|
873
|
-
* QR scanner was closed.
|
|
874
|
-
*/
|
|
875
354
|
scan_qr_popup_closed: undefined;
|
|
876
|
-
/**
|
|
877
|
-
* The event which is usually sent by the Telegram web application.
|
|
878
|
-
*
|
|
879
|
-
* Its payload represents <style/> tag html content, a developer could use. The stylesheet described in the payload will help the developer to stylize the app scrollbar (but he is still able to do it himself).
|
|
880
|
-
*/
|
|
881
355
|
set_custom_style: undefined;
|
|
882
|
-
/**
|
|
883
|
-
* Occurs when the Settings Button was pressed.
|
|
884
|
-
*/
|
|
885
356
|
settings_button_pressed: undefined;
|
|
886
|
-
/**
|
|
887
|
-
* Occurs whenever the theme was changed in the user's Telegram app ( including switching to night mode).
|
|
888
|
-
*/
|
|
889
357
|
theme_changed: {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
*/
|
|
893
|
-
theme_params: Record<string, string>;
|
|
894
|
-
};
|
|
895
|
-
/**
|
|
896
|
-
* Occurs whenever the viewport has been changed.
|
|
897
|
-
*
|
|
898
|
-
* For example, when the user started dragging the application or called the expansion method.
|
|
899
|
-
*/
|
|
358
|
+
theme_params: ThemeParams;
|
|
359
|
+
};
|
|
900
360
|
viewport_changed: {
|
|
901
|
-
/**
|
|
902
|
-
* The viewport height.
|
|
903
|
-
*/
|
|
904
361
|
height: number;
|
|
905
|
-
/**
|
|
906
|
-
* Optional. The viewport width.
|
|
907
|
-
*/
|
|
908
362
|
width?: number;
|
|
909
|
-
/**
|
|
910
|
-
* Is the viewport currently expanded.
|
|
911
|
-
*/
|
|
912
363
|
is_expanded: boolean;
|
|
913
|
-
/**
|
|
914
|
-
* Is the viewport current state stable and not going to change in the next moment.
|
|
915
|
-
*/
|
|
916
364
|
is_state_stable: boolean;
|
|
917
365
|
};
|
|
918
|
-
/**
|
|
919
|
-
* Application received write access request status.
|
|
920
|
-
*/
|
|
921
366
|
write_access_requested: {
|
|
922
|
-
/**
|
|
923
|
-
* Request status. Can only be allowed.
|
|
924
|
-
*/
|
|
925
367
|
status: 'allowed';
|
|
926
368
|
};
|
|
369
|
+
[EventCheckHomeScreen]: {
|
|
370
|
+
status: 'unsupported' | 'unknown' | 'added' | 'missed';
|
|
371
|
+
};
|
|
927
372
|
};
|
|
928
373
|
interface TelegramGameProxy {
|
|
929
374
|
receiveEvent: (event: string, data: string) => void;
|
|
@@ -957,14 +402,6 @@ declare namespace listener {
|
|
|
957
402
|
export { type listener_EventsData as EventsData, listener_off as off, listener_on as on, listener_once as once };
|
|
958
403
|
}
|
|
959
404
|
|
|
960
|
-
type GetPlatform = () => 'phone' | 'web' | 'desktop';
|
|
961
|
-
declare const TG_WEB = "web";
|
|
962
|
-
declare const TG_PHONE = "phone";
|
|
963
|
-
declare const TG_DESKTOP = "desktop";
|
|
964
|
-
declare const getPlatform: GetPlatform;
|
|
965
|
-
|
|
966
|
-
declare const NOT_SUPPORTED = "not_supported";
|
|
967
|
-
|
|
968
405
|
declare const MethodInvokeCustomMethod = "web_app_invoke_custom_method";
|
|
969
406
|
declare const MethodOpenScanQrPopup = "web_app_open_scan_qr_popup";
|
|
970
407
|
declare const MethodReadTextFromClipboard = "web_app_read_text_from_clipboard";
|
|
@@ -985,6 +422,7 @@ declare const MethodRequestViewport = "web_app_request_viewport";
|
|
|
985
422
|
declare const MethodRequestWriteAccess = "web_app_request_write_access";
|
|
986
423
|
declare const MethodSetBackgroundColor = "web_app_set_background_color";
|
|
987
424
|
declare const MethodSetHeaderColor = "web_app_set_header_color";
|
|
425
|
+
declare const MethodSetBottomBarColor = "web_app_set_bottom_bar_color";
|
|
988
426
|
declare const MethodSetupBackButton = "web_app_setup_back_button";
|
|
989
427
|
declare const MethodSetupClosingBehavior = "web_app_setup_closing_behavior";
|
|
990
428
|
declare const MethodSetupMainButton = "web_app_setup_main_button";
|
|
@@ -992,21 +430,190 @@ declare const MethodSetupSettingsButton = "web_app_setup_settings_button";
|
|
|
992
430
|
declare const MethodSwitchInlineQuery = "web_app_switch_inline_query";
|
|
993
431
|
declare const MethodTriggerHapticFeedback = "web_app_trigger_haptic_feedback";
|
|
994
432
|
declare const MethodSetupSwipeBehavior = "web_app_setup_swipe_behavior";
|
|
433
|
+
declare const MethodShareToStory = "web_app_share_to_story";
|
|
434
|
+
declare const MethodRequestSafeArea = "web_app_request_safe_area";
|
|
435
|
+
declare const MethodRequestContentSafeArea = "web_app_request_content_safe_area";
|
|
436
|
+
declare const MethodRequestFullscreen = "web_app_request_fullscreen";
|
|
437
|
+
declare const MethodExitFullscreen = "web_app_exit_fullscreen";
|
|
438
|
+
declare const MethodToggleOrientationLock = "web_app_toggle_orientation_lock";
|
|
439
|
+
declare const MethodAddToHomeScreen = "web_app_add_to_home_screen";
|
|
440
|
+
declare const MethodCheckHomeScreen = "web_app_check_home_screen";
|
|
441
|
+
declare enum Method {
|
|
442
|
+
InvokeCustomMethod = "web_app_invoke_custom_method",
|
|
443
|
+
OpenScanQrPopup = "web_app_open_scan_qr_popup",
|
|
444
|
+
ReadTextFromClipboard = "web_app_read_text_from_clipboard",
|
|
445
|
+
RequestPhone = "web_app_request_phone",
|
|
446
|
+
Close = "web_app_close",
|
|
447
|
+
CloseScanQrPopup = "web_app_close_scan_qr_popup",
|
|
448
|
+
DataSend = "web_app_data_send",
|
|
449
|
+
Expand = "web_app_expand",
|
|
450
|
+
IframeReady = "iframe_ready",
|
|
451
|
+
IframeWillReload = "iframe_will_reload",
|
|
452
|
+
OpenInvoice = "web_app_open_invoice",
|
|
453
|
+
OpenLink = "web_app_open_link",
|
|
454
|
+
OpenPopup = "web_app_open_popup",
|
|
455
|
+
OpenTgLink = "web_app_open_tg_link",
|
|
456
|
+
Ready = "web_app_ready",
|
|
457
|
+
RequestTheme = "web_app_request_theme",
|
|
458
|
+
RequestViewport = "web_app_request_viewport",
|
|
459
|
+
RequestWriteAccess = "web_app_request_write_access",
|
|
460
|
+
SetBackgroundColor = "web_app_set_background_color",
|
|
461
|
+
SetHeaderColor = "web_app_set_header_color",
|
|
462
|
+
SetBottomBarColor = "web_app_set_bottom_bar_color",
|
|
463
|
+
SetupBackButton = "web_app_setup_back_button",
|
|
464
|
+
SetupClosingBehavior = "web_app_setup_closing_behavior",
|
|
465
|
+
SetupMainButton = "web_app_setup_main_button",
|
|
466
|
+
SetupSettingsButton = "web_app_setup_settings_button",
|
|
467
|
+
SwitchInlineQuery = "web_app_switch_inline_query",
|
|
468
|
+
TriggerHapticFeedback = "web_app_trigger_haptic_feedback",
|
|
469
|
+
SetupSwipeBehavior = "web_app_setup_swipe_behavior",
|
|
470
|
+
ShareToStory = "web_app_share_to_story",
|
|
471
|
+
RequestSafeArea = "web_app_request_safe_area",
|
|
472
|
+
RequestContentSafeArea = "web_app_request_content_safe_area",
|
|
473
|
+
RequestFullscreen = "web_app_request_fullscreen",
|
|
474
|
+
ExitFullscreen = "web_app_exit_fullscreen",
|
|
475
|
+
ToggleOrientationLock = "web_app_toggle_orientation_lock",
|
|
476
|
+
AddToHomeScreen = "web_app_add_to_home_screen",
|
|
477
|
+
CheckHomeScreen = "web_app_check_home_screen"
|
|
478
|
+
}
|
|
479
|
+
type PopupButton = {
|
|
480
|
+
id: string;
|
|
481
|
+
type: 'default' | 'destructive' | 'ok' | 'close' | 'cancel';
|
|
482
|
+
text: string;
|
|
483
|
+
};
|
|
484
|
+
type SenderData = {
|
|
485
|
+
[MethodInvokeCustomMethod]: {
|
|
486
|
+
req_id?: string;
|
|
487
|
+
method: string;
|
|
488
|
+
params: unknown;
|
|
489
|
+
};
|
|
490
|
+
[MethodOpenScanQrPopup]: {
|
|
491
|
+
text?: string;
|
|
492
|
+
is_close?: boolean;
|
|
493
|
+
};
|
|
494
|
+
[MethodReadTextFromClipboard]: {
|
|
495
|
+
req_id?: string;
|
|
496
|
+
};
|
|
497
|
+
[MethodRequestPhone]: undefined;
|
|
498
|
+
[MethodClose]: undefined;
|
|
499
|
+
[MethodCloseScanQrPopup]: undefined;
|
|
500
|
+
[MethodDataSend]: {
|
|
501
|
+
data: string;
|
|
502
|
+
};
|
|
503
|
+
[MethodExpand]: undefined;
|
|
504
|
+
[MethodIframeReady]: {
|
|
505
|
+
reload_supported?: boolean;
|
|
506
|
+
};
|
|
507
|
+
[MethodIframeWillReload]: undefined;
|
|
508
|
+
[MethodOpenInvoice]: {
|
|
509
|
+
slug: string;
|
|
510
|
+
};
|
|
511
|
+
[MethodOpenLink]: {
|
|
512
|
+
url: string;
|
|
513
|
+
try_instant_view?: boolean;
|
|
514
|
+
};
|
|
515
|
+
[MethodOpenPopup]: {
|
|
516
|
+
title: string;
|
|
517
|
+
message: string;
|
|
518
|
+
buttons: PopupButton[];
|
|
519
|
+
};
|
|
520
|
+
[MethodOpenTgLink]: {
|
|
521
|
+
path_full: string;
|
|
522
|
+
};
|
|
523
|
+
[MethodReady]: undefined;
|
|
524
|
+
[MethodRequestTheme]: undefined;
|
|
525
|
+
[MethodRequestViewport]: undefined;
|
|
526
|
+
[MethodRequestWriteAccess]: undefined;
|
|
527
|
+
[MethodSetBackgroundColor]: {
|
|
528
|
+
color: string;
|
|
529
|
+
};
|
|
530
|
+
[MethodSetHeaderColor]: {
|
|
531
|
+
color_key: 'bg_color' | 'secondary_bg_color';
|
|
532
|
+
color?: undefined;
|
|
533
|
+
} | {
|
|
534
|
+
color: string;
|
|
535
|
+
color_key?: undefined;
|
|
536
|
+
};
|
|
537
|
+
[MethodSetBottomBarColor]: {
|
|
538
|
+
color_key: 'bg_color' | 'secondary_bg_color' | 'bottom_bar_bg_color';
|
|
539
|
+
color?: undefined;
|
|
540
|
+
} | {
|
|
541
|
+
color: string;
|
|
542
|
+
color_key?: undefined;
|
|
543
|
+
};
|
|
544
|
+
[MethodSetupBackButton]: {
|
|
545
|
+
is_visible: boolean;
|
|
546
|
+
};
|
|
547
|
+
[MethodSetupClosingBehavior]: {
|
|
548
|
+
need_confirmation: boolean;
|
|
549
|
+
};
|
|
550
|
+
[MethodSetupMainButton]: {
|
|
551
|
+
is_visible?: boolean;
|
|
552
|
+
is_active?: boolean;
|
|
553
|
+
is_progress_visible?: boolean;
|
|
554
|
+
text?: string;
|
|
555
|
+
color?: string;
|
|
556
|
+
text_color?: string;
|
|
557
|
+
};
|
|
558
|
+
[MethodSetupSettingsButton]: {
|
|
559
|
+
is_visible: boolean;
|
|
560
|
+
};
|
|
561
|
+
[MethodSwitchInlineQuery]: {
|
|
562
|
+
query: string;
|
|
563
|
+
chat_types: ['users', 'bots', 'groups', 'channels'];
|
|
564
|
+
};
|
|
565
|
+
[MethodTriggerHapticFeedback]: {
|
|
566
|
+
type: 'impact';
|
|
567
|
+
impact_style: 'light' | 'medium' | 'heavy' | 'rigid' | 'soft';
|
|
568
|
+
} | {
|
|
569
|
+
type: 'notification';
|
|
570
|
+
notification_type: 'error' | 'success' | 'warning';
|
|
571
|
+
} | {
|
|
572
|
+
type: 'selection_change';
|
|
573
|
+
impact_style?: undefined;
|
|
574
|
+
notification_type?: undefined;
|
|
575
|
+
};
|
|
576
|
+
[MethodSetupSwipeBehavior]: {
|
|
577
|
+
allow_vertical_swipe: boolean;
|
|
578
|
+
};
|
|
579
|
+
[MethodShareToStory]: {
|
|
580
|
+
media: string;
|
|
581
|
+
text?: string;
|
|
582
|
+
widget_link?: {
|
|
583
|
+
url: string;
|
|
584
|
+
name: string;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
[MethodRequestSafeArea]: undefined;
|
|
588
|
+
[MethodRequestContentSafeArea]: undefined;
|
|
589
|
+
[MethodRequestFullscreen]: {
|
|
590
|
+
is_full: boolean;
|
|
591
|
+
};
|
|
592
|
+
[MethodExitFullscreen]: {
|
|
593
|
+
is_full: boolean;
|
|
594
|
+
};
|
|
595
|
+
[MethodToggleOrientationLock]: {
|
|
596
|
+
locked: boolean;
|
|
597
|
+
};
|
|
598
|
+
[MethodAddToHomeScreen]: undefined;
|
|
599
|
+
[MethodCheckHomeScreen]: undefined;
|
|
600
|
+
};
|
|
995
601
|
|
|
996
|
-
|
|
997
|
-
declare const
|
|
998
|
-
|
|
999
|
-
declare const
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
declare const
|
|
1009
|
-
|
|
1010
|
-
|
|
602
|
+
type Debug = (methondName: string, errorId: number) => void;
|
|
603
|
+
declare const debug: Debug;
|
|
604
|
+
|
|
605
|
+
declare const getAppData: () => string | null;
|
|
606
|
+
|
|
607
|
+
type Value = {
|
|
608
|
+
viewport?: EventsData[typeof EventViewportChanged] & {
|
|
609
|
+
safe_area_bottom: number;
|
|
610
|
+
};
|
|
611
|
+
theme?: EventsData[typeof EventThemeChanged];
|
|
612
|
+
init?: GetInitData;
|
|
613
|
+
};
|
|
614
|
+
declare const ContextTwa: Context<Value>;
|
|
615
|
+
interface ProviderTWA extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
616
|
+
}
|
|
617
|
+
declare const ProviderTWA: Component<ProviderTWA>;
|
|
1011
618
|
|
|
1012
|
-
export { EventBackButtonPressed, EventClipboardTextReceived, EventCustomMethodInvoked, EventInvoiceClosed, EventMainButtonPressed, EventPhoneRequested, EventPopupClosed, EventQrTextReceived, EventReloadIframe, EventScanQrPopupClosed, EventSetCustomStyle, EventSettingsButtonPressed, EventThemeChanged, EventViewportChanged, EventWriteAccessRequested, type EventsData, MethodClose, MethodCloseScanQrPopup, MethodDataSend, MethodExpand, MethodIframeReady, MethodIframeWillReload, MethodInvokeCustomMethod, MethodOpenInvoice, MethodOpenLink, MethodOpenPopup, MethodOpenScanQrPopup, MethodOpenTgLink, MethodReadTextFromClipboard, MethodReady, MethodRequestPhone, MethodRequestTheme, MethodRequestViewport, MethodRequestWriteAccess, MethodSetBackgroundColor, MethodSetHeaderColor, MethodSetupBackButton, MethodSetupClosingBehavior, MethodSetupMainButton, MethodSetupSettingsButton, MethodSetupSwipeBehavior, MethodSwitchInlineQuery, MethodTriggerHapticFeedback, NOT_SUPPORTED, TG_DESKTOP, TG_PHONE, TG_WEB, close as bridgeClose, closeScanQrPopup as bridgeCloseScanQrPopup, dataSend as bridgeDataSend, expand as bridgeExpand, getInitData as bridgeGetInitData, iframeReady as bridgeIframeReady, iframeWillReload as bridgeIframeWillReload, invokeCustomMethod as bridgeInvokeCustomMethod, openInvoice as bridgeOpenInvoice, openLink as bridgeOpenLink, openPopup as bridgeOpenPopup, openScanQrPopup as bridgeOpenScanQrPopup, openTgLink as bridgeOpenTgLink, readTextFromClipboard as bridgeReadTextFromClipboard, ready as bridgeReady, requestPhone as bridgeRequestPhone, requestTheme as bridgeRequestTheme, requestViewport as bridgeRequestViewport, requestWriteAccess as bridgeRequestWriteAccess, sessionStorageGet as bridgeSessionStorageGet, sessionStorageSet as bridgeSessionStorageSet, setBackgroundColor as bridgeSetBackgroundColor, setHeaderColor as bridgeSetHeaderColor, setupBackButton as bridgeSetupBackButton, setupClosingBehavior as bridgeSetupClosingBehavior, setupMainButton as bridgeSetupMainButton, setupSettingsButton as bridgeSetupSettingsButton, setupSwipeBehavior as bridgeSetupSwipeBehavior, switchInlineQuery as bridgeSwitchInlineQuery, triggerHapticFeedback as bridgeTriggerHapticFeedback, createIsViewportChanged, debug, getPlatform, listener, sender, supportClose, supportCloseScanQrPopup, supportDataSend, supportExpand, supportIframeReady, supportIframeWillReload, supportInvokeCustomMethod, supportOpenInvoice, supportOpenLink, supportOpenPopup, supportOpenScanQrPopup, supportOpenTgLink, supportReadTextFromClipboard, supportReady, supportRequestPhone, supportRequestTheme, supportRequestViewport, supportRequestWriteAccess, supportSessionStorageGet, supportSessionStorageSet, supportSetBackgroundColor, supportSetHeaderColor, supportSetupBackButton, supportSetupClosingBehavior, supportSetupMainButton, supportSetupSettingsButton, supportSetupSwipeBehavior, supportSwitchInlineQuery, supportTriggerHapticFeedback };
|
|
619
|
+
export { ContextTwa, EventBackButtonPressed, EventCheckHomeScreen, EventClipboardTextReceived, EventContentSafeAreaChanged, EventCustomMethodInvoked, EventInvoiceClosed, EventMainButtonPressed, EventPhoneRequested, EventPopupClosed, EventQrTextReceived, EventReloadIframe, EventSafeAreaChanged, EventScanQrPopupClosed, EventSetCustomStyle, EventSettingsButtonPressed, EventThemeChanged, EventViewportChanged, EventWriteAccessRequested, type EventsData, type GetInitData, Method, MethodAddToHomeScreen, MethodCheckHomeScreen, MethodClose, MethodCloseScanQrPopup, MethodDataSend, MethodExitFullscreen, MethodExpand, MethodIframeReady, MethodIframeWillReload, MethodInvokeCustomMethod, MethodOpenInvoice, MethodOpenLink, MethodOpenPopup, MethodOpenScanQrPopup, MethodOpenTgLink, MethodReadTextFromClipboard, MethodReady, MethodRequestContentSafeArea, MethodRequestFullscreen, MethodRequestPhone, MethodRequestSafeArea, MethodRequestTheme, MethodRequestViewport, MethodRequestWriteAccess, MethodSetBackgroundColor, MethodSetBottomBarColor, MethodSetHeaderColor, MethodSetupBackButton, MethodSetupClosingBehavior, MethodSetupMainButton, MethodSetupSettingsButton, MethodSetupSwipeBehavior, MethodShareToStory, MethodSwitchInlineQuery, MethodToggleOrientationLock, MethodTriggerHapticFeedback, NOT_SUPPORTED, type PopupButton, ProviderTWA, type SenderData, TG_DESKTOP, TG_PHONE, TG_WEB, type ThemeParams, addToHomeScreen as bridgeAddToHomeScreen, checkHomeScreen as bridgeCheckHomeScreen, close as bridgeClose, closeScanQrPopup as bridgeCloseScanQrPopup, dataSend as bridgeDataSend, expand as bridgeExpand, getInitData as bridgeGetInitData, getThemeParams as bridgeGetThemeParams, iframeReady as bridgeIframeReady, iframeWillReload as bridgeIframeWillReload, invokeCustomMethod as bridgeInvokeCustomMethod, openInvoice as bridgeOpenInvoice, openLink as bridgeOpenLink, openPopup as bridgeOpenPopup, openScanQrPopup as bridgeOpenScanQrPopup, openTgLink as bridgeOpenTgLink, readTextFromClipboard as bridgeReadTextFromClipboard, ready as bridgeReady, requestContentSafeAreaInset as bridgeRequestContentSafeAreaInset, requestPhone as bridgeRequestPhone, requestSafeAreaInset as bridgeRequestSafeAreaInset, requestTheme as bridgeRequestTheme, requestViewport as bridgeRequestViewport, requestWriteAccess as bridgeRequestWriteAccess, sender as bridgeSend, sessionStorageGet as bridgeSessionStorageGet, sessionStorageSet as bridgeSessionStorageSet, setBackgroundColor as bridgeSetBackgroundColor, setBottomBarColor as bridgeSetBottomBarColor, setHeaderColor as bridgeSetHeaderColor, setupBackButton as bridgeSetupBackButton, setupClosingBehavior as bridgeSetupClosingBehavior, setupFullScreen as bridgeSetupFullScreen, setupMainButton as bridgeSetupMainButton, setupOrientation as bridgeSetupOrientation, setupSettingsButton as bridgeSetupSettingsButton, setupSwipeBehavior as bridgeSetupSwipeBehavior, shareToStory as bridgeShareToStory, switchInlineQuery as bridgeSwitchInlineQuery, triggerHapticFeedback as bridgeTriggerHapticFeedback, createIsViewportChanged, debug, getAppData, getPlatform, listener, sender, supportAddToHomeScreen, supportCheckHomeScreen, supportClose, supportCloseScanQrPopup, supportDataSend, supportExpand, supportIframeReady, supportIframeWillReload, supportInvokeCustomMethod, supportOpenInvoice, supportOpenLink, supportOpenPopup, supportOpenScanQrPopup, supportOpenTgLink, supportReadTextFromClipboard, supportReady, supportRequestContentSafeAreaInset, supportRequestPhone, supportRequestSafeAreaInset, supportRequestTheme, supportRequestViewport, supportRequestWriteAccess, supportSessionStorageGet, supportSessionStorageSet, supportSetBackgroundColor, supportSetBottomBarColor, supportSetHeaderColor, supportSetupBackButton, supportSetupClosingBehavior, supportSetupFullScreen, supportSetupMainButton, supportSetupOrientation, supportSetupSettingsButton, supportSetupSwipeBehavior, supportShareToStory, supportSwitchInlineQuery, supportTriggerHapticFeedback };
|