n8n-nodes-plutio/nodes/Plutio/descriptions/CommentDescription.ts

138 lines
2.1 KiB
TypeScript

import {
INodeProperties,
} from 'n8n-workflow';
export const commentOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
required: true,
displayOptions: {
show: {
resource: [
'comment',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new comment',
action: 'Create a comment',
},
{
name: 'Get',
value: 'get',
description: 'Get Comments',
action: 'Get a comment',
},
{
name: 'Update',
value: 'update',
description: 'Update a comment',
action: 'Update a comment',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a comment',
action: 'Delete a comment',
},
],
default: 'create',
},
];
export const commentDescription: INodeProperties[] = [
{
displayName: 'Entity ID',
name: 'entityId',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'comment',
],
operation: [
'create',
'get',
],
},
},
description: 'Entity ID of comment(could be task ID, conversation ID or file ID)',
},
{
displayName: 'Entity Type',
name: 'entityType',
type: 'options',
displayOptions: {
show: {
resource: [
'comment',
],
operation: [
'create',
'get',
],
},
},
options: [
{
name: 'File',
value: 'file',
},
{
name: 'Conversation',
value: 'conversation',
},
{
name: 'Task',
value: 'task',
},
],
default: 'task',
},
{
displayName: 'Comment ID',
name: '_id',
required: true,
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'comment',
],
operation: [
'update',
'delete',
],
},
},
description: 'For GET operation Comment ID or entityType & entityID is required',
},
{
displayName: 'Body',
name: 'bodyHTML',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
resource: [
'comment',
],
operation: [
'update',
'create',
],
},
},
description: 'Comment Body',
},
];