Sorry, no results found for "".
Returns a resource object of type item_current_vs_published_state
import { buildClient } from "@datocms/cma-client-node";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const itemId = "hWl-mnkWRYmMCSTq4z_piQ";
const item = await client.items.currentVsPublishedState(itemId);
// Check the 'Returned output' tab for the result ☝️ console.log(item);}
run();
{ id: "EnO-NF5wRy6K-cxGt1doqg", current_version_locales: [""], published_version_locales: [""], changed_locales: [""], added_locales: [""], removed_locales: [""], non_localized_fields_changed: true, current_version_invalid_locales: [""], current_version_non_localized_fields_invalid: true, scheduled_publication: { type: "scheduled_publication", id: "34" }, scheduled_unpublishing: { type: "scheduled_unpublishing", id: "34" }, published_version: { type: "item_version", id: "59JSonvYTCOUDz_b7_6hvA" },}