n8n/packages/nodes-base/nodes/Trello/ListDescription.ts
Iván Ovejero 88dea330b9
refactor: Apply more eslint-plugin-n8n-nodes-base rules (#3534)
*  Update `lintfix` script

*  Run baseline `lintfix`

* 🔥 Remove unneeded exceptions (#3538)

* 🔥 Remove exceptions for `node-param-default-wrong-for-simplify`

* 🔥 Remove exceptions for `node-param-placeholder-miscased-id`

*  Update version

* 👕 Apply `node-param-placeholder-missing` (#3542)

* 👕 Apply `filesystem-wrong-cred-filename` (#3543)

* 👕 Apply `node-param-description-missing-from-dynamic-options` (#3545)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-class-description-empty-string` (#3546)

* 👕 Apply `node-class-description-icon-not-svg` (#3548)

* 👕 Apply `filesystem-wrong-node-filename` (#3549)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Expand lintings to credentials (#3550)

* 👕 Apply `node-param-multi-options-type-unsorted-items` (#3552)

*  fix

*  Minor fixes

Co-authored-by: Michael Kret <michael.k@radency.com>

* 👕 Apply `node-param-description-wrong-for-dynamic-multi-options` (#3541)

*  Add new lint rule, node-param-description-wrong-for-dynamic-multi-options

*  Fix with updated linting rules

*  Minor fixes

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-description-boolean-without-whether` (#3553)

*  fix

* Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply node-param-display-name-wrong-for-dynamic-multi-options (#3537)

* 👕 Add exceptions

* 👕 Add exception

* ✏️ Alphabetize rules

*  Restore `lintfix` command

Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
2022-06-20 07:54:01 -07:00

472 lines
7.9 KiB
TypeScript

import {
INodeProperties,
} from 'n8n-workflow';
export const listOperations: INodeProperties[] = [
// ----------------------------------
// list
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'list',
],
},
},
options: [
{
name: 'Archive',
value: 'archive',
description: 'Archive/Unarchive a list',
},
{
name: 'Create',
value: 'create',
description: 'Create a new list',
},
{
name: 'Get',
value: 'get',
description: 'Get the data of a list',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all the lists',
},
{
name: 'Get Cards',
value: 'getCards',
description: 'Get all the cards in a list',
},
{
name: 'Update',
value: 'update',
description: 'Update a list',
},
],
default: 'create',
},
];
export const listFields: INodeProperties[] = [
// ----------------------------------
// list:archive
// ----------------------------------
{
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'archive',
],
resource: [
'list',
],
},
},
description: 'The ID of the list to archive or unarchive',
},
{
displayName: 'Archive',
name: 'archive',
type: 'boolean',
default: false,
displayOptions: {
show: {
operation: [
'archive',
],
resource: [
'list',
],
},
},
description: 'Whether the list should be archived or unarchived',
},
// ----------------------------------
// list:create
// ----------------------------------
{
displayName: 'Board ID',
name: 'idBoard',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'list',
],
},
},
description: 'The ID of the board the list should be created in',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
placeholder: 'My list',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'list',
],
},
},
description: 'The name of the list',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
displayName: 'List Source',
name: 'idListSource',
type: 'string',
default: '',
description: 'ID of the list to copy into the new list',
},
{
displayName: 'Position',
name: 'pos',
type: 'string',
default: 'bottom',
description:
'The position of the new list. top, bottom, or a positive float.',
},
],
},
// ----------------------------------
// list:getCards
// ----------------------------------
{
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'getCards',
],
resource: [
'list',
],
},
},
description: 'The ID of the list to get cards',
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'list',
],
operation: [
'getCards',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
description: 'Max number of results to return',
default: 20,
displayOptions: {
show: {
resource: [
'list',
],
operation: [
'getCards',
],
returnAll: [
false,
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'getCards',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: 'all',
description: 'Fields to return. Either "all" or a comma-separated list of fields.',
},
],
},
// ----------------------------------
// list:get
// ----------------------------------
{
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'list',
],
},
},
description: 'The ID of the list to get',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: 'all',
description: 'Fields to return. Either "all" or a comma-separated list of fields.',
},
],
},
// ----------------------------------
// list:getAll
// ----------------------------------
{
displayName: 'Board ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'list',
],
},
},
description: 'The ID of the board',
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'list',
],
operation: [
'getAll',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
description: 'Max number of results to return',
default: 20,
displayOptions: {
show: {
resource: [
'list',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: 'all',
description: 'Fields to return. Either "all" or a comma-separated list of fields.',
},
],
},
// ----------------------------------
// list:update
// ----------------------------------
{
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'list',
],
},
},
description: 'The ID of the list to update',
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
displayName: 'Board ID',
name: 'idBoard',
type: 'string',
default: '',
description: 'ID of a board the list should be moved to',
},
{
displayName: 'Closed',
name: 'closed',
type: 'boolean',
default: false,
description: 'Whether the list is closed',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'New name of the list',
},
{
displayName: 'Position',
name: 'pos',
type: 'string',
default: 'bottom',
description:
'The position of the list. top, bottom, or a positive float.',
},
{
displayName: 'Subscribed',
name: 'subscribed',
type: 'boolean',
default: false,
description: 'Whether the acting user is subscribed to the list',
},
],
},
];