From 87d1465a9b54f60057487f688a468a4837418219 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 22 Nov 2019 07:08:53 +0100 Subject: [PATCH] :zap: Smaller changes before merge --- .../credentials/FileMaker.credentials.ts | 2 +- .../nodes/FileMaker/FileMaker.node.ts | 57 +++++++++---------- .../nodes/FileMaker/GenericFunctions.ts | 14 ++--- 3 files changed, 35 insertions(+), 38 deletions(-) diff --git a/packages/nodes-base/credentials/FileMaker.credentials.ts b/packages/nodes-base/credentials/FileMaker.credentials.ts index 3d0e67b7ca..85835be04e 100644 --- a/packages/nodes-base/credentials/FileMaker.credentials.ts +++ b/packages/nodes-base/credentials/FileMaker.credentials.ts @@ -6,7 +6,7 @@ import { export class FileMaker implements ICredentialType { name = 'FileMaker'; - displayName = 'FileMaker'; + displayName = 'fileMaker'; properties = [ { displayName: 'Host', diff --git a/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts b/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts index 4a8f384573..92e2cfe88d 100644 --- a/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts +++ b/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts @@ -1,6 +1,5 @@ import {IExecuteFunctions} from 'n8n-core'; import { - IDataObject, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, @@ -51,19 +50,19 @@ export class FileMaker implements INodeType { default: 'record', options: [ /*{ - name: 'Login', - value: 'login', - }, - { - name: 'Logout', - value: 'logout', - },*/ + name: 'Login', + value: 'login', + }, + { + name: 'Logout', + value: 'logout', + },*/ { name: 'Find Records', value: 'find', }, { - name: 'get Records', + name: 'Get Records', value: 'records', }, { @@ -131,7 +130,7 @@ export class FileMaker implements INodeType { description: 'Internal Record ID returned by get (recordid)', }, { - displayName: 'offset', + displayName: 'Offset', name: 'offset', placeholder: '0', description: 'The record number of the first record in the range of records.', @@ -147,7 +146,7 @@ export class FileMaker implements INodeType { } }, { - displayName: 'limit', + displayName: 'Limit', name: 'limit', placeholder: '100', description: 'The maximum number of records that should be returned. If not specified, the default value is 100.', @@ -202,7 +201,7 @@ export class FileMaker implements INodeType { }, }, placeholder: 'Portals', - description: 'The portal result set to return. Use the portal object name or portal table name. If this parameter is omitted, the API will return all portal objects and records in the layout. For best performance, pass the portal object name or portal table name.', + description: 'The portal result set to return. Use the portal object name or portal
table name. If this parameter is omitted, the API will return all
portal objects and records in the layout. For best performance
, pass the portal object name or portal table name.', }, // ---------------------------------- // find/records @@ -294,7 +293,7 @@ export class FileMaker implements INodeType { ], }, { - displayName: 'Sort data ?', + displayName: 'Sort data?', name: 'setSort', type: 'boolean', default: false, @@ -557,21 +556,21 @@ export class FileMaker implements INodeType { // create/edit // ---------------------------------- /*{ - displayName: 'fieldData', - name: 'fieldData', - placeholder: '{"field1": "value", "field2": "value", ...}', - description: 'Additional fields to add.', - type: 'string', - default: '{}', - displayOptions: { - show: { - action: [ - 'create', - 'edit', - ], - }, - } - },*/ + displayName: 'fieldData', + name: 'fieldData', + placeholder: '{"field1": "value", "field2": "value", ...}', + description: 'Additional fields to add.', + type: 'string', + default: '{}', + displayOptions: { + show: { + action: [ + 'create', + 'edit', + ], + }, + } + },*/ { displayName: 'Mod Id', name: 'modId', @@ -779,7 +778,7 @@ export class FileMaker implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); if (credentials === undefined) { throw new Error('No credentials got returned!'); diff --git a/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts b/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts index f2d9ff9ca3..9c7ac7740f 100644 --- a/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts @@ -5,7 +5,6 @@ import { } from 'n8n-core'; import { - ICredentialDataDecryptedObject, IDataObject, } from 'n8n-workflow'; @@ -30,7 +29,7 @@ interface ScriptsOptions { */ export async function layoutsApiRequest(this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions): Promise { // tslint:disable-line:no-any const token = await getToken.call(this); - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); if (credentials === undefined) { throw new Error('No credentials got returned!'); @@ -65,7 +64,7 @@ export async function layoutsApiRequest(this: ILoadOptionsFunctions | IExecuteFu */ export async function getFields(this: ILoadOptionsFunctions): Promise { // tslint:disable-line:no-any const token = await getToken.call(this); - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); const layout = this.getCurrentNodeParameter('layout') as string; if (credentials === undefined) { @@ -102,7 +101,7 @@ export async function getFields(this: ILoadOptionsFunctions): Promise { // */ export async function getPortals(this: ILoadOptionsFunctions): Promise { // tslint:disable-line:no-any const token = await getToken.call(this); - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); const layout = this.getCurrentNodeParameter('layout') as string; if (credentials === undefined) { @@ -138,7 +137,7 @@ export async function getPortals(this: ILoadOptionsFunctions): Promise { // */ export async function getScripts(this: ILoadOptionsFunctions): Promise { // tslint:disable-line:no-any const token = await getToken.call(this); - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); const layout = this.getCurrentNodeParameter('layout') as string; if (credentials === undefined) { @@ -168,7 +167,7 @@ export async function getScripts(this: ILoadOptionsFunctions): Promise { // } export async function getToken(this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions): Promise { // tslint:disable-line:no-any - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); if (credentials === undefined) { throw new Error('No credentials got returned!'); } @@ -228,7 +227,7 @@ export async function getToken(this: ILoadOptionsFunctions | IExecuteFunctions | } export async function logout(this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions, token: string): Promise { // tslint:disable-line:no-any - const credentials = this.getCredentials('FileMaker'); + const credentials = this.getCredentials('fileMaker'); if (credentials === undefined) { throw new Error('No credentials got returned!'); } @@ -369,4 +368,3 @@ export function parseFields(this: IExecuteFunctions): object | null { // @ts-ignore return fieldData; } -