mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
3a9c7acb04
* 👕 Enable rule * ⬆️ Upgrade linter * 📦 Update `package-lock.json` * 👕 Apply rule * ✏️ Fix plurals * ✏️ More typos * ✏️ Final typos
118 lines
2.5 KiB
TypeScript
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 Many',
|
|
value: 'getAll',
|
|
description: 'Get many events',
|
|
action: 'Get many 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',
|
|
},
|
|
],
|
|
},
|
|
];
|