/** * Copyright 2023 Kapeta Inc. * SPDX-License-Identifier: BUSL-1.1 */ import { StringMap } from '../types'; /** * A path template is a string that can be used to match a path and extract variables from it. * * E.g. /foo/{bar}/baz * * Would match /foo/123/baz and extract bar=123 * * You can also specify a regex for the variable: * /foo/{bar:[0-9]+}/baz * */ export declare class PathTemplate { private _path; private _parts; constructor(pathTemplate: string); get path(): string; matches(path: string): boolean; parse(path: string): StringMap | null; create(variables: StringMap): string; toString(): string; } /** * Parses a path into a RESTPath */ export declare function pathTemplateParser(path: string): PathTemplate;