@mtkruto/node 0.66.8 → 0.66.9
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/esm/3_types.d.ts +3 -1
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +3 -1
- package/esm/client/0_params.d.ts +19 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +8 -12
- package/esm/client/3_message_manager.d.ts +2 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +32 -1
- package/esm/client/4_callback_query_manager.d.ts +1 -1
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +2 -2
- package/esm/client/4_inline_query_manager.d.ts +1 -1
- package/esm/client/4_inline_query_manager.js +2 -2
- package/esm/client/5_client.d.ts +124 -114
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +126 -114
- package/esm/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
- package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
- package/esm/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +1 -1
- package/esm/types/0_mini_app_mode.d.ts +22 -0
- package/esm/types/0_mini_app_mode.d.ts.map +1 -0
- package/esm/types/0_mini_app_mode.js +20 -0
- package/esm/types/1_inline_query_result_button.d.ts +2 -2
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +2 -2
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_mini_app_info.d.ts +32 -0
- package/esm/types/1_mini_app_info.d.ts.map +1 -0
- package/esm/types/1_mini_app_info.js +27 -0
- package/esm/types/2_inline_keyboard_button.d.ts +2 -2
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +2 -2
- package/package.json +1 -1
- package/script/3_types.d.ts +3 -1
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +3 -1
- package/script/client/0_params.d.ts +19 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +8 -12
- package/script/client/3_message_manager.d.ts +2 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +31 -0
- package/script/client/4_callback_query_manager.d.ts +1 -1
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +2 -2
- package/script/client/4_inline_query_manager.d.ts +1 -1
- package/script/client/4_inline_query_manager.js +2 -2
- package/script/client/5_client.d.ts +124 -114
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +126 -114
- package/script/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
- package/script/types/0_mini_app_button_info.d.ts.map +1 -0
- package/script/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +2 -2
- package/script/types/0_mini_app_mode.d.ts +22 -0
- package/script/types/0_mini_app_mode.d.ts.map +1 -0
- package/script/types/0_mini_app_mode.js +21 -0
- package/script/types/1_inline_query_result_button.d.ts +2 -2
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +2 -2
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_mini_app_info.d.ts +32 -0
- package/script/types/1_mini_app_info.d.ts.map +1 -0
- package/script/types/1_mini_app_info.js +30 -0
- package/script/types/2_inline_keyboard_button.d.ts +2 -2
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +2 -2
- package/esm/types/0_mini_app_info.d.ts.map +0 -1
- package/script/types/0_mini_app_info.d.ts.map +0 -1
|
@@ -17,10 +17,9 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
export interface MiniAppInfo {
|
|
20
|
+
export interface MiniAppButtonInfo {
|
|
22
21
|
/** An HTTPS URL of the mini app to be opened with additional data. */
|
|
23
22
|
url: string;
|
|
24
23
|
}
|
|
25
|
-
export declare function
|
|
26
|
-
//# sourceMappingURL=
|
|
24
|
+
export declare function constructMiniAppButtonInfo(url: string): MiniAppButtonInfo;
|
|
25
|
+
//# sourceMappingURL=0_mini_app_button_info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_mini_app_button_info.d.ts","sourceRoot":"","sources":["../../src/types/0_mini_app_button_info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAEzE"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
23
|
-
function
|
|
22
|
+
exports.constructMiniAppButtonInfo = constructMiniAppButtonInfo;
|
|
23
|
+
function constructMiniAppButtonInfo(url) {
|
|
24
24
|
return { url };
|
|
25
25
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
/** A mini app mode. */
|
|
21
|
+
export type MiniAppMode = "default" | "fullscreen" | "compact";
|
|
22
|
+
//# sourceMappingURL=0_mini_app_mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_mini_app_mode.d.ts","sourceRoot":"","sources":["../../src/types/0_mini_app_mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,uBAAuB;AACvB,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { MiniAppButtonInfo } from "./0_mini_app_button_info.js";
|
|
21
21
|
/** A button to be shown along with the results of an inline query. */
|
|
22
22
|
export interface InlineQueryResultButton {
|
|
23
23
|
/** Label text on the button. */
|
|
24
24
|
text: string;
|
|
25
25
|
/** Description of the Mini App that will be launched when the user presses the button. */
|
|
26
|
-
miniApp?:
|
|
26
|
+
miniApp?: MiniAppButtonInfo;
|
|
27
27
|
/** Deep linking parameter for the /start message. */
|
|
28
28
|
startParameter?: string;
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_inline_query_result_button.d.ts","sourceRoot":"","sources":["../../src/types/1_inline_query_result_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_inline_query_result_button.d.ts","sourceRoot":"","sources":["../../src/types/1_inline_query_result_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,sEAAsE;AACtE,MAAM,WAAW,uBAAuB;IACtC,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
21
|
import { ChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
22
22
|
import { KeyboardButtonPollType } from "./0_keyboard_button_poll_type.js";
|
|
23
|
-
import {
|
|
23
|
+
import { MiniAppButtonInfo } from "./0_mini_app_button_info.js";
|
|
24
24
|
/** @unlisted */
|
|
25
25
|
export interface KeyboardButtonText {
|
|
26
26
|
/** @discriminator */
|
|
@@ -67,7 +67,7 @@ export interface KeyboardButtonRequestPoll extends KeyboardButtonText {
|
|
|
67
67
|
/** @unlisted */
|
|
68
68
|
export interface KeyboardButtonMiniApp extends KeyboardButtonText {
|
|
69
69
|
/** @discriminator */
|
|
70
|
-
miniApp:
|
|
70
|
+
miniApp: MiniAppButtonInfo;
|
|
71
71
|
}
|
|
72
72
|
/** A button of a custom keyboard. */
|
|
73
73
|
export type KeyboardButton = KeyboardButtonText | KeyboardButtonRequestUser | KeyboardButtonRequestChat | KeyboardButtonRequestContact | KeyboardButtonRequestLocation | KeyboardButtonRequestPoll | KeyboardButtonMiniApp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/1_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAuE,MAAM,kCAAkC,CAAC;AAChJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/1_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAuE,MAAM,kCAAkC,CAAC;AAChJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B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A6B,GAC7B,yBAAyB,GACzB,qBAAqB,CAAC;AAE1B,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,GAAG,cAAc,CAqEnF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,cAAc,GAAG,GAAG,CAAC,cAAc,CAoBnF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
|
+
import { MiniAppMode } from "./0_mini_app_mode.js";
|
|
22
|
+
/** The necessary information to launch a mini app. */
|
|
23
|
+
export interface MiniAppInfo {
|
|
24
|
+
/** An HTTPS URL of the mini app. */
|
|
25
|
+
url: string;
|
|
26
|
+
/** The mode to launch the mini app in. */
|
|
27
|
+
mode: MiniAppMode;
|
|
28
|
+
/** The identifier of the mini app session. */
|
|
29
|
+
queryId?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function constructMiniAppInfo(result: Api.webViewResultUrl): MiniAppInfo;
|
|
32
|
+
//# sourceMappingURL=1_mini_app_info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1_mini_app_info.d.ts","sourceRoot":"","sources":["../../src/types/1_mini_app_info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,0CAA0C;IAC1C,IAAI,EAAE,WAAW,CAAC;IAClB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,WAAW,CAM9E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructMiniAppInfo = constructMiniAppInfo;
|
|
23
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
+
function constructMiniAppInfo(result) {
|
|
25
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
26
|
+
url: result.url,
|
|
27
|
+
mode: result.fullscreen ? "fullscreen" : result.fullsize ? "default" : "compact",
|
|
28
|
+
queryId: result.query_id ? String(result.query_id) : undefined,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
21
|
import { UsernameResolver } from "./_getters.js";
|
|
22
22
|
import { LoginUrl } from "./0_login_url.js";
|
|
23
|
-
import {
|
|
23
|
+
import { MiniAppButtonInfo } from "./0_mini_app_button_info.js";
|
|
24
24
|
/** @unlisted */
|
|
25
25
|
export interface _InlineKeyboardButtonBase {
|
|
26
26
|
/** The text of the button. */
|
|
@@ -58,7 +58,7 @@ export interface InlineKeyboardButtonMiniApp extends _InlineKeyboardButtonBase {
|
|
|
58
58
|
* The mini app to launch.
|
|
59
59
|
* @discriminator
|
|
60
60
|
*/
|
|
61
|
-
miniApp:
|
|
61
|
+
miniApp: MiniAppButtonInfo;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* An inline keyboard button that, when pressed, logs the user into the specified URL.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_inline_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"2_inline_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_keybo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QACtB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,qBAAqB;IACrB,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,qBAAqB;IACrB,GAAG,EAAE,OAAO,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sCAAsC;AACtC,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,4BAA4B,GAC5B,2BAA2B,GAC3B,yBAAyB,GACzB,gCAAgC,GAChC,uCAAuC,GACvC,sCAAsC,GACtC,wBAAwB,GACxB,uBAAuB,GACvB,wBAAwB,CAAC;AAE7B,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,GAAG,oBAAoB,CAgC/F;AAED,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAuClJ"}
|
|
@@ -25,7 +25,7 @@ const _0_deps_js_1 = require("../0_deps.js");
|
|
|
25
25
|
const _0_errors_js_1 = require("../0_errors.js");
|
|
26
26
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
27
27
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
|
-
const
|
|
28
|
+
const _0_mini_app_button_info_js_1 = require("./0_mini_app_button_info.js");
|
|
29
29
|
function constructInlineKeyboardButton(button_) {
|
|
30
30
|
if (_2_tl_js_1.Api.is("keyboardButtonUrl", button_)) {
|
|
31
31
|
return { text: button_.text, url: button_.url };
|
|
@@ -34,7 +34,7 @@ function constructInlineKeyboardButton(button_) {
|
|
|
34
34
|
return { text: button_.text, callbackData: (0, _1_utilities_js_1.decodeText)(button_.data) };
|
|
35
35
|
}
|
|
36
36
|
else if (_2_tl_js_1.Api.is("keyboardButtonWebView", button_) || _2_tl_js_1.Api.is("keyboardButtonSimpleWebView", button_)) {
|
|
37
|
-
return { text: button_.text, miniApp: (0,
|
|
37
|
+
return { text: button_.text, miniApp: (0, _0_mini_app_button_info_js_1.constructMiniAppButtonInfo)(button_.url) };
|
|
38
38
|
}
|
|
39
39
|
else if (_2_tl_js_1.Api.is("keyboardButtonUrlAuth", button_)) {
|
|
40
40
|
return { text: button_.text, loginUrl: { url: button_.url, forwardText: button_.fwd_text } };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"0_mini_app_info.d.ts","sourceRoot":"","sources":["../../src/types/0_mini_app_info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAE7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"0_mini_app_info.d.ts","sourceRoot":"","sources":["../../src/types/0_mini_app_info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAE7D"}
|