pull:初次提交

This commit is contained in:
Yep_Q
2025-09-08 04:48:28 +08:00
parent 5c0619656d
commit f64f498365
11751 changed files with 1953723 additions and 0 deletions

View File

@@ -0,0 +1,328 @@
import type { INodeProperties } from 'n8n-workflow';
import { searchProperties } from './common.descriptions';
import { updateDisplayOptions } from '../../../utils/utilities';
const searchDisplayOptions = {
show: {
resource: ['attribute'],
operation: ['search'],
},
};
const searchDescription = updateDisplayOptions(searchDisplayOptions, searchProperties);
export const attributeOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['attribute'],
},
},
noDataExpression: true,
options: [
{
name: 'Create',
value: 'create',
action: 'Create an attribute',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete an attribute',
},
{
name: 'Get',
value: 'get',
action: 'Get an attribute',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many attributes',
},
{
name: 'Search',
value: 'search',
action: 'Get a filtered list of attributes',
},
{
name: 'Update',
value: 'update',
action: 'Update an attribute',
},
],
default: 'create',
},
];
export const attributeFields: INodeProperties[] = [
// ----------------------------------------
// attribute: create
// ----------------------------------------
{
displayName: 'Event UUID',
name: 'eventId',
description: 'UUID of the event to attach the attribute to',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['create'],
},
},
},
{
displayName: 'Type',
name: 'type',
type: 'options',
options: [
{
name: 'Text',
value: 'text',
},
{
name: 'URL',
value: 'url',
},
{
name: 'Comment',
value: 'comment',
},
],
required: true,
default: 'text',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['create'],
},
},
},
{
displayName: 'Value',
name: 'value',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['attribute'],
operation: ['create'],
},
},
options: [
{
displayName: 'Distribution',
name: 'distribution',
type: 'options',
default: 0,
description: 'Who will be able to see this event once published',
options: [
{
name: 'All Communities',
value: 3,
},
{
name: 'Connected Communities',
value: 2,
},
{
name: 'Inherit Event',
value: 5,
},
{
name: 'Sharing Group',
value: 4,
},
{
name: 'This Community Only',
value: 1,
},
{
name: 'Your Organization Only',
value: 0,
},
],
},
{
displayName: 'Sharing Group Name or ID',
name: 'sharing_group_id',
type: 'options',
default: '',
description:
'Use only for when <code>Sharing Group</code> is selected in <code>Distribution</code>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getSharingGroups',
},
},
],
},
// ----------------------------------------
// attribute: delete
// ----------------------------------------
{
displayName: 'Attribute ID',
name: 'attributeId',
description: 'UUID or numeric ID of the attribute',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['delete'],
},
},
},
// ----------------------------------------
// attribute: get
// ----------------------------------------
{
displayName: 'Attribute ID',
name: 'attributeId',
description: 'UUID or numeric ID of the attribute',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['get'],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['attribute'],
operation: ['getAll'],
returnAll: [false],
},
},
},
// ----------------------------------------
// attribute: search
// ----------------------------------------
...searchDescription,
// ----------------------------------------
// attribute: update
// ----------------------------------------
{
displayName: 'Attribute ID',
name: 'attributeId',
description: 'ID of the attribute to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['attribute'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['attribute'],
operation: ['update'],
},
},
options: [
{
displayName: 'Distribution',
name: 'distribution',
type: 'options',
default: 0,
description: 'Who will be able to see this event once published',
options: [
{
name: 'All Communities',
value: 3,
},
{
name: 'Connected Communities',
value: 2,
},
{
name: 'Inherit Event',
value: 5,
},
{
name: 'Sharing Group',
value: 4,
},
{
name: 'This Community Only',
value: 1,
},
{
name: 'Your Organization Only',
value: 0,
},
],
},
{
displayName: 'Sharing Group Name or ID',
name: 'sharing_group_id',
type: 'options',
default: '',
// eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-dynamic-options
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. Use only for when <code>Sharing Group</code> is selected in <code>Distribution</code>.',
typeOptions: {
loadOptionsMethod: 'getSharingGroups',
},
},
],
},
];

View File

