Sorry, no results found for "".
1import { buildClient } from "@datocms/cma-client-node";2 3async function run() {4 const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });5 6 const editingSessionId = "312";7 8 const editingSession = await client.editingSessions.rawUpdate(9 editingSessionId,10 {11 type: "editing_session_enter_item",12 relationships: {13 item: { data: { type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" } },14 },15 },16 );17 18 // Check the 'Returned output' tab for the result ☝️19 console.log(editingSession);20}21 22run();
1{2 type: "editing_session",3 id: "312",4 attributes: {5 last_activity_at: "2019-03-30T09:29:14.872Z",6 locked_at: "2019-03-30T09:29:14.872Z",7 },8 relationships: {9 editor: { data: { type: "account", id: "312" } },10 active_item: { data: { type: "item", id: "hWl-mnkWRYmMCSTq4z_piQ" } },11 active_item_type: {12 data: { type: "item_type", id: "DxMaW10UQiCmZcuuA-IkkA" },13 },14 },15}