import { initializeMeshSDK, logResponse } from "./util";
import {
    MoveFileRequest,
    MoveFileResponse
} from "@instruxi-io/mesh-sdk-core";

async function main() {
    try {
        const mesh = await initializeMeshSDK();
      
        const moveFileRequest: MoveFileRequest = { 
            file_id: '',
            destination: '', 
            access_grant: ''// OPTIONAL if Admin
        }
        const moveFileResponse: MoveFileResponse = await mesh.os.moveFile(moveFileRequest);
        await logResponse('moveFile:', moveFileResponse);

    } catch (error) {
        console.error("An error occurred:", error);
    }
}

main().catch((error) => {
    console.error("Unhandled error in main function:", error);
    process.exit(1);
});