@@ -0,0 +1,449 @@
import type { INodeProperties } from 'n8n-workflow';
import { searchProperties } from './common.descriptions';
import { updateDisplayOptions } from '../../../utils/utilities';
const searchDisplayOptions = {
show: {
resource: ['event'],
operation: ['search'],
},
};
const searchDescription = updateDisplayOptions(searchDisplayOptions, searchProperties);
export const eventOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['event'],
},
},
noDataExpression: true,
options: [
{
name: 'Create',
value: 'create',
action: 'Create an event',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete an event',
},
{
name: 'Get',
value: 'get',
action: 'Get an event',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many events',
},
{
name: 'Publish',
value: 'publish',
action: 'Publish an event',
},
{
name: 'Search',
value: 'search',
action: 'Get a filtered list of events',
},
{
name: 'Unpublish',
value: 'unpublish',
action: 'Unpublish an event',
},
{
name: 'Update',
value: 'update',
action: 'Update an event',
},
],
default: 'create',
},
];
export const eventFields: INodeProperties[] = [
// ----------------------------------------
// event: create
// ----------------------------------------
{
displayName: 'Organization Name or ID',
name: 'org_id',
type: 'options',
default: '',
required: true,
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getOrgs',
},
displayOptions: {
show: {
resource: ['event'],
operation: ['create'],
},
},
},
{
displayName: 'Information',
name: 'information',
type: 'string',
default: '',
required: true,
description: 'Information on the event - max 65535 characters',
displayOptions: {
show: {
resource: ['event'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['event'],
operation: ['create'],
},
},
options: [
{
displayName: 'Analysis',
name: 'analysis',
type: 'options',
default: 0,
description: 'Analysis maturity level of the event',
options: [
{
name: 'Initial',
value: 0,
},
{
name: 'Ongoing',
value: 1,
},
{
name: 'Complete',
value: 2,
},
],
},
{
displayName: 'Distribution',
name: 'distribution',
type: 'options',
default: 0,
description: 'Who will be able to see this event once published',
options: [
{
name: 'All Communities',
value: 3,
},
{
name: 'Connected Communities',
value: 2,
},
{
name: 'Inherit Event',
value: 5,
},
{
name: 'Sharing Group',
value: 4,
},
{
name: 'This Community Only',
value: 1,
},
{
name: 'Your Organization Only',
value: 0,
},
],
},
{
displayName: 'Sharing Group Name or ID',
name: 'sharing_group_id',
type: 'options',
default: '',
description:
'Use only for when <code>Sharing Group</code> is selected in <code>Distribution</code>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
typeOptions: {
loadOptionsMethod: 'getSharingGroups',
},
},
{
displayName: 'Threat Level ID',
name: 'threat_level_id',
type: 'options',
default: 1,
options: [
{
name: 'High',
value: 1,
},
{
name: 'Medium',
value: 2,
},
{
name: 'Low',
value: 3,
},
{
name: 'Undefined',
value: 4,
},
],
},
],
},
// ----------------------------------------
// event: delete
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['event'],
operation: ['delete'],
},
},
},
// ----------------------------------------
// event: get
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['event'],
operation: ['get'],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['event'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['event'],
operation: ['getAll'],
returnAll: [false],
},
},
},
// ----------------------------------------
// event: publish
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['event'],
operation: ['publish'],
},
},
},
// ----------------------------------------
// event: unpublish
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['event'],
operation: ['unpublish'],
},
},
},
// ----------------------------------------
// event: search
// ----------------------------------------
...searchDescription,
// ----------------------------------------
// event: update
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['event'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['event'],
operation: ['update'],
},
},
options: [
{
displayName: 'Analysis',
name: 'analysis',
type: 'options',
default: 0,
description: 'Analysis maturity level of the event',
options: [
{
name: 'Initial',
value: 0,
},
{
name: 'Ongoing',
value: 1,
},
{
name: 'Complete',
value: 2,
},
],
},
{
displayName: 'Distribution',
name: 'distribution',
type: 'options',
default: 0,
description: 'Who will be able to see this event once published',
options: [
{
name: 'All Communities',
value: 3,
},
{
name: 'Connected Communities',
value: 2,
},
{
name: 'Inherit Event',
value: 5,
},
{
name: 'Sharing Group',
value: 4,
},
{
name: 'This Community Only',
value: 1,
},
{
name: 'Your Organization Only',
value: 0,
},
],
},
{
displayName: 'Information',
name: 'information',
type: 'string',
default: '',
description: 'Information on the event - max 65535 characters',
},
{
displayName: 'Sharing Group Name or ID',
name: 'sharing_group_id',
type: 'options',
default: '',
// eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-dynamic-options
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. Use only for when <code>Sharing Group</code> is selected in <code>Distribution</code>.',
typeOptions: {
loadOptionsMethod: 'getSharingGroups',
},
},
{
displayName: 'Threat Level ID',
name: 'threat_level_id',
type: 'options',
default: 1,
options: [
{
name: 'High',
value: 1,
},
{
name: 'Medium',
value: 2,
},
{
name: 'Low',
value: 3,
},
{
name: 'Undefined',
value: 4,
},
],
},
],
},
];

