Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

PermissionClaim: PermissionClaimClass = PermissionClaim
UserRoleClaim: UserRoleClaimClass = UserRoleClaim
init: ((config?: TypeInput) => RecipeListFunction) = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • addRoleToUser(tenantId: string, userId: string, role: string, userContext?: Record<string, any>): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • tenantId: string
    • userId: string
    • role: string
    • Optional userContext: Record<string, any>

    Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

  • createNewRoleOrAddPermissions(role: string, permissions: string[], userContext?: Record<string, any>): Promise<{ createdNewRole: boolean; status: "OK" }>
  • Parameters

    • role: string
    • permissions: string[]
    • Optional userContext: Record<string, any>

    Returns Promise<{ createdNewRole: boolean; status: "OK" }>

  • deleteRole(role: string, userContext?: Record<string, any>): Promise<{ didRoleExist: boolean; status: "OK" }>
  • getAllRoles(userContext?: Record<string, any>): Promise<{ roles: string[]; status: "OK" }>
  • getPermissionsForRole(role: string, userContext?: Record<string, any>): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • role: string
    • Optional userContext: Record<string, any>

    Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

  • getRolesForUser(tenantId: string, userId: string, userContext?: Record<string, any>): Promise<{ roles: string[]; status: "OK" }>
  • Parameters

    • tenantId: string
    • userId: string
    • Optional userContext: Record<string, any>

    Returns Promise<{ roles: string[]; status: "OK" }>

  • getRolesThatHavePermission(permission: string, userContext?: Record<string, any>): Promise<{ roles: string[]; status: "OK" }>
  • getUsersThatHaveRole(tenantId: string, role: string, userContext?: Record<string, any>): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • tenantId: string
    • role: string
    • Optional userContext: Record<string, any>

    Returns Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>

  • removePermissionsFromRole(role: string, permissions: string[], userContext?: Record<string, any>): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • role: string
    • permissions: string[]
    • Optional userContext: Record<string, any>

    Returns Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>

  • removeUserRole(tenantId: string, userId: string, role: string, userContext?: Record<string, any>): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • tenantId: string
    • userId: string
    • role: string
    • Optional userContext: Record<string, any>

    Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

Generated using TypeDoc