n8n/packages/nodes-base/nodes/MondayCom/BoardGroupDescription.ts
Iván Ovejero b03e358a12
refactor: Integrate consistent-type-imports in nodes-base (no-changelog) (#5267)
* 👕 Enable `consistent-type-imports` for nodes-base

* 👕 Apply to nodes-base

*  Undo unrelated changes

* 🚚 Move to `.eslintrc.js` in nodes-base

*  Revert "Enable `consistent-type-imports` for nodes-base"

This reverts commit 529ad72b05.

* 👕 Fix severity
2023-01-27 12:22:44 +01:00

136 lines
3.4 KiB
TypeScript

import type { 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 Many',
value: 'getAll',
description: 'Get list of groups in a board',
action: 'Get many 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/code-examples/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/code-examples/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/code-examples/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/code-examples/expressions/">expression</a>',
default: '',
typeOptions: {
loadOptionsMethod: 'getBoards',
},
required: true,
displayOptions: {
show: {
resource: ['boardGroup'],
operation: ['getAll'],
},
},
},
];