Skip to main content
References

MultiTenancy

Classes

default

Defined in: recipe/multitenancy/index.ts:23

Constructors

Constructor
new default(): default;
Returns

default

Properties

PropertyModifierTypeDefault valueDefined in
initstatic(config?) => RecipeListFunctionRecipe.initrecipe/multitenancy/index.ts:24

Methods

associateUserToTenant()
static associateUserToTenant(
tenantId,
recipeUserId,
userContext?): Promise<
| {
status: "OK";
wasAlreadyAssociated: boolean;
}
| {
status: | "EMAIL_ALREADY_EXISTS_ERROR"
| "UNKNOWN_USER_ID_ERROR"
| "PHONE_NUMBER_ALREADY_EXISTS_ERROR"
| "THIRD_PARTY_USER_ALREADY_EXISTS_ERROR";
}
| {
reason: string;
status: "ASSOCIATION_NOT_ALLOWED_ERROR";
}>;

Defined in: recipe/multitenancy/index.ts:124

Parameters
ParameterType
tenantIdstring
recipeUserIdRecipeUserId
userContext?Record<string, any>
Returns

Promise< | { status: "OK"; wasAlreadyAssociated: boolean; } | { status: | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" | "THIRD_PARTY_USER_ALREADY_EXISTS_ERROR"; } | { reason: string; status: "ASSOCIATION_NOT_ALLOWED_ERROR"; }>

createOrUpdateTenant()
static createOrUpdateTenant(
tenantId,
config?,
userContext?): Promise<{
createdNew: boolean;
status: "OK";
}>;

Defined in: recipe/multitenancy/index.ts:26

Parameters
ParameterType
tenantIdstring
config?{ coreConfig?: { [key: string]: any; }; firstFactors?: string[]; requiredSecondaryFactors?: string[]; }
config.coreConfig?{ [key: string]: any; }
config.firstFactors?string[]
config.requiredSecondaryFactors?string[]
userContext?Record<string, any>
Returns

Promise<{ createdNew: boolean; status: "OK"; }>

createOrUpdateThirdPartyConfig()
static createOrUpdateThirdPartyConfig(
tenantId,
config,
skipValidation?,
userContext?): Promise<{
createdNew: boolean;
status: "OK";
}>;

Defined in: recipe/multitenancy/index.ts:90

Parameters
ParameterType
tenantIdstring
configProviderConfig
skipValidation?boolean
userContext?Record<string, any>
Returns

Promise<{ createdNew: boolean; status: "OK"; }>

deleteTenant()
static deleteTenant(tenantId, userContext?): Promise<{
didExist: boolean;
status: "OK";
}>;

Defined in: recipe/multitenancy/index.ts:46

Parameters
ParameterType
tenantIdstring
userContext?Record<string, any>
Returns

Promise<{ didExist: boolean; status: "OK"; }>

deleteThirdPartyConfig()
static deleteThirdPartyConfig(
tenantId,
thirdPartyId,
userContext?): Promise<{
didConfigExist: boolean;
status: "OK";
}>;

Defined in: recipe/multitenancy/index.ts:108

Parameters
ParameterType
tenantIdstring
thirdPartyIdstring
userContext?Record<string, any>
Returns

Promise<{ didConfigExist: boolean; status: "OK"; }>

disassociateUserFromTenant()
static disassociateUserFromTenant(
tenantId,
recipeUserId,
userContext?): Promise<{
status: "OK";
wasAssociated: boolean;
}>;

Defined in: recipe/multitenancy/index.ts:153

Parameters
ParameterType
tenantIdstring
recipeUserIdRecipeUserId
userContext?Record<string, any>
Returns

Promise<{ status: "OK"; wasAssociated: boolean; }>

getTenant()
static getTenant(tenantId, userContext?): Promise<object & TenantConfig>;

Defined in: recipe/multitenancy/index.ts:60

Parameters
ParameterType
tenantIdstring
userContext?Record<string, any>
Returns

Promise<object & TenantConfig>

listAllTenants()
static listAllTenants(userContext?): Promise<{
status: "OK";
tenants: object & TenantConfig[];
}>;

Defined in: recipe/multitenancy/index.ts:76

Parameters
ParameterType
userContext?Record<string, any>
Returns

Promise<{ status: "OK"; tenants: object & TenantConfig[]; }>

Variables

AllowedDomainsClaim

const AllowedDomainsClaim: AllowedDomainsClaimClass;

Defined in: recipe/multitenancy/allowedDomainsClaim.ts:23

associateUserToTenant()

associateUserToTenant: (tenantId, recipeUserId, userContext?) => Promise<
| {
status: "OK";
wasAlreadyAssociated: boolean;
}
| {
status: | "EMAIL_ALREADY_EXISTS_ERROR"
| "UNKNOWN_USER_ID_ERROR"
| "PHONE_NUMBER_ALREADY_EXISTS_ERROR"
| "THIRD_PARTY_USER_ALREADY_EXISTS_ERROR";
}
| {
reason: string;
status: "ASSOCIATION_NOT_ALLOWED_ERROR";
}> = Wrapper.associateUserToTenant;

Defined in: recipe/multitenancy/index.ts:180

Parameters

ParameterType
tenantIdstring
recipeUserIdRecipeUserId
userContext?Record<string, any>

Returns

Promise< | { status: "OK"; wasAlreadyAssociated: boolean; } | { status: | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" | "THIRD_PARTY_USER_ALREADY_EXISTS_ERROR"; } | { reason: string; status: "ASSOCIATION_NOT_ALLOWED_ERROR"; }>

createOrUpdateTenant()

createOrUpdateTenant: (tenantId, config?, userContext?) => Promise<{
createdNew: boolean;
status: "OK";
}> = Wrapper.createOrUpdateTenant;

Defined in: recipe/multitenancy/index.ts:172

Parameters

ParameterType
tenantIdstring
config?{ coreConfig?: { [key: string]: any; }; firstFactors?: string[]; requiredSecondaryFactors?: string[]; }
config.coreConfig?{ [key: string]: any; }
config.firstFactors?string[]
config.requiredSecondaryFactors?string[]
userContext?Record<string, any>

Returns

Promise<{ createdNew: boolean; status: "OK"; }>

createOrUpdateThirdPartyConfig()

createOrUpdateThirdPartyConfig: (tenantId, config, skipValidation?, userContext?) => Promise<{
createdNew: boolean;
status: "OK";
}> = Wrapper.createOrUpdateThirdPartyConfig;

Defined in: recipe/multitenancy/index.ts:177

Parameters

ParameterType
tenantIdstring
configProviderConfig
skipValidation?boolean
userContext?Record<string, any>

Returns

Promise<{ createdNew: boolean; status: "OK"; }>

deleteTenant()

deleteTenant: (tenantId, userContext?) => Promise<{
didExist: boolean;
status: "OK";
}> = Wrapper.deleteTenant;

Defined in: recipe/multitenancy/index.ts:173

Parameters

ParameterType
tenantIdstring
userContext?Record<string, any>

Returns

Promise<{ didExist: boolean; status: "OK"; }>

deleteThirdPartyConfig()

deleteThirdPartyConfig: (tenantId, thirdPartyId, userContext?) => Promise<{
didConfigExist: boolean;
status: "OK";
}> = Wrapper.deleteThirdPartyConfig;

Defined in: recipe/multitenancy/index.ts:178

Parameters

ParameterType
tenantIdstring
thirdPartyIdstring
userContext?Record<string, any>

Returns

Promise<{ didConfigExist: boolean; status: "OK"; }>

disassociateUserFromTenant()

disassociateUserFromTenant: (tenantId, recipeUserId, userContext?) => Promise<{
status: "OK";
wasAssociated: boolean;
}> = Wrapper.disassociateUserFromTenant;

Defined in: recipe/multitenancy/index.ts:181

Parameters

ParameterType
tenantIdstring
recipeUserIdRecipeUserId
userContext?Record<string, any>

Returns

Promise<{ status: "OK"; wasAssociated: boolean; }>

getTenant()

getTenant: (tenantId, userContext?) => Promise<object & TenantConfig> = Wrapper.getTenant;

Defined in: recipe/multitenancy/index.ts:174

Parameters

ParameterType
tenantIdstring
userContext?Record<string, any>

Returns

Promise<object & TenantConfig>

init()

init: (config?) => RecipeListFunction = Wrapper.init;

Defined in: recipe/multitenancy/index.ts:170

Parameters

ParameterType
config?TypeInput

Returns

RecipeListFunction

listAllTenants()

listAllTenants: (userContext?) => Promise<{
status: "OK";
tenants: object & TenantConfig[];
}> = Wrapper.listAllTenants;

Defined in: recipe/multitenancy/index.ts:175

Parameters

ParameterType
userContext?Record<string, any>

Returns

Promise<{ status: "OK"; tenants: object & TenantConfig[]; }>

References

APIInterface

Re-exports APIInterface

APIOptions

Re-exports APIOptions

RecipeInterface

Re-exports RecipeInterface