1
0
Fork 0
mirror of https://github.com/n8n-io/n8n.git synced 2025-03-05 20:50:17 -08:00
n8n/packages/nodes-base/nodes/MondayCom/BoardGroupDescription.ts
Iván Ovejero 6dcdb30bf4
refactor: Apply more nodelinting rules ()
* ✏️ Alphabetize lint rules

* 🔥 Remove duplicates

*  Update `lintfix` script

* 👕 Apply `node-param-operation-without-no-data-expression` ()

* 👕 Apply `node-param-operation-without-no-data-expression`

* 👕 Add exceptions

* 👕 Apply `node-param-description-weak` ()

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-option-value-duplicate` ()

* 👕 Apply `node-param-description-miscased-json` ()

* 👕 Apply `node-param-display-name-excess-inner-whitespace` ()

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-type-options-missing-from-limit` ()

* Rule workig as intended

* ✏️ Uncomment rules

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-option-name-duplicate` ()

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-description-wrong-for-simplify` ()

*  fix

*  exceptions

*  changed rule ignoring from file to line

* 👕 Apply `node-param-resource-without-no-data-expression` ()

* 👕 Apply `node-param-display-name-untrimmed` ()

* 👕 Apply `node-param-display-name-miscased-id` ()

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-resource-with-plural-option` ()

* 👕 Apply `node-param-description-wrong-for-upsert` ()

*  fix

*  replaced record with contact in description

*  fix

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 👕 Apply `node-param-option-description-identical-to-name` ()

* 👕 Apply `node-param-option-name-containing-star` ()

* 👕 Apply `node-param-display-name-wrong-for-update-fields` ()

* 👕 Apply `node-param-option-name-wrong-for-get-all` ()

*  fix

*  exceptions

* 👕 Apply node-param-display-name-wrong-for-simplify ()

* Rule working as intended

* Uncomented other rules

* 👕 Undo and add exceptions

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

*  Alphabetize lint rules

*  Restore `lintfix` script

Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com>
2022-05-20 23:47:24 +02:00

152 lines
2.8 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',
},
{
name: 'Create',
value: 'create',
description: 'Create a group in a board',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get list of groups in a board',
},
],
default: 'create',
},
];
export const boardGroupFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* boardGroup:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Board ID',
name: 'boardId',
type: 'options',
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 ID',
name: 'boardId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getBoards',
},
default: '',
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'delete',
],
},
},
},
{
displayName: 'Group ID',
name: 'groupId',
type: 'options',
default: '',
typeOptions: {
loadOptionsMethod: 'getGroups',
loadOptionsDependsOn: [
'boardId',
],
},
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'delete',
],
},
},
},
/* -------------------------------------------------------------------------- */
/* boardGroup:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Board ID',
name: 'boardId',
type: 'options',
default: '',
typeOptions: {
loadOptionsMethod: 'getBoards',
},
required: true,
displayOptions: {
show: {
resource: [
'boardGroup',
],
operation: [
'getAll',
],
},
},
},
];