import { Metadata } from "@grpc/grpc-js"; import { Fraction } from "./fraction"; /** * An object representing a predicate that determines whether a given * combination of a methodName and metadata matches some internal conditions. */ export interface Matcher { toString(): string; apply(methodName: string, metadata: Metadata): boolean; } /** * An object representing a predicate that determines whether a given string * value matches some internal conditions. */ export interface ValueMatcher { toString(): string; apply(value: string): boolean; } export declare class ExactValueMatcher implements ValueMatcher { private targetValue; private ignoreCase; constructor(targetValue: string, ignoreCase: boolean); apply(value: string): boolean; toString(): string; } export declare class SafeRegexValueMatcher implements ValueMatcher { private targetRegexImpl; constructor(targetRegex: string); apply(value: string): boolean; toString(): string; } export declare class RangeValueMatcher implements ValueMatcher { private start; private end; constructor(start: bigint, end: bigint); apply(value: string): boolean; toString(): string; } export declare class PresentValueMatcher implements ValueMatcher { constructor(); apply(value: string): boolean; toString(): string; } export declare class PrefixValueMatcher implements ValueMatcher { private prefix; private ignoreCase; constructor(prefix: string, ignoreCase: boolean); apply(value: string): boolean; toString(): string; } export declare class SuffixValueMatcher implements ValueMatcher { private suffix; private ignoreCase; constructor(suffix: string, ignoreCase: boolean); apply(value: string): boolean; toString(): string; } export declare class ContainsValueMatcher implements ValueMatcher { private contains; private ignoreCase; constructor(contains: string, ignoreCase: boolean); apply(value: string): boolean; toString(): string; } export declare class RejectValueMatcher implements ValueMatcher { constructor(); apply(value: string): boolean; toString(): string; } export declare class HeaderMatcher implements Matcher { private headerName; private valueMatcher; private invertMatch; constructor(headerName: string, valueMatcher: ValueMatcher, invertMatch: boolean); private applyHelper; apply(methodName: string, metadata: Metadata): boolean; toString(): string; } export declare class PathPrefixValueMatcher { private prefix; private caseInsensitive; constructor(prefix: string, caseInsensitive: boolean); apply(value: string): boolean; toString(): string; } export declare class PathExactValueMatcher { private targetValue; private caseInsensitive; constructor(targetValue: string, caseInsensitive: boolean); apply(value: string): boolean; toString(): string; } export declare class PathSafeRegexValueMatcher { private targetRegexImpl; constructor(targetRegex: string); apply(value: string): boolean; toString(): string; } export declare class FullMatcher implements Matcher { private pathMatcher; private headerMatchers; private fraction; constructor(pathMatcher: ValueMatcher, headerMatchers: Matcher[], fraction: Fraction | null); apply(methodName: string, metadata: Metadata): boolean; toString(): string; }