UNPKG

@metis-w/api-client

Version:

Modern TypeScript HTTP API client with dynamic routes, parameterized endpoints, interceptors, and advanced features

39 lines 1.36 kB
/** * Utility functions for validating dynamic route actions and properties */ export declare class RouteValidator { /** * Reserved property names that should not be treated as API actions */ private static readonly RESERVED_PROPS; /** * Checks if the provided string is a valid action name * @param action - Action name to validate * @returns True if the action is valid, false otherwise */ static isValidAction(action: string): boolean; /** * Checks if a property name is reserved * @param prop - Property name to check * @returns True if the property is reserved, false otherwise */ static isReservedProperty(prop: string): boolean; /** * Validates if a string can be used as a controller name * @param controller - Controller name to validate * @returns True if valid, false otherwise */ static isValidController(controller: string): boolean; /** * Validates if a value can be used as a route ID * @param id - ID to validate * @returns True if valid, false otherwise */ static isValidRouteId(id: string | number): boolean; /** * Gets the list of reserved properties * @returns Array of reserved property names */ static getReservedProperties(): string[]; } //# sourceMappingURL=route-validator.d.ts.map