import { MountMode, OneDriveResource, Workspace } from '@struktoai/mirage-node'
const drive = new OneDriveResource({
accessToken: () => getMicrosoftGraphToken(),
// Name at most one drive; none means /me/drive.
// driveId: '...', // explicit Graph drive ID
// siteId: '...', // a SharePoint site's default drive
// groupId: '...', // a Teams / Microsoft 365 group's library
// userId: '...', // another user's drive (app-only auth)
// graphBaseUrl: 'https://graph.microsoft.us/v1.0', // non-worldwide root
// keyPrefix: 'Reports', // optional folder-scoped mount
})
const ws = new Workspace({ '/onedrive': drive }, { mode: MountMode.WRITE })
await ws.execute('ls /onedrive/')