View File

@@ -0,0 +1,102 @@
import type { INodeProperties } from 'n8n-workflow';
export const eventTagOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['eventTag'],
},
},
noDataExpression: true,
options: [
{
name: 'Add',
value: 'add',
action: 'Add a tag to an event',
},
{
name: 'Remove',
value: 'remove',
action: 'Remove a tag from an event',
},
],
default: 'add',
},
];
export const eventTagFields: INodeProperties[] = [
// ----------------------------------------
// eventTag: add
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['eventTag'],
operation: ['add'],
},
},
},
{
displayName: 'Tag Name or ID',
name: 'tagId',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
type: 'options',
required: true,
default: '',
typeOptions: {
loadOptionsMethod: 'getTags',
},
displayOptions: {
show: {
resource: ['eventTag'],
operation: ['add'],
},
},
},
// ----------------------------------------
// eventTag: remove
// ----------------------------------------
{
displayName: 'Event ID',
name: 'eventId',
description: 'UUID or numeric ID of the event',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['eventTag'],
operation: ['remove'],
},
},
},
{
displayName: 'Tag Name or ID',
name: 'tagId',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
type: 'options',
required: true,
default: '',
typeOptions: {
loadOptionsMethod: 'getTags',
},
displayOptions: {
show: {
resource: ['eventTag'],
operation: ['remove'],
},
},
},
];

View File

@@ -0,0 +1,324 @@
import type { INodeProperties } from 'n8n-workflow';
export const feedOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['feed'],
},
},
noDataExpression: true,
options: [
{
name: 'Create',
value: 'create',
action: 'Create a feed',
},
{
name: 'Disable',
value: 'disable',
action: 'Disable a feed',
},
{
name: 'Enable',
value: 'enable',
action: 'Enable a feed',
},
{
name: 'Get',
value: 'get',
action: 'Get a feed',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many feeds',
},
{
name: 'Update',
value: 'update',
action: 'Update a feed',
},
],
default: 'create',
},
];
export const feedFields: INodeProperties[] = [
// ----------------------------------------
// feed: create
// ----------------------------------------
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['feed'],
operation: ['create'],
},
},
},
{
displayName: 'Provider',
name: 'provider',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: ['feed'],
operation: ['create'],
},
},
},
{
displayName: 'URL',
name: 'url',
type: 'string',
default: '',
placeholder: 'https://example.com',
required: true,
displayOptions: {
show: {
resource: ['feed'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['feed'],
operation: ['create'],
},
},
options: [
{
displayName: 'Distribution',
name: 'distribution',
type: 'options',
default: 0,
description: 'Who will be able to see this event once published',
options: [
{
name: 'All Communities',
value: 3,
},
{
name: 'Connected Communities',
value: 2,
},
{
name: 'Inherit Event',
value: 5,
},
{
name: 'Sharing Group',
value: 4,
},
{
name: 'This Community Only',
value: 1,
},
{
name: 'Your Organization Only',
value: 0,
},
],
},
{
displayName: 'Rules',
name: 'json',
type: 'string',
default: '',
description: 'Filter rules for the feed',
},
],
},
// ----------------------------------------
// feed: disable
// ----------------------------------------
{
displayName: 'Feed ID',
name: 'feedId',
description: 'UUID or numeric ID of the feed',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['feed'],
operation: ['disable'],
},
},
},
// ----------------------------------------
// feed: enable
// ----------------------------------------
{
displayName: 'Feed ID',
name: 'feedId',
description: 'UUID or numeric ID of the feed',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['feed'],
operation: ['enable'],
},
},
},
// ----------------------------------------
// feed: get
// ----------------------------------------
{
displayName: 'Feed ID',
name: 'feedId',
description: 'UUID or numeric ID of the feed',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['feed'],
operation: ['get'],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['feed'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['feed'],
operation: ['getAll'],
returnAll: [false],
},
},
},
// ----------------------------------------
// feed: update
// ----------------------------------------
{
displayName: 'Feed ID',
name: 'feedId',
description: 'ID of the feed to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['feed'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['feed'],
operation: ['update'],
},
},
options: [
{
displayName: 'Distribution',
name: 'distribution',
type: 'options',
default: 0,
description: 'Who will be able to see this event once published',
options: [
{
name: 'All Communities',
value: 3,
},
{
name: 'Connected Communities',
value: 2,
},
{
name: 'Inherit Event',
value: 5,
},
{
name: 'Sharing Group',
value: 4,
},
{
name: 'This Community Only',
value: 1,
},
{
name: 'Your Organization Only',
value: 0,
},
],
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
},
{
displayName: 'Provider',
name: 'provider',
type: 'string',
default: '',
},
{
displayName: 'Rules',
name: 'rules',
type: 'json',
default: '',
description: 'Filter rules for the feed',
},
{
displayName: 'URL',
name: 'url',
type: 'string',
default: '',
},
],
},
];

