UNPKG

amberflo-metering-typescript

Version:
17 lines (16 loc) 837 B
import { AxiosResponse } from "axios"; import { IAxiosRetryConfig } from "axios-retry"; import BaseClient from "../baseClient"; import { MeterMessage } from '../model/meterMessage'; export declare class IngestApiClient extends BaseClient { private readonly path; /** * Initialize a new `IngestApiClient` * `debug`: Whether to issue debug level logs or not. * `retry`: Whether to retry on 429, 5xx, or network errors, or retry configuration (see https://github.com/softonic/axios-retry). */ constructor(apiKey: string, debug?: boolean, retry?: boolean | IAxiosRetryConfig); private logResponse; post(payload: Array<MeterMessage>, requestId: string, done?: () => void): Promise<void>; postSync(payload: Array<MeterMessage>, requestId: string): Promise<AxiosResponse<string, any> | undefined>; }