n8n/packages/nodes-base/nodes/Trello/CardCommentDescription.ts
Iván Ovejero 6f95121fac
refactor: Add action to all operations on all nodes (#3655)
* 👕 Add `action` to `INodePropertyOptions`

* 👕 Apply `node-param-operation-option-without-action`

* ✏️ Fix add/remove phrasing

* ✏️ Fix email template phrasing

* ✏️ Fix add/remove phrasing

* ✏️ Fix custom fields phrasing

* ✏️ Fix job report phrasing

* ✏️ Fix query phrasing

* ✏️ Various phrasing fixes

* ✏️ Fix final phrasings

* ✏️ Remove `conversation`

* ✏️ Fix plural
2022-07-10 23:50:51 +03:00

181 lines
2.9 KiB
TypeScript

import {
INodeProperties,
} from 'n8n-workflow';
export const cardCommentOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'cardComment',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a comment on a card',
action: 'Create a card comment',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a comment from a card',
action: 'Delete a card comment',
},
{
name: 'Update',
value: 'update',
description: 'Update a comment on a card',
action: 'Update a card comment',
},
],
default: 'create',
},
];
export const cardCommentFields: INodeProperties[] = [
// ----------------------------------
// cardComment:create
// ----------------------------------
{
displayName: 'Card ID',
name: 'cardId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'cardComment',
],
},
},
description: 'The ID of the card',
},
{
displayName: 'Text',
name: 'text',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'cardComment',
],
},
},
description: 'Text of the comment',
},
// ----------------------------------
// cardComment:remove
// ----------------------------------
{
displayName: 'Card ID',
name: 'cardId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'cardComment',
],
},
},
description: 'The ID of the card',
},
{
displayName: 'Comment ID',
name: 'commentId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'delete',
],
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',
},
];