/** * MTKruto - Cross-runtime JavaScript library for building Telegram clients * Copyright (C) 2023-2026 Roj * * This file is part of MTKruto. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ import type { Api } from "../2_tl.js"; import type { ChatP, PeerGetter } from "./1_chat_p.js"; import { type User } from "./2_user.js"; /** * A privacy rule that allows or disallows contacts. * @unlisted */ export interface PrivacyRuleContacts { type: "contacts"; /** Whether contacts are allowed. */ isAllowed: boolean; } /** * A privacy rule that allows or disallows everybody. * @unlisted */ export interface PrivacyRuleEverybody { type: "everybody"; /** Whether everybody is allowed. */ isAllowed: boolean; } /** * A privacy rule that allows or disallows specific users. * @unlisted */ export interface PrivacyRuleUsers { type: "users"; /** A list of users. */ users: User[]; /** Whether the users are allowed. */ isAllowed: boolean; } /** * A privacy rule that allows close friends. * @unlisted */ export interface PrivacyRuleCloseFriends { type: "closeFriends"; } /** * A privacy rule that allows premium users. * @unlisted */ export interface PrivacyRulePremium { type: "premium"; } /** * A privacy rule that allows or disallows bots. * @unlisted */ export interface PrivacyRuleBots { type: "bots"; /** Whether bots are allowed. */ isAllowed: boolean; } /** * A privacy rule that allows or disallows members of specific chats. * @unlisted */ export interface PrivacyRuleChatMembers { type: "chatMembers"; /** A list of chats. */ chats: ChatP[]; /** Whether members of the chats are allowed. */ isAllowed: boolean; } /** Any type of privacy rule. */ export type PrivacyRule = PrivacyRuleContacts | PrivacyRuleEverybody | PrivacyRuleUsers | PrivacyRuleCloseFriends | PrivacyRulePremium | PrivacyRuleBots | PrivacyRuleChatMembers; export declare function constructPrivacyRule(pr: Api.PrivacyRule, getPeer: PeerGetter): PrivacyRule; //# sourceMappingURL=3_privacy_rule.d.ts.map