// Create a draft
await client.action({
actionType: 'sanity.action.document.create',
publishedId: 'bike-123',
attributes: {name: 'New Bike', _type: 'bike'},
ifExists: 'fail'
})
// Publish a draft
await client.action({
actionType: 'sanity.action.document.publish',
draftId: 'drafts.bike-123',
publishedId: 'bike-123'
})
Actions that can be performed on documents. These are high-level operations that combine multiple mutations.