@mtcute/core 0.16.9 → 0.16.13

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/index.js CHANGED
@@ -3,10 +3,10 @@ import { default as default2 } from "long";
3
3
  import { concatBuffers, dataViewFromBuffer, getRandomInt, bufferToReversed } from "./chunks/es/DY1E3mHM.js";
4
4
  import { assertNever, getAllPeersFrom, getBarePeerId, getMarkedPeerId, parseMarkedPeerId, toggleChannelIdMark } from "./chunks/es/DY1E3mHM.js";
5
5
  import { mtp, tl } from "@mtcute/tl";
6
- import { TransportError, basic } from "./chunks/es/BbjNWA_t.js";
7
- import { BotChatJoinRequestUpdate$2, BotReactionCountUpdate$2, BotReactionUpdate$2, BotStoppedUpdate$2, BusinessCallbackQuery$2, BusinessMessage, CallbackQuery$2, ChatJoinRequestUpdate$2, ChatMemberUpdate$2, ChosenInlineResult$2, Conversation, DeleteBusinessMessageUpdate$2, DeleteMessageUpdate$1, DeleteStoryUpdate$2, HistoryReadUpdate$1, InlineCallbackQuery$2, InlineQuery$2, MtClient, PollUpdate$2, PollVoteUpdate$2, PreCheckoutQuery$2, SessionConnection, StorageManager, StoryUpdate$2, TelegramStorageManager, TransportState, UpdatesManager, UserStatusUpdate$2, UserTypingUpdate$1, defaultReconnectionStrategy } from "./chunks/es/BbjNWA_t.js";
8
- import { normalizeInputReaction } from "./chunks/es/CPnecqvf.js";
9
- import { AllStories$2, Audio$2, Boost$2, BoostSlot$2, BoostStats$1, factories$1, factories, factories$2, BotKeyboardBuilder, BusinessAccount$2, BusinessChatLink$2, BusinessConnection$2, BusinessIntro$2, BusinessWorkHours$2, Chat$2, ChatEvent$2, ChatInviteLink$2, ChatInviteLinkMember$2, ChatLocation$2, ChatMember$2, ChatPermissions$1, ChatPhoto$2, ChatPhotoSize$2, ChatPreview$2, ChatlistPreview$2, CollectibleInfo$1, Contact$1, Dialog$2, Dice$1, Document$2, DraftMessage$2, ExtendedMediaPreview$2, FactCheck$2, FileLocation$1, ForumTopic$2, FullChat$2, Game$2, GameHighScore$2, Invoice$2, LiveLocation$1, Location$1, MASK_POSITION_POINT_TO_TL, MediaStory$1, Message$2, MessageEffect$2, MessageEntity$2, MessageForwardInfo$2, MessageReactions$2, MessageRepliesInfo$2, PaidMedia$2, PaidPeerReaction$2, PeerReaction$2, PeerStories$2, Photo$2, Poll$2, PollAnswer$2, RawDocument, RawLocation, RepliedMessageInfo$2, SearchFilters, SentCode$1, StarsStatus$2, StarsTransaction$2, Sticker$2, StickerSet$2, StoriesStealthMode$1, Story$2, StoryInteractions$2, StoryInteractiveChannelPost$2, StoryInteractiveLocation$2, StoryInteractiveReaction$1, StoryInteractiveUrl, StoryInteractiveVenue$2, StoryInteractiveWeather$1, StoryRepost, StoryViewer$2, StoryViewersList$2, TakeoutSession$1, Thumbnail$2, User$2, Venue$2, Video$2, Voice$2, WebDocument$1, WebPage$2, _actionFromTl, _callDiscardReasonFromTl, _callDiscardReasonToTl, _messageActionFromTl, _messageMediaFromTl, _storyInteractiveElementFromTl, businessWorkHoursDaysToRaw, inputTextToTl, isUploadedFile, normalizeInputMessageId, normalizeInputStickerSet, parsePeer, toReactionEmoji } from "./chunks/es/CPnecqvf.js";
6
+ import { TransportError, basic } from "./chunks/es/xihQcMp0.js";
7
+ import { BotChatJoinRequestUpdate$2, BotReactionCountUpdate$2, BotReactionUpdate$2, BotStoppedUpdate$2, BusinessCallbackQuery$2, BusinessMessage, CallbackQuery$2, ChatJoinRequestUpdate$2, ChatMemberUpdate$2, ChosenInlineResult$2, Conversation, DeleteBusinessMessageUpdate$2, DeleteMessageUpdate$1, DeleteStoryUpdate$2, HistoryReadUpdate$1, InlineCallbackQuery$2, InlineQuery$2, MtClient, PollUpdate$2, PollVoteUpdate$2, PreCheckoutQuery$2, SessionConnection, StorageManager, StoryUpdate$2, TelegramStorageManager, TransportState, UpdatesManager, UserStatusUpdate$2, UserTypingUpdate$1, defaultReconnectionStrategy } from "./chunks/es/xihQcMp0.js";
8
+ import { normalizeInputReaction } from "./chunks/es/Btmu4f4t.js";
9
+ import { AllStories$2, Audio$2, Boost$2, BoostSlot$2, BoostStats$1, factories$1, factories, factories$2, BotKeyboardBuilder, BusinessAccount$2, BusinessChatLink$2, BusinessConnection$2, BusinessIntro$2, BusinessWorkHours$2, Chat$2, ChatEvent$2, ChatInviteLink$2, ChatInviteLinkMember$2, ChatLocation$2, ChatMember$2, ChatPermissions$1, ChatPhoto$2, ChatPhotoSize$2, ChatPreview$2, ChatlistPreview$2, CollectibleInfo$1, Contact$1, Dialog$2, Dice$1, Document$2, DraftMessage$2, ExtendedMediaPreview$2, FactCheck$2, FileLocation$1, ForumTopic$2, FullChat$2, Game$2, GameHighScore$2, Invoice$2, LiveLocation$1, Location$1, MASK_POSITION_POINT_TO_TL, MediaStory$1, Message$2, MessageEffect$2, MessageEntity$2, MessageForwardInfo$2, MessageReactions$2, MessageRepliesInfo$2, PaidMedia$2, PaidPeerReaction$2, PeerReaction$2, PeerStories$2, Photo$2, Poll$2, PollAnswer$2, RawDocument, RawLocation, RepliedMessageInfo$2, SearchFilters, SentCode$1, StarsStatus$2, StarsTransaction$2, Sticker$2, StickerSet$2, StoriesStealthMode$1, Story$2, StoryInteractions$2, StoryInteractiveChannelPost$2, StoryInteractiveLocation$2, StoryInteractiveReaction$1, StoryInteractiveUrl, StoryInteractiveVenue$2, StoryInteractiveWeather$1, StoryRepost, StoryViewer$2, StoryViewersList$2, TakeoutSession$1, Thumbnail$2, User$2, Venue$2, Video$2, Voice$2, WebDocument$1, WebPage$2, _actionFromTl, _callDiscardReasonFromTl, _callDiscardReasonToTl, _messageActionFromTl, _messageMediaFromTl, _storyInteractiveElementFromTl, businessWorkHoursDaysToRaw, inputTextToTl, isUploadedFile, normalizeInputMessageId, normalizeInputStickerSet, parsePeer, toReactionEmoji } from "./chunks/es/Btmu4f4t.js";
10
10
  import { isTlRpcError } from "./chunks/es/BN3qj7tU.js";
