import client from '../client' ; import { AxiosRequestConfig } from 'axios' ; export interface Args { folderId : string ; options : Record < string , any > ; } export async function folderCopy ( opts , context ) { const { folderId , options } = opts || { } ; if ( ! folderId ) throw new Error ( 'You should provide `folderId`' ) ; if ( ! options . parent ) throw new Error ( 'You should provide `parent`' ) ; const res = await client . delete ( `/copy_folder/${ folderId }` , { ... context , ... options } ) ; return res ?. data ?. data [ 0 ] ; }