---
title: supertokens-node/recipe/userroles/types
description: References documentation for the supertokens-node/recipe/userroles/types package
sidebar:
  order: 280
---

## Type Aliases

### APIInterface

```ts check=false reason="Generated API signature"
type APIInterface = object;
```

Defined in: [recipe/userroles/types.ts:43](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L43)

***

### RecipeInterface

```ts check=false reason="Generated API signature"
type RecipeInterface = object;
```

Defined in: [recipe/userroles/types.ts:45](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L45)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="addroletouser"></a> `addRoleToUser` | (`input`) => `Promise`\< \| \{ `didUserAlreadyHaveRole`: `boolean`; `status`: `"OK"`; \} \| \{ `status`: `"UNKNOWN_ROLE_ERROR"`; \}\> | [recipe/userroles/types.ts:46](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L46) |
| <a id="createnewroleoraddpermissions"></a> `createNewRoleOrAddPermissions` | (`input`) => `Promise`\<\{ `createdNewRole`: `boolean`; `status`: `"OK"`; \}\> | [recipe/userroles/types.ts:81](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L81) |
| <a id="deleterole"></a> `deleteRole` | (`input`) => `Promise`\<\{ `didRoleExist`: `boolean`; `status`: `"OK"`; \}\> | [recipe/userroles/types.ts:109](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L109) |
| <a id="getallroles"></a> `getAllRoles` | (`input`) => `Promise`\<\{ `roles`: `string`[]; `status`: `"OK"`; \}\> | [recipe/userroles/types.ts:114](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L114) |
| <a id="getpermissionsforrole"></a> `getPermissionsForRole` | (`input`) => `Promise`\< \| \{ `permissions`: `string`[]; `status`: `"OK"`; \} \| \{ `status`: `"UNKNOWN_ROLE_ERROR"`; \}\> | [recipe/userroles/types.ts:90](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L90) |
| <a id="getrolesforuser"></a> `getRolesForUser` | (`input`) => `Promise`\<\{ `roles`: `string`[]; `status`: `"OK"`; \}\> | [recipe/userroles/types.ts:66](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L66) |
| <a id="getrolesthathavepermission"></a> `getRolesThatHavePermission` | (`input`) => `Promise`\<\{ `roles`: `string`[]; `status`: `"OK"`; \}\> | [recipe/userroles/types.ts:104](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L104) |
| <a id="getusersthathaverole"></a> `getUsersThatHaveRole` | (`input`) => `Promise`\< \| \{ `status`: `"OK"`; `users`: `string`[]; \} \| \{ `status`: `"UNKNOWN_ROLE_ERROR"`; \}\> | [recipe/userroles/types.ts:71](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L71) |
| <a id="removepermissionsfromrole"></a> `removePermissionsFromRole` | (`input`) => `Promise`\<\{ `status`: `"OK"` \| `"UNKNOWN_ROLE_ERROR"`; \}\> | [recipe/userroles/types.ts:100](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L100) |
| <a id="removeuserrole"></a> `removeUserRole` | (`input`) => `Promise`\< \| \{ `didUserHaveRole`: `boolean`; `status`: `"OK"`; \} \| \{ `status`: `"UNKNOWN_ROLE_ERROR"`; \}\> | [recipe/userroles/types.ts:56](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L56) |

***

### TypeInput

```ts check=false reason="Generated API signature"
type TypeInput = object;
```

Defined in: [recipe/userroles/types.ts:19](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L19)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="override"></a> `override?` | `object` | [recipe/userroles/types.ts:22](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L22) |
| `override.apis?` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/userroles/types.ts:27](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L27) |
| `override.functions?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/userroles/types.ts:23](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L23) |
| <a id="skipaddingpermissionstoaccesstoken"></a> `skipAddingPermissionsToAccessToken?` | `boolean` | [recipe/userroles/types.ts:21](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L21) |
| <a id="skipaddingrolestoaccesstoken"></a> `skipAddingRolesToAccessToken?` | `boolean` | [recipe/userroles/types.ts:20](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L20) |

***

### TypeNormalisedInput

```ts check=false reason="Generated API signature"
type TypeNormalisedInput = object;
```

Defined in: [recipe/userroles/types.ts:31](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L31)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="override-1"></a> `override` | `object` | [recipe/userroles/types.ts:34](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L34) |
| `override.apis` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/userroles/types.ts:39](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L39) |
| `override.functions` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/userroles/types.ts:35](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L35) |
| <a id="skipaddingpermissionstoaccesstoken-1"></a> `skipAddingPermissionsToAccessToken` | `boolean` | [recipe/userroles/types.ts:33](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L33) |
| <a id="skipaddingrolestoaccesstoken-1"></a> `skipAddingRolesToAccessToken` | `boolean` | [recipe/userroles/types.ts:32](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/userroles/types.ts#L32) |
