UNPKG

17 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../src/models/BotsTelegramMessageModel.js"],"names":["BotsTelegramMessageModel","Model","schema","telegramUserId","type","Types","ObjectId","ref","botId","message_id","Number","from","Object","date","chat","forward_from","forward_from_chat","forward_from_message_id","forward_signature","String","forward_sender_name","forward_date","reply_to_message","via_bot","edit_date","author_signature","reply_markup","text","entities","caption","caption_entities","media_group_id","audio","document","animation","photo","sticker","video","video_note","voice","contact","dice","game","poll","location","venue","new_chat_members","left_chat_member","new_chat_title","new_chat_photo","delete_chat_photo","Boolean","group_chat_created","supergroup_chat_created","channel_chat_created","migrate_to_chat_id","migrate_from_chat_id","invoice","successful_payment","connected_website","passport_data","meta","options","model","collection","timestamps"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;AAEA;IACqBA,wB;;;;;;;;;;;EAAiCC,kB;;;AAAjCD,wB,CACZE,M,GAAS;AACdC,EAAAA,cAAc,EAAE;AACdC,IAAAA,IAAI,EAAEH,mBAAMI,KAAN,CAAYC,QADJ;AAEdC,IAAAA,GAAG,EAAE;AAFS,GADF;AAKdC,EAAAA,KAAK,EAAE;AACLJ,IAAAA,IAAI,EAAE;AADD,GALO;AAQdA,EAAAA,IAAI,EAAE;AACJA,IAAAA,IAAI,EAAE;AADF,GARQ;;AAYd;;AACA;AACAK,EAAAA,UAAU,EAAE;AACVL,IAAAA,IAAI,EAAEM;AADI,GAdE;;AAiBd;AACAC,EAAAA,IAAI,EAAE;AACJP,IAAAA,IAAI,EAAEQ;AADF,GAlBQ;;AAqBd;AACAC,EAAAA,IAAI,EAAE;AACJT,IAAAA,IAAI,EAAEM;AADF,GAtBQ;;AAyBd;AACAI,EAAAA,IAAI,EAAE;AACJV,IAAAA,IAAI,EAAEQ;AADF,GA1BQ;;AA6Bd;;AAEA;;AACA;AACAG,EAAAA,YAAY,EAAE;AACZX,IAAAA,IAAI,EAAEQ;AADM,GAjCA;;AAoCd;AACAI,EAAAA,iBAAiB,EAA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A,aAAa,EAAE;AACbxD,IAAAA,IAAI,EAAEQ;AADO,GA/SD;AAmTd;AACAiD,EAAAA,IAAI,EAAE;AACJzD,IAAAA,IAAI,EAAEQ;AADF;AApTQ,C;AADGZ,wB,CAyTZ8D,O,GAAU;AACfC,EAAAA,KAAK,EAAE,0BADQ;AAEfC,EAAAA,UAAU,EAAE,uBAFG;AAGfC,EAAAA,UAAU,EAAE;AAHG,C","sourcesContent":["import Model from '@lskjs/db/Model';\nimport includes from 'lodash/includes';\n\n// https://raw.githubusercontent.com/KnorpelSenf/typegram/master/types.d.ts\nexport default class BotsTelegramMessageModel extends Model {\n static schema = {\n telegramUserId: {\n type: Model.Types.ObjectId,\n ref: 'BotsTelegramUserModel',\n },\n botId: {\n type: 'String',\n },\n type: {\n type: 'String',\n },\n\n /** INTERFACE ServiceMessage */\n /** Unique message identifier inside this chat */\n message_id: {\n type: Number,\n },\n /** Sender, empty for messages sent to channels */\n from: {\n type: Object,\n },\n /** Date the message was sent in Unix time */\n date: {\n type: Number,\n },\n /** Conversation the message belongs to */\n chat: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE CommonMessage extends ServiceMessage */\n /** For forwarded messages, sender of the original message */\n forward_from: {\n type: Object,\n },\n /** For messages forwarded from channels, information about the original channel */\n forward_from_chat: {\n type: Object,\n },\n /** For messages forwarded from channels, identifier of the original message in the channel */\n forward_from_message_id: {\n type: Number,\n },\n /** For messages forwarded from channels, signature of the post author if present */\n forward_signature: {\n type: String,\n },\n /** Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages */\n forward_sender_name: {\n type: String,\n },\n /** For forwarded messages, date the original message was sent in Unix time */\n forward_date: {\n type: Number,\n },\n /** 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. */\n reply_to_message: {\n type: Object,\n },\n /** Bot through which the message was sent */\n via_bot: {\n type: Object,\n },\n /** Date the message was last edited in Unix time */\n edit_date: {\n type: Number,\n },\n /** Signature of the post author for messages in channels */\n author_signature: {\n type: String,\n },\n /** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */\n reply_markup: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE TextMessage extends CommonMessage */\n /** For text messages, the actual UTF-8 text of the message, 0-4096 characters */\n text: {\n type: String,\n },\n /** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */\n entities: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE CaptionableMessage extends CommonMessage */\n /** Caption for the animation, audio, document, photo, video or voice, 0-1024 characters */\n caption: {\n type: String,\n },\n /** For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */\n caption_entities: {\n type: Object, // Array,\n },\n /** ------------------------------ */\n\n /** INTERFACE MediaMessage extends CaptionableMessage */\n /** The unique identifier of a media message group this message belongs to */\n media_group_id: {\n type: String,\n },\n /** ------------------------------ */\n\n /** INTERFACE AudioMessage extends CaptionableMessage */\n /** Message is an audio file, information about the file */\n audio: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE DocumentMessage extends CaptionableMessage */\n /** Message is a general file, information about the file */\n document: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE AnimationMessage extends DocumentMessage */\n /** Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set */\n animation: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE PhotoMessage extends MediaMessage */\n /** Message is a photo, available sizes of the photo */\n photo: {\n type: Object, // || Array, default: undefined\n },\n /** } */\n\n /** INTERFACE StickerMessage extends CommonMessage */\n /** Message is a sticker, information about the sticker */\n sticker: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE VideoMessage extends MediaMessage */\n /** Message is a video, information about the video */\n video: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE VideoNoteMessage extends CommonMessage */\n /** Message is a video note, information about the video message */\n video_note: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE VoiceMessage extends CaptionableMessage */\n /** Message is a voice message, information about the file */\n voice: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE ContactMessage extends CommonMessage */\n /** Message is a shared contact, information about the contact */\n contact: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE DiceMessage extends CommonMessage */\n /** Message is a dice with random value from 1 to 6 */\n dice: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE GameMessage extends CommonMessage */\n /** Message is a game, information about the game. More about games » */\n game: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE PollMessage extends CommonMessage */\n /** Message is a native poll, information about the poll */\n poll: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE LocationMessage extends CommonMessage */\n /** Message is a shared location, information about the location */\n location: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE VenueMessage extends LocationMessage */\n /** Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set */\n venue: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE NewChatMembersMessage extends ServiceMessage */\n /** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */\n new_chat_members: {\n type: Object, // Array,\n },\n /** ------------------------------ */\n\n /** INTERFACE LeftChatMemberMessage extends ServiceMessage */\n /** A member was removed from the group, information about them (this member may be the bot itself) */\n left_chat_member: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE NewChatTitleMessage extends ServiceMessage */\n /** A chat title was changed to this value */\n new_chat_title: {\n type: String,\n },\n /** ------------------------------ */\n\n /** INTERFACE NewChatPhotoMessage extends ServiceMessage */\n /** A chat photo was change to this value */\n new_chat_photo: {\n type: Object, // Array,\n },\n /** ------------------------------ */\n\n /** INTERFACE DeleteChatPhotoMessage extends ServiceMessage */\n /** Service message: the chat photo was deleted */\n delete_chat_photo: {\n type: Boolean,\n },\n /** ------------------------------ */\n\n /** INTERFACE GroupChatCreatedMessage extends ServiceMessage */\n /** Service message: the group has been created */\n group_chat_created: {\n type: Boolean,\n },\n /** ------------------------------ */\n\n /** INTERFACE SupergroupChatCreated extends ServiceMessage */\n /** 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. */\n supergroup_chat_created: {\n type: Boolean,\n },\n /** ------------------------------ */\n\n /** INTERFACE ChannelChatCreatedMessage extends ServiceMessage */\n /** 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. */\n channel_chat_created: {\n type: Boolean,\n },\n /** ------------------------------ */\n\n /** INTERFACE MigrateToChatIdMessage extends ServiceMessage */\n /** 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. */\n migrate_to_chat_id: {\n type: Number,\n },\n /** ------------------------------ */\n\n /** INTERFACE MigrateFromChatIdMessage extends ServiceMessage */\n /** 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. */\n migrate_from_chat_id: {\n type: Number,\n },\n /** ------------------------------ */\n\n /** INTERFACE PinnedMessageMessage extends ServiceMessage */\n /** 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. */\n // pinned_message: Omit<Message, \"reply_to_message\">;\n /** ------------------------------ */\n\n /** INTERFACE InvoiceMessage extends ServiceMessage */\n /** Message is an invoice for a payment, information about the invoice. More about payments » */\n invoice: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE SuccessfulPaymentMessage extends ServiceMessage */\n /** Message is a service message about a successful payment, information about the payment. More about payments » */\n successful_payment: {\n type: Object,\n },\n /** ------------------------------ */\n\n /** INTERFACE ConnectedWebsiteMessage extends ServiceMessage */\n /** The domain name of the website on which the user has logged in. More about Telegram Login » */\n connected_website: {\n type: String,\n },\n /** ------------------------------ */\n\n /** INTERFACE PassportDataMessage extends ServiceMessage */\n /** Telegram Passport data */\n passport_data: {\n type: Object,\n },\n\n // Объект, в котрый можно складировать мета-информацию\n meta: {\n type: Object,\n },\n };\n static options = {\n model: 'BotsTelegramMessageModel',\n collection: 'bots_telegram_message',\n timestamps: true,\n };\n}\n"],"file":"BotsTelegramMessageModel.js"}
\No newline at end of file