View File

@@ -0,0 +1,105 @@
import type { INodeProperties } from 'n8n-workflow';
export const galaxyOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['galaxy'],
},
},
noDataExpression: true,
options: [
{
name: 'Delete',
value: 'delete',
action: 'Delete a galaxy',
},
{
name: 'Get',
value: 'get',
action: 'Get a galaxy',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many galaxies',
},
],
default: 'get',
},
];
export const galaxyFields: INodeProperties[] = [
// ----------------------------------------
// galaxy: delete
// ----------------------------------------
{
displayName: 'Galaxy ID',
name: 'galaxyId',
description: 'UUID or numeric ID of the galaxy',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['galaxy'],
operation: ['delete'],
},
},
},
// ----------------------------------------
// galaxy: get
// ----------------------------------------
{
displayName: 'Galaxy ID',
name: 'galaxyId',
description: 'UUID or numeric ID of the galaxy',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['galaxy'],
operation: ['get'],
},
},
},
// ----------------------------------------
// galaxy: getAll
// ----------------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['galaxy'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['galaxy'],
operation: ['getAll'],
returnAll: [false],
},
},
},
];

View File

@@ -0,0 +1,78 @@
import type { INodeProperties } from 'n8n-workflow';
export const noticelistOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['noticelist'],
},
},
noDataExpression: true,
options: [
{
name: 'Get',
value: 'get',
action: 'Get a noticelist',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many noticelists',
},
],
default: 'get',
},
];
export const noticelistFields: INodeProperties[] = [
// ----------------------------------------
// noticelist: get
// ----------------------------------------
{
displayName: 'Noticelist ID',
name: 'noticelistId',
description: 'Numeric ID of the noticelist',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['noticelist'],
operation: ['get'],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['noticelist'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['noticelist'],
operation: ['getAll'],
returnAll: [false],
},
},
},
];

View File

@@ -0,0 +1,42 @@
import type { INodeProperties } from 'n8n-workflow';
import { searchProperties } from './common.descriptions';
import { updateDisplayOptions } from '../../../utils/utilities';
const searchDisplayOptions = {
show: {
resource: ['object'],
operation: ['search'],
},
};
const searchDescription = updateDisplayOptions(searchDisplayOptions, searchProperties);
export const objectOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['object'],
},
},
noDataExpression: true,
options: [
{
name: 'Search',
value: 'search',
action: 'Get a filtered list of objects',
},
],
default: 'search',
},
];
export const objectFields: INodeProperties[] = [
// ----------------------------------------
// event: search
// ----------------------------------------
...searchDescription,
];

View File

