// api/monitoring/client/client.methods.ts
import { IExecuteFunctions } from 'n8n-workflow';
import { logger } from '../../../helpers/logger';
import {
	getWirelessClients,
	getWiredClients,
	getUnifiedClients,
} from './operations/getClients.methods';
import { getDetail } from './operations/getDetail.methods';
import { getWirelessClientDetails, getWiredClientDetails } from './operations/getClient.methods';
import { getMobility } from './operations/getMobility.methods';
import { getUsage } from './operations/getUsage.methods';
import { getTopn } from './operations/getTopn.methods';
import { getCount } from './operations/getCount.methods';

/**
 * All operations available for the client resource
 */
export const clientOperations = {
	getWirelessClients,
	getWiredClients,
	getUnifiedClients,
	getDetail,
	getWirelessClientDetails,
	getWiredClientDetails,
	getMobility,
	getUsage,
	getTopn,
	getCount,
};

/**
 * Check if a client operation exists
 *
 * @param operation Operation name to check
 * @returns boolean indicating if the operation exists
 */
export function hasClientOperation(operation: string): boolean {
	const exists = !!clientOperations[operation as keyof typeof clientOperations];
	logger.debug(
		'monitoring:client:check',
		`Operation "${operation}" ${exists ? 'exists' : 'does not exist'}`,
	);
	return exists;
}
