import { JSONString } from "../../@types/json-stringified"; import { ComaSeparatedValues } from "../sessionstate"; import { ResultCode } from "./resultcode"; import { ACTION } from "./action"; /** * @remarks cmd-control socket by default returns only string values */ export declare type StringBasedType = ComaSeparatedValues | JSONString | string; /** * Base dictionary\ object used for params and values * @remarks might not have some of the values, e.g. value might be undefined */ export interface IKeyMaybeValue { [key: string]: StringBasedType | undefined; } /** * @remarks always has values */ export interface IKeyValue { [key: string]: StringBasedType; } /** * Base command interface */ export interface ICOMMAND { /** * action is the name of command */ action: ACTION; /** * command parameters */ params: any; } /** * result object is the status of CMDP_XXXX_RESPONSE */ export declare class RESULT { code: ResultCode; /** * infostring string to client */ reason: string; } /** * Response from CmdControl to client */ export interface IRESPONSE extends ICOMMAND { /** * Response status */ result: RESULT; /** * command array to client */ commands: ICOMMAND[]; /** * response values */ values: IKeyMaybeValue; }