UNPKG

n8n-nodes-arubaclearpass

Version:

n8n community node for Aruba ClearPass API integration with comprehensive identity, policy, and enforcement profile management

256 lines (255 loc) 7.39 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.endpointProperties = exports.endpointFields = exports.endpointOperations = void 0; // Endpoint operations exports.endpointOperations = { displayName: 'Operation', name: 'operation', type: 'options', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], }, }, options: [ { name: 'Create', value: 'create', description: 'Create a new endpoint', action: 'Create an endpoint', }, { name: 'Delete', value: 'delete', description: 'Delete an endpoint', action: 'Delete an endpoint', }, { name: 'Get', value: 'get', description: 'Get an endpoint by ID', action: 'Get an endpoint', }, { name: 'Get By MAC', value: 'getByMac', description: 'Get an endpoint by MAC address', action: 'Get an endpoint by mac address', }, { name: 'List', value: 'list', description: 'Get all endpoints', action: 'List all endpoints', }, { name: 'Update', value: 'update', description: 'Update an endpoint', action: 'Update an endpoint', }, { name: 'Update By MAC', value: 'updateByMac', description: 'Update an endpoint by MAC address', action: 'Update an endpoint by mac address', }, ], default: 'list', }; // Fields for endpoints exports.endpointFields = [ // ID field (for operations that require endpoint ID) { displayName: 'Endpoint ID', name: 'endpointId', type: 'string', required: true, default: '', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['get', 'delete', 'update'], }, }, description: 'Numeric ID of the endpoint', }, // MAC Address field (for operations that require MAC address) { displayName: 'MAC Address', name: 'macAddress', type: 'string', required: true, default: '', placeholder: '00:11:22:33:44:55', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['getByMac', 'updateByMac', 'deleteByMac', 'create'], }, }, description: 'MAC Address of the endpoint', }, // Fields for create and update operations { displayName: 'Description', name: 'description', type: 'string', default: '', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['create', 'update', 'updateByMac'], }, }, description: 'Description of the endpoint', }, { displayName: 'Status', name: 'status', type: 'options', options: [ { name: 'Known', value: 'Known', }, { name: 'Unknown', value: 'Unknown', }, { name: 'Disabled', value: 'Disabled', }, ], default: 'Known', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['create', 'update', 'updateByMac'], }, }, description: 'Status of the endpoint', }, { displayName: 'Randomized MAC', name: 'randomizedMac', type: 'boolean', default: false, displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['create', 'update', 'updateByMac'], }, }, description: 'Whether the MAC address is randomized', }, { displayName: 'Device Insight Tags', name: 'deviceInsightTags', type: 'string', default: '', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['create', 'update', 'updateByMac'], }, }, description: 'List of Device Insight Tags', }, { displayName: 'Attributes', name: 'attributes', type: 'json', default: '{}', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['create', 'update', 'updateByMac'], }, }, description: 'Additional attributes (key/value pairs) for the endpoint', }, // Fields for listing endpoints { displayName: 'Return All', name: 'returnAll', type: 'boolean', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['list'], }, }, default: false, description: 'Whether to return all results or only up to a given limit', }, { displayName: 'Limit', name: 'limit', type: 'number', displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['list'], returnAll: [false], }, }, typeOptions: { minValue: 1, maxValue: 1000, }, default: 100, description: 'Max number of results to return', }, { displayName: 'Filters', name: 'filters', type: 'collection', placeholder: 'Add Filter', default: {}, displayOptions: { show: { domain: ['Identities'], resource: ['Endpoint'], operation: ['list'], }, }, options: [ { displayName: 'Filter', name: 'filter', type: 'string', default: '', description: 'JSON filter expression specifying the items to return', placeholder: '{"status": "Known", "mac_address": {"$contains": "00:11"}}', }, { displayName: 'Sort', name: 'sort', type: 'string', default: '+id', description: 'Sort ordering for returned items (default +id)', placeholder: '+mac_address or -status', }, { displayName: 'Calculate Count', name: 'calculate_count', type: 'boolean', default: false, description: 'Whether to calculate the total item count', }, ], }, ]; exports.endpointProperties = [exports.endpointOperations, ...exports.endpointFields];