@mtkruto/node 0.148.0 → 0.150.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 +3 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +3 -0
- package/esm/client/0_params.d.ts +8 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +1 -1
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +20 -2
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/3_filters.d.ts.map +1 -1
- package/esm/client/3_filters.js +4 -1
- package/esm/client/3_message_manager.d.ts +4 -2
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +84 -1
- package/esm/client/6_client.d.ts +20 -2
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +22 -0
- package/esm/client/6_client_dispatcher.d.ts +20 -2
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +22 -0
- package/esm/tl/1_telegram_api.d.ts +120 -29
- package/esm/tl/1_telegram_api.d.ts.map +1 -1
- package/esm/tl/1_telegram_api.js +124 -26
- package/esm/types/2_message_entity.d.ts +16 -0
- package/esm/types/2_message_entity.d.ts.map +1 -1
- package/esm/types/2_message_entity.js +51 -45
- package/esm/types/3_rich_text_component.d.ts +268 -0
- package/esm/types/3_rich_text_component.d.ts.map +1 -0
- package/esm/types/3_rich_text_component.js +161 -0
- package/esm/types/4_page_block.d.ts +479 -0
- package/esm/types/4_page_block.d.ts.map +1 -0
- package/esm/types/4_page_block.js +552 -0
- package/esm/types/5_input_rich_text.d.ts +38 -0
- package/esm/types/5_input_rich_text.d.ts.map +1 -0
- package/esm/types/5_input_rich_text.js +20 -0
- package/esm/types/6_message.d.ts +20 -1
- package/esm/types/6_message.d.ts.map +1 -1
- package/esm/types/6_message.js +26 -0
- package/package.json +1 -1
- package/script/3_types.d.ts +3 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +3 -0
- package/script/client/0_params.d.ts +8 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +1 -1
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +20 -2
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/3_filters.d.ts.map +1 -1
- package/script/client/3_filters.js +4 -1
- package/script/client/3_message_manager.d.ts +4 -2
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +83 -0
- package/script/client/6_client.d.ts +20 -2
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +22 -0
- package/script/client/6_client_dispatcher.d.ts +20 -2
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +22 -0
- package/script/tl/1_telegram_api.d.ts +120 -29
- package/script/tl/1_telegram_api.d.ts.map +1 -1
- package/script/tl/1_telegram_api.js +124 -26
- package/script/types/2_message_entity.d.ts +16 -0
- package/script/types/2_message_entity.d.ts.map +1 -1
- package/script/types/2_message_entity.js +53 -45
- package/script/types/3_rich_text_component.d.ts +268 -0
- package/script/types/3_rich_text_component.d.ts.map +1 -0
- package/script/types/3_rich_text_component.js +165 -0
- package/script/types/4_page_block.d.ts +479 -0
- package/script/types/4_page_block.d.ts.map +1 -0
- package/script/types/4_page_block.js +569 -0
- package/script/types/5_input_rich_text.d.ts +38 -0
- package/script/types/5_input_rich_text.d.ts.map +1 -0
- package/script/types/5_input_rich_text.js +21 -0
- package/script/types/6_message.d.ts +20 -1
- package/script/types/6_message.d.ts.map +1 -1
- package/script/types/6_message.js +26 -0
package/esm/tl/1_telegram_api.js
CHANGED
|
@@ -32,10 +32,60 @@ export const schema = Object.freeze({
|
|
|
32
32
|
],
|
|
33
33
|
"Error",
|
|
34
34
|
],
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
[
|
|
38
|
-
|
|
35
|
+
ipPort: [
|
|
36
|
+
0xD433AD73,
|
|
37
|
+
[
|
|
38
|
+
["ipv4", "int"],
|
|
39
|
+
["port", "int"],
|
|
40
|
+
],
|
|
41
|
+
"IpPort",
|
|
42
|
+
],
|
|
43
|
+
ipPortSecret: [
|
|
44
|
+
0x37982646,
|
|
45
|
+
[
|
|
46
|
+
["ipv4", "int"],
|
|
47
|
+
["port", "int"],
|
|
48
|
+
["secret", "bytes"],
|
|
49
|
+
],
|
|
50
|
+
"IpPort",
|
|
51
|
+
],
|
|
52
|
+
accessPointRule: [
|
|
53
|
+
0x4679B65F,
|
|
54
|
+
[
|
|
55
|
+
["phone_prefix_rules", "string"],
|
|
56
|
+
["dc_id", "int"],
|
|
57
|
+
["ips", "vector<IpPort>"],
|
|
58
|
+
],
|
|
59
|
+
"AccessPointRule",
|
|
60
|
+
],
|
|
61
|
+
"help.configSimple": [
|
|
62
|
+
0x5A592A6C,
|
|
63
|
+
[
|
|
64
|
+
["date", "int"],
|
|
65
|
+
["expires", "int"],
|
|
66
|
+
["rules", "vector<AccessPointRule>"],
|
|
67
|
+
],
|
|
68
|
+
"help.ConfigSimple",
|
|
69
|
+
],
|
|
70
|
+
inputPeerPhotoFileLocationLegacy: [
|
|
71
|
+
0x27D69997,
|
|
72
|
+
[
|
|
73
|
+
["flags", "#"],
|
|
74
|
+
["big", "flags.0?true"],
|
|
75
|
+
["peer", "InputPeer"],
|
|
76
|
+
["volume_id", "long"],
|
|
77
|
+
["local_id", "int"],
|
|
78
|
+
],
|
|
79
|
+
"InputFileLocation",
|
|
80
|
+
],
|
|
81
|
+
inputStickerSetThumbLegacy: [
|
|
82
|
+
0x0DBAEAE9,
|
|
83
|
+
[
|
|
84
|
+
["stickerset", "InputStickerSet"],
|
|
85
|
+
["volume_id", "long"],
|
|
86
|
+
["local_id", "int"],
|
|
87
|
+
],
|
|
88
|
+
"InputFileLocation",
|
|
39
89
|
],
|
|
40
90
|
inputPeerEmpty: [
|
|
41
91
|
0x7F3B18EA,
|
|
@@ -10181,7 +10231,6 @@ export const schema = Object.freeze({
|
|
|
10181
10231
|
["reply_to_scheduled", "flags.2?true"],
|
|
10182
10232
|
["forum_topic", "flags.3?true"],
|
|
10183
10233
|
["quote", "flags.9?true"],
|
|
10184
|
-
["reply_to_ephemeral", "flags.13?true"],
|
|
10185
10234
|
["reply_to_msg_id", "flags.4?int"],
|
|
10186
10235
|
["reply_to_peer_id", "flags.0?Peer"],
|
|
10187
10236
|
["reply_from", "flags.5?MessageFwdHeader"],
|
|
@@ -14760,17 +14809,21 @@ export const schema = Object.freeze({
|
|
|
14760
14809
|
],
|
|
14761
14810
|
"account.WebBrowserSettings",
|
|
14762
14811
|
],
|
|
14763
|
-
|
|
14764
|
-
|
|
14812
|
+
inputRichFilePhoto: [
|
|
14813
|
+
0x9B00622B,
|
|
14765
14814
|
[
|
|
14766
|
-
["
|
|
14767
|
-
["
|
|
14768
|
-
["part", "flags.1?true"],
|
|
14769
|
-
["blocks", "Vector<PageBlock>"],
|
|
14770
|
-
["photos", "Vector<Photo>"],
|
|
14771
|
-
["documents", "Vector<Document>"],
|
|
14815
|
+
["id", "string"],
|
|
14816
|
+
["photo", "InputPhoto"],
|
|
14772
14817
|
],
|
|
14773
|
-
"
|
|
14818
|
+
"InputRichFile",
|
|
14819
|
+
],
|
|
14820
|
+
inputRichFileDocument: [
|
|
14821
|
+
0x83281DBD,
|
|
14822
|
+
[
|
|
14823
|
+
["id", "string"],
|
|
14824
|
+
["document", "InputDocument"],
|
|
14825
|
+
],
|
|
14826
|
+
"InputRichFile",
|
|
14774
14827
|
],
|
|
14775
14828
|
inputRichMessage: [
|
|
14776
14829
|
0xE4C449FC,
|
|
@@ -14786,31 +14839,69 @@ export const schema = Object.freeze({
|
|
|
14786
14839
|
"InputRichMessage",
|
|
14787
14840
|
],
|
|
14788
14841
|
inputRichMessageHTML: [
|
|
14789
|
-
|
|
14842
|
+
0xDACB836A,
|
|
14790
14843
|
[
|
|
14791
14844
|
["flags", "#"],
|
|
14792
14845
|
["rtl", "flags.0?true"],
|
|
14793
14846
|
["noautolink", "flags.1?true"],
|
|
14794
14847
|
["html", "string"],
|
|
14795
|
-
["
|
|
14796
|
-
["documents", "flags.3?Vector<InputDocument>"],
|
|
14797
|
-
["users", "flags.4?Vector<InputUser>"],
|
|
14848
|
+
["files", "flags.2?Vector<InputRichFile>"],
|
|
14798
14849
|
],
|
|
14799
14850
|
"InputRichMessage",
|
|
14800
14851
|
],
|
|
14801
14852
|
inputRichMessageMarkdown: [
|
|
14802
|
-
|
|
14853
|
+
0x004B572C,
|
|
14803
14854
|
[
|
|
14804
14855
|
["flags", "#"],
|
|
14805
14856
|
["rtl", "flags.0?true"],
|
|
14806
14857
|
["noautolink", "flags.1?true"],
|
|
14807
14858
|
["markdown", "string"],
|
|
14808
|
-
["
|
|
14809
|
-
["documents", "flags.3?Vector<InputDocument>"],
|
|
14810
|
-
["users", "flags.4?Vector<InputUser>"],
|
|
14859
|
+
["files", "flags.2?Vector<InputRichFile>"],
|
|
14811
14860
|
],
|
|
14812
14861
|
"InputRichMessage",
|
|
14813
14862
|
],
|
|
14863
|
+
richMessage: [
|
|
14864
|
+
0xBAF39D8B,
|
|
14865
|
+
[
|
|
14866
|
+
["flags", "#"],
|
|
14867
|
+
["rtl", "flags.0?true"],
|
|
14868
|
+
["part", "flags.1?true"],
|
|
14869
|
+
["blocks", "Vector<PageBlock>"],
|
|
14870
|
+
["photos", "Vector<Photo>"],
|
|
14871
|
+
["documents", "Vector<Document>"],
|
|
14872
|
+
],
|
|
14873
|
+
"RichMessage",
|
|
14874
|
+
],
|
|
14875
|
+
invokeWithBusinessConnectionPrefix: [
|
|
14876
|
+
0xDD289F8E,
|
|
14877
|
+
[
|
|
14878
|
+
["connection_id", "string"],
|
|
14879
|
+
],
|
|
14880
|
+
"Error",
|
|
14881
|
+
],
|
|
14882
|
+
invokeWithGooglePlayIntegrityPrefix: [
|
|
14883
|
+
0x1DF92984,
|
|
14884
|
+
[
|
|
14885
|
+
["nonce", "string"],
|
|
14886
|
+
["token", "string"],
|
|
14887
|
+
],
|
|
14888
|
+
"Error",
|
|
14889
|
+
],
|
|
14890
|
+
invokeWithApnsSecretPrefix: [
|
|
14891
|
+
0x0DAE54F8,
|
|
14892
|
+
[
|
|
14893
|
+
["nonce", "string"],
|
|
14894
|
+
["secret", "string"],
|
|
14895
|
+
],
|
|
14896
|
+
"Error",
|
|
14897
|
+
],
|
|
14898
|
+
invokeWithReCaptchaPrefix: [
|
|
14899
|
+
0xADBB0F94,
|
|
14900
|
+
[
|
|
14901
|
+
["token", "string"],
|
|
14902
|
+
],
|
|
14903
|
+
"Error",
|
|
14904
|
+
],
|
|
14814
14905
|
invokeAfterMsg: [
|
|
14815
14906
|
0xCB9F372D,
|
|
14816
14907
|
[
|
|
@@ -21736,7 +21827,12 @@ export const schema = Object.freeze({
|
|
|
21736
21827
|
identifierToName: {
|
|
21737
21828
|
[0x3FEDD339]: "true",
|
|
21738
21829
|
[0xC4B9F9BB]: "error",
|
|
21739
|
-
[
|
|
21830
|
+
[0xD433AD73]: "ipPort",
|
|
21831
|
+
[0x37982646]: "ipPortSecret",
|
|
21832
|
+
[0x4679B65F]: "accessPointRule",
|
|
21833
|
+
[0x5A592A6C]: "help.configSimple",
|
|
21834
|
+
[0x27D69997]: "inputPeerPhotoFileLocationLegacy",
|
|
21835
|
+
[0x0DBAEAE9]: "inputStickerSetThumbLegacy",
|
|
21740
21836
|
[0x7F3B18EA]: "inputPeerEmpty",
|
|
21741
21837
|
[0x7DA07EC9]: "inputPeerSelf",
|
|
21742
21838
|
[0x35A95CB9]: "inputPeerChat",
|
|
@@ -23345,10 +23441,12 @@ export const schema = Object.freeze({
|
|
|
23345
23441
|
[0x933CA597]: "webDomainException",
|
|
23346
23442
|
[0xC31C8F4E]: "account.webBrowserSettingsNotModified",
|
|
23347
23443
|
[0x79EB8CB3]: "account.webBrowserSettings",
|
|
23348
|
-
[
|
|
23444
|
+
[0x9B00622B]: "inputRichFilePhoto",
|
|
23445
|
+
[0x83281DBD]: "inputRichFileDocument",
|
|
23349
23446
|
[0xE4C449FC]: "inputRichMessage",
|
|
23350
|
-
[
|
|
23351
|
-
[
|
|
23447
|
+
[0xDACB836A]: "inputRichMessageHTML",
|
|
23448
|
+
[0x004B572C]: "inputRichMessageMarkdown",
|
|
23449
|
+
[0xBAF39D8B]: "richMessage",
|
|
23352
23450
|
},
|
|
23353
23451
|
});
|
|
23354
23452
|
export const LAYER = 227;
|
|
@@ -122,6 +122,22 @@ export interface MessageEntityDateTime extends _MessageEntityBase {
|
|
|
122
122
|
}
|
|
123
123
|
/** A single entity of a message's text or caption. */
|
|
124
124
|
export type MessageEntity = MessageEntityMention | MessageEntityHashtag | MessageEntityBotCommand | MessageEntityURL | MessageEntityEmailAddress | MessageEntityBold | MessageEntityItalic | MessageEntityCode | MessageEntityPre | MessageEntityTextLink | MessageEntityTextMention | MessageEntityCashtag | MessageEntityPhoneNumber | MessageEntityUnderline | MessageEntityStrikethrough | MessageEntityBlockquote | MessageEntityBankCard | MessageEntitySpoiler | MessageEntityCustomEmoji | MessageEntityDateTime;
|
|
125
|
+
export declare function constructDateTimeFormat(obj: {
|
|
126
|
+
relative?: true;
|
|
127
|
+
day_of_week?: true;
|
|
128
|
+
short_date?: true;
|
|
129
|
+
long_date?: true;
|
|
130
|
+
short_time?: true;
|
|
131
|
+
long_time?: true;
|
|
132
|
+
}): string;
|
|
133
|
+
export declare function timeFormatToTlObject(format: string, obj: {
|
|
134
|
+
relative?: true;
|
|
135
|
+
day_of_week?: true;
|
|
136
|
+
short_date?: true;
|
|
137
|
+
long_date?: true;
|
|
138
|
+
short_time?: true;
|
|
139
|
+
long_time?: true;
|
|
140
|
+
}): void;
|
|
125
141
|
export declare function constructMessageEntity(obj: Api.MessageEntity): MessageEntity | null;
|
|
126
142
|
export declare function messageEntityToTlObject(entity: MessageEntity, getPeer: PeerGetter): Api.MessageEntity;
|
|
127
143
|
export declare function sortMessageEntities(entities: MessageEntity[]): MessageEntity[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_message_entity.d.ts","sourceRoot":"","sources":["../../src/types/2_message_entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,KAAK,GACL,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,GACL,UAAU,GACV,aAAa,GACb,SAAS,GACT,aAAa,GACb,WAAW,GACX,eAAe,GACf,YAAY,GACZ,UAAU,GACV,SAAS,GACT,aAAa,GACb,UAAU,CAAC;AAEf,gBAAgB;AAChB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,IAAI,EAAE,KAAK,CAAC;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,IAAI,EAAE,OAAO,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,IAAI,EAAE,MAAM,CAAC;CAC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Q,kBAAkB;IAC9D,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAClE,IAAI,EAAE,aAAa,CAAC;IACpB,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,IAAI,EAAE,UAAU,CAAC;IACjB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,sDAAsD;AACtD,MAAM,MAAM,aAAa,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,uBAAuB,GACvB,gBAAgB,GAChB,yBAAyB,GACzB,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,qBAAqB,GACrB,wBAAwB,GACxB,oBAAoB,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,0BAA0B,GAC1B,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,wBAAwB,GACxB,qBAAqB,CAAC;AAE1B,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,aAAa,GAAG,aAAa,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"2_message_entity.d.ts","sourceRoot":"","sources":["../../src/types/2_message_entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,KAAK,GACL,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,GACL,UAAU,GACV,aAAa,GACb,SAAS,GACT,aAAa,GACb,WAAW,GACX,eAAe,GACf,Y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iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,qBAAqB,GACrB,wBAAwB,GACxB,oBAAoB,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,0BAA0B,GAC1B,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,wBAAwB,GACxB,qBAAqB,CAAC;AAE1B,wBAAgB,uBAAuB,CAAC,GAAG,EAAE;IAC3C,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,GAAG,MAAM,CAmBT;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE;IACxD,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,QAyBA;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,aAAa,GAAG,aAAa,GAAG,IAAI,CAoDnF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,GAAG,CAAC,aAAa,CAsErG;AAwBD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAY9E"}
|
|
@@ -20,6 +20,55 @@
|
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject } from "../1_utilities.js";
|
|
22
22
|
import { Api } from "../2_tl.js";
|
|
23
|
+
export function constructDateTimeFormat(obj) {
|
|
24
|
+
let format = "";
|
|
25
|
+
if (obj.relative) {
|
|
26
|
+
format += "r";
|
|
27
|
+
}
|
|
28
|
+
if (obj.day_of_week) {
|
|
29
|
+
format += "w";
|
|
30
|
+
}
|
|
31
|
+
if (obj.short_date) {
|
|
32
|
+
format += "d";
|
|
33
|
+
}
|
|
34
|
+
else if (obj.long_date) {
|
|
35
|
+
format += "D";
|
|
36
|
+
}
|
|
37
|
+
if (obj.short_time) {
|
|
38
|
+
format += "t";
|
|
39
|
+
}
|
|
40
|
+
else if (obj.long_time) {
|
|
41
|
+
format += "T";
|
|
42
|
+
}
|
|
43
|
+
return format;
|
|
44
|
+
}
|
|
45
|
+
export function timeFormatToTlObject(format, obj) {
|
|
46
|
+
if (format === "r" || format === "R") {
|
|
47
|
+
obj.relative = true;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
for (const character of format) {
|
|
51
|
+
switch (character) {
|
|
52
|
+
case "t":
|
|
53
|
+
obj.short_time = true;
|
|
54
|
+
break;
|
|
55
|
+
case "T":
|
|
56
|
+
obj.long_time = true;
|
|
57
|
+
break;
|
|
58
|
+
case "d":
|
|
59
|
+
obj.short_date = true;
|
|
60
|
+
break;
|
|
61
|
+
case "D":
|
|
62
|
+
obj.long_date = true;
|
|
63
|
+
break;
|
|
64
|
+
case "w":
|
|
65
|
+
case "W":
|
|
66
|
+
obj.day_of_week = true;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
23
72
|
export function constructMessageEntity(obj) {
|
|
24
73
|
if (Api.is("messageEntityMention", obj)) {
|
|
25
74
|
return { type: "mention", offset: obj.offset, length: obj.length };
|
|
@@ -79,30 +128,11 @@ export function constructMessageEntity(obj) {
|
|
|
79
128
|
return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.document_id) };
|
|
80
129
|
}
|
|
81
130
|
else if (Api.is("messageEntityFormattedDate", obj)) {
|
|
82
|
-
let format = "";
|
|
83
|
-
if (obj.relative) {
|
|
84
|
-
format += "r";
|
|
85
|
-
}
|
|
86
|
-
if (obj.day_of_week) {
|
|
87
|
-
format += "w";
|
|
88
|
-
}
|
|
89
|
-
if (obj.short_date) {
|
|
90
|
-
format += "d";
|
|
91
|
-
}
|
|
92
|
-
else if (obj.long_date) {
|
|
93
|
-
format += "D";
|
|
94
|
-
}
|
|
95
|
-
if (obj.short_time) {
|
|
96
|
-
format += "t";
|
|
97
|
-
}
|
|
98
|
-
else if (obj.long_time) {
|
|
99
|
-
format += "T";
|
|
100
|
-
}
|
|
101
131
|
return cleanObject({
|
|
102
132
|
type: "dateTime",
|
|
103
133
|
offset: obj.offset,
|
|
104
134
|
length: obj.length,
|
|
105
|
-
format:
|
|
135
|
+
format: constructDateTimeFormat(obj) || undefined,
|
|
106
136
|
dateTime: obj.date,
|
|
107
137
|
});
|
|
108
138
|
}
|
|
@@ -176,31 +206,7 @@ export function messageEntityToTlObject(entity, getPeer) {
|
|
|
176
206
|
case "dateTime": {
|
|
177
207
|
const entity_ = { _: "messageEntityFormattedDate", offset, length, date: entity.dateTime };
|
|
178
208
|
if (entity.format) {
|
|
179
|
-
|
|
180
|
-
entity_.relative = true;
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
for (const character of entity.format) {
|
|
184
|
-
switch (character) {
|
|
185
|
-
case "t":
|
|
186
|
-
entity_.short_time = true;
|
|
187
|
-
break;
|
|
188
|
-
case "T":
|
|
189
|
-
entity_.long_time = true;
|
|
190
|
-
break;
|
|
191
|
-
case "d":
|
|
192
|
-
entity_.short_date = true;
|
|
193
|
-
break;
|
|
194
|
-
case "D":
|
|
195
|
-
entity_.long_date = true;
|
|
196
|
-
break;
|
|
197
|
-
case "w":
|
|
198
|
-
case "W":
|
|
199
|
-
entity_.day_of_week = true;
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
209
|
+
timeFormatToTlObject(entity.format, entity_);
|
|
204
210
|
}
|
|
205
211
|
return entity_;
|
|
206
212
|
}
|
|
@@ -0,0 +1,268 @@
|
|
|
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 { Api } from "../2_tl.js";
|
|
21
|
+
/**
|
|
22
|
+
* An empty rich text component.
|
|
23
|
+
* @unlisted
|
|
24
|
+
*/
|
|
25
|
+
export interface RichTextComponentEmpty {
|
|
26
|
+
type: "empty";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* An plain rich text component.
|
|
30
|
+
* @unlisted
|
|
31
|
+
*/
|
|
32
|
+
export interface RichTextComponentPlain {
|
|
33
|
+
type: "plain";
|
|
34
|
+
text: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A rich text component that has its child bold.
|
|
38
|
+
* @unlisted
|
|
39
|
+
*/
|
|
40
|
+
export interface RichTextComponentBold {
|
|
41
|
+
type: "bold";
|
|
42
|
+
text: RichTextComponent;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A rich text component that has its child italic.
|
|
46
|
+
* @unlisted
|
|
47
|
+
*/
|
|
48
|
+
export interface RichTextComponentItalic {
|
|
49
|
+
type: "italic";
|
|
50
|
+
text: RichTextComponent;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A rich text component that has its child underlined.
|
|
54
|
+
* @unlisted
|
|
55
|
+
*/
|
|
56
|
+
export interface RichTextComponentUnderline {
|
|
57
|
+
type: "underline";
|
|
58
|
+
text: RichTextComponent;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A rich text component that has its child striked through.
|
|
62
|
+
* @unlisted
|
|
63
|
+
*/
|
|
64
|
+
export interface RichTextComponentStrikethrough {
|
|
65
|
+
type: "strikethrough";
|
|
66
|
+
text: RichTextComponent;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A fixed rich text component.
|
|
70
|
+
* @unlisted
|
|
71
|
+
*/
|
|
72
|
+
export interface RichTextComponentFixed {
|
|
73
|
+
type: "fixed";
|
|
74
|
+
text: RichTextComponent;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A rich text component that opens a URL when clicked.
|
|
78
|
+
* @unlisted
|
|
79
|
+
*/
|
|
80
|
+
export interface RichTextComponentLink {
|
|
81
|
+
type: "link";
|
|
82
|
+
url: string;
|
|
83
|
+
linkPreviewId: string;
|
|
84
|
+
text: RichTextComponent;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A rich text component that opens the email address represented by its child when clicked.
|
|
88
|
+
* @unlisted
|
|
89
|
+
*/
|
|
90
|
+
export interface RichTextComponentEmail {
|
|
91
|
+
type: "email";
|
|
92
|
+
text: RichTextComponent;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A rich text component for concatenating other rich text components.
|
|
96
|
+
* @unlisted
|
|
97
|
+
*/
|
|
98
|
+
export interface RichTextComponentConcatenate {
|
|
99
|
+
type: "concatenate";
|
|
100
|
+
components: RichTextComponent[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A rich text component that has its child in the subscript.
|
|
104
|
+
* @unlisted
|
|
105
|
+
*/
|
|
106
|
+
export interface RichTextComponentSubscript {
|
|
107
|
+
type: "subscript";
|
|
108
|
+
text: RichTextComponent;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* A rich text component that has its child in the superscript.
|
|
112
|
+
* @unlisted
|
|
113
|
+
*/
|
|
114
|
+
export interface RichTextComponentSuperscript {
|
|
115
|
+
type: "superscript";
|
|
116
|
+
text: RichTextComponent;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A rich text component that has its child marked.
|
|
120
|
+
* @unlisted
|
|
121
|
+
*/
|
|
122
|
+
export interface RichTextComponentMarked {
|
|
123
|
+
type: "marked";
|
|
124
|
+
text: RichTextComponent;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A rich text component that links to a phone number.
|
|
128
|
+
* @unlisted
|
|
129
|
+
*/
|
|
130
|
+
export interface RichTextComponentPhoneNumberLink {
|
|
131
|
+
type: "phoneNumberLink";
|
|
132
|
+
phoneNumber: string;
|
|
133
|
+
text: RichTextComponent;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* A rich text component that displays an inline photo.
|
|
137
|
+
* @unlisted
|
|
138
|
+
*/
|
|
139
|
+
export interface RichTextComponentPhoto {
|
|
140
|
+
type: "photo";
|
|
141
|
+
fileId: string;
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* An anchor rich text component.
|
|
147
|
+
* @unlisted
|
|
148
|
+
*/
|
|
149
|
+
export interface RichTextComponentAnchor {
|
|
150
|
+
type: "anchor";
|
|
151
|
+
name: string;
|
|
152
|
+
text: RichTextComponent;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* An rich text component that displays a mathematical expression.
|
|
156
|
+
* @unlisted
|
|
157
|
+
*/
|
|
158
|
+
export interface RichTextComponentMath {
|
|
159
|
+
type: "math";
|
|
160
|
+
code: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* An rich text component that displays a custom emoji.
|
|
164
|
+
* @unlisted
|
|
165
|
+
*/
|
|
166
|
+
export interface RichTextComponentCustomEmoji {
|
|
167
|
+
type: "customEmoji";
|
|
168
|
+
customEmojiId: string;
|
|
169
|
+
alt: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* An rich text component that displays a spoiler.
|
|
173
|
+
* @unlisted
|
|
174
|
+
*/
|
|
175
|
+
export interface RichTextComponentSpoiler {
|
|
176
|
+
type: "spoiler";
|
|
177
|
+
text: RichTextComponent;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* An rich text component that mentions a username.
|
|
181
|
+
* @unlisted
|
|
182
|
+
*/
|
|
183
|
+
export interface RichTextComponentMention {
|
|
184
|
+
type: "mention";
|
|
185
|
+
text: RichTextComponent;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A hashtag rich text component.
|
|
189
|
+
* @unlisted
|
|
190
|
+
*/
|
|
191
|
+
export interface RichTextComponentHashtag {
|
|
192
|
+
type: "hashtag";
|
|
193
|
+
text: RichTextComponent;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* A bot command rich text component.
|
|
197
|
+
* @unlisted
|
|
198
|
+
*/
|
|
199
|
+
export interface RichTextComponentBotCommand {
|
|
200
|
+
type: "botCommand";
|
|
201
|
+
text: RichTextComponent;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* A cashtag rich text component.
|
|
205
|
+
* @unlisted
|
|
206
|
+
*/
|
|
207
|
+
export interface RichTextComponentCashtag {
|
|
208
|
+
type: "cashtag";
|
|
209
|
+
text: RichTextComponent;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* A rich text component that opens the URL represented by its child when clicked.
|
|
213
|
+
* @unlisted
|
|
214
|
+
*/
|
|
215
|
+
export interface RichTextComponentUrl {
|
|
216
|
+
type: "url";
|
|
217
|
+
text: RichTextComponent;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* A rich text component that links to an email address.
|
|
221
|
+
* @unlisted
|
|
222
|
+
*/
|
|
223
|
+
export interface RichTextComponentEmailLink {
|
|
224
|
+
type: "emailLink";
|
|
225
|
+
email: string;
|
|
226
|
+
text: RichTextComponent;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* A rich text component that opens the phone number represented by its child when clicked.
|
|
230
|
+
* @unlisted
|
|
231
|
+
*/
|
|
232
|
+
export interface RichTextComponentPhone {
|
|
233
|
+
type: "phoneNumber";
|
|
234
|
+
text: RichTextComponent;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* A bank card rich text component.
|
|
238
|
+
* @unlisted
|
|
239
|
+
*/
|
|
240
|
+
export interface RichTextComponentBankCard {
|
|
241
|
+
type: "bankCard";
|
|
242
|
+
text: RichTextComponent;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* A rich text component that mentions a user with a custom text.
|
|
246
|
+
* @unlisted
|
|
247
|
+
*/
|
|
248
|
+
export interface RichTextComponentTextMention {
|
|
249
|
+
type: "textMention";
|
|
250
|
+
userId: number;
|
|
251
|
+
text: RichTextComponent;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* A datetime text component.
|
|
255
|
+
* @unlisted
|
|
256
|
+
*/
|
|
257
|
+
export interface RichTextComponentDateTime {
|
|
258
|
+
type: "dateTime";
|
|
259
|
+
isRelative: boolean;
|
|
260
|
+
format?: string;
|
|
261
|
+
date: number;
|
|
262
|
+
text: RichTextComponent;
|
|
263
|
+
}
|
|
264
|
+
/** Any type of rich text component. */
|
|
265
|
+
export type RichTextComponent = RichTextComponentEmpty | RichTextComponentPlain | RichTextComponentBold | RichTextComponentItalic | RichTextComponentUnderline | RichTextComponentStrikethrough | RichTextComponentFixed | RichTextComponentLink | RichTextComponentEmailLink | RichTextComponentConcatenate | RichTextComponentSubscript | RichTextComponentSuperscript | RichTextComponentMarked | RichTextComponentPhoneNumberLink | RichTextComponentPhoto | RichTextComponentAnchor | RichTextComponentMath | RichTextComponentCustomEmoji | RichTextComponentSpoiler | RichTextComponentMention | RichTextComponentHashtag | RichTextComponentBotCommand | RichTextComponentCashtag | RichTextComponentUrl | RichTextComponentEmail | RichTextComponentPhone | RichTextComponentBankCard | RichTextComponentTextMention | RichTextComponentDateTime;
|
|
266
|
+
export declare function constructRichTextComponent(rt: Api.RichText, photos: Api.Photo[]): RichTextComponent;
|
|
267
|
+
export declare function richTextComponentToTlObject(rtc: RichTextComponent): Api.RichText;
|
|
268
|
+
//# sourceMappingURL=3_rich_text_component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_rich_text_component.d.ts","sourceRoot":"","sources":["../../src/types/3_rich_text_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAKjC;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,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