@mtkruto/node 0.145.0 → 0.146.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 +2 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +2 -0
- package/esm/client/1_client_generic.d.ts +36 -1
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.js +1 -2
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +22 -23
- package/esm/client/3_account_manager.d.ts +3 -0
- package/esm/client/3_account_manager.d.ts.map +1 -1
- package/esm/client/3_account_manager.js +14 -1
- package/esm/client/3_message_manager.d.ts +3 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +14 -0
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +1 -2
- package/esm/client/6_client.d.ts +36 -1
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +47 -3
- package/esm/client/6_client_dispatcher.d.ts +36 -1
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +45 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.js +4 -4
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.js +4 -3
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.js +8 -9
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.4/join.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +1 -1
- package/esm/types/0_authorization_session.d.ts +43 -0
- package/esm/types/0_authorization_session.d.ts.map +1 -0
- package/esm/types/0_authorization_session.js +41 -0
- package/esm/types/0_message_counters.d.ts +29 -0
- package/esm/types/0_message_counters.d.ts.map +1 -0
- package/esm/types/0_message_counters.js +20 -0
- package/esm/types/1_chat_action.d.ts +1 -1
- package/esm/types/1_chat_action.d.ts.map +1 -1
- package/esm/types/1_chat_action.js +3 -3
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +2 -3
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +1 -2
- package/esm/types/3_bot_access_settings.d.ts +2 -2
- package/esm/types/3_bot_access_settings.d.ts.map +1 -1
- package/esm/types/3_message_draft.d.ts.map +1 -1
- package/esm/types/3_message_draft.js +1 -2
- package/esm/types/7_saved_chat.d.ts +2 -3
- package/esm/types/7_saved_chat.d.ts.map +1 -1
- package/esm/types/7_saved_chat.js +3 -3
- package/package.json +1 -1
- package/script/3_types.d.ts +2 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +2 -0
- package/script/client/1_client_generic.d.ts +36 -1
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.js +1 -2
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +22 -23
- package/script/client/3_account_manager.d.ts +3 -0
- package/script/client/3_account_manager.d.ts.map +1 -1
- package/script/client/3_account_manager.js +13 -0
- package/script/client/3_message_manager.d.ts +3 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +14 -0
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +1 -2
- package/script/client/6_client.d.ts +36 -1
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +47 -3
- package/script/client/6_client_dispatcher.d.ts +36 -1
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +45 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.js +4 -4
- package/script/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.js +7 -5
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.js +4 -3
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.js +8 -9
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/1.1.4/basename.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.4/extname.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.4/join.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +1 -1
- package/script/types/0_authorization_session.d.ts +43 -0
- package/script/types/0_authorization_session.d.ts.map +1 -0
- package/script/types/0_authorization_session.js +44 -0
- package/script/types/0_message_counters.d.ts +29 -0
- package/script/types/0_message_counters.d.ts.map +1 -0
- package/script/types/0_message_counters.js +21 -0
- package/script/types/1_chat_action.d.ts +1 -1
- package/script/types/1_chat_action.d.ts.map +1 -1
- package/script/types/1_chat_action.js +3 -3
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +2 -3
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +1 -2
- package/script/types/3_bot_access_settings.d.ts +2 -2
- package/script/types/3_bot_access_settings.d.ts.map +1 -1
- package/script/types/3_message_draft.d.ts.map +1 -1
- package/script/types/3_message_draft.js +1 -2
- package/script/types/7_saved_chat.d.ts +2 -3
- package/script/types/7_saved_chat.d.ts.map +1 -1
- package/script/types/7_saved_chat.js +3 -3
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.js +0 -12
- package/script/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.js +0 -0
|
@@ -684,6 +684,31 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
684
684
|
async deleteAccount(reason, params) {
|
|
685
685
|
return await this.#dispatch("deleteAccount", reason, params);
|
|
686
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Get the authorization sessions. User-only.
|
|
689
|
+
*
|
|
690
|
+
* @method ac
|
|
691
|
+
*/
|
|
692
|
+
async getAuthorizationSessions() {
|
|
693
|
+
return await this.#dispatch("getAuthorizationSessions");
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Remove an authorization session. User-only.
|
|
697
|
+
*
|
|
698
|
+
* @method ac
|
|
699
|
+
* @param id The identifier of the authorization session to remove.
|
|
700
|
+
*/
|
|
701
|
+
async removeAuthorizationSession(id) {
|
|
702
|
+
return await this.#dispatch("removeAuthorizationSession", id);
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Remove all authorization sessions except for the current one. User-only.
|
|
706
|
+
*
|
|
707
|
+
* @method ac
|
|
708
|
+
*/
|
|
709
|
+
async removeAuthorizationSessions() {
|
|
710
|
+
return await this.#dispatch("removeAuthorizationSessions");
|
|
711
|
+
}
|
|
687
712
|
//
|
|
688
713
|
// ========================= MESSAGES ========================= //
|
|
689
714
|
//
|
|
@@ -1389,6 +1414,26 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
1389
1414
|
async translateMessage(toLanguage, chatId, messageId, params) {
|
|
1390
1415
|
return await this.#dispatch("translateMessage", toLanguage, chatId, messageId, params);
|
|
1391
1416
|
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Get the counters of multiple messages. User-only.
|
|
1419
|
+
*
|
|
1420
|
+
* @method ms
|
|
1421
|
+
* @param chatId The identifier of the chat including the messages.
|
|
1422
|
+
* @param messageIds The identifiers of the messages.
|
|
1423
|
+
*/
|
|
1424
|
+
async getMessagesCounters(chatId, messageIds) {
|
|
1425
|
+
return await this.#dispatch("getMessagesCounters", chatId, messageIds);
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Get the counters of a single message. User-only.
|
|
1429
|
+
*
|
|
1430
|
+
* @method ms
|
|
1431
|
+
* @param chatId The identifier of the chat including the message.
|
|
1432
|
+
* @param messageId The identifier of the message.
|
|
1433
|
+
*/
|
|
1434
|
+
async getMessageCounters(chatId, messageId) {
|
|
1435
|
+
return await this.#dispatch("getMessageCounters", chatId, messageId);
|
|
1436
|
+
}
|
|
1392
1437
|
//
|
|
1393
1438
|
// ========================= POLLS ========================= //
|
|
1394
1439
|
//
|
|
@@ -4,10 +4,10 @@ exports.assertEquals = assertEquals;
|
|
|
4
4
|
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const equal_js_1 = require("./equal.js");
|
|
7
|
-
const build_message_js_1 = require("../../internal/1.0.
|
|
8
|
-
const diff_js_1 = require("../../internal/1.0.
|
|
9
|
-
const diff_str_js_1 = require("../../internal/1.0.
|
|
10
|
-
const format_js_1 = require("../../internal/1.0.
|
|
7
|
+
const build_message_js_1 = require("../../internal/1.0.14/build_message.js");
|
|
8
|
+
const diff_js_1 = require("../../internal/1.0.14/diff.js");
|
|
9
|
+
const diff_str_js_1 = require("../../internal/1.0.14/diff_str.js");
|
|
10
|
+
const format_js_1 = require("../../internal/1.0.14/format.js");
|
|
11
11
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
12
12
|
/**
|
|
13
13
|
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_os.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/_os.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,IAAI,OAAO,CAUtC"}
|
|
@@ -39,10 +39,12 @@ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
|
39
39
|
function checkWindows() {
|
|
40
40
|
// deno-lint-ignore no-explicit-any
|
|
41
41
|
const global = dntShim.dntGlobalThis;
|
|
42
|
+
// Check Node/Bun/Deno via `process.platform`, then the Deno global, then the browser
|
|
43
|
+
const platform = global.process?.platform;
|
|
44
|
+
if (typeof platform === "string")
|
|
45
|
+
return platform.startsWith("win");
|
|
42
46
|
const os = global.Deno?.build?.os;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
: global.navigator?.platform?.startsWith("Win") ??
|
|
47
|
-
global.process?.platform?.startsWith("win") ?? false;
|
|
47
|
+
if (typeof os === "string")
|
|
48
|
+
return os === "windows";
|
|
49
|
+
return global.navigator?.platform?.startsWith("Win") ?? false;
|
|
48
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/build_message.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ;AAClB;;;GAGG;AACH,UAAU,UAAQ,GACjB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAWvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CASrD;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,OAAO,GAAE,mBAAwB,EACjC,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,UAAU,EAAE,OAAO,EACnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,KAC1B,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GACrC,MAAM,EAAE,CA8BV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAanD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAWvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,CAAC,EAAE,EACN,CAAC,EAAE,CAAC,EAAE,EACN,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,GACzB,KAAK,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAiCD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,aAAa,GACnB,aAAa,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAwEvD"}
|
|
@@ -112,27 +112,28 @@ function backTrace(A, B, current, swapped, routes, diffTypesPtrOffset) {
|
|
|
112
112
|
break;
|
|
113
113
|
const prev = j;
|
|
114
114
|
if (type === REMOVED) {
|
|
115
|
-
result.
|
|
115
|
+
result.push({
|
|
116
116
|
type: swapped ? "removed" : "added",
|
|
117
117
|
value: B[b],
|
|
118
118
|
});
|
|
119
119
|
b -= 1;
|
|
120
120
|
}
|
|
121
121
|
else if (type === ADDED) {
|
|
122
|
-
result.
|
|
122
|
+
result.push({
|
|
123
123
|
type: swapped ? "added" : "removed",
|
|
124
124
|
value: A[a],
|
|
125
125
|
});
|
|
126
126
|
a -= 1;
|
|
127
127
|
}
|
|
128
128
|
else {
|
|
129
|
-
result.
|
|
129
|
+
result.push({ type: "common", value: A[a] });
|
|
130
130
|
a -= 1;
|
|
131
131
|
b -= 1;
|
|
132
132
|
}
|
|
133
133
|
j = routes[prev];
|
|
134
134
|
type = routes[prev + diffTypesPtrOffset];
|
|
135
135
|
}
|
|
136
|
+
result.reverse();
|
|
136
137
|
return result;
|
|
137
138
|
}
|
|
138
139
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/diff_str.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,YAAY,CAAC;AAGhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAY/C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
|
|
@@ -161,19 +161,18 @@ function diffStr(A, B) {
|
|
|
161
161
|
const hasMoreRemovedLines = added.length < removed.length;
|
|
162
162
|
const aLines = hasMoreRemovedLines ? added : removed;
|
|
163
163
|
const bLines = hasMoreRemovedLines ? removed : added;
|
|
164
|
+
let bIdx = 0;
|
|
164
165
|
for (const a of aLines) {
|
|
165
166
|
let tokens = [];
|
|
166
167
|
let b;
|
|
168
|
+
const aTokens = tokenize(a.value, true);
|
|
167
169
|
// Search another diff line with at least one common token
|
|
168
|
-
while (bLines.length) {
|
|
169
|
-
b = bLines
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (hasMoreRemovedLines)
|
|
175
|
-
tokenized.reverse();
|
|
176
|
-
tokens = (0, diff_js_1.diff)(tokenized[0], tokenized[1]);
|
|
170
|
+
while (bIdx < bLines.length) {
|
|
171
|
+
b = bLines[bIdx++];
|
|
172
|
+
const bTokens = tokenize(b.value, true);
|
|
173
|
+
tokens = hasMoreRemovedLines
|
|
174
|
+
? (0, diff_js_1.diff)(bTokens, aTokens)
|
|
175
|
+
: (0, diff_js_1.diff)(aTokens, bTokens);
|
|
177
176
|
if (tokens.some(({ type, value }) => type === "common" && NON_WHITESPACE_REGEXP.test(value))) {
|
|
178
177
|
break;
|
|
179
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/format.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAG,CACtB,CAAC,EAAE,OAAO,EACV,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,KACE,MAAM,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAmBzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/os.ts"],"names":[],"mappings":"AAKA,8CAA8C;AAC9C,eAAO,MAAM,SAAS,EAAE,OAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/styles.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/types.ts"],"names":[],"mappings":"AAGA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.basename = basename;
|
|
6
|
-
const os_js_1 = require("../../internal/1.0.
|
|
6
|
+
const os_js_1 = require("../../internal/1.0.14/os.js");
|
|
7
7
|
const basename_js_1 = require("./posix/basename.js");
|
|
8
8
|
const basename_js_2 = require("./windows/basename.js");
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.extname = extname;
|
|
6
|
-
const os_js_1 = require("../../internal/1.0.
|
|
6
|
+
const os_js_1 = require("../../internal/1.0.14/os.js");
|
|
7
7
|
const extname_js_1 = require("./posix/extname.js");
|
|
8
8
|
const extname_js_2 = require("./windows/extname.js");
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.isAbsolute = isAbsolute;
|
|
6
|
-
const os_js_1 = require("../../internal/1.0.
|
|
6
|
+
const os_js_1 = require("../../internal/1.0.14/os.js");
|
|
7
7
|
const is_absolute_js_1 = require("./posix/is_absolute.js");
|
|
8
8
|
const is_absolute_js_2 = require("./windows/is_absolute.js");
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.join = join;
|
|
6
|
-
const os_js_1 = require("../../internal/1.0.
|
|
6
|
+
const os_js_1 = require("../../internal/1.0.14/os.js");
|
|
7
7
|
const join_js_1 = require("./posix/join.js");
|
|
8
8
|
const join_js_2 = require("./windows/join.js");
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.toFileUrl = toFileUrl;
|
|
6
|
-
const os_js_1 = require("../../internal/1.0.
|
|
6
|
+
const os_js_1 = require("../../internal/1.0.14/os.js");
|
|
7
7
|
const to_file_url_js_1 = require("./posix/to_file_url.js");
|
|
8
8
|
const to_file_url_js_2 = require("./windows/to_file_url.js");
|
|
9
9
|
/**
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/** An authorization session. */
|
|
22
|
+
export interface AuthorizationSession {
|
|
23
|
+
id: string;
|
|
24
|
+
date: number;
|
|
25
|
+
lastActivity: number;
|
|
26
|
+
isCurrent: boolean;
|
|
27
|
+
isOfficialApp: boolean;
|
|
28
|
+
isPasswordPending: boolean;
|
|
29
|
+
isEncryptedRequestsDisabled: boolean;
|
|
30
|
+
isCallRequestsDisabled: boolean;
|
|
31
|
+
isUnconfirmed: boolean;
|
|
32
|
+
deviceModel: string;
|
|
33
|
+
platform: string;
|
|
34
|
+
systemVersion: string;
|
|
35
|
+
apiId: number;
|
|
36
|
+
appName: string;
|
|
37
|
+
appVersion: string;
|
|
38
|
+
ipAddress: string;
|
|
39
|
+
country: string;
|
|
40
|
+
region: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function constructAuthorizationSession(authorization: Api.Authorization): AuthorizationSession;
|
|
43
|
+
//# sourceMappingURL=0_authorization_session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_authorization_session.d.ts","sourceRoot":"","sources":["../../src/types/0_authorization_session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,gCAAgC;AAChC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2BAA2B,EAAE,OAAO,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,GAAG,oBAAoB,CAqBpG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.constructAuthorizationSession = constructAuthorizationSession;
|
|
23
|
+
function constructAuthorizationSession(authorization) {
|
|
24
|
+
return {
|
|
25
|
+
id: String(authorization.hash),
|
|
26
|
+
date: authorization.date_created,
|
|
27
|
+
lastActivity: authorization.date_active,
|
|
28
|
+
isCurrent: authorization.current || false,
|
|
29
|
+
isOfficialApp: authorization.official_app || false,
|
|
30
|
+
isPasswordPending: authorization.password_pending || false,
|
|
31
|
+
isEncryptedRequestsDisabled: authorization.encrypted_requests_disabled || false,
|
|
32
|
+
isCallRequestsDisabled: authorization.call_requests_disabled || false,
|
|
33
|
+
isUnconfirmed: authorization.unconfirmed || false,
|
|
34
|
+
deviceModel: authorization.device_model,
|
|
35
|
+
platform: authorization.platform,
|
|
36
|
+
systemVersion: authorization.system_version,
|
|
37
|
+
apiId: authorization.api_id,
|
|
38
|
+
appName: authorization.app_name,
|
|
39
|
+
appVersion: authorization.app_version,
|
|
40
|
+
ipAddress: authorization.ip,
|
|
41
|
+
country: authorization.country,
|
|
42
|
+
region: authorization.region,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
/** The counters of a message. */
|
|
21
|
+
export interface MessageCounters {
|
|
22
|
+
/** The number of times the message was viewed. */
|
|
23
|
+
views: number;
|
|
24
|
+
/** The number of replies made to the messages. */
|
|
25
|
+
replies: number;
|
|
26
|
+
/** The number of times the message was forwarded. */
|
|
27
|
+
forwards: number;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=0_message_counters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_message_counters.d.ts","sourceRoot":"","sources":["../../src/types/0_message_counters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,iCAAiC;AACjC,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 });
|
|
@@ -17,7 +17,7 @@
|
|
|
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 { Api } from "../2_tl.js";
|
|
21
21
|
import { type ChatActionType } from "./0_chat_action_type.js";
|
|
22
22
|
/** A sign of a possible action by a member of a conversation. */
|
|
23
23
|
export interface ChatAction {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"1_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,yBAAyB,CAAC;AAEvF,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,uBAAuB,GAAG,UAAU,GAAG,IAAI,CAY5I"}
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructChatAction = constructChatAction;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
-
const
|
|
24
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _0_chat_action_type_js_1 = require("./0_chat_action_type.js");
|
|
26
26
|
function constructChatAction(update) {
|
|
27
27
|
const type = (0, _0_chat_action_type_js_1.constructChatActionType)(update.action);
|
|
28
28
|
if (type === null) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
const chatId =
|
|
32
|
-
const fromId =
|
|
31
|
+
const chatId = _2_tl_js_1.Api.peerToChatId(update);
|
|
32
|
+
const fromId = _2_tl_js_1.Api.peerToChatId("user_id" in update ? { _: "peerUser", user_id: update.user_id } : update.from_id);
|
|
33
33
|
const messageThreadId = "top_msg_id" in update ? update.top_msg_id : undefined;
|
|
34
34
|
return (0, _1_utilities_js_1.cleanObject)({ type, chatId, fromId, messageThreadId });
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"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"}
|
package/script/types/1_chat_p.js
CHANGED
|
@@ -24,7 +24,6 @@ exports.isChatPUser = isChatPUser;
|
|
|
24
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
25
25
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
26
26
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
27
|
-
const _2_telegram_js_1 = require("../tl/2_telegram.js");
|
|
28
27
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
29
28
|
const _0_emoji_status_js_1 = require("./0_emoji_status.js");
|
|
30
29
|
const _0_restriction_reason_js_1 = require("./0_restriction_reason.js");
|
|
@@ -69,7 +68,7 @@ function constructChatP(chat) {
|
|
|
69
68
|
return (0, _1_utilities_js_1.cleanObject)(chat_);
|
|
70
69
|
}
|
|
71
70
|
else if (_2_tl_js_1.Api.is("chat", chat) || _2_tl_js_1.Api.is("chatForbidden", chat)) {
|
|
72
|
-
const id =
|
|
71
|
+
const id = _2_tl_js_1.Api.peerToChatId(chat);
|
|
73
72
|
const chat_ = {
|
|
74
73
|
id,
|
|
75
74
|
type: "group",
|
|
@@ -87,7 +86,7 @@ function constructChatP(chat) {
|
|
|
87
86
|
}
|
|
88
87
|
else if (_2_tl_js_1.Api.is("channel", chat) || _2_tl_js_1.Api.is("channelForbidden", chat)) {
|
|
89
88
|
let chat_;
|
|
90
|
-
const id =
|
|
89
|
+
const id = _2_tl_js_1.Api.peerToChatId(chat);
|
|
91
90
|
if (_2_tl_js_1.Api.is("channelForbidden", chat)) {
|
|
92
91
|
const { title } = chat;
|
|
93
92
|
if (chat.megagroup) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAqB,KAAK,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1D,gBAAgB;AAChB,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,4BAA4B,CAAC;CACxC;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACvF,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,mCAAmC;IACpF,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACvF,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA4B,SAAQ,mCAAmC;IACtF,IAAI,EAAE,kBAAkB,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAyB,SAAQ,mCAAmC;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA4B,SAAQ,mCAAmC;IACtF,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAyB,SAAQ,mCAAmC;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,kCAAkC;AAClC,MAAM,MAAM,oBAAoB,GAC5B,4BAA4B,GAC5B,yBAAyB,GACzB,4BAA4B,GAC5B,2BAA2B,GAC3B,wBAAwB,GACxB,2BAA2B,GAC3B,wBAAwB,CAAC;AAW7B,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,GAAG,oBAAoB,CAqDvF;AAKD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,UAAU,GAAG,GAAG,CAAC,SAAS,CA0C7G"}
|
|
@@ -23,7 +23,6 @@ exports.constructStoryInteractiveArea = constructStoryInteractiveArea;
|
|
|
23
23
|
exports.storyInteractiveAreaToTlObject = storyInteractiveAreaToTlObject;
|
|
24
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
|
-
const _2_telegram_js_1 = require("../tl/2_telegram.js");
|
|
27
26
|
const _0_location_js_1 = require("./0_location.js");
|
|
28
27
|
const _0_reaction_js_1 = require("./0_reaction.js");
|
|
29
28
|
const _1_venue_js_1 = require("./1_venue.js");
|
|
@@ -129,7 +128,7 @@ function storyInteractiveAreaToTlObject(area, getPeer) {
|
|
|
129
128
|
if (!peer || peer[0].type !== "channel") {
|
|
130
129
|
(0, _0_deps_js_1.unreachable)();
|
|
131
130
|
}
|
|
132
|
-
const channel = { _: "inputChannel", channel_id:
|
|
131
|
+
const channel = { _: "inputChannel", channel_id: _2_tl_js_1.Api.chatIdToPeerId(peer[0].id), access_hash: peer[1] };
|
|
133
132
|
return { _: "inputMediaAreaChannelPost", coordinates, channel, msg_id: area.messageReference.messageId };
|
|
134
133
|
}
|
|
135
134
|
case "link":
|
|
@@ -17,11 +17,11 @@
|
|
|
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 { Api } from "../2_tl.js";
|
|
21
21
|
import { type User } from "./2_user.js";
|
|
22
22
|
export interface BotAccessSettings {
|
|
23
23
|
isAccessRestricted: boolean;
|
|
24
24
|
usersWithAccess: User[];
|
|
25
25
|
}
|
|
26
|
-
export declare function constructBotAccessSettings(accessSettings: bots_accessSettings): BotAccessSettings;
|
|
26
|
+
export declare function constructBotAccessSettings(accessSettings: Api.bots_accessSettings): BotAccessSettings;
|
|
27
27
|
//# sourceMappingURL=3_bot_access_settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_bot_access_settings.d.ts","sourceRoot":"","sources":["../../src/types/3_bot_access_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"3_bot_access_settings.d.ts","sourceRoot":"","sources":["../../src/types/3_bot_access_settings.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,iBAAiB;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,IAAI,EAAE,CAAC;CACzB;AAED,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,GAAG,CAAC,mBAAmB,GAAG,iBAAiB,CAKrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_message_draft.d.ts","sourceRoot":"","sources":["../../src/types/3_message_draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"3_message_draft.d.ts","sourceRoot":"","sources":["../../src/types/3_message_draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,uBAAuB;AACvB,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,YAAY,GAAG,IAAI,CAmBvF"}
|
|
@@ -22,13 +22,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.constructMessageDraft = constructMessageDraft;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
|
-
const _2_telegram_js_1 = require("../tl/2_telegram.js");
|
|
26
25
|
const _2_message_entity_js_1 = require("./2_message_entity.js");
|
|
27
26
|
function constructMessageDraft(action) {
|
|
28
27
|
if (!_2_tl_js_1.Api.is("sendMessageTextDraftAction", action.action)) {
|
|
29
28
|
return null;
|
|
30
29
|
}
|
|
31
|
-
const fromId =
|
|
30
|
+
const fromId = _2_tl_js_1.Api.peerToChatId(action);
|
|
32
31
|
const id = String(action.action.random_id);
|
|
33
32
|
const text = action.action.text.text;
|
|
34
33
|
const entities = action.action.text.entities.map((v) => (0, _2_message_entity_js_1.constructMessageEntity)(v)).filter((v) => v !== null);
|
|
@@ -17,8 +17,7 @@
|
|
|
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
|
|
21
|
-
import type { SavedDialog } from "../tl/1_telegram_api.js";
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
22
21
|
import { type ChatP, type PeerGetter } from "./1_chat_p.js";
|
|
23
22
|
import type { StickerSetNameGetter } from "./1_sticker.js";
|
|
24
23
|
import { type Message, type MessageGetter } from "./6_message.js";
|
|
@@ -31,5 +30,5 @@ export interface SavedChat {
|
|
|
31
30
|
/** Whether the chat is pinned. */
|
|
32
31
|
isPinned: boolean;
|
|
33
32
|
}
|
|
34
|
-
export declare function constructSavedChat(dialog: SavedDialog, result: Api.messages_savedDialogs | Api.messages_savedDialogsSlice, getPeer: PeerGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<SavedChat>;
|
|
33
|
+
export declare function constructSavedChat(dialog: Api.SavedDialog, result: Api.messages_savedDialogs | Api.messages_savedDialogsSlice, getPeer: PeerGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<SavedChat>;
|
|
35
34
|
//# sourceMappingURL=7_saved_chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAoB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpF,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,gBAAgB;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,qBAAqB,GAAG,GAAG,CAAC,0BAA0B,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAkBjP"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructSavedChat = constructSavedChat;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
|
-
const
|
|
24
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
26
26
|
const _6_message_js_1 = require("./6_message.js");
|
|
27
27
|
async function constructSavedChat(dialog, result, getPeer, getMessage, getStickerSetName) {
|
|
@@ -29,8 +29,8 @@ async function constructSavedChat(dialog, result, getPeer, getMessage, getSticke
|
|
|
29
29
|
if (message === undefined) {
|
|
30
30
|
(0, _0_deps_js_1.unreachable)();
|
|
31
31
|
}
|
|
32
|
-
const dialogId =
|
|
33
|
-
const chat_ = (dialog.peer._ === "peerUser" ? result.users : result.chats).find((v) =>
|
|
32
|
+
const dialogId = _2_tl_js_1.Api.peerToChatId(dialog.peer);
|
|
33
|
+
const chat_ = (dialog.peer._ === "peerUser" ? result.users : result.chats).find((v) => _2_tl_js_1.Api.peerToChatId(v) === dialogId);
|
|
34
34
|
if (chat_ === undefined) {
|
|
35
35
|
(0, _0_deps_js_1.unreachable)();
|
|
36
36
|
}
|