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, methods: object): any; export declare function makeMethodsLowPrio(connection: Pick, methods: object): any; type ParametersExceptDeviceIds = F extends (deviceId: PeripheralDeviceId, deviceToken: string, ...rest: infer R) => any ? R : never; type ExecutableFunction = (...args: ParametersExceptDeviceIds) => Promise>; /** * 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; }; 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): Promise; callMethodLowPrioRaw(methodName: PeripheralDeviceAPIMethods | string, attrs: Array): Promise; private _triggerDoQueue; private _doQueue; } export {}; //# sourceMappingURL=methods.d.ts.map