From bafac73eb5071ac484761e48561cbb63f31cb9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 19 Dec 2024 18:46:14 +0100 Subject: [PATCH] refactor: Impose `import/order` linting rule across nodes packages (no-changelog) (#12314) --- packages/@n8n/nodes-langchain/.eslintrc.js | 1 - .../DocumentDefaultDataLoader.node.ts | 2 +- packages/@n8n/nodes-langchain/package.json | 4 +- .../nodes-langchain/utils/N8nBinaryLoader.ts | 19 +++--- .../nodes-langchain/utils/N8nJsonLoader.ts | 8 +-- .../nodes-langchain/utils/N8nTool.test.ts | 9 +-- .../@n8n/nodes-langchain/utils/N8nTool.ts | 2 +- packages/node-dev/.eslintrc.js | 1 - packages/node-dev/commands/build.ts | 2 +- packages/node-dev/src/Build.ts | 12 ++-- packages/nodes-base/.eslintrc.js | 1 - .../nodes-base/credentials/Aws.credentials.ts | 1 - .../CiscoSecureEndpointApi.credentials.ts | 3 +- .../credentials/GhostAdminApi.credentials.ts | 2 +- .../credentials/GoogleApi.credentials.ts | 12 ++-- .../credentials/MySql.credentials.ts | 1 + .../credentials/Postgres.credentials.ts | 1 + .../credentials/SeaTableApi.credentials.ts | 3 +- .../credentials/test/Aws.credentials.test.ts | 1 + .../nodes/ActionNetwork/ActionNetwork.node.ts | 22 +++--- .../nodes/ActionNetwork/GenericFunctions.ts | 5 +- .../ActiveCampaign/ActiveCampaign.node.ts | 30 +++----- .../nodes/ActiveCampaign/DealDescription.ts | 1 - .../ActiveCampaign/EcomOrderDescription.ts | 1 - packages/nodes-base/nodes/Adalo/Adalo.node.ts | 1 + .../nodes/Affinity/Affinity.node.ts | 10 +-- .../nodes/AgileCrm/AgileCrm.node.ts | 14 ++-- .../nodes/AgileCrm/GenericFunctions.ts | 1 - .../nodes/AiTransform/AiTransform.node.ts | 3 +- .../nodes/Airtable/AirtableTrigger.node.ts | 2 +- .../test/v2/node/base/getMany.test.ts | 1 - .../test/v2/node/base/getSchema.test.ts | 1 - .../nodes/Airtable/test/v2/node/helpers.ts | 3 +- .../test/v2/node/record/create.test.ts | 1 - .../test/v2/node/record/deleteRecord.test.ts | 1 - .../Airtable/test/v2/node/record/get.test.ts | 1 - .../test/v2/node/record/search.test.ts | 1 - .../test/v2/node/record/update.test.ts | 1 - .../nodes/Airtable/v1/AirtableV1.node.ts | 4 +- .../nodes/Airtable/v2/AirtableV2.node.ts | 2 +- .../v2/actions/base/getMany.operation.ts | 1 + .../v2/actions/base/getSchema.operation.ts | 3 +- .../v2/actions/record/Record.resource.ts | 2 +- .../v2/actions/record/create.operation.ts | 3 +- .../actions/record/deleteRecord.operation.ts | 3 +- .../v2/actions/record/get.operation.ts | 5 +- .../v2/actions/record/search.operation.ts | 3 +- .../v2/actions/record/update.operation.ts | 5 +- .../v2/actions/record/upsert.operation.ts | 5 +- .../nodes/Airtable/v2/actions/router.ts | 4 +- .../Airtable/v2/actions/versionDescription.ts | 2 +- .../nodes/Airtable/v2/helpers/utils.ts | 3 +- .../nodes/Airtable/v2/methods/listSearch.ts | 1 + .../nodes/Airtable/v2/methods/loadOptions.ts | 1 + .../Airtable/v2/methods/resourceMapping.ts | 1 + .../nodes/Airtable/v2/transport/index.ts | 1 + packages/nodes-base/nodes/Amqp/Amqp.node.ts | 5 +- .../nodes-base/nodes/Amqp/AmqpTrigger.node.ts | 5 +- packages/nodes-base/nodes/Asana/Asana.node.ts | 5 +- .../nodes/Asana/GenericFunctions.ts | 3 +- .../nodes/Automizy/Automizy.node.ts | 4 +- .../nodes/Autopilot/Autopilot.node.ts | 6 +- .../nodes/Autopilot/AutopilotTrigger.node.ts | 2 +- .../nodes/Aws/AwsSnsTrigger.node.ts | 2 +- .../AwsCertificateManager.node.ts | 1 - .../CertificateManager/GenericFunctions.ts | 1 - .../nodes/Aws/Comprehend/GenericFunctions.ts | 3 +- .../test/AwsComprehend.node.test.ts | 1 + .../nodes/Aws/DynamoDB/AwsDynamoDB.node.ts | 3 - .../nodes-base/nodes/Aws/ELB/AwsElb.node.ts | 4 +- .../nodes/Aws/ELB/GenericFunctions.ts | 4 +- .../nodes-base/nodes/Aws/GenericFunctions.ts | 3 +- .../nodes/Aws/Rekognition/GenericFunctions.ts | 7 +- .../test/AwsRekognition.node.test.ts | 1 + .../nodes-base/nodes/Aws/S3/AwsS3.node.ts | 1 - .../nodes/Aws/S3/V1/AwsS3V1.node.ts | 11 +-- .../nodes/Aws/S3/V1/GenericFunctions.ts | 4 +- .../nodes/Aws/S3/V2/AwsS3V2.node.ts | 13 ++-- .../nodes/Aws/S3/V2/GenericFunctions.ts | 4 +- .../nodes/Aws/S3/test/V1/AwsS3.node.test.ts | 1 + .../nodes/Aws/S3/test/V2/AwsS3.node.test.ts | 1 + .../nodes-base/nodes/Aws/SES/AwsSes.node.ts | 2 +- .../nodes/Aws/SES/GenericFunctions.ts | 6 +- .../nodes/Aws/SES/test/AwsSes.node.test.ts | 7 +- .../nodes-base/nodes/Aws/SQS/AwsSqs.node.ts | 4 +- .../nodes/Aws/Textract/GenericFunctions.ts | 7 +- .../nodes/Aws/Transcribe/GenericFunctions.ts | 7 +- .../v1/actions/companyReport/get/index.ts | 2 +- .../v1/actions/companyReport/index.ts | 1 + .../v1/actions/employee/create/description.ts | 3 +- .../v1/actions/employee/create/execute.ts | 5 +- .../v1/actions/employee/create/index.ts | 2 +- .../BambooHr/v1/actions/employee/get/index.ts | 2 +- .../v1/actions/employee/getAll/index.ts | 2 +- .../BambooHr/v1/actions/employee/index.ts | 1 + .../v1/actions/employee/update/description.ts | 2 +- .../v1/actions/employee/update/execute.ts | 5 +- .../v1/actions/employee/update/index.ts | 2 +- .../v1/actions/employeeDocument/del/index.ts | 2 +- .../employeeDocument/download/index.ts | 2 +- .../actions/employeeDocument/getAll/index.ts | 2 +- .../v1/actions/employeeDocument/index.ts | 1 + .../actions/employeeDocument/update/index.ts | 2 +- .../actions/employeeDocument/upload/index.ts | 2 +- .../BambooHr/v1/actions/file/del/index.ts | 2 +- .../v1/actions/file/download/index.ts | 2 +- .../BambooHr/v1/actions/file/getAll/index.ts | 2 +- .../nodes/BambooHr/v1/actions/file/index.ts | 1 + .../BambooHr/v1/actions/file/update/index.ts | 2 +- .../BambooHr/v1/actions/file/upload/index.ts | 2 +- .../nodes/BambooHr/v1/actions/router.ts | 3 +- .../BambooHr/v1/actions/versionDescription.ts | 4 +- .../nodes/Bannerbear/Bannerbear.node.ts | 2 - .../nodes/Bannerbear/GenericFunctions.ts | 3 +- .../nodes-base/nodes/Baserow/Baserow.node.ts | 2 - .../nodes/Beeminder/Beeminder.node.ts | 3 +- packages/nodes-base/nodes/Bitly/Bitly.node.ts | 3 +- .../nodes/Bitwarden/Bitwarden.node.ts | 36 +++++----- packages/nodes-base/nodes/Box/Box.node.ts | 8 +-- .../nodes/Brevo/AttributeDescription.ts | 1 + packages/nodes-base/nodes/Brevo/Brevo.node.ts | 1 + .../nodes/Brevo/BrevoTrigger.node.ts | 1 + .../nodes/Brevo/EmailDescription.ts | 1 + .../nodes-base/nodes/Bubble/Bubble.node.ts | 1 - .../nodes/Bubble/GenericFunctions.ts | 6 +- .../nodes/CircleCi/CircleCi.node.ts | 3 +- .../nodes/Cisco/Webex/CiscoWebex.node.ts | 5 +- .../nodes/Cisco/Webex/GenericFunctions.ts | 4 +- .../nodes/Clearbit/Clearbit.node.ts | 4 +- .../nodes-base/nodes/ClickUp/ClickUp.node.ts | 41 +++-------- .../nodes/Clockify/Clockify.node.ts | 22 ++---- .../nodes/Clockify/ClockifyTrigger.node.ts | 4 +- .../nodes-base/nodes/Clockify/UserDtos.ts | 1 + .../nodes/Cloudflare/Cloudflare.node.ts | 1 - .../nodes-base/nodes/Cockpit/Cockpit.node.ts | 1 + .../nodes/Cockpit/CollectionFunctions.ts | 1 + .../nodes-base/nodes/Cockpit/FormFunctions.ts | 1 + .../nodes/Cockpit/SingletonFunctions.ts | 1 + packages/nodes-base/nodes/Coda/Coda.node.ts | 5 +- .../nodes/Code/JavaScriptSandbox.ts | 6 +- .../nodes-base/nodes/Code/PythonSandbox.ts | 1 + .../nodes/Code/test/Code.node.test.ts | 8 ++- .../nodes-base/nodes/Code/test/utils.test.ts | 1 + .../nodes/CoinGecko/CoinGecko.node.ts | 4 +- .../CompareDatasets/CompareDatasets.node.ts | 1 + .../nodes/CompareDatasets/GenericFunctions.ts | 8 +-- .../CompareDatasets/test/utils/utils.test.ts | 1 + .../nodes/Compression/Compression.node.ts | 8 +-- .../Compression/test/node/Compression.test.ts | 8 +-- .../nodes/Contentful/Contentful.node.ts | 7 +- .../nodes/ConvertKit/ConvertKit.node.ts | 7 +- .../ConvertKit/ConvertKitTrigger.node.ts | 2 +- .../nodes-base/nodes/Copper/Copper.node.ts | 17 +++-- .../nodes/Copper/GenericFunctions.ts | 6 +- .../Copper/descriptions/CompanyDescription.ts | 3 +- .../nodes-base/nodes/Cortex/Cortex.node.ts | 13 ++-- .../nodes/Cortex/GenericFunctions.ts | 3 +- .../nodes-base/nodes/CrateDb/CrateDb.node.ts | 2 +- .../nodes/CrowdDev/CrowdDev.node.ts | 1 + .../CrowdDev/descriptions/activityFields.ts | 3 +- .../CrowdDev/descriptions/automationFields.ts | 3 +- .../nodes/CrowdDev/descriptions/index.ts | 5 +- .../CrowdDev/descriptions/memberFields.ts | 5 +- .../nodes/CrowdDev/descriptions/noteFields.ts | 3 +- .../descriptions/organizationFields.ts | 3 +- .../nodes/CrowdDev/descriptions/taskFields.ts | 3 +- .../nodes-base/nodes/Crypto/Crypto.node.ts | 4 +- .../nodes/Crypto/test/Crypto.test.ts | 1 + .../nodes/CustomerIo/CustomerIo.node.ts | 3 +- .../nodes/CustomerIo/GenericFunctions.ts | 3 +- .../nodes/DateTime/V1/DateTimeV1.node.ts | 10 +-- .../nodes/DateTime/V2/AddToDateDescription.ts | 1 + .../DateTime/V2/CurrentDateDescription.ts | 1 + .../nodes/DateTime/V2/DateTimeV2.node.ts | 16 ++--- .../DateTime/V2/ExtractDateDescription.ts | 1 + .../DateTime/V2/FormatDateDescription.ts | 1 + .../nodes/DateTime/V2/GetTimeBetweenDates.ts | 1 + .../nodes/DateTime/V2/RoundDateDescription.ts | 1 + .../V2/SubtractFromDateDescription.ts | 1 + .../nodes/DateTime/test/node/DateTime.test.ts | 1 + .../nodes/DebugHelper/DebugHelper.node.ts | 5 +- packages/nodes-base/nodes/DeepL/DeepL.node.ts | 1 - packages/nodes-base/nodes/Demio/Demio.node.ts | 4 +- .../test/v2/node/channel/create.test.ts | 6 +- .../v2/node/channel/deleteChannel.test.ts | 6 +- .../Discord/test/v2/node/channel/get.test.ts | 6 +- .../test/v2/node/channel/getAll.test.ts | 6 +- .../test/v2/node/channel/update.test.ts | 6 +- .../test/v2/node/member/getAll.test.ts | 6 +- .../test/v2/node/member/roleAdd.test.ts | 6 +- .../test/v2/node/member/roleRemove.test.ts | 6 +- .../v2/node/message/deleteMessage.test.ts | 6 +- .../Discord/test/v2/node/message/get.test.ts | 6 +- .../test/v2/node/message/getAll.test.ts | 6 +- .../test/v2/node/message/react.test.ts | 6 +- .../Discord/test/v2/node/message/send.test.ts | 6 +- .../test/v2/node/webhook/sendLegacy.test.ts | 6 +- .../nodes/Discord/test/v2/utils.test.ts | 4 +- .../nodes/Discord/v1/DiscordV1.node.ts | 2 +- .../nodes/Discord/v2/DiscordV2.node.ts | 4 +- .../v2/actions/channel/create.operation.ts | 1 + .../channel/deleteChannel.operation.ts | 1 + .../v2/actions/channel/get.operation.ts | 1 + .../v2/actions/channel/getAll.operation.ts | 3 +- .../nodes/Discord/v2/actions/channel/index.ts | 4 +- .../v2/actions/channel/update.operation.ts | 1 + .../Discord/v2/actions/common.description.ts | 1 + .../v2/actions/member/getAll.operation.ts | 3 +- .../nodes/Discord/v2/actions/member/index.ts | 2 +- .../v2/actions/member/roleAdd.operation.ts | 1 + .../v2/actions/member/roleRemove.operation.ts | 1 + .../message/deleteMessage.operation.ts | 1 + .../v2/actions/message/get.operation.ts | 1 + .../v2/actions/message/getAll.operation.ts | 3 +- .../nodes/Discord/v2/actions/message/index.ts | 6 +- .../v2/actions/message/react.operation.ts | 1 + .../v2/actions/message/send.operation.ts | 16 ++--- .../nodes/Discord/v2/actions/router.ts | 9 ++- .../Discord/v2/actions/versionDescription.ts | 2 +- .../actions/webhook/sendLegacy.operation.ts | 5 +- .../nodes/Discord/v2/helpers/utils.ts | 7 +- .../nodes/Discord/v2/methods/listSearch.ts | 3 +- .../nodes/Discord/v2/methods/loadOptions.ts | 3 +- .../nodes/Discord/v2/transport/discord.api.ts | 3 +- .../nodes/Discourse/Discourse.node.ts | 9 +-- packages/nodes-base/nodes/Drift/Drift.node.ts | 3 +- .../nodes-base/nodes/E2eTest/E2eTest.node.ts | 1 + .../nodes-base/nodes/ERPNext/ERPNext.node.ts | 2 - .../nodes/EditImage/EditImage.node.ts | 8 +-- packages/nodes-base/nodes/Egoi/Egoi.node.ts | 3 +- .../ElasticSecurity/ElasticSecurity.node.ts | 16 ++--- .../ElasticSecurity/GenericFunctions.ts | 5 +- .../Elasticsearch/Elasticsearch.node.ts | 6 +- .../Elastic/Elasticsearch/GenericFunctions.ts | 10 ++- .../EmailReadImap/v1/EmailReadImapV1.node.ts | 16 ++--- .../EmailReadImap/v2/EmailReadImapV2.node.ts | 13 ++-- .../nodes/EmailSend/v1/EmailSendV1.node.ts | 1 - .../nodes/EmailSend/v2/send.operation.ts | 2 +- .../nodes-base/nodes/Emelia/Emelia.node.ts | 6 +- .../ExecuteWorkflow/ExecuteWorkflow.node.ts | 3 +- .../nodes/Facebook/FacebookTrigger.node.ts | 5 +- .../nodes/Facebook/GenericFunctions.ts | 3 +- .../FacebookLeadAdsTrigger.node.ts | 1 + .../nodes/FacebookLeadAds/GenericFunctions.ts | 1 + .../FacebookLeadAds/methods/listSearch.ts | 1 + .../nodes/Figma/FigmaTrigger.node.ts | 2 +- .../Files/ConvertToFile/ConvertToFile.node.ts | 4 +- .../ConvertToFile/actions/iCall.operation.ts | 4 +- .../actions/spreadsheet.operation.ts | 3 +- .../actions/toBinary.operation.ts | 1 - .../ConvertToFile/actions/toJson.operation.ts | 2 +- .../ConvertToFile/actions/toText.operation.ts | 1 - .../actions/moveTo.operation.ts | 18 ++--- .../ExtractFromFile/actions/pdf.operation.ts | 6 +- .../ReadWriteFile/actions/read.operation.ts | 5 +- .../ReadWriteFile/actions/write.operation.ts | 5 +- .../ReadWriteFile/test/ReadWriteFile.test.ts | 2 +- .../nodes/Filter/V1/GenericFunctions.ts | 3 +- .../nodes/Filter/V2/FilterV2.node.ts | 3 +- packages/nodes-base/nodes/Flow/Flow.node.ts | 1 + packages/nodes-base/nodes/Form/Form.node.ts | 2 +- .../nodes-base/nodes/Form/FormTrigger.node.ts | 1 + .../nodes/Form/common.descriptions.ts | 1 + .../nodes-base/nodes/Form/test/utils.test.ts | 3 +- packages/nodes-base/nodes/Form/utils.ts | 10 ++- .../nodes/Form/v2/FormTriggerV2.node.ts | 2 +- .../nodes/Freshdesk/Freshdesk.node.ts | 6 +- .../nodes/Freshservice/Freshservice.node.ts | 30 ++++---- .../nodes/Freshservice/GenericFunctions.ts | 6 +- .../descriptions/RequesterDescription.ts | 1 + .../nodes/FreshworksCrm/FreshworksCrm.node.ts | 22 +++--- .../nodes/FreshworksCrm/GenericFunctions.ts | 2 +- .../descriptions/AppointmentDescription.ts | 1 - packages/nodes-base/nodes/Ftp/Ftp.node.ts | 13 ++-- .../nodes/Function/Function.node.ts | 1 + .../nodes/FunctionItem/FunctionItem.node.ts | 1 + .../nodes/GetResponse/GetResponse.node.ts | 5 +- packages/nodes-base/nodes/Ghost/Ghost.node.ts | 3 +- packages/nodes-base/nodes/Git/Git.node.ts | 4 +- .../nodes-base/nodes/Github/Github.node.ts | 2 +- .../nodes/Github/SearchFunctions.ts | 1 + .../nodes/GoToWebinar/GenericFunctions.ts | 6 +- .../nodes/GoToWebinar/GoToWebinar.node.ts | 29 ++++---- .../nodes/Gong/test/Gong.node.test.ts | 7 +- .../Analytics/v1/GoogleAnalyticsV1.node.ts | 10 +-- .../Analytics/v2/GoogleAnalyticsV2.node.ts | 3 +- .../v2/actions/report/Report.resource.ts | 1 + .../v2/actions/report/get.ga4.operation.ts | 13 ++-- .../actions/report/get.universal.operation.ts | 1 + .../Google/Analytics/v2/actions/router.ts | 2 +- .../userActivity/UserActivity.resource.ts | 1 + .../actions/userActivity/search.operation.ts | 1 + .../v2/actions/versionDescription.ts | 3 +- .../Google/Analytics/v2/helpers/utils.ts | 2 +- .../Google/Analytics/v2/methods/listSearch.ts | 1 + .../Analytics/v2/methods/loadOptions.ts | 1 + .../test/v2/node/executeQuery.test.ts | 7 +- .../test/v2/node/insert.autoMapMode.test.ts | 7 +- .../test/v2/node/insert.manualMode.test.ts | 7 +- .../BigQuery/test/v2/utils/utils.test.ts | 5 +- .../Google/BigQuery/v1/GenericFunctions.ts | 1 + .../BigQuery/v1/GoogleBigQueryV1.node.ts | 9 ++- .../BigQuery/v2/GoogleBigQueryV2.node.ts | 4 +- .../v2/actions/database/Database.resource.ts | 5 +- .../database/executeQuery.operation.ts | 6 +- .../v2/actions/database/insert.operation.ts | 4 +- .../Google/BigQuery/v2/actions/router.ts | 2 +- .../BigQuery/v2/actions/versionDescription.ts | 1 + .../nodes/Google/BigQuery/v2/helpers/utils.ts | 1 + .../Google/BigQuery/v2/methods/listSearch.ts | 1 + .../Google/BigQuery/v2/methods/loadOptions.ts | 1 + .../Google/BigQuery/v2/transport/index.ts | 1 + .../nodes/Google/Books/GenericFunctions.ts | 1 + .../Google/Calendar/CalendarDescription.ts | 1 + .../nodes/Google/Calendar/GenericFunctions.ts | 3 +- .../Google/Calendar/GoogleCalendar.node.ts | 15 ++-- .../Calendar/GoogleCalendarTrigger.node.ts | 3 +- .../Calendar/test/node/event.update.test.ts | 3 +- .../nodes/Google/Chat/GoogleChat.node.ts | 8 +-- .../GoogleCloudNaturalLanguage.node.ts | 3 +- .../Google/CloudStorage/ObjectDescription.ts | 2 +- .../Google/Contacts/GoogleContacts.node.ts | 5 +- .../nodes/Google/Docs/GoogleDocs.node.ts | 4 +- .../Google/Drive/GoogleDriveTrigger.node.ts | 4 +- .../Drive/test/v2/node/drive/create.test.ts | 2 - .../test/v2/node/drive/deleteDrive.test.ts | 2 - .../Drive/test/v2/node/drive/get.test.ts | 2 - .../Drive/test/v2/node/drive/list.test.ts | 4 +- .../Drive/test/v2/node/drive/update.test.ts | 2 - .../Drive/test/v2/node/file/copy.test.ts | 2 - .../test/v2/node/file/createFromText.test.ts | 2 - .../test/v2/node/file/deleteFile.test.ts | 2 - .../Drive/test/v2/node/file/download.test.ts | 2 - .../Drive/test/v2/node/file/move.test.ts | 4 +- .../Drive/test/v2/node/file/share.test.ts | 2 - .../Drive/test/v2/node/file/update.test.ts | 2 - .../Drive/test/v2/node/file/upload.test.ts | 6 +- .../test/v2/node/fileFolder/search.test.ts | 4 +- .../Drive/test/v2/node/folder/create.test.ts | 2 - .../test/v2/node/folder/deleteFolder.test.ts | 2 - .../Drive/test/v2/node/folder/share.test.ts | 2 - .../Google/Drive/test/v2/node/helpers.ts | 3 +- .../Google/Drive/v1/GoogleDriveV1.node.ts | 11 ++- .../nodes/Google/Drive/v1/SearchFunctions.ts | 1 + .../Google/Drive/v2/GoogleDriveV2.node.ts | 2 +- .../Drive/v2/actions/common.descriptions.ts | 3 +- .../v2/actions/drive/create.operation.ts | 5 +- .../v2/actions/drive/deleteDrive.operation.ts | 3 +- .../Drive/v2/actions/drive/get.operation.ts | 3 +- .../Drive/v2/actions/drive/list.operation.ts | 3 +- .../v2/actions/drive/update.operation.ts | 3 +- .../Drive/v2/actions/file/copy.operation.ts | 5 +- .../actions/file/createFromText.operation.ts | 7 +- .../v2/actions/file/deleteFile.operation.ts | 3 +- .../v2/actions/file/download.operation.ts | 3 +- .../Drive/v2/actions/file/move.operation.ts | 7 +- .../Drive/v2/actions/file/share.operation.ts | 3 +- .../Drive/v2/actions/file/update.operation.ts | 3 +- .../Drive/v2/actions/file/upload.operation.ts | 7 +- .../v2/actions/fileFolder/search.operation.ts | 9 +-- .../v2/actions/folder/create.operation.ts | 7 +- .../actions/folder/deleteFolder.operation.ts | 3 +- .../v2/actions/folder/share.operation.ts | 3 +- .../nodes/Google/Drive/v2/actions/router.ts | 3 +- .../nodes/Google/Drive/v2/helpers/utils.ts | 2 +- .../Google/Drive/v2/methods/listSearch.ts | 3 +- .../nodes/Google/Drive/v2/transport/index.ts | 1 + .../CloudFirestore/GenericFunctions.ts | 2 +- .../GoogleFirebaseCloudFirestore.node.ts | 8 +-- .../Google/GSuiteAdmin/GSuiteAdmin.node.ts | 4 +- .../nodes/Google/GenericFunctions.ts | 7 +- .../nodes/Google/Gmail/GenericFunctions.ts | 15 ++-- .../nodes/Google/Gmail/GmailTrigger.node.ts | 2 +- .../Google/Gmail/test/GmailTrigger.test.ts | 2 +- .../nodes/Google/Gmail/test/v2/utils.test.ts | 5 +- .../nodes/Google/Gmail/v1/GmailV1.node.ts | 18 ++--- .../nodes/Google/Gmail/v2/GmailV2.node.ts | 2 +- .../Google/Gmail/v2/MessageDescription.ts | 1 + .../Perspective/GooglePerspective.node.ts | 5 +- .../Google/Sheet/GoogleSheetsTrigger.node.ts | 13 ++-- .../Google/Sheet/GoogleSheetsTrigger.utils.ts | 6 +- .../nodes/Google/Sheet/v1/GenericFunctions.ts | 1 + .../nodes/Google/Sheet/v1/GoogleSheet.ts | 3 +- .../Google/Sheet/v1/GoogleSheetsV1.node.ts | 8 +-- .../Google/Sheet/v2/GoogleSheetsV2.node.ts | 3 +- .../nodes/Google/Sheet/v2/actions/router.ts | 9 +-- .../Sheet/v2/actions/sheet/Sheet.resource.ts | 3 +- .../v2/actions/sheet/append.operation.ts | 5 +- .../actions/sheet/appendOrUpdate.operation.ts | 15 ++-- .../Sheet/v2/actions/sheet/clear.operation.ts | 3 +- .../v2/actions/sheet/create.operation.ts | 9 +-- .../v2/actions/sheet/delete.operation.ts | 7 +- .../Sheet/v2/actions/sheet/read.operation.ts | 14 ++-- .../v2/actions/sheet/remove.operation.ts | 5 +- .../v2/actions/sheet/update.operation.ts | 5 +- .../spreadsheet/SpreadSheet.resource.ts | 1 + .../actions/spreadsheet/create.operation.ts | 3 +- .../actions/spreadsheet/delete.operation.ts | 5 +- .../Google/Sheet/v2/helpers/GoogleSheet.ts | 3 +- .../Sheet/v2/helpers/GoogleSheets.utils.ts | 1 + .../Google/Sheet/v2/methods/listSearch.ts | 1 + .../Google/Sheet/v2/methods/loadOptions.ts | 3 +- .../Sheet/v2/methods/resourceMapping.ts | 1 + .../nodes/Google/Sheet/v2/transport/index.ts | 3 +- .../nodes/Google/Task/GoogleTasks.node.ts | 1 - .../nodes/Google/YouTube/YouTube.node.ts | 21 +++--- .../nodes-base/nodes/Grafana/Grafana.node.ts | 4 +- .../nodes/Grist/GenericFunctions.ts | 5 +- packages/nodes-base/nodes/Grist/Grist.node.ts | 2 - .../nodes-base/nodes/HaloPSA/HaloPSA.node.ts | 1 - .../nodes-base/nodes/Harvest/Harvest.node.ts | 12 +--- .../nodes/HelpScout/GenericFunctions.ts | 3 +- .../nodes/HelpScout/HelpScout.node.ts | 24 +++---- .../nodes/HighLevel/v1/GenericFunctions.ts | 5 +- .../v1/description/ContactDescription.ts | 1 + .../nodes/HighLevel/v2/GenericFunctions.ts | 5 +- .../v2/description/ContactDescription.ts | 1 + .../nodes/HomeAssistant/HomeAssistant.node.ts | 22 ++---- packages/nodes-base/nodes/Html/Html.node.ts | 10 +-- packages/nodes-base/nodes/Html/utils.ts | 3 +- .../nodes/HtmlExtract/HtmlExtract.node.ts | 3 +- .../nodes/HttpRequest/GenericFunctions.ts | 13 ++-- .../HttpRequest/V1/HttpRequestV1.node.ts | 3 +- .../HttpRequest/V2/HttpRequestV2.node.ts | 3 +- .../HttpRequest/V3/HttpRequestV3.node.ts | 2 +- .../test/binaryData/HttpRequest.test.ts | 1 + .../test/encoding/HttpRequest.test.ts | 1 + .../test/encodingQuoted/HttpRequest.test.ts | 1 + .../HttpRequest/test/node/HttpRequest.test.ts | 3 +- .../nodes-base/nodes/Hubspot/Hubspot.node.ts | 1 - .../nodes/Hubspot/V1/GenericFunctions.ts | 3 +- .../nodes/Hubspot/V1/HubspotV1.node.ts | 27 +++----- .../nodes/Hubspot/V2/GenericFunctions.ts | 3 +- .../nodes/Hubspot/V2/HubspotV2.node.ts | 30 +++----- .../nodes/HumanticAI/HumanticAi.node.ts | 1 - .../nodes-base/nodes/Hunter/Hunter.node.ts | 1 + .../nodes/ICalendar/createEvent.operation.ts | 7 +- .../ICalendar/test/node/ICalendar.test.ts | 5 +- packages/nodes-base/nodes/If/V2/IfV2.node.ts | 3 +- .../nodes/Intercom/Intercom.node.ts | 7 +- .../nodes/InvoiceNinja/GenericFunctions.ts | 3 +- .../nodes/InvoiceNinja/InvoiceNinja.node.ts | 43 ++++-------- .../nodes/ItemLists/V1/ItemListsV1.node.ts | 22 +++--- .../nodes/ItemLists/V1/summarize.operation.ts | 3 +- .../nodes/ItemLists/V2/ItemListsV2.node.ts | 22 +++--- .../nodes/ItemLists/V2/summarize.operation.ts | 3 +- .../nodes/ItemLists/V3/ItemListsV3.node.ts | 2 +- .../itemList/concatenateItems.operation.ts | 8 +-- .../V3/actions/itemList/limit.operation.ts | 1 + .../itemList/removeDuplicates.operation.ts | 8 +-- .../V3/actions/itemList/sort.operation.ts | 9 ++- .../itemList/splitOutItems.operation.ts | 9 +-- .../actions/itemList/summarize.operation.ts | 5 +- .../nodes/ItemLists/V3/actions/router.ts | 2 +- .../nodes/Iterable/Iterable.node.ts | 7 +- packages/nodes-base/nodes/Jira/Jira.node.ts | 8 +-- packages/nodes-base/nodes/Jwt/Jwt.node.ts | 3 +- packages/nodes-base/nodes/Kafka/Kafka.node.ts | 5 +- .../nodes/Kafka/KafkaTrigger.node.ts | 4 +- .../nodes-base/nodes/Keap/GenericFunctions.ts | 3 +- packages/nodes-base/nodes/Keap/Keap.node.ts | 41 ++++------- .../nodes-base/nodes/Keap/KeapTrigger.node.ts | 2 +- .../nodes/Kitemaker/Kitemaker.node.ts | 5 +- .../nodes/KoBoToolbox/GenericFunctions.ts | 31 ++++----- .../nodes/KoBoToolbox/KoBoToolbox.node.ts | 10 +-- .../KoBoToolbox/KoBoToolboxTrigger.node.ts | 1 - packages/nodes-base/nodes/Ldap/Ldap.node.ts | 4 +- .../nodes/Lemlist/GenericFunctions.ts | 3 +- .../Lemlist/test/GenericFunctions.test.ts | 1 + .../nodes/Lemlist/v1/LemlistV1.node.ts | 6 +- .../nodes/Lemlist/v2/LemlistV2.node.ts | 6 +- packages/nodes-base/nodes/Line/Line.node.ts | 1 - .../nodes/Linear/GenericFunctions.ts | 3 +- .../nodes-base/nodes/Linear/Linear.node.ts | 2 - .../nodes/LinkedIn/LinkedIn.node.ts | 1 + .../LocalFileTrigger/LocalFileTrigger.node.ts | 3 +- .../nodes/LoneScale/GenericFunctions.ts | 1 + .../nodes/MQTT/test/Mqtt.node.test.ts | 4 +- .../nodes/MQTT/test/MqttTrigger.node.test.ts | 4 +- .../nodes/Magento/GenericFunctions.ts | 1 + .../nodes-base/nodes/Magento/Magento2.node.ts | 13 ++-- .../nodes/Mailcheck/GenericFunctions.ts | 1 - .../nodes/Mailchimp/Mailchimp.node.ts | 2 +- .../nodes/Mailchimp/MailchimpTrigger.node.ts | 1 + .../nodes-base/nodes/Mailjet/Mailjet.node.ts | 4 +- .../nodes/Mandrill/Mandrill.node.ts | 7 +- .../nodes/Markdown/Markdown.node.ts | 9 +-- .../nodes/Marketstack/Marketstack.node.ts | 2 - .../nodes/Matrix/GenericFunctions.ts | 1 - .../nodes-base/nodes/Matrix/Matrix.node.ts | 8 +-- .../nodes/Mattermost/v1/MattermostV1.node.ts | 2 +- .../v1/actions/channel/addUser/index.ts | 2 +- .../v1/actions/channel/create/index.ts | 2 +- .../v1/actions/channel/del/index.ts | 2 +- .../Mattermost/v1/actions/channel/index.ts | 5 +- .../v1/actions/channel/members/index.ts | 2 +- .../v1/actions/channel/restore/index.ts | 2 +- .../v1/actions/channel/search/index.ts | 2 +- .../v1/actions/channel/statistics/index.ts | 2 +- .../v1/actions/message/del/index.ts | 2 +- .../Mattermost/v1/actions/message/index.ts | 1 + .../v1/actions/message/post/execute.ts | 1 - .../v1/actions/message/post/index.ts | 2 +- .../v1/actions/message/postEphemeral/index.ts | 2 +- .../v1/actions/reaction/create/index.ts | 2 +- .../v1/actions/reaction/del/index.ts | 2 +- .../v1/actions/reaction/getAll/index.ts | 2 +- .../Mattermost/v1/actions/reaction/index.ts | 1 + .../nodes/Mattermost/v1/actions/router.ts | 2 +- .../v1/actions/user/create/index.ts | 2 +- .../v1/actions/user/deactive/index.ts | 2 +- .../v1/actions/user/getAll/execute.ts | 2 +- .../v1/actions/user/getAll/index.ts | 2 +- .../v1/actions/user/getByEmail/index.ts | 2 +- .../v1/actions/user/getById/index.ts | 2 +- .../nodes/Mattermost/v1/actions/user/index.ts | 1 + .../v1/actions/user/invite/index.ts | 2 +- .../v1/actions/versionDescription.ts | 1 + .../nodes-base/nodes/Mautic/Mautic.node.ts | 20 ++---- .../nodes/Mautic/MauticTrigger.node.ts | 3 +- .../nodes/Merge/test/v3/operations.test.ts | 1 + .../nodes-base/nodes/Merge/v1/MergeV1.node.ts | 4 +- .../nodes-base/nodes/Merge/v2/MergeV2.node.ts | 8 +-- packages/nodes-base/nodes/Merge/v2/utils.ts | 14 ++-- .../nodes-base/nodes/Merge/v3/MergeV3.node.ts | 2 +- .../nodes/Merge/v3/actions/mode/append.ts | 3 +- .../Merge/v3/actions/mode/chooseBranch.ts | 3 +- .../nodes/Merge/v3/actions/mode/combineAll.ts | 6 +- .../Merge/v3/actions/mode/combineByFields.ts | 5 +- .../v3/actions/mode/combineByPosition.ts | 6 +- .../Merge/v3/actions/mode/combineBySql.ts | 7 +- .../nodes/Merge/v3/actions/mode/index.ts | 2 +- .../nodes/Merge/v3/actions/router.ts | 5 +- .../Merge/v3/actions/versionDescription.ts | 2 +- .../nodes/Merge/v3/helpers/utils.ts | 14 ++-- .../nodes/Metabase/Metabase.node.ts | 9 +-- .../Dynamics/MicrosoftDynamicsCrm.node.ts | 3 +- .../Excel/test/v2/node/table/addTable.test.ts | 7 +- .../Excel/test/v2/node/table/append.test.ts | 7 +- .../test/v2/node/table/convertToRange.test.ts | 7 +- .../test/v2/node/table/deleteTable.test.ts | 7 +- .../test/v2/node/table/getColumns.test.ts | 7 +- .../Excel/test/v2/node/table/getRows.test.ts | 7 +- .../Excel/test/v2/node/table/lookup.test.ts | 7 +- .../v2/node/workbook/addWorksheet.test.ts | 7 +- .../v2/node/workbook/deleteWorkbook.test.ts | 7 +- .../test/v2/node/workbook/getAll.test.ts | 7 +- .../test/v2/node/worksheet/append.test.ts | 3 +- .../test/v2/node/worksheet/clear.test.ts | 7 +- .../v2/node/worksheet/deleteWorksheet.test.ts | 7 +- .../test/v2/node/worksheet/getAll.test.ts | 7 +- .../test/v2/node/worksheet/readRows.test.ts | 3 +- .../test/v2/node/worksheet/update.test.ts | 3 +- .../test/v2/node/worksheet/upsert.test.ts | 3 +- .../Excel/test/v2/utils/utils.test.ts | 5 +- .../Excel/v1/MicrosoftExcelV1.node.ts | 13 ++-- .../Excel/v2/MicrosoftExcelV2.node.ts | 4 +- .../Microsoft/Excel/v2/actions/router.ts | 2 +- .../Excel/v2/actions/table/Table.resource.ts | 2 +- .../v2/actions/table/addTable.operation.ts | 4 +- .../v2/actions/table/append.operation.ts | 4 +- .../actions/table/convertToRange.operation.ts | 4 +- .../v2/actions/table/deleteTable.operation.ts | 4 +- .../v2/actions/table/getColumns.operation.ts | 4 +- .../v2/actions/table/getRows.operation.ts | 4 +- .../v2/actions/table/lookup.operation.ts | 4 +- .../workbook/addWorksheet.operation.ts | 4 +- .../workbook/deleteWorkbook.operation.ts | 4 +- .../v2/actions/workbook/getAll.operation.ts | 4 +- .../v2/actions/worksheet/append.operation.ts | 4 +- .../v2/actions/worksheet/clear.operation.ts | 4 +- .../worksheet/deleteWorksheet.operation.ts | 4 +- .../v2/actions/worksheet/getAll.operation.ts | 4 +- .../actions/worksheet/readRows.operation.ts | 4 +- .../v2/actions/worksheet/update.operation.ts | 4 +- .../v2/actions/worksheet/upsert.operation.ts | 4 +- .../nodes/Microsoft/Excel/v2/helpers/utils.ts | 4 +- .../Microsoft/Excel/v2/methods/listSearch.ts | 1 + .../Microsoft/Excel/v2/methods/loadOptions.ts | 1 + .../MicrosoftGraphSecurity.node.ts | 11 ++- .../Microsoft/OneDrive/GenericFunctions.ts | 2 +- .../OneDrive/MicrosoftOneDrive.node.ts | 4 +- .../OneDrive/MicrosoftOneDriveTrigger.node.ts | 4 +- .../Microsoft/OneDrive/TriggerDescription.ts | 1 + .../Outlook/MicrosoftOutlookTrigger.node.ts | 6 +- .../test/v2/node/calendar/create.test.ts | 7 +- .../test/v2/node/calendar/delete.test.ts | 7 +- .../Outlook/test/v2/node/calendar/get.test.ts | 7 +- .../test/v2/node/calendar/getAll.test.ts | 7 +- .../test/v2/node/calendar/update.test.ts | 7 +- .../test/v2/node/contact/create.test.ts | 7 +- .../test/v2/node/contact/update.test.ts | 7 +- .../Outlook/test/v2/node/draft/create.test.ts | 7 +- .../Outlook/test/v2/node/draft/send.test.ts | 7 +- .../Outlook/test/v2/node/event/create.test.ts | 7 +- .../test/v2/node/folder/create.test.ts | 7 +- .../test/v2/node/folderMessage/getAll.test.ts | 7 +- .../Outlook/test/v2/node/message/move.test.ts | 7 +- .../test/v2/node/message/reply.test.ts | 7 +- .../Outlook/test/v2/node/message/send.test.ts | 7 +- .../Outlook/trigger/GenericFunctions.ts | 3 +- .../Outlook/trigger/MessageDescription.ts | 1 + .../Outlook/v1/MicrosoftOutlookV1.node.ts | 20 ++---- .../Outlook/v2/MicrosoftOutlookV2.node.ts | 2 +- .../v2/actions/calendar/create.operation.ts | 4 +- .../v2/actions/calendar/delete.operation.ts | 6 +- .../v2/actions/calendar/get.operation.ts | 6 +- .../v2/actions/calendar/getAll.operation.ts | 6 +- .../Outlook/v2/actions/calendar/index.ts | 3 +- .../v2/actions/calendar/update.operation.ts | 6 +- .../v2/actions/contact/create.operation.ts | 6 +- .../v2/actions/contact/delete.operation.ts | 6 +- .../v2/actions/contact/get.operation.ts | 6 +- .../v2/actions/contact/getAll.operation.ts | 6 +- .../Outlook/v2/actions/contact/index.ts | 3 +- .../v2/actions/contact/update.operation.ts | 6 +- .../v2/actions/draft/create.operation.ts | 4 +- .../v2/actions/draft/delete.operation.ts | 6 +- .../Outlook/v2/actions/draft/get.operation.ts | 6 +- .../Outlook/v2/actions/draft/index.ts | 1 + .../v2/actions/draft/send.operation.ts | 6 +- .../v2/actions/draft/update.operation.ts | 6 +- .../v2/actions/event/create.operation.ts | 10 +-- .../v2/actions/event/delete.operation.ts | 6 +- .../Outlook/v2/actions/event/get.operation.ts | 6 +- .../v2/actions/event/getAll.operation.ts | 6 +- .../Outlook/v2/actions/event/index.ts | 3 +- .../v2/actions/event/update.operation.ts | 7 +- .../v2/actions/folder/create.operation.ts | 6 +- .../v2/actions/folder/delete.operation.ts | 6 +- .../v2/actions/folder/get.operation.ts | 6 +- .../v2/actions/folder/getAll.operation.ts | 6 +- .../Outlook/v2/actions/folder/index.ts | 1 + .../v2/actions/folder/update.operation.ts | 6 +- .../actions/folderMessage/getAll.operation.ts | 7 +- .../Outlook/v2/actions/folderMessage/index.ts | 1 + .../v2/actions/message/delete.operation.ts | 6 +- .../v2/actions/message/get.operation.ts | 6 +- .../v2/actions/message/getAll.operation.ts | 6 +- .../Outlook/v2/actions/message/index.ts | 1 + .../v2/actions/message/move.operation.ts | 6 +- .../v2/actions/message/reply.operation.ts | 6 +- .../v2/actions/message/send.operation.ts | 4 +- .../v2/actions/message/update.operation.ts | 6 +- .../messageAttachment/add.operation.ts | 6 +- .../messageAttachment/download.operation.ts | 6 +- .../messageAttachment/get.operation.ts | 6 +- .../messageAttachment/getAll.operation.ts | 6 +- .../v2/actions/messageAttachment/index.ts | 1 + .../Outlook/v2/actions/node.description.ts | 1 + .../Microsoft/Outlook/v2/actions/router.ts | 2 +- .../Outlook/v2/methods/listSearch.ts | 3 +- .../Outlook/v2/methods/loadOptions.ts | 1 + .../Microsoft/Outlook/v2/transport/index.ts | 1 + .../Teams/test/v2/node/channel/create.test.ts | 6 +- .../v2/node/channel/deleteChannel.test.ts | 6 +- .../Teams/test/v2/node/channel/get.test.ts | 6 +- .../Teams/test/v2/node/channel/getAll.test.ts | 6 +- .../Teams/test/v2/node/channel/update.test.ts | 6 +- .../v2/node/channelMessage/create.test.ts | 6 +- .../v2/node/channelMessage/getAll.test.ts | 6 +- .../test/v2/node/chatMessage/create.test.ts | 6 +- .../test/v2/node/chatMessage/get.test.ts | 6 +- .../test/v2/node/chatMessage/getAll.test.ts | 6 +- .../Teams/test/v2/node/task/create.test.ts | 6 +- .../test/v2/node/task/deleteTask.test.ts | 6 +- .../Teams/test/v2/node/task/get.test.ts | 6 +- .../Teams/test/v2/node/task/getAll.test.ts | 6 +- .../Teams/test/v2/node/task/update.test.ts | 6 +- .../Teams/v1/MicrosoftTeamsV1.node.ts | 12 ++-- .../Teams/v2/MicrosoftTeamsV2.node.ts | 2 +- .../v2/actions/channel/create.operation.ts | 6 +- .../channel/deleteChannel.operation.ts | 6 +- .../Teams/v2/actions/channel/get.operation.ts | 6 +- .../v2/actions/channel/getAll.operation.ts | 8 ++- .../v2/actions/channel/update.operation.ts | 6 +- .../channelMessage/create.operation.ts | 6 +- .../channelMessage/getAll.operation.ts | 8 ++- .../actions/chatMessage/create.operation.ts | 6 +- .../v2/actions/chatMessage/get.operation.ts | 6 +- .../actions/chatMessage/getAll.operation.ts | 8 ++- .../Microsoft/Teams/v2/actions/router.ts | 3 +- .../Teams/v2/actions/task/create.operation.ts | 6 +- .../v2/actions/task/deleteTask.operation.ts | 4 +- .../Teams/v2/actions/task/get.operation.ts | 4 +- .../Teams/v2/actions/task/getAll.operation.ts | 6 +- .../Teams/v2/actions/task/update.operation.ts | 6 +- .../Microsoft/Teams/v2/methods/listSearch.ts | 3 +- .../Microsoft/Teams/v2/transport/index.ts | 1 + .../Microsoft/ToDo/MicrosoftToDo.node.ts | 7 +- .../nodes-base/nodes/Misp/GenericFunctions.ts | 7 +- packages/nodes-base/nodes/Misp/Misp.node.ts | 18 +++-- .../Misp/descriptions/AttributeDescription.ts | 3 +- .../Misp/descriptions/EventDescription.ts | 3 +- .../Misp/descriptions/ObjectDescription.ts | 3 +- .../nodes/MondayCom/GenericFunctions.ts | 3 +- .../nodes/MondayCom/MondayCom.node.ts | 16 ++--- .../nodes/MongoDb/GenericFunctions.ts | 12 ++-- .../nodes-base/nodes/MongoDb/MongoDb.node.ts | 22 +++--- .../nodes/MonicaCrm/MonicaCrm.node.ts | 14 ++-- .../MoveBinaryData/MoveBinaryData.node.ts | 4 +- .../test/MoveBinaryData.test.ts | 3 +- .../nodes/MySql/test/v1/executeQuery.test.ts | 4 +- .../nodes/MySql/test/v2/operations.test.ts | 7 +- .../nodes/MySql/test/v2/runQueries.test.ts | 9 +-- .../nodes/MySql/test/v2/utils.test.ts | 2 +- .../nodes/MySql/v1/GenericFunctions.ts | 2 +- .../nodes-base/nodes/MySql/v1/MySqlV1.node.ts | 7 +- .../nodes-base/nodes/MySql/v2/MySqlV2.node.ts | 6 +- .../MySql/v2/actions/common.descriptions.ts | 1 + .../v2/actions/database/Database.resource.ts | 2 +- .../actions/database/deleteTable.operation.ts | 5 +- .../database/executeQuery.operation.ts | 9 ++- .../v2/actions/database/insert.operation.ts | 6 +- .../v2/actions/database/select.operation.ts | 5 +- .../v2/actions/database/update.operation.ts | 5 +- .../v2/actions/database/upsert.operation.ts | 5 +- .../nodes/MySql/v2/actions/router.ts | 6 +- .../nodes/MySql/v2/helpers/utils.ts | 4 +- .../nodes/MySql/v2/methods/credentialTest.ts | 2 +- .../nodes/MySql/v2/methods/listSearch.ts | 3 +- .../nodes/MySql/v2/methods/loadOptions.ts | 5 +- .../nodes/MySql/v2/transport/index.ts | 7 +- .../nodes/N8n/CredentialDescription.ts | 1 + .../nodes/N8n/ExecutionDescription.ts | 1 + packages/nodes-base/nodes/N8n/N8n.node.ts | 1 + .../nodes/N8n/WorkflowDescription.ts | 1 + .../nodes-base/nodes/N8n/WorkflowLocator.ts | 1 + .../nodes/N8n/test/node/N8n.test.ts | 5 +- packages/nodes-base/nodes/Nasa/Nasa.node.ts | 2 +- .../nodes-base/nodes/Netlify/Netlify.node.ts | 4 +- .../nodes/Netlify/NetlifyTrigger.node.ts | 2 +- .../nodes/Netscaler/ADC/NetscalerAdc.node.ts | 6 +- .../nodes/NextCloud/NextCloud.node.ts | 5 +- .../nodes-base/nodes/NocoDB/NocoDB.node.ts | 1 - .../nodes/Notion/NotionTrigger.node.ts | 7 +- .../nodes/Notion/shared/GenericFunctions.ts | 12 ++-- .../Notion/shared/descriptions/Blocks.ts | 1 + .../descriptions/DatabaseDescription.ts | 1 + .../descriptions/DatabasePageDescription.ts | 4 +- .../nodes/Notion/shared/methods/listSearch.ts | 1 + .../Notion/test/GenericFunctions.test.ts | 9 +-- .../Notion/test/node/v2/block/append.test.ts | 3 +- .../Notion/test/node/v2/block/getAll.test.ts | 3 +- .../Notion/test/node/v2/database/get.test.ts | 3 +- .../test/node/v2/database/getAll.test.ts | 3 +- .../test/node/v2/database/search.test.ts | 3 +- .../test/node/v2/databasePage/create.test.ts | 3 +- .../test/node/v2/databasePage/get.test.ts | 3 +- .../test/node/v2/databasePage/getAll.test.ts | 3 +- .../test/node/v2/databasePage/update.test.ts | 3 +- .../Notion/test/node/v2/page/archive.test.ts | 3 +- .../Notion/test/node/v2/page/create.test.ts | 3 +- .../Notion/test/node/v2/page/search.test.ts | 3 +- .../Notion/test/node/v2/user/get.test.ts | 3 +- .../Notion/test/node/v2/user/getAll.test.ts | 3 +- .../nodes/Notion/v1/NotionV1.node.ts | 5 +- .../nodes/Notion/v1/VersionDescription.ts | 9 +-- .../nodes/Notion/v2/NotionV2.node.ts | 5 +- .../nodes/Notion/v2/VersionDescription.ts | 9 +-- .../nodes/Notion/v2/methods/loadOptions.ts | 3 +- packages/nodes-base/nodes/Npm/Npm.node.ts | 3 +- .../nodes/Npm/PackageDescription.ts | 2 +- .../nodes/Npm/test/Npm.node.test.ts | 3 +- packages/nodes-base/nodes/Odoo/Odoo.node.ts | 3 +- .../nodes/Odoo/descriptions/index.ts | 2 +- packages/nodes-base/nodes/Okta/Okta.node.ts | 1 + .../nodes-base/nodes/Okta/UserDescription.ts | 1 + .../nodes/Okta/test/UserFunctions.test.ts | 1 + .../nodes/Onfleet/GenericFunctions.ts | 3 +- .../nodes-base/nodes/Onfleet/Onfleet.node.ts | 29 ++------ packages/nodes-base/nodes/Onfleet/Onfleet.ts | 5 +- .../nodes/Onfleet/OnfleetTrigger.node.ts | 2 - .../Onfleet/descriptions/TaskDescription.ts | 1 - .../nodes/OpenAi/ChatDescription.ts | 1 + .../nodes/OpenAi/ImageDescription.ts | 1 + .../nodes-base/nodes/OpenAi/OpenAi.node.ts | 5 +- .../nodes/OpenAi/TextDescription.ts | 1 + packages/nodes-base/nodes/Orbit/Orbit.node.ts | 4 -- packages/nodes-base/nodes/Oura/Oura.node.ts | 4 +- .../nodes-base/nodes/Paddle/Paddle.node.ts | 7 +- .../nodes/PagerDuty/GenericFunctions.ts | 3 +- .../nodes/PagerDuty/PagerDuty.node.ts | 15 ++-- .../nodes-base/nodes/PayPal/PayPal.node.ts | 3 +- .../nodes/PayPal/PayPalTrigger.node.ts | 1 + .../Peekalink/test/Peekalink.node.test.ts | 6 +- .../nodes/Phantombuster/Phantombuster.node.ts | 3 +- .../nodes/PhilipsHue/PhilipsHue.node.ts | 1 - .../nodes/Pipedrive/Pipedrive.node.ts | 1 - .../nodes/Pipedrive/PipedriveTrigger.node.ts | 5 +- packages/nodes-base/nodes/Plivo/Plivo.node.ts | 7 +- .../nodes-base/nodes/PostBin/PostBin.node.ts | 1 - .../nodes-base/nodes/PostHog/PostHog.node.ts | 12 ++-- .../nodes/Postgres/PostgresTrigger.node.ts | 1 + .../nodes/Postgres/test/v2/operations.test.ts | 5 +- .../nodes/Postgres/test/v2/runQueries.test.ts | 6 +- .../nodes/Postgres/test/v2/utils.test.ts | 3 +- .../nodes/Postgres/v1/PostgresV1.node.ts | 5 +- .../nodes/Postgres/v1/genericFunctions.ts | 1 + .../nodes/Postgres/v2/PostgresV2.node.ts | 2 +- .../v2/actions/database/Database.resource.ts | 2 +- .../actions/database/deleteTable.operation.ts | 5 +- .../database/executeQuery.operation.ts | 5 +- .../v2/actions/database/insert.operation.ts | 5 +- .../v2/actions/database/select.operation.ts | 5 +- .../v2/actions/database/update.operation.ts | 5 +- .../v2/actions/database/upsert.operation.ts | 5 +- .../nodes/Postgres/v2/actions/router.ts | 9 ++- .../nodes/Postgres/v2/helpers/utils.ts | 2 +- .../Postgres/v2/methods/credentialTest.ts | 3 +- .../nodes/Postgres/v2/methods/listSearch.ts | 2 +- .../nodes/Postgres/v2/methods/loadOptions.ts | 2 +- .../Postgres/v2/methods/resourceMapping.ts | 3 +- .../nodes/Postgres/v2/transport/index.ts | 9 +-- .../nodes/ProfitWell/ProfitWell.node.ts | 4 +- .../nodes/Pushbullet/Pushbullet.node.ts | 2 +- .../nodes-base/nodes/QuestDb/QuestDb.node.ts | 1 - .../nodes/QuickBase/QuickBase.node.ts | 10 +-- .../nodes/QuickBooks/GenericFunctions.ts | 25 +++---- .../nodes/QuickBooks/QuickBooks.node.ts | 11 ++- .../Transaction/TransactionDescription.ts | 3 +- .../QuickChart/test/QuickChart.node.test.ts | 3 +- .../nodes/RabbitMQ/GenericFunctions.ts | 4 +- .../nodes/RabbitMQ/RabbitMQTrigger.node.ts | 1 - .../RabbitMQ/test/GenericFunctions.test.ts | 2 +- .../nodes/Raindrop/Raindrop.node.ts | 8 +-- .../test/ReadBinaryFile.test.ts | 3 +- .../ReadBinaryFiles/ReadBinaryFiles.node.ts | 2 +- .../test/ReadBinaryFiles.test.ts | 3 +- .../nodes-base/nodes/ReadPdf/ReadPDF.node.ts | 1 + .../nodes-base/nodes/Reddit/Reddit.node.ts | 5 -- packages/nodes-base/nodes/Redis/Redis.node.ts | 5 +- .../nodes/Redis/RedisTrigger.node.ts | 2 +- .../nodes/Redis/__tests__/Redis.node.test.ts | 2 +- .../Redis/__tests__/RedisTrigger.node.test.ts | 4 +- .../nodes/RenameKeys/RenameKeys.node.ts | 9 ++- .../RespondToWebhook/RespondToWebhook.node.ts | 13 ++-- .../nodes/RssFeedRead/RssFeedRead.node.ts | 4 +- .../RssFeedRead/RssFeedReadTrigger.node.ts | 2 +- .../RssFeedRead/test/RssFeedRead.test.ts | 3 +- .../RssFeedRead/test/node/RssFeedRead.test.ts | 1 + .../nodes-base/nodes/Rundeck/Rundeck.node.ts | 1 + .../nodes-base/nodes/S3/GenericFunctions.ts | 7 +- packages/nodes-base/nodes/S3/S3.node.ts | 15 ++-- .../nodes/Salesforce/GenericFunctions.ts | 10 ++- .../nodes/Salesforce/Salesforce.node.ts | 23 +------ .../Salesforce/SalesforceTrigger.node.ts | 3 +- .../nodes/Salesmate/Salesmate.node.ts | 13 ++-- .../nodes/Schedule/GenericFunctions.ts | 1 + .../nodes/Schedule/ScheduleTrigger.node.ts | 6 +- .../Schedule/test/GenericFunctions.test.ts | 1 + .../nodes/SeaTable/GenericFunctions.ts | 6 +- .../nodes/SeaTable/SeaTable.node.ts | 7 +- .../nodes/SeaTable/SeaTableTrigger.node.ts | 3 +- packages/nodes-base/nodes/SeaTable/types.ts | 1 + .../SecurityScorecard.node.ts | 10 +-- .../nodes-base/nodes/Segment/Segment.node.ts | 7 +- .../nodes/SendGrid/SendGrid.node.ts | 9 +-- packages/nodes-base/nodes/Sendy/Sendy.node.ts | 4 +- .../nodes/SentryIo/SentryIo.node.ts | 17 ++--- .../nodes/ServiceNow/ServiceNow.node.ts | 26 +++---- .../nodes/Set/test/v2/utils.test.ts | 7 +- .../nodes-base/nodes/Set/v1/SetV1.node.ts | 3 +- .../nodes-base/nodes/Set/v2/SetV2.node.ts | 3 +- .../nodes-base/nodes/Set/v2/helpers/utils.ts | 25 ++++--- .../nodes-base/nodes/Set/v2/manual.mode.ts | 4 +- packages/nodes-base/nodes/Set/v2/raw.mode.ts | 4 +- .../nodes/Shopify/GenericFunctions.ts | 3 +- .../nodes-base/nodes/Shopify/Shopify.node.ts | 6 +- .../nodes/Simulate/Simulate.node.ts | 2 +- .../nodes/Simulate/SimulateTrigger.node.ts | 1 + packages/nodes-base/nodes/Slack/Slack.node.ts | 1 - .../nodes/Slack/SlackTrigger.node.ts | 2 +- .../nodes/Slack/SlackTriggerHelpers.ts | 1 + .../nodes/Slack/V1/GenericFunctions.ts | 3 +- .../nodes-base/nodes/Slack/V1/SlackV1.node.ts | 24 +++---- .../nodes-base/nodes/Slack/V2/SlackV2.node.ts | 28 ++++---- .../test/v2/node/channel/archive.test.ts | 3 +- .../Slack/test/v2/node/channel/create.test.ts | 6 +- .../Slack/test/v2/node/channel/get.test.ts | 6 +- .../Slack/test/v2/node/channel/getAll.test.ts | 6 +- .../test/v2/node/channel/history.test.ts | 6 +- .../Slack/test/v2/node/file/upload.test.ts | 6 +- .../Slack/test/v2/node/message/delete.test.ts | 6 +- .../test/v2/node/message/getPermalink.test.ts | 6 +- .../Slack/test/v2/node/message/post.test.ts | 6 +- .../Slack/test/v2/node/message/search.test.ts | 6 +- .../Slack/test/v2/node/message/update.test.ts | 6 +- .../test/v2/node/user/updateProfile.test.ts | 6 +- .../nodes/Snowflake/Snowflake.node.ts | 4 +- .../nodes/Splunk/test/v2/node/alert.test.ts | 1 + .../nodes/Splunk/test/v2/node/report.test.ts | 3 +- .../nodes/Splunk/test/v2/node/search.test.ts | 1 + .../nodes/Splunk/test/v2/node/user.test.ts | 3 +- .../nodes/Splunk/test/v2/utils.test.ts | 3 +- .../nodes/Splunk/v1/GenericFunctions.ts | 1 - .../nodes/Splunk/v1/SplunkV1.node.ts | 26 ++++--- .../v2/actions/alert/getMetrics.operation.ts | 1 + .../v2/actions/alert/getReport.operation.ts | 1 + .../nodes/Splunk/v2/actions/alert/index.ts | 2 +- .../v2/actions/report/create.operation.ts | 3 +- .../actions/report/deleteReport.operation.ts | 3 +- .../Splunk/v2/actions/report/get.operation.ts | 3 +- .../v2/actions/report/getAll.operation.ts | 1 + .../nodes/Splunk/v2/actions/router.ts | 5 +- .../v2/actions/search/create.operation.ts | 1 + .../v2/actions/search/deleteJob.operation.ts | 3 +- .../Splunk/v2/actions/search/get.operation.ts | 3 +- .../v2/actions/search/getAll.operation.ts | 1 + .../v2/actions/search/getResult.operation.ts | 5 +- .../v2/actions/user/create.operation.ts | 3 +- .../v2/actions/user/deleteUser.operation.ts | 3 +- .../Splunk/v2/actions/user/get.operation.ts | 3 +- .../v2/actions/user/getAll.operation.ts | 3 +- .../v2/actions/user/update.operation.ts | 3 +- .../nodes/Splunk/v2/helpers/utils.ts | 3 +- .../nodes/Splunk/v2/methods/listSearch.ts | 1 + .../nodes/Splunk/v2/transport/index.ts | 10 ++- .../nodes-base/nodes/Spontit/Spontit.node.ts | 3 +- .../nodes/Spotify/GenericFunctions.ts | 3 +- .../nodes-base/nodes/Spotify/Spotify.node.ts | 4 +- .../test/SpreadsheetFile.test.ts | 5 +- .../v1/SpreadsheetFileV1.node.ts | 6 +- .../v2/SpreadsheetFileV2.node.ts | 2 +- .../SpreadsheetFile/v2/fromFile.operation.ts | 3 +- .../SpreadsheetFile/v2/toFile.operation.ts | 5 +- packages/nodes-base/nodes/Ssh/Ssh.node.ts | 7 +- .../nodes-base/nodes/Stackby/Stackby.node.ts | 2 +- .../test/node/StopAndError.test.ts | 3 +- .../nodes/Storyblok/Storyblok.node.ts | 2 - .../nodes-base/nodes/Strapi/Strapi.node.ts | 3 +- .../nodes-base/nodes/Strava/Strava.node.ts | 5 +- .../nodes-base/nodes/Stripe/Stripe.node.ts | 20 +++--- .../nodes/Supabase/Supabase.node.ts | 1 - .../SurveyMonkey/SurveyMonkeyTrigger.node.ts | 1 - .../nodes/Switch/V3/SwitchV3.node.ts | 6 +- .../nodes/SyncroMSP/v1/SyncroMspV1.node.ts | 2 +- .../v1/actions/contact/create/description.ts | 3 +- .../v1/actions/contact/create/index.ts | 2 +- .../SyncroMSP/v1/actions/contact/del/index.ts | 2 +- .../SyncroMSP/v1/actions/contact/get/index.ts | 2 +- .../v1/actions/contact/getAll/index.ts | 2 +- .../SyncroMSP/v1/actions/contact/index.ts | 7 +- .../v1/actions/contact/update/description.ts | 3 +- .../v1/actions/contact/update/index.ts | 2 +- .../v1/actions/customer/create/description.ts | 3 +- .../v1/actions/customer/create/index.ts | 2 +- .../v1/actions/customer/del/index.ts | 2 +- .../v1/actions/customer/get/index.ts | 2 +- .../v1/actions/customer/getAll/index.ts | 2 +- .../SyncroMSP/v1/actions/customer/index.ts | 5 +- .../v1/actions/customer/update/description.ts | 3 +- .../v1/actions/customer/update/index.ts | 2 +- .../SyncroMSP/v1/actions/rmm/create/index.ts | 2 +- .../SyncroMSP/v1/actions/rmm/del/index.ts | 2 +- .../SyncroMSP/v1/actions/rmm/get/index.ts | 2 +- .../SyncroMSP/v1/actions/rmm/getAll/index.ts | 2 +- .../nodes/SyncroMSP/v1/actions/rmm/index.ts | 5 +- .../SyncroMSP/v1/actions/rmm/mute/index.ts | 2 +- .../nodes/SyncroMSP/v1/actions/router.ts | 7 +- .../v1/actions/ticket/create/index.ts | 2 +- .../SyncroMSP/v1/actions/ticket/del/index.ts | 2 +- .../SyncroMSP/v1/actions/ticket/get/index.ts | 2 +- .../v1/actions/ticket/getAll/index.ts | 2 +- .../SyncroMSP/v1/actions/ticket/index.ts | 5 +- .../v1/actions/ticket/update/index.ts | 2 +- .../v1/actions/versionDescription.ts | 4 +- .../nodes/Taiga/GenericFunctions.ts | 1 - packages/nodes-base/nodes/Taiga/Taiga.node.ts | 15 ++-- .../nodes/Tapfiliate/Tapfiliate.node.ts | 5 +- .../nodes/Telegram/Telegram.node.ts | 5 +- .../nodes/Telegram/TelegramTrigger.node.ts | 1 - .../Telegram/tests/Workflow/workflow.test.ts | 5 +- .../nodes/TheHive/GenericFunctions.ts | 2 +- .../nodes-base/nodes/TheHive/TheHive.node.ts | 16 ++--- .../nodes/TheHive/TheHiveTrigger.node.ts | 1 + .../nodes/TheHive/interfaces/CaseInterface.ts | 1 + .../TheHiveProjectTrigger.node.ts | 3 +- .../actions/alert/create.operation.ts | 12 ++-- .../actions/alert/deleteAlert.operation.ts | 6 +- .../alert/executeResponder.operation.ts | 4 +- .../actions/alert/get.operation.ts | 6 +- .../TheHiveProject/actions/alert/index.ts | 6 +- .../actions/alert/merge.operation.ts | 6 +- .../actions/alert/promote.operation.ts | 6 +- .../actions/alert/search.operation.ts | 4 +- .../actions/alert/status.operation.ts | 6 +- .../actions/alert/update.operation.ts | 8 ++- .../actions/case/addAttachment.operation.ts | 6 +- .../actions/case/create.operation.ts | 6 +- .../case/deleteAttachment.operation.ts | 6 +- .../actions/case/deleteCase.operation.ts | 6 +- .../case/executeResponder.operation.ts | 4 +- .../actions/case/get.operation.ts | 6 +- .../actions/case/getAttachment.operation.ts | 6 +- .../actions/case/getTimeline.operation.ts | 6 +- .../TheHiveProject/actions/case/index.ts | 3 +- .../actions/case/search.operation.ts | 4 +- .../actions/case/update.operation.ts | 8 ++- .../actions/comment/add.operation.ts | 6 +- .../comment/deleteComment.operation.ts | 6 +- .../actions/comment/search.operation.ts | 6 +- .../actions/comment/update.operation.ts | 6 +- .../actions/log/addAttachment.operation.ts | 6 +- .../actions/log/create.operation.ts | 8 +-- .../actions/log/deleteAttachment.operation.ts | 6 +- .../actions/log/deleteLog.operation.ts | 6 +- .../actions/log/executeResponder.operation.ts | 4 +- .../actions/log/get.operation.ts | 6 +- .../actions/log/search.operation.ts | 6 +- .../actions/node.description.ts | 2 +- .../actions/observable/create.operation.ts | 9 +-- .../observable/deleteObservable.operation.ts | 6 +- .../observable/executeAnalyzer.operation.ts | 4 +- .../observable/executeResponder.operation.ts | 4 +- .../actions/observable/get.operation.ts | 6 +- .../actions/observable/search.operation.ts | 6 +- .../actions/observable/update.operation.ts | 8 ++- .../actions/page/create.operation.ts | 6 +- .../actions/page/deletePage.operation.ts | 6 +- .../actions/page/search.operation.ts | 6 +- .../actions/page/update.operation.ts | 6 +- .../actions/query/executeQuery.operation.ts | 3 +- .../nodes/TheHiveProject/actions/router.ts | 2 +- .../actions/task/create.operation.ts | 8 +-- .../actions/task/deleteTask.operation.ts | 6 +- .../task/executeResponder.operation.ts | 4 +- .../actions/task/get.operation.ts | 6 +- .../actions/task/search.operation.ts | 6 +- .../actions/task/update.operation.ts | 8 ++- .../descriptions/common.description.ts | 1 + .../nodes/TheHiveProject/helpers/utils.ts | 3 +- .../TheHiveProject/methods/listSearch.ts | 1 + .../TheHiveProject/methods/loadOptions.ts | 3 +- .../TheHiveProject/methods/resourceMapping.ts | 15 ++-- .../TheHiveProject/test/transport.test.ts | 2 +- .../TheHiveProject/transport/queryHelper.ts | 2 +- .../nodes/TimescaleDb/TimescaleDb.node.ts | 2 +- .../nodes/Todoist/v1/OperationHandler.ts | 3 +- .../nodes-base/nodes/Todoist/v1/Service.ts | 3 +- .../nodes/Todoist/v1/TodoistV1.node.ts | 3 +- .../nodes/Todoist/v2/OperationHandler.ts | 3 +- .../nodes-base/nodes/Todoist/v2/Service.ts | 3 +- .../nodes/Todoist/v2/TodoistV2.node.ts | 3 +- .../nodes/Toggl/TogglTrigger.node.ts | 4 +- packages/nodes-base/nodes/Totp/Totp.node.ts | 2 - .../nodes/Totp/test/Totp.node.test.ts | 2 +- .../Transform/Aggregate/Aggregate.node.ts | 4 +- .../nodes/Transform/Sort/Sort.node.ts | 4 +- .../nodes/Transform/SplitOut/SplitOut.node.ts | 1 + .../Transform/Summarize/Summarize.node.ts | 3 +- .../nodes/TravisCi/GenericFunctions.ts | 3 +- .../nodes/TravisCi/TravisCi.node.ts | 1 - .../nodes-base/nodes/Trello/Trello.node.ts | 12 +--- packages/nodes-base/nodes/Twist/Twist.node.ts | 9 +-- .../nodes-base/nodes/Twitter/Twitter.node.ts | 1 - .../nodes/Twitter/V1/TwitterV1.node.ts | 7 +- .../nodes/Twitter/V2/TwitterV2.node.ts | 11 ++- .../nodes/Twitter/test/Twitter.test.ts | 6 +- .../nodes-base/nodes/UProc/ToolDescription.ts | 1 - packages/nodes-base/nodes/UProc/UProc.node.ts | 2 - .../UnleashedSoftware/GenericFunctions.ts | 1 - .../UnleashedSoftware.node.ts | 4 +- .../nodes-base/nodes/Uplead/Uplead.node.ts | 3 +- .../nodes/UptimeRobot/UptimeRobot.node.ts | 10 +-- .../nodes/UrlScanIo/UrlScanIo.node.ts | 1 - .../Venafi/Datacenter/GenericFunctions.ts | 3 +- .../VenafiTlsProtectDatacenter.node.ts | 4 +- .../VenafiTlsProtectDatacenterTrigger.node.ts | 3 +- .../Venafi/ProtectCloud/GenericFunctions.ts | 6 +- .../VenafiTlsProtectCloud.node.ts | 13 ++-- packages/nodes-base/nodes/Vero/Vero.node.ts | 3 +- packages/nodes-base/nodes/Wait/Wait.node.ts | 21 +++--- .../nodes/Webflow/V1/WebflowV1.node.ts | 3 +- .../nodes/Webflow/V2/WebflowV2.node.ts | 5 +- .../nodes/Webflow/V2/actions/router.ts | 2 +- .../nodes/Webflow/WebflowTrigger.node.ts | 1 + .../nodes-base/nodes/Webhook/Webhook.node.ts | 7 +- .../nodes-base/nodes/Webhook/description.ts | 1 + .../nodes/Webhook/test/Webhook.test.ts | 6 +- .../nodes/Webhook/test/utils.test.ts | 1 + packages/nodes-base/nodes/Webhook/utils.ts | 9 +-- packages/nodes-base/nodes/Wekan/Wekan.node.ts | 12 +--- .../nodes/WhatsApp/GenericFunctions.ts | 1 + .../nodes/WhatsApp/MediaDescription.ts | 1 + .../nodes/WhatsApp/MediaFunctions.ts | 3 +- .../nodes/WhatsApp/MessagesDescription.ts | 1 + .../nodes/WhatsApp/WhatsApp.node.ts | 2 +- .../nodes/WhatsApp/WhatsAppTrigger.node.ts | 1 + .../nodes-base/nodes/Wise/GenericFunctions.ts | 1 - packages/nodes-base/nodes/Wise/Wise.node.ts | 7 +- .../nodes/WooCommerce/GenericFunctions.ts | 6 +- .../nodes/WooCommerce/WooCommerce.node.ts | 8 +-- .../nodes/Wordpress/Wordpress.node.ts | 10 +-- .../nodes/Workable/WorkableTrigger.node.ts | 2 +- .../WriteBinaryFile/WriteBinaryFile.node.ts | 3 +- .../test/WriteBinaryFile.test.ts | 3 +- .../nodes/Wufoo/WufooTrigger.node.ts | 1 - packages/nodes-base/nodes/Xero/Xero.node.ts | 10 +-- packages/nodes-base/nodes/Xml/Xml.node.ts | 2 +- .../nodes-base/nodes/Yourls/Yourls.node.ts | 1 - .../nodes/Zammad/GenericFunctions.ts | 13 ++-- .../nodes-base/nodes/Zammad/Zammad.node.ts | 2 - .../nodes-base/nodes/Zendesk/Zendesk.node.ts | 11 +-- .../nodes/Zendesk/ZendeskTrigger.node.ts | 3 +- .../nodes-base/nodes/Zoho/GenericFunctions.ts | 9 +-- .../nodes-base/nodes/Zoho/ZohoCrm.node.ts | 68 +++++++++---------- .../nodes/Zoho/descriptions/SharedFields.ts | 1 + packages/nodes-base/nodes/Zoom/Zoom.node.ts | 3 +- packages/nodes-base/nodes/Zulip/Zulip.node.ts | 5 +- packages/nodes-base/package.json | 4 +- .../test/nodes/Airtable/Airtable.node.test.ts | 1 + .../nodes-base/test/nodes/ExecuteWorkflow.ts | 3 +- packages/nodes-base/test/nodes/Helpers.ts | 14 ++-- .../Postgres/Postgres.node.functions.test.ts | 1 + .../test/nodes/Start/StartNode.test.ts | 2 +- packages/nodes-base/utils/binary.ts | 9 ++- .../utils/sendAndWait/test/util.test.ts | 1 + .../nodes-base/utils/sendAndWait/utils.ts | 9 +-- packages/nodes-base/utils/utilities.ts | 4 +- 1120 files changed, 2677 insertions(+), 2827 deletions(-) diff --git a/packages/@n8n/nodes-langchain/.eslintrc.js b/packages/@n8n/nodes-langchain/.eslintrc.js index 7ea76b12a9..510b970755 100644 --- a/packages/@n8n/nodes-langchain/.eslintrc.js +++ b/packages/@n8n/nodes-langchain/.eslintrc.js @@ -15,7 +15,6 @@ module.exports = { eqeqeq: 'warn', 'id-denylist': 'warn', 'import/extensions': 'warn', - 'import/order': 'warn', 'prefer-spread': 'warn', '@typescript-eslint/naming-convention': ['error', { selector: 'memberLike', format: null }], diff --git a/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.ts b/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.ts index 1f5ad6228a..46e4120764 100644 --- a/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.ts @@ -10,6 +10,7 @@ import { import { logWrapper } from '@utils/logWrapper'; import { N8nBinaryLoader } from '@utils/N8nBinaryLoader'; +import { N8nJsonLoader } from '@utils/N8nJsonLoader'; import { metadataFilterField } from '@utils/sharedFields'; // Dependencies needed underneath the hood for the loaders. We add them @@ -18,7 +19,6 @@ import { metadataFilterField } from '@utils/sharedFields'; import 'mammoth'; // for docx import 'epub2'; // for epub import 'pdf-parse'; // for pdf -import { N8nJsonLoader } from '@utils/N8nJsonLoader'; export class DocumentDefaultDataLoader implements INodeType { description: INodeTypeDescription = { diff --git a/packages/@n8n/nodes-langchain/package.json b/packages/@n8n/nodes-langchain/package.json index f19b8c0058..8945d9ba43 100644 --- a/packages/@n8n/nodes-langchain/package.json +++ b/packages/@n8n/nodes-langchain/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-metadata", "format": "biome format --write .", "format:check": "biome ci .", - "lint": "eslint nodes credentials --quiet", - "lintfix": "eslint nodes credentials --fix", + "lint": "eslint nodes credentials utils --quiet", + "lintfix": "eslint nodes credentials utils --fix", "watch": "tsc-watch -p tsconfig.build.json --onCompilationComplete \"tsc-alias -p tsconfig.build.json\" --onSuccess \"pnpm n8n-generate-metadata\"", "test": "jest", "test:dev": "jest --watch" diff --git a/packages/@n8n/nodes-langchain/utils/N8nBinaryLoader.ts b/packages/@n8n/nodes-langchain/utils/N8nBinaryLoader.ts index 53f4f95a74..cca2244793 100644 --- a/packages/@n8n/nodes-langchain/utils/N8nBinaryLoader.ts +++ b/packages/@n8n/nodes-langchain/utils/N8nBinaryLoader.ts @@ -1,5 +1,12 @@ -import { pipeline } from 'stream/promises'; +import { CSVLoader } from '@langchain/community/document_loaders/fs/csv'; +import { DocxLoader } from '@langchain/community/document_loaders/fs/docx'; +import { EPubLoader } from '@langchain/community/document_loaders/fs/epub'; +import { PDFLoader } from '@langchain/community/document_loaders/fs/pdf'; +import type { Document } from '@langchain/core/documents'; +import type { TextSplitter } from '@langchain/textsplitters'; import { createWriteStream } from 'fs'; +import { JSONLoader } from 'langchain/document_loaders/fs/json'; +import { TextLoader } from 'langchain/document_loaders/fs/text'; import type { IBinaryData, IExecuteFunctions, @@ -7,15 +14,7 @@ import type { ISupplyDataFunctions, } from 'n8n-workflow'; import { NodeOperationError, BINARY_ENCODING } from 'n8n-workflow'; - -import type { TextSplitter } from '@langchain/textsplitters'; -import type { Document } from '@langchain/core/documents'; -import { CSVLoader } from '@langchain/community/document_loaders/fs/csv'; -import { DocxLoader } from '@langchain/community/document_loaders/fs/docx'; -import { JSONLoader } from 'langchain/document_loaders/fs/json'; -import { PDFLoader } from '@langchain/community/document_loaders/fs/pdf'; -import { TextLoader } from 'langchain/document_loaders/fs/text'; -import { EPubLoader } from '@langchain/community/document_loaders/fs/epub'; +import { pipeline } from 'stream/promises'; import { file as tmpFile, type DirectoryResult } from 'tmp-promise'; import { getMetadataFiltersValues } from './helpers'; diff --git a/packages/@n8n/nodes-langchain/utils/N8nJsonLoader.ts b/packages/@n8n/nodes-langchain/utils/N8nJsonLoader.ts index 7c44d8a8f9..de5add3e26 100644 --- a/packages/@n8n/nodes-langchain/utils/N8nJsonLoader.ts +++ b/packages/@n8n/nodes-langchain/utils/N8nJsonLoader.ts @@ -1,3 +1,7 @@ +import type { Document } from '@langchain/core/documents'; +import type { TextSplitter } from '@langchain/textsplitters'; +import { JSONLoader } from 'langchain/document_loaders/fs/json'; +import { TextLoader } from 'langchain/document_loaders/fs/text'; import { type IExecuteFunctions, type INodeExecutionData, @@ -5,10 +9,6 @@ import { NodeOperationError, } from 'n8n-workflow'; -import type { TextSplitter } from '@langchain/textsplitters'; -import type { Document } from '@langchain/core/documents'; -import { JSONLoader } from 'langchain/document_loaders/fs/json'; -import { TextLoader } from 'langchain/document_loaders/fs/text'; import { getMetadataFiltersValues } from './helpers'; export class N8nJsonLoader { diff --git a/packages/@n8n/nodes-langchain/utils/N8nTool.test.ts b/packages/@n8n/nodes-langchain/utils/N8nTool.test.ts index 6f12b18079..40a1ca70d3 100644 --- a/packages/@n8n/nodes-langchain/utils/N8nTool.test.ts +++ b/packages/@n8n/nodes-langchain/utils/N8nTool.test.ts @@ -1,8 +1,9 @@ -import { N8nTool } from './N8nTool'; -import { createMockExecuteFunction } from 'n8n-nodes-base/test/nodes/Helpers'; -import { z } from 'zod'; -import type { INode } from 'n8n-workflow'; import { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools'; +import { createMockExecuteFunction } from 'n8n-nodes-base/test/nodes/Helpers'; +import type { INode } from 'n8n-workflow'; +import { z } from 'zod'; + +import { N8nTool } from './N8nTool'; const mockNode: INode = { id: '1', diff --git a/packages/@n8n/nodes-langchain/utils/N8nTool.ts b/packages/@n8n/nodes-langchain/utils/N8nTool.ts index 2cb89630f0..f568955beb 100644 --- a/packages/@n8n/nodes-langchain/utils/N8nTool.ts +++ b/packages/@n8n/nodes-langchain/utils/N8nTool.ts @@ -1,8 +1,8 @@ import type { DynamicStructuredToolInput } from '@langchain/core/tools'; import { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools'; +import { StructuredOutputParser } from 'langchain/output_parsers'; import type { ISupplyDataFunctions, IDataObject } from 'n8n-workflow'; import { NodeConnectionType, jsonParse, NodeOperationError } from 'n8n-workflow'; -import { StructuredOutputParser } from 'langchain/output_parsers'; import type { ZodTypeAny } from 'zod'; import { ZodBoolean, ZodNullable, ZodNumber, ZodObject, ZodOptional } from 'zod'; diff --git a/packages/node-dev/.eslintrc.js b/packages/node-dev/.eslintrc.js index cb14470366..cda3ce866a 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 5a78bf27ca..ce42baf7dd 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 8e3efbc814..de6d83a2cf 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 { join, dirname, resolve as resolvePath } from 'path'; -import { Container } from 'typedi'; -import { file as tmpFile } from 'tmp-promise'; - -import { jsonParse } from 'n8n-workflow'; import { InstanceSettings } from 'n8n-core'; +import { jsonParse } from 'n8n-workflow'; +import { join, dirname, resolve as resolvePath } from 'path'; +import { file as tmpFile } from 'tmp-promise'; +import { Container } from 'typedi'; + import type { IBuildOptions } from './Interfaces'; /** diff --git a/packages/nodes-base/.eslintrc.js b/packages/nodes-base/.eslintrc.js index fb4629d9de..e99abcf38f 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 bb7b30d4cf..9e968fdce5 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 7ffac61779..99e4c06f4c 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 7c85f42527..5e1040958e 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 96fa9e5f40..38df5ac694 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 73bff49be4..faea3a6f0f 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 a562245b29..227ad7ce27 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 1481548510..df17f6ae25 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 2f7c25b8d9..1874758ecd 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 068cf0b902..7938489569 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 a9545ffe80..55167ea7ed 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 ca7ea31c3d..8468af3a7f 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 ac849a9ef5..3e9529f8f1 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 cf7833bd92..c7a73f28b0 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 1865f16be5..5c0ae35d46 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 d70d908704..21fecbaab6 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 3e620b0b40..5762a81a30 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 f308b94c90..204d5dd060 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 59b4618d88..5a3cec630d 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 d5235546d7..8877c5763e 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 f535def3cb..d3c6a6662f 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 df3b8ed930..4f6bda2a89 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 1edd17cd16..80855886ea 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 1b17b25ea7..85f5d0db7e 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 2ea8b11d75..36e8e828e6 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 3d8c709abd..eb9a612cf6 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 83e2bab61b..b5c1215907 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 afe736c914..89cdc0d9ef 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 526894110a..27214c6192 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 4395f690eb..3c8afb0d80 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 da5f2f528e..5272be1a2a 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 aa791f7b64..b687cac225 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 f9b5287f4b..d061808b7e 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 758c3b7a2f..2ae70b5d7d 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 cbbf12ba3c..cc8ba894c0 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 73a9933076..82a6edcc95 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 29f753794f..ae698d8a7a 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 d2c4172dd5..de3a56ead8 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 e6266480ce..0bc0c28cac 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 ac1216a680..6bc659f275 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 f2ecef8726..9bbbd7345e 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 0daf33b997..11e14a5bd8 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 10f2d89c83..b9bca910da 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 79aaabf1ef..9d7120ec2c 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 e99140d251..c0d4934c3b 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 95d2c3c1f8..6d26a24118 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 ce711d9695..1283558d37 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 249391fd9d..bd88bcbc66 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 c5d3401674..72b93594f3 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 72492ecb6c..73623701ad 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 38c53c4f1f..24c9f9c6d6 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 069e2dd03f..d3b123761f 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 a27ff7c1a5..29460f7851 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 1aee04d83b..535233bbc9 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 25abdb7669..80047f39a0 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 bff183fcee..0a68f30c51 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 7f327518a0..bbdf813863 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 0215ddc6da..ecedd70672 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 cecc3aca46..57346fbc87 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 fbc781fb6f..ab80b67e9e 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 51a88f61ba..00f4bbdc69 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 5c65217e9b..18a268f0e3 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 b0992162ca..db25a8b643 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 e9fe6debac..49b1465307 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 50a4c1738a..132cd109c9 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 fa3879b71d..d467460d89 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 06700d283d..947a0db801 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 34cdef556a..bd08de167f 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 c4e47a8af3..ede6895e43 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 c13c572ef2..a5770b0b9c 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 7d4da16178..fe6b625331 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 052928a681..ebbc2496ff 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 b71053bd28..b76ab07c61 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 45ad851ca7..dfd4005fe3 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 ba99d9fcac..2761233a6f 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 663c82b54e..a92de20bbe 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 05faeb8a83..54cf97ec58 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 bd99a16bdd..d3462c784e 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 ed602347d3..0650a1d9f4 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 9c4dd63f7e..9008ca9176 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 33c2982776..eaae6824e8 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 { capitalCase } from 'change-case'; +import moment from 'moment-timezone'; import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow'; -import moment from 'moment-timezone'; - -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 67619d0e9e..70993e8494 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 981c65126e..70a4f62f20 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 9ae4d1d2b1..fbd36f5263 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 9e685756b7..f8d2c0f74d 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 83af844d74..ea215bc509 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 76d1bdd562..18d56e7424 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 9dd013c5d8..dd76ebb54e 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 05d70b3f50..a08a03b2c3 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 67f73a986d..8393a452d3 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 eb6a95a73e..a9975d4f50 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 3853a5e9dd..cc211f266f 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 0c86c7a29a..6769e4df26 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 1026bc2d27..c8a5e8adf9 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 0bef7541b8..f7dd3961d7 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 8d736b9e28..458af9a0a6 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 ddb484a98c..5de5bb48d8 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 d1f8755377..a267d81861 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 b1621b0679..027c26c72e 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 20787c370b..294c00031d 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 9e8cb85a9e..041eb7adb5 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 213599b614..88a79226de 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 586fed329c..d82c565d62 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 0e48b58d83..1c8a313201 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 bb378a97da..7f58cf00b1 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 751bb19fc0..e35e652c4f 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 3a62d5f072..5b376e0b2f 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 eaea3c48c6..c86ee2b58d 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,10 +9,20 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import isEmpty from 'lodash/isEmpty'; -import partialRight from 'lodash/partialRight'; +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, @@ -17,23 +30,6 @@ import { 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'; - export class Bitwarden implements INodeType { description: INodeTypeDescription = { displayName: 'Bitwarden', diff --git a/packages/nodes-base/nodes/Box/Box.node.ts b/packages/nodes-base/nodes/Box/Box.node.ts index 3d9e71e3ef..d737405673 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 f51efa0579..0a5a2f4f80 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 e1e22ff46f..d201d53529 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 4e2a480291..35b86f4415 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 63fda3ab10..0a73a1a67c 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 d63c980266..70641ac106 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 46927492e9..7c05b86227 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 37b051d7ec..12ef42d73f 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 0d9aad5bfd..39a6140837 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 c698782e29..2ddf4d9507 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 f8e72c75b3..685ac62fc2 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 2e524be59a..952bd4956f 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,45 +10,23 @@ 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 { taskFields, taskOperations } from './TaskDescription'; - -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'; +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 { timeEntryFields, timeEntryOperations } from './TimeEntryDescription'; +import { timeEntryTagFields, timeEntryTagOperations } from './TimeEntryTagDescription'; export class ClickUp implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Clockify/Clockify.node.ts b/packages/nodes-base/nodes/Clockify/Clockify.node.ts index 8f5456dd67..9723dfa025 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 cbca70f49c..a7ea51f512 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 6365b057df..e482e47030 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 93acdb0e52..bd9050029c 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 fedf9c4204..f279f1d099 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 07955905f2..15be38653a 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 1b48287439..318a73901e 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 464f1f2bad..cb2536ef11 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 fd0da7dcf0..94ca3050c8 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 73f5ba7f75..449be97a12 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 365f213500..6491b7d085 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 3f1ed0eccf..486b6b673d 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 b622c86661..437d8b443b 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 e31c84194b..eac35239d2 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 87b0c88c72..0e1eab0b7a 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 f8d707e3ce..12fa1a447a 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 6af3b2f294..4d10178726 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 4f816cbbae..1ecf7edb4e 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 65833677c7..a83d793eba 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 c666ec83c2..a70e96021d 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 a19911ae74..7f335f9791 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 9c3441fd86..95161748d6 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 05274dd453..ecabe2aa4a 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 3137471c2e..bfab720a1e 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 0acd63e83e..2a0f94e40f 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 39bfff623c..2b2e59311d 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 45f4105a10..dd074e2976 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 a489093425..1aba92bf30 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 f8d94fceaf..bcea2f2b7e 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 f7fe7c2050..9ca7575474 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 3607321a64..3b28bf1de2 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 4bc1496287..515f7f0855 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 08f4548b69..67a96cff7f 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 7184d88f0b..69c2d0da13 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 283c85193e..4ea7440272 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 8a39b0031a..5de5573860 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 6bbaa30e74..b0b2b21b12 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 b321d4e852..d473b0551f 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 b9202734c3..98b4658230 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 dd6e356d95..bdcdaae9cf 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 2b38055281..fda31d9e24 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 e6efc9e01c..b3b4cb590f 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 81e25c2f38..4d8f997bc8 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 ca5a2d5a66..9f148a55db 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 2cbabc72a5..1c1ef6d9c8 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 65f578b5a6..830551775c 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 d4329c179e..e59d9c4a6d 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 0108fa17e4..b6cacd2e18 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 8de53d6b37..43f223b452 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 60c630d076..6c98039b78 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 77ae4d861a..b3746ead81 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 fbf5ade3c4..f85f091ebe 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 1479d415fd..e93c32683c 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 b0e0168a6d..5f7e38ed1d 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 4e80537759..01f523d4c3 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 b5049a3f85..ceb952395c 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 7ad2b24113..1616cde2b0 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 072990d8ff..e6139f59df 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 e84dcd1ad7..7de96bc6ee 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 0de1100e60..febf091233 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 a523f6699a..159c3e71f0 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 5afd6c6c30..6ee8d16e41 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 775a266a61..78ec0f22b1 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 8c5a9cc479..5bb7d7ba2f 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 52f1653452..13c4924f4e 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 3ccc3ea598..95c2ca54cc 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 df93c22b11..fa5487400e 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 a54d48eee9..ff79027568 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 6f0f24ce63..e802a0dbef 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 b4409a370b..20b4cec13f 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 d87bad2ec2..fc797a8bd3 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 57c405655f..af718bb4c6 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 585b5294d4..741960a5de 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 4644f4975e..20d5611d24 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 e866e89ac0..4d43cea64f 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 8a07aa8efb..1acd797026 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 f2f35f4476..7acccea904 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 1cf43b0c98..982382b1c6 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 a2260b731c..5f2e87f749 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 4cd83fe2fd..d35cab836d 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 025975054b..d6048294c5 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 149d9fc9e9..11e903c663 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 f7405a7b99..d6246fada9 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 c818bf08d1..10086c4040 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 a2fb1955a4..c040cb94e7 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 1041c5626a..9713d9e8ef 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 1b29fe13ad..bcd49d7a8f 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 2a65ca6145..a43534e141 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 7fc8c5d532..8d79650890 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 cf4379f0e5..e94837fb4c 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 b3852f9527..7f1922adb4 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 abbec43040..02251f610d 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 ab79a4bd1d..8cc4cfd27f 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 c7a066ef4d..7c95bf5d3b 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 2cf817d71b..92e329ca97 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 dcb62e5aff..19a29ec873 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 24c121988b..cf247919a2 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 8217b3f22d..0d00b57032 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 0cfc6b0bcd..9167781af9 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 e922c7ad21..31056e97b2 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 d9eb282476..f30a6f3e2a 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 7a055eb1e1..0da536b600 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 ca5906d6ec..5fab762b88 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 9bfce49d80..29804736e2 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 9f66dec09c..669f027e6c 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 74f7540188..48ce9b3766 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 cfe18a75de..c0dd00af01 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 2f182c5862..b8f065a8b7 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 121a5d4233..8c4b710211 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 52e80655f9..4dcc5cae64 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 5e0f9e897f..99066f0478 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 94d36bd183..f1a4e72359 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 325ac81d4a..752ae87830 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 5d4950ea07..bccfef3a4f 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 3f9e1f82b9..f2289d32ba 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 c76998bd11..0d87f83ef9 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 364bd629f6..460d8298e3 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 7fcca69b4c..c3fc66690a 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 f0683b6a6f..96f87bddc6 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 f2f329c160..47030bb706 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 94415d82ca..cabcfa8da1 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 925bf50668..cb4ffe23e7 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 c8b6c115a6..85cf1309b3 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 e2e7f2a911..89ce5bc8fc 100644 --- a/packages/nodes-base/nodes/Files/ExtractFromFile/actions/pdf.operation.ts +++ b/packages/nodes-base/nodes/Files/ExtractFromFile/actions/pdf.operation.ts @@ -1,8 +1,6 @@ -import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; - -import { NodeOperationError, deepCopy } from 'n8n-workflow'; - import unset from 'lodash/unset'; +import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; +import { NodeOperationError, deepCopy } from 'n8n-workflow'; 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 9d34b46c57..d46c3ef648 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 fd4a947617..5f4d28775a 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,9 +5,11 @@ import type { JsonObject, } from 'n8n-workflow'; import { BINARY_ENCODING, NodeApiError } from 'n8n-workflow'; +import type { Readable } from 'stream'; + +import { updateDisplayOptions } from '@utils/utilities'; import { errorMapper } from '../helpers/utils'; -import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ { 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 38c8d0057e..b4ae9971b3 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 06288535b1..cabd5d2f89 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 46c32d5912..6a50c35725 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 06caf25a82..39a3b7e564 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 b6f0d852c0..9c50dc988d 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 a486d1b727..1ee1399aa0 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 fe777edd83..ad66330c27 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 3cd71b9a92..455e288ec7 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 8eb4a8d3a5..87dda98f88 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 7e09170d6a..da813c758d 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 67046175a2..1345725a69 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 3a1fafc6e0..d2dd220e04 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 558a34c125..359d6e1b4d 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 4a7bd830ef..1d1e508a18 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 c6e828ed29..3e8a246fbd 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 0d9e7fad2c..e34aa8e160 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 65228c1c75..32922cb93c 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 d9c8a94b42..682eee343c 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 4819e27642..8c56b98e6b 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 9f08f05c8e..f033930298 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 6bdf841944..74a54e61d2 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 1ed2381045..a28e40ae5d 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 e89edb1b90..75b2631cbd 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 cbbfe62331..07b6826bb7 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 7c2d5fed2a..ff77121464 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 6748ad78d8..da0ac5f1cd 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 cd8c57c00f..96acec9be6 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 d4e3e307fd..cee940a5cd 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 72a07b2f64..bc3da66d63 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 7c42fdc246..1988e4e988 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 52fbee06eb..49e14b91ec 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 2faea66ef0..738b5bc547 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 4027277123..df24f6bb12 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 1d9cae9900..da3aa65260 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 bbb7e3613e..11070dbc5b 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 2fc8c9c368..4c28b86139 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 773eee9afb..fad6dfaa65 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 d0fcde930d..4de28b9ca1 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 ea060139be..13b394b4a3 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 8a3ceffad1..084c68efbe 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 f7a0965d3d..542f3206b1 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 4ee4627838..6a8effcb81 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 f4d94dda8b..4be27d3b3e 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 4548310140..1a8b53c80a 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 d4456f318b..cd2fa59d38 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 2d29b89ce7..160360ede3 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 9d55d46328..b3276e6904 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 76aa6d612f..7686c890cf 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 a361a3517e..38dcb91f3a 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 18d53996c1..c0c197d96b 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 9b6d45aa24..96276b487b 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 202c26d88c..8e30e9ac1f 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 34fd023c6e..5030a846b2 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 2fb7cae03b..1d0ccc863c 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 7b69f91570..91e6f694c7 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 0f121b2a09..91359dd35d 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 7b64332747..4f66901ae2 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 68725c010e..d2d2950f17 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 140eddc9e8..f440efaee9 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 93866afaf9..189f737888 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 30c890487a..5a6f1fab7d 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 39fa8a3b0a..b242c73063 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 4501b7b7df..7a66126762 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 25c7ad6266..674302b3d0 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 a4378515b9..0ccf88ee8b 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 7b2bfa3616..a6da7b13fb 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 2c5fb28682..f8647cabda 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 68c04b8799..b41d548796 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 42a17bfdad..7053c24165 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 b249195a8a..05b5002ab5 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 55cb301fcc..128b74a220 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 8865e7b303..ca8e6deb10 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 d60521cf00..afa01998b8 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 ddc4891cbf..18812ba157 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 040c9aa880..5fc45c8d98 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 cbfd2edf6b..13fb7ae791 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 3061f74953..e7f4be6294 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 51196a2858..03498e06ec 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 c7111f4e94..e8ed98a124 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 868f727a47..a8dbfa5570 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 80446db6ce..fa39890cb7 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 f971edfc30..630bd9469d 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 ec3c17b287..26855b6e5c 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 36c2f0abc2..ed486720f9 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 0f1692caac..4940b6b90a 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 522f28afdb..780de933af 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 f34426e065..61e510ccbe 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 41c4da16ea..fa6f3894c8 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 5e147d81bf..d2b7e5fa6b 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 acdd2780d1..773f1cf9c3 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 b5f7980c69..fe72effcb3 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 1c63a0f1fe..309d997c4f 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 1ccf2bd745..eedbdf5d74 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 d2cd34e901..2d6c098f87 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 d80be9968b..59ba5075a9 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 e019c7c555..f181b47d81 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 d9c92a972a..e89233fcaf 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 af8f03839d..cd1aad328c 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 55e1124c58..1f011e5c07 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 d6770f596c..4c1ab04de9 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 93a5fe77d3..7fb017ec6c 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 27f19e8b61..933fa3b46f 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 f81dc3478e..c548204772 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 8774216197..36dc97fbb8 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 9b5e845d92..bbe0c24f3d 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 ed85388da6..f6ef7f51e4 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 a3908b2c29..3b4abfacaf 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 feffd170d9..917e51e119 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 a31f85beeb..aebdf5ae42 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 c31502cfcc..ec1fc6cf1d 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 13d20a99ac..04c5b459e9 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 4ae79c59e6..672b7d1ada 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 fdb80509fb..d7a3a40d61 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 455c65dae3..cb2593c83c 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 4a893ded00..6bbb177a54 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 e856174b38..6993ab1930 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 9fcac0e41d..b82a578b94 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 4cd2ae0742..9ab54ece28 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 f0d0261502..3564092e85 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 c17c26eda9..402553adbe 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 84cd8013b2..ded6db9e08 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 426d78bbb5..4273561c9a 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 193747b01b..dcec9f093a 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 8993760e57..b23183c29b 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 91ab4c69a8..fb6c1d908b 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 540367aabd..90fa190a9f 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 5781c51b8f..cccd5e2de5 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 6b5f4ee802..6b218c1d6a 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 912ca8a797..681705781a 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 5159e9b76e..68b6f683b1 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 { 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 * as spreadsheet from './spreadsheet/SpreadSheet.resource'; +import { GoogleSheet } from '../helpers/GoogleSheet'; +import type { GoogleSheets, ResourceLocator } from '../helpers/GoogleSheets.types'; +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 d46e72811a..07810d1304 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 1a4080c576..8615beafde 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 f6f3e5cd3d..0dc92f31ac 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 f65d6a5e39..14fcd8ed69 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 4c57bf1dea..3d6ac81d6a 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 type { GoogleSheet } from '../../helpers/GoogleSheet'; -import { getExistingSheetNames, hexToRgb } from '../../helpers/GoogleSheets.utils'; + 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 { 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 8edd179d0e..4d5479795c 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 type { GoogleSheet } from '../../helpers/GoogleSheet'; -import { getColumnNumber, untilSheetSelected } from '../../helpers/GoogleSheets.utils'; + 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'; 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 9f65ffb52c..dfde11568d 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 13e7fa3486..c068e4ee77 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 16478cb11c..83331ea7e5 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 c0e7f3acfa..0e33a95667 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 cc0dd57f48..ff8cac5f97 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 310efc8de7..71f8dfd615 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 c5f8a8dc79..b129f9326c 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 f3ad02e273..c717e5c8b6 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 6c0c8b74ca..cb8f5c05cf 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 90aa11cf90..6ec3e9d9b7 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 40ae402a64..664a44d094 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 d3fe3e0762..27e080cffd 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 d7fe05561f..e053b752bd 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 663ec61896..07f1b351b6 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 { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; - -import { channelFields, channelOperations } from './ChannelDescription'; - -import { playlistFields, playlistOperations } from './PlaylistDescription'; - -import { playlistItemFields, playlistItemOperations } from './PlaylistItemDescription'; - -import { videoFields, videoOperations } from './VideoDescription'; - -import { videoCategoryFields, videoCategoryOperations } from './VideoCategoryDescription'; +import type { Readable } from 'stream'; 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 { videoCategoryFields, videoCategoryOperations } from './VideoCategoryDescription'; +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 ce3f0b8276..28bd734229 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 07a4505d35..73c4bc875f 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 2ebd3cdd43..189c880f16 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 ebf25294d7..137eda57c9 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 90fc166080..1b239ff853 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 1bd10939e3..b61b8eda7d 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 cd94986b7d..6fae6b0ba0 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts @@ -10,23 +10,17 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import { conversationFields, conversationOperations } from './ConversationDescription'; - -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'; +import { conversationFields, conversationOperations } from './ConversationDescription'; +import type { IConversation } from './ConversationInterface'; +import { customerFields, customerOperations } from './CustomerDescription'; +import type { ICustomer } from './CustomerInterface'; +import { helpscoutApiRequest, helpscoutApiRequestAllItems } from './GenericFunctions'; +import { mailboxFields, mailboxOperations } from './MailboxDescription'; +import { threadFields, threadOperations } from './ThreadDescription'; +import type { IAttachment, IThread } from './ThreadInterface'; + export class HelpScout implements INodeType { description: INodeTypeDescription = { displayName: 'HelpScout', diff --git a/packages/nodes-base/nodes/HighLevel/v1/GenericFunctions.ts b/packages/nodes-base/nodes/HighLevel/v1/GenericFunctions.ts index bb6f977ad8..c5e08c9142 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 d76ce3f402..0b29b34f3a 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 04a92c512c..5b4529b9be 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 f3f7bc8e98..04b87b2d7d 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 036f943066..b68a857ce8 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 { 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 { configOperations } from './ConfigDescription'; +import { eventFields, eventOperations } from './EventDescription'; 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 3d5814244e..8d80ce7928 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,12 +9,13 @@ import type { INodeProperties, } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import get from 'lodash/get'; -import { placeholder } from './placeholder'; -import { getValue } from './utils'; -import type { IValueData } from './types'; + import { getResolvables, sanitizeDataPathKey } from '@utils/utilities'; +import { placeholder } from './placeholder'; +import type { IValueData } from './types'; +import { getValue } from './utils'; + export const capitalizeHeader = (header: string, capitalize?: boolean) => { if (!capitalize) return header; return header diff --git a/packages/nodes-base/nodes/Html/utils.ts b/packages/nodes-base/nodes/Html/utils.ts index 923443b2fe..a22195b0ae 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 719c128a28..b23ab29aef 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 c7ffe7451c..76e242adfd 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 b3d7e3cfcb..c50d1e5ade 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 9f78a1a47b..f954dbfd19 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 f24f537c91..dd4e0b77fb 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 32734939c2..d22169e50d 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 6ca5cfa437..d5488c6f2e 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 0b96c4b4d0..5d3a67dde9 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 0899ce5637..6e49794df3 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 f20a3c7746..df86cc0b5f 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 9fa600730d..dbca30617a 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 de46d8a484..fa32887a84 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 c5b255ab6c..a640180dec 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 5049e37666..94d7bc67cf 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 fcbd86ef09..78d8fe20dd 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 c8eed8e9ba..c1cda5a715 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 99e2bcf816..3e49879e50 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 9757cd5f2a..65a238c735 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 6ef2dcb626..3d9ca752a0 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 dead14c67b..26f71620c5 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 76750e8fd9..ce1c3b012d 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 f587701296..2b771c545f 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 { clientFields, clientOperations } from './ClientDescription'; - -import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - -import type { IClient, IContact } from './ClientInterface'; - -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 { clientFields, clientOperations } from './ClientDescription'; +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 { paymentFields, paymentOperations } from './PaymentDescription'; +import type { IPayment } from './PaymentInterface'; +import { quoteFields, quoteOperations } from './QuoteDescription'; +import type { IQuote } from './QuoteInterface'; +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 e5319eb6e2..15bfa4aaea 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,20 +14,12 @@ 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 { sortByCode } from '../V3/helpers/utils'; -import * as summarize from './summarize.operation'; import { flattenKeys, shuffleArray, compareItems } from '@utils/utilities'; +import * as summarize from './summarize.operation'; +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 673119063b..24e7d12406 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 5447f9e95d..bc2b310441 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,20 +15,12 @@ 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 { sortByCode } from '../V3/helpers/utils'; -import * as summarize from './summarize.operation'; import { flattenKeys, shuffleArray, compareItems } from '@utils/utilities'; +import * as summarize from './summarize.operation'; +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 f6fc2ddd72..1086be2f1c 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 d2408eb277..8cc09765bd 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 138fd2d276..83b64309c1 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 5671cf246f..1a6a6a334b 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 09f580b393..cd9bb20c27 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 0bd3ec9ec9..7e09010422 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 544192fd99..2c437a6a74 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 d026beb2d7..7d96e58000 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 006d4f9b87..6580464c4a 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 2159705475..7e5d7e20d2 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 2c21328f78..26770e2eae 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 3a0815c906..1018f97bf8 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 87e9f95b0d..0306fae772 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 631566ffbd..628d1d1d4d 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 03a98ec1a6..b44fad91e1 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 43a766ab3a..065dbec746 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 066bceb0ff..7444669712 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 946db3742a..87f6931dbf 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 cb9b6b6a2c..77279a338a 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 2bb60b2b75..d4cdb886c2 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 503c100741..343f9d9c5b 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 aa8f8413fc..2d13e10314 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 cc8875549c..a3d2d05dba 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 a0538678bd..c64a845a55 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 9c313fc60f..9c95991940 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 d49128ea9f..7ccab5c90a 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 f8cd832aa5..15f4f4f36f 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 e1e7790bfc..805fc697a6 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 7ea6f2aca5..23a8b9bd42 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 9732176da9..44e8bb0585 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 d01bc1ba1a..251b2402b0 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 b237024c81..91f749e743 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 67b6202520..9e86651ff2 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 05694b43c6..3862c91b5f 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 eda3122557..2817d51ccb 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 0d7196eb75..ce473b16a8 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 { orderFields, orderOperations } from './OrderDescription'; - -import { productFields, productOperations } from './ProductDescription'; - import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - +import { orderFields, orderOperations } from './OrderDescription'; +import { productFields, productOperations } from './ProductDescription'; import type { CustomAttribute, CustomerAttributeMetadata, diff --git a/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts b/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts index ae014ceed5..23fa53e184 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 3c30d6c0d9..890ca72360 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 928296c32d..b97c9dd37f 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 0b02a4590c..303ef673ef 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 6a9417835e..43ed419ddb 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 bcd270797d..dbefae8989 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 62617ee6fa..370fdb261b 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 44415436fd..c00d819015 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 141a6c5181..6a0c4b40ac 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 744a6f3709..926be610ae 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 53e4554144..7427248462 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 6d0b5e0298..295ea98640 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 6a1a439d78..337e950330 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 26cf5301a3..2edfc23da4 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 21b6549c6d..9849dbfbd8 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 7bf9f4c595..7d99464fc6 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 9b3ac397d0..9c5c467bb7 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 946856f3b1..c2c2bca7a6 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 13161e7481..68cff0cdb7 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 433e0e95e1..e74d546d43 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 38f3eb6797..82362ec0e0 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 e823fd7dc2..1c3b259ab5 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 db3575bba9..1c2725e009 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 d146e47a54..7b256a04f2 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 1464e57a39..8357737725 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 8e2c2bcdb5..8b1e83c8ac 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 e1da062e19..a27bbf23c2 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 bd1af59af2..9f775e178e 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 b577b89d6a..cdc5974dc1 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 c94f40b60d..cc7ea96d44 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 099de6e0cd..86511eda0b 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 f0ca9da66c..6cdefb6922 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 cfea09fd8d..aae3018fe8 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 c7e5dc2641..8b0bcb1dcb 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 7ac78aea12..cf1859f757 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 f6217f9156..17f51ca035 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 787c1af46a..bdd0fc57de 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 25a1aad381..0a5d61739c 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 { companyContactFields, companyContactOperations } from './CompanyContactDescription'; - -import { contactSegmentFields, contactSegmentOperations } from './ContactSegmentDescription'; - 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 { 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 01a87bd7ca..cf7251b7ee 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 ae9dcfd954..a318885edc 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 7105e1aa9a..069f46ba08 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 6adc63aa1e..955835dd3a 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 ec5180c5a5..1f5437f663 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 f194d9e54a..254d248f6e 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 5bf9896216..e9f9251495 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 053365e415..dc94daaf0e 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 089ecf9235..7f130de307 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 bdbd40c444..0e848666ee 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 8cd7e6ed41..8b9067156c 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 9fd09abc73..bd6921082f 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 fb10117b79..d704b11b22 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 437ef1b3b6..9ecbc4f655 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 efcd726f82..788b45446d 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 0dd650f790..a8d44ce550 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 cf13c705cd..1d00a0f38a 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 08ee11ae4a..3ffaacbd69 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 cb0054e315..d53a43bd04 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 446abb5b5e..04c51e71cd 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 faba8409ef..797e6c9de4 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 62616cf156..a771b77b5a 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 e69bd72165..815c9581a1 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 e9627700c9..d46d1a48a7 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 e468b62336..1dd75ce25c 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 2c62bd6967..3ecc29f3ae 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 007f579d21..0f4ba9e4b5 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 bdcf6a6333..f87820ebcd 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 dd1752ce79..8cac626c00 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 7d60587541..aed1657626 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 06711c0183..54b1ae221e 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 dbdd0a2ac7..1f9057a687 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 17a8549dc1..181913cc89 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 3fef581c7c..0433d968db 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 9a81d34eb1..5de97bf39d 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 8a67dbcf18..55deec3a00 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 9eecb99e2b..53d7764dfc 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 { workbookFields, workbookOperations } from './WorkbookDescription'; - -import { worksheetFields, worksheetOperations } from './WorksheetDescription'; - import { tableFields, tableOperations } from './TableDescription'; - -import { oldVersionNotice } from '@utils/descriptions'; +import { workbookFields, workbookOperations } from './WorkbookDescription'; +import { worksheetFields, worksheetOperations } from './WorksheetDescription'; +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 e3bfcbac95..bcec8f6354 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 a868bfa2c7..d2bd7a12f5 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 6fc4497805..f2f56b34a1 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 6ab2109211..80db436622 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 11095e27cf..11e345c28b 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 9b20ab77c3..a09cb8b36a 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 5e1ec86f4f..fb1673ea21 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 e91596a402..17aa9da13b 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 059c195a2b..90ae8d6903 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 9e2f9f3cef..ccc11f6b74 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 69294c0911..ca1ce95ae3 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 297fbc37c4..ee389316db 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 81a2081572..a506bf14bc 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 e8af1938c8..94680f80dd 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 8299ee18b1..427a6ab8e1 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 0ecae73b46..0d2271a5a1 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 3681b60270..c22b87f331 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 7b6389d814..26977a8078 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 40a08a975e..b21a6b039e 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 3745c76cac..c27feae6d5 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 2303147ab3..12151a471a 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 fa30a1ead5..f4d440c7f7 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 576f02c8c2..825ffd32e7 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 0f465b0b52..293e847582 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 59efc494fa..8949db933c 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 bc067531ec..555d6faea2 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 3c49766adf..49bf57c686 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 3c7c5e2674..8677a02d86 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 6c1e6805ff..b455de45c0 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 234d008fe7..822f20ca8a 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 8ec751632f..bf14756f73 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 b579d89955..4f8b34c9ea 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 1e85bc12b7..4c8176a05a 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 2ebea471cf..80a2acd1ab 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 364da5918d..0dae646594 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 13832486e0..239d8bb42d 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 b9ca16b504..5f1dccf1ed 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 d87f1b66fe..f88e8b2151 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 9ac1296aa4..3fec538f0b 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 bcc5826bea..f9e2026c9d 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 694bb3d103..c97a9895f3 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 ac1415d23c..1673027104 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 2f4af23db7..c7d106847c 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 cc5b6e5a43..0ce4e7f674 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 7999c1b8a5..0edbc78796 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 7c65cf37bb..6e78e9f83e 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 e9f8362116..e83174ef1a 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 7ac465f0b2..481c868b35 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 87239e12c0..2bbba5d5d2 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 1110077676..acbe8736a8 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 826147db03..a237380db4 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 e122863905..3568137445 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 132fa72b4e..686b06185a 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 0564a5dc9e..3e3f076e02 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 223dbfb378..72f3eb97ff 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 1037021149..ca8537b5cd 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 6849d04d46..a4999f98e3 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 dec28b9dd7..071e358ee8 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 81d2bbcf4e..9a7299b29b 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 07ffde1fda..5ee6a2524a 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 7f7f7d4771..ea0249891e 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 1ff992d821..12e17e6abe 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 d8321768a9..b82810ac0c 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 9e8cc5cd11..a66b3509a3 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 a97d8a12c5..cc37dd4d5a 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 9f8f100d13..2be5f91413 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 774110002d..f3d87d1f75 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 b211ef8c1c..2fa4311a57 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 54f32d7935..d3a9107762 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 60246daffa..85d21ea1e5 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 d2881a1858..a725e64930 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 12bb952469..362434ed66 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 521cdbeae9..c4e48e5f88 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 2441cf69e4..f50cc5d1e1 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 b3f1c9014e..362174b0ea 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 91df451340..265f451986 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 46fd4c038f..4b21065565 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 41322e4961..b3cc85805c 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 eec59b5061..7280553986 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 6e20612378..91165e4c7c 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 8ee7511b41..71c00cb38d 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 a69ca7efb8..69a6516654 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 dad68701e8..dba8d41cf5 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 bc81ba47d1..4002ed6538 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 55c0f634e4..5f4900253f 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 c55f89c965..1961cf760b 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 54b8b5108e..b9baf4ce12 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 18d2114804..8d7935294f 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 a2216b7255..f014595473 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 7892b24ffa..89afe6f5eb 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 16d1b4e749..932d51145d 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 be250c309a..80a215e67b 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 24beaf050e..02722102fb 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 cbcc328fd0..50d0349683 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 d6033e3ec8..7fd67db228 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 c0110ac8bc..ecdd99bf37 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 389d8b49a0..7e32e8ba0a 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 db85f5b60a..ef2d372185 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 4148028551..cea94648c3 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 8e972d8b0d..dfd9701049 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 b7ec5e9e0e..fa54945b7e 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 1b26d0b8f8..6ffa8ade53 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 f3114f5978..364b4df799 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 4cf330bf3e..ec15aa2b13 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 db13528329..8c1152e82d 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 5fac7c0d66..305c0069b0 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 8f9d2a660f..20c20ba4b9 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 a4c89a0777..4d340a763a 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 2ee3a02f19..f550bd075b 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 f991d91697..f7694b1cf0 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 7d768ee2ae..f70d458efb 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 0e6f63804e..42ce214d85 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 3f763dd307..9ec11c99bb 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 88e4b71357..c3f4e778e3 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 c953de95a9..fbb54a05a0 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 e41110a0b6..d40cef0ad7 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 2923170273..605b6db66a 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 a7954ade28..4abeabfc87 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 3a9ecf1056..195caefa9b 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 a88b19981d..22333e1639 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 8054bccbd6..a32497a9af 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 1384b508f3..0846673e66 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 de4cf5dcab..afef101ac1 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 3aa27f7818..68f714b7bf 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 a9ab2767d7..7d47d3f76e 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 d3111a95e3..6e4d966b3e 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 29b7e46e45..5b4ed9e610 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 4873aa777b..c52f01f8e6 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 db48178f4d..d2c02630b1 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 d7a2894e19..4174d14f7e 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 56522b8a06..016c1f2bc7 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 3b7c0ba125..6965740853 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 f9db468361..4e53faeb76 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 eb8622ee6f..390f38d57a 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 e7e994f174..ecbc398060 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 59ce7b8095..0e42e15bcf 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 a04d76eb11..27e4de28cd 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 94d2a1a1e5..62a7a24010 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 ad38ede1c8..f65e438951 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 ff993c7d1c..24d5a71c07 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 c84cd9d872..a9064ae047 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 3fda2c1f26..68edc03e1d 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 ff97307dc1..349e56fd43 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 32ef253ef8..30bb08789b 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 fa2597a341..0c379ad591 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 698284f9be..087c1f461c 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 55c4007eda..b9dff77153 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 359c21c465..97ba52cc77 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 b84a5cf66b..3b07456a96 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 92bfa58ed0..0fb385488f 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 0cdf6ce19d..68b35a980d 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 6209111b67..977c37b3a6 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 2adf717a5c..f14a7f0b74 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 6591e62233..0cc86008a6 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 90e07ae7d2..88e93664e0 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 3b72573977..385c9eb93f 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 9af1b9eaa3..8991f4590e 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,13 +6,12 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import type { QueryRunner, QueryWithValues } from '../../helpers/interfaces'; - -import { prepareQueryAndReplacements, replaceEmptyStringsByNulls } from '../../helpers/utils'; - -import { optionsCollection } from '../common.descriptions'; import { getResolvables, updateDisplayOptions } from '@utils/utilities'; +import type { QueryRunner, QueryWithValues } from '../../helpers/interfaces'; +import { prepareQueryAndReplacements, replaceEmptyStringsByNulls } from '../../helpers/utils'; +import { optionsCollection } from '../common.descriptions'; + const properties: INodeProperties[] = [ { displayName: 'Query', 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 5ff05181ed..4646b73a00 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 7b16574f75..d8d5341c36 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 62ba0c23ab..e21cf8ee3a 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 7009edecc2..746441188b 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 e9ef6a8591..722d9bb06f 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 60df354528..7d7bbda262 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 b89e18f691..0a8bb34d51 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 bf4af6b612..65ec2f5306 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 f74da247ab..08aa444b0f 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 ca7d55bcb6..49b6434f12 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 { LOCALHOST } from '@utils/constants'; +import { formatPrivateKey } from '@utils/utilities'; import type { Mysql2Pool, MysqlNodeCredentials } from '../helpers/interfaces'; -import { formatPrivateKey } from '@utils/utilities'; -import { LOCALHOST } from '@utils/constants'; 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 fa701d0815..6ca1ef502b 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 b37184c772..e4c7eaf854 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 a58c855164..12e976af73 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 20a97719b0..9b8d4360b7 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 612a12c275..7b55435231 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 e4b0b4d930..d477668662 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 7088465009..36e33e5ed3 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 c2f6f93320..43894ea130 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 4723001318..ac8b6b5294 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 2f7fff154d..19b067b027 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 9a710c2a9c..bcae490194 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 0cadbc5b1d..77775f082b 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 49079c3c81..3d83fed7f1 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 bf483b66a0..b7404b0400 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 3b49e23fbe..59f4560162 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 f814139603..81dc932f0a 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 1a590457da..581863f87f 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 1caba20dcf..557f77052f 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 1250a0231a..5db400afa2 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 { 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'; +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'; 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 2112ab3394..5bd576ae4c 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 a1c858b59e..a482d97a06 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 2d2dc68c27..b4a36f8629 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 8c109d7d4f..467b630060 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 16aef07885..4208d1524e 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 3920fbfa12..f2c010e75a 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 7092f45d0c..5b2d5d2eb5 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 7d465b7ca0..1160e6c971 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 a79589bede..39531dbac7 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 433df8fc03..72ae18ae01 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 88b8c8018e..85090c7938 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 5c7cc24c70..bc4c2d7a92 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 5ded51c592..62ed0ef6e2 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 ac8922f5e4..46816dfea2 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 587094b91b..1cc7a81734 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 3d0334a04f..f8f9fe5f4a 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 198dd325cb..a5b08b3fe3 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 4114d681db..d109920c89 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 1e0de23836..0410032a29 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 d86c82fe0d..2eeca1ec30 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 75ebf7ed75..d5b673522a 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 95d621240b..2ae6f93a2b 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 58472d9340..54ca0621cb 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 12094d57ee..d1af6f9201 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 550cffcd67..18ec90fb22 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 b10d580339..0990e86d7c 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 9e5262db67..1695f8e35e 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 87c1b0be28..a70d12879a 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 fa6848da69..e6c18b9026 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 f01d89eda5..9fc02b2c46 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 24a1079cb4..3309734562 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 a967ed0007..bbb3affc79 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 2b0ef3e8df..35db57f4bd 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 1cb5ceb89d..1b66be886c 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 7e57a33db7..0594353d04 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 30b533e90e..e22eb0d72a 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 81141b3be4..1f938b9456 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 e96b2c57cb..ce522996d7 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 cb9ce4b76a..1bdedf2338 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 3206e20587..3f21331d71 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 4a1cfbbe67..d00742dec1 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,23 +11,16 @@ 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 { incidentNoteFields, incidentNoteOperations } from './IncidentNoteDescription'; - -import { logEntryFields, logEntryOperations } from './LogEntryDescription'; - -import { userFields, userOperations } from './UserDescription'; - import type { IIncident } from './IncidentInterface'; +import { incidentNoteFields, incidentNoteOperations } from './IncidentNoteDescription'; +import { logEntryFields, logEntryOperations } from './LogEntryDescription'; +import { userFields, userOperations } from './UserDescription'; export class PagerDuty implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/PayPal/PayPal.node.ts b/packages/nodes-base/nodes/PayPal/PayPal.node.ts index c046226a3e..a10001b652 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 6d409202d4..7fb8987ef5 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 1bfa540ee2..4c06cf620f 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 33a323830d..facb21aa46 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 63634980b6..83c90c3068 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 a92578a4d1..bdca4a33f4 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 0ebe6792cb..aba0297bd7 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 d6ce65de0e..53f651a31c 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 ccad7205dc..4547ca1fc5 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 603bddcc02..3a894815a8 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 { aliasFields, aliasOperations } from './AliasDescription'; +import { eventFields, eventOperations } from './EventDescription'; 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 { 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 1bf2334071..31b37751a5 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 2a1aeb11f6..206e6bf74a 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 d8dc12b01f..86689890f2 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 type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow'; - -import pgPromise from 'pg-promise'; import { mock } from 'jest-mock-extended'; +import type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow'; +import pgPromise from 'pg-promise'; + 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 39cdaf16ec..b8526c0e6f 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 e45f5232c9..b58aca9701 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 834779d1a0..3fb2982a6a 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 a8f5c03965..ff18184d5c 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 125ebaa1d7..36b935293d 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 badede9f53..a2bfc9329d 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 a05c185a24..06854bf018 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 e76c4f95cb..9e0b72f953 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 b0848f2a6b..b41f0c98c5 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 e04b845e2f..e15169b0d2 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 5ccc01a9e3..7a43605d56 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 f48060ec3b..9082d9413f 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 5f01e6b6a6..58f1c8a96f 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 59cb83b5da..a9adf70a3e 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 f81a66700f..c20319d5ac 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 ac4f783541..d906c7e0bd 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 dac7dc678d..99f40cb1da 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 895c5738ab..07362be3dc 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 8298e68340..d12b74076a 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 1393d07ccd..3217524e86 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 5a26bfcfa7..677fe785e9 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 fcd71125ce..4e4b7d29ba 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 16ef41b80e..a92b24b8ea 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 17e1e01e9d..2f73fe28e7 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 18c46098ca..f93132a33d 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 b46bc920c0..1305611046 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 c551e61863..cca2cd9e6f 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 c57659b2c7..3257833cdf 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 0532e67ae4..62fb7d8f6c 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 9a14e77854..8d6a96cd69 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 c94feb97cf..4f7a8e7846 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 b81530f62a..d3687a6557 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 76235ae1e2..ae76d88185 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 c7a1485cb1..fbc6e7753f 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 d04e6406aa..d160daedfa 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 014c28d3d6..baa0aeceb1 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 680d19b026..d39444059a 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 789aef5242..c676c27c12 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 97227fbe04..c2287d675d 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 7e53e9b0cb..4f216945f7 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 0ad0dd85c3..b8038d9163 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 3664b16aed..b29255d34a 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 523860ddd1..a3f7849e91 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 d942859764..7e10c21ce8 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 7238dcfa00..f68c8db965 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 631853a8ec..bd36d74e16 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 a31eb6ddd5..34fe6242e0 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 bfb581447c..d7e9d5d75c 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 { bucketFields, bucketOperations } from '../Aws/S3/V1/BucketDescription'; - -import { folderFields, folderOperations } from '../Aws/S3/V1/FolderDescription'; - -import { fileFields, fileOperations } from '../Aws/S3/V1/FileDescription'; +import { Builder } from 'xml2js'; import { s3ApiRequestREST, s3ApiRequestSOAP, s3ApiRequestSOAPAllItems } from './GenericFunctions'; +import { bucketFields, bucketOperations } from '../Aws/S3/V1/BucketDescription'; +import { fileFields, fileOperations } from '../Aws/S3/V1/FileDescription'; +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 c9cce032f7..275f92b6f6 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 5bf2a3ce8e..351c6f27a2 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 257a778ba3..895c5cbc78 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 c0b8d00029..f3f7f406db 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 42d31bd582..4a6453985b 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 904c5f6567..34b0f462c7 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 d6c124cc4c..4c953b9e40 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 b8ffb71327..0318e0b73a 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 0b62dae691..6e86475c66 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts @@ -20,12 +20,9 @@ import { split, updateAble, } from './GenericFunctions'; - -import { rowFields, rowOperations } from './RowDescription'; - -import type { TColumnsUiValues, TColumnValue } from './types'; - import type { ICtx, IRow, IRowObject } from './Interfaces'; +import { rowFields, rowOperations } from './RowDescription'; +import type { TColumnsUiValues, TColumnValue } from './types'; export class SeaTable implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts index 9995ee01ae..709367a6f5 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 876342b368..a84e1ab208 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 a1e533f6c9..520489b524 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 bfef2985a5..5699e22535 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 { 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 c803521206..560f1f36b3 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 9bf36b2e82..6ca6b76bd3 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 ad83f771b6..edd53b83ea 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -10,20 +10,13 @@ import { } from 'n8n-workflow'; import { eventFields, eventOperations } from './EventDescription'; - -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'; +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'; export class SentryIo implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index 50d78a31f5..15ef436497 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -9,6 +9,14 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +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, @@ -16,28 +24,10 @@ import { 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 { 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 fc84d08129..a982a6006b 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 55e92a5337..649218799f 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 b1dd055590..ac4083b355 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 d6754914ce..6ec6dd647b 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 0865e2c4ee..5ee7454e65 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 b24a5e2dd5..bd00fa4c73 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 ff515edfb1..1993bbba80 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 f2c70184e6..830dc051c2 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 a80924551c..3dc2b6015c 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 d793434ee1..766c86417a 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 6906b26395..fd33d2a9cc 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 9dbe79d8d4..c5efc880fd 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 a7f565c3f3..f5281dd29d 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 c31607dc0c..42f618eddf 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 585bde58e4..60dfcf79d2 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,20 +12,19 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; -import moment from 'moment-timezone'; -import { channelFields, channelOperations } from './ChannelDescription'; -import { messageFields, messageOperations } from './MessageDescription'; -import { starFields, starOperations } from './StarDescription'; -import { fileFields, fileOperations } from './FileDescription'; -import { reactionFields, reactionOperations } from './ReactionDescription'; -import { userGroupFields, userGroupOperations } from './UserGroupDescription'; -import { userFields, userOperations } from './UserDescription'; -import { userProfileFields, userProfileOperations } from './UserProfileDescription'; -import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions'; -import type { IAttachment } from './MessageInterface'; - import { oldVersionNotice } from '@utils/descriptions'; +import { channelFields, channelOperations } from './ChannelDescription'; +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 { starFields, starOperations } from './StarDescription'; +import { userFields, userOperations } from './UserDescription'; +import { userGroupFields, userGroupOperations } from './UserGroupDescription'; +import { userProfileFields, userProfileOperations } from './UserProfileDescription'; + interface Attachment { fields: { item?: object[]; diff --git a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts index 195ae91313..524a36d7b5 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,21 +20,10 @@ 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 { - channelRLC, - messageFields, - messageOperations, - 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 { userFields, userOperations } from './UserDescription'; import { slackApiRequest, slackApiRequestAllItems, @@ -44,6 +31,17 @@ import { getTarget, createSendAndWaitMessageBody, } from './GenericFunctions'; +import { + channelRLC, + messageFields, + messageOperations, + sendToSelector, + userRLC, +} from './MessageDescription'; +import { reactionFields, reactionOperations } from './ReactionDescription'; +import { starFields, starOperations } from './StarDescription'; +import { userFields, userOperations } from './UserDescription'; +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 e8fb19dc5f..f3eefc4bfa 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 a89302131c..81f23e284f 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 62fd9acd8f..9e53394c33 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 fd8312d250..4b816693ba 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 fad0e7ad99..99878cb691 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 85f4534460..154b137bfc 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 347b704b7c..c18f17ba54 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 16e6ba74d3..78735d0fc6 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 cf818cdc23..2cfff4b6d0 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 369b51901e..03179ebede 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 246dfeafd7..acf00fbd95 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 8e0365a062..62577de3b9 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 83406e1b51..475d27fff0 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 5857e14cd4..1fc0b92831 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 118ca8dd60..d63056ba89 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 d8e02ec86b..3cc4a40cd6 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 c33a38dc56..b4e930a608 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 425c52daab..2fdaafdd99 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 c6594e1403..a7ca5f9abe 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 b6d793fc63..d9e790809a 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 aef07773c3..bb22daf006 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 b76a3506d5..d7a4390f76 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 8d3a1f3342..74458ea544 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 1f3b59e273..bf7bb84798 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 41aad443d1..86ca26ae11 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 32972c08f3..ba71140e80 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 c667d9ad93..0c3a86837f 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 3b0d3965e8..36e06ccc00 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 b617b162aa..5191e106ee 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 1bb463a515..7f00a4e55b 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 1df3721de1..0175d8a7b7 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 5ea3bb3685..3cb1a7243b 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 246cce383e..f79ab5aebd 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 950391e611..3d232c4d4f 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 e3d9a05605..bf68be0366 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 46ffad1e9d..d0430fd934 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 822a40f269..57ebe3fe7f 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 e680a8214e..8ecf0ce619 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 7515ba509f..3512c38776 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 087163cb72..758e54c5c9 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 ee6fd8ea4f..665121eeb5 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 9e20cd87cd..cb2ad23db5 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 6b61655ee3..7210a70e17 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 b951831c3b..b9c792a564 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 24ad710612..e599515315 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 99c7cc80bb..e575c756b1 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 4694c3efa9..20c885ab06 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 719faeb478..7ec6ae2b68 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 61f8f8509e..d89d1e9c23 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 322e53bd75..7c856f967e 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 72c9ef4a18..f9b54e2a87 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 4cc003fa7f..32066af72c 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 c921e6a26d..488a333bb8 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 c3ff781b6f..5980e16dfc 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 48f01c78f5..e613945ced 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 2c8b3042a1..61435fada5 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 06b9d03337..14d1f5abdd 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 264b7eb314..6f3fcf2f91 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 ccc634597b..6cfe758601 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 18f6568d04..a8bf3b59af 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 69a0dc8448..25a1dcae3c 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 37a8c233e9..8d29244729 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 59582e0e22..168905dbcb 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 e5e9388e5f..ad369cda9b 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 d6471c173d..5c1817412f 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 92652e7bac..cf82ea1390 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 get from './get'; -import * as update from './update'; import * as del from './del'; +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/contact/update/description.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/contact/update/description.ts index ae805a1a8c..133c2a6327 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 55a3a16158..748a0d7780 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 a7353e5fe9..641b6f0dae 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 2d14aaa37a..58490575c3 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 b2a8983763..41e70e438c 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 bbe397550b..e4e98c2829 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 974c0543b3..f1ef5c8696 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 be3c8fd202..461649d884 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 380aa0e9dd..e97f0b0c47 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 145cbcc32b..506191d3a1 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 6b44825e55..35c2f00e85 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 cfedcddc59..5e3e5f5c77 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 df6bf2174c..6f870e9ed5 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 ad77601d55..1e08b22825 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 5eaeaf3ec3..ea16363f51 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 d39e22fffb..7c42ee4df2 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 3b5a5b3210..e69c37e532 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 0a3b178def..88fc8bd1ec 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 8919e1726f..c67a6d1c34 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 530eec20d8..1a77b36563 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 93420f25d4..116e1a925f 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 49dfc1d67c..b9a98c1a0a 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 98547072fe..5cc0fdf169 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 cfb9711917..c112fe9ec5 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 d01e36cdd4..70c6f70b55 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 d49be81d24..d27502ffd3 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 87c3bb8bcb..fd6e958477 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 5ae67465bf..7d1d37b09f 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 69d037c79c..85752afbeb 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 de17adf1db..ad6a04dba3 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 ab9a4cd445..6c3c99d363 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 e405191423..26946664a8 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 7cc84868c1..6c7b2ce8bf 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 297ae58f51..3eeee45b48 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 5550fdf201..6df7b41d65 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 e7a6fc6f9e..3361088fb2 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,14 +7,12 @@ import type { INodeProperties, } from 'n8n-workflow'; -import set from 'lodash/set'; - -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 { observableTypeOptions } from '../../descriptions'; +import { fixFieldType, prepareInputItem, splitAndTrim } from '../../helpers/utils'; +import { theHiveApiRequest } from '../../transport'; + const properties: INodeProperties[] = [ { displayName: 'Fields', 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 2e914b5f58..bc92d46832 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 4a5712152a..e7282c2366 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 f634780025..27429580e5 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 4e3801bf7c..e1550561d8 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 9be2833a4e..1be21dc225 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 d59821e8f6..4dfb9bb997 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 f74cb70b9a..c5e80c24f8 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 5244b79dfb..0835ff91c1 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 aaf0b398ed..a57cb4f3d7 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 cae32b71b5..c62eeb3b95 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 7e212c3c62..fe9973ac36 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 7491cfcb51..013092454f 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 077b45ad9b..c46a2558bf 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 3132266005..d9d4c1c3d6 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 2c516f05ab..fbb2e7d196 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 0a3566f154..55e8696300 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 3b945856f9..6a5584810d 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 9a2ec7c3ae..9031d8592d 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 c7f44f5e40..dccfda95ee 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 4b3539bc2e..dc25891740 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 572db21959..bc689dd553 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 e178729c61..e483422b14 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 86bcd95d61..17d6c6ee78 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 5379ce91a4..ac3084f704 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 31e84c5dc9..5226f84295 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 2f73eeaed0..859e6ee00a 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/log/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/log/create.operation.ts @@ -5,12 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; - -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; -import { attachmentsUi, taskRLC } from '../../descriptions'; import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { attachmentsUi, taskRLC } from '../../descriptions'; +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 017d7b4999..8766b0c3da 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 44fb4e5aed..db1df28fd9 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 8eceb9660b..76b3f69d72 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 b110db32ac..993b916869 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 9aed510404..8cb49fbfca 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 bd6ca8cf59..9763d3e46d 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 ba515bbb78..889422f45b 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 e8e6567b5a..b1cf8fe0a1 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 54deac7c0b..f547b67a70 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 5f75bc9367..a02da30cdb 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 7dc729b56d..1d540732e3 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 e27c8e8331..1975fbb36b 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 9c3ef4243f..3680aeefc9 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 0c2531d8df..ab773de4cc 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 3522404168..84967ae027 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 796da7b682..b060f3cbd0 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 8d41f9ba97..f03f17ec41 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 f4772aacad..e96e195cae 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 03fe0a25e4..b6ac961627 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 414549e690..a04c6c24f1 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/task/create.operation.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/task/create.operation.ts @@ -5,12 +5,12 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { theHiveApiRequest } from '../../transport'; - -import { fixFieldType, prepareInputItem } from '../../helpers/utils'; -import { caseRLC } from '../../descriptions'; import { updateDisplayOptions, wrapData } from '@utils/utilities'; +import { caseRLC } from '../../descriptions'; +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 213e4794cf..62c44daba2 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 d3f540baad..eb767ecbb4 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 f88853e614..ec4f0ef35f 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 0954fc8856..ce7d00e8e7 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 80875d27f6..c5a26fefcb 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 7a7d316a78..5653375dd4 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 8c392043b8..b4768123a2 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 ce35c11a48..cd3ca6d9ab 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 3e7c925257..7884b78104 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 84703409ba..59c5636091 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 442cb2739f..0d370dc675 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 69cd05f3e8..28d5f67408 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 15461efdf4..f485f9c8de 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 b4cd4f2ec1..d2c48a5d07 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 fa5112a5bf..348f6a1e7d 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 fccfa3f679..40ebfad5a3 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 a1b706cac1..d1b3009a9f 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 b9fdb75ec3..cd6fb5f1b9 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 585b205e0b..57812697a0 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 bfa368c1c4..dbaf861ad0 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 60196b9b67..191e4486b4 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 f454daeba3..f3ada2fa36 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 711146f74b..36791d57f7 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 e2e3fa4f58..38c225d3c7 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 5c2a9e3a68..57b77527e6 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 12d0e06f22..83ded6d7af 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 b089998eb8..b4421dbf54 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 fbc109dc86..6c6274839b 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 ac599663d7..0554a99939 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 16d6d530ea..a11c29c16e 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 0cfb9b296b..92e485d610 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 1b0bfd61c6..7b42390e72 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 bf2ea40568..e210689346 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 fc7486ce57..b653d691fe 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 a0e354392f..4be6f454a4 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 f48e247583..2aeccd5e9f 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 23c0b1d8c6..52407c6c5e 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 9fd7fd1a97..1d6e90a16d 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 ca111ca57b..ffa3df226d 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 4ab99039c0..48637dd7c0 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 d51ff9d498..1862b9e8ae 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 8db5cc2f7f..4c3438b3a4 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 c749cb2402..381e6da551 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 bf6bb6e9a1..e31bf8924d 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 933f8175cc..9841596504 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 fc0d0ea4a9..fad5bac766 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 bcb279c279..ebf9144118 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 9039891e99..45922270c2 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 2985cd7369..9384692563 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 ad17ff9e05..3c9e6c56a6 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 371a9df3c6..59eb4c552e 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 cdd2ee3814..1da016bd9b 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 9938f4eaa1..9255dab346 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 c0cd992c8e..42a81aab71 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 97fd23e90e..250ad3af8a 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 91a244aa41..b2fc3f84e2 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 3f6b78e552..08a588a5a8 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 184f03a150..6e54c46ed1 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 b50c9adad9..6f027ccd8e 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 48ef7dd377..e22498b35b 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 643c543f4d..f1b47900c1 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 d3a087903c..10fdc64d3d 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 7275a9b43e..2947b4a60d 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 fb0f0e40f4..a9603fb25f 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 a5fe553803..129ef4e8a9 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 59ce8beff9..22432a3422 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 f2519b17e5..a4ef46ffd3 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 3fb4ac5830..0aaab6b978 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 52257110c1..4178e23b31 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 { wordpressApiRequest, wordpressApiRequestAllItems } from './GenericFunctions'; +import { pageFields, pageOperations } from './PageDescription'; 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 121ead0dc2..5ccc7f0fa2 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 21cc48221b..0ef83bbe9d 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 4a06f8d0e3..1e5ac8e6c2 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 7cb91c179c..63e7212e4c 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 fade7c1334..894242fe7c 100644 --- a/packages/nodes-base/nodes/Xero/Xero.node.ts +++ b/packages/nodes-base/nodes/Xero/Xero.node.ts @@ -10,15 +10,11 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { xeroApiRequest, xeroApiRequestAllItems } from './GenericFunctions'; - -import { invoiceFields, invoiceOperations } from './InvoiceDescription'; - import { contactFields, contactOperations } from './ContactDescription'; - -import type { IInvoice, ILineItem } from './InvoiceInterface'; - +import { xeroApiRequest, xeroApiRequestAllItems } from './GenericFunctions'; import type { IAddress, IContact, IPhone } from './IContactInterface'; +import { invoiceFields, invoiceOperations } from './InvoiceDescription'; +import type { IInvoice, ILineItem } from './InvoiceInterface'; export class Xero implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Xml/Xml.node.ts b/packages/nodes-base/nodes/Xml/Xml.node.ts index 6b05660f24..d83eb3b82c 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 e4fee71eca..c611ab2819 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 aad3fa3d84..85ef2d7a6b 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 5b006b444d..07f64c680b 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 b83e50c290..8c492275a8 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 { ticketFields, ticketOperations } from './TicketDescription'; - -import { ticketFieldFields, ticketFieldOperations } from './TicketFieldDescription'; - -import { userFields, userOperations } from './UserDescription'; - import { organizationFields, organizationOperations } from './OrganizationDescription'; - +import { ticketFields, ticketOperations } from './TicketDescription'; +import { ticketFieldFields, ticketFieldOperations } from './TicketFieldDescription'; 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 72115e073e..1a0b5f59d0 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 7b025bfcda..554cb49425 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 e1cd2135be..67d76a33ab 100644 --- a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts +++ b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts @@ -8,41 +8,6 @@ import { NodeConnectionType, } from 'n8n-workflow'; -import { - addGetAllFilterOptions, - adjustAccountPayload, - adjustContactPayload, - adjustDealPayload, - adjustInvoicePayload, - adjustInvoicePayloadOnUpdate, - adjustLeadPayload, - adjustProductDetails, - adjustProductPayload, - adjustPurchaseOrderPayload, - adjustQuotePayload, - adjustSalesOrderPayload, - adjustVendorPayload, - getFields, - getPicklistOptions, - handleListing, - throwOnEmptyUpdate, - throwOnMissingProducts, - toLoadOptions, - zohoApiRequest, - zohoApiRequestAllItems, -} from './GenericFunctions'; - -import type { - CamelCaseResource, - GetAllFilterOptions, - LoadedAccounts, - LoadedContacts, - LoadedDeals, - LoadedProducts, - LoadedVendors, - ProductDetails, -} from './types'; - import { accountFields, accountOperations, @@ -65,6 +30,39 @@ import { vendorFields, vendorOperations, } from './descriptions'; +import { + addGetAllFilterOptions, + adjustAccountPayload, + adjustContactPayload, + adjustDealPayload, + adjustInvoicePayload, + adjustInvoicePayloadOnUpdate, + adjustLeadPayload, + adjustProductDetails, + adjustProductPayload, + adjustPurchaseOrderPayload, + adjustQuotePayload, + adjustSalesOrderPayload, + adjustVendorPayload, + getFields, + getPicklistOptions, + handleListing, + throwOnEmptyUpdate, + throwOnMissingProducts, + toLoadOptions, + zohoApiRequest, + zohoApiRequestAllItems, +} from './GenericFunctions'; +import type { + CamelCaseResource, + GetAllFilterOptions, + LoadedAccounts, + LoadedContacts, + LoadedDeals, + LoadedProducts, + LoadedVendors, + ProductDetails, +} from './types'; export class ZohoCrm implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Zoho/descriptions/SharedFields.ts b/packages/nodes-base/nodes/Zoho/descriptions/SharedFields.ts index 6e79c724b1..aa62792041 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 2937ffa2f9..2a9f051765 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 7caa98132c..67fab2e467 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 db7ef72af3..11585374bf 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 82b20eaf82..3573edf2d4 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 ffb79a78ed..969001e619 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 a2ebee1370..19e4f72b40 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 8080c711fb..42b88b7338 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 c399bd4554..f56806b8b4 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 c552f6064f..fadbd147ce 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 e037942215..5194887f2f 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 c582d1f851..5328c2c8d3 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 5c0b7f9d2b..cae18ae90b 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