Fixing build issue.

This commit is contained in:
mike12345567 2024-05-22 16:02:11 +01:00
parent ff8684d9b4
commit 2ed510dc90
2 changed files with 7 additions and 5 deletions

View File

@ -4,8 +4,8 @@ import {
SearchRowResponse,
SearchViewRowRequest,
RequiredKeys,
SearchFilters,
RowSearchParams,
SearchFilterKey,
} from "@budibase/types"
import { dataFilters } from "@budibase/shared-core"
import sdk from "../../../sdk"
@ -45,10 +45,7 @@ export async function searchView(
// Carry over filters for unused fields
Object.keys(body.query).forEach(key => {
const operator = key as keyof Omit<
SearchFilters,
"allOr" | "onEmptyFilter"
>
const operator = key as SearchFilterKey
Object.keys(body.query[operator] || {}).forEach(field => {
if (!existingFields.includes(db.removeKeyNumbering(field))) {
query[operator]![field] = body.query[operator]![field]

View File

@ -64,6 +64,11 @@ export interface SearchFilters {
}
}
export type SearchFilterKey = keyof Omit<
SearchFilters,
"allOr" | "onEmptyFilter" | "fuzzyOr"
>
export type SearchQueryFields = Omit<SearchFilters, "allOr" | "onEmptyFilter">
export interface SortJson {