refactor: Format nodes-base package (A-F) (#3800)

* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
Michael Kret
2022-08-01 23:47:55 +03:00
committed by GitHub
parent 2c17e6f3ca
commit 0ecbb4a19d
411 changed files with 12906 additions and 20148 deletions

View File

@@ -1,6 +1,4 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
ILoadOptionsFunctions,
@@ -11,26 +9,11 @@ import {
NodeApiError,
NodeOperationError,
} from 'n8n-workflow';
import {
codaApiRequest,
codaApiRequestAllItems,
} from './GenericFunctions';
import {
tableFields,
tableOperations,
} from './TableDescription';
import {
formulaFields,
formulaOperations,
} from './FormulaDescription';
import {
controlFields,
controlOperations,
} from './ControlDescription';
import {
viewFields,
viewOperations,
} from './ViewDescription';
import { codaApiRequest, codaApiRequestAllItems } from './GenericFunctions';
import { tableFields, tableOperations } from './TableDescription';
import { formulaFields, formulaOperations } from './FormulaDescription';
import { controlFields, controlOperations } from './ControlDescription';
import { viewFields, viewOperations } from './ViewDescription';
export class Coda implements INodeType {
description: INodeTypeDescription = {
@@ -62,7 +45,8 @@ export class Coda implements INodeType {
{
name: 'Control',
value: 'control',
description: 'Controls provide a user-friendly way to input a value that can affect other parts of the doc',
description:
'Controls provide a user-friendly way to input a value that can affect other parts of the doc',
},
{
name: 'Formula',
@@ -100,7 +84,7 @@ export class Coda implements INodeType {
async getDocs(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const qs = {};
const docs = await codaApiRequestAllItems.call(this,'items', 'GET', `/docs`, {}, qs);
const docs = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs`, {}, qs);
for (const doc of docs) {
const docName = doc.name;
const docId = doc.id;
@@ -118,7 +102,13 @@ export class Coda implements INodeType {
const docId = this.getCurrentNodeParameter('docId');
const tables = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables`, {});
const tables = await codaApiRequestAllItems.call(
this,
'items',
'GET',
`/docs/${docId}/tables`,
{},
);
for (const table of tables) {
const tableName = table.name;
const tableId = table.id;
@@ -137,7 +127,13 @@ export class Coda implements INodeType {
const docId = this.getCurrentNodeParameter('docId');
const tableId = this.getCurrentNodeParameter('tableId');
const columns = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables/${tableId}/columns`, {});
const columns = await codaApiRequestAllItems.call(
this,
'items',
'GET',
`/docs/${docId}/tables/${tableId}/columns`,
{},
);
for (const column of columns) {
const columnName = column.name;
const columnId = column.id;
@@ -153,7 +149,13 @@ export class Coda implements INodeType {
async getViews(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const docId = this.getCurrentNodeParameter('docId');
const views = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables?tableTypes=view`, {});
const views = await codaApiRequestAllItems.call(
this,
'items',
'GET',
`/docs/${docId}/tables?tableTypes=view`,
{},
);
for (const view of views) {
const viewName = view.name;
const viewId = view.id;
@@ -169,7 +171,13 @@ export class Coda implements INodeType {
async getFormulas(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const docId = this.getCurrentNodeParameter('docId');
const formulas = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/formulas`, {});
const formulas = await codaApiRequestAllItems.call(
this,
'items',
'GET',
`/docs/${docId}/formulas`,
{},
);
for (const formula of formulas) {
const formulaName = formula.name;
const formulaId = formula.id;
@@ -186,7 +194,13 @@ export class Coda implements INodeType {
const returnData: INodePropertyOptions[] = [];
const docId = this.getCurrentNodeParameter('docId');
const viewId = this.getCurrentNodeParameter('viewId');
const viewRows = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables/${viewId}/rows`, {});
const viewRows = await codaApiRequestAllItems.call(
this,
'items',
'GET',
`/docs/${docId}/tables/${viewId}/rows`,
{},
);
for (const viewRow of viewRows) {
const viewRowName = viewRow.name;
const viewRowId = viewRow.id;
@@ -205,7 +219,13 @@ export class Coda implements INodeType {
const docId = this.getCurrentNodeParameter('docId');
const viewId = this.getCurrentNodeParameter('viewId');
const viewColumns = await codaApiRequestAllItems.call(this, 'items', 'GET', `/docs/${docId}/tables/${viewId}/columns`, {});
const viewColumns = await codaApiRequestAllItems.call(
this,
'items',
'GET',
`/docs/${docId}/tables/${viewId}/columns`,
{},
);
for (const viewColumn of viewColumns) {
const viewColumnName = viewColumn.name;
const viewColumnId = viewColumn.id;
@@ -265,13 +285,21 @@ export class Coda implements INodeType {
if (options.keyColumns) {
// @ts-ignore
(sendData[endpoint]! as IDataObject).keyColumns! = options.keyColumns.split(',') as string[];
(sendData[endpoint]! as IDataObject).keyColumns! = options.keyColumns.split(
',',
) as string[];
}
}
// Now that all data got collected make all the requests
for (const endpoint of Object.keys(sendData)) {
await codaApiRequest.call(this, 'POST', endpoint, sendData[endpoint], (sendData[endpoint]! as IDataObject).qs! as IDataObject);
await codaApiRequest.call(
this,
'POST',
endpoint,
sendData[endpoint],
(sendData[endpoint]! as IDataObject).qs! as IDataObject,
);
}
} catch (error) {
if (this.continueOnFail()) {
@@ -347,7 +375,14 @@ export class Coda implements INodeType {
}
try {
if (returnAll === true) {
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {}, qs);
responseData = await codaApiRequestAllItems.call(
this,
'items',
'GET',
endpoint,
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', 0) as number;
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
@@ -392,7 +427,7 @@ export class Coda implements INodeType {
// Now that all data got collected make all the requests
for (const endpoint of Object.keys(sendData)) {
await codaApiRequest.call(this, 'DELETE', endpoint, { rowIds: sendData[endpoint]}, qs);
await codaApiRequest.call(this, 'DELETE', endpoint, { rowIds: sendData[endpoint] }, qs);
}
} catch (error) {
if (this.continueOnFail()) {
@@ -459,7 +494,7 @@ export class Coda implements INodeType {
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
responseData = responseData.items;
}
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
@@ -505,7 +540,7 @@ export class Coda implements INodeType {
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
responseData = responseData.items;
}
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
@@ -551,7 +586,7 @@ export class Coda implements INodeType {
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
responseData = responseData.items;
}
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
@@ -589,7 +624,7 @@ export class Coda implements INodeType {
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
responseData = responseData.items;
}
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
@@ -622,7 +657,14 @@ export class Coda implements INodeType {
}
try {
if (returnAll === true) {
responseData = await codaApiRequestAllItems.call(this, 'items', 'GET', endpoint, {}, qs);
responseData = await codaApiRequestAllItems.call(
this,
'items',
'GET',
endpoint,
{},
qs,
);
} else {
qs.limit = this.getNodeParameter('limit', 0) as number;
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
@@ -656,7 +698,7 @@ export class Coda implements INodeType {
const rowId = this.getNodeParameter('rowId', i) as string;
const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}`;
responseData = await codaApiRequest.call(this, 'DELETE', endpoint);
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
@@ -677,7 +719,7 @@ export class Coda implements INodeType {
const columnId = this.getNodeParameter('columnId', i) as string;
const endpoint = `/docs/${docId}/tables/${viewId}/rows/${rowId}/buttons/${columnId}`;
responseData = await codaApiRequest.call(this, 'POST', endpoint);
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
@@ -702,7 +744,7 @@ export class Coda implements INodeType {
responseData = await codaApiRequest.call(this, 'GET', endpoint, {}, qs);
responseData = responseData.items;
}
returnData.push.apply(returnData,responseData);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });

View File

@@ -8,9 +8,7 @@ export const controlOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'control',
],
resource: ['control'],
},
},
options: [
@@ -32,10 +30,9 @@ export const controlOperations: INodeProperties[] = [
];
export const controlFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* control:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* control:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -47,15 +44,12 @@ export const controlFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'control',
],
operation: [
'get',
],
resource: ['control'],
operation: ['get'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Control ID',
@@ -65,19 +59,15 @@ export const controlFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'control',
],
operation: [
'get',
],
resource: ['control'],
operation: ['get'],
},
},
description: 'The control to get the row from',
},
/* -------------------------------------------------------------------------- */
/* control:getAll */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* control:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -89,15 +79,12 @@ export const controlFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'control',
],
operation: [
'getAll',
],
resource: ['control'],
operation: ['getAll'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -105,12 +92,8 @@ export const controlFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'control',
],
operation: [
'getAll',
],
resource: ['control'],
operation: ['getAll'],
},
},
default: false,
@@ -122,15 +105,9 @@ export const controlFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'control',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['control'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {

View File

@@ -8,9 +8,7 @@ export const formulaOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'formula',
],
resource: ['formula'],
},
},
options: [
@@ -32,10 +30,9 @@ export const formulaOperations: INodeProperties[] = [
];
export const formulaFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* formula:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* formula:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -47,15 +44,12 @@ export const formulaFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'formula',
],
operation: [
'get',
],
resource: ['formula'],
operation: ['get'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Formula ID',
@@ -65,19 +59,15 @@ export const formulaFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'formula',
],
operation: [
'get',
],
resource: ['formula'],
operation: ['get'],
},
},
description: 'The formula to get the row from',
},
/* -------------------------------------------------------------------------- */
/* formula:getAll */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* formula:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -89,15 +79,12 @@ export const formulaFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'formula',
],
operation: [
'getAll',
],
resource: ['formula'],
operation: ['getAll'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -105,12 +92,8 @@ export const formulaFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'formula',
],
operation: [
'getAll',
],
resource: ['formula'],
operation: ['getAll'],
},
},
default: false,
@@ -122,15 +105,9 @@ export const formulaFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'formula',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['formula'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {

View File

@@ -1,20 +1,26 @@
import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
IExecuteSingleFunctions,
ILoadOptionsFunctions,
} from 'n8n-core';
import { IDataObject, NodeApiError, NodeOperationError, } from 'n8n-workflow';
import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core';
import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
export async function codaApiRequest(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
export async function codaApiRequest(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
method: string,
resource: string,
// tslint:disable-next-line:no-any
body: any = {},
qs: IDataObject = {},
uri?: string,
option: IDataObject = {},
// tslint:disable-next-line:no-any
): Promise<any> {
const credentials = await this.getCredentials('codaApi');
let options: OptionsWithUri = {
headers: { 'Authorization': `Bearer ${credentials.accessToken}`},
headers: { Authorization: `Bearer ${credentials.accessToken}` },
method,
qs,
body,
uri: uri ||`https://coda.io/apis/v1${resource}`,
uri: uri || `https://coda.io/apis/v1${resource}`,
json: true,
};
options = Object.assign({}, options, option);
@@ -33,8 +39,16 @@ export async function codaApiRequest(this: IExecuteFunctions | IExecuteSingleFun
* Make an API request to paginated coda endpoint
* and return all results
*/
export async function codaApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
export async function codaApiRequestAllItems(
this: IExecuteFunctions | ILoadOptionsFunctions,
propertyName: string,
method: string,
resource: string,
// tslint:disable-next-line:no-any
body: any = {},
query: IDataObject = {},
// tslint:disable-next-line:no-any
): Promise<any> {
const returnData: IDataObject[] = [];
let responseData;
@@ -48,10 +62,7 @@ export async function codaApiRequestAllItems(this: IExecuteFunctions | ILoadOpti
uri = responseData.nextPageLink;
// @ts-ignore
returnData.push.apply(returnData, responseData[propertyName]);
} while (
responseData.nextPageLink !== undefined &&
responseData.nextPageLink !== ''
);
} while (responseData.nextPageLink !== undefined && responseData.nextPageLink !== '');
return returnData;
}

View File

@@ -8,9 +8,7 @@ export const tableOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'table',
],
resource: ['table'],
},
},
options: [
@@ -61,10 +59,9 @@ export const tableOperations: INodeProperties[] = [
];
export const tableFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* table:createRow */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* table:createRow */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -76,39 +73,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'createRow',
],
resource: ['table'],
operation: ['createRow'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'createRow',
],
resource: ['table'],
operation: ['createRow'],
},
},
description: 'The table to create the row in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to create the row in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Options',
@@ -118,12 +107,8 @@ export const tableFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'createRow',
],
resource: ['table'],
operation: ['createRow'],
},
},
options: [
@@ -139,13 +124,14 @@ export const tableFields: INodeProperties[] = [
name: 'keyColumns',
type: 'string',
default: '',
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 (,).',
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 (,).',
},
],
},
/* -------------------------------------------------------------------------- */
/* table:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* table:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -157,39 +143,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getRow',
],
resource: ['table'],
operation: ['getRow'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getRow',
],
resource: ['table'],
operation: ['getRow'],
},
},
description: 'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Row ID',
@@ -199,15 +177,12 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getRow',
],
resource: ['table'],
operation: ['getRow'],
},
},
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',
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",
},
{
displayName: 'Options',
@@ -217,12 +192,8 @@ export const tableFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getRow',
],
resource: ['table'],
operation: ['getRow'],
},
},
options: [
@@ -238,7 +209,8 @@ export const tableFields: INodeProperties[] = [
name: 'useColumnNames',
type: 'boolean',
default: false,
description: 'Whether to 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.',
description:
'Whether to 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.',
},
{
displayName: 'ValueFormat',
@@ -263,9 +235,9 @@ export const tableFields: INodeProperties[] = [
},
],
},
/* -------------------------------------------------------------------------- */
/* table:getAll */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* table:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -277,39 +249,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllRows',
],
resource: ['table'],
operation: ['getAllRows'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllRows',
],
resource: ['table'],
operation: ['getAllRows'],
},
},
description: 'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -317,12 +281,8 @@ export const tableFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllRows',
],
resource: ['table'],
operation: ['getAllRows'],
},
},
default: false,
@@ -334,15 +294,9 @@ export const tableFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllRows',
],
returnAll: [
false,
],
resource: ['table'],
operation: ['getAllRows'],
returnAll: [false],
},
},
typeOptions: {
@@ -360,12 +314,8 @@ export const tableFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllRows',
],
resource: ['table'],
operation: ['getAllRows'],
},
},
options: [
@@ -377,7 +327,8 @@ export const tableFields: INodeProperties[] = [
alwaysOpenEditWindow: true,
},
default: '',
description: 'Query used to filter returned rows, specified as &lt;column_id_or_name&gt;:&lt;value&gt;. 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").',
description:
'Query used to filter returned rows, specified as &lt;column_id_or_name&gt;:&lt;value&gt;. 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").',
},
{
displayName: 'RAW Data',
@@ -401,14 +352,16 @@ export const tableFields: INodeProperties[] = [
value: 'natural',
},
],
description: 'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.',
description:
'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.',
},
{
displayName: 'Use Column Names',
name: 'useColumnNames',
type: 'boolean',
default: false,
description: 'Whether to 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.',
description:
'Whether to 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.',
},
{
displayName: 'ValueFormat',
@@ -440,9 +393,9 @@ export const tableFields: INodeProperties[] = [
},
],
},
/* -------------------------------------------------------------------------- */
/* row:delete */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* row:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -454,39 +407,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'deleteRow',
],
resource: ['table'],
operation: ['deleteRow'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'deleteRow',
],
resource: ['table'],
operation: ['deleteRow'],
},
},
description: 'The table to delete the row in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to delete the row in. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Row ID',
@@ -496,19 +441,15 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'deleteRow',
],
resource: ['table'],
operation: ['deleteRow'],
},
},
description: 'Row IDs to delete',
},
/* -------------------------------------------------------------------------- */
/* table:pushButton */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* table:pushButton */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -520,39 +461,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'pushButton',
],
resource: ['table'],
operation: ['pushButton'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'pushButton',
],
resource: ['table'],
operation: ['pushButton'],
},
},
description: 'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Row ID',
@@ -562,44 +495,35 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'pushButton',
],
resource: ['table'],
operation: ['pushButton'],
},
},
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',
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",
},
{
displayName: 'Column Name or ID',
name: 'columnId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
required: true,
typeOptions: {
loadOptionsMethod: 'getColumns',
loadOptionsDependsOn: [
'docId',
'tableId',
],
loadOptionsDependsOn: ['docId', 'tableId'],
},
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'pushButton',
],
resource: ['table'],
operation: ['pushButton'],
},
},
},
/* -------------------------------------------------------------------------- */
/* table:getColumn */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* table:getColumn */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -611,39 +535,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getColumn',
],
resource: ['table'],
operation: ['getColumn'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getColumn',
],
resource: ['table'],
operation: ['getColumn'],
},
},
description: 'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Column ID',
@@ -653,19 +569,15 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getColumn',
],
resource: ['table'],
operation: ['getColumn'],
},
},
description: 'The table to get the row from',
},
/* -------------------------------------------------------------------------- */
/* table:getAllColumns */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* table:getAllColumns */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -677,39 +589,31 @@ export const tableFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
],
resource: ['table'],
operation: ['getAllColumns'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Table Name or ID',
name: 'tableId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getTables',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
],
resource: ['table'],
operation: ['getAllColumns'],
},
},
description: 'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -717,12 +621,8 @@ export const tableFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
],
resource: ['table'],
operation: ['getAllColumns'],
},
},
default: false,
@@ -734,15 +634,9 @@ export const tableFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'table',
],
operation: [
'getAllColumns',
],
returnAll: [
false,
],
resource: ['table'],
operation: ['getAllColumns'],
returnAll: [false],
},
},
typeOptions: {

View File

@@ -8,9 +8,7 @@ export const viewOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'view',
],
resource: ['view'],
},
},
options: [
@@ -61,10 +59,9 @@ export const viewOperations: INodeProperties[] = [
];
export const viewFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* view:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -76,15 +73,12 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'get',
],
resource: ['view'],
operation: ['get'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'View ID',
@@ -94,19 +88,15 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'get',
],
resource: ['view'],
operation: ['get'],
},
},
description: 'The view to get the row from',
},
/* -------------------------------------------------------------------------- */
/* view:getAll */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -118,15 +108,12 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAll',
],
resource: ['view'],
operation: ['getAll'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -134,12 +121,8 @@ export const viewFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAll',
],
resource: ['view'],
operation: ['getAll'],
},
},
default: false,
@@ -151,15 +134,9 @@ export const viewFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['view'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {
@@ -169,9 +146,9 @@ export const viewFields: INodeProperties[] = [
default: 50,
description: 'Max number of results to return',
},
/* -------------------------------------------------------------------------- */
/* view:getAllViewRows */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:getAllViewRows */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -183,39 +160,31 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewRows',
],
resource: ['view'],
operation: ['getAllViewRows'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'View Name or ID',
name: 'viewId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getViews',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewRows',
],
resource: ['view'],
operation: ['getAllViewRows'],
},
},
description: 'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -223,12 +192,8 @@ export const viewFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewRows',
],
resource: ['view'],
operation: ['getAllViewRows'],
},
},
default: false,
@@ -240,15 +205,9 @@ export const viewFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewRows',
],
returnAll: [
false,
],
resource: ['view'],
operation: ['getAllViewRows'],
returnAll: [false],
},
},
typeOptions: {
@@ -266,12 +225,8 @@ export const viewFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewRows',
],
resource: ['view'],
operation: ['getAllViewRows'],
},
},
options: [
@@ -283,14 +238,16 @@ export const viewFields: INodeProperties[] = [
alwaysOpenEditWindow: true,
},
default: '',
description: 'Query used to filter returned rows, specified as &lt;column_id_or_name&gt;:&lt;value&gt;. 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").',
description:
'Query used to filter returned rows, specified as &lt;column_id_or_name&gt;:&lt;value&gt;. 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").',
},
{
displayName: 'Use Column Names',
name: 'useColumnNames',
type: 'boolean',
default: false,
description: 'Whether to 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.',
description:
'Whether to 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.',
},
{
displayName: 'ValueFormat',
@@ -335,13 +292,14 @@ export const viewFields: INodeProperties[] = [
value: 'natural',
},
],
description: 'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.',
description:
'Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending.',
},
],
},
/* -------------------------------------------------------------------------- */
/* view:getAllViewColumns */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:getAllViewColumns */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -353,39 +311,31 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewColumns',
],
resource: ['view'],
operation: ['getAllViewColumns'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'View Name or ID',
name: 'viewId',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
loadOptionsMethod: 'getViews',
},
required: true,
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewColumns',
],
resource: ['view'],
operation: ['getAllViewColumns'],
},
},
description: 'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The table to get the rows from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Return All',
@@ -393,12 +343,8 @@ export const viewFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewColumns',
],
resource: ['view'],
operation: ['getAllViewColumns'],
},
},
default: false,
@@ -410,15 +356,9 @@ export const viewFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'getAllViewColumns',
],
returnAll: [
false,
],
resource: ['view'],
operation: ['getAllViewColumns'],
returnAll: [false],
},
},
typeOptions: {
@@ -428,9 +368,9 @@ export const viewFields: INodeProperties[] = [
default: 50,
description: 'Max number of results to return',
},
/* -------------------------------------------------------------------------- */
/* view:deleteViewRow */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:deleteViewRow */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -442,15 +382,12 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'deleteViewRow',
],
resource: ['view'],
operation: ['deleteViewRow'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'View Name or ID',
@@ -460,21 +397,16 @@ export const viewFields: INodeProperties[] = [
default: '',
typeOptions: {
loadOptionsMethod: 'getViews',
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'deleteViewRow',
],
resource: ['view'],
operation: ['deleteViewRow'],
},
},
description: 'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Row Name or ID',
@@ -484,25 +416,20 @@ export const viewFields: INodeProperties[] = [
default: '',
typeOptions: {
loadOptionsMethod: 'getViewRows',
loadOptionsDependsOn: [
'viewId',
],
loadOptionsDependsOn: ['viewId'],
},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'deleteViewRow',
],
resource: ['view'],
operation: ['deleteViewRow'],
},
},
description: 'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
/* -------------------------------------------------------------------------- */
/* view:pushViewButton */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:pushViewButton */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -514,15 +441,12 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'pushViewButton',
],
resource: ['view'],
operation: ['pushViewButton'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'View Name or ID',
@@ -532,21 +456,16 @@ export const viewFields: INodeProperties[] = [
default: '',
typeOptions: {
loadOptionsMethod: 'getViews',
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'pushViewButton',
],
resource: ['view'],
operation: ['pushViewButton'],
},
},
description: 'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Row Name or ID',
@@ -556,50 +475,39 @@ export const viewFields: INodeProperties[] = [
default: '',
typeOptions: {
loadOptionsMethod: 'getViewRows',
loadOptionsDependsOn: [
'viewId',
],
loadOptionsDependsOn: ['viewId'],
},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'pushViewButton',
],
resource: ['view'],
operation: ['pushViewButton'],
},
},
description: 'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Column Name or ID',
name: 'columnId',
type: 'options',
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
description:
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
required: true,
typeOptions: {
loadOptionsMethod: 'getViewColumns',
loadOptionsDependsOn: [
'docId',
'viewId',
],
loadOptionsDependsOn: ['docId', 'viewId'],
},
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'pushViewButton',
],
resource: ['view'],
operation: ['pushViewButton'],
},
},
},
/* -------------------------------------------------------------------------- */
/* view:updateViewRow */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* view:updateViewRow */
/* -------------------------------------------------------------------------- */
{
displayName: 'Doc Name or ID',
name: 'docId',
@@ -611,15 +519,12 @@ export const viewFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'updateViewRow',
],
resource: ['view'],
operation: ['updateViewRow'],
},
},
description: 'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'ID of the doc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'View Name or ID',
@@ -629,21 +534,16 @@ export const viewFields: INodeProperties[] = [
default: '',
typeOptions: {
loadOptionsMethod: 'getViews',
loadOptionsDependsOn: [
'docId',
],
loadOptionsDependsOn: ['docId'],
},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'updateViewRow',
],
resource: ['view'],
operation: ['updateViewRow'],
},
},
description: 'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Row Name or ID',
@@ -653,21 +553,16 @@ export const viewFields: INodeProperties[] = [
default: '',
typeOptions: {
loadOptionsMethod: 'getViewRows',
loadOptionsDependsOn: [
'viewId',
],
loadOptionsDependsOn: ['viewId'],
},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'updateViewRow',
],
resource: ['view'],
operation: ['updateViewRow'],
},
},
description: 'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'The view to get the row from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Key Name',
@@ -677,12 +572,8 @@ export const viewFields: INodeProperties[] = [
default: 'columns',
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'updateViewRow',
],
resource: ['view'],
operation: ['updateViewRow'],
},
},
description: 'The view to get the row from',
@@ -695,12 +586,8 @@ export const viewFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'view',
],
operation: [
'updateViewRow',
],
resource: ['view'],
operation: ['updateViewRow'],
},
},
options: [