Properties(routes/event handler) in the Start Page are actually in the Flow itself.
You can get the routes for the Start Page by utilizing GetFlow Node.js Method.
Then to modify the Start Page routes for transitioning, you can use the updateFlow Node.js Method and update the transitionRoutes field to route to another page.
Here is the sample code for your reference:
const {FlowsClient} = require('@google-cloud/dialogflow-cx');
const client = new FlowsClient();
async function updateFlow() {
const flowPath = client.flowPath(
projectId,
location,
agentId,
flowId
);
console.info(flowPath);
const request = {
flow: {
name: flowPath,
transitionRoutes: [{
intent: "projects/<PROJECT_ID>/locations/<LOCATION_ID>/agents/<AGENT_ID>/intents/<INTENT_ID>",
condition: "",
triggerFulfillment: {
messages: [{
text: {
"text": ["<TEXT>"],
},
message: "text"
}],
setParameterActions: [],
conditionalCases: [],
webhook: "",
tag: ""
},
name: "<NAME>"
}]
},
updateMask: {
paths: ["UPDATE_MASK"]
},
languageCode: "<LANGUAGE_CODE>"
};
const [response] = await client.updateFlow(request);
console.log(response);
}
const projectId = "<PROJECT_ID>"
const agentId = "<AGENT_ID>"
const location = "<LOCATION ID>"
const flowId = "<FLOW ID>"
updateFlow(projectId, agentId, location, flowId);
You can get the IDs from the agent URL. For the Flow ID you would have to select first the desired flow before copying the agent URL.
You can also check the equivalent methods in REST API for more information: projects.locations.agents.flows.get and projects.locations.agents.flows.patch.