useIdentity
Function: useIdentity()
useIdentity(
enabled
?,filters
?):object
Custom hook to fetch identity details and referral information using the Haven1 SDK.
Parameters
enabled?
boolean
Optional boolean to enable or disable the queries.
filters?
string
[]
Optional array of filters to apply to the identity query.
Returns
object
identity
identity:
UseQueryResult
<undefined
|FetchResponse
<{parameters
: {cookie
:undefined
;header
:undefined
;path
:undefined
;query
: {filters
:string
; }; };requestBody
:undefined
;responses
: {200
: {content
: {application/json
: {address
:string
;countryCode
:null
|string
;countryOfResidence
:null
|string
;createdAt
:string
;string
;emailVerified
:boolean
;id
:number
;idIssuingCountry
:null
|string
;name
:null
|string
;nationality
:null
|string
;proofOfLiveliness
:null
|boolean
;referralCode
:string
;referredById
:null
|number
;region
:null
|string
;updatedAt
:string
; };multipart/form-data
: {address
:string
;countryCode
:null
|string
;countryOfResidence
:null
|string
;createdAt
:string
;string
;emailVerified
:boolean
;id
:number
;idIssuingCountry
:null
|string
;name
:null
|string
;nationality
:null
|string
;proofOfLiveliness
:null
|boolean
;referralCode
:string
;referredById
:null
|number
;region
:null
|string
;updatedAt
:string
; };text/plain
: {address
:string
;countryCode
:null
|string
;countryOfResidence
:null
|string
;createdAt
:string
;string
;emailVerified
:boolean
;id
:number
;idIssuingCountry
:null
|string
;name
:null
|string
;nationality
:null
|string
;proofOfLiveliness
:null
|boolean
;referralCode
:string
;referredById
:null
|number
;region
:null
|string
;updatedAt
:string
; }; };headers
: {}; };404
: {content
: {application/json
: {error
:string
; };multipart/form-data
: {error
:string
; };text/plain
: {error
:string
; }; };headers
: {}; };500
: {content
: {application/json
: {message
:unknown
;status
:string
; };multipart/form-data
: {message
:unknown
;status
:string
; };text/plain
: {message
:unknown
;status
:string
; }; };headers
: {}; }; }; }, {params
: {query
: {filters
:undefined
|string
; }; }; }, `${string}/${string}`>,Error
>
Query for fetching identity details.
referral
referral:
UseQueryResult
<undefined
|FetchResponse
<{parameters
: {cookie
:undefined
;header
:undefined
;path
:undefined
;query
:undefined
; };requestBody
:undefined
;responses
: {200
: {content
: {application/json
: {referralCode
:string
;unverified
: {referredUsers
:number
;referredUsersLast7Days
:number
; };verified
: {referredUsers
:number
;referredUsersLast7Days
:number
; }; };multipart/form-data
: {referralCode
:string
;unverified
: {referredUsers
:number
;referredUsersLast7Days
:number
; };verified
: {referredUsers
:number
;referredUsersLast7Days
:number
; }; };text/plain
: {referralCode
:string
;unverified
: {referredUsers
:number
;referredUsersLast7Days
:number
; };verified
: {referredUsers
:number
;referredUsersLast7Days
:number
; }; }; };headers
: {}; };404
: {content
: {application/json
: {error
:string
; };multipart/form-data
: {error
:string
; };text/plain
: {error
:string
; }; };headers
: {}; };500
: {content
: {application/json
: {message
:unknown
;status
:string
; };multipart/form-data
: {message
:unknown
;status
:string
; };text/plain
: {message
:unknown
;status
:string
; }; };headers
: {}; }; }; },undefined
|FetchOptions
<{parameters
: {cookie
:undefined
;header
:undefined
;path
:undefined
;query
:undefined
; };requestBody
:undefined
;responses
: {200
: {content
: {application/json
: {referralCode
: ...;unverified
: ...;verified
: ...; };multipart/form-data
: {referralCode
: ...;unverified
: ...;verified
: ...; };text/plain
: {referralCode
: ...;unverified
: ...;verified
: ...; }; };headers
: {}; };404
: {content
: {application/json
: {error
: ...; };multipart/form-data
: {error
: ...; };text/plain
: {error
: ...; }; };headers
: {}; };500
: {content
: {application/json
: {message
: ...;status
: ...; };multipart/form-data
: {message
: ...;status
: ...; };text/plain
: {message
: ...;status
: ...; }; };headers
: {}; }; }; }>, `${string}/${string}`>,Error
>
Query for fetching identity referral information.
Defined in
Last updated