UNPKG

@avonjs/avonjs

Version:

A fluent Node.js API generator.

27 lines (26 loc) 822 B
import { type OpenApiSchema } from '../Contracts'; import type AvonRequest from '../Http/Requests/AvonRequest'; import type { Repository } from '../Repositories'; import Filter from './Filter'; export default abstract class TextFilter extends Filter { /** * The help text for the filter. */ helpText?: string; /** * Apply the filter into the given repository. */ apply(request: AvonRequest, repository: Repository, value: string): void; /** * Get the attribute that the date filter should perform on it. */ abstract filterableAttribute(request: AvonRequest): string; /** * Format given value for search. */ formatSearchValue(value: string): string; /** * Get the swagger-ui schema. */ schema(request: AvonRequest): OpenApiSchema; }