diff --git a/packages/client/src/components/app/DataProvider.svelte b/packages/client/src/components/app/DataProvider.svelte index 7b0dcb123b..99831ec65d 100644 --- a/packages/client/src/components/app/DataProvider.svelte +++ b/packages/client/src/components/app/DataProvider.svelte @@ -5,7 +5,9 @@ fetchData, QueryUtils, DataFetchOptions, - ProviderDatasource, + DataFetchDatasource, + UserDatasource, + GroupUserDatasource, } from "@budibase/frontend-core" import { LogicalOperator, @@ -16,6 +18,11 @@ } from "@budibase/types" import { SDK, Component } from "../../index" + type ProviderDatasource = Exclude< + DataFetchDatasource, + UserDatasource | GroupUserDatasource + > + export let dataSource: ProviderDatasource export let filter export let sortColumn diff --git a/packages/frontend-core/src/fetch/index.ts b/packages/frontend-core/src/fetch/index.ts index 32c5aa5b21..93ad79ec32 100644 --- a/packages/frontend-core/src/fetch/index.ts +++ b/packages/frontend-core/src/fetch/index.ts @@ -17,6 +17,8 @@ import { Table, ViewV2Enriched } from "@budibase/types" export type DataFetchType = keyof typeof DataFetchMap export type { DataFetchOptions } from "./DataFetch" +export type { UserDatasource } from "./UserFetch" +export type { GroupUserDatasource } from "./GroupUserFetch" export const DataFetchMap = { table: TableFetch, @@ -78,11 +80,6 @@ export type DataFetchDatasource = | NestedProviderDatasource | FieldDatasource<"field" | "queryarray" | "jsonarray"> -export type ProviderDatasource = Exclude< - DataFetchDatasource, - UserDatasource | GroupUserDatasource -> - export type DataFetchDefinition = | Table | ViewV2Enriched diff --git a/packages/frontend-core/src/index.ts b/packages/frontend-core/src/index.ts index 32eb532503..ba80bb3af6 100644 --- a/packages/frontend-core/src/index.ts +++ b/packages/frontend-core/src/index.ts @@ -4,7 +4,9 @@ export { fetchData, DataFetchMap } from "./fetch" export type { DataFetchType, DataFetchOptions, - ProviderDatasource, + DataFetchDatasource, + UserDatasource, + GroupUserDatasource, } from "./fetch" export * as Constants from "./constants" export * from "./stores"