import { LimitedContext } from "../helpers/matchEndpoints"; import type { Endpoint, EndpointConfig, Domain } from "./Config"; import type { IPList, UserAgentDetails } from "./api/FetchListsAPI"; export declare class ServiceConfig { private lastUpdatedAt; private blockedUserIds; private bypassedIPAddresses; private nonGraphQLEndpoints; private graphqlFields; private blockedIPAddresses; private blockedUserAgentRegex; private allowedIPAddresses; private monitoredIPAddresses; private monitoredUserAgentRegex; private userAgentDetails; private blockNewOutgoingRequests; private domains; private excludedUserIdsFromRateLimiting; private enabledFeatures; constructor(endpoints: EndpointConfig[], lastUpdatedAt: number, blockedUserIds: string[], bypassedIPAddresses: string[], blockedIPAddresses: IPList[], allowedIPAddresses: IPList[]); private setEndpoints; getEndpoints(context: LimitedContext): Endpoint[]; getGraphQLField(context: LimitedContext, name: string, operationType: string): Endpoint | undefined; private setBypassedIPAddresses; isBypassedIP(ip: string): boolean; private setBlockedUserIds; isUserBlocked(userId: string): boolean; isIPAddressBlocked(ip: string): { blocked: true; reason: string; } | { blocked: false; }; private setBlockedIPAddresses; updateBlockedIPAddresses(blockedIPAddresses: IPList[]): void; updateMonitoredIPAddresses(monitoredIPAddresses: IPList[]): void; updateBlockedUserAgents(blockedUserAgents: string): void; isUserAgentBlocked(ua: string): { blocked: boolean; }; updateUserAgentDetails(userAgentDetails: UserAgentDetails[]): void; updateMonitoredUserAgents(monitoredUserAgent: string): void; isMonitoredUserAgent(ua: string): boolean; getMatchingUserAgentKeys(ua: string): string[]; getMatchingBlockedIPListKeys(ip: string): string[]; getMatchingMonitoredIPListKeys(ip: string): string[]; private setAllowedIPAddresses; updateAllowedIPAddresses(ipAddresses: IPList[]): void; isAllowedIPAddress(ip: string): { allowed: boolean; }; updateConfig(endpoints: EndpointConfig[], lastUpdatedAt: number, blockedUserIds: string[], bypassedIPAddresses: string[]): void; getLastUpdatedAt(): number; setBlockNewOutgoingRequests(block: boolean): void; updateDomains(domains: Domain[]): void; shouldBlockOutgoingRequest(hostname: string): boolean; updateUsersExcludedFromRateLimiting(userIds: string[]): void; isUserExcludedFromRateLimiting(userId: string): boolean; updateEnabledFeatures(features: string[]): void; isRealtimeUpdatesEnabled(): boolean; }