1 import { SORT_DIRECTION } from '../../constants';
2 import { DEFAULT_SORT_FIELD, DEFAULT_SORT_ORDER, FOLDER_PAGE_SIZE } from '../../drive/constants';
3 import type { CreateNewFolder } from '../../interfaces/drive/folder';
5 export const queryFolderChildren = (
10 PageSize = FOLDER_PAGE_SIZE,
12 Sort = DEFAULT_SORT_FIELD,
13 Desc = DEFAULT_SORT_ORDER === SORT_DIRECTION.ASC ? 0 : 1,
14 }: { Page: number; PageSize?: number; FoldersOnly?: number; Sort?: string; Desc?: 0 | 1 }
17 url: `drive/shares/${shareID}/folders/${linkID}/children`,
18 params: { Page, PageSize, FoldersOnly, Sort, Desc, Thumbnails: 1 },
21 export const queryCreateFolder = (shareID: string, data: CreateNewFolder) => ({
23 url: `drive/shares/${shareID}/folders`,