Releases: sanity-io/client
Releases · sanity-io/client
v7.3.0
v7.2.2
v7.2.1
v7.2.0
7.2.0 (2025-05-09)
Features
Content Release and Document Version operations (#1067) (9b80bd8)
The client now has complete abstractions and types for all Content Lake release and version actions.
These are available to be used directly interfacing with the server action:
client.action(
{
actionType: 'sanity.action.document.version.create',
publishedId: 'bike-123',
document: {
_id: 'versions.new-bike-release.bike-123'
_type: 'bike'
}
}
)Or additionally through method abstractions which provide more unified concepts such as releaseId and publishedId, in addition to client side guards on mismatching IDs:
client.createVersion(
{
publishedId: 'bike-123',
releaseId: 'new-bike-release',
document: {
_type: 'bike'
}
}
)Important
Deprecation notice of some document server actions
The discard and replaceDraft actions now have deprecation notices in the client, to reflect updates on the underlying Content Lake API.
discard is superseded by discardVersion and replaceDraft by replaceVersion