How to create programmatically new roles and add restrictions in strapi required help

Any snippet for it?