UNPKG

@iotize/tap-scripts

Version:

IoTize Tap scripts

34 lines (33 loc) 1.89 kB
import { ServiceCallType, TapResponse } from '@iotize/tap'; import { Lwm2mInstructionContext } from '../antlr4/IoTizeTestParser'; import { InstructionError } from '../instruction-error'; import { TestRunnerContextInterface } from '../test-runner-context-interface'; import { InstructionInterface } from './instruction.interface'; export declare class UnexpectedResultCodeError extends InstructionError { context: Lwm2mInstructionContext | undefined; constructor(context: Lwm2mInstructionContext | undefined, cmd: ServiceCallType<any, any>, response: TapResponse<any>, expectedResultCode: number); } export declare class UnexpectedResponseError extends InstructionError { context: Lwm2mInstructionContext | undefined; constructor(context: Lwm2mInstructionContext | undefined, cmd: ServiceCallType<any, any>, response: TapResponse<any>); } export declare class UnexpectedResponseLengthError extends InstructionError { context: Lwm2mInstructionContext | undefined; constructor(context: Lwm2mInstructionContext | undefined, cmd: ServiceCallType<any, any>, response: TapResponse<any>, expectedResponseLength: number); } export declare class Lwm2mCommandInstruction implements InstructionInterface<TapResponse<Uint8Array>> { protected call: ServiceCallType<unknown, unknown>; expectedResultCode: number; expectedResponseLength?: number | undefined; context?: Lwm2mInstructionContext; constructor(call: ServiceCallType<unknown, unknown>, expectedResultCode: number, expectedResponseLength?: number | undefined); getCommand(): ServiceCallType<any, any>; /** * @throws UnexpectedResponseError * @throws UnexpectedResultCode * @throws UnexpectedResponseLengthError * @param context */ run(context: TestRunnerContextInterface): Promise<TapResponse<Uint8Array>>; toString(): string; }