@mtkruto/browser 0.129.0 → 0.130.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/3_types.d.ts +1 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +1 -0
- package/esm/client/0_params.d.ts +26 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +23 -2
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/1_types.d.ts +1 -0
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_takeout_manager.d.ts +29 -0
- package/esm/client/2_takeout_manager.d.ts.map +1 -0
- package/esm/client/2_takeout_manager.js +41 -0
- package/esm/client/3_message_manager.js +1 -1
- package/esm/client/6_client.d.ts +23 -2
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +40 -3
- package/esm/client/6_client_dispatcher.d.ts +23 -2
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +30 -0
- package/esm/types/0_calling_code.d.ts +4 -0
- package/esm/types/0_calling_code.d.ts.map +1 -1
- package/esm/types/0_chat_action_type.d.ts +13 -0
- package/esm/types/0_chat_action_type.d.ts.map +1 -1
- package/esm/types/1_available_reactions.d.ts +1 -0
- package/esm/types/1_available_reactions.d.ts.map +1 -1
- package/esm/types/1_country.d.ts +6 -0
- package/esm/types/1_country.d.ts.map +1 -1
- package/esm/types/2_left_channel_list.d.ts +30 -0
- package/esm/types/2_left_channel_list.d.ts.map +1 -0
- package/esm/types/2_left_channel_list.js +25 -0
- package/esm/types/2_story_album_icon.d.ts +1 -0
- package/esm/types/2_story_album_icon.d.ts.map +1 -1
- package/esm/types/3_app_support.d.ts +3 -0
- package/esm/types/3_app_support.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/3_types.d.ts +1 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +1 -0
- package/script/client/0_params.d.ts +26 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +23 -2
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/1_types.d.ts +1 -0
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_takeout_manager.d.ts +29 -0
- package/script/client/2_takeout_manager.d.ts.map +1 -0
- package/script/client/2_takeout_manager.js +45 -0
- package/script/client/3_message_manager.js +1 -1
- package/script/client/6_client.d.ts +23 -2
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +40 -3
- package/script/client/6_client_dispatcher.d.ts +23 -2
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +30 -0
- package/script/types/0_calling_code.d.ts +4 -0
- package/script/types/0_calling_code.d.ts.map +1 -1
- package/script/types/0_chat_action_type.d.ts +13 -0
- package/script/types/0_chat_action_type.d.ts.map +1 -1
- package/script/types/1_available_reactions.d.ts +1 -0
- package/script/types/1_available_reactions.d.ts.map +1 -1
- package/script/types/1_country.d.ts +6 -0
- package/script/types/1_country.d.ts.map +1 -1
- package/script/types/2_left_channel_list.d.ts +30 -0
- package/script/types/2_left_channel_list.d.ts.map +1 -0
- package/script/types/2_left_channel_list.js +28 -0
- package/script/types/2_story_album_icon.d.ts +1 -0
- package/script/types/2_story_album_icon.d.ts.map +1 -1
- package/script/types/3_app_support.d.ts +3 -0
- package/script/types/3_app_support.d.ts.map +1 -1
|
@@ -49,6 +49,7 @@ export interface AvailableReactionsAll {
|
|
|
49
49
|
/** The maximum number of allowed reactions on a single message. */
|
|
50
50
|
maxReactionCount: number;
|
|
51
51
|
}
|
|
52
|
+
/** A chat's available reactions. */
|
|
52
53
|
export type AvailableReactions = AvailableReactionsNone | AvailableReactionsSome | AvailableReactionsAll;
|
|
53
54
|
export declare function availableReactionsToTlObject(chatAvailableReactions: AvailableReactions): Api.ChatReactions;
|
|
54
55
|
//# sourceMappingURL=1_available_reactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_available_reactions.d.ts","sourceRoot":"","sources":["../../src/types/1_available_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,IAAI,EAAE,KAAK,CAAC;IACZ,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,qBAAqB,CAAC;AAEzG,wBAAgB,4BAA4B,CAAC,sBAAsB,EAAE,kBAAkB,GAAG,GAAG,CAAC,aAAa,CAS1G"}
|
|
1
|
+
{"version":3,"file":"1_available_reactions.d.ts","sourceRoot":"","sources":["../../src/types/1_available_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,IAAI,EAAE,KAAK,CAAC;IACZ,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,oCAAoC;AACpC,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,qBAAqB,CAAC;AAEzG,wBAAgB,4BAA4B,CAAC,sBAAsB,EAAE,kBAAkB,GAAG,GAAG,CAAC,aAAa,CAS1G"}
|
|
@@ -19,11 +19,17 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
21
|
import { type CallingCode } from "./0_calling_code.js";
|
|
22
|
+
/** A country. */
|
|
22
23
|
export interface Country {
|
|
24
|
+
/** The default name for the country. */
|
|
23
25
|
defaultName: string;
|
|
26
|
+
/** The country's name. */
|
|
24
27
|
name?: string;
|
|
28
|
+
/** The country's 2-letter code. */
|
|
25
29
|
code: string;
|
|
30
|
+
/** The country's calling codes. */
|
|
26
31
|
callingCodes: CallingCode[];
|
|
32
|
+
/** Whether the country is hidden. */
|
|
27
33
|
isHidden: boolean;
|
|
28
34
|
}
|
|
29
35
|
export declare function constructCountry(country: Api.help_Country): Country;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_country.d.ts","sourceRoot":"","sources":["../../src/types/1_country.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AAE7E,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,YAAY,GAAG,OAAO,CAQnE"}
|
|
1
|
+
{"version":3,"file":"1_country.d.ts","sourceRoot":"","sources":["../../src/types/1_country.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AAE7E,iBAAiB;AACjB,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,qCAAqC;IACrC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,YAAY,GAAG,OAAO,CAQnE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2026 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 type { Api } from "../2_tl.js";
|
|
21
|
+
import { type ChatP } from "./1_chat_p.js";
|
|
22
|
+
/** A list of left channels. */
|
|
23
|
+
export interface LeftChannelList {
|
|
24
|
+
/** The left channels. */
|
|
25
|
+
leftChannels: ChatP[];
|
|
26
|
+
/** The total number of left channels */
|
|
27
|
+
count: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function constructLeftChannelList(result: Api.messages_Chats): LeftChannelList;
|
|
30
|
+
//# sourceMappingURL=2_left_channel_list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2_left_channel_list.d.ts","sourceRoot":"","sources":["../../src/types/2_left_channel_list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAkB,MAAM,eAAe,CAAC;AAE3D,+BAA+B;AAC/B,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,cAAc,GAAG,eAAe,CAIpF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2026 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.constructLeftChannelList = constructLeftChannelList;
|
|
23
|
+
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
24
|
+
function constructLeftChannelList(result) {
|
|
25
|
+
const leftChannels = result.chats.map(_1_chat_p_js_1.constructChatP);
|
|
26
|
+
const count = "count" in result ? result.count : result.chats.length;
|
|
27
|
+
return { leftChannels, count };
|
|
28
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_album_icon.d.ts","sourceRoot":"","sources":["../../src/types/2_story_album_icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"2_story_album_icon.d.ts","sourceRoot":"","sources":["../../src/types/2_story_album_icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED,4BAA4B;AAC5B,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,mBAAmB,CAAC"}
|
|
@@ -19,8 +19,11 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
21
|
import { type User } from "./2_user.js";
|
|
22
|
+
/** Information about app support. */
|
|
22
23
|
export interface AppSupport {
|
|
24
|
+
/** App support's phone number. */
|
|
23
25
|
phoneNumber: string;
|
|
26
|
+
/** The app support user. */
|
|
24
27
|
user: User;
|
|
25
28
|
}
|
|
26
29
|
export declare function constructAppSupport(result: Api.help_Support): AppSupport;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_app_support.d.ts","sourceRoot":"","sources":["../../src/types/3_app_support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,YAAY,GAAG,UAAU,CAExE"}
|
|
1
|
+
{"version":3,"file":"3_app_support.d.ts","sourceRoot":"","sources":["../../src/types/3_app_support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,qCAAqC;AACrC,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,YAAY,GAAG,UAAU,CAExE"}
|