diff --git a/packages/node-dev/.eslintrc.js b/packages/node-dev/.eslintrc.js index cb1447036624f..cda3ce866a9ad 100644 --- a/packages/node-dev/.eslintrc.js +++ b/packages/node-dev/.eslintrc.js @@ -10,7 +10,6 @@ module.exports = { 'templates/**', // TODO: remove this ], rules: { - 'import/order': 'off', // TODO: remove this '@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }], 'n8n-local-rules/no-plain-errors': 'off', }, diff --git a/packages/node-dev/commands/build.ts b/packages/node-dev/commands/build.ts index 5a78bf27ca11e..ce42baf7ddcea 100644 --- a/packages/node-dev/commands/build.ts +++ b/packages/node-dev/commands/build.ts @@ -1,6 +1,6 @@ -import { Container } from 'typedi'; import { Command, Flags } from '@oclif/core'; import { InstanceSettings } from 'n8n-core'; +import { Container } from 'typedi'; import type { IBuildOptions } from '../src'; import { buildFiles } from '../src'; diff --git a/packages/node-dev/src/Build.ts b/packages/node-dev/src/Build.ts index 8e3efbc81401a..de6d83a2cf67e 100644 --- a/packages/node-dev/src/Build.ts +++ b/packages/node-dev/src/Build.ts @@ -1,14 +1,14 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import glob from 'fast-glob'; import { spawn } from 'child_process'; +import glob from 'fast-glob'; import { copyFile, mkdir, readFile, writeFile } from 'fs/promises'; +import { InstanceSettings } from 'n8n-core'; +import { jsonParse } from 'n8n-workflow'; import { join, dirname, resolve as resolvePath } from 'path'; -import { Container } from 'typedi'; import { file as tmpFile } from 'tmp-promise'; +import { Container } from 'typedi'; -import { jsonParse } from 'n8n-workflow'; -import { InstanceSettings } from 'n8n-core'; import type { IBuildOptions } from './Interfaces'; /** diff --git a/packages/nodes-base/.eslintrc.js b/packages/nodes-base/.eslintrc.js index fb4629d9ded2f..e99abcf38fff4 100644 --- a/packages/nodes-base/.eslintrc.js +++ b/packages/nodes-base/.eslintrc.js @@ -15,7 +15,6 @@ module.exports = { eqeqeq: 'warn', 'id-denylist': 'warn', 'import/extensions': 'warn', - 'import/order': 'warn', 'prefer-spread': 'warn', 'import/no-extraneous-dependencies': 'warn', diff --git a/packages/nodes-base/credentials/Aws.credentials.ts b/packages/nodes-base/credentials/Aws.credentials.ts index bb7b30d4cf041..9e968fdce5a30 100644 --- a/packages/nodes-base/credentials/Aws.credentials.ts +++ b/packages/nodes-base/credentials/Aws.credentials.ts @@ -1,6 +1,5 @@ import type { Request } from 'aws4'; import { sign } from 'aws4'; - import type { ICredentialDataDecryptedObject, ICredentialTestRequest, diff --git a/packages/nodes-base/credentials/CiscoSecureEndpointApi.credentials.ts b/packages/nodes-base/credentials/CiscoSecureEndpointApi.credentials.ts index 7ffac617797a2..99e4c06f4c020 100644 --- a/packages/nodes-base/credentials/CiscoSecureEndpointApi.credentials.ts +++ b/packages/nodes-base/credentials/CiscoSecureEndpointApi.credentials.ts @@ -1,3 +1,4 @@ +import axios from 'axios'; import type { ICredentialDataDecryptedObject, ICredentialTestRequest, @@ -6,8 +7,6 @@ import type { INodeProperties, } from 'n8n-workflow'; -import axios from 'axios'; - export class CiscoSecureEndpointApi implements ICredentialType { name = 'ciscoSecureEndpointApi'; diff --git a/packages/nodes-base/credentials/GhostAdminApi.credentials.ts b/packages/nodes-base/credentials/GhostAdminApi.credentials.ts index 7c85f425274de..5e1040958e9b4 100644 --- a/packages/nodes-base/credentials/GhostAdminApi.credentials.ts +++ b/packages/nodes-base/credentials/GhostAdminApi.credentials.ts @@ -1,3 +1,4 @@ +import jwt from 'jsonwebtoken'; import type { ICredentialDataDecryptedObject, ICredentialTestRequest, @@ -6,7 +7,6 @@ import type { INodeProperties, } from 'n8n-workflow'; -import jwt from 'jsonwebtoken'; export class GhostAdminApi implements ICredentialType { name = 'ghostAdminApi'; diff --git a/packages/nodes-base/credentials/GoogleApi.credentials.ts b/packages/nodes-base/credentials/GoogleApi.credentials.ts index 96fa9e5f40711..38df5ac694a9f 100644 --- a/packages/nodes-base/credentials/GoogleApi.credentials.ts +++ b/packages/nodes-base/credentials/GoogleApi.credentials.ts @@ -1,3 +1,7 @@ +import type { AxiosRequestConfig } from 'axios'; +import axios from 'axios'; +import jwt from 'jsonwebtoken'; +import moment from 'moment-timezone'; import type { ICredentialDataDecryptedObject, ICredentialType, @@ -6,14 +10,6 @@ import type { Icon, } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -import jwt from 'jsonwebtoken'; - -import type { AxiosRequestConfig } from 'axios'; - -import axios from 'axios'; - export class GoogleApi implements ICredentialType { name = 'googleApi'; diff --git a/packages/nodes-base/credentials/MySql.credentials.ts b/packages/nodes-base/credentials/MySql.credentials.ts index 73bff49be4b87..faea3a6f0f0d2 100644 --- a/packages/nodes-base/credentials/MySql.credentials.ts +++ b/packages/nodes-base/credentials/MySql.credentials.ts @@ -1,4 +1,5 @@ import type { ICredentialType, INodeProperties } from 'n8n-workflow'; + import { sshTunnelProperties } from '@utils/sshTunnel.properties'; export class MySql implements ICredentialType { diff --git a/packages/nodes-base/credentials/Postgres.credentials.ts b/packages/nodes-base/credentials/Postgres.credentials.ts index a562245b2966b..227ad7ce276ad 100644 --- a/packages/nodes-base/credentials/Postgres.credentials.ts +++ b/packages/nodes-base/credentials/Postgres.credentials.ts @@ -1,4 +1,5 @@ import type { ICredentialType, INodeProperties } from 'n8n-workflow'; + import { sshTunnelProperties } from '@utils/sshTunnel.properties'; export class Postgres implements ICredentialType { diff --git a/packages/nodes-base/credentials/SeaTableApi.credentials.ts b/packages/nodes-base/credentials/SeaTableApi.credentials.ts index 1481548510ceb..df17f6ae25e1d 100644 --- a/packages/nodes-base/credentials/SeaTableApi.credentials.ts +++ b/packages/nodes-base/credentials/SeaTableApi.credentials.ts @@ -1,6 +1,5 @@ -import type { ICredentialType, INodeProperties, INodePropertyOptions } from 'n8n-workflow'; - import moment from 'moment-timezone'; +import type { ICredentialType, INodeProperties, INodePropertyOptions } from 'n8n-workflow'; // Get options for timezones const timezones: INodePropertyOptions[] = moment.tz diff --git a/packages/nodes-base/credentials/test/Aws.credentials.test.ts b/packages/nodes-base/credentials/test/Aws.credentials.test.ts index 2f7c25b8d96b3..1874758ecd4a1 100644 --- a/packages/nodes-base/credentials/test/Aws.credentials.test.ts +++ b/packages/nodes-base/credentials/test/Aws.credentials.test.ts @@ -1,5 +1,6 @@ import { sign, type Request } from 'aws4'; import type { IHttpRequestOptions } from 'n8n-workflow'; + import { Aws, type AwsCredentialsType } from '../Aws.credentials'; jest.mock('aws4', () => ({ diff --git a/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts b/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts index 068cf0b902d12..79384895692fd 100644 --- a/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts +++ b/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts @@ -7,17 +7,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { - actionNetworkApiRequest, - adjustEventPayload, - adjustPersonPayload, - adjustPetitionPayload, - handleListing, - makeOsdiLink, - resourceLoaders, - simplifyResponse, -} from './GenericFunctions'; - import { attendanceFields, attendanceOperations, @@ -34,7 +23,16 @@ import { tagFields, tagOperations, } from './descriptions'; - +import { + actionNetworkApiRequest, + adjustEventPayload, + adjustPersonPayload, + adjustPetitionPayload, + handleListing, + makeOsdiLink, + resourceLoaders, + simplifyResponse, +} from './GenericFunctions'; import type { AllFieldsUi, EmailAddressUi, diff --git a/packages/nodes-base/nodes/ActionNetwork/GenericFunctions.ts b/packages/nodes-base/nodes/ActionNetwork/GenericFunctions.ts index a9545ffe80487..55167ea7ed091 100644 --- a/packages/nodes-base/nodes/ActionNetwork/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ActionNetwork/GenericFunctions.ts @@ -1,3 +1,5 @@ +import flow from 'lodash/flow'; +import omit from 'lodash/omit'; import type { IDataObject, IExecuteFunctions, @@ -6,9 +8,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; -import flow from 'lodash/flow'; -import omit from 'lodash/omit'; - import type { AllFieldsUi, FieldWithPrimaryField, diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts index ca7ea31c3d7ca..8468af3a7fb56 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts @@ -10,35 +10,23 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import type { IProduct } from './GenericFunctions'; -import { activeCampaignApiRequest, activeCampaignApiRequestAllItems } from './GenericFunctions'; - +import { accountContactFields, accountContactOperations } from './AccountContactDescription'; +import { accountFields, accountOperations } from './AccountDescription'; +import { connectionFields, connectionOperations } from './ConnectionDescription'; import { contactFields, contactOperations } from './ContactDescription'; - +import { contactListFields, contactListOperations } from './ContactListDescription'; +import { contactTagFields, contactTagOperations } from './ContactTagDescription'; import { dealFields, dealOperations } from './DealDescription'; - -import { ecomOrderFields, ecomOrderOperations } from './EcomOrderDescription'; - import { ecomCustomerFields, ecomCustomerOperations } from './EcomCustomerDescription'; - +import { ecomOrderFields, ecomOrderOperations } from './EcomOrderDescription'; import { ecomOrderProductsFields, ecomOrderProductsOperations, } from './EcomOrderProductsDescription'; - -import { connectionFields, connectionOperations } from './ConnectionDescription'; - -import { accountFields, accountOperations } from './AccountDescription'; - -import { tagFields, tagOperations } from './TagDescription'; - -import { accountContactFields, accountContactOperations } from './AccountContactDescription'; - -import { contactListFields, contactListOperations } from './ContactListDescription'; - -import { contactTagFields, contactTagOperations } from './ContactTagDescription'; - +import { activeCampaignApiRequest, activeCampaignApiRequestAllItems } from './GenericFunctions'; +import type { IProduct } from './GenericFunctions'; import { listFields, listOperations } from './ListDescription'; +import { tagFields, tagOperations } from './TagDescription'; interface CustomProperty { name: string; diff --git a/packages/nodes-base/nodes/ActiveCampaign/DealDescription.ts b/packages/nodes-base/nodes/ActiveCampaign/DealDescription.ts index ac849a9ef5d9e..3e9529f8f193f 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/DealDescription.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/DealDescription.ts @@ -1,7 +1,6 @@ import type { INodeProperties } from 'n8n-workflow'; import { allCurrencies } from './currencies'; - import { activeCampaignDefaultGetAllProperties } from './GenericFunctions'; export const dealOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/ActiveCampaign/EcomOrderDescription.ts b/packages/nodes-base/nodes/ActiveCampaign/EcomOrderDescription.ts index cf7833bd928a6..c7a73f28b0047 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/EcomOrderDescription.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/EcomOrderDescription.ts @@ -1,7 +1,6 @@ import type { INodeProperties } from 'n8n-workflow'; import { allCurrencies } from './currencies'; - import { activeCampaignDefaultGetAllProperties } from './GenericFunctions'; export const ecomOrderOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Adalo/Adalo.node.ts b/packages/nodes-base/nodes/Adalo/Adalo.node.ts index 1865f16be530e..5c0ae35d463a1 100644 --- a/packages/nodes-base/nodes/Adalo/Adalo.node.ts +++ b/packages/nodes-base/nodes/Adalo/Adalo.node.ts @@ -6,6 +6,7 @@ import { type INodeType, type INodeTypeDescription, } from 'n8n-workflow'; + import { collectionFields } from './CollectionDescription'; import type { FieldsUiValues } from './types'; diff --git a/packages/nodes-base/nodes/Affinity/Affinity.node.ts b/packages/nodes-base/nodes/Affinity/Affinity.node.ts index d70d908704545..21fecbaab612b 100644 --- a/packages/nodes-base/nodes/Affinity/Affinity.node.ts +++ b/packages/nodes-base/nodes/Affinity/Affinity.node.ts @@ -10,17 +10,11 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { affinityApiRequest, affinityApiRequestAllItems } from './GenericFunctions'; - -import { organizationFields, organizationOperations } from './OrganizationDescription'; - -import { personFields, personOperations } from './PersonDescription'; - import { listFields, listOperations } from './ListDescription'; - import { listEntryFields, listEntryOperations } from './ListEntryDescription'; - +import { organizationFields, organizationOperations } from './OrganizationDescription'; import type { IOrganization } from './OrganizationInterface'; - +import { personFields, personOperations } from './PersonDescription'; import type { IPerson } from './PersonInterface'; export class Affinity implements INodeType { diff --git a/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts b/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts index 3e620b0b401fa..5762a81a306d2 100644 --- a/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts +++ b/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts @@ -7,14 +7,12 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, jsonParse, NodeOperationError } from 'n8n-workflow'; -import { contactFields, contactOperations } from './ContactDescription'; - import { companyFields, companyOperations } from './CompanyDescription'; - -import { dealFields, dealOperations } from './DealDescription'; - +import { contactFields, contactOperations } from './ContactDescription'; import type { IContact, IContactUpdate } from './ContactInterface'; - +import { dealFields, dealOperations } from './DealDescription'; +import type { IDeal } from './DealInterface'; +import type { IFilter, ISearchConditions } from './FilterInterface'; import { agileCrmApiRequest, agileCrmApiRequestAllItems, @@ -24,10 +22,6 @@ import { validateJSON, } from './GenericFunctions'; -import type { IDeal } from './DealInterface'; - -import type { IFilter, ISearchConditions } from './FilterInterface'; - export class AgileCrm implements INodeType { description: INodeTypeDescription = { displayName: 'Agile CRM', diff --git a/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts b/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts index f308b94c90bc0..204d5dd0600f6 100644 --- a/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts @@ -10,7 +10,6 @@ import type { import { NodeApiError } from 'n8n-workflow'; import type { IContactUpdate } from './ContactInterface'; - import type { IFilterRules, ISearchConditions } from './FilterInterface'; export async function agileCrmApiRequest( diff --git a/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts b/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts index 59b4618d88d24..5a3cec630d4cf 100644 --- a/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts +++ b/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import { NodeOperationError, NodeConnectionType, @@ -9,8 +10,6 @@ import { AI_TRANSFORM_JS_CODE, } from 'n8n-workflow'; -import set from 'lodash/set'; - import { JavaScriptSandbox } from '../Code/JavaScriptSandbox'; import { getSandboxContext } from '../Code/Sandbox'; import { standardizeOutput } from '../Code/utils'; diff --git a/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts b/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts index d5235546d7487..8877c5763e514 100644 --- a/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts +++ b/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IPollFunctions, IDataObject, @@ -7,7 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; import type { IRecord } from './v1/GenericFunctions'; import { apiRequestAllItems, downloadRecordAttachments } from './v1/GenericFunctions'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/base/getMany.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/base/getMany.test.ts index f535def3cb065..d3c6a6662fc51 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/base/getMany.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/base/getMany.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as getMany from '../../../../v2/actions/base/getMany.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/base/getSchema.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/base/getSchema.test.ts index df3b8ed930470..4f6bda2a898a7 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/base/getSchema.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/base/getSchema.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as getSchema from '../../../../v2/actions/base/getSchema.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/helpers.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/helpers.ts index 1edd17cd16aa0..80855886eadbf 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/helpers.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/helpers.ts @@ -1,7 +1,6 @@ -import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; - import { get } from 'lodash'; import { constructExecutionMetaData } from 'n8n-core'; +import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; export const node: INode = { id: '11', diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/record/create.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/record/create.test.ts index 1b17b25ea7711..85f5d0db7eb33 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/record/create.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/record/create.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as create from '../../../../v2/actions/record/create.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/record/deleteRecord.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/record/deleteRecord.test.ts index 2ea8b11d75ca5..36e8e828e6141 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/record/deleteRecord.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/record/deleteRecord.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as deleteRecord from '../../../../v2/actions/record/deleteRecord.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/record/get.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/record/get.test.ts index 3d8c709abd450..eb9a612cf6a5d 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/record/get.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/record/get.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as get from '../../../../v2/actions/record/get.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/record/search.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/record/search.test.ts index 83e2bab61bf7d..b5c12159073cc 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/record/search.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/record/search.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as search from '../../../../v2/actions/record/search.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/test/v2/node/record/update.test.ts b/packages/nodes-base/nodes/Airtable/test/v2/node/record/update.test.ts index afe736c914441..89cdc0d9ef50f 100644 --- a/packages/nodes-base/nodes/Airtable/test/v2/node/record/update.test.ts +++ b/packages/nodes-base/nodes/Airtable/test/v2/node/record/update.test.ts @@ -1,7 +1,6 @@ import nock from 'nock'; import * as update from '../../../../v2/actions/record/update.operation'; - import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction } from '../helpers'; diff --git a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts index 526894110a5a6..27214c61926a8 100644 --- a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts +++ b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts @@ -9,10 +9,10 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { oldVersionNotice } from '../../../utils/descriptions'; -import { generatePairedItemData } from '../../../utils/utilities'; import type { IRecord } from './GenericFunctions'; import { apiRequest, apiRequestAllItems, downloadRecordAttachments } from './GenericFunctions'; +import { oldVersionNotice } from '../../../utils/descriptions'; +import { generatePairedItemData } from '../../../utils/utilities'; const versionDescription: INodeTypeDescription = { displayName: 'Airtable', diff --git a/packages/nodes-base/nodes/Airtable/v2/AirtableV2.node.ts b/packages/nodes-base/nodes/Airtable/v2/AirtableV2.node.ts index 4395f690ebc69..3c8afb0d80e63 100644 --- a/packages/nodes-base/nodes/Airtable/v2/AirtableV2.node.ts +++ b/packages/nodes-base/nodes/Airtable/v2/AirtableV2.node.ts @@ -5,8 +5,8 @@ import type { INodeTypeBaseDescription, } from 'n8n-workflow'; -import { versionDescription } from './actions/versionDescription'; import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; import { listSearch, loadOptions, resourceMapping } from './methods'; export class AirtableV2 implements INodeType { diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/base/getMany.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/base/getMany.operation.ts index da5f2f528e0ac..5272be1a2a7e3 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/base/getMany.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/base/getMany.operation.ts @@ -4,6 +4,7 @@ import type { INodeProperties, IExecuteFunctions, } from 'n8n-workflow'; + import { generatePairedItemData, updateDisplayOptions, diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts index aa791f7b64877..b687cac225ada 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts @@ -5,10 +5,11 @@ import type { IExecuteFunctions, NodeApiError, } from 'n8n-workflow'; + import { updateDisplayOptions, wrapData } from '../../../../../utils/utilities'; +import { processAirtableError } from '../../helpers/utils'; import { apiRequest } from '../../transport'; import { baseRLC } from '../common.descriptions'; -import { processAirtableError } from '../../helpers/utils'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/Record.resource.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/Record.resource.ts index f9b5287f4b8e1..d061808b7e22a 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/Record.resource.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/Record.resource.ts @@ -1,5 +1,4 @@ import type { INodeProperties } from 'n8n-workflow'; -import { baseRLC, tableRLC } from '../common.descriptions'; import * as create from './create.operation'; import * as deleteRecord from './deleteRecord.operation'; @@ -7,6 +6,7 @@ import * as get from './get.operation'; import * as search from './search.operation'; import * as update from './update.operation'; import * as upsert from './upsert.operation'; +import { baseRLC, tableRLC } from '../common.descriptions'; export { create, deleteRecord, get, search, update, upsert }; diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts index 758c3b7a2ffc1..2ae70b5d7dcdd 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts @@ -5,10 +5,11 @@ import type { IExecuteFunctions, NodeApiError, } from 'n8n-workflow'; + import { updateDisplayOptions, wrapData } from '../../../../../utils/utilities'; +import { processAirtableError, removeIgnored } from '../../helpers/utils'; import { apiRequest } from '../../transport'; import { insertUpdateOptions } from '../common.descriptions'; -import { processAirtableError, removeIgnored } from '../../helpers/utils'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts index cbbf12ba3c5cc..cc8ba894c08de 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts @@ -5,9 +5,10 @@ import type { NodeApiError, IExecuteFunctions, } from 'n8n-workflow'; + import { updateDisplayOptions, wrapData } from '../../../../../utils/utilities'; -import { apiRequest } from '../../transport'; import { processAirtableError } from '../../helpers/utils'; +import { apiRequest } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts index 73a9933076336..82a6edcc9523a 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts @@ -5,10 +5,11 @@ import type { NodeApiError, IExecuteFunctions, } from 'n8n-workflow'; + import { updateDisplayOptions, wrapData } from '../../../../../utils/utilities'; -import { apiRequest, downloadRecordAttachments } from '../../transport'; -import { flattenOutput, processAirtableError } from '../../helpers/utils'; import type { IRecord } from '../../helpers/interfaces'; +import { flattenOutput, processAirtableError } from '../../helpers/utils'; +import { apiRequest, downloadRecordAttachments } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts index 29f753794f229..ae698d8a7ac6f 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts @@ -4,10 +4,11 @@ import type { INodeProperties, IExecuteFunctions, } from 'n8n-workflow'; + import { generatePairedItemData, updateDisplayOptions } from '../../../../../utils/utilities'; -import { apiRequest, apiRequestAllItems, downloadRecordAttachments } from '../../transport'; import type { IRecord } from '../../helpers/interfaces'; import { flattenOutput } from '../../helpers/utils'; +import { apiRequest, apiRequestAllItems, downloadRecordAttachments } from '../../transport'; import { viewRLC } from '../common.descriptions'; const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts index d2c4172dd53d1..de3a56ead8485 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts @@ -5,10 +5,11 @@ import type { NodeApiError, IExecuteFunctions, } from 'n8n-workflow'; + import { updateDisplayOptions, wrapData } from '../../../../../utils/utilities'; -import { apiRequestAllItems, batchUpdate } from '../../transport'; -import { findMatches, processAirtableError, removeIgnored } from '../../helpers/utils'; import type { UpdateRecord } from '../../helpers/interfaces'; +import { findMatches, processAirtableError, removeIgnored } from '../../helpers/utils'; +import { apiRequestAllItems, batchUpdate } from '../../transport'; import { insertUpdateOptions } from '../common.descriptions'; const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts index e6266480cee97..0bc0c28cac0b7 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts @@ -5,10 +5,11 @@ import type { IExecuteFunctions, NodeApiError, } from 'n8n-workflow'; + import { updateDisplayOptions, wrapData } from '../../../../../utils/utilities'; -import { apiRequest, apiRequestAllItems, batchUpdate } from '../../transport'; -import { processAirtableError, removeIgnored } from '../../helpers/utils'; import type { UpdateRecord } from '../../helpers/interfaces'; +import { processAirtableError, removeIgnored } from '../../helpers/utils'; +import { apiRequest, apiRequestAllItems, batchUpdate } from '../../transport'; import { insertUpdateOptions } from '../common.descriptions'; const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/router.ts b/packages/nodes-base/nodes/Airtable/v2/actions/router.ts index ac1216a680474..6bc659f27595f 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/router.ts @@ -1,9 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { AirtableType } from './node.type'; -import * as record from './record/Record.resource'; import * as base from './base/Base.resource'; +import type { AirtableType } from './node.type'; +import * as record from './record/Record.resource'; export async function router(this: IExecuteFunctions): Promise { let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts index f2ecef8726b24..9bbbd7345e4f1 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts @@ -1,8 +1,8 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import * as record from './record/Record.resource'; import * as base from './base/Base.resource'; +import * as record from './record/Record.resource'; export const versionDescription: INodeTypeDescription = { displayName: 'Airtable', diff --git a/packages/nodes-base/nodes/Airtable/v2/helpers/utils.ts b/packages/nodes-base/nodes/Airtable/v2/helpers/utils.ts index 0daf33b997d52..11e14a5bd8f31 100644 --- a/packages/nodes-base/nodes/Airtable/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Airtable/v2/helpers/utils.ts @@ -1,5 +1,6 @@ -import { ApplicationError, type IDataObject, type NodeApiError } from 'n8n-workflow'; import set from 'lodash/set'; +import { ApplicationError, type IDataObject, type NodeApiError } from 'n8n-workflow'; + import type { UpdateRecord } from './interfaces'; export function removeIgnored(data: IDataObject, ignore: string | string[]) { diff --git a/packages/nodes-base/nodes/Airtable/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Airtable/v2/methods/listSearch.ts index 10f2d89c83948..b9bca910daa4f 100644 --- a/packages/nodes-base/nodes/Airtable/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Airtable/v2/methods/listSearch.ts @@ -5,6 +5,7 @@ import type { INodeListSearchResult, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { apiRequest } from '../transport'; export async function baseSearch( diff --git a/packages/nodes-base/nodes/Airtable/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Airtable/v2/methods/loadOptions.ts index 79aaabf1ef1a9..9d7120ec2ca06 100644 --- a/packages/nodes-base/nodes/Airtable/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Airtable/v2/methods/loadOptions.ts @@ -1,5 +1,6 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { apiRequest } from '../transport'; export async function getColumns(this: ILoadOptionsFunctions): Promise { diff --git a/packages/nodes-base/nodes/Airtable/v2/methods/resourceMapping.ts b/packages/nodes-base/nodes/Airtable/v2/methods/resourceMapping.ts index e99140d251278..c0d4934c3b4e6 100644 --- a/packages/nodes-base/nodes/Airtable/v2/methods/resourceMapping.ts +++ b/packages/nodes-base/nodes/Airtable/v2/methods/resourceMapping.ts @@ -7,6 +7,7 @@ import type { ResourceMapperFields, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { apiRequest } from '../transport'; type AirtableSchema = { diff --git a/packages/nodes-base/nodes/Airtable/v2/transport/index.ts b/packages/nodes-base/nodes/Airtable/v2/transport/index.ts index 95d2c3c1f85a3..6d26a24118479 100644 --- a/packages/nodes-base/nodes/Airtable/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Airtable/v2/transport/index.ts @@ -10,6 +10,7 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { ApplicationError } from 'n8n-workflow'; + import type { IAttachment, IRecord } from '../helpers/interfaces'; import { flattenOutput } from '../helpers/utils'; diff --git a/packages/nodes-base/nodes/Amqp/Amqp.node.ts b/packages/nodes-base/nodes/Amqp/Amqp.node.ts index ce711d9695406..1283558d370e4 100644 --- a/packages/nodes-base/nodes/Amqp/Amqp.node.ts +++ b/packages/nodes-base/nodes/Amqp/Amqp.node.ts @@ -1,6 +1,3 @@ -import type { Connection, ContainerOptions, Dictionary, EventContext, Sender } from 'rhea'; -import { create_container } from 'rhea'; - import type { IExecuteFunctions, IDataObject, @@ -13,6 +10,8 @@ import type { ICredentialDataDecryptedObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import type { Connection, ContainerOptions, Dictionary, EventContext, Sender } from 'rhea'; +import { create_container } from 'rhea'; async function checkIfCredentialsValid( credentials: IDataObject, diff --git a/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts b/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts index 249391fd9dbfc..bd88bcbc660ac 100644 --- a/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts +++ b/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts @@ -1,6 +1,3 @@ -import type { ContainerOptions, EventContext, Message, ReceiverOptions } from 'rhea'; -import { create_container } from 'rhea'; - import type { ITriggerFunctions, IDataObject, @@ -11,6 +8,8 @@ import type { IRun, } from 'n8n-workflow'; import { deepCopy, jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import type { ContainerOptions, EventContext, Message, ReceiverOptions } from 'rhea'; +import { create_container } from 'rhea'; export class AmqpTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Asana/Asana.node.ts b/packages/nodes-base/nodes/Asana/Asana.node.ts index c5d3401674f30..72b93594f3718 100644 --- a/packages/nodes-base/nodes/Asana/Asana.node.ts +++ b/packages/nodes-base/nodes/Asana/Asana.node.ts @@ -1,3 +1,5 @@ +import { snakeCase } from 'change-case'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -10,9 +12,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -import { snakeCase } from 'change-case'; import { asanaApiRequest, asanaApiRequestAllItems, diff --git a/packages/nodes-base/nodes/Asana/GenericFunctions.ts b/packages/nodes-base/nodes/Asana/GenericFunctions.ts index 72492ecb6c4f7..73623701adb95 100644 --- a/packages/nodes-base/nodes/Asana/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Asana/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -8,8 +9,6 @@ import type { INodePropertyOptions, } from 'n8n-workflow'; -import get from 'lodash/get'; - /** * Make an API request to Asana * diff --git a/packages/nodes-base/nodes/Automizy/Automizy.node.ts b/packages/nodes-base/nodes/Automizy/Automizy.node.ts index 38c53c4f1f31b..24c9f9c6d67e8 100644 --- a/packages/nodes-base/nodes/Automizy/Automizy.node.ts +++ b/packages/nodes-base/nodes/Automizy/Automizy.node.ts @@ -10,10 +10,8 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { automizyApiRequest, automizyApiRequestAllItems } from './GenericFunctions'; - import { contactFields, contactOperations } from './ContactDescription'; - +import { automizyApiRequest, automizyApiRequestAllItems } from './GenericFunctions'; import { listFields, listOperations } from './ListDescription'; export class Automizy implements INodeType { diff --git a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts index 069e2dd03fecc..d3b123761fc05 100644 --- a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts +++ b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts @@ -10,14 +10,10 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { autopilotApiRequest, autopilotApiRequestAllItems } from './GenericFunctions'; - import { contactFields, contactOperations } from './ContactDescription'; - import { contactJourneyFields, contactJourneyOperations } from './ContactJourneyDescription'; - import { contactListFields, contactListOperations } from './ContactListDescription'; - +import { autopilotApiRequest, autopilotApiRequestAllItems } from './GenericFunctions'; import { listFields, listOperations } from './ListDescription'; export class Autopilot implements INodeType { diff --git a/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts b/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts index a27ff7c1a56c1..29460f7851c58 100644 --- a/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts +++ b/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IHookFunctions, IWebhookFunctions, @@ -8,7 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { autopilotApiRequest } from './GenericFunctions'; export class AutopilotTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts b/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts index 1aee04d83b722..535233bbc9d70 100644 --- a/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IHookFunctions, IWebhookFunctions, @@ -10,7 +11,6 @@ import type { } from 'n8n-workflow'; import { jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; import { awsApiRequestSOAP } from './GenericFunctions'; export class AwsSnsTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts index 25abdb7669ac9..80047f39a0dd0 100644 --- a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts +++ b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts @@ -8,7 +8,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { certificateFields, certificateOperations } from './CertificateDescription'; - import { awsApiRequestAllItems, awsApiRequestREST } from './GenericFunctions'; export class AwsCertificateManager implements INodeType { diff --git a/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts index bff183fcee42e..0a68f30c51848 100644 --- a/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts @@ -1,5 +1,4 @@ import get from 'lodash/get'; - import type { IDataObject, IExecuteFunctions, diff --git a/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts index 7f327518a0116..bbdf8138634c4 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts @@ -1,5 +1,3 @@ -import { parseString } from 'xml2js'; - import type { IExecuteFunctions, IHookFunctions, @@ -8,6 +6,7 @@ import type { IHttpRequestOptions, IHttpRequestMethods, } from 'n8n-workflow'; +import { parseString } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/Comprehend/test/AwsComprehend.node.test.ts b/packages/nodes-base/nodes/Aws/Comprehend/test/AwsComprehend.node.test.ts index 0215ddc6dac35..ecedd706728b3 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/test/AwsComprehend.node.test.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/test/AwsComprehend.node.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { getWorkflowFilenames, initBinaryDataService, testWorkflows } from '@test/nodes/Helpers'; const workflows = getWorkflowFilenames(__dirname); diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts index cecc3aca46c4d..57346fbc8710e 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts @@ -11,9 +11,7 @@ import { } from 'n8n-workflow'; import { awsApiRequest, awsApiRequestAllItems } from './GenericFunctions'; - import { itemFields, itemOperations } from './ItemDescription'; - import type { FieldsUiValues, IAttributeNameUi, @@ -22,7 +20,6 @@ import type { IRequestBody, PutItemUi, } from './types'; - import { adjustExpressionAttributeName, adjustExpressionAttributeValues, diff --git a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts index fbc781fb6ff86..ab80b67e9ee01 100644 --- a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts +++ b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts @@ -11,13 +11,11 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { awsApiRequestSOAP, awsApiRequestSOAPAllItems } from './GenericFunctions'; - -import { loadBalancerFields, loadBalancerOperations } from './LoadBalancerDescription'; - import { listenerCertificateFields, listenerCertificateOperations, } from './ListenerCertificateDescription'; +import { loadBalancerFields, loadBalancerOperations } from './LoadBalancerDescription'; export class AwsElb implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts index 51a88f61bafb0..00f4bbdc69299 100644 --- a/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts @@ -1,7 +1,4 @@ import get from 'lodash/get'; - -import { parseString } from 'xml2js'; - import type { IDataObject, IExecuteFunctions, @@ -13,6 +10,7 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; +import { parseString } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/GenericFunctions.ts index 5c65217e9bce8..18a268f0e3fd5 100644 --- a/packages/nodes-base/nodes/Aws/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/GenericFunctions.ts @@ -1,5 +1,3 @@ -import { parseString as parseXml } from 'xml2js'; - import type { IExecuteFunctions, IHookFunctions, @@ -10,6 +8,7 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; +import { parseString as parseXml } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts index b0992162ca537..db25a8b6437c9 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts @@ -1,7 +1,5 @@ +import { pascalCase } from 'change-case'; import get from 'lodash/get'; - -import { parseString } from 'xml2js'; - import type { IDataObject, IExecuteFunctions, @@ -11,8 +9,7 @@ import type { IHttpRequestOptions, IHttpRequestMethods, } from 'n8n-workflow'; - -import { pascalCase } from 'change-case'; +import { parseString } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/Rekognition/test/AwsRekognition.node.test.ts b/packages/nodes-base/nodes/Aws/Rekognition/test/AwsRekognition.node.test.ts index e9fe6debac0b5..49b1465307f98 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/test/AwsRekognition.node.test.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/test/AwsRekognition.node.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { getWorkflowFilenames, testWorkflows } from '@test/nodes/Helpers'; const responseLabels = [ diff --git a/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts b/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts index 50a4c1738a62d..132cd109c938c 100644 --- a/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts @@ -2,7 +2,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow' import { VersionedNodeType } from 'n8n-workflow'; import { AwsS3V1 } from './V1/AwsS3V1.node'; - import { AwsS3V2 } from './V2/AwsS3V2.node'; export class AwsS3 extends VersionedNodeType { diff --git a/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts b/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts index fa3879b71db0d..d467460d89505 100644 --- a/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts @@ -1,8 +1,5 @@ -import { createHash } from 'crypto'; import { paramCase, snakeCase } from 'change-case'; - -import { Builder } from 'xml2js'; - +import { createHash } from 'crypto'; import type { IDataObject, IExecuteFunctions, @@ -12,13 +9,11 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import { Builder } from 'xml2js'; import { bucketFields, bucketOperations } from './BucketDescription'; - -import { folderFields, folderOperations } from './FolderDescription'; - import { fileFields, fileOperations } from './FileDescription'; - +import { folderFields, folderOperations } from './FolderDescription'; import { awsApiRequestREST, awsApiRequestSOAP, diff --git a/packages/nodes-base/nodes/Aws/S3/V1/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/S3/V1/GenericFunctions.ts index 06700d283df0b..947a0db801bd5 100644 --- a/packages/nodes-base/nodes/Aws/S3/V1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/S3/V1/GenericFunctions.ts @@ -1,7 +1,4 @@ import get from 'lodash/get'; - -import { parseString } from 'xml2js'; - import type { IDataObject, IExecuteFunctions, @@ -11,6 +8,7 @@ import type { IHttpRequestOptions, IHttpRequestMethods, } from 'n8n-workflow'; +import { parseString } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts b/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts index 34cdef556aa80..bd08de167fcab 100644 --- a/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts @@ -1,9 +1,5 @@ -import { createHash } from 'crypto'; -import type { Readable } from 'stream'; import { paramCase, snakeCase } from 'change-case'; - -import { Builder } from 'xml2js'; - +import { createHash } from 'crypto'; import type { IDataObject, IExecuteFunctions, @@ -13,13 +9,12 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import type { Readable } from 'stream'; +import { Builder } from 'xml2js'; import { bucketFields, bucketOperations } from './BucketDescription'; - -import { folderFields, folderOperations } from './FolderDescription'; - import { fileFields, fileOperations } from './FileDescription'; - +import { folderFields, folderOperations } from './FolderDescription'; import { awsApiRequestREST, awsApiRequestRESTAllItems } from './GenericFunctions'; // Minimum size 5MB for multipart upload in S3 diff --git a/packages/nodes-base/nodes/Aws/S3/V2/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/S3/V2/GenericFunctions.ts index c4e47a8af36eb..ede6895e43d1b 100644 --- a/packages/nodes-base/nodes/Aws/S3/V2/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/S3/V2/GenericFunctions.ts @@ -1,7 +1,4 @@ import get from 'lodash/get'; - -import { parseString } from 'xml2js'; - import type { IDataObject, IExecuteFunctions, @@ -11,6 +8,7 @@ import type { IHttpRequestOptions, IHttpRequestMethods, } from 'n8n-workflow'; +import { parseString } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/S3/test/V1/AwsS3.node.test.ts b/packages/nodes-base/nodes/Aws/S3/test/V1/AwsS3.node.test.ts index c13c572ef2758..a5770b0b9c712 100644 --- a/packages/nodes-base/nodes/Aws/S3/test/V1/AwsS3.node.test.ts +++ b/packages/nodes-base/nodes/Aws/S3/test/V1/AwsS3.node.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { getWorkflowFilenames, initBinaryDataService, testWorkflows } from '@test/nodes/Helpers'; const workflows = getWorkflowFilenames(__dirname); diff --git a/packages/nodes-base/nodes/Aws/S3/test/V2/AwsS3.node.test.ts b/packages/nodes-base/nodes/Aws/S3/test/V2/AwsS3.node.test.ts index 7d4da16178d9d..fe6b625331327 100644 --- a/packages/nodes-base/nodes/Aws/S3/test/V2/AwsS3.node.test.ts +++ b/packages/nodes-base/nodes/Aws/S3/test/V2/AwsS3.node.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { getWorkflowFilenames, initBinaryDataService, testWorkflows } from '@test/nodes/Helpers'; const workflows = getWorkflowFilenames(__dirname); diff --git a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts index 052928a681cbd..ebbc2496ff7ff 100644 --- a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts +++ b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts @@ -1,4 +1,3 @@ -import qs from 'node:querystring'; import type { IExecuteFunctions, IDataObject, @@ -9,6 +8,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import qs from 'node:querystring'; import { awsApiRequestSOAP, awsApiRequestSOAPAllItems } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts index b71053bd286ab..b76ab07c61bf4 100644 --- a/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts @@ -1,5 +1,4 @@ -import { parseString } from 'xml2js'; - +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -11,8 +10,7 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; - -import get from 'lodash/get'; +import { parseString } from 'xml2js'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/SES/test/AwsSes.node.test.ts b/packages/nodes-base/nodes/Aws/SES/test/AwsSes.node.test.ts index 45ad851ca7f1e..dfd4005fe32e0 100644 --- a/packages/nodes-base/nodes/Aws/SES/test/AwsSes.node.test.ts +++ b/packages/nodes-base/nodes/Aws/SES/test/AwsSes.node.test.ts @@ -1,9 +1,10 @@ -import qs from 'node:querystring'; -import assert from 'node:assert'; import { NodeConnectionType } from 'n8n-workflow'; -import type { WorkflowTestData } from '@test/nodes/types'; +import assert from 'node:assert'; +import qs from 'node:querystring'; + import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; +import type { WorkflowTestData } from '@test/nodes/types'; describe('AwsSes Node', () => { const tests: WorkflowTestData[] = [ diff --git a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts index ba99d9fcacb32..2761233a6f5b6 100644 --- a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts +++ b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts @@ -1,4 +1,4 @@ -import { URL } from 'url'; +import { pascalCase } from 'change-case'; import type { IDataObject, IExecuteFunctions, @@ -11,8 +11,8 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; +import { URL } from 'url'; -import { pascalCase } from 'change-case'; import { awsApiRequestSOAP } from '../GenericFunctions'; export class AwsSqs implements INodeType { diff --git a/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts index 663c82b54e3db..a92de20bbeef4 100644 --- a/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts @@ -1,10 +1,5 @@ -import { URL } from 'url'; - import type { Request } from 'aws4'; import { sign } from 'aws4'; - -import { parseString } from 'xml2js'; - import type { ICredentialDataDecryptedObject, ICredentialTestFunctions, @@ -18,6 +13,8 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; +import { URL } from 'url'; +import { parseString } from 'xml2js'; function getEndpointForService( service: string, diff --git a/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts index 05faeb8a83ec6..54cf97ec5832d 100644 --- a/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts @@ -1,8 +1,6 @@ -import { URL } from 'url'; - import type { Request } from 'aws4'; import { sign } from 'aws4'; - +import get from 'lodash/get'; import type { ICredentialDataDecryptedObject, IDataObject, @@ -15,8 +13,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; - -import get from 'lodash/get'; +import { URL } from 'url'; function getEndpointForService( service: string, diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/index.ts index bd99a16bdd72a..d3462c784e4b3 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/index.ts @@ -1,4 +1,4 @@ -import { get as execute } from './execute'; import { companyReportGetDescription as description } from './description'; +import { get as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/index.ts index ed602347d3467..0650a1d9f4982 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as get from './get'; export { get }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/description.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/description.ts index 9c4dd63f7ec90..9008ca9176041 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/description.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/description.ts @@ -1,6 +1,5 @@ -import type { EmployeeProperties } from '../../Interfaces'; - import { createEmployeeSharedDescription } from './shareDescription'; +import type { EmployeeProperties } from '../../Interfaces'; export const employeeCreateDescription: EmployeeProperties = [ { diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/execute.ts index 33c29827761cb..eaae6824e8bbc 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/execute.ts @@ -1,8 +1,7 @@ -import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; - +import { capitalCase } from 'change-case'; import moment from 'moment-timezone'; +import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; import { apiRequest } from '../../../transport'; export async function create( diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/index.ts index 67619d0e9e00a..70993e84948e4 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/create/index.ts @@ -1,4 +1,4 @@ -import { create as execute } from './execute'; import { employeeCreateDescription as description } from './description'; +import { create as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/get/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/get/index.ts index 981c65126e799..70a4f62f202d6 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/get/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/get/index.ts @@ -1,4 +1,4 @@ -import { get as execute } from './execute'; import { employeeGetDescription as description } from './description'; +import { get as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/index.ts index 9ae4d1d2b1a9b..fbd36f52631a8 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { employeeGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/index.ts index 9e685756b716e..f8d2c0f74d956 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create'; import * as get from './get'; import * as getAll from './getAll'; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/description.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/description.ts index 83af844d745c9..ea215bc50967c 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/description.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/description.ts @@ -1,5 +1,5 @@ -import type { EmployeeProperties } from '../../Interfaces'; import { updateEmployeeSharedDescription } from './sharedDescription'; +import type { EmployeeProperties } from '../../Interfaces'; export const employeeUpdateDescription: EmployeeProperties = [ { diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/execute.ts index 76d1bdd56207b..18d56e7424d7e 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/execute.ts @@ -1,9 +1,8 @@ +import { capitalCase } from 'change-case'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -import { capitalCase } from 'change-case'; import { apiRequest } from '../../../transport'; export async function update( diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/index.ts index 9dd013c5d8383..dd76ebb54ef35 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/update/index.ts @@ -1,4 +1,4 @@ -import { update as execute } from './execute'; import { employeeUpdateDescription as description } from './description'; +import { update as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/del/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/del/index.ts index 05d70b3f50845..a08a03b2c3c98 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/del/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/del/index.ts @@ -1,4 +1,4 @@ -import { del as execute } from './execute'; import { employeeDocumentDelDescription as description } from './description'; +import { del as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/download/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/download/index.ts index 67f73a986dfc7..8393a452d3d05 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/download/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/download/index.ts @@ -1,4 +1,4 @@ -import { download as execute } from './execute'; import { employeeDocumentDownloadDescription as description } from './description'; +import { download as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/getAll/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/getAll/index.ts index eb6a95a73ec97..a9975d4f50afd 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/getAll/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { employeeDocumentGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/index.ts index 3853a5e9dd9b9..cc211f266fc6c 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as del from './del'; import * as download from './download'; import * as getAll from './getAll'; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/update/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/update/index.ts index 0c86c7a29aae3..6769e4df26cca 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/update/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/update/index.ts @@ -1,4 +1,4 @@ -import { update as execute } from './execute'; import { employeeDocumentUpdateDescription as description } from './description'; +import { update as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/index.ts index 1026bc2d2766d..c8a5e8adf94e3 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/index.ts @@ -1,4 +1,4 @@ -import { upload as execute } from './execute'; import { employeeDocumentUploadDescription as description } from './description'; +import { upload as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/del/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/del/index.ts index 0bef7541b8931..f7dd3961d7267 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/del/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/del/index.ts @@ -1,4 +1,4 @@ -import { del as execute } from './execute'; import { fileDelDescription as description } from './description'; +import { del as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/download/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/download/index.ts index 8d736b9e28da4..458af9a0a66db 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/download/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/download/index.ts @@ -1,4 +1,4 @@ -import { download as execute } from './execute'; import { fileDownloadDescription as description } from './description'; +import { download as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/getAll/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/getAll/index.ts index ddb484a98c4b1..5de5bb48d8cc8 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/getAll/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { fileGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/index.ts index d1f8755377176..a267d81861a49 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as del from './del'; import * as download from './download'; import * as getAll from './getAll'; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/update/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/update/index.ts index b1621b0679d99..027c26c72e8df 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/update/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/update/index.ts @@ -1,4 +1,4 @@ -import { update as execute } from './execute'; import { fileUpdateDescription as description } from './description'; +import { update as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/index.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/index.ts index 20787c370b06b..294c00031d9ad 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/file/upload/index.ts @@ -1,4 +1,4 @@ -import { upload as execute } from './execute'; import { fileUploadDescription as description } from './description'; +import { upload as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts index 9e8cb85a9ed92..041eb7adb51c1 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts @@ -1,10 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; +import * as companyReport from './companyReport'; import * as employee from './employee'; import * as employeeDocument from './employeeDocument'; import * as file from './file'; -import * as companyReport from './companyReport'; - import type { BambooHr } from './Interfaces'; export async function router(this: IExecuteFunctions): Promise { diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts index 213599b61467c..88a79226de9e5 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts @@ -1,10 +1,10 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import * as file from './file'; +import * as companyReport from './companyReport'; import * as employee from './employee'; import * as employeeDocument from './employeeDocument'; -import * as companyReport from './companyReport'; +import * as file from './file'; export const versionDescription: INodeTypeDescription = { credentials: [ diff --git a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts index 586fed329c8a7..d82c565d62fcb 100644 --- a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts +++ b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts @@ -10,9 +10,7 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { bannerbearApiRequest, keysToSnakeCase } from './GenericFunctions'; - import { imageFields, imageOperations } from './ImageDescription'; - import { templateFields, templateOperations } from './TemplateDescription'; export class Bannerbear implements INodeType { diff --git a/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts b/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts index 0e48b58d83a9f..1c8a313201edb 100644 --- a/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -10,8 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; - export async function bannerbearApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Baserow/Baserow.node.ts b/packages/nodes-base/nodes/Baserow/Baserow.node.ts index bb378a97daf66..7f58cf00b1af9 100644 --- a/packages/nodes-base/nodes/Baserow/Baserow.node.ts +++ b/packages/nodes-base/nodes/Baserow/Baserow.node.ts @@ -15,9 +15,7 @@ import { TableFieldMapper, toOptions, } from './GenericFunctions'; - import { operationFields } from './OperationDescription'; - import type { BaserowCredentials, FieldsUiValues, diff --git a/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts b/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts index 751bb19fc083c..e35e652c4f9f0 100644 --- a/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts +++ b/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IExecuteFunctions, type IDataObject, @@ -10,14 +11,12 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { createDatapoint, deleteDatapoint, getAllDatapoints, updateDatapoint, } from './Beeminder.node.functions'; - import { beeminderApiRequest } from './GenericFunctions'; export class Beeminder implements INodeType { diff --git a/packages/nodes-base/nodes/Bitly/Bitly.node.ts b/packages/nodes-base/nodes/Bitly/Bitly.node.ts index 3a62d5f07206e..5b376e0b2f4db 100644 --- a/packages/nodes-base/nodes/Bitly/Bitly.node.ts +++ b/packages/nodes-base/nodes/Bitly/Bitly.node.ts @@ -9,9 +9,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { linkFields, linkOperations } from './LinkDescription'; - import { bitlyApiRequest, bitlyApiRequestAllItems } from './GenericFunctions'; +import { linkFields, linkOperations } from './LinkDescription'; export class Bitly implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts b/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts index eaea3c48c698a..c86ee2b58dae0 100644 --- a/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts +++ b/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts @@ -1,3 +1,6 @@ +import isEmpty from 'lodash/isEmpty'; +import partialRight from 'lodash/partialRight'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, IDataObject, @@ -6,33 +9,26 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - -import isEmpty from 'lodash/isEmpty'; -import partialRight from 'lodash/partialRight'; -import { - bitwardenApiRequest as tokenlessBitwardenApiRequest, - getAccessToken, - handleGetAll as tokenlessHandleGetAll, - loadResource, -} from './GenericFunctions'; import type { CollectionUpdateFields } from './descriptions/CollectionDescription'; import { collectionFields, collectionOperations } from './descriptions/CollectionDescription'; - import { eventFields, eventOperations } from './descriptions/EventDescription'; - import type { GroupCreationAdditionalFields, GroupUpdateFields, } from './descriptions/GroupDescription'; import { groupFields, groupOperations } from './descriptions/GroupDescription'; - import type { MemberCreationAdditionalFields, MemberUpdateFields, } from './descriptions/MemberDescription'; import { memberFields, memberOperations } from './descriptions/MemberDescription'; +import { + bitwardenApiRequest as tokenlessBitwardenApiRequest, + getAccessToken, + handleGetAll as tokenlessHandleGetAll, + loadResource, +} from './GenericFunctions'; export class Bitwarden implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Box/Box.node.ts b/packages/nodes-base/nodes/Box/Box.node.ts index 3d9e71e3efd5c..d737405673356 100644 --- a/packages/nodes-base/nodes/Box/Box.node.ts +++ b/packages/nodes-base/nodes/Box/Box.node.ts @@ -1,3 +1,5 @@ +import { noCase } from 'change-case'; +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -7,13 +9,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { noCase } from 'change-case'; -import { boxApiRequest, boxApiRequestAllItems } from './GenericFunctions'; - import { fileFields, fileOperations } from './FileDescription'; - import { folderFields, folderOperations } from './FolderDescription'; +import { boxApiRequest, boxApiRequestAllItems } from './GenericFunctions'; export class Box implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Brevo/AttributeDescription.ts b/packages/nodes-base/nodes/Brevo/AttributeDescription.ts index f51efa0579866..0a5a2f4f80ecb 100644 --- a/packages/nodes-base/nodes/Brevo/AttributeDescription.ts +++ b/packages/nodes-base/nodes/Brevo/AttributeDescription.ts @@ -4,6 +4,7 @@ import type { INodeProperties, JsonObject, } from 'n8n-workflow'; + import { BrevoNode } from './GenericFunctions'; export const attributeOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Brevo/Brevo.node.ts b/packages/nodes-base/nodes/Brevo/Brevo.node.ts index e1e22ff46f5d0..d201d53529f0f 100644 --- a/packages/nodes-base/nodes/Brevo/Brevo.node.ts +++ b/packages/nodes-base/nodes/Brevo/Brevo.node.ts @@ -1,6 +1,7 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { attributeFields, attributeOperations } from './AttributeDescription'; import { contactFields, contactOperations } from './ContactDescription'; import { emailFields, emailOperations } from './EmailDescription'; diff --git a/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts b/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts index 4e2a480291c8b..35b86f4415a09 100644 --- a/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts +++ b/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts @@ -7,6 +7,7 @@ import { type IWebhookFunctions, type IWebhookResponseData, } from 'n8n-workflow'; + import { BrevoWebhookApi } from './GenericFunctions'; export class BrevoTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Brevo/EmailDescription.ts b/packages/nodes-base/nodes/Brevo/EmailDescription.ts index 63fda3ab10515..0a73a1a67cdf5 100644 --- a/packages/nodes-base/nodes/Brevo/EmailDescription.ts +++ b/packages/nodes-base/nodes/Brevo/EmailDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { BrevoNode } from './GenericFunctions'; export const emailOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Bubble/Bubble.node.ts b/packages/nodes-base/nodes/Bubble/Bubble.node.ts index d63c9802668ae..70641ac106512 100644 --- a/packages/nodes-base/nodes/Bubble/Bubble.node.ts +++ b/packages/nodes-base/nodes/Bubble/Bubble.node.ts @@ -8,7 +8,6 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { bubbleApiRequest, bubbleApiRequestAllItems, validateJSON } from './GenericFunctions'; - import { objectFields, objectOperations } from './ObjectDescription'; export class Bubble implements INodeType { diff --git a/packages/nodes-base/nodes/Bubble/GenericFunctions.ts b/packages/nodes-base/nodes/Bubble/GenericFunctions.ts index 46927492e96b6..7c05b8622727a 100644 --- a/packages/nodes-base/nodes/Bubble/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bubble/GenericFunctions.ts @@ -19,15 +19,13 @@ export async function bubbleApiRequest( body: IDataObject, qs: IDataObject, ) { - const { apiToken, appName, domain, environment, hosting } = (await this.getCredentials( - 'bubbleApi', - )) as { + const { apiToken, appName, domain, environment, hosting } = await this.getCredentials<{ apiToken: string; appName: string; domain: string; environment: 'development' | 'live'; hosting: 'bubbleHosted' | 'selfHosted'; - }; + }>('bubbleApi'); const rootUrl = hosting === 'bubbleHosted' ? `https://${appName}.bubbleapps.io` : domain; const urlSegment = environment === 'development' ? '/version-test/api/1.1' : '/api/1.1'; diff --git a/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts b/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts index 37b051d7ecf87..12ef42d73f79c 100644 --- a/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts +++ b/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts @@ -7,9 +7,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { pipelineFields, pipelineOperations } from './PipelineDescription'; - import { circleciApiRequest, circleciApiRequestAllItems } from './GenericFunctions'; +import { pipelineFields, pipelineOperations } from './PipelineDescription'; export class CircleCi implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts index 0d9aad5bfd53f..39a6140837467 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -9,9 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { getAttachments, webexApiRequest, webexApiRequestAllItems } from './GenericFunctions'; - import { meetingFields, meetingOperations, @@ -20,6 +18,7 @@ import { messageFields, messageOperations, } from './descriptions'; +import { getAttachments, webexApiRequest, webexApiRequestAllItems } from './GenericFunctions'; export class CiscoWebex implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts b/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts index c698782e29f12..2ddf4d950795f 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts @@ -1,5 +1,5 @@ import { createHash } from 'crypto'; - +import upperFirst from 'lodash/upperFirst'; import type { ICredentialDataDecryptedObject, IDataObject, @@ -14,8 +14,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import upperFirst from 'lodash/upperFirst'; - export async function webexApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts b/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts index f8e72c75b3928..685ac62fc2004 100644 --- a/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts +++ b/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts @@ -7,10 +7,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { clearbitApiRequest } from './GenericFunctions'; - import { companyFields, companyOperations } from './CompanyDescription'; - +import { clearbitApiRequest } from './GenericFunctions'; import { personFields, personOperations } from './PersonDescription'; export class Clearbit implements INodeType { diff --git a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts index 2e524be59a763..952bd4956f179 100644 --- a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts +++ b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,46 +10,24 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { clickupApiRequest, clickupApiRequestAllItems, validateJSON } from './GenericFunctions'; - import { checklistFields, checklistOperations } from './ChecklistDescription'; - import { checklistItemFields, checklistItemOperations } from './ChecklistItemDescription'; - import { commentFields, commentOperations } from './CommentDescription'; - import { folderFields, folderOperations } from './FolderDescription'; - +import { clickupApiRequest, clickupApiRequestAllItems, validateJSON } from './GenericFunctions'; import { goalFields, goalOperations } from './GoalDescription'; - import { goalKeyResultFields, goalKeyResultOperations } from './GoalKeyResultDescription'; - -// import { -// guestFields, -// guestOperations, -// } from './guestDescription'; - +import { listFields, listOperations } from './ListDescription'; +import type { IList } from './ListInterface'; +import { spaceTagFields, spaceTagOperations } from './SpaceTagDescription'; +import { taskDependencyFields, taskDependencyOperations } from './TaskDependencyDescription'; import { taskFields, taskOperations } from './TaskDescription'; - +import type { ITask } from './TaskInterface'; import { taskListFields, taskListOperations } from './TaskListDescription'; - import { taskTagFields, taskTagOperations } from './TaskTagDescription'; - -import { spaceTagFields, spaceTagOperations } from './SpaceTagDescription'; - -import { taskDependencyFields, taskDependencyOperations } from './TaskDependencyDescription'; - import { timeEntryFields, timeEntryOperations } from './TimeEntryDescription'; - import { timeEntryTagFields, timeEntryTagOperations } from './TimeEntryTagDescription'; -import { listFields, listOperations } from './ListDescription'; - -import type { ITask } from './TaskInterface'; - -import type { IList } from './ListInterface'; - export class ClickUp implements INodeType { description: INodeTypeDescription = { displayName: 'ClickUp', diff --git a/packages/nodes-base/nodes/Clockify/Clockify.node.ts b/packages/nodes-base/nodes/Clockify/Clockify.node.ts index 8f5456dd67096..9723dfa025bc7 100644 --- a/packages/nodes-base/nodes/Clockify/Clockify.node.ts +++ b/packages/nodes-base/nodes/Clockify/Clockify.node.ts @@ -1,3 +1,5 @@ +import moment from 'moment-timezone'; +import { NodeConnectionType } from 'n8n-workflow'; import type { IExecuteFunctions, IDataObject, @@ -7,29 +9,17 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType } from 'n8n-workflow'; - -import moment from 'moment-timezone'; -import { clockifyApiRequest, clockifyApiRequestAllItems } from './GenericFunctions'; - -import type { IClientDto, IWorkspaceDto } from './WorkpaceInterfaces'; - -import type { IUserDto } from './UserDtos'; - -import type { IProjectDto } from './ProjectInterfaces'; import { clientFields, clientOperations } from './ClientDescription'; - +import { clockifyApiRequest, clockifyApiRequestAllItems } from './GenericFunctions'; import { projectFields, projectOperations } from './ProjectDescription'; - +import type { IProjectDto } from './ProjectInterfaces'; import { tagFields, tagOperations } from './TagDescription'; - import { taskFields, taskOperations } from './TaskDescription'; - import { timeEntryFields, timeEntryOperations } from './TimeEntryDescription'; - import { userFields, userOperations } from './UserDescription'; - +import type { IUserDto } from './UserDtos'; +import type { IClientDto, IWorkspaceDto } from './WorkpaceInterfaces'; import { workspaceFields, workspaceOperations } from './WorkspaceDescription'; export class Clockify implements INodeType { diff --git a/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts b/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts index cbca70f49c384..a7ea51f512579 100644 --- a/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts +++ b/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts @@ -1,5 +1,4 @@ import moment from 'moment-timezone'; - import type { IPollFunctions, IDataObject, @@ -11,9 +10,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { clockifyApiRequest } from './GenericFunctions'; - import { EntryTypeEnum } from './EntryTypeEnum'; +import { clockifyApiRequest } from './GenericFunctions'; import type { IUserDto } from './UserDtos'; import type { IWorkspaceDto } from './WorkpaceInterfaces'; diff --git a/packages/nodes-base/nodes/Clockify/UserDtos.ts b/packages/nodes-base/nodes/Clockify/UserDtos.ts index 6365b057dfaeb..e482e47030e4d 100644 --- a/packages/nodes-base/nodes/Clockify/UserDtos.ts +++ b/packages/nodes-base/nodes/Clockify/UserDtos.ts @@ -1,4 +1,5 @@ import type { IDataObject } from 'n8n-workflow'; + import type { IMembershipDto } from './CommonDtos'; const enum UserStatusEnum { diff --git a/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts b/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts index 93acdb0e5275f..bd9050029c9de 100644 --- a/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts +++ b/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts @@ -10,7 +10,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { cloudflareApiRequest, cloudflareApiRequestAllItems } from './GenericFunctions'; - import { zoneCertificateFields, zoneCertificateOperations } from './ZoneCertificateDescription'; export class Cloudflare implements INodeType { diff --git a/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts b/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts index fedf9c4204548..f279f1d099d1b 100644 --- a/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts +++ b/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { collectionFields, collectionOperations } from './CollectionDescription'; import { createCollectionEntry, diff --git a/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts b/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts index 07955905f2dd5..15be38653a9b3 100644 --- a/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts @@ -1,5 +1,6 @@ import type { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow'; import { jsonParse } from 'n8n-workflow'; + import type { ICollection } from './CollectionInterface'; import { cockpitApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Cockpit/FormFunctions.ts b/packages/nodes-base/nodes/Cockpit/FormFunctions.ts index 1b48287439b68..318a73901e1ed 100644 --- a/packages/nodes-base/nodes/Cockpit/FormFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/FormFunctions.ts @@ -1,4 +1,5 @@ import type { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow'; + import type { IForm } from './FormInterface'; import { cockpitApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts b/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts index 464f1f2bad5bb..cb2536ef11cb3 100644 --- a/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts @@ -1,4 +1,5 @@ import type { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow'; + import { cockpitApiRequest } from './GenericFunctions'; export async function getSingleton( diff --git a/packages/nodes-base/nodes/Coda/Coda.node.ts b/packages/nodes-base/nodes/Coda/Coda.node.ts index fd0da7dcf05a1..94ca3050c8953 100644 --- a/packages/nodes-base/nodes/Coda/Coda.node.ts +++ b/packages/nodes-base/nodes/Coda/Coda.node.ts @@ -9,10 +9,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; + +import { controlFields, controlOperations } from './ControlDescription'; +import { formulaFields, formulaOperations } from './FormulaDescription'; 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 { diff --git a/packages/nodes-base/nodes/Code/JavaScriptSandbox.ts b/packages/nodes-base/nodes/Code/JavaScriptSandbox.ts index 73f5ba7f758de..449be97a124a1 100644 --- a/packages/nodes-base/nodes/Code/JavaScriptSandbox.ts +++ b/packages/nodes-base/nodes/Code/JavaScriptSandbox.ts @@ -1,15 +1,15 @@ import { NodeVM, makeResolverFromLegacyOptions, type Resolver } from '@n8n/vm2'; import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; -import { ValidationError } from './ValidationError'; import { ExecutionError } from './ExecutionError'; -import type { SandboxContext } from './Sandbox'; -import { Sandbox } from './Sandbox'; import { mapItemNotDefinedErrorIfNeededForRunForEach, mapItemsNotDefinedErrorIfNeededForRunForAll, validateNoDisallowedMethodsInRunForEach, } from './JsCodeValidator'; +import type { SandboxContext } from './Sandbox'; +import { Sandbox } from './Sandbox'; +import { ValidationError } from './ValidationError'; const { NODE_FUNCTION_ALLOW_BUILTIN: builtIn, NODE_FUNCTION_ALLOW_EXTERNAL: external } = process.env; diff --git a/packages/nodes-base/nodes/Code/PythonSandbox.ts b/packages/nodes-base/nodes/Code/PythonSandbox.ts index 365f213500e2a..6491b7d085ed0 100644 --- a/packages/nodes-base/nodes/Code/PythonSandbox.ts +++ b/packages/nodes-base/nodes/Code/PythonSandbox.ts @@ -1,5 +1,6 @@ import { ApplicationError, type IExecuteFunctions, type INodeExecutionData } from 'n8n-workflow'; import type { PyDict } from 'pyodide/ffi'; + import { LoadPyodide } from './Pyodide'; import type { SandboxContext } from './Sandbox'; import { Sandbox } from './Sandbox'; diff --git a/packages/nodes-base/nodes/Code/test/Code.node.test.ts b/packages/nodes-base/nodes/Code/test/Code.node.test.ts index 3f1ed0eccfdc7..486b6b673d0e4 100644 --- a/packages/nodes-base/nodes/Code/test/Code.node.test.ts +++ b/packages/nodes-base/nodes/Code/test/Code.node.test.ts @@ -1,11 +1,13 @@ -import { anyNumber, mock } from 'jest-mock-extended'; import { NodeVM } from '@n8n/vm2'; +import { anyNumber, mock } from 'jest-mock-extended'; +import { normalizeItems } from 'n8n-core'; import type { IExecuteFunctions, IWorkflowDataProxyData } from 'n8n-workflow'; import { ApplicationError } from 'n8n-workflow'; -import { normalizeItems } from 'n8n-core'; + +import { testWorkflows, getWorkflowFilenames, initBinaryDataService } from '@test/nodes/Helpers'; + import { Code } from '../Code.node'; import { ValidationError } from '../ValidationError'; -import { testWorkflows, getWorkflowFilenames, initBinaryDataService } from '@test/nodes/Helpers'; describe('Test Code Node', () => { const workflows = getWorkflowFilenames(__dirname); diff --git a/packages/nodes-base/nodes/Code/test/utils.test.ts b/packages/nodes-base/nodes/Code/test/utils.test.ts index b622c86661434..437d8b443b939 100644 --- a/packages/nodes-base/nodes/Code/test/utils.test.ts +++ b/packages/nodes-base/nodes/Code/test/utils.test.ts @@ -1,5 +1,6 @@ import type { INodeExecutionData } from 'n8n-workflow'; import { NodeExecutionOutput } from 'n8n-workflow'; + import { addPostExecutionWarning } from '../utils'; describe('addPostExecutionWarning', () => { diff --git a/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts b/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts index e31c84194be17..eac35239d23f3 100644 --- a/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts +++ b/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,11 +10,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { coinFields, coinOperations } from './CoinDescription'; - import { eventFields, eventOperations } from './EventDescription'; - import { coinGeckoApiRequest, coinGeckoRequestAllItems } from './GenericFunctions'; export class CoinGecko implements INodeType { diff --git a/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts b/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts index 87b0c88c72ecc..0e1eab0b7a781 100644 --- a/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts +++ b/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts @@ -6,6 +6,7 @@ import { type INodeTypeDescription, NodeConnectionType, } from 'n8n-workflow'; + import { checkInput, checkInputAndThrowError, diff --git a/packages/nodes-base/nodes/CompareDatasets/GenericFunctions.ts b/packages/nodes-base/nodes/CompareDatasets/GenericFunctions.ts index f8d707e3ce0c0..12fa1a447aff4 100644 --- a/packages/nodes-base/nodes/CompareDatasets/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CompareDatasets/GenericFunctions.ts @@ -1,14 +1,14 @@ -import { ApplicationError, type IDataObject, type INodeExecutionData } from 'n8n-workflow'; - +import { cloneDeep } from 'lodash'; import difference from 'lodash/difference'; import get from 'lodash/get'; import intersection from 'lodash/intersection'; import isEmpty from 'lodash/isEmpty'; import omit from 'lodash/omit'; -import unset from 'lodash/unset'; -import { cloneDeep } from 'lodash'; import set from 'lodash/set'; import union from 'lodash/union'; +import unset from 'lodash/unset'; +import { ApplicationError, type IDataObject, type INodeExecutionData } from 'n8n-workflow'; + import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities'; type PairToMatch = { diff --git a/packages/nodes-base/nodes/CompareDatasets/test/utils/utils.test.ts b/packages/nodes-base/nodes/CompareDatasets/test/utils/utils.test.ts index 6af3b2f294b5b..4d10178726436 100644 --- a/packages/nodes-base/nodes/CompareDatasets/test/utils/utils.test.ts +++ b/packages/nodes-base/nodes/CompareDatasets/test/utils/utils.test.ts @@ -1,4 +1,5 @@ import type { INodeExecutionData } from 'n8n-workflow'; + import { checkInput } from '../../GenericFunctions'; describe('Test Compare Datasets Node utils', () => { diff --git a/packages/nodes-base/nodes/Compression/Compression.node.ts b/packages/nodes-base/nodes/Compression/Compression.node.ts index 4f816cbbae860..1ecf7edb4e807 100644 --- a/packages/nodes-base/nodes/Compression/Compression.node.ts +++ b/packages/nodes-base/nodes/Compression/Compression.node.ts @@ -1,4 +1,5 @@ -import { promisify } from 'util'; +import * as fflate from 'fflate'; +import * as mime from 'mime-types'; import { NodeConnectionType, type IBinaryKeyData, @@ -7,16 +8,13 @@ import { type INodeType, type INodeTypeDescription, } from 'n8n-workflow'; - -import * as fflate from 'fflate'; +import { promisify } from 'util'; const gunzip = promisify(fflate.gunzip); const gzip = promisify(fflate.gzip); const unzip = promisify(fflate.unzip); const zip = promisify(fflate.zip); -import * as mime from 'mime-types'; - const ALREADY_COMPRESSED = [ '7z', 'aifc', diff --git a/packages/nodes-base/nodes/Compression/test/node/Compression.test.ts b/packages/nodes-base/nodes/Compression/test/node/Compression.test.ts index 65833677c740b..a83d793ebab9f 100644 --- a/packages/nodes-base/nodes/Compression/test/node/Compression.test.ts +++ b/packages/nodes-base/nodes/Compression/test/node/Compression.test.ts @@ -1,16 +1,16 @@ /* eslint-disable @typescript-eslint/no-loop-func */ -import path from 'path'; -import os from 'node:os'; import type { IDataObject } from 'n8n-workflow'; -import type { WorkflowTestData } from '@test/nodes/types'; +import os from 'node:os'; +import path from 'path'; +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, initBinaryDataService, readJsonFileSync, } from '@test/nodes/Helpers'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; +import type { WorkflowTestData } from '@test/nodes/types'; if (os.platform() !== 'win32') { describe('Execute Compression Node', () => { diff --git a/packages/nodes-base/nodes/Contentful/Contentful.node.ts b/packages/nodes-base/nodes/Contentful/Contentful.node.ts index c666ec83c28a5..a70e96021d7c5 100644 --- a/packages/nodes-base/nodes/Contentful/Contentful.node.ts +++ b/packages/nodes-base/nodes/Contentful/Contentful.node.ts @@ -7,13 +7,12 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { contentfulApiRequestAllItems, contentfulApiRequest } from './GenericFunctions'; - -import * as SpaceDescription from './SpaceDescription'; +import * as AssetDescription from './AssetDescription'; import * as ContentTypeDescription from './ContentTypeDescription'; import * as EntryDescription from './EntryDescription'; -import * as AssetDescription from './AssetDescription'; +import { contentfulApiRequestAllItems, contentfulApiRequest } from './GenericFunctions'; import * as LocaleDescription from './LocaleDescription'; +import * as SpaceDescription from './SpaceDescription'; export class Contentful implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts b/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts index a19911ae74910..7f335f9791e6e 100644 --- a/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts +++ b/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts @@ -9,16 +9,11 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { convertKitApiRequest } from './GenericFunctions'; - import { customFieldFields, customFieldOperations } from './CustomFieldDescription'; - import { formFields, formOperations } from './FormDescription'; - +import { convertKitApiRequest } from './GenericFunctions'; import { sequenceFields, sequenceOperations } from './SequenceDescription'; - import { tagFields, tagOperations } from './TagDescription'; - import { tagSubscriberFields, tagSubscriberOperations } from './TagSubscriberDescription'; export class ConvertKit implements INodeType { diff --git a/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts b/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts index 9c3441fd86306..95161748d60bf 100644 --- a/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts +++ b/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IHookFunctions, IWebhookFunctions, @@ -10,7 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { convertKitApiRequest } from './GenericFunctions'; export class ConvertKitTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Copper/Copper.node.ts b/packages/nodes-base/nodes/Copper/Copper.node.ts index 05274dd4536d0..ecabe2aa4a407 100644 --- a/packages/nodes-base/nodes/Copper/Copper.node.ts +++ b/packages/nodes-base/nodes/Copper/Copper.node.ts @@ -7,15 +7,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { - adjustCompanyFields, - adjustLeadFields, - adjustPersonFields, - adjustTaskFields, - copperApiRequest, - handleListing, -} from './GenericFunctions'; - import { companyFields, companyOperations, @@ -34,6 +25,14 @@ import { userFields, userOperations, } from './descriptions'; +import { + adjustCompanyFields, + adjustLeadFields, + adjustPersonFields, + adjustTaskFields, + copperApiRequest, + handleListing, +} from './GenericFunctions'; export class Copper implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Copper/GenericFunctions.ts b/packages/nodes-base/nodes/Copper/GenericFunctions.ts index 3137471c2e3e3..bfab720a1e375 100644 --- a/packages/nodes-base/nodes/Copper/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Copper/GenericFunctions.ts @@ -1,5 +1,6 @@ import { createHash } from 'crypto'; - +import flow from 'lodash/flow'; +import omit from 'lodash/omit'; import type { ICredentialDataDecryptedObject, IDataObject, @@ -13,9 +14,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import flow from 'lodash/flow'; -import omit from 'lodash/omit'; - import type { AddressFixedCollection, EmailFixedCollection, diff --git a/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts b/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts index 0acd63e83e3bf..2a0f94e40ff09 100644 --- a/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts +++ b/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts @@ -1,8 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; -import { addressFixedCollection, phoneNumbersFixedCollection } from '../utils/sharedFields'; import { isoCountryCodes } from '@utils/ISOCountryCodes'; +import { addressFixedCollection, phoneNumbersFixedCollection } from '../utils/sharedFields'; + export const companyOperations: INodeProperties[] = [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/Cortex/Cortex.node.ts b/packages/nodes-base/nodes/Cortex/Cortex.node.ts index 39bfff623c28a..2b2e59311d530 100644 --- a/packages/nodes-base/nodes/Cortex/Cortex.node.ts +++ b/packages/nodes-base/nodes/Cortex/Cortex.node.ts @@ -1,4 +1,6 @@ +import * as changeCase from 'change-case'; import { createHash } from 'crypto'; +import upperFirst from 'lodash/upperFirst'; import type { IDataObject, IExecuteFunctions, @@ -9,17 +11,12 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import upperFirst from 'lodash/upperFirst'; -import * as changeCase from 'change-case'; -import { cortexApiRequest, getEntityLabel, prepareParameters, splitTags } from './GenericFunctions'; import { analyzerFields, analyzersOperations } from './AnalyzerDescriptions'; - -import { responderFields, respondersOperations } from './ResponderDescription'; - -import { jobFields, jobOperations } from './JobDescription'; - import type { IJob } from './AnalyzerInterface'; +import { cortexApiRequest, getEntityLabel, prepareParameters, splitTags } from './GenericFunctions'; +import { jobFields, jobOperations } from './JobDescription'; +import { responderFields, respondersOperations } from './ResponderDescription'; export class Cortex implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Cortex/GenericFunctions.ts b/packages/nodes-base/nodes/Cortex/GenericFunctions.ts index 45f4105a10fff..dd074e2976f7f 100644 --- a/packages/nodes-base/nodes/Cortex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cortex/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -7,8 +8,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; -import moment from 'moment-timezone'; - export async function cortexApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts index a489093425067..1aba92bf30cfc 100644 --- a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts +++ b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts @@ -5,8 +5,8 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import pgPromise from 'pg-promise'; + import { generateReturning, getItemCopy, diff --git a/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts b/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts index f8d94fceaf2df..bcea2f2b7ee6e 100644 --- a/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts +++ b/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts @@ -1,5 +1,6 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { allProperties } from './descriptions'; export class CrowdDev implements INodeType { diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/activityFields.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/activityFields.ts index f7fe7c2050b7b..9ca7575474c74 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/activityFields.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/activityFields.ts @@ -1,7 +1,8 @@ import type { INodeProperties } from 'n8n-workflow'; -import { activityPresend } from '../GenericFunctions'; + import { emailsField } from './shared'; import { getAdditionalOptions, mapWith, showFor } from './utils'; +import { activityPresend } from '../GenericFunctions'; const displayOpts = showFor(['activity']); diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/automationFields.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/automationFields.ts index 3607321a64825..3b28bf1de224c 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/automationFields.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/automationFields.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { automationPresend } from '../GenericFunctions'; + import { mapWith, showFor } from './utils'; +import { automationPresend } from '../GenericFunctions'; const displayOpts = showFor(['automation']); diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/index.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/index.ts index 4bc1496287b30..515f7f08552f0 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/index.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/index.ts @@ -1,11 +1,12 @@ import type { INodeProperties } from 'n8n-workflow'; -import { resources } from './resources'; + import { activityOperations, activityFields } from './activityFields'; +import { automationFields, automationOperations } from './automationFields'; import { memberFields, memberOperations } from './memberFields'; import { noteFields, noteOperations } from './noteFields'; import { organizationFields, organizationOperations } from './organizationFields'; +import { resources } from './resources'; import { taskFields, taskOperations } from './taskFields'; -import { automationFields, automationOperations } from './automationFields'; export const allProperties: INodeProperties[] = [ resources, diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/memberFields.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/memberFields.ts index 08f4548b690d0..67a96cff7f7b8 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/memberFields.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/memberFields.ts @@ -1,7 +1,8 @@ import type { INodeProperties } from 'n8n-workflow'; -import { memberPresend } from '../GenericFunctions'; -import { getAdditionalOptions, getId, mapWith, showFor } from './utils'; + import * as shared from './shared'; +import { getAdditionalOptions, getId, mapWith, showFor } from './utils'; +import { memberPresend } from '../GenericFunctions'; const displayOpts = showFor(['member']); diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/noteFields.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/noteFields.ts index 7184d88f0bbbe..69c2d0da13e28 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/noteFields.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/noteFields.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { notePresend } from '../GenericFunctions'; + import { getId, mapWith, showFor } from './utils'; +import { notePresend } from '../GenericFunctions'; const displayOpts = showFor(['note']); diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/organizationFields.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/organizationFields.ts index 283c85193ea61..4ea7440272bd2 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/organizationFields.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/organizationFields.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { organizationPresend } from '../GenericFunctions'; + import { getAdditionalOptions, getId, mapWith, showFor } from './utils'; +import { organizationPresend } from '../GenericFunctions'; const displayOpts = showFor(['organization']); diff --git a/packages/nodes-base/nodes/CrowdDev/descriptions/taskFields.ts b/packages/nodes-base/nodes/CrowdDev/descriptions/taskFields.ts index 8a39b0031a93b..5de5573860d98 100644 --- a/packages/nodes-base/nodes/CrowdDev/descriptions/taskFields.ts +++ b/packages/nodes-base/nodes/CrowdDev/descriptions/taskFields.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { taskPresend } from '../GenericFunctions'; + import { getAdditionalOptions, getId, showFor } from './utils'; +import { taskPresend } from '../GenericFunctions'; const displayOpts = showFor(['task']); diff --git a/packages/nodes-base/nodes/Crypto/Crypto.node.ts b/packages/nodes-base/nodes/Crypto/Crypto.node.ts index 6bbaa30e74c61..b0b2b21b120d7 100644 --- a/packages/nodes-base/nodes/Crypto/Crypto.node.ts +++ b/packages/nodes-base/nodes/Crypto/Crypto.node.ts @@ -1,7 +1,5 @@ import type { BinaryToTextEncoding } from 'crypto'; import { createHash, createHmac, createSign, getHashes, randomBytes } from 'crypto'; -import { pipeline } from 'stream/promises'; -import { v4 as uuid } from 'uuid'; import set from 'lodash/set'; import type { IExecuteFunctions, @@ -11,6 +9,8 @@ import type { JsonObject, } from 'n8n-workflow'; import { deepCopy, BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow'; +import { pipeline } from 'stream/promises'; +import { v4 as uuid } from 'uuid'; const unsupportedAlgorithms = [ 'RSA-MD4', diff --git a/packages/nodes-base/nodes/Crypto/test/Crypto.test.ts b/packages/nodes-base/nodes/Crypto/test/Crypto.test.ts index b321d4e852b67..d473b0551f96b 100644 --- a/packages/nodes-base/nodes/Crypto/test/Crypto.test.ts +++ b/packages/nodes-base/nodes/Crypto/test/Crypto.test.ts @@ -1,6 +1,7 @@ import fs from 'fs'; import fsPromises from 'fs/promises'; import { Readable } from 'stream'; + import { testWorkflows, getWorkflowFilenames, initBinaryDataService } from '@test/nodes/Helpers'; const workflows = getWorkflowFilenames(__dirname); diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts index b9202734c3600..98b465823002e 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts @@ -6,10 +6,11 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { customerIoApiRequest, validateJSON } from './GenericFunctions'; + import { campaignFields, campaignOperations } from './CampaignDescription'; import { customerFields, customerOperations } from './CustomerDescription'; import { eventFields, eventOperations } from './EventDescription'; +import { customerIoApiRequest, validateJSON } from './GenericFunctions'; import { segmentFields, segmentOperations } from './SegmentDescription'; export class CustomerIo implements INodeType { diff --git a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts index dd6e356d954e0..bdcdaae9cf200 100644 --- a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IExecuteFunctions, IHookFunctions, @@ -7,8 +8,6 @@ import type { IHttpRequestOptions, } from 'n8n-workflow'; -import get from 'lodash/get'; - export async function customerIoApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts b/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts index 2b38055281880..fda31d9e2407a 100644 --- a/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts +++ b/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts @@ -1,3 +1,6 @@ +import set from 'lodash/set'; +import { DateTime as LuxonDateTime } from 'luxon'; +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -8,15 +11,8 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; - import { deepCopy, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; - -import moment from 'moment-timezone'; - -import { DateTime as LuxonDateTime } from 'luxon'; - function parseDateByFormat(this: IExecuteFunctions, value: string, fromFormat: string) { const date = moment(value, fromFormat, true); if (moment(date).isValid()) return date; diff --git a/packages/nodes-base/nodes/DateTime/V2/AddToDateDescription.ts b/packages/nodes-base/nodes/DateTime/V2/AddToDateDescription.ts index e6efc9e01c133..b3b4cb590f539 100644 --- a/packages/nodes-base/nodes/DateTime/V2/AddToDateDescription.ts +++ b/packages/nodes-base/nodes/DateTime/V2/AddToDateDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const AddToDateDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/V2/CurrentDateDescription.ts b/packages/nodes-base/nodes/DateTime/V2/CurrentDateDescription.ts index 81e25c2f38de6..4d8f997bc80e5 100644 --- a/packages/nodes-base/nodes/DateTime/V2/CurrentDateDescription.ts +++ b/packages/nodes-base/nodes/DateTime/V2/CurrentDateDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const CurrentDateDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts b/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts index ca5a2d5a66302..9f148a55dbaf1 100644 --- a/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts +++ b/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts @@ -1,3 +1,6 @@ +import type { DateTimeUnit, DurationUnit } from 'luxon'; +import { DateTime } from 'luxon'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData, @@ -5,18 +8,15 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import type { DateTimeUnit, DurationUnit } from 'luxon'; -import { DateTime } from 'luxon'; -import { CurrentDateDescription } from './CurrentDateDescription'; import { AddToDateDescription } from './AddToDateDescription'; -import { SubtractFromDateDescription } from './SubtractFromDateDescription'; -import { FormatDateDescription } from './FormatDateDescription'; -import { RoundDateDescription } from './RoundDateDescription'; -import { GetTimeBetweenDatesDescription } from './GetTimeBetweenDates'; +import { CurrentDateDescription } from './CurrentDateDescription'; import { ExtractDateDescription } from './ExtractDateDescription'; +import { FormatDateDescription } from './FormatDateDescription'; import { parseDate } from './GenericFunctions'; +import { GetTimeBetweenDatesDescription } from './GetTimeBetweenDates'; +import { RoundDateDescription } from './RoundDateDescription'; +import { SubtractFromDateDescription } from './SubtractFromDateDescription'; export class DateTimeV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/DateTime/V2/ExtractDateDescription.ts b/packages/nodes-base/nodes/DateTime/V2/ExtractDateDescription.ts index 2cbabc72a5a75..1c1ef6d9c86ca 100644 --- a/packages/nodes-base/nodes/DateTime/V2/ExtractDateDescription.ts +++ b/packages/nodes-base/nodes/DateTime/V2/ExtractDateDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const ExtractDateDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/V2/FormatDateDescription.ts b/packages/nodes-base/nodes/DateTime/V2/FormatDateDescription.ts index 65f578b5a6993..830551775c802 100644 --- a/packages/nodes-base/nodes/DateTime/V2/FormatDateDescription.ts +++ b/packages/nodes-base/nodes/DateTime/V2/FormatDateDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const FormatDateDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/V2/GetTimeBetweenDates.ts b/packages/nodes-base/nodes/DateTime/V2/GetTimeBetweenDates.ts index d4329c179e205..e59d9c4a6d5d2 100644 --- a/packages/nodes-base/nodes/DateTime/V2/GetTimeBetweenDates.ts +++ b/packages/nodes-base/nodes/DateTime/V2/GetTimeBetweenDates.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const GetTimeBetweenDatesDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/V2/RoundDateDescription.ts b/packages/nodes-base/nodes/DateTime/V2/RoundDateDescription.ts index 0108fa17e40fa..b6cacd2e18598 100644 --- a/packages/nodes-base/nodes/DateTime/V2/RoundDateDescription.ts +++ b/packages/nodes-base/nodes/DateTime/V2/RoundDateDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const RoundDateDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/V2/SubtractFromDateDescription.ts b/packages/nodes-base/nodes/DateTime/V2/SubtractFromDateDescription.ts index 8de53d6b37951..43f223b452456 100644 --- a/packages/nodes-base/nodes/DateTime/V2/SubtractFromDateDescription.ts +++ b/packages/nodes-base/nodes/DateTime/V2/SubtractFromDateDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { includeInputFields } from './common.descriptions'; export const SubtractFromDateDescription: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts b/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts index 60c630d076f4c..6c98039b78d55 100644 --- a/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts +++ b/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts @@ -1,4 +1,5 @@ import moment from 'moment-timezone'; + import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers'; const workflows = getWorkflowFilenames(__dirname); diff --git a/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts b/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts index 77ae4d861ae8e..b3746ead812e5 100644 --- a/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts +++ b/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts @@ -1,3 +1,4 @@ +import { setSeed, array as mfArray } from 'minifaker'; import type { IExecuteFunctions, INodeExecutionData, @@ -10,7 +11,8 @@ import { NodeConnectionType, NodeOperationError, } from 'n8n-workflow'; -import { setSeed, array as mfArray } from 'minifaker'; + +import { generateGarbageMemory, runGarbageCollector } from './functions'; import { generateCreditCard, generateIPv4, @@ -25,7 +27,6 @@ import { generateUUID, generateVersion, } from './randomData'; -import { generateGarbageMemory, runGarbageCollector } from './functions'; export class DebugHelper implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/DeepL/DeepL.node.ts b/packages/nodes-base/nodes/DeepL/DeepL.node.ts index fbf5ade3c48b5..f85f091ebea7b 100644 --- a/packages/nodes-base/nodes/DeepL/DeepL.node.ts +++ b/packages/nodes-base/nodes/DeepL/DeepL.node.ts @@ -10,7 +10,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { deepLApiRequest } from './GenericFunctions'; - import { textOperations } from './TextDescription'; export class DeepL implements INodeType { diff --git a/packages/nodes-base/nodes/Demio/Demio.node.ts b/packages/nodes-base/nodes/Demio/Demio.node.ts index 1479d415fdfd1..e93c32683cd14 100644 --- a/packages/nodes-base/nodes/Demio/Demio.node.ts +++ b/packages/nodes-base/nodes/Demio/Demio.node.ts @@ -9,10 +9,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { demioApiRequest } from './GenericFunctions'; - import { eventFields, eventOperations } from './EventDescription'; - +import { demioApiRequest } from './GenericFunctions'; import { reportFields, reportOperations } from './ReportDescription'; export class Demio implements INodeType { diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/channel/create.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/channel/create.test.ts index b0e0168a6db84..5f7e38ed1d1ee 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/channel/create.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/channel/create.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/channel/deleteChannel.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/channel/deleteChannel.test.ts index 4e80537759021..01f523d4c3209 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/channel/deleteChannel.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/channel/deleteChannel.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/channel/get.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/channel/get.test.ts index b5049a3f854c8..ceb952395cd09 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/channel/get.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/channel/get.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes, IRequestOptions } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/helpers'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/helpers'; // TODO: use nock const requestApiSpy = jest.spyOn(transport, 'requestApi'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/channel/getAll.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/channel/getAll.test.ts index 7ad2b24113be5..1616cde2b0ddb 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/channel/getAll.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/channel/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/channel/update.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/channel/update.test.ts index 072990d8ff828..e6139f59df945 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/channel/update.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/channel/update.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/member/getAll.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/member/getAll.test.ts index e84dcd1ad7839..7de96bc6eefcc 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/member/getAll.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/member/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/member/roleAdd.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/member/roleAdd.test.ts index 0de1100e60b6e..febf091233e7c 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/member/roleAdd.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/member/roleAdd.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/member/roleRemove.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/member/roleRemove.test.ts index a523f6699a925..159c3e71f08a2 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/member/roleRemove.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/member/roleRemove.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/message/deleteMessage.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/message/deleteMessage.test.ts index 5afd6c6c30bbc..6ee8d16e41e19 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/message/deleteMessage.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/message/deleteMessage.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/message/get.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/message/get.test.ts index 775a266a61fce..78ec0f22b1ad6 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/message/get.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/message/get.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/message/getAll.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/message/getAll.test.ts index 8c5a9cc4795d2..5bb7d7ba2f739 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/message/getAll.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/message/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/message/react.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/message/react.test.ts index 52f16534525d0..13c4924f4efa4 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/message/react.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/message/react.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/message/send.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/message/send.test.ts index 3ccc3ea598567..95c2ca54cc1f0 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/message/send.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/message/send.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/node/webhook/sendLegacy.test.ts b/packages/nodes-base/nodes/Discord/test/v2/node/webhook/sendLegacy.test.ts index df93c22b11829..fa5487400e316 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/node/webhook/sendLegacy.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/node/webhook/sendLegacy.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport/discord.api'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport/discord.api'; const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest'); diff --git a/packages/nodes-base/nodes/Discord/test/v2/utils.test.ts b/packages/nodes-base/nodes/Discord/test/v2/utils.test.ts index a54d48eee9fe9..ff79027568609 100644 --- a/packages/nodes-base/nodes/Discord/test/v2/utils.test.ts +++ b/packages/nodes-base/nodes/Discord/test/v2/utils.test.ts @@ -1,4 +1,6 @@ import type { IExecuteFunctions, INode } from 'n8n-workflow'; + +import * as transport from '../../v2//transport/discord.api'; import { createSimplifyFunction, prepareOptions, @@ -7,8 +9,6 @@ import { setupChannelGetter, } from '../../v2/helpers/utils'; -import * as transport from '../../v2//transport/discord.api'; - const node: INode = { id: '1', name: 'Discord node', diff --git a/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts b/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts index 6f0f24ce63149..e802a0dbef0bb 100644 --- a/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts +++ b/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts @@ -14,8 +14,8 @@ import { sleep, } from 'n8n-workflow'; -import { oldVersionNotice } from '../../../utils/descriptions'; import type { DiscordAttachment, DiscordWebhook } from './Interfaces'; +import { oldVersionNotice } from '../../../utils/descriptions'; const versionDescription: INodeTypeDescription = { displayName: 'Discord', diff --git a/packages/nodes-base/nodes/Discord/v2/DiscordV2.node.ts b/packages/nodes-base/nodes/Discord/v2/DiscordV2.node.ts index b4409a370bfd5..20b4cec13f6ee 100644 --- a/packages/nodes-base/nodes/Discord/v2/DiscordV2.node.ts +++ b/packages/nodes-base/nodes/Discord/v2/DiscordV2.node.ts @@ -6,11 +6,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { listSearch, loadOptions } from './methods'; - import { router } from './actions/router'; - import { versionDescription } from './actions/versionDescription'; +import { listSearch, loadOptions } from './methods'; export class DiscordV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/channel/create.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/channel/create.operation.ts index d87bad2ec2227..fc797a8bd3d4c 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/channel/create.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/channel/create.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/channel/deleteChannel.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/channel/deleteChannel.operation.ts index 57c405655f10f..af718bb4c6baa 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/channel/deleteChannel.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/channel/deleteChannel.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData, setupChannelGetter } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/channel/get.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/channel/get.operation.ts index 585b5294d405a..741960a5de26c 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/channel/get.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/channel/get.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData, setupChannelGetter } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/channel/getAll.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/channel/getAll.operation.ts index 4644f4975e41c..20d5611d2467e 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/channel/getAll.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/channel/getAll.operation.ts @@ -4,10 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { returnAllOrLimit } from '../../../../../utils/descriptions'; import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; -import { returnAllOrLimit } from '../../../../../utils/descriptions'; const properties: INodeProperties[] = [ ...returnAllOrLimit, diff --git a/packages/nodes-base/nodes/Discord/v2/actions/channel/index.ts b/packages/nodes-base/nodes/Discord/v2/actions/channel/index.ts index e866e89ac0c42..4d43cea64ffff 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/channel/index.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/channel/index.ts @@ -1,11 +1,11 @@ import type { INodeProperties } from 'n8n-workflow'; -import { guildRLC } from '../common.description'; import * as create from './create.operation'; +import * as deleteChannel from './deleteChannel.operation'; import * as get from './get.operation'; import * as getAll from './getAll.operation'; import * as update from './update.operation'; -import * as deleteChannel from './deleteChannel.operation'; +import { guildRLC } from '../common.description'; export { create, get, getAll, update, deleteChannel }; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/channel/update.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/channel/update.operation.ts index 8a07aa8efbcfc..1acd79702664d 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/channel/update.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/channel/update.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData, setupChannelGetter } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/common.description.ts b/packages/nodes-base/nodes/Discord/v2/actions/common.description.ts index f2f35f44760bf..7acccea9042e1 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/common.description.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/common.description.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../utils/utilities'; export const guildRLC: INodeProperties = { diff --git a/packages/nodes-base/nodes/Discord/v2/actions/member/getAll.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/member/getAll.operation.ts index 1cf43b0c9865d..982382b1c632e 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/member/getAll.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/member/getAll.operation.ts @@ -4,11 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { returnAllOrLimit } from '../../../../../utils/descriptions'; import { updateDisplayOptions } from '../../../../../utils/utilities'; import { createSimplifyFunction, parseDiscordError, prepareErrorData } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; import { simplifyBoolean } from '../common.description'; -import { returnAllOrLimit } from '../../../../../utils/descriptions'; const properties: INodeProperties[] = [ ...returnAllOrLimit, diff --git a/packages/nodes-base/nodes/Discord/v2/actions/member/index.ts b/packages/nodes-base/nodes/Discord/v2/actions/member/index.ts index a2260b731c13d..5f2e87f749e01 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/member/index.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/member/index.ts @@ -1,9 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; -import { guildRLC } from '../common.description'; import * as getAll from './getAll.operation'; import * as roleAdd from './roleAdd.operation'; import * as roleRemove from './roleRemove.operation'; +import { guildRLC } from '../common.description'; export { getAll, roleAdd, roleRemove }; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/member/roleAdd.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/member/roleAdd.operation.ts index 4cd83fe2fd441..d35cab836df39 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/member/roleAdd.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/member/roleAdd.operation.ts @@ -1,4 +1,5 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/member/roleRemove.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/member/roleRemove.operation.ts index 025975054b8f1..d6048294c5fab 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/member/roleRemove.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/member/roleRemove.operation.ts @@ -1,4 +1,5 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/message/deleteMessage.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/message/deleteMessage.operation.ts index 149d9fc9e90ce..11e903c663746 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/message/deleteMessage.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/message/deleteMessage.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData, setupChannelGetter } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/message/get.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/message/get.operation.ts index f7405a7b99254..d6246fada9bbf 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/message/get.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/message/get.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { createSimplifyFunction, diff --git a/packages/nodes-base/nodes/Discord/v2/actions/message/getAll.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/message/getAll.operation.ts index c818bf08d129f..10086c4040bc7 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/message/getAll.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/message/getAll.operation.ts @@ -4,6 +4,8 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { returnAllOrLimit } from '../../../../../utils/descriptions'; import { updateDisplayOptions } from '../../../../../utils/utilities'; import { createSimplifyFunction, @@ -13,7 +15,6 @@ import { } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; import { channelRLC, simplifyBoolean } from '../common.description'; -import { returnAllOrLimit } from '../../../../../utils/descriptions'; const properties: INodeProperties[] = [ channelRLC, diff --git a/packages/nodes-base/nodes/Discord/v2/actions/message/index.ts b/packages/nodes-base/nodes/Discord/v2/actions/message/index.ts index a2fb1955a4b73..c040cb94e7cd7 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/message/index.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/message/index.ts @@ -1,11 +1,11 @@ import type { INodeProperties } from 'n8n-workflow'; -import { guildRLC } from '../common.description'; +import * as deleteMessage from './deleteMessage.operation'; +import * as get from './get.operation'; import * as getAll from './getAll.operation'; import * as react from './react.operation'; import * as send from './send.operation'; -import * as deleteMessage from './deleteMessage.operation'; -import * as get from './get.operation'; +import { guildRLC } from '../common.description'; export { getAll, react, send, deleteMessage, get }; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/message/react.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/message/react.operation.ts index 1041c5626a0e6..9713d9e8efd6f 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/message/react.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/message/react.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareErrorData, setupChannelGetter } from '../../helpers/utils'; import { discordApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/message/send.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/message/send.operation.ts index 1b29fe13addcc..bcd49d7a8f24f 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/message/send.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/message/send.operation.ts @@ -5,15 +5,8 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { discordApiMultiPartRequest, discordApiRequest } from '../../transport'; -import { - embedsFixedCollection, - filesFixedCollection, - textChannelRLC, - userRLC, -} from '../common.description'; +import { updateDisplayOptions } from '../../../../../utils/utilities'; import { checkAccessToChannel, parseDiscordError, @@ -22,6 +15,13 @@ import { prepareMultiPartForm, prepareOptions, } from '../../helpers/utils'; +import { discordApiMultiPartRequest, discordApiRequest } from '../../transport'; +import { + embedsFixedCollection, + filesFixedCollection, + textChannelRLC, + userRLC, +} from '../common.description'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Discord/v2/actions/router.ts b/packages/nodes-base/nodes/Discord/v2/actions/router.ts index 2a65ca6145a60..a43534e1411c5 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/router.ts @@ -1,14 +1,13 @@ import type { IDataObject, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { discordApiRequest } from '../transport'; -import { checkAccessToGuild } from '../helpers/utils'; - -import * as message from './message'; import * as channel from './channel'; import * as member from './member'; -import * as webhook from './webhook'; +import * as message from './message'; import type { Discord } from './node.type'; +import * as webhook from './webhook'; +import { checkAccessToGuild } from '../helpers/utils'; +import { discordApiRequest } from '../transport'; export async function router(this: IExecuteFunctions) { let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts index 7fc8c5d532be8..8d79650890f3e 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts @@ -1,9 +1,9 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import * as message from './message'; import * as channel from './channel'; import * as member from './member'; +import * as message from './message'; import * as webhook from './webhook'; export const versionDescription: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts b/packages/nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts index cf4379f0e5cce..e94837fb4ce17 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts @@ -4,9 +4,8 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { discordApiMultiPartRequest, discordApiRequest } from '../../transport'; +import { updateDisplayOptions } from '../../../../../utils/utilities'; import { parseDiscordError, prepareEmbeds, @@ -14,7 +13,7 @@ import { prepareMultiPartForm, prepareOptions, } from '../../helpers/utils'; - +import { discordApiMultiPartRequest, discordApiRequest } from '../../transport'; import { embedsFixedCollection, filesFixedCollection } from '../common.description'; const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Discord/v2/helpers/utils.ts b/packages/nodes-base/nodes/Discord/v2/helpers/utils.ts index b3852f9527a4b..7f1922adb4873 100644 --- a/packages/nodes-base/nodes/Discord/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Discord/v2/helpers/utils.ts @@ -1,3 +1,6 @@ +import FormData from 'form-data'; +import { isEmpty } from 'lodash'; +import { extension } from 'mime-types'; import type { IBinaryKeyData, IDataObject, @@ -6,9 +9,7 @@ import type { INodeExecutionData, } from 'n8n-workflow'; import { jsonParse, NodeOperationError } from 'n8n-workflow'; -import { isEmpty } from 'lodash'; -import FormData from 'form-data'; -import { extension } from 'mime-types'; + import { capitalize } from '../../../../utils/utilities'; import { discordApiRequest } from '../transport'; diff --git a/packages/nodes-base/nodes/Discord/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Discord/v2/methods/listSearch.ts index abbec430402e0..02251f610d433 100644 --- a/packages/nodes-base/nodes/Discord/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Discord/v2/methods/listSearch.ts @@ -3,8 +3,9 @@ import { type ILoadOptionsFunctions, type INodeListSearchResult, } from 'n8n-workflow'; -import { discordApiRequest } from '../transport'; + import { checkAccessToGuild } from '../helpers/utils'; +import { discordApiRequest } from '../transport'; async function getGuildId(this: ILoadOptionsFunctions) { const guildId = this.getNodeParameter('guildId', undefined, { diff --git a/packages/nodes-base/nodes/Discord/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Discord/v2/methods/loadOptions.ts index ab79a4bd1d84c..8cc4cfd27f418 100644 --- a/packages/nodes-base/nodes/Discord/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Discord/v2/methods/loadOptions.ts @@ -1,6 +1,7 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; -import { discordApiRequest } from '../transport'; + import { checkAccessToGuild } from '../helpers/utils'; +import { discordApiRequest } from '../transport'; export async function getRoles(this: ILoadOptionsFunctions): Promise { const guildId = this.getNodeParameter('guildId', undefined, { diff --git a/packages/nodes-base/nodes/Discord/v2/transport/discord.api.ts b/packages/nodes-base/nodes/Discord/v2/transport/discord.api.ts index c7a066ef4d2cc..7c95bf5d3b999 100644 --- a/packages/nodes-base/nodes/Discord/v2/transport/discord.api.ts +++ b/packages/nodes-base/nodes/Discord/v2/transport/discord.api.ts @@ -1,3 +1,4 @@ +import type FormData from 'form-data'; import type { IDataObject, IExecuteFunctions, @@ -7,10 +8,8 @@ import type { ILoadOptionsFunctions, IRequestOptions, } from 'n8n-workflow'; - import { sleep, NodeApiError, jsonParse } from 'n8n-workflow'; -import type FormData from 'form-data'; import { getCredentialsType, requestApi } from './helpers'; export async function discordApiRequest( diff --git a/packages/nodes-base/nodes/Discourse/Discourse.node.ts b/packages/nodes-base/nodes/Discourse/Discourse.node.ts index 2cf817d71bf1a..92e329ca9743a 100644 --- a/packages/nodes-base/nodes/Discourse/Discourse.node.ts +++ b/packages/nodes-base/nodes/Discourse/Discourse.node.ts @@ -9,16 +9,11 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { discourseApiRequest } from './GenericFunctions'; - -import { postFields, postOperations } from './PostDescription'; - import { categoryFields, categoryOperations } from './CategoryDescription'; - +import { discourseApiRequest } from './GenericFunctions'; import { groupFields, groupOperations } from './GroupDescription'; - +import { postFields, postOperations } from './PostDescription'; import { userFields, userOperations } from './UserDescription'; - import { userGroupFields, userGroupOperations } from './UserGroupDescription'; export class Discourse implements INodeType { diff --git a/packages/nodes-base/nodes/Drift/Drift.node.ts b/packages/nodes-base/nodes/Drift/Drift.node.ts index dcb62e5affdff..19a29ec8731a5 100644 --- a/packages/nodes-base/nodes/Drift/Drift.node.ts +++ b/packages/nodes-base/nodes/Drift/Drift.node.ts @@ -6,9 +6,10 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { driftApiRequest } from './GenericFunctions'; + import { contactFields, contactOperations } from './ContactDescription'; import type { IContact } from './ContactInterface'; +import { driftApiRequest } from './GenericFunctions'; export class Drift implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts b/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts index 24c121988bf7f..cf247919a214e 100644 --- a/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts +++ b/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts @@ -9,6 +9,7 @@ import { type INodeTypeDescription, type ResourceMapperFields, } from 'n8n-workflow'; + import { remoteOptions, resourceMapperFields, returnData, searchOptions } from './mock'; export class E2eTest implements INodeType { diff --git a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts index 8217b3f22d917..0d00b57032699 100644 --- a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts +++ b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts @@ -11,9 +11,7 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { documentFields, documentOperations } from './DocumentDescription'; - import { erpNextApiRequest, erpNextApiRequestAllItems } from './GenericFunctions'; - import type { DocumentProperties } from './utils'; import { processNames, toSQL } from './utils'; diff --git a/packages/nodes-base/nodes/EditImage/EditImage.node.ts b/packages/nodes-base/nodes/EditImage/EditImage.node.ts index 0cfc6b0bcdbda..9167781af9a68 100644 --- a/packages/nodes-base/nodes/EditImage/EditImage.node.ts +++ b/packages/nodes-base/nodes/EditImage/EditImage.node.ts @@ -1,5 +1,6 @@ -import { parse as pathParse } from 'path'; import { writeFile as fsWriteFile } from 'fs/promises'; +import getSystemFonts from 'get-system-fonts'; +import gm from 'gm'; import type { IDataObject, IExecuteFunctions, @@ -11,9 +12,8 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeOperationError, NodeConnectionType, deepCopy } from 'n8n-workflow'; -import gm from 'gm'; +import { parse as pathParse } from 'path'; import { file } from 'tmp-promise'; -import getSystemFonts from 'get-system-fonts'; const nodeOperations: INodePropertyOptions[] = [ { @@ -1244,7 +1244,7 @@ export class EditImage implements INodeType { gmInstance = gmInstance! .fill(operationData.fontColor as string) .fontSize(operationData.fontSize as number) - .font(font as string) + .font(font) .drawText( operationData.positionX as number, operationData.positionY as number, diff --git a/packages/nodes-base/nodes/Egoi/Egoi.node.ts b/packages/nodes-base/nodes/Egoi/Egoi.node.ts index e922c7ad21364..31056e97b2995 100644 --- a/packages/nodes-base/nodes/Egoi/Egoi.node.ts +++ b/packages/nodes-base/nodes/Egoi/Egoi.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,9 +10,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { egoiApiRequest, egoiApiRequestAllItems, simplify } from './GenericFunctions'; - import type { ICreateMemberBody } from './Interfaces'; export class Egoi implements INodeType { diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts index d9eb282476405..f30a6f3e2a9e2 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts @@ -9,14 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { - elasticSecurityApiRequest, - getConnector, - getVersion, - handleListing, - throwOnEmptyUpdate, -} from './GenericFunctions'; - import { caseCommentFields, caseCommentOperations, @@ -27,7 +19,13 @@ import { connectorFields, connectorOperations, } from './descriptions'; - +import { + elasticSecurityApiRequest, + getConnector, + getVersion, + handleListing, + throwOnEmptyUpdate, +} from './GenericFunctions'; import type { Connector, ConnectorCreatePayload, ConnectorType } from './types'; export class ElasticSecurity implements INodeType { diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts index 7a055eb1e16f4..0da536b60095e 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts @@ -21,9 +21,8 @@ export async function elasticSecurityApiRequest( body: IDataObject = {}, qs: IDataObject = {}, ) { - const { baseUrl: rawBaseUrl } = (await this.getCredentials( - 'elasticSecurityApi', - )) as ElasticSecurityApiCredentials; + const { baseUrl: rawBaseUrl } = + await this.getCredentials('elasticSecurityApi'); const baseUrl = tolerateTrailingSlash(rawBaseUrl); diff --git a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts index ca5906d6ec5c7..5fab762b88c6a 100644 --- a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts +++ b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts @@ -1,3 +1,4 @@ +import omit from 'lodash/omit'; import type { IExecuteFunctions, IDataObject, @@ -8,15 +9,12 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, jsonParse, NodeApiError } from 'n8n-workflow'; -import omit from 'lodash/omit'; +import { documentFields, documentOperations, indexFields, indexOperations } from './descriptions'; import { elasticsearchApiRequest, elasticsearchApiRequestAllItems, elasticsearchBulkApiRequest, } from './GenericFunctions'; - -import { documentFields, documentOperations, indexFields, indexOperations } from './descriptions'; - import type { DocumentGetAllOptions, FieldsUiValues } from './types'; export class Elasticsearch implements INodeType { diff --git a/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts b/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts index 9bfce49d80954..29804736e25ed 100644 --- a/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts @@ -10,9 +10,8 @@ import { NodeApiError } from 'n8n-workflow'; import type { ElasticsearchApiCredentials } from './types'; export async function elasticsearchBulkApiRequest(this: IExecuteFunctions, body: IDataObject) { - const { baseUrl, ignoreSSLIssues } = (await this.getCredentials( - 'elasticsearchApi', - )) as ElasticsearchApiCredentials; + const { baseUrl, ignoreSSLIssues } = + await this.getCredentials('elasticsearchApi'); const bulkBody = Object.values(body).flat().join('\n') + '\n'; @@ -58,9 +57,8 @@ export async function elasticsearchApiRequest( body: IDataObject = {}, qs: IDataObject = {}, ) { - const { baseUrl, ignoreSSLIssues } = (await this.getCredentials( - 'elasticsearchApi', - )) as ElasticsearchApiCredentials; + const { baseUrl, ignoreSSLIssues } = + await this.getCredentials('elasticsearchApi'); const options: IHttpRequestOptions = { method, diff --git a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts index 9f66dec09c84e..669f027e6ccde 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts @@ -1,3 +1,10 @@ +import type { ImapSimple, ImapSimpleOptions, Message } from '@n8n/imap'; +import { connect as imapConnect, getParts } from '@n8n/imap'; +import find from 'lodash/find'; +import isEmpty from 'lodash/isEmpty'; +import type { Source as ParserSource } from 'mailparser'; +import { simpleParser } from 'mailparser'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { ITriggerFunctions, IBinaryData, @@ -13,15 +20,6 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - -import type { ImapSimple, ImapSimpleOptions, Message } from '@n8n/imap'; -import { connect as imapConnect, getParts } from '@n8n/imap'; -import type { Source as ParserSource } from 'mailparser'; -import { simpleParser } from 'mailparser'; - -import isEmpty from 'lodash/isEmpty'; -import find from 'lodash/find'; export async function parseRawEmail( this: ITriggerFunctions, diff --git a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts index 74f7540188563..48ce9b3766d66 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts @@ -1,3 +1,9 @@ +import type { ImapSimple, ImapSimpleOptions, Message, MessagePart } from '@n8n/imap'; +import { connect as imapConnect, getParts } from '@n8n/imap'; +import find from 'lodash/find'; +import isEmpty from 'lodash/isEmpty'; +import type { Source as ParserSource } from 'mailparser'; +import { simpleParser } from 'mailparser'; import type { ITriggerFunctions, IBinaryData, @@ -14,14 +20,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError, TriggerCloseError } from 'n8n-workflow'; - -import type { ImapSimple, ImapSimpleOptions, Message, MessagePart } from '@n8n/imap'; -import { connect as imapConnect, getParts } from '@n8n/imap'; -import type { Source as ParserSource } from 'mailparser'; -import { simpleParser } from 'mailparser'; import rfc2047 from 'rfc2047'; -import isEmpty from 'lodash/isEmpty'; -import find from 'lodash/find'; import type { ICredentialsDataImap } from '../../../credentials/Imap.credentials'; import { isCredentialsDataImap } from '../../../credentials/Imap.credentials'; diff --git a/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts b/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts index cfe18a75ded79..c0dd00af01cdb 100644 --- a/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts +++ b/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts @@ -7,7 +7,6 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; - import { createTransport } from 'nodemailer'; import type SMTPTransport from 'nodemailer/lib/smtp-transport'; diff --git a/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts b/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts index 2f182c5862d29..b8f065a8b7096 100644 --- a/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts +++ b/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts @@ -9,11 +9,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; - import { createTransport } from 'nodemailer'; import type SMTPTransport from 'nodemailer/lib/smtp-transport'; import { updateDisplayOptions } from '@utils/utilities'; + import { appendAttributionOption } from '../../../utils/descriptions'; const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Emelia/Emelia.node.ts b/packages/nodes-base/nodes/Emelia/Emelia.node.ts index 121a5d4233568..8c4b710211d41 100644 --- a/packages/nodes-base/nodes/Emelia/Emelia.node.ts +++ b/packages/nodes-base/nodes/Emelia/Emelia.node.ts @@ -1,3 +1,4 @@ +import isEmpty from 'lodash/isEmpty'; import { type IExecuteFunctions, type IDataObject, @@ -8,12 +9,9 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; -import { emeliaApiTest, emeliaGraphqlRequest, loadResource } from './GenericFunctions'; - import { campaignFields, campaignOperations } from './CampaignDescription'; - import { contactListFields, contactListOperations } from './ContactListDescription'; +import { emeliaApiTest, emeliaGraphqlRequest, loadResource } from './GenericFunctions'; export class Emelia implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts index 52e80655f9ae6..4dcc5cae649b1 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts @@ -6,8 +6,9 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { generatePairedItemData } from '../../utils/utilities'; + import { getWorkflowInfo } from './GenericFunctions'; +import { generatePairedItemData } from '../../utils/utilities'; export class ExecuteWorkflow implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts index 5e0f9e897f173..99066f047821d 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import { createHmac } from 'crypto'; import type { IDataObject, @@ -11,13 +12,9 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import { v4 as uuid } from 'uuid'; -import { snakeCase } from 'change-case'; - import { facebookApiRequest, getAllFields, getFields } from './GenericFunctions'; - import type { FacebookWebhookSubscription } from './types'; export class FacebookTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts index 94d36bd1830d4..f1a4e72359f0d 100644 --- a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { capitalCase } from 'change-case'; import type { IDataObject, IExecuteFunctions, @@ -10,8 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; - export async function facebookApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts b/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts index 325ac81d4a67e..752ae8783074c 100644 --- a/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts +++ b/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts @@ -9,6 +9,7 @@ import { type IWebhookResponseData, NodeConnectionType, } from 'n8n-workflow'; + import { appWebhookSubscriptionCreate, appWebhookSubscriptionDelete, diff --git a/packages/nodes-base/nodes/FacebookLeadAds/GenericFunctions.ts b/packages/nodes-base/nodes/FacebookLeadAds/GenericFunctions.ts index 5d4950ea0705a..bccfef3a4f8c4 100644 --- a/packages/nodes-base/nodes/FacebookLeadAds/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FacebookLeadAds/GenericFunctions.ts @@ -9,6 +9,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + import type { CreateFacebookAppWebhookSubscription, FacebookAppWebhookSubscription, diff --git a/packages/nodes-base/nodes/FacebookLeadAds/methods/listSearch.ts b/packages/nodes-base/nodes/FacebookLeadAds/methods/listSearch.ts index 3f9e1f82b9b42..f2289d32babfc 100644 --- a/packages/nodes-base/nodes/FacebookLeadAds/methods/listSearch.ts +++ b/packages/nodes-base/nodes/FacebookLeadAds/methods/listSearch.ts @@ -1,4 +1,5 @@ import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; + import { facebookFormList, facebookPageList } from '../GenericFunctions'; const filterMatches = (name: string, filter?: string): boolean => diff --git a/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts b/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts index c76998bd11286..0d87f83ef96e2 100644 --- a/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts +++ b/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import { randomBytes } from 'crypto'; import type { IHookFunctions, @@ -9,7 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { figmaApiRequest } from './GenericFunctions'; export class FigmaTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts index 364bd629f60ea..460d8298e3a86 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts @@ -6,11 +6,11 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; +import * as iCall from './actions/iCall.operation'; import * as spreadsheet from './actions/spreadsheet.operation'; import * as toBinary from './actions/toBinary.operation'; -import * as toText from './actions/toText.operation'; import * as toJson from './actions/toJson.operation'; -import * as iCall from './actions/iCall.operation'; +import * as toText from './actions/toText.operation'; export class ConvertToFile implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/actions/iCall.operation.ts b/packages/nodes-base/nodes/Files/ConvertToFile/actions/iCall.operation.ts index 7fcca69b4cd0e..c3fc66690abe5 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/actions/iCall.operation.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/actions/iCall.operation.ts @@ -1,9 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import * as createEvent from '../../../ICalendar/createEvent.operation'; - import { updateDisplayOptions } from '@utils/utilities'; +import * as createEvent from '../../../ICalendar/createEvent.operation'; + export const description: INodeProperties[] = updateDisplayOptions( { show: { diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/actions/spreadsheet.operation.ts b/packages/nodes-base/nodes/Files/ConvertToFile/actions/spreadsheet.operation.ts index f0683b6a6f100..96f87bddc6077 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/actions/spreadsheet.operation.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/actions/spreadsheet.operation.ts @@ -5,10 +5,9 @@ import { type INodeProperties, } from 'n8n-workflow'; -import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities'; import type { JsonToSpreadsheetBinaryOptions, JsonToSpreadsheetBinaryFormat } from '@utils/binary'; - import { convertJsonToSpreadsheetBinary } from '@utils/binary'; +import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities'; export const operations = ['csv', 'html', 'rtf', 'ods', 'xls', 'xlsx']; diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/actions/toBinary.operation.ts b/packages/nodes-base/nodes/Files/ConvertToFile/actions/toBinary.operation.ts index f2f329c160bec..47030bb706bc1 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/actions/toBinary.operation.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/actions/toBinary.operation.ts @@ -1,5 +1,4 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; - import { NodeOperationError } from 'n8n-workflow'; import type { JsonToBinaryOptions } from '@utils/binary'; diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/actions/toJson.operation.ts b/packages/nodes-base/nodes/Files/ConvertToFile/actions/toJson.operation.ts index 94415d82caa49..cabcfa8da1ea2 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/actions/toJson.operation.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/actions/toJson.operation.ts @@ -1,9 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities'; import { createBinaryFromJson } from '@utils/binary'; import { encodeDecodeOptions } from '@utils/descriptions'; +import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/actions/toText.operation.ts b/packages/nodes-base/nodes/Files/ConvertToFile/actions/toText.operation.ts index 925bf50668f77..cb4ffe23e70c5 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/actions/toText.operation.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/actions/toText.operation.ts @@ -1,5 +1,4 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; - import { NodeOperationError } from 'n8n-workflow'; import type { JsonToBinaryOptions } from '@utils/binary'; diff --git a/packages/nodes-base/nodes/Files/ExtractFromFile/actions/moveTo.operation.ts b/packages/nodes-base/nodes/Files/ExtractFromFile/actions/moveTo.operation.ts index c8b6c115a6b49..85cf1309b3138 100644 --- a/packages/nodes-base/nodes/Files/ExtractFromFile/actions/moveTo.operation.ts +++ b/packages/nodes-base/nodes/Files/ExtractFromFile/actions/moveTo.operation.ts @@ -1,21 +1,18 @@ +import iconv from 'iconv-lite'; +import get from 'lodash/get'; +import set from 'lodash/set'; +import unset from 'lodash/unset'; import type { IDataObject, IExecuteFunctions, INodeExecutionData, INodeProperties, } from 'n8n-workflow'; - import { BINARY_ENCODING, NodeOperationError, deepCopy, jsonParse } from 'n8n-workflow'; - -import get from 'lodash/get'; -import set from 'lodash/set'; -import unset from 'lodash/unset'; - -import iconv from 'iconv-lite'; - import { icsCalendarToObject } from 'ts-ics'; -import { updateDisplayOptions } from '@utils/utilities'; + import { encodeDecodeOptions } from '@utils/descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { @@ -122,8 +119,7 @@ export async function execute( if (!value) continue; const buffer = await this.helpers.getBinaryDataBuffer(itemIndex, binaryPropertyName); - const encoding = - (options.encoding as string) || (this.helpers.detectBinaryEncoding(buffer) as string); + const encoding = (options.encoding as string) || this.helpers.detectBinaryEncoding(buffer); if (options.keepSource && options.keepSource !== 'binary') { newItem.json = deepCopy(item.json); diff --git a/packages/nodes-base/nodes/Files/ExtractFromFile/actions/pdf.operation.ts b/packages/nodes-base/nodes/Files/ExtractFromFile/actions/pdf.operation.ts index e2e7f2a911ab1..89ce5bc8fcc51 100644 --- a/packages/nodes-base/nodes/Files/ExtractFromFile/actions/pdf.operation.ts +++ b/packages/nodes-base/nodes/Files/ExtractFromFile/actions/pdf.operation.ts @@ -1,9 +1,7 @@ +import unset from 'lodash/unset'; import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; - import { NodeOperationError, deepCopy } from 'n8n-workflow'; -import unset from 'lodash/unset'; - import { extractDataFromPDF } from '@utils/binary'; import { updateDisplayOptions } from '@utils/utilities'; diff --git a/packages/nodes-base/nodes/Files/ReadWriteFile/actions/read.operation.ts b/packages/nodes-base/nodes/Files/ReadWriteFile/actions/read.operation.ts index 9d34b46c57572..d46c3ef648a5d 100644 --- a/packages/nodes-base/nodes/Files/ReadWriteFile/actions/read.operation.ts +++ b/packages/nodes-base/nodes/Files/ReadWriteFile/actions/read.operation.ts @@ -1,3 +1,4 @@ +import glob from 'fast-glob'; import { NodeApiError } from 'n8n-workflow'; import type { IExecuteFunctions, @@ -6,10 +7,10 @@ import type { JsonObject, } from 'n8n-workflow'; -import glob from 'fast-glob'; -import { errorMapper, escapeSpecialCharacters } from '../helpers/utils'; import { updateDisplayOptions } from '@utils/utilities'; +import { errorMapper, escapeSpecialCharacters } from '../helpers/utils'; + export const properties: INodeProperties[] = [ { displayName: 'File(s) Selector', diff --git a/packages/nodes-base/nodes/Files/ReadWriteFile/actions/write.operation.ts b/packages/nodes-base/nodes/Files/ReadWriteFile/actions/write.operation.ts index fd4a94761787b..5f4d28775a6f3 100644 --- a/packages/nodes-base/nodes/Files/ReadWriteFile/actions/write.operation.ts +++ b/packages/nodes-base/nodes/Files/ReadWriteFile/actions/write.operation.ts @@ -1,4 +1,3 @@ -import type { Readable } from 'stream'; import type { IExecuteFunctions, INodeExecutionData, @@ -6,10 +5,12 @@ import type { JsonObject, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeApiError } from 'n8n-workflow'; +import type { Readable } from 'stream'; -import { errorMapper } from '../helpers/utils'; import { updateDisplayOptions } from '@utils/utilities'; +import { errorMapper } from '../helpers/utils'; + export const properties: INodeProperties[] = [ { displayName: 'File Path and Name', diff --git a/packages/nodes-base/nodes/Files/ReadWriteFile/test/ReadWriteFile.test.ts b/packages/nodes-base/nodes/Files/ReadWriteFile/test/ReadWriteFile.test.ts index 38c8d0057e9c2..b4ae9971b38c6 100644 --- a/packages/nodes-base/nodes/Files/ReadWriteFile/test/ReadWriteFile.test.ts +++ b/packages/nodes-base/nodes/Files/ReadWriteFile/test/ReadWriteFile.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-loop-func */ +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Test ReadWriteFile Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/Filter/V1/GenericFunctions.ts b/packages/nodes-base/nodes/Filter/V1/GenericFunctions.ts index 06288535b1401..cabd5d2f89666 100644 --- a/packages/nodes-base/nodes/Filter/V1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Filter/V1/GenericFunctions.ts @@ -1,8 +1,7 @@ +import moment from 'moment-timezone'; import type { INode, NodeParameterValue } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - const isDateObject = (value: NodeParameterValue) => Object.prototype.toString.call(value) === '[object Date]'; diff --git a/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts b/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts index 46c32d5912df4..6a50c35725341 100644 --- a/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts +++ b/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts @@ -9,9 +9,10 @@ import { type INodeTypeDescription, NodeConnectionType, } from 'n8n-workflow'; + import { ENABLE_LESS_STRICT_TYPE_VALIDATION } from '../../../utils/constants'; -import { getTypeValidationParameter, getTypeValidationStrictness } from '../../If/V2/utils'; import { looseTypeValidationProperty } from '../../../utils/descriptions'; +import { getTypeValidationParameter, getTypeValidationStrictness } from '../../If/V2/utils'; export class FilterV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Flow/Flow.node.ts b/packages/nodes-base/nodes/Flow/Flow.node.ts index 06caf25a8267d..39a3b7e56473b 100644 --- a/packages/nodes-base/nodes/Flow/Flow.node.ts +++ b/packages/nodes-base/nodes/Flow/Flow.node.ts @@ -7,6 +7,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; + import { flowApiRequest, FlowApiRequestAllItems } from './GenericFunctions'; import { taskFields, taskOperations } from './TaskDescription'; import type { ITask, TaskInfo } from './TaskInterface'; diff --git a/packages/nodes-base/nodes/Form/Form.node.ts b/packages/nodes-base/nodes/Form/Form.node.ts index b6f0d852c0af1..9c50dc988dda5 100644 --- a/packages/nodes-base/nodes/Form/Form.node.ts +++ b/packages/nodes-base/nodes/Form/Form.node.ts @@ -19,9 +19,9 @@ import { WAIT_INDEFINITELY, } from 'n8n-workflow'; +import { type CompletionPageConfig } from './interfaces'; import { formDescription, formFields, formTitle } from '../Form/common.descriptions'; import { prepareFormReturnItem, renderForm, resolveRawData } from '../Form/utils'; -import { type CompletionPageConfig } from './interfaces'; export const formFieldsProperties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Form/FormTrigger.node.ts b/packages/nodes-base/nodes/Form/FormTrigger.node.ts index a486d1b72749a..1ee1399aa00a9 100644 --- a/packages/nodes-base/nodes/Form/FormTrigger.node.ts +++ b/packages/nodes-base/nodes/Form/FormTrigger.node.ts @@ -1,5 +1,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow'; import { VersionedNodeType } from 'n8n-workflow'; + import { FormTriggerV1 } from './v1/FormTriggerV1.node'; import { FormTriggerV2 } from './v2/FormTriggerV2.node'; diff --git a/packages/nodes-base/nodes/Form/common.descriptions.ts b/packages/nodes-base/nodes/Form/common.descriptions.ts index fe777edd83384..ad66330c275dc 100644 --- a/packages/nodes-base/nodes/Form/common.descriptions.ts +++ b/packages/nodes-base/nodes/Form/common.descriptions.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { appendAttributionOption } from '../../utils/descriptions'; export const webhookPath: INodeProperties = { diff --git a/packages/nodes-base/nodes/Form/test/utils.test.ts b/packages/nodes-base/nodes/Form/test/utils.test.ts index 3cd71b9a926d7..455e288ec784a 100644 --- a/packages/nodes-base/nodes/Form/test/utils.test.ts +++ b/packages/nodes-base/nodes/Form/test/utils.test.ts @@ -1,11 +1,12 @@ import { mock } from 'jest-mock-extended'; +import { DateTime } from 'luxon'; import type { FormFieldsParameter, INode, IWebhookFunctions, MultiPartFormData, } from 'n8n-workflow'; -import { DateTime } from 'luxon'; + import { formWebhook, prepareFormData, prepareFormReturnItem, resolveRawData } from '../utils'; describe('FormTrigger, formWebhook', () => { diff --git a/packages/nodes-base/nodes/Form/utils.ts b/packages/nodes-base/nodes/Form/utils.ts index 8eb4a8d3a5e5c..87dda98f8862d 100644 --- a/packages/nodes-base/nodes/Form/utils.ts +++ b/packages/nodes-base/nodes/Form/utils.ts @@ -1,3 +1,6 @@ +import type { Response } from 'express'; +import isbot from 'isbot'; +import { DateTime } from 'luxon'; import type { INodeExecutionData, MultiPartFormData, @@ -16,15 +19,10 @@ import { import type { FormTriggerData, FormTriggerInput } from './interfaces'; import { FORM_TRIGGER_AUTHENTICATION_PROPERTY } from './interfaces'; - +import { getResolvables } from '../../utils/utilities'; import { WebhookAuthorizationError } from '../Webhook/error'; import { validateWebhookAuthentication } from '../Webhook/utils'; -import { DateTime } from 'luxon'; -import isbot from 'isbot'; -import type { Response } from 'express'; -import { getResolvables } from '../../utils/utilities'; - export function prepareFormData({ formTitle, formDescription, diff --git a/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts b/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts index 7e09170d6a04c..da813c758d08c 100644 --- a/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts +++ b/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts @@ -9,7 +9,6 @@ import { type IWebhookFunctions, } from 'n8n-workflow'; -import { formWebhook } from '../utils'; import { appendAttributionToForm, formDescription, @@ -21,6 +20,7 @@ import { webhookPath, } from '../common.descriptions'; import { FORM_TRIGGER_AUTHENTICATION_PROPERTY } from '../interfaces'; +import { formWebhook } from '../utils'; const useWorkflowTimezone: INodeProperties = { displayName: 'Use Workflow Timezone', diff --git a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts index 67046175a2d46..1345725a69fa3 100644 --- a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts +++ b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts @@ -9,6 +9,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import { contactFields, contactOperations } from './ContactDescription'; +import type { ICreateContactBody } from './ContactInterface'; import { capitalize, freshdeskApiRequest, @@ -16,10 +18,6 @@ import { // validateJSON, } from './GenericFunctions'; -import type { ICreateContactBody } from './ContactInterface'; - -import { contactFields, contactOperations } from './ContactDescription'; - const enum Status { Open = 2, Pending = 3, diff --git a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts index 3a1fafc6e0e14..d2dd220e041a5 100644 --- a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts +++ b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts @@ -1,3 +1,4 @@ +import { tz } from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,21 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { tz } from 'moment-timezone'; -import { - adjustAddress, - adjustAgentRoles, - formatFilters, - freshserviceApiRequest, - handleListing, - sanitizeAssignmentScopeGroup, - toArray, - toOptions, - toUserOptions, - validateAssignmentScopeGroup, - validateUpdateFields, -} from './GenericFunctions'; - import { agentFields, agentGroupFields, @@ -56,7 +42,19 @@ import { ticketFields, ticketOperations, } from './descriptions'; - +import { + adjustAddress, + adjustAgentRoles, + formatFilters, + freshserviceApiRequest, + handleListing, + sanitizeAssignmentScopeGroup, + toArray, + toOptions, + toUserOptions, + validateAssignmentScopeGroup, + validateUpdateFields, +} from './GenericFunctions'; import type { AddressFixedCollection, LoadedResource, LoadedUser, RolesParameter } from './types'; export class Freshservice implements INodeType { diff --git a/packages/nodes-base/nodes/Freshservice/GenericFunctions.ts b/packages/nodes-base/nodes/Freshservice/GenericFunctions.ts index 558a34c125ab9..359d6e1b4d3e3 100644 --- a/packages/nodes-base/nodes/Freshservice/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Freshservice/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { omit } from 'lodash'; import type { IExecuteFunctions, IHookFunctions, @@ -9,7 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import { omit } from 'lodash'; import type { AddressFixedCollection, FreshserviceCredentials, @@ -24,9 +24,7 @@ export async function freshserviceApiRequest( body: IDataObject = {}, qs: IDataObject = {}, ) { - const { apiKey, domain } = (await this.getCredentials( - 'freshserviceApi', - )) as FreshserviceCredentials; + const { apiKey, domain } = await this.getCredentials('freshserviceApi'); const encodedApiKey = Buffer.from(`${apiKey}:X`).toString('base64'); const options: IRequestOptions = { diff --git a/packages/nodes-base/nodes/Freshservice/descriptions/RequesterDescription.ts b/packages/nodes-base/nodes/Freshservice/descriptions/RequesterDescription.ts index 4a7bd830ef693..1d1e508a182bb 100644 --- a/packages/nodes-base/nodes/Freshservice/descriptions/RequesterDescription.ts +++ b/packages/nodes-base/nodes/Freshservice/descriptions/RequesterDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { LANGUAGES } from '../constants'; export const requesterOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts index c6e828ed291b5..3e8a246fbdf13 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts @@ -1,3 +1,4 @@ +import { tz } from 'moment-timezone'; import { type IExecuteFunctions, type IDataObject, @@ -8,17 +9,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { tz } from 'moment-timezone'; -import { - adjustAccounts, - adjustAttendees, - freshworksCrmApiRequest, - getAllItemsViewId, - handleListing, - loadResource, - throwOnEmptyUpdate, -} from './GenericFunctions'; - import { accountFields, accountOperations, @@ -37,7 +27,15 @@ import { taskFields, taskOperations, } from './descriptions'; - +import { + adjustAccounts, + adjustAttendees, + freshworksCrmApiRequest, + getAllItemsViewId, + handleListing, + loadResource, + throwOnEmptyUpdate, +} from './GenericFunctions'; import type { FreshworksConfigResponse, LoadedCurrency, LoadedUser, LoadOption } from './types'; export class FreshworksCrm implements INodeType { diff --git a/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts b/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts index 0d9e7fad2c029..e34aa8e160c7a 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts @@ -1,3 +1,4 @@ +import omit from 'lodash/omit'; import type { IExecuteFunctions, IDataObject, @@ -8,7 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import omit from 'lodash/omit'; import type { FreshworksConfigResponse, FreshworksCrmApiCredentials, diff --git a/packages/nodes-base/nodes/FreshworksCrm/descriptions/AppointmentDescription.ts b/packages/nodes-base/nodes/FreshworksCrm/descriptions/AppointmentDescription.ts index 65228c1c75008..32922cb93c5db 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/descriptions/AppointmentDescription.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/descriptions/AppointmentDescription.ts @@ -1,5 +1,4 @@ import { tz } from 'moment-timezone'; - import type { INodeProperties } from 'n8n-workflow'; export const appointmentOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index d9c8a94b42abc..682eee343c2fe 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -1,10 +1,4 @@ import { createWriteStream } from 'fs'; -import { basename, dirname } from 'path'; -import type { Readable } from 'stream'; -import { pipeline } from 'stream/promises'; -import { file as tmpFile } from 'tmp-promise'; -import ftpClient from 'promise-ftp'; -import sftpClient from 'ssh2-sftp-client'; import { BINARY_ENCODING, NodeApiError, NodeConnectionType } from 'n8n-workflow'; import type { ICredentialDataDecryptedObject, @@ -18,6 +12,13 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; +import { basename, dirname } from 'path'; +import ftpClient from 'promise-ftp'; +import sftpClient from 'ssh2-sftp-client'; +import type { Readable } from 'stream'; +import { pipeline } from 'stream/promises'; +import { file as tmpFile } from 'tmp-promise'; + import { formatPrivateKey, generatePairedItemData } from '@utils/utilities'; interface ReturnFtpItem { diff --git a/packages/nodes-base/nodes/Function/Function.node.ts b/packages/nodes-base/nodes/Function/Function.node.ts index 4819e27642925..8c56b98e6b2e5 100644 --- a/packages/nodes-base/nodes/Function/Function.node.ts +++ b/packages/nodes-base/nodes/Function/Function.node.ts @@ -9,6 +9,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, deepCopy, NodeOperationError } from 'n8n-workflow'; + import { vmResolver } from '../Code/JavaScriptSandbox'; export class Function implements INodeType { diff --git a/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts b/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts index 9f08f05c8e987..f033930298137 100644 --- a/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts +++ b/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts @@ -10,6 +10,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, deepCopy, NodeOperationError } from 'n8n-workflow'; + import { vmResolver } from '../Code/JavaScriptSandbox'; export class FunctionItem implements INodeType { diff --git a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts index 6bdf841944147..74a54e61d2cb3 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,10 +10,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { getresponseApiRequest, getResponseApiRequestAllItems } from './GenericFunctions'; - import { contactFields, contactOperations } from './ContactDescription'; +import { getresponseApiRequest, getResponseApiRequestAllItems } from './GenericFunctions'; export class GetResponse implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Ghost/Ghost.node.ts b/packages/nodes-base/nodes/Ghost/Ghost.node.ts index 1ed2381045702..a28e40ae5d400 100644 --- a/packages/nodes-base/nodes/Ghost/Ghost.node.ts +++ b/packages/nodes-base/nodes/Ghost/Ghost.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,9 +10,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { ghostApiRequest, ghostApiRequestAllItems, validateJSON } from './GenericFunctions'; - import { postFields, postOperations } from './PostDescription'; export class Ghost implements INodeType { diff --git a/packages/nodes-base/nodes/Git/Git.node.ts b/packages/nodes-base/nodes/Git/Git.node.ts index e89edb1b90cc8..75b2631cbd745 100644 --- a/packages/nodes-base/nodes/Git/Git.node.ts +++ b/packages/nodes-base/nodes/Git/Git.node.ts @@ -1,5 +1,4 @@ import { access, mkdir } from 'fs/promises'; -import { URL } from 'url'; import type { IExecuteFunctions, INodeExecutionData, @@ -7,9 +6,10 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; - import type { LogOptions, SimpleGit, SimpleGitOptions } from 'simple-git'; import simpleGit from 'simple-git'; +import { URL } from 'url'; + import { addConfigFields, addFields, diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts index cbbfe623312a0..07b6826bb71e6 100644 --- a/packages/nodes-base/nodes/Github/Github.node.ts +++ b/packages/nodes-base/nodes/Github/Github.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IDataObject, IExecuteFunctions, @@ -8,7 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { getFileSha, githubApiRequest, diff --git a/packages/nodes-base/nodes/Github/SearchFunctions.ts b/packages/nodes-base/nodes/Github/SearchFunctions.ts index 7c2d5fed2ad64..ff77121464723 100644 --- a/packages/nodes-base/nodes/Github/SearchFunctions.ts +++ b/packages/nodes-base/nodes/Github/SearchFunctions.ts @@ -3,6 +3,7 @@ import type { INodeListSearchItems, INodeListSearchResult, } from 'n8n-workflow'; + import { githubApiRequest } from './GenericFunctions'; type UserSearchItem = { diff --git a/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts b/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts index 6748ad78d8a39..da0ac5f1cddd4 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts @@ -1,3 +1,5 @@ +import * as losslessJSON from 'lossless-json'; +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -10,10 +12,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -import * as losslessJSON from 'lossless-json'; - function convertLosslessNumber(_: any, value: any) { if (value?.isLosslessNumber) { return value.toString(); diff --git a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts index cd8c57c00f702..96acec9be6742 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts @@ -1,3 +1,7 @@ +import isEmpty from 'lodash/isEmpty'; +import omit from 'lodash/omit'; +import moment from 'moment-timezone'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, IDataObject, @@ -7,22 +11,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - -import isEmpty from 'lodash/isEmpty'; -import omit from 'lodash/omit'; -import moment from 'moment-timezone'; -import { - goToWebinarApiRequest, - goToWebinarApiRequestAllItems, - handleGetAll, - loadAnswers, - loadRegistranMultiChoiceQuestions, - loadRegistranSimpleQuestions, - loadWebinars, - loadWebinarSessions, -} from './GenericFunctions'; import { attendeeFields, attendeeOperations, @@ -37,6 +26,16 @@ import { webinarFields, webinarOperations, } from './descriptions'; +import { + goToWebinarApiRequest, + goToWebinarApiRequestAllItems, + handleGetAll, + loadAnswers, + loadRegistranMultiChoiceQuestions, + loadRegistranSimpleQuestions, + loadWebinars, + loadWebinarSessions, +} from './GenericFunctions'; export class GoToWebinar implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Gong/test/Gong.node.test.ts b/packages/nodes-base/nodes/Gong/test/Gong.node.test.ts index d4e3e307fd7a5..cee940a5cd7e7 100644 --- a/packages/nodes-base/nodes/Gong/test/Gong.node.test.ts +++ b/packages/nodes-base/nodes/Gong/test/Gong.node.test.ts @@ -1,6 +1,3 @@ -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; -import * as Helpers from '@test/nodes/Helpers'; -import type { WorkflowTestData } from '@test/nodes/types'; import type { ICredentialDataDecryptedObject, IDataObject, @@ -9,6 +6,10 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import nock from 'nock'; +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; +import * as Helpers from '@test/nodes/Helpers'; +import type { WorkflowTestData } from '@test/nodes/types'; + import { gongApiResponse, gongNodeResponse } from './mocks'; import { FAKE_CREDENTIALS_DATA } from '../../../test/nodes/FakeCredentialsMap'; diff --git a/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts b/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts index 72a07b2f64eba..bc3da66d63523 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IExecuteFunctions, type IDataObject, @@ -11,13 +12,12 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { reportFields, reportOperations } from './ReportDescription'; -import { userActivityFields, userActivityOperations } from './UserActivityDescription'; +import { oldVersionNotice } from '@utils/descriptions'; + import { googleApiRequest, googleApiRequestAllItems, merge, simplify } from './GenericFunctions'; import type { IData } from './Interfaces'; - -import { oldVersionNotice } from '@utils/descriptions'; +import { reportFields, reportOperations } from './ReportDescription'; +import { userActivityFields, userActivityOperations } from './UserActivityDescription'; const versionDescription: INodeTypeDescription = { displayName: 'Google Analytics', diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/GoogleAnalyticsV2.node.ts b/packages/nodes-base/nodes/Google/Analytics/v2/GoogleAnalyticsV2.node.ts index 7c42fdc246b72..1988e4e9889d2 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/GoogleAnalyticsV2.node.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/GoogleAnalyticsV2.node.ts @@ -5,9 +5,10 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { listSearch, loadOptions } from './methods'; + import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; +import { listSearch, loadOptions } from './methods'; export class GoogleAnalyticsV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/Report.resource.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/Report.resource.ts index 52fbee06eb5a4..49e14b91ec1d7 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/Report.resource.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/Report.resource.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as getga4 from './get.ga4.operation'; import * as getuniversal from './get.universal.operation'; diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.ga4.operation.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.ga4.operation.ts index 2faea66ef0a91..738b5bc5470fb 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.ga4.operation.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.ga4.operation.ts @@ -4,6 +4,13 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { + dimensionDropdown, + dimensionFilterField, + metricDropdown, + metricsFilterField, +} from './FiltersDescription'; import { checkDuplicates, defaultEndDate, @@ -13,12 +20,6 @@ import { simplifyGA4, } from '../../helpers/utils'; import { googleApiRequest, googleApiRequestAllItems } from '../../transport'; -import { - dimensionDropdown, - dimensionFilterField, - metricDropdown, - metricsFilterField, -} from './FiltersDescription'; export const description: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.universal.operation.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.universal.operation.ts index 4027277123f90..df24f6bb126e2 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.universal.operation.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/report/get.universal.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import type { IData, IDimension, IMetric } from '../../helpers/Interfaces'; import { checkDuplicates, diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts index 1d9cae99009a1..da3aa6526082f 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts @@ -2,8 +2,8 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; import type { GoogleAnalytics, ReportBasedOnProperty } from './node.type'; -import * as userActivity from './userActivity/UserActivity.resource'; import * as report from './report/Report.resource'; +import * as userActivity from './userActivity/UserActivity.resource'; export async function router(this: IExecuteFunctions): Promise { const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/UserActivity.resource.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/UserActivity.resource.ts index bbb7e3613e577..11070dbc5b332 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/UserActivity.resource.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/UserActivity.resource.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as search from './search.operation'; export { search }; diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/search.operation.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/search.operation.ts index 2fc8c9c368463..4c28b86139047 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/search.operation.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/userActivity/search.operation.ts @@ -4,6 +4,7 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + import { googleApiRequest, googleApiRequestAllItems } from '../../transport'; export const description: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/versionDescription.ts index 773eee9afb68a..fad6dfaa6514e 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/versionDescription.ts @@ -1,7 +1,8 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import * as userActivity from './userActivity/UserActivity.resource'; + import * as report from './report/Report.resource'; +import * as userActivity from './userActivity/UserActivity.resource'; export const versionDescription: INodeTypeDescription = { displayName: 'Google Analytics', diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/helpers/utils.ts b/packages/nodes-base/nodes/Google/Analytics/v2/helpers/utils.ts index d0fcde930d32d..4de28b9ca180c 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/helpers/utils.ts @@ -1,3 +1,4 @@ +import { DateTime } from 'luxon'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -6,7 +7,6 @@ import type { INodePropertyOptions, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { DateTime } from 'luxon'; // tslint:disable-next-line:no-any export function simplify(responseData: any | [any]) { diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Google/Analytics/v2/methods/listSearch.ts index ea060139bed9a..13b394b4a3ba9 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/methods/listSearch.ts @@ -3,6 +3,7 @@ import type { INodeListSearchItems, INodeListSearchResult, } from 'n8n-workflow'; + import { sortLoadOptions } from '../helpers/utils'; import { googleApiRequest } from '../transport'; diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Google/Analytics/v2/methods/loadOptions.ts index 8a3ceffad121d..084c68efbee0b 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/methods/loadOptions.ts @@ -1,4 +1,5 @@ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; + import { sortLoadOptions } from '../helpers/utils'; import { googleApiRequest } from '../transport'; diff --git a/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/executeQuery.test.ts b/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/executeQuery.test.ts index f7a0965d3d2ac..542f3206b1509 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/executeQuery.test.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/executeQuery.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../v2/transport'; jest.mock('../../../v2/transport', () => { const originalModule = jest.requireActual('../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.autoMapMode.test.ts b/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.autoMapMode.test.ts index 4ee4627838cce..6a8effcb81835 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.autoMapMode.test.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.autoMapMode.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../v2/transport'; jest.mock('../../../v2/transport', () => { const originalModule = jest.requireActual('../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.manualMode.test.ts b/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.manualMode.test.ts index f4d94dda8b963..4be27d3b3e475 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.manualMode.test.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/test/v2/node/insert.manualMode.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../v2/transport'; jest.mock('../../../v2/transport', () => { const originalModule = jest.requireActual('../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Google/BigQuery/test/v2/utils/utils.test.ts b/packages/nodes-base/nodes/Google/BigQuery/test/v2/utils/utils.test.ts index 454831014025d..1a8b53c80ab87 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/test/v2/utils/utils.test.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/test/v2/utils/utils.test.ts @@ -1,6 +1,7 @@ -import type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow'; -import { constructExecutionMetaData } from 'n8n-core'; import { mock } from 'jest-mock-extended'; +import { constructExecutionMetaData } from 'n8n-core'; +import type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow'; + import { prepareOutput } from '../../../v2/helpers/utils'; describe('Google BigQuery v2 Utils', () => { diff --git a/packages/nodes-base/nodes/Google/BigQuery/v1/GenericFunctions.ts b/packages/nodes-base/nodes/Google/BigQuery/v1/GenericFunctions.ts index d4456f318b2ca..cd2fa59d38b1e 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v1/GenericFunctions.ts @@ -7,6 +7,7 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; + import { getGoogleAccessToken } from '../../GenericFunctions'; export async function googleApiRequest( diff --git a/packages/nodes-base/nodes/Google/BigQuery/v1/GoogleBigQueryV1.node.ts b/packages/nodes-base/nodes/Google/BigQuery/v1/GoogleBigQueryV1.node.ts index 2d29b89ce70b7..160360ede3016 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v1/GoogleBigQueryV1.node.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v1/GoogleBigQueryV1.node.ts @@ -10,15 +10,14 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; - import { v4 as uuid } from 'uuid'; -import { generatePairedItemData } from '../../../../utils/utilities'; -import { googleApiRequest, googleApiRequestAllItems, simplify } from './GenericFunctions'; - -import { recordFields, recordOperations } from './RecordDescription'; import { oldVersionNotice } from '@utils/descriptions'; +import { googleApiRequest, googleApiRequestAllItems, simplify } from './GenericFunctions'; +import { recordFields, recordOperations } from './RecordDescription'; +import { generatePairedItemData } from '../../../../utils/utilities'; + const versionDescription: INodeTypeDescription = { displayName: 'Google BigQuery', name: 'googleBigQuery', diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/GoogleBigQueryV2.node.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/GoogleBigQueryV2.node.ts index 9d55d463288a4..b3276e6904b54 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/GoogleBigQueryV2.node.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/GoogleBigQueryV2.node.ts @@ -6,9 +6,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { loadOptions, listSearch } from './methods'; -import { versionDescription } from './actions/versionDescription'; import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; +import { loadOptions, listSearch } from './methods'; export class GoogleBigQueryV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/Database.resource.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/Database.resource.ts index 76aa6d612f2db..7686c890cf2aa 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/Database.resource.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/Database.resource.ts @@ -1,7 +1,8 @@ import type { INodeProperties } from 'n8n-workflow'; -import { datasetRLC, projectRLC, tableRLC } from '../commonDescriptions/RLC.description'; -import * as insert from './insert.operation'; + import * as executeQuery from './executeQuery.operation'; +import * as insert from './insert.operation'; +import { datasetRLC, projectRLC, tableRLC } from '../commonDescriptions/RLC.description'; export { executeQuery, insert }; diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.ts index a361a3517e318..38dcb91f3a520 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.ts @@ -4,13 +4,13 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; - import { ApplicationError, NodeOperationError, sleep } from 'n8n-workflow'; -import type { ResponseWithJobReference } from '../../helpers/interfaces'; +import { getResolvables, updateDisplayOptions } from '@utils/utilities'; + +import type { ResponseWithJobReference } from '../../helpers/interfaces'; import { prepareOutput } from '../../helpers/utils'; import { googleBigQueryApiRequestAllItems, googleBigQueryApiRequest } from '../../transport'; -import { getResolvables, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/insert.operation.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/insert.operation.ts index 18d53996c1c9a..c0c197d96b533 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/insert.operation.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/database/insert.operation.ts @@ -6,10 +6,12 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; + +import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities'; + import type { TableSchema } from '../../helpers/interfaces'; import { checkSchema, wrapData } from '../../helpers/utils'; import { googleBigQueryApiRequest } from '../../transport'; -import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/router.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/router.ts index 9b6d45aa245a5..96276b487b0c3 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/router.ts @@ -1,8 +1,8 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { GoogleBigQuery } from './node.type'; import * as record from './database/Database.resource'; +import type { GoogleBigQuery } from './node.type'; export async function router(this: IExecuteFunctions): Promise { const resource = this.getNodeParameter('resource', 0); diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/versionDescription.ts index 202c26d88c70c..8e30e9ac1f2db 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/actions/versionDescription.ts @@ -1,5 +1,6 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; + import * as database from './database/Database.resource'; export const versionDescription: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/helpers/utils.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/helpers/utils.ts index 34fd023c6e2e1..5030a846b248c 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/helpers/utils.ts @@ -1,6 +1,7 @@ import { DateTime } from 'luxon'; import type { IDataObject, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { jsonParse, NodeOperationError } from 'n8n-workflow'; + import type { SchemaField, TableRawData, TableSchema } from './interfaces'; function getFieldValue(schemaField: SchemaField, field: IDataObject, parseTimestamps = false) { diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/methods/listSearch.ts index 2fb7cae03b3c7..1d0ccc863c4ae 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/methods/listSearch.ts @@ -1,4 +1,5 @@ import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; + import { googleBigQueryApiRequest } from '../transport'; export async function searchProjects( diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/methods/loadOptions.ts index 7b69f91570510..91e6f694c7cd5 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/methods/loadOptions.ts @@ -1,4 +1,5 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; + import { googleBigQueryApiRequest } from '../transport'; export async function getDatasets(this: ILoadOptionsFunctions): Promise { diff --git a/packages/nodes-base/nodes/Google/BigQuery/v2/transport/index.ts b/packages/nodes-base/nodes/Google/BigQuery/v2/transport/index.ts index 0f121b2a09259..91359dd35d6c3 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v2/transport/index.ts @@ -7,6 +7,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; + import { getGoogleAccessToken } from '../../../GenericFunctions'; export async function googleBigQueryApiRequest( diff --git a/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts index 7b64332747398..4f66901ae2f96 100644 --- a/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts @@ -7,6 +7,7 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + import { getGoogleAccessToken } from '../GenericFunctions'; export async function googleApiRequest( diff --git a/packages/nodes-base/nodes/Google/Calendar/CalendarDescription.ts b/packages/nodes-base/nodes/Google/Calendar/CalendarDescription.ts index 68725c010ecca..d2d2950f17193 100644 --- a/packages/nodes-base/nodes/Google/Calendar/CalendarDescription.ts +++ b/packages/nodes-base/nodes/Google/Calendar/CalendarDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { TIMEZONE_VALIDATION_REGEX } from './GenericFunctions'; export const calendarOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts index 140eddc9e8c25..f440efaee9d4b 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -10,8 +11,6 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; - -import moment from 'moment-timezone'; import { RRule } from 'rrule'; export async function googleApiRequest( diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts index 93866afaf9f7c..189f737888623 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,9 +10,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; - -import moment from 'moment-timezone'; import { v4 as uuid } from 'uuid'; + +import { calendarFields, calendarOperations } from './CalendarDescription'; +import { eventFields, eventOperations } from './EventDescription'; +import type { IEvent } from './EventInterface'; import { addNextOccurrence, addTimezoneToDate, @@ -22,12 +25,6 @@ import { googleApiRequestAllItems, } from './GenericFunctions'; -import { eventFields, eventOperations } from './EventDescription'; - -import { calendarFields, calendarOperations } from './CalendarDescription'; - -import type { IEvent } from './EventInterface'; - export class GoogleCalendar implements INodeType { description: INodeTypeDescription = { displayName: 'Google Calendar', @@ -536,7 +533,7 @@ export class GoogleCalendar implements INodeType { body.attendees?.push(attendee); }); } - (attendees as string[]).forEach((attendee) => { + attendees.forEach((attendee) => { body.attendees!.push.apply( body.attendees, attendee diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts index 30c890487aa2f..5a6f1fab7dd59 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, INodeExecutionData, @@ -7,8 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - import { encodeURIComponentOnce, getCalendars, diff --git a/packages/nodes-base/nodes/Google/Calendar/test/node/event.update.test.ts b/packages/nodes-base/nodes/Google/Calendar/test/node/event.update.test.ts index 39fa8a3b0a1b5..b242c73063c61 100644 --- a/packages/nodes-base/nodes/Google/Calendar/test/node/event.update.test.ts +++ b/packages/nodes-base/nodes/Google/Calendar/test/node/event.update.test.ts @@ -2,9 +2,8 @@ import type { MockProxy } from 'jest-mock-extended'; import { mock } from 'jest-mock-extended'; import type { INode, IExecuteFunctions } from 'n8n-workflow'; -import { GoogleCalendar } from '../../GoogleCalendar.node'; - import * as genericFunctions from '../../GenericFunctions'; +import { GoogleCalendar } from '../../GoogleCalendar.node'; jest.mock('../../GenericFunctions', () => ({ getTimezones: jest.fn(), diff --git a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts index 4501b7b7df3a9..7a66126762c16 100644 --- a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts +++ b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts @@ -1,3 +1,5 @@ +import jwt from 'jsonwebtoken'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, ICredentialsDecrypted, @@ -13,10 +15,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import jwt from 'jsonwebtoken'; -import type { IMessage, IMessageUi } from './MessageInterface'; - import { // attachmentFields, // attachmentOperations, @@ -31,8 +29,8 @@ import { spaceFields, spaceOperations, } from './descriptions'; - import { googleApiRequest, googleApiRequestAllItems, validateJSON } from './GenericFunctions'; +import type { IMessage, IMessageUi } from './MessageInterface'; export class GoogleChat implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts index 25c7ad6266593..674302b3d021b 100644 --- a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts +++ b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts @@ -6,9 +6,8 @@ import { type INodeTypeDescription, } from 'n8n-workflow'; -import type { IData } from './Interface'; - import { googleApiRequest } from './GenericFunctions'; +import type { IData } from './Interface'; export class GoogleCloudNaturalLanguage implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts b/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts index a4378515b96c0..0ccf88ee8b2e5 100644 --- a/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts +++ b/packages/nodes-base/nodes/Google/CloudStorage/ObjectDescription.ts @@ -1,4 +1,3 @@ -import type { Readable } from 'stream'; import FormData from 'form-data'; import { BINARY_ENCODING, @@ -6,6 +5,7 @@ import { type INodeExecutionData, type INodeProperties, } from 'n8n-workflow'; +import type { Readable } from 'stream'; // Define these because we'll be using them in two separate places const metagenerationFilters: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts b/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts index 7b2bfa361678a..a6da7b13fbe35 100644 --- a/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts +++ b/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,7 +10,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; +import { contactFields, contactOperations } from './ContactDescription'; import { allFields, cleanData, @@ -17,8 +18,6 @@ import { googleApiRequestAllItems, } from './GenericFunctions'; -import { contactFields, contactOperations } from './ContactDescription'; - export class GoogleContacts implements INodeType { description: INodeTypeDescription = { displayName: 'Google Contacts', diff --git a/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts b/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts index 2c5fb28682ee8..f8647cabda4d6 100644 --- a/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts +++ b/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts @@ -10,6 +10,7 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; +import { documentFields, documentOperations } from './DocumentDescription'; import { extractID, googleApiRequest, @@ -17,9 +18,6 @@ import { hasKeys, upperFirst, } from './GenericFunctions'; - -import { documentFields, documentOperations } from './DocumentDescription'; - import type { IUpdateBody, IUpdateFields } from './interfaces'; export class GoogleDocs implements INodeType { diff --git a/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts b/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts index 68c04b8799d5a..b41d548796275 100644 --- a/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IPollFunctions, IDataObject, @@ -9,10 +10,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants'; import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions'; import { fileSearch, folderSearch } from './v2/methods/listSearch'; +import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants'; export class GoogleDriveTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/create.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/create.test.ts index 42a17bfdad3cb..7053c241656fd 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/create.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/create.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as create from '../../../../v2/actions/drive/create.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/deleteDrive.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/deleteDrive.test.ts index b249195a8a12e..05b5002ab58bd 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/deleteDrive.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/deleteDrive.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as deleteDrive from '../../../../v2/actions/drive/deleteDrive.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/get.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/get.test.ts index 55cb301fcca05..128b74a2201cd 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/get.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/get.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as get from '../../../../v2/actions/drive/get.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/list.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/list.test.ts index 8865e7b303365..ca8e6deb10adb 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/list.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/list.test.ts @@ -1,10 +1,8 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; import * as list from '../../../../v2/actions/drive/list.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/update.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/update.test.ts index d60521cf0057f..afa01998b8229 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/update.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/drive/update.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as update from '../../../../v2/actions/drive/update.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts index ddc4891cbf0ee..18812ba157db8 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/copy.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as copy from '../../../../v2/actions/file/copy.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts index 040c9aa8806c0..5fc45c8d9827d 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/createFromText.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as createFromText from '../../../../v2/actions/file/createFromText.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts index cbfd2edf6b70b..13fb7ae791569 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/deleteFile.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as deleteFile from '../../../../v2/actions/file/deleteFile.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/download.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/download.test.ts index 3061f74953418..e7f4be6294678 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/download.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/download.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as download from '../../../../v2/actions/file/download.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts index 51196a28581ec..03498e06ec784 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/move.test.ts @@ -1,10 +1,8 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; import * as move from '../../../../v2/actions/file/move.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts index c7111f4e94bfc..e8ed98a124155 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/share.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as share from '../../../../v2/actions/file/share.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts index 868f727a47e3a..a8dbfa55708a8 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/update.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as update from '../../../../v2/actions/file/update.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts index 80446db6ce91c..fa39890cb78e3 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/file/upload.test.ts @@ -1,11 +1,9 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; import * as upload from '../../../../v2/actions/file/upload.operation'; - -import * as transport from '../../../../v2/transport'; import * as utils from '../../../../v2/helpers/utils'; - +import * as transport from '../../../../v2/transport'; import { createMockExecuteFunction, createTestStream, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/fileFolder/search.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/fileFolder/search.test.ts index f971edfc30ff7..630bd9469defc 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/fileFolder/search.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/fileFolder/search.test.ts @@ -1,10 +1,8 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; import * as search from '../../../../v2/actions/fileFolder/search.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/create.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/create.test.ts index ec3c17b287aef..26855b6e5c47d 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/create.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/create.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as create from '../../../../v2/actions/folder/create.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/deleteFolder.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/deleteFolder.test.ts index 36c2f0abc265a..ed486720f9be6 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/deleteFolder.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/deleteFolder.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as deleteFolder from '../../../../v2/actions/folder/deleteFolder.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/share.test.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/share.test.ts index 0f1692caac822..4940b6b90af62 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/share.test.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/folder/share.test.ts @@ -1,9 +1,7 @@ import nock from 'nock'; import * as share from '../../../../v2/actions/folder/share.operation'; - import * as transport from '../../../../v2/transport'; - import { createMockExecuteFunction, driveNode } from '../helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Google/Drive/test/v2/node/helpers.ts b/packages/nodes-base/nodes/Google/Drive/test/v2/node/helpers.ts index 522f28afdb081..780de933af3ae 100644 --- a/packages/nodes-base/nodes/Google/Drive/test/v2/node/helpers.ts +++ b/packages/nodes-base/nodes/Google/Drive/test/v2/node/helpers.ts @@ -1,7 +1,6 @@ -import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; - import { get } from 'lodash'; import { constructExecutionMetaData, returnJsonArray } from 'n8n-core'; +import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; import { Readable } from 'stream'; export const driveNode: INode = { diff --git a/packages/nodes-base/nodes/Google/Drive/v1/GoogleDriveV1.node.ts b/packages/nodes-base/nodes/Google/Drive/v1/GoogleDriveV1.node.ts index f34426e065eec..61e510ccbeca3 100644 --- a/packages/nodes-base/nodes/Google/Drive/v1/GoogleDriveV1.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/v1/GoogleDriveV1.node.ts @@ -1,4 +1,3 @@ -import type { Readable } from 'stream'; import type { IBinaryKeyData, IDataObject, @@ -9,15 +8,15 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow'; - +import type { Readable } from 'stream'; import { v4 as uuid } from 'uuid'; -import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../constants'; -import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; - -import { driveSearch, fileSearch, folderSearch } from './SearchFunctions'; import { oldVersionNotice } from '@utils/descriptions'; +import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; +import { driveSearch, fileSearch, folderSearch } from './SearchFunctions'; +import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../constants'; + const UPLOAD_CHUNK_SIZE = 256 * 1024; const versionDescription: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/Drive/v1/SearchFunctions.ts b/packages/nodes-base/nodes/Google/Drive/v1/SearchFunctions.ts index 41c4da16ea87f..fa6f3894c864f 100644 --- a/packages/nodes-base/nodes/Google/Drive/v1/SearchFunctions.ts +++ b/packages/nodes-base/nodes/Google/Drive/v1/SearchFunctions.ts @@ -1,4 +1,5 @@ import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; + import { googleApiRequest } from './GenericFunctions'; interface GoogleDriveFilesItem { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/GoogleDriveV2.node.ts b/packages/nodes-base/nodes/Google/Drive/v2/GoogleDriveV2.node.ts index 5e147d81bf235..d2b7e5fa6b79c 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/GoogleDriveV2.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/GoogleDriveV2.node.ts @@ -5,9 +5,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; +import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; import { listSearch } from './methods'; -import { router } from './actions/router'; export class GoogleDriveV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/common.descriptions.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/common.descriptions.ts index acdd2780d186f..773f1cf9c3a49 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/common.descriptions.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/common.descriptions.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { DRIVE, RLC_DRIVE_DEFAULT } from '../helpers/interfaces'; + import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../../constants'; +import { DRIVE, RLC_DRIVE_DEFAULT } from '../helpers/interfaces'; export const fileRLC: INodeProperties = { displayName: 'File', diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/create.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/create.operation.ts index b5f7980c6970c..fe72effcb34a1 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/create.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/create.operation.ts @@ -4,11 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; - import { v4 as uuid } from 'uuid'; -import { googleApiRequest } from '../../transport'; + import { updateDisplayOptions } from '@utils/utilities'; +import { googleApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Name', diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.ts index 1c63a0f1fe642..309d997c4f64c 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.ts @@ -1,8 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { sharedDriveRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/get.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/get.operation.ts index 1ccf2bd745e48..eedbdf5d74626 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/get.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/get.operation.ts @@ -5,9 +5,10 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { sharedDriveRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/list.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/list.operation.ts index d2cd34e901a63..2d6c098f87d82 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/list.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/list.operation.ts @@ -5,9 +5,10 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { googleApiRequest, googleApiRequestAllItems } from '../../transport'; import { updateDisplayOptions } from '@utils/utilities'; +import { googleApiRequest, googleApiRequestAllItems } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Return All', diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/update.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/update.operation.ts index d80be9968ba84..59ba5075a967b 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/update.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/drive/update.operation.ts @@ -5,9 +5,10 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { sharedDriveRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/copy.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/copy.operation.ts index e019c7c55517c..f181b47d81cf3 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/copy.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/copy.operation.ts @@ -6,10 +6,11 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + +import { setParentFolder } from '../../helpers/utils'; import { googleApiRequest } from '../../transport'; import { driveRLC, fileRLC, folderRLC } from '../common.descriptions'; -import { setParentFolder } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/createFromText.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/createFromText.operation.ts index d9c92a972aa35..e89233fcaf91f 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/createFromText.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/createFromText.operation.ts @@ -5,11 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions'; -import { googleApiRequest } from '../../transport'; +import { updateDisplayOptions } from '@utils/utilities'; + import { DRIVE } from '../../helpers/interfaces'; import { setFileProperties, setParentFolder, setUpdateCommonParams } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { googleApiRequest } from '../../transport'; +import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/deleteFile.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/deleteFile.operation.ts index af8f03839d133..cd1aad328c049 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/deleteFile.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/deleteFile.operation.ts @@ -1,8 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { fileRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/download.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/download.operation.ts index 55e1124c58cf7..1f011e5c0738c 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/download.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/download.operation.ts @@ -6,9 +6,10 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { fileRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/move.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/move.operation.ts index d6770f596c963..4c1ab04de99eb 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/move.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/move.operation.ts @@ -5,11 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { driveRLC, fileRLC, folderRLC } from '../common.descriptions'; -import { googleApiRequest } from '../../transport'; -import { setParentFolder } from '../../helpers/utils'; import { updateDisplayOptions } from '@utils/utilities'; +import { setParentFolder } from '../../helpers/utils'; +import { googleApiRequest } from '../../transport'; +import { driveRLC, fileRLC, folderRLC } from '../common.descriptions'; + const properties: INodeProperties[] = [ { ...fileRLC, diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/share.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/share.operation.ts index 93a5fe77d3d21..7fb017ec6ce47 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/share.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/share.operation.ts @@ -5,9 +5,10 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { fileRLC, permissionsOptions, shareOptions } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts index 27f19e8b61922..933fa3b46f53a 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/update.operation.ts @@ -6,6 +6,8 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { getItemBinaryData, prepareQueryString, @@ -14,7 +16,6 @@ import { } from '../../helpers/utils'; import { googleApiRequest } from '../../transport'; import { fileRLC, updateCommonOptions } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/upload.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/upload.operation.ts index f81dc3478e673..c54820477239c 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/file/upload.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/file/upload.operation.ts @@ -5,8 +5,8 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { googleApiRequest } from '../../transport'; -import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; + import { getItemBinaryData, setFileProperties, @@ -14,7 +14,8 @@ import { setParentFolder, processInChunks, } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { googleApiRequest } from '../../transport'; +import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/fileFolder/search.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/fileFolder/search.operation.ts index 8774216197446..36dc97fbb8883 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/fileFolder/search.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/fileFolder/search.operation.ts @@ -5,12 +5,13 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { driveRLC, fileTypesOptions, folderRLC } from '../common.descriptions'; -import { googleApiRequest, googleApiRequestAllItems } from '../../transport'; -import { prepareQueryString, updateDriveScopes } from '../../helpers/utils'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { SearchFilter } from '../../helpers/interfaces'; import { DRIVE, RLC_FOLDER_DEFAULT } from '../../helpers/interfaces'; -import { updateDisplayOptions } from '@utils/utilities'; +import { prepareQueryString, updateDriveScopes } from '../../helpers/utils'; +import { googleApiRequest, googleApiRequestAllItems } from '../../transport'; +import { driveRLC, fileTypesOptions, folderRLC } from '../common.descriptions'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/create.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/create.operation.ts index 9b5e845d9286f..bbe0c24f3dac0 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/create.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/create.operation.ts @@ -5,11 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { googleApiRequest } from '../../transport'; -import { driveRLC, folderRLC } from '../common.descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; + import { DRIVE } from '../../helpers/interfaces'; import { setParentFolder } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { googleApiRequest } from '../../transport'; +import { driveRLC, folderRLC } from '../common.descriptions'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.ts index ed85388da6d9d..f6ef7f51e4713 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.ts @@ -1,8 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { folderNoRootRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/share.operation.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/share.operation.ts index a3908b2c293ef..3b4abfacaf96a 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/share.operation.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/folder/share.operation.ts @@ -5,9 +5,10 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import { googleApiRequest } from '../../transport'; import { folderNoRootRLC, permissionsOptions, shareOptions } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/router.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/router.ts index feffd170d9eb0..917e51e1199d9 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/router.ts @@ -1,12 +1,11 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { GoogleDriveType } from './node.type'; - import * as drive from './drive/Drive.resource'; import * as file from './file/File.resource'; import * as fileFolder from './fileFolder/FileFolder.resource'; import * as folder from './folder/Folder.resource'; +import type { GoogleDriveType } from './node.type'; export async function router(this: IExecuteFunctions): Promise { const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/Google/Drive/v2/helpers/utils.ts b/packages/nodes-base/nodes/Google/Drive/v2/helpers/utils.ts index a31f85beeb20c..aebdf5ae429ea 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/helpers/utils.ts @@ -1,6 +1,6 @@ -import type { Readable } from 'stream'; import type { IDataObject, IExecuteFunctions } from 'n8n-workflow'; import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import type { Readable } from 'stream'; import { RLC_DRIVE_DEFAULT, RLC_FOLDER_DEFAULT, UPLOAD_CHUNK_SIZE } from './interfaces'; diff --git a/packages/nodes-base/nodes/Google/Drive/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Google/Drive/v2/methods/listSearch.ts index c31502cfcc2fe..ec1fc6cf1d616 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/methods/listSearch.ts @@ -4,10 +4,11 @@ import type { INodeListSearchItems, INodeListSearchResult, } from 'n8n-workflow'; -import { googleApiRequest } from '../transport'; + import type { SearchFilter } from '../helpers/interfaces'; import { DRIVE, RLC_DRIVE_DEFAULT, RLC_FOLDER_DEFAULT } from '../helpers/interfaces'; import { updateDriveScopes } from '../helpers/utils'; +import { googleApiRequest } from '../transport'; interface FilesItem { id: string; diff --git a/packages/nodes-base/nodes/Google/Drive/v2/transport/index.ts b/packages/nodes-base/nodes/Google/Drive/v2/transport/index.ts index 13d20a99acaf4..04c5b459e9353 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/transport/index.ts @@ -8,6 +8,7 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + import { getGoogleAccessToken } from '../../../GenericFunctions'; export async function googleApiRequest( diff --git a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts index 4ae79c59e6994..672b7d1ada36c 100644 --- a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -8,7 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { getGoogleAccessToken } from '../../GenericFunctions'; export async function googleApiRequest( diff --git a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts index fdb80509fbf15..d7a3a40d61ab9 100644 --- a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts +++ b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts @@ -9,17 +9,15 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, jsonParse } from 'n8n-workflow'; -import { generatePairedItemData } from '../../../../utils/utilities'; +import { collectionFields, collectionOperations } from './CollectionDescription'; +import { documentFields, documentOperations } from './DocumentDescription'; import { fullDocumentToJson, googleApiRequest, googleApiRequestAllItems, jsonToDocument, } from './GenericFunctions'; - -import { collectionFields, collectionOperations } from './CollectionDescription'; - -import { documentFields, documentOperations } from './DocumentDescription'; +import { generatePairedItemData } from '../../../../utils/utilities'; export class GoogleFirebaseCloudFirestore implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts b/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts index 455c65dae36d3..cb2593c83cd79 100644 --- a/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts +++ b/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts @@ -10,10 +10,8 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; - -import { userFields, userOperations } from './UserDescription'; - import { groupFields, groupOperations } from './GroupDescripion'; +import { userFields, userOperations } from './UserDescription'; export class GSuiteAdmin implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/GenericFunctions.ts b/packages/nodes-base/nodes/Google/GenericFunctions.ts index 4a893ded009a5..6bbb177a54d5d 100644 --- a/packages/nodes-base/nodes/Google/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/GenericFunctions.ts @@ -1,3 +1,6 @@ +import * as jwt from 'jsonwebtoken'; +import { DateTime } from 'luxon'; +import moment from 'moment-timezone'; import { type IExecuteFunctions, type ILoadOptionsFunctions, @@ -8,11 +11,7 @@ import { NodeOperationError, } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import * as jwt from 'jsonwebtoken'; - import { formatPrivateKey } from '@utils/utilities'; -import { DateTime } from 'luxon'; const googleServiceAccountScopes = { bigquery: ['https://www.googleapis.com/auth/bigquery'], diff --git a/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts index e856174b38bb9..6993ab1930e60 100644 --- a/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts @@ -1,5 +1,6 @@ +import isEmpty from 'lodash/isEmpty'; +import { DateTime } from 'luxon'; import { simpleParser } from 'mailparser'; - import type { IBinaryKeyData, IDataObject, @@ -13,10 +14,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import MailComposer from 'nodemailer/lib/mail-composer'; -import { DateTime } from 'luxon'; - -import isEmpty from 'lodash/isEmpty'; +import type { IEmail } from '../../../utils/sendAndWait/interfaces'; +import { escapeHtml } from '../../../utils/utilities'; +import { getGoogleAccessToken } from '../GenericFunctions'; export interface IAttachments { type: string; @@ -24,11 +26,6 @@ export interface IAttachments { content: string; } -import MailComposer from 'nodemailer/lib/mail-composer'; -import { getGoogleAccessToken } from '../GenericFunctions'; -import { escapeHtml } from '../../../utils/utilities'; -import type { IEmail } from '../../../utils/sendAndWait/interfaces'; - export async function googleApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts b/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts index 9fcac0e41dca3..b82a578b94ca5 100644 --- a/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts @@ -1,3 +1,4 @@ +import { DateTime } from 'luxon'; import type { IPollFunctions, IDataObject, @@ -9,7 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { DateTime } from 'luxon'; import { googleApiRequest, googleApiRequestAllItems, diff --git a/packages/nodes-base/nodes/Google/Gmail/test/GmailTrigger.test.ts b/packages/nodes-base/nodes/Google/Gmail/test/GmailTrigger.test.ts index 4cd2ae0742948..9ab54ece28607 100644 --- a/packages/nodes-base/nodes/Google/Gmail/test/GmailTrigger.test.ts +++ b/packages/nodes-base/nodes/Google/Gmail/test/GmailTrigger.test.ts @@ -1,5 +1,5 @@ -import nock from 'nock'; import * as mailparser from 'mailparser'; +import nock from 'nock'; import { testPollingTriggerNode } from '@test/nodes/TriggerHelpers'; diff --git a/packages/nodes-base/nodes/Google/Gmail/test/v2/utils.test.ts b/packages/nodes-base/nodes/Google/Gmail/test/v2/utils.test.ts index f0d026150219f..3564092e8524e 100644 --- a/packages/nodes-base/nodes/Google/Gmail/test/v2/utils.test.ts +++ b/packages/nodes-base/nodes/Google/Gmail/test/v2/utils.test.ts @@ -1,6 +1,7 @@ -import type { IExecuteFunctions, INode } from 'n8n-workflow'; -import { DateTime } from 'luxon'; import { mock } from 'jest-mock-extended'; +import { DateTime } from 'luxon'; +import type { IExecuteFunctions, INode } from 'n8n-workflow'; + import { parseRawEmail, prepareTimestamp } from '../../GenericFunctions'; const node: INode = { diff --git a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts index c17c26eda9c5e..402553adbeeee 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts @@ -1,3 +1,4 @@ +import isEmpty from 'lodash/isEmpty'; import { NodeConnectionType, type IBinaryKeyData, @@ -12,7 +13,12 @@ import { type INodeTypeDescription, } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; +import { oldVersionNotice } from '@utils/descriptions'; + +import { draftFields, draftOperations } from './DraftDescription'; +import { labelFields, labelOperations } from './LabelDescription'; +import { messageFields, messageOperations } from './MessageDescription'; +import { messageLabelFields, messageLabelOperations } from './MessageLabelDescription'; import type { IEmail } from '../../../../utils/sendAndWait/interfaces'; import { encodeEmail, @@ -22,16 +28,6 @@ import { parseRawEmail, } from '../GenericFunctions'; -import { messageFields, messageOperations } from './MessageDescription'; - -import { messageLabelFields, messageLabelOperations } from './MessageLabelDescription'; - -import { labelFields, labelOperations } from './LabelDescription'; - -import { draftFields, draftOperations } from './DraftDescription'; - -import { oldVersionNotice } from '@utils/descriptions'; - const versionDescription: INodeTypeDescription = { displayName: 'Gmail', name: 'gmail', diff --git a/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts b/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts index 84cd8013b226c..ded6db9e086f2 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts @@ -15,6 +15,7 @@ import { import { draftFields, draftOperations } from './DraftDescription'; import { labelFields, labelOperations } from './LabelDescription'; +import { getGmailAliases, getLabels, getThreadMessages } from './loadOptions'; import { messageFields, messageOperations } from './MessageDescription'; import { threadFields, threadOperations } from './ThreadDescription'; import type { IEmail } from '../../../../utils/sendAndWait/interfaces'; @@ -36,7 +37,6 @@ import { simplifyOutput, unescapeSnippets, } from '../GenericFunctions'; -import { getGmailAliases, getLabels, getThreadMessages } from './loadOptions'; const versionDescription: INodeTypeDescription = { displayName: 'Gmail', diff --git a/packages/nodes-base/nodes/Google/Gmail/v2/MessageDescription.ts b/packages/nodes-base/nodes/Google/Gmail/v2/MessageDescription.ts index 426d78bbb5d97..4273561c9a753 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v2/MessageDescription.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v2/MessageDescription.ts @@ -1,4 +1,5 @@ import { SEND_AND_WAIT_OPERATION, type INodeProperties } from 'n8n-workflow'; + import { appendAttributionOption } from '../../../../utils/descriptions'; export const messageOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts b/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts index 193747b01bed7..dcec9f093ae9f 100644 --- a/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts +++ b/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts @@ -1,3 +1,4 @@ +import ISO6391 from 'iso-639-1'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -9,7 +10,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import ISO6391 from 'iso-639-1'; +import { googleApiRequest } from './GenericFunctions'; import type { AttributesValuesUi, CommentAnalyzeBody, @@ -17,8 +18,6 @@ import type { RequestedAttributes, } from './types'; -import { googleApiRequest } from './GenericFunctions'; - export class GooglePerspective implements INodeType { description: INodeTypeDescription = { displayName: 'Google Perspective', diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts index 8993760e574e5..b23183c29b3c3 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts @@ -7,13 +7,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../constants'; -import { apiRequest } from './v2/transport'; -import { sheetsSearch, spreadSheetsSearch } from './v2/methods/listSearch'; -import { GoogleSheet } from './v2/helpers/GoogleSheet'; -import { getSheetHeaderRowAndSkipEmpty } from './v2/methods/loadOptions'; -import type { ResourceLocator, ValueRenderOption } from './v2/helpers/GoogleSheets.types'; - import { arrayOfArraysToJson, BINARY_MIME_TYPE, @@ -21,6 +14,12 @@ import { getRevisionFile, sheetBinaryToArrayOfArrays, } from './GoogleSheetsTrigger.utils'; +import { GoogleSheet } from './v2/helpers/GoogleSheet'; +import type { ResourceLocator, ValueRenderOption } from './v2/helpers/GoogleSheets.types'; +import { sheetsSearch, spreadSheetsSearch } from './v2/methods/listSearch'; +import { getSheetHeaderRowAndSkipEmpty } from './v2/methods/loadOptions'; +import { apiRequest } from './v2/transport'; +import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../constants'; export class GoogleSheetsTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.utils.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.utils.ts index 91ab4c69a8741..fb6c1d908bee4 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.utils.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.utils.ts @@ -1,8 +1,8 @@ -import type { IDataObject, IPollFunctions } from 'n8n-workflow'; - -import * as XLSX from 'xlsx'; import isEqual from 'lodash/isEqual'; import zip from 'lodash/zip'; +import type { IDataObject, IPollFunctions } from 'n8n-workflow'; +import * as XLSX from 'xlsx'; + import type { SheetDataRow, SheetRangeData } from './v2/helpers/GoogleSheets.types'; import { apiRequest } from './v2/transport'; diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts index 540367aabd085..90fa190a9f469 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts @@ -7,6 +7,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + import { getGoogleAccessToken } from '../../GenericFunctions'; export interface IGoogleAuthCredentials { diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts index 5781c51b8fbae..cccd5e2de57ce 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts @@ -1,9 +1,8 @@ +import get from 'lodash/get'; import type { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; - import { utils as xlsxUtils } from 'xlsx'; -import get from 'lodash/get'; import { googleApiRequest } from './GenericFunctions'; export interface ISheetOptions { diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts index 6b5f4ee802f3e..6b218c1d6a6a0 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts @@ -13,8 +13,7 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { getGoogleAccessToken } from '../../GenericFunctions'; -import { generatePairedItemData } from '../../../../utils/utilities'; +import { googleApiRequest, hexToRgb } from './GenericFunctions'; import type { ILookupValues, ISheetUpdateData, @@ -23,10 +22,9 @@ import type { ValueRenderOption, } from './GoogleSheet'; import { GoogleSheet } from './GoogleSheet'; - -import { googleApiRequest, hexToRgb } from './GenericFunctions'; - import { versionDescription } from './versionDescription'; +import { generatePairedItemData } from '../../../../utils/utilities'; +import { getGoogleAccessToken } from '../../GenericFunctions'; export class GoogleSheetsV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts b/packages/nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts index 912ca8a7971ff..681705781a6b3 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/GoogleSheetsV2.node.ts @@ -4,9 +4,10 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; + +import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; import { credentialTest, listSearch, loadOptions, resourceMapping } from './methods'; -import { router } from './actions/router'; export class GoogleSheetsV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/router.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/router.ts index 5159e9b76e565..68b6f683b11e6 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/router.ts @@ -1,9 +1,10 @@ import { type IExecuteFunctions, type IDataObject, type INodeExecutionData } from 'n8n-workflow'; + +import * as sheet from './sheet/Sheet.resource'; +import * as spreadsheet from './spreadsheet/SpreadSheet.resource'; import { GoogleSheet } from '../helpers/GoogleSheet'; -import { getSpreadsheetId } from '../helpers/GoogleSheets.utils'; import type { GoogleSheets, ResourceLocator } from '../helpers/GoogleSheets.types'; -import * as spreadsheet from './spreadsheet/SpreadSheet.resource'; -import * as sheet from './sheet/Sheet.resource'; +import { getSpreadsheetId } from '../helpers/GoogleSheets.utils'; export async function router(this: IExecuteFunctions): Promise { let operationResult: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.ts index d46e72811a076..07810d1304bab 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.ts @@ -1,5 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; -import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../../../../constants'; + import * as append from './append.operation'; import * as appendOrUpdate from './appendOrUpdate.operation'; import * as clear from './clear.operation'; @@ -8,6 +8,7 @@ import * as del from './delete.operation'; import * as read from './read.operation'; import * as remove from './remove.operation'; import * as update from './update.operation'; +import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../../../../constants'; export { append, appendOrUpdate, clear, create, del as delete, read, remove, update }; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts index 1a4080c576139..8615beafdef8b 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/append.operation.ts @@ -5,8 +5,10 @@ import { NodeOperationError, type ResourceMapperField, } from 'n8n-workflow'; -import type { SheetProperties, ValueInputOption } from '../../helpers/GoogleSheets.types'; + +import { cellFormat, handlingExtraData, useAppendOption } from './commonDescription'; import type { GoogleSheet } from '../../helpers/GoogleSheet'; +import type { SheetProperties, ValueInputOption } from '../../helpers/GoogleSheets.types'; import { autoMapInputData, cellFormatDefault, @@ -14,7 +16,6 @@ import { mapFields, untilSheetSelected, } from '../../helpers/GoogleSheets.utils'; -import { cellFormat, handlingExtraData, useAppendOption } from './commonDescription'; export const description: SheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/appendOrUpdate.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/appendOrUpdate.operation.ts index f6f3e5cd3de4c..0dc92f31ac9da 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/appendOrUpdate.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/appendOrUpdate.operation.ts @@ -5,6 +5,14 @@ import type { ResourceMapperField, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { + cellFormat, + handlingExtraData, + locationDefine, + useAppendOption, +} from './commonDescription'; +import type { GoogleSheet } from '../../helpers/GoogleSheet'; import { ROW_NUMBER, type ISheetUpdateData, @@ -12,18 +20,11 @@ import { type ValueInputOption, type ValueRenderOption, } from '../../helpers/GoogleSheets.types'; -import type { GoogleSheet } from '../../helpers/GoogleSheet'; import { cellFormatDefault, checkForSchemaChanges, untilSheetSelected, } from '../../helpers/GoogleSheets.utils'; -import { - cellFormat, - handlingExtraData, - locationDefine, - useAppendOption, -} from './commonDescription'; export const description: SheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/clear.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/clear.operation.ts index f65d6a5e3946d..14fcd8ed691eb 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/clear.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/clear.operation.ts @@ -1,6 +1,7 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; -import type { SheetProperties } from '../../helpers/GoogleSheets.types'; + import type { GoogleSheet } from '../../helpers/GoogleSheet'; +import type { SheetProperties } from '../../helpers/GoogleSheets.types'; import { getColumnName, getColumnNumber, diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/create.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/create.operation.ts index 4c57bf1dea041..3d6ac81d6a65f 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/create.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/create.operation.ts @@ -1,9 +1,10 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; -import type { SheetProperties } from '../../helpers/GoogleSheets.types'; -import { apiRequest } from '../../transport'; + +import { wrapData } from '../../../../../../utils/utilities'; import type { GoogleSheet } from '../../helpers/GoogleSheet'; +import type { SheetProperties } from '../../helpers/GoogleSheets.types'; import { getExistingSheetNames, hexToRgb } from '../../helpers/GoogleSheets.utils'; -import { wrapData } from '../../../../../../utils/utilities'; +import { apiRequest } from '../../transport'; export const description: SheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/delete.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/delete.operation.ts index 8edd179d0e2e2..4d5479795c932 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/delete.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/delete.operation.ts @@ -1,8 +1,9 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; -import type { SheetProperties } from '../../helpers/GoogleSheets.types'; + +import { generatePairedItemData, wrapData } from '../../../../../../utils/utilities'; import type { GoogleSheet } from '../../helpers/GoogleSheet'; +import type { SheetProperties } from '../../helpers/GoogleSheets.types'; import { getColumnNumber, untilSheetSelected } from '../../helpers/GoogleSheets.utils'; -import { generatePairedItemData, wrapData } from '../../../../../../utils/utilities'; export const description: SheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/read.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/read.operation.ts index 9f65ffb52c0e7..dfde11568dc6e 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/read.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/read.operation.ts @@ -4,12 +4,9 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { dataLocationOnSheet, outputFormatting } from './commonDescription'; import type { GoogleSheet } from '../../helpers/GoogleSheet'; -import { - getRangeString, - prepareSheetData, - untilSheetSelected, -} from '../../helpers/GoogleSheets.utils'; import type { ILookupValues, RangeDetectionOptions, @@ -17,8 +14,11 @@ import type { SheetRangeData, ValueRenderOption, } from '../../helpers/GoogleSheets.types'; - -import { dataLocationOnSheet, outputFormatting } from './commonDescription'; +import { + getRangeString, + prepareSheetData, + untilSheetSelected, +} from '../../helpers/GoogleSheets.utils'; const combineFiltersOptions: INodeProperties = { displayName: 'Combine Filters', diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/remove.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/remove.operation.ts index 13e7fa348638b..c068e4ee77712 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/remove.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/remove.operation.ts @@ -1,7 +1,8 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; -import { apiRequest } from '../../transport'; -import type { GoogleSheet } from '../../helpers/GoogleSheet'; + import { wrapData } from '../../../../../../utils/utilities'; +import type { GoogleSheet } from '../../helpers/GoogleSheet'; +import { apiRequest } from '../../transport'; export async function execute( this: IExecuteFunctions, diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/update.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/update.operation.ts index 16478cb11c936..83331ea7e5594 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/update.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/sheet/update.operation.ts @@ -1,5 +1,8 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { cellFormat, handlingExtraData, locationDefine } from './commonDescription'; +import type { GoogleSheet } from '../../helpers/GoogleSheet'; import { ROW_NUMBER, type ISheetUpdateData, @@ -7,9 +10,7 @@ import { type ValueInputOption, type ValueRenderOption, } from '../../helpers/GoogleSheets.types'; -import type { GoogleSheet } from '../../helpers/GoogleSheet'; import { cellFormatDefault, untilSheetSelected } from '../../helpers/GoogleSheets.utils'; -import { cellFormat, handlingExtraData, locationDefine } from './commonDescription'; export const description: SheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/SpreadSheet.resource.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/SpreadSheet.resource.ts index c0e7f3acfa8c3..0e33a95667515 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/SpreadSheet.resource.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/SpreadSheet.resource.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create.operation'; import * as deleteSpreadsheet from './delete.operation'; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/create.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/create.operation.ts index cc0dd57f4887e..ff8cac5f9780b 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/create.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/create.operation.ts @@ -1,7 +1,8 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; + +import { wrapData } from '../../../../../../utils/utilities'; import type { SpreadSheetProperties } from '../../helpers/GoogleSheets.types'; import { apiRequest } from '../../transport'; -import { wrapData } from '../../../../../../utils/utilities'; export const description: SpreadSheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/delete.operation.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/delete.operation.ts index 310efc8de7745..71f8dfd61586c 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/delete.operation.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/spreadsheet/delete.operation.ts @@ -1,8 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; + +import { wrapData } from '../../../../../../utils/utilities'; +import { GOOGLE_DRIVE_FILE_URL_REGEX } from '../../../../constants'; import type { SpreadSheetProperties } from '../../helpers/GoogleSheets.types'; import { apiRequest } from '../../transport'; -import { GOOGLE_DRIVE_FILE_URL_REGEX } from '../../../../constants'; -import { wrapData } from '../../../../../../utils/utilities'; export const description: SpreadSheetProperties = [ { diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts index c5f8a8dc79395..b129f9326c473 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheet.ts @@ -8,7 +8,7 @@ import type { } from 'n8n-workflow'; import { ApplicationError, NodeOperationError } from 'n8n-workflow'; import { utils as xlsxUtils } from 'xlsx'; -import { apiRequest } from '../transport'; + import type { ILookupValues, ISheetUpdateData, @@ -21,6 +21,7 @@ import type { ValueRenderOption, } from './GoogleSheets.types'; import { getSheetId, removeEmptyColumns } from './GoogleSheets.utils'; +import { apiRequest } from '../transport'; export class GoogleSheet { id: string; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts b/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts index f3ad02e273638..c717e5c8b6f92 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.ts @@ -8,6 +8,7 @@ import type { ResourceMapperField, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import type { GoogleSheet } from './GoogleSheet'; import type { RangeDetectionOptions, diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Google/Sheet/v2/methods/listSearch.ts index 6c0c8b74cadcd..cb8f5c05cf25c 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/methods/listSearch.ts @@ -5,6 +5,7 @@ import type { INodeListSearchResult, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import type { ResourceLocator } from '../helpers/GoogleSheets.types'; import { getSpreadsheetId } from '../helpers/GoogleSheets.utils'; import { apiRequest } from '../transport'; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Google/Sheet/v2/methods/loadOptions.ts index 90aa11cf90ab9..6ec3e9d9b7d0c 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/methods/loadOptions.ts @@ -1,8 +1,9 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { GoogleSheet } from '../helpers/GoogleSheet'; -import { getSpreadsheetId } from '../helpers/GoogleSheets.utils'; import type { ResourceLocator } from '../helpers/GoogleSheets.types'; +import { getSpreadsheetId } from '../helpers/GoogleSheets.utils'; export async function getSheets(this: ILoadOptionsFunctions): Promise { const documentId = this.getNodeParameter('documentId', 0) as IDataObject | null; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/methods/resourceMapping.ts b/packages/nodes-base/nodes/Google/Sheet/v2/methods/resourceMapping.ts index 40ae402a646a4..664a44d094aa3 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/methods/resourceMapping.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/methods/resourceMapping.ts @@ -4,6 +4,7 @@ import type { ResourceMapperField, ResourceMapperFields, } from 'n8n-workflow'; + import { GoogleSheet } from '../helpers/GoogleSheet'; import { ROW_NUMBER, type ResourceLocator } from '../helpers/GoogleSheets.types'; import { getSpreadsheetId } from '../helpers/GoogleSheets.utils'; diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/transport/index.ts b/packages/nodes-base/nodes/Google/Sheet/v2/transport/index.ts index d3fe3e07620c8..27e080cffd395 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/transport/index.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -8,7 +9,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import set from 'lodash/set'; + import { getGoogleAccessToken } from '../../../GenericFunctions'; export async function apiRequest( diff --git a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts index d7fe05561f2d7..e053b752bd75b 100644 --- a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts +++ b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts @@ -10,7 +10,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; - import { taskFields, taskOperations } from './TaskDescription'; export class GoogleTasks implements INodeType { diff --git a/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts b/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts index 663ec6189641a..07f1b351b6d01 100644 --- a/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts +++ b/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts @@ -1,4 +1,3 @@ -import type { Readable } from 'stream'; import type { IDataObject, IExecuteFunctions, @@ -9,20 +8,16 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import type { Readable } from 'stream'; -import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; +import { isoCountryCodes } from '@utils/ISOCountryCodes'; import { channelFields, channelOperations } from './ChannelDescription'; - +import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; import { playlistFields, playlistOperations } from './PlaylistDescription'; - import { playlistItemFields, playlistItemOperations } from './PlaylistItemDescription'; - -import { videoFields, videoOperations } from './VideoDescription'; - import { videoCategoryFields, videoCategoryOperations } from './VideoCategoryDescription'; - -import { isoCountryCodes } from '@utils/ISOCountryCodes'; +import { videoFields, videoOperations } from './VideoDescription'; import { validateAndSetDate } from '../GenericFunctions'; const UPLOAD_CHUNK_SIZE = 1024 * 1024; diff --git a/packages/nodes-base/nodes/Grafana/Grafana.node.ts b/packages/nodes-base/nodes/Grafana/Grafana.node.ts index ce3f0b8276454..28bd734229f38 100644 --- a/packages/nodes-base/nodes/Grafana/Grafana.node.ts +++ b/packages/nodes-base/nodes/Grafana/Grafana.node.ts @@ -9,8 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; -import { deriveUid, grafanaApiRequest, throwOnEmptyUpdate } from './GenericFunctions'; - import { dashboardFields, dashboardOperations, @@ -21,7 +19,7 @@ import { userFields, userOperations, } from './descriptions'; - +import { deriveUid, grafanaApiRequest, throwOnEmptyUpdate } from './GenericFunctions'; import type { DashboardUpdateFields, DashboardUpdatePayload, diff --git a/packages/nodes-base/nodes/Grist/GenericFunctions.ts b/packages/nodes-base/nodes/Grist/GenericFunctions.ts index 07a4505d35eda..73c4bc875fcf6 100644 --- a/packages/nodes-base/nodes/Grist/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Grist/GenericFunctions.ts @@ -22,9 +22,8 @@ export async function gristApiRequest( body: IDataObject | number[] = {}, qs: IDataObject = {}, ) { - const { apiKey, planType, customSubdomain, selfHostedUrl } = (await this.getCredentials( - 'gristApi', - )) as GristCredentials; + const { apiKey, planType, customSubdomain, selfHostedUrl } = + await this.getCredentials('gristApi'); const gristapiurl = planType === 'free' diff --git a/packages/nodes-base/nodes/Grist/Grist.node.ts b/packages/nodes-base/nodes/Grist/Grist.node.ts index 2ebd3cdd43365..189c880f16742 100644 --- a/packages/nodes-base/nodes/Grist/Grist.node.ts +++ b/packages/nodes-base/nodes/Grist/Grist.node.ts @@ -20,9 +20,7 @@ import { parseSortProperties, throwOnZeroDefinedFields, } from './GenericFunctions'; - import { operationFields } from './OperationDescription'; - import type { FieldsToSend, GristColumns, diff --git a/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts b/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts index ebf25294d7483..137eda57c9b41 100644 --- a/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts +++ b/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts @@ -24,7 +24,6 @@ import { userFields, userOperations, } from './descriptions'; - import { getAccessTokens, haloPSAApiRequest, diff --git a/packages/nodes-base/nodes/Harvest/Harvest.node.ts b/packages/nodes-base/nodes/Harvest/Harvest.node.ts index 90fc166080dc4..1b239ff85392f 100644 --- a/packages/nodes-base/nodes/Harvest/Harvest.node.ts +++ b/packages/nodes-base/nodes/Harvest/Harvest.node.ts @@ -11,25 +11,15 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { clientFields, clientOperations } from './ClientDescription'; - -import { contactFields, contactOperations } from './ContactDescription'; - import { companyOperations } from './CompanyDescription'; - +import { contactFields, contactOperations } from './ContactDescription'; import { estimateFields, estimateOperations } from './EstimateDescription'; - import { expenseFields, expenseOperations } from './ExpenseDescription'; - import { getAllResource, harvestApiRequest } from './GenericFunctions'; - import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - import { projectFields, projectOperations } from './ProjectDescription'; - import { taskFields, taskOperations } from './TaskDescription'; - import { timeEntryFields, timeEntryOperations } from './TimeEntryDescription'; - import { userFields, userOperations } from './UserDescription'; export class Harvest implements INodeType { diff --git a/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts b/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts index 1bd10939e3a14..b61b8eda7d6d7 100644 --- a/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -9,8 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import get from 'lodash/get'; - export async function helpscoutApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts index cd94986b7d28b..6fae6b0ba0ae0 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts @@ -10,22 +10,16 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { conversationFields, conversationOperations } from './ConversationDescription'; +import { isoCountryCodes } from '@utils/ISOCountryCodes'; +import { conversationFields, conversationOperations } from './ConversationDescription'; +import type { IConversation } from './ConversationInterface'; import { customerFields, customerOperations } from './CustomerDescription'; - import type { ICustomer } from './CustomerInterface'; - -import type { IConversation } from './ConversationInterface'; - import { helpscoutApiRequest, helpscoutApiRequestAllItems } from './GenericFunctions'; - import { mailboxFields, mailboxOperations } from './MailboxDescription'; - import { threadFields, threadOperations } from './ThreadDescription'; - import type { IAttachment, IThread } from './ThreadInterface'; -import { isoCountryCodes } from '@utils/ISOCountryCodes'; export class HelpScout implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/HighLevel/v1/GenericFunctions.ts b/packages/nodes-base/nodes/HighLevel/v1/GenericFunctions.ts index bb6f977ad80cb..c5e08c9142d86 100644 --- a/packages/nodes-base/nodes/HighLevel/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HighLevel/v1/GenericFunctions.ts @@ -1,3 +1,5 @@ +import type { ToISOTimeOptions } from 'luxon'; +import { DateTime } from 'luxon'; import type { DeclarativeRestApiSettings, IDataObject, @@ -17,9 +19,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import type { ToISOTimeOptions } from 'luxon'; -import { DateTime } from 'luxon'; - const VALID_EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; const VALID_PHONE_REGEX = diff --git a/packages/nodes-base/nodes/HighLevel/v1/description/ContactDescription.ts b/packages/nodes-base/nodes/HighLevel/v1/description/ContactDescription.ts index d76ce3f402371..0b29b34f3a0d3 100644 --- a/packages/nodes-base/nodes/HighLevel/v1/description/ContactDescription.ts +++ b/packages/nodes-base/nodes/HighLevel/v1/description/ContactDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { splitTagsPreSendAction, validEmailAndPhonePreSendAction } from '../GenericFunctions'; export const contactOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/HighLevel/v2/GenericFunctions.ts b/packages/nodes-base/nodes/HighLevel/v2/GenericFunctions.ts index 04a92c512c6fe..5b4529b9be136 100644 --- a/packages/nodes-base/nodes/HighLevel/v2/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HighLevel/v2/GenericFunctions.ts @@ -1,3 +1,5 @@ +import type { ToISOTimeOptions } from 'luxon'; +import { DateTime } from 'luxon'; import type { DeclarativeRestApiSettings, IDataObject, @@ -16,9 +18,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import type { ToISOTimeOptions } from 'luxon'; -import { DateTime } from 'luxon'; - const VALID_EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; const VALID_PHONE_REGEX = diff --git a/packages/nodes-base/nodes/HighLevel/v2/description/ContactDescription.ts b/packages/nodes-base/nodes/HighLevel/v2/description/ContactDescription.ts index f3f7bc8e98e9b..04b87b2d7df65 100644 --- a/packages/nodes-base/nodes/HighLevel/v2/description/ContactDescription.ts +++ b/packages/nodes-base/nodes/HighLevel/v2/description/ContactDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { addLocationIdPreSendAction, splitTagsPreSendAction, diff --git a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts index 036f943066e97..b68a857ce8fae 100644 --- a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts +++ b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts @@ -12,27 +12,19 @@ import { NodeConnectionType, } from 'n8n-workflow'; +import { cameraProxyFields, cameraProxyOperations } from './CameraProxyDescription'; import { configOperations } from './ConfigDescription'; - -import { serviceFields, serviceOperations } from './ServiceDescription'; - -import { stateFields, stateOperations } from './StateDescription'; - import { eventFields, eventOperations } from './EventDescription'; - -import { logFields, logOperations } from './LogDescription'; - -import { templateFields, templateOperations } from './TemplateDescription'; - -import { historyFields, historyOperations } from './HistoryDescription'; - -import { cameraProxyFields, cameraProxyOperations } from './CameraProxyDescription'; - import { getHomeAssistantEntities, getHomeAssistantServices, homeAssistantApiRequest, } from './GenericFunctions'; +import { historyFields, historyOperations } from './HistoryDescription'; +import { logFields, logOperations } from './LogDescription'; +import { serviceFields, serviceOperations } from './ServiceDescription'; +import { stateFields, stateOperations } from './StateDescription'; +import { templateFields, templateOperations } from './TemplateDescription'; export class HomeAssistant implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Html/Html.node.ts b/packages/nodes-base/nodes/Html/Html.node.ts index 3d5814244e9ff..8d80ce7928d0c 100644 --- a/packages/nodes-base/nodes/Html/Html.node.ts +++ b/packages/nodes-base/nodes/Html/Html.node.ts @@ -1,4 +1,5 @@ import cheerio from 'cheerio'; +import get from 'lodash/get'; import type { INodeExecutionData, IExecuteFunctions, @@ -8,11 +9,12 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; + +import { getResolvables, sanitizeDataPathKey } from '@utils/utilities'; + import { placeholder } from './placeholder'; -import { getValue } from './utils'; import type { IValueData } from './types'; -import { getResolvables, sanitizeDataPathKey } from '@utils/utilities'; +import { getValue } from './utils'; export const capitalizeHeader = (header: string, capitalize?: boolean) => { if (!capitalize) return header; diff --git a/packages/nodes-base/nodes/Html/utils.ts b/packages/nodes-base/nodes/Html/utils.ts index 923443b2fe57f..a22195b0ae5ef 100644 --- a/packages/nodes-base/nodes/Html/utils.ts +++ b/packages/nodes-base/nodes/Html/utils.ts @@ -1,5 +1,6 @@ -import type { IDataObject } from 'n8n-workflow'; import { convert } from 'html-to-text'; +import type { IDataObject } from 'n8n-workflow'; + import type { IValueData, Cheerio } from './types'; // The extraction functions diff --git a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts index 719c128a28789..b23ab29aefb3e 100644 --- a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts +++ b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts @@ -1,4 +1,5 @@ import cheerio from 'cheerio'; +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -8,8 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; - type Cheerio = ReturnType; interface IValueData { diff --git a/packages/nodes-base/nodes/HttpRequest/GenericFunctions.ts b/packages/nodes-base/nodes/HttpRequest/GenericFunctions.ts index c7ffe7451c073..76e242adfdb84 100644 --- a/packages/nodes-base/nodes/HttpRequest/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HttpRequest/GenericFunctions.ts @@ -1,4 +1,7 @@ -import type { SecureContextOptions } from 'tls'; +import FormData from 'form-data'; +import get from 'lodash/get'; +import isPlainObject from 'lodash/isPlainObject'; +import set from 'lodash/set'; import { deepCopy, type ICredentialDataDecryptedObject, @@ -8,14 +11,10 @@ import { type IOAuth2Options, type IRequestOptions, } from 'n8n-workflow'; +import type { SecureContextOptions } from 'tls'; -import set from 'lodash/set'; -import isPlainObject from 'lodash/isPlainObject'; - -import FormData from 'form-data'; -import get from 'lodash/get'; -import { formatPrivateKey } from '../../utils/utilities'; import type { HttpSslAuthCredentials } from './interfaces'; +import { formatPrivateKey } from '../../utils/utilities'; export type BodyParameter = { name: string; diff --git a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts index b3d7e3cfcb5b8..c50d1e5ade95a 100644 --- a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts @@ -1,5 +1,3 @@ -import type { Readable } from 'stream'; - import type { IExecuteFunctions, IDataObject, @@ -18,6 +16,7 @@ import { removeCircularRefs, NodeConnectionType, } from 'n8n-workflow'; +import type { Readable } from 'stream'; import type { IAuthDataSanitizeKeys } from '../GenericFunctions'; import { replaceNullValues, sanitizeUiMessage } from '../GenericFunctions'; diff --git a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts index 9f78a1a47be0d..f954dbfd19058 100644 --- a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts @@ -1,5 +1,3 @@ -import type { Readable } from 'stream'; - import type { IDataObject, IExecuteFunctions, @@ -18,6 +16,7 @@ import { removeCircularRefs, NodeConnectionType, } from 'n8n-workflow'; +import type { Readable } from 'stream'; import type { IAuthDataSanitizeKeys } from '../GenericFunctions'; import { diff --git a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts index f24f537c91e97..dd4e0b77fbe23 100644 --- a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts @@ -27,6 +27,7 @@ import type { Readable } from 'stream'; import { keysToLowercase } from '@utils/utilities'; +import { mainProperties } from './Description'; import type { BodyParameter, IAuthDataSanitizeKeys } from '../GenericFunctions'; import { binaryContentTypes, @@ -38,7 +39,6 @@ import { sanitizeUiMessage, setAgentOptions, } from '../GenericFunctions'; -import { mainProperties } from './Description'; function toText(data: T) { if (typeof data === 'object' && data !== null) { diff --git a/packages/nodes-base/nodes/HttpRequest/test/binaryData/HttpRequest.test.ts b/packages/nodes-base/nodes/HttpRequest/test/binaryData/HttpRequest.test.ts index 32734939c29ac..d22169e50d6ec 100644 --- a/packages/nodes-base/nodes/HttpRequest/test/binaryData/HttpRequest.test.ts +++ b/packages/nodes-base/nodes/HttpRequest/test/binaryData/HttpRequest.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { setup, equalityTest, diff --git a/packages/nodes-base/nodes/HttpRequest/test/encoding/HttpRequest.test.ts b/packages/nodes-base/nodes/HttpRequest/test/encoding/HttpRequest.test.ts index 6ca5cfa437aaa..d5488c6f2e600 100644 --- a/packages/nodes-base/nodes/HttpRequest/test/encoding/HttpRequest.test.ts +++ b/packages/nodes-base/nodes/HttpRequest/test/encoding/HttpRequest.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { setup, equalityTest, diff --git a/packages/nodes-base/nodes/HttpRequest/test/encodingQuoted/HttpRequest.test.ts b/packages/nodes-base/nodes/HttpRequest/test/encodingQuoted/HttpRequest.test.ts index 0b96c4b4d04e5..5d3a67dde9ef0 100644 --- a/packages/nodes-base/nodes/HttpRequest/test/encodingQuoted/HttpRequest.test.ts +++ b/packages/nodes-base/nodes/HttpRequest/test/encodingQuoted/HttpRequest.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { setup, equalityTest, diff --git a/packages/nodes-base/nodes/HttpRequest/test/node/HttpRequest.test.ts b/packages/nodes-base/nodes/HttpRequest/test/node/HttpRequest.test.ts index 0899ce5637262..6e49794df3c6b 100644 --- a/packages/nodes-base/nodes/HttpRequest/test/node/HttpRequest.test.ts +++ b/packages/nodes-base/nodes/HttpRequest/test/node/HttpRequest.test.ts @@ -1,5 +1,6 @@ -import { parse as parseUrl } from 'url'; import nock from 'nock'; +import { parse as parseUrl } from 'url'; + import { initBinaryDataService, setup, diff --git a/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts b/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts index f20a3c7746778..df86cc0b5f3f9 100644 --- a/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts +++ b/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts @@ -2,7 +2,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow' import { VersionedNodeType } from 'n8n-workflow'; import { HubspotV1 } from './V1/HubspotV1.node'; - import { HubspotV2 } from './V2/HubspotV2.node'; export class Hubspot extends VersionedNodeType { diff --git a/packages/nodes-base/nodes/Hubspot/V1/GenericFunctions.ts b/packages/nodes-base/nodes/Hubspot/V1/GenericFunctions.ts index 9fa600730d182..dbca30617a143 100644 --- a/packages/nodes-base/nodes/Hubspot/V1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Hubspot/V1/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { ICredentialDataDecryptedObject, ICredentialTestFunctions, @@ -11,8 +12,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - export async function hubspotApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts b/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts index de46d8a484f9e..fa32887a84a9d 100644 --- a/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts +++ b/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { ICredentialDataDecryptedObject, ICredentialsDecrypted, @@ -15,7 +16,14 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; +import { companyFields, companyOperations } from './CompanyDescription'; +import { contactFields, contactOperations } from './ContactDescription'; +import { contactListFields, contactListOperations } from './ContactListDescription'; +import { dealFields, dealOperations } from './DealDescription'; +import type { IAssociation, IDeal } from './DealInterface'; +import { engagementFields, engagementOperations } from './EngagementDescription'; +import { formFields, formOperations } from './FormDescription'; +import type { IForm } from './FormInterface'; import { clean, getAssociations, @@ -27,25 +35,8 @@ import { hubspotApiRequestAllItems, validateCredentials, } from './GenericFunctions'; - -import { contactFields, contactOperations } from './ContactDescription'; - -import { contactListFields, contactListOperations } from './ContactListDescription'; - -import { companyFields, companyOperations } from './CompanyDescription'; - -import { dealFields, dealOperations } from './DealDescription'; - -import { engagementFields, engagementOperations } from './EngagementDescription'; - -import { formFields, formOperations } from './FormDescription'; - import { ticketFields, ticketOperations } from './TicketDescription'; -import type { IForm } from './FormInterface'; - -import type { IAssociation, IDeal } from './DealInterface'; - export class HubspotV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Hubspot/V2/GenericFunctions.ts b/packages/nodes-base/nodes/Hubspot/V2/GenericFunctions.ts index c5b255ab6c386..a640180dec780 100644 --- a/packages/nodes-base/nodes/Hubspot/V2/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Hubspot/V2/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { ICredentialDataDecryptedObject, ICredentialTestFunctions, @@ -11,8 +12,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - export async function hubspotApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts b/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts index 5049e3766654b..94d7bc67cf1ca 100644 --- a/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts +++ b/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts @@ -1,3 +1,6 @@ +import { snakeCase } from 'change-case'; +import set from 'lodash/set'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { ICredentialDataDecryptedObject, ICredentialsDecrypted, @@ -15,11 +18,14 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; -import set from 'lodash/set'; -import { generatePairedItemData } from '../../../utils/utilities'; +import { companyFields, companyOperations } from './CompanyDescription'; +import { contactFields, contactOperations } from './ContactDescription'; +import { contactListFields, contactListOperations } from './ContactListDescription'; +import { dealFields, dealOperations } from './DealDescription'; +import type { IAssociation, IDeal } from './DealInterface'; +import { engagementFields, engagementOperations } from './EngagementDescription'; +import type { IForm } from './FormInterface'; import { clean, getAssociations, @@ -31,22 +37,8 @@ import { hubspotApiRequestAllItems, validateCredentials, } from './GenericFunctions'; - -import { contactFields, contactOperations } from './ContactDescription'; - -import { contactListFields, contactListOperations } from './ContactListDescription'; - -import { companyFields, companyOperations } from './CompanyDescription'; - -import { dealFields, dealOperations } from './DealDescription'; - -import { engagementFields, engagementOperations } from './EngagementDescription'; - import { ticketFields, ticketOperations } from './TicketDescription'; - -import type { IForm } from './FormInterface'; - -import type { IAssociation, IDeal } from './DealInterface'; +import { generatePairedItemData } from '../../../utils/utilities'; export class HubspotV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts index fcbd86ef0979b..78d8fe20ddfda 100644 --- a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts +++ b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts @@ -8,7 +8,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { humanticAiApiRequest } from './GenericFunctions'; - import { profileFields, profileOperations } from './ProfileDescription'; export class HumanticAi implements INodeType { diff --git a/packages/nodes-base/nodes/Hunter/Hunter.node.ts b/packages/nodes-base/nodes/Hunter/Hunter.node.ts index c8eed8e9ba09b..c1cda5a715166 100644 --- a/packages/nodes-base/nodes/Hunter/Hunter.node.ts +++ b/packages/nodes-base/nodes/Hunter/Hunter.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { hunterApiRequest, hunterApiRequestAllItems } from './GenericFunctions'; export class Hunter implements INodeType { diff --git a/packages/nodes-base/nodes/ICalendar/createEvent.operation.ts b/packages/nodes-base/nodes/ICalendar/createEvent.operation.ts index 99e2bcf8164f8..3e49879e508d9 100644 --- a/packages/nodes-base/nodes/ICalendar/createEvent.operation.ts +++ b/packages/nodes-base/nodes/ICalendar/createEvent.operation.ts @@ -1,4 +1,5 @@ -import { promisify } from 'util'; +import * as ics from 'ics'; +import moment from 'moment-timezone'; import { type IExecuteFunctions, type IDataObject, @@ -6,9 +7,7 @@ import { type INodeProperties, NodeOperationError, } from 'n8n-workflow'; - -import moment from 'moment-timezone'; -import * as ics from 'ics'; +import { promisify } from 'util'; const createEvent = promisify(ics.createEvent); diff --git a/packages/nodes-base/nodes/ICalendar/test/node/ICalendar.test.ts b/packages/nodes-base/nodes/ICalendar/test/node/ICalendar.test.ts index 9757cd5f2a479..65a238c7352d6 100644 --- a/packages/nodes-base/nodes/ICalendar/test/node/ICalendar.test.ts +++ b/packages/nodes-base/nodes/ICalendar/test/node/ICalendar.test.ts @@ -1,13 +1,12 @@ /* eslint-disable @typescript-eslint/no-loop-func */ -import type { WorkflowTestData } from '@test/nodes/types'; - +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, readJsonFileSync, initBinaryDataService, } from '@test/nodes/Helpers'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; +import type { WorkflowTestData } from '@test/nodes/types'; describe('Execute iCalendar Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/If/V2/IfV2.node.ts b/packages/nodes-base/nodes/If/V2/IfV2.node.ts index 6ef2dcb626723..3d9ca752a0c37 100644 --- a/packages/nodes-base/nodes/If/V2/IfV2.node.ts +++ b/packages/nodes-base/nodes/If/V2/IfV2.node.ts @@ -9,9 +9,10 @@ import { type INodeTypeDescription, NodeConnectionType, } from 'n8n-workflow'; + +import { getTypeValidationParameter, getTypeValidationStrictness } from './utils'; import { ENABLE_LESS_STRICT_TYPE_VALIDATION } from '../../../utils/constants'; import { looseTypeValidationProperty } from '../../../utils/descriptions'; -import { getTypeValidationParameter, getTypeValidationStrictness } from './utils'; export class IfV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Intercom/Intercom.node.ts b/packages/nodes-base/nodes/Intercom/Intercom.node.ts index dead14c67ba76..26f71620c5ada 100644 --- a/packages/nodes-base/nodes/Intercom/Intercom.node.ts +++ b/packages/nodes-base/nodes/Intercom/Intercom.node.ts @@ -9,13 +9,14 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; -import { leadFields, leadOperations } from './LeadDescription'; + +import { companyFields, companyOperations } from './CompanyDescription'; +import type { ICompany } from './CompanyInteface'; import { intercomApiRequest, intercomApiRequestAllItems, validateJSON } from './GenericFunctions'; +import { leadFields, leadOperations } from './LeadDescription'; import type { IAvatar, ILead, ILeadCompany } from './LeadInterface'; import { userFields, userOperations } from './UserDescription'; import type { IUser, IUserCompany } from './UserInterface'; -import { companyFields, companyOperations } from './CompanyDescription'; -import type { ICompany } from './CompanyInteface'; export class Intercom implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/InvoiceNinja/GenericFunctions.ts b/packages/nodes-base/nodes/InvoiceNinja/GenericFunctions.ts index 76750e8fd9f2b..ce1c3b012d1be 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/GenericFunctions.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -9,8 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; - export const eventID: { [key: string]: string } = { create_client: '1', create_invoice: '2', diff --git a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts index f587701296177..2b771c545f18f 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts @@ -9,36 +9,23 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { invoiceNinjaApiRequest, invoiceNinjaApiRequestAllItems } from './GenericFunctions'; +import { isoCountryCodes } from '@utils/ISOCountryCodes'; +import { bankTransactionFields, bankTransactionOperations } from './BankTransactionDescription'; +import type { IBankTransaction, IBankTransactions } from './BankTransactionInterface'; import { clientFields, clientOperations } from './ClientDescription'; - -import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - import type { IClient, IContact } from './ClientInterface'; - +import { expenseFields, expenseOperations } from './ExpenseDescription'; +import type { IExpense } from './ExpenseInterface'; +import { invoiceNinjaApiRequest, invoiceNinjaApiRequestAllItems } from './GenericFunctions'; +import { invoiceFields, invoiceOperations } from './InvoiceDescription'; import type { IInvoice, IItem } from './invoiceInterface'; - -import { taskFields, taskOperations } from './TaskDescription'; - -import type { ITask } from './TaskInterface'; - import { paymentFields, paymentOperations } from './PaymentDescription'; - import type { IPayment } from './PaymentInterface'; - -import { expenseFields, expenseOperations } from './ExpenseDescription'; - -import type { IExpense } from './ExpenseInterface'; - import { quoteFields, quoteOperations } from './QuoteDescription'; - import type { IQuote } from './QuoteInterface'; -import { isoCountryCodes } from '@utils/ISOCountryCodes'; - -import { bankTransactionFields, bankTransactionOperations } from './BankTransactionDescription'; - -import type { IBankTransaction, IBankTransactions } from './BankTransactionInterface'; +import { taskFields, taskOperations } from './TaskDescription'; +import type { ITask } from './TaskInterface'; export class InvoiceNinja implements INodeType { description: INodeTypeDescription = { @@ -1083,10 +1070,10 @@ export class InvoiceNinja implements INodeType { const body: IBankTransactions = { transactions: [] }; const bankTransaction: IBankTransaction = {}; if (bankTransactionId) { - bankTransaction.id = bankTransactionId as string; + bankTransaction.id = bankTransactionId; } if (paymentId) { - bankTransaction.payment_id = paymentId as string; + bankTransaction.payment_id = paymentId; } body.transactions.push(bankTransaction); responseData = await invoiceNinjaApiRequest.call( diff --git a/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts b/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts index e5319eb6e2d6b..15bfa4aaea23a 100644 --- a/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts +++ b/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts @@ -1,3 +1,11 @@ +import get from 'lodash/get'; +import isEmpty from 'lodash/isEmpty'; +import isEqual from 'lodash/isEqual'; +import lt from 'lodash/lt'; +import pick from 'lodash/pick'; +import set from 'lodash/set'; +import unset from 'lodash/unset'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IDataObject, IExecuteFunctions, @@ -6,19 +14,11 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; -import isEmpty from 'lodash/isEmpty'; -import isEqual from 'lodash/isEqual'; -import lt from 'lodash/lt'; -import pick from 'lodash/pick'; -import set from 'lodash/set'; -import unset from 'lodash/unset'; +import { flattenKeys, shuffleArray, compareItems } from '@utils/utilities'; -import { sortByCode } from '../V3/helpers/utils'; import * as summarize from './summarize.operation'; -import { flattenKeys, shuffleArray, compareItems } from '@utils/utilities'; +import { sortByCode } from '../V3/helpers/utils'; export class ItemListsV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts b/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts index 673119063b856..24e7d12406b6b 100644 --- a/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { GenericValue, IDataObject, @@ -7,8 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; - type AggregationType = | 'append' | 'average' diff --git a/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts b/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts index 5447f9e95d712..bc2b310441853 100644 --- a/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts +++ b/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts @@ -1,3 +1,11 @@ +import get from 'lodash/get'; +import isEmpty from 'lodash/isEmpty'; +import isEqual from 'lodash/isEqual'; +import lt from 'lodash/lt'; +import pick from 'lodash/pick'; +import set from 'lodash/set'; +import unset from 'lodash/unset'; +import { NodeConnectionType, NodeOperationError, deepCopy } from 'n8n-workflow'; import type { IDataObject, IExecuteFunctions, @@ -7,19 +15,11 @@ import type { INodeTypeDescription, IPairedItemData, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError, deepCopy } from 'n8n-workflow'; -import get from 'lodash/get'; -import isEmpty from 'lodash/isEmpty'; -import isEqual from 'lodash/isEqual'; -import lt from 'lodash/lt'; -import pick from 'lodash/pick'; -import set from 'lodash/set'; -import unset from 'lodash/unset'; +import { flattenKeys, shuffleArray, compareItems } from '@utils/utilities'; -import { sortByCode } from '../V3/helpers/utils'; import * as summarize from './summarize.operation'; -import { flattenKeys, shuffleArray, compareItems } from '@utils/utilities'; +import { sortByCode } from '../V3/helpers/utils'; export class ItemListsV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts b/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts index f6fc2ddd7220d..1086be2f1c422 100644 --- a/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { GenericValue, IDataObject, @@ -7,8 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; - type AggregationType = | 'append' | 'average' diff --git a/packages/nodes-base/nodes/ItemLists/V3/ItemListsV3.node.ts b/packages/nodes-base/nodes/ItemLists/V3/ItemListsV3.node.ts index d2408eb277d66..8cc09765bd4cf 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/ItemListsV3.node.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/ItemListsV3.node.ts @@ -5,8 +5,8 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { versionDescription } from './actions/versionDescription'; import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; export class ItemListsV3 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.ts index 138fd2d2767b7..83b64309c15b5 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.ts @@ -1,3 +1,6 @@ +import get from 'lodash/get'; +import isEmpty from 'lodash/isEmpty'; +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -7,13 +10,10 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; -import isEmpty from 'lodash/isEmpty'; -import set from 'lodash/set'; +import { updateDisplayOptions } from '@utils/utilities'; import { addBinariesToItem, prepareFieldsArray } from '../../helpers/utils'; import { disableDotNotationBoolean } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/limit.operation.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/limit.operation.ts index 5671cf246fa03..1a6a6a334b214 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/limit.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/limit.operation.ts @@ -1,4 +1,5 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; + import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.ts index 09f580b393c86..cd9bb20c27dc1 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.ts @@ -1,14 +1,14 @@ -import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; - import get from 'lodash/get'; import isEqual from 'lodash/isEqual'; import lt from 'lodash/lt'; import pick from 'lodash/pick'; +import { NodeOperationError } from 'n8n-workflow'; +import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; + +import { compareItems, flattenKeys, updateDisplayOptions } from '@utils/utilities'; import { prepareFieldsArray, typeToNumber } from '../../helpers/utils'; import { disableDotNotationBoolean } from '../common.descriptions'; -import { compareItems, flattenKeys, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/sort.operation.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/sort.operation.ts index 0bd3ec9ec9141..7e09010422398 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/sort.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/sort.operation.ts @@ -1,3 +1,6 @@ +import get from 'lodash/get'; +import isEqual from 'lodash/isEqual'; +import lt from 'lodash/lt'; import type { IExecuteFunctions, IDataObject, @@ -6,14 +9,10 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; - -import isEqual from 'lodash/isEqual'; -import lt from 'lodash/lt'; +import { shuffleArray, updateDisplayOptions } from '@utils/utilities'; import { sortByCode } from '../../helpers/utils'; import { disableDotNotationBoolean } from '../common.descriptions'; -import { shuffleArray, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.ts index 544192fd99eb5..2c437a6a7470c 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.ts @@ -1,3 +1,5 @@ +import get from 'lodash/get'; +import unset from 'lodash/unset'; import type { IBinaryData, IDataObject, @@ -7,12 +9,11 @@ import type { } from 'n8n-workflow'; import { deepCopy, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; -import unset from 'lodash/unset'; -import { disableDotNotationBoolean } from '../common.descriptions'; -import { prepareFieldsArray } from '../../helpers/utils'; import { updateDisplayOptions } from '@utils/utilities'; +import { prepareFieldsArray } from '../../helpers/utils'; +import { disableDotNotationBoolean } from '../common.descriptions'; + const properties: INodeProperties[] = [ { displayName: 'Fields To Split Out', diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/summarize.operation.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/summarize.operation.ts index d026beb2d7c36..7d96e5800093a 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/summarize.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/itemList/summarize.operation.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { GenericValue, IDataObject, @@ -7,10 +8,10 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; -import { disableDotNotationBoolean } from '../common.descriptions'; import { updateDisplayOptions } from '@utils/utilities'; +import { disableDotNotationBoolean } from '../common.descriptions'; + type AggregationType = | 'append' | 'average' diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts index 006d4f9b87e79..6580464c4ae83 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts @@ -1,8 +1,8 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { ItemListsType } from './node.type'; import * as itemList from './itemList'; +import type { ItemListsType } from './node.type'; export async function router(this: IExecuteFunctions): Promise { let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Iterable/Iterable.node.ts b/packages/nodes-base/nodes/Iterable/Iterable.node.ts index 2159705475761..7e5d7e20d2641 100644 --- a/packages/nodes-base/nodes/Iterable/Iterable.node.ts +++ b/packages/nodes-base/nodes/Iterable/Iterable.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -10,13 +11,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { iterableApiRequest } from './GenericFunctions'; - import { eventFields, eventOperations } from './EventDescription'; - +import { iterableApiRequest } from './GenericFunctions'; import { userFields, userOperations } from './UserDescription'; - import { userListFields, userListOperations } from './UserListDescription'; export class Iterable implements INodeType { diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index 2c21328f78818..26770e2eae9b0 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -1,6 +1,4 @@ -import type { Readable } from 'stream'; import mergeWith from 'lodash/mergeWith'; - import type { IDataObject, IExecuteFunctions, @@ -13,6 +11,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import type { Readable } from 'stream'; import { filterSortSearchListItems, @@ -22,13 +21,9 @@ import { simplifyIssueOutput, validateJSON, } from './GenericFunctions'; - import { issueAttachmentFields, issueAttachmentOperations } from './IssueAttachmentDescription'; - import { issueCommentFields, issueCommentOperations } from './IssueCommentDescription'; - import { issueFields, issueOperations } from './IssueDescription'; - import type { IFields, IIssue, @@ -36,7 +31,6 @@ import type { INotify, NotificationRecipientsRestrictions, } from './IssueInterface'; - import { userFields, userOperations } from './UserDescription'; export class Jira implements INodeType { diff --git a/packages/nodes-base/nodes/Jwt/Jwt.node.ts b/packages/nodes-base/nodes/Jwt/Jwt.node.ts index 3a0815c906fed..1018f97bf8125 100644 --- a/packages/nodes-base/nodes/Jwt/Jwt.node.ts +++ b/packages/nodes-base/nodes/Jwt/Jwt.node.ts @@ -1,3 +1,4 @@ +import jwt from 'jsonwebtoken'; import type { IDataObject, IExecuteFunctions, @@ -7,8 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import jwt from 'jsonwebtoken'; - import { formatPrivateKey } from '../../utils/utilities'; import { parseJsonParameter } from '../Set/v2/helpers/utils'; diff --git a/packages/nodes-base/nodes/Kafka/Kafka.node.ts b/packages/nodes-base/nodes/Kafka/Kafka.node.ts index 87e9f95b0d7e7..0306fae7723a3 100644 --- a/packages/nodes-base/nodes/Kafka/Kafka.node.ts +++ b/packages/nodes-base/nodes/Kafka/Kafka.node.ts @@ -1,8 +1,6 @@ +import { SchemaRegistry } from '@kafkajs/confluent-schema-registry'; import type { KafkaConfig, SASLOptions, TopicMessages } from 'kafkajs'; import { CompressionTypes, Kafka as apacheKafka } from 'kafkajs'; - -import { SchemaRegistry } from '@kafkajs/confluent-schema-registry'; - import type { IExecuteFunctions, ICredentialDataDecryptedObject, @@ -15,6 +13,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { ApplicationError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; + import { generatePairedItemData } from '../../utils/utilities'; export class Kafka implements INodeType { diff --git a/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts b/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts index 631566ffbd071..628d1d1d4d753 100644 --- a/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts +++ b/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts @@ -1,8 +1,6 @@ +import { SchemaRegistry } from '@kafkajs/confluent-schema-registry'; import type { KafkaConfig, SASLOptions } from 'kafkajs'; import { Kafka as apacheKafka, logLevel } from 'kafkajs'; - -import { SchemaRegistry } from '@kafkajs/confluent-schema-registry'; - import type { ITriggerFunctions, IDataObject, diff --git a/packages/nodes-base/nodes/Keap/GenericFunctions.ts b/packages/nodes-base/nodes/Keap/GenericFunctions.ts index 03a98ec1a6c6e..b44fad91e1038 100644 --- a/packages/nodes-base/nodes/Keap/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Keap/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IDataObject, IExecuteFunctions, @@ -10,8 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; - export async function keapApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Keap/Keap.node.ts b/packages/nodes-base/nodes/Keap/Keap.node.ts index 43a766ab3ad1e..065dbec746646 100644 --- a/packages/nodes-base/nodes/Keap/Keap.node.ts +++ b/packages/nodes-base/nodes/Keap/Keap.node.ts @@ -1,3 +1,6 @@ +import { capitalCase, pascalCase } from 'change-case'; +import moment from 'moment-timezone'; +import { NodeConnectionType } from 'n8n-workflow'; import type { IDataObject, IExecuteFunctions, @@ -7,28 +10,9 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType } from 'n8n-workflow'; - -import { capitalCase, pascalCase } from 'change-case'; -import moment from 'moment-timezone'; -import { keapApiRequest, keapApiRequestAllItems, keysToSnakeCase } from './GenericFunctions'; - -import { contactFields, contactOperations } from './ContactDescription'; - -import { contactNoteFields, contactNoteOperations } from './ContactNoteDescription'; - -import { contactTagFields, contactTagOperations } from './ContactTagDescription'; - -import { ecommerceOrderFields, ecommerceOrderOperations } from './EcommerceOrderDescripion'; - -import { ecommerceProductFields, ecommerceProductOperations } from './EcommerceProductDescription'; - -import { emailFields, emailOperations } from './EmailDescription'; - -import { fileFields, fileOperations } from './FileDescription'; import { companyFields, companyOperations } from './CompanyDescription'; - +import type { ICompany } from './CompanyInterface'; import type { IAddress, IContact, @@ -37,18 +21,19 @@ import type { IPhone, ISocialAccount, } from './ConctactInterface'; - -import type { IAttachment, IEmail } from './EmaiIInterface'; - +import { contactFields, contactOperations } from './ContactDescription'; +import { contactNoteFields, contactNoteOperations } from './ContactNoteDescription'; import type { INote } from './ContactNoteInterface'; - +import { contactTagFields, contactTagOperations } from './ContactTagDescription'; +import { ecommerceOrderFields, ecommerceOrderOperations } from './EcommerceOrderDescripion'; import type { IEcommerceOrder, IItem, IShippingAddress } from './EcommerceOrderInterface'; - +import { ecommerceProductFields, ecommerceProductOperations } from './EcommerceProductDescription'; import type { IEcommerceProduct } from './EcommerceProductInterface'; - +import type { IAttachment, IEmail } from './EmaiIInterface'; +import { emailFields, emailOperations } from './EmailDescription'; +import { fileFields, fileOperations } from './FileDescription'; import type { IFile } from './FileInterface'; - -import type { ICompany } from './CompanyInterface'; +import { keapApiRequest, keapApiRequestAllItems, keysToSnakeCase } from './GenericFunctions'; export class Keap implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts b/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts index 066bceb0ff5f9..74446697123ab 100644 --- a/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts +++ b/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts @@ -1,3 +1,4 @@ +import { capitalCase } from 'change-case'; import type { IHookFunctions, IWebhookFunctions, @@ -10,7 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; import { keapApiRequest } from './GenericFunctions'; export class KeapTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts b/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts index 946db3742a3aa..87f6931dbf111 100644 --- a/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts +++ b/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts @@ -17,10 +17,9 @@ import { workItemFields, workItemOperations, } from './descriptions'; - import type { LoadOptions } from './GenericFunctions'; import { createLoadOptions, kitemakerRequest, kitemakerRequestAllItems } from './GenericFunctions'; - +import { createWorkItem, editWorkItem } from './mutations'; import { getAllSpaces, getAllUsers, @@ -34,8 +33,6 @@ import { getWorkItems, } from './queries'; -import { createWorkItem, editWorkItem } from './mutations'; - export class Kitemaker implements INodeType { description: INodeTypeDescription = { displayName: 'Kitemaker', diff --git a/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts b/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts index cb9b6b6a2c7d6..77279a338a530 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts @@ -1,3 +1,18 @@ +import clone from 'lodash/clone'; +import compact from 'lodash/compact'; +import concat from 'lodash/concat'; +import escapeRegExp from 'lodash/escapeRegExp'; +import every from 'lodash/every'; +import first from 'lodash/first'; +import isArray from 'lodash/isArray'; +import isString from 'lodash/isString'; +import last from 'lodash/last'; +import set from 'lodash/set'; +import some from 'lodash/some'; +import split from 'lodash/split'; +import toNumber from 'lodash/toNumber'; +import toString from 'lodash/toString'; +import trim from 'lodash/trim'; import type { IDataObject, IExecuteFunctions, @@ -9,22 +24,6 @@ import type { IWebhookFunctions, } from 'n8n-workflow'; -import set from 'lodash/set'; -import concat from 'lodash/concat'; -import split from 'lodash/split'; -import every from 'lodash/every'; -import toString from 'lodash/toString'; -import toNumber from 'lodash/toNumber'; -import isString from 'lodash/isString'; -import compact from 'lodash/compact'; -import first from 'lodash/first'; -import last from 'lodash/last'; -import clone from 'lodash/clone'; -import some from 'lodash/some'; -import isArray from 'lodash/isArray'; -import trim from 'lodash/trim'; -import escapeRegExp from 'lodash/escapeRegExp'; - export async function koBoToolboxApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, option: IDataObject = {}, diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index 2bb60b2b75f95..d4cdb886c2502 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -8,6 +8,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; +import { fileFields, fileOperations } from './FileDescription'; +import { formFields, formOperations } from './FormDescription'; import { downloadAttachments, formatSubmission, @@ -16,14 +18,8 @@ import { loadForms, parseStringList, } from './GenericFunctions'; - -import { formFields, formOperations } from './FormDescription'; - -import { submissionFields, submissionOperations } from './SubmissionDescription'; - import { hookFields, hookOperations } from './HookDescription'; - -import { fileFields, fileOperations } from './FileDescription'; +import { submissionFields, submissionOperations } from './SubmissionDescription'; export class KoBoToolbox implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts index 503c100741511..343f9d9c5b0e5 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts @@ -15,7 +15,6 @@ import { loadForms, parseStringList, } from './GenericFunctions'; - import { options } from './Options'; export class KoBoToolboxTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Ldap/Ldap.node.ts b/packages/nodes-base/nodes/Ldap/Ldap.node.ts index aa8f8413fc55a..2d13e10314d0b 100644 --- a/packages/nodes-base/nodes/Ldap/Ldap.node.ts +++ b/packages/nodes-base/nodes/Ldap/Ldap.node.ts @@ -1,3 +1,4 @@ +import { Attribute, Change } from 'ldapts'; import type { ICredentialDataDecryptedObject, ICredentialsDecrypted, @@ -12,9 +13,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { Attribute, Change } from 'ldapts'; -import { ldapFields } from './LdapDescription'; import { BINARY_AD_ATTRIBUTES, createLdapClient, resolveBinaryAttributes } from './Helpers'; +import { ldapFields } from './LdapDescription'; export class Ldap implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts b/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts index cc8875549c11a..a3d2d05dba338 100644 --- a/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { capitalCase } from 'change-case'; import type { IExecuteFunctions, IHookFunctions, @@ -7,8 +8,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; - /** * Make an authenticated API request to Lemlist. */ diff --git a/packages/nodes-base/nodes/Lemlist/test/GenericFunctions.test.ts b/packages/nodes-base/nodes/Lemlist/test/GenericFunctions.test.ts index a0538678bd6a9..c64a845a551b7 100644 --- a/packages/nodes-base/nodes/Lemlist/test/GenericFunctions.test.ts +++ b/packages/nodes-base/nodes/Lemlist/test/GenericFunctions.test.ts @@ -5,6 +5,7 @@ import type { IDataObject, IHttpRequestMethods, } from 'n8n-workflow'; + import { lemlistApiRequest, lemlistApiRequestAllItems, getEvents } from '../GenericFunctions'; describe('GenericFunctions', () => { diff --git a/packages/nodes-base/nodes/Lemlist/v1/LemlistV1.node.ts b/packages/nodes-base/nodes/Lemlist/v1/LemlistV1.node.ts index 9c313fc60f36e..9c95991940aa5 100644 --- a/packages/nodes-base/nodes/Lemlist/v1/LemlistV1.node.ts +++ b/packages/nodes-base/nodes/Lemlist/v1/LemlistV1.node.ts @@ -1,3 +1,5 @@ +import isEmpty from 'lodash/isEmpty'; +import omit from 'lodash/omit'; import { type IExecuteFunctions, type IDataObject, @@ -9,9 +11,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; -import omit from 'lodash/omit'; -import { lemlistApiRequest, lemlistApiRequestAllItems } from '../GenericFunctions'; import { activityFields, activityOperations, @@ -24,6 +23,7 @@ import { unsubscribeFields, unsubscribeOperations, } from './descriptions'; +import { lemlistApiRequest, lemlistApiRequestAllItems } from '../GenericFunctions'; const versionDescription: INodeTypeDescription = { displayName: 'Lemlist', name: 'lemlist', diff --git a/packages/nodes-base/nodes/Lemlist/v2/LemlistV2.node.ts b/packages/nodes-base/nodes/Lemlist/v2/LemlistV2.node.ts index d49128ea9f2fb..7ccab5c90a4bb 100644 --- a/packages/nodes-base/nodes/Lemlist/v2/LemlistV2.node.ts +++ b/packages/nodes-base/nodes/Lemlist/v2/LemlistV2.node.ts @@ -1,3 +1,5 @@ +import isEmpty from 'lodash/isEmpty'; +import omit from 'lodash/omit'; import { type IExecuteFunctions, type IDataObject, @@ -9,9 +11,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; -import omit from 'lodash/omit'; -import { lemlistApiRequest, lemlistApiRequestAllItems } from '../GenericFunctions'; import { activityFields, activityOperations, @@ -26,6 +25,7 @@ import { unsubscribeFields, unsubscribeOperations, } from './descriptions'; +import { lemlistApiRequest, lemlistApiRequestAllItems } from '../GenericFunctions'; const versionDescription: INodeTypeDescription = { displayName: 'Lemlist', name: 'lemlist', diff --git a/packages/nodes-base/nodes/Line/Line.node.ts b/packages/nodes-base/nodes/Line/Line.node.ts index f8cd832aa5928..15f4f4f36faa0 100644 --- a/packages/nodes-base/nodes/Line/Line.node.ts +++ b/packages/nodes-base/nodes/Line/Line.node.ts @@ -8,7 +8,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { lineApiRequest } from './GenericFunctions'; - import { notificationFields, notificationOperations } from './NotificationDescription'; export class Line implements INodeType { diff --git a/packages/nodes-base/nodes/Linear/GenericFunctions.ts b/packages/nodes-base/nodes/Linear/GenericFunctions.ts index e1e7790bfcf8e..805fc697a6c75 100644 --- a/packages/nodes-base/nodes/Linear/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Linear/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { ICredentialDataDecryptedObject, ICredentialTestFunctions, @@ -10,8 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import get from 'lodash/get'; - import { query } from './Queries'; export async function linearApiRequest( diff --git a/packages/nodes-base/nodes/Linear/Linear.node.ts b/packages/nodes-base/nodes/Linear/Linear.node.ts index 7ea6f2aca5e4a..23a8b9bd42f30 100644 --- a/packages/nodes-base/nodes/Linear/Linear.node.ts +++ b/packages/nodes-base/nodes/Linear/Linear.node.ts @@ -20,9 +20,7 @@ import { sort, validateCredentials, } from './GenericFunctions'; - import { issueFields, issueOperations } from './IssueDescription'; - import { query } from './Queries'; interface IGraphqlBody { query: string; diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index 9732176da9ced..44e8bb05856df 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { linkedInApiRequest } from './GenericFunctions'; import { postFields, postOperations } from './PostDescription'; diff --git a/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts b/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts index d01bc1ba1a97f..251b2402b0b10 100644 --- a/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts +++ b/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts @@ -1,3 +1,4 @@ +import { watch } from 'chokidar'; import { type ITriggerFunctions, type IDataObject, @@ -7,8 +8,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { watch } from 'chokidar'; - export class LocalFileTrigger implements INodeType { description: INodeTypeDescription = { displayName: 'Local File Trigger', diff --git a/packages/nodes-base/nodes/LoneScale/GenericFunctions.ts b/packages/nodes-base/nodes/LoneScale/GenericFunctions.ts index b237024c81f67..91f749e743405 100644 --- a/packages/nodes-base/nodes/LoneScale/GenericFunctions.ts +++ b/packages/nodes-base/nodes/LoneScale/GenericFunctions.ts @@ -8,6 +8,7 @@ import { type IWebhookFunctions, type IRequestOptions, } from 'n8n-workflow'; + import { BASE_URL } from './constants'; export async function lonescaleApiRequest( diff --git a/packages/nodes-base/nodes/MQTT/test/Mqtt.node.test.ts b/packages/nodes-base/nodes/MQTT/test/Mqtt.node.test.ts index 67b6202520f9d..9e86651ff2ad3 100644 --- a/packages/nodes-base/nodes/MQTT/test/Mqtt.node.test.ts +++ b/packages/nodes-base/nodes/MQTT/test/Mqtt.node.test.ts @@ -1,9 +1,9 @@ -import type { MqttClient } from 'mqtt'; import { mock } from 'jest-mock-extended'; +import type { MqttClient } from 'mqtt'; import type { ICredentialDataDecryptedObject, IExecuteFunctions } from 'n8n-workflow'; -import { Mqtt } from '../Mqtt.node'; import { createClient } from '../GenericFunctions'; +import { Mqtt } from '../Mqtt.node'; jest.mock('../GenericFunctions', () => { const mockMqttClient = mock(); diff --git a/packages/nodes-base/nodes/MQTT/test/MqttTrigger.node.test.ts b/packages/nodes-base/nodes/MQTT/test/MqttTrigger.node.test.ts index 05694b43c6ad3..3862c91b5f98f 100644 --- a/packages/nodes-base/nodes/MQTT/test/MqttTrigger.node.test.ts +++ b/packages/nodes-base/nodes/MQTT/test/MqttTrigger.node.test.ts @@ -1,10 +1,10 @@ +import { captor, mock } from 'jest-mock-extended'; import type { MqttClient, OnMessageCallback } from 'mqtt'; import { returnJsonArray } from 'n8n-core'; -import { captor, mock } from 'jest-mock-extended'; import type { ICredentialDataDecryptedObject, ITriggerFunctions } from 'n8n-workflow'; -import { MqttTrigger } from '../MqttTrigger.node'; import { createClient } from '../GenericFunctions'; +import { MqttTrigger } from '../MqttTrigger.node'; jest.mock('../GenericFunctions', () => { const mockMqttClient = mock(); diff --git a/packages/nodes-base/nodes/Magento/GenericFunctions.ts b/packages/nodes-base/nodes/Magento/GenericFunctions.ts index eda3122557e4f..2817d51ccb461 100644 --- a/packages/nodes-base/nodes/Magento/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Magento/GenericFunctions.ts @@ -11,6 +11,7 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { ApplicationError, NodeApiError } from 'n8n-workflow'; + import type { Filter, Address, Search, FilterGroup, ProductAttribute } from './types'; export async function magentoApiRequest( diff --git a/packages/nodes-base/nodes/Magento/Magento2.node.ts b/packages/nodes-base/nodes/Magento/Magento2.node.ts index 0d7196eb75e8e..ce473b16a80d4 100644 --- a/packages/nodes-base/nodes/Magento/Magento2.node.ts +++ b/packages/nodes-base/nodes/Magento/Magento2.node.ts @@ -1,3 +1,4 @@ +import { capitalCase } from 'change-case'; import type { IExecuteFunctions, IDataObject, @@ -9,7 +10,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; +import { customerFields, customerOperations } from './CustomerDescription'; import { adjustAddresses, getFilterQuery, @@ -20,15 +21,9 @@ import { sort, validateJSON, } from './GenericFunctions'; - -import { customerFields, customerOperations } from './CustomerDescription'; - +import { invoiceFields, invoiceOperations } from './InvoiceDescription'; import { orderFields, orderOperations } from './OrderDescription'; - import { productFields, productOperations } from './ProductDescription'; - -import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - import type { CustomAttribute, CustomerAttributeMetadata, diff --git a/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts b/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts index ae014ceed5f1c..23fa53e184c4b 100644 --- a/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts @@ -1,5 +1,4 @@ import { ApplicationError } from 'n8n-workflow'; - import type { IDataObject, IExecuteFunctions, diff --git a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts index 3c30d6c0d90f4..890ca723600fd 100644 --- a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,7 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { campaignFieldsMetadata, mailchimpApiRequest, diff --git a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts index 928296c32d11a..b97c9dd37f755 100644 --- a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts @@ -10,6 +10,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; + import { mailchimpApiRequest } from './GenericFunctions'; export class MailchimpTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts index 0b02a4590cfb1..303ef673ef1ab 100644 --- a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts +++ b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts @@ -9,11 +9,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import { emailFields, emailOperations } from './EmailDescription'; import type { IMessage } from './GenericFunctions'; import { mailjetApiRequest, validateJSON } from './GenericFunctions'; - -import { emailFields, emailOperations } from './EmailDescription'; - import { smsFields, smsOperations } from './SmsDescription'; export class Mailjet implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts index 6a9417835e637..43ed419ddb687 100644 --- a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts +++ b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts @@ -1,3 +1,6 @@ +import isEmpty from 'lodash/isEmpty'; +import map from 'lodash/map'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -10,10 +13,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -import map from 'lodash/map'; -import isEmpty from 'lodash/isEmpty'; import { getGoogleAnalyticsDomainsArray, getTags, diff --git a/packages/nodes-base/nodes/Markdown/Markdown.node.ts b/packages/nodes-base/nodes/Markdown/Markdown.node.ts index bcd270797d5de..dbefae898901c 100644 --- a/packages/nodes-base/nodes/Markdown/Markdown.node.ts +++ b/packages/nodes-base/nodes/Markdown/Markdown.node.ts @@ -1,3 +1,5 @@ +import isEmpty from 'lodash/isEmpty'; +import set from 'lodash/set'; import type { IExecuteFunctions, IDataObject, @@ -7,13 +9,8 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, deepCopy } from 'n8n-workflow'; - -import { Converter } from 'showdown'; - import { NodeHtmlMarkdown } from 'node-html-markdown'; - -import isEmpty from 'lodash/isEmpty'; -import set from 'lodash/set'; +import { Converter } from 'showdown'; export class Markdown implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts index 62617ee6fa376..370fdb261b0c7 100644 --- a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts +++ b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts @@ -15,14 +15,12 @@ import { tickerFields, tickerOperations, } from './descriptions'; - import { format, marketstackApiRequest, marketstackApiRequestAllItems, validateTimeOptions, } from './GenericFunctions'; - import type { EndOfDayDataFilters, Operation, Resource } from './types'; export class Marketstack implements INodeType { diff --git a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts index 44415436fdffb..c00d819015cff 100644 --- a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts @@ -7,7 +7,6 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; - import { v4 as uuid } from 'uuid'; export async function matrixApiRequest( diff --git a/packages/nodes-base/nodes/Matrix/Matrix.node.ts b/packages/nodes-base/nodes/Matrix/Matrix.node.ts index 141a6c51814cb..6a0c4b40ac198 100644 --- a/packages/nodes-base/nodes/Matrix/Matrix.node.ts +++ b/packages/nodes-base/nodes/Matrix/Matrix.node.ts @@ -9,18 +9,12 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { handleMatrixCall, matrixApiRequest } from './GenericFunctions'; - import { accountOperations } from './AccountDescription'; - import { eventFields, eventOperations } from './EventDescription'; - +import { handleMatrixCall, matrixApiRequest } from './GenericFunctions'; import { mediaFields, mediaOperations } from './MediaDescription'; - import { messageFields, messageOperations } from './MessageDescription'; - import { roomFields, roomOperations } from './RoomDescription'; - import { roomMemberFields, roomMemberOperations } from './RoomMemberDescription'; export class Matrix implements INodeType { diff --git a/packages/nodes-base/nodes/Mattermost/v1/MattermostV1.node.ts b/packages/nodes-base/nodes/Mattermost/v1/MattermostV1.node.ts index 744a6f37095e4..926be610aed19 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/MattermostV1.node.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/MattermostV1.node.ts @@ -5,9 +5,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; +import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; import { loadOptions } from './methods'; -import { router } from './actions/router'; export class MattermostV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/addUser/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/addUser/index.ts index 53e45541441e8..742724846203e 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/addUser/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/addUser/index.ts @@ -1,4 +1,4 @@ -import { addUser as execute } from './execute'; import { channelAddUserDescription as description } from './description'; +import { addUser as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/create/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/create/index.ts index 6d0b5e029813c..295ea9864068b 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/create/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/create/index.ts @@ -1,4 +1,4 @@ -import { create as execute } from './execute'; import { channelCreateDescription as description } from './description'; +import { create as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/del/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/del/index.ts index 6a1a439d788c6..337e950330bcf 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/del/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/del/index.ts @@ -1,4 +1,4 @@ -import { del as execute } from './execute'; import { channelDeleteDescription as description } from './description'; +import { del as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/index.ts index 26cf5301a3eef..2edfc23da4043 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/index.ts @@ -1,11 +1,12 @@ import type { INodeProperties } from 'n8n-workflow'; + +import * as addUser from './addUser'; import * as create from './create'; import * as del from './del'; import * as members from './members'; import * as restore from './restore'; -import * as addUser from './addUser'; -import * as statistics from './statistics'; import * as search from './search'; +import * as statistics from './statistics'; export { create, del as delete, members, restore, addUser, statistics, search }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/members/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/members/index.ts index 21b6549c6dfcc..9849dbfbd856f 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/members/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/members/index.ts @@ -1,4 +1,4 @@ -import { members as execute } from './execute'; import { channelMembersDescription as description } from './description'; +import { members as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/index.ts index 7bf9f4c595a55..7d99464fc6bfe 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/index.ts @@ -1,4 +1,4 @@ -import { restore as execute } from './execute'; import { channelRestoreDescription as description } from './description'; +import { restore as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/search/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/search/index.ts index 9b3ac397d09f8..9c5c467bb7d3c 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/search/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/search/index.ts @@ -1,4 +1,4 @@ -import { search as execute } from './execute'; import { channelSearchDescription as description } from './description'; +import { search as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/statistics/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/statistics/index.ts index 946856f3b1ee5..c2c2bca7a6337 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/statistics/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/statistics/index.ts @@ -1,4 +1,4 @@ -import { statistics as execute } from './execute'; import { channelStatisticsDescription as description } from './description'; +import { statistics as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/message/del/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/message/del/index.ts index 13161e7481015..68cff0cdb7e5f 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/message/del/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/message/del/index.ts @@ -1,4 +1,4 @@ -import { del as execute } from './execute'; import { messageDeleteDescription as description } from './description'; +import { del as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/message/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/message/index.ts index 433e0e95e19ec..e74d546d43448 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/message/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/message/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as del from './del'; import * as post from './post'; import * as postEphemeral from './postEphemeral'; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/execute.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/execute.ts index 38f3eb6797186..82362ec0e021b 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/execute.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/execute.ts @@ -1,7 +1,6 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; import { apiRequest } from '../../../transport'; - import type { IAttachment } from '../../Interfaces'; export async function post(this: IExecuteFunctions, index: number): Promise { diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/index.ts index e823fd7dc242a..1c3b259ab5ae9 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/message/post/index.ts @@ -1,4 +1,4 @@ -import { post as execute } from './execute'; import { messagePostDescription as description } from './description'; +import { post as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/message/postEphemeral/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/message/postEphemeral/index.ts index db3575bba9f52..1c2725e009e15 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/message/postEphemeral/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/message/postEphemeral/index.ts @@ -1,4 +1,4 @@ -import { postEphemeral as execute } from './execute'; import { messagePostEphemeralDescription as description } from './description'; +import { postEphemeral as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/create/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/create/index.ts index d146e47a54bd5..7b256a04f2dca 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/create/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/create/index.ts @@ -1,4 +1,4 @@ -import { create as execute } from './execute'; import { reactionCreateDescription as description } from './description'; +import { create as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/del/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/del/index.ts index 1464e57a39849..835773772577a 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/del/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/del/index.ts @@ -1,4 +1,4 @@ -import { del as execute } from './execute'; import { reactionDeleteDescription as description } from './description'; +import { del as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/getAll/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/getAll/index.ts index 8e2c2bcdb513d..8b1e83c8ac9c3 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/getAll/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { reactionGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/index.ts index e1da062e19731..a27bbf23c21e7 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/reaction/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create'; import * as del from './del'; import * as getAll from './getAll'; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts index bd1af59af2ed4..9f775e178e786 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts @@ -1,10 +1,10 @@ import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; import * as channel from './channel'; +import type { Mattermost } from './Interfaces'; import * as message from './message'; import * as reaction from './reaction'; import * as user from './user'; -import type { Mattermost } from './Interfaces'; export async function router(this: IExecuteFunctions): Promise { const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/create/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/create/index.ts index b577b89d6ac38..cdc5974dc1d0b 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/create/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/create/index.ts @@ -1,4 +1,4 @@ -import { create as execute } from './execute'; import { userCreateDescription as description } from './description'; +import { create as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/deactive/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/deactive/index.ts index c94f40b60d991..cc7ea96d449ef 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/deactive/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/deactive/index.ts @@ -1,4 +1,4 @@ -import { deactive as execute } from './execute'; import { userDeactiveDescription as description } from './description'; +import { deactive as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/execute.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/execute.ts index 099de6e0cdf4b..86511eda0b0e7 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/execute.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/execute.ts @@ -1,7 +1,7 @@ +import { snakeCase } from 'change-case'; import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { apiRequest, apiRequestAllItems } from '../../../transport'; export async function getAll( diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/index.ts index f0ca9da66cbb5..6cdefb692296e 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { userGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getByEmail/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getByEmail/index.ts index cfea09fd8d163..aae3018fe8344 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getByEmail/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getByEmail/index.ts @@ -1,4 +1,4 @@ -import { getByEmail as execute } from './execute'; import { userGetByEmailDescription as description } from './description'; +import { getByEmail as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getById/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getById/index.ts index c7e5dc2641658..8b0bcb1dcb5bc 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/getById/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/getById/index.ts @@ -1,4 +1,4 @@ -import { getById as execute } from './execute'; import { userGetByIdDescription as description } from './description'; +import { getById as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/index.ts index 7ac78aea128eb..cf1859f7577ca 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create'; import * as deactive from './deactive'; import * as getAll from './getAll'; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/user/invite/index.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/user/invite/index.ts index f6217f915699e..17f51ca035c88 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/user/invite/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/user/invite/index.ts @@ -1,4 +1,4 @@ -import { invite as execute } from './execute'; import { userInviteDescription as description } from './description'; +import { invite as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts index 787c1af46aaf1..bdd0fc57de093 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts @@ -1,5 +1,6 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; + import * as channel from './channel'; import * as message from './message'; import * as reaction from './reaction'; diff --git a/packages/nodes-base/nodes/Mautic/Mautic.node.ts b/packages/nodes-base/nodes/Mautic/Mautic.node.ts index 25a1aad38125b..0a5d61739ce93 100644 --- a/packages/nodes-base/nodes/Mautic/Mautic.node.ts +++ b/packages/nodes-base/nodes/Mautic/Mautic.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IExecuteFunctions, IDataObject, @@ -10,20 +11,13 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; -import { mauticApiRequest, mauticApiRequestAllItems, validateJSON } from './GenericFunctions'; - -import { contactFields, contactOperations } from './ContactDescription'; - -import { segmentEmailFields, segmentEmailOperations } from './SegmentEmailDescription'; - -import { companyFields, companyOperations } from './CompanyDescription'; - +import { campaignContactFields, campaignContactOperations } from './CampaignContactDescription'; import { companyContactFields, companyContactOperations } from './CompanyContactDescription'; - +import { companyFields, companyOperations } from './CompanyDescription'; +import { contactFields, contactOperations } from './ContactDescription'; import { contactSegmentFields, contactSegmentOperations } from './ContactSegmentDescription'; - -import { campaignContactFields, campaignContactOperations } from './CampaignContactDescription'; +import { mauticApiRequest, mauticApiRequestAllItems, validateJSON } from './GenericFunctions'; +import { segmentEmailFields, segmentEmailOperations } from './SegmentEmailDescription'; export class Mautic implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts b/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts index 01a87bd7caeb7..cf7251b7eef92 100644 --- a/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts +++ b/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts @@ -1,5 +1,3 @@ -import { parse as urlParse } from 'url'; - import { type IHookFunctions, type IWebhookFunctions, @@ -11,6 +9,7 @@ import { type IWebhookResponseData, NodeConnectionType, } from 'n8n-workflow'; +import { parse as urlParse } from 'url'; import { mauticApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Merge/test/v3/operations.test.ts b/packages/nodes-base/nodes/Merge/test/v3/operations.test.ts index ae9dcfd954727..a318885edcc16 100644 --- a/packages/nodes-base/nodes/Merge/test/v3/operations.test.ts +++ b/packages/nodes-base/nodes/Merge/test/v3/operations.test.ts @@ -1,4 +1,5 @@ import type { IDataObject, INode } from 'n8n-workflow'; + import { createMockExecuteFunction } from '../../../../test/nodes/Helpers'; import * as mode from '../../v3/actions/mode'; diff --git a/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts b/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts index 7105e1aa9a50d..069f46ba08142 100644 --- a/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts +++ b/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts @@ -1,5 +1,4 @@ import get from 'lodash/get'; - import type { IExecuteFunctions, GenericValue, @@ -11,9 +10,10 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, deepCopy } from 'n8n-workflow'; -import { generatePairedItemData } from '../../../utils/utilities'; import { oldVersionNotice } from '@utils/descriptions'; +import { generatePairedItemData } from '../../../utils/utilities'; + export class MergeV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts b/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts index 6adc63aa1e5ee..955835dd3ab92 100644 --- a/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts +++ b/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts @@ -1,5 +1,4 @@ import merge from 'lodash/merge'; - import { type IExecuteFunctions, type IDataObject, @@ -11,13 +10,15 @@ import { NodeConnectionType, } from 'n8n-workflow'; +import { preparePairedItemDataArray } from '@utils/utilities'; + +import { optionsDescription } from './descriptions'; import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions, MatchFieldsOutput, } from './interfaces'; - import { addSourceField, addSuffixToEntriesKeys, @@ -28,9 +29,6 @@ import { selectMergeMethod, } from './utils'; -import { optionsDescription } from './descriptions'; -import { preparePairedItemDataArray } from '@utils/utilities'; - export class MergeV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Merge/v2/utils.ts b/packages/nodes-base/nodes/Merge/v2/utils.ts index ec5180c5a50c7..1f5437f663d18 100644 --- a/packages/nodes-base/nodes/Merge/v2/utils.ts +++ b/packages/nodes-base/nodes/Merge/v2/utils.ts @@ -1,4 +1,8 @@ -import { ApplicationError } from 'n8n-workflow'; +import assign from 'lodash/assign'; +import assignWith from 'lodash/assignWith'; +import get from 'lodash/get'; +import merge from 'lodash/merge'; +import mergeWith from 'lodash/mergeWith'; import type { GenericValue, IBinaryKeyData, @@ -6,15 +10,11 @@ import type { INodeExecutionData, IPairedItemData, } from 'n8n-workflow'; +import { ApplicationError } from 'n8n-workflow'; -import assign from 'lodash/assign'; -import assignWith from 'lodash/assignWith'; -import get from 'lodash/get'; -import merge from 'lodash/merge'; -import mergeWith from 'lodash/mergeWith'; +import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities'; import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions } from './interfaces'; -import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities'; type PairToMatch = { field1: string; diff --git a/packages/nodes-base/nodes/Merge/v3/MergeV3.node.ts b/packages/nodes-base/nodes/Merge/v3/MergeV3.node.ts index f194d9e54a8d8..254d248f6e32f 100644 --- a/packages/nodes-base/nodes/Merge/v3/MergeV3.node.ts +++ b/packages/nodes-base/nodes/Merge/v3/MergeV3.node.ts @@ -5,8 +5,8 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { versionDescription } from './actions/versionDescription'; import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; import { loadOptions } from './methods'; export class MergeV3 implements INodeType { diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts index 5bf9896216b50..e9f9251495840 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts @@ -4,9 +4,10 @@ import { type INodeProperties, } from 'n8n-workflow'; -import { numberInputsProperty } from '../../helpers/descriptions'; import { updateDisplayOptions } from '@utils/utilities'; +import { numberInputsProperty } from '../../helpers/descriptions'; + export const properties: INodeProperties[] = [numberInputsProperty]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/chooseBranch.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/chooseBranch.ts index 053365e415ce0..dc94daaf0e1b2 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/chooseBranch.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/chooseBranch.ts @@ -1,9 +1,10 @@ import { NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { numberInputsProperty } from '../../helpers/descriptions'; import { preparePairedItemDataArray, updateDisplayOptions } from '@utils/utilities'; +import { numberInputsProperty } from '../../helpers/descriptions'; + export const properties: INodeProperties[] = [ numberInputsProperty, { diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineAll.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineAll.ts index 089ecf92351ae..7f130de307a7e 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineAll.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineAll.ts @@ -1,3 +1,4 @@ +import merge from 'lodash/merge'; import type { IExecuteFunctions, INodeExecutionData, @@ -5,12 +6,11 @@ import type { IPairedItemData, } from 'n8n-workflow'; -import merge from 'lodash/merge'; -import type { ClashResolveOptions } from '../../helpers/interfaces'; +import { updateDisplayOptions } from '@utils/utilities'; import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions'; +import type { ClashResolveOptions } from '../../helpers/interfaces'; import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByFields.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByFields.ts index bdbd40c444329..0e848666eec8e 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByFields.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByFields.ts @@ -5,13 +5,15 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + +import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions'; import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions, MatchFieldsOutput, } from '../../helpers/interfaces'; -import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions'; import { addSourceField, addSuffixToEntriesKeys, @@ -20,7 +22,6 @@ import { findMatches, mergeMatched, } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; const multipleMatchesProperty: INodeProperties = { displayName: 'Multiple Matches', diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByPosition.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByPosition.ts index 8cd7e6ed41b13..8b9067156c1d5 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByPosition.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByPosition.ts @@ -1,3 +1,4 @@ +import merge from 'lodash/merge'; import { NodeExecutionOutput, type IExecuteFunctions, @@ -6,12 +7,11 @@ import { type IPairedItemData, } from 'n8n-workflow'; -import merge from 'lodash/merge'; -import type { ClashResolveOptions } from '../../helpers/interfaces'; +import { updateDisplayOptions } from '@utils/utilities'; import { clashHandlingProperties, numberInputsProperty } from '../../helpers/descriptions'; +import type { ClashResolveOptions } from '../../helpers/interfaces'; import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ numberInputsProperty, diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineBySql.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineBySql.ts index 9fd09abc73527..bd6921082f77a 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineBySql.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineBySql.ts @@ -1,3 +1,5 @@ +import alasql from 'alasql'; +import type { Database } from 'alasql'; import type { IDataObject, IExecuteFunctions, @@ -7,11 +9,10 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import alasql from 'alasql'; -import type { Database } from 'alasql'; -import { numberInputsProperty } from '../../helpers/descriptions'; import { getResolvables, updateDisplayOptions } from '@utils/utilities'; +import { numberInputsProperty } from '../../helpers/descriptions'; + export const properties: INodeProperties[] = [ numberInputsProperty, { diff --git a/packages/nodes-base/nodes/Merge/v3/actions/mode/index.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/index.ts index fb10117b79f5c..d704b11b2250b 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/index.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/index.ts @@ -4,8 +4,8 @@ import * as append from './append'; import * as chooseBranch from './chooseBranch'; import * as combineAll from './combineAll'; import * as combineByFields from './combineByFields'; -import * as combineBySql from './combineBySql'; import * as combineByPosition from './combineByPosition'; +import * as combineBySql from './combineBySql'; export { append, chooseBranch, combineAll, combineByFields, combineBySql, combineByPosition }; diff --git a/packages/nodes-base/nodes/Merge/v3/actions/router.ts b/packages/nodes-base/nodes/Merge/v3/actions/router.ts index 437ef1b3b64f9..9ecbc4f6554bd 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/router.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/router.ts @@ -1,7 +1,8 @@ import type { IExecuteFunctions } from 'n8n-workflow'; -import { getNodeInputsData } from '../helpers/utils'; -import type { MergeType } from './node.type'; + import * as mode from './mode'; +import type { MergeType } from './node.type'; +import { getNodeInputsData } from '../helpers/utils'; export async function router(this: IExecuteFunctions) { const inputsData = getNodeInputsData.call(this); diff --git a/packages/nodes-base/nodes/Merge/v3/actions/versionDescription.ts b/packages/nodes-base/nodes/Merge/v3/actions/versionDescription.ts index efcd726f82b72..788b45446dc1d 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/versionDescription.ts @@ -1,8 +1,8 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import { configuredInputs } from '../helpers/utils'; import * as mode from './mode'; +import { configuredInputs } from '../helpers/utils'; export const versionDescription: INodeTypeDescription = { displayName: 'Merge', diff --git a/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts b/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts index 0dd650f790f57..a8d44ce550a8e 100644 --- a/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts +++ b/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts @@ -1,4 +1,8 @@ -import { ApplicationError, NodeConnectionType, NodeHelpers } from 'n8n-workflow'; +import assign from 'lodash/assign'; +import assignWith from 'lodash/assignWith'; +import get from 'lodash/get'; +import merge from 'lodash/merge'; +import mergeWith from 'lodash/mergeWith'; import type { GenericValue, IBinaryKeyData, @@ -8,15 +12,11 @@ import type { INodeParameters, IPairedItemData, } from 'n8n-workflow'; +import { ApplicationError, NodeConnectionType, NodeHelpers } from 'n8n-workflow'; -import assign from 'lodash/assign'; -import assignWith from 'lodash/assignWith'; -import get from 'lodash/get'; -import merge from 'lodash/merge'; -import mergeWith from 'lodash/mergeWith'; +import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities'; import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions } from './interfaces'; -import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities'; type PairToMatch = { field1: string; diff --git a/packages/nodes-base/nodes/Metabase/Metabase.node.ts b/packages/nodes-base/nodes/Metabase/Metabase.node.ts index cf13c705cd251..1d00a0f38a9ac 100644 --- a/packages/nodes-base/nodes/Metabase/Metabase.node.ts +++ b/packages/nodes-base/nodes/Metabase/Metabase.node.ts @@ -1,13 +1,10 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { questionsFields, questionsOperations } from './QuestionsDescription'; - -import { metricsFields, metricsOperations } from './MetricsDescription'; - -import { databasesFields, databasesOperations } from './DatabasesDescription'; - import { alertsFields, alertsOperations } from './AlertsDescription'; +import { databasesFields, databasesOperations } from './DatabasesDescription'; +import { metricsFields, metricsOperations } from './MetricsDescription'; +import { questionsFields, questionsOperations } from './QuestionsDescription'; export class Metabase implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts index 08ee11ae4ae37..3ffaacbd69a7e 100644 --- a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts @@ -9,6 +9,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; +import { accountFields, accountOperations } from './descriptions'; import type { IField } from './GenericFunctions'; import { adjustAddresses, @@ -19,8 +20,6 @@ import { sort, } from './GenericFunctions'; -import { accountFields, accountOperations } from './descriptions'; - export class MicrosoftDynamicsCrm implements INodeType { description: INodeTypeDescription = { displayName: 'Microsoft Dynamics CRM', diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/addTable.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/addTable.test.ts index cb0054e315e13..d53a43bd04259 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/addTable.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/addTable.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/append.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/append.test.ts index 446abb5b5e5cc..04c51e71cdd98 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/append.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/append.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/convertToRange.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/convertToRange.test.ts index faba8409efc53..797e6c9de4872 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/convertToRange.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/convertToRange.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/deleteTable.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/deleteTable.test.ts index 62616cf156bac..a771b77b5a5e8 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/deleteTable.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/deleteTable.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getColumns.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getColumns.test.ts index e69bd72165948..815c9581a1a49 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getColumns.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getColumns.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getRows.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getRows.test.ts index e9627700c9e70..d46d1a48a75de 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getRows.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/getRows.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/lookup.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/lookup.test.ts index e468b62336570..1dd75ce25c5f6 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/lookup.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/table/lookup.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/addWorksheet.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/addWorksheet.test.ts index 2c62bd6967611..3ecc29f3ae4fe 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/addWorksheet.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/addWorksheet.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/deleteWorkbook.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/deleteWorkbook.test.ts index 007f579d21e13..0f4ba9e4b522b 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/deleteWorkbook.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/deleteWorkbook.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/getAll.test.ts index bdcf6a6333c0e..f87820ebcd54b 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/workbook/getAll.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/append.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/append.test.ts index dd1752ce7992c..8cac626c00aa0 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/append.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/append.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/clear.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/clear.test.ts index 7d60587541932..aed1657626e05 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/clear.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/clear.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/deleteWorksheet.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/deleteWorksheet.test.ts index 06711c01832bb..54b1ae221e505 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/deleteWorksheet.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/deleteWorksheet.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/getAll.test.ts index dbdd0a2ac7e2b..1f9057a687041 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/getAll.test.ts @@ -1,10 +1,11 @@ import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/readRows.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/readRows.test.ts index 17a8549dc1260..181913cc89ccb 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/readRows.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/readRows.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/update.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/update.test.ts index 3fef581c7ce86..0433d968dbe79 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/update.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/update.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/upsert.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/upsert.test.ts index 9a81d34eb162c..5de97bf39df16 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/upsert.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/node/worksheet/upsert.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; jest.mock('../../../../v2/transport', () => { diff --git a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/utils/utils.test.ts b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/utils/utils.test.ts index 8a67dbcf18589..55deec3a00268 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/test/v2/utils/utils.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/test/v2/utils/utils.test.ts @@ -1,7 +1,8 @@ -import { get } from 'lodash'; import { mock } from 'jest-mock-extended'; -import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; +import { get } from 'lodash'; import { constructExecutionMetaData } from 'n8n-core'; +import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; + import { checkRange, prepareOutput, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v1/MicrosoftExcelV1.node.ts b/packages/nodes-base/nodes/Microsoft/Excel/v1/MicrosoftExcelV1.node.ts index 9eecb99e2bf09..53d7764dfcbb1 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v1/MicrosoftExcelV1.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v1/MicrosoftExcelV1.node.ts @@ -11,20 +11,17 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; -import { generatePairedItemData } from '../../../../utils/utilities'; +import { oldVersionNotice } from '@utils/descriptions'; + import { microsoftApiRequest, microsoftApiRequestAllItems, microsoftApiRequestAllItemsSkip, } from './GenericFunctions'; - +import { tableFields, tableOperations } from './TableDescription'; import { workbookFields, workbookOperations } from './WorkbookDescription'; - import { worksheetFields, worksheetOperations } from './WorksheetDescription'; - -import { tableFields, tableOperations } from './TableDescription'; - -import { oldVersionNotice } from '@utils/descriptions'; +import { generatePairedItemData } from '../../../../utils/utilities'; const versionDescription: INodeTypeDescription = { displayName: 'Microsoft Excel', diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/MicrosoftExcelV2.node.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/MicrosoftExcelV2.node.ts index e3bfcbac95e69..bcec8f635434b 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/MicrosoftExcelV2.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/MicrosoftExcelV2.node.ts @@ -5,9 +5,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { listSearch, loadOptions } from './methods'; -import { versionDescription } from './actions/versionDescription'; import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; +import { listSearch, loadOptions } from './methods'; export class MicrosoftExcelV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/router.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/router.ts index a868bfa2c7bf8..d2bd7a12f5801 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/router.ts @@ -1,7 +1,7 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { MicrosoftExcel } from './node.type'; +import type { MicrosoftExcel } from './node.type'; import * as table from './table/Table.resource'; import * as workbook from './workbook/Workbook.resource'; import * as worksheet from './worksheet/Worksheet.resource'; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/Table.resource.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/Table.resource.ts index 6fc4497805454..f2f56b34a12b9 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/Table.resource.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/Table.resource.ts @@ -1,7 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import * as append from './append.operation'; import * as addTable from './addTable.operation'; +import * as append from './append.operation'; import * as convertToRange from './convertToRange.operation'; import * as deleteTable from './deleteTable.operation'; import * as getColumns from './getColumns.operation'; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/addTable.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/addTable.operation.ts index 6ab2109211cff..80db436622e35 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/addTable.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/addTable.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/append.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/append.operation.ts index 11095e27cfacd..11e345c28b085 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/append.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/append.operation.ts @@ -4,11 +4,13 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities'; + import type { ExcelResponse } from '../../helpers/interfaces'; import { prepareOutput } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions'; -import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/convertToRange.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/convertToRange.operation.ts index 9b20ab77c38d7..a09cb8b36a26d 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/convertToRange.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/convertToRange.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [workbookRLC, worksheetRLC, tableRLC]; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/deleteTable.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/deleteTable.operation.ts index 5e1ec86f4f002..fb1673ea21ef5 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/deleteTable.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/deleteTable.operation.ts @@ -1,7 +1,9 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [workbookRLC, worksheetRLC, tableRLC]; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getColumns.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getColumns.operation.ts index e91596a4021c0..17aa9da13b40e 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getColumns.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getColumns.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest, microsoftApiRequestAllItemsSkip } from '../../transport'; import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getRows.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getRows.operation.ts index 059c195a2bc6b..90ae8d6903815 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getRows.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/getRows.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest, microsoftApiRequestAllItemsSkip } from '../../transport'; import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/lookup.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/lookup.operation.ts index 9e2f9f3cefc31..ccc11f6b74515 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/lookup.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/table/lookup.operation.ts @@ -6,9 +6,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequestAllItemsSkip } from '../../transport'; import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/addWorksheet.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/addWorksheet.operation.ts index 69294c0911eac..ca1ce95ae35ea 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/addWorksheet.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/addWorksheet.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { workbookRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/deleteWorkbook.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/deleteWorkbook.operation.ts index 297fbc37c49ca..ee389316dbfc2 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/deleteWorkbook.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/deleteWorkbook.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { workbookRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [workbookRLC]; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/getAll.operation.ts index 81a2081572674..a506bf14bc696 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/workbook/getAll.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; + import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Return All', diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/append.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/append.operation.ts index e8af1938c887e..94680f80dd002 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/append.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/append.operation.ts @@ -4,11 +4,13 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { processJsonInput, updateDisplayOptions } from '@utils/utilities'; + import type { ExcelResponse } from '../../helpers/interfaces'; import { prepareOutput } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { processJsonInput, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/clear.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/clear.operation.ts index 8299ee18b115c..427a6ab8e134e 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/clear.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/clear.operation.ts @@ -1,7 +1,9 @@ import type { INodeExecutionData, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/deleteWorksheet.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/deleteWorksheet.operation.ts index 0ecae73b4615a..0d2271a5a196f 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/deleteWorksheet.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/deleteWorksheet.operation.ts @@ -1,7 +1,9 @@ import type { INodeExecutionData, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [workbookRLC, worksheetRLC]; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/getAll.operation.ts index 3681b60270d13..c22b87f33181c 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/getAll.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; import { workbookRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/readRows.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/readRows.operation.ts index 7b6389d8147c6..26977a8078a05 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/readRows.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/readRows.operation.ts @@ -4,11 +4,13 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import type { ExcelResponse } from '../../helpers/interfaces'; import { checkRange, prepareOutput } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/update.operation.ts index 40a08a975e4f7..b21a6b039e0e4 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/update.operation.ts @@ -5,6 +5,9 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities'; + import type { ExcelResponse, UpdateSummary } from '../../helpers/interfaces'; import { checkRange, @@ -14,7 +17,6 @@ import { } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/upsert.operation.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/upsert.operation.ts index 3745c76cacc13..c27feae6d5dc4 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/upsert.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/worksheet/upsert.operation.ts @@ -5,6 +5,9 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities'; + import type { ExcelResponse, UpdateSummary } from '../../helpers/interfaces'; import { checkRange, @@ -14,7 +17,6 @@ import { } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; import { workbookRLC, worksheetRLC } from '../common.descriptions'; -import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ workbookRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/helpers/utils.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/helpers/utils.ts index 2303147ab3892..12151a471a2be 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/helpers/utils.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INode, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { ExcelResponse, SheetData, UpdateSummary } from './interfaces'; + import { generatePairedItemData, wrapData } from '@utils/utilities'; +import type { ExcelResponse, SheetData, UpdateSummary } from './interfaces'; + type PrepareOutputConfig = { rawData: boolean; dataProperty?: string; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/listSearch.ts index fa30a1ead54f9..f4d440c7f7be0 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/listSearch.ts @@ -4,6 +4,7 @@ import type { INodeListSearchItems, INodeListSearchResult, } from 'n8n-workflow'; + import { microsoftApiRequest } from '../transport'; export async function searchWorkbooks( diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/loadOptions.ts index 576f02c8c293c..825ffd32e78eb 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/methods/loadOptions.ts @@ -1,4 +1,5 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; + import { microsoftApiRequest } from '../transport'; export async function getWorksheetColumnRow( diff --git a/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts b/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts index 0f465b0b523d8..293e84758213c 100644 --- a/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts +++ b/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts @@ -7,18 +7,17 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { - msGraphSecurityApiRequest, - throwOnEmptyUpdate, - tolerateDoubleQuotes, -} from './GenericFunctions'; - import { secureScoreControlProfileFields, secureScoreControlProfileOperations, secureScoreFields, secureScoreOperations, } from './descriptions'; +import { + msGraphSecurityApiRequest, + throwOnEmptyUpdate, + tolerateDoubleQuotes, +} from './GenericFunctions'; export class MicrosoftGraphSecurity implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts index 59efc494faf35..8949db933ce93 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { DateTime } from 'luxon'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -8,7 +9,6 @@ import type { IPollFunctions, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import { DateTime } from 'luxon'; export async function microsoftApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts index bc067531ecfff..555d6faea2e26 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts @@ -8,11 +8,9 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { microsoftApiRequest, microsoftApiRequestAllItems } from './GenericFunctions'; - import { fileFields, fileOperations } from './FileDescription'; - import { folderFields, folderOperations } from './FolderDescription'; +import { microsoftApiRequest, microsoftApiRequestAllItems } from './GenericFunctions'; export class MicrosoftOneDrive implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts index 3c49766adfb38..49bf57c686f4b 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts @@ -1,3 +1,4 @@ +import { DateTime } from 'luxon'; import { type IPollFunctions, type IDataObject, @@ -7,9 +8,8 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { DateTime } from 'luxon'; -import { triggerDescription } from './TriggerDescription'; import { getPath, microsoftApiRequest, microsoftApiRequestAllItemsDelta } from './GenericFunctions'; +import { triggerDescription } from './TriggerDescription'; export class MicrosoftOneDriveTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/TriggerDescription.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/TriggerDescription.ts index 3c7c5e2674331..8677a02d86018 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/TriggerDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/TriggerDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { MICROSOFT_DRIVE_FILE_URL_REGEX, MICROSOFT_DRIVE_FOLDER_URL_REGEX } from './constants'; export const fileRLC: INodeProperties = { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts index 6c1e6805ff748..b455de45c00f7 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts @@ -1,3 +1,4 @@ +import { DateTime } from 'luxon'; import { type IPollFunctions, type INodeExecutionData, @@ -6,11 +7,8 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { DateTime } from 'luxon'; - -import { properties as messageProperties } from './trigger/MessageDescription'; - import { getPollResponse } from './trigger/GenericFunctions'; +import { properties as messageProperties } from './trigger/MessageDescription'; import { loadOptions } from './v2/methods'; export class MicrosoftOutlookTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/create.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/create.test.ts index 234d008fe736f..822f20ca8a59f 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/create.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/delete.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/delete.test.ts index 8ec751632f9d3..bf14756f739c1 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/delete.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/delete.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/get.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/get.test.ts index b579d899550a4..4f8b34c9ead82 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/get.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/get.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/getAll.test.ts index 1e85bc12b76d0..4c8176a05afa0 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/getAll.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/update.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/update.test.ts index 2ebea471cf20e..80a2acd1ab9d2 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/update.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/calendar/update.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/create.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/create.test.ts index 364da5918d5b0..0dae646594984 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/create.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/update.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/update.test.ts index 13832486e041e..239d8bb42ddcb 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/update.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/contact/update.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/create.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/create.test.ts index b9ca16b504be9..5f1dccf1ed5a8 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/create.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/send.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/send.test.ts index d87f1b66fef05..f88e8b2151ab3 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/send.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/draft/send.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/event/create.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/event/create.test.ts index 9ac1296aa4aa7..3fec538f0b3ee 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/event/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/event/create.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folder/create.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folder/create.test.ts index bcc5826bea751..f9e2026c9d0ff 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folder/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folder/create.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folderMessage/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folderMessage/getAll.test.ts index 694bb3d103b0e..c97a9895f3f64 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folderMessage/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/folderMessage/getAll.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/move.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/move.test.ts index ac1415d23c4e3..1673027104c1c 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/move.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/move.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/reply.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/reply.test.ts index 2f4af23db7d76..c7d106847c07e 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/reply.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/reply.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/send.test.ts b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/send.test.ts index cc5b6e5a43dc0..0ce4e7f6747ba 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/send.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/test/v2/node/message/send.test.ts @@ -1,10 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; jest.mock('../../../../v2/transport', () => { const originalModule = jest.requireActual('../../../../v2/transport'); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/trigger/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Outlook/trigger/GenericFunctions.ts index 7999c1b8a56dc..0edbc78796f0f 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/trigger/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/trigger/GenericFunctions.ts @@ -1,14 +1,13 @@ import { NodeApiError } from 'n8n-workflow'; import type { JsonObject, IDataObject, INodeExecutionData, IPollFunctions } from 'n8n-workflow'; +import { prepareFilterString, simplifyOutputMessages } from '../v2/helpers/utils'; import { downloadAttachments, microsoftApiRequest, microsoftApiRequestAllItems, } from '../v2/transport'; -import { prepareFilterString, simplifyOutputMessages } from '../v2/helpers/utils'; - export async function getPollResponse( this: IPollFunctions, pollStartDate: string, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/trigger/MessageDescription.ts b/packages/nodes-base/nodes/Microsoft/Outlook/trigger/MessageDescription.ts index 7c65cf37bbbc8..6e78e9f83ef1d 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/trigger/MessageDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/trigger/MessageDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { messageFields } from '../v2/helpers/utils'; export const properties: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.ts index e9f8362116906..e83174ef1a93c 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.ts @@ -12,6 +12,12 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import { oldVersionNotice } from '@utils/descriptions'; + +import { draftFields, draftOperations } from './DraftDescription'; +import { draftMessageSharedFields } from './DraftMessageSharedDescription'; +import { folderFields, folderOperations } from './FolderDescription'; +import { folderMessageFields, folderMessageOperations } from './FolderMessageDecription'; import { createMessage, downloadAttachments, @@ -19,23 +25,11 @@ import { microsoftApiRequest, microsoftApiRequestAllItems, } from './GenericFunctions'; - -import { draftFields, draftOperations } from './DraftDescription'; - -import { draftMessageSharedFields } from './DraftMessageSharedDescription'; - -import { messageFields, messageOperations } from './MessageDescription'; - import { messageAttachmentFields, messageAttachmentOperations, } from './MessageAttachmentDescription'; - -import { folderFields, folderOperations } from './FolderDescription'; - -import { folderMessageFields, folderMessageOperations } from './FolderMessageDecription'; - -import { oldVersionNotice } from '@utils/descriptions'; +import { messageFields, messageOperations } from './MessageDescription'; const versionDescription: INodeTypeDescription = { displayName: 'Microsoft Outlook', diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.ts index 7ac465f0b2212..481c868b3593e 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.ts @@ -5,9 +5,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { loadOptions, listSearch } from './methods'; import { description } from './actions/node.description'; import { router } from './actions/router'; +import { loadOptions, listSearch } from './methods'; export class MicrosoftOutlookV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.ts index 87239e12c005e..2bbba5d5d2dac 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.ts @@ -1,7 +1,9 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ { displayName: 'Name', diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.ts index 11100776764f0..acbe8736a8c73 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { calendarRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { calendarRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [calendarRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.ts index 826147db039d2..a237380db4489 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { calendarRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { calendarRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [calendarRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.ts index e122863905830..3568137445c0a 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; -import { returnAllOrLimit } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { returnAllOrLimit } from '../../descriptions'; +import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; + export const properties: INodeProperties[] = [ ...returnAllOrLimit, { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/index.ts index 132fa72b4e862..686b06185ab61 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/index.ts @@ -1,8 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create.operation'; +import * as del from './delete.operation'; import * as get from './get.operation'; import * as getAll from './getAll.operation'; -import * as del from './delete.operation'; import * as update from './update.operation'; export { create, del as delete, get, getAll, update }; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.ts index 0564a5dc9effe..3e3f076e02f4b 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { calendarRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { calendarRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ calendarRLC, { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.ts index 223dbfb378c78..72f3eb97ffbd9 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { contactFields } from '../../descriptions'; import { prepareContactFields } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { contactFields } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.ts index 1037021149a93..ca8537b5cd568 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { contactRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { contactRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [contactRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.ts index 6849d04d4644b..a4999f98e3ecd 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { contactRLC } from '../../descriptions'; import { contactFields } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { contactRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ contactRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.ts index dec28b9dd73e0..071e358ee869d 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { returnAllOrLimit } from '../../descriptions'; import { contactFields } from '../../helpers/utils'; import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; -import { returnAllOrLimit } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ ...returnAllOrLimit, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/index.ts index 81d2bbcf4ed96..9a7299b29b59c 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/index.ts @@ -1,8 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create.operation'; import * as del from './delete.operation'; -import * as getAll from './getAll.operation'; import * as get from './get.operation'; +import * as getAll from './getAll.operation'; import * as update from './update.operation'; export { create, del as delete, get, getAll, update }; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.ts index 07ffde1fda04b..5ee6a2524ab74 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { contactFields, contactRLC } from '../../descriptions'; import { prepareContactFields } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { contactFields, contactRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ contactRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.ts index 7f7f7d47715fb..ea0249891e1dd 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.ts @@ -5,9 +5,11 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { createMessage } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.ts index 1ff992d821450..12e17e6abe288 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { draftRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { draftRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [draftRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.ts index d8321768a9059..b82810ac0c9f0 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { draftRLC } from '../../descriptions'; import { messageFields, simplifyOutputMessages } from '../../helpers/utils'; import { downloadAttachments, microsoftApiRequest } from '../../transport'; -import { draftRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ draftRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/index.ts index 9e8cc5cd1118d..a66b3509a3065 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create.operation'; import * as del from './delete.operation'; import * as get from './get.operation'; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.ts index a97d8a12c59e9..cc37dd4d5a6e1 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { draftRLC } from '../../descriptions'; import { makeRecipient } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { draftRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ draftRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.ts index 9f8f100d13d2a..2be5f9141397a 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { draftRLC } from '../../descriptions'; import { createMessage } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { draftRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ draftRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/create.operation.ts index 774110002d00e..f3d87d1f75e5a 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/create.operation.ts @@ -1,11 +1,13 @@ -import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; import { DateTime } from 'luxon'; import moment from 'moment-timezone'; -import { microsoftApiRequest } from '../../transport'; -import { calendarRLC } from '../../descriptions'; +import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; +import { NodeOperationError } from 'n8n-workflow'; + import { updateDisplayOptions } from '@utils/utilities'; +import { calendarRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ calendarRLC, { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.ts index b211ef8c1c06a..2fa4311a57029 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { calendarRLC, eventRLC } from '../../descriptions'; import { decodeOutlookId } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; export const properties: INodeProperties[] = [calendarRLC, eventRLC]; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/get.operation.ts index 54f32d7935509..d3a9107762a5a 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/get.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { calendarRLC, eventRLC } from '../../descriptions'; import { decodeOutlookId, eventfields } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { calendarRLC, eventRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ calendarRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.ts index 60246daffafc0..85d21ea1e5825 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { calendarRLC, returnAllOrLimit } from '../../descriptions'; import { eventfields } from '../../helpers/utils'; import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; -import { calendarRLC, returnAllOrLimit } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/index.ts index d2881a1858b2a..a725e64930890 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/index.ts @@ -1,8 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create.operation'; +import * as del from './delete.operation'; import * as get from './get.operation'; import * as getAll from './getAll.operation'; -import * as del from './delete.operation'; import * as update from './update.operation'; export { create, del as delete, get, getAll, update }; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/update.operation.ts index 12bb952469d1c..362434ed66737 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/event/update.operation.ts @@ -1,10 +1,11 @@ +import { DateTime } from 'luxon'; import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { DateTime } from 'luxon'; -import { microsoftApiRequest } from '../../transport'; +import { updateDisplayOptions } from '@utils/utilities'; + import { calendarRLC, eventRLC } from '../../descriptions'; import { decodeOutlookId } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; export const properties: INodeProperties[] = [ calendarRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.ts index 521cdbeae937f..c4e48e5f8838c 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { folderRLC } from '../../descriptions'; import { decodeOutlookId } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.ts index 2441cf69e4b95..f50cc5d1e1d1c 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { folderRLC } from '../../descriptions'; import { decodeOutlookId } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; export const properties: INodeProperties[] = [folderRLC]; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.ts index b3f1c9014eec7..362174b0ea04d 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { folderFields, folderRLC } from '../../descriptions'; import { decodeOutlookId } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; export const properties: INodeProperties[] = [ folderRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.ts index 91df451340214..265f451986410 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { getSubfolders, microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; -import { folderFields, folderRLC, returnAllOrLimit } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { folderFields, folderRLC, returnAllOrLimit } from '../../descriptions'; +import { getSubfolders, microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; + export const properties: INodeProperties[] = [ ...returnAllOrLimit, { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/index.ts index 46fd4c038ffe2..4b210655657ac 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as create from './create.operation'; import * as del from './delete.operation'; import * as get from './get.operation'; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.ts index 41322e4961ff7..b3cc85805c09b 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { folderRLC } from '../../descriptions'; import { decodeOutlookId } from '../../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; export const properties: INodeProperties[] = [ folderRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.ts index eec59b506165f..7280553986948 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.ts @@ -4,6 +4,10 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { folderRLC, returnAllOrLimit } from '../../descriptions'; import { decodeOutlookId, messageFields, @@ -16,9 +20,6 @@ import { microsoftApiRequestAllItems, } from '../../transport'; -import { folderRLC, returnAllOrLimit } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; - export const properties: INodeProperties[] = [ folderRLC, ...returnAllOrLimit, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.ts index 6e206123789a7..91165e4c7c863 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as getAll from './getAll.operation'; export { getAll }; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.ts index 8ee7511b417cd..71c00cb38d027 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { messageRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { messageRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [messageRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/get.operation.ts index a69ca7efb8d3b..69a65166546dd 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/get.operation.ts @@ -5,10 +5,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { messageRLC } from '../../descriptions'; import { messageFields, simplifyOutputMessages } from '../../helpers/utils'; import { downloadAttachments, getMimeContent, microsoftApiRequest } from '../../transport'; -import { messageRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ messageRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.ts index dad68701e8a30..dba8d41cf5163 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.ts @@ -4,14 +4,16 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { returnAllOrLimit } from '../../descriptions'; import { messageFields, prepareFilterString, simplifyOutputMessages } from '../../helpers/utils'; import { downloadAttachments, microsoftApiRequest, microsoftApiRequestAllItems, } from '../../transport'; -import { returnAllOrLimit } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ ...returnAllOrLimit, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/index.ts index bc81ba47d1503..4002ed6538f4d 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as del from './delete.operation'; import * as get from './get.operation'; import * as getAll from './getAll.operation'; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/move.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/move.operation.ts index 55c0f634e4b7c..5f4900253f965 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/move.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/move.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { folderRLC, messageRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { folderRLC, messageRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ messageRLC, { ...folderRLC, displayName: 'Parent Folder' }, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.ts index c55f89c96502d..1961cf760ba5c 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.ts @@ -5,10 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { messageRLC } from '../../descriptions'; import { createMessage } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { messageRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ messageRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/send.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/send.operation.ts index 54b8b5108e925..b9baf4ce124f6 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/send.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/send.operation.ts @@ -5,9 +5,11 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { createMessage } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/update.operation.ts index 18d2114804e87..8d7935294f74d 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/message/update.operation.ts @@ -1,9 +1,11 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { folderRLC, messageRLC } from '../../descriptions'; import { createMessage, decodeOutlookId } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { folderRLC, messageRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ messageRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.ts index a2216b7255720..f0145954734f1 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.ts @@ -6,10 +6,12 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { messageRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { messageRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ messageRLC, { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.ts index 7892b24ffaec8..89afe6f5eb9be 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { attachmentRLC, messageRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { attachmentRLC, messageRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ messageRLC, attachmentRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.ts index 16d1b4e749491..932d51145d48b 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { attachmentRLC, messageRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { attachmentRLC, messageRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + export const properties: INodeProperties[] = [ messageRLC, attachmentRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.ts index be250c309a305..80a215e67b206 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.ts @@ -1,8 +1,10 @@ import type { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; -import { messageRLC, returnAllOrLimit } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { messageRLC, returnAllOrLimit } from '../../descriptions'; +import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; + export const properties: INodeProperties[] = [ messageRLC, ...returnAllOrLimit, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.ts index 24beaf050ec6a..02722102fb9bf 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import * as add from './add.operation'; import * as download from './download.operation'; import * as get from './get.operation'; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/node.description.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/node.description.ts index cbcc328fd0034..50d034968374a 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/node.description.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/node.description.ts @@ -1,5 +1,6 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; + import * as calendar from './calendar'; import * as contact from './contact'; import * as draft from './draft'; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/router.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/router.ts index d6033e3ec8c0d..7fd67db228047 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/actions/router.ts @@ -1,7 +1,6 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import type { MicrosoftOutlook } from './node.type'; import * as calendar from './calendar'; import * as contact from './contact'; import * as draft from './draft'; @@ -10,6 +9,7 @@ import * as folder from './folder'; import * as folderMessage from './folderMessage'; import * as message from './message'; import * as messageAttachment from './messageAttachment'; +import type { MicrosoftOutlook } from './node.type'; export async function router(this: IExecuteFunctions) { const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/listSearch.ts index c0110ac8bc733..ecdd99bf370a3 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/listSearch.ts @@ -1,6 +1,7 @@ import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; -import { getSubfolders, microsoftApiRequest } from '../transport'; + import { encodeOutlookId } from '../helpers/utils'; +import { getSubfolders, microsoftApiRequest } from '../transport'; async function search( this: ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/loadOptions.ts index 389d8b49a041b..7e32e8ba0a24b 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/methods/loadOptions.ts @@ -1,4 +1,5 @@ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; + import { getSubfolders, microsoftApiRequestAllItems } from '../transport'; export async function getCategoriesNames( diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/v2/transport/index.ts b/packages/nodes-base/nodes/Microsoft/Outlook/v2/transport/index.ts index db85f5b60aa76..ef2d372185021 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v2/transport/index.ts @@ -8,6 +8,7 @@ import type { INodeExecutionData, IPollFunctions, } from 'n8n-workflow'; + import { prepareApiError } from '../helpers/utils'; export async function microsoftApiRequest( diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/create.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/create.test.ts index 41480285511dd..cea94648c3d85 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/create.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/deleteChannel.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/deleteChannel.test.ts index 8e972d8b0df75..dfd97010495fd 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/deleteChannel.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/deleteChannel.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/get.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/get.test.ts index b7ec5e9e0e2a0..fa54945b7e3fd 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/get.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/get.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/getAll.test.ts index 1b26d0b8f8705..6ffa8ade53f12 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequestAllItems'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/update.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/update.test.ts index f3114f5978660..364b4df799584 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/update.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channel/update.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/create.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/create.test.ts index 4cf330bf3e4fd..ec15aa2b136af 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/create.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/getAll.test.ts index db13528329d29..8c1152e82d6c7 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/channelMessage/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequestAllItems'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/create.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/create.test.ts index 5fac7c0d662df..305c0069b05a7 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/create.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/get.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/get.test.ts index 8f9d2a660f90e..20c20ba4b9f85 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/get.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/get.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/getAll.test.ts index a4c89a077723c..4d340a763a6c9 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/chatMessage/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequestAllItems'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/create.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/create.test.ts index 2ee3a02f19b32..f550bd075bdde 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/create.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/create.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/deleteTask.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/deleteTask.test.ts index f991d916978ff..f7694b1cf02e2 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/deleteTask.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/deleteTask.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/get.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/get.test.ts index 7d768ee2aef39..f70d458efbaf2 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/get.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/get.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/getAll.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/getAll.test.ts index 0e6f63804e2c0..42ce214d8530d 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/getAll.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/getAll.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestAllItemsSpy = jest.spyOn(transport, 'microsoftApiRequestAllItems'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/update.test.ts b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/update.test.ts index 3f763dd307fd5..9ec11c99bb55d 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/update.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/test/v2/node/task/update.test.ts @@ -1,9 +1,11 @@ import type { INodeTypes } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../../../../v2/transport'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; + +import * as transport from '../../../../v2/transport'; const microsoftApiRequestSpy = jest.spyOn(transport, 'microsoftApiRequest'); diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v1/MicrosoftTeamsV1.node.ts b/packages/nodes-base/nodes/Microsoft/Teams/v1/MicrosoftTeamsV1.node.ts index 88e4b71357710..c3f4e778e3c5f 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v1/MicrosoftTeamsV1.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v1/MicrosoftTeamsV1.node.ts @@ -10,20 +10,16 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { oldVersionNotice } from '../../../../utils/descriptions'; +import { channelFields, channelOperations } from './ChannelDescription'; +import { channelMessageFields, channelMessageOperations } from './ChannelMessageDescription'; +import { chatMessageFields, chatMessageOperations } from './ChatMessageDescription'; import { microsoftApiRequest, microsoftApiRequestAllItems, prepareMessage, } from './GenericFunctions'; - -import { channelFields, channelOperations } from './ChannelDescription'; - -import { channelMessageFields, channelMessageOperations } from './ChannelMessageDescription'; - -import { chatMessageFields, chatMessageOperations } from './ChatMessageDescription'; - import { taskFields, taskOperations } from './TaskDescription'; +import { oldVersionNotice } from '../../../../utils/descriptions'; const versionDescription: INodeTypeDescription = { displayName: 'Microsoft Teams', diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/MicrosoftTeamsV2.node.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/MicrosoftTeamsV2.node.ts index c953de95a9de4..fbb54a05a07f6 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/MicrosoftTeamsV2.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/MicrosoftTeamsV2.node.ts @@ -5,9 +5,9 @@ import type { INodeTypeBaseDescription, } from 'n8n-workflow'; -import { listSearch } from './methods'; import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; +import { listSearch } from './methods'; export class MicrosoftTeamsV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/create.operation.ts index e41110a0b6342..d40cef0ad7788 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/create.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { teamRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { teamRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ teamRLC, { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/deleteChannel.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/deleteChannel.operation.ts index 29231702734fc..605b6db66a999 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/deleteChannel.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/deleteChannel.operation.ts @@ -1,8 +1,10 @@ import { type INodeProperties, type IExecuteFunctions, NodeOperationError } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { channelRLC, teamRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { channelRLC, teamRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [teamRLC, channelRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/get.operation.ts index a7954ade2828b..4abeabfc87808 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/get.operation.ts @@ -1,8 +1,10 @@ import { type INodeProperties, type IExecuteFunctions, NodeOperationError } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { channelRLC, teamRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { channelRLC, teamRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [teamRLC, channelRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/getAll.operation.ts index 3a9ecf1056e86..195caefa9bbc1 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/getAll.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow'; -import { microsoftApiRequestAllItems } from '../../transport'; -import { teamRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; + import { returnAllOrLimit } from '@utils/descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; + +import { teamRLC } from '../../descriptions'; +import { microsoftApiRequestAllItems } from '../../transport'; const properties: INodeProperties[] = [teamRLC, ...returnAllOrLimit]; diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/update.operation.ts index a88b19981da0d..22333e16396b0 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channel/update.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { channelRLC, teamRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { channelRLC, teamRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ teamRLC, channelRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/create.operation.ts index 8054bccbd61b8..a32497a9aff92 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/create.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { channelRLC, teamRLC } from '../../descriptions'; import { prepareMessage } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { channelRLC, teamRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ teamRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/getAll.operation.ts index 1384b508f34e3..0846673e66cdc 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/channelMessage/getAll.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow'; -import { microsoftApiRequestAllItems } from '../../transport'; -import { channelRLC, teamRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; + import { returnAllOrLimit } from '@utils/descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; + +import { channelRLC, teamRLC } from '../../descriptions'; +import { microsoftApiRequestAllItems } from '../../transport'; const properties: INodeProperties[] = [teamRLC, channelRLC, ...returnAllOrLimit]; diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/create.operation.ts index de4cf5dcab07f..afef101ac127a 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/create.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + +import { chatRLC } from '../../descriptions'; import { prepareMessage } from '../../helpers/utils'; import { microsoftApiRequest } from '../../transport'; -import { chatRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ chatRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/get.operation.ts index 3aa27f7818af2..68f714b7bfa9d 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/get.operation.ts @@ -1,8 +1,10 @@ import { type INodeProperties, type IExecuteFunctions, NodeOperationError } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; -import { chatRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { chatRLC } from '../../descriptions'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ chatRLC, { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/getAll.operation.ts index a9ab2767d7607..7d47d3f76efa8 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/chatMessage/getAll.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow'; -import { microsoftApiRequestAllItems } from '../../transport'; -import { chatRLC } from '../../descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; + import { returnAllOrLimit } from '@utils/descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; + +import { chatRLC } from '../../descriptions'; +import { microsoftApiRequestAllItems } from '../../transport'; const properties: INodeProperties[] = [chatRLC, ...returnAllOrLimit]; diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/router.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/router.ts index d3111a95e3462..6e4d966b3eaf3 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/router.ts @@ -5,11 +5,10 @@ import { NodeOperationError, } from 'n8n-workflow'; -import type { MicrosoftTeamsType } from './node.type'; - import * as channel from './channel'; import * as channelMessage from './channelMessage'; import * as chatMessage from './chatMessage'; +import type { MicrosoftTeamsType } from './node.type'; import * as task from './task'; export async function router(this: IExecuteFunctions): Promise { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/create.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/create.operation.ts index 29b7e46e453a9..5b4ed9e610e63 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/create.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/create.operation.ts @@ -1,8 +1,10 @@ -import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; import { DateTime } from 'luxon'; +import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { bucketRLC, groupRLC, memberRLC, planRLC } from '../../descriptions'; import { microsoftApiRequest } from '../../transport'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ groupRLC, diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/deleteTask.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/deleteTask.operation.ts index 4873aa777b53f..c52f01f8e63d3 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/deleteTask.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/deleteTask.operation.ts @@ -1,7 +1,9 @@ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Task ID', diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/get.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/get.operation.ts index db48178f4d1a9..d2c02630b1d3e 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/get.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/get.operation.ts @@ -1,7 +1,9 @@ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow'; -import { microsoftApiRequest } from '../../transport'; + import { updateDisplayOptions } from '@utils/utilities'; +import { microsoftApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Task ID', diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/getAll.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/getAll.operation.ts index d7a2894e19e31..4174d14f7ec42 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/getAll.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/getAll.operation.ts @@ -1,8 +1,10 @@ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow'; + +import { returnAllOrLimit } from '@utils/descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; + import { groupRLC, planRLC } from '../../descriptions'; import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport'; -import { updateDisplayOptions } from '@utils/utilities'; -import { returnAllOrLimit } from '@utils/descriptions'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/update.operation.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/update.operation.ts index 56522b8a06f3e..016c1f2bc7790 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/update.operation.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/task/update.operation.ts @@ -1,8 +1,10 @@ -import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; import { DateTime } from 'luxon'; +import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + +import { updateDisplayOptions } from '@utils/utilities'; + import { bucketRLC, groupRLC, memberRLC, planRLC } from '../../descriptions'; import { microsoftApiRequest } from '../../transport'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/methods/listSearch.ts index 3b7c0ba125367..69657408539da 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/methods/listSearch.ts @@ -6,8 +6,9 @@ import { type INodeListSearchResult, sleep, } from 'n8n-workflow'; -import { microsoftApiRequest } from '../transport'; + import { filterSortSearchListItems } from '../helpers/utils'; +import { microsoftApiRequest } from '../transport'; export async function getChats( this: ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/transport/index.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/transport/index.ts index f9db468361666..4e53faeb76f17 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/transport/index.ts @@ -7,6 +7,7 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + import { capitalize } from '../../../../../utils/utilities'; export async function microsoftApiRequest( diff --git a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts index eb8622ee6fe68..390f38d57aab1 100644 --- a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts +++ b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,14 +10,10 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { microsoftApiRequest, microsoftApiRequestAllItems } from './GenericFunctions'; - import { linkedResourceFields, linkedResourceOperations } from './LinkedResourceDescription'; - -import { taskFields, taskOperations } from './TaskDescription'; - import { listFields, listOperations } from './ListDescription'; +import { taskFields, taskOperations } from './TaskDescription'; export class MicrosoftToDo implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Misp/GenericFunctions.ts b/packages/nodes-base/nodes/Misp/GenericFunctions.ts index e7e994f174c0b..ecbc398060417 100644 --- a/packages/nodes-base/nodes/Misp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Misp/GenericFunctions.ts @@ -1,4 +1,3 @@ -import { URL } from 'url'; import type { IExecuteFunctions, IDataObject, @@ -8,6 +7,8 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError, jsonParse } from 'n8n-workflow'; +import { URL } from 'url'; + import type { MispCredentials } from './types'; export async function mispApiRequest( @@ -17,9 +18,7 @@ export async function mispApiRequest( body: IDataObject = {}, qs: IDataObject = {}, ) { - const { baseUrl, allowUnauthorizedCerts } = (await this.getCredentials( - 'mispApi', - )) as MispCredentials; + const { baseUrl, allowUnauthorizedCerts } = await this.getCredentials('mispApi'); const options: IRequestOptions = { method, diff --git a/packages/nodes-base/nodes/Misp/Misp.node.ts b/packages/nodes-base/nodes/Misp/Misp.node.ts index 59ce7b809507d..0e42e15bcf35c 100644 --- a/packages/nodes-base/nodes/Misp/Misp.node.ts +++ b/packages/nodes-base/nodes/Misp/Misp.node.ts @@ -8,15 +8,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { - mispApiRequest, - mispApiRequestAllItems, - mispApiRestSearch, - throwOnEmptyUpdate, - throwOnInvalidUrl, - throwOnMissingSharingGroup, -} from './GenericFunctions'; - import { attributeFields, attributeOperations, @@ -41,7 +32,14 @@ import { warninglistFields, warninglistOperations, } from './descriptions'; - +import { + mispApiRequest, + mispApiRequestAllItems, + mispApiRestSearch, + throwOnEmptyUpdate, + throwOnInvalidUrl, + throwOnMissingSharingGroup, +} from './GenericFunctions'; import type { LoadedOrgs, LoadedSharingGroups, LoadedTags, LoadedUsers } from './types'; export class Misp implements INodeType { diff --git a/packages/nodes-base/nodes/Misp/descriptions/AttributeDescription.ts b/packages/nodes-base/nodes/Misp/descriptions/AttributeDescription.ts index a04d76eb112d7..27e4de28cdc25 100644 --- a/packages/nodes-base/nodes/Misp/descriptions/AttributeDescription.ts +++ b/packages/nodes-base/nodes/Misp/descriptions/AttributeDescription.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../utils/utilities'; + import { searchProperties } from './common.descriptions'; +import { updateDisplayOptions } from '../../../utils/utilities'; const searchDisplayOptions = { show: { diff --git a/packages/nodes-base/nodes/Misp/descriptions/EventDescription.ts b/packages/nodes-base/nodes/Misp/descriptions/EventDescription.ts index 94d2a1a1e5247..62a7a24010346 100644 --- a/packages/nodes-base/nodes/Misp/descriptions/EventDescription.ts +++ b/packages/nodes-base/nodes/Misp/descriptions/EventDescription.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../utils/utilities'; + import { searchProperties } from './common.descriptions'; +import { updateDisplayOptions } from '../../../utils/utilities'; const searchDisplayOptions = { show: { diff --git a/packages/nodes-base/nodes/Misp/descriptions/ObjectDescription.ts b/packages/nodes-base/nodes/Misp/descriptions/ObjectDescription.ts index ad38ede1c8554..f65e438951b15 100644 --- a/packages/nodes-base/nodes/Misp/descriptions/ObjectDescription.ts +++ b/packages/nodes-base/nodes/Misp/descriptions/ObjectDescription.ts @@ -1,6 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../utils/utilities'; + import { searchProperties } from './common.descriptions'; +import { updateDisplayOptions } from '../../../utils/utilities'; const searchDisplayOptions = { show: { diff --git a/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts b/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts index ff993c7d1c6ca..24d5a71c070c8 100644 --- a/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -9,8 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import get from 'lodash/get'; - export async function mondayComApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, body: any = {}, diff --git a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts index c84cd9d87274c..a9064ae047f74 100644 --- a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts +++ b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts @@ -1,3 +1,5 @@ +import { snakeCase } from 'change-case'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, IDataObject, @@ -7,23 +9,17 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; +import { boardColumnFields, boardColumnOperations } from './BoardColumnDescription'; +import { boardFields, boardOperations } from './BoardDescription'; +import { boardGroupFields, boardGroupOperations } from './BoardGroupDescription'; +import { boardItemFields, boardItemOperations } from './BoardItemDescription'; import { mondayComApiPaginatedRequest, mondayComApiRequest, mondayComApiRequestAllItems, } from './GenericFunctions'; -import { boardFields, boardOperations } from './BoardDescription'; - -import { boardColumnFields, boardColumnOperations } from './BoardColumnDescription'; - -import { boardGroupFields, boardGroupOperations } from './BoardGroupDescription'; - -import { boardItemFields, boardItemOperations } from './BoardItemDescription'; - interface IGraphqlBody { query: string; variables: IDataObject; diff --git a/packages/nodes-base/nodes/MongoDb/GenericFunctions.ts b/packages/nodes-base/nodes/MongoDb/GenericFunctions.ts index 3fda2c1f26336..68edc03e1dcc5 100644 --- a/packages/nodes-base/nodes/MongoDb/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MongoDb/GenericFunctions.ts @@ -1,21 +1,21 @@ -import { createSecureContext } from 'tls'; +import get from 'lodash/get'; +import set from 'lodash/set'; +import { MongoClient, ObjectId } from 'mongodb'; +import { NodeOperationError } from 'n8n-workflow'; import type { ICredentialDataDecryptedObject, IDataObject, IExecuteFunctions, INodeExecutionData, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { createSecureContext } from 'tls'; -import get from 'lodash/get'; -import set from 'lodash/set'; -import { MongoClient, ObjectId } from 'mongodb'; -import { formatPrivateKey } from '../../utils/utilities'; import type { IMongoCredentials, IMongoCredentialsType, IMongoParametricCredentials, } from './mongoDb.types'; +import { formatPrivateKey } from '../../utils/utilities'; /** * Standard way of building the MongoDB connection string, unless overridden with a provided string diff --git a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts index ff97307dc129e..349e56fd43c48 100644 --- a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts +++ b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts @@ -1,3 +1,11 @@ +import type { + FindOneAndReplaceOptions, + FindOneAndUpdateOptions, + UpdateOptions, + Sort, +} from 'mongodb'; +import { ObjectId } from 'mongodb'; +import { ApplicationError, NodeConnectionType } from 'n8n-workflow'; import type { IExecuteFunctions, ICredentialsDecrypted, @@ -9,17 +17,6 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { ApplicationError, NodeConnectionType } from 'n8n-workflow'; - -import type { - FindOneAndReplaceOptions, - FindOneAndUpdateOptions, - UpdateOptions, - Sort, -} from 'mongodb'; -import { ObjectId } from 'mongodb'; -import { generatePairedItemData } from '../../utils/utilities'; -import { nodeProperties } from './MongoDbProperties'; import { buildParameterizedConnString, @@ -29,8 +26,9 @@ import { stringifyObjectIDs, validateAndResolveMongoCredentials, } from './GenericFunctions'; - import type { IMongoParametricCredentials } from './mongoDb.types'; +import { nodeProperties } from './MongoDbProperties'; +import { generatePairedItemData } from '../../utils/utilities'; export class MongoDb implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts b/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts index 32ef253ef816c..30bb08789bb95 100644 --- a/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts +++ b/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts @@ -8,13 +8,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { - getDateParts, - monicaCrmApiRequest, - monicaCrmApiRequestAllItems, - toOptions, -} from './GenericFunctions'; - import { activityFields, activityOperations, @@ -41,7 +34,12 @@ import { taskFields, taskOperations, } from './descriptions'; - +import { + getDateParts, + monicaCrmApiRequest, + monicaCrmApiRequestAllItems, + toOptions, +} from './GenericFunctions'; import type { LoaderGetResponse, Option } from './types'; export class MonicaCrm implements INodeType { diff --git a/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts b/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts index fa2597a341d70..0c379ad591284 100644 --- a/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts +++ b/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts @@ -1,7 +1,7 @@ +import iconv from 'iconv-lite'; import get from 'lodash/get'; import set from 'lodash/set'; import unset from 'lodash/unset'; - import type { IExecuteFunctions, IDataObject, @@ -18,8 +18,6 @@ import { NodeOperationError, } from 'n8n-workflow'; -import iconv from 'iconv-lite'; - iconv.encodingExists('utf8'); // Create options for bomAware and encoding diff --git a/packages/nodes-base/nodes/MoveBinaryData/test/MoveBinaryData.test.ts b/packages/nodes-base/nodes/MoveBinaryData/test/MoveBinaryData.test.ts index 698284f9be081..087c1f461ccc6 100644 --- a/packages/nodes-base/nodes/MoveBinaryData/test/MoveBinaryData.test.ts +++ b/packages/nodes-base/nodes/MoveBinaryData/test/MoveBinaryData.test.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-loop-func */ import path from 'path'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Test Move Binary Data Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/MySql/test/v1/executeQuery.test.ts b/packages/nodes-base/nodes/MySql/test/v1/executeQuery.test.ts index 55c4007edae54..b9dff77153135 100644 --- a/packages/nodes-base/nodes/MySql/test/v1/executeQuery.test.ts +++ b/packages/nodes-base/nodes/MySql/test/v1/executeQuery.test.ts @@ -1,9 +1,9 @@ import type { INodeTypes } from 'n8n-workflow'; - import nock from 'nock'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; const queryMock = jest.fn(async function () { return [{ success: true }]; diff --git a/packages/nodes-base/nodes/MySql/test/v2/operations.test.ts b/packages/nodes-base/nodes/MySql/test/v2/operations.test.ts index 359c21c465c2f..97ba52cc77e3e 100644 --- a/packages/nodes-base/nodes/MySql/test/v2/operations.test.ts +++ b/packages/nodes-base/nodes/MySql/test/v2/operations.test.ts @@ -1,17 +1,16 @@ +import mysql2 from 'mysql2/promise'; import type { IDataObject, INode } from 'n8n-workflow'; -import mysql2 from 'mysql2/promise'; -import * as deleteTable from '../../v2/actions/database/deleteTable.operation'; +import { createMockExecuteFunction } from '@test/nodes/Helpers'; +import * as deleteTable from '../../v2/actions/database/deleteTable.operation'; import * as executeQuery from '../../v2/actions/database/executeQuery.operation'; import * as insert from '../../v2/actions/database/insert.operation'; import * as select from '../../v2/actions/database/select.operation'; import * as update from '../../v2/actions/database/update.operation'; import * as upsert from '../../v2/actions/database/upsert.operation'; - import type { Mysql2Pool, QueryRunner } from '../../v2/helpers/interfaces'; import { configureQueryRunner } from '../../v2/helpers/utils'; -import { createMockExecuteFunction } from '@test/nodes/Helpers'; const mySqlMockNode: INode = { id: '1', diff --git a/packages/nodes-base/nodes/MySql/test/v2/runQueries.test.ts b/packages/nodes-base/nodes/MySql/test/v2/runQueries.test.ts index b84a5cf66bc2f..3b07456a96c90 100644 --- a/packages/nodes-base/nodes/MySql/test/v2/runQueries.test.ts +++ b/packages/nodes-base/nodes/MySql/test/v2/runQueries.test.ts @@ -1,11 +1,12 @@ -import type { IDataObject, INode } from 'n8n-workflow'; import mysql2 from 'mysql2/promise'; -import { configureQueryRunner } from '../../v2/helpers/utils'; -import type { Mysql2Pool, QueryRunner } from '../../v2/helpers/interfaces'; -import { BATCH_MODE } from '../../v2/helpers/interfaces'; +import type { IDataObject, INode } from 'n8n-workflow'; import { createMockExecuteFunction } from '@test/nodes/Helpers'; +import type { Mysql2Pool, QueryRunner } from '../../v2/helpers/interfaces'; +import { BATCH_MODE } from '../../v2/helpers/interfaces'; +import { configureQueryRunner } from '../../v2/helpers/utils'; + const mySqlMockNode: INode = { id: '1', name: 'MySQL node', diff --git a/packages/nodes-base/nodes/MySql/test/v2/utils.test.ts b/packages/nodes-base/nodes/MySql/test/v2/utils.test.ts index 92bfa58ed0862..0fb385488ff4e 100644 --- a/packages/nodes-base/nodes/MySql/test/v2/utils.test.ts +++ b/packages/nodes-base/nodes/MySql/test/v2/utils.test.ts @@ -1,6 +1,6 @@ import type { INode } from 'n8n-workflow'; -import type { SortRule, WhereClause } from '../../v2/helpers/interfaces'; +import type { SortRule, WhereClause } from '../../v2/helpers/interfaces'; import { prepareQueryAndReplacements, wrapData, diff --git a/packages/nodes-base/nodes/MySql/v1/GenericFunctions.ts b/packages/nodes-base/nodes/MySql/v1/GenericFunctions.ts index 0cdf6ce19d45e..68b35a980d779 100644 --- a/packages/nodes-base/nodes/MySql/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MySql/v1/GenericFunctions.ts @@ -1,10 +1,10 @@ +import mysql2 from 'mysql2/promise'; import type { ICredentialDataDecryptedObject, IDataObject, ILoadOptionsFunctions, INodeListSearchResult, } from 'n8n-workflow'; -import mysql2 from 'mysql2/promise'; export async function createConnection( credentials: ICredentialDataDecryptedObject, diff --git a/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts b/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts index 6209111b67bae..977c37b3a6a9b 100644 --- a/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts +++ b/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts @@ -1,3 +1,4 @@ +import type mysql2 from 'mysql2/promise'; import type { ICredentialDataDecryptedObject, ICredentialsDecrypted, @@ -12,13 +13,11 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import type mysql2 from 'mysql2/promise'; - -import { createConnection, searchTables } from './GenericFunctions'; - import { oldVersionNotice } from '@utils/descriptions'; import { getResolvables } from '@utils/utilities'; +import { createConnection, searchTables } from './GenericFunctions'; + const versionDescription: INodeTypeDescription = { displayName: 'MySQL', name: 'mySql', diff --git a/packages/nodes-base/nodes/MySql/v2/MySqlV2.node.ts b/packages/nodes-base/nodes/MySql/v2/MySqlV2.node.ts index 2adf717a5c212..f14a7f0b74d7b 100644 --- a/packages/nodes-base/nodes/MySql/v2/MySqlV2.node.ts +++ b/packages/nodes-base/nodes/MySql/v2/MySqlV2.node.ts @@ -6,11 +6,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { listSearch, credentialTest, loadOptions } from './methods'; - -import { versionDescription } from './actions/versionDescription'; - import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; +import { listSearch, credentialTest, loadOptions } from './methods'; export class MySqlV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/MySql/v2/actions/common.descriptions.ts b/packages/nodes-base/nodes/MySql/v2/actions/common.descriptions.ts index 6591e62233bc0..0cc86008a6d59 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/common.descriptions.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/common.descriptions.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { BATCH_MODE, SINGLE } from '../helpers/interfaces'; export const tableRLC: INodeProperties = { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/Database.resource.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/Database.resource.ts index 90e07ae7d27db..88e93664e036a 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/Database.resource.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/Database.resource.ts @@ -1,12 +1,12 @@ import type { INodeProperties } from 'n8n-workflow'; -import { tableRLC } from '../common.descriptions'; import * as deleteTable from './deleteTable.operation'; import * as executeQuery from './executeQuery.operation'; import * as insert from './insert.operation'; import * as select from './select.operation'; import * as update from './update.operation'; import * as upsert from './upsert.operation'; +import { tableRLC } from '../common.descriptions'; export { deleteTable, executeQuery, insert, select, update, upsert }; diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/deleteTable.operation.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/deleteTable.operation.ts index 3b725739774c0..385c9eb93fcae 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/deleteTable.operation.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/deleteTable.operation.ts @@ -6,21 +6,20 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { QueryRunner, QueryValues, QueryWithValues, WhereClause, } from '../../helpers/interfaces'; - import { addWhereClauses, escapeSqlIdentifier } from '../../helpers/utils'; - import { optionsCollection, selectRowsFixedCollection, combineConditionsCollection, } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/executeQuery.operation.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/executeQuery.operation.ts index 9af1b9eaa3872..8991f4590e035 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/executeQuery.operation.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/executeQuery.operation.ts @@ -6,12 +6,11 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { QueryRunner, QueryWithValues } from '../../helpers/interfaces'; +import { getResolvables, updateDisplayOptions } from '@utils/utilities'; +import type { QueryRunner, QueryWithValues } from '../../helpers/interfaces'; import { prepareQueryAndReplacements, replaceEmptyStringsByNulls } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { getResolvables, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/insert.operation.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/insert.operation.ts index 5ff05181ed70a..4646b73a0055b 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/insert.operation.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/insert.operation.ts @@ -5,19 +5,17 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { QueryMode, QueryRunner, QueryValues, QueryWithValues, } from '../../helpers/interfaces'; - import { AUTO_MAP, BATCH_MODE, DATA_MODE } from '../../helpers/interfaces'; - import { escapeSqlIdentifier, replaceEmptyStringsByNulls } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/select.operation.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/select.operation.ts index 7b16574f7510f..d8d5341c3688a 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/select.operation.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/select.operation.ts @@ -5,6 +5,8 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { QueryRunner, QueryValues, @@ -12,16 +14,13 @@ import type { SortRule, WhereClause, } from '../../helpers/interfaces'; - import { addSortRules, addWhereClauses, escapeSqlIdentifier } from '../../helpers/utils'; - import { optionsCollection, sortFixedCollection, selectRowsFixedCollection, combineConditionsCollection, } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/update.operation.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/update.operation.ts index 62ba0c23ab83b..e21cf8ee3ab94 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/update.operation.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/update.operation.ts @@ -5,13 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { QueryRunner, QueryValues, QueryWithValues } from '../../helpers/interfaces'; import { AUTO_MAP, DATA_MODE } from '../../helpers/interfaces'; - import { escapeSqlIdentifier, replaceEmptyStringsByNulls } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/database/upsert.operation.ts b/packages/nodes-base/nodes/MySql/v2/actions/database/upsert.operation.ts index 7009edecc2c0b..746441188bf22 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/database/upsert.operation.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/database/upsert.operation.ts @@ -5,13 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { QueryRunner, QueryValues, QueryWithValues } from '../../helpers/interfaces'; import { AUTO_MAP, DATA_MODE } from '../../helpers/interfaces'; - import { escapeSqlIdentifier, replaceEmptyStringsByNulls } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/MySql/v2/actions/router.ts b/packages/nodes-base/nodes/MySql/v2/actions/router.ts index e9ef6a8591460..722d9bb06fab2 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/router.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/router.ts @@ -1,11 +1,11 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { createPool } from '../transport'; -import type { MysqlNodeCredentials, QueryRunner } from '../helpers/interfaces'; -import { configureQueryRunner } from '../helpers/utils'; import * as database from './database/Database.resource'; import type { MySqlType } from './node.type'; +import type { MysqlNodeCredentials, QueryRunner } from '../helpers/interfaces'; +import { configureQueryRunner } from '../helpers/utils'; +import { createPool } from '../transport'; export async function router(this: IExecuteFunctions): Promise { let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts b/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts index 60df3545282bd..7d7bbda262ef9 100644 --- a/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts @@ -6,10 +6,8 @@ import type { IPairedItemData, NodeExecutionWithMetadata, } from 'n8n-workflow'; - import { NodeOperationError } from 'n8n-workflow'; -import { generatePairedItemData } from '../../../../utils/utilities'; import type { Mysql2Pool, QueryMode, @@ -18,8 +16,8 @@ import type { SortRule, WhereClause, } from './interfaces'; - import { BATCH_MODE } from './interfaces'; +import { generatePairedItemData } from '../../../../utils/utilities'; export function escapeSqlIdentifier(identifier: string): string { const parts = identifier.match(/(`[^`]*`|[^.`]+)/g) ?? []; diff --git a/packages/nodes-base/nodes/MySql/v2/methods/credentialTest.ts b/packages/nodes-base/nodes/MySql/v2/methods/credentialTest.ts index b89e18f691906..0a8bb34d51f3c 100644 --- a/packages/nodes-base/nodes/MySql/v2/methods/credentialTest.ts +++ b/packages/nodes-base/nodes/MySql/v2/methods/credentialTest.ts @@ -4,8 +4,8 @@ import type { INodeCredentialTestResult, } from 'n8n-workflow'; -import { createPool } from '../transport'; import type { MysqlNodeCredentials } from '../helpers/interfaces'; +import { createPool } from '../transport'; export async function mysqlConnectionTest( this: ICredentialTestFunctions, diff --git a/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts b/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts index bf4af6b612082..65ec2f5306790 100644 --- a/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts @@ -1,6 +1,7 @@ import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; -import { createPool } from '../transport'; + import type { MysqlNodeCredentials } from '../helpers/interfaces'; +import { createPool } from '../transport'; export async function searchTables(this: ILoadOptionsFunctions): Promise { const credentials = await this.getCredentials('mySql'); diff --git a/packages/nodes-base/nodes/MySql/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/MySql/v2/methods/loadOptions.ts index f74da247ab9d9..08aa444b0f9e2 100644 --- a/packages/nodes-base/nodes/MySql/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/MySql/v2/methods/loadOptions.ts @@ -1,7 +1,8 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; -import { createPool } from '../transport'; -import { escapeSqlIdentifier } from '../helpers/utils'; + import type { MysqlNodeCredentials } from '../helpers/interfaces'; +import { escapeSqlIdentifier } from '../helpers/utils'; +import { createPool } from '../transport'; export async function getColumns(this: ILoadOptionsFunctions): Promise { const credentials = await this.getCredentials('mySql'); diff --git a/packages/nodes-base/nodes/MySql/v2/transport/index.ts b/packages/nodes-base/nodes/MySql/v2/transport/index.ts index ca7d55bcb64a6..49b6434f1248d 100644 --- a/packages/nodes-base/nodes/MySql/v2/transport/index.ts +++ b/packages/nodes-base/nodes/MySql/v2/transport/index.ts @@ -1,4 +1,3 @@ -import { createServer, type AddressInfo } from 'node:net'; import mysql2 from 'mysql2/promise'; import type { ICredentialTestFunctions, @@ -6,10 +5,12 @@ import type { IExecuteFunctions, ILoadOptionsFunctions, } from 'n8n-workflow'; +import { createServer, type AddressInfo } from 'node:net'; -import type { Mysql2Pool, MysqlNodeCredentials } from '../helpers/interfaces'; -import { formatPrivateKey } from '@utils/utilities'; import { LOCALHOST } from '@utils/constants'; +import { formatPrivateKey } from '@utils/utilities'; + +import type { Mysql2Pool, MysqlNodeCredentials } from '../helpers/interfaces'; export async function createPool( this: IExecuteFunctions | ICredentialTestFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/N8n/CredentialDescription.ts b/packages/nodes-base/nodes/N8n/CredentialDescription.ts index fa701d081537d..6ca1ef502beca 100644 --- a/packages/nodes-base/nodes/N8n/CredentialDescription.ts +++ b/packages/nodes-base/nodes/N8n/CredentialDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { parseAndSetBodyJson } from './GenericFunctions'; export const credentialOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/N8n/ExecutionDescription.ts b/packages/nodes-base/nodes/N8n/ExecutionDescription.ts index b37184c77201d..e4c7eaf854a17 100644 --- a/packages/nodes-base/nodes/N8n/ExecutionDescription.ts +++ b/packages/nodes-base/nodes/N8n/ExecutionDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { getCursorPaginator } from './GenericFunctions'; import { workflowIdLocator } from './WorkflowLocator'; diff --git a/packages/nodes-base/nodes/N8n/N8n.node.ts b/packages/nodes-base/nodes/N8n/N8n.node.ts index a58c8551645a0..12e976af7399d 100644 --- a/packages/nodes-base/nodes/N8n/N8n.node.ts +++ b/packages/nodes-base/nodes/N8n/N8n.node.ts @@ -1,4 +1,5 @@ import { NodeConnectionType, type INodeType, type INodeTypeDescription } from 'n8n-workflow'; + import { auditFields, auditOperations } from './AuditDescription'; import { credentialFields, credentialOperations } from './CredentialDescription'; import { executionFields, executionOperations } from './ExecutionDescription'; diff --git a/packages/nodes-base/nodes/N8n/WorkflowDescription.ts b/packages/nodes-base/nodes/N8n/WorkflowDescription.ts index 20a97719b0f0d..9b8d4360b7b6b 100644 --- a/packages/nodes-base/nodes/N8n/WorkflowDescription.ts +++ b/packages/nodes-base/nodes/N8n/WorkflowDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { getCursorPaginator, parseAndSetBodyJson, diff --git a/packages/nodes-base/nodes/N8n/WorkflowLocator.ts b/packages/nodes-base/nodes/N8n/WorkflowLocator.ts index 612a12c275e9c..7b55435231dfa 100644 --- a/packages/nodes-base/nodes/N8n/WorkflowLocator.ts +++ b/packages/nodes-base/nodes/N8n/WorkflowLocator.ts @@ -1,4 +1,5 @@ import type { ILoadOptionsFunctions, INodeListSearchResult, INodeProperties } from 'n8n-workflow'; + import { apiRequestAllItems } from './GenericFunctions'; type DataItemsResponse = { diff --git a/packages/nodes-base/nodes/N8n/test/node/N8n.test.ts b/packages/nodes-base/nodes/N8n/test/node/N8n.test.ts index e4b0b4d930365..d4776686627c0 100644 --- a/packages/nodes-base/nodes/N8n/test/node/N8n.test.ts +++ b/packages/nodes-base/nodes/N8n/test/node/N8n.test.ts @@ -1,9 +1,8 @@ -import nock from 'nock'; import type { INodeTypes } from 'n8n-workflow'; -import { setup, workflowToTests, getWorkflowFilenames } from '@test/nodes/Helpers'; +import nock from 'nock'; import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; - +import { setup, workflowToTests, getWorkflowFilenames } from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; describe('Test N8n Node, expect base_url to be received from credentials', () => { diff --git a/packages/nodes-base/nodes/Nasa/Nasa.node.ts b/packages/nodes-base/nodes/Nasa/Nasa.node.ts index 70884650094b5..36e33e5ed34fd 100644 --- a/packages/nodes-base/nodes/Nasa/Nasa.node.ts +++ b/packages/nodes-base/nodes/Nasa/Nasa.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,7 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { nasaApiRequest, nasaApiRequestAllItems } from './GenericFunctions'; export class Nasa implements INodeType { diff --git a/packages/nodes-base/nodes/Netlify/Netlify.node.ts b/packages/nodes-base/nodes/Netlify/Netlify.node.ts index c2f6f9332087d..43894ea1303a2 100644 --- a/packages/nodes-base/nodes/Netlify/Netlify.node.ts +++ b/packages/nodes-base/nodes/Netlify/Netlify.node.ts @@ -9,10 +9,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { netlifyApiRequest, netlifyRequestAllItems } from './GenericFunctions'; - import { deployFields, deployOperations } from './DeployDescription'; - +import { netlifyApiRequest, netlifyRequestAllItems } from './GenericFunctions'; import { siteFields, siteOperations } from './SiteDescription'; export class Netlify implements INodeType { diff --git a/packages/nodes-base/nodes/Netlify/NetlifyTrigger.node.ts b/packages/nodes-base/nodes/Netlify/NetlifyTrigger.node.ts index 4723001318dce..ac8b6b529491a 100644 --- a/packages/nodes-base/nodes/Netlify/NetlifyTrigger.node.ts +++ b/packages/nodes-base/nodes/Netlify/NetlifyTrigger.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IHookFunctions, IWebhookFunctions, @@ -10,7 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { netlifyApiRequest } from './GenericFunctions'; export class NetlifyTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Netscaler/ADC/NetscalerAdc.node.ts b/packages/nodes-base/nodes/Netscaler/ADC/NetscalerAdc.node.ts index 2f7fff154dc48..19b067b0276fa 100644 --- a/packages/nodes-base/nodes/Netscaler/ADC/NetscalerAdc.node.ts +++ b/packages/nodes-base/nodes/Netscaler/ADC/NetscalerAdc.node.ts @@ -9,11 +9,9 @@ import { type JsonObject, } from 'n8n-workflow'; -import { netscalerADCApiRequest } from './GenericFunctions'; - -import { fileDescription } from './FileDescription'; - import { certificateDescription } from './CertificateDescription'; +import { fileDescription } from './FileDescription'; +import { netscalerADCApiRequest } from './GenericFunctions'; export class NetscalerAdc implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts index 9a710c2a9c830..bcae490194bba 100644 --- a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts +++ b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts @@ -1,4 +1,3 @@ -import { URLSearchParams } from 'url'; import type { IBinaryKeyData, IDataObject, @@ -10,11 +9,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - +import { URLSearchParams } from 'url'; import { parseString } from 'xml2js'; -import { wrapData } from '../../utils/utilities'; import { nextCloudApiRequest } from './GenericFunctions'; +import { wrapData } from '../../utils/utilities'; export class NextCloud implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts index 0cadbc5b1d6df..77775f082ba8f 100644 --- a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts +++ b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts @@ -12,7 +12,6 @@ import type { import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { apiRequest, apiRequestAllItems, downloadRecordAttachments } from './GenericFunctions'; - import { operationFields } from './OperationDescription'; export class NocoDB implements INodeType { diff --git a/packages/nodes-base/nodes/Notion/NotionTrigger.node.ts b/packages/nodes-base/nodes/Notion/NotionTrigger.node.ts index 49079c3c81514..3d83fed7f1c47 100644 --- a/packages/nodes-base/nodes/Notion/NotionTrigger.node.ts +++ b/packages/nodes-base/nodes/Notion/NotionTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IPollFunctions, type IDataObject, @@ -7,16 +8,14 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { notionApiRequest, simplifyObjects } from './shared/GenericFunctions'; - -import { listSearch } from './shared/methods'; import { databaseUrlExtractionRegexp, databaseUrlValidationRegexp, idExtractionRegexp, idValidationRegexp, } from './shared/constants'; +import { notionApiRequest, simplifyObjects } from './shared/GenericFunctions'; +import { listSearch } from './shared/methods'; export class NotionTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts index bf483b66a0867..b7404b04007a1 100644 --- a/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/shared/GenericFunctions.ts @@ -1,3 +1,6 @@ +import { camelCase, capitalCase, snakeCase } from 'change-case'; +import set from 'lodash/set'; +import moment from 'moment-timezone'; import type { IBinaryKeyData, IDataObject, @@ -16,15 +19,10 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; - -import { camelCase, capitalCase, snakeCase } from 'change-case'; - -import moment from 'moment-timezone'; - import { validate as uuidValidate } from 'uuid'; -import set from 'lodash/set'; -import { filters } from './descriptions/Filters'; + import { blockUrlExtractionRegexp, databasePageUrlValidationRegexp } from './constants'; +import { filters } from './descriptions/Filters'; function uuidValidateWithoutDashes(this: IExecuteFunctions, value: string) { if (uuidValidate(value)) return true; diff --git a/packages/nodes-base/nodes/Notion/shared/descriptions/Blocks.ts b/packages/nodes-base/nodes/Notion/shared/descriptions/Blocks.ts index 3b49e23fbe991..59f4560162760 100644 --- a/packages/nodes-base/nodes/Notion/shared/descriptions/Blocks.ts +++ b/packages/nodes-base/nodes/Notion/shared/descriptions/Blocks.ts @@ -1,4 +1,5 @@ import type { IDisplayOptions, INodeProperties } from 'n8n-workflow'; + import { databaseUrlExtractionRegexp, databaseUrlValidationRegexp, diff --git a/packages/nodes-base/nodes/Notion/shared/descriptions/DatabaseDescription.ts b/packages/nodes-base/nodes/Notion/shared/descriptions/DatabaseDescription.ts index f814139603b91..81dc932f0a71f 100644 --- a/packages/nodes-base/nodes/Notion/shared/descriptions/DatabaseDescription.ts +++ b/packages/nodes-base/nodes/Notion/shared/descriptions/DatabaseDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { databaseUrlExtractionRegexp, databaseUrlValidationRegexp, diff --git a/packages/nodes-base/nodes/Notion/shared/descriptions/DatabasePageDescription.ts b/packages/nodes-base/nodes/Notion/shared/descriptions/DatabasePageDescription.ts index 1a590457da26e..581863f87f645 100644 --- a/packages/nodes-base/nodes/Notion/shared/descriptions/DatabasePageDescription.ts +++ b/packages/nodes-base/nodes/Notion/shared/descriptions/DatabasePageDescription.ts @@ -1,9 +1,6 @@ import type { INodeProperties } from 'n8n-workflow'; -import { getConditions, getSearchFilters } from '../GenericFunctions'; - import { blocks, text } from './Blocks'; - import { filters } from './Filters'; import { databaseUrlExtractionRegexp, @@ -13,6 +10,7 @@ import { idExtractionRegexp, idValidationRegexp, } from '../constants'; +import { getConditions, getSearchFilters } from '../GenericFunctions'; export const databasePageOperations: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Notion/shared/methods/listSearch.ts b/packages/nodes-base/nodes/Notion/shared/methods/listSearch.ts index 1caba20dcff65..557f77052f9b5 100644 --- a/packages/nodes-base/nodes/Notion/shared/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Notion/shared/methods/listSearch.ts @@ -4,6 +4,7 @@ import type { INodeListSearchItems, INodeListSearchResult, } from 'n8n-workflow'; + import { notionApiRequestAllItems } from '../GenericFunctions'; export async function getDatabases( diff --git a/packages/nodes-base/nodes/Notion/test/GenericFunctions.test.ts b/packages/nodes-base/nodes/Notion/test/GenericFunctions.test.ts index 1250a0231ae02..5db400afa2ab0 100644 --- a/packages/nodes-base/nodes/Notion/test/GenericFunctions.test.ts +++ b/packages/nodes-base/nodes/Notion/test/GenericFunctions.test.ts @@ -1,9 +1,10 @@ +import type { MockProxy } from 'jest-mock-extended'; +import { mock } from 'jest-mock-extended'; import type { IExecuteFunctions, INode, INodeParameterResourceLocator } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { databasePageUrlExtractionRegexp } from '../shared/constants'; import { extractPageId, formatBlocks, getPageId } from '../shared/GenericFunctions'; -import type { MockProxy } from 'jest-mock-extended'; -import { mock } from 'jest-mock-extended'; describe('Test NotionV2, formatBlocks', () => { it('should format to_do block', () => { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/block/append.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/block/append.test.ts index 2112ab3394c37..5bd576ae4c947 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/block/append.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/block/append.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/block/getAll.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/block/getAll.test.ts index a1c858b59e375..a482d97a06235 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/block/getAll.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/block/getAll.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = [ diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/database/get.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/database/get.test.ts index 2d2dc68c27679..b4a36f8629a18 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/database/get.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/database/get.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/database/getAll.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/database/getAll.test.ts index 8c109d7d4f0b0..467b6300604ee 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/database/getAll.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/database/getAll.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = [ diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/database/search.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/database/search.test.ts index 16aef078858f1..4208d1524e41e 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/database/search.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/database/search.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = [ diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/create.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/create.test.ts index 3920fbfa1212f..f2c010e75a60a 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/create.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/create.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/get.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/get.test.ts index 7092f45d0c74f..5b2d5d2eb5997 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/get.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/get.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/getAll.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/getAll.test.ts index 7d465b7ca0196..1160e6c971c3e 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/getAll.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/getAll.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = [ diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/update.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/update.test.ts index a79589bede0c3..39531dbac794a 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/update.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/databasePage/update.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/page/archive.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/page/archive.test.ts index 433df8fc038e2..72ae18ae017ed 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/page/archive.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/page/archive.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/page/create.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/page/create.test.ts index 88b8c8018e3c4..85090c7938e94 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/page/create.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/page/create.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/page/search.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/page/search.test.ts index 5c7cc24c70bab..bc4c2d7a92fae 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/page/search.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/page/search.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = [ diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/user/get.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/user/get.test.ts index 5ded51c5920de..62ed0ef6e223a 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/user/get.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/user/get.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Notion/test/node/v2/user/getAll.test.ts b/packages/nodes-base/nodes/Notion/test/node/v2/user/getAll.test.ts index ac8922f5e432b..46816dfea2330 100644 --- a/packages/nodes-base/nodes/Notion/test/node/v2/user/getAll.test.ts +++ b/packages/nodes-base/nodes/Notion/test/node/v2/user/getAll.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = [ diff --git a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts index 587094b91bfba..1cc7a817345b6 100644 --- a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts +++ b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,7 +10,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import moment from 'moment-timezone'; +import { versionDescription } from './VersionDescription'; import type { SortData } from '../shared/GenericFunctions'; import { extractDatabaseId, @@ -25,9 +26,7 @@ import { notionApiRequestAllItems, simplifyObjects, } from '../shared/GenericFunctions'; - import { listSearch } from '../shared/methods'; -import { versionDescription } from './VersionDescription'; export class NotionV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Notion/v1/VersionDescription.ts b/packages/nodes-base/nodes/Notion/v1/VersionDescription.ts index 3d0334a04fb27..f8f9fe5f4a5d6 100644 --- a/packages/nodes-base/nodes/Notion/v1/VersionDescription.ts +++ b/packages/nodes-base/nodes/Notion/v1/VersionDescription.ts @@ -1,17 +1,14 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import { databaseFields, databaseOperations } from '../shared/descriptions/DatabaseDescription'; - -import { userFields, userOperations } from '../shared/descriptions/UserDescription'; - -import { pageFields, pageOperations } from '../shared/descriptions/PageDescription'; import { blockFields, blockOperations } from '../shared/descriptions/BlockDescription'; - +import { databaseFields, databaseOperations } from '../shared/descriptions/DatabaseDescription'; import { databasePageFields, databasePageOperations, } from '../shared/descriptions/DatabasePageDescription'; +import { pageFields, pageOperations } from '../shared/descriptions/PageDescription'; +import { userFields, userOperations } from '../shared/descriptions/UserDescription'; export const versionDescription: INodeTypeDescription = { displayName: 'Notion', diff --git a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts index 198dd325cbe96..a5b08b3fe3e4d 100644 --- a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts +++ b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts @@ -8,6 +8,8 @@ import type { } from 'n8n-workflow'; import { jsonParse, NodeApiError } from 'n8n-workflow'; +import { loadOptions } from './methods'; +import { versionDescription } from './VersionDescription'; import type { SortData, FileRecord } from '../shared/GenericFunctions'; import { downloadFiles, @@ -28,10 +30,7 @@ import { simplifyObjects, validateJSON, } from '../shared/GenericFunctions'; - import { listSearch } from '../shared/methods'; -import { loadOptions } from './methods'; -import { versionDescription } from './VersionDescription'; export class NotionV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Notion/v2/VersionDescription.ts b/packages/nodes-base/nodes/Notion/v2/VersionDescription.ts index 4114d681dbc31..d109920c89fbf 100644 --- a/packages/nodes-base/nodes/Notion/v2/VersionDescription.ts +++ b/packages/nodes-base/nodes/Notion/v2/VersionDescription.ts @@ -1,17 +1,14 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import { databaseFields, databaseOperations } from '../shared/descriptions/DatabaseDescription'; - -import { userFields, userOperations } from '../shared/descriptions/UserDescription'; - -import { pageFields, pageOperations } from '../shared/descriptions/PageDescription'; import { blockFields, blockOperations } from '../shared/descriptions/BlockDescription'; - +import { databaseFields, databaseOperations } from '../shared/descriptions/DatabaseDescription'; import { databasePageFields, databasePageOperations, } from '../shared/descriptions/DatabasePageDescription'; +import { pageFields, pageOperations } from '../shared/descriptions/PageDescription'; +import { userFields, userOperations } from '../shared/descriptions/UserDescription'; export const versionDescription: INodeTypeDescription = { displayName: 'Notion', diff --git a/packages/nodes-base/nodes/Notion/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Notion/v2/methods/loadOptions.ts index 1e0de238361a2..0410032a29c4a 100644 --- a/packages/nodes-base/nodes/Notion/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Notion/v2/methods/loadOptions.ts @@ -1,6 +1,5 @@ -import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; - import moment from 'moment-timezone'; +import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; import { extractPageId, diff --git a/packages/nodes-base/nodes/Npm/Npm.node.ts b/packages/nodes-base/nodes/Npm/Npm.node.ts index d86c82fe0dac8..2eeca1ec302f5 100644 --- a/packages/nodes-base/nodes/Npm/Npm.node.ts +++ b/packages/nodes-base/nodes/Npm/Npm.node.ts @@ -1,7 +1,8 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { packageFields, packageOperations } from './PackageDescription'; + import { distTagFields, distTagOperations } from './DistTagDescription'; +import { packageFields, packageOperations } from './PackageDescription'; export class Npm implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Npm/PackageDescription.ts b/packages/nodes-base/nodes/Npm/PackageDescription.ts index 75ebf7ed75567..d5b673522a708 100644 --- a/packages/nodes-base/nodes/Npm/PackageDescription.ts +++ b/packages/nodes-base/nodes/Npm/PackageDescription.ts @@ -1,5 +1,5 @@ -import { valid as isValidSemver } from 'semver'; import type { INodeExecutionData, INodeProperties } from 'n8n-workflow'; +import { valid as isValidSemver } from 'semver'; interface PackageJson { name: string; diff --git a/packages/nodes-base/nodes/Npm/test/Npm.node.test.ts b/packages/nodes-base/nodes/Npm/test/Npm.node.test.ts index 95d621240be06..2ae6f93a2b04d 100644 --- a/packages/nodes-base/nodes/Npm/test/Npm.node.test.ts +++ b/packages/nodes-base/nodes/Npm/test/Npm.node.test.ts @@ -1,6 +1,7 @@ import nock from 'nock'; -import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers'; + import { FAKE_CREDENTIALS_DATA } from '@test/nodes/FakeCredentialsMap'; +import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers'; describe('Test npm Node', () => { beforeAll(() => { diff --git a/packages/nodes-base/nodes/Odoo/Odoo.node.ts b/packages/nodes-base/nodes/Odoo/Odoo.node.ts index 58472d9340551..54ca0621cb92e 100644 --- a/packages/nodes-base/nodes/Odoo/Odoo.node.ts +++ b/packages/nodes-base/nodes/Odoo/Odoo.node.ts @@ -1,3 +1,4 @@ +import { capitalCase } from 'change-case'; import type { IExecuteFunctions, ICredentialsDecrypted, @@ -13,7 +14,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, deepCopy, randomInt } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; import { contactDescription, contactOperations, @@ -24,7 +24,6 @@ import { opportunityDescription, opportunityOperations, } from './descriptions'; - import type { IOdooFilterOperations } from './GenericFunctions'; import { odooCreate, diff --git a/packages/nodes-base/nodes/Odoo/descriptions/index.ts b/packages/nodes-base/nodes/Odoo/descriptions/index.ts index 12094d57ee424..d1af6f920170c 100644 --- a/packages/nodes-base/nodes/Odoo/descriptions/index.ts +++ b/packages/nodes-base/nodes/Odoo/descriptions/index.ts @@ -1,6 +1,6 @@ +import { contactDescription, contactOperations } from './ContactDescription'; import { customResourceDescription, customResourceOperations } from './CustomResourceDescription'; import { noteDescription, noteOperations } from './NoteDescription'; -import { contactDescription, contactOperations } from './ContactDescription'; import { opportunityDescription, opportunityOperations } from './OpportunityDescription'; export { diff --git a/packages/nodes-base/nodes/Okta/Okta.node.ts b/packages/nodes-base/nodes/Okta/Okta.node.ts index 550cffcd672e2..18ec90fb22a93 100644 --- a/packages/nodes-base/nodes/Okta/Okta.node.ts +++ b/packages/nodes-base/nodes/Okta/Okta.node.ts @@ -1,5 +1,6 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { userFields, userOperations } from './UserDescription'; import { getUsers } from './UserFunctions'; diff --git a/packages/nodes-base/nodes/Okta/UserDescription.ts b/packages/nodes-base/nodes/Okta/UserDescription.ts index b10d580339a99..0990e86d7c450 100644 --- a/packages/nodes-base/nodes/Okta/UserDescription.ts +++ b/packages/nodes-base/nodes/Okta/UserDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { getCursorPaginator, simplifyGetAllResponse, simplifyGetResponse } from './UserFunctions'; const BASE_API_URL = '/api/v1/users/'; export const userOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Okta/test/UserFunctions.test.ts b/packages/nodes-base/nodes/Okta/test/UserFunctions.test.ts index 9e5262db67a51..1695f8e35edfb 100644 --- a/packages/nodes-base/nodes/Okta/test/UserFunctions.test.ts +++ b/packages/nodes-base/nodes/Okta/test/UserFunctions.test.ts @@ -8,6 +8,7 @@ import type { IN8nHttpFullResponse, INodeExecutionData, } from 'n8n-workflow'; + import { getCursorPaginator, getUsers, diff --git a/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts b/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts index 87c1b0be28fd3..a70d12879a52f 100644 --- a/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -11,8 +12,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - export async function onfleetApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts index fa6848da69402..e6c18b9026ec1 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts @@ -11,31 +11,16 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { taskFields, taskOperations } from './descriptions/TaskDescription'; - -import { destinationFields, destinationOperations } from './descriptions/DestinationDescription'; - -import { resourceLoaders } from './GenericFunctions'; - -import { recipientFields, recipientOperations } from './descriptions/RecipientDescription'; - -import { organizationFields, organizationOperations } from './descriptions/OrganizationDescription'; - import { adminFields, adminOperations } from './descriptions/AdministratorDescription'; - -import { hubFields, hubOperations } from './descriptions/HubDescription'; - -import { workerFields, workerOperations } from './descriptions/WorkerDescription'; - -// import { -// webhookFields, -// webhookOperations, -// } from './descriptions/WebhookDescription'; - import { containerFields, containerOperations } from './descriptions/ContainerDescription'; - +import { destinationFields, destinationOperations } from './descriptions/DestinationDescription'; +import { hubFields, hubOperations } from './descriptions/HubDescription'; +import { organizationFields, organizationOperations } from './descriptions/OrganizationDescription'; +import { recipientFields, recipientOperations } from './descriptions/RecipientDescription'; +import { taskFields, taskOperations } from './descriptions/TaskDescription'; import { teamFields, teamOperations } from './descriptions/TeamDescription'; - +import { workerFields, workerOperations } from './descriptions/WorkerDescription'; +import { resourceLoaders } from './GenericFunctions'; import { Onfleet as OnfleetMethods } from './Onfleet'; export class Onfleet implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.ts index f01d89eda57eb..9fc02b2c46a9e 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -8,7 +9,7 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; +import { onfleetApiRequest, onfleetApiRequestAllItems } from './GenericFunctions'; import type { OnfleetAdmins, OnfleetCloneOverrideTaskOptions, @@ -31,8 +32,6 @@ import type { OnfleetWorkerScheduleEntry, } from './interfaces'; -import { onfleetApiRequest, onfleetApiRequestAllItems } from './GenericFunctions'; - const formatAddress = ( unparsed: boolean, address: string | undefined, diff --git a/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts b/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts index 24a1079cb40c4..3309734562649 100644 --- a/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts +++ b/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts @@ -10,9 +10,7 @@ import type { import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { eventDisplay, eventNameField } from './descriptions/OnfleetWebhookDescription'; - import { onfleetApiRequest } from './GenericFunctions'; - import { webhookMapping } from './WebhookMapping'; export class OnfleetTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts index a967ed000757b..bbb3affc79d7f 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts @@ -1,7 +1,6 @@ import type { INodeProperties } from 'n8n-workflow'; import { destinationExternalField } from './DestinationDescription'; - import { recipientExternalField } from './RecipientDescription'; export const taskOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/OpenAi/ChatDescription.ts b/packages/nodes-base/nodes/OpenAi/ChatDescription.ts index 2b0ef3e8df4f3..35db57f4bdf22 100644 --- a/packages/nodes-base/nodes/OpenAi/ChatDescription.ts +++ b/packages/nodes-base/nodes/OpenAi/ChatDescription.ts @@ -1,4 +1,5 @@ import type { INodeExecutionData, INodeProperties } from 'n8n-workflow'; + import { sendErrorPostReceive } from './GenericFunctions'; export const chatOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/OpenAi/ImageDescription.ts b/packages/nodes-base/nodes/OpenAi/ImageDescription.ts index 1cb5ceb89d2b8..1b66be886c5d0 100644 --- a/packages/nodes-base/nodes/OpenAi/ImageDescription.ts +++ b/packages/nodes-base/nodes/OpenAi/ImageDescription.ts @@ -1,4 +1,5 @@ import type { INodeExecutionData, INodeProperties } from 'n8n-workflow'; + import { sendErrorPostReceive } from './GenericFunctions'; export const imageOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/OpenAi/OpenAi.node.ts b/packages/nodes-base/nodes/OpenAi/OpenAi.node.ts index a936337136e9f..1389a18f0cc2d 100644 --- a/packages/nodes-base/nodes/OpenAi/OpenAi.node.ts +++ b/packages/nodes-base/nodes/OpenAi/OpenAi.node.ts @@ -1,9 +1,10 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { oldVersionNotice } from '../../utils/descriptions'; + +import { chatFields, chatOperations } from './ChatDescription'; import { imageFields, imageOperations } from './ImageDescription'; import { textFields, textOperations } from './TextDescription'; -import { chatFields, chatOperations } from './ChatDescription'; +import { oldVersionNotice } from '../../utils/descriptions'; export class OpenAi implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/OpenAi/TextDescription.ts b/packages/nodes-base/nodes/OpenAi/TextDescription.ts index 30b533e90e206..e22eb0d72a414 100644 --- a/packages/nodes-base/nodes/OpenAi/TextDescription.ts +++ b/packages/nodes-base/nodes/OpenAi/TextDescription.ts @@ -1,4 +1,5 @@ import type { INodeExecutionData, INodeProperties } from 'n8n-workflow'; + import { sendErrorPostReceive } from './GenericFunctions'; export const textOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/Orbit/Orbit.node.ts b/packages/nodes-base/nodes/Orbit/Orbit.node.ts index 81141b3be41d0..1f938b9456e37 100644 --- a/packages/nodes-base/nodes/Orbit/Orbit.node.ts +++ b/packages/nodes-base/nodes/Orbit/Orbit.node.ts @@ -6,15 +6,11 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; - import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { activityFields, activityOperations } from './ActivityDescription'; - import { memberFields, memberOperations } from './MemberDescription'; - import { noteFields, noteOperations } from './NoteDescription'; - import { postFields, postOperations } from './PostDescription'; export class Orbit implements INodeType { diff --git a/packages/nodes-base/nodes/Oura/Oura.node.ts b/packages/nodes-base/nodes/Oura/Oura.node.ts index e96b2c57cb6dc..ce522996d7090 100644 --- a/packages/nodes-base/nodes/Oura/Oura.node.ts +++ b/packages/nodes-base/nodes/Oura/Oura.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,11 +8,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { ouraApiRequest } from './GenericFunctions'; - import { profileOperations } from './ProfileDescription'; - import { summaryFields, summaryOperations } from './SummaryDescription'; export class Oura implements INodeType { diff --git a/packages/nodes-base/nodes/Paddle/Paddle.node.ts b/packages/nodes-base/nodes/Paddle/Paddle.node.ts index cb9ce4b76a943..1bdedf23387e5 100644 --- a/packages/nodes-base/nodes/Paddle/Paddle.node.ts +++ b/packages/nodes-base/nodes/Paddle/Paddle.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -10,17 +11,11 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { couponFields, couponOperations } from './CouponDescription'; - import { paddleApiRequest, paddleApiRequestAllItems, validateJSON } from './GenericFunctions'; - import { paymentFields, paymentOperations } from './PaymentDescription'; - import { planFields, planOperations } from './PlanDescription'; - import { productFields, productOperations } from './ProductDescription'; - import { userFields, userOperations } from './UserDescription'; // import { diff --git a/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts b/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts index 3206e205871d0..3f21331d71c8c 100644 --- a/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { JsonObject, IDataObject, @@ -10,8 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; - export async function pagerDutyApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts index 4a1cfbbe6707a..d00742dec10b4 100644 --- a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts +++ b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts @@ -1,3 +1,5 @@ +import { snakeCase } from 'change-case'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -9,24 +11,17 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; -import moment from 'moment-timezone'; import { keysToSnakeCase, pagerDutyApiRequest, pagerDutyApiRequestAllItems, } from './GenericFunctions'; - import { incidentFields, incidentOperations } from './IncidentDescription'; - +import type { IIncident } from './IncidentInterface'; import { incidentNoteFields, incidentNoteOperations } from './IncidentNoteDescription'; - import { logEntryFields, logEntryOperations } from './LogEntryDescription'; - import { userFields, userOperations } from './UserDescription'; -import type { IIncident } from './IncidentInterface'; - export class PagerDuty implements INodeType { description: INodeTypeDescription = { displayName: 'PagerDuty', diff --git a/packages/nodes-base/nodes/PayPal/PayPal.node.ts b/packages/nodes-base/nodes/PayPal/PayPal.node.ts index c046226a3e828..a10001b652c81 100644 --- a/packages/nodes-base/nodes/PayPal/PayPal.node.ts +++ b/packages/nodes-base/nodes/PayPal/PayPal.node.ts @@ -10,6 +10,8 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; + +import { payPalApiRequest, payPalApiRequestAllItems, validateJSON } from './GenericFunctions'; import { payoutFields, payoutItemFields, @@ -24,7 +26,6 @@ import type { RecipientType, RecipientWallet, } from './PaymentInteface'; -import { payPalApiRequest, payPalApiRequestAllItems, validateJSON } from './GenericFunctions'; export class PayPal implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts b/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts index 6d409202d4e6e..7fb8987ef5d06 100644 --- a/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts +++ b/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts @@ -10,6 +10,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; + import { payPalApiRequest, upperFist } from './GenericFunctions'; export class PayPalTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Peekalink/test/Peekalink.node.test.ts b/packages/nodes-base/nodes/Peekalink/test/Peekalink.node.test.ts index 1bfa540ee20bf..4c06cf620fb70 100644 --- a/packages/nodes-base/nodes/Peekalink/test/Peekalink.node.test.ts +++ b/packages/nodes-base/nodes/Peekalink/test/Peekalink.node.test.ts @@ -1,8 +1,10 @@ import { NodeConnectionType } from 'n8n-workflow'; -import { apiUrl } from '../Peekalink.node'; -import type { WorkflowTestData } from '@test/nodes/types'; + import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; +import type { WorkflowTestData } from '@test/nodes/types'; + +import { apiUrl } from '../Peekalink.node'; describe('Peekalink Node', () => { const exampleComPreview = { diff --git a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts index 33a323830d983..facb21aa464c0 100644 --- a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts +++ b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts @@ -9,9 +9,8 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { phantombusterApiRequest, validateJSON } from './GenericFunctions'; - import { agentFields, agentOperations } from './AgentDescription'; +import { phantombusterApiRequest, validateJSON } from './GenericFunctions'; // import { // sentenceCase, diff --git a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts index 63634980b66d6..83c90c3068621 100644 --- a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts +++ b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts @@ -10,7 +10,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { getUser, philipsHueApiRequest } from './GenericFunctions'; - import { lightFields, lightOperations } from './LightDescription'; export class PhilipsHue implements INodeType { diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index a92578a4d1811..bdca4a33f4c46 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -19,7 +19,6 @@ import { pipedriveResolveCustomProperties, sortOptionParameters, } from './GenericFunctions'; - import { currencies } from './utils'; interface CustomProperty { diff --git a/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts b/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts index 0ebe6792cb506..aba0297bd76a3 100644 --- a/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts @@ -1,3 +1,5 @@ +import basicAuth from 'basic-auth'; +import type { Response } from 'express'; import { type IHookFunctions, type IWebhookFunctions, @@ -9,9 +11,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import basicAuth from 'basic-auth'; - -import type { Response } from 'express'; import { pipedriveApiRequest } from './GenericFunctions'; function authorizationError(resp: Response, realm: string, responseCode: number, message?: string) { diff --git a/packages/nodes-base/nodes/Plivo/Plivo.node.ts b/packages/nodes-base/nodes/Plivo/Plivo.node.ts index d6ce65de0e9ab..53f651a31cefa 100644 --- a/packages/nodes-base/nodes/Plivo/Plivo.node.ts +++ b/packages/nodes-base/nodes/Plivo/Plivo.node.ts @@ -7,13 +7,10 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { smsFields, smsOperations } from './SmsDescription'; - -import { mmsFields, mmsOperations } from './MmsDescription'; - import { callFields, callOperations } from './CallDescription'; - import { plivoApiRequest } from './GenericFunctions'; +import { mmsFields, mmsOperations } from './MmsDescription'; +import { smsFields, smsOperations } from './SmsDescription'; export class Plivo implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/PostBin/PostBin.node.ts b/packages/nodes-base/nodes/PostBin/PostBin.node.ts index ccad7205dc9e2..4547ca1fc5185 100644 --- a/packages/nodes-base/nodes/PostBin/PostBin.node.ts +++ b/packages/nodes-base/nodes/PostBin/PostBin.node.ts @@ -2,7 +2,6 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; import { binFields, binOperations } from './BinDescription'; - import { requestFields, requestOperations } from './RequestDescription'; export class PostBin implements INodeType { diff --git a/packages/nodes-base/nodes/PostHog/PostHog.node.ts b/packages/nodes-base/nodes/PostHog/PostHog.node.ts index 603bddcc025dc..3a894815a8d53 100644 --- a/packages/nodes-base/nodes/PostHog/PostHog.node.ts +++ b/packages/nodes-base/nodes/PostHog/PostHog.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,17 +8,12 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import type { IAlias, IEvent, IIdentity, ITrack } from './GenericFunctions'; -import { posthogApiRequest } from './GenericFunctions'; - import { aliasFields, aliasOperations } from './AliasDescription'; - import { eventFields, eventOperations } from './EventDescription'; - -import { trackFields, trackOperations } from './TrackDescription'; - +import type { IAlias, IEvent, IIdentity, ITrack } from './GenericFunctions'; +import { posthogApiRequest } from './GenericFunctions'; import { identityFields, identityOperations } from './IdentityDescription'; +import { trackFields, trackOperations } from './TrackDescription'; export class PostHog implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Postgres/PostgresTrigger.node.ts b/packages/nodes-base/nodes/Postgres/PostgresTrigger.node.ts index 1bf2334071b22..31b37751a58ea 100644 --- a/packages/nodes-base/nodes/Postgres/PostgresTrigger.node.ts +++ b/packages/nodes-base/nodes/Postgres/PostgresTrigger.node.ts @@ -7,6 +7,7 @@ import { type ITriggerResponse, NodeConnectionType, } from 'n8n-workflow'; + import { pgTriggerFunction, initDB, diff --git a/packages/nodes-base/nodes/Postgres/test/v2/operations.test.ts b/packages/nodes-base/nodes/Postgres/test/v2/operations.test.ts index 2a1aeb11f6d08..206e6bf74a43a 100644 --- a/packages/nodes-base/nodes/Postgres/test/v2/operations.test.ts +++ b/packages/nodes-base/nodes/Postgres/test/v2/operations.test.ts @@ -1,3 +1,4 @@ +import { get } from 'lodash'; import type { IDataObject, IExecuteFunctions, @@ -6,15 +7,13 @@ import type { INodeParameters, } from 'n8n-workflow'; -import { get } from 'lodash'; -import type { ColumnInfo, PgpDatabase, QueriesRunner } from '../../v2/helpers/interfaces'; - import * as deleteTable from '../../v2/actions/database/deleteTable.operation'; import * as executeQuery from '../../v2/actions/database/executeQuery.operation'; import * as insert from '../../v2/actions/database/insert.operation'; import * as select from '../../v2/actions/database/select.operation'; import * as update from '../../v2/actions/database/update.operation'; import * as upsert from '../../v2/actions/database/upsert.operation'; +import type { ColumnInfo, PgpDatabase, QueriesRunner } from '../../v2/helpers/interfaces'; const runQueries: QueriesRunner = jest.fn(); diff --git a/packages/nodes-base/nodes/Postgres/test/v2/runQueries.test.ts b/packages/nodes-base/nodes/Postgres/test/v2/runQueries.test.ts index d8dc12b01f7b2..86689890f279e 100644 --- a/packages/nodes-base/nodes/Postgres/test/v2/runQueries.test.ts +++ b/packages/nodes-base/nodes/Postgres/test/v2/runQueries.test.ts @@ -1,7 +1,7 @@ +import { mock } from 'jest-mock-extended'; import type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow'; - import pgPromise from 'pg-promise'; -import { mock } from 'jest-mock-extended'; + import type { PgpDatabase } from '../../v2/helpers/interfaces'; import { configureQueryRunner } from '../../v2/helpers/utils'; diff --git a/packages/nodes-base/nodes/Postgres/test/v2/utils.test.ts b/packages/nodes-base/nodes/Postgres/test/v2/utils.test.ts index 39cdaf16ec005..b8526c0e6f28b 100644 --- a/packages/nodes-base/nodes/Postgres/test/v2/utils.test.ts +++ b/packages/nodes-base/nodes/Postgres/test/v2/utils.test.ts @@ -1,5 +1,7 @@ import type { IDataObject, INode } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import type { ColumnInfo } from '../../v2/helpers/interfaces'; import { addSortRules, addReturning, @@ -12,7 +14,6 @@ import { wrapData, convertArraysToPostgresFormat, } from '../../v2/helpers/utils'; -import type { ColumnInfo } from '../../v2/helpers/interfaces'; const node: INode = { id: '1', diff --git a/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts b/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts index e45f5232c9299..b58aca9701591 100644 --- a/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts +++ b/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts @@ -10,13 +10,12 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import pgPromise from 'pg-promise'; -import { pgInsertV2, pgQueryV2, pgUpdate, wrapData } from './genericFunctions'; - import { oldVersionNotice } from '@utils/descriptions'; +import { pgInsertV2, pgQueryV2, pgUpdate, wrapData } from './genericFunctions'; + const versionDescription: INodeTypeDescription = { displayName: 'Postgres', name: 'postgres', diff --git a/packages/nodes-base/nodes/Postgres/v1/genericFunctions.ts b/packages/nodes-base/nodes/Postgres/v1/genericFunctions.ts index 834779d1a0df1..3fb2982a6ab32 100644 --- a/packages/nodes-base/nodes/Postgres/v1/genericFunctions.ts +++ b/packages/nodes-base/nodes/Postgres/v1/genericFunctions.ts @@ -2,6 +2,7 @@ import { ApplicationError } from 'n8n-workflow'; import type { IExecuteFunctions, IDataObject, INodeExecutionData, JsonObject } from 'n8n-workflow'; import type pgPromise from 'pg-promise'; import type pg from 'pg-promise/typescript/pg-subset'; + import { getResolvables } from '@utils/utilities'; /** diff --git a/packages/nodes-base/nodes/Postgres/v2/PostgresV2.node.ts b/packages/nodes-base/nodes/Postgres/v2/PostgresV2.node.ts index a8f5c03965c32..ff18184d5c35d 100644 --- a/packages/nodes-base/nodes/Postgres/v2/PostgresV2.node.ts +++ b/packages/nodes-base/nodes/Postgres/v2/PostgresV2.node.ts @@ -5,8 +5,8 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { router } from './actions/router'; +import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; import { credentialTest, listSearch, loadOptions, resourceMapping } from './methods'; diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/Database.resource.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/Database.resource.ts index 125ebaa1d77ec..36b935293d9f7 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/Database.resource.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/Database.resource.ts @@ -1,5 +1,4 @@ import type { INodeProperties } from 'n8n-workflow'; -import { schemaRLC, tableRLC } from '../common.descriptions'; import * as deleteTable from './deleteTable.operation'; import * as executeQuery from './executeQuery.operation'; @@ -7,6 +6,7 @@ import * as insert from './insert.operation'; import * as select from './select.operation'; import * as update from './update.operation'; import * as upsert from './upsert.operation'; +import { schemaRLC, tableRLC } from '../common.descriptions'; export { deleteTable, executeQuery, insert, select, update, upsert }; diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/deleteTable.operation.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/deleteTable.operation.ts index badede9f5312e..a2bfc9329d30d 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/deleteTable.operation.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/deleteTable.operation.ts @@ -6,6 +6,8 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { PgpDatabase, PostgresNodeOptions, @@ -14,15 +16,12 @@ import type { QueryWithValues, WhereClause, } from '../../helpers/interfaces'; - import { addWhereClauses } from '../../helpers/utils'; - import { combineConditionsCollection, optionsCollection, whereFixedCollection, } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/executeQuery.operation.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/executeQuery.operation.ts index a05c185a240a7..06854bf0188b7 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/executeQuery.operation.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/executeQuery.operation.ts @@ -7,17 +7,16 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; +import { getResolvables, updateDisplayOptions } from '@utils/utilities'; + import type { PgpDatabase, PostgresNodeOptions, QueriesRunner, QueryWithValues, } from '../../helpers/interfaces'; - import { replaceEmptyStringsByNulls } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { getResolvables, updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/insert.operation.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/insert.operation.ts index e76c4f95cbf90..9e0b72f9533f4 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/insert.operation.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/insert.operation.ts @@ -5,6 +5,8 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { PgpDatabase, PostgresNodeOptions, @@ -12,7 +14,6 @@ import type { QueryValues, QueryWithValues, } from '../../helpers/interfaces'; - import { addReturning, checkItemAgainstSchema, @@ -22,9 +23,7 @@ import { convertArraysToPostgresFormat, replaceEmptyStringsByNulls, } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/select.operation.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/select.operation.ts index b0848f2a6b59a..b41f0c98c595b 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/select.operation.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/select.operation.ts @@ -5,6 +5,8 @@ import type { INodeProperties, } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { PgpDatabase, PostgresNodeOptions, @@ -14,16 +16,13 @@ import type { SortRule, WhereClause, } from '../../helpers/interfaces'; - import { addSortRules, addWhereClauses, replaceEmptyStringsByNulls } from '../../helpers/utils'; - import { combineConditionsCollection, optionsCollection, sortFixedCollection, whereFixedCollection, } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/update.operation.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/update.operation.ts index e04b845e2f2b7..e15169b0d24cf 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/update.operation.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/update.operation.ts @@ -6,6 +6,8 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { PgpDatabase, PostgresNodeOptions, @@ -13,7 +15,6 @@ import type { QueryValues, QueryWithValues, } from '../../helpers/interfaces'; - import { addReturning, checkItemAgainstSchema, @@ -24,9 +25,7 @@ import { convertArraysToPostgresFormat, replaceEmptyStringsByNulls, } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/database/upsert.operation.ts b/packages/nodes-base/nodes/Postgres/v2/actions/database/upsert.operation.ts index 5ccc01a9e329e..7a43605d56209 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/database/upsert.operation.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/database/upsert.operation.ts @@ -6,6 +6,8 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; +import { updateDisplayOptions } from '@utils/utilities'; + import type { PgpDatabase, PostgresNodeOptions, @@ -13,7 +15,6 @@ import type { QueryValues, QueryWithValues, } from '../../helpers/interfaces'; - import { addReturning, checkItemAgainstSchema, @@ -23,9 +24,7 @@ import { configureTableSchemaUpdater, convertArraysToPostgresFormat, } from '../../helpers/utils'; - import { optionsCollection } from '../common.descriptions'; -import { updateDisplayOptions } from '@utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/router.ts b/packages/nodes-base/nodes/Postgres/v2/actions/router.ts index f48060ec3b668..9082d9413f58e 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/router.ts @@ -1,12 +1,11 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeExecutionOutput, NodeOperationError } from 'n8n-workflow'; -import { configurePostgres } from '../transport'; -import { configureQueryRunner } from '../helpers/utils'; -import type { PostgresNodeCredentials, PostgresNodeOptions } from '../helpers/interfaces'; -import type { PostgresType } from './node.type'; - import * as database from './database/Database.resource'; +import type { PostgresType } from './node.type'; +import type { PostgresNodeCredentials, PostgresNodeOptions } from '../helpers/interfaces'; +import { configureQueryRunner } from '../helpers/utils'; +import { configurePostgres } from '../transport'; export async function router(this: IExecuteFunctions): Promise { let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Postgres/v2/helpers/utils.ts b/packages/nodes-base/nodes/Postgres/v2/helpers/utils.ts index 5f01e6b6a6690..58f1c8a96fa1f 100644 --- a/packages/nodes-base/nodes/Postgres/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Postgres/v2/helpers/utils.ts @@ -7,7 +7,6 @@ import type { } from 'n8n-workflow'; import { NodeOperationError, jsonParse } from 'n8n-workflow'; -import { generatePairedItemData } from '../../../../utils/utilities'; import type { ColumnInfo, EnumInfo, @@ -19,6 +18,7 @@ import type { SortRule, WhereClause, } from './interfaces'; +import { generatePairedItemData } from '../../../../utils/utilities'; export function wrapData(data: IDataObject | IDataObject[]): INodeExecutionData[] { if (!Array.isArray(data)) { diff --git a/packages/nodes-base/nodes/Postgres/v2/methods/credentialTest.ts b/packages/nodes-base/nodes/Postgres/v2/methods/credentialTest.ts index 59cb83b5da85e..a9adf70a3e9ce 100644 --- a/packages/nodes-base/nodes/Postgres/v2/methods/credentialTest.ts +++ b/packages/nodes-base/nodes/Postgres/v2/methods/credentialTest.ts @@ -4,9 +4,8 @@ import type { INodeCredentialTestResult, } from 'n8n-workflow'; -import { configurePostgres } from '../transport'; - import type { PgpClient, PostgresNodeCredentials } from '../helpers/interfaces'; +import { configurePostgres } from '../transport'; export async function postgresConnectionTest( this: ICredentialTestFunctions, diff --git a/packages/nodes-base/nodes/Postgres/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Postgres/v2/methods/listSearch.ts index f81a66700f0c0..c20319d5ac769 100644 --- a/packages/nodes-base/nodes/Postgres/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Postgres/v2/methods/listSearch.ts @@ -1,7 +1,7 @@ import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; -import { configurePostgres } from '../transport'; import type { PostgresNodeCredentials } from '../helpers/interfaces'; +import { configurePostgres } from '../transport'; export async function schemaSearch(this: ILoadOptionsFunctions): Promise { const credentials = await this.getCredentials('postgres'); diff --git a/packages/nodes-base/nodes/Postgres/v2/methods/loadOptions.ts b/packages/nodes-base/nodes/Postgres/v2/methods/loadOptions.ts index ac4f783541dba..d906c7e0bd099 100644 --- a/packages/nodes-base/nodes/Postgres/v2/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/Postgres/v2/methods/loadOptions.ts @@ -1,8 +1,8 @@ import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; +import type { PostgresNodeCredentials } from '../helpers/interfaces'; import { getTableSchema } from '../helpers/utils'; import { configurePostgres } from '../transport'; -import type { PostgresNodeCredentials } from '../helpers/interfaces'; export async function getColumns(this: ILoadOptionsFunctions): Promise { const credentials = await this.getCredentials('postgres'); diff --git a/packages/nodes-base/nodes/Postgres/v2/methods/resourceMapping.ts b/packages/nodes-base/nodes/Postgres/v2/methods/resourceMapping.ts index dac7dc678dc0d..99f40cb1da54c 100644 --- a/packages/nodes-base/nodes/Postgres/v2/methods/resourceMapping.ts +++ b/packages/nodes-base/nodes/Postgres/v2/methods/resourceMapping.ts @@ -1,7 +1,8 @@ import type { ILoadOptionsFunctions, ResourceMapperFields, FieldType } from 'n8n-workflow'; + +import type { PostgresNodeCredentials } from '../helpers/interfaces'; import { getEnumValues, getEnums, getTableSchema, uniqueColumns } from '../helpers/utils'; import { configurePostgres } from '../transport'; -import type { PostgresNodeCredentials } from '../helpers/interfaces'; const fieldTypeMapping: Partial> = { string: ['text', 'varchar', 'character varying', 'character', 'char'], diff --git a/packages/nodes-base/nodes/Postgres/v2/transport/index.ts b/packages/nodes-base/nodes/Postgres/v2/transport/index.ts index 895c5738abc20..07362be3dca85 100644 --- a/packages/nodes-base/nodes/Postgres/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Postgres/v2/transport/index.ts @@ -1,11 +1,14 @@ -import { createServer, type AddressInfo } from 'node:net'; -import pgPromise from 'pg-promise'; import type { IExecuteFunctions, ICredentialTestFunctions, ILoadOptionsFunctions, ITriggerFunctions, } from 'n8n-workflow'; +import { createServer, type AddressInfo } from 'node:net'; +import pgPromise from 'pg-promise'; + +import { LOCALHOST } from '@utils/constants'; +import { formatPrivateKey } from '@utils/utilities'; import type { ConnectionsData, @@ -13,8 +16,6 @@ import type { PostgresNodeCredentials, PostgresNodeOptions, } from '../helpers/interfaces'; -import { formatPrivateKey } from '@utils/utilities'; -import { LOCALHOST } from '@utils/constants'; const getPostgresConfig = ( credentials: PostgresNodeCredentials, diff --git a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts index 8298e68340b0c..d12b74076ae74 100644 --- a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts +++ b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts @@ -9,15 +9,13 @@ import { NodeConnectionType, } from 'n8n-workflow'; +import { companyOperations } from './CompanyDescription'; import type { Metrics } from './GenericFunctions'; import { profitWellApiRequest, simplifyDailyMetrics, simplifyMontlyMetrics, } from './GenericFunctions'; - -import { companyOperations } from './CompanyDescription'; - import { metricFields, metricOperations } from './MetricDescription'; export class ProfitWell implements INodeType { diff --git a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts index 1393d07ccd610..3217524e86fbe 100644 --- a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts +++ b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -9,7 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { pushbulletApiRequest, pushbulletApiRequestAllItems } from './GenericFunctions'; export class Pushbullet implements INodeType { diff --git a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts index 5a26bfcfa77e2..677fe785e90d6 100644 --- a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts +++ b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts @@ -5,7 +5,6 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import pgPromise from 'pg-promise'; import { pgInsert, pgQueryV2 } from '../Postgres/v1/genericFunctions'; diff --git a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts index fcd71125ce64f..4e4b7d29ba5fd 100644 --- a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts +++ b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts @@ -10,20 +10,16 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { generatePairedItemData } from '../../utils/utilities'; +import { fieldFields, fieldOperations } from './FieldDescription'; +import { fileFields, fileOperations } from './FileDescription'; import { getFieldsObject, quickbaseApiRequest, quickbaseApiRequestAllItems, } from './GenericFunctions'; - -import { fieldFields, fieldOperations } from './FieldDescription'; - -import { fileFields, fileOperations } from './FileDescription'; - import { recordFields, recordOperations } from './RecordDescription'; - import { reportFields, reportOperations } from './ReportDescription'; +import { generatePairedItemData } from '../../utils/utilities'; export class QuickBase implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts index 16ef41b80e2e1..a92b24b8ea43d 100644 --- a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts +++ b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts @@ -1,3 +1,7 @@ +import { capitalCase } from 'change-case'; +import omit from 'lodash/omit'; +import pickBy from 'lodash/pickBy'; +import { NodeApiError } from 'n8n-workflow'; import type { IDataObject, IExecuteFunctions, @@ -9,15 +13,8 @@ import type { IRequestOptions, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; - -import { capitalCase } from 'change-case'; - -import omit from 'lodash/omit'; -import pickBy from 'lodash/pickBy'; import type { CustomField, GeneralAddress, Ref } from './descriptions/Shared.interface'; - import type { DateFieldsUi, Option, QuickBooksOAuth2Credentials, TransactionReport } from './types'; /** @@ -43,9 +40,7 @@ export async function quickBooksApiRequest( const productionUrl = 'https://quickbooks.api.intuit.com'; const sandboxUrl = 'https://sandbox-quickbooks.api.intuit.com'; - const credentials = (await this.getCredentials( - 'quickBooksOAuth2Api', - )) as QuickBooksOAuth2Credentials; + const credentials = await this.getCredentials('quickBooksOAuth2Api'); const options: IRequestOptions = { headers: { @@ -236,9 +231,9 @@ export async function handleBinaryData( const data = await quickBooksApiRequest.call(this, 'GET', endpoint, {}, {}, { encoding: null }); items[i].binary = items[i].binary ?? {}; - items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData(data as Buffer); - items[i].binary![binaryProperty].fileName = fileName; - items[i].binary![binaryProperty].fileExtension = 'pdf'; + items[i].binary[binaryProperty] = await this.helpers.prepareBinaryData(data as Buffer); + items[i].binary[binaryProperty].fileName = fileName; + items[i].binary[binaryProperty].fileExtension = 'pdf'; return items; } @@ -254,9 +249,7 @@ export async function loadResource(this: ILoadOptionsFunctions, resource: string oauthTokenData: { callbackQueryString: { realmId }, }, - } = await this.getCredentials<{ - oauthTokenData: { callbackQueryString: { realmId: string } }; - }>('quickBooksOAuth2Api'); + } = await this.getCredentials('quickBooksOAuth2Api'); const endpoint = `/v3/company/${realmId}/query`; const resourceItems = await quickBooksApiRequestAllItems.call( diff --git a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts index 17e1e01e9d89f..2f73fe28e7e21 100644 --- a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts +++ b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts @@ -1,4 +1,6 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ +import { capitalCase } from 'change-case'; +import isEmpty from 'lodash/isEmpty'; import type { IExecuteFunctions, IDataObject, @@ -9,8 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { capitalCase } from 'change-case'; -import isEmpty from 'lodash/isEmpty'; import { billFields, billOperations, @@ -33,7 +33,6 @@ import { vendorFields, vendorOperations, } from './descriptions'; - import { adjustTransactionDates, getRefAndSyncToken, @@ -46,7 +45,6 @@ import { quickBooksApiRequest, simplifyTransactionReport, } from './GenericFunctions'; - import type { QuickBooksOAuth2Credentials, TransactionFields, TransactionReport } from './types'; export class QuickBooks implements INodeType { @@ -191,9 +189,8 @@ export class QuickBooks implements INodeType { let responseData; const returnData: INodeExecutionData[] = []; - const { oauthTokenData } = (await this.getCredentials( - 'quickBooksOAuth2Api', - )) as QuickBooksOAuth2Credentials; + const { oauthTokenData } = + await this.getCredentials('quickBooksOAuth2Api'); const companyId = oauthTokenData.callbackQueryString.realmId; for (let i = 0; i < items.length; i++) { diff --git a/packages/nodes-base/nodes/QuickBooks/descriptions/Transaction/TransactionDescription.ts b/packages/nodes-base/nodes/QuickBooks/descriptions/Transaction/TransactionDescription.ts index 18c46098cac62..f93132a33d83f 100644 --- a/packages/nodes-base/nodes/QuickBooks/descriptions/Transaction/TransactionDescription.ts +++ b/packages/nodes-base/nodes/QuickBooks/descriptions/Transaction/TransactionDescription.ts @@ -1,7 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; -import { toDisplayName, toOptions } from '../../GenericFunctions'; - import { GROUP_BY_OPTIONS, PAYMENT_METHODS, @@ -10,6 +8,7 @@ import { TRANSACTION_REPORT_COLUMNS, TRANSACTION_TYPES, } from './constants'; +import { toDisplayName, toOptions } from '../../GenericFunctions'; export const transactionOperations: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/QuickChart/test/QuickChart.node.test.ts b/packages/nodes-base/nodes/QuickChart/test/QuickChart.node.test.ts index b46bc920c05f8..1305611046c04 100644 --- a/packages/nodes-base/nodes/QuickChart/test/QuickChart.node.test.ts +++ b/packages/nodes-base/nodes/QuickChart/test/QuickChart.node.test.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-loop-func */ import nock from 'nock'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Test QuickChart Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/RabbitMQ/GenericFunctions.ts b/packages/nodes-base/nodes/RabbitMQ/GenericFunctions.ts index c551e61863b32..cca2cd9e6f235 100644 --- a/packages/nodes-base/nodes/RabbitMQ/GenericFunctions.ts +++ b/packages/nodes-base/nodes/RabbitMQ/GenericFunctions.ts @@ -1,3 +1,4 @@ +import * as amqplib from 'amqplib'; import type { IDataObject, IExecuteFunctions, @@ -5,8 +6,9 @@ import type { ITriggerFunctions, } from 'n8n-workflow'; import { jsonParse, sleep } from 'n8n-workflow'; -import * as amqplib from 'amqplib'; + import { formatPrivateKey } from '@utils/utilities'; + import type { ExchangeType, Options, RabbitMQCredentials, TriggerOptions } from './types'; const credentialKeys = ['hostname', 'port', 'username', 'password', 'vhost'] as const; diff --git a/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts b/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts index c57659b2c7740..3257833cdfa9b 100644 --- a/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts +++ b/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts @@ -13,7 +13,6 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { rabbitDefaultOptions } from './DefaultOptions'; - import { MessageTracker, rabbitmqConnectQueue, parseMessage } from './GenericFunctions'; import type { TriggerOptions } from './types'; diff --git a/packages/nodes-base/nodes/RabbitMQ/test/GenericFunctions.test.ts b/packages/nodes-base/nodes/RabbitMQ/test/GenericFunctions.test.ts index 0532e67ae4e72..62fb7d8f6c78f 100644 --- a/packages/nodes-base/nodes/RabbitMQ/test/GenericFunctions.test.ts +++ b/packages/nodes-base/nodes/RabbitMQ/test/GenericFunctions.test.ts @@ -8,7 +8,6 @@ mockChannel.connection = mockConnection; const connect = jest.fn().mockReturnValue(mockConnection); jest.mock('amqplib', () => ({ connect })); -import type { TriggerOptions } from '../types'; import { parseMessage, rabbitmqConnect, @@ -17,6 +16,7 @@ import { rabbitmqCreateChannel, MessageTracker, } from '../GenericFunctions'; +import type { TriggerOptions } from '../types'; describe('RabbitMQ GenericFunctions', () => { const credentials = { diff --git a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts index 9a14e77854325..8d6a96cd69e95 100644 --- a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts +++ b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts @@ -1,3 +1,5 @@ +import isEmpty from 'lodash/isEmpty'; +import omit from 'lodash/omit'; import type { IExecuteFunctions, IDataObject, @@ -8,11 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; -import omit from 'lodash/omit'; - -import { raindropApiRequest } from './GenericFunctions'; - import { bookmarkFields, bookmarkOperations, @@ -23,6 +20,7 @@ import { userFields, userOperations, } from './descriptions'; +import { raindropApiRequest } from './GenericFunctions'; export class Raindrop implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/ReadBinaryFile/test/ReadBinaryFile.test.ts b/packages/nodes-base/nodes/ReadBinaryFile/test/ReadBinaryFile.test.ts index c94feb97cf425..4f7a8e7846686 100644 --- a/packages/nodes-base/nodes/ReadBinaryFile/test/ReadBinaryFile.test.ts +++ b/packages/nodes-base/nodes/ReadBinaryFile/test/ReadBinaryFile.test.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-loop-func */ import path from 'path'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Test Read Binary File Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts index b81530f62a40d..d3687a65579e9 100644 --- a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts @@ -1,3 +1,4 @@ +import glob from 'fast-glob'; import { NodeConnectionType, type IExecuteFunctions, @@ -6,7 +7,6 @@ import { type INodeTypeDescription, } from 'n8n-workflow'; -import glob from 'fast-glob'; import { generatePairedItemData } from '../../utils/utilities'; export class ReadBinaryFiles implements INodeType { diff --git a/packages/nodes-base/nodes/ReadBinaryFiles/test/ReadBinaryFiles.test.ts b/packages/nodes-base/nodes/ReadBinaryFiles/test/ReadBinaryFiles.test.ts index 76235ae1e2fd1..ae76d88185c25 100644 --- a/packages/nodes-base/nodes/ReadBinaryFiles/test/ReadBinaryFiles.test.ts +++ b/packages/nodes-base/nodes/ReadBinaryFiles/test/ReadBinaryFiles.test.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-loop-func */ import path from 'path'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Test Read Binary Files Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts index c7a1485cb1bc1..fbc6e7753f655 100644 --- a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts +++ b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts @@ -6,6 +6,7 @@ import { type INodeType, type INodeTypeDescription, } from 'n8n-workflow'; + import { extractDataFromPDF } from '@utils/binary'; export class ReadPDF implements INodeType { diff --git a/packages/nodes-base/nodes/Reddit/Reddit.node.ts b/packages/nodes-base/nodes/Reddit/Reddit.node.ts index d04e6406aa1c1..d160daedfa97f 100644 --- a/packages/nodes-base/nodes/Reddit/Reddit.node.ts +++ b/packages/nodes-base/nodes/Reddit/Reddit.node.ts @@ -9,15 +9,10 @@ import type { import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { handleListing, redditApiRequest } from './GenericFunctions'; - import { postCommentFields, postCommentOperations } from './PostCommentDescription'; - import { postFields, postOperations } from './PostDescription'; - import { profileFields, profileOperations } from './ProfileDescription'; - import { subredditFields, subredditOperations } from './SubredditDescription'; - import { userFields, userOperations } from './UserDescription'; export class Reddit implements INodeType { diff --git a/packages/nodes-base/nodes/Redis/Redis.node.ts b/packages/nodes-base/nodes/Redis/Redis.node.ts index 014c28d3d605f..baa0aeceb1875 100644 --- a/packages/nodes-base/nodes/Redis/Redis.node.ts +++ b/packages/nodes-base/nodes/Redis/Redis.node.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IExecuteFunctions, INodeExecutionData, @@ -6,8 +7,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; - +import type { RedisCredential } from './types'; import { setupRedisClient, redisConnectionTest, @@ -15,7 +15,6 @@ import { getValue, setValue, } from './utils'; -import type { RedisCredential } from './types'; export class Redis implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts b/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts index 680d19b026dd8..d39444059aebd 100644 --- a/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts +++ b/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts @@ -6,8 +6,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { redisConnectionTest, setupRedisClient } from './utils'; import type { RedisCredential } from './types'; +import { redisConnectionTest, setupRedisClient } from './utils'; interface Options { jsonParseBody: boolean; diff --git a/packages/nodes-base/nodes/Redis/__tests__/Redis.node.test.ts b/packages/nodes-base/nodes/Redis/__tests__/Redis.node.test.ts index 789aef524248a..c676c27c120e3 100644 --- a/packages/nodes-base/nodes/Redis/__tests__/Redis.node.test.ts +++ b/packages/nodes-base/nodes/Redis/__tests__/Redis.node.test.ts @@ -11,8 +11,8 @@ const createClient = jest.fn().mockReturnValue(mockClient); jest.mock('redis', () => ({ createClient })); import { Redis } from '../Redis.node'; -import { redisConnectionTest, setupRedisClient } from '../utils'; import type { RedisClient } from '../types'; +import { redisConnectionTest, setupRedisClient } from '../utils'; describe('Redis Node', () => { const node = new Redis(); diff --git a/packages/nodes-base/nodes/Redis/__tests__/RedisTrigger.node.test.ts b/packages/nodes-base/nodes/Redis/__tests__/RedisTrigger.node.test.ts index 97227fbe04cee..c2287d675da6f 100644 --- a/packages/nodes-base/nodes/Redis/__tests__/RedisTrigger.node.test.ts +++ b/packages/nodes-base/nodes/Redis/__tests__/RedisTrigger.node.test.ts @@ -1,10 +1,10 @@ -import { returnJsonArray } from 'n8n-core'; import { captor, mock } from 'jest-mock-extended'; +import { returnJsonArray } from 'n8n-core'; import type { ICredentialDataDecryptedObject, ITriggerFunctions } from 'n8n-workflow'; import { RedisTrigger } from '../RedisTrigger.node'; -import { setupRedisClient } from '../utils'; import type { RedisClient } from '../types'; +import { setupRedisClient } from '../utils'; jest.mock('../utils', () => { const mockRedisClient = mock(); diff --git a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts index 7e53e9b0cb27a..4f216945f7f46 100644 --- a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts +++ b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts @@ -1,3 +1,7 @@ +import get from 'lodash/get'; +import set from 'lodash/set'; +import unset from 'lodash/unset'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import type { IExecuteFunctions, IDataObject, @@ -5,11 +9,6 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, deepCopy } from 'n8n-workflow'; - -import get from 'lodash/get'; -import set from 'lodash/set'; -import unset from 'lodash/unset'; interface IRenameKey { currentKey: string; diff --git a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts index 0ad0dd85c3135..b8038d9163026 100644 --- a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts +++ b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts @@ -1,4 +1,5 @@ -import type { Readable } from 'stream'; +import jwt from 'jsonwebtoken'; +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -18,8 +19,8 @@ import { CHAT_TRIGGER_NODE_TYPE, WAIT_NODE_TYPE, } from 'n8n-workflow'; -import set from 'lodash/set'; -import jwt from 'jsonwebtoken'; +import type { Readable } from 'stream'; + import { formatPrivateKey, generatePairedItemData } from '../../utils/utilities'; export class RespondToWebhook implements INodeType { @@ -355,14 +356,12 @@ export class RespondToWebhook implements INodeType { } } else if (respondWith === 'jwt') { try { - const { keyType, secret, algorithm, privateKey } = (await this.getCredentials( - 'jwtAuth', - )) as { + const { keyType, secret, algorithm, privateKey } = await this.getCredentials<{ keyType: 'passphrase' | 'pemKey'; privateKey: string; secret: string; algorithm: jwt.Algorithm; - }; + }>('jwtAuth'); let secretOrPrivateKey; diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts index 3664b16aed3be..b29255d34a1e3 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts @@ -1,4 +1,3 @@ -import { URL } from 'url'; import type { IExecuteFunctions, IDataObject, @@ -7,8 +6,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import Parser from 'rss-parser'; +import { URL } from 'url'; + import { generatePairedItemData } from '../../utils/utilities'; // Utility function diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts index 523860ddd180b..a3f7849e915ea 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, INodeExecutionData, @@ -7,7 +8,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import Parser from 'rss-parser'; -import moment from 'moment-timezone'; interface PollData { lastItemDate?: string; diff --git a/packages/nodes-base/nodes/RssFeedRead/test/RssFeedRead.test.ts b/packages/nodes-base/nodes/RssFeedRead/test/RssFeedRead.test.ts index d942859764588..7e10c21ce8d8a 100644 --- a/packages/nodes-base/nodes/RssFeedRead/test/RssFeedRead.test.ts +++ b/packages/nodes-base/nodes/RssFeedRead/test/RssFeedRead.test.ts @@ -1,7 +1,8 @@ import { mock } from 'jest-mock-extended'; +import { returnJsonArray } from 'n8n-core'; import type { IPollFunctions } from 'n8n-workflow'; import Parser from 'rss-parser'; -import { returnJsonArray } from 'n8n-core'; + import { RssFeedReadTrigger } from '../RssFeedReadTrigger.node'; jest.mock('rss-parser'); diff --git a/packages/nodes-base/nodes/RssFeedRead/test/node/RssFeedRead.test.ts b/packages/nodes-base/nodes/RssFeedRead/test/node/RssFeedRead.test.ts index 7238dcfa0022b..f68c8db965a60 100644 --- a/packages/nodes-base/nodes/RssFeedRead/test/node/RssFeedRead.test.ts +++ b/packages/nodes-base/nodes/RssFeedRead/test/node/RssFeedRead.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { setup, equalityTest, workflowToTests, getWorkflowFilenames } from '@test/nodes/Helpers'; // eslint-disable-next-line n8n-local-rules/no-unneeded-backticks diff --git a/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts b/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts index 631853a8ec459..bd36d74e166fe 100644 --- a/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts +++ b/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; + import { RundeckApi } from './RundeckApi'; export class Rundeck implements INodeType { diff --git a/packages/nodes-base/nodes/S3/GenericFunctions.ts b/packages/nodes-base/nodes/S3/GenericFunctions.ts index a31eb6ddd5427..34fe6242e09c7 100644 --- a/packages/nodes-base/nodes/S3/GenericFunctions.ts +++ b/packages/nodes-base/nodes/S3/GenericFunctions.ts @@ -1,11 +1,6 @@ -import { URL } from 'url'; import type { Request } from 'aws4'; import { sign } from 'aws4'; - import get from 'lodash/get'; - -import { parseString } from 'xml2js'; - import type { IDataObject, IExecuteFunctions, @@ -17,6 +12,8 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { URL } from 'url'; +import { parseString } from 'xml2js'; function queryToString(params: IDataObject) { return Object.keys(params) diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index bfb581447c22a..d7e9d5d75c130 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -1,8 +1,5 @@ -import { createHash } from 'crypto'; import { paramCase, snakeCase } from 'change-case'; - -import { Builder } from 'xml2js'; - +import { createHash } from 'crypto'; import type { IDataObject, IExecuteFunctions, @@ -12,14 +9,12 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import { Builder } from 'xml2js'; +import { s3ApiRequestREST, s3ApiRequestSOAP, s3ApiRequestSOAPAllItems } from './GenericFunctions'; import { bucketFields, bucketOperations } from '../Aws/S3/V1/BucketDescription'; - -import { folderFields, folderOperations } from '../Aws/S3/V1/FolderDescription'; - import { fileFields, fileOperations } from '../Aws/S3/V1/FileDescription'; - -import { s3ApiRequestREST, s3ApiRequestSOAP, s3ApiRequestSOAPAllItems } from './GenericFunctions'; +import { folderFields, folderOperations } from '../Aws/S3/V1/FolderDescription'; export class S3 implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts b/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts index c9cce032f79ca..275f92b6f6fc5 100644 --- a/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts @@ -1,3 +1,5 @@ +import jwt from 'jsonwebtoken'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -10,10 +12,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -import jwt from 'jsonwebtoken'; - function getOptions( this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, method: IHttpRequestMethods, @@ -118,9 +116,9 @@ export async function salesforceApiRequest( } else { // https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5 const credentialsType = 'salesforceOAuth2Api'; - const credentials = (await this.getCredentials(credentialsType)) as { + const credentials = await this.getCredentials<{ oauthTokenData: { instance_url: string }; - }; + }>(credentialsType); const options = getOptions.call( this, method, diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index 5bf2a3ce8e1dd..351c6f27a257c 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -12,54 +12,33 @@ import type { import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { accountFields, accountOperations } from './AccountDescription'; - import type { IAccount } from './AccountInterface'; - import { attachmentFields, attachmentOperations } from './AttachmentDescription'; - import type { IAttachment } from './AttachmentInterface'; - import type { ICampaignMember } from './CampaignMemberInterface'; - import { caseFields, caseOperations } from './CaseDescription'; - import type { ICase, ICaseComment } from './CaseInterface'; - import { contactFields, contactOperations } from './ContactDescription'; - import type { IContact } from './ContactInterface'; - import { customObjectFields, customObjectOperations } from './CustomObjectDescription'; - +import { documentFields, documentOperations } from './DocumentDescription'; import { flowFields, flowOperations } from './FlowDescription'; - import { getQuery, salesforceApiRequest, salesforceApiRequestAllItems, sortOptions, } from './GenericFunctions'; - import { leadFields, leadOperations } from './LeadDescription'; - import type { ILead } from './LeadInterface'; - import type { INote } from './NoteInterface'; - import { opportunityFields, opportunityOperations } from './OpportunityDescription'; - import type { IOpportunity } from './OpportunityInterface'; - import { searchFields, searchOperations } from './SearchDescription'; - import { taskFields, taskOperations } from './TaskDescription'; - import type { ITask } from './TaskInterface'; - import { userFields, userOperations } from './UserDescription'; -import { documentFields, documentOperations } from './DocumentDescription'; - export class Salesforce implements INodeType { description: INodeTypeDescription = { displayName: 'Salesforce', diff --git a/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts b/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts index 257a778ba3452..895c5cbc78dd6 100644 --- a/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts +++ b/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts @@ -1,5 +1,5 @@ +import { DateTime } from 'luxon'; import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; - import type { IDataObject, IPollFunctions, @@ -11,7 +11,6 @@ import type { JsonObject, } from 'n8n-workflow'; -import { DateTime } from 'luxon'; import { getQuery, salesforceApiRequest, diff --git a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts index c0b8d00029ac9..f3f7f406db6d2 100644 --- a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts +++ b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts @@ -8,18 +8,19 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; + +import { activityFields, activityOperations } from './ActivityDescription'; +import type { IActivity } from './ActivityInterface'; +import { companyFields, companyOperations } from './CompanyDescription'; +import type { ICompany } from './CompanyInterface'; +import { dealFields, dealOperations } from './DealDescription'; +import type { IDeal } from './DealInterface'; import { salesmateApiRequest, salesmateApiRequestAllItems, simplifySalesmateData, validateJSON, } from './GenericFunctions'; -import { companyFields, companyOperations } from './CompanyDescription'; -import { activityFields, activityOperations } from './ActivityDescription'; -import type { ICompany } from './CompanyInterface'; -import type { IActivity } from './ActivityInterface'; -import type { IDeal } from './DealInterface'; -import { dealFields, dealOperations } from './DealDescription'; export class Salesmate implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Schedule/GenericFunctions.ts b/packages/nodes-base/nodes/Schedule/GenericFunctions.ts index 42d31bd582652..4a6453985b95e 100644 --- a/packages/nodes-base/nodes/Schedule/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Schedule/GenericFunctions.ts @@ -1,5 +1,6 @@ import moment from 'moment-timezone'; import { type CronExpression, randomInt } from 'n8n-workflow'; + import type { IRecurrenceRule, ScheduleInterval } from './SchedulerInterface'; export function recurrenceCheck( diff --git a/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts b/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts index 904c5f656774f..34b0f462c71e4 100644 --- a/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts +++ b/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts @@ -1,3 +1,5 @@ +import { sendAt } from 'cron'; +import moment from 'moment-timezone'; import type { ITriggerFunctions, INodeType, @@ -5,11 +7,9 @@ import type { ITriggerResponse, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { sendAt } from 'cron'; -import type { IRecurrenceRule, Rule } from './SchedulerInterface'; import { intervalToRecurrence, recurrenceCheck, toCronExpression } from './GenericFunctions'; +import type { IRecurrenceRule, Rule } from './SchedulerInterface'; export class ScheduleTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Schedule/test/GenericFunctions.test.ts b/packages/nodes-base/nodes/Schedule/test/GenericFunctions.test.ts index d6c124cc4c269..4c953b9e40de2 100644 --- a/packages/nodes-base/nodes/Schedule/test/GenericFunctions.test.ts +++ b/packages/nodes-base/nodes/Schedule/test/GenericFunctions.test.ts @@ -1,4 +1,5 @@ import * as n8nWorkflow from 'n8n-workflow'; + import { intervalToRecurrence, recurrenceCheck, toCronExpression } from '../GenericFunctions'; import type { IRecurrenceRule } from '../SchedulerInterface'; diff --git a/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts b/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts index b8ffb713279f7..0318e0b73a448 100644 --- a/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts @@ -9,10 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import type { TDtableMetadataColumns, TDtableViewColumns, TEndpointVariableName } from './types'; - -import { schema } from './Schema'; - import type { ICredential, ICtx, @@ -22,6 +18,8 @@ import type { IRow, IRowObject, } from './Interfaces'; +import { schema } from './Schema'; +import type { TDtableMetadataColumns, TDtableViewColumns, TEndpointVariableName } from './types'; const userBaseUri = (uri?: string) => { if (uri === undefined) { diff --git a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts index 0b62dae6915d6..6e86475c66060 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts @@ -20,13 +20,10 @@ import { split, updateAble, } from './GenericFunctions'; - +import type { ICtx, IRow, IRowObject } from './Interfaces'; import { rowFields, rowOperations } from './RowDescription'; - import type { TColumnsUiValues, TColumnValue } from './types'; -import type { ICtx, IRow, IRowObject } from './Interfaces'; - export class SeaTable implements INodeType { description: INodeTypeDescription = { displayName: 'SeaTable', diff --git a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts index 9995ee01ae9a7..709367a6f507f 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IPollFunctions, type ILoadOptionsFunctions, @@ -8,9 +9,7 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { getColumns, rowFormatColumns, seaTableApiRequest, simplify } from './GenericFunctions'; - import type { ICtx, IRow, IRowResponse } from './Interfaces'; export class SeaTableTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/SeaTable/types.ts b/packages/nodes-base/nodes/SeaTable/types.ts index 876342b368cc3..a84e1ab208b06 100644 --- a/packages/nodes-base/nodes/SeaTable/types.ts +++ b/packages/nodes-base/nodes/SeaTable/types.ts @@ -10,6 +10,7 @@ export type TSeaTableServerEdition = 'enterprise edition'; // ---------------------------------- import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; + import type { IDtableMetadataColumn, IDtableMetadataTable, TDtableViewColumn } from './Interfaces'; export type TInheritColumnTypeTime = 'ctime' | 'mtime'; diff --git a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts index a1e533f6c9b21..520489b524c3d 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,22 +8,15 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { companyFields, companyOperations } from './descriptions/CompanyDescription'; - import { industryFields, industryOperations } from './descriptions/IndustryDescription'; - import { inviteFields, inviteOperations } from './descriptions/InviteDescription'; - -import { portfolioFields, portfolioOperations } from './descriptions/PortfolioDescription'; - import { portfolioCompanyFields, portfolioCompanyOperations, } from './descriptions/PortfolioCompanyDescription'; - +import { portfolioFields, portfolioOperations } from './descriptions/PortfolioDescription'; import { reportFields, reportOperations } from './descriptions/ReportDescription'; - import { scorecardApiRequest, simplify } from './GenericFunctions'; export class SecurityScorecard implements INodeType { diff --git a/packages/nodes-base/nodes/Segment/Segment.node.ts b/packages/nodes-base/nodes/Segment/Segment.node.ts index bfef2985a5d89..5699e22535179 100644 --- a/packages/nodes-base/nodes/Segment/Segment.node.ts +++ b/packages/nodes-base/nodes/Segment/Segment.node.ts @@ -6,18 +6,13 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; - import { v4 as uuid } from 'uuid'; -import { segmentApiRequest } from './GenericFunctions'; +import { segmentApiRequest } from './GenericFunctions'; import { groupFields, groupOperations } from './GroupDescription'; - import { identifyFields, identifyOperations } from './IdentifyDescription'; - import type { IIdentify } from './IdentifyInterface'; - import { trackFields, trackOperations } from './TrackDescription'; - import type { IGroup, ITrack } from './TrackInterface'; export class Segment implements INodeType { diff --git a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts index c803521206756..560f1f36b3428 100644 --- a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts +++ b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { NodeConnectionType, type IDataObject, @@ -10,16 +11,12 @@ import { type INodeTypeDescription, } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { listFields, listOperations } from './ListDescription'; - import { contactFields, contactOperations } from './ContactDescription'; - +import { sendGridApiRequest, sendGridApiRequestAllItems } from './GenericFunctions'; +import { listFields, listOperations } from './ListDescription'; import type { SendMailBody } from './MailDescription'; import { mailFields, mailOperations } from './MailDescription'; -import { sendGridApiRequest, sendGridApiRequestAllItems } from './GenericFunctions'; - export class SendGrid implements INodeType { description: INodeTypeDescription = { displayName: 'SendGrid', diff --git a/packages/nodes-base/nodes/Sendy/Sendy.node.ts b/packages/nodes-base/nodes/Sendy/Sendy.node.ts index 9bf36b2e82e4d..6ca6b76bd3260 100644 --- a/packages/nodes-base/nodes/Sendy/Sendy.node.ts +++ b/packages/nodes-base/nodes/Sendy/Sendy.node.ts @@ -8,10 +8,8 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { sendyApiRequest } from './GenericFunctions'; - import { campaignFields, campaignOperations } from './CampaignDescription'; - +import { sendyApiRequest } from './GenericFunctions'; import { subscriberFields, subscriberOperations } from './SubscriberDescription'; export class Sendy implements INodeType { diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index ad83f771b60cb..edd53b83ea04a 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -10,21 +10,14 @@ import { } from 'n8n-workflow'; import { eventFields, eventOperations } from './EventDescription'; - +import { sentryApiRequestAllItems, sentryIoApiRequest } from './GenericFunctions'; +import type { ICommit, IPatchSet, IRef } from './Interface'; import { issueFields, issueOperations } from './IssueDescription'; - import { organizationFields, organizationOperations } from './OrganizationDescription'; - import { projectFields, projectOperations } from './ProjectDescription'; - import { releaseFields, releaseOperations } from './ReleaseDescription'; - import { teamFields, teamOperations } from './TeamDescription'; -import { sentryApiRequestAllItems, sentryIoApiRequest } from './GenericFunctions'; - -import type { ICommit, IPatchSet, IRef } from './Interface'; - export class SentryIo implements INodeType { description: INodeTypeDescription = { displayName: 'Sentry.io', diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index 50d78a31f552b..15ef43649759e 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -9,35 +9,25 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { - mapEndpoint, - serviceNowApiRequest, - serviceNowDownloadAttachment, - serviceNowRequestAllItems, - sortData, -} from './GenericFunctions'; - import { attachmentFields, attachmentOperations } from './AttachmentDescription'; - import { businessServiceFields, businessServiceOperations } from './BusinessServiceDescription'; - import { configurationItemsFields, configurationItemsOperations, } from './ConfigurationItemsDescription'; - import { departmentFields, departmentOperations } from './DepartmentDescription'; - import { dictionaryFields, dictionaryOperations } from './DictionaryDescription'; - +import { + mapEndpoint, + serviceNowApiRequest, + serviceNowDownloadAttachment, + serviceNowRequestAllItems, + sortData, +} from './GenericFunctions'; import { incidentFields, incidentOperations } from './IncidentDescription'; - import { tableRecordFields, tableRecordOperations } from './TableRecordDescription'; - import { userFields, userOperations } from './UserDescription'; - import { userGroupFields, userGroupOperations } from './UserGroupDescription'; - import { userRoleFields, userRoleOperations } from './UserRoleDescription'; export class ServiceNow implements INodeType { diff --git a/packages/nodes-base/nodes/Set/test/v2/utils.test.ts b/packages/nodes-base/nodes/Set/test/v2/utils.test.ts index fc84d08129607..a982a6006b4e2 100644 --- a/packages/nodes-base/nodes/Set/test/v2/utils.test.ts +++ b/packages/nodes-base/nodes/Set/test/v2/utils.test.ts @@ -1,8 +1,9 @@ -import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; -import { constructExecutionMetaData } from 'n8n-core'; import get from 'lodash/get'; -import { composeReturnItem, parseJsonParameter, validateEntry } from '../../v2/helpers/utils'; +import { constructExecutionMetaData } from 'n8n-core'; +import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow'; + import type { SetNodeOptions } from '../../v2/helpers/interfaces'; +import { composeReturnItem, parseJsonParameter, validateEntry } from '../../v2/helpers/utils'; export const node: INode = { id: '11', diff --git a/packages/nodes-base/nodes/Set/v1/SetV1.node.ts b/packages/nodes-base/nodes/Set/v1/SetV1.node.ts index 55e92a533726e..649218799fb71 100644 --- a/packages/nodes-base/nodes/Set/v1/SetV1.node.ts +++ b/packages/nodes-base/nodes/Set/v1/SetV1.node.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IExecuteFunctions, INodeExecutionData, @@ -8,8 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, deepCopy } from 'n8n-workflow'; -import set from 'lodash/set'; - const versionDescription: INodeTypeDescription = { displayName: 'Set', name: 'set', diff --git a/packages/nodes-base/nodes/Set/v2/SetV2.node.ts b/packages/nodes-base/nodes/Set/v2/SetV2.node.ts index b1dd055590859..ac4083b3550d8 100644 --- a/packages/nodes-base/nodes/Set/v2/SetV2.node.ts +++ b/packages/nodes-base/nodes/Set/v2/SetV2.node.ts @@ -10,9 +10,8 @@ import { NodeConnectionType } from 'n8n-workflow'; import type { IncludeMods, SetField, SetNodeOptions } from './helpers/interfaces'; import { INCLUDE } from './helpers/interfaces'; - -import * as raw from './raw.mode'; import * as manual from './manual.mode'; +import * as raw from './raw.mode'; type Mode = 'manual' | 'raw'; diff --git a/packages/nodes-base/nodes/Set/v2/helpers/utils.ts b/packages/nodes-base/nodes/Set/v2/helpers/utils.ts index d6754914ced38..6ec6dd647b766 100644 --- a/packages/nodes-base/nodes/Set/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Set/v2/helpers/utils.ts @@ -1,11 +1,6 @@ -import type { - FieldType, - IDataObject, - IExecuteFunctions, - INode, - INodeExecutionData, - ISupplyDataFunctions, -} from 'n8n-workflow'; +import get from 'lodash/get'; +import set from 'lodash/set'; +import unset from 'lodash/unset'; import { ApplicationError, NodeOperationError, @@ -14,14 +9,18 @@ import { jsonParse, validateFieldType, } from 'n8n-workflow'; +import type { + FieldType, + IDataObject, + IExecuteFunctions, + INode, + INodeExecutionData, + ISupplyDataFunctions, +} from 'n8n-workflow'; -import get from 'lodash/get'; -import set from 'lodash/set'; -import unset from 'lodash/unset'; - -import { getResolvables, sanitizeDataPathKey } from '../../../../utils/utilities'; import type { SetNodeOptions } from './interfaces'; import { INCLUDE } from './interfaces'; +import { getResolvables, sanitizeDataPathKey } from '../../../../utils/utilities'; const configureFieldHelper = (dotNotation?: boolean) => { if (dotNotation !== false) { diff --git a/packages/nodes-base/nodes/Set/v2/manual.mode.ts b/packages/nodes-base/nodes/Set/v2/manual.mode.ts index 0865e2c4ee0d1..5ee7454e65990 100644 --- a/packages/nodes-base/nodes/Set/v2/manual.mode.ts +++ b/packages/nodes-base/nodes/Set/v2/manual.mode.ts @@ -10,14 +10,14 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../utils/utilities'; +import type { SetField, SetNodeOptions } from './helpers/interfaces'; import { parseJsonParameter, validateEntry, composeReturnItem, resolveRawData, } from './helpers/utils'; -import type { SetField, SetNodeOptions } from './helpers/interfaces'; +import { updateDisplayOptions } from '../../../utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Set/v2/raw.mode.ts b/packages/nodes-base/nodes/Set/v2/raw.mode.ts index b24a5e2dd5f2d..bd00fa4c73e4e 100644 --- a/packages/nodes-base/nodes/Set/v2/raw.mode.ts +++ b/packages/nodes-base/nodes/Set/v2/raw.mode.ts @@ -7,9 +7,9 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { updateDisplayOptions } from '../../../utils/utilities'; -import { parseJsonParameter, composeReturnItem, resolveRawData } from './helpers/utils'; import type { SetNodeOptions } from './helpers/interfaces'; +import { parseJsonParameter, composeReturnItem, resolveRawData } from './helpers/utils'; +import { updateDisplayOptions } from '../../../utils/utilities'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Shopify/GenericFunctions.ts b/packages/nodes-base/nodes/Shopify/GenericFunctions.ts index ff515edfb119b..1993bbba807fc 100644 --- a/packages/nodes-base/nodes/Shopify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Shopify/GenericFunctions.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IDataObject, IExecuteFunctions, @@ -8,8 +9,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; - export async function shopifyApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Shopify/Shopify.node.ts b/packages/nodes-base/nodes/Shopify/Shopify.node.ts index f2c70184e61d2..830dc051c2241 100644 --- a/packages/nodes-base/nodes/Shopify/Shopify.node.ts +++ b/packages/nodes-base/nodes/Shopify/Shopify.node.ts @@ -10,13 +10,9 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { keysToSnakeCase, shopifyApiRequest, shopifyApiRequestAllItems } from './GenericFunctions'; - import { orderFields, orderOperations } from './OrderDescription'; - -import { productFields, productOperations } from './ProductDescription'; - import type { IAddress, IDiscountCode, ILineItem, IOrder } from './OrderInterface'; - +import { productFields, productOperations } from './ProductDescription'; import type { IProduct } from './ProductInterface'; export class Shopify implements INodeType { diff --git a/packages/nodes-base/nodes/Simulate/Simulate.node.ts b/packages/nodes-base/nodes/Simulate/Simulate.node.ts index a80924551ce1d..3dc2b6015cee5 100644 --- a/packages/nodes-base/nodes/Simulate/Simulate.node.ts +++ b/packages/nodes-base/nodes/Simulate/Simulate.node.ts @@ -7,13 +7,13 @@ import type { IDataObject, } from 'n8n-workflow'; -import { loadOptions } from './methods'; import { executionDurationProperty, iconSelector, jsonOutputProperty, subtitleProperty, } from './descriptions'; +import { loadOptions } from './methods'; export class Simulate implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts b/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts index d793434ee1d46..766c86417a3f9 100644 --- a/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts +++ b/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; + import { executionDurationProperty, iconSelector, diff --git a/packages/nodes-base/nodes/Slack/Slack.node.ts b/packages/nodes-base/nodes/Slack/Slack.node.ts index 6906b263958d6..fd33d2a9cc0a9 100644 --- a/packages/nodes-base/nodes/Slack/Slack.node.ts +++ b/packages/nodes-base/nodes/Slack/Slack.node.ts @@ -2,7 +2,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow' import { VersionedNodeType } from 'n8n-workflow'; import { SlackV1 } from './V1/SlackV1.node'; - import { SlackV2 } from './V2/SlackV2.node'; export class Slack extends VersionedNodeType { diff --git a/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts b/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts index 9dbe79d8d4477..c5efc880fdcd3 100644 --- a/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts +++ b/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts @@ -13,8 +13,8 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { slackApiRequestAllItems } from './V2/GenericFunctions'; import { downloadFile, getChannelInfo, getUserInfo } from './SlackTriggerHelpers'; +import { slackApiRequestAllItems } from './V2/GenericFunctions'; export class SlackTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Slack/SlackTriggerHelpers.ts b/packages/nodes-base/nodes/Slack/SlackTriggerHelpers.ts index a7f565c3f39d3..f5281dd29d440 100644 --- a/packages/nodes-base/nodes/Slack/SlackTriggerHelpers.ts +++ b/packages/nodes-base/nodes/Slack/SlackTriggerHelpers.ts @@ -1,5 +1,6 @@ import type { IHttpRequestOptions, IWebhookFunctions } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { slackApiRequest } from './V2/GenericFunctions'; export async function getUserInfo(this: IWebhookFunctions, userId: string): Promise { diff --git a/packages/nodes-base/nodes/Slack/V1/GenericFunctions.ts b/packages/nodes-base/nodes/Slack/V1/GenericFunctions.ts index c31607dc0ce74..42f618eddf60f 100644 --- a/packages/nodes-base/nodes/Slack/V1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Slack/V1/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -9,8 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; - export async function slackApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts index 585bde58e4596..60dfcf79d2c17 100644 --- a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts +++ b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -11,19 +12,18 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; +import { oldVersionNotice } from '@utils/descriptions'; + import { channelFields, channelOperations } from './ChannelDescription'; -import { messageFields, messageOperations } from './MessageDescription'; -import { starFields, starOperations } from './StarDescription'; import { fileFields, fileOperations } from './FileDescription'; +import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions'; +import { messageFields, messageOperations } from './MessageDescription'; +import type { IAttachment } from './MessageInterface'; import { reactionFields, reactionOperations } from './ReactionDescription'; -import { userGroupFields, userGroupOperations } from './UserGroupDescription'; +import { starFields, starOperations } from './StarDescription'; import { userFields, userOperations } from './UserDescription'; +import { userGroupFields, userGroupOperations } from './UserGroupDescription'; import { userProfileFields, userProfileOperations } from './UserProfileDescription'; -import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions'; -import type { IAttachment } from './MessageInterface'; - -import { oldVersionNotice } from '@utils/descriptions'; interface Attachment { fields: { diff --git a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts index 195ae91313158..524a36d7b5820 100644 --- a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts +++ b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts @@ -1,5 +1,4 @@ -import type { Readable } from 'stream'; - +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -14,7 +13,6 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; - import { BINARY_ENCODING, NodeConnectionType, @@ -22,9 +20,17 @@ import { SEND_AND_WAIT_OPERATION, WAIT_INDEFINITELY, } from 'n8n-workflow'; +import type { Readable } from 'stream'; -import moment from 'moment-timezone'; import { channelFields, channelOperations } from './ChannelDescription'; +import { fileFields, fileOperations } from './FileDescription'; +import { + slackApiRequest, + slackApiRequestAllItems, + getMessageContent, + getTarget, + createSendAndWaitMessageBody, +} from './GenericFunctions'; import { channelRLC, messageFields, @@ -32,18 +38,10 @@ import { sendToSelector, userRLC, } from './MessageDescription'; -import { starFields, starOperations } from './StarDescription'; -import { fileFields, fileOperations } from './FileDescription'; import { reactionFields, reactionOperations } from './ReactionDescription'; -import { userGroupFields, userGroupOperations } from './UserGroupDescription'; +import { starFields, starOperations } from './StarDescription'; import { userFields, userOperations } from './UserDescription'; -import { - slackApiRequest, - slackApiRequestAllItems, - getMessageContent, - getTarget, - createSendAndWaitMessageBody, -} from './GenericFunctions'; +import { userGroupFields, userGroupOperations } from './UserGroupDescription'; import { getSendAndWaitProperties, sendAndWaitWebhook } from '../../../utils/sendAndWait/utils'; export class SlackV2 implements INodeType { diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/channel/archive.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/channel/archive.test.ts index e8fb19dc5fb60..f3eefc4bfa114 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/channel/archive.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/channel/archive.test.ts @@ -1,5 +1,6 @@ -import nock from 'nock'; import type { IHttpRequestMethods } from 'n8n-workflow'; +import nock from 'nock'; + import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers'; const API_RESPONSE = { diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/channel/create.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/channel/create.test.ts index a89302131c233..81f23e284fbad 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/channel/create.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/channel/create.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/channel/get.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/channel/get.test.ts index 62fd9acd8f1de..9e53394c3368e 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/channel/get.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/channel/get.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/channel/getAll.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/channel/getAll.test.ts index fd8312d2507b7..4b816693baaf6 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/channel/getAll.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/channel/getAll.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/channel/history.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/channel/history.test.ts index fad0e7ad9939c..99878cb69162f 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/channel/history.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/channel/history.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = [ { diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/file/upload.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/file/upload.test.ts index 85f45344603fe..154b137bfc121 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/file/upload.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/file/upload.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { files: { test: 'OK' } }; diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/message/delete.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/message/delete.test.ts index 347b704b7cc92..c18f17ba54acc 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/message/delete.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/message/delete.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/message/getPermalink.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/message/getPermalink.test.ts index 16e6ba74d383a..78735d0fc626b 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/message/getPermalink.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/message/getPermalink.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/message/post.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/message/post.test.ts index cf818cdc23a1c..2cfff4b6d0a94 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/message/post.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/message/post.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/message/search.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/message/search.test.ts index 369b51901e9ca..03179ebede51f 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/message/search.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/message/search.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/message/update.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/message/update.test.ts index 246dfeafd779b..acf00fbd95384 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/message/update.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/message/update.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { ok: true, diff --git a/packages/nodes-base/nodes/Slack/test/v2/node/user/updateProfile.test.ts b/packages/nodes-base/nodes/Slack/test/v2/node/user/updateProfile.test.ts index 8e0365a062af0..62577de3b99c9 100644 --- a/packages/nodes-base/nodes/Slack/test/v2/node/user/updateProfile.test.ts +++ b/packages/nodes-base/nodes/Slack/test/v2/node/user/updateProfile.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { INodeTypes, WorkflowTestData } from 'n8n-workflow'; +import nock from 'nock'; + import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers'; -import * as genericFunctions from '../../../../V2/GenericFunctions'; + import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow'; +import * as genericFunctions from '../../../../V2/GenericFunctions'; const API_RESPONSE = { profile: { test: 'OK' } }; diff --git a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts index 83406e1b518a8..475d27fff0b03 100644 --- a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts +++ b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts @@ -6,12 +6,12 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; - import snowflake from 'snowflake-sdk'; -import { connect, destroy, execute } from './GenericFunctions'; import { getResolvables } from '@utils/utilities'; +import { connect, destroy, execute } from './GenericFunctions'; + export class Snowflake implements INodeType { description: INodeTypeDescription = { displayName: 'Snowflake', diff --git a/packages/nodes-base/nodes/Splunk/test/v2/node/alert.test.ts b/packages/nodes-base/nodes/Splunk/test/v2/node/alert.test.ts index 5857e14cd4964..1fc0b92831de2 100644 --- a/packages/nodes-base/nodes/Splunk/test/v2/node/alert.test.ts +++ b/packages/nodes-base/nodes/Splunk/test/v2/node/alert.test.ts @@ -1,5 +1,6 @@ import { mock } from 'jest-mock-extended'; import type { IExecuteFunctions } from 'n8n-workflow'; + import * as alert from '../../../v2/actions/alert'; import * as transport from '../../../v2/transport'; diff --git a/packages/nodes-base/nodes/Splunk/test/v2/node/report.test.ts b/packages/nodes-base/nodes/Splunk/test/v2/node/report.test.ts index 118ca8dd60189..d63056ba897e1 100644 --- a/packages/nodes-base/nodes/Splunk/test/v2/node/report.test.ts +++ b/packages/nodes-base/nodes/Splunk/test/v2/node/report.test.ts @@ -1,8 +1,9 @@ import { mock } from 'jest-mock-extended'; import type { IExecuteFunctions } from 'n8n-workflow'; + +import { SPLUNK } from '../../../v1/types'; import * as report from '../../../v2/actions/report'; import * as transport from '../../../v2/transport'; -import { SPLUNK } from '../../../v1/types'; jest.mock('../../../v2/transport', () => ({ splunkApiJsonRequest: jest.fn(), diff --git a/packages/nodes-base/nodes/Splunk/test/v2/node/search.test.ts b/packages/nodes-base/nodes/Splunk/test/v2/node/search.test.ts index d8e02ec86b9dd..3cc4a40cd6cb0 100644 --- a/packages/nodes-base/nodes/Splunk/test/v2/node/search.test.ts +++ b/packages/nodes-base/nodes/Splunk/test/v2/node/search.test.ts @@ -1,5 +1,6 @@ import { mock } from 'jest-mock-extended'; import type { IExecuteFunctions } from 'n8n-workflow'; + import * as search from '../../../v2/actions/search'; import * as transport from '../../../v2/transport'; diff --git a/packages/nodes-base/nodes/Splunk/test/v2/node/user.test.ts b/packages/nodes-base/nodes/Splunk/test/v2/node/user.test.ts index c33a38dc56b1a..b4e930a608f0f 100644 --- a/packages/nodes-base/nodes/Splunk/test/v2/node/user.test.ts +++ b/packages/nodes-base/nodes/Splunk/test/v2/node/user.test.ts @@ -1,8 +1,9 @@ import { mock } from 'jest-mock-extended'; import type { IExecuteFunctions } from 'n8n-workflow'; + +import { SPLUNK } from '../../../v1/types'; import * as user from '../../../v2/actions/user'; import * as transport from '../../../v2/transport'; -import { SPLUNK } from '../../../v1/types'; jest.mock('../../../v2/transport', () => ({ splunkApiJsonRequest: jest.fn(), diff --git a/packages/nodes-base/nodes/Splunk/test/v2/utils.test.ts b/packages/nodes-base/nodes/Splunk/test/v2/utils.test.ts index 425c52daabf5e..2fdaafdd99ef1 100644 --- a/packages/nodes-base/nodes/Splunk/test/v2/utils.test.ts +++ b/packages/nodes-base/nodes/Splunk/test/v2/utils.test.ts @@ -1,5 +1,7 @@ import { mock } from 'jest-mock-extended'; import type { IDataObject, IExecuteFunctions } from 'n8n-workflow'; + +import { SPLUNK } from '../../v1/types'; import { formatEntry, extractErrorDescription, @@ -9,7 +11,6 @@ import { setReturnAllOrLimit, parseXml, } from '../../v2/helpers/utils'; -import { SPLUNK } from '../../v1/types'; describe('Splunk, formatEntry', () => { test('should format the entry correctly when doNotFormatContent is false', () => { diff --git a/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts b/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts index c6594e1403306..a7ca5f9abe924 100644 --- a/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts @@ -7,7 +7,6 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError, sleep } from 'n8n-workflow'; - import { parseString } from 'xml2js'; import { diff --git a/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts b/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts index b6d793fc63dc4..d9e790809ae77 100644 --- a/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts +++ b/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IExecuteFunctions, IDataObject, @@ -9,19 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; -import { oldVersionNotice } from '../../../utils/descriptions'; -import { - formatFeed, - formatResults, - formatSearch, - getId, - populate, - setCount, - splunkApiRequest, - toUnixEpoch, -} from './GenericFunctions'; - import { firedAlertOperations, searchConfigurationFields, @@ -33,8 +21,18 @@ import { userFields, userOperations, } from './descriptions'; - +import { + formatFeed, + formatResults, + formatSearch, + getId, + populate, + setCount, + splunkApiRequest, + toUnixEpoch, +} from './GenericFunctions'; import type { SplunkFeedResponse } from './types'; +import { oldVersionNotice } from '../../../utils/descriptions'; const versionDescription: INodeTypeDescription = { displayName: 'Splunk', diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/alert/getMetrics.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/alert/getMetrics.operation.ts index aef07773c37ff..bb22daf00630b 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/alert/getMetrics.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/alert/getMetrics.operation.ts @@ -1,4 +1,5 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { splunkApiJsonRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/alert/getReport.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/alert/getReport.operation.ts index b76a3506d5376..d7a4390f7684b 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/alert/getReport.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/alert/getReport.operation.ts @@ -1,4 +1,5 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { splunkApiJsonRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/alert/index.ts b/packages/nodes-base/nodes/Splunk/v2/actions/alert/index.ts index 8d3a1f334255d..74458ea544b39 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/alert/index.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/alert/index.ts @@ -1,7 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import * as getReport from './getReport.operation'; import * as getMetrics from './getMetrics.operation'; +import * as getReport from './getReport.operation'; export { getReport, getMetrics }; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/report/create.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/report/create.operation.ts index 1f3b59e273921..bf7bb847988e3 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/report/create.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/report/create.operation.ts @@ -1,8 +1,9 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiJsonRequest, splunkApiRequest } from '../../transport'; import { searchJobRLC } from '../../helpers/descriptions'; import { formatFeed } from '../../helpers/utils'; +import { splunkApiJsonRequest, splunkApiRequest } from '../../transport'; const properties: INodeProperties[] = [ searchJobRLC, diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/report/deleteReport.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/report/deleteReport.operation.ts index 41aad443d1ed2..86ca26ae11232 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/report/deleteReport.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/report/deleteReport.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiRequest } from '../../transport'; import { reportRLC } from '../../helpers/descriptions'; +import { splunkApiRequest } from '../../transport'; const properties: INodeProperties[] = [reportRLC]; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/report/get.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/report/get.operation.ts index 32972c08f343a..ba71140e801ab 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/report/get.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/report/get.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiJsonRequest } from '../../transport'; import { reportRLC } from '../../helpers/descriptions'; +import { splunkApiJsonRequest } from '../../transport'; const properties: INodeProperties[] = [reportRLC]; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/report/getAll.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/report/getAll.operation.ts index c667d9ad9386e..0c3a86837f714 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/report/getAll.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/report/getAll.operation.ts @@ -1,4 +1,5 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { populate, setReturnAllOrLimit } from '../../helpers/utils'; import { splunkApiJsonRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/router.ts b/packages/nodes-base/nodes/Splunk/v2/actions/router.ts index 3b0d3965e81f5..36e06ccc00fd4 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/router.ts @@ -1,14 +1,13 @@ +import set from 'lodash/set'; import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; import * as alert from './alert'; +import type { SplunkType } from './node.type'; import * as report from './report'; import * as search from './search'; import * as user from './user'; -import type { SplunkType } from './node.type'; - export async function router(this: IExecuteFunctions): Promise { const items = this.getInputData(); let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/search/create.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/search/create.operation.ts index b617b162aacb1..5191e106ee437 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/search/create.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/search/create.operation.ts @@ -1,4 +1,5 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { populate, toUnixEpoch } from '../../helpers/utils'; import { splunkApiJsonRequest, splunkApiRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/search/deleteJob.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/search/deleteJob.operation.ts index 1bb463a5151e6..7f00a4e55b322 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/search/deleteJob.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/search/deleteJob.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiRequest } from '../../transport'; import { searchJobRLC } from '../../helpers/descriptions'; +import { splunkApiRequest } from '../../transport'; const properties: INodeProperties[] = [searchJobRLC]; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/search/get.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/search/get.operation.ts index 1df3721de168e..0175d8a7b7e0c 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/search/get.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/search/get.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiJsonRequest } from '../../transport'; import { searchJobRLC } from '../../helpers/descriptions'; +import { splunkApiJsonRequest } from '../../transport'; const properties: INodeProperties[] = [searchJobRLC]; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/search/getAll.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/search/getAll.operation.ts index 5ea3bb36857db..3cb1a7243b2a9 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/search/getAll.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/search/getAll.operation.ts @@ -1,4 +1,5 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; import { populate, setReturnAllOrLimit } from '../../helpers/utils'; import { splunkApiJsonRequest } from '../../transport'; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/search/getResult.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/search/getResult.operation.ts index 246cce383e2fa..f79ab5aebdcc5 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/search/getResult.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/search/getResult.operation.ts @@ -1,8 +1,9 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiJsonRequest } from '../../transport'; -import { populate, setReturnAllOrLimit } from '../../helpers/utils'; import { searchJobRLC } from '../../helpers/descriptions'; +import { populate, setReturnAllOrLimit } from '../../helpers/utils'; +import { splunkApiJsonRequest } from '../../transport'; const properties: INodeProperties[] = [ searchJobRLC, diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/user/create.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/user/create.operation.ts index 950391e611053..3d232c4d4f8dd 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/user/create.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/user/create.operation.ts @@ -1,8 +1,9 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; +import type { SplunkFeedResponse } from '../../helpers/interfaces'; import { formatFeed, populate } from '../../helpers/utils'; import { splunkApiRequest } from '../../transport'; -import type { SplunkFeedResponse } from '../../helpers/interfaces'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/user/deleteUser.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/user/deleteUser.operation.ts index e3d9a05605446..bf68be0366ebd 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/user/deleteUser.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/user/deleteUser.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiRequest } from '../../transport'; import { userRLC } from '../../helpers/descriptions'; +import { splunkApiRequest } from '../../transport'; const properties: INodeProperties[] = [userRLC]; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/user/get.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/user/get.operation.ts index 46ffad1e9d28e..d0430fd9340fa 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/user/get.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/user/get.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiJsonRequest } from '../../transport'; import { userRLC } from '../../helpers/descriptions'; +import { splunkApiJsonRequest } from '../../transport'; const properties: INodeProperties[] = [userRLC]; diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/user/getAll.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/user/getAll.operation.ts index 822a40f2698e0..57ebe3fe7fa96 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/user/getAll.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/user/getAll.operation.ts @@ -1,7 +1,8 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; -import { splunkApiJsonRequest } from '../../transport'; import { setReturnAllOrLimit } from '../../helpers/utils'; +import { splunkApiJsonRequest } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/user/update.operation.ts b/packages/nodes-base/nodes/Splunk/v2/actions/user/update.operation.ts index e680a8214e1c0..8ecf0ce6199b8 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/user/update.operation.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/user/update.operation.ts @@ -1,8 +1,9 @@ import type { INodeProperties, IExecuteFunctions, IDataObject } from 'n8n-workflow'; + import { updateDisplayOptions } from '../../../../../utils/utilities'; +import { userRLC } from '../../helpers/descriptions'; import { formatFeed, populate } from '../../helpers/utils'; import { splunkApiRequest } from '../../transport'; -import { userRLC } from '../../helpers/descriptions'; const properties: INodeProperties[] = [ userRLC, diff --git a/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts b/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts index 7515ba509f0be..3512c387765af 100644 --- a/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts @@ -1,9 +1,8 @@ import type { IExecuteFunctions, IDataObject } from 'n8n-workflow'; - import { parseString } from 'xml2js'; -import { SPLUNK } from '../../v1/types'; import type { SplunkError, SplunkFeedResponse } from './interfaces'; +import { SPLUNK } from '../../v1/types'; function compactEntryContent(splunkObject: any): any { if (typeof splunkObject !== 'object') { diff --git a/packages/nodes-base/nodes/Splunk/v2/methods/listSearch.ts b/packages/nodes-base/nodes/Splunk/v2/methods/listSearch.ts index 087163cb7279e..758e54c5c99b6 100644 --- a/packages/nodes-base/nodes/Splunk/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/Splunk/v2/methods/listSearch.ts @@ -1,4 +1,5 @@ import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; + import { splunkApiJsonRequest } from '../transport'; export async function searchReports( diff --git a/packages/nodes-base/nodes/Splunk/v2/transport/index.ts b/packages/nodes-base/nodes/Splunk/v2/transport/index.ts index ee6fd8ea4f86a..665121eeb5ea3 100644 --- a/packages/nodes-base/nodes/Splunk/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Splunk/v2/transport/index.ts @@ -19,9 +19,8 @@ export async function splunkApiRequest( body: IDataObject = {}, qs: IDataObject = {}, ): Promise { - const { baseUrl, allowUnauthorizedCerts } = (await this.getCredentials( - 'splunkApi', - )) as SplunkCredentials; + const { baseUrl, allowUnauthorizedCerts } = + await this.getCredentials('splunkApi'); const options: IRequestOptions = { headers: { @@ -95,9 +94,8 @@ export async function splunkApiJsonRequest( body: IDataObject = {}, qs: IDataObject = {}, ) { - const { baseUrl, allowUnauthorizedCerts } = (await this.getCredentials( - 'splunkApi', - )) as SplunkCredentials; + const { baseUrl, allowUnauthorizedCerts } = + await this.getCredentials('splunkApi'); qs.output_mode = 'json'; diff --git a/packages/nodes-base/nodes/Spontit/Spontit.node.ts b/packages/nodes-base/nodes/Spontit/Spontit.node.ts index 9e20cd87cd81a..cb2ad23db5f76 100644 --- a/packages/nodes-base/nodes/Spontit/Spontit.node.ts +++ b/packages/nodes-base/nodes/Spontit/Spontit.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,9 +8,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { spontitApiRequest } from './GenericFunctions'; - import { pushFields, pushOperations } from './PushDescription'; export class Spontit implements INodeType { diff --git a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts index 6b61655ee30fd..7210a70e17af8 100644 --- a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -8,8 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import get from 'lodash/get'; - /** * Make an API request to Spotify * diff --git a/packages/nodes-base/nodes/Spotify/Spotify.node.ts b/packages/nodes-base/nodes/Spotify/Spotify.node.ts index b951831c3bbbe..b9c792a564a87 100644 --- a/packages/nodes-base/nodes/Spotify/Spotify.node.ts +++ b/packages/nodes-base/nodes/Spotify/Spotify.node.ts @@ -8,10 +8,10 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { spotifyApiRequest, spotifyApiRequestAllItems } from './GenericFunctions'; - import { isoCountryCodes } from '@utils/ISOCountryCodes'; +import { spotifyApiRequest, spotifyApiRequestAllItems } from './GenericFunctions'; + export class Spotify implements INodeType { description: INodeTypeDescription = { displayName: 'Spotify', diff --git a/packages/nodes-base/nodes/SpreadsheetFile/test/SpreadsheetFile.test.ts b/packages/nodes-base/nodes/SpreadsheetFile/test/SpreadsheetFile.test.ts index 24ad71061217a..e599515315259 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/test/SpreadsheetFile.test.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/test/SpreadsheetFile.test.ts @@ -1,9 +1,10 @@ -import path from 'path'; import { readFileSync } from 'fs'; import type { IWorkflowBase } from 'n8n-workflow'; +import path from 'path'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Execute Spreadsheet File Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts index 99c7cc80bb606..e575c756b1c84 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts @@ -7,7 +7,6 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import type { JSON2SheetOpts, ParsingOptions, @@ -22,6 +21,9 @@ import { write as xlsxWrite, } from 'xlsx'; +import { oldVersionNotice } from '@utils/descriptions'; +import { flattenObject, generatePairedItemData } from '@utils/utilities'; + import { operationProperty, binaryProperty, @@ -29,8 +31,6 @@ import { fromFileOptions, toFileOptions, } from '../description'; -import { flattenObject, generatePairedItemData } from '@utils/utilities'; -import { oldVersionNotice } from '@utils/descriptions'; export class SpreadsheetFileV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts index 4694c3efa957c..20c885ab0660b 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts @@ -7,9 +7,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { operationProperty } from '../description'; import * as fromFile from './fromFile.operation'; import * as toFile from './toFile.operation'; +import { operationProperty } from '../description'; export class SpreadsheetFileV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts b/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts index 719faeb478480..7ec6ae2b68055 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts @@ -1,10 +1,9 @@ +import { parse as createCSVParser } from 'csv-parse'; import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; - import type { Sheet2JSONOpts, WorkBook, ParsingOptions } from 'xlsx'; import { read as xlsxRead, readFile as xlsxReadFile, utils as xlsxUtils } from 'xlsx'; -import { parse as createCSVParser } from 'csv-parse'; import { binaryProperty, fromFileOptions } from '../description'; export const description: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts b/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts index 61f8f8509ef39..d89d1e9c233b2 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts @@ -1,9 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { toFileOptions, toFileProperties } from '../description'; -import { generatePairedItemData } from '@utils/utilities'; import type { JsonToSpreadsheetBinaryFormat, JsonToSpreadsheetBinaryOptions } from '@utils/binary'; import { convertJsonToSpreadsheetBinary } from '@utils/binary'; +import { generatePairedItemData } from '@utils/utilities'; + +import { toFileOptions, toFileProperties } from '../description'; export const description: INodeProperties[] = [...toFileProperties, toFileOptions]; diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index 322e53bd75b12..7c856f967e747 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -1,5 +1,4 @@ import { writeFile } from 'fs/promises'; -import type { Readable } from 'stream'; import type { ICredentialTestFunctions, ICredentialsDecrypted, @@ -11,11 +10,11 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - -import { file as tmpFile } from 'tmp-promise'; - import type { Config } from 'node-ssh'; import { NodeSSH } from 'node-ssh'; +import type { Readable } from 'stream'; +import { file as tmpFile } from 'tmp-promise'; + import { formatPrivateKey } from '@utils/utilities'; async function resolveHomeDir( diff --git a/packages/nodes-base/nodes/Stackby/Stackby.node.ts b/packages/nodes-base/nodes/Stackby/Stackby.node.ts index 72c9ef4a180b2..f9b54e2a87252 100644 --- a/packages/nodes-base/nodes/Stackby/Stackby.node.ts +++ b/packages/nodes-base/nodes/Stackby/Stackby.node.ts @@ -7,9 +7,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { generatePairedItemData } from '../../utils/utilities'; import type { IRecord } from './GenericFunction'; import { apiRequest, apiRequestAllItems } from './GenericFunction'; +import { generatePairedItemData } from '../../utils/utilities'; export class Stackby implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/StopAndError/test/node/StopAndError.test.ts b/packages/nodes-base/nodes/StopAndError/test/node/StopAndError.test.ts index 4cc003fa7f3be..32066af72cf9e 100644 --- a/packages/nodes-base/nodes/StopAndError/test/node/StopAndError.test.ts +++ b/packages/nodes-base/nodes/StopAndError/test/node/StopAndError.test.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-loop-func */ import { NodeConnectionType, type IDataObject } from 'n8n-workflow'; -import type { WorkflowTestData } from '@test/nodes/types'; + import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; +import type { WorkflowTestData } from '@test/nodes/types'; describe('Execute Stop and Error Node', () => { const tests: WorkflowTestData[] = [ diff --git a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts index c921e6a26d320..488a333bb87d5 100644 --- a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts +++ b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts @@ -10,9 +10,7 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { storyblokApiRequest, storyblokApiRequestAllItems } from './GenericFunctions'; - import { storyContentFields, storyContentOperations } from './StoryContentDescription'; - import { storyManagementFields, storyManagementOperations } from './StoryManagementDescription'; export class Storyblok implements INodeType { diff --git a/packages/nodes-base/nodes/Strapi/Strapi.node.ts b/packages/nodes-base/nodes/Strapi/Strapi.node.ts index c3ff781b6f642..5980e16dfce38 100644 --- a/packages/nodes-base/nodes/Strapi/Strapi.node.ts +++ b/packages/nodes-base/nodes/Strapi/Strapi.node.ts @@ -11,6 +11,7 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import { entryFields, entryOperations } from './EntryDescription'; import { getToken, removeTrailingSlash, @@ -19,8 +20,6 @@ import { validateJSON, } from './GenericFunctions'; -import { entryFields, entryOperations } from './EntryDescription'; - export class Strapi implements INodeType { description: INodeTypeDescription = { displayName: 'Strapi', diff --git a/packages/nodes-base/nodes/Strava/Strava.node.ts b/packages/nodes-base/nodes/Strava/Strava.node.ts index 48f01c78f5b10..e613945cedd32 100644 --- a/packages/nodes-base/nodes/Strava/Strava.node.ts +++ b/packages/nodes-base/nodes/Strava/Strava.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,10 +8,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { stravaApiRequest, stravaApiRequestAllItems } from './GenericFunctions'; - import { activityFields, activityOperations } from './ActivityDescription'; +import { stravaApiRequest, stravaApiRequestAllItems } from './GenericFunctions'; export class Strava implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Stripe/Stripe.node.ts b/packages/nodes-base/nodes/Stripe/Stripe.node.ts index 2c8b3042a1c5b..61435fada53d4 100644 --- a/packages/nodes-base/nodes/Stripe/Stripe.node.ts +++ b/packages/nodes-base/nodes/Stripe/Stripe.node.ts @@ -1,3 +1,4 @@ +import isEmpty from 'lodash/isEmpty'; import type { IExecuteFunctions, IDataObject, @@ -9,17 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; - -import { - adjustChargeFields, - adjustCustomerFields, - adjustMetadata, - handleListing, - loadResource, - stripeApiRequest, -} from './helpers'; - import { balanceOperations, chargeFields, @@ -35,6 +25,14 @@ import { tokenFields, tokenOperations, } from './descriptions'; +import { + adjustChargeFields, + adjustCustomerFields, + adjustMetadata, + handleListing, + loadResource, + stripeApiRequest, +} from './helpers'; export class Stripe implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Supabase/Supabase.node.ts b/packages/nodes-base/nodes/Supabase/Supabase.node.ts index 06b9d03337e44..14d1f5abdd123 100644 --- a/packages/nodes-base/nodes/Supabase/Supabase.node.ts +++ b/packages/nodes-base/nodes/Supabase/Supabase.node.ts @@ -21,7 +21,6 @@ import { supabaseApiRequest, validateCredentials, } from './GenericFunctions'; - import { rowFields, rowOperations } from './RowDescription'; export type FieldsUiValues = Array<{ diff --git a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts index 264b7eb314fe3..6f3fcf2f91810 100644 --- a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts +++ b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts @@ -13,7 +13,6 @@ import type { import { deepCopy, jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { idsExist, surveyMonkeyApiRequest, surveyMonkeyRequestAllItems } from './GenericFunctions'; - import type { IAnswer, IChoice, IOther, IQuestion, IRow } from './Interfaces'; export class SurveyMonkeyTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts index ccc634597bcd8..6cfe7586011fe 100644 --- a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts +++ b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -10,11 +11,12 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { ApplicationError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; + +import { capitalize } from '@utils/utilities'; + import { ENABLE_LESS_STRICT_TYPE_VALIDATION } from '../../../utils/constants'; import { looseTypeValidationProperty } from '../../../utils/descriptions'; import { getTypeValidationParameter, getTypeValidationStrictness } from '../../If/V2/utils'; -import { capitalize } from '@utils/utilities'; const configuredOutputs = (parameters: INodeParameters) => { const mode = parameters.mode as string; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/SyncroMspV1.node.ts b/packages/nodes-base/nodes/SyncroMSP/v1/SyncroMspV1.node.ts index 18f6568d04bdd..a8bf3b59af69b 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/SyncroMspV1.node.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/SyncroMspV1.node.ts @@ -9,9 +9,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; +import { router } from './actions/router'; import { versionDescription } from './actions/versionDescription'; import { loadOptions } from './methods'; -import { router } from './actions/router'; import { validateCredentials } from './transport'; export class SyncroMspV1 implements INodeType { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/description.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/description.ts index 69a0dc8448eab..25a1dcae3c5cd 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/description.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/description.ts @@ -1,6 +1,5 @@ -import type { ContactProperties } from '../../Interfaces'; - import { addressFixedCollection } from '../../../methods/sharedFields'; +import type { ContactProperties } from '../../Interfaces'; export const contactCreateDescription: ContactProperties = [ { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/index.ts index 37a8c233e9f5c..8d292447298d8 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/create/index.ts @@ -1,4 +1,4 @@ -import { createContact as execute } from './execute'; import { contactCreateDescription as description } from './description'; +import { createContact as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/del/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/del/index.ts index 59582e0e225d4..168905dbcbf93 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/del/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/del/index.ts @@ -1,4 +1,4 @@ -import { deleteContact as execute } from './execute'; import { contactDeleteDescription as description } from './description'; +import { deleteContact as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/get/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/get/index.ts index e5e9388e5f0c3..ad369cda9b744 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/get/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/get/index.ts @@ -1,4 +1,4 @@ -import { getContact as execute } from './execute'; import { contactGetDescription as description } from './description'; +import { getContact as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/getAll/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/getAll/index.ts index d6471c173d6d3..5c1817412f685 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/getAll/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { contactGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/index.ts index 92652e7bace61..cf82ea13904ef 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/index.ts @@ -1,9 +1,10 @@ import type { INodeProperties } from 'n8n-workflow'; -import * as getAll from './getAll'; + import * as create from './create'; +import * as del from './del'; import * as get from './get'; +import * as getAll from './getAll'; import * as update from './update'; -import * as del from './del'; export { getAll, create, del as delete, update, get }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/description.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/description.ts index ae805a1a8cdbd..133c2a6327de3 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/description.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/description.ts @@ -1,6 +1,5 @@ -import type { ContactProperties } from '../../Interfaces'; - import { addressFixedCollection } from '../../../methods/sharedFields'; +import type { ContactProperties } from '../../Interfaces'; export const contactUpdateDescription: ContactProperties = [ { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/index.ts index 55a3a16158eb5..748a0d7780aca 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/index.ts @@ -1,4 +1,4 @@ -import { updateContact as execute } from './execute'; import { contactUpdateDescription as description } from './description'; +import { updateContact as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/description.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/description.ts index a7353e5fe981b..641b6f0daebbd 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/description.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/description.ts @@ -1,6 +1,5 @@ -import type { CustomerProperties } from '../../Interfaces'; - import { addressFixedCollection } from '../../../methods/sharedFields'; +import type { CustomerProperties } from '../../Interfaces'; export const customerCreateDescription: CustomerProperties = [ { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/index.ts index 2d14aaa37a167..58490575c327f 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/create/index.ts @@ -1,4 +1,4 @@ -import { addCustomer as execute } from './execute'; import { customerCreateDescription as description } from './description'; +import { addCustomer as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/del/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/del/index.ts index b2a8983763931..41e70e438c312 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/del/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/del/index.ts @@ -1,4 +1,4 @@ -import { deleteCustomer as execute } from './execute'; import { customerDeleteDescription as description } from './description'; +import { deleteCustomer as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/get/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/get/index.ts index bbe397550b476..e4e98c28290db 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/get/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/get/index.ts @@ -1,4 +1,4 @@ -import { getCustomer as execute } from './execute'; import { customerGetDescription as description } from './description'; +import { getCustomer as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/getAll/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/getAll/index.ts index 974c0543b3a26..f1ef5c86964d2 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/getAll/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { customerGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/index.ts index be3c8fd202e96..461649d8848f4 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/index.ts @@ -1,9 +1,10 @@ import type { INodeProperties } from 'n8n-workflow'; -import * as getAll from './getAll'; + import * as create from './create'; import * as del from './del'; -import * as update from './update'; import * as get from './get'; +import * as getAll from './getAll'; +import * as update from './update'; export { getAll, create, del as delete, update, get }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/description.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/description.ts index 380aa0e9dd317..e97f0b0c47ec4 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/description.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/description.ts @@ -1,6 +1,5 @@ -import type { CustomerProperties } from '../../Interfaces'; - import { addressFixedCollection } from '../../../methods/sharedFields'; +import type { CustomerProperties } from '../../Interfaces'; export const customerUpdateDescription: CustomerProperties = [ { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/index.ts index 145cbcc32bca6..506191d3a1f35 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/customer/update/index.ts @@ -1,4 +1,4 @@ -import { updateCustomer as execute } from './execute'; import { customerUpdateDescription as description } from './description'; +import { updateCustomer as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/create/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/create/index.ts index 6b44825e55448..35c2f00e85a73 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/create/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/create/index.ts @@ -1,4 +1,4 @@ -import { addAlert as execute } from './execute'; import { rmmCreateDescription as description } from './description'; +import { addAlert as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/del/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/del/index.ts index cfedcddc5959a..5e3e5f5c77d68 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/del/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/del/index.ts @@ -1,4 +1,4 @@ -import { deleteAlert as execute } from './execute'; import { rmmDeleteDescription as description } from './description'; +import { deleteAlert as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/get/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/get/index.ts index df6bf2174ced8..6f870e9ed5832 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/get/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/get/index.ts @@ -1,4 +1,4 @@ -import { getAlert as execute } from './execute'; import { rmmGetDescription as description } from './description'; +import { getAlert as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/getAll/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/getAll/index.ts index ad77601d55018..1e08b228251d3 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/getAll/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { rmmGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/index.ts index 5eaeaf3ec30fa..ea16363f51cce 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/index.ts @@ -1,8 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; -import * as get from './get'; -import * as getAll from './getAll'; + import * as create from './create'; import * as del from './del'; +import * as get from './get'; +import * as getAll from './getAll'; import * as mute from './mute'; export { getAll, get, mute, del as delete, create }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/mute/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/mute/index.ts index d39e22fffbeea..7c42ee4df2c83 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/mute/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/rmm/mute/index.ts @@ -1,4 +1,4 @@ -import { muteAlert as execute } from './execute'; import { rmmMuteDescription as description } from './description'; +import { muteAlert as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts index 3b5a5b3210efb..e69c37e532b42 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts @@ -1,12 +1,11 @@ import type { IExecuteFunctions, INodeExecutionData, JsonObject } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import * as customer from './customer'; -import * as ticket from './ticket'; import * as contact from './contact'; -import * as rmm from './rmm'; - +import * as customer from './customer'; import type { SyncroMsp } from './Interfaces'; +import * as rmm from './rmm'; +import * as ticket from './ticket'; export async function router(this: IExecuteFunctions): Promise { const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/index.ts index 0a3b178defcc2..88fc8bd1ec40a 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/index.ts @@ -1,4 +1,4 @@ -import { createTicket as execute } from './execute'; import { ticketCreateDescription as description } from './description'; +import { createTicket as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/del/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/del/index.ts index 8919e1726f526..c67a6d1c3409f 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/del/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/del/index.ts @@ -1,4 +1,4 @@ -import { deleteTicket as execute } from './execute'; import { ticketDeleteDescription as description } from './description'; +import { deleteTicket as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/get/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/get/index.ts index 530eec20d89a2..1a77b36563890 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/get/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/get/index.ts @@ -1,4 +1,4 @@ -import { getTicket as execute } from './execute'; import { ticketGetDescription as description } from './description'; +import { getTicket as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/getAll/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/getAll/index.ts index 93420f25d450e..116e1a925fd4a 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/getAll/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/getAll/index.ts @@ -1,4 +1,4 @@ -import { getAll as execute } from './execute'; import { ticketGetAllDescription as description } from './description'; +import { getAll as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/index.ts index 49dfc1d67c2b4..b9a98c1a0a184 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/index.ts @@ -1,8 +1,9 @@ import type { INodeProperties } from 'n8n-workflow'; -import * as getAll from './getAll'; + import * as create from './create'; -import * as get from './get'; import * as del from './del'; +import * as get from './get'; +import * as getAll from './getAll'; import * as update from './update'; export { getAll, create, get, del as delete, update }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/update/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/update/index.ts index 98547072fee68..5cc0fdf1691f0 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/update/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/update/index.ts @@ -1,4 +1,4 @@ -import { updateTicket as execute } from './execute'; import { ticketUpdateDescription as description } from './description'; +import { updateTicket as execute } from './execute'; export { description, execute }; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts index cfb9711917c60..c112fe9ec55a8 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts @@ -1,10 +1,10 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; -import * as customer from './customer'; -import * as ticket from './ticket'; import * as contact from './contact'; +import * as customer from './customer'; import * as rmm from './rmm'; +import * as ticket from './ticket'; export const versionDescription: INodeTypeDescription = { displayName: 'SyncroMSP', diff --git a/packages/nodes-base/nodes/Taiga/GenericFunctions.ts b/packages/nodes-base/nodes/Taiga/GenericFunctions.ts index d01e36cdd4a21..70c6f70b5588a 100644 --- a/packages/nodes-base/nodes/Taiga/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Taiga/GenericFunctions.ts @@ -1,5 +1,4 @@ import { createHash } from 'crypto'; - import type { ICredentialDataDecryptedObject, IDataObject, diff --git a/packages/nodes-base/nodes/Taiga/Taiga.node.ts b/packages/nodes-base/nodes/Taiga/Taiga.node.ts index d49be81d246f9..d27502ffd3caa 100644 --- a/packages/nodes-base/nodes/Taiga/Taiga.node.ts +++ b/packages/nodes-base/nodes/Taiga/Taiga.node.ts @@ -9,14 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { - getVersionForUpdate, - handleListing, - taigaApiRequest, - throwOnEmptyUpdate, - toOptions, -} from './GenericFunctions'; - import { epicFields, epicOperations, @@ -27,6 +19,13 @@ import { userStoryFields, userStoryOperations, } from './descriptions'; +import { + getVersionForUpdate, + handleListing, + taigaApiRequest, + throwOnEmptyUpdate, + toOptions, +} from './GenericFunctions'; export class Taiga implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts b/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts index 87c3bb8bcb0a8..fd6e9584770b0 100644 --- a/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts +++ b/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts @@ -10,15 +10,12 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { affiliateFields, affiliateOperations } from './AffiliateDescription'; - import { affiliateMetadataFields, affiliateMetadataOperations, } from './AffiliateMetadataDescription'; - -import { programAffiliateFields, programAffiliateOperations } from './ProgramAffiliateDescription'; - import { tapfiliateApiRequest, tapfiliateApiRequestAllItems } from './GenericFunctions'; +import { programAffiliateFields, programAffiliateOperations } from './ProgramAffiliateDescription'; export class Tapfiliate implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Telegram/Telegram.node.ts b/packages/nodes-base/nodes/Telegram/Telegram.node.ts index 5ae67465bf35c..7d1d37b09f3d6 100644 --- a/packages/nodes-base/nodes/Telegram/Telegram.node.ts +++ b/packages/nodes-base/nodes/Telegram/Telegram.node.ts @@ -1,5 +1,3 @@ -import type { Readable } from 'stream'; - import type { IExecuteFunctions, IDataObject, @@ -9,9 +7,10 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import type { Readable } from 'stream'; -import { appendAttributionOption } from '../../utils/descriptions'; import { addAdditionalFields, apiRequest, getPropertyName } from './GenericFunctions'; +import { appendAttributionOption } from '../../utils/descriptions'; export class Telegram implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts b/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts index 69d037c79c617..85752afbeb5f7 100644 --- a/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts +++ b/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts @@ -10,7 +10,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { apiRequest, getImageBySize, getSecretToken } from './GenericFunctions'; - import type { IEvent } from './IEvent'; export class TelegramTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Telegram/tests/Workflow/workflow.test.ts b/packages/nodes-base/nodes/Telegram/tests/Workflow/workflow.test.ts index de17adf1dbd1f..ad6a04dba30ea 100644 --- a/packages/nodes-base/nodes/Telegram/tests/Workflow/workflow.test.ts +++ b/packages/nodes-base/nodes/Telegram/tests/Workflow/workflow.test.ts @@ -1,7 +1,4 @@ import nock from 'nock'; -import { FAKE_CREDENTIALS_DATA } from '../../../../test/nodes/FakeCredentialsMap'; - -import { getWorkflowFilenames, testWorkflows } from '../../../../test/nodes/Helpers'; import { getChatResponse, @@ -16,6 +13,8 @@ import { sendAudioResponse, getMemberResponse, } from './apiResponses'; +import { FAKE_CREDENTIALS_DATA } from '../../../../test/nodes/FakeCredentialsMap'; +import { getWorkflowFilenames, testWorkflows } from '../../../../test/nodes/Helpers'; describe('Telegram', () => { describe('Run Telegram workflow', () => { diff --git a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts index ab9a4cd445830..6c3c99d3630af 100644 --- a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IHookFunctions, @@ -8,7 +9,6 @@ import type { } from 'n8n-workflow'; import { ApplicationError, jsonParse } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { Eq } from './QueryFunctions'; export async function theHiveApiRequest( diff --git a/packages/nodes-base/nodes/TheHive/TheHive.node.ts b/packages/nodes-base/nodes/TheHive/TheHive.node.ts index e4051914230ff..26946664a8d84 100644 --- a/packages/nodes-base/nodes/TheHive/TheHive.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHive.node.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/dot-notation */ +import set from 'lodash/set'; import { NodeConnectionType, type IDataObject, @@ -12,20 +13,11 @@ import { type INodeTypeDescription, } from 'n8n-workflow'; -import set from 'lodash/set'; import { alertFields, alertOperations } from './descriptions/AlertDescription'; - -import { observableFields, observableOperations } from './descriptions/ObservableDescription'; - import { caseFields, caseOperations } from './descriptions/CaseDescription'; - -import { taskFields, taskOperations } from './descriptions/TaskDescription'; - import { logFields, logOperations } from './descriptions/LogDescription'; - -import type { IQueryObject } from './QueryFunctions'; -import { And, Between, ContainsString, Eq, Id, In, Parent } from './QueryFunctions'; - +import { observableFields, observableOperations } from './descriptions/ObservableDescription'; +import { taskFields, taskOperations } from './descriptions/TaskDescription'; import { buildCustomFieldSearch, mapResource, @@ -36,6 +28,8 @@ import { splitTags, theHiveApiRequest, } from './GenericFunctions'; +import type { IQueryObject } from './QueryFunctions'; +import { And, Between, ContainsString, Eq, Id, In, Parent } from './QueryFunctions'; export class TheHive implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts index 7cc84868c1d3e..6c7b2ce8bfa11 100644 --- a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts @@ -7,6 +7,7 @@ import { type IWebhookResponseData, NodeConnectionType, } from 'n8n-workflow'; + import { eventsDescription } from './descriptions/EventsDescription'; export class TheHiveTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/TheHive/interfaces/CaseInterface.ts b/packages/nodes-base/nodes/TheHive/interfaces/CaseInterface.ts index 297ae58f5185f..3eeee45b48138 100644 --- a/packages/nodes-base/nodes/TheHive/interfaces/CaseInterface.ts +++ b/packages/nodes-base/nodes/TheHive/interfaces/CaseInterface.ts @@ -1,4 +1,5 @@ import type { IDataObject } from 'n8n-workflow'; + import type { TLP } from './AlertInterface'; export interface ICase { // Required attributes diff --git a/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts b/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts index 5550fdf201cb8..6df7b41d65fdf 100644 --- a/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts +++ b/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import { type IWebhookFunctions, type IDataObject, @@ -8,8 +9,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import get from 'lodash/get'; - export class TheHiveProjectTrigger implements INodeType { description: INodeTypeDescription = { displayName: 'TheHive 5 Trigger', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/create.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/create.operation.ts index e7a6fc6f9e955..3361088fb22c0 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/create.operation.ts @@ -1,3 +1,5 @@ +import FormData from 'form-data'; +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -5,13 +7,11 @@ import type { INodeProperties, } from 'n8n-workflow'; -import set from 'lodash/set'; +import { updateDisplayOptions, wrapData } from '@utils/utilities'; -import FormData from 'form-data'; -import { theHiveApiRequest } from '../../transport'; -import { fixFieldType, prepareInputItem, splitAndTrim } from '../../helpers/utils'; import { observableTypeOptions } from '../../descriptions'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem, splitAndTrim } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/deleteAlert.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/deleteAlert.operation.ts index 2e914b5f58ea1..bc92d468328aa 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/deleteAlert.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/deleteAlert.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { alertRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [alertRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/executeResponder.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/executeResponder.operation.ts index 4a5712152ab6a..e7282c2366d50 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/executeResponder.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/executeResponder.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { alertRLC, responderOptions } from '../../descriptions'; import { theHiveApiRequest } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [{ ...alertRLC, name: 'id' }, responderOptions]; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/get.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/get.operation.ts index f634780025810..27429580e5979 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/get.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/get.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { alertRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ alertRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/index.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/index.ts index 4e3801bf7cfab..e1550561d8e44 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/index.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/index.ts @@ -1,13 +1,13 @@ import type { INodeProperties } from 'n8n-workflow'; import * as create from './create.operation'; -import * as executeResponder from './executeResponder.operation'; import * as deleteAlert from './deleteAlert.operation'; +import * as executeResponder from './executeResponder.operation'; import * as get from './get.operation'; -import * as search from './search.operation'; -import * as status from './status.operation'; import * as merge from './merge.operation'; import * as promote from './promote.operation'; +import * as search from './search.operation'; +import * as status from './status.operation'; import * as update from './update.operation'; export { create, executeResponder, deleteAlert, get, search, status, merge, promote, update }; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/merge.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/merge.operation.ts index 9be2833a4e47a..1be21dc2258c6 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/merge.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/merge.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { alertRLC, caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC, caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [alertRLC, caseRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/promote.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/promote.operation.ts index d59821e8f68bf..4dfb9bb997fe3 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/promote.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/promote.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { alertRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ alertRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/search.operation.ts index f74cb70b9a705..c5e80c24f89d5 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/search.operation.ts @@ -4,6 +4,9 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { genericFiltersCollection, returnAllAndLimit, @@ -11,7 +14,6 @@ import { sortCollection, } from '../../descriptions'; import { theHiveApiQuery } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [ ...returnAllAndLimit, diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/status.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/status.operation.ts index 5244b79dfb380..0835ff91c196a 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/status.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/status.operation.ts @@ -1,8 +1,10 @@ import type { INodeExecutionData, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { alertRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ alertRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/alert/update.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/alert/update.operation.ts index aaf0b398ed36f..a57cb4f3d769a 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/alert/update.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/alert/update.operation.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -5,11 +6,12 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; -import { theHiveApiRequest } from '../../transport'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Fields', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/addAttachment.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/addAttachment.operation.ts index cae32b71b5e75..c62eeb3b95498 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/addAttachment.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/addAttachment.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { attachmentsUi, caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { attachmentsUi, caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ caseRLC, attachmentsUi, diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/create.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/create.operation.ts index 7e212c3c62329..fe9973ac36734 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/create.operation.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -5,11 +6,10 @@ import type { INodeProperties, } from 'n8n-workflow'; -import set from 'lodash/set'; -import { theHiveApiRequest } from '../../transport'; +import { updateDisplayOptions, wrapData } from '@utils/utilities'; import { fixFieldType, prepareInputItem } from '../../helpers/utils'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiRequest } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteAttachment.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteAttachment.operation.ts index 7491cfcb51884..013092454fd26 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteAttachment.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteAttachment.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ caseRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteCase.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteCase.operation.ts index 077b45ad9b4fc..c46a2558bf384 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteCase.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/deleteCase.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [caseRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/executeResponder.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/executeResponder.operation.ts index 3132266005317..d9d4c1c3d6873 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/executeResponder.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/executeResponder.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { caseRLC, responderOptions } from '../../descriptions'; import { theHiveApiRequest } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [{ ...caseRLC, name: 'id' }, responderOptions]; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/get.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/get.operation.ts index 2c516f05ab377..fbb2e7d196ae0 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/get.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/get.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [caseRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/getAttachment.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/getAttachment.operation.ts index 0a3566f154ffc..55e8696300e00 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/getAttachment.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/getAttachment.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC } from '../../descriptions'; + import { updateDisplayOptions } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ caseRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/getTimeline.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/getTimeline.operation.ts index 3b945856f9b66..6a5584810d202 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/getTimeline.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/getTimeline.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [caseRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/index.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/index.ts index 9a2ec7c3ae12a..9031d8592d760 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/index.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/index.ts @@ -1,15 +1,14 @@ import type { INodeProperties } from 'n8n-workflow'; import * as addAttachment from './addAttachment.operation'; - import * as create from './create.operation'; import * as deleteAttachment from './deleteAttachment.operation'; import * as deleteCase from './deleteCase.operation'; import * as executeResponder from './executeResponder.operation'; import * as get from './get.operation'; import * as getAttachment from './getAttachment.operation'; -import * as search from './search.operation'; import * as getTimeline from './getTimeline.operation'; +import * as search from './search.operation'; import * as update from './update.operation'; export { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/search.operation.ts index c7f44f5e40f6b..dccfda95eefcc 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/search.operation.ts @@ -4,6 +4,9 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { genericFiltersCollection, returnAllAndLimit, @@ -11,7 +14,6 @@ import { sortCollection, } from '../../descriptions'; import { theHiveApiQuery } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [ ...returnAllAndLimit, diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/case/update.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/case/update.operation.ts index 4b3539bc2e7fe..dc25891740309 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/case/update.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/case/update.operation.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -5,11 +6,12 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; -import { theHiveApiRequest } from '../../transport'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Fields', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/comment/add.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/comment/add.operation.ts index 572db219591dc..bc689dd55346d 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/comment/add.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/comment/add.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { alertRLC, caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC, caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { // eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/comment/deleteComment.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/comment/deleteComment.operation.ts index e178729c61e8f..e483422b14bb2 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/comment/deleteComment.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/comment/deleteComment.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { commentRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { commentRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [commentRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/comment/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/comment/search.operation.ts index 86bcd95d6178b..17d6c6ee7805a 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/comment/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/comment/search.operation.ts @@ -5,6 +5,9 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { alertRLC, caseRLC, @@ -13,9 +16,8 @@ import { searchOptions, sortCollection, } from '../../descriptions'; -import { theHiveApiQuery } from '../../transport'; import type { QueryScope } from '../../helpers/interfaces'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiQuery } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/comment/update.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/comment/update.operation.ts index 5379ce91a4e3a..ac3084f704cdd 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/comment/update.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/comment/update.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { commentRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { commentRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ commentRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/addAttachment.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/addAttachment.operation.ts index 31e84c5dc914a..5226f8429572b 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/addAttachment.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/addAttachment.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { attachmentsUi, logRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { attachmentsUi, logRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [logRLC, attachmentsUi]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/create.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/create.operation.ts index 2f73eeaed08cc..859e6ee00a975 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/create.operation.ts @@ -5,11 +5,11 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; +import { updateDisplayOptions, wrapData } from '@utils/utilities'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; import { attachmentsUi, taskRLC } from '../../descriptions'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; const properties: INodeProperties[] = [ taskRLC, diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteAttachment.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteAttachment.operation.ts index 017d7b499923a..8766b0c3da8d1 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteAttachment.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteAttachment.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { logRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { logRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ logRLC, { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteLog.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteLog.operation.ts index 44fb4e5aed139..db1df28fd9288 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteLog.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/deleteLog.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { logRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { logRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [logRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/executeResponder.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/executeResponder.operation.ts index 8eceb9660b08d..76b3f69d7299f 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/executeResponder.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/executeResponder.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { logRLC, responderOptions } from '../../descriptions'; import { theHiveApiRequest } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [{ ...logRLC, name: 'id' }, responderOptions]; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/get.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/get.operation.ts index b110db32aca09..993b916869c57 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/get.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/get.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { logRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { logRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [logRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/log/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/log/search.operation.ts index 9aed5104042bc..8cb49fbfcac11 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/search.operation.ts @@ -4,6 +4,9 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { taskRLC, genericFiltersCollection, @@ -11,9 +14,8 @@ import { sortCollection, searchOptions, } from '../../descriptions'; -import { theHiveApiQuery } from '../../transport'; import type { QueryScope } from '../../helpers/interfaces'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiQuery } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts b/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts index bd6ca8cf59e96..9763d3e46d536 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts @@ -6,9 +6,9 @@ import * as case_ from './case'; import * as comment from './comment'; import * as log from './log'; import * as observable from './observable'; +import * as page from './page'; import * as query from './query'; import * as task from './task'; -import * as page from './page'; export const description: INodeTypeDescription = { displayName: 'TheHive 5', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/create.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/create.operation.ts index ba515bbb78ae9..889422f45beae 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/create.operation.ts @@ -1,3 +1,4 @@ +import FormData from 'form-data'; import { NodeOperationError, type IDataObject, @@ -5,13 +6,13 @@ import { type INodeExecutionData, type INodeProperties, } from 'n8n-workflow'; -import FormData from 'form-data'; -import { theHiveApiRequest } from '../../transport'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; -import { alertRLC, attachmentsUi, caseRLC } from '../../descriptions'; import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { alertRLC, attachmentsUi, caseRLC } from '../../descriptions'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { // eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/deleteObservable.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/deleteObservable.operation.ts index e8e6567b5afde..b1cf8fe0a111c 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/deleteObservable.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/deleteObservable.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { observableRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { observableRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [observableRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeAnalyzer.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeAnalyzer.operation.ts index 54deac7c0b6f7..f547b67a70264 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeAnalyzer.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeAnalyzer.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { observableRLC, observableTypeOptions } from '../../descriptions'; import { theHiveApiRequest } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [ observableRLC, diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeResponder.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeResponder.operation.ts index 5f75bc93676ef..a02da30cdb052 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeResponder.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/executeResponder.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { observableRLC, responderOptions } from '../../descriptions'; import { theHiveApiRequest } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [{ ...observableRLC, name: 'id' }, responderOptions]; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/get.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/get.operation.ts index 7dc729b56d39c..1d540732e371f 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/get.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/get.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { observableRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { observableRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [observableRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/search.operation.ts index e27c8e8331c9b..1975fbb36ba43 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/search.operation.ts @@ -5,6 +5,9 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { alertRLC, caseRLC, @@ -13,9 +16,8 @@ import { searchOptions, sortCollection, } from '../../descriptions'; -import { theHiveApiQuery } from '../../transport'; import type { QueryScope } from '../../helpers/interfaces'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiQuery } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/observable/update.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/observable/update.operation.ts index 9c3ef4243f880..3680aeefc9a2f 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/observable/update.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/observable/update.operation.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -5,11 +6,12 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; -import { theHiveApiRequest } from '../../transport'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Fields', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/page/create.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/page/create.operation.ts index 0c2531d8df060..ab773de4ccf6c 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/page/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/page/create.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { // eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/page/deletePage.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/page/deletePage.operation.ts index 3522404168119..84967ae027059 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/page/deletePage.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/page/deletePage.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC, pageRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC, pageRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Delete From ...', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/page/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/page/search.operation.ts index 796da7b682a90..b060f3cbd0d4a 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/page/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/page/search.operation.ts @@ -4,6 +4,9 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { caseRLC, genericFiltersCollection, @@ -11,9 +14,8 @@ import { sortCollection, searchOptions, } from '../../descriptions'; -import { theHiveApiQuery } from '../../transport'; import type { QueryScope } from '../../helpers/interfaces'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiQuery } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/page/update.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/page/update.operation.ts index 8d41f9ba97be5..f03f17ec4169b 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/page/update.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/page/update.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { caseRLC, pageRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC, pageRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { // eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/query/executeQuery.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/query/executeQuery.operation.ts index f4772aacad363..e96e195cae805 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/query/executeQuery.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/query/executeQuery.operation.ts @@ -6,9 +6,10 @@ import type { } from 'n8n-workflow'; import { NodeOperationError, jsonParse } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Query', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/router.ts b/packages/nodes-base/nodes/TheHiveProject/actions/router.ts index 03fe0a25e4e28..b6ac961627ce3 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/router.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/router.ts @@ -1,11 +1,11 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { TheHiveType } from './node.type'; import * as alert from './alert'; import * as case_ from './case'; import * as comment from './comment'; import * as log from './log'; +import type { TheHiveType } from './node.type'; import * as observable from './observable'; import * as page from './page'; import * as query from './query'; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/task/create.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/task/create.operation.ts index 414549e6904f7..a04c6c24f178c 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/create.operation.ts @@ -5,11 +5,11 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; +import { updateDisplayOptions, wrapData } from '@utils/utilities'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; import { caseRLC } from '../../descriptions'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; const properties: INodeProperties[] = [ caseRLC, diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/task/deleteTask.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/task/deleteTask.operation.ts index 213e4794cfb73..62c44daba25ab 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/deleteTask.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/deleteTask.operation.ts @@ -1,8 +1,10 @@ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { taskRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { taskRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [taskRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/task/executeResponder.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/task/executeResponder.operation.ts index d3f540baadb34..eb767ecbb4a68 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/executeResponder.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/executeResponder.operation.ts @@ -4,9 +4,11 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { responderOptions, taskRLC } from '../../descriptions'; import { theHiveApiRequest } from '../../transport'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; const properties: INodeProperties[] = [{ ...taskRLC, name: 'id' }, responderOptions]; diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/task/get.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/task/get.operation.ts index f88853e614f2e..ec4f0ef35f933 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/get.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/get.operation.ts @@ -4,10 +4,12 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; -import { taskRLC } from '../../descriptions'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { taskRLC } from '../../descriptions'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [taskRLC]; const displayOptions = { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/task/search.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/task/search.operation.ts index 0954fc8856844..ce7d00e8e7e2c 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/search.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/search.operation.ts @@ -4,6 +4,9 @@ import type { INodeExecutionData, INodeProperties, } from 'n8n-workflow'; + +import { updateDisplayOptions, wrapData } from '@utils/utilities'; + import { caseRLC, genericFiltersCollection, @@ -11,9 +14,8 @@ import { searchOptions, sortCollection, } from '../../descriptions'; -import { theHiveApiQuery } from '../../transport'; import type { QueryScope } from '../../helpers/interfaces'; -import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { theHiveApiQuery } from '../../transport'; const properties: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/task/update.operation.ts b/packages/nodes-base/nodes/TheHiveProject/actions/task/update.operation.ts index 80875d27f64aa..c5a26fefcb80f 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/update.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/update.operation.ts @@ -1,3 +1,4 @@ +import set from 'lodash/set'; import type { IDataObject, IExecuteFunctions, @@ -5,11 +6,12 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import set from 'lodash/set'; -import { theHiveApiRequest } from '../../transport'; -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; + import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { fixFieldType, prepareInputItem } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Fields', diff --git a/packages/nodes-base/nodes/TheHiveProject/descriptions/common.description.ts b/packages/nodes-base/nodes/TheHiveProject/descriptions/common.description.ts index 7a7d316a78e39..5653375dd4636 100644 --- a/packages/nodes-base/nodes/TheHiveProject/descriptions/common.description.ts +++ b/packages/nodes-base/nodes/TheHiveProject/descriptions/common.description.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { TLP } from '../helpers/interfaces'; export const returnAllAndLimit: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/TheHiveProject/helpers/utils.ts b/packages/nodes-base/nodes/TheHiveProject/helpers/utils.ts index 8c392043b8f1c..b4768123a2ca7 100644 --- a/packages/nodes-base/nodes/TheHiveProject/helpers/utils.ts +++ b/packages/nodes-base/nodes/TheHiveProject/helpers/utils.ts @@ -1,7 +1,6 @@ -import { ApplicationError, type IDataObject } from 'n8n-workflow'; - import get from 'lodash/get'; import set from 'lodash/set'; +import { ApplicationError, type IDataObject } from 'n8n-workflow'; export function splitAndTrim(str: string | string[]) { if (typeof str === 'string') { diff --git a/packages/nodes-base/nodes/TheHiveProject/methods/listSearch.ts b/packages/nodes-base/nodes/TheHiveProject/methods/listSearch.ts index ce35c11a485c5..cd3ca6d9abcaf 100644 --- a/packages/nodes-base/nodes/TheHiveProject/methods/listSearch.ts +++ b/packages/nodes-base/nodes/TheHiveProject/methods/listSearch.ts @@ -1,4 +1,5 @@ import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow'; + import { theHiveApiRequest } from '../transport'; async function listResource( diff --git a/packages/nodes-base/nodes/TheHiveProject/methods/loadOptions.ts b/packages/nodes-base/nodes/TheHiveProject/methods/loadOptions.ts index 3e7c925257857..7884b78104838 100644 --- a/packages/nodes-base/nodes/TheHiveProject/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/TheHiveProject/methods/loadOptions.ts @@ -1,11 +1,12 @@ import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow'; -import { theHiveApiRequest } from '../transport'; + import { alertCommonFields, caseCommonFields, observableCommonFields, taskCommonFields, } from '../helpers/constants'; +import { theHiveApiRequest } from '../transport'; export async function loadResponders(this: ILoadOptionsFunctions): Promise { let resource = this.getNodeParameter('resource') as string; diff --git a/packages/nodes-base/nodes/TheHiveProject/methods/resourceMapping.ts b/packages/nodes-base/nodes/TheHiveProject/methods/resourceMapping.ts index 84703409ba0fd..59c5636091feb 100644 --- a/packages/nodes-base/nodes/TheHiveProject/methods/resourceMapping.ts +++ b/packages/nodes-base/nodes/TheHiveProject/methods/resourceMapping.ts @@ -6,14 +6,6 @@ import type { ResourceMapperFields, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../transport'; - -import { - alertCommonFields, - caseCommonFields, - observableCommonFields, - taskCommonFields, -} from '../helpers/constants'; import { loadAlertStatus, loadCaseStatus, @@ -21,6 +13,13 @@ import { loadObservableTypes, loadUsers, } from './loadOptions'; +import { + alertCommonFields, + caseCommonFields, + observableCommonFields, + taskCommonFields, +} from '../helpers/constants'; +import { theHiveApiRequest } from '../transport'; async function getCustomFields(this: ILoadOptionsFunctions) { const customFields = (await theHiveApiRequest.call(this, 'POST', '/v1/query', { diff --git a/packages/nodes-base/nodes/TheHiveProject/test/transport.test.ts b/packages/nodes-base/nodes/TheHiveProject/test/transport.test.ts index 442cb2739fe6e..0d370dc67504a 100644 --- a/packages/nodes-base/nodes/TheHiveProject/test/transport.test.ts +++ b/packages/nodes-base/nodes/TheHiveProject/test/transport.test.ts @@ -1,8 +1,8 @@ import type { IExecuteFunctions } from 'n8n-workflow'; import nock from 'nock'; -import * as transport from '../transport/requestApi'; import { theHiveApiQuery } from '../transport/queryHelper'; +import * as transport from '../transport/requestApi'; jest.mock('../transport/requestApi', () => { const originalModule = jest.requireActual('../transport/requestApi'); diff --git a/packages/nodes-base/nodes/TheHiveProject/transport/queryHelper.ts b/packages/nodes-base/nodes/TheHiveProject/transport/queryHelper.ts index 69cd05f3e830a..28d5f67408a0d 100644 --- a/packages/nodes-base/nodes/TheHiveProject/transport/queryHelper.ts +++ b/packages/nodes-base/nodes/TheHiveProject/transport/queryHelper.ts @@ -1,8 +1,8 @@ import type { IExecuteFunctions, IDataObject } from 'n8n-workflow'; +import { theHiveApiRequest } from './requestApi'; import type { QueryScope } from '../helpers/interfaces'; import { constructFilter } from '../helpers/utils'; -import { theHiveApiRequest } from './requestApi'; export async function theHiveApiQuery( this: IExecuteFunctions, diff --git a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts index 15461efdf4ffc..f485f9c8debee 100644 --- a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts +++ b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts @@ -5,8 +5,8 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import pgPromise from 'pg-promise'; + import { pgInsert, pgQueryV2, pgUpdate } from '../Postgres/v1/genericFunctions'; export class TimescaleDb implements INodeType { diff --git a/packages/nodes-base/nodes/Todoist/v1/OperationHandler.ts b/packages/nodes-base/nodes/Todoist/v1/OperationHandler.ts index b4cd4f2ec1b57..d2c48a5d072bd 100644 --- a/packages/nodes-base/nodes/Todoist/v1/OperationHandler.ts +++ b/packages/nodes-base/nodes/Todoist/v1/OperationHandler.ts @@ -1,9 +1,10 @@ import type { IDataObject } from 'n8n-workflow'; import { ApplicationError, jsonParse } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; + +import type { Section, TodoistResponse } from './Service'; import type { Context } from '../GenericFunctions'; import { FormatDueDatetime, todoistApiRequest, todoistSyncRequest } from '../GenericFunctions'; -import type { Section, TodoistResponse } from './Service'; export interface OperationHandler { handleOperation(ctx: Context, itemIndex: number): Promise; diff --git a/packages/nodes-base/nodes/Todoist/v1/Service.ts b/packages/nodes-base/nodes/Todoist/v1/Service.ts index fa5112a5bffd0..348f6a1e7de36 100644 --- a/packages/nodes-base/nodes/Todoist/v1/Service.ts +++ b/packages/nodes-base/nodes/Todoist/v1/Service.ts @@ -1,5 +1,5 @@ import type { IDataObject } from 'n8n-workflow'; -import type { Context } from '../GenericFunctions'; + import { CloseHandler, CreateHandler, @@ -11,6 +11,7 @@ import { SyncHandler, UpdateHandler, } from './OperationHandler'; +import type { Context } from '../GenericFunctions'; export class TodoistService implements Service { async execute( diff --git a/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts b/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts index fccfa3f67985c..40ebfad5a32a0 100644 --- a/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts +++ b/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts @@ -11,10 +11,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { todoistApiRequest } from '../GenericFunctions'; - import type { OperationType } from './Service'; import { TodoistService } from './Service'; +import { todoistApiRequest } from '../GenericFunctions'; // interface IBodyCreateTask { // content?: string; diff --git a/packages/nodes-base/nodes/Todoist/v2/OperationHandler.ts b/packages/nodes-base/nodes/Todoist/v2/OperationHandler.ts index a1b706cac169f..d1b3009a9fb82 100644 --- a/packages/nodes-base/nodes/Todoist/v2/OperationHandler.ts +++ b/packages/nodes-base/nodes/Todoist/v2/OperationHandler.ts @@ -1,9 +1,10 @@ import type { IDataObject } from 'n8n-workflow'; import { ApplicationError, jsonParse } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; + +import type { Section, TodoistResponse } from './Service'; import type { Context } from '../GenericFunctions'; import { FormatDueDatetime, todoistApiRequest, todoistSyncRequest } from '../GenericFunctions'; -import type { Section, TodoistResponse } from './Service'; export interface OperationHandler { handleOperation(ctx: Context, itemIndex: number): Promise; diff --git a/packages/nodes-base/nodes/Todoist/v2/Service.ts b/packages/nodes-base/nodes/Todoist/v2/Service.ts index b9fdb75ec3363..cd6fb5f1b9e33 100644 --- a/packages/nodes-base/nodes/Todoist/v2/Service.ts +++ b/packages/nodes-base/nodes/Todoist/v2/Service.ts @@ -1,5 +1,5 @@ import type { IDataObject } from 'n8n-workflow'; -import type { Context } from '../GenericFunctions'; + import { CloseHandler, CreateHandler, @@ -11,6 +11,7 @@ import { SyncHandler, UpdateHandler, } from './OperationHandler'; +import type { Context } from '../GenericFunctions'; export class TodoistService implements Service { async execute( diff --git a/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts b/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts index 585b205e0b094..57812697a0a8d 100644 --- a/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts +++ b/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts @@ -11,10 +11,9 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { todoistApiRequest } from '../GenericFunctions'; - import type { OperationType, TodoistProjectType } from './Service'; import { TodoistService } from './Service'; +import { todoistApiRequest } from '../GenericFunctions'; // interface IBodyCreateTask { // content?: string; diff --git a/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts b/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts index bfa368c1c487f..dbaf861ad0b2a 100644 --- a/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts +++ b/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts @@ -1,3 +1,5 @@ +import { DateTime } from 'luxon'; +import moment from 'moment-timezone'; import type { IPollFunctions, IDataObject, @@ -8,8 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { DateTime } from 'luxon'; import { togglApiRequest } from './GenericFunctions'; export class TogglTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Totp/Totp.node.ts b/packages/nodes-base/nodes/Totp/Totp.node.ts index 60196b9b67546..191e4486b4abe 100644 --- a/packages/nodes-base/nodes/Totp/Totp.node.ts +++ b/packages/nodes-base/nodes/Totp/Totp.node.ts @@ -4,9 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; - import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; - import OTPAuth from 'otpauth'; export class Totp implements INodeType { diff --git a/packages/nodes-base/nodes/Totp/test/Totp.node.test.ts b/packages/nodes-base/nodes/Totp/test/Totp.node.test.ts index f454daeba325d..f3ada2fa363f3 100644 --- a/packages/nodes-base/nodes/Totp/test/Totp.node.test.ts +++ b/packages/nodes-base/nodes/Totp/test/Totp.node.test.ts @@ -1,5 +1,5 @@ -import * as Helpers from '@test/nodes/Helpers'; import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; +import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; jest.mock('otpauth', () => { diff --git a/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts b/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts index 711146f74b79f..36791d57f7991 100644 --- a/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts +++ b/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts @@ -1,7 +1,6 @@ import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; import set from 'lodash/set'; - import { NodeOperationError, type IDataObject, @@ -14,8 +13,9 @@ import { type NodeExecutionHint, NodeExecutionOutput, } from 'n8n-workflow'; -import { prepareFieldsArray } from '../utils/utils'; + import { addBinariesToItem } from './utils'; +import { prepareFieldsArray } from '../utils/utils'; export class Aggregate implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts b/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts index e2e3fa4f58d3e..38c225d3c75b4 100644 --- a/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts +++ b/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts @@ -10,9 +10,11 @@ import { type INodeTypeDescription, NodeConnectionType, } from 'n8n-workflow'; -import { sortByCode } from './utils'; + import { shuffleArray } from '@utils/utilities'; +import { sortByCode } from './utils'; + export class Sort implements INodeType { description: INodeTypeDescription = { displayName: 'Sort', diff --git a/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts b/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts index 5c2a9e3a687b9..57b77527e6e4d 100644 --- a/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts +++ b/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts @@ -15,6 +15,7 @@ import type { INodeTypeDescription, NodeExecutionHint, } from 'n8n-workflow'; + import { prepareFieldsArray } from '../utils/utils'; export class SplitOut implements INodeType { diff --git a/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts b/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts index 12d0e06f22dcb..83ded6d7af5e7 100644 --- a/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts +++ b/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts @@ -6,7 +6,7 @@ import { type INodeType, type INodeTypeDescription, } from 'n8n-workflow'; -import { generatePairedItemData } from '../../../utils/utilities'; + import { type Aggregations, NUMERICAL_AGGREGATIONS, @@ -16,6 +16,7 @@ import { fieldValueGetter, splitData, } from './utils'; +import { generatePairedItemData } from '../../../utils/utilities'; export class Summarize implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts index b089998eb812c..b4421dbf54f75 100644 --- a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import type { IDataObject, IExecuteFunctions, @@ -9,8 +10,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import get from 'lodash/get'; - export async function travisciApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts index fbc109dc8650b..6c6274839bd6f 100644 --- a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts +++ b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts @@ -8,7 +8,6 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { buildFields, buildOperations } from './BuildDescription'; - import { travisciApiRequest, travisciApiRequestAllItems } from './GenericFunctions'; export class TravisCi implements INodeType { diff --git a/packages/nodes-base/nodes/Trello/Trello.node.ts b/packages/nodes-base/nodes/Trello/Trello.node.ts index ac599663d7b2c..0554a99939b5f 100644 --- a/packages/nodes-base/nodes/Trello/Trello.node.ts +++ b/packages/nodes-base/nodes/Trello/Trello.node.ts @@ -10,22 +10,14 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { apiRequest, apiRequestAllItems } from './GenericFunctions'; - import { attachmentFields, attachmentOperations } from './AttachmentDescription'; - import { boardFields, boardOperations } from './BoardDescription'; - import { boardMemberFields, boardMemberOperations } from './BoardMemberDescription'; - -import { cardFields, cardOperations } from './CardDescription'; - import { cardCommentFields, cardCommentOperations } from './CardCommentDescription'; - +import { cardFields, cardOperations } from './CardDescription'; import { checklistFields, checklistOperations } from './ChecklistDescription'; - +import { apiRequest, apiRequestAllItems } from './GenericFunctions'; import { labelFields, labelOperations } from './LabelDescription'; - import { listFields, listOperations } from './ListDescription'; interface TrelloBoardType { diff --git a/packages/nodes-base/nodes/Twist/Twist.node.ts b/packages/nodes-base/nodes/Twist/Twist.node.ts index 16d6d530ea9a4..a11c29c16e352 100644 --- a/packages/nodes-base/nodes/Twist/Twist.node.ts +++ b/packages/nodes-base/nodes/Twist/Twist.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IDataObject, IExecuteFunctions, @@ -8,20 +9,16 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; - import { v4 as uuid } from 'uuid'; -import moment from 'moment-timezone'; -import { twistApiRequest } from './GenericFunctions'; import { channelFields, channelOperations } from './ChannelDescription'; - +import { commentFields, commentOperations } from './CommentDescription'; +import { twistApiRequest } from './GenericFunctions'; import { messageConversationFields, messageConversationOperations, } from './MessageConversationDescription'; - import { threadFields, threadOperations } from './ThreadDescription'; -import { commentFields, commentOperations } from './CommentDescription'; export class Twist implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Twitter/Twitter.node.ts b/packages/nodes-base/nodes/Twitter/Twitter.node.ts index 0cfb9b296b394..92e485d610416 100644 --- a/packages/nodes-base/nodes/Twitter/Twitter.node.ts +++ b/packages/nodes-base/nodes/Twitter/Twitter.node.ts @@ -2,7 +2,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow' import { VersionedNodeType } from 'n8n-workflow'; import { TwitterV1 } from './V1/TwitterV1.node'; - import { TwitterV2 } from './V2/TwitterV2.node'; export class Twitter extends VersionedNodeType { diff --git a/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts b/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts index 1b0bfd61c6ad2..7b42390e72561 100644 --- a/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts +++ b/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts @@ -1,3 +1,4 @@ +import ISO6391 from 'iso-639-1'; import type { IDataObject, IExecuteFunctions, @@ -11,17 +12,13 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import ISO6391 from 'iso-639-1'; import { directMessageFields, directMessageOperations } from './DirectMessageDescription'; - -import { tweetFields, tweetOperations } from './TweetDescription'; - import { twitterApiRequest, twitterApiRequestAllItems, uploadAttachments, } from './GenericFunctions'; - +import { tweetFields, tweetOperations } from './TweetDescription'; import type { ITweet, ITweetCreate } from './TweetInterface'; export class TwitterV1 implements INodeType { diff --git a/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts b/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts index bf2ea4056861e..e210689346749 100644 --- a/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts +++ b/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts @@ -1,3 +1,5 @@ +import ISO6391 from 'iso-639-1'; +import { DateTime } from 'luxon'; import { NodeConnectionType, type IDataObject, @@ -12,19 +14,16 @@ import { type JsonObject, } from 'n8n-workflow'; -import ISO6391 from 'iso-639-1'; -import { DateTime } from 'luxon'; import { directMessageFields, directMessageOperations } from './DirectMessageDescription'; -import { listFields, listOperations } from './ListDescription'; -import { tweetFields, tweetOperations } from './TweetDescription'; -import { userFields, userOperations } from './UserDescription'; - import { returnId, returnIdFromUsername, twitterApiRequest, twitterApiRequestAllItems, } from './GenericFunctions'; +import { listFields, listOperations } from './ListDescription'; +import { tweetFields, tweetOperations } from './TweetDescription'; +import { userFields, userOperations } from './UserDescription'; export class TwitterV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Twitter/test/Twitter.test.ts b/packages/nodes-base/nodes/Twitter/test/Twitter.test.ts index fc7486ce57d4b..b653d691fe065 100644 --- a/packages/nodes-base/nodes/Twitter/test/Twitter.test.ts +++ b/packages/nodes-base/nodes/Twitter/test/Twitter.test.ts @@ -1,8 +1,10 @@ -import nock from 'nock'; import type { INodeParameterResourceLocator } from 'n8n-workflow'; -import { returnId } from '../V2/GenericFunctions'; +import nock from 'nock'; + import { getWorkflowFilenames, testWorkflows } from '@test/nodes/Helpers'; +import { returnId } from '../V2/GenericFunctions'; + const searchResult = { data: [ { diff --git a/packages/nodes-base/nodes/UProc/ToolDescription.ts b/packages/nodes-base/nodes/UProc/ToolDescription.ts index a0e354392f9b8..4be6f454a4b42 100644 --- a/packages/nodes-base/nodes/UProc/ToolDescription.ts +++ b/packages/nodes-base/nodes/UProc/ToolDescription.ts @@ -2,7 +2,6 @@ import type { IDataObject, INodeProperties } from 'n8n-workflow'; import { deepCopy } from 'n8n-workflow'; import { groups } from './Json/Groups'; - import { tools } from './Json/Tools'; function capitalize(str: string): string { diff --git a/packages/nodes-base/nodes/UProc/UProc.node.ts b/packages/nodes-base/nodes/UProc/UProc.node.ts index f48e2475839ad..2aeccd5e9ffba 100644 --- a/packages/nodes-base/nodes/UProc/UProc.node.ts +++ b/packages/nodes-base/nodes/UProc/UProc.node.ts @@ -9,9 +9,7 @@ import type { import { NodeConnectionType } from 'n8n-workflow'; import { uprocApiRequest } from './GenericFunctions'; - import { groupOptions } from './GroupDescription'; - import { toolOperations, toolParameters } from './ToolDescription'; export class UProc implements INodeType { diff --git a/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts b/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts index 23c0b1d8c62a8..52407c6c5eed2 100644 --- a/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts +++ b/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts @@ -9,7 +9,6 @@ import type { IHttpRequestMethods, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; - import qs from 'qs'; export async function unleashedApiRequest( diff --git a/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts b/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts index 9fd7fd1a97bab..1d6e90a16d721 100644 --- a/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts +++ b/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IExecuteFunctions, type IDataObject, @@ -7,15 +8,12 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { convertNETDates, unleashedApiRequest, unleashedApiRequestAllItems, } from './GenericFunctions'; - import { salesOrderFields, salesOrderOperations } from './SalesOrderDescription'; - import { stockOnHandFields, stockOnHandOperations } from './StockOnHandDescription'; export class UnleashedSoftware implements INodeType { diff --git a/packages/nodes-base/nodes/Uplead/Uplead.node.ts b/packages/nodes-base/nodes/Uplead/Uplead.node.ts index ca111ca57be60..ffa3df226de95 100644 --- a/packages/nodes-base/nodes/Uplead/Uplead.node.ts +++ b/packages/nodes-base/nodes/Uplead/Uplead.node.ts @@ -6,8 +6,9 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { upleadApiRequest } from './GenericFunctions'; + import { companyFields, companyOperations } from './CompanyDesciption'; +import { upleadApiRequest } from './GenericFunctions'; import { personFields, personOperations } from './PersonDescription'; export class Uplead implements INodeType { diff --git a/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts b/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts index 4ab99039c0081..48637dd7c0430 100644 --- a/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts +++ b/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -7,18 +8,13 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { uptimeRobotApiRequest } from './GenericFunctions'; - -import { monitorFields, monitorOperations } from './MonitorDescription'; - import { alertContactFields, alertContactOperations } from './AlertContactDescription'; - +import { uptimeRobotApiRequest } from './GenericFunctions'; import { maintenanceWindowFields, maintenanceWindowOperations, } from './MaintenanceWindowDescription'; - +import { monitorFields, monitorOperations } from './MonitorDescription'; import { publicStatusPageFields, publicStatusPageOperations } from './PublicStatusPageDescription'; export class UptimeRobot implements INodeType { diff --git a/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts b/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts index d51ff9d498de6..1862b9e8ae42e 100644 --- a/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts +++ b/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts @@ -8,7 +8,6 @@ import type { import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { scanFields, scanOperations } from './descriptions'; - import { handleListing, normalizeId, urlScanIoApiRequest } from './GenericFunctions'; export class UrlScanIo implements INodeType { diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts b/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts index 8db5cc2f7f5ac..4c3438b3a4fdd 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts @@ -1,3 +1,4 @@ +import get from 'lodash/get'; import { ApplicationError } from 'n8n-workflow'; import type { IDataObject, @@ -8,8 +9,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; -import get from 'lodash/get'; - export async function venafiApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts index c749cb2402ac5..381e6da551c90 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts @@ -7,10 +7,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { venafiApiRequest, venafiApiRequestAllItems } from './GenericFunctions'; - import { certificateFields, certificateOperations } from './CertificateDescription'; - +import { venafiApiRequest, venafiApiRequestAllItems } from './GenericFunctions'; import { policyFields, policyOperations } from './PolicyDescription'; export class VenafiTlsProtectDatacenter implements INodeType { diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts index bf6bb6e9a1b2f..e31bf8924ded2 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IPollFunctions, type IDataObject, @@ -7,8 +8,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; - import { venafiApiRequest } from './GenericFunctions'; export class VenafiTlsProtectDatacenterTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts index 933f8175ccf88..9841596504c53 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts @@ -1,3 +1,5 @@ +import * as nacl_factory from 'js-nacl'; +import get from 'lodash/get'; import type { IExecuteFunctions, ILoadOptionsFunctions, @@ -9,10 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; -import get from 'lodash/get'; - -import * as nacl_factory from 'js-nacl'; - export async function venafiApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts index fc0d0ea4a9196..fad5bac766c66 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts @@ -9,15 +9,7 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { encryptPassphrase, venafiApiRequest, venafiApiRequestAllItems } from './GenericFunctions'; - import { certificateFields, certificateOperations } from './CertificateDescription'; - -import { - certificateRequestFields, - certificateRequestOperations, -} from './CertificateRequestDescription'; - import type { ICertficateKeystoreRequest, ICertficateRequest, @@ -25,6 +17,11 @@ import type { IKeyTypeParameters, ISubjectAltNamesByType, } from './CertificateInterface'; +import { + certificateRequestFields, + certificateRequestOperations, +} from './CertificateRequestDescription'; +import { encryptPassphrase, venafiApiRequest, venafiApiRequestAllItems } from './GenericFunctions'; export class VenafiTlsProtectCloud implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Vero/Vero.node.ts b/packages/nodes-base/nodes/Vero/Vero.node.ts index bcb279c279bd0..ebf91441184ab 100644 --- a/packages/nodes-base/nodes/Vero/Vero.node.ts +++ b/packages/nodes-base/nodes/Vero/Vero.node.ts @@ -7,9 +7,10 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; + +import { eventFields, eventOperations } from './EventDescripion'; import { validateJSON, veroApiRequest } from './GenericFunctions'; import { userFields, userOperations } from './UserDescription'; -import { eventFields, eventOperations } from './EventDescripion'; export class Vero implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Wait/Wait.node.ts b/packages/nodes-base/nodes/Wait/Wait.node.ts index 9039891e99c16..45922270c2c47 100644 --- a/packages/nodes-base/nodes/Wait/Wait.node.ts +++ b/packages/nodes-base/nodes/Wait/Wait.node.ts @@ -9,6 +9,16 @@ import type { } from 'n8n-workflow'; import { NodeOperationError, NodeConnectionType, WAIT_INDEFINITELY } from 'n8n-workflow'; +import { updateDisplayOptions } from '../../utils/utilities'; +import { + formDescription, + formFields, + respondWithOptions, + formRespondMode, + formTitle, + appendAttributionToForm, +} from '../Form/common.descriptions'; +import { formWebhook } from '../Form/utils'; import { authenticationProperty, credentialsProperty, @@ -20,17 +30,6 @@ import { responseDataProperty, responseModeProperty, } from '../Webhook/description'; - -import { - formDescription, - formFields, - respondWithOptions, - formRespondMode, - formTitle, - appendAttributionToForm, -} from '../Form/common.descriptions'; -import { formWebhook } from '../Form/utils'; -import { updateDisplayOptions } from '../../utils/utilities'; import { Webhook } from '../Webhook/Webhook.node'; const toWaitAmount: INodeProperties = { diff --git a/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts b/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts index 2985cd7369842..93846925639db 100644 --- a/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts +++ b/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts @@ -8,6 +8,7 @@ import { NodeConnectionType, } from 'n8n-workflow'; +import { itemFields, itemOperations } from './ItemDescription'; import { webflowApiRequest, webflowApiRequestAllItems, @@ -16,8 +17,6 @@ import { getFields, } from '../GenericFunctions'; -import { itemFields, itemOperations } from './ItemDescription'; - export class WebflowV1 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Webflow/V2/WebflowV2.node.ts b/packages/nodes-base/nodes/Webflow/V2/WebflowV2.node.ts index ad17ff9e05e13..3c9e6c56a66e8 100644 --- a/packages/nodes-base/nodes/Webflow/V2/WebflowV2.node.ts +++ b/packages/nodes-base/nodes/Webflow/V2/WebflowV2.node.ts @@ -4,9 +4,10 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { getSites, getCollections, getFields } from '../GenericFunctions'; -import { versionDescription } from './actions/versionDescription'; + import { router } from './actions/router'; +import { versionDescription } from './actions/versionDescription'; +import { getSites, getCollections, getFields } from '../GenericFunctions'; export class WebflowV2 implements INodeType { description: INodeTypeDescription; diff --git a/packages/nodes-base/nodes/Webflow/V2/actions/router.ts b/packages/nodes-base/nodes/Webflow/V2/actions/router.ts index 371a9df3c6df7..59eb4c552eb63 100644 --- a/packages/nodes-base/nodes/Webflow/V2/actions/router.ts +++ b/packages/nodes-base/nodes/Webflow/V2/actions/router.ts @@ -1,8 +1,8 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { WebflowType } from './node.type'; import * as item from './Item/Item.resource'; +import type { WebflowType } from './node.type'; export async function router(this: IExecuteFunctions): Promise { let returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Webflow/WebflowTrigger.node.ts b/packages/nodes-base/nodes/Webflow/WebflowTrigger.node.ts index cdd2ee3814626..1da016bd9ba57 100644 --- a/packages/nodes-base/nodes/Webflow/WebflowTrigger.node.ts +++ b/packages/nodes-base/nodes/Webflow/WebflowTrigger.node.ts @@ -1,5 +1,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow'; import { VersionedNodeType } from 'n8n-workflow'; + import { WebflowTriggerV1 } from './V1/WebflowTriggerV1.node'; import { WebflowTriggerV2 } from './V2/WebflowTriggerV2.node'; diff --git a/packages/nodes-base/nodes/Webhook/Webhook.node.ts b/packages/nodes-base/nodes/Webhook/Webhook.node.ts index 9938f4eaa1d12..9255dab346ce6 100644 --- a/packages/nodes-base/nodes/Webhook/Webhook.node.ts +++ b/packages/nodes-base/nodes/Webhook/Webhook.node.ts @@ -1,7 +1,7 @@ /* eslint-disable n8n-nodes-base/node-execute-block-wrong-error-thrown */ -import { pipeline } from 'stream/promises'; import { createWriteStream } from 'fs'; import { stat } from 'fs/promises'; +import isbot from 'isbot'; import type { IWebhookFunctions, IDataObject, @@ -12,10 +12,9 @@ import type { INodeProperties, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeOperationError, Node } from 'n8n-workflow'; - -import { v4 as uuid } from 'uuid'; -import isbot from 'isbot'; +import { pipeline } from 'stream/promises'; import { file as tmpFile } from 'tmp-promise'; +import { v4 as uuid } from 'uuid'; import { authenticationProperty, diff --git a/packages/nodes-base/nodes/Webhook/description.ts b/packages/nodes-base/nodes/Webhook/description.ts index c0cd992c8e775..42a81aab717f1 100644 --- a/packages/nodes-base/nodes/Webhook/description.ts +++ b/packages/nodes-base/nodes/Webhook/description.ts @@ -1,4 +1,5 @@ import type { INodeProperties, INodeTypeDescription, IWebhookDescription } from 'n8n-workflow'; + import { getResponseCode, getResponseData } from './utils'; export const defaultWebhookDescription: IWebhookDescription = { diff --git a/packages/nodes-base/nodes/Webhook/test/Webhook.test.ts b/packages/nodes-base/nodes/Webhook/test/Webhook.test.ts index 97fd23e90eb43..250ad3af8a3b0 100644 --- a/packages/nodes-base/nodes/Webhook/test/Webhook.test.ts +++ b/packages/nodes-base/nodes/Webhook/test/Webhook.test.ts @@ -1,9 +1,11 @@ import type { Request } from 'express'; -import type { IWebhookFunctions } from 'n8n-workflow'; import { mock } from 'jest-mock-extended'; -import { Webhook } from '../Webhook.node'; +import type { IWebhookFunctions } from 'n8n-workflow'; + import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers'; +import { Webhook } from '../Webhook.node'; + const workflows = getWorkflowFilenames(__dirname); describe('Test Webhook Node', () => { diff --git a/packages/nodes-base/nodes/Webhook/test/utils.test.ts b/packages/nodes-base/nodes/Webhook/test/utils.test.ts index 91a244aa41686..b2fc3f84e2b1a 100644 --- a/packages/nodes-base/nodes/Webhook/test/utils.test.ts +++ b/packages/nodes-base/nodes/Webhook/test/utils.test.ts @@ -1,5 +1,6 @@ import jwt from 'jsonwebtoken'; import { ApplicationError, type IWebhookFunctions } from 'n8n-workflow'; + import type { WebhookParameters } from '../utils'; import { checkResponseModeConfiguration, diff --git a/packages/nodes-base/nodes/Webhook/utils.ts b/packages/nodes-base/nodes/Webhook/utils.ts index 3f6b78e552abe..08a588a5a8089 100644 --- a/packages/nodes-base/nodes/Webhook/utils.ts +++ b/packages/nodes-base/nodes/Webhook/utils.ts @@ -1,3 +1,5 @@ +import basicAuth from 'basic-auth'; +import jwt from 'jsonwebtoken'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IWebhookFunctions, @@ -5,10 +7,9 @@ import type { IDataObject, ICredentialDataDecryptedObject, } from 'n8n-workflow'; -import basicAuth from 'basic-auth'; -import jwt from 'jsonwebtoken'; -import { formatPrivateKey } from '../../utils/utilities'; + import { WebhookAuthorizationError } from './error'; +import { formatPrivateKey } from '../../utils/utilities'; export type WebhookParameters = { httpMethod: string | string[]; @@ -59,7 +60,7 @@ export const getResponseData = (parameters: WebhookParameters) => { }; export const configuredOutputs = (parameters: WebhookParameters) => { - const httpMethod = parameters.httpMethod as string | string[]; + const httpMethod = parameters.httpMethod; if (!Array.isArray(httpMethod)) return [ diff --git a/packages/nodes-base/nodes/Wekan/Wekan.node.ts b/packages/nodes-base/nodes/Wekan/Wekan.node.ts index 184f03a15055e..6e54c46ed174e 100644 --- a/packages/nodes-base/nodes/Wekan/Wekan.node.ts +++ b/packages/nodes-base/nodes/Wekan/Wekan.node.ts @@ -10,20 +10,14 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { wrapData } from '../../utils/utilities'; -import { apiRequest } from './GenericFunctions'; - import { boardFields, boardOperations } from './BoardDescription'; - -import { cardFields, cardOperations } from './CardDescription'; - import { cardCommentFields, cardCommentOperations } from './CardCommentDescription'; - +import { cardFields, cardOperations } from './CardDescription'; import { checklistFields, checklistOperations } from './ChecklistDescription'; - import { checklistItemFields, checklistItemOperations } from './ChecklistItemDescription'; - +import { apiRequest } from './GenericFunctions'; import { listFields, listOperations } from './ListDescription'; +import { wrapData } from '../../utils/utilities'; // https://wekan.github.io/api/v4.41/ diff --git a/packages/nodes-base/nodes/WhatsApp/GenericFunctions.ts b/packages/nodes-base/nodes/WhatsApp/GenericFunctions.ts index b50c9adad9e20..6f027ccd8ef6c 100644 --- a/packages/nodes-base/nodes/WhatsApp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/WhatsApp/GenericFunctions.ts @@ -9,6 +9,7 @@ import type { JsonObject, } from 'n8n-workflow'; import { NodeApiError } from 'n8n-workflow'; + import type { WhatsAppAppWebhookSubscriptionsResponse, WhatsAppAppWebhookSubscription, diff --git a/packages/nodes-base/nodes/WhatsApp/MediaDescription.ts b/packages/nodes-base/nodes/WhatsApp/MediaDescription.ts index 48ef7dd377d17..e22498b35bc20 100644 --- a/packages/nodes-base/nodes/WhatsApp/MediaDescription.ts +++ b/packages/nodes-base/nodes/WhatsApp/MediaDescription.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { setupUpload } from './MediaFunctions'; export const mediaFields: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/WhatsApp/MediaFunctions.ts b/packages/nodes-base/nodes/WhatsApp/MediaFunctions.ts index 643c543f4d3fe..f1b47900c17c5 100644 --- a/packages/nodes-base/nodes/WhatsApp/MediaFunctions.ts +++ b/packages/nodes-base/nodes/WhatsApp/MediaFunctions.ts @@ -1,8 +1,7 @@ +import FormData from 'form-data'; import type { IDataObject, IExecuteSingleFunctions, IHttpRequestOptions } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import FormData from 'form-data'; - export async function getUploadFormData( this: IExecuteSingleFunctions, ): Promise<{ fileName: string; formData: FormData }> { diff --git a/packages/nodes-base/nodes/WhatsApp/MessagesDescription.ts b/packages/nodes-base/nodes/WhatsApp/MessagesDescription.ts index d3a087903c735..10fdc64d3db61 100644 --- a/packages/nodes-base/nodes/WhatsApp/MessagesDescription.ts +++ b/packages/nodes-base/nodes/WhatsApp/MessagesDescription.ts @@ -1,5 +1,6 @@ import countryCodes from 'currency-codes'; import type { INodeProperties } from 'n8n-workflow'; + import { cleanPhoneNumber, componentsRequest, diff --git a/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts b/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts index 7275a9b43e720..2947b4a60d8a2 100644 --- a/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts +++ b/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts @@ -1,8 +1,8 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { messageFields, messageTypeFields } from './MessagesDescription'; import { mediaFields, mediaTypeFields } from './MediaDescription'; +import { messageFields, messageTypeFields } from './MessagesDescription'; export class WhatsApp implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts b/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts index fb0f0e40f4971..a9603fb25fc76 100644 --- a/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts +++ b/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts @@ -9,6 +9,7 @@ import { type IWebhookResponseData, NodeConnectionType, } from 'n8n-workflow'; + import { appWebhookSubscriptionCreate, appWebhookSubscriptionDelete, diff --git a/packages/nodes-base/nodes/Wise/GenericFunctions.ts b/packages/nodes-base/nodes/Wise/GenericFunctions.ts index a5fe5538033ba..129ef4e8a97d6 100644 --- a/packages/nodes-base/nodes/Wise/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Wise/GenericFunctions.ts @@ -1,5 +1,4 @@ import { createSign } from 'crypto'; - import type { IDataObject, IExecuteFunctions, diff --git a/packages/nodes-base/nodes/Wise/Wise.node.ts b/packages/nodes-base/nodes/Wise/Wise.node.ts index 59ce8beff934f..22432a3422b41 100644 --- a/packages/nodes-base/nodes/Wise/Wise.node.ts +++ b/packages/nodes-base/nodes/Wise/Wise.node.ts @@ -1,3 +1,5 @@ +import omit from 'lodash/omit'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, @@ -8,10 +10,8 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; - -import omit from 'lodash/omit'; -import moment from 'moment-timezone'; import { v4 as uuid } from 'uuid'; + import { accountFields, accountOperations, @@ -26,7 +26,6 @@ import { transferFields, transferOperations, } from './descriptions'; - import type { BorderlessAccount, ExchangeRateAdditionalFields, diff --git a/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts b/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts index f2519b17e5555..a4ef46ffd3d4e 100644 --- a/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts +++ b/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts @@ -1,5 +1,6 @@ +import { snakeCase } from 'change-case'; import { createHash } from 'crypto'; - +import omit from 'lodash/omit'; import type { ICredentialDataDecryptedObject, IDataObject, @@ -11,9 +12,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; - -import omit from 'lodash/omit'; import type { ICouponLine, IFeeLine, ILineItem, IShoppingLine } from './OrderInterface'; export async function woocommerceApiRequest( diff --git a/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts b/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts index 3fb4ac5830dd0..0aaab6b978c56 100644 --- a/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts +++ b/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts @@ -8,6 +8,8 @@ import { type INodeTypeDescription, NodeConnectionType, } from 'n8n-workflow'; + +import { customerFields, customerOperations } from './descriptions'; import { adjustMetadata, setFields, @@ -16,9 +18,7 @@ import { woocommerceApiRequest, woocommerceApiRequestAllItems, } from './GenericFunctions'; -import { productFields, productOperations } from './ProductDescription'; import { orderFields, orderOperations } from './OrderDescription'; -import type { IDimension, IImage, IProduct } from './ProductInterface'; import type { IAddress, ICouponLine, @@ -27,8 +27,8 @@ import type { IOrder, IShoppingLine, } from './OrderInterface'; - -import { customerFields, customerOperations } from './descriptions'; +import { productFields, productOperations } from './ProductDescription'; +import type { IDimension, IImage, IProduct } from './ProductInterface'; export class WooCommerce implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts b/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts index 52257110c1edc..4178e23b31c97 100644 --- a/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts +++ b/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts @@ -8,13 +8,13 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; + import { wordpressApiRequest, wordpressApiRequestAllItems } from './GenericFunctions'; -import { postFields, postOperations } from './PostDescription'; import { pageFields, pageOperations } from './PageDescription'; -import { userFields, userOperations } from './UserDescription'; - -import type { IPost } from './PostInterface'; import type { IPage } from './PageInterface'; +import { postFields, postOperations } from './PostDescription'; +import type { IPost } from './PostInterface'; +import { userFields, userOperations } from './UserDescription'; import type { IUser } from './UserInterface'; export class Wordpress implements INodeType { diff --git a/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts b/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts index 121ead0dc2955..5ccc7f0fa2a11 100644 --- a/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts +++ b/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IHookFunctions, IWebhookFunctions, @@ -10,7 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; import { workableApiRequest } from './GenericFunctions'; export class WorkableTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts b/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts index 21cc48221b8bc..0ef83bbe9d73c 100644 --- a/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts +++ b/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts @@ -1,5 +1,3 @@ -import type { Readable } from 'stream'; - import { BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow'; import type { IExecuteFunctions, @@ -7,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import type { Readable } from 'stream'; export class WriteBinaryFile implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/WriteBinaryFile/test/WriteBinaryFile.test.ts b/packages/nodes-base/nodes/WriteBinaryFile/test/WriteBinaryFile.test.ts index 4a06f8d0e3db3..1e5ac8e6c268b 100644 --- a/packages/nodes-base/nodes/WriteBinaryFile/test/WriteBinaryFile.test.ts +++ b/packages/nodes-base/nodes/WriteBinaryFile/test/WriteBinaryFile.test.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-loop-func */ import path from 'path'; + +import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; import * as Helpers from '@test/nodes/Helpers'; import type { WorkflowTestData } from '@test/nodes/types'; -import { executeWorkflow } from '@test/nodes/ExecuteWorkflow'; describe('Test Write Binary File Node', () => { beforeEach(async () => { diff --git a/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts b/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts index 7cb91c179cc4a..63e7212e4cf94 100644 --- a/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts +++ b/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts @@ -12,7 +12,6 @@ import type { import { NodeConnectionType, jsonParse } from 'n8n-workflow'; import { wufooApiRequest } from './GenericFunctions'; - import type { IField, IWebhook } from './Interface'; export class WufooTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Xero/Xero.node.ts b/packages/nodes-base/nodes/Xero/Xero.node.ts index fade7c13343d9..894242fe7c163 100644 --- a/packages/nodes-base/nodes/Xero/Xero.node.ts +++ b/packages/nodes-base/nodes/Xero/Xero.node.ts @@ -10,16 +10,12 @@ import { NodeConnectionType, } from 'n8n-workflow'; +import { contactFields, contactOperations } from './ContactDescription'; import { xeroApiRequest, xeroApiRequestAllItems } from './GenericFunctions'; - +import type { IAddress, IContact, IPhone } from './IContactInterface'; import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - -import { contactFields, contactOperations } from './ContactDescription'; - import type { IInvoice, ILineItem } from './InvoiceInterface'; -import type { IAddress, IContact, IPhone } from './IContactInterface'; - export class Xero implements INodeType { description: INodeTypeDescription = { displayName: 'Xero', diff --git a/packages/nodes-base/nodes/Xml/Xml.node.ts b/packages/nodes-base/nodes/Xml/Xml.node.ts index 6b05660f246d9..d83eb3b82cd20 100644 --- a/packages/nodes-base/nodes/Xml/Xml.node.ts +++ b/packages/nodes-base/nodes/Xml/Xml.node.ts @@ -1,4 +1,3 @@ -import { Builder, Parser } from 'xml2js'; import type { IExecuteFunctions, INodeExecutionData, @@ -6,6 +5,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError, deepCopy } from 'n8n-workflow'; +import { Builder, Parser } from 'xml2js'; export class Xml implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Yourls/Yourls.node.ts b/packages/nodes-base/nodes/Yourls/Yourls.node.ts index e4fee71eca15f..c611ab2819a56 100644 --- a/packages/nodes-base/nodes/Yourls/Yourls.node.ts +++ b/packages/nodes-base/nodes/Yourls/Yourls.node.ts @@ -8,7 +8,6 @@ import { } from 'n8n-workflow'; import { yourlsApiRequest } from './GenericFunctions'; - import { urlFields, urlOperations } from './UrlDescription'; export class Yourls implements INodeType { diff --git a/packages/nodes-base/nodes/Zammad/GenericFunctions.ts b/packages/nodes-base/nodes/Zammad/GenericFunctions.ts index aad3fa3d84917..85ef2d7a6b12c 100644 --- a/packages/nodes-base/nodes/Zammad/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zammad/GenericFunctions.ts @@ -1,3 +1,4 @@ +import flow from 'lodash/flow'; import type { IExecuteFunctions, IDataObject, @@ -8,8 +9,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import flow from 'lodash/flow'; - import type { Zammad } from './types'; export function tolerateTrailingSlash(url: string) { @@ -34,9 +33,8 @@ export async function zammadApiRequest( const authentication = this.getNodeParameter('authentication', 0) as 'basicAuth' | 'tokenAuth'; if (authentication === 'basicAuth') { - const credentials = (await this.getCredentials( - 'zammadBasicAuthApi', - )) as Zammad.BasicAuthCredentials; + const credentials = + await this.getCredentials('zammadBasicAuthApi'); const baseUrl = tolerateTrailingSlash(credentials.baseUrl); @@ -49,9 +47,8 @@ export async function zammadApiRequest( options.rejectUnauthorized = !credentials.allowUnauthorizedCerts; } else { - const credentials = (await this.getCredentials( - 'zammadTokenAuthApi', - )) as Zammad.TokenAuthCredentials; + const credentials = + await this.getCredentials('zammadTokenAuthApi'); const baseUrl = tolerateTrailingSlash(credentials.baseUrl); diff --git a/packages/nodes-base/nodes/Zammad/Zammad.node.ts b/packages/nodes-base/nodes/Zammad/Zammad.node.ts index 5b006b444d8f5..07f64c680b1af 100644 --- a/packages/nodes-base/nodes/Zammad/Zammad.node.ts +++ b/packages/nodes-base/nodes/Zammad/Zammad.node.ts @@ -18,7 +18,6 @@ import { ticketDescription, userDescription, } from './descriptions'; - import { doesNotBelongToZammad, fieldToLoadOption, @@ -38,7 +37,6 @@ import { zammadApiRequest, zammadApiRequestAllItems, } from './GenericFunctions'; - import type { Zammad as ZammadTypes } from './types'; export class Zammad implements INodeType { diff --git a/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts b/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts index b83e50c290829..8c492275a8cb1 100644 --- a/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts +++ b/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts @@ -11,16 +11,11 @@ import type { import { NodeApiError, NodeOperationError, NodeConnectionType } from 'n8n-workflow'; import { validateJSON, zendeskApiRequest, zendeskApiRequestAllItems } from './GenericFunctions'; - +import { organizationFields, organizationOperations } from './OrganizationDescription'; import { ticketFields, ticketOperations } from './TicketDescription'; - import { ticketFieldFields, ticketFieldOperations } from './TicketFieldDescription'; - -import { userFields, userOperations } from './UserDescription'; - -import { organizationFields, organizationOperations } from './OrganizationDescription'; - import type { IComment, ITicket } from './TicketInterface'; +import { userFields, userOperations } from './UserDescription'; export class Zendesk implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts b/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts index 72115e073ee8a..1a0b5f59d0931 100644 --- a/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts +++ b/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts @@ -10,9 +10,8 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { zendeskApiRequest, zendeskApiRequestAllItems } from './GenericFunctions'; import { conditionFields } from './ConditionDescription'; - +import { zendeskApiRequest, zendeskApiRequestAllItems } from './GenericFunctions'; import { triggerPlaceholders } from './TriggerPlaceholders'; export class ZendeskTrigger implements INodeType { diff --git a/packages/nodes-base/nodes/Zoho/GenericFunctions.ts b/packages/nodes-base/nodes/Zoho/GenericFunctions.ts index 7b025bfcda0e7..554cb49425e33 100644 --- a/packages/nodes-base/nodes/Zoho/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zoho/GenericFunctions.ts @@ -1,3 +1,5 @@ +import flow from 'lodash/flow'; +import sortBy from 'lodash/sortBy'; import type { IExecuteFunctions, IHookFunctions, @@ -9,9 +11,6 @@ import type { } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; -import flow from 'lodash/flow'; -import sortBy from 'lodash/sortBy'; - import type { AllFields, CamelCaseResource, @@ -47,9 +46,7 @@ export async function zohoApiRequest( qs: IDataObject = {}, uri?: string, ) { - const { oauthTokenData } = (await this.getCredentials( - 'zohoOAuth2Api', - )) as ZohoOAuth2ApiCredentials; + const { oauthTokenData } = await this.getCredentials('zohoOAuth2Api'); const options: IRequestOptions = { body: { diff --git a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts index e1cd2135be4bd..67d76a33abdd3 100644 --- a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts +++ b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts @@ -8,6 +8,28 @@ import { NodeConnectionType, } from 'n8n-workflow'; +import { + accountFields, + accountOperations, + contactFields, + contactOperations, + dealFields, + dealOperations, + invoiceFields, + invoiceOperations, + leadFields, + leadOperations, + productFields, + productOperations, + purchaseOrderFields, + purchaseOrderOperations, + quoteFields, + quoteOperations, + salesOrderFields, + salesOrderOperations, + vendorFields, + vendorOperations, +} from './descriptions'; import { addGetAllFilterOptions, adjustAccountPayload, @@ -31,7 +53,6 @@ import { zohoApiRequest, zohoApiRequestAllItems, } from './GenericFunctions'; - import type { CamelCaseResource, GetAllFilterOptions, @@ -43,29 +64,6 @@ import type { ProductDetails, } from './types'; -import { - accountFields, - accountOperations, - contactFields, - contactOperations, - dealFields, - dealOperations, - invoiceFields, - invoiceOperations, - leadFields, - leadOperations, - productFields, - productOperations, - purchaseOrderFields, - purchaseOrderOperations, - quoteFields, - quoteOperations, - salesOrderFields, - salesOrderOperations, - vendorFields, - vendorOperations, -} from './descriptions'; - export class ZohoCrm implements INodeType { description: INodeTypeDescription = { displayName: 'Zoho CRM', diff --git a/packages/nodes-base/nodes/Zoho/descriptions/SharedFields.ts b/packages/nodes-base/nodes/Zoho/descriptions/SharedFields.ts index 6e79c724b1a8c..aa62792041443 100644 --- a/packages/nodes-base/nodes/Zoho/descriptions/SharedFields.ts +++ b/packages/nodes-base/nodes/Zoho/descriptions/SharedFields.ts @@ -1,4 +1,5 @@ import type { INodeProperties } from 'n8n-workflow'; + import { capitalizeInitial } from '../GenericFunctions'; import type { CamelCaseResource } from '../types'; diff --git a/packages/nodes-base/nodes/Zoom/Zoom.node.ts b/packages/nodes-base/nodes/Zoom/Zoom.node.ts index 2937ffa2f9848..2a9f051765823 100644 --- a/packages/nodes-base/nodes/Zoom/Zoom.node.ts +++ b/packages/nodes-base/nodes/Zoom/Zoom.node.ts @@ -1,3 +1,4 @@ +import moment from 'moment-timezone'; import { type IExecuteFunctions, type IDataObject, @@ -9,9 +10,7 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import moment from 'moment-timezone'; import { zoomApiRequest, zoomApiRequestAllItems } from './GenericFunctions'; - import { meetingFields, meetingOperations } from './MeetingDescription'; // import { diff --git a/packages/nodes-base/nodes/Zulip/Zulip.node.ts b/packages/nodes-base/nodes/Zulip/Zulip.node.ts index 7caa98132cae3..67fab2e467480 100644 --- a/packages/nodes-base/nodes/Zulip/Zulip.node.ts +++ b/packages/nodes-base/nodes/Zulip/Zulip.node.ts @@ -1,3 +1,4 @@ +import { snakeCase } from 'change-case'; import type { IDataObject, IExecuteFunctions, @@ -8,13 +9,13 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { snakeCase } from 'change-case'; + import { validateJSON, zulipApiRequest } from './GenericFunctions'; import { messageFields, messageOperations } from './MessageDescription'; import type { IMessage } from './MessageInterface'; import { streamFields, streamOperations } from './StreamDescription'; -import { userFields, userOperations } from './UserDescription'; import type { IPrincipal, IStream } from './StreamInterface'; +import { userFields, userOperations } from './UserDescription'; import type { IUser } from './UserInterface'; export class Zulip implements INodeType { diff --git a/packages/nodes-base/package.json b/packages/nodes-base/package.json index db7ef72af3b33..11585374bf3ca 100644 --- a/packages/nodes-base/package.json +++ b/packages/nodes-base/package.json @@ -10,8 +10,8 @@ "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && pnpm n8n-copy-icons && pnpm n8n-generate-translations && pnpm n8n-generate-metadata", "format": "biome format --write .", "format:check": "biome ci .", - "lint": "eslint . --quiet && node ./scripts/validate-load-options-methods.js", - "lintfix": "eslint . --fix", + "lint": "eslint nodes credentials utils test --quiet && node ./scripts/validate-load-options-methods.js", + "lintfix": "eslint nodes credentials utils test --fix", "watch": "tsc-watch -p tsconfig.build.json --onCompilationComplete \"tsc-alias -p tsconfig.build.json\" --onSuccess \"pnpm n8n-generate-metadata\"", "test": "jest" }, diff --git a/packages/nodes-base/test/nodes/Airtable/Airtable.node.test.ts b/packages/nodes-base/test/nodes/Airtable/Airtable.node.test.ts index 82b20eaf82f5f..3573edf2d4390 100644 --- a/packages/nodes-base/test/nodes/Airtable/Airtable.node.test.ts +++ b/packages/nodes-base/test/nodes/Airtable/Airtable.node.test.ts @@ -1,4 +1,5 @@ import nock from 'nock'; + import { executeWorkflow } from '../ExecuteWorkflow'; import * as Helpers from '../Helpers'; import type { WorkflowTestData } from '../types'; diff --git a/packages/nodes-base/test/nodes/ExecuteWorkflow.ts b/packages/nodes-base/test/nodes/ExecuteWorkflow.ts index ffb79a78ed5eb..969001e619ba6 100644 --- a/packages/nodes-base/test/nodes/ExecuteWorkflow.ts +++ b/packages/nodes-base/test/nodes/ExecuteWorkflow.ts @@ -1,7 +1,8 @@ -import nock from 'nock'; import { WorkflowExecute } from 'n8n-core'; import type { INodeTypes, IRun, IRunExecutionData } from 'n8n-workflow'; import { createDeferredPromise, Workflow } from 'n8n-workflow'; +import nock from 'nock'; + import * as Helpers from './Helpers'; import type { WorkflowTestData } from './types'; diff --git a/packages/nodes-base/test/nodes/Helpers.ts b/packages/nodes-base/test/nodes/Helpers.ts index a2ebee1370d5b..19e4f72b40793 100644 --- a/packages/nodes-base/test/nodes/Helpers.ts +++ b/packages/nodes-base/test/nodes/Helpers.ts @@ -1,17 +1,13 @@ import { readFileSync, readdirSync, mkdtempSync } from 'fs'; -import path from 'path'; -import { tmpdir } from 'os'; -import nock from 'nock'; -import { isEmpty } from 'lodash'; +import { mock } from 'jest-mock-extended'; import { get } from 'lodash'; +import { isEmpty } from 'lodash'; import { BinaryDataService, Credentials, UnrecognizedNodeTypeError, constructExecutionMetaData, } from 'n8n-core'; -import { Container } from 'typedi'; -import { mock } from 'jest-mock-extended'; import type { CredentialLoadingDetails, ICredentialDataDecryptedObject, @@ -39,8 +35,12 @@ import type { WorkflowTestData, } from 'n8n-workflow'; import { ApplicationError, ICredentialsHelper, NodeHelpers, WorkflowHooks } from 'n8n-workflow'; -import { executeWorkflow } from './ExecuteWorkflow'; +import nock from 'nock'; +import { tmpdir } from 'os'; +import path from 'path'; +import { Container } from 'typedi'; +import { executeWorkflow } from './ExecuteWorkflow'; import { FAKE_CREDENTIALS_DATA } from './FakeCredentialsMap'; const baseDir = path.resolve(__dirname, '../..'); diff --git a/packages/nodes-base/test/nodes/Postgres/Postgres.node.functions.test.ts b/packages/nodes-base/test/nodes/Postgres/Postgres.node.functions.test.ts index 8080c711fbfda..42b88b7338930 100644 --- a/packages/nodes-base/test/nodes/Postgres/Postgres.node.functions.test.ts +++ b/packages/nodes-base/test/nodes/Postgres/Postgres.node.functions.test.ts @@ -1,4 +1,5 @@ const pgPromise = require('pg-promise'); + const PostgresFun = require('../../../nodes/Postgres/v1/genericFunctions'); type NodeParams = Record; diff --git a/packages/nodes-base/test/nodes/Start/StartNode.test.ts b/packages/nodes-base/test/nodes/Start/StartNode.test.ts index c399bd4554bf3..f56806b8b4d87 100644 --- a/packages/nodes-base/test/nodes/Start/StartNode.test.ts +++ b/packages/nodes-base/test/nodes/Start/StartNode.test.ts @@ -1,6 +1,6 @@ +import { executeWorkflow } from '../ExecuteWorkflow'; import * as Helpers from '../Helpers'; import type { WorkflowTestData } from '../types'; -import { executeWorkflow } from '../ExecuteWorkflow'; describe('Execute Start Node', () => { const tests: WorkflowTestData[] = [ diff --git a/packages/nodes-base/utils/binary.ts b/packages/nodes-base/utils/binary.ts index c552f6064fa0c..fadbd147cea14 100644 --- a/packages/nodes-base/utils/binary.ts +++ b/packages/nodes-base/utils/binary.ts @@ -1,13 +1,12 @@ +import iconv from 'iconv-lite'; +import get from 'lodash/get'; import type { IBinaryData, IDataObject, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError, BINARY_ENCODING } from 'n8n-workflow'; +import { getDocument as readPDF, version as pdfJsVersion } from 'pdfjs-dist'; +import type { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api'; import type { WorkBook, WritingOptions } from 'xlsx'; import { utils as xlsxUtils, write as xlsxWrite } from 'xlsx'; -import get from 'lodash/get'; -import iconv from 'iconv-lite'; - -import { getDocument as readPDF, version as pdfJsVersion } from 'pdfjs-dist'; -import type { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api'; import { flattenObject } from '@utils/utilities'; export type JsonToSpreadsheetBinaryFormat = 'csv' | 'html' | 'rtf' | 'ods' | 'xls' | 'xlsx'; diff --git a/packages/nodes-base/utils/sendAndWait/test/util.test.ts b/packages/nodes-base/utils/sendAndWait/test/util.test.ts index e037942215d5f..5194887f2f110 100644 --- a/packages/nodes-base/utils/sendAndWait/test/util.test.ts +++ b/packages/nodes-base/utils/sendAndWait/test/util.test.ts @@ -1,6 +1,7 @@ import { type MockProxy, mock } from 'jest-mock-extended'; import type { IExecuteFunctions, INodeProperties, IWebhookFunctions } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; + import { getSendAndWaitProperties, getSendAndWaitConfig, diff --git a/packages/nodes-base/utils/sendAndWait/utils.ts b/packages/nodes-base/utils/sendAndWait/utils.ts index c582d1f851b51..5328c2c8d3114 100644 --- a/packages/nodes-base/utils/sendAndWait/utils.ts +++ b/packages/nodes-base/utils/sendAndWait/utils.ts @@ -11,16 +11,17 @@ import type { IDataObject, FormFieldsParameter, } from 'n8n-workflow'; -import type { IEmail } from './interfaces'; -import { escapeHtml } from '../utilities'; + import { ACTION_RECORDED_PAGE, BUTTON_STYLE_PRIMARY, BUTTON_STYLE_SECONDARY, createEmailBody, } from './email-templates'; -import { prepareFormData, prepareFormReturnItem, resolveRawData } from '../../nodes/Form/utils'; +import type { IEmail } from './interfaces'; import { formFieldsProperties } from '../../nodes/Form/Form.node'; +import { prepareFormData, prepareFormReturnItem, resolveRawData } from '../../nodes/Form/utils'; +import { escapeHtml } from '../utilities'; type SendAndWaitConfig = { title: string; @@ -362,7 +363,7 @@ export async function sendAndWaitWebhook(this: IWebhookFunctions) { } if (method === 'POST') { const returnItem = await prepareFormReturnItem(this, fields, 'production', true); - const json = returnItem.json as IDataObject; + const json = returnItem.json; delete json.submittedAt; delete json.formMode; diff --git a/packages/nodes-base/utils/utilities.ts b/packages/nodes-base/utils/utilities.ts index 5c0b7f9d2bb72..cae18ae90b2a7 100644 --- a/packages/nodes-base/utils/utilities.ts +++ b/packages/nodes-base/utils/utilities.ts @@ -1,3 +1,4 @@ +import { isEqual, isNull, merge, isObject, reduce, get } from 'lodash'; import type { IDataObject, IDisplayOptions, @@ -5,11 +6,8 @@ import type { INodeProperties, IPairedItemData, } from 'n8n-workflow'; - import { ApplicationError, jsonParse, randomInt } from 'n8n-workflow'; -import { isEqual, isNull, merge, isObject, reduce, get } from 'lodash'; - /** * Creates an array of elements split into groups the length of `size`. * If `array` can't be split evenly, the final chunk will be the remaining