UNPKG

n8n-nodes-netbox

Version:

n8n community node for NetBox API integration with comprehensive DCIM, IPAM, Virtualization, Circuits, Wireless, and data center management operations

357 lines (356 loc) 10.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.l2vpnTerminationsFields = exports.l2vpnTerminationFiltersField = exports.l2vpnTerminationLimitField = exports.l2vpnTerminationReturnAllField = exports.l2vpnTerminationUpdateFields = exports.l2vpnTerminationAdditionalFields = exports.l2vpnTerminationAssignedObjectIdField = exports.l2vpnTerminationAssignedObjectTypeField = exports.l2vpnTerminationL2vpnField = exports.l2vpnTerminationIdField = exports.l2vpnTerminationsOperations = void 0; const baseProperties_1 = require("../baseProperties"); exports.l2vpnTerminationsOperations = { ...baseProperties_1.baseProperties, displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], }, }, options: [ { name: 'List', value: 'list', description: 'Get all L2VPN terminations', action: 'List all L2VPN terminations', }, { name: 'Get', value: 'get', description: 'Get an L2VPN termination by ID', action: 'Get an L2VPN termination', }, { name: 'Create', value: 'create', description: 'Create a new L2VPN termination', action: 'Create an L2VPN termination', }, { name: 'Update', value: 'update', description: 'Update an L2VPN termination', action: 'Update an L2VPN termination', }, { name: 'Delete', value: 'delete', description: 'Delete an L2VPN termination', action: 'Delete an L2VPN termination', }, ], default: 'list', }; // ID field for get, update, and delete operations exports.l2vpnTerminationIdField = { displayName: 'L2VPN Termination ID', name: 'l2vpnTerminationId', type: 'string', required: true, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['get', 'update', 'delete'], }, }, default: '', description: 'The ID of the L2VPN termination', noDataExpression: false, }; // L2VPN field for create operation exports.l2vpnTerminationL2vpnField = { displayName: 'L2VPN', name: 'l2vpn', type: 'string', required: true, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['create'], }, }, default: '', description: 'L2VPN name or ID', noDataExpression: false, }; // Assigned Object Type field for create operation exports.l2vpnTerminationAssignedObjectTypeField = { displayName: 'Assigned Object Type', name: 'assigned_object_type', type: 'options', required: true, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['create'], }, }, options: [ { name: 'Interface', value: 'dcim.interface', }, { name: 'VM Interface', value: 'virtualization.vminterface', }, { name: 'VLAN', value: 'ipam.vlan', }, ], default: 'dcim.interface', description: 'Type of object being assigned to the L2VPN', noDataExpression: false, }; // Assigned Object ID field for create operation exports.l2vpnTerminationAssignedObjectIdField = { displayName: 'Assigned Object ID', name: 'assigned_object_id', type: 'string', required: true, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['create'], }, }, default: '', description: 'ID of the object being assigned to the L2VPN', noDataExpression: false, }; // Additional fields for create operation exports.l2vpnTerminationAdditionalFields = { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['create'], }, }, options: [ { displayName: 'Comments', name: 'comments', type: 'string', default: '', description: 'Comments for the L2VPN termination', }, { displayName: 'Tags', name: 'tags', type: 'string', default: '', description: 'Comma-separated list of tag names or IDs', }, { displayName: 'Custom Fields', name: 'custom_fields', type: 'string', default: '', description: 'Custom fields as JSON object', }, ], }; // Update fields for update operation exports.l2vpnTerminationUpdateFields = { displayName: 'Update Fields', name: 'updateFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['update'], }, }, options: [ { displayName: 'L2VPN', name: 'l2vpn', type: 'string', default: '', description: 'L2VPN name or ID', }, { displayName: 'Assigned Object Type', name: 'assigned_object_type', type: 'options', options: [ { name: 'Interface', value: 'dcim.interface', }, { name: 'VM Interface', value: 'virtualization.vminterface', }, { name: 'VLAN', value: 'ipam.vlan', }, ], default: 'dcim.interface', description: 'Type of object being assigned to the L2VPN', }, { displayName: 'Assigned Object ID', name: 'assigned_object_id', type: 'string', default: '', description: 'ID of the object being assigned to the L2VPN', }, { displayName: 'Comments', name: 'comments', type: 'string', default: '', description: 'Comments for the L2VPN termination', }, { displayName: 'Tags', name: 'tags', type: 'string', default: '', description: 'Comma-separated list of tag names or IDs', }, { displayName: 'Custom Fields', name: 'custom_fields', type: 'string', default: '', description: 'Custom fields as JSON object', }, ], }; // Return All field for list operation exports.l2vpnTerminationReturnAllField = { displayName: 'Return All', name: 'returnAll', type: 'boolean', displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['list'], }, }, default: false, description: 'Whether to return all results or only up to the limit', noDataExpression: false, }; // Limit field for list operation exports.l2vpnTerminationLimitField = { displayName: 'Limit', name: 'limit', type: 'number', displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['list'], returnAll: [false], }, }, typeOptions: { minValue: 1, }, default: 50, description: 'Max number of results to return', noDataExpression: false, }; // Filters for list operation exports.l2vpnTerminationFiltersField = { displayName: 'Filters', name: 'filters', type: 'collection', placeholder: 'Add Filter', default: {}, displayOptions: { show: { domain: ['vpn'], resource: ['l2vpn-terminations'], operation: ['list'], }, }, options: [ { displayName: 'L2VPN', name: 'l2vpn', type: 'string', default: '', description: 'Filter by L2VPN name or ID', }, { displayName: 'Assigned Object Type', name: 'assigned_object_type', type: 'options', options: [ { name: 'Interface', value: 'dcim.interface', }, { name: 'VM Interface', value: 'virtualization.vminterface', }, { name: 'VLAN', value: 'ipam.vlan', }, ], default: '', description: 'Filter by assigned object type', }, { displayName: 'Tag', name: 'tag', type: 'string', default: '', description: 'Filter by tag name', }, { displayName: 'Created', name: 'created', type: 'dateTime', default: '', description: 'Filter by creation date', }, { displayName: 'Last Updated', name: 'last_updated', type: 'dateTime', default: '', description: 'Filter by last update date', }, ], }; exports.l2vpnTerminationsFields = [ exports.l2vpnTerminationIdField, exports.l2vpnTerminationL2vpnField, exports.l2vpnTerminationAssignedObjectTypeField, exports.l2vpnTerminationAssignedObjectIdField, exports.l2vpnTerminationAdditionalFields, exports.l2vpnTerminationUpdateFields, exports.l2vpnTerminationReturnAllField, exports.l2vpnTerminationLimitField, exports.l2vpnTerminationFiltersField, ];