@@ -0,0 +1,245 @@
import type { INodeProperties } from 'n8n-workflow';
export const organisationOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['organisation'],
},
},
noDataExpression: true,
options: [
{
name: 'Create',
value: 'create',
action: 'Create an organization',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete an organization',
},
{
name: 'Get',
value: 'get',
action: 'Get an organization',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many organizations',
},
{
name: 'Update',
value: 'update',
action: 'Update an organization',
},
],
default: 'create',
},
];
export const organisationFields: INodeProperties[] = [
// ----------------------------------------
// organisation: create
// ----------------------------------------
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['organisation'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['organisation'],
operation: ['create'],
},
},
options: [
{
displayName: 'Created by Email',
name: 'created_by_email',
type: 'string',
default: '',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Nationality',
name: 'nationality',
type: 'string',
default: '',
},
{
displayName: 'Sector',
name: 'sector',
type: 'string',
default: '',
},
{
displayName: 'Type',
name: 'type',
type: 'string',
default: '',
},
{
displayName: 'User Count',
name: 'usercount',
type: 'number',
typeOptions: {
minValue: 0,
},
default: 0,
},
],
},
// ----------------------------------------
// organisation: delete
// ----------------------------------------
{
displayName: 'Organisation ID',
name: 'organisationId',
description: 'UUID or numeric ID of the organisation',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['organisation'],
operation: ['delete'],
},
},
},
// ----------------------------------------
// organisation: get
// ----------------------------------------
{
displayName: 'Organisation ID',
name: 'organisationId',
description: 'UUID or numeric ID of the organisation',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['organisation'],
operation: ['get'],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['organisation'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['organisation'],
operation: ['getAll'],
returnAll: [false],
},
},
},
// ----------------------------------------
// organisation: update
// ----------------------------------------
{
displayName: 'Organisation ID',
name: 'organisationId',
description: 'ID of the organisation to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['organisation'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['organisation'],
operation: ['update'],
},
},
options: [
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
},
{
displayName: 'Nationality',
name: 'nationality',
type: 'string',
default: '',
},
{
displayName: 'Sector',
name: 'sector',
type: 'string',
default: '',
},
{
displayName: 'Type',
name: 'type',
type: 'string',
default: '',
},
],
},
];

View File

@@ -0,0 +1,177 @@
import type { INodeProperties } from 'n8n-workflow';
export const tagOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['tag'],
},
},
noDataExpression: true,
options: [
{
name: 'Create',
value: 'create',
action: 'Create a tag',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete a tag',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many tags',
},
{
name: 'Update',
value: 'update',
action: 'Update a tag',
},
],
default: 'create',
},
];
export const tagFields: INodeProperties[] = [
// ----------------------------------------
// tag: create
// ----------------------------------------
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['tag'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['tag'],
operation: ['create'],
},
},
options: [
{
displayName: 'Color',
description: 'Hex color code for the tag',
name: 'colour',
type: 'color',
default: '',
},
],
},
// ----------------------------------------
// tag: delete
// ----------------------------------------
{
displayName: 'Tag ID',
name: 'tagId',
description: 'Numeric ID of the attribute',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['tag'],
operation: ['delete'],
},
},
},
// ----------------------------------------
// tag: getAll
// ----------------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['tag'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['tag'],
operation: ['getAll'],
returnAll: [false],
},
},
},
// ----------------------------------------
// tag: update
// ----------------------------------------
{
displayName: 'Tag ID',
name: 'tagId',
description: 'ID of the tag to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['tag'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['tag'],
operation: ['update'],
},
},
options: [
{
displayName: 'Color',
description: 'Hex color code for the tag',
name: 'colour',
type: 'color',
default: '',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
},
],
},
];

View File

@@ -0,0 +1,255 @@
import type { INodeProperties } from 'n8n-workflow';
export const userOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['user'],
},
},
noDataExpression: true,
options: [
{
name: 'Create',
value: 'create',
action: 'Create a user',
},
{
name: 'Delete',
value: 'delete',
action: 'Delete a user',
},
{
name: 'Get',
value: 'get',
action: 'Get a user',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many users',
},
{
name: 'Update',
value: 'update',
action: 'Update a user',
},
],
default: 'create',
},
];
export const userFields: INodeProperties[] = [
// ----------------------------------------
// user: create
// ----------------------------------------
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
required: true,
default: '',
displayOptions: {
show: {
resource: ['user'],
operation: ['create'],
},
},
},
{
displayName: 'Role ID',
name: 'role_id',
type: 'string',
description: 'Role IDs are available in the MISP dashboard at /roles/index',
required: true,
default: '',
displayOptions: {
show: {
resource: ['user'],
operation: ['create'],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['user'],
operation: ['create'],
},
},
options: [
{
displayName: 'GPG Key',
name: 'gpgkey',
type: 'string',
default: '',
},
{
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Inviter Email or ID',
name: 'invited_by',
type: 'options',
default: '',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
},
{
displayName: 'Organization Name or ID',
name: 'org_id',
type: 'options',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getOrgs',
},
},
],
},
// ----------------------------------------
// user: delete
// ----------------------------------------
{
displayName: 'User ID',
name: 'userId',
description: 'Numeric ID of the user',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['user'],
operation: ['delete'],
},
},
},
// ----------------------------------------
// user: get
// ----------------------------------------
{
displayName: 'User ID',
name: 'userId',
description: 'Numeric ID of the user',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['user'],
operation: ['get'],
},
},
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['user'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['user'],
operation: ['getAll'],
returnAll: [false],
},
},
},
// ----------------------------------------
// user: update
// ----------------------------------------
{
displayName: 'User ID',
name: 'userId',
description: 'ID of the user to update',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['user'],
operation: ['update'],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['user'],
operation: ['update'],
},
},
options: [
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@email.com',
default: '',
},
{
displayName: 'GPG Key',
name: 'gpgkey',
type: 'string',
default: '',
},
{
displayName: 'Inviter Name or ID',
name: 'invited_by',
type: 'options',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
},
{
displayName: 'Organization Name or ID',
name: 'org_id',
type: 'options',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getOrgs',
},
},
],
},
];

