@mtkruto/node 0.0.998 → 0.1.0
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/0_deps.d.ts +1 -1
- package/esm/0_deps.js +1 -1
- package/esm/3_errors.d.ts +1531 -0
- package/esm/3_errors.js +1531 -0
- package/esm/3_types.d.ts +39 -3
- package/esm/3_types.js +39 -3
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/4_errors.d.ts +25 -0
- package/esm/4_errors.js +64 -0
- package/esm/client/2_client_plain.js +1 -1
- package/esm/client/3_types.d.ts +1 -5
- package/esm/client/4_client.d.ts +20 -3
- package/esm/client/4_client.js +61 -62
- package/esm/connection/1_connection_web_socket.js +2 -1
- package/esm/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.d.ts +2 -2
- package/esm/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.js +19 -6
- package/esm/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.d.ts +2 -0
- package/esm/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +991 -0
- package/esm/mod.d.ts +3 -2
- package/esm/mod.js +3 -2
- package/esm/tl/2_types.d.ts +1 -1
- package/esm/tl/2_types.js +1 -2
- package/esm/tl/3_functions.d.ts +1 -1
- package/esm/tl/3_functions.js +1 -2
- package/esm/types/{!0_file_id.js → 0__file_id.js} +0 -1
- package/esm/types/0_bot_command.d.ts +4 -0
- package/esm/types/0_chat_id.d.ts +4 -0
- package/esm/types/0_chat_id.js +1 -0
- package/esm/types/0_chat_photo.js +1 -1
- package/esm/types/0_input_contact_message_content.d.ts +6 -0
- package/esm/types/0_input_contact_message_content.js +1 -0
- package/esm/types/0_input_location_message_content.d.ts +8 -0
- package/esm/types/0_input_location_message_content.js +1 -0
- package/esm/types/0_input_venue_message_content.d.ts +10 -0
- package/esm/types/0_input_venue_message_content.js +1 -0
- package/esm/types/0_labeled_price.d.ts +4 -0
- package/esm/types/0_labeled_price.js +1 -0
- package/esm/types/0_parse_mode.d.ts +1 -0
- package/esm/types/0_parse_mode.js +1 -0
- package/esm/types/0_thumbnail.js +1 -1
- package/esm/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
- package/esm/types/1__getters.js +1 -0
- package/esm/types/1_bot_command_scope.d.ts +32 -0
- package/esm/types/1_bot_command_scope.js +27 -0
- package/esm/types/1_chat.d.ts +1 -1
- package/esm/types/1_chat.js +1 -1
- package/esm/types/1_inline_query_result_button.d.ts +6 -0
- package/esm/types/1_inline_query_result_button.js +1 -0
- package/esm/types/1_input_invoice_message_content.d.ts +23 -0
- package/esm/types/1_input_invoice_message_content.js +1 -0
- package/esm/types/1_input_text_message_content.d.ts +8 -0
- package/esm/types/1_input_text_message_content.js +1 -0
- package/esm/types/1_photo.js +1 -1
- package/esm/types/1_sticker.d.ts +1 -1
- package/esm/types/1_sticker.js +1 -1
- package/esm/types/1_user.d.ts +1 -1
- package/esm/types/1_user.js +1 -1
- package/esm/types/2_game.js +1 -1
- package/{script/types/1_inline_keyboard_button.d.ts → esm/types/2_inline_keyboard_button.d.ts} +3 -3
- package/esm/types/2_inline_query.d.ts +1 -1
- package/esm/types/2_input_message_content.d.ts +6 -0
- package/esm/types/2_input_message_content.js +1 -0
- package/esm/types/{2_inline_keyboard_markup.d.ts → 3_inline_keyboard_markup.d.ts} +3 -2
- package/esm/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +1 -1
- package/esm/types/3_message.d.ts +13 -13
- package/esm/types/3_message.js +13 -13
- package/esm/types/4_callback_query.d.ts +1 -1
- package/esm/types/4_inline_query_result_article.d.ts +15 -0
- package/esm/types/4_inline_query_result_article.js +1 -0
- package/esm/types/4_inline_query_result_audio.d.ts +17 -0
- package/esm/types/4_inline_query_result_audio.js +1 -0
- package/esm/types/4_inline_query_result_cached_audio.d.ts +14 -0
- package/esm/types/4_inline_query_result_cached_audio.js +1 -0
- package/esm/types/4_inline_query_result_cached_document.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_document.js +1 -0
- package/esm/types/4_inline_query_result_cached_gif.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_gif.js +1 -0
- package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +1 -0
- package/esm/types/4_inline_query_result_cached_photo.d.ts +16 -0
- package/esm/types/4_inline_query_result_cached_photo.js +1 -0
- package/esm/types/4_inline_query_result_cached_sticker.d.ts +9 -0
- package/esm/types/4_inline_query_result_cached_sticker.js +1 -0
- package/esm/types/4_inline_query_result_cached_video.d.ts +16 -0
- package/esm/types/4_inline_query_result_cached_video.js +1 -0
- package/esm/types/4_inline_query_result_cached_voice.d.ts +15 -0
- package/esm/types/4_inline_query_result_cached_voice.js +1 -0
- package/esm/types/4_inline_query_result_contact.d.ts +15 -0
- package/esm/types/4_inline_query_result_contact.js +1 -0
- package/esm/types/4_inline_query_result_document.d.ts +18 -0
- package/esm/types/4_inline_query_result_document.js +1 -0
- package/esm/types/4_inline_query_result_game.d.ts +7 -0
- package/esm/types/4_inline_query_result_game.js +1 -0
- package/esm/types/4_inline_query_result_gif.d.ts +20 -0
- package/esm/types/4_inline_query_result_gif.js +1 -0
- package/esm/types/4_inline_query_result_location.d.ts +18 -0
- package/esm/types/4_inline_query_result_location.js +1 -0
- package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
- package/esm/types/4_inline_query_result_mpeg4_gif.js +1 -0
- package/esm/types/4_inline_query_result_photo.d.ts +19 -0
- package/esm/types/4_inline_query_result_photo.js +1 -0
- package/esm/types/4_inline_query_result_venue.d.ts +19 -0
- package/esm/types/4_inline_query_result_venue.js +1 -0
- package/esm/types/4_inline_query_result_video.d.ts +21 -0
- package/esm/types/4_inline_query_result_video.js +1 -0
- package/esm/types/4_inline_query_result_voice.d.ts +16 -0
- package/esm/types/4_inline_query_result_voice.js +1 -0
- package/esm/types/4_reply_markup.d.ts +7 -0
- package/esm/types/4_reply_markup.js +22 -0
- package/esm/types/5_inline_query_result.d.ts +29 -0
- package/esm/types/5_inline_query_result.js +256 -0
- package/esm/utilities/0_crypto.js +6 -4
- package/package.json +1 -1
- package/script/0_deps.d.ts +1 -1
- package/script/0_deps.js +1 -1
- package/script/3_errors.d.ts +1531 -0
- package/script/3_errors.js +2053 -0
- package/script/3_types.d.ts +39 -3
- package/script/3_types.js +39 -3
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/4_errors.d.ts +25 -0
- package/script/4_errors.js +88 -0
- package/script/client/2_client_plain.js +1 -1
- package/script/client/3_types.d.ts +1 -5
- package/script/client/4_client.d.ts +20 -3
- package/script/client/4_client.js +60 -61
- package/script/connection/1_connection_web_socket.js +2 -1
- package/script/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.d.ts +2 -2
- package/script/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.js +19 -6
- package/script/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.d.ts +2 -0
- package/script/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +993 -0
- package/script/mod.d.ts +3 -2
- package/script/mod.js +16 -3
- package/script/tl/2_types.d.ts +1 -1
- package/script/tl/2_types.js +0 -1
- package/script/tl/3_functions.d.ts +1 -1
- package/script/tl/3_functions.js +0 -1
- package/script/types/{!0_file_id.js → 0__file_id.js} +0 -1
- package/script/types/0_bot_command.d.ts +4 -0
- package/script/types/0_chat_id.d.ts +4 -0
- package/script/types/0_chat_id.js +2 -0
- package/script/types/0_chat_photo.js +7 -7
- package/script/types/0_input_contact_message_content.d.ts +6 -0
- package/script/types/0_input_contact_message_content.js +2 -0
- package/script/types/0_input_location_message_content.d.ts +8 -0
- package/script/types/0_input_location_message_content.js +2 -0
- package/script/types/0_input_venue_message_content.d.ts +10 -0
- package/script/types/0_input_venue_message_content.js +2 -0
- package/script/types/0_labeled_price.d.ts +4 -0
- package/script/types/0_labeled_price.js +2 -0
- package/script/types/0_parse_mode.d.ts +1 -0
- package/script/types/0_parse_mode.js +2 -0
- package/script/types/0_thumbnail.js +5 -5
- package/script/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
- package/script/types/1__getters.js +2 -0
- package/script/types/1_bot_command_scope.d.ts +32 -0
- package/script/types/1_bot_command_scope.js +31 -0
- package/script/types/1_chat.d.ts +1 -1
- package/script/types/1_chat.js +1 -1
- package/script/types/1_inline_query_result_button.d.ts +6 -0
- package/script/types/1_inline_query_result_button.js +2 -0
- package/script/types/1_input_invoice_message_content.d.ts +23 -0
- package/script/types/1_input_invoice_message_content.js +2 -0
- package/script/types/1_input_text_message_content.d.ts +8 -0
- package/script/types/1_input_text_message_content.js +2 -0
- package/script/types/1_photo.js +5 -5
- package/script/types/1_sticker.d.ts +1 -1
- package/script/types/1_sticker.js +1 -1
- package/script/types/1_user.d.ts +1 -1
- package/script/types/1_user.js +1 -1
- package/script/types/2_game.js +3 -3
- package/{esm/types/1_inline_keyboard_button.d.ts → script/types/2_inline_keyboard_button.d.ts} +3 -3
- package/script/types/2_inline_query.d.ts +1 -1
- package/script/types/2_input_message_content.d.ts +6 -0
- package/script/types/2_input_message_content.js +2 -0
- package/script/types/{2_inline_keyboard_markup.d.ts → 3_inline_keyboard_markup.d.ts} +3 -2
- package/script/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +3 -3
- package/script/types/3_message.d.ts +13 -13
- package/script/types/3_message.js +23 -23
- package/script/types/4_callback_query.d.ts +1 -1
- package/script/types/4_inline_query_result_article.d.ts +15 -0
- package/script/types/4_inline_query_result_article.js +2 -0
- package/script/types/4_inline_query_result_audio.d.ts +17 -0
- package/script/types/4_inline_query_result_audio.js +2 -0
- package/script/types/4_inline_query_result_cached_audio.d.ts +14 -0
- package/script/types/4_inline_query_result_cached_audio.js +2 -0
- package/script/types/4_inline_query_result_cached_document.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_document.js +2 -0
- package/script/types/4_inline_query_result_cached_gif.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_gif.js +2 -0
- package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_mpeg4_gif.js +2 -0
- package/script/types/4_inline_query_result_cached_photo.d.ts +16 -0
- package/script/types/4_inline_query_result_cached_photo.js +2 -0
- package/script/types/4_inline_query_result_cached_sticker.d.ts +9 -0
- package/script/types/4_inline_query_result_cached_sticker.js +2 -0
- package/script/types/4_inline_query_result_cached_video.d.ts +16 -0
- package/script/types/4_inline_query_result_cached_video.js +2 -0
- package/script/types/4_inline_query_result_cached_voice.d.ts +15 -0
- package/script/types/4_inline_query_result_cached_voice.js +2 -0
- package/script/types/4_inline_query_result_contact.d.ts +15 -0
- package/script/types/4_inline_query_result_contact.js +2 -0
- package/script/types/4_inline_query_result_document.d.ts +18 -0
- package/script/types/4_inline_query_result_document.js +2 -0
- package/script/types/4_inline_query_result_game.d.ts +7 -0
- package/script/types/4_inline_query_result_game.js +2 -0
- package/script/types/4_inline_query_result_gif.d.ts +20 -0
- package/script/types/4_inline_query_result_gif.js +2 -0
- package/script/types/4_inline_query_result_location.d.ts +18 -0
- package/script/types/4_inline_query_result_location.js +2 -0
- package/script/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
- package/script/types/4_inline_query_result_mpeg4_gif.js +2 -0
- package/script/types/4_inline_query_result_photo.d.ts +19 -0
- package/script/types/4_inline_query_result_photo.js +2 -0
- package/script/types/4_inline_query_result_venue.d.ts +19 -0
- package/script/types/4_inline_query_result_venue.js +2 -0
- package/script/types/4_inline_query_result_video.d.ts +21 -0
- package/script/types/4_inline_query_result_video.js +2 -0
- package/script/types/4_inline_query_result_voice.d.ts +16 -0
- package/script/types/4_inline_query_result_voice.js +2 -0
- package/script/types/4_reply_markup.d.ts +7 -0
- package/script/types/4_reply_markup.js +26 -0
- package/script/types/5_inline_query_result.d.ts +29 -0
- package/script/types/5_inline_query_result.js +260 -0
- package/script/utilities/0_crypto.js +6 -4
- package/esm/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -2
- package/esm/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.js +0 -1078
- package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -2
- package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.js +0 -1080
- /package/esm/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
- /package/esm/types/{!0_misc.js → 0_bot_command.js} +0 -0
- /package/esm/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
- /package/script/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
- /package/script/types/{!0_misc.js → 0_bot_command.js} +0 -0
- /package/script/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
package/script/mod.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ export declare const utils: {
|
|
|
4
4
|
checkPassword: typeof checkPassword;
|
|
5
5
|
getRandomId: typeof getRandomId;
|
|
6
6
|
};
|
|
7
|
-
export * from "./2_tl.js";
|
|
8
7
|
export * from "./2_connection.js";
|
|
9
8
|
export * from "./3_storage.js";
|
|
10
9
|
export * from "./3_transport.js";
|
|
10
|
+
export * from "./2_tl.js";
|
|
11
|
+
export * from "./3_types.js";
|
|
11
12
|
export { APP_VERSION, DEVICE_MODEL, INITIAL_DC, LANG_CODE, LANG_PACK, LAYER, SYSTEM_LANG_CODE, SYSTEM_VERSION } from "./4_constants.js";
|
|
13
|
+
export * as errors from "./4_errors.js";
|
|
12
14
|
export * from "./5_client.js";
|
|
13
|
-
export * from "./3_types.js";
|
package/script/mod.js
CHANGED
|
@@ -10,18 +10,31 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
13
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
20
|
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.utils = void 0;
|
|
29
|
+
exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.utils = void 0;
|
|
18
30
|
const _1_utilities_js_1 = require("./1_utilities.js");
|
|
19
31
|
const _0_password_js_1 = require("./client/0_password.js");
|
|
20
32
|
exports.utils = { checkPassword: _0_password_js_1.checkPassword, getRandomId: _1_utilities_js_1.getRandomId };
|
|
21
|
-
__exportStar(require("./2_tl.js"), exports);
|
|
22
33
|
__exportStar(require("./2_connection.js"), exports);
|
|
23
34
|
__exportStar(require("./3_storage.js"), exports);
|
|
24
35
|
__exportStar(require("./3_transport.js"), exports);
|
|
36
|
+
__exportStar(require("./2_tl.js"), exports);
|
|
37
|
+
__exportStar(require("./3_types.js"), exports);
|
|
25
38
|
var _4_constants_js_1 = require("./4_constants.js");
|
|
26
39
|
Object.defineProperty(exports, "APP_VERSION", { enumerable: true, get: function () { return _4_constants_js_1.APP_VERSION; } });
|
|
27
40
|
Object.defineProperty(exports, "DEVICE_MODEL", { enumerable: true, get: function () { return _4_constants_js_1.DEVICE_MODEL; } });
|
|
@@ -31,5 +44,5 @@ Object.defineProperty(exports, "LANG_PACK", { enumerable: true, get: function ()
|
|
|
31
44
|
Object.defineProperty(exports, "LAYER", { enumerable: true, get: function () { return _4_constants_js_1.LAYER; } });
|
|
32
45
|
Object.defineProperty(exports, "SYSTEM_LANG_CODE", { enumerable: true, get: function () { return _4_constants_js_1.SYSTEM_LANG_CODE; } });
|
|
33
46
|
Object.defineProperty(exports, "SYSTEM_VERSION", { enumerable: true, get: function () { return _4_constants_js_1.SYSTEM_VERSION; } });
|
|
47
|
+
exports.errors = __importStar(require("./4_errors.js"));
|
|
34
48
|
__exportStar(require("./5_client.js"), exports);
|
|
35
|
-
__exportStar(require("./3_types.js"), exports);
|
package/script/tl/2_types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { id,
|
|
1
|
+
import { id, ParamDesc, paramDesc, Params, params, TLObject, TLObjectConstructor } from "./1_tl_object.js";
|
|
2
2
|
export declare abstract class Type extends TLObject {
|
|
3
3
|
}
|
|
4
4
|
export declare abstract class TypeX extends Type {
|
package/script/tl/2_types.js
CHANGED
|
@@ -33,7 +33,6 @@ exports.AttachMenuBotIcon = exports.AttachMenuBotIconColor = exports.PhoneGroupC
|
|
|
33
33
|
exports.EmailVerificationGoogle = exports.EmailVerificationCode = exports.EmailVerifyPurposePassport = exports.EmailVerifyPurposeLoginChange = exports.EmailVerifyPurposeLoginSetup = exports.MessagesReactions = exports.MessagesReactionsNotModified = exports.ChatReactionsSome = exports.ChatReactionsAll = exports.ChatReactionsNone = exports.ReactionCustomEmoji = exports.ReactionEmoji = exports.ReactionEmpty = exports.AccountEmojiStatuses = exports.AccountEmojiStatusesNotModified = exports.EmojiStatusUntil = exports.EmojiStatus = exports.EmojiStatusEmpty = exports.PaymentFormMethod = exports.PremiumGiftOption = exports.InputStorePaymentGiftPremium = exports.InputStorePaymentPremiumSubscription = exports.HelpPremiumPromo = exports.MessagesTranscribedAudio = exports.PaymentsExportedInvoice = exports.InputInvoiceSlug = exports.InputInvoiceMessage = exports.AttachMenuPeerTypeBroadcast = exports.AttachMenuPeerTypeChat = exports.AttachMenuPeerTypePM = exports.AttachMenuPeerTypeBotPM = exports.AttachMenuPeerTypeSameBotPM = exports.AccountSavedRingtoneConverted = exports.AccountSavedRingtone = exports.NotificationSoundRingtone = exports.NotificationSoundLocal = exports.NotificationSoundNone = exports.NotificationSoundDefault = exports.AccountSavedRingtones = exports.AccountSavedRingtonesNotModified = exports.BotMenuButton = exports.BotMenuButtonCommands = exports.BotMenuButtonDefault = exports.WebViewMessageSent = exports.SimpleWebViewResultURL = exports.WebViewResultURL = exports.AttachMenuBotsBot = exports.AttachMenuBots = exports.AttachMenuBotsNotModified = exports.AttachMenuBot = void 0;
|
|
34
34
|
exports.StoryViews = exports.SponsoredWebPage = exports.MessagePeerVoteMultiple = exports.MessagePeerVoteInputOption = exports.MessagePeerVote = exports.BotsBotInfo = exports.ChatlistsChatlistUpdates = exports.ChatlistsChatlistInvite = exports.ChatlistsChatlistInviteAlready = exports.ChatlistsExportedInvites = exports.ChatlistsExportedChatlistInvite = exports.ExportedChatlistInvite = exports.InputChatlistDialogFilter = exports.ReadParticipantDate = exports.InlineBotWebView = exports.AppWebViewResultURL = exports.MessagesBotApp = exports.BotApp = exports.BotAppNotModified = exports.InputBotAppShortName = exports.InputBotAppID = exports.HelpAppConfig = exports.HelpAppConfigNotModified = exports.AccountAutoSaveSettings = exports.AutoSaveException = exports.AutoSaveSettings = exports.MessagesTranslateResult = exports.TextWithEntities = exports.MessagesEmojiGroups = exports.MessagesEmojiGroupsNotModified = exports.EmojiGroup = exports.EmojiList = exports.EmojiListNotModified = exports.RequestPeerTypeBroadcast = exports.RequestPeerTypeChat = exports.RequestPeerTypeUser = exports.ExportedContactToken = exports.DefaultHistoryTTL = exports.MessagesForumTopics = exports.ForumTopic = exports.ForumTopicDeleted = exports.Username = exports.StickerKeyword = exports.MessageExtendedMedia = exports.MessageExtendedMediaPreview = exports.SendAsPeer = exports.PremiumSubscriptionOption = exports.AccountEmailVerifiedLogin = exports.AccountEmailVerified = exports.EmailVerificationApple = void 0;
|
|
35
35
|
exports.map = exports.MediaAreaGeoPoint = exports.InputMediaAreaVenue = exports.MediaAreaVenue = exports.MediaAreaCoordinates = exports.StoriesStealthMode = exports.ExportedStoryLink = exports.InputReplyToStory = exports.InputReplyToMessage = exports.StoriesStoryViews = exports.StoriesStoryViewsList = exports.StoryView = exports.StoriesUserStories = exports.StoriesStories = exports.StoriesAllStories = exports.StoriesAllStoriesNotModified = exports.UserStories = exports.StoryItem = exports.StoryItemSkipped = exports.StoryItemDeleted = void 0;
|
|
36
|
-
// deno-fmt-ignore-file
|
|
37
36
|
const _1_tl_object_js_1 = require("./1_tl_object.js");
|
|
38
37
|
class Type extends _1_tl_object_js_1.TLObject {
|
|
39
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { id,
|
|
1
|
+
import { id, ParamDesc, paramDesc, Params, params, TLObject } from "./1_tl_object.js";
|
|
2
2
|
import * as types from "./2_types.js";
|
|
3
3
|
export declare abstract class Function<T> extends TLObject {
|
|
4
4
|
__R: T;
|
package/script/tl/3_functions.js
CHANGED
|
@@ -34,7 +34,6 @@ exports.ChannelsInviteToChannel = exports.ChannelsLeaveChannel = exports.Channel
|
|
|
34
34
|
exports.BotsGetBotInfo = exports.BotsSetBotInfo = exports.BotsSetBotGroupDefaultAdminRights = exports.BotsSetBotBroadcastDefaultAdminRights = exports.BotsGetBotMenuButton = exports.BotsSetBotMenuButton = exports.BotsGetBotCommands = exports.BotsResetBotCommands = exports.BotsSetBotCommands = exports.BotsAnswerWebhookJSONQuery = exports.BotsSendCustomRequest = exports.ChannelsClickSponsoredMessage = exports.ChannelsToggleParticipantsHidden = exports.ChannelsReportAntiSpamFalsePositive = exports.ChannelsToggleAntiSpam = exports.ChannelsReorderPinnedForumTopics = exports.ChannelsDeleteTopicHistory = exports.ChannelsUpdatePinnedForumTopic = exports.ChannelsEditForumTopic = exports.ChannelsGetForumTopicsByID = exports.ChannelsGetForumTopics = exports.ChannelsCreateForumTopic = exports.ChannelsToggleForum = exports.ChannelsDeactivateAllUsernames = exports.ChannelsToggleUsername = exports.ChannelsReorderUsernames = exports.ChannelsToggleJoinRequest = exports.ChannelsToggleJoinToSend = exports.ChannelsDeleteParticipantHistory = exports.ChannelsGetSendAs = exports.ChannelsGetSponsoredMessages = exports.ChannelsViewSponsoredMessage = exports.ChannelsConvertToGigagroup = exports.ChannelsGetInactiveChannels = exports.ChannelsToggleSlowMode = exports.ChannelsEditLocation = exports.ChannelsEditCreator = exports.ChannelsSetDiscussionGroup = exports.ChannelsGetGroupsForDiscussion = exports.ChannelsGetLeftChannels = exports.ChannelsTogglePreHistoryHidden = exports.ChannelsDeleteHistory = exports.ChannelsReadMessageContents = exports.ChannelsSetStickers = exports.ChannelsGetAdminLog = exports.ChannelsEditBanned = exports.ChannelsGetAdminedPublicChannels = exports.ChannelsToggleSignatures = exports.ChannelsExportMessageLink = exports.ChannelsDeleteChannel = void 0;
|
|
35
35
|
exports.PhoneJoinGroupCallPresentation = exports.PhoneSaveDefaultGroupCallJoinAs = exports.PhoneStartScheduledGroupCall = exports.PhoneToggleGroupCallStartSubscription = exports.PhoneExportGroupCallInvite = exports.PhoneGetGroupCallJoinAs = exports.PhoneEditGroupCallTitle = exports.PhoneEditGroupCallParticipant = exports.PhoneToggleGroupCallRecord = exports.PhoneCheckGroupCall = exports.PhoneGetGroupParticipants = exports.PhoneGetGroupCall = exports.PhoneToggleGroupCallSettings = exports.PhoneDiscardGroupCall = exports.PhoneInviteToGroupCall = exports.PhoneLeaveGroupCall = exports.PhoneJoinGroupCall = exports.PhoneCreateGroupCall = exports.PhoneSendSignalingData = exports.PhoneSaveCallDebug = exports.PhoneSetCallRating = exports.PhoneDiscardCall = exports.PhoneReceivedCall = exports.PhoneConfirmCall = exports.PhoneAcceptCall = exports.PhoneRequestCall = exports.PhoneGetCallConfig = exports.StickersDeleteStickerSet = exports.StickersRenameStickerSet = exports.StickersChangeSticker = exports.StickersSuggestShortName = exports.StickersCheckShortName = exports.StickersSetStickerSetThumb = exports.StickersAddStickerToSet = exports.StickersChangeStickerPosition = exports.StickersRemoveStickerFromSet = exports.StickersCreateStickerSet = exports.PaymentsCanPurchasePremium = exports.PaymentsAssignPlayMarketTransaction = exports.PaymentsAssignAppStoreTransaction = exports.PaymentsExportInvoice = exports.PaymentsGetBankCardData = exports.PaymentsClearSavedInfo = exports.PaymentsGetSavedInfo = exports.PaymentsSendPaymentForm = exports.PaymentsValidateRequestedInfo = exports.PaymentsGetPaymentReceipt = exports.PaymentsGetPaymentForm = exports.BotsToggleUsername = exports.BotsReorderUsernames = void 0;
|
|
36
36
|
exports.StoriesSendReaction = exports.StoriesActivateStealthMode = exports.StoriesReport = exports.StoriesExportStoryLink = exports.StoriesGetStoriesViews = exports.StoriesGetStoryViewsList = exports.StoriesIncrementStoryViews = exports.StoriesReadStories = exports.StoriesGetAllReadUserStories = exports.StoriesToggleAllStoriesHidden = exports.StoriesGetStoriesByID = exports.StoriesGetStoriesArchive = exports.StoriesGetPinnedStories = exports.StoriesGetUserStories = exports.StoriesGetAllStories = exports.StoriesTogglePinned = exports.StoriesDeleteStories = exports.StoriesEditStory = exports.StoriesSendStory = exports.ChatlistsLeaveChatlist = exports.ChatlistsGetLeaveChatlistSuggestions = exports.ChatlistsHideChatlistUpdates = exports.ChatlistsJoinChatlistUpdates = exports.ChatlistsGetChatlistUpdates = exports.ChatlistsJoinChatlistInvite = exports.ChatlistsCheckChatlistInvite = exports.ChatlistsGetExportedInvites = exports.ChatlistsEditExportedInvite = exports.ChatlistsDeleteExportedInvite = exports.ChatlistsExportChatlistInvite = exports.StatsGetMessageStats = exports.StatsGetMessagePublicForwards = exports.StatsGetMegagroupStats = exports.StatsLoadAsyncGraph = exports.StatsGetBroadcastStats = exports.FoldersEditPeerFolders = exports.LangpackGetLanguage = exports.LangpackGetLanguages = exports.LangpackGetDifference = exports.LangpackGetStrings = exports.LangpackGetLangPack = exports.PhoneSaveCallLog = exports.PhoneGetGroupCallStreamRtmpURL = exports.PhoneGetGroupCallStreamChannels = exports.PhoneLeaveGroupCallPresentation = void 0;
|
|
37
|
-
// deno-fmt-ignore-file
|
|
38
37
|
const _1_tl_object_js_1 = require("./1_tl_object.js");
|
|
39
38
|
const types = __importStar(require("./2_types.js"));
|
|
40
39
|
class Function extends _1_tl_object_js_1.TLObject {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileUniqueID = exports.FileUniqueType = exports.FileID = exports.ThumbnailSource = exports.FileType = void 0;
|
|
4
|
-
// Direct port from Pyrogram
|
|
5
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
6
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
7
6
|
var FileType;
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructChatPhoto = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const
|
|
5
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
6
6
|
function constructChatPhoto(photo, chatId, chatAccessHash) {
|
|
7
|
-
const smallFileId = new
|
|
7
|
+
const smallFileId = new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.ChatPhoto, photo.dcId, {
|
|
8
8
|
mediaId: photo.photoId,
|
|
9
|
-
thumbnailSource:
|
|
9
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.ChatPhotoSmall,
|
|
10
10
|
chatId,
|
|
11
11
|
chatAccessHash,
|
|
12
12
|
accessHash: 0n,
|
|
13
13
|
volumeId: 0n,
|
|
14
14
|
localId: 0,
|
|
15
15
|
}).encode();
|
|
16
|
-
const smallFileUniqueId = new
|
|
17
|
-
const bigFileId = new
|
|
16
|
+
const smallFileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
|
|
17
|
+
const bigFileId = new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.ChatPhoto, photo.dcId, {
|
|
18
18
|
mediaId: photo.photoId,
|
|
19
|
-
thumbnailSource:
|
|
19
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.ChatPhotoBig,
|
|
20
20
|
chatId,
|
|
21
21
|
chatAccessHash,
|
|
22
22
|
accessHash: 0n,
|
|
23
23
|
volumeId: 0n,
|
|
24
24
|
localId: 0,
|
|
25
25
|
}).encode();
|
|
26
|
-
const bigFileUniqueId = new
|
|
26
|
+
const bigFileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
|
|
27
27
|
if (photo instanceof _2_tl_js_1.types.ChatPhoto) {
|
|
28
28
|
return {
|
|
29
29
|
smallFileId,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ParseMode = "HTML" | null;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructThumbnail = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const
|
|
5
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
6
6
|
function constructThumbnail(size, file) {
|
|
7
|
-
const fileType = file instanceof _2_tl_js_1.types.Photo ?
|
|
8
|
-
const fileId = new
|
|
7
|
+
const fileType = file instanceof _2_tl_js_1.types.Photo ? _0__file_id_js_1.FileType.Photo : _0__file_id_js_1.FileType.Document;
|
|
8
|
+
const fileId = new _0__file_id_js_1.FileID(null, null, fileType, file.dcId, {
|
|
9
9
|
mediaId: file.id,
|
|
10
10
|
accessHash: file.accessHash,
|
|
11
11
|
fileReference: file.fileReference,
|
|
12
12
|
thumbnailFileType: fileType,
|
|
13
|
-
thumbnailSource:
|
|
13
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
|
|
14
14
|
thumbnailSize: size.type,
|
|
15
15
|
volumeId: 0n,
|
|
16
16
|
localId: 0,
|
|
17
17
|
}).encode();
|
|
18
|
-
const fileUniqueId = new
|
|
18
|
+
const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: file.id }).encode();
|
|
19
19
|
return {
|
|
20
20
|
fileId,
|
|
21
21
|
fileUniqueId,
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
|
+
import { ChatID } from "./0_chat_id.js";
|
|
3
4
|
export interface EntityGetter {
|
|
4
5
|
(peer: types.PeerUser): MaybePromise<types.User | null>;
|
|
5
6
|
(peer: types.PeerChat): MaybePromise<types.Chat | null>;
|
|
6
7
|
(peer: types.PeerChannel): MaybePromise<types.Channel | null>;
|
|
7
8
|
}
|
|
9
|
+
export interface InputPeerGetter {
|
|
10
|
+
(id: ChatID): Promise<types.InputPeerUser | types.InputPeerChannel | types.InputPeerChat>;
|
|
11
|
+
}
|
|
12
|
+
export interface UsernameResolver {
|
|
13
|
+
(username: string): MaybePromise<types.InputUser>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
2
|
+
import { ChatID } from "./0_chat_id.js";
|
|
3
|
+
import { InputPeerGetter } from "./1__getters.js";
|
|
4
|
+
export declare namespace BotCommandScope {
|
|
5
|
+
interface Default {
|
|
6
|
+
type: "default";
|
|
7
|
+
}
|
|
8
|
+
interface AllPrivateChats {
|
|
9
|
+
type: "allPrivateChats";
|
|
10
|
+
}
|
|
11
|
+
interface AllGroupChats {
|
|
12
|
+
type: "allGroupChats";
|
|
13
|
+
}
|
|
14
|
+
interface AllChatAdministrators {
|
|
15
|
+
type: "allChatAdministrators";
|
|
16
|
+
}
|
|
17
|
+
interface Chat {
|
|
18
|
+
type: "chat";
|
|
19
|
+
chatId: ChatID;
|
|
20
|
+
}
|
|
21
|
+
interface ChatAdministrators {
|
|
22
|
+
type: "chatAdministrators";
|
|
23
|
+
chatId: ChatID;
|
|
24
|
+
}
|
|
25
|
+
interface ChatMember {
|
|
26
|
+
type: "chatMember";
|
|
27
|
+
chatId: ChatID;
|
|
28
|
+
userId: number;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export type BotCommandScope = BotCommandScope.Default | BotCommandScope.AllPrivateChats | BotCommandScope.AllGroupChats | BotCommandScope.AllChatAdministrators | BotCommandScope.Chat | BotCommandScope.ChatAdministrators | BotCommandScope.ChatMember;
|
|
32
|
+
export declare function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise<types.BotCommandScopeDefault | types.BotCommandScopeUsers | types.BotCommandScopeChats | types.BotCommandScopeChatAdmins | types.BotCommandScopePeer | types.BotCommandScopePeerAdmins | types.BotCommandScopePeerUser>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.botCommandScopeToTlObject = void 0;
|
|
4
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
|
+
async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
7
|
+
switch (scope.type) {
|
|
8
|
+
case "default":
|
|
9
|
+
return new _2_tl_js_1.types.BotCommandScopeDefault();
|
|
10
|
+
case "allPrivateChats":
|
|
11
|
+
return new _2_tl_js_1.types.BotCommandScopeUsers();
|
|
12
|
+
case "allGroupChats":
|
|
13
|
+
return new _2_tl_js_1.types.BotCommandScopeChats();
|
|
14
|
+
case "allChatAdministrators":
|
|
15
|
+
return new _2_tl_js_1.types.BotCommandScopeChatAdmins();
|
|
16
|
+
case "chat":
|
|
17
|
+
return new _2_tl_js_1.types.BotCommandScopePeer({ peer: await getInputPeer(scope.chatId) });
|
|
18
|
+
case "chatAdministrators":
|
|
19
|
+
return new _2_tl_js_1.types.BotCommandScopePeerAdmins({ peer: await getInputPeer(scope.chatId) });
|
|
20
|
+
case "chatMember": {
|
|
21
|
+
const user = await getInputPeer(scope.userId);
|
|
22
|
+
if (!(user instanceof _2_tl_js_1.types.InputPeerUser)) {
|
|
23
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
24
|
+
}
|
|
25
|
+
return new _2_tl_js_1.types.BotCommandScopePeerUser({ peer: await getInputPeer(scope.chatId), userId: new _2_tl_js_1.types.InputUser({ userId: user.userId, accessHash: user.accessHash }) });
|
|
26
|
+
}
|
|
27
|
+
default:
|
|
28
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.botCommandScopeToTlObject = botCommandScopeToTlObject;
|
package/script/types/1_chat.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
import { Color } from "./0_color.js";
|
|
3
2
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
3
|
+
import { Color } from "./0_color.js";
|
|
4
4
|
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
5
5
|
export declare namespace Chat {
|
|
6
6
|
interface Base {
|
package/script/types/1_chat.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.constructChat = void 0;
|
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
6
|
const _4_constants_js_1 = require("../4_constants.js");
|
|
7
|
-
const _0_color_js_1 = require("./0_color.js");
|
|
8
7
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
8
|
+
const _0_color_js_1 = require("./0_color.js");
|
|
9
9
|
function constructChat(chat) {
|
|
10
10
|
if (chat instanceof _2_tl_js_1.types.User) {
|
|
11
11
|
const id = Number(chat.id);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LabeledPrice } from "../tl/2_types.js";
|
|
2
|
+
export interface InputInvoiceMessageContent {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
payload: string;
|
|
6
|
+
providerToken: string;
|
|
7
|
+
currency: string;
|
|
8
|
+
prices: LabeledPrice[];
|
|
9
|
+
maxTipAmount?: number;
|
|
10
|
+
suggestedTipAmounts?: number[];
|
|
11
|
+
providerData?: string;
|
|
12
|
+
photoUrl?: string;
|
|
13
|
+
photoSize?: number;
|
|
14
|
+
photoWidth?: number;
|
|
15
|
+
photoHeight?: number;
|
|
16
|
+
needName?: boolean;
|
|
17
|
+
needPhoneNumber?: boolean;
|
|
18
|
+
needEmail?: boolean;
|
|
19
|
+
needShippingAAddress?: boolean;
|
|
20
|
+
sendPhoneNumberToPorvider?: boolean;
|
|
21
|
+
sendEmailToProvider?: boolean;
|
|
22
|
+
isFlexible?: boolean;
|
|
23
|
+
}
|
package/script/types/1_photo.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructPhoto = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const
|
|
5
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
6
6
|
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
7
7
|
function constructPhoto(photo) {
|
|
8
8
|
const sizes = photo.sizes
|
|
@@ -18,14 +18,14 @@ function constructPhoto(photo) {
|
|
|
18
18
|
.sort((a, b) => a.size - b.size);
|
|
19
19
|
const largest = sizes.slice(-1)[0];
|
|
20
20
|
const { dcId, id: mediaId, accessHash, fileReference } = photo;
|
|
21
|
-
const fileUniqueId = new
|
|
21
|
+
const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.id }).encode();
|
|
22
22
|
return {
|
|
23
|
-
fileId: new
|
|
23
|
+
fileId: new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Photo, dcId, {
|
|
24
24
|
mediaId,
|
|
25
25
|
accessHash,
|
|
26
26
|
fileReference,
|
|
27
|
-
thumbnailSource:
|
|
28
|
-
thumbnailFileType:
|
|
27
|
+
thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
|
|
28
|
+
thumbnailFileType: _0__file_id_js_1.FileType.Photo,
|
|
29
29
|
thumbnailSize: largest.type,
|
|
30
30
|
volumeId: 0n,
|
|
31
31
|
localId: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MaybePromise } from "../1_utilities.js";
|
|
2
2
|
import { types } from "../2_tl.js";
|
|
3
|
-
import { Thumbnail } from "./0_thumbnail.js";
|
|
4
3
|
import { MaskPosition } from "./0_mask_position.js";
|
|
4
|
+
import { Thumbnail } from "./0_thumbnail.js";
|
|
5
5
|
/** This object represents a sticker. */
|
|
6
6
|
export interface Sticker {
|
|
7
7
|
/** Identifier for this file, which can be used to download or reuse the file */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.constructSticker = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
6
5
|
const _0_mask_position_js_1 = require("./0_mask_position.js");
|
|
6
|
+
const _0_thumbnail_js_1 = require("./0_thumbnail.js");
|
|
7
7
|
async function constructSticker(document, fileId, fileUniqueId, getStickerSetName) {
|
|
8
8
|
const stickerAttribute = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeSticker);
|
|
9
9
|
const imageSizeAttribute = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeImageSize);
|
package/script/types/1_user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
import { Color } from "./0_color.js";
|
|
3
2
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
3
|
+
import { Color } from "./0_color.js";
|
|
4
4
|
/** This object represents a Telegram user or bot. */
|
|
5
5
|
export interface User {
|
|
6
6
|
/** Unique identifier for this user or bot */
|
package/script/types/1_user.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.constructUser = void 0;
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
|
-
const _0_color_js_1 = require("./0_color.js");
|
|
7
6
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
7
|
+
const _0_color_js_1 = require("./0_color.js");
|
|
8
8
|
function constructUser(user_) {
|
|
9
9
|
const id = Number(user_.id);
|
|
10
10
|
const user = {
|
package/script/types/2_game.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.constructGame = void 0;
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
|
-
const
|
|
6
|
+
const _0__file_id_js_1 = require("./0__file_id.js");
|
|
7
7
|
const _1_animation_js_1 = require("./1_animation.js");
|
|
8
8
|
const _1_photo_js_1 = require("./1_photo.js");
|
|
9
9
|
function constructGame(media_) {
|
|
@@ -14,11 +14,11 @@ function constructGame(media_) {
|
|
|
14
14
|
description: media_.game.description,
|
|
15
15
|
photo: (0, _1_photo_js_1.constructPhoto)(game_.photo[_2_tl_js_1.as](_2_tl_js_1.types.Photo)),
|
|
16
16
|
animation: document_
|
|
17
|
-
? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new
|
|
17
|
+
? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Animation, document_.dcId, {
|
|
18
18
|
mediaId: document_.id,
|
|
19
19
|
accessHash: document_.accessHash,
|
|
20
20
|
fileReference: document_.fileReference,
|
|
21
|
-
}).encode(), new
|
|
21
|
+
}).encode(), new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: document_.id }).encode())
|
|
22
22
|
: undefined,
|
|
23
23
|
});
|
|
24
24
|
}
|
package/{esm/types/1_inline_keyboard_button.d.ts → script/types/2_inline_keyboard_button.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MaybePromise } from "../1_utilities.js";
|
|
2
1
|
import { types } from "../2_tl.js";
|
|
3
|
-
import { WebAppInfo } from "./0_web_app_info.js";
|
|
4
2
|
import { LoginUrl } from "./0_login_url.js";
|
|
3
|
+
import { WebAppInfo } from "./0_web_app_info.js";
|
|
4
|
+
import { UsernameResolver } from "./1__getters.js";
|
|
5
5
|
export declare namespace InlineKeyboardButton {
|
|
6
6
|
interface Base {
|
|
7
7
|
/** Label text on the button */
|
|
@@ -42,4 +42,4 @@ export declare namespace InlineKeyboardButton {
|
|
|
42
42
|
/** This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. */
|
|
43
43
|
export type InlineKeyboardButton = InlineKeyboardButton.URL | InlineKeyboardButton.Callback | InlineKeyboardButton.WebApp | InlineKeyboardButton.Login | InlineKeyboardButton.SwitchInline | InlineKeyboardButton.SwitchInlineCurrent | InlineKeyboardButton.Game | InlineKeyboardButton.Pay;
|
|
44
44
|
export declare function constructInlineKeyboardButton(button_: types.TypeKeyboardButton): InlineKeyboardButton;
|
|
45
|
-
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver:
|
|
45
|
+
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
import { EntityGetter } from "./!0_misc.js";
|
|
3
2
|
import { Location } from "./0_location.js";
|
|
3
|
+
import { EntityGetter } from "./1__getters.js";
|
|
4
4
|
import { User } from "./1_user.js";
|
|
5
5
|
export interface InlineQuery {
|
|
6
6
|
/** Unique identifier for this query */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InputContactMessageContent } from "./0_input_contact_message_content.js";
|
|
2
|
+
import { InputLocationMessageContent } from "./0_input_location_message_content.js";
|
|
3
|
+
import { InputVenuMessageContent } from "./0_input_venue_message_content.js";
|
|
4
|
+
import { InputInvoiceMessageContent } from "./1_input_invoice_message_content.js";
|
|
5
|
+
import { InputTextMessageContent } from "./1_input_text_message_content.js";
|
|
6
|
+
export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenuMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UsernameResolver } from "./1__getters.js";
|
|
3
|
+
import { InlineKeyboardButton } from "./2_inline_keyboard_button.js";
|
|
3
4
|
/** This object represents an inline keyboard that appears right next to the message it belongs to. */
|
|
4
5
|
export interface InlineKeyboardMarkup {
|
|
5
6
|
/** Array of button rows, each represented by an Array of InlineKeyboardButton objects */
|
|
6
7
|
inlineKeyboard: InlineKeyboardButton[][];
|
|
7
8
|
}
|
|
8
9
|
export declare function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): InlineKeyboardMarkup;
|
|
9
|
-
export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver:
|
|
10
|
+
export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: UsernameResolver): Promise<types.ReplyInlineMarkup>;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.inlineKeyboardMarkupToTlObject = exports.constructInlineKeyboardMarkup = void 0;
|
|
4
4
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
5
|
-
const
|
|
5
|
+
const _2_inline_keyboard_button_js_1 = require("./2_inline_keyboard_button.js");
|
|
6
6
|
function constructInlineKeyboardMarkup(keyboard_) {
|
|
7
7
|
const rows = new Array();
|
|
8
8
|
for (const row_ of keyboard_.rows) {
|
|
9
9
|
const row = new Array();
|
|
10
10
|
for (const button_ of row_.buttons) {
|
|
11
|
-
row.push((0,
|
|
11
|
+
row.push((0, _2_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
|
|
12
12
|
}
|
|
13
13
|
rows.push(row);
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@ async function inlineKeyboardMarkupToTlObject(keyboard, usernameResolver) {
|
|
|
20
20
|
for (const row of keyboard.inlineKeyboard) {
|
|
21
21
|
const row_ = new Array();
|
|
22
22
|
for (const button of row) {
|
|
23
|
-
row_.push(await (0,
|
|
23
|
+
row_.push(await (0, _2_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
|
|
24
24
|
}
|
|
25
25
|
rows_.push(new _2_tl_js_1.types.KeyboardButtonRow({ buttons: row_ }));
|
|
26
26
|
}
|