import { Sandbox } from 'novita-sandbox/code-interpreter'
const sandbox = await Sandbox.create()
console.log('Sandbox created', sandbox.sandboxId)
// Pause the sandbox.
// You can save the sandbox ID in your database
// to resume the sandbox later
const result = await sandbox.betaPause()
console.log('Sandbox paused', sandbox.sandboxId, result)
// Resume the sandbox from the same state.
const resumedSandbox = await sandbox.connect()
console.log('Sandbox resumed', resumedSandbox.sandboxId)
await sandbox.kill()