n8n/packages/nodes-base/nodes/Trello/ListDescription.ts

464 lines
7.8 KiB
TypeScript
Raw Normal View History

2020-08-24 17:55:57 -07:00
import {
INodeProperties,
} from 'n8n-workflow';
export const listOperations: INodeProperties[] = [
// ----------------------------------
// list
// ----------------------------------
{
2020-08-24 17:55:57 -07:00
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
resource: [
'list',
],
},
},
options: [
{
2020-08-24 17:55:57 -07:00
name: 'Archive',
value: 'archive',
2020-10-22 06:46:03 -07:00
description: 'Archive/Unarchive a list',
},
{
2020-08-24 17:55:57 -07:00
name: 'Create',
value: 'create',
2020-10-22 06:46:03 -07:00
description: 'Create a new list',
},
{
2020-08-24 17:55:57 -07:00
name: 'Get',
value: 'get',
2020-10-22 06:46:03 -07:00
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',
},
{
2020-08-24 17:55:57 -07:00
name: 'Update',
value: 'update',
2020-10-22 06:46:03 -07:00
description: 'Update a list',
},
],
2020-08-24 17:55:57 -07:00
default: 'create',
2020-10-22 06:46:03 -07:00
description: 'The operation to perform.',
},
];
export const listFields: INodeProperties[] = [
// ----------------------------------
// list:archive
// ----------------------------------
{
2020-08-24 17:55:57 -07:00
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'archive',
],
resource: [
'list',
],
},
},
2020-10-22 06:46:03 -07:00
description: 'The ID of the list to archive or unarchive.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Archive',
name: 'archive',
type: 'boolean',
default: false,
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'archive',
],
resource: [
'list',
],
},
},
2020-10-22 06:46:03 -07:00
description: 'If the list should be archived or unarchived.',
},
// ----------------------------------
// list:create
// ----------------------------------
{
2020-08-24 17:55:57 -07:00
displayName: 'Board ID',
name: 'idBoard',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'create',
],
resource: [
'list',
],
},
},
2020-10-22 06:46:03 -07:00
description: 'The ID of the board the list should be created in',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
placeholder: 'My list',
required: true,
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'create',
],
resource: [
'list',
],
},
},
2020-10-22 06:46:03 -07:00
description: 'The name of the list',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'create',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
2020-08-24 17:55:57 -07:00
displayName: 'List Source',
name: 'idListSource',
type: 'string',
default: '',
2020-10-22 06:46:03 -07:00
description: 'ID of the list to copy into the new list.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Position',
name: 'pos',
type: 'string',
default: 'bottom',
description:
2020-10-22 06:46:03 -07:00
'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: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
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
// ----------------------------------
{
2020-08-24 17:55:57 -07:00
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'get',
],
resource: [
'list',
],
},
},
2020-10-22 06:46:03 -07:00
description: 'The ID of the list to get.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'get',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
2020-08-24 17:55:57 -07:00
displayName: 'Fields',
name: 'fields',
type: 'string',
default: 'all',
2020-10-22 06:46:03 -07:00
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: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
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
// ----------------------------------
{
2020-08-24 17:55:57 -07:00
displayName: 'List ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'update',
],
resource: [
'list',
],
},
},
2020-10-22 06:46:03 -07:00
description: 'The ID of the list to update.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
2020-08-24 17:55:57 -07:00
operation: [
'update',
],
resource: [
'list',
],
},
},
default: {},
options: [
{
2020-08-24 17:55:57 -07:00
displayName: 'Board ID',
name: 'idBoard',
type: 'string',
default: '',
2020-10-22 06:46:03 -07:00
description: 'ID of a board the list should be moved to.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Closed',
name: 'closed',
type: 'boolean',
default: false,
2020-10-22 06:46:03 -07:00
description: 'Whether the list is closed.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
2020-10-22 06:46:03 -07:00
description: 'New name of the list',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Position',
name: 'pos',
type: 'string',
default: 'bottom',
description:
2020-10-22 06:46:03 -07:00
'The position of the list. top, bottom, or a positive float.',
},
{
2020-08-24 17:55:57 -07:00
displayName: 'Subscribed',
name: 'subscribed',
type: 'boolean',
default: false,
2020-10-22 06:46:03 -07:00
description: 'Whether the acting user is subscribed to the list.',
},
],
},
];