From f0d60c606329558308bd9024865b5046e6f12f05 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 2 Jan 2025 15:55:50 +0100 Subject: [PATCH] Fix user types --- packages/frontend-core/src/fetch/UserFetch.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/frontend-core/src/fetch/UserFetch.ts b/packages/frontend-core/src/fetch/UserFetch.ts index 730d96ebd5..be73793768 100644 --- a/packages/frontend-core/src/fetch/UserFetch.ts +++ b/packages/frontend-core/src/fetch/UserFetch.ts @@ -2,10 +2,11 @@ import { get } from "svelte/store" import DataFetch from "./DataFetch.js" import { TableNames } from "../constants" import { utils } from "@budibase/shared-core" -import { Table, UIFetchAPI } from "@budibase/types" +import { BasicOperator, SearchUsersRequest, Table } from "@budibase/types" +import { APIClient } from "../api/types.js" export default class UserFetch extends DataFetch<{ tableId: string }, {}> { - constructor(opts: { API: UIFetchAPI; datasource: Table; options?: {} }) { + constructor(opts: { API: APIClient; datasource: Table; options?: {} }) { super({ ...opts, datasource: { @@ -40,12 +41,12 @@ export default class UserFetch extends DataFetch<{ tableId: string }, {}> { const { appId, paginated, ...rest } = query || ({} as any) // TODO const finalQuery = utils.isSupportedUserSearch(rest) ? query - : { string: { email: null } } + : { [BasicOperator.EMPTY]: { email: true } } // TODO: check try { const opts = { - bookmark: cursor, - query: finalQuery, + bookmark: cursor ?? undefined, + query: finalQuery ?? undefined, appId: appId, paginate: paginated || paginate, limit,