declare enum DataType {
    nil = 0,
    string = 1,
    object = 2,
    array = 3
}
interface IData {
    /**
     * type of data 0: undefined/null, 1: string, 2: object, 3: array
     */
    type: DataType;
    /**
     * original values (except undefined/null)
     */
    val: (string | undefined)[][];
    /**
     * cache for encoded values (only for non-maxlength expansion)
     */
    strictEncode: (string | undefined)[][];
    encodeReserved: (string | undefined)[][];
}
declare class Data {
    cache: Record<string, IData>;
    data: Record<string, unknown> | ((input: string) => string);
    constructor(data: Record<string, unknown> | ((input: string) => string));
    get(key: string): IData;
}
interface IOperator {
    prefix: string;
    separator: string;
    named: boolean;
    empty_name_separator: boolean;
    encode: 'strictEncode' | 'encodeReserved';
}
interface IVariable {
    name: string;
    explode: boolean;
    maxlength?: number;
}
interface IPart {
    expression: string;
    operator: string;
    variables: IVariable[];
}
export interface IUriTemplateParseOptions {
    /**
     * Throws an error when template literals are invalid
     */
    strict?: boolean;
}
export interface IUriTemplateOptions extends IUriTemplateParseOptions {
    /**
     * When set it ignores replacing the value in the template when the variable is missing.
     */
    ignoreMissing?: boolean;
}
/**
 * Processor for URI templates: http://tools.ietf.org/html/rfc6570
 */
export declare class UriTemplate {
    protected expression: string;
    parts?: (string | IPart)[];
    /**
     * Allows to ache and reuse cached instances.
     *
     * @param uri The URI string.
     * @returns
     */
    static fromUri(uri: string): UriTemplate;
    /**
     * @param expression The URI string.
     */
    constructor(expression: string);
    /**
     * Expands the template with the given map values.
     *
     * @param map The map with values
     * @param opts Processing options
     * @returns The expanded URI.
     */
    expand(map: Record<string, unknown> | ((key: string) => string), opts?: IUriTemplateOptions): string;
    /**
     * Parses the template into action tokens.
     */
    parse(opts?: IUriTemplateParseOptions): void;
    /**
     * Creates a Data object with the passed map.
     *
     * @param map The map with values.
     */
    protected static getData(map: Record<string, unknown> | ((key: string) => string)): Data;
    /**
     * Can be used by a child class to manipulate string parts that are not template expressions
     *
     * @param part The string part
     * @returns The processed part.
     */
    protected static expandString(part: string): string;
    protected static expand(expression: IPart, data: Data, opts?: IUriTemplateOptions): string;
    /**
     * Expands a named variable.
     */
    protected static expandNamed(d: IData, options: IOperator, explode: boolean, separator: string, length?: number, name?: string): string;
    /**
     * Expands an unnamed variable.
     */
    protected static expandUnnamed(d: IData, options: IOperator, explode: boolean, separator: string, length?: number): string;
}
export {};
//# sourceMappingURL=UriTemplate.d.ts.map