import Intelliprint from 'intelliprint'
const ip = new Intelliprint('your-api-key-here')
const printJob = await ip.prints.delete('print-job-id')
// If this print job was unconfirmed, `deleted` will be `true`.
console.log(`Print job deleted: ${printJob.deleted}`)
// If this print job was confirmed, as many `letters` as possible will have their status set to `cancelled`.
// Check the status of each letter in the print job.
for (const item of printJob?.letters ?? []) {
console.log(`Letter ${item.id} is: ${item.status}`)
}