api: {
    get: (<K>(endpoint, params?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "get">>>);
    post: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "post">>>);
    put: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "put">>>);
    delete: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>);
} = ...

Create an API client for freestyle

Type declaration

  • get: (<K>(endpoint, params?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "get">>>)
      • <K>(endpoint, params?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "get">>>
      • Type Parameters

        • K extends "/api/ext/freestyle/microCalibration/report/{board}" | "/api/ext/freestyle/microCalibration/cal/{pump}" | "/api/ext/freestyle/can/read/float/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/read/int/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/stats/raw" | "/api/ext/freestyle/ice/types" | "/api/ext/freestyle/brandset/nutrition/{bevId}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fuelGauges/{holder}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline" | "/api/ext/freestyle/cartridges" | "/api/ext/freestyle/cartridges/{id}"

        Parameters

        • endpoint: K
        • Optional params: ClientGetParams<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "get">>>

  • post: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "post">>>)
      • <K>(endpoint, params?, body?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "post">>>
      • Type Parameters

        • K extends "/api/ext/freestyle/microCalibration/cal/{pump}/running/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/code/{code}" | "/api/ext/freestyle/microCalibration/cal/{pump}/baseline/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/both/{val}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/write/byte/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/short/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/float/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/int/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/ice/type/{path}/{type}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fuelGauges/{holder}/{val}" | "/api/ext/freestyle/fcm/diagnostics/{pump}/pressureTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/opennessTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/flowTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/electricalTest" | "/api/ext/freestyle/fcm/calibration/{pump}/calibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/preCalibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/verify/{calVolume}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline/{value}" | "/api/ext/freestyle/fcm/calibration/{pump}/complete/{calVolume}/{verifyVolume}"

        Parameters

        • endpoint: K
        • Optional params: ClientPostParams<paths, K>
        • Optional body: ClientPostBody<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "post">>>

  • put: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "put">>>)
      • <K>(endpoint, params?, body?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "put">>>
      • Type Parameters

        • K extends never

        Parameters

        • endpoint: K
        • Optional params: ClientPutParams<paths, K>
        • Optional body: ClientPutBody<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "put">>>

  • delete: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>)
      • <K>(endpoint, params?, body?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>
      • Type Parameters

        • K extends never

        Parameters

        • endpoint: K
        • Optional params: ClientDeleteParams<paths, K>
        • Optional body: ClientPutBody<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>