import { EncoderFct } from '@iotize/common/converter/api';
import { BodyDecoder, BodyEncoder, IoTizeClient as Client, Response, Command } from '@iotize/device-client.js/client/api';
import { Observable } from 'rxjs';
import { ApiRequest } from '@iotize/device-client.js/client/impl';
import { ApiConfig } from '../config/api-config';
export declare type ServiceCallMethodType = 'GET' | 'PUT' | 'POST';
export declare type ServiceCallType<BodyType = any, ReturnType = any> = {
    methodType: ServiceCallMethodType;
    path: string;
    pathParameters?: {
        [key: string]: string | number;
    };
    body?: BodyType;
    bodyEncoder?: string | BodyEncoder<BodyType> | EncoderFct<BodyType, Uint8Array>;
    returnTypeConverter?: string | BodyDecoder<ReturnType>;
};
export declare abstract class AbstractService {
    config: ApiConfig;
    client: Client;
    resources: {
        [key: string]: ServiceCallType;
    };
    constructor(client: Client, apiConfig: ApiConfig);
    _call(options: ServiceCallType): Promise<Response<any>>;
    _callObservable(options: ServiceCallType): Observable<Response<any>>;
    _convertToCommandArgs(options: ServiceCallType): [Command, BodyDecoder<any> | undefined];
    toLwm2mRequest(options: ServiceCallType): ApiRequest;
    private static _toLwm2mRequest;
    static callToCommandArgs(options: ServiceCallType, config?: ApiConfig): [ApiRequest, BodyDecoder<any> | undefined];
    /**
     * Encode body accoding to options and configuration
     */
    static encodeBody(options: ServiceCallType): Uint8Array;
}
