APIResource

interface DeviceSessionCommon {
    abortController: AbortController;
    ALLOWED_HTTP_METHODS: Method[];
    requestConfig: AxiosRequestConfig;
    root: API;
    stack: (string | number)[];
    get first(): string | number;
    get last(): string | number;
    set last(val: string | number): void;
    abortRequest(): void;
    commands(): APIList<DeviceSessionCommand>;
    currentStep(): APIResource<DeviceSessionStep, NoQueryParams, void>;
    data(data: QueryParams): this;
    delete(): this;
    formData(data: QueryParams): this;
    get(): this;
    getParams(): Partial<QueryParams>;
    headers(headers: Record<string, string>): this;
    input(): InputFileset;
    jsonData(data: QueryParams): this;
    method(name: Method): this;
    output(): OutputFileset;
    params<T extends string = string>(params: Pick<QueryParams, T>): this;
    paramsSerializer(params: QueryParams): string;
    post(): this;
    push(...items: (string | number)[]): this;
    removeParam(key: string): this;
    removeRequestConfig(key: keyof AxiosRequestConfig): this;
    restack(...items: (string | number)[]): this;
    screenshot(id: number): APIResource<Screenshot>;
    screenshots(): APIList<Screenshot>;
    send<T = any>(): Promise<AxiosResponse<T>>;
    setRequestConfig(requestConfig: AxiosRequestConfig): this;
    shift(): this;
    step(
        id: number | "current",
    ): APIResource<DeviceSessionStep, NoQueryParams, void>;
    steps(): APIList<DeviceSessionStep>;
    testCaseRuns(): APIList<
        TestCaseRun,
        NoQueryParams
        | SessionQueryParams,
        void,
    >;
    toUrl(absolute?: boolean): string;
}

Hierarchy (View Summary)

Implemented by

Properties

abortController: AbortController
ALLOWED_HTTP_METHODS: Method[] = ALLOWED_HTTP_METHODS
requestConfig: AxiosRequestConfig = {}
root: API
stack: (string | number)[] = []

Accessors

  • get first(): string | number
  • Get first element of the stack

    Returns string | number

  • get last(): string | number
  • Get last element of the stack

    Returns string | number

  • set last(val: string | number): void
  • Set last element of the stack

    Parameters

    • val: string | number

    Returns void

Methods