mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-08-25 08:08:00 +00:00
1ada95e04a
- Convert project to Javascript/Typescript - Allow custom headers to be passed in (optional) - Allow body to be optional
18 lines
648 B
TypeScript
18 lines
648 B
TypeScript
export interface MappingEntry {
|
|
readonly pattern: string;
|
|
readonly paths: ReadonlyArray<string>;
|
|
}
|
|
export interface Paths {
|
|
readonly [key: string]: ReadonlyArray<string>;
|
|
}
|
|
/**
|
|
* Converts an absolute baseUrl and paths to an array of absolute mapping entries.
|
|
* The array is sorted by longest prefix.
|
|
* Having an array with entries allows us to keep a sorting order rather than
|
|
* sort by keys each time we use the mappings.
|
|
* @param absoluteBaseUrl
|
|
* @param paths
|
|
* @param addMatchAll
|
|
*/
|
|
export declare function getAbsoluteMappingEntries(absoluteBaseUrl: string, paths: Paths, addMatchAll: boolean): ReadonlyArray<MappingEntry>;
|