No, you have to create a map yourself
//This is build by hand and need to be update by hand
const ROLES = {
"My Role 1": "ROLES_ID",
"My Role 2": "ROLES_ID-2",
};
//This is the role you want to have the id
const userRoleName = "My Role 1";
//You get the role Id
cosnt roleId = ROLES[userRolesName];
The question was posted a year ago, So this comment is for other readers.
AFAIK, you can not programmatically create a role.
That means number of roles are always countable and are decided at static time.
I guess that is the reason none of the Role API (other than for current user) is provided by Velo.
You can check the role IDs here:
https://manage.wix.com/dashboard/<dashboard_id>/member-permissions/roles