/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { rbacGetRBACRole } from "../funcs/rbac-get-rbac-role.js"; import { rbacListRBACRoles } from "../funcs/rbac-list-rbac-roles.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; import * as models from "./models/index.js"; export class Rbac extends ClientSDK { /** * List all RBAC roles * * @remarks * Use when building role pickers or permission UIs. Returns all roles with permissions and descriptions. */ async listRbacRoles( userType?: models.ListRbacRolesUserType | undefined, options?: RequestOptions, ): Promise<{ [k: string]: any }> { return unwrapAsync(rbacListRBACRoles( this, userType, options, )); } /** * Get a specific RBAC role * * @remarks * Use when you need to show or edit a single role (e.g. role detail page). Includes permissions, name, and description. */ async getRbacRole( id: string, options?: RequestOptions, ): Promise<{ [k: string]: any }> { return unwrapAsync(rbacGetRBACRole( this, id, options, )); } }