-
Notifications
You must be signed in to change notification settings - Fork 71
/
recipe_accountlinking.default.html
15 lines (15 loc) · 60.5 KB
/
recipe_accountlinking.default.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | supertokens-node</title><meta name="description" content="Documentation for supertokens-node"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">supertokens-node</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">supertokens-node</a></li><li><a href="../modules/recipe_accountlinking.html">recipe/accountlinking</a></li><li><a href="recipe_accountlinking.default.html">default</a></li></ul><h1>Class default </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">default</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="recipe_accountlinking.default.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#init" class="tsd-kind-icon">init</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#canCreatePrimaryUser" class="tsd-kind-icon">can<wbr/>Create<wbr/>Primary<wbr/>User</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#canLinkAccounts" class="tsd-kind-icon">can<wbr/>Link<wbr/>Accounts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#createPrimaryUser" class="tsd-kind-icon">create<wbr/>Primary<wbr/>User</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#createPrimaryUserIdOrLinkAccounts" class="tsd-kind-icon">create<wbr/>Primary<wbr/>User<wbr/>Id<wbr/>Or<wbr/>Link<wbr/>Accounts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#getPrimaryUserThatCanBeLinkedToRecipeUserId" class="tsd-kind-icon">get<wbr/>Primary<wbr/>User<wbr/>That<wbr/>Can<wbr/>Be<wbr/>Linked<wbr/>To<wbr/>Recipe<wbr/>User<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#isEmailChangeAllowed" class="tsd-kind-icon">is<wbr/>Email<wbr/>Change<wbr/>Allowed</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#isSignInAllowed" class="tsd-kind-icon">is<wbr/>Sign<wbr/>In<wbr/>Allowed</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#isSignUpAllowed" class="tsd-kind-icon">is<wbr/>Sign<wbr/>Up<wbr/>Allowed</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#linkAccounts" class="tsd-kind-icon">link<wbr/>Accounts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#unlinkAccount" class="tsd-kind-icon">unlink<wbr/>Account</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new default<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="recipe_accountlinking.default.html" class="tsd-signature-type" data-tsd-kind="Class">default</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="recipe_accountlinking.default.html" class="tsd-signature-type" data-tsd-kind="Class">default</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"><a id="init" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> init<a href="#init" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">init<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">TypeInput</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">RecipeListFunction</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> = Recipe.init</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L24">lib/ts/recipe/accountlinking/index.ts:24</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">TypeInput</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RecipeListFunction</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> config: <span class="tsd-signature-type">TypeInput</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">RecipeListFunction</span></h4></li></ul></li></ul></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="canCreatePrimaryUser" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> can<wbr/>Create<wbr/>Primary<wbr/>User<a href="#canCreatePrimaryUser" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">can<wbr/>Create<wbr/>Primary<wbr/>User<span class="tsd-signature-symbol">(</span>recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>wasAlreadyAPrimaryUser<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L84">lib/ts/recipe/accountlinking/index.ts:84</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>wasAlreadyAPrimaryUser<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="canLinkAccounts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> can<wbr/>Link<wbr/>Accounts<a href="#canLinkAccounts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">can<wbr/>Link<wbr/>Accounts<span class="tsd-signature-symbol">(</span>recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>accountsAlreadyLinked<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"INPUT_USER_IS_NOT_A_PRIMARY_USER"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L98">lib/ts/recipe/accountlinking/index.ts:98</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5>primaryUserId: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>accountsAlreadyLinked<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"INPUT_USER_IS_NOT_A_PRIMARY_USER"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="createPrimaryUser" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> create<wbr/>Primary<wbr/>User<a href="#createPrimaryUser" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">create<wbr/>Primary<wbr/>User<span class="tsd-signature-symbol">(</span>recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>user<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol">; </span>wasAlreadyAPrimaryUser<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L91">lib/ts/recipe/accountlinking/index.ts:91</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>user<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol">; </span>wasAlreadyAPrimaryUser<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="createPrimaryUserIdOrLinkAccounts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> create<wbr/>Primary<wbr/>User<wbr/>Id<wbr/>Or<wbr/>Link<wbr/>Accounts<a href="#createPrimaryUserIdOrLinkAccounts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">create<wbr/>Primary<wbr/>User<wbr/>Id<wbr/>Or<wbr/>Link<wbr/>Accounts<span class="tsd-signature-symbol">(</span>tenantId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, session<span class="tsd-signature-symbol">?: </span><a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L35">lib/ts/recipe/accountlinking/index.ts:35</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>This is a function which is a combination of createPrimaryUser and
linkAccounts where the input recipeUserId is either linked to a user that it can be
linked to, or is made into a primary user.</p>
</div><div><p>The output will be the user ID of the user that it was linked to, or it will be the
same as the input recipeUserId if it was made into a primary user, or if there was
no linking that happened.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>tenantId: <span class="tsd-signature-type">string</span></h5></li><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> session: <a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getPrimaryUserThatCanBeLinkedToRecipeUserId" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Primary<wbr/>User<wbr/>That<wbr/>Can<wbr/>Be<wbr/>Linked<wbr/>To<wbr/>Recipe<wbr/>User<wbr/>Id<a href="#getPrimaryUserThatCanBeLinkedToRecipeUserId" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Primary<wbr/>User<wbr/>That<wbr/>Can<wbr/>Be<wbr/>Linked<wbr/>To<wbr/>Recipe<wbr/>User<wbr/>Id<span class="tsd-signature-symbol">(</span>tenantId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L67">lib/ts/recipe/accountlinking/index.ts:67</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>This function returns the primary user that the input recipe ID can be
linked to. It can be used to determine which primary account the linking
will happen to if the input recipe user ID was to be linked.</p>
</div><div><p>If the function returns undefined, it means that there is no primary user
that the input recipe ID can be linked to, and therefore it can be made
into a primary user itself.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>tenantId: <span class="tsd-signature-type">string</span></h5></li><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isEmailChangeAllowed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Email<wbr/>Change<wbr/>Allowed<a href="#isEmailChangeAllowed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Email<wbr/>Change<wbr/>Allowed<span class="tsd-signature-symbol">(</span>recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, newEmail<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, isVerified<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, session<span class="tsd-signature-symbol">?: </span><a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L159">lib/ts/recipe/accountlinking/index.ts:159</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5>newEmail: <span class="tsd-signature-type">string</span></h5></li><li><h5>isVerified: <span class="tsd-signature-type">boolean</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> session: <a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isSignInAllowed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Sign<wbr/>In<wbr/>Allowed<a href="#isSignInAllowed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Sign<wbr/>In<wbr/>Allowed<span class="tsd-signature-symbol">(</span>tenantId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, session<span class="tsd-signature-symbol">?: </span><a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L137">lib/ts/recipe/accountlinking/index.ts:137</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>tenantId: <span class="tsd-signature-type">string</span></h5></li><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> session: <a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isSignUpAllowed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Sign<wbr/>Up<wbr/>Allowed<a href="#isSignUpAllowed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Sign<wbr/>Up<wbr/>Allowed<span class="tsd-signature-symbol">(</span>tenantId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, newUser<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AccountInfoWithRecipeId</span>, isVerified<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, session<span class="tsd-signature-symbol">?: </span><a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L121">lib/ts/recipe/accountlinking/index.ts:121</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>tenantId: <span class="tsd-signature-type">string</span></h5></li><li><h5>newUser: <span class="tsd-signature-type">AccountInfoWithRecipeId</span></h5></li><li><h5>isVerified: <span class="tsd-signature-type">boolean</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> session: <a href="../interfaces/recipe_session.SessionContainer.html" class="tsd-signature-type" data-tsd-kind="Interface">SessionContainer</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="linkAccounts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> link<wbr/>Accounts<a href="#linkAccounts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">link<wbr/>Accounts<span class="tsd-signature-symbol">(</span>recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>accountsAlreadyLinked<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>user<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol">; </span>user<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"INPUT_USER_IS_NOT_A_PRIMARY_USER"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L106">lib/ts/recipe/accountlinking/index.ts:106</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5>primaryUserId: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>accountsAlreadyLinked<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>user<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol">; </span>user<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">User</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>description<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>primaryUserId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"INPUT_USER_IS_NOT_A_PRIMARY_USER"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="unlinkAccount" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> unlink<wbr/>Account<a href="#unlinkAccount" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"><li class="tsd-signature tsd-kind-icon">unlink<wbr/>Account<span class="tsd-signature-symbol">(</span>recipeUserId<span class="tsd-signature-symbol">: </span><a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a>, userContext<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>wasLinked<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>wasRecipeUserDeleted<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/supertokens/supertokens-node/blob/3f7dd411/lib/ts/recipe/accountlinking/index.ts#L114">lib/ts/recipe/accountlinking/index.ts:114</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>recipeUserId: <a href="index.RecipeUserId.html" class="tsd-signature-type" data-tsd-kind="Class">RecipeUserId</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userContext: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"OK"</span><span class="tsd-signature-symbol">; </span>wasLinked<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>wasRecipeUserDeleted<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="../modules/framework.html">framework</a></li><li class=" tsd-kind-module"><a href="../modules/framework_awsLambda.html">framework/aws<wbr/>Lambda</a></li><li class=" tsd-kind-module"><a href="../modules/framework_custom.html">framework/custom</a></li><li class=" tsd-kind-module"><a href="../modules/framework_express.html">framework/express</a></li><li class=" tsd-kind-module"><a href="../modules/framework_fastify.html">framework/fastify</a></li><li class=" tsd-kind-module"><a href="../modules/framework_hapi.html">framework/hapi</a></li><li class=" tsd-kind-module"><a href="../modules/framework_koa.html">framework/koa</a></li><li class=" tsd-kind-module"><a href="../modules/framework_loopback.html">framework/loopback</a></li><li class=" tsd-kind-module"><a href="../modules/index.html">index</a></li><li class=" tsd-kind-module"><a href="../modules/ingredients_emaildelivery.html">ingredients/emaildelivery</a></li><li class=" tsd-kind-module"><a href="../modules/ingredients_smsdelivery.html">ingredients/smsdelivery</a></li><li class="current tsd-kind-module"><a href="../modules/recipe_accountlinking.html">recipe/accountlinking</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_dashboard.html">recipe/dashboard</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_emailpassword.html">recipe/emailpassword</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_emailverification.html">recipe/emailverification</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_jwt.html">recipe/jwt</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_multifactorauth.html">recipe/multifactorauth</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_multitenancy.html">recipe/multitenancy</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_openid.html">recipe/openid</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_passwordless.html">recipe/passwordless</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_session.html">recipe/session</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_thirdparty.html">recipe/thirdparty</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_thirdpartyemailpassword.html">recipe/thirdpartyemailpassword</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_thirdpartypasswordless.html">recipe/thirdpartypasswordless</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_totp.html">recipe/totp</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_usermetadata.html">recipe/usermetadata</a></li><li class=" tsd-kind-module"><a href="../modules/recipe_userroles.html">recipe/userroles</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-parent-kind-module"><a href="recipe_accountlinking.default.html" class="tsd-kind-icon">default</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="recipe_accountlinking.default.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#init" class="tsd-kind-icon">init</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#canCreatePrimaryUser" class="tsd-kind-icon">can<wbr/>Create<wbr/>Primary<wbr/>User</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#canLinkAccounts" class="tsd-kind-icon">can<wbr/>Link<wbr/>Accounts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#createPrimaryUser" class="tsd-kind-icon">create<wbr/>Primary<wbr/>User</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#createPrimaryUserIdOrLinkAccounts" class="tsd-kind-icon">create<wbr/>Primary<wbr/>User<wbr/>Id<wbr/>Or<wbr/>Link<wbr/>Accounts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#getPrimaryUserThatCanBeLinkedToRecipeUserId" class="tsd-kind-icon">get<wbr/>Primary<wbr/>User<wbr/>That<wbr/>Can<wbr/>Be<wbr/>Linked<wbr/>To<wbr/>Recipe<wbr/>User<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#isEmailChangeAllowed" class="tsd-kind-icon">is<wbr/>Email<wbr/>Change<wbr/>Allowed</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#isSignInAllowed" class="tsd-kind-icon">is<wbr/>Sign<wbr/>In<wbr/>Allowed</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#isSignUpAllowed" class="tsd-kind-icon">is<wbr/>Sign<wbr/>Up<wbr/>Allowed</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#linkAccounts" class="tsd-kind-icon">link<wbr/>Accounts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="recipe_accountlinking.default.html#unlinkAccount" class="tsd-kind-icon">unlink<wbr/>Account</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li><li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li><li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li><li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li><li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>