import { PeripheralDeviceId } from '@sofie-automation/shared-lib/dist/core/model/Ids';
import { NewPeripheralDeviceAPI, PeripheralDeviceAPIMethods } from '@sofie-automation/shared-lib/dist/peripheralDevice/methodsAPI';
import { CoreConnection, CoreCredentials } from './coreConnection';
import { DDPConnector } from './ddpConnector';
export declare function makeMethods(connection: Pick<CoreConnection, 'callMethodRaw'>, methods: object): any;
export declare function makeMethodsLowPrio(connection: Pick<CoreConnection, 'callMethodLowPrioRaw'>, methods: object): any;
type ParametersExceptDeviceIds<F> = F extends (deviceId: PeripheralDeviceId, deviceToken: string, ...rest: infer R) => any ? R : never;
type ExecutableFunction<T extends keyof NewPeripheralDeviceAPI> = (...args: ParametersExceptDeviceIds<NewPeripheralDeviceAPI[T]>) => Promise<ReturnType<NewPeripheralDeviceAPI[T]>>;
/**
 * Translate NewPeripheralDeviceAPI, to remove the deviceId and deviceToken parameters at the start, as they will be injected by the
 */
export type ExternalPeripheralDeviceAPI = {
    [T in keyof NewPeripheralDeviceAPI]: ExecutableFunction<T>;
};
export declare const TIMEOUTCALL = 200;
export declare const TIMEOUTREPLY = 50;
export declare class ConnectionMethodsQueue {
    private _triggerDoQueueTimer;
    private _timeLastMethodCall;
    private _timeLastMethodReply;
    private queuedMethodCalls;
    private _ddp;
    private _credentials;
    constructor(ddp: DDPConnector, credentials: CoreCredentials);
    /**
     * This should not be used directly, use the `coreMethods` wrapper instead.
     * Call a meteor method
     * @param methodName The name of the method to call
     * @param attrs Parameters to the method
     * @returns Resopnse, if any
     */
    callMethodRaw(methodName: string, attrs: Array<any>): Promise<any>;
    callMethodLowPrioRaw(methodName: PeripheralDeviceAPIMethods | string, attrs: Array<any>): Promise<any>;
    private _triggerDoQueue;
    private _doQueue;
}
export {};
//# sourceMappingURL=methods.d.ts.map