diff --git a/packages/types/src/ui/stores/grid/fetch.ts b/packages/types/src/ui/stores/grid/fetch.ts deleted file mode 100644 index 5f42db24b0..0000000000 --- a/packages/types/src/ui/stores/grid/fetch.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - Row, - SearchFilters, - SortOrder, - SortType, - Table, - UIDatasource, - UILegacyFilter, - UISearchFilter, -} from "@budibase/types" - -interface SearchOptions { - query?: SearchFilters | null | undefined - limit: number - sort: string | null - sortOrder: string | undefined - sortType: SortType | null - paginate: boolean - bookmark: null -} - -interface TableAPI { - fetchTableDefinition(tableId: string): Promise - searchTable(tableId: string, options: SearchOptions): any -} - -interface ViewV2API { - fetchDefinition: (datasourceId: string) => Promise - fetch: (datasourceId: string, options: SearchOptions) => any -} - -interface UserAPI { - searchUsers: (opts: { - bookmark: null - query: - | SearchFilters - | { - string: { - email: null - } - } - | null - appId: string - paginate: boolean - limit: number - }) => Promise -} - -export interface UIFetchAPI extends TableAPI, UserAPI { - definition: UIDatasource - - getInitialData: () => Promise - loading: any - loaded: boolean - - viewV2: ViewV2API - - resetKey: string | null - error: any - - hasNextPage: boolean - nextPage: () => Promise - - rows: Row[] - - options?: { - datasource?: { - tableId: string - id: string - } - } - update: ({ - sortOrder, - sortColumn, - }: { - sortOrder?: SortOrder - sortColumn?: string - filter?: UILegacyFilter[] | UISearchFilter - }) => any -} diff --git a/packages/types/src/ui/stores/grid/index.ts b/packages/types/src/ui/stores/grid/index.ts index f419134452..7c3b6d4cb4 100644 --- a/packages/types/src/ui/stores/grid/index.ts +++ b/packages/types/src/ui/stores/grid/index.ts @@ -6,4 +6,3 @@ export * from "./view" export * from "./user" export * from "./filters" export * from "./rows" -export * from "./fetch"