/// <reference types="node" />
import { SocketMessage } from "../SocketMessage";
import { Base, TokenUser } from "@openiap/openflow-api";
import { QueueMessageOptions } from "../amqpwrapper";
import { WebSocketServerClient } from "../WebSocketServerClient";
import { Span } from "@opentelemetry/api";
import { Workitem } from "@openiap/openflow-api";
export declare class Message {
    id: string;
    replyto: string;
    command: string;
    data: string;
    jwt: string;
    correlationId: string;
    traceId: string;
    spanId: string;
    cb: any;
    priority: number;
    options: QueueMessageOptions;
    tuser: TokenUser;
    clientagent: string;
    clientversion: string;
    QueueProcess(options: QueueMessageOptions, parent: Span): Promise<void>;
    static fromcommand(command: string): Message;
    static frommessage(msg: SocketMessage, data: string): Message;
    static fromjson(json: string): Message;
    Reply(command?: string): void;
    EnsureJWT(cli: WebSocketServerClient, jwtrequired: boolean): Promise<boolean>;
    Process(cli: WebSocketServerClient): Promise<void>;
    RegisterExchange(cli: WebSocketServerClient, parent: Span): Promise<void>;
    RegisterQueue(cli: WebSocketServerClient, span: Span): Promise<void>;
    QueueMessage(cli: WebSocketServerClient, parent: Span): Promise<void>;
    CloseQueue(cli: WebSocketServerClient, parent: Span): Promise<void>;
    Send(cli: WebSocketServerClient): void;
    private UnknownCommand;
    private static collectionCache;
    private static collectionCachetime;
    private ListCollections;
    private DropCollection;
    private Query;
    private Count;
    private GetDocumentVersion;
    private Aggregate;
    private UnWatch;
    private Watch;
    private InsertOne;
    private InsertMany;
    private UpdateOne;
    private UpdateMany;
    private InsertOrUpdateOne;
    private InsertOrUpdateMany;
    private DeleteOne;
    private DeleteMany;
    private MapReduce;
    static DoSignin(cli: WebSocketServerClient, rawAssertion: string, parent: Span): Promise<TokenUser>;
    Signin(cli: WebSocketServerClient, parent: Span): Promise<void>;
    private GetInstanceName;
    private EnsureNoderedInstance;
    private DeleteNoderedInstance;
    private DeleteNoderedPod;
    private RestartNoderedInstance;
    private GetKubeNodeLabels;
    private GetNoderedInstance;
    private GetNoderedInstanceLog;
    private StartNoderedInstance;
    private StopNoderedInstance;
    private _SaveFile;
    _addFile(file: string | Buffer, filename: string, mimeType: string, metadata: Base, compressed: boolean, jwt: string): Promise<string>;
    SaveFile(cli: WebSocketServerClient): Promise<void>;
    private _GetFile;
    private GetFile;
    private filescount;
    private filesnext;
    private UpdateFile;
    CreateWorkflowInstance(cli: WebSocketServerClient, parent: Span): Promise<void>;
    isObject(obj: any): boolean;
    flattenAndStringify(data: any): {};
    _StripeCancelPlan(resourceusageid: string, quantity: number, jwt: string, parent: Span): Promise<void>;
    StripeCancelPlan(cli: WebSocketServerClient, parent: Span): Promise<void>;
    GetNextInvoice(cli: WebSocketServerClient, parent: Span): Promise<void>;
    StripeAddPlan(cli: WebSocketServerClient, parent: Span): Promise<void>;
    _StripeAddPlan(customerid: string, userid: string, resourceid: string, stripeprice: string, quantity: number, skipSession: boolean, jwt: string, parent: Span): Promise<any[]>;
    Stripe<T>(method: string, object: string, id: string, payload: any, customerid: string): Promise<T>;
    StripeMessage(cli: WebSocketServerClient): Promise<void>;
    EnsureCustomer(cli: WebSocketServerClient, parent: Span): Promise<void>;
    formatBytes(bytes: any, decimals?: number): string;
    sleep(ms: any): Promise<unknown>;
    ReloadUserToken(cli: WebSocketServerClient, parent: Span): Promise<void>;
    static lastHouseKeeping: Date;
    static ReadyForHousekeeping(): boolean;
    private Housekeeping;
    _Housekeeping(skipNodered: boolean, skipCalculateSize: boolean, skipUpdateUserSize: boolean, parent: Span): Promise<void>;
    SelectCustomer(parent: Span): Promise<TokenUser>;
    AddWorkitem(parent: Span): Promise<void>;
    DuplicateWorkitem(originalwi: Workitem, wiq: string, wiqid: string, jwt: string, parent: Span): Promise<void>;
    AddWorkitems(parent: Span): Promise<void>;
    UpdateWorkitem(parent: Span): Promise<void>;
    PopWorkitem(parent: Span): Promise<void>;
    DeleteWorkitem(parent: Span): Promise<void>;
    AddWorkitemQueue(cli: WebSocketServerClient, parent: Span): Promise<void>;
    GetWorkitemQueue(parent: Span): Promise<void>;
    UpdateWorkitemQueue(parent: Span): Promise<void>;
    DeleteWorkitemQueue(parent: Span): Promise<void>;
    CustomCommand(parent: Span): Promise<void>;
}
export declare class JSONfn {
    static stringify(obj: any): string;
}
