Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-node/recipe/accountlinking/types

References documentation for the supertokens-node/recipe/accountlinking/types package

Type Aliases

AccountInfo

type AccountInfo = object;

Defined in: recipe/accountlinking/types.ts

Properties

Property Type Defined in
email? string recipe/accountlinking/types.ts
phoneNumber? string recipe/accountlinking/types.ts
thirdParty? object recipe/accountlinking/types.ts
thirdParty.id string recipe/accountlinking/types.ts
thirdParty.userId string recipe/accountlinking/types.ts
webauthn? object recipe/accountlinking/types.ts
webauthn.credentialIds string[] recipe/accountlinking/types.ts

AccountInfoInput

type AccountInfoInput = Omit<AccountInfo, "webauthn"> & object;

Defined in: recipe/accountlinking/types.ts

Type Declaration

Name Type Defined in
webauthn? object recipe/accountlinking/types.ts
webauthn.credentialId string recipe/accountlinking/types.ts

AccountInfoWithRecipeId

type AccountInfoWithRecipeId = object & AccountInfo;

Defined in: recipe/accountlinking/types.ts

Type Declaration

Name Type Defined in
recipeId "emailpassword" | "thirdparty" | "passwordless" | "webauthn" recipe/accountlinking/types.ts

RecipeInterface

type RecipeInterface = object;

Defined in: recipe/accountlinking/types.ts

Properties

Property Type Defined in
canCreatePrimaryUser (input) => Promise< | { status: "OK"; wasAlreadyAPrimaryUser: boolean; } | { description: string; primaryUserId: string; status: | "RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR" | "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; }> recipe/accountlinking/types.ts
canLinkAccounts (input) => Promise< | { accountsAlreadyLinked: boolean; status: "OK"; } | { description: string; primaryUserId: string; status: "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; } | { description: string; primaryUserId: string; status: "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; } | { status: "INPUT_USER_IS_NOT_A_PRIMARY_USER"; }> recipe/accountlinking/types.ts
createPrimaryUser (input) => Promise< | { status: "OK"; user: User; wasAlreadyAPrimaryUser: boolean; } | { primaryUserId: string; status: "RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"; } | { description: string; primaryUserId: string; status: "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; }> recipe/accountlinking/types.ts
deleteUser (input) => Promise<{ status: "OK"; }> recipe/accountlinking/types.ts
getUser (input) => Promise<User | undefined> recipe/accountlinking/types.ts
getUsers (input) => Promise<{ nextPaginationToken?: string; users: User[]; }> recipe/accountlinking/types.ts
linkAccounts (input) => Promise< | { accountsAlreadyLinked: boolean; status: "OK"; user: User; } | { primaryUserId: string; status: "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; user: User; } | { description: string; primaryUserId: string; status: "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; } | { status: "INPUT_USER_IS_NOT_A_PRIMARY_USER"; }> recipe/accountlinking/types.ts
listUsersByAccountInfo (input) => Promise<User[]> recipe/accountlinking/types.ts
unlinkAccount (input) => Promise<{ status: "OK"; wasLinked: boolean; wasRecipeUserDeleted: boolean; }> recipe/accountlinking/types.ts

RecipeLevelUser

type RecipeLevelUser = object & AccountInfoWithRecipeId;

Defined in: recipe/accountlinking/types.ts

Type Declaration

Name Type Defined in
recipeUserId RecipeUserId recipe/accountlinking/types.ts
tenantIds string[] recipe/accountlinking/types.ts
timeJoined number recipe/accountlinking/types.ts

TypeInput

type TypeInput = object;

Defined in: recipe/accountlinking/types.ts

Properties

Property Type Defined in
onAccountLinked? (user, newAccountInfo, userContext) => Promise<void> recipe/accountlinking/types.ts
override? object recipe/accountlinking/types.ts
override.functions? (originalImplementation, builder) => RecipeInterface recipe/accountlinking/types.ts
shouldDoAutomaticAccountLinking? (newAccountInfo, user, session, tenantId, userContext) => Promise< | { shouldAutomaticallyLink: false; } | { shouldAutomaticallyLink: true; shouldRequireVerification: boolean; }> recipe/accountlinking/types.ts

TypeNormalisedInput

type TypeNormalisedInput = object;

Defined in: recipe/accountlinking/types.ts

Properties

Property Type Defined in
onAccountLinked (user, newAccountInfo, userContext) => Promise<void> recipe/accountlinking/types.ts
override object recipe/accountlinking/types.ts
override.functions (originalImplementation, builder) => RecipeInterface recipe/accountlinking/types.ts
shouldDoAutomaticAccountLinking (newAccountInfo, user, session, tenantId, userContext) => Promise< | { shouldAutomaticallyLink: false; } | { shouldAutomaticallyLink: true; shouldRequireVerification: boolean; }> recipe/accountlinking/types.ts

API reference

API schema and response details