UNPKG

@schamane/small-graphql-mongoose-middleware

Version:

![Check Code](https://github.com/schamane/small-graphql-mongoose-middleware/workflows/Check%20Code/badge.svg)

43 lines (42 loc) 906 B
export declare enum FilterOperator { EQ = "eq", NE = "ne", LT = "lt", LTE = "lte", GT = "gt", GTE = "gte", BT = "bt", CONTAINS = "contains", IN = "in", NIN = "nin" } export interface SortObject { [key: string]: string; } declare type FilterValue = boolean | number | string | number[] | string[]; export interface Filter { operator: FilterOperator; name: string; value: FilterValue; } export declare enum SortDirection { ASC = "asc", DESC = "desc" } export interface Sorter { name: string; direction: SortDirection; } export declare enum GraphqlQueryType { AND = "$and", OR = "$or" } export declare type QueryFieldObject = { type?: GraphqlQueryType; fields: string[]; }; export declare type QueryFields = QueryFieldObject | string; export declare type QueryFieldsType = { [key: string]: QueryFields; }; export {};