2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2020-08-24 17:55:57 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const cardCommentOperations: INodeProperties[] = [
|
2020-08-24 17:55:57 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-08-24 17:55:57 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
2020-08-24 23:27:26 -07:00
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a comment on a card',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a card comment',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
{
|
2020-08-24 23:27:26 -07:00
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a comment from a card',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a card comment',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
2020-08-24 23:27:26 -07:00
|
|
|
description: 'Update a comment on a card',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update a card comment',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
],
|
2020-08-24 23:27:26 -07:00
|
|
|
default: 'create',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-08-24 17:55:57 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const cardCommentFields: INodeProperties[] = [
|
2020-08-24 17:55:57 -07:00
|
|
|
// ----------------------------------
|
2020-08-24 23:27:26 -07:00
|
|
|
// cardComment:create
|
2020-08-24 17:55:57 -07:00
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Card ID',
|
|
|
|
name: 'cardId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the card',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Text',
|
|
|
|
name: 'text',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Text of the comment',
|
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// cardComment:remove
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Card ID',
|
|
|
|
name: 'cardId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['delete'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the card',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Comment ID',
|
|
|
|
name: 'commentId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['delete'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the comment to delete',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// cardComment:update
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Card ID',
|
|
|
|
name: 'cardId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['update'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the card to update',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Comment ID',
|
|
|
|
name: 'commentId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['update'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the comment to delete',
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Text',
|
|
|
|
name: 'text',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['update'],
|
|
|
|
resource: ['cardComment'],
|
2020-08-24 17:55:57 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Text of the comment',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|