Search
Preparing search index...
The search index is not available
supertokens-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-node
index
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
Error
Recipe
User
Id
User
init
Methods
convert
To
Recipe
User
Id
create
User
Id
Mapping
delete
User
delete
User
Id
Mapping
get
AllCORSHeaders
get
Request
From
User
Context
get
User
get
User
Count
get
User
Id
Mapping
get
Users
Newest
First
get
Users
Oldest
First
list
Users
By
Account
Info
update
Or
Delete
User
Id
Mapping
Info
Constructors
constructor
new default
(
)
:
default
Returns
default
Properties
Static
Error
Error
:
typeof
default
= SuperTokensError
Static
Recipe
User
Id
Recipe
User
Id
:
typeof
RecipeUserId
= RecipeUserId
Static
User
User
:
typeof
User
= User
Static
init
init
:
(
(
config
:
TypeInput
)
=>
void
)
= SuperTokens.init
Type declaration
(
config
:
TypeInput
)
:
void
Parameters
config:
TypeInput
Returns
void
Methods
Static
convert
To
Recipe
User
Id
convert
To
Recipe
User
Id
(
recipeUserId
:
string
)
:
RecipeUserId
Parameters
recipeUserId:
string
Returns
RecipeUserId
Static
create
User
Id
Mapping
create
User
Id
Mapping
(
input
:
{
externalUserId
:
string
;
externalUserIdInfo
?:
string
;
force
?:
boolean
;
superTokensUserId
:
string
;
userContext
?:
Record
<
string
,
any
>
}
)
:
Promise
<
{
status
:
"OK"
|
"UNKNOWN_SUPERTOKENS_USER_ID_ERROR"
}
|
{
doesExternalUserIdExist
:
boolean
;
doesSuperTokensUserIdExist
:
boolean
;
status
:
"USER_ID_MAPPING_ALREADY_EXISTS_ERROR"
}
>
Parameters
input:
{
externalUserId
:
string
;
externalUserIdInfo
?:
string
;
force
?:
boolean
;
superTokensUserId
:
string
;
userContext
?:
Record
<
string
,
any
>
}
external
User
Id
:
string
Optional
external
User
Id
Info
?:
string
Optional
force
?:
boolean
super
Tokens
User
Id
:
string
Optional
user
Context
?:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
|
"UNKNOWN_SUPERTOKENS_USER_ID_ERROR"
}
|
{
doesExternalUserIdExist
:
boolean
;
doesSuperTokensUserIdExist
:
boolean
;
status
:
"USER_ID_MAPPING_ALREADY_EXISTS_ERROR"
}
>
Static
delete
User
delete
User
(
userId
:
string
, removeAllLinkedAccounts
?:
boolean
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
}
>
Parameters
userId:
string
removeAllLinkedAccounts:
boolean
= true
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
}
>
Static
delete
User
Id
Mapping
delete
User
Id
Mapping
(
input
:
{
force
?:
boolean
;
userContext
?:
Record
<
string
,
any
>
;
userId
:
string
;
userIdType
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
}
)
:
Promise
<
{
didMappingExist
:
boolean
;
status
:
"OK"
}
>
Parameters
input:
{
force
?:
boolean
;
userContext
?:
Record
<
string
,
any
>
;
userId
:
string
;
userIdType
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
}
Optional
force
?:
boolean
Optional
user
Context
?:
Record
<
string
,
any
>
user
Id
:
string
Optional
user
Id
Type
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
Returns
Promise
<
{
didMappingExist
:
boolean
;
status
:
"OK"
}
>
Static
get
AllCORSHeaders
get
AllCORSHeaders
(
)
:
string
[]
Returns
string
[]
Static
get
Request
From
User
Context
get
Request
From
User
Context
(
userContext
:
undefined
|
UserContext
)
:
undefined
|
BaseRequest
Parameters
userContext:
undefined
|
UserContext
Returns
undefined
|
BaseRequest
Static
get
User
get
User
(
userId
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
undefined
|
User
>
Parameters
userId:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
undefined
|
User
>
Static
get
User
Count
get
User
Count
(
includeRecipeIds
?:
string
[]
, tenantId
?:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
number
>
Parameters
Optional
includeRecipeIds:
string
[]
Optional
tenantId:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
number
>
Static
get
User
Id
Mapping
get
User
Id
Mapping
(
input
:
{
userContext
?:
Record
<
string
,
any
>
;
userId
:
string
;
userIdType
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
}
)
:
Promise
<
{
externalUserId
:
string
;
externalUserIdInfo
:
undefined
|
string
;
status
:
"OK"
;
superTokensUserId
:
string
}
|
{
status
:
"UNKNOWN_MAPPING_ERROR"
}
>
Parameters
input:
{
userContext
?:
Record
<
string
,
any
>
;
userId
:
string
;
userIdType
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
}
Optional
user
Context
?:
Record
<
string
,
any
>
user
Id
:
string
Optional
user
Id
Type
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
Returns
Promise
<
{
externalUserId
:
string
;
externalUserIdInfo
:
undefined
|
string
;
status
:
"OK"
;
superTokensUserId
:
string
}
|
{
status
:
"UNKNOWN_MAPPING_ERROR"
}
>
Static
get
Users
Newest
First
get
Users
Newest
First
(
input
:
{
includeRecipeIds
?:
string
[]
;
limit
?:
number
;
paginationToken
?:
string
;
query
?:
{}
;
tenantId
:
string
;
userContext
?:
Record
<
string
,
any
>
}
)
:
Promise
<
{
nextPaginationToken
?:
string
;
users
:
User
[]
}
>
Parameters
input:
{
includeRecipeIds
?:
string
[]
;
limit
?:
number
;
paginationToken
?:
string
;
query
?:
{}
;
tenantId
:
string
;
userContext
?:
Record
<
string
,
any
>
}
Optional
include
Recipe
Ids
?:
string
[]
Optional
limit
?:
number
Optional
pagination
Token
?:
string
Optional
query
?:
{}
[
key:
string
]:
string
tenant
Id
:
string
Optional
user
Context
?:
Record
<
string
,
any
>
Returns
Promise
<
{
nextPaginationToken
?:
string
;
users
:
User
[]
}
>
Static
get
Users
Oldest
First
get
Users
Oldest
First
(
input
:
{
includeRecipeIds
?:
string
[]
;
limit
?:
number
;
paginationToken
?:
string
;
query
?:
{}
;
tenantId
:
string
;
userContext
?:
Record
<
string
,
any
>
}
)
:
Promise
<
{
nextPaginationToken
?:
string
;
users
:
User
[]
}
>
Parameters
input:
{
includeRecipeIds
?:
string
[]
;
limit
?:
number
;
paginationToken
?:
string
;
query
?:
{}
;
tenantId
:
string
;
userContext
?:
Record
<
string
,
any
>
}
Optional
include
Recipe
Ids
?:
string
[]
Optional
limit
?:
number
Optional
pagination
Token
?:
string
Optional
query
?:
{}
[
key:
string
]:
string
tenant
Id
:
string
Optional
user
Context
?:
Record
<
string
,
any
>
Returns
Promise
<
{
nextPaginationToken
?:
string
;
users
:
User
[]
}
>
Static
list
Users
By
Account
Info
list
Users
By
Account
Info
(
tenantId
:
string
, accountInfo
:
AccountInfo
, doUnionOfAccountInfo
?:
boolean
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
User
[]
>
Parameters
tenantId:
string
accountInfo:
AccountInfo
doUnionOfAccountInfo:
boolean
= false
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
User
[]
>
Static
update
Or
Delete
User
Id
Mapping
Info
update
Or
Delete
User
Id
Mapping
Info
(
input
:
{
externalUserIdInfo
?:
string
;
userContext
?:
Record
<
string
,
any
>
;
userId
:
string
;
userIdType
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
}
)
:
Promise
<
{
status
:
"OK"
|
"UNKNOWN_MAPPING_ERROR"
}
>
Parameters
input:
{
externalUserIdInfo
?:
string
;
userContext
?:
Record
<
string
,
any
>
;
userId
:
string
;
userIdType
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
}
Optional
external
User
Id
Info
?:
string
Optional
user
Context
?:
Record
<
string
,
any
>
user
Id
:
string
Optional
user
Id
Type
?:
"SUPERTOKENS"
|
"EXTERNAL"
|
"ANY"
Returns
Promise
<
{
status
:
"OK"
|
"UNKNOWN_MAPPING_ERROR"
}
>
Modules
framework
framework/aws
Lambda
framework/custom
framework/express
framework/fastify
framework/hapi
framework/koa
framework/loopback
index
ingredients/emaildelivery
ingredients/smsdelivery
recipe/accountlinking
recipe/dashboard
recipe/emailpassword
recipe/emailverification
recipe/jwt
recipe/multifactorauth
recipe/multitenancy
recipe/oauth2provider
recipe/openid
recipe/passwordless
recipe/session
recipe/thirdparty
recipe/totp
recipe/usermetadata
recipe/userroles
default
constructor
Error
Recipe
User
Id
User
init
convert
To
Recipe
User
Id
create
User
Id
Mapping
delete
User
delete
User
Id
Mapping
get
AllCORSHeaders
get
Request
From
User
Context
get
User
get
User
Count
get
User
Id
Mapping
get
Users
Newest
First
get
Users
Oldest
First
list
Users
By
Account
Info
update
Or
Delete
User
Id
Mapping
Info
Generated using
TypeDoc