2020-03-27 12:17:10 -07:00
import {
INodeProperties ,
2020-03-27 16:34:39 -07:00
} from 'n8n-workflow' ;
2020-03-26 12:39:31 -07:00
2021-12-03 00:44:16 -08:00
export const boardOperations : INodeProperties [ ] = [
2020-03-26 12:39:31 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-03-26 12:39:31 -07:00
displayOptions : {
show : {
resource : [
'board' ,
] ,
} ,
} ,
options : [
{
name : 'Archive' ,
value : 'archive' ,
description : 'Archive a board' ,
} ,
{
name : 'Create' ,
value : 'create' ,
description : 'Create a new board' ,
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get a board' ,
} ,
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all boards' ,
} ,
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-03-26 12:39:31 -07:00
2021-12-03 00:44:16 -08:00
export const boardFields : INodeProperties [ ] = [
2020-03-27 12:17:10 -07:00
2020-03-26 12:39:31 -07:00
/* -------------------------------------------------------------------------- */
/* board:archive */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-03-26 12:39:31 -07:00
name : 'boardId' ,
type : 'options' ,
2020-03-27 12:17:10 -07:00
default : '' ,
2020-03-26 12:39:31 -07:00
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
required : true ,
displayOptions : {
show : {
resource : [
'board' ,
] ,
operation : [
'archive' ,
] ,
} ,
} ,
2022-06-03 10:23:49 -07:00
description : 'Board unique identifiers. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-03-26 12:39:31 -07:00
} ,
/* -------------------------------------------------------------------------- */
/* board:create */
/* -------------------------------------------------------------------------- */
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
operation : [
'create' ,
] ,
resource : [
'board' ,
] ,
} ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The board\'s name' ,
2020-03-26 12:39:31 -07:00
} ,
{
displayName : 'Kind' ,
name : 'kind' ,
type : 'options' ,
options : [
{
name : 'Share' ,
value : 'share' ,
} ,
{
name : 'Public' ,
value : 'public' ,
} ,
{
name : 'Private' ,
value : 'private' ,
} ,
] ,
required : true ,
displayOptions : {
show : {
operation : [
'create' ,
] ,
resource : [
'board' ,
] ,
} ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The board\'s kind (public / private / share)' ,
2020-03-26 12:39:31 -07:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
operation : [
'create' ,
] ,
resource : [
'board' ,
] ,
} ,
} ,
default : { } ,
options : [
{
displayName : 'Template ID' ,
name : 'templateId' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
2022-05-06 14:01:25 -07:00
description : 'Optional board template ID' ,
2020-03-26 12:39:31 -07:00
} ,
] ,
} ,
/* -------------------------------------------------------------------------- */
/* board:get */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Board Name or ID' ,
2020-03-26 12:39:31 -07:00
name : 'boardId' ,
2020-03-27 16:34:39 -07:00
type : 'options' ,
2020-03-27 12:17:10 -07:00
default : '' ,
2020-03-27 16:34:39 -07:00
typeOptions : {
loadOptionsMethod : 'getBoards' ,
} ,
2020-03-26 12:39:31 -07:00
required : true ,
displayOptions : {
show : {
resource : [
'board' ,
] ,
operation : [
'get' ,
] ,
} ,
} ,
2022-06-03 10:23:49 -07:00
description : 'Board unique identifiers. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-03-26 12:39:31 -07:00
} ,
/* -------------------------------------------------------------------------- */
/* board:getAll */
/* -------------------------------------------------------------------------- */
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'board' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
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-26 12:39:31 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
'board' ,
] ,
operation : [
'getAll' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-03-26 12:39:31 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;