@mtkruto/node 0.180.1 → 0.191.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 +6 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +6 -0
- package/esm/client/0_params.d.ts +42 -30
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +1158 -1056
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/2_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_client_encrypted.js +19 -12
- package/esm/client/2_file_manager.js +1 -1
- package/esm/client/3_account_manager.d.ts +6 -0
- package/esm/client/3_account_manager.d.ts.map +1 -1
- package/esm/client/3_account_manager.js +30 -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 +33 -19
- package/esm/client/3_secret_chat_manager.d.ts +3 -1
- package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.js +77 -3
- package/esm/client/4_chat_manager.d.ts +2 -1
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +7 -1
- package/esm/client/4_context.d.ts +132 -48
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +336 -125
- package/esm/client/4_poll_manager.d.ts +3 -1
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +16 -5
- package/esm/client/6_client.d.ts +1158 -1056
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +1514 -1386
- package/esm/client/6_client_dispatcher.d.ts +1158 -1056
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +1478 -1356
- package/esm/types/0_checklist_changed.d.ts +1 -1
- package/esm/types/0_checklist_changed.d.ts.map +1 -1
- package/esm/types/0_location.d.ts +2 -2
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_message_viewer.d.ts +29 -0
- package/esm/types/0_message_viewer.d.ts.map +1 -0
- package/esm/types/0_message_viewer.js +25 -0
- package/esm/types/0_secret_chat_action_type.d.ts +69 -0
- package/esm/types/0_secret_chat_action_type.d.ts.map +1 -0
- package/esm/types/0_secret_chat_action_type.js +46 -0
- package/esm/types/1_chat_p.d.ts +1 -5
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_input_poll_media.d.ts +5 -5
- package/esm/types/1_input_poll_media.d.ts.map +1 -1
- package/esm/types/1_input_sticker.d.ts +1 -1
- package/esm/types/1_secret_chat_action.d.ts +30 -0
- package/esm/types/1_secret_chat_action.d.ts.map +1 -0
- package/esm/types/1_secret_chat_action.js +28 -0
- package/esm/types/1_sticker.d.ts +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_video.d.ts +3 -3
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video_note.d.ts +3 -3
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/2_poll_voter.d.ts +13 -0
- package/esm/types/2_poll_voter.d.ts.map +1 -0
- package/esm/types/2_poll_voter.js +18 -0
- package/esm/types/3_connected_website.d.ts +35 -0
- package/esm/types/3_connected_website.d.ts.map +1 -0
- package/esm/types/3_connected_website.js +39 -0
- package/esm/types/3_input_media.d.ts +5 -5
- package/esm/types/3_input_media.d.ts.map +1 -1
- package/esm/types/3_poll_voter_list.d.ts +31 -0
- package/esm/types/3_poll_voter_list.d.ts.map +1 -0
- package/esm/types/3_poll_voter_list.js +28 -0
- package/esm/types/4_reply_to.d.ts +2 -2
- package/esm/types/4_reply_to.d.ts.map +1 -1
- package/esm/types/6_message_content.d.ts +2 -2
- package/esm/types/6_message_content.d.ts.map +1 -1
- package/esm/types/9_message.d.ts +8 -1
- package/esm/types/9_message.d.ts.map +1 -1
- package/esm/types/9_message.js +3 -0
- package/esm/types/B_update.d.ts +25 -10
- package/esm/types/B_update.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/3_types.d.ts +6 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +6 -0
- package/script/client/0_params.d.ts +42 -30
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +1158 -1056
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/2_client_encrypted.d.ts.map +1 -1
- package/script/client/2_client_encrypted.js +19 -12
- package/script/client/2_file_manager.js +1 -1
- package/script/client/3_account_manager.d.ts +6 -0
- package/script/client/3_account_manager.d.ts.map +1 -1
- package/script/client/3_account_manager.js +29 -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 +32 -18
- package/script/client/3_secret_chat_manager.d.ts +3 -1
- package/script/client/3_secret_chat_manager.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.js +76 -2
- package/script/client/4_chat_manager.d.ts +2 -1
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +7 -1
- package/script/client/4_context.d.ts +132 -48
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +336 -125
- package/script/client/4_poll_manager.d.ts +3 -1
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +15 -4
- package/script/client/6_client.d.ts +1158 -1056
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +1514 -1386
- package/script/client/6_client_dispatcher.d.ts +1158 -1056
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +1478 -1356
- package/script/types/0_checklist_changed.d.ts +1 -1
- package/script/types/0_checklist_changed.d.ts.map +1 -1
- package/script/types/0_location.d.ts +2 -2
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_message_viewer.d.ts +29 -0
- package/script/types/0_message_viewer.d.ts.map +1 -0
- package/script/types/0_message_viewer.js +28 -0
- package/script/types/0_secret_chat_action_type.d.ts +69 -0
- package/script/types/0_secret_chat_action_type.d.ts.map +1 -0
- package/script/types/0_secret_chat_action_type.js +49 -0
- package/script/types/1_chat_p.d.ts +1 -5
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_input_poll_media.d.ts +5 -5
- package/script/types/1_input_poll_media.d.ts.map +1 -1
- package/script/types/1_input_sticker.d.ts +1 -1
- package/script/types/1_secret_chat_action.d.ts +30 -0
- package/script/types/1_secret_chat_action.d.ts.map +1 -0
- package/script/types/1_secret_chat_action.js +31 -0
- package/script/types/1_sticker.d.ts +3 -3
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_video.d.ts +3 -3
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video_note.d.ts +3 -3
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/2_poll_voter.d.ts +13 -0
- package/script/types/2_poll_voter.d.ts.map +1 -0
- package/script/types/2_poll_voter.js +21 -0
- package/script/types/3_connected_website.d.ts +35 -0
- package/script/types/3_connected_website.d.ts.map +1 -0
- package/script/types/3_connected_website.js +42 -0
- package/script/types/3_input_media.d.ts +5 -5
- package/script/types/3_input_media.d.ts.map +1 -1
- package/script/types/3_poll_voter_list.d.ts +31 -0
- package/script/types/3_poll_voter_list.d.ts.map +1 -0
- package/script/types/3_poll_voter_list.js +31 -0
- package/script/types/4_reply_to.d.ts +2 -2
- package/script/types/4_reply_to.d.ts.map +1 -1
- package/script/types/6_message_content.d.ts +2 -2
- package/script/types/6_message_content.d.ts.map +1 -1
- package/script/types/9_message.d.ts +8 -1
- package/script/types/9_message.d.ts.map +1 -1
- package/script/types/9_message.js +3 -0
- package/script/types/B_update.d.ts +25 -10
- package/script/types/B_update.d.ts.map +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
|
-
/** A change
|
|
21
|
+
/** A change to a checklist. */
|
|
22
22
|
export interface ChecklistChanged {
|
|
23
23
|
/** The identifiers of the checked items. */
|
|
24
24
|
checkedItems: number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_checklist_changed.d.ts","sourceRoot":"","sources":["../../src/types/0_checklist_changed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"0_checklist_changed.d.ts","sourceRoot":"","sources":["../../src/types/0_checklist_changed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,4BAA4B,GAAG,gBAAgB,CAKpG"}
|
|
@@ -28,9 +28,9 @@ export interface Location {
|
|
|
28
28
|
horizontalAccuracy?: number;
|
|
29
29
|
/** The duration for which the location can be updated, in seconds. Must be in the range of 80-864,000. */
|
|
30
30
|
livePeriod?: number;
|
|
31
|
-
/** The direction which the user is moving
|
|
31
|
+
/** The direction in which the user is moving. Must be in the range of 1-350. */
|
|
32
32
|
heading?: number;
|
|
33
|
-
/** The maximum distance for proximity alerts
|
|
33
|
+
/** The maximum distance for proximity alerts when approaching another chat member, in meters. Must be in the range of 1-100,000. */
|
|
34
34
|
proximityAlertRadius?: number;
|
|
35
35
|
}
|
|
36
36
|
export declare function constructLocation(geo_: Api.messageMediaGeo | Api.messageMediaGeoLive | Api.geoPoint): Location;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_location.d.ts","sourceRoot":"","sources":["../../src/types/0_location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"0_location.d.ts","sourceRoot":"","sources":["../../src/types/0_location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oIAAoI;IACpI,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG,GAAG,CAAC,QAAQ,GAAG,QAAQ,CA0B9G"}
|
|
@@ -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
|
+
import type { Api } from "../2_tl.js";
|
|
21
|
+
/** A message's viewer. */
|
|
22
|
+
export interface MessageViewer {
|
|
23
|
+
/** The user identifier of the message viewer. */
|
|
24
|
+
userId: number;
|
|
25
|
+
/** The point in time when the message was viewed. */
|
|
26
|
+
viewedAt: number;
|
|
27
|
+
}
|
|
28
|
+
export declare function constructMessageViewer(rpd: Api.readParticipantDate): MessageViewer;
|
|
29
|
+
//# sourceMappingURL=0_message_viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_message_viewer.d.ts","sourceRoot":"","sources":["../../src/types/0_message_viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,0BAA0B;AAC1B,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,mBAAmB,GAAG,aAAa,CAKlF"}
|
|
@@ -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.constructMessageViewer = constructMessageViewer;
|
|
23
|
+
function constructMessageViewer(rpd) {
|
|
24
|
+
return {
|
|
25
|
+
userId: Number(rpd.user_id),
|
|
26
|
+
viewedAt: rpd.date,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 { SecretChats } from "../2_tl.js";
|
|
21
|
+
/** @unlisted */
|
|
22
|
+
export interface SecretSecretChatActionTypeTyping {
|
|
23
|
+
type: "typing";
|
|
24
|
+
}
|
|
25
|
+
/** @unlisted */
|
|
26
|
+
export interface SecretChatActionTypeUploadingPhoto {
|
|
27
|
+
type: "uploadingPhoto";
|
|
28
|
+
}
|
|
29
|
+
/** @unlisted */
|
|
30
|
+
export interface SecretChatActionTypeRecordingVideo {
|
|
31
|
+
type: "recordingVideo";
|
|
32
|
+
}
|
|
33
|
+
/** @unlisted */
|
|
34
|
+
export interface SecretChatActionTypeUploadingVideo {
|
|
35
|
+
type: "uploadingVideo";
|
|
36
|
+
}
|
|
37
|
+
/** @unlisted */
|
|
38
|
+
export interface SecretChatActionTypeRecordingVoice {
|
|
39
|
+
type: "recordingVoice";
|
|
40
|
+
}
|
|
41
|
+
/** @unlisted */
|
|
42
|
+
export interface SecretChatActionTypeUploadingAudio {
|
|
43
|
+
type: "uploadingAudio";
|
|
44
|
+
}
|
|
45
|
+
/** @unlisted */
|
|
46
|
+
export interface SecretChatActionTypeUploadingDocument {
|
|
47
|
+
type: "uploadingDocument";
|
|
48
|
+
}
|
|
49
|
+
/** @unlisted */
|
|
50
|
+
export interface SecretChatActionTypeChoosingLocation {
|
|
51
|
+
type: "choosingLocation";
|
|
52
|
+
}
|
|
53
|
+
/** @unlisted */
|
|
54
|
+
export interface SecretChatActionTypeRecordingVideoNote {
|
|
55
|
+
type: "recordingVideoNote";
|
|
56
|
+
}
|
|
57
|
+
/** @unlisted */
|
|
58
|
+
export interface SecretChatActionTypeUploadingTypeVideoNote {
|
|
59
|
+
type: "uploadingVideoNote";
|
|
60
|
+
progress?: number;
|
|
61
|
+
}
|
|
62
|
+
/** @unlisted */
|
|
63
|
+
export interface SecretChatActionTypeCancel {
|
|
64
|
+
type: "cancel";
|
|
65
|
+
}
|
|
66
|
+
/** A type of a secret chat action. */
|
|
67
|
+
export type SecretChatActionType = SecretSecretChatActionTypeTyping | SecretChatActionTypeUploadingPhoto | SecretChatActionTypeRecordingVideo | SecretChatActionTypeUploadingVideo | SecretChatActionTypeRecordingVoice | SecretChatActionTypeUploadingAudio | SecretChatActionTypeUploadingDocument | SecretChatActionTypeChoosingLocation | SecretChatActionTypeRecordingVideoNote | SecretChatActionTypeUploadingTypeVideoNote | SecretChatActionTypeCancel;
|
|
68
|
+
export declare function constructSecretChatActionType(action: SecretChats.SendMessageAction): SecretChatActionType | null;
|
|
69
|
+
//# sourceMappingURL=0_secret_chat_action_type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_secret_chat_action_type.d.ts","sourceRoot":"","sources":["../../src/types/0_secret_chat_action_type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,gBAAgB;AAChB,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,gBAAgB;AAChB,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,gBAAgB;AAChB,MAAM,WAAW,0CAA0C;IACzD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,sCAAsC;AACtC,MAAM,MAAM,oBAAoB,GAC5B,gCAAgC,GAChC,kCAAkC,GAClC,kCAAkC,GAClC,kCAAkC,GAClC,kCAAkC,GAClC,kCAAkC,GAClC,qCAAqC,GACrC,oCAAoC,GACpC,sCAAsC,GACtC,0CAA0C,GAC1C,0BAA0B,CAAC;AAE/B,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,WAAW,CAAC,iBAAiB,GAAG,oBAAoB,GAAG,IAAI,CA2BhH"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.constructSecretChatActionType = constructSecretChatActionType;
|
|
23
|
+
function constructSecretChatActionType(action) {
|
|
24
|
+
switch (action._) {
|
|
25
|
+
case "sendMessageTypingAction":
|
|
26
|
+
return { type: "typing" };
|
|
27
|
+
case "sendMessageCancelAction":
|
|
28
|
+
return { type: "cancel" };
|
|
29
|
+
case "sendMessageRecordVideoAction":
|
|
30
|
+
return { type: "recordingVideoNote" };
|
|
31
|
+
case "sendMessageUploadVideoAction":
|
|
32
|
+
return { type: "uploadingVideo" };
|
|
33
|
+
case "sendMessageRecordAudioAction":
|
|
34
|
+
return { type: "recordingVoice" };
|
|
35
|
+
case "sendMessageUploadAudioAction":
|
|
36
|
+
return { type: "uploadingAudio" };
|
|
37
|
+
case "sendMessageUploadPhotoAction":
|
|
38
|
+
return { type: "uploadingPhoto" };
|
|
39
|
+
case "sendMessageUploadDocumentAction":
|
|
40
|
+
return { type: "uploadingDocument" };
|
|
41
|
+
case "sendMessageGeoLocationAction":
|
|
42
|
+
return { type: "choosingLocation" };
|
|
43
|
+
case "sendMessageRecordRoundAction":
|
|
44
|
+
return { type: "recordingVideoNote" };
|
|
45
|
+
case "sendMessageUploadRoundAction":
|
|
46
|
+
return { type: "uploadingVideoNote" };
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
@@ -23,13 +23,9 @@ import { type EmojiStatus } from "./0_emoji_status.js";
|
|
|
23
23
|
import { type RestrictionReason } from "./0_restriction_reason.js";
|
|
24
24
|
import { type UserStatus } from "./0_user_status.js";
|
|
25
25
|
/** @unlisted */
|
|
26
|
-
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
27
|
-
/** @unlisted */
|
|
28
26
|
export interface _ChatPBase {
|
|
29
27
|
/** The identifier of the chat. */
|
|
30
28
|
id: number;
|
|
31
|
-
/** The type of the chat. */
|
|
32
|
-
type: ChatType;
|
|
33
29
|
/** Identifier of a color that can be displayed instead of the chat's photo. */
|
|
34
30
|
color: number;
|
|
35
31
|
/** The chat's photo. */
|
|
@@ -128,7 +124,7 @@ export interface ChatPSupergroup extends ChatPChannelBase {
|
|
|
128
124
|
/** Whether the chat is a channel's direct messages. */
|
|
129
125
|
isDirectMessagesChat: boolean;
|
|
130
126
|
}
|
|
131
|
-
/** A chat
|
|
127
|
+
/** A partial chat. */
|
|
132
128
|
export type ChatP = ChatPPrivate | ChatPGroup | ChatPSupergroup | ChatPChannel;
|
|
133
129
|
export declare function constructChatP(chat: Api.user): ChatPPrivate;
|
|
134
130
|
export declare function constructChatP(chat: Api.chat | Api.chatForbidden): ChatPGroup;
|
|
@@ -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;AACjC,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,gBAAgB;AAChB,MAAM,
|
|
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;AACjC,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAwB,K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
|
23
23
|
/** The file name to assign if applicable. */
|
|
24
24
|
fileName?: string;
|
|
25
|
-
/** The
|
|
25
|
+
/** The MIME type to assign if applicable. */
|
|
26
26
|
mimeType?: string;
|
|
27
27
|
/** Size of each upload chunk in bytes. */
|
|
28
28
|
chunkSize?: number;
|
|
@@ -43,7 +43,7 @@ export interface InputPollMediaAnimation extends _InputPollOptionMediaCommon {
|
|
|
43
43
|
/** The height of the animation file. */
|
|
44
44
|
height?: number;
|
|
45
45
|
/** Whether to mark the media as a spoiler. */
|
|
46
|
-
|
|
46
|
+
isSpoiler?: boolean;
|
|
47
47
|
}
|
|
48
48
|
/** @unlisted */
|
|
49
49
|
export interface InputPollMediaPhoto extends _InputPollOptionMediaCommon {
|
|
@@ -55,7 +55,7 @@ export interface InputPollMediaPhoto extends _InputPollOptionMediaCommon {
|
|
|
55
55
|
/** The height of the photo in pixels. */
|
|
56
56
|
height?: number;
|
|
57
57
|
/** Whether to mark the media as a spoiler. */
|
|
58
|
-
|
|
58
|
+
isSpoiler?: boolean;
|
|
59
59
|
}
|
|
60
60
|
/** @unlisted */
|
|
61
61
|
export interface InputPollMediaVideo extends _InputPollOptionMediaCommon {
|
|
@@ -71,9 +71,9 @@ export interface InputPollMediaVideo extends _InputPollOptionMediaCommon {
|
|
|
71
71
|
/** The height of the video in pixels. */
|
|
72
72
|
height?: number;
|
|
73
73
|
/** Whether the video is suitable for streaming. */
|
|
74
|
-
|
|
74
|
+
isStreamingSupported?: boolean;
|
|
75
75
|
/** Whether to mark the media as a spoiler. */
|
|
76
|
-
|
|
76
|
+
isSpoiler?: boolean;
|
|
77
77
|
}
|
|
78
78
|
/** @unlisted */
|
|
79
79
|
export interface InputPollMediaSticker extends _InputPollOptionMediaCommon {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_input_poll_media.d.ts","sourceRoot":"","sources":["../../src/types/1_input_poll_media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,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AI,EAAE,OAAO,CAAC;IACd,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2IAA2I;IAC3I,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,gBAAgB;AAChB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,2BAA2B;IAC1E,IAAI,EAAE,WAAW,CAAC;IAClB,iBAAiB;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,sCAAsC;IACtC,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iCAAiC;AACjC,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC"}
|
|
@@ -28,7 +28,7 @@ export interface InputSticker {
|
|
|
28
28
|
fileName?: string;
|
|
29
29
|
/** The file's size. */
|
|
30
30
|
fileSize?: number;
|
|
31
|
-
/** The
|
|
31
|
+
/** The MIME type to assign if applicable. */
|
|
32
32
|
mimeType?: string;
|
|
33
33
|
/** Size of each upload chunk in bytes. */
|
|
34
34
|
chunkSize?: number;
|
|
@@ -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 { SecretChats } from "../2_tl.js";
|
|
21
|
+
import type { ChatActionType } from "./0_chat_action_type.js";
|
|
22
|
+
/** A sign of a possible action by a member of a secret chat. */
|
|
23
|
+
export interface SecretChatAction {
|
|
24
|
+
/** The type of the action. */
|
|
25
|
+
type: ChatActionType;
|
|
26
|
+
/** The identifier of the secret chat that the chat action belongs to. */
|
|
27
|
+
chatId: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function constructSecretChatAction(chatId: number, update: SecretChats.decryptedMessageActionTyping): SecretChatAction | null;
|
|
30
|
+
//# sourceMappingURL=1_secret_chat_action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1_secret_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_secret_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,4BAA4B,GAAG,gBAAgB,GAAG,IAAI,CAOnI"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.constructSecretChatAction = constructSecretChatAction;
|
|
23
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
+
const _0_secret_chat_action_type_js_1 = require("./0_secret_chat_action_type.js");
|
|
25
|
+
function constructSecretChatAction(chatId, update) {
|
|
26
|
+
const type = (0, _0_secret_chat_action_type_js_1.constructSecretChatActionType)(update.action);
|
|
27
|
+
if (type === null) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return (0, _1_utilities_js_1.cleanObject)({ type, chatId });
|
|
31
|
+
}
|
|
@@ -43,13 +43,13 @@ export interface Sticker {
|
|
|
43
43
|
emoji?: string;
|
|
44
44
|
/** Name of the sticker set where the sticker belongs. */
|
|
45
45
|
setName?: string;
|
|
46
|
-
/** For mask stickers, the position where the mask should be placed */
|
|
46
|
+
/** For mask stickers, the position where the mask should be placed. */
|
|
47
47
|
maskPosition?: MaskPosition;
|
|
48
|
-
/** For custom emoji stickers, unique identifier of the custom emoji */
|
|
48
|
+
/** For custom emoji stickers, unique identifier of the custom emoji. */
|
|
49
49
|
customEmojiId?: string;
|
|
50
50
|
/** Whether the sticker needs repainting. */
|
|
51
51
|
isRepaintingNeeded?: boolean;
|
|
52
|
-
/** File size in bytes */
|
|
52
|
+
/** File size in bytes. */
|
|
53
53
|
fileSize?: number;
|
|
54
54
|
}
|
|
55
55
|
/** @unlisted */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,iBAAiB;AACjB,MAAM,WAAW,OAAO;IACtB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,gMAAgM;IAChM,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IACzC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAA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E;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,MAAM,oBAAoB,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,KAAK,YAAY,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAEhH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,SAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAKlL;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,SAAK,GAAG,OAAO,CAsBxJ;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,qCAAqC,GAAG,WAAW,CAAC,+BAA+B,GAAG,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAkBtO"}
|
|
@@ -29,11 +29,11 @@ export interface Video {
|
|
|
29
29
|
width: number;
|
|
30
30
|
/** Video height as defined by its sender. */
|
|
31
31
|
height: number;
|
|
32
|
-
/** Duration of the video in seconds as defined by sender */
|
|
32
|
+
/** Duration of the video in seconds as defined by sender. */
|
|
33
33
|
duration: number;
|
|
34
|
-
/**
|
|
34
|
+
/** The video's thumbnails. */
|
|
35
35
|
thumbnails: Thumbnail[];
|
|
36
|
-
/** Original filename as defined by sender */
|
|
36
|
+
/** Original filename as defined by sender. */
|
|
37
37
|
fileName?: string;
|
|
38
38
|
/** MIME type of the file. */
|
|
39
39
|
mimeType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAY5K"}
|
|
@@ -27,11 +27,11 @@ export interface VideoNote {
|
|
|
27
27
|
fileUniqueId: string;
|
|
28
28
|
/** Video width and height (diameter of the video message) as defined by its sender. */
|
|
29
29
|
length: number;
|
|
30
|
-
/** Duration of the video in seconds as defined by sender */
|
|
30
|
+
/** Duration of the video in seconds as defined by sender. */
|
|
31
31
|
duration: number;
|
|
32
|
-
/**
|
|
32
|
+
/** The video note's thumbnails. */
|
|
33
33
|
thumbnails: Thumbnail[];
|
|
34
|
-
/** Original filename as defined by sender */
|
|
34
|
+
/** Original filename as defined by sender. */
|
|
35
35
|
fileName?: string;
|
|
36
36
|
/** Size of the file in bytes. */
|
|
37
37
|
fileSize: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAStJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Api } from "../2_tl.js";
|
|
2
|
+
import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
3
|
+
/** A poll voter. */
|
|
4
|
+
export interface PollVoter {
|
|
5
|
+
/** The voter chat. */
|
|
6
|
+
voter: ChatP;
|
|
7
|
+
/** The indexes of the cast options. */
|
|
8
|
+
optionIndexes: number[];
|
|
9
|
+
/** The point in time when the vote was cast. */
|
|
10
|
+
votedAt: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function constructPollVoter(mpv: Api.MessagePeerVote, getPeer: PeerGetter): PollVoter;
|
|
13
|
+
//# sourceMappingURL=2_poll_voter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2_poll_voter.d.ts","sourceRoot":"","sources":["../../src/types/2_poll_voter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,sBAAsB;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,uCAAuC;IACvC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,CAe3F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructPollVoter = constructPollVoter;
|
|
4
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
5
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
6
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
7
|
+
function constructPollVoter(mpv, getPeer) {
|
|
8
|
+
if (_2_tl_js_1.Api.is("messagePeerVoteInputOption", mpv)) {
|
|
9
|
+
(0, _0_deps_js_1.unreachable)();
|
|
10
|
+
}
|
|
11
|
+
const peer = getPeer(mpv.peer);
|
|
12
|
+
if (peer === null) {
|
|
13
|
+
(0, _0_deps_js_1.unreachable)();
|
|
14
|
+
}
|
|
15
|
+
const options = _2_tl_js_1.Api.is("messagePeerVote", mpv) ? [mpv.option] : mpv.options;
|
|
16
|
+
return {
|
|
17
|
+
voter: peer[0],
|
|
18
|
+
optionIndexes: options.map(_1_utilities_js_1.decodeText).map(Number),
|
|
19
|
+
votedAt: mpv.date,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type User } from "./2_user.js";
|
|
23
|
+
export interface ConnectedWebsite {
|
|
24
|
+
id: string;
|
|
25
|
+
bot: User;
|
|
26
|
+
domain: string;
|
|
27
|
+
browser: string;
|
|
28
|
+
platform: string;
|
|
29
|
+
createdAt: number;
|
|
30
|
+
lastActiveAt: number;
|
|
31
|
+
ipAddress: string;
|
|
32
|
+
ipAddressRegion: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function constructConnectedWebsite(wa: Api.WebAuthorization, getPeer: PeerGetter): ConnectedWebsite;
|
|
35
|
+
//# sourceMappingURL=3_connected_website.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_connected_website.d.ts","sourceRoot":"","sources":["../../src/types/3_connected_website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,GAAG,CAAC,gBAAgB,EAAE,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAiBzG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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.constructConnectedWebsite = constructConnectedWebsite;
|
|
23
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
25
|
+
function constructConnectedWebsite(wa, getPeer) {
|
|
26
|
+
const peer = getPeer({ _: "peerUser", user_id: wa.bot_id });
|
|
27
|
+
if (peer === null || peer[0].type !== "private") {
|
|
28
|
+
(0, _0_deps_js_1.unreachable)();
|
|
29
|
+
}
|
|
30
|
+
const bot = (0, _2_user_js_1.constructUser2)(peer[0]);
|
|
31
|
+
return {
|
|
32
|
+
id: String(wa.hash),
|
|
33
|
+
bot,
|
|
34
|
+
domain: wa.domain,
|
|
35
|
+
browser: wa.browser,
|
|
36
|
+
platform: wa.platform,
|
|
37
|
+
createdAt: wa.date_created,
|
|
38
|
+
lastActiveAt: wa.date_active,
|
|
39
|
+
ipAddress: wa.ip,
|
|
40
|
+
ipAddressRegion: wa.region,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -25,7 +25,7 @@ import type { MessageEntity } from "./2_message_entity.js";
|
|
|
25
25
|
export interface _InputMediaCommon {
|
|
26
26
|
/** The file name to assign if applicable. */
|
|
27
27
|
fileName?: string;
|
|
28
|
-
/** The
|
|
28
|
+
/** The MIME type to assign if applicable. */
|
|
29
29
|
mimeType?: string;
|
|
30
30
|
/** Size of each upload chunk in bytes. */
|
|
31
31
|
chunkSize?: number;
|
|
@@ -52,7 +52,7 @@ export interface InputMediaAnimation extends _InputMediaCommon {
|
|
|
52
52
|
/** The height of the animation file. */
|
|
53
53
|
height?: number;
|
|
54
54
|
/** Whether to mark the media as a spoiler. */
|
|
55
|
-
|
|
55
|
+
isSpoiler?: boolean;
|
|
56
56
|
}
|
|
57
57
|
/** @unlisted */
|
|
58
58
|
export interface InputMediaAudio extends _InputMediaCommon {
|
|
@@ -86,7 +86,7 @@ export interface InputMediaPhoto extends _InputMediaCommon {
|
|
|
86
86
|
/** The height of the photo in pixels. */
|
|
87
87
|
height?: number;
|
|
88
88
|
/** Whether to mark the media as a spoiler. */
|
|
89
|
-
|
|
89
|
+
isSpoiler?: boolean;
|
|
90
90
|
selfDestruct?: SelfDestructOption;
|
|
91
91
|
}
|
|
92
92
|
/** @unlisted */
|
|
@@ -103,9 +103,9 @@ export interface InputMediaVideo extends _InputMediaCommon {
|
|
|
103
103
|
/** The height of the video in pixels. */
|
|
104
104
|
height?: number;
|
|
105
105
|
/** Whether the video is suitable for streaming. */
|
|
106
|
-
|
|
106
|
+
isStreamingSupported?: boolean;
|
|
107
107
|
/** Whether to mark the media as a spoiler. */
|
|
108
|
-
|
|
108
|
+
isSpoiler?: boolean;
|
|
109
109
|
selfDestruct?: SelfDestructOption;
|
|
110
110
|
}
|
|
111
111
|
/** An input media. */
|