diff --git a/packages/types/src/ui/stores/grid/fetch.ts b/packages/types/src/ui/stores/grid/fetch.ts
index a8732c66e3..5f42db24b0 100644
--- a/packages/types/src/ui/stores/grid/fetch.ts
+++ b/packages/types/src/ui/stores/grid/fetch.ts
@@ -19,20 +19,41 @@ interface SearchOptions {
bookmark: null
}
-export interface UIFetchAPI {
+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
- searchTable(tableId: string, options: SearchOptions): any
-
- viewV2: {
- fetchDefinition: (datasourceId: string) => Promise
- fetch: (datasourceId: string, options: SearchOptions) => any
- }
+ viewV2: ViewV2API
resetKey: string | null
error: any