View File

@@ -0,0 +1,82 @@
import type { INodeProperties } from 'n8n-workflow';
export const warninglistOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: ['warninglist'],
},
},
noDataExpression: true,
options: [
{
name: 'Get',
value: 'get',
action: 'Get a warninglist',
},
{
name: 'Get Many',
value: 'getAll',
action: 'Get many warninglists',
},
],
default: 'get',
},
];
export const warninglistFields: INodeProperties[] = [
// ----------------------------------------
// warninglist: get
// ----------------------------------------
{
displayName: 'Warninglist ID',
name: 'warninglistId',
description: 'Numeric ID of the warninglist',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['warninglist'],
operation: ['get'],
},
},
},
// ----------------------------------------
// warninglist: getAll
// ----------------------------------------
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
default: false,
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: ['warninglist'],
operation: ['getAll'],
},
},
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 50,
description: 'Max number of results to return',
typeOptions: {
minValue: 1,
},
displayOptions: {
show: {
resource: ['warninglist'],
operation: ['getAll'],
returnAll: [false],
},
},
},
];

View File

@@ -0,0 +1,102 @@
import type { INodeProperties } from 'n8n-workflow';
export const searchProperties: INodeProperties[] = [
{
displayName: 'Use JSON to Specify Fields',
name: 'useJson',
type: 'boolean',
default: false,
description: 'Whether to use JSON to specify the fields for the search request',
},
{
displayName: 'JSON',
name: 'jsonOutput',
type: 'json',
description:
'Get more info at {YOUR_BASE_URL_SPECIFIED_IN_CREDENTIALS}/api/openapi#operation/restSearchAttributes',
typeOptions: {
rows: 5,
},
default: '{\n "value": "search value",\n "type": "text"\n}\n',
validateType: 'object',
displayOptions: {
show: {
useJson: [true],
},
},
},
{
displayName: 'Value',
name: 'value',
type: 'string',
required: true,
placeholder: 'e.g. 127.0.0.1',
default: '',
displayOptions: {
show: {
useJson: [false],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
useJson: [false],
},
},
options: [
{
displayName: 'Category',
name: 'category',
type: 'string',
placeholder: 'e.g. Internal reference',
default: '',
},
{
displayName: 'Deleted',
name: 'deleted',
type: 'boolean',
default: false,
},
{
displayName: 'Search All',
name: 'searchall',
type: 'string',
description:
'Search by matching any tag names, event descriptions, attribute values or attribute comments',
default: '',
displayOptions: {
hide: {
'/resource': ['attribute'],
},
},
},
{
displayName: 'Tags',
name: 'tags',
type: 'string',
placeholder: 'e.g. tag1,tag2',
hint: 'Comma-separated list of tags',
default: '',
},
{
displayName: 'Type',
name: 'type',
type: 'string',
placeholder: 'e.g. text',
default: '',
},
{
displayName: 'Published',
name: 'published',
type: 'boolean',
default: false,
},
],
},
];

View File

@@ -0,0 +1,11 @@
export * from './AttributeDescription';
export * from './EventDescription';
export * from './EventTagDescription';
export * from './FeedDescription';
export * from './GalaxyDescription';
export * from './NoticelistDescription';
export * from './ObjectDescription';
export * from './OrganisationDescription';
export * from './TagDescription';
export * from './UserDescription';
export * from './WarninglistDescription';