n8n/packages/nodes-base/nodes/MondayCom/BoardGroupDescription.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

159 lines
3.5 KiB
TypeScript

import {
INodeProperties,
} from 'n8n-workflow';
export const boardGroupOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
},
},
options: [
{
name: 'Delete',
value: 'delete',
description: 'Delete a group in a board',
action: 'Delete a board group',
},
{
name: 'Create',
value: 'create',
description: 'Create a group in a board',
action: 'Create a board group',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get list of groups in a board',
action: 'Get all board groups',
},
],
default: 'create',
},
];
export const boardGroupFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* boardGroup:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Board Name or ID',
name: 'boardId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getBoards',
},
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'create',
],
},
},
},
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'boardGroup',
],
},
},
default: '',
description: 'The group name',
},
/* -------------------------------------------------------------------------- */
/* boardGroup:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Board Name or ID',
name: 'boardId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
typeOptions: {
loadOptionsMethod: 'getBoards',
},
default: '',
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'delete',
],
},
},
},
{
displayName: 'Group Name or ID',
name: 'groupId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getGroups',
loadOptionsDependsOn: [
'boardId',
],
},
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'delete',
],
},
},
},
/* -------------------------------------------------------------------------- */
/* boardGroup:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Board Name or ID',
name: 'boardId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getBoards',
},
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'getAll',
],
},
},
},
];