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

## Type Aliases

### APIInterface

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

Defined in: [recipe/multitenancy/types.ts:145](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L145)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="loginmethodsget"></a> `loginMethodsGET` | (`input`) => `Promise`\< \| \{ `emailPassword`: \{ `enabled`: `boolean`; \}; `firstFactors`: `string`[]; `passwordless`: \{ `enabled`: `boolean`; \}; `status`: `"OK"`; `thirdParty`: \{ `enabled`: `boolean`; `providers`: `object`[]; \}; \} \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/multitenancy/types.ts:146](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L146) |

***

### APIOptions

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

Defined in: [recipe/multitenancy/types.ts:133](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L133)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="allavailablefirstfactors"></a> `allAvailableFirstFactors` | `string`[] | [recipe/multitenancy/types.ts:141](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L141) |
| <a id="config"></a> `config` | [`TypeNormalisedInput`](#typenormalisedinput) | [recipe/multitenancy/types.ts:135](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L135) |
| <a id="isinserverlessenv"></a> `isInServerlessEnv` | `boolean` | [recipe/multitenancy/types.ts:137](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L137) |
| <a id="recipeid"></a> `recipeId` | `string` | [recipe/multitenancy/types.ts:136](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L136) |
| <a id="recipeimplementation"></a> `recipeImplementation` | [`RecipeInterface`](#recipeinterface) | [recipe/multitenancy/types.ts:134](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L134) |
| <a id="req"></a> `req` | `BaseRequest` | [recipe/multitenancy/types.ts:138](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L138) |
| <a id="res"></a> `res` | `BaseResponse` | [recipe/multitenancy/types.ts:139](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L139) |
| <a id="staticfirstfactors"></a> `staticFirstFactors` | `string`[] \| `undefined` | [recipe/multitenancy/types.ts:142](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L142) |
| <a id="staticthirdpartyproviders"></a> `staticThirdPartyProviders` | [`ProviderInput`](recipe-thirdparty-types#providerinput)[] | [recipe/multitenancy/types.ts:140](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L140) |

***

### RecipeInterface

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

Defined in: [recipe/multitenancy/types.ts:55](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L55)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="associateusertotenant"></a> `associateUserToTenant` | (`input`) => `Promise`\< \| \{ `status`: `"OK"`; `wasAlreadyAssociated`: `boolean`; \} \| \{ `status`: \| `"UNKNOWN_USER_ID_ERROR"` \| `"EMAIL_ALREADY_EXISTS_ERROR"` \| `"PHONE_NUMBER_ALREADY_EXISTS_ERROR"` \| `"THIRD_PARTY_USER_ALREADY_EXISTS_ERROR"`; \} \| \{ `reason`: `string`; `status`: `"ASSOCIATION_NOT_ALLOWED_ERROR"`; \}\> | [recipe/multitenancy/types.ts:102](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L102) |
| <a id="createorupdatetenant"></a> `createOrUpdateTenant` | (`input`) => `Promise`\<\{ `createdNew`: `boolean`; `status`: `"OK"`; \}\> | [recipe/multitenancy/types.ts:59](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L59) |
| <a id="createorupdatethirdpartyconfig"></a> `createOrUpdateThirdPartyConfig` | (`input`) => `Promise`\<\{ `createdNew`: `boolean`; `status`: `"OK"`; \}\> | [recipe/multitenancy/types.ts:87](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L87) |
| <a id="deletetenant"></a> `deleteTenant` | (`input`) => `Promise`\<\{ `didExist`: `boolean`; `status`: `"OK"`; \}\> | [recipe/multitenancy/types.ts:71](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L71) |
| <a id="deletethirdpartyconfig"></a> `deleteThirdPartyConfig` | (`input`) => `Promise`\<\{ `didConfigExist`: `boolean`; `status`: `"OK"`; \}\> | [recipe/multitenancy/types.ts:96](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L96) |
| <a id="disassociateuserfromtenant"></a> `disassociateUserFromTenant` | (`input`) => `Promise`\<\{ `status`: `"OK"`; `wasAssociated`: `boolean`; \}\> | [recipe/multitenancy/types.ts:123](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L123) |
| <a id="gettenant"></a> `getTenant` | (`input`) => `Promise`\<`object` & [`TenantConfig`](#tenantconfig) \| `undefined`\> | [recipe/multitenancy/types.ts:75](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L75) |
| <a id="gettenantid"></a> `getTenantId` | (`input`) => `Promise`\<`string`\> | [recipe/multitenancy/types.ts:56](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L56) |
| <a id="listalltenants"></a> `listAllTenants` | (`input`) => `Promise`\<\{ `status`: `"OK"`; `tenants`: [`TenantConfig`](#tenantconfig) & `object`[]; \}\> | [recipe/multitenancy/types.ts:81](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L81) |

***

### TenantConfig

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

Defined in: [recipe/multitenancy/types.ts:46](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L46)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="coreconfig"></a> `coreConfig` | `object` | [recipe/multitenancy/types.ts:52](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L52) |
| <a id="firstfactors"></a> `firstFactors?` | `string`[] | [recipe/multitenancy/types.ts:50](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L50) |
| <a id="requiredsecondaryfactors"></a> `requiredSecondaryFactors?` | `string`[] | [recipe/multitenancy/types.ts:51](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L51) |
| <a id="thirdparty"></a> `thirdParty` | `object` | [recipe/multitenancy/types.ts:47](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L47) |
| `thirdParty.providers` | [`ProviderConfig`](recipe-thirdparty-types#providerconfig)[] | [recipe/multitenancy/types.ts:48](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L48) |

***

### TypeInput

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

Defined in: [recipe/multitenancy/types.ts:22](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L22)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="getalloweddomainsfortenantid"></a> `getAllowedDomainsForTenantId?` | (`tenantId`, `userContext`) => `Promise`\<`string`[] \| `undefined`\> | [recipe/multitenancy/types.ts:23](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L23) |
| <a id="override"></a> `override?` | `object` | [recipe/multitenancy/types.ts:25](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L25) |
| `override.apis?` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/multitenancy/types.ts:30](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L30) |
| `override.functions?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/multitenancy/types.ts:26](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L26) |

***

### TypeNormalisedInput

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

Defined in: [recipe/multitenancy/types.ts:34](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L34)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="getalloweddomainsfortenantid-1"></a> `getAllowedDomainsForTenantId?` | (`tenantId`, `userContext`) => `Promise`\<`string`[] \| `undefined`\> | [recipe/multitenancy/types.ts:35](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L35) |
| <a id="override-1"></a> `override` | `object` | [recipe/multitenancy/types.ts:37](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L37) |
| `override.apis` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/multitenancy/types.ts:42](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L42) |
| `override.functions` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/multitenancy/types.ts:38](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/multitenancy/types.ts#L38) |
