2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-03-27 12:17:10 -07:00
2021-12-03 00:44:16 -08:00
export const boardItemOperations : INodeProperties [ ] = [
2020-03-27 12:17:10 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-03-27 12:17:10 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
options : [
2020-06-07 22:57:39 -07:00
{
name : 'Add Update' ,
value : 'addUpdate' ,
2022-05-06 14:01:25 -07:00
description : 'Add an update to an item' ,
2022-07-10 13:50:51 -07:00
action : 'Add an update to an item' ,
2020-06-07 22:57:39 -07:00
} ,
2020-06-07 22:34:10 -07:00
{
name : 'Change Column Value' ,
value : 'changeColumnValue' ,
description : 'Change a column value for a board item' ,
2022-07-10 13:50:51 -07:00
action : 'Change a column value for a board item' ,
2020-06-07 22:34:10 -07:00
} ,
{
name : 'Change Multiple Column Values' ,
value : 'changeMultipleColumnValues' ,
description : 'Change multiple column values for a board item' ,
2022-07-10 13:50:51 -07:00
action : 'Change multiple column values for a board item' ,
2020-06-07 22:34:10 -07:00
} ,
2020-03-27 12:17:10 -07:00
{
name : 'Create' ,
value : 'create' ,
2022-09-07 07:51:14 -07:00
description : 'Create an item in a board\'s group' ,
action : 'Create an item in a board\'s group' ,
2020-03-27 12:17:10 -07:00
} ,
{
name : 'Delete' ,
value : 'delete' ,
2022-05-06 14:01:25 -07:00
description : 'Delete an item' ,
2022-07-10 13:50:51 -07:00
action : 'Delete an item' ,
2020-03-27 12:17:10 -07:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get an item' ,
2022-07-10 13:50:51 -07:00
action : 'Get an item' ,
2020-03-27 12:17:10 -07:00
} ,
{
name : 'Get By Column Value' ,
value : 'getByColumnValue' ,
description : 'Get items by column value' ,
2022-07-10 13:50:51 -07:00
action : 'Get items item by column value' ,
2020-03-27 12:17:10 -07:00
} ,
2022-09-07 07:51:14 -07:00
{
name : 'Get Many' ,
value : 'getAll' ,
2022-09-13 03:36:36 -07:00
description : 'Get many items' ,
2022-09-08 08:10:13 -07:00
action : 'Get many items' ,
2022-09-07 07:51:14 -07:00
} ,
2021-03-12 02:32:04 -08:00
{
name : 'Move' ,
value : 'move' ,
description : 'Move item to group' ,
2022-07-10 13:50:51 -07:00
action : 'Move an item to a group' ,
2021-03-12 02:32:04 -08:00
} ,
2020-03-27 12:17:10 -07:00
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-03-27 12:17:10 -07:00
2021-12-03 00:44:16 -08:00
export const boardItemFields : INodeProperties [ ] = [
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:addUpdate */
/* -------------------------------------------------------------------------- */
2020-06-07 22:57:39 -07:00
{
displayName : 'Item ID' ,
name : 'itemId' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'addUpdate' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The unique identifier of the item to add update to' ,
2020-06-07 22:57:39 -07:00
} ,
{
2020-06-13 08:46:13 -07:00
displayName : 'Update Text' ,
2020-06-07 22:57:39 -07:00
name : 'value' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'addUpdate' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The update text to add' ,
2020-06-07 22:57:39 -07:00
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:changeColumnValue */
/* -------------------------------------------------------------------------- */
2020-06-07 22:57:39 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-06-07 22:57:39 -07:00
name : 'boardId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeColumnValue' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The unique identifier of the board. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-06-07 22:57:39 -07:00
} ,
{
displayName : 'Item ID' ,
name : 'itemId' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeColumnValue' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The unique identifier of the item to to change column of' ,
2020-06-07 22:57:39 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Column Name or ID' ,
2020-06-07 22:57:39 -07:00
name : 'columnId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getColumns' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'boardId' ] ,
2020-06-07 22:57:39 -07:00
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeColumnValue' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The column\'s unique identifier. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-06-07 22:57:39 -07:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'json' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeColumnValue' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The column value in JSON format. Documentation can be found <a href="https://monday.com/developers/v2#mutations-section-columns-change-column-value">here</a>.' ,
2020-06-07 22:57:39 -07:00
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:changeMultipleColumnValues */
/* -------------------------------------------------------------------------- */
2020-06-07 22:57:39 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-06-07 22:57:39 -07:00
name : 'boardId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeMultipleColumnValues' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The unique identifier of the board. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-06-07 22:57:39 -07:00
} ,
{
displayName : 'Item ID' ,
name : 'itemId' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeMultipleColumnValues' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description : "Item's ID" ,
2020-06-07 22:57:39 -07:00
} ,
{
displayName : 'Column Values' ,
name : 'columnValues' ,
type : 'json' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'changeMultipleColumnValues' ] ,
2020-06-07 22:57:39 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The column fields and values in JSON format. Documentation can be found <a href="https://monday.com/developers/v2#mutations-section-columns-change-multiple-column-values">here</a>.' ,
2020-06-07 22:57:39 -07:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:create */
/* -------------------------------------------------------------------------- */
2020-03-27 12:17:10 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-03-27 12:17:10 -07:00
name : 'boardId' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-03-27 12:17:10 -07:00
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'create' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Group Name or ID' ,
2020-03-27 12:17:10 -07:00
name : 'groupId' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-03-27 12:17:10 -07:00
default : '' ,
typeOptions : {
loadOptionsMethod : 'getGroups' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'boardId' ] ,
2020-03-27 12:17:10 -07:00
} ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'create' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
} ,
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'boardItem' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "The new item's name" ,
2020-03-27 12:17:10 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'boardItem' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Column Values' ,
name : 'columnValues' ,
type : 'json' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
description : 'The column values of the new item' ,
} ,
] ,
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:delete */
/* -------------------------------------------------------------------------- */
2020-03-27 12:17:10 -07:00
{
displayName : 'Item ID' ,
name : 'itemId' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'delete' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description : "Item's ID" ,
2020-03-27 12:17:10 -07:00
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:get */
/* -------------------------------------------------------------------------- */
2020-03-27 12:17:10 -07:00
{
displayName : 'Item ID' ,
name : 'itemId' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'get' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description : "Item's ID (Multiple can be added separated by comma)" ,
2020-03-27 12:17:10 -07:00
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:getAll */
/* -------------------------------------------------------------------------- */
2020-03-27 12:17:10 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-03-27 12:17:10 -07:00
name : 'boardId' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-03-27 12:17:10 -07:00
default : '' ,
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getAll' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Group Name or ID' ,
2020-03-27 12:17:10 -07:00
name : 'groupId' ,
default : '' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-03-27 12:17:10 -07:00
typeOptions : {
loadOptionsMethod : 'getGroups' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'boardId' ] ,
2020-03-27 12:17:10 -07:00
} ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getAll' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getAll' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-27 12:17:10 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-27 12:17:10 -07:00
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:getByColumnValue */
/* -------------------------------------------------------------------------- */
2020-03-27 12:17:10 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-03-27 12:17:10 -07:00
name : 'boardId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getByColumnValue' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The unique identifier of the board. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-27 12:17:10 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Column Name or ID' ,
2020-03-27 12:17:10 -07:00
name : 'columnId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getColumns' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'boardId' ] ,
2020-03-27 12:17:10 -07:00
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getByColumnValue' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
2022-08-17 08:50:24 -07:00
description :
'The column\'s unique identifier. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-03-27 12:17:10 -07:00
} ,
{
displayName : 'Column Value' ,
name : 'columnValue' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getByColumnValue' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The column value to search items by' ,
2020-03-27 12:17:10 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getByColumnValue' ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-03-27 12:17:10 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'getByColumnValue' ] ,
returnAll : [ false ] ,
2020-03-27 12:17:10 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-27 12:17:10 -07:00
} ,
2021-03-12 02:32:04 -08:00
/* -------------------------------------------------------------------------- */
/* boardItem:move */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2021-03-12 02:32:04 -08:00
name : 'boardId' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2021-03-12 02:32:04 -08:00
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'move' ] ,
2021-03-12 02:32:04 -08:00
} ,
} ,
} ,
{
displayName : 'Item ID' ,
name : 'itemId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'move' ] ,
resource : [ 'boardItem' ] ,
2021-03-12 02:32:04 -08:00
} ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "The item's ID" ,
2021-03-12 02:32:04 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Group Name or ID' ,
2021-03-12 02:32:04 -08:00
name : 'groupId' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2021-03-12 02:32:04 -08:00
default : '' ,
typeOptions : {
loadOptionsMethod : 'getGroups' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'boardId' ] ,
2021-03-12 02:32:04 -08:00
} ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'boardItem' ] ,
operation : [ 'move' ] ,
2021-03-12 02:32:04 -08:00
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;