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

178 lines
2.9 KiB
TypeScript
Raw Normal View History

2020-08-24 17:55:57 -07:00
import {
INodeProperties,
} from 'n8n-workflow';
2020-08-24 17:55:57 -07:00
export const cardCommentOperations: INodeProperties[] = [
2020-08-24 17:55:57 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'cardComment',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a comment on a card',
2020-08-24 17:55:57 -07:00
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a comment from a card',
2020-08-24 17:55:57 -07:00
},
{
name: 'Update',
value: 'update',
description: 'Update a comment on a card',
2020-08-24 17:55:57 -07:00
},
],
default: 'create',
2020-08-24 17:55:57 -07:00
description: 'The operation to perform.',
},
];
2020-08-24 17:55:57 -07:00
export const cardCommentFields: INodeProperties[] = [
2020-08-24 17:55:57 -07:00
// ----------------------------------
// cardComment:create
2020-08-24 17:55:57 -07:00
// ----------------------------------
{
displayName: 'Card ID',
name: 'cardId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
2020-08-24 17:55:57 -07:00
],
resource: [
'cardComment',
],
},
},
description: 'The id of the card',
},
{
displayName: 'Text',
name: 'text',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
2020-08-24 17:55:57 -07:00
],
resource: [
'cardComment',
],
},
},
description: 'Text of the comment',
},
// ----------------------------------
// cardComment:remove
// ----------------------------------
{
displayName: 'Card ID',
name: 'cardId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'delete',
2020-08-24 17:55:57 -07:00
],
resource: [
'cardComment',
],
},
},
description: 'The ID of the card.',
},
{
displayName: 'Comment ID',
name: 'commentId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'delete',
2020-08-24 17:55:57 -07:00
],
resource: [
'cardComment',
],
},
},
description: 'The ID of the comment to delete.',
},
// ----------------------------------
// cardComment:update
// ----------------------------------
{
displayName: 'Card ID',
name: 'cardId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'cardComment',
],
},
},
description: 'The ID of the card to update.',
},
{
displayName: 'Comment ID',
name: 'commentId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'cardComment',
],
},
},
description: 'The ID of the comment to delete.',
},
{
displayName: 'Text',
name: 'text',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'cardComment',
],
},
},
description: 'Text of the comment',
},
];