export type AssingAvailableServerParams = {
    companyId: string;
    sessionUser: string;
};

export type BotEventParams = AssingAvailableServerParams & {};

export type BotRunningStatus =
    | "created"
    | "running"
    | "paused"
    | "restarting"
    | "removing"
    | "exited"
    | "dead";

export type BotEventError = {
    error: string;
    code: number;
};

export enum SERVER_STATE {
    "RUNNING" = "running",
    "NOT_WORKING" = "not_working",
    "NOT_ASSIGNED" = "not_assigned",
}

export enum BOT_STATE {
    "EXISTS" = "exists",
    "NOT_EXISTS" = "not_exists",
}

export enum BOT_SESSION_STATUS {
    "LOGED" = "ok",
    "UNLOGED" = "fail",
}

export type BotCheckStatus = {
    state: BOT_STATE;
    status: BotRunningStatus;
    serverState: SERVER_STATE;
};

export type BotCheckSession = {
    session: BOT_SESSION_STATUS;
};

export type SendBotMessageParams = {
    companyId: string;
    number: string;
    message: string;
    sessionUser: string;
};

export interface BotView {
    exists: boolean;
    runningState: BotRunningStatus;
    serverId?: string;
    serverName?: string;
    serverDescription?: string;
    serverState?: SERVER_STATE;
    botSession?: BOT_SESSION_STATUS;
    automaticNotifications: boolean;
}

export interface IWapServer {
    id?: string;
    name?: string;
    description?: string;
    ipv4: string;
    ipv6: string;
    countBots: number;
    maxBots: number;
    active: boolean;
}