11
11
  import { MtEmptyError, MtInvalidPeerTypeError, MtMessageNotFoundError, MtPeerNotFoundError } from "./chunks/es/BN3qj7tU.js";
12
12
  import { PeersIndex } from "./chunks/es/N3PMYmCL.js";
@@ -637,18 +637,24 @@ class MemoryPeersRepository {
637
637
  if (peer2.phone) this.state.phoneIndex.set(peer2.phone, peer2.id);
638
638
  this.state.entities.set(peer2.id, peer2);
639
639
  }
640
- getById(id) {
641
- return this.state.entities.get(id) ?? null;
640
+ getById(id, allowMin) {
641
+ const ent = this.state.entities.get(id);
642
+ if (!ent || ent.isMin && !allowMin) return null;
643
+ return ent;
642
644
  }
643
645
  getByUsername(username) {
644
646
  const id = this.state.usernameIndex.get(username.toLowerCase());
645
647
  if (!id) return null;
646
- return this.state.entities.get(id) ?? null;
648
+ const ent = this.state.entities.get(id);
649
+ if (!ent || ent.isMin) return null;
650
+ return ent;
647
651
  }
648
652
  getByPhone(phone) {
649
653
  const id = this.state.phoneIndex.get(phone);
650
654
  if (!id) return null;
651
- return this.state.entities.get(id) ?? null;
655
+ const ent = this.state.entities.get(id);
656
+ if (!ent || ent.isMin) return null;
657
+ return ent;
652
658
  }
653
659
  deleteAll() {
654
660
  this.state.entities.clear();
@@ -965,6 +971,7 @@ function mapPeerDto(dto) {
965
971
  return {
966
972
  id: dto.id,
967
973
  accessHash: dto.hash,
974
+ isMin: dto.isMin === 1,
968
975
  usernames: JSON.parse(dto.usernames),
969
976
  updated: dto.updated,
970
977
  phone: dto.phone || void 0,
@@ -988,16 +995,20 @@ class SqlitePeersRepository {
988
995
  create index idx_peers_phone on peers (phone);
989
996
  `);
990
997
  });
998
+ _driver.registerMigration("peers", 2, (db) => {
999
+ db.exec("alter table peers add column isMin integer not null default false;");
1000
+ });
991
1001
  _driver.onLoad((db) => {
992
1002
  this._loaded = true;
993
1003
  this._store = db.prepare(
994
- "insert or replace into peers (id, hash, usernames, updated, phone, complete) values (?, ?, ?, ?, ?, ?)"
1004
+ "insert or replace into peers (id, hash, isMin, usernames, updated, phone, complete) values (?, ?, ?, ?, ?, ?, ?)"
995
1005
  );
996
- this._getById = db.prepare("select * from peers where id = ?");
1006
+ this._getById = db.prepare("select * from peers where id = ? and isMin = false");
1007
+ this._getByIdAllowMin = db.prepare("select * from peers where id = ?");
997
1008
  this._getByUsername = db.prepare(
998
- "select * from peers where exists (select 1 from json_each(usernames) where value = ?)"
1009
+ "select * from peers where exists (select 1 from json_each(usernames) where value = ?) and isMin = false"
999
1010
  );
1000
- this._getByPhone = db.prepare("select * from peers where phone = ?");
1011
+ this._getByPhone = db.prepare("select * from peers where phone = ? and isMin = false");
1001
1012
  this._delAll = db.prepare("delete from peers");
1002
1013
  });
1003
1014
  _driver.registerLegacyMigration("peers", (db) => {
@@ -1015,6 +1026,7 @@ class SqlitePeersRepository {
1015
1026
  this._driver._writeLater(this._store, [
1016
1027
  peer2.id,
1017
1028
  peer2.accessHash,
1029
+ peer2.isMin ? 1 : 0,
1018
1030
  JSON.stringify(peer2.usernames),
1019
1031
  peer2.updated,
1020
1032
  peer2.phone ?? null,
@@ -1022,9 +1034,10 @@ class SqlitePeersRepository {
1022
1034
  ]);
1023
1035
  }
1024
1036
  _getById;
1025
- getById(id) {
1037
+ _getByIdAllowMin;
1038
+ getById(id, allowMin) {
1026
1039
  this._ensureLoaded();
1027
- const row = this._getById.get(id);
1040
+ const row = (allowMin ? this._getByIdAllowMin : this._getById).get(id);
1028
1041
  if (!row) return null;
1029
1042
  return mapPeerDto(row);
1030
1043
  }
package/methods.cjs CHANGED
@@ -5,8 +5,8 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
5
5
  }
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
- const updateProfile = require("./chunks/cjs/jFPoDILV.js");
9
- const storyViewer = require("./chunks/cjs/UVFvMVPt.js");
8
+ const updateProfile = require("./chunks/cjs/CntZHjXA.js");
9
+ const storyViewer = require("./chunks/cjs/chPq0GcA.js");
10
10
  exports._normalizePrivacyRules = updateProfile._normalizePrivacyRules;
11
11
  exports.addChatMembers = updateProfile.addChatMembers;
12
12
  exports.addContact = updateProfile.addContact;
@@ -142,6 +142,7 @@ exports.hideMyStoriesViews = updateProfile.hideMyStoriesViews;
142
142
  exports.importContacts = updateProfile.importContacts;
143
143
  exports.incrementStoriesViews = updateProfile.incrementStoriesViews;
144
144
  exports.initTakeoutSession = updateProfile.initTakeoutSession;
145
+ exports.isPeerAvailable = updateProfile.isPeerAvailable;
145
146
  exports.isSelfPeer = updateProfile.isSelfPeer;
146
147
  exports.iterAllStories = updateProfile.iterAllStories;
147
148
  exports.iterBoosters = updateProfile.iterBoosters;
package/methods.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _normalizePrivacyRules, addChatMembers, addContact, addStickerToSet, answerCallbackQuery, answerInlineQuery, answerMedia, answerMediaGroup, answerPreCheckoutQuery, answerText, applyBoost, archiveChats, banChatMember, blockUser, canApplyBoost, canSendStory, cancelPasswordEmail, changeCloudPassword, checkPassword, closeChat, closePoll, commentMedia, commentMediaGroup, commentText, createBusinessChatLink, createChannel, createFolder, createForumTopic, createGroup, createInviteLink, createStickerSet, createSupergroup, deleteBusinessChatLink, deleteChannel, deleteChatPhoto, deleteContacts, deleteFolder, deleteForumTopicHistory, deleteGroup, deleteHistory, deleteMessages, deleteMessagesById, deleteMyCommands, deleteProfilePhotos, deleteScheduledMessages, deleteStickerFromSet, deleteStories, deleteUserHistory, downloadAsBuffer, downloadAsIterable, downloadAsStream, editAdminRights, editBusinessChatLink, editCloseFriends, editCloseFriendsRaw, editFolder, editForumTopic, editInlineMessage, editInviteLink, editMessage, editStory, enableCloudPassword, exportInviteLink, findDialogs, findFolder, forwardMessages, forwardMessagesById, getAllScheduledMessages, getAllStories, getAvailableMessageEffects, getBoostStats, getBoosts, getBotInfo, getBotMenuButton, getBusinessChatLinks, getCallbackAnswer, getCallbackQueryMessage, getChat, getChatEventLog, getChatMember, getChatMembers, getChatPreview, getChatlistPreview, getCollectibleInfo, getCommonChats, getContacts, getCustomEmojis, getCustomEmojisFromMessages, getFactCheck, getFolders, getForumTopics, getForumTopicsById, getFullChat, getGameHighScores, getGlobalTtl, getHistory, getInlineGameHighScores, getInstalledStickers, getInviteLink, getInviteLinkMembers, getInviteLinks, getMe, getMessageByLink, getMessageGroup, getMessageReactions, getMessageReactionsById, getMessagesUnsafe, getMyBoostSlots, getMyCommands, getMyStickerSets, getMyUsername, getNearbyChats, getPasswordHint, getPeerStories, getPrimaryInviteLink, getProfilePhoto, getProfilePhotos, getProfileStories, getReactionUsers, getReplyTo, getScheduledMessages, getSimilarChannels, getStarsTransactions, getStickerSet, getStoriesById, getStoriesInteractions, getStoryLink, getStoryViewers, getUsers, hideAllJoinRequests, hideJoinRequest, hideMyStoriesViews, importContacts, incrementStoriesViews, initTakeoutSession, isSelfPeer, iterAllStories, iterBoosters, iterChatEventLog, iterChatMembers, iterDialogs, iterForumTopics, iterHistory, iterInviteLinkMembers, iterInviteLinks, iterProfilePhotos, iterProfileStories, iterReactionUsers, iterSearchGlobal, iterSearchHashtag, iterSearchMessages, iterStarsTransactions, iterStoryViewers, joinChat, joinChatlist, kickChatMember, leaveChat, logOut, markChatUnread, moveStickerInSet, openChat, pinMessage, quoteWithMedia, quoteWithMediaGroup, quoteWithText, readReactions, readStories, recoverPassword, removeCloudPassword, reorderPinnedForumTopics, reorderUsernames, replaceStickerInSet, replyMedia, replyMediaGroup, replyText, reportStory, resendCode, resendPasswordEmail, restrictChatMember, revokeInviteLink, run, saveDraft, searchGlobal, searchHashtag, searchMessages, sendCode, sendCopy, sendCopyGroup, sendPaidReaction, sendReaction, sendRecoveryCode, sendScheduled, sendStory, sendStoryReaction, sendTyping, sendVote, setBotInfo, setBotMenuButton, setBusinessIntro, setBusinessWorkHours, setChatColor, setChatDefaultPermissions, setChatDescription, setChatPhoto, setChatStickerSet, setChatTitle, setChatTtl, setChatUsername, setFoldersOrder, setGameScore, setGlobalTtl, setInlineGameScore, setMyBirthday, setMyCommands, setMyDefaultRights, setMyEmojiStatus, setMyProfilePhoto, setMyUsername, setOffline, setSlowMode, setStickerSetThumb, signIn, signInBot, signInQr, start, startTest, toggleContentProtection, toggleForum, toggleForumTopicClosed, toggleForumTopicPinned, toggleFragmentUsername, toggleGeneralTopicHidden, toggleJoinRequests, toggleJoinToSend, togglePeerStoriesArchived, toggleStoriesPinned, translateMessage, translateText, unarchiveChats, unbanChatMember, unblockUser, unpinAllMessages, unpinMessage, updateProfile, uploadMedia, verifyPasswordEmail } from "./chunks/es/D_f8sDLe.js";
2
- import { _normalizeInputFile, _normalizeInputMedia, getBusinessConnection, getDiscussionMessage, getMessages, getPeerDialogs, readHistory, resolveChannel, resolvePeer, resolvePeerMany, resolveUser, sendMedia, sendMediaGroup, sendText, uploadFile } from "./chunks/es/CPnecqvf.js";
1
+ import { _normalizePrivacyRules, addChatMembers, addContact, addStickerToSet, answerCallbackQuery, answerInlineQuery, answerMedia, answerMediaGroup, answerPreCheckoutQuery, answerText, applyBoost, archiveChats, banChatMember, blockUser, canApplyBoost, canSendStory, cancelPasswordEmail, changeCloudPassword, checkPassword, closeChat, closePoll, commentMedia, commentMediaGroup, commentText, createBusinessChatLink, createChannel, createFolder, createForumTopic, createGroup, createInviteLink, createStickerSet, createSupergroup, deleteBusinessChatLink, deleteChannel, deleteChatPhoto, deleteContacts, deleteFolder, deleteForumTopicHistory, deleteGroup, deleteHistory, deleteMessages, deleteMessagesById, deleteMyCommands, deleteProfilePhotos, deleteScheduledMessages, deleteStickerFromSet, deleteStories, deleteUserHistory, downloadAsBuffer, downloadAsIterable, downloadAsStream, editAdminRights, editBusinessChatLink, editCloseFriends, editCloseFriendsRaw, editFolder, editForumTopic, editInlineMessage, editInviteLink, editMessage, editStory, enableCloudPassword, exportInviteLink, findDialogs, findFolder, forwardMessages, forwardMessagesById, getAllScheduledMessages, getAllStories, getAvailableMessageEffects, getBoostStats, getBoosts, getBotInfo, getBotMenuButton, getBusinessChatLinks, getCallbackAnswer, getCallbackQueryMessage, getChat, getChatEventLog, getChatMember, getChatMembers, getChatPreview, getChatlistPreview, getCollectibleInfo, getCommonChats, getContacts, getCustomEmojis, getCustomEmojisFromMessages, getFactCheck, getFolders, getForumTopics, getForumTopicsById, getFullChat, getGameHighScores, getGlobalTtl, getHistory, getInlineGameHighScores, getInstalledStickers, getInviteLink, getInviteLinkMembers, getInviteLinks, getMe, getMessageByLink, getMessageGroup, getMessageReactions, getMessageReactionsById, getMessagesUnsafe, getMyBoostSlots, getMyCommands, getMyStickerSets, getMyUsername, getNearbyChats, getPasswordHint, getPeerStories, getPrimaryInviteLink, getProfilePhoto, getProfilePhotos, getProfileStories, getReactionUsers, getReplyTo, getScheduledMessages, getSimilarChannels, getStarsTransactions, getStickerSet, getStoriesById, getStoriesInteractions, getStoryLink, getStoryViewers, getUsers, hideAllJoinRequests, hideJoinRequest, hideMyStoriesViews, importContacts, incrementStoriesViews, initTakeoutSession, isPeerAvailable, isSelfPeer, iterAllStories, iterBoosters, iterChatEventLog, iterChatMembers, iterDialogs, iterForumTopics, iterHistory, iterInviteLinkMembers, iterInviteLinks, iterProfilePhotos, iterProfileStories, iterReactionUsers, iterSearchGlobal, iterSearchHashtag, iterSearchMessages, iterStarsTransactions, iterStoryViewers, joinChat, joinChatlist, kickChatMember, leaveChat, logOut, markChatUnread, moveStickerInSet, openChat, pinMessage, quoteWithMedia, quoteWithMediaGroup, quoteWithText, readReactions, readStories, recoverPassword, removeCloudPassword, reorderPinnedForumTopics, reorderUsernames, replaceStickerInSet, replyMedia, replyMediaGroup, replyText, reportStory, resendCode, resendPasswordEmail, restrictChatMember, revokeInviteLink, run, saveDraft, searchGlobal, searchHashtag, searchMessages, sendCode, sendCopy, sendCopyGroup, sendPaidReaction, sendReaction, sendRecoveryCode, sendScheduled, sendStory, sendStoryReaction, sendTyping, sendVote, setBotInfo, setBotMenuButton, setBusinessIntro, setBusinessWorkHours, setChatColor, setChatDefaultPermissions, setChatDescription, setChatPhoto, setChatStickerSet, setChatTitle, setChatTtl, setChatUsername, setFoldersOrder, setGameScore, setGlobalTtl, setInlineGameScore, setMyBirthday, setMyCommands, setMyDefaultRights, setMyEmojiStatus, setMyProfilePhoto, setMyUsername, setOffline, setSlowMode, setStickerSetThumb, signIn, signInBot, signInQr, start, startTest, toggleContentProtection, toggleForum, toggleForumTopicClosed, toggleForumTopicPinned, toggleFragmentUsername, toggleGeneralTopicHidden, toggleJoinRequests, toggleJoinToSend, togglePeerStoriesArchived, toggleStoriesPinned, translateMessage, translateText, unarchiveChats, unbanChatMember, unblockUser, unpinAllMessages, unpinMessage, updateProfile, uploadMedia, verifyPasswordEmail } from "./chunks/es/Jz_hDg6M.js";
2
+ import { _normalizeInputFile, _normalizeInputMedia, getBusinessConnection, getDiscussionMessage, getMessages, getPeerDialogs, readHistory, resolveChannel, resolvePeer, resolvePeerMany, resolveUser, sendMedia, sendMediaGroup, sendText, uploadFile } from "./chunks/es/Btmu4f4t.js";
3
3
  export {
4
4
  _normalizeInputFile,
5
5
  _normalizeInputMedia,
@@ -142,6 +142,7 @@ export {
142
142
  importContacts,
143
143
  incrementStoriesViews,
144
144
  initTakeoutSession,
145
+ isPeerAvailable,
145
146
  isSelfPeer,
146
147
  iterAllStories,
147
148
  iterBoosters,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mtcute/core",
3
3
  "type": "module",
4
- "version": "0.16.9",
4
+ "version": "0.16.13",
5
5
  "description": "Type-safe library for MTProto (Telegram API)",
6
6
  "author": "alina sireneva <alina@tei.su>",
7
7
  "license": "MIT",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "scripts": {},
72
72
  "dependencies": {
73
- "@mtcute/file-id": "^0.16.9",
73
+ "@mtcute/file-id": "^0.16.12",
74
74
  "@mtcute/tl": "^187.0.0",
75
75
  "@mtcute/tl-runtime": "^0.16.9",
76
76
  "@types/events": "3.0.0",
@@ -10,7 +10,7 @@ export declare class MemoryPeersRepository implements IPeersRepository {
10
10
  readonly state: PeersState;
11
11
  constructor(_driver: MemoryStorageDriver);
12
12
  store(peer: IPeersRepository.PeerInfo): void;
13
- getById(id: number): IPeersRepository.PeerInfo | null;
13
+ getById(id: number, allowMin: boolean): IPeersRepository.PeerInfo | null;
14
14
  getByUsername(username: string): IPeersRepository.PeerInfo | null;
15
15
  getByPhone(phone: string): IPeersRepository.PeerInfo | null;
16
16
  deleteAll(): void;
@@ -8,7 +8,8 @@ export declare class SqlitePeersRepository implements IPeersRepository {
8
8
  private _store;
9
9
  store(peer: IPeersRepository.PeerInfo): void;
10
10
  private _getById;
11
- getById(id: number): IPeersRepository.PeerInfo | null;
11
+ private _getByIdAllowMin;
12
+ getById(id: number, allowMin: boolean): IPeersRepository.PeerInfo | null;
12
13
  private _getByUsername;
13
14
  getByUsername(username: string): IPeersRepository.PeerInfo | null;
14
15
  private _getByPhone;