import type { ENTRYPOINT } from "../../client/network.js";
import type { BalanceType } from "../common.js";
import type { ArbStatus } from "./object.js";
export interface EventBase {
    id: {
        eventSeq: string;
        txDigest: string;
    };
    sender: string;
    type: string | "ArbEvent" | "NewOrderEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent";
    type_raw: string;
    time: string;
    parsedJson_raw?: any;
}
export interface ArbEvent extends EventBase {
    arb: string;
    arbitration: string;
    order: string;
    status: ArbStatus;
}
export interface NewOrderEvent extends EventBase {
    order: string;
    service: string;
    progress?: string | null;
    discount?: string | null;
    allocation?: string | null;
    amount: BalanceType;
}
export interface ProgressEvent extends EventBase {
    progress: string;
    machine: string;
    task?: string | null;
    node: string;
    forward?: string | null;
    hold?: boolean | null;
}
export interface DemandPresentEvent extends EventBase {
    demand: string;
    service: string | null;
    recommend: string;
}
export interface DemandFeedbackEvent extends EventBase {
    demand: string;
    service: string | null;
    feedback: string;
    acceptance_score?: number | null;
}
export interface NewEntityEvent extends EventBase {
    address: string;
    resource: string;
    referrer: string | null;
}
export interface EventAnswer {
    data: EventBase[];
    hasNextPage: boolean;
    nextCursor?: {
        eventSeq: string;
        txDigest: string;
    } | null;
    cache_expire?: number | "INFINITE";
}
export interface EventCursor {
    eventSeq: string;
    txDigest: string;
}
export type EventType = "ArbEvent" | "NewOrderEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent" | string;
export interface EventQuery {
    type: EventType;
    cursor?: EventCursor | null | undefined;
    limit?: number | null | undefined;
    order?: "ascending" | "descending" | null | undefined;
    no_cache?: boolean;
    network?: ENTRYPOINT;
}
export declare const query_events_json: (json: string) => Promise<string>;
export declare const query_events: (query: EventQuery) => Promise<EventAnswer | undefined>;
