import { tl } from '@mtcute/tl'; import { BasicPeerType } from '../types/peers.js'; /** * Add or remove channel marker from ID */ export declare function toggleChannelIdMark(id: number): number; /** * Get the bare (non-marked) ID from a {@link tl.TypePeer} */ export declare function getBarePeerId(peer: tl.TypePeer): number; /** * Get the marked (non-bare) ID from a {@link tl.TypePeer} * * Mark* is bot API compatible, which is: * - ID stays the same for users * - ID is negated for chats * - ID is negated and `-1e12` is subtracted for channels */ export declare function getMarkedPeerId(peerId: number, peerType: BasicPeerType): number; export declare function getMarkedPeerId(peer: tl.TypePeer | tl.TypeInputPeer | tl.TypeInputUser | tl.TypeInputChannel): number; /** * Parse a marked ID into a {@link BasicPeerType} and a bare ID */ export declare function parseMarkedPeerId(id: number): [BasicPeerType, number]; /** * Extracts all (cacheable) entities from a TlObject or a list of them. * Only checks `.user`, `.chat`, `.channel`, `.users` and `.chats` properties */ export declare function getAllPeersFrom(obj: tl.TlObject | tl.TlObject[]): Iterable; /** Get the {@link BasicPeerType} of a peer, either by its marked ID or by its TL object */ export declare function getBasicPeerType(id: number | tl.TypePeer | tl.TypeInputPeer | tl.TypeInputUser | tl.TypeInputChannel): BasicPeerType;