/** * An instance of this object is passed to the Sentry’s on_detect * callback each time the Sentry object sees what looks like the * start of a ZMODEM session. * * Note that it is possible for a detection to be “retracted” * if the Sentry consumes bytes afterward that are not ZMODEM. * When this happens, the Sentry’s `retract` event will fire, * after which the Detection object is no longer usable. */ declare class Detection { sess: any; sentry: any; _denier: Function; _is_valid: Function; _session_type: string; /** * Not called directly. */ constructor(sessionType: string, sess: any, sentry: any, denier: Function, checker: Function); _confirmer(): any; /** * Confirm that the detected ZMODEM sequence indicates the * start of a ZMODEM session. * * @return {Session} The ZMODEM Session object (i.e., either a * Send or Receive instance). */ confirm: (...args: any[]) => any; /** * Tell the Sentry that the detected bytes sequence is * **NOT** intended to be the start of a ZMODEM session. */ deny: (...args: any[]) => any; /** * Tells whether the Detection is still valid i.e., whether * the Sentry has `consume()`d bytes that invalidate the * Detection. * * @returns {boolean} Whether the Detection is valid. */ is_valid: (...args: any[]) => boolean; /** * Gives the session’s role. * * @returns {string} One of: * - `receive` * - `send` */ get_session_role: () => string; } export default Detection;