I'm working with the latest release (2.5.0) of the PowerBI JavaScript API and am not able to get the report.switchMode method to succeed. An error is always returned with invalid view mode.
I'm calling this after the this.report has been initialized. I've tried sending in a string for the view mode, to see if it worked like that, but that did not work either.
this.report.switchModel(models.ViewMode.Edit)
In debugging, I can see it's making the following call but I can't figure out what is an acceptable view mode parameter.
'/report/switchMode/' + models.ViewMode.Edit