Lupa API Reference / network/types / RouteDefinition
Interface: RouteDefinition
Defined in: src/network/types.ts:153
Internal representation of an active mock route within the RouteStore.
Properties
headers?
optionalheaders?:Record<string,string>
Defined in: src/network/types.ts:172
Normalized headers required for a successful match.
id
id:
number
Defined in: src/network/types.ts:157
Unique identifier of the registered mock.
lifetime?
optionallifetime?:number
Defined in: src/network/types.ts:182
Maximum number of times this mock should be applied.
methods?
optionalmethods?:string[]
Defined in: src/network/types.ts:167
Normalized HTTP methods to match.
pattern?
optionalpattern?:URLPattern
Defined in: src/network/types.ts:162
Compiled URLPattern for matching request URLs.
query?
optionalquery?:Record<string,string|string[]>
Defined in: src/network/types.ts:177
Declarative query parameter key-value pairs to match against parsed URL parameters.
usageCount
usageCount:
number
Defined in: src/network/types.ts:187
Number of times this mock has been successfully matched.