UNPKG

13 kBTypeScriptView Raw
1/// <reference types="mongoose" />
2export default class BotsTelegramMessageModel extends Model {
3 static schema: {
4 telegramUserId: {
5 type: typeof import("mongoose").Schema.Types.ObjectId;
6 ref: string;
7 };
8 botId: {
9 type: string;
10 };
11 type: {
12 type: string;
13 };
14 /** INTERFACE ServiceMessage */
15 /** Unique message identifier inside this chat */
16 message_id: {
17 type: NumberConstructor;
18 };
19 /** Sender, empty for messages sent to channels */
20 from: {
21 type: ObjectConstructor;
22 };
23 /** Date the message was sent in Unix time */
24 date: {
25 type: NumberConstructor;
26 };
27 /** Conversation the message belongs to */
28 chat: {
29 type: ObjectConstructor;
30 };
31 /** ------------------------------ */
32 /** INTERFACE CommonMessage extends ServiceMessage */
33 /** For forwarded messages, sender of the original message */
34 forward_from: {
35 type: ObjectConstructor;
36 };
37 /** For messages forwarded from channels, information about the original channel */
38 forward_from_chat: {
39 type: ObjectConstructor;
40 };
41 /** For messages forwarded from channels, identifier of the original message in the channel */
42 forward_from_message_id: {
43 type: NumberConstructor;
44 };
45 /** For messages forwarded from channels, signature of the post author if present */
46 forward_signature: {
47 type: StringConstructor;
48 };
49 /** Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages */
50 forward_sender_name: {
51 type: StringConstructor;
52 };
53 /** For forwarded messages, date the original message was sent in Unix time */
54 forward_date: {
55 type: NumberConstructor;
56 };
57 /** For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */
58 reply_to_message: {
59 type: ObjectConstructor;
60 };
61 /** Bot through which the message was sent */
62 via_bot: {
63 type: ObjectConstructor;
64 };
65 /** Date the message was last edited in Unix time */
66 edit_date: {
67 type: NumberConstructor;
68 };
69 /** Signature of the post author for messages in channels */
70 author_signature: {
71 type: StringConstructor;
72 };
73 /** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
74 reply_markup: {
75 type: ObjectConstructor;
76 };
77 /** ------------------------------ */
78 /** INTERFACE TextMessage extends CommonMessage */
79 /** For text messages, the actual UTF-8 text of the message, 0-4096 characters */
80 text: {
81 type: StringConstructor;
82 };
83 /** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
84 entities: {
85 type: ObjectConstructor;
86 };
87 /** ------------------------------ */
88 /** INTERFACE CaptionableMessage extends CommonMessage */
89 /** Caption for the animation, audio, document, photo, video or voice, 0-1024 characters */
90 caption: {
91 type: StringConstructor;
92 };
93 /** For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */
94 caption_entities: {
95 type: ObjectConstructor;
96 };
97 /** ------------------------------ */
98 /** INTERFACE MediaMessage extends CaptionableMessage */
99 /** The unique identifier of a media message group this message belongs to */
100 media_group_id: {
101 type: StringConstructor;
102 };
103 /** ------------------------------ */
104 /** INTERFACE AudioMessage extends CaptionableMessage */
105 /** Message is an audio file, information about the file */
106 audio: {
107 type: ObjectConstructor;
108 };
109 /** ------------------------------ */
110 /** INTERFACE DocumentMessage extends CaptionableMessage */
111 /** Message is a general file, information about the file */
112 document: {
113 type: ObjectConstructor;
114 };
115 /** ------------------------------ */
116 /** INTERFACE AnimationMessage extends DocumentMessage */
117 /** Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set */
118 animation: {
119 type: ObjectConstructor;
120 };
121 /** ------------------------------ */
122 /** INTERFACE PhotoMessage extends MediaMessage */
123 /** Message is a photo, available sizes of the photo */
124 photo: {
125 type: ObjectConstructor;
126 };
127 /** } */
128 /** INTERFACE StickerMessage extends CommonMessage */
129 /** Message is a sticker, information about the sticker */
130 sticker: {
131 type: ObjectConstructor;
132 };
133 /** ------------------------------ */
134 /** INTERFACE VideoMessage extends MediaMessage */
135 /** Message is a video, information about the video */
136 video: {
137 type: ObjectConstructor;
138 };
139 /** ------------------------------ */
140 /** INTERFACE VideoNoteMessage extends CommonMessage */
141 /** Message is a video note, information about the video message */
142 video_note: {
143 type: ObjectConstructor;
144 };
145 /** ------------------------------ */
146 /** INTERFACE VoiceMessage extends CaptionableMessage */
147 /** Message is a voice message, information about the file */
148 voice: {
149 type: ObjectConstructor;
150 };
151 /** ------------------------------ */
152 /** INTERFACE ContactMessage extends CommonMessage */
153 /** Message is a shared contact, information about the contact */
154 contact: {
155 type: ObjectConstructor;
156 };
157 /** ------------------------------ */
158 /** INTERFACE DiceMessage extends CommonMessage */
159 /** Message is a dice with random value from 1 to 6 */
160 dice: {
161 type: ObjectConstructor;
162 };
163 /** ------------------------------ */
164 /** INTERFACE GameMessage extends CommonMessage */
165 /** Message is a game, information about the game. More about games » */
166 game: {
167 type: ObjectConstructor;
168 };
169 /** ------------------------------ */
170 /** INTERFACE PollMessage extends CommonMessage */
171 /** Message is a native poll, information about the poll */
172 poll: {
173 type: ObjectConstructor;
174 };
175 /** ------------------------------ */
176 /** INTERFACE LocationMessage extends CommonMessage */
177 /** Message is a shared location, information about the location */
178 location: {
179 type: ObjectConstructor;
180 };
181 /** ------------------------------ */
182 /** INTERFACE VenueMessage extends LocationMessage */
183 /** Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set */
184 venue: {
185 type: ObjectConstructor;
186 };
187 /** ------------------------------ */
188 /** INTERFACE NewChatMembersMessage extends ServiceMessage */
189 /** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
190 new_chat_members: {
191 type: ObjectConstructor;
192 };
193 /** ------------------------------ */
194 /** INTERFACE LeftChatMemberMessage extends ServiceMessage */
195 /** A member was removed from the group, information about them (this member may be the bot itself) */
196 left_chat_member: {
197 type: ObjectConstructor;
198 };
199 /** ------------------------------ */
200 /** INTERFACE NewChatTitleMessage extends ServiceMessage */
201 /** A chat title was changed to this value */
202 new_chat_title: {
203 type: StringConstructor;
204 };
205 /** ------------------------------ */
206 /** INTERFACE NewChatPhotoMessage extends ServiceMessage */
207 /** A chat photo was change to this value */
208 new_chat_photo: {
209 type: ObjectConstructor;
210 };
211 /** ------------------------------ */
212 /** INTERFACE DeleteChatPhotoMessage extends ServiceMessage */
213 /** Service message: the chat photo was deleted */
214 delete_chat_photo: {
215 type: BooleanConstructor;
216 };
217 /** ------------------------------ */
218 /** INTERFACE GroupChatCreatedMessage extends ServiceMessage */
219 /** Service message: the group has been created */
220 group_chat_created: {
221 type: BooleanConstructor;
222 };
223 /** ------------------------------ */
224 /** INTERFACE SupergroupChatCreated extends ServiceMessage */
225 /** Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */
226 supergroup_chat_created: {
227 type: BooleanConstructor;
228 };
229 /** ------------------------------ */
230 /** INTERFACE ChannelChatCreatedMessage extends ServiceMessage */
231 /** Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */
232 channel_chat_created: {
233 type: BooleanConstructor;
234 };
235 /** ------------------------------ */
236 /** INTERFACE MigrateToChatIdMessage extends ServiceMessage */
237 /** The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */
238 migrate_to_chat_id: {
239 type: NumberConstructor;
240 };
241 /** ------------------------------ */
242 /** INTERFACE MigrateFromChatIdMessage extends ServiceMessage */
243 /** The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */
244 migrate_from_chat_id: {
245 type: NumberConstructor;
246 };
247 /** ------------------------------ */
248 /** INTERFACE PinnedMessageMessage extends ServiceMessage */
249 /** Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. */
250 /** ------------------------------ */
251 /** INTERFACE InvoiceMessage extends ServiceMessage */
252 /** Message is an invoice for a payment, information about the invoice. More about payments » */
253 invoice: {
254 type: ObjectConstructor;
255 };
256 /** ------------------------------ */
257 /** INTERFACE SuccessfulPaymentMessage extends ServiceMessage */
258 /** Message is a service message about a successful payment, information about the payment. More about payments » */
259 successful_payment: {
260 type: ObjectConstructor;
261 };
262 /** ------------------------------ */
263 /** INTERFACE ConnectedWebsiteMessage extends ServiceMessage */
264 /** The domain name of the website on which the user has logged in. More about Telegram Login » */
265 connected_website: {
266 type: StringConstructor;
267 };
268 /** ------------------------------ */
269 /** INTERFACE PassportDataMessage extends ServiceMessage */
270 /** Telegram Passport data */
271 passport_data: {
272 type: ObjectConstructor;
273 };
274 meta: {
275 type: ObjectConstructor;
276 };
277 };
278 static options: {
279 model: string;
280 collection: string;
281 timestamps: boolean;
282 };
283}
284import Model from "@lskjs/db/Model";