2019-12-16 15:52:15 -08:00
import { INodeProperties } from 'n8n-workflow' ;
2019-12-13 13:50:59 -08:00
2021-12-03 00:44:16 -08:00
export const tableOperations : INodeProperties [ ] = [
2019-12-13 13:50:59 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-13 13:50:59 -08:00
] ,
} ,
} ,
options : [
{
2019-12-16 15:52:15 -08:00
name : 'Create Row' ,
value : 'createRow' ,
2020-07-24 03:56:41 -07:00
description : 'Create/Insert a row' ,
2019-12-13 13:50:59 -08:00
} ,
2019-12-14 08:42:32 -08:00
{
2019-12-16 15:52:15 -08:00
name : 'Delete Row' ,
value : 'deleteRow' ,
2019-12-14 08:42:32 -08:00
description : 'Delete one or multiple rows' ,
} ,
2020-01-30 14:02:09 -08:00
{
2020-02-05 16:47:40 -08:00
name : 'Get All Columns' ,
value : 'getAllColumns' ,
description : 'Get all columns' ,
} ,
{
name : 'Get All Rows' ,
value : 'getAllRows' ,
description : 'Get all the rows' ,
2020-01-30 14:02:09 -08:00
} ,
2020-02-03 16:40:03 -08:00
{
name : 'Get Column' ,
value : 'getColumn' ,
description : 'Get a column' ,
} ,
{
2020-02-05 16:47:40 -08:00
name : 'Get Row' ,
value : 'getRow' ,
2020-07-24 03:56:41 -07:00
description : 'Get a row' ,
2020-02-05 16:47:40 -08:00
} ,
{
name : 'Push Button' ,
value : 'pushButton' ,
description : 'Pushes a button' ,
2020-02-03 16:40:03 -08:00
} ,
2019-12-13 13:50:59 -08:00
] ,
2019-12-16 15:52:15 -08:00
default : 'createRow' ,
2019-12-13 13:50:59 -08:00
description : 'The operation to perform.' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2019-12-13 13:50:59 -08:00
2021-12-03 00:44:16 -08:00
export const tableFields : INodeProperties [ ] = [
2019-12-13 13:50:59 -08:00
/* -------------------------------------------------------------------------- */
2020-01-30 14:02:09 -08:00
/* table:createRow */
2019-12-13 13:50:59 -08:00
/* -------------------------------------------------------------------------- */
{
2019-12-16 08:40:44 -08:00
displayName : 'Doc' ,
name : 'docId' ,
2019-12-13 13:50:59 -08:00
type : 'options' ,
required : true ,
typeOptions : {
2019-12-16 08:40:44 -08:00
loadOptionsMethod : 'getDocs' ,
} ,
2019-12-16 15:52:15 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'createRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-13 13:50:59 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2019-12-16 08:40:44 -08:00
} ,
{
2019-12-16 15:52:15 -08:00
displayName : 'Table' ,
2019-12-16 08:40:44 -08:00
name : 'tableId' ,
2019-12-16 15:52:15 -08:00
type : 'options' ,
typeOptions : {
2020-01-04 20:28:09 -08:00
loadOptionsDependsOn : [
'docId' ,
] ,
2019-12-16 15:52:15 -08:00
loadOptionsMethod : 'getTables' ,
} ,
2019-12-16 08:40:44 -08:00
required : true ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-13 13:50:59 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-13 13:50:59 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'createRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-13 13:50:59 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to create the row in' ,
2019-12-13 13:50:59 -08:00
} ,
{
2019-12-16 18:43:46 -08:00
displayName : 'Options' ,
name : 'options' ,
2019-12-13 13:50:59 -08:00
type : 'collection' ,
2019-12-16 18:43:46 -08:00
placeholder : 'Add Option' ,
2019-12-13 13:50:59 -08:00
default : { } ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-13 13:50:59 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'createRow' ,
2019-12-13 13:50:59 -08:00
] ,
} ,
} ,
options : [
2019-12-14 08:42:32 -08:00
{
displayName : 'Disable Parsing' ,
name : 'disableParsing' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'If true, the API will not attempt to parse the data in any way' ,
2019-12-14 08:42:32 -08:00
} ,
2020-02-05 16:47:40 -08:00
{
displayName : 'Key Columns' ,
name : 'keyColumns' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Optional column IDs, URLs, or names (fragile and discouraged), specifying columns to be used as upsert keys. If more than one separate by a comma (,).' ,
2020-02-05 16:47:40 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-13 13:50:59 -08:00
} ,
2019-12-14 08:42:32 -08:00
/* -------------------------------------------------------------------------- */
2020-01-30 14:02:09 -08:00
/* table:get */
2019-12-14 08:42:32 -08:00
/* -------------------------------------------------------------------------- */
2019-12-16 08:40:44 -08:00
{
displayName : 'Doc' ,
name : 'docId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getDocs' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 15:52:15 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
2019-12-16 15:52:15 -08:00
displayName : 'Table' ,
2019-12-16 08:40:44 -08:00
name : 'tableId' ,
2019-12-16 15:52:15 -08:00
type : 'options' ,
typeOptions : {
2020-01-04 20:28:09 -08:00
loadOptionsDependsOn : [
'docId' ,
] ,
2019-12-16 15:52:15 -08:00
loadOptionsMethod : 'getTables' ,
} ,
2019-12-16 08:40:44 -08:00
required : true ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to get the row from' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
displayName : 'Row ID' ,
name : 'rowId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-04-22 09:29:51 -07:00
description : 'ID or name of the row. Names are discouraged because they\'re easily prone to being changed by users. If you\'re using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected' ,
2019-12-16 08:40:44 -08:00
} ,
{
2019-12-16 15:52:15 -08:00
displayName : 'Options' ,
name : 'options' ,
2019-12-16 08:40:44 -08:00
type : 'collection' ,
2019-12-16 15:52:15 -08:00
placeholder : 'Add Option' ,
2019-12-16 08:40:44 -08:00
default : { } ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getRow' ,
2019-12-16 08:40:44 -08:00
] ,
} ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
options : [
2020-02-05 16:47:40 -08:00
{
displayName : 'RAW Data' ,
name : 'rawData' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Returns the data exactly in the way it got received from the API' ,
2020-02-05 16:47:40 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
displayName : 'Use Column Names' ,
name : 'useColumnNames' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.' ,
2019-12-16 08:40:44 -08:00
} ,
{
displayName : 'ValueFormat' ,
name : 'valueFormat' ,
type : 'options' ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
options : [
{
name : 'Simple' ,
value : 'simple' ,
} ,
{
name : 'Simple With Arrays' ,
value : 'simpleWithArrays' ,
} ,
{
name : 'Rich' ,
value : 'rich' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The format that cell values are returned as' ,
2019-12-16 08:40:44 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
/* -------------------------------------------------------------------------- */
2020-01-30 14:02:09 -08:00
/* table:getAll */
2019-12-14 08:42:32 -08:00
/* -------------------------------------------------------------------------- */
2019-12-16 08:40:44 -08:00
{
displayName : 'Doc' ,
name : 'docId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getDocs' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 15:52:15 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getAllRows' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
2019-12-16 15:52:15 -08:00
displayName : 'Table' ,
2019-12-16 08:40:44 -08:00
name : 'tableId' ,
2019-12-16 15:52:15 -08:00
type : 'options' ,
typeOptions : {
2020-01-04 20:28:09 -08:00
loadOptionsDependsOn : [
'docId' ,
] ,
2019-12-16 15:52:15 -08:00
loadOptionsMethod : 'getTables' ,
} ,
2019-12-16 08:40:44 -08:00
required : true ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getAllRows' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to get the rows from' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getAllRows' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getAllRows' ,
2019-12-16 08:40:44 -08:00
] ,
returnAll : [
false ,
] ,
} ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2019-12-16 08:40:44 -08:00
} ,
{
2019-12-16 15:52:15 -08:00
displayName : 'Options' ,
name : 'options' ,
2019-12-16 08:40:44 -08:00
type : 'collection' ,
2019-12-16 15:52:15 -08:00
placeholder : 'Add Option' ,
2019-12-16 08:40:44 -08:00
default : { } ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'getAllRows' ,
2019-12-16 08:40:44 -08:00
] ,
} ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
options : [
2020-01-30 14:02:09 -08:00
{
displayName : 'Query' ,
name : 'query' ,
type : 'string' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Query used to filter returned rows, specified as <column_id_or_name>:<value>. If you\'d like to use a column name instead of an ID, you must quote it (e.g., "My Column":123). Also note that value is a JSON value; if you\'d like to use a string, you must surround it in quotes (e.g., "groceries").' ,
2020-01-30 14:02:09 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
2020-02-05 16:47:40 -08:00
displayName : 'RAW Data' ,
name : 'rawData' ,
2019-12-16 08:40:44 -08:00
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Returns the data exactly in the way it got received from the API' ,
2019-12-16 08:40:44 -08:00
} ,
{
2020-02-05 16:47:40 -08:00
displayName : 'Sort By' ,
name : 'sortBy' ,
2019-12-16 08:40:44 -08:00
type : 'options' ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
options : [
{
2020-02-05 16:47:40 -08:00
name : 'Created At' ,
value : 'createdAt' ,
2019-12-16 08:40:44 -08:00
} ,
{
2020-02-05 16:47:40 -08:00
name : 'Natural' ,
value : 'natural' ,
2019-12-16 08:40:44 -08:00
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.' ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-16 15:52:15 -08:00
{
2020-02-05 16:47:40 -08:00
displayName : 'Use Column Names' ,
name : 'useColumnNames' ,
2019-12-16 15:52:15 -08:00
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors.' ,
2019-12-16 15:52:15 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
2020-02-05 16:47:40 -08:00
displayName : 'ValueFormat' ,
name : 'valueFormat' ,
2019-12-16 08:40:44 -08:00
type : 'options' ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
options : [
{
2020-02-05 16:47:40 -08:00
name : 'Simple' ,
value : 'simple' ,
2019-12-16 08:40:44 -08:00
} ,
{
2020-02-05 16:47:40 -08:00
name : 'Simple With Arrays' ,
value : 'simpleWithArrays' ,
} ,
{
name : 'Rich' ,
value : 'rich' ,
2019-12-16 08:40:44 -08:00
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The format that cell values are returned as' ,
2019-12-16 08:40:44 -08:00
} ,
{
displayName : 'Visible Only' ,
name : 'visibleOnly' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'If true, returns only visible rows and columns for the table' ,
2019-12-16 08:40:44 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
/* -------------------------------------------------------------------------- */
/* row:delete */
/* -------------------------------------------------------------------------- */
2019-12-16 08:40:44 -08:00
{
displayName : 'Doc' ,
name : 'docId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getDocs' ,
} ,
2019-12-16 15:52:15 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'deleteRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
2019-12-16 15:52:15 -08:00
displayName : 'Table' ,
2019-12-16 08:40:44 -08:00
name : 'tableId' ,
2019-12-16 15:52:15 -08:00
type : 'options' ,
typeOptions : {
2020-01-04 20:28:09 -08:00
loadOptionsDependsOn : [
'docId' ,
] ,
2019-12-16 15:52:15 -08:00
loadOptionsMethod : 'getTables' ,
} ,
2019-12-16 08:40:44 -08:00
required : true ,
2020-01-04 20:19:10 -08:00
default : '' ,
2019-12-16 08:40:44 -08:00
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'deleteRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to delete the row in' ,
2019-12-14 08:42:32 -08:00
} ,
2019-12-16 08:40:44 -08:00
{
displayName : 'Row ID' ,
name : 'rowId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
2019-12-16 15:52:15 -08:00
'table' ,
2019-12-16 08:40:44 -08:00
] ,
operation : [
2019-12-16 15:52:15 -08:00
'deleteRow' ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-16 08:40:44 -08:00
} ,
2019-12-14 08:42:32 -08:00
} ,
2022-05-06 14:01:25 -07:00
description : 'Row IDs to delete' ,
2019-12-14 08:42:32 -08:00
} ,
2020-01-30 14:02:09 -08:00
/* -------------------------------------------------------------------------- */
/* table:pushButton */
/* -------------------------------------------------------------------------- */
{
displayName : 'Doc' ,
name : 'docId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getDocs' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'pushButton' ,
2020-10-22 06:46:03 -07:00
] ,
2020-01-30 14:02:09 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2020-01-30 14:02:09 -08:00
} ,
{
displayName : 'Table' ,
name : 'tableId' ,
type : 'options' ,
typeOptions : {
loadOptionsDependsOn : [
'docId' ,
] ,
loadOptionsMethod : 'getTables' ,
} ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'pushButton' ,
2020-10-22 06:46:03 -07:00
] ,
2020-01-30 14:02:09 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to get the row from' ,
2020-01-30 14:02:09 -08:00
} ,
{
displayName : 'Row ID' ,
name : 'rowId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'pushButton' ,
2020-10-22 06:46:03 -07:00
] ,
2020-01-30 14:02:09 -08:00
} ,
} ,
2022-04-22 09:29:51 -07:00
description : 'ID or name of the row. Names are discouraged because they\'re easily prone to being changed by users. If you\'re using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected' ,
2020-01-30 14:02:09 -08:00
} ,
{
displayName : 'Column' ,
name : 'columnId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getColumns' ,
loadOptionsDependsOn : [
'docId' ,
'tableId' ,
] ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'pushButton' ,
2020-10-22 06:46:03 -07:00
] ,
2020-01-30 14:02:09 -08:00
} ,
} ,
} ,
2020-02-03 16:40:03 -08:00
/* -------------------------------------------------------------------------- */
/* table:getColumn */
/* -------------------------------------------------------------------------- */
{
displayName : 'Doc' ,
name : 'docId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getDocs' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getColumn' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-03 16:40:03 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2020-02-03 16:40:03 -08:00
} ,
{
displayName : 'Table' ,
name : 'tableId' ,
type : 'options' ,
typeOptions : {
loadOptionsDependsOn : [
'docId' ,
] ,
loadOptionsMethod : 'getTables' ,
} ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getColumn' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-03 16:40:03 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to get the row from' ,
2020-02-03 16:40:03 -08:00
} ,
{
displayName : 'Column ID' ,
name : 'columnId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getColumn' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-03 16:40:03 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to get the row from' ,
2020-02-03 16:40:03 -08:00
} ,
/* -------------------------------------------------------------------------- */
/* table:getAllColumns */
/* -------------------------------------------------------------------------- */
{
displayName : 'Doc' ,
name : 'docId' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getDocs' ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getAllColumns' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-03 16:40:03 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of the doc' ,
2020-02-03 16:40:03 -08:00
} ,
{
displayName : 'Table' ,
name : 'tableId' ,
type : 'options' ,
typeOptions : {
loadOptionsDependsOn : [
'docId' ,
] ,
loadOptionsMethod : 'getTables' ,
} ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getAllColumns' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-03 16:40:03 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The table to get the row from' ,
2020-02-03 16:40:03 -08:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getAllColumns' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-03 16:40:03 -08: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-02-03 16:40:03 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
'table' ,
] ,
operation : [
'getAllColumns' ,
] ,
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-02-03 16:40:03 -08:00
} ,
2021-12-03 00:44:16 -08:00
] ;