export interface Chat {
    chatID?: string;
    replySign?: string;
    clientID?: string;
    clientName?: string;
}
export interface ChatsResponse {
    result?: Chat[];
    errors?: any;
}
export interface Error {
    error?: string;
}
export interface Event {
    chatID?: string;
    eventID?: string;
    eventType?: EventType;
    isNewChat?: boolean;
    message?: {
        attachments?: EventAttachments;
        text?: string;
    };
    refund?: Refund;
    source?: string;
    addTimestamp?: number;
    addTime?: string;
    replySign?: string;
    sender?: Sender;
    clientID?: string;
    clientName?: string;
}
export interface EventAttachments {
    goodCard?: GoodCard;
    files?: File[];
    images?: Image[];
}
export declare enum EventType {
    Message = "message",
    Refund = "refund"
}
export interface File {
    contentType?: string;
    date?: string;
    name?: string;
    url?: string;
    size?: number;
}
export interface GoodCard {
    date?: string;
    needRefund?: boolean;
    nmID?: number;
    price?: number;
    priceCurrency?: string;
    rid?: string;
    size?: string;
    statusID?: number;
}
export interface Image {
    date?: string;
    url?: string;
}
export interface MessageResponse {
    errors?: string[];
    result?: {
        addTime?: number;
        chatID?: string;
    };
}
export interface Refund {
    actionType?: RefundActionType;
    price?: number;
    priceCurrency?: string;
    rid?: string;
}
export declare enum RefundActionType {
    SellerRequestRefund = "sellerRequestRefund",
    SellerRejectRefund = "sellerRejectRefund",
    SellerAcceptFullRefund = "sellerAcceptFullRefund",
    SellerAcceptRefundInOffice = "sellerAcceptRefundInOffice"
}
export declare enum Sender {
    Client = "client",
    Seller = "seller",
    Wb = "wb"
}
export interface EventsResponse {
    result?: EventsResult;
    errors?: any;
}
export interface EventsResult {
    next?: number;
    newestEventTime?: string;
    oldestEventTime?: string;
    totalEvents?: number;
    events?: Event[];
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
    secure?: boolean;
    path: string;
    type?: ContentType;
    query?: QueryParamsType;
    format?: ResponseFormat;
    body?: unknown;
    baseUrl?: string;
    cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
    baseUrl?: string;
    baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
    securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
    customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
    data: D;
    error: E;
}
type CancelToken = Symbol | string | number;
export declare enum ContentType {
    Json = "application/json",
    FormData = "multipart/form-data",
    UrlEncoded = "application/x-www-form-urlencoded",
    Text = "text/plain"
}
export declare class HttpClient<SecurityDataType = unknown> {
    baseUrl: string;
    private securityData;
    private securityWorker?;
    private abortControllers;
    private customFetch;
    private baseApiParams;
    constructor(apiConfig?: ApiConfig<SecurityDataType>);
    setSecurityData: (data: SecurityDataType | null) => void;
    protected encodeQueryParam(key: string, value: any): string;
    protected addQueryParam(query: QueryParamsType, key: string): string;
    protected addArrayQueryParam(query: QueryParamsType, key: string): any;
    protected toQueryString(rawQuery?: QueryParamsType): string;
    protected addQueryParams(rawQuery?: QueryParamsType): string;
    private contentFormatters;
    protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
    protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
    abortRequest: (cancelToken: CancelToken) => void;
    request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
}
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
    api: {
        v1SellerChatsList: (params?: RequestParams) => Promise<HttpResponse<ChatsResponse, void | Error>>;
        v1SellerEventsList: (query?: {
            next?: number;
        }, params?: RequestParams) => Promise<HttpResponse<EventsResponse, void | Error>>;
        v1SellerMessageCreate: (data: {
            replySign: string;
            message?: string;
            file?: File[];
        }, params?: RequestParams) => Promise<HttpResponse<MessageResponse, void | Error>>;
    };
}
export {};
//# sourceMappingURL=buyers-chat.d.ts.map