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