n8n-nodes-arubacentral
Version:
n8n community node for Aruba Central API integration with comprehensive monitoring, configuration, and management capabilities
54 lines (51 loc) • 1.86 kB
text/typescript
import { IExecuteFunctions } from 'n8n-workflow';
import { logger } from '../../../helpers/logger';
import { getGateways } from './operations/getGateways.methods';
import { getGateway } from './operations/getGateway.methods';
import { deleteGateway } from './operations/deleteGateway.methods';
import { getDetail } from './operations/getDetail.methods';
import { getUplinkBandwidthUsage } from './operations/getUplinkBandwidthUsage.methods';
import { getStats } from './operations/getStats.methods';
import { getWanCompressionStats } from './operations/getWanCompressionStats.methods';
import { getDistribution } from './operations/getDistribution.methods';
import { getPortsBandwidthUsage } from './operations/getPortsBandwidthUsage.methods';
import { getPorts } from './operations/getPorts.methods';
import { getErrors } from './operations/getErrors.methods';
import { getTunnels } from './operations/getTunnels.methods';
import { getClients } from './operations/getClients.methods';
import { getPools } from './operations/getPools.methods';
import { getInfo } from './operations/getInfo.methods';
/**
* All operations available for the gateway resource
*/
export const gatewayOperations = {
getGateways,
getGateway,
deleteGateway,
getDetail,
getUplinkBandwidthUsage,
getStats,
getWanCompressionStats,
getDistribution,
getPortsBandwidthUsage,
getPorts,
getErrors,
getTunnels,
getClients,
getPools,
getInfo,
};
/**
* Check if a gateway operation exists
*
* @param operation Operation name to check
* @returns boolean indicating if the operation exists
*/
export function hasGatewayOperation(operation: string): boolean {
const exists = !!gatewayOperations[operation as keyof typeof gatewayOperations];
logger.debug(
'monitoring:gateway:check',
`Operation "${operation}" ${exists ? 'exists' : 'does not exist'}`,
);
return exists;
}