2020-03-27 12:17:10 -07:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
2020-03-27 16:34:39 -07:00
|
|
|
} from 'n8n-workflow';
|
2020-03-27 12:17:10 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const boardGroupOperations: 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: {
|
|
|
|
resource: [
|
|
|
|
'boardGroup',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a group in a board',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a board group',
|
2020-03-27 12:17:10 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a group in a board',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a board group',
|
2020-03-27 12:17:10 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get All',
|
|
|
|
value: 'getAll',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Get list of groups in a board',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get all board groups',
|
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 boardGroupFields: INodeProperties[] = [
|
2020-03-27 12:17:10 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* boardGroup:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
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-07-14 13:05:11 -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: {
|
|
|
|
resource: [
|
|
|
|
'boardGroup',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'boardGroup',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The group name',
|
2020-03-27 12:17:10 -07:00
|
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* boardGroup:delete */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
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-07-14 13:05:11 -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: {
|
|
|
|
resource: [
|
|
|
|
'boardGroup',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'delete',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
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-07-14 13:05:11 -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',
|
|
|
|
loadOptionsDependsOn: [
|
|
|
|
'boardId',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'boardGroup',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'delete',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* boardGroup:getAll */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
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-07-14 13:05:11 -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: {
|
|
|
|
resource: [
|
|
|
|
'boardGroup',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|