@cori-risi/cori.data.api / ApiContextType
Interface: ApiContextType
This is the interface/type of the ApiContext
.
Properties
apiClient
apiClient:
AxiosInstance
Axios client for RESTful services
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:58
authenticated
authenticated:
boolean
true
if the ApiContextProvider has established an authenticated session
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:59
authenticated_user
authenticated_user:
null
|User
the current user state if the ApiContextProvider has established an authenticated session
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:60
autoSignOut
autoSignOut:
null
| () =>void
a function that can be called to terminate the current session (if using authentication)
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:61
baseURL
baseURL:
string
Base URL for RESTful service
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:62
data
data:
any
read-only data store
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:64
setData()
setData: (
newData
) =>void
setter to update data store
Parameters
• newData: any
Returns
void
Defined in
@cori-risi/contexts/ApiContextProvider.tsx:65
token
token:
null
|JWT
id token retrieved from Cognito which is used in requests made by the apiClient
(if using authentication)