Added more resources and operations

This commit is contained in:
Ricardo Espinoza
2020-02-03 19:40:03 -05:00
parent b3a394a38f
commit 1a6e6aaa6d
5 changed files with 1520 additions and 5 deletions

View File

@@ -38,6 +38,16 @@ export const tableOperations = [
value: 'pushButton',
description: 'Pushes a button',
},
{
name: 'Get Column',
value: 'getColumn',
description: 'Get a column',
},
{
name: 'Get All Columns',
value: 'getAllColumns',
description: 'Get all columns',
},
],
default: 'createRow',
description: 'The operation to perform.',
@@ -128,7 +138,6 @@ export const tableFields = [
},
]
},
/* -------------------------------------------------------------------------- */
/* table:get */
/* -------------------------------------------------------------------------- */
@@ -593,5 +602,159 @@ export const tableFields = [
},
},
},
/* -------------------------------------------------------------------------- */
/* table:getColumn */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc',
name: 'docId',
type: 'options',
required: true,
typeOptions: {
loadOptionsMethod: 'getDocs',
},
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getColumn',
]
},
},
description: 'ID of the doc.',
},
{
displayName: 'Table',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getColumn',
]
},
},
description: 'The table to get the row from.',
},
{
displayName: 'Column ID',
name: 'columnId',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getColumn',
]
},
},
description: 'The table to get the row from.',
},
/* -------------------------------------------------------------------------- */
/* table:getAllColumns */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc',
name: 'docId',
type: 'options',
required: true,
typeOptions: {
loadOptionsMethod: 'getDocs',
},
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
]
},
},
description: 'ID of the doc.',
},
{
displayName: 'Table',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
]
},
},
description: 'The table to get the row from.',
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
]
},
},
default: false,
description: 'If all results should be returned or only up to a given limit.',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 100,
},
default: 50,
description: 'How many results to return.',
},
] as INodeProperties[];