diff --git a/types.d.ts b/types.d.ts index 5ff37bf..07427d0 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1,14 +1,24 @@ declare module 'api-query-params' { + type PopulateOptions = { + path: string; + select?: any; + } + + type Query = { + [key: string]: undefined | string | string[] | Query | Query[] + } + export type AqpQuery = { filter: Record; skip: number; limit: number; sort: Record; projection: Record; + population: PopulateOptions[]; }; function aqp( - query: string | Record, + query: string | Query, opt?: { skipKey?: string; limitKey?: string; @@ -26,4 +36,4 @@ declare module 'api-query-params' { ): AqpQuery; export default aqp; -} +} \ No newline at end of file