Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Base Client for TigerBay reservation system

Hierarchy

  • Client

Index

Constructors

constructor

Properties

Protected axios

axios: AxiosInstance

Underlying Axios HTTP client.

Private config

config: ClientConfig

Client configuration parameters

Accessors

customers

  • get customers(): Api
  • Access Customer management API actions

    Returns Api

notes

  • get notes(): Api

payments

  • get payments(): Api

reservations

  • get reservations(): Api
  • Access Reservation-related API actions

    Returns Api

tasks

  • get tasks(): Api

tours

  • get tours(): Api

Methods

ejectOnRequest

  • ejectOnRequest(id: number): void
  • Eject in interceptor from the request

    Parameters

    • id: number

      Handle of the interceptor to remove

    Returns void

ejectOnResponse

  • ejectOnResponse(handle: number): void
  • Parameters

    • handle: number

    Returns void

onRequest

  • onRequest(func: (value: AxiosRequestConfig) => AxiosRequestConfig | Promise<AxiosRequestConfig>): number
  • Add a new interceptor before a request is sent

    Parameters

    • func: (value: AxiosRequestConfig) => AxiosRequestConfig | Promise<AxiosRequestConfig>

      Function for request fufillment

        • (value: AxiosRequestConfig): AxiosRequestConfig | Promise<AxiosRequestConfig>
        • Parameters

          • value: AxiosRequestConfig

          Returns AxiosRequestConfig | Promise<AxiosRequestConfig>

    Returns number

    Handle for interceptor, used with ejectOnRequest

onResponse

  • onResponse(onFulfilled?: undefined | ((value: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>), onRejected?: undefined | ((error: any) => any)): number
  • Add a new intercepter for responses

    Parameters

    • Optional onFulfilled: undefined | ((value: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>)

      Callback when a response is received

    • Optional onRejected: undefined | ((error: any) => any)

      Callback for when a response fails

    Returns number

    Handle for interceptor, used with ejectOnResponse

Generated using TypeDoc