React Panel Plugin: How to get access to grafana internal services?

I want to get some dashboard service (timeSrv for example), but there is no such servise in the @grafana/runtime/services. What is the legal way to get them to my plugin code?

And one more spesific question:
I want to set up dashboard time range from within my panel plugin so I’m going to use timeSrv.setTime(). Is this a legal way to change dashboard taime range with new plugin API?

up. I also need an answer to this question.

It seems like the TimeSrv has not yet been migrated to grafana/runtime and is only accessible within internal Grafana repo.

What’s your use case for accessing the timeSrv?