I am building a twilio function but I am getting an error using a function that's in the documentation (https://www.twilio.com/docs/taskrouter/api/workspace-statistics?code-sample=code-retrieve-workspace-real-time-statistics&code-language=Node.js&code-sdk-version=3.x) I know the npm version of Twilio is 3.6.3 from (functions/configure).
client.taskrouter.workspaces(workspaceSid)
.realTimeStatistics()
.fetch()
.then(workspace_real_time_statistics => { agentsActive = workspace_real_time_statistics.total_workers});
when running the function I get the following error:
client.taskrouter.workspaces(...).realTimeStatistics is not a function
Below is the Node Helper Library Details.
It looks like it was possibly added in 3.7.0?