2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } 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: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['board'],
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Archive',
|
|
|
|
value: 'archive',
|
|
|
|
description: 'Archive a board',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Archive a board',
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a new board',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a board',
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a board',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a board',
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
{
|
2022-09-07 07:51:14 -07:00
|
|
|
name: 'Get Many',
|
2020-03-26 12:39:31 -07:00
|
|
|
value: 'getAll',
|
|
|
|
description: 'Get all boards',
|
2022-09-08 08:10:13 -07:00
|
|
|
action: 'Get many boards',
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
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[] = [
|
2022-08-17 08:50:24 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* board:archive */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-03-26 12:39:31 -07:00
|
|
|
{
|
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: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['board'],
|
|
|
|
operation: ['archive'],
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Board unique identifiers. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* board:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-03-26 12:39:31 -07:00
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['board'],
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2022-08-17 08:50:24 -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: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['board'],
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2022-08-17 08:50:24 -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: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['create'],
|
|
|
|
resource: ['board'],
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
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
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* board:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-03-26 12:39:31 -07:00
|
|
|
{
|
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: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['board'],
|
|
|
|
operation: ['get'],
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Board unique identifiers. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
2020-03-26 12:39:31 -07:00
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* board:getAll */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-03-26 12:39:31 -07:00
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['board'],
|
|
|
|
operation: ['getAll'],
|
2020-03-26 12:39:31 -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-26 12:39:31 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['board'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
returnAll: [false],
|
2020-03-26 12:39:31 -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-26 12:39:31 -07:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|