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

432 lines
8.8 KiB
TypeScript
Raw Normal View History

2020-08-24 17:55:57 -07:00
import {
INodeProperties,
} from 'n8n-workflow';
export const cardOperations: INodeProperties[] = [
// ----------------------------------
// card
// ----------------------------------
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'card',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new card',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a card',
},
{
name: 'Get',
value: 'get',
description: 'Get the data of a card',
},
{
name: 'Update',
value: 'update',
description: 'Update a card',
},
],
default: 'create',
description: 'The operation to perform.',
},
];
export const cardFields: INodeProperties[] = [
// ----------------------------------
// card:create
// ----------------------------------
{
displayName: 'List ID',
name: 'listId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'card',
],
},
},
description: 'The id of the list to create card in',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
placeholder: 'My card',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'card',
],
},
},
description: 'The name of the card',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'card',
],
},
},
description: 'The description of the card',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'card',
],
},
},
default: {},
options: [
{
displayName: 'Due Date',
name: 'due',
type: 'dateTime',
default: '',
description: 'A due date for the card.',
},
{
displayName: 'Due Complete',
name: 'dueComplete',
type: 'boolean',
default: false,
description: 'If the card is completed.',
},
{
displayName: 'Position',
name: 'pos',
type: 'string',
default: 'bottom',
description: 'The position of the new card. top, bottom, or a positive float.',
},
{
displayName: 'Member IDs',
name: 'idMembers',
type: 'string',
default: '',
description: 'Comma-separated list of member IDs to add to the card.',
},
{
displayName: 'Label IDs',
name: 'idLabels',
type: 'string',
default: '',
description: 'Comma-separated list of label IDs to add to the card.',
},
{
displayName: 'URL Source',
name: 'urlSource',
type: 'string',
default: '',
description: 'A source URL to attach to card.',
},
{
displayName: 'Source ID',
name: 'idCardSource',
type: 'string',
default: '',
description: 'The ID of a card to copy into the new card.',
},
{
displayName: 'Keep from source',
name: 'keepFromSource',
type: 'string',
default: 'all',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'If using idCardSource you can specify which properties to copy over. all or comma-separated list of: attachments, checklists, comments, due, labels, members, stickers.',
},
],
},
// ----------------------------------
// card:delete
// ----------------------------------
{
displayName: 'Card ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'card',
],
},
},
description: 'The ID of the card to delete.',
},
// ----------------------------------
// card:get
// ----------------------------------
{
displayName: 'Card ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'card',
],
},
},
description: 'The ID of the card to get.',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'card',
],
},
},
default: {},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: 'all',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Fields to return. Either "all" or a comma-separated list: badges, checkItemStates, closed, dateLastActivity, desc, descData, due, email, idBoard, idChecklists, idLabels, idList, idMembers, idShort, idAttachmentCover, manualCoverAttachment, labels, name, pos, shortUrl, url.',
},
{
displayName: 'Board',
name: 'board',
type: 'boolean',
default: false,
description: 'Whether to return the board object the card is on.',
},
{
displayName: 'Board Fields',
name: 'board_fields',
type: 'string',
default: 'all',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Fields to return. Either "all" or a comma-separated list: name, desc, descData, closed, idOrganization, pinned, url, prefs.',
},
{
displayName: 'Custom Field Items',
name: 'customFieldItems',
type: 'boolean',
default: false,
description: 'Whether to include the customFieldItems.',
},
{
displayName: 'Members',
name: 'members',
type: 'boolean',
default: false,
description: 'Whether to return member objects for members on the card.',
},
{
displayName: 'Member Fields',
name: 'member_fields',
type: 'string',
default: 'all',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Fields to return. Either "all" or a comma-separated list: avatarHash, fullName, initials, username.',
},
{
displayName: 'Plugin Data',
name: 'pluginData',
type: 'boolean',
default: false,
description: 'Whether to include pluginData on the card with the response.',
},
{
displayName: 'Stickers',
name: 'stickers',
type: 'boolean',
default: false,
description: 'Whether to include sticker models with the response.',
},
{
displayName: 'Sticker Fields',
name: 'sticker_fields',
type: 'string',
default: 'all',
description: 'Fields to return. Either "all" or a comma-separated list of sticker fields.',
},
],
},
// ----------------------------------
// card:update
// ----------------------------------
{
displayName: 'Card ID',
name: 'id',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'card',
],
},
},
description: 'The ID of the card to update.',
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'card',
],
},
},
default: {},
options: [
{
displayName: 'Attachment Cover',
name: 'idAttachmentCover',
type: 'string',
default: '',
description: 'The ID of the image attachment the card should use as its cover, or null for none.',
},
{
displayName: 'Board ID',
name: 'idBoard',
type: 'string',
default: '',
description: 'The ID of the board the card should be on.',
},
{
displayName: 'Closed',
name: 'closed',
type: 'boolean',
default: false,
description: 'Whether the board is closed.',
},
{
displayName: 'Description',
name: 'desc',
type: 'string',
default: '',
description: 'New description of the board.',
},
{
displayName: 'Due Date',
name: 'due',
type: 'dateTime',
default: '',
description: 'A due date for the card.',
},
{
displayName: 'Due Complete',
name: 'dueComplete',
type: 'boolean',
default: false,
description: 'If the card is completed.',
},
{
displayName: 'Label IDs',
name: 'idLabels',
type: 'string',
default: '',
description: 'Comma-separated list of label IDs to set on card.',
},
{
displayName: 'List ID',
name: 'idList',
type: 'string',
default: '',
description: 'The ID of the list the card should be in.',
},
{
displayName: 'Member IDs',
name: 'idMembers',
type: 'string',
default: '',
description: 'Comma-separated list of member IDs to set on card.',
},
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'New name of the board',
},
{
displayName: 'Position',
name: 'pos',
type: 'string',
default: 'bottom',
description: 'The position of the card. top, bottom, or a positive float.',
},
{
displayName: 'Subscribed',
name: 'subscribed',
type: 'boolean',
default: false,
description: 'Whether the acting user is subscribed to the board.',
},
],
},
];