Preparing search index...
The search index is not available
Server Packages
Server Packages
@troph-team/account
AccountRepositoryPostgres
Class AccountRepositoryPostgres
Hierarchy
AccountRepositoryPostgres
Implements
AccountRepository
Index
Constructors
constructor
Properties
pool
Methods
_create
User
_set
External
For
User
_transaction
check
User
Password
check
Verification
create
By
External
create
User
create
Verification
expire
Verification
format
User
External
Po
format
User
Po
format
VerificationPO
gen
Id
get
By
External
get
Client
get
User
By
Email
get
User
By
Id
get
User
By
Username
get
User
External
Profiles
get
User
Preferences
get
User
Profiles
get
Users
By
Id
List
is
Verification
Exist
pairs
To
Map
set
External
For
User
set
User
Preference
set
User
Profile
update
User
with
Client
Constructors
constructor
new
Account
Repository
Postgres
(
pool
:
Pool
|
PoolConfig
)
:
AccountRepositoryPostgres
Parameters
pool:
Pool
|
PoolConfig
Returns
AccountRepositoryPostgres
Properties
pool
pool
:
Pool
Methods
Protected
_create
User
_create
User
(
client
:
PoolClient
, data
:
Partial
<
User
&
{
password
:
string
}
>
)
:
Promise
<
User
>
Parameters
client:
PoolClient
data:
Partial
<
User
&
{
password
:
string
}
>
Returns
Promise
<
User
>
Protected
_set
External
For
User
_set
External
For
User
(
client
:
PoolClient
, user
:
User
, type
:
string
, profile
:
Profile
)
:
Promise
<
void
>
Parameters
client:
PoolClient
user:
User
type:
string
profile:
Profile
Returns
Promise
<
void
>
Protected
_transaction
_transaction
<
T
>
(
client
:
PoolClient
, callback
:
(
(
client
:
PoolClient
)
=>
Promise
<
T
>
)
)
:
Promise
<
T
>
Type Parameters
T
Parameters
client:
PoolClient
callback:
(
(
client
:
PoolClient
)
=>
Promise
<
T
>
)
(
client
:
PoolClient
)
:
Promise
<
T
>
Parameters
client:
PoolClient
Returns
Promise
<
T
>
Returns
Promise
<
T
>
check
User
Password
check
User
Password
(
id
:
bigint
, password
:
string
)
:
Promise
<
boolean
>
Parameters
id:
bigint
password:
string
Returns
Promise
<
boolean
>
check
Verification
check
Verification
(
userId
:
bigint
, intent
:
VerificationIntent
, code
:
string
, noExpire
?:
boolean
)
:
Promise
<
void
>
Parameters
userId:
bigint
intent:
VerificationIntent
code:
string
Optional
noExpire:
boolean
Returns
Promise
<
void
>
create
By
External
create
By
External
(
type
:
string
, profile
:
Profile
)
:
Promise
<
User
>
Parameters
type:
string
profile:
Profile
Returns
Promise
<
User
>
create
User
create
User
(
data
:
Partial
<
User
&
{
password
:
string
}
>
)
:
Promise
<
User
>
Parameters
data:
Partial
<
User
&
{
password
:
string
}
>
Returns
Promise
<
User
>
create
Verification
create
Verification
(
data
:
Partial
<
Verification
>
)
:
Promise
<
Verification
>
Parameters
data:
Partial
<
Verification
>
Returns
Promise
<
Verification
>
expire
Verification
expire
Verification
(
userId
:
bigint
)
:
Promise
<
void
>
Parameters
userId:
bigint
Returns
Promise
<
void
>
Protected
format
User
External
Po
format
User
External
Po
(
__namedParameters
:
UserExternalPO
)
:
UserExternal
Parameters
__namedParameters:
UserExternalPO
Returns
UserExternal
Protected
format
User
Po
format
User
Po
(
__namedParameters
:
UserPO
)
:
User
Parameters
__namedParameters:
UserPO
Returns
User
Protected
format
VerificationPO
format
VerificationPO
(
__namedParameters
:
VerificationPO
)
:
Verification
Parameters
__namedParameters:
VerificationPO
Returns
Verification
gen
Id
gen
Id
(
)
:
bigint
Returns
bigint
get
By
External
get
By
External
(
type
:
string
, profile
:
Profile
)
:
Promise
<
undefined
|
User
>
Parameters
type:
string
profile:
Profile
Returns
Promise
<
undefined
|
User
>
Protected
get
Client
get
Client
(
)
:
Promise
<
PoolClient
>
Returns
Promise
<
PoolClient
>
get
User
By
Email
get
User
By
Email
(
email
:
string
)
:
Promise
<
undefined
|
User
>
Parameters
email:
string
Returns
Promise
<
undefined
|
User
>
get
User
By
Id
get
User
By
Id
(
id
:
bigint
)
:
Promise
<
undefined
|
User
>
Parameters
id:
bigint
Returns
Promise
<
undefined
|
User
>
get
User
By
Username
get
User
By
Username
(
username
:
string
)
:
Promise
<
undefined
|
User
>
Parameters
username:
string
Returns
Promise
<
undefined
|
User
>
get
User
External
Profiles
get
User
External
Profiles
(
id
:
bigint
)
:
Promise
<
Record
<
string
,
null
|
Profile
>
>
Parameters
id:
bigint
Returns
Promise
<
Record
<
string
,
null
|
Profile
>
>
get
User
Preferences
get
User
Preferences
<
T
>
(
userId
:
bigint
)
:
Promise
<
T
>
Type Parameters
T
Parameters
userId:
bigint
Returns
Promise
<
T
>
get
User
Profiles
get
User
Profiles
<
T
>
(
userId
:
bigint
)
:
Promise
<
T
>
Type Parameters
T
Parameters
userId:
bigint
Returns
Promise
<
T
>
get
Users
By
Id
List
get
Users
By
Id
List
(
ids
:
bigint
[]
)
:
Promise
<
User
[]
>
Parameters
ids:
bigint
[]
Returns
Promise
<
User
[]
>
is
Verification
Exist
is
Verification
Exist
(
user
:
User
, intent
:
VerificationIntent
, approach
:
email
)
:
Promise
<
boolean
>
Parameters
user:
User
intent:
VerificationIntent
approach:
email
Returns
Promise
<
boolean
>
pairs
To
Map
pairs
To
Map
(
pairs
:
{
key
:
string
;
value
:
any
}
[]
)
:
{
[k:
string
]
:
T
}
Parameters
pairs:
{
key
:
string
;
value
:
any
}
[]
Returns
{
[k:
string
]
:
T
}
[
k:
string
]:
T
set
External
For
User
set
External
For
User
(
user
:
User
, type
:
string
, profile
:
Profile
)
:
Promise
<
void
>
Parameters
user:
User
type:
string
profile:
Profile
Returns
Promise
<
void
>
set
User
Preference
set
User
Preference
<
T
>
(
userId
:
bigint
, key
:
string
, value
:
T
)
:
Promise
<
void
>
Type Parameters
T
Parameters
userId:
bigint
key:
string
value:
T
Returns
Promise
<
void
>
set
User
Profile
set
User
Profile
<
T
>
(
userId
:
bigint
, key
:
string
, value
:
T
)
:
Promise
<
void
>
Type Parameters
T
Parameters
userId:
bigint
key:
string
value:
T
Returns
Promise
<
void
>
update
User
update
User
(
id
:
bigint
, data
:
Partial
<
User
&
{
password
:
string
}
>
)
:
Promise
<
undefined
|
User
>
Parameters
id:
bigint
data:
Partial
<
User
&
{
password
:
string
}
>
Returns
Promise
<
undefined
|
User
>
Protected
with
Client
with
Client
<
T
>
(
cb
:
(
(
client
:
PoolClient
)
=>
Promise
<
T
>
)
)
:
Promise
<
T
>
Type Parameters
T
Parameters
cb:
(
(
client
:
PoolClient
)
=>
Promise
<
T
>
)
(
client
:
PoolClient
)
:
Promise
<
T
>
Parameters
client:
PoolClient
Returns
Promise
<
T
>
Returns
Promise
<
T
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
Server
Packages
@troph-
team/account
@troph-
team/gateway
Account
Repository
Postgres
constructor
pool
_create
User
_set
External
For
User
_transaction
check
User
Password
check
Verification
create
By
External
create
User
create
Verification
expire
Verification
format
User
External
Po
format
User
Po
format
VerificationPO
gen
Id
get
By
External
get
Client
get
User
By
Email
get
User
By
Id
get
User
By
Username
get
User
External
Profiles
get
User
Preferences
get
User
Profiles
get
Users
By
Id
List
is
Verification
Exist
pairs
To
Map
set
External
For
User
set
User
Preference
set
User
Profile
update
User
with
Client
Generated using
TypeDoc