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