How to get account through deviceID at server runtime

Is there a way for the typescript runtime to get account by deviceID like the Nakama Console account filter?
Additionally, if I want to delete all accounts, how should I operate quickly?
Thanks

Can anyone help me?

Hello,
I think there is no such functionality in Runtime, one possible solution is to write custom SQL code to fetch user by deviceID.

Regarding deleting all the users and their data, possibly the easiest solution would be to run an SQL query for that too.