mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const fieldOperations: INodeProperties[] = [
|
||||
{
|
||||
@@ -10,9 +8,7 @@ export const fieldOperations: INodeProperties[] = [
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'field',
|
||||
],
|
||||
resource: ['field'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -39,12 +35,8 @@ export const fieldFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'field',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['field'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -55,12 +47,8 @@ export const fieldFields: INodeProperties[] = [
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'field',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['field'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -72,15 +60,9 @@ export const fieldFields: INodeProperties[] = [
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'field',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
resource: ['field'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
@@ -98,12 +80,8 @@ export const fieldFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'field',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['field'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const fileOperations: INodeProperties[] = [
|
||||
{
|
||||
@@ -10,9 +8,7 @@ export const fileOperations: INodeProperties[] = [
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'file',
|
||||
],
|
||||
resource: ['file'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -45,13 +41,8 @@ export const fileFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'file',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
'delete',
|
||||
],
|
||||
resource: ['file'],
|
||||
operation: ['download', 'delete'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -64,13 +55,8 @@ export const fileFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'file',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
'delete',
|
||||
],
|
||||
resource: ['file'],
|
||||
operation: ['download', 'delete'],
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the record',
|
||||
@@ -83,13 +69,8 @@ export const fileFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'file',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
'delete',
|
||||
],
|
||||
resource: ['file'],
|
||||
operation: ['download', 'delete'],
|
||||
},
|
||||
},
|
||||
description: 'The unique identifier of the field',
|
||||
@@ -102,13 +83,8 @@ export const fileFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'file',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
'delete',
|
||||
],
|
||||
resource: ['file'],
|
||||
operation: ['download', 'delete'],
|
||||
},
|
||||
},
|
||||
description: 'The file attachment version number',
|
||||
@@ -117,12 +93,8 @@ export const fileFields: INodeProperties[] = [
|
||||
displayName: 'Binary Property',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'file',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
],
|
||||
resource: ['file'],
|
||||
operation: ['download'],
|
||||
},
|
||||
},
|
||||
name: 'binaryPropertyName',
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
@@ -9,12 +7,18 @@ import {
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject, NodeApiError, NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export async function quickbaseApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
export async function quickbaseApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('quickbaseApi');
|
||||
|
||||
if (!credentials.hostname) {
|
||||
@@ -30,7 +34,7 @@ export async function quickbaseApiRequest(this: IExecuteFunctions | ILoadOptions
|
||||
headers: {
|
||||
'QB-Realm-Hostname': credentials.hostname,
|
||||
'User-Agent': 'n8n',
|
||||
'Authorization': `QB-USER-TOKEN ${credentials.userToken}`,
|
||||
Authorization: `QB-USER-TOKEN ${credentials.userToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
method,
|
||||
@@ -40,7 +44,6 @@ export async function quickbaseApiRequest(this: IExecuteFunctions | ILoadOptions
|
||||
json: true,
|
||||
};
|
||||
|
||||
|
||||
if (Object.keys(body).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
@@ -60,6 +63,7 @@ export async function quickbaseApiRequest(this: IExecuteFunctions | ILoadOptions
|
||||
}
|
||||
|
||||
//@ts-ignore
|
||||
// prettier-ignore
|
||||
export async function getFieldsObject(this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, tableId: string): any { // tslint:disable-line:no-any
|
||||
const fieldsLabelKey: { [key: string]: number } = {};
|
||||
const fieldsIdKey: { [key: number]: string } = {};
|
||||
@@ -71,8 +75,15 @@ export async function getFieldsObject(this: IHookFunctions | ILoadOptionsFunctio
|
||||
return { fieldsLabelKey, fieldsIdKey };
|
||||
}
|
||||
|
||||
export async function quickbaseApiRequestAllItems(this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, method: string, resource: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
export async function quickbaseApiRequestAllItems(
|
||||
this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions,
|
||||
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 = [];
|
||||
@@ -90,7 +101,11 @@ export async function quickbaseApiRequestAllItems(this: IHookFunctions | ILoadOp
|
||||
let metadata;
|
||||
|
||||
do {
|
||||
const { data, fields, metadata: meta } = await quickbaseApiRequest.call(this, method, resource, body, query);
|
||||
const {
|
||||
data,
|
||||
fields,
|
||||
metadata: meta,
|
||||
} = await quickbaseApiRequest.call(this, method, resource, body, query);
|
||||
|
||||
metadata = meta;
|
||||
|
||||
@@ -116,9 +131,7 @@ export async function quickbaseApiRequestAllItems(this: IHookFunctions | ILoadOp
|
||||
}
|
||||
returnData.push.apply(returnData, responseData);
|
||||
responseData = [];
|
||||
} while (
|
||||
returnData.length < metadata.totalRecords
|
||||
);
|
||||
} while (returnData.length < metadata.totalRecords);
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
@@ -19,25 +17,13 @@ import {
|
||||
quickbaseApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
fieldFields,
|
||||
fieldOperations,
|
||||
} from './FieldDescription';
|
||||
import { fieldFields, fieldOperations } from './FieldDescription';
|
||||
|
||||
import {
|
||||
fileFields,
|
||||
fileOperations,
|
||||
} from './FileDescription';
|
||||
import { fileFields, fileOperations } from './FileDescription';
|
||||
|
||||
import {
|
||||
recordFields,
|
||||
recordOperations,
|
||||
} from './RecordDescription';
|
||||
import { recordFields, recordOperations } from './RecordDescription';
|
||||
|
||||
import {
|
||||
reportFields,
|
||||
reportOperations,
|
||||
} from './ReportDescription';
|
||||
import { reportFields, reportOperations } from './ReportDescription';
|
||||
|
||||
export class QuickBase implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -142,7 +128,6 @@ export class QuickBase implements INodeType {
|
||||
if (resource === 'field') {
|
||||
if (operation === 'getAll') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
@@ -179,16 +164,18 @@ export class QuickBase implements INodeType {
|
||||
|
||||
const versionNumber = this.getNodeParameter('versionNumber', i) as string;
|
||||
|
||||
responseData = await quickbaseApiRequest.call(this, 'DELETE', `/files/${tableId}/${recordId}/${fieldId}/${versionNumber}`);
|
||||
responseData = await quickbaseApiRequest.call(
|
||||
this,
|
||||
'DELETE',
|
||||
`/files/${tableId}/${recordId}/${fieldId}/${versionNumber}`,
|
||||
);
|
||||
|
||||
returnData.push(responseData);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation === 'download') {
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
|
||||
const recordId = this.getNodeParameter('recordId', i) as string;
|
||||
@@ -213,14 +200,24 @@ export class QuickBase implements INodeType {
|
||||
|
||||
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i) as string;
|
||||
|
||||
responseData = await quickbaseApiRequest.call(this, 'GET', `/files/${tableId}/${recordId}/${fieldId}/${versionNumber}`, {}, {}, { json: false, resolveWithFullResponse: true });
|
||||
responseData = await quickbaseApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/files/${tableId}/${recordId}/${fieldId}/${versionNumber}`,
|
||||
{},
|
||||
{},
|
||||
{ json: false, resolveWithFullResponse: true },
|
||||
);
|
||||
|
||||
//content-disposition': 'attachment; filename="dog-puppy-on-garden-royalty-free-image-1586966191.jpg"',
|
||||
const contentDisposition = responseData.headers['content-disposition'];
|
||||
|
||||
const data = Buffer.from(responseData.body as string, 'base64');
|
||||
|
||||
items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData(data as unknown as Buffer, contentDisposition.split('=')[1]);
|
||||
items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData(
|
||||
data as unknown as Buffer,
|
||||
contentDisposition.split('=')[1],
|
||||
);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
@@ -242,7 +239,7 @@ export class QuickBase implements INodeType {
|
||||
|
||||
const columns = this.getNodeParameter('columns', i) as string;
|
||||
|
||||
const columnList = columns.split(',').map(column => column.trim());
|
||||
const columnList = columns.split(',').map((column) => column.trim());
|
||||
if (options.useFieldIDs === true) {
|
||||
for (const key of Object.keys(items[i].json)) {
|
||||
record[key] = { value: items[i].json[key] };
|
||||
@@ -313,7 +310,6 @@ export class QuickBase implements INodeType {
|
||||
|
||||
if (operation === 'getAll') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
@@ -339,7 +335,13 @@ export class QuickBase implements INodeType {
|
||||
// }
|
||||
|
||||
if (returnAll) {
|
||||
responseData = await quickbaseApiRequestAllItems.call(this, 'POST', '/records/query', body, qs);
|
||||
responseData = await quickbaseApiRequestAllItems.call(
|
||||
this,
|
||||
'POST',
|
||||
'/records/query',
|
||||
body,
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
body.options = { top: this.getNodeParameter('limit', i) as number };
|
||||
|
||||
@@ -384,7 +386,7 @@ export class QuickBase implements INodeType {
|
||||
|
||||
const columns = this.getNodeParameter('columns', i) as string;
|
||||
|
||||
const columnList = columns.split(',').map(column => column.trim());
|
||||
const columnList = columns.split(',').map((column) => column.trim());
|
||||
|
||||
if (options.useFieldIDs === true) {
|
||||
for (const key of Object.keys(items[i].json)) {
|
||||
@@ -400,7 +402,11 @@ export class QuickBase implements INodeType {
|
||||
}
|
||||
|
||||
if (items[i].json[updateKey] === undefined) {
|
||||
throw new NodeOperationError(this.getNode(), `The update key ${updateKey} could not be found in the input`, { itemIndex: i });
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`The update key ${updateKey} could not be found in the input`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
|
||||
data.push(record);
|
||||
@@ -459,7 +465,7 @@ export class QuickBase implements INodeType {
|
||||
|
||||
const columns = this.getNodeParameter('columns', i) as string;
|
||||
|
||||
const columnList = columns.split(',').map(column => column.trim());
|
||||
const columnList = columns.split(',').map((column) => column.trim());
|
||||
|
||||
if (options.useFieldIDs === true) {
|
||||
for (const key of Object.keys(items[i].json)) {
|
||||
@@ -475,7 +481,11 @@ export class QuickBase implements INodeType {
|
||||
}
|
||||
|
||||
if (items[i].json[updateKey] === undefined) {
|
||||
throw new NodeOperationError(this.getNode(), `The update key ${updateKey} could not be found in the input`, { itemIndex: i });
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`The update key ${updateKey} could not be found in the input`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
|
||||
record[mergeFieldId] = { value: items[i].json[updateKey] };
|
||||
@@ -521,10 +531,8 @@ export class QuickBase implements INodeType {
|
||||
}
|
||||
|
||||
if (resource === 'report') {
|
||||
|
||||
if (operation === 'run') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
@@ -534,11 +542,23 @@ export class QuickBase implements INodeType {
|
||||
qs.tableId = tableId;
|
||||
|
||||
if (returnAll) {
|
||||
responseData = await quickbaseApiRequestAllItems.call(this, 'POST', `/reports/${reportId}/run`, {}, qs);
|
||||
responseData = await quickbaseApiRequestAllItems.call(
|
||||
this,
|
||||
'POST',
|
||||
`/reports/${reportId}/run`,
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.top = this.getNodeParameter('limit', i) as number;
|
||||
|
||||
responseData = await quickbaseApiRequest.call(this, 'POST', `/reports/${reportId}/run`, {}, qs);
|
||||
responseData = await quickbaseApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
`/reports/${reportId}/run`,
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
|
||||
const { data: records, fields } = responseData;
|
||||
responseData = [];
|
||||
@@ -563,14 +583,19 @@ export class QuickBase implements INodeType {
|
||||
|
||||
if (operation === 'get') {
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
const reportId = this.getNodeParameter('reportId', i) as string;
|
||||
|
||||
const tableId = this.getNodeParameter('tableId', i) as string;
|
||||
|
||||
qs.tableId = tableId;
|
||||
|
||||
responseData = await quickbaseApiRequest.call(this, 'GET', `/reports/${reportId}`, {}, qs);
|
||||
responseData = await quickbaseApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/reports/${reportId}`,
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
|
||||
returnData.push(responseData);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const recordOperations: INodeProperties[] = [
|
||||
{
|
||||
@@ -10,9 +8,7 @@ export const recordOperations: INodeProperties[] = [
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
resource: ['record'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -63,12 +59,8 @@ export const recordFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -79,18 +71,15 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
placeholder: 'Select Fields...',
|
||||
description: 'Comma-separated list of the properties which should used as columns for the new rows',
|
||||
description:
|
||||
'Comma-separated list of the properties which should used as columns for the new rows',
|
||||
},
|
||||
{
|
||||
displayName: 'Simplify',
|
||||
@@ -98,12 +87,8 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
@@ -117,12 +102,8 @@ export const recordFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -132,12 +113,11 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTableFields',
|
||||
loadOptionsDependsOn: [
|
||||
'tableId',
|
||||
],
|
||||
loadOptionsDependsOn: ['tableId'],
|
||||
},
|
||||
default: [],
|
||||
description: 'Specify an array of field IDs that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'Specify an array of field IDs that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Use Field IDs',
|
||||
@@ -159,12 +139,8 @@ export const recordFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -177,15 +153,12 @@ export const recordFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
description: 'The filter to delete records. To delete all records specify a filter that will include all records, for example {3.GT.0} where 3 is the ID of the Record ID field.',
|
||||
description:
|
||||
'The filter to delete records. To delete all records specify a filter that will include all records, for example {3.GT.0} where 3 is the ID of the Record ID field.',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* record:getAll */
|
||||
@@ -198,12 +171,8 @@ export const recordFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -214,12 +183,8 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -231,15 +196,9 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
@@ -257,12 +216,8 @@ export const recordFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -275,7 +230,8 @@ export const recordFields: INodeProperties[] = [
|
||||
loadOptionsMethod: 'getTableFields',
|
||||
},
|
||||
default: [],
|
||||
description: 'An array of field IDs for the fields that should be returned in the response. If empty, the default columns on the table will be returned. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'An array of field IDs for the fields that should be returned in the response. If empty, the default columns on the table will be returned. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Sort By',
|
||||
@@ -299,7 +255,8 @@ export const recordFields: INodeProperties[] = [
|
||||
loadOptionsMethod: 'getTableFields',
|
||||
},
|
||||
default: '',
|
||||
description: 'The unique identifier of a field in a table. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'The unique identifier of a field in a table. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Order',
|
||||
@@ -320,14 +277,16 @@ export const recordFields: INodeProperties[] = [
|
||||
],
|
||||
},
|
||||
],
|
||||
description: 'By default, queries will be sorted by the given sort fields or the default sort if the query does not provide any. Set to false to avoid sorting when the order of the data returned is not important. Returning data without sorting can improve performance.',
|
||||
description:
|
||||
'By default, queries will be sorted by the given sort fields or the default sort if the query does not provide any. Set to false to avoid sorting when the order of the data returned is not important. Returning data without sorting can improve performance.',
|
||||
},
|
||||
{
|
||||
displayName: 'Where',
|
||||
name: 'where',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The filter, using the <a href="https://help.quickbase.com/api-guide/componentsquery.html">Quick Base query language</a>, which determines the records to return',
|
||||
description:
|
||||
'The filter, using the <a href="https://help.quickbase.com/api-guide/componentsquery.html">Quick Base query language</a>, which determines the records to return',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -342,12 +301,8 @@ export const recordFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -358,18 +313,15 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
placeholder: 'id,name,description',
|
||||
description: 'Comma-separated list of the properties which should used as columns for the new rows',
|
||||
description:
|
||||
'Comma-separated list of the properties which should used as columns for the new rows',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Key',
|
||||
@@ -377,12 +329,8 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -394,12 +342,8 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
@@ -413,12 +357,8 @@ export const recordFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -428,12 +368,11 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTableFields',
|
||||
loadOptionsDependsOn: [
|
||||
'tableId',
|
||||
],
|
||||
loadOptionsDependsOn: ['tableId'],
|
||||
},
|
||||
default: [],
|
||||
description: 'Specify an array of field IDs that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'Specify an array of field IDs that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Use Field IDs',
|
||||
@@ -467,12 +406,8 @@ export const recordFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['upsert'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -483,18 +418,15 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['upsert'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
placeholder: 'id,name,description',
|
||||
description: 'Comma-separated list of the properties which should used as columns for the new rows',
|
||||
description:
|
||||
'Comma-separated list of the properties which should used as columns for the new rows',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Key',
|
||||
@@ -502,12 +434,8 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['upsert'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -522,16 +450,13 @@ export const recordFields: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['upsert'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: '<p>You\'re updating records in a Quick Base table with data from an external file. In order for a merge like this to work, Quick Base needs a way to match records in the source data with corresponding records in the destination table.</p><p>You make this possible by choosing the field in the app table that holds unique matching values. This is called a merge field.</p>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'<p>You\'re updating records in a Quick Base table with data from an external file. In order for a merge like this to work, Quick Base needs a way to match records in the source data with corresponding records in the destination table.</p><p>You make this possible by choosing the field in the app table that holds unique matching values. This is called a merge field.</p>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Simplify',
|
||||
@@ -539,12 +464,8 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['upsert'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
@@ -558,12 +479,8 @@ export const recordFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'record',
|
||||
],
|
||||
operation: [
|
||||
'upsert',
|
||||
],
|
||||
resource: ['record'],
|
||||
operation: ['upsert'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -573,12 +490,11 @@ export const recordFields: INodeProperties[] = [
|
||||
type: 'multiOptions',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTableFields',
|
||||
loadOptionsDependsOn: [
|
||||
'tableId',
|
||||
],
|
||||
loadOptionsDependsOn: ['tableId'],
|
||||
},
|
||||
default: [],
|
||||
description: 'Specify an array of field IDs that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'Specify an array of field IDs that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Use Field IDs',
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const reportOperations: INodeProperties[] = [
|
||||
{
|
||||
@@ -10,9 +8,7 @@ export const reportOperations: INodeProperties[] = [
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
resource: ['report'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -45,12 +41,8 @@ export const reportFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['report'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -63,12 +55,8 @@ export const reportFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['report'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description: 'The identifier of the report, unique to the table',
|
||||
@@ -84,12 +72,8 @@ export const reportFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
operation: [
|
||||
'run',
|
||||
],
|
||||
resource: ['report'],
|
||||
operation: ['run'],
|
||||
},
|
||||
},
|
||||
description: 'The table identifier',
|
||||
@@ -102,12 +86,8 @@ export const reportFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
operation: [
|
||||
'run',
|
||||
],
|
||||
resource: ['report'],
|
||||
operation: ['run'],
|
||||
},
|
||||
},
|
||||
description: 'The identifier of the report, unique to the table',
|
||||
@@ -118,12 +98,8 @@ export const reportFields: INodeProperties[] = [
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
operation: [
|
||||
'run',
|
||||
],
|
||||
resource: ['report'],
|
||||
operation: ['run'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
@@ -135,17 +111,11 @@ export const reportFields: INodeProperties[] = [
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'report',
|
||||
],
|
||||
operation: [
|
||||
'run',
|
||||
],
|
||||
resource: ['report'],
|
||||
operation: ['run'],
|
||||
},
|
||||
hide: {
|
||||
returnAll: [
|
||||
true,
|
||||
],
|
||||
returnAll: [true],
|
||||
},
|
||||
},
|
||||
typeOptions: {
|
||||
|
||||
Reference in New Issue
Block a user