UNPKG

node-red-contrib-tplink-tapo-connect-api

Version:

This unofficial node-RED node allows connection to TP-Link Tapo devices. This project has been enhanced with AI support to enable new features. Starting with v0.50, we have added support for the KLAP protocol. To prioritize the operation of this node, we

46 lines (45 loc) 1.58 kB
import { RetryOptions } from '../types/retry-options'; import { tplinkTapoConnectWrapperType } from '../types/wrapper-types'; /** * Service class for handling batch operations with smart delays and error handling */ export declare class BatchOperationService { /** * Execute multiple operations in sequence with smart delays to prevent KLAP -1012 errors * @param operations Array of operations to execute * @param options Configuration options for batch execution * @returns Array of results for each operation */ static executeBatch(operations: Array<{ operation: () => Promise<tplinkTapoConnectWrapperType.tapoConnectResults>; name: string; delayAfter?: number; }>, options?: { defaultDelay?: number; retryOptions?: RetryOptions; }): Promise<Array<{ name: string; success: boolean; data?: any; error?: Error; duration?: number; }>>; /** * Execute operations in parallel (use with caution for device operations) * @param operations Array of operations to execute in parallel * @param options Configuration options * @returns Array of results for each operation */ static executeParallel(operations: Array<{ operation: () => Promise<tplinkTapoConnectWrapperType.tapoConnectResults>; name: string; }>, options?: { maxConcurrency?: number; }): Promise<Array<{ name: string; success: boolean; data?: any; error?: Error; duration?: number; }>>; }