Skip to main content

Classes & Interfaces

ApiError

interface ApiError

Properties

NameTypeDescription
statusnumber-
bodyBody-
requestIdstring-

ValidationError

interface ValidationError

Methods

getFieldErrors

getFieldErrors(field: string): ValidationErrorInfo[]
ParameterTypeDescription
fieldstring-
Returns: ValidationErrorInfo[]

Functions

defaultResponseHandler

async function defaultResponseHandler(response: Response): Promise<Output>
ParameterTypeDescription
responseResponse-
Returns: Promise<Output>

resultResponseHandler

async function resultResponseHandler(response: Response): Promise<Result<Output>>
ParameterTypeDescription
responseResponse-
Returns: Promise<Result<Output>>

Types

ResponseHandler

type ResponseHandler = (response: Response) => Promise<Output>

ResponseHandlerCreator

type ResponseHandlerCreator = (
  config: RequiredConfig,
) => ResponseHandler<Output>