n8n-nodes-tenable-community
Version:
n8n node for the Tenable One platform
228 lines (227 loc) • 6.53 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.attackSurfaceManagementFields = exports.attackSurfaceManagementOperations = void 0;
exports.attackSurfaceManagementOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'assets',
],
},
},
options: [
{
name: 'Archive',
value: 'archive',
description: 'Archives or unarchives specific assets',
action: 'Archive assets',
},
{
name: 'Get',
value: 'get',
description: 'Returns details for the specified asset',
action: 'Get an asset',
},
{
name: 'History',
value: 'history',
description: 'Returns the history for the specified asset',
action: 'Get asset history',
},
{
name: 'List',
value: 'list',
description: 'Returns a list of assets',
action: 'List assets',
},
{
name: 'Unarchive',
value: 'unarchive',
description: 'Unarchives specific assets',
action: 'Unarchive assets',
},
],
default: 'list',
},
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'export',
],
},
},
options: [
{
name: 'Download',
value: 'download',
description: 'Downloads the export associated with the specified token',
action: 'Download an export',
},
{
name: 'Assets XLSX',
value: 'assetsXlsx',
description: 'Generates an export token that can be used to download assets data in XLSX format',
action: 'Export assets in xlsx format',
},
{
name: 'Assets CSV',
value: 'assetsCsv',
description: 'Generates an export token that can be used to download assets data in CSV format',
action: 'Export assets in csv format',
},
{
name: 'Assets JSON',
value: 'assetsJson',
description: 'Generates an export token that can be used to download assets data in JSON format',
action: 'Export assets in json format',
},
],
default: 'download',
},
];
exports.attackSurfaceManagementFields = [
// ASSETS
{
displayName: 'Asset ID',
name: 'assetId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: [
'assets',
],
operation: [
'get',
'history',
],
},
},
default: '',
description: 'The ID of the asset to retrieve',
},
{
displayName: 'Filters',
name: 'filters',
type: 'json',
displayOptions: {
show: {
resource: [
'assets',
],
operation: [
'list',
],
},
},
default: '',
description: 'The list of asset IDs',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'assets',
],
operation: [
'list',
'archive',
'unarchive',
],
},
},
options: [
{
displayName: 'Columns',
name: 'columns',
type: 'string',
default: '',
description: 'List of columns to return divided by a comma',
},
{
displayName: 'Asset IDs',
name: 'asset_ids',
type: 'string',
default: '',
description: 'A comma-separated list of asset IDs to archive or unarchive',
},
{
displayName: 'Filters',
name: 'filters',
type: 'json',
default: '',
description: 'The filters to apply to the archive or unarchive operation',
},
],
},
// EXPORT
{
displayName: 'Token',
name: 'token',
type: 'string',
typeOptions: { password: true },
required: true,
displayOptions: {
show: {
resource: [
'export',
],
operation: [
'download',
],
},
},
default: '',
description: 'The export token',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: [
'export',
],
operation: [
'assetsXlsx',
'assetsCsv',
'assetsJson',
],
},
},
options: [
{
displayName: 'Filters',
name: 'filters',
type: 'json',
default: '',
description: 'The filters to apply to the export',
},
{
displayName: 'Columns',
name: 'columns',
type: 'string',
default: '',
description: 'A comma-separated list of columns to include in the export',
},
],
},
];