From 553bef9859c8fa6ce0e185ac825c835ad7e83d2e Mon Sep 17 00:00:00 2001 From: Pierluigi Viti Date: Tue, 9 Apr 2024 16:13:23 +0200 Subject: [PATCH] fix: fix query filters generics --- src/query.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/query.ts b/src/query.ts index dba6007..0f45844 100644 --- a/src/query.ts +++ b/src/query.ts @@ -19,7 +19,7 @@ type QueryResourceFields = keyof ResourceFields[R] type QueryArrayFields = Array>> type QueryRecordFields = { [key in keyof ResourceFields]?: Array<(QueryResourceFields)> } -interface QueryParamsRetrieve { +interface QueryParamsRetrieve { include?: QueryInclude fields?: QueryArrayFields | QueryRecordFields } @@ -33,14 +33,14 @@ type QueryFilter = Record -interface QueryParamsList extends QueryParamsRetrieve { +interface QueryParamsList extends QueryParamsRetrieve { sort?: QueryArraySortable | QueryRecordSortable filters?: QueryFilter pageNumber?: QueryPageNumber pageSize?: QueryPageSize } -type QueryParams = QueryParamsRetrieve | QueryParamsList +type QueryParams = QueryParamsRetrieve | QueryParamsList export type { QueryParamsRetrieve, QueryParamsList, QueryParams, QueryFilter, QueryPageSize }