export declare module webapis { /** * Base object going in one direction. */ interface Call { } /** * Base incoming message from clients. */ interface BaseIncoming extends Call { } /** * Authenticated message containing a secret we need to perform * certain operations. */ interface AuthenticatedIncoming { secret: string; } /** * Base outgoing server response. */ interface BaseOutgoing extends Call { _status?: string; _reason?: string; _raw?: string; } /** * Base OK message. * @type {BaseOutgoing} */ const OK: BaseOutgoing; /** * Customizable FAIL message. * @method FAIL * @param {string} reason [description] * @param {string} message [description] * @return {BaseOutgoing} [description] */ function FAIL(reason: string, message: string): BaseOutgoing; /** * Basic API error that can be thrown. * @method constructor * @param {string} public_reason [description] * @param {string} public_message [description] * @return {[type]} [description] */ class APIError extends Error { message: string; constructor(reason: string, message: string); } }