2020-08-24 17:55:57 -07:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
2020-08-24 23:27:26 -07:00
|
|
|
} from 'n8n-workflow';
|
2020-01-24 04:28:05 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const boardOperations: INodeProperties[] = [
|
2020-01-24 04:28:05 -08:00
|
|
|
// ----------------------------------
|
|
|
|
// board
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-01-24 04:28:05 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a new board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get the data of a board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update a board',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
2020-10-22 06:46:03 -07:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-01-24 04:28:05 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const boardFields: INodeProperties[] = [
|
2020-01-24 04:28:05 -08:00
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// board:create
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
placeholder: 'My board',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'The name of the board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Description',
|
|
|
|
name: 'description',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'The description of the board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Aging',
|
|
|
|
name: 'prefs_cardAging',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Pirate',
|
|
|
|
value: 'pirate',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Regular',
|
|
|
|
value: 'regular',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'regular',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Determines the type of card aging that should take place on the board if card aging is enabled',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Background',
|
|
|
|
name: 'prefs_background',
|
|
|
|
type: 'string',
|
|
|
|
default: 'blue',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of a custom background or one of: blue, orange, green, red, purple, pink, lime, sky, grey',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Comments',
|
|
|
|
name: 'prefs_comments',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Disabled',
|
|
|
|
value: 'disabled',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Members',
|
|
|
|
value: 'members',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Observers',
|
|
|
|
value: 'observers',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Organization',
|
|
|
|
value: 'org',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Public',
|
|
|
|
value: 'public',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'members',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Who can comment on cards on this board',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Covers',
|
|
|
|
name: 'prefs_cardCovers',
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Determines whether card covers are enabled',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Invitations',
|
|
|
|
name: 'prefs_invitations',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Admins',
|
|
|
|
value: 'admins',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Members',
|
|
|
|
value: 'members',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'members',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Determines what types of members can invite users to join',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Keep From Source',
|
|
|
|
name: 'keepFromSource',
|
|
|
|
type: 'string',
|
|
|
|
default: 'none',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'To keep cards from the original board pass in the value cards',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Labels',
|
|
|
|
name: 'defaultLabels',
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Determines whether to use the default set of labels',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Lists',
|
|
|
|
name: 'defaultLists',
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Determines whether to add the default set of lists to a board(To Do, Doing, Done).It is ignored if idBoardSource is provided',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Organization ID',
|
|
|
|
name: 'idOrganization',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID or name of the team the board should belong to',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Permission Level',
|
|
|
|
name: 'prefs_permissionLevel',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Organization',
|
|
|
|
value: 'org',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Private',
|
|
|
|
value: 'private',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Public',
|
|
|
|
value: 'public',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'private',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The permissions level of the board',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Power Ups',
|
|
|
|
name: 'powerUps',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'All',
|
|
|
|
value: 'all',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Calendar',
|
|
|
|
value: 'calendar',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Card Aging',
|
|
|
|
value: 'cardAging',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Recap',
|
|
|
|
value: 'recap',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Voting',
|
|
|
|
value: 'voting',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'all',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The Power-Ups that should be enabled on the new board',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Self Join',
|
|
|
|
name: 'prefs_selfJoin',
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Determines whether users can join the boards themselves or whether they have to be invited',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Source IDs',
|
|
|
|
name: 'idBoardSource',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of a board to copy into the new board',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Voting',
|
|
|
|
name: 'prefs_voting',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Disabled',
|
|
|
|
value: 'disabled',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Members',
|
|
|
|
value: 'members',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Observers',
|
|
|
|
value: 'observers',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Organization',
|
|
|
|
value: 'org',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Public',
|
|
|
|
value: 'public',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'disabled',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Who can vote on this board',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// board:delete
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Board ID',
|
|
|
|
name: 'id',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'delete',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the board to delete',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// board:get
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Board ID',
|
|
|
|
name: 'id',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the board to get',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Fields',
|
|
|
|
name: 'fields',
|
|
|
|
type: 'string',
|
|
|
|
default: 'all',
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Fields to return. Either "all" or a comma-separated list: closed, dateLastActivity, dateLastView, desc, descData, idOrganization, invitations, invited, labelNames, memberships, name, pinned, powerUps, prefs, shortLink, shortUrl, starred, subscribed, url.',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Plugin Data',
|
|
|
|
name: 'pluginData',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to include pluginData on the card with the response',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// board:update
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Board ID',
|
|
|
|
name: 'id',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the board to update',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'board',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: {},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Closed',
|
|
|
|
name: 'closed',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether the board is closed',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Description',
|
|
|
|
name: 'desc',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'New description of the board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'New name of the board',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Organization ID',
|
|
|
|
name: 'idOrganization',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the team the board should be moved to',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Subscribed',
|
|
|
|
name: 'subscribed',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether the acting user is subscribed to the board',
|
2020-01-24 04:28:05 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|