n8n/packages/nodes-base/nodes/CoinGecko/EventDescription.ts
Michael Kret 0ecbb4a19d
refactor: Format nodes-base package (A-F) (#3800)
* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2022-08-01 22:47:55 +02:00

118 lines
2.5 KiB
TypeScript

import { INodeProperties } from 'n8n-workflow';
export const eventOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['event'],
},
},
options: [
{
name: 'Get All',
value: 'getAll',
description: 'Get all events',
action: 'Get all events',
},
],
default: 'getAll',
},
];
export const eventFields: INodeProperties[] = [
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['event'],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
operation: ['getAll'],
resource: ['event'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 500,
},
default: 100,
description: 'Max number of results to return',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
show: {
operation: ['getAll'],
resource: ['event'],
},
},
options: [
{
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Country Code',
name: 'country_code',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getEventCountryCodes',
},
default: '',
description:
'Country code of event. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'From Date',
name: 'from_date',
type: 'dateTime',
default: '',
description: 'Lists events after this date',
},
{
displayName: 'To Date',
name: 'to_date',
type: 'dateTime',
default: '',
description: 'Lists events before this date',
},
{
displayName: 'Type Name or ID',
name: 'type',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getEventTypes',
},
default: '',
description:
'Type of event. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Upcoming Events Only',
name: 'upcoming_events_only',
type: 'boolean',
default: true,
description: 'Whether to list only upcoming events',
},
],
},
];