File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { FolderApi } from "@lowcoder-ee/api/folderApi" ;
2
+ import { FetchFolderElementsPaginationPayload } from "@lowcoder-ee/redux/reduxActions/folderActions" ;
3
+
4
+ export const fetchFolderElements = async ( request : FetchFolderElementsPaginationPayload ) => {
5
+ try {
6
+ const response = await FolderApi . fetchFolderElementsPagination ( request ) ;
7
+ return {
8
+ success : true ,
9
+ data : response . data . data ,
10
+ total :response . data . total
11
+ } ;
12
+ } catch ( error ) {
13
+ console . error ( 'Failed to fetch data:' , error ) ;
14
+ return {
15
+ success : false ,
16
+ error : error
17
+ } ;
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ type ApplicationType = {
2
+ [ key : number ] : string ; // This allows numeric indexing
3
+ } ;
4
+
5
+ // Define the const with explicit type
6
+ export const ApplicationPaginationType : ApplicationType = {
7
+ 0 : "" ,
8
+ 1 : "APPLICATION" ,
9
+ 2 : "MODULE" ,
10
+ 3 : "NAVLAYOUT" ,
11
+ 4 : "FOLDER" ,
12
+ 6 : "MOBILETABLAYOUT" ,
13
+ 7 : "NAVIGATION" ,
14
+ } ;
You can’t perform that action at this time.
0 commit comments