From c4eb3746d740203d29dd177070389f5cda72ca5e Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Thu, 29 Aug 2024 09:55:53 -0400 Subject: [PATCH] refactor: Use `NodeConnectionType` consistently across the code base (no-changelog) (#10595) --- .../nodes/agents/Agent/Agent.node.ts | 7 ++-- .../trigger/ChatTrigger/ChatTrigger.node.ts | 2 +- .../OpenAi/actions/versionDescription.ts | 2 +- .../@n8n/nodes-langchain/utils/logWrapper.ts | 8 ++--- .../src/__tests__/credentials-helper.test.ts | 6 ++-- .../cli/test/integration/webhooks.api.test.ts | 9 +++-- packages/core/src/NodeExecuteFunctions.ts | 16 ++++----- packages/core/src/WorkflowExecute.ts | 12 +++++-- packages/core/test/helpers/constants.ts | 4 +-- packages/editor-ui/src/__tests__/mocks.ts | 6 ++-- .../src/components/ExpressionEditModal.vue | 3 +- .../editor-ui/src/components/InputPanel.vue | 11 +++---- .../src/components/NDVFloatingNodes.vue | 10 ++++-- .../src/components/NDVSubConnections.vue | 30 +++++++++-------- packages/editor-ui/src/components/Node.vue | 3 +- .../__tests__/useActionsGeneration.test.ts | 6 ++-- .../editor-ui/src/components/NodeSettings.vue | 3 +- packages/editor-ui/src/components/RunData.vue | 9 +++-- .../src/components/RunDataSchema.vue | 3 +- .../__tests__/useContextMenu.test.ts | 7 ++-- .../composables/__tests__/useNodeBase.spec.ts | 11 +++++-- .../src/composables/useCanvasOperations.ts | 5 ++- .../editor-ui/src/composables/useNodeBase.ts | 19 +++++------ .../src/composables/useNodeHelpers.ts | 11 +++---- .../editor-ui/src/stores/nodeTypes.store.ts | 9 +++-- .../editor-ui/src/stores/workflows.store.ts | 4 +-- packages/editor-ui/src/utils/nodeViewUtils.ts | 18 +++++----- packages/editor-ui/src/views/NodeView.vue | 15 ++++----- packages/nodes-base/.eslintrc.js | 4 +-- .../nodes/ActionNetwork/ActionNetwork.node.ts | 6 ++-- .../ActiveCampaign/ActiveCampaign.node.ts | 6 ++-- .../ActiveCampaignTrigger.node.ts | 3 +- .../AcuitySchedulingTrigger.node.ts | 3 +- packages/nodes-base/nodes/Adalo/Adalo.node.ts | 17 +++++----- .../nodes/Affinity/Affinity.node.ts | 5 +-- .../nodes/Affinity/AffinityTrigger.node.ts | 4 +-- .../nodes/AgileCrm/AgileCrm.node.ts | 6 ++-- .../nodes/AiTransform/AiTransform.node.ts | 5 +-- .../nodes/Airtable/AirtableTrigger.node.ts | 4 +-- .../nodes/Airtable/v1/AirtableV1.node.ts | 6 ++-- .../Airtable/v2/actions/versionDescription.ts | 6 ++-- packages/nodes-base/nodes/Amqp/Amqp.node.ts | 6 ++-- .../nodes-base/nodes/Amqp/AmqpTrigger.node.ts | 4 +-- .../nodes/ApiTemplateIo/ApiTemplateIo.node.ts | 6 ++-- packages/nodes-base/nodes/Asana/Asana.node.ts | 6 ++-- .../nodes/Asana/AsanaTrigger.node.ts | 4 +-- .../nodes/Automizy/Automizy.node.ts | 23 ++++++------- .../nodes/Autopilot/Autopilot.node.ts | 23 ++++++------- .../nodes/Autopilot/AutopilotTrigger.node.ts | 3 +- .../nodes-base/nodes/Aws/AwsLambda.node.ts | 6 ++-- packages/nodes-base/nodes/Aws/AwsSns.node.ts | 23 ++++++------- .../nodes/Aws/AwsSnsTrigger.node.ts | 4 +-- .../AwsCertificateManager.node.ts | 5 +-- .../Aws/Comprehend/AwsComprehend.node.ts | 5 +-- .../nodes/Aws/DynamoDB/AwsDynamoDB.node.ts | 21 ++++++------ .../nodes-base/nodes/Aws/ELB/AwsElb.node.ts | 5 +-- .../Aws/Rekognition/AwsRekognition.node.ts | 5 +-- .../nodes/Aws/S3/V1/AwsS3V1.node.ts | 6 ++-- .../nodes/Aws/S3/V2/AwsS3V2.node.ts | 6 ++-- .../nodes-base/nodes/Aws/SES/AwsSes.node.ts | 6 ++-- .../nodes-base/nodes/Aws/SQS/AwsSqs.node.ts | 6 ++-- .../nodes/Aws/Textract/AwsTextract.node.ts | 25 +++++++------- .../Aws/Transcribe/AwsTranscribe.node.ts | 5 +-- .../BambooHr/v1/actions/versionDescription.ts | 6 ++-- .../nodes/Bannerbear/Bannerbear.node.ts | 5 +-- .../nodes-base/nodes/Baserow/Baserow.node.ts | 19 ++++++----- .../nodes/Beeminder/Beeminder.node.ts | 23 ++++++------- .../nodes/Bitbucket/BitbucketTrigger.node.ts | 29 ++++++++-------- packages/nodes-base/nodes/Bitly/Bitly.node.ts | 5 +-- .../nodes/Bitwarden/Bitwarden.node.ts | 6 ++-- packages/nodes-base/nodes/Box/Box.node.ts | 6 ++-- .../nodes-base/nodes/Box/BoxTrigger.node.ts | 15 +++++---- .../nodes/Brandfetch/Brandfetch.node.ts | 5 +-- packages/nodes-base/nodes/Brevo/Brevo.node.ts | 5 +-- .../nodes/Brevo/BrevoTrigger.node.ts | 15 +++++---- .../nodes-base/nodes/Bubble/Bubble.node.ts | 6 ++-- .../nodes-base/nodes/Cal/CalTrigger.node.ts | 21 ++++++------ .../nodes/Calendly/CalendlyTrigger.node.ts | 3 +- .../nodes/Chargebee/Chargebee.node.ts | 6 ++-- .../nodes/Chargebee/ChargebeeTrigger.node.ts | 15 +++++---- .../nodes/CircleCi/CircleCi.node.ts | 5 +-- .../nodes/Cisco/Webex/CiscoWebex.node.ts | 5 +-- .../Cisco/Webex/CiscoWebexTrigger.node.ts | 3 +- .../nodes/Clearbit/Clearbit.node.ts | 5 +-- .../nodes-base/nodes/ClickUp/ClickUp.node.ts | 6 ++-- .../nodes/ClickUp/ClickUpTrigger.node.ts | 3 +- .../nodes/Clockify/Clockify.node.ts | 5 +-- .../nodes/Clockify/ClockifyTrigger.node.ts | 3 +- .../nodes/Cloudflare/Cloudflare.node.ts | 5 +-- .../nodes-base/nodes/Cockpit/Cockpit.node.ts | 5 +-- packages/nodes-base/nodes/Coda/Coda.node.ts | 6 ++-- packages/nodes-base/nodes/Code/Code.node.ts | 19 ++++++----- .../nodes/CoinGecko/CoinGecko.node.ts | 5 +-- .../CompareDatasets/CompareDatasets.node.ts | 22 ++++++++----- .../nodes/Compression/Compression.node.ts | 17 +++++----- .../nodes/Contentful/Contentful.node.ts | 5 +-- .../nodes/ConvertKit/ConvertKit.node.ts | 21 ++++++------ .../ConvertKit/ConvertKitTrigger.node.ts | 3 +- .../nodes-base/nodes/Copper/Copper.node.ts | 5 +-- .../nodes/Copper/CopperTrigger.node.ts | 3 +- .../Copper/descriptions/CompanyDescription.ts | 3 +- .../nodes-base/nodes/Cortex/Cortex.node.ts | 5 +-- .../nodes-base/nodes/CrateDb/CrateDb.node.ts | 6 ++-- packages/nodes-base/nodes/Cron/Cron.node.ts | 4 +-- .../nodes/CrowdDev/CrowdDev.node.ts | 5 +-- .../nodes/CrowdDev/CrowdDevTrigger.node.ts | 17 +++++----- .../nodes-base/nodes/Crypto/Crypto.node.ts | 6 ++-- .../nodes/CustomerIo/CustomerIo.node.ts | 6 ++-- .../CustomerIo/CustomerIoTrigger.node.ts | 3 +- .../nodes/DateTime/V1/DateTimeV1.node.ts | 6 ++-- .../nodes/DateTime/V2/DateTimeV2.node.ts | 6 ++-- .../nodes/DebugHelper/DebugHelper.node.ts | 11 +++++-- packages/nodes-base/nodes/DeepL/DeepL.node.ts | 5 +-- packages/nodes-base/nodes/Demio/Demio.node.ts | 5 +-- packages/nodes-base/nodes/Dhl/Dhl.node.ts | 25 +++++++------- .../nodes/Discord/v1/DiscordV1.node.ts | 12 +++++-- .../Discord/v2/actions/versionDescription.ts | 6 ++-- .../nodes/Discourse/Discourse.node.ts | 5 +-- .../nodes-base/nodes/Disqus/Disqus.node.ts | 6 ++-- packages/nodes-base/nodes/Drift/Drift.node.ts | 5 +-- .../nodes-base/nodes/Dropbox/Dropbox.node.ts | 6 ++-- .../nodes/Dropcontact/Dropcontact.node.ts | 6 ++-- .../nodes-base/nodes/E2eTest/E2eTest.node.ts | 23 ++++++------- .../nodes-base/nodes/ERPNext/ERPNext.node.ts | 6 ++-- .../nodes/EditImage/EditImage.node.ts | 6 ++-- packages/nodes-base/nodes/Egoi/Egoi.node.ts | 5 +-- .../ElasticSecurity/ElasticSecurity.node.ts | 6 ++-- .../Elasticsearch/Elasticsearch.node.ts | 6 ++-- .../EmailReadImap/v1/EmailReadImapV1.node.ts | 4 +-- .../EmailReadImap/v2/EmailReadImapV2.node.ts | 4 +-- .../nodes/EmailSend/v1/EmailSendV1.node.ts | 5 +-- .../nodes/EmailSend/v2/EmailSendV2.node.ts | 5 +-- .../nodes-base/nodes/Emelia/Emelia.node.ts | 19 ++++++----- .../nodes/Emelia/EmeliaTrigger.node.ts | 21 ++++++------ .../nodes/ErrorTrigger/ErrorTrigger.node.ts | 3 +- .../Eventbrite/EventbriteTrigger.node.ts | 4 +-- .../ExecuteCommand/ExecuteCommand.node.ts | 6 ++-- .../ExecuteWorkflow/ExecuteWorkflow.node.ts | 7 ++-- .../ExecuteWorkflowTrigger.node.ts | 9 +++-- .../nodes/ExecutionData/ExecutionData.node.ts | 5 +-- .../nodes/Facebook/FacebookGraphApi.node.ts | 6 ++-- .../nodes/Facebook/FacebookTrigger.node.ts | 4 +-- .../FacebookLeadAdsTrigger.node.ts | 3 +- .../nodes/Figma/FigmaTrigger.node.ts | 3 +- .../nodes/FileMaker/FileMaker.node.ts | 6 ++-- .../Files/ConvertToFile/ConvertToFile.node.ts | 5 +-- .../ExtractFromFile/ExtractFromFile.node.ts | 5 +-- .../Files/ReadWriteFile/ReadWriteFile.node.ts | 5 +-- .../nodes/Filter/V1/FilterV1.node.ts | 21 ++++++------ .../nodes/Filter/V2/FilterV2.node.ts | 5 +-- packages/nodes-base/nodes/Flow/Flow.node.ts | 6 ++-- .../nodes-base/nodes/Flow/FlowTrigger.node.ts | 3 +- packages/nodes-base/nodes/Form/utils.ts | 10 +++--- .../nodes/Form/v1/FormTriggerV1.node.ts | 3 +- .../nodes/Form/v2/FormTriggerV2.node.ts | 15 +++++---- .../nodes/FormIo/FormIoTrigger.node.ts | 21 ++++++------ .../nodes/Formstack/FormstackTrigger.node.ts | 3 +- .../nodes/Freshdesk/Freshdesk.node.ts | 6 ++-- .../nodes/Freshservice/Freshservice.node.ts | 5 +-- .../nodes/FreshworksCrm/FreshworksCrm.node.ts | 19 ++++++----- packages/nodes-base/nodes/Ftp/Ftp.node.ts | 6 ++-- .../nodes/Function/Function.node.ts | 8 ++--- .../nodes/FunctionItem/FunctionItem.node.ts | 8 ++--- .../nodes/GetResponse/GetResponse.node.ts | 5 +-- .../GetResponse/GetResponseTrigger.node.ts | 4 +-- packages/nodes-base/nodes/Ghost/Ghost.node.ts | 6 ++-- packages/nodes-base/nodes/Git/Git.node.ts | 5 +-- .../nodes-base/nodes/Github/Github.node.ts | 6 ++-- .../nodes/Github/GithubTrigger.node.ts | 4 +-- .../nodes-base/nodes/Gitlab/Gitlab.node.ts | 6 ++-- .../nodes/Gitlab/GitlabTrigger.node.ts | 4 +-- .../nodes/GoToWebinar/GoToWebinar.node.ts | 6 ++-- .../nodes/Google/Ads/GoogleAds.node.ts | 6 ++-- .../Analytics/v1/GoogleAnalyticsV1.node.ts | 25 +++++++------- .../v2/actions/versionDescription.ts | 6 ++-- .../BigQuery/v1/GoogleBigQueryV1.node.ts | 7 ++-- .../BigQuery/v2/actions/versionDescription.ts | 6 ++-- .../nodes/Google/Books/GoogleBooks.node.ts | 5 +-- .../Google/Calendar/GoogleCalendar.node.ts | 6 ++-- .../Calendar/GoogleCalendarTrigger.node.ts | 4 +-- .../nodes/Google/Chat/GoogleChat.node.ts | 6 ++-- .../GoogleCloudNaturalLanguage.node.ts | 15 +++++---- .../CloudStorage/GoogleCloudStorage.node.ts | 6 ++-- .../Google/Contacts/GoogleContacts.node.ts | 5 +-- .../nodes/Google/Docs/GoogleDocs.node.ts | 6 ++-- .../Google/Drive/GoogleDriveTrigger.node.ts | 4 +-- .../Google/Drive/v1/GoogleDriveV1.node.ts | 6 ++-- .../Drive/v2/actions/versionDescription.ts | 6 ++-- .../GoogleFirebaseCloudFirestore.node.ts | 6 ++-- .../RealtimeDatabase/GenericFunctions.ts | 4 +-- .../GoogleFirebaseRealtimeDatabase.node.ts | 6 ++-- .../Google/GSuiteAdmin/GSuiteAdmin.node.ts | 6 ++-- .../nodes/Google/Gmail/GmailTrigger.node.ts | 3 +- .../nodes/Google/Gmail/v1/GmailV1.node.ts | 27 +++++++-------- .../nodes/Google/Gmail/v2/GmailV2.node.ts | 6 ++-- .../Perspective/GooglePerspective.node.ts | 6 ++-- .../Google/Sheet/GoogleSheetsTrigger.node.ts | 4 +-- .../nodes/Google/Sheet/v1/GoogleSheet.ts | 2 +- .../Google/Sheet/v1/GoogleSheetsV1.node.ts | 2 +- .../Google/Sheet/v1/versionDescription.ts | 6 ++-- .../Sheet/v2/actions/versionDescription.ts | 6 ++-- .../nodes/Google/Slides/GoogleSlides.node.ts | 5 +-- .../nodes/Google/Task/GoogleTasks.node.ts | 5 +-- .../Google/Translate/GoogleTranslate.node.ts | 5 +-- .../nodes/Google/YouTube/YouTube.node.ts | 6 ++-- .../nodes-base/nodes/Gotify/Gotify.node.ts | 5 +-- .../nodes-base/nodes/Grafana/Grafana.node.ts | 6 ++-- .../nodes-base/nodes/GraphQL/GraphQL.node.ts | 6 ++-- packages/nodes-base/nodes/Grist/Grist.node.ts | 27 +++++++-------- .../nodes/Gumroad/GumroadTrigger.node.ts | 3 +- .../nodes/HackerNews/HackerNews.node.ts | 6 ++-- .../nodes-base/nodes/HaloPSA/HaloPSA.node.ts | 31 ++++++++--------- .../nodes-base/nodes/Harvest/Harvest.node.ts | 6 ++-- .../nodes/HelpScout/HelpScout.node.ts | 9 +++-- .../nodes/HelpScout/HelpScoutTrigger.node.ts | 4 +-- .../nodes/HighLevel/v1/HighLevelV1.node.ts | 5 +-- .../nodes/HighLevel/v2/HighLevelV2.node.ts | 5 +-- .../nodes/HomeAssistant/HomeAssistant.node.ts | 27 +++++++-------- packages/nodes-base/nodes/Html/Html.node.ts | 6 ++-- .../nodes/HtmlExtract/HtmlExtract.node.ts | 6 ++-- .../HttpRequest/V1/HttpRequestV1.node.ts | 12 +++++-- .../HttpRequest/V2/HttpRequestV2.node.ts | 12 +++++-- .../HttpRequest/V3/HttpRequestV3.node.ts | 7 ++-- .../nodes/Hubspot/HubspotTrigger.node.ts | 4 +-- .../nodes/Hubspot/V1/HubspotV1.node.ts | 6 ++-- .../nodes/Hubspot/V2/HubspotV2.node.ts | 6 ++-- .../nodes/HumanticAI/HumanticAi.node.ts | 5 +-- .../nodes-base/nodes/Hunter/Hunter.node.ts | 5 +-- .../nodes/ICalendar/ICalendar.node.ts | 5 +-- packages/nodes-base/nodes/If/V1/IfV1.node.ts | 6 ++-- packages/nodes-base/nodes/If/V2/IfV2.node.ts | 5 +-- .../nodes/Intercom/Intercom.node.ts | 6 ++-- .../nodes/Interval/Interval.node.ts | 4 +-- .../nodes/InvoiceNinja/InvoiceNinja.node.ts | 8 ++--- .../InvoiceNinja/InvoiceNinjaTrigger.node.ts | 15 +++++---- .../nodes/ItemLists/V1/ItemListsV1.node.ts | 6 ++-- .../nodes/ItemLists/V2/ItemListsV2.node.ts | 6 ++-- .../itemList/splitOutItems.operation.ts | 2 +- .../V3/actions/versionDescription.ts | 6 ++-- .../nodes/Iterable/Iterable.node.ts | 6 ++-- .../nodes-base/nodes/Jenkins/Jenkins.node.ts | 6 ++-- packages/nodes-base/nodes/Jira/Jira.node.ts | 29 ++++++++-------- .../nodes-base/nodes/Jira/JiraTrigger.node.ts | 4 +-- .../nodes/JotForm/JotFormTrigger.node.ts | 4 +-- packages/nodes-base/nodes/Jwt/Jwt.node.ts | 6 ++-- packages/nodes-base/nodes/Kafka/Kafka.node.ts | 6 ++-- .../nodes/Kafka/KafkaTrigger.node.ts | 4 +-- packages/nodes-base/nodes/Keap/Keap.node.ts | 5 +-- .../nodes-base/nodes/Keap/KeapTrigger.node.ts | 3 +- .../nodes/Kitemaker/Kitemaker.node.ts | 6 ++-- .../nodes/KoBoToolbox/KoBoToolbox.node.ts | 5 +-- .../KoBoToolbox/KoBoToolboxTrigger.node.ts | 17 +++++----- packages/nodes-base/nodes/Ldap/Ldap.node.ts | 6 ++-- .../nodes-base/nodes/Lemlist/Lemlist.node.ts | 19 ++++++----- .../nodes/Lemlist/LemlistTrigger.node.ts | 3 +- packages/nodes-base/nodes/Line/Line.node.ts | 5 +-- .../nodes-base/nodes/Linear/Linear.node.ts | 31 ++++++++--------- .../nodes/Linear/LinearTrigger.node.ts | 19 ++++++----- .../nodes/LingvaNex/LingvaNex.node.ts | 5 +-- .../nodes/LinkedIn/LinkedIn.node.ts | 5 +-- .../LocalFileTrigger/LocalFileTrigger.node.ts | 15 +++++---- .../nodes/LoneScale/LoneScale.node.ts | 5 +-- .../nodes/LoneScale/LoneScaleTrigger.node.ts | 21 ++++++------ packages/nodes-base/nodes/MQTT/Mqtt.node.ts | 21 ++++++------ .../nodes-base/nodes/MQTT/MqttTrigger.node.ts | 4 +-- .../nodes-base/nodes/Magento/Magento2.node.ts | 6 ++-- .../nodes/Mailcheck/Mailcheck.node.ts | 5 +-- .../nodes/Mailchimp/Mailchimp.node.ts | 5 +-- .../nodes/Mailchimp/MailchimpTrigger.node.ts | 4 +-- .../nodes/MailerLite/MailerLite.node.ts | 5 +-- .../MailerLite/MailerLiteTrigger.node.ts | 3 +- .../nodes-base/nodes/Mailgun/Mailgun.node.ts | 6 ++-- .../nodes-base/nodes/Mailjet/Mailjet.node.ts | 6 ++-- .../nodes/Mailjet/MailjetTrigger.node.ts | 3 +- .../nodes/Mandrill/Mandrill.node.ts | 6 ++-- .../nodes/ManualTrigger/ManualTrigger.node.ts | 3 +- .../nodes/Markdown/Markdown.node.ts | 6 ++-- .../nodes/Marketstack/Marketstack.node.ts | 6 ++-- .../nodes-base/nodes/Matrix/Matrix.node.ts | 5 +-- .../v1/actions/versionDescription.ts | 6 ++-- .../nodes-base/nodes/Mautic/Mautic.node.ts | 6 ++-- .../nodes/Mautic/MauticTrigger.node.ts | 21 ++++++------ .../nodes-base/nodes/Medium/Medium.node.ts | 6 ++-- .../nodes-base/nodes/Merge/v1/MergeV1.node.ts | 6 ++-- .../nodes-base/nodes/Merge/v2/MergeV2.node.ts | 21 ++++++------ packages/nodes-base/nodes/Merge/v2/utils.ts | 3 +- .../nodes/Merge/v3/actions/mode/append.ts | 3 +- .../Merge/v3/actions/mode/chooseBranch.ts | 3 +- .../nodes/Merge/v3/actions/mode/combineAll.ts | 7 ++-- .../Merge/v3/actions/mode/combineByFields.ts | 3 +- .../v3/actions/mode/combineByPosition.ts | 7 ++-- .../Merge/v3/actions/mode/combineBySql.ts | 5 ++- .../nodes/Merge/v3/actions/router.ts | 2 +- .../Merge/v3/actions/versionDescription.ts | 7 ++-- .../nodes/Merge/v3/helpers/utils.ts | 3 +- .../nodes/MessageBird/MessageBird.node.ts | 6 ++-- .../nodes/Metabase/Metabase.node.ts | 5 +-- .../Dynamics/MicrosoftDynamicsCrm.node.ts | 5 +-- .../Excel/v1/MicrosoftExcelV1.node.ts | 6 ++-- .../Excel/v2/actions/versionDescription.ts | 6 ++-- .../MicrosoftGraphSecurity.node.ts | 5 +-- .../OneDrive/MicrosoftOneDrive.node.ts | 6 ++-- .../OneDrive/MicrosoftOneDriveTrigger.node.ts | 15 +++++---- .../Outlook/MicrosoftOutlookTrigger.node.ts | 13 ++++---- .../Outlook/v1/MicrosoftOutlookV1.node.ts | 6 ++-- .../v2/actions/draft/create.operation.ts | 3 +- .../messageAttachment/add.operation.ts | 3 +- .../Outlook/v2/actions/node.description.ts | 6 ++-- .../nodes/Microsoft/Sql/MicrosoftSql.node.ts | 25 +++++++------- .../Teams/v1/MicrosoftTeamsV1.node.ts | 23 ++++++------- .../Teams/v2/actions/versionDescription.ts | 6 ++-- .../Microsoft/ToDo/MicrosoftToDo.node.ts | 6 ++-- .../nodes-base/nodes/Mindee/Mindee.node.ts | 6 ++-- .../nodes-base/nodes/Misp/GenericFunctions.ts | 1 - packages/nodes-base/nodes/Misp/Misp.node.ts | 19 ++++++----- .../nodes-base/nodes/Mocean/Mocean.node.ts | 6 ++-- .../nodes/MondayCom/MondayCom.node.ts | 6 ++-- .../nodes-base/nodes/MongoDb/MongoDb.node.ts | 6 ++-- .../nodes/MonicaCrm/MonicaCrm.node.ts | 19 ++++++----- .../MoveBinaryData/MoveBinaryData.node.ts | 12 +++++-- packages/nodes-base/nodes/Msg91/Msg91.node.ts | 6 ++-- .../nodes-base/nodes/MySql/v1/MySqlV1.node.ts | 6 ++-- .../MySql/v2/actions/versionDescription.ts | 6 ++-- .../nodes/MySql/v2/methods/listSearch.ts | 2 +- .../nodes/MySql/v2/methods/loadOptions.ts | 2 +- .../nodes/MySql/v2/transport/index.ts | 4 +-- packages/nodes-base/nodes/N8n/N8n.node.ts | 6 ++-- .../N8nTrainingCustomerDatastore.node.ts | 5 +-- .../N8nTrainingCustomerMessenger.node.ts | 15 +++++---- .../nodes/N8nTrigger/N8nTrigger.node.ts | 3 +- packages/nodes-base/nodes/Nasa/Nasa.node.ts | 6 ++-- .../nodes-base/nodes/Netlify/Netlify.node.ts | 5 +-- .../nodes/Netlify/NetlifyTrigger.node.ts | 3 +- .../nodes/Netscaler/ADC/NetscalerAdc.node.ts | 19 ++++++----- .../nodes/NextCloud/NextCloud.node.ts | 6 ++-- packages/nodes-base/nodes/NoOp/NoOp.node.ts | 5 +-- .../nodes-base/nodes/NocoDB/NocoDB.node.ts | 6 ++-- .../nodes/Notion/NotionTrigger.node.ts | 15 +++++---- .../nodes/Notion/v1/VersionDescription.ts | 6 ++-- .../nodes/Notion/v2/VersionDescription.ts | 6 ++-- packages/nodes-base/nodes/Npm/Npm.node.ts | 5 +-- packages/nodes-base/nodes/Odoo/Odoo.node.ts | 6 ++-- packages/nodes-base/nodes/Okta/Okta.node.ts | 5 +-- .../nodes/OneSimpleApi/OneSimpleApi.node.ts | 5 +-- .../nodes-base/nodes/Onfleet/Onfleet.node.ts | 25 +++++++------- .../nodes/Onfleet/OnfleetTrigger.node.ts | 4 +-- .../nodes-base/nodes/OpenAi/OpenAi.node.ts | 5 +-- .../nodes/OpenThesaurus/OpenThesaurus.node.ts | 5 +-- .../OpenWeatherMap/OpenWeatherMap.node.ts | 6 ++-- packages/nodes-base/nodes/Orbit/Orbit.node.ts | 6 ++-- packages/nodes-base/nodes/Oura/Oura.node.ts | 5 +-- .../nodes-base/nodes/Paddle/Paddle.node.ts | 6 ++-- .../nodes/PagerDuty/PagerDuty.node.ts | 5 +-- .../nodes-base/nodes/PayPal/PayPal.node.ts | 6 ++-- .../nodes/PayPal/PayPalTrigger.node.ts | 4 +-- .../nodes/Peekalink/Peekalink.node.ts | 5 +-- .../nodes/Phantombuster/Phantombuster.node.ts | 21 ++++++------ .../nodes/PhilipsHue/PhilipsHue.node.ts | 5 +-- .../nodes/Pipedrive/Pipedrive.node.ts | 6 ++-- .../nodes/Pipedrive/PipedriveTrigger.node.ts | 19 ++++++----- packages/nodes-base/nodes/Plivo/Plivo.node.ts | 17 +++++----- .../nodes-base/nodes/PostBin/PostBin.node.ts | 5 +-- .../nodes-base/nodes/PostHog/PostHog.node.ts | 5 +-- .../nodes/Postgres/PostgresTrigger.node.ts | 3 +- .../nodes/Postgres/v1/PostgresV1.node.ts | 6 ++-- .../Postgres/v2/actions/versionDescription.ts | 6 ++-- .../nodes/Postgres/v2/transport/index.ts | 2 +- .../nodes/Postmark/PostmarkTrigger.node.ts | 17 +++++----- .../nodes/ProfitWell/ProfitWell.node.ts | 21 ++++++------ .../nodes/Pushbullet/Pushbullet.node.ts | 5 +-- .../nodes-base/nodes/Pushcut/Pushcut.node.ts | 5 +-- .../nodes/Pushcut/PushcutTrigger.node.ts | 15 +++++---- .../nodes/Pushover/Pushover.node.ts | 5 +-- .../nodes-base/nodes/QuestDb/QuestDb.node.ts | 6 ++-- .../nodes/QuickBase/QuickBase.node.ts | 6 ++-- .../nodes/QuickBooks/QuickBooks.node.ts | 6 ++-- .../nodes/QuickChart/QuickChart.node.ts | 6 ++-- .../nodes/RabbitMQ/RabbitMQ.node.ts | 6 ++-- .../nodes/RabbitMQ/RabbitMQTrigger.node.ts | 4 +-- .../nodes/Raindrop/Raindrop.node.ts | 6 ++-- .../ReadBinaryFile/ReadBinaryFile.node.ts | 15 +++++---- .../ReadBinaryFiles/ReadBinaryFiles.node.ts | 15 +++++---- .../nodes-base/nodes/ReadPdf/ReadPDF.node.ts | 5 +-- .../nodes-base/nodes/Reddit/Reddit.node.ts | 6 ++-- packages/nodes-base/nodes/Redis/Redis.node.ts | 5 +-- .../nodes/Redis/RedisTrigger.node.ts | 4 +-- .../nodes/RenameKeys/RenameKeys.node.ts | 6 ++-- .../RespondToWebhook/RespondToWebhook.node.ts | 6 ++-- .../nodes/Rocketchat/Rocketchat.node.ts | 5 +-- .../nodes/RssFeedRead/RssFeedRead.node.ts | 6 ++-- .../RssFeedRead/RssFeedReadTrigger.node.ts | 4 +-- .../nodes-base/nodes/Rundeck/Rundeck.node.ts | 6 ++-- packages/nodes-base/nodes/S3/S3.node.ts | 6 ++-- .../nodes/Salesforce/Salesforce.node.ts | 6 ++-- .../Salesforce/SalesforceTrigger.node.ts | 4 +-- .../nodes/Salesmate/Salesmate.node.ts | 6 ++-- .../nodes/Schedule/ScheduleTrigger.node.ts | 4 +-- .../nodes/SeaTable/SeaTable.node.ts | 6 ++-- .../nodes/SeaTable/SeaTableTrigger.node.ts | 17 +++++----- .../SecurityScorecard.node.ts | 5 +-- .../nodes-base/nodes/Segment/Segment.node.ts | 5 +-- .../nodes/SendGrid/SendGrid.node.ts | 23 ++++++------- packages/nodes-base/nodes/Sendy/Sendy.node.ts | 6 ++-- .../nodes/SentryIo/SentryIo.node.ts | 21 ++++++------ .../nodes/ServiceNow/ServiceNow.node.ts | 6 ++-- .../nodes-base/nodes/Set/v1/SetV1.node.ts | 6 ++-- .../nodes-base/nodes/Set/v2/SetV2.node.ts | 5 +-- .../nodes-base/nodes/Shopify/Shopify.node.ts | 6 ++-- .../nodes/Shopify/ShopifyTrigger.node.ts | 17 +++++----- .../nodes-base/nodes/Signl4/Signl4.node.ts | 6 ++-- .../nodes/Simulate/Simulate.node.ts | 6 ++-- .../nodes/Simulate/SimulateTrigger.node.ts | 4 +-- .../nodes/Slack/SlackTrigger.node.ts | 27 +++++++-------- .../nodes-base/nodes/Slack/V1/SlackV1.node.ts | 6 ++-- .../nodes-base/nodes/Slack/V2/SlackV2.node.ts | 6 ++-- packages/nodes-base/nodes/Sms77/Sms77.node.ts | 17 +++++----- .../nodes/Snowflake/Snowflake.node.ts | 5 +-- .../v1/SplitInBatchesV1.node.ts | 6 ++-- .../v2/SplitInBatchesV2.node.ts | 6 ++-- .../v3/SplitInBatchesV3.node.ts | 6 ++-- .../nodes/Splunk/v1/GenericFunctions.ts | 5 +-- .../nodes/Splunk/v1/SplunkV1.node.ts | 10 +++--- .../nodes/Splunk/v2/actions/router.ts | 2 +- .../Splunk/v2/actions/versionDescription.ts | 6 ++-- .../nodes/Splunk/v2/helpers/utils.ts | 2 +- .../nodes-base/nodes/Spontit/Spontit.node.ts | 5 +-- .../nodes-base/nodes/Spotify/Spotify.node.ts | 19 ++++++----- .../v1/SpreadsheetFileV1.node.ts | 6 ++-- .../v2/SpreadsheetFileV2.node.ts | 5 +-- .../nodes/SseTrigger/SseTrigger.node.ts | 4 +-- packages/nodes-base/nodes/Ssh/Ssh.node.ts | 6 ++-- .../nodes-base/nodes/Stackby/Stackby.node.ts | 6 ++-- packages/nodes-base/nodes/Start/Start.node.ts | 13 ++++---- .../nodes/StopAndError/StopAndError.node.ts | 4 +-- .../nodes/Storyblok/Storyblok.node.ts | 5 +-- .../nodes-base/nodes/Strapi/Strapi.node.ts | 6 ++-- .../nodes-base/nodes/Strava/Strava.node.ts | 5 +-- .../nodes/Strava/StravaTrigger.node.ts | 3 +- .../nodes-base/nodes/Stripe/Stripe.node.ts | 6 ++-- .../nodes/Stripe/StripeTrigger.node.ts | 4 +-- .../nodes/Supabase/Supabase.node.ts | 6 ++-- .../SurveyMonkey/SurveyMonkeyTrigger.node.ts | 4 +-- .../nodes/Switch/V1/SwitchV1.node.ts | 11 +++++-- .../nodes/Switch/V2/SwitchV2.node.ts | 2 +- .../nodes/Switch/V3/SwitchV3.node.ts | 4 +-- .../v1/actions/versionDescription.ts | 6 ++-- packages/nodes-base/nodes/Taiga/Taiga.node.ts | 5 +-- .../nodes/Taiga/TaigaTrigger.node.ts | 21 ++++++------ .../nodes/Tapfiliate/Tapfiliate.node.ts | 6 ++-- .../nodes/Telegram/Telegram.node.ts | 6 ++-- .../nodes/Telegram/TelegramTrigger.node.ts | 3 +- .../nodes-base/nodes/TheHive/TheHive.node.ts | 25 +++++++------- .../nodes/TheHive/TheHiveTrigger.node.ts | 17 +++++----- .../TheHiveProjectTrigger.node.ts | 17 +++++----- .../actions/node.description.ts | 6 ++-- .../nodes/TimescaleDb/TimescaleDb.node.ts | 6 ++-- .../nodes/Todoist/v1/TodoistV1.node.ts | 5 +-- .../nodes/Todoist/v2/TodoistV2.node.ts | 25 +++++++------- .../nodes/Toggl/TogglTrigger.node.ts | 4 +-- packages/nodes-base/nodes/Totp/Totp.node.ts | 6 ++-- .../Transform/Aggregate/Aggregate.node.ts | 5 +-- .../nodes/Transform/Limit/Limit.node.ts | 5 +-- .../RemoveDuplicates/RemoveDuplicates.node.ts | 5 +-- .../nodes/Transform/Sort/Sort.node.ts | 5 +-- .../nodes/Transform/SplitOut/SplitOut.node.ts | 13 +++++--- .../Transform/Summarize/Summarize.node.ts | 5 +-- .../nodes/TravisCi/TravisCi.node.ts | 5 +-- .../nodes-base/nodes/Trello/Trello.node.ts | 6 ++-- .../nodes/Trello/TrelloTrigger.node.ts | 15 +++++---- packages/nodes-base/nodes/Twake/Twake.node.ts | 6 ++-- .../nodes-base/nodes/Twilio/Twilio.node.ts | 6 ++-- .../nodes/Twilio/TwilioTrigger.node.ts | 15 +++++---- packages/nodes-base/nodes/Twist/Twist.node.ts | 5 +-- .../nodes/Twitter/V1/TwitterV1.node.ts | 5 +-- .../nodes/Twitter/V2/TwitterV2.node.ts | 27 +++++++-------- .../nodes/Typeform/TypeformTrigger.node.ts | 4 +-- packages/nodes-base/nodes/UProc/UProc.node.ts | 5 +-- .../UnleashedSoftware.node.ts | 17 +++++----- .../nodes-base/nodes/Uplead/Uplead.node.ts | 5 +-- .../nodes/UptimeRobot/UptimeRobot.node.ts | 5 +-- .../nodes/UrlScanIo/UrlScanIo.node.ts | 6 ++-- .../VenafiTlsProtectDatacenter.node.ts | 5 +-- .../VenafiTlsProtectDatacenterTrigger.node.ts | 15 +++++---- .../VenafiTlsProtectCloud.node.ts | 21 ++++++------ .../VenafiTlsProtectCloudTrigger.node.ts | 19 ++++++----- packages/nodes-base/nodes/Vero/Vero.node.ts | 6 ++-- .../nodes-base/nodes/Vonage/Vonage.node.ts | 5 +-- packages/nodes-base/nodes/Wait/Wait.node.ts | 6 ++-- .../nodes/Webflow/V1/WebflowTriggerV1.node.ts | 19 ++++++----- .../nodes/Webflow/V1/WebflowV1.node.ts | 19 ++++++----- .../nodes/Webflow/V2/WebflowTriggerV2.node.ts | 3 +- .../Webflow/V2/actions/versionDescription.ts | 6 ++-- .../nodes-base/nodes/Webhook/Webhook.node.ts | 4 +-- packages/nodes-base/nodes/Webhook/utils.ts | 2 +- packages/nodes-base/nodes/Wekan/Wekan.node.ts | 6 ++-- .../nodes/WhatsApp/WhatsApp.node.ts | 5 +-- .../nodes/WhatsApp/WhatsAppTrigger.node.ts | 3 +- packages/nodes-base/nodes/Wise/Wise.node.ts | 5 +-- .../nodes-base/nodes/Wise/WiseTrigger.node.ts | 3 +- .../nodes/WooCommerce/WooCommerce.node.ts | 21 ++++++------ .../WooCommerce/WooCommerceTrigger.node.ts | 3 +- .../nodes/Wordpress/Wordpress.node.ts | 5 +-- .../nodes/Workable/WorkableTrigger.node.ts | 3 +- .../WorkflowTrigger/WorkflowTrigger.node.ts | 3 +- .../WriteBinaryFile/WriteBinaryFile.node.ts | 6 ++-- .../nodes/Wufoo/WufooTrigger.node.ts | 4 +-- packages/nodes-base/nodes/Xero/Xero.node.ts | 23 ++++++------- packages/nodes-base/nodes/Xml/Xml.node.ts | 6 ++-- .../nodes-base/nodes/Yourls/Yourls.node.ts | 17 +++++----- .../nodes-base/nodes/Zammad/Zammad.node.ts | 6 ++-- .../nodes-base/nodes/Zendesk/Zendesk.node.ts | 6 ++-- .../nodes/Zendesk/ZendeskTrigger.node.ts | 4 +-- .../nodes-base/nodes/Zoho/ZohoCrm.node.ts | 19 ++++++----- packages/nodes-base/nodes/Zoom/Zoom.node.ts | 21 ++++++------ packages/nodes-base/nodes/Zulip/Zulip.node.ts | 6 ++-- packages/workflow/src/Interfaces.ts | 31 +++++------------ packages/workflow/src/NodeHelpers.ts | 17 +++++----- packages/workflow/src/Workflow.ts | 25 +++++++------- packages/workflow/src/WorkflowDataProxy.ts | 33 ++++++++++--------- packages/workflow/test/NodeHelpers.test.ts | 19 ++++++----- packages/workflow/test/NodeTypes.ts | 33 ++++++++++--------- 521 files changed, 2259 insertions(+), 1999 deletions(-) diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts index 62761742b0..07c57a1507 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts @@ -1,6 +1,5 @@ import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { - ConnectionTypes, INodeInputConfiguration, INodeInputFilter, IExecuteFunctions, @@ -28,16 +27,16 @@ import { toolsAgentExecute } from './agents/ToolsAgent/execute'; function getInputs( agent: 'toolsAgent' | 'conversationalAgent' | 'openAiFunctionsAgent' | 'reActAgent' | 'sqlAgent', hasOutputParser?: boolean, -): Array { +): Array { interface SpecialInput { - type: ConnectionTypes; + type: NodeConnectionType; filter?: INodeInputFilter; required?: boolean; } const getInputData = ( inputs: SpecialInput[], - ): Array => { + ): Array => { const displayNames: { [key: string]: string } = { [NodeConnectionType.AiLanguageModel]: 'Model', [NodeConnectionType.AiMemory]: 'Memory', diff --git a/packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/ChatTrigger.node.ts b/packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/ChatTrigger.node.ts index ce4ee61794..57940b8c9d 100644 --- a/packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/ChatTrigger.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/ChatTrigger.node.ts @@ -75,7 +75,7 @@ export class ChatTrigger extends Node { } ]; })() }}`, - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { // eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed diff --git a/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/versionDescription.ts b/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/versionDescription.ts index 45954f333b..e92e84812f 100644 --- a/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/versionDescription.ts +++ b/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/versionDescription.ts @@ -90,7 +90,7 @@ export const versionDescription: INodeTypeDescription = { }, }, inputs: `={{(${configureNodeInputs})($parameter.resource, $parameter.operation, $parameter.hideTools)}}`, - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'openAiApi', diff --git a/packages/@n8n/nodes-langchain/utils/logWrapper.ts b/packages/@n8n/nodes-langchain/utils/logWrapper.ts index 1985616657..252d6b9890 100644 --- a/packages/@n8n/nodes-langchain/utils/logWrapper.ts +++ b/packages/@n8n/nodes-langchain/utils/logWrapper.ts @@ -1,5 +1,5 @@ import { NodeOperationError, NodeConnectionType } from 'n8n-workflow'; -import type { ConnectionTypes, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; +import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import type { Tool } from '@langchain/core/tools'; import type { BaseMessage } from '@langchain/core/messages'; @@ -31,7 +31,7 @@ export async function callMethodAsync( this: T, parameters: { executeFunctions: IExecuteFunctions; - connectionType: ConnectionTypes; + connectionType: NodeConnectionType; currentNodeRunIndex: number; method: (...args: any[]) => Promise; arguments: unknown[]; @@ -78,7 +78,7 @@ export function callMethodSync( this: T, parameters: { executeFunctions: IExecuteFunctions; - connectionType: ConnectionTypes; + connectionType: NodeConnectionType; currentNodeRunIndex: number; method: (...args: any[]) => T; arguments: unknown[]; @@ -123,7 +123,7 @@ export function logWrapper( ) { return new Proxy(originalInstance, { get: (target, prop) => { - let connectionType: ConnectionTypes | undefined; + let connectionType: NodeConnectionType | undefined; // ========== BaseChatMemory ========== if (isBaseChatMemory(originalInstance)) { if (prop === 'loadMemoryVariables' && 'loadMemoryVariables' in target) { diff --git a/packages/cli/src/__tests__/credentials-helper.test.ts b/packages/cli/src/__tests__/credentials-helper.test.ts index 1e60e2bf14..50472518b1 100644 --- a/packages/cli/src/__tests__/credentials-helper.test.ts +++ b/packages/cli/src/__tests__/credentials-helper.test.ts @@ -7,7 +7,7 @@ import type { INode, INodeProperties, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import { Workflow } from 'n8n-workflow'; import { CredentialsHelper } from '@/credentials-helper'; import { NodeTypes } from '@/node-types'; @@ -34,8 +34,8 @@ describe('CredentialsHelper', () => { name: 'Set', color: '#0000FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Value1', diff --git a/packages/cli/test/integration/webhooks.api.test.ts b/packages/cli/test/integration/webhooks.api.test.ts index 0665c2b20e..7090a1e91e 100644 --- a/packages/cli/test/integration/webhooks.api.test.ts +++ b/packages/cli/test/integration/webhooks.api.test.ts @@ -1,6 +1,11 @@ import { readFileSync } from 'fs'; import { agent as testAgent } from 'supertest'; -import type { INodeType, INodeTypeDescription, IWebhookFunctions } from 'n8n-workflow'; +import { + NodeConnectionType, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, +} from 'n8n-workflow'; import { AbstractServer } from '@/abstract-server'; import { ExternalHooks } from '@/external-hooks'; @@ -182,7 +187,7 @@ describe('Webhook API', () => { description: '', defaults: {}, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'default', diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index e1f39c22ab..40974fd6dc 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -38,7 +38,6 @@ import { extension, lookup } from 'mime-types'; import type { BinaryHelperFunctions, CloseFunction, - ConnectionTypes, ContextType, EventNamesAiNodesType, FieldType, @@ -105,6 +104,7 @@ import type { SchedulingFunctions, } from 'n8n-workflow'; import { + NodeConnectionType, ExpressionError, LoggerProxy as Logger, NodeApiError, @@ -2623,13 +2623,13 @@ const addExecutionDataFunctions = async ( nodeName: string, data: INodeExecutionData[][] | ExecutionBaseError, runExecutionData: IRunExecutionData, - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, additionalData: IWorkflowExecuteAdditionalData, sourceNodeName: string, sourceNodeRunIndex: number, currentNodeRunIndex: number, ): Promise => { - if (connectionType === 'main') { + if (connectionType === NodeConnectionType.Main) { throw new ApplicationError('Setting type is not supported for main connection', { extra: { type }, }); @@ -2732,7 +2732,7 @@ async function getInputConnectionData( executeData: IExecuteData | undefined, mode: WorkflowExecuteMode, closeFunctions: CloseFunction[], - inputName: ConnectionTypes, + inputName: NodeConnectionType, itemIndex: number, ): Promise { const node = this.getNode(); @@ -3676,7 +3676,7 @@ export function getExecuteFunctions( }, async getInputConnectionData( - inputName: ConnectionTypes, + inputName: NodeConnectionType, itemIndex: number, ): Promise { return await getInputConnectionData.call( @@ -3817,7 +3817,7 @@ export function getExecuteFunctions( }, addInputData( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, data: INodeExecutionData[][] | ExecutionBaseError, ): { index: number } { const nodeName = this.getNode().name; @@ -3847,7 +3847,7 @@ export function getExecuteFunctions( return { index: currentNodeRunIndex }; }, addOutputData( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, currentNodeRunIndex: number, data: INodeExecutionData[][] | ExecutionBaseError, ): void { @@ -4238,7 +4238,7 @@ export function getExecuteWebhookFunctions( return additionalData.httpRequest.headers; }, async getInputConnectionData( - inputName: ConnectionTypes, + inputName: NodeConnectionType, itemIndex: number, ): Promise { // To be able to use expressions like "$json.sessionId" set the diff --git a/packages/core/src/WorkflowExecute.ts b/packages/core/src/WorkflowExecute.ts index 24e4de3395..3e563e04b8 100644 --- a/packages/core/src/WorkflowExecute.ts +++ b/packages/core/src/WorkflowExecute.ts @@ -623,7 +623,11 @@ export class WorkflowExecute { // Check if any of the parent nodes does not have any inputs. That // would mean that it has to get added to the list of nodes to process. - const parentNodes = workflow.getParentNodes(inputData.node, 'main', -1); + const parentNodes = workflow.getParentNodes( + inputData.node, + NodeConnectionType.Main, + -1, + ); let nodeToAdd: string | undefined = inputData.node; parentNodes.push(inputData.node); parentNodes.reverse(); @@ -988,7 +992,11 @@ export class WorkflowExecute { connectionIndex++ ) { if ( - workflow.getHighestNode(executionNode.name, 'main', connectionIndex).length === 0 + workflow.getHighestNode( + executionNode.name, + NodeConnectionType.Main, + connectionIndex, + ).length === 0 ) { // If there is no valid incoming node (if all are disabled) // then ignore that it has inputs and simply execute it as it is without diff --git a/packages/core/test/helpers/constants.ts b/packages/core/test/helpers/constants.ts index 8bbb3f200b..70819478ad 100644 --- a/packages/core/test/helpers/constants.ts +++ b/packages/core/test/helpers/constants.ts @@ -45,8 +45,8 @@ export const predefinedNodesTypes: INodeTypeData = { name: 'Version Test', color: '#0000FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Display V1', diff --git a/packages/editor-ui/src/__tests__/mocks.ts b/packages/editor-ui/src/__tests__/mocks.ts index 1ab9d3a42f..cb15a9bf68 100644 --- a/packages/editor-ui/src/__tests__/mocks.ts +++ b/packages/editor-ui/src/__tests__/mocks.ts @@ -11,7 +11,7 @@ import type { INodeTypeDescription, INodeIssues, } from 'n8n-workflow'; -import { NodeHelpers, Workflow } from 'n8n-workflow'; +import { NodeConnectionType, NodeHelpers, Workflow } from 'n8n-workflow'; import { uuid } from '@jsplumb/util'; import { mock } from 'vitest-mock-extended'; @@ -52,8 +52,8 @@ export const mockNodeTypeDescription = ({ name, version = 1, credentials = [], - inputs = ['main'], - outputs = ['main'], + inputs = [NodeConnectionType.Main], + outputs = [NodeConnectionType.Main], }: { name: INodeTypeDescription['name']; version?: INodeTypeDescription['version']; diff --git a/packages/editor-ui/src/components/ExpressionEditModal.vue b/packages/editor-ui/src/components/ExpressionEditModal.vue index 090e5fd570..9411fe3789 100644 --- a/packages/editor-ui/src/components/ExpressionEditModal.vue +++ b/packages/editor-ui/src/components/ExpressionEditModal.vue @@ -11,6 +11,7 @@ import { createExpressionTelemetryPayload } from '@/utils/telemetryUtils'; import { useTelemetry } from '@/composables/useTelemetry'; import type { Segment } from '@/types/expressions'; import type { INodeProperties } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { outputTheme } from './ExpressionEditorModal/theme'; import ExpressionOutput from './InlineExpressionEditor/ExpressionOutput.vue'; import RunDataSchema from './RunDataSchema.vue'; @@ -152,7 +153,7 @@ async function onDrop(expression: string, event: MouseEvent) { :nodes="parentNodes" mapping-enabled pane-type="input" - connection-type="main" + :connection-type="NodeConnectionType.Main" /> diff --git a/packages/editor-ui/src/components/InputPanel.vue b/packages/editor-ui/src/components/InputPanel.vue index 135d228c51..7bc38c811e 100644 --- a/packages/editor-ui/src/components/InputPanel.vue +++ b/packages/editor-ui/src/components/InputPanel.vue @@ -11,7 +11,6 @@ import { useNodeTypesStore } from '@/stores/nodeTypes.store'; import { useUIStore } from '@/stores/ui.store'; import { useWorkflowsStore } from '@/stores/workflows.store'; import type { - ConnectionTypes, IConnectedNode, INodeInputConfiguration, INodeOutputConfiguration, @@ -121,10 +120,10 @@ export default defineComponent({ } else { // If we can not figure out the node type we set no outputs if (!Array.isArray(inputs)) { - inputs = [] as ConnectionTypes[]; + inputs = [] as NodeConnectionType[]; } if (!Array.isArray(outputs)) { - outputs = [] as ConnectionTypes[]; + outputs = [] as NodeConnectionType[]; } } @@ -184,7 +183,7 @@ export default defineComponent({ }, rootNodesParents() { const workflow = this.workflow; - const parentNodes = [...workflow.getParentNodes(this.rootNode, 'main')] + const parentNodes = [...workflow.getParentNodes(this.rootNode, NodeConnectionType.Main)] .reverse() .map((parent): IConnectedNode => ({ name: parent, depth: 1, indicies: [] })); @@ -274,8 +273,8 @@ export default defineComponent({ }, methods: { filterOutConnectionType( - item: ConnectionTypes | INodeOutputConfiguration | INodeInputConfiguration, - type: ConnectionTypes, + item: NodeConnectionType | INodeOutputConfiguration | INodeInputConfiguration, + type: NodeConnectionType, ) { if (!item) return false; diff --git a/packages/editor-ui/src/components/NDVFloatingNodes.vue b/packages/editor-ui/src/components/NDVFloatingNodes.vue index 10b165409c..b26c8988d3 100644 --- a/packages/editor-ui/src/components/NDVFloatingNodes.vue +++ b/packages/editor-ui/src/components/NDVFloatingNodes.vue @@ -4,7 +4,7 @@ import { useNodeTypesStore } from '@/stores/nodeTypes.store'; import { useWorkflowsStore } from '@/stores/workflows.store'; import { computed, onMounted, onBeforeUnmount } from 'vue'; import NodeIcon from '@/components/NodeIcon.vue'; -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; interface Props { rootNode: INodeUi; @@ -71,8 +71,12 @@ const connectedNodes = computed< [FloatingNodePosition.top]: getINodesFromNames( workflow.getChildNodes(rootName, 'ALL_NON_MAIN'), ), - [FloatingNodePosition.right]: getINodesFromNames(workflow.getChildNodes(rootName, 'main', 1)), - [FloatingNodePosition.left]: getINodesFromNames(workflow.getParentNodes(rootName, 'main', 1)), + [FloatingNodePosition.right]: getINodesFromNames( + workflow.getChildNodes(rootName, NodeConnectionType.Main, 1), + ), + [FloatingNodePosition.left]: getINodesFromNames( + workflow.getParentNodes(rootName, NodeConnectionType.Main, 1), + ), }; }); diff --git a/packages/editor-ui/src/components/NDVSubConnections.vue b/packages/editor-ui/src/components/NDVSubConnections.vue index 7aa4a4c861..ed1fb2f228 100644 --- a/packages/editor-ui/src/components/NDVSubConnections.vue +++ b/packages/editor-ui/src/components/NDVSubConnections.vue @@ -7,7 +7,11 @@ import { NodeHelpers } from 'n8n-workflow'; import { useNodeHelpers } from '@/composables/useNodeHelpers'; import NodeIcon from '@/components/NodeIcon.vue'; import TitledList from '@/components/TitledList.vue'; -import type { ConnectionTypes, INodeInputConfiguration, INodeTypeDescription } from 'n8n-workflow'; +import type { + NodeConnectionType, + INodeInputConfiguration, + INodeTypeDescription, +} from 'n8n-workflow'; import { useDebounce } from '@/composables/useDebounce'; import { OnClickOutside } from '@vueuse/components'; @@ -22,7 +26,7 @@ const nodeHelpers = useNodeHelpers(); const { debounce } = useDebounce(); const emit = defineEmits<{ switchSelectedNode: [nodeName: string]; - openConnectionNodeCreator: [nodeName: string, connectionType: ConnectionTypes]; + openConnectionNodeCreator: [nodeName: string, connectionType: NodeConnectionType]; }>(); interface NodeConfig { @@ -33,7 +37,7 @@ interface NodeConfig { const possibleConnections = ref([]); -const expandedGroups = ref([]); +const expandedGroups = ref([]); const shouldShowNodeInputIssues = ref(false); const nodeType = computed(() => @@ -54,7 +58,7 @@ const nodeInputIssues = computed(() => { return issues?.input ?? {}; }); -const connectedNodes = computed>(() => { +const connectedNodes = computed>(() => { return possibleConnections.value.reduce( (acc, connection) => { const nodes = getINodesFromNames( @@ -62,24 +66,24 @@ const connectedNodes = computed>(() => { ); return { ...acc, [connection.type]: nodes }; }, - {} as Record, + {} as Record, ); }); -function getConnectionConfig(connectionType: ConnectionTypes) { +function getConnectionConfig(connectionType: NodeConnectionType) { return possibleConnections.value.find((c) => c.type === connectionType); } -function isMultiConnection(connectionType: ConnectionTypes) { +function isMultiConnection(connectionType: NodeConnectionType) { const connectionConfig = getConnectionConfig(connectionType); return connectionConfig?.maxConnections !== 1; } -function shouldShowConnectionTooltip(connectionType: ConnectionTypes) { +function shouldShowConnectionTooltip(connectionType: NodeConnectionType) { return isMultiConnection(connectionType) && !expandedGroups.value.includes(connectionType); } -function expandConnectionGroup(connectionType: ConnectionTypes, isExpanded: boolean) { +function expandConnectionGroup(connectionType: NodeConnectionType, isExpanded: boolean) { // If the connection is a single connection, we don't need to expand the group if (!isMultiConnection(connectionType)) { return; @@ -109,14 +113,14 @@ function getINodesFromNames(names: string[]): NodeConfig[] { .filter((n): n is NodeConfig => n !== null); } -function hasInputIssues(connectionType: ConnectionTypes) { +function hasInputIssues(connectionType: NodeConnectionType) { return ( shouldShowNodeInputIssues.value && (nodeInputIssues.value[connectionType] ?? []).length > 0 ); } function isNodeInputConfiguration( - connectionConfig: ConnectionTypes | INodeInputConfiguration, + connectionConfig: NodeConnectionType | INodeInputConfiguration, ): connectionConfig is INodeInputConfiguration { if (typeof connectionConfig === 'string') return false; @@ -137,7 +141,7 @@ function getPossibleSubInputConnections(): INodeInputConfiguration[] { return nonMainInputs; } -function onNodeClick(nodeName: string, connectionType: ConnectionTypes) { +function onNodeClick(nodeName: string, connectionType: NodeConnectionType) { if (isMultiConnection(connectionType) && !expandedGroups.value.includes(connectionType)) { expandConnectionGroup(connectionType, true); return; @@ -146,7 +150,7 @@ function onNodeClick(nodeName: string, connectionType: ConnectionTypes) { emit('switchSelectedNode', nodeName); } -function onPlusClick(connectionType: ConnectionTypes) { +function onPlusClick(connectionType: NodeConnectionType) { const connectionNodes = connectedNodes.value[connectionType]; if ( isMultiConnection(connectionType) && diff --git a/packages/editor-ui/src/components/Node.vue b/packages/editor-ui/src/components/Node.vue index 3a27f0a701..83efe3b0a7 100644 --- a/packages/editor-ui/src/components/Node.vue +++ b/packages/editor-ui/src/components/Node.vue @@ -10,7 +10,6 @@ import { WAIT_TIME_UNLIMITED, } from '@/constants'; import type { - ConnectionTypes, ExecutionSummary, INodeOutputConfiguration, ITaskData, @@ -244,7 +243,7 @@ const nodeWrapperStyles = computed(() => { const mainInputs = inputTypes.filter((output) => output === NodeConnectionType.Main); styles['--node-main-input-count'] = mainInputs.length; - let outputs = [] as Array; + let outputs = [] as Array; if (props.workflow.nodes[node.value.name]) { outputs = NodeHelpers.getNodeOutputs(props.workflow, node.value, nodeType.value); } diff --git a/packages/editor-ui/src/components/Node/NodeCreator/__tests__/useActionsGeneration.test.ts b/packages/editor-ui/src/components/Node/NodeCreator/__tests__/useActionsGeneration.test.ts index a8715d7326..171e2a0b48 100644 --- a/packages/editor-ui/src/components/Node/NodeCreator/__tests__/useActionsGeneration.test.ts +++ b/packages/editor-ui/src/components/Node/NodeCreator/__tests__/useActionsGeneration.test.ts @@ -1,4 +1,4 @@ -import type { INodeProperties, INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeProperties, type INodeTypeDescription } from 'n8n-workflow'; import { useActionsGenerator } from '../composables/useActionsGeneration'; describe('useActionsGenerator', () => { @@ -14,8 +14,8 @@ describe('useActionsGenerator', () => { defaults: { name: 'Test', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [], }; diff --git a/packages/editor-ui/src/components/NodeSettings.vue b/packages/editor-ui/src/components/NodeSettings.vue index 9acc78a24c..0b5a291e44 100644 --- a/packages/editor-ui/src/components/NodeSettings.vue +++ b/packages/editor-ui/src/components/NodeSettings.vue @@ -7,7 +7,6 @@ import type { INodeParameters, INodeProperties, NodeParameterValue, - ConnectionTypes, } from 'n8n-workflow'; import { NodeHelpers, @@ -319,7 +318,7 @@ export default defineComponent({ onSwitchSelectedNode(node: string) { this.$emit('switchSelectedNode', node); }, - onOpenConnectionNodeCreator(node: string, connectionType: ConnectionTypes) { + onOpenConnectionNodeCreator(node: string, connectionType: NodeConnectionType) { this.$emit('openConnectionNodeCreator', node, connectionType); }, populateHiddenIssuesSet() { diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index b4e783cf21..0efc92a038 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -5,7 +5,6 @@ import { mapStores } from 'pinia'; import { useStorage } from '@/composables/useStorage'; import { saveAs } from 'file-saver'; import type { - ConnectionTypes, IBinaryData, IBinaryKeyData, IDataObject, @@ -181,7 +180,7 @@ export default defineComponent({ }, data() { return { - connectionType: NodeConnectionType.Main as ConnectionTypes, + connectionType: NodeConnectionType.Main as NodeConnectionType, binaryDataPreviewActive: false, dataSize: 0, showData: false, @@ -929,7 +928,7 @@ export default defineComponent({ getRawInputData( runIndex: number, outputIndex: number, - connectionType: ConnectionTypes = NodeConnectionType.Main, + connectionType: NodeConnectionType = NodeConnectionType.Main, ): INodeExecutionData[] { let inputData: INodeExecutionData[] = []; @@ -974,7 +973,7 @@ export default defineComponent({ getDataCount( runIndex: number, outputIndex: number, - connectionType: ConnectionTypes = NodeConnectionType.Main, + connectionType: NodeConnectionType = NodeConnectionType.Main, ) { if (!this.node) { return 0; @@ -993,7 +992,7 @@ export default defineComponent({ this.outputIndex = 0; this.refreshDataSize(); this.closeBinaryDataDisplay(); - let outputTypes: ConnectionTypes[] = []; + let outputTypes: NodeConnectionType[] = []; if (this.nodeType !== null && this.node !== null) { const outputs = this.getResolvedNodeOutputs(); outputTypes = NodeHelpers.getConnectionTypes(outputs); diff --git a/packages/editor-ui/src/components/RunDataSchema.vue b/packages/editor-ui/src/components/RunDataSchema.vue index fcb31ddde8..a76012553f 100644 --- a/packages/editor-ui/src/components/RunDataSchema.vue +++ b/packages/editor-ui/src/components/RunDataSchema.vue @@ -9,7 +9,6 @@ import { useNDVStore } from '@/stores/ndv.store'; import { telemetry } from '@/plugins/telemetry'; import { NodeConnectionType, - type ConnectionTypes, type IConnectedNode, type IDataObject, type INodeTypeDescription, @@ -33,7 +32,7 @@ type Props = { outputIndex?: number; totalRuns?: number; paneType: 'input' | 'output'; - connectionType?: ConnectionTypes; + connectionType?: NodeConnectionType; search?: string; }; diff --git a/packages/editor-ui/src/composables/__tests__/useContextMenu.test.ts b/packages/editor-ui/src/composables/__tests__/useContextMenu.test.ts index 74acb63ac7..4bac7b37cf 100644 --- a/packages/editor-ui/src/composables/__tests__/useContextMenu.test.ts +++ b/packages/editor-ui/src/composables/__tests__/useContextMenu.test.ts @@ -6,7 +6,7 @@ import { createPinia, setActivePinia } from 'pinia'; import { useSourceControlStore } from '@/stores/sourceControl.store'; import { useUIStore } from '@/stores/ui.store'; import { useWorkflowsStore } from '@/stores/workflows.store'; -import { NodeHelpers } from 'n8n-workflow'; +import { NodeConnectionType, NodeHelpers } from 'n8n-workflow'; const nodeFactory = (data: Partial = {}): INodeUi => ({ id: faker.string.uuid(), @@ -95,7 +95,10 @@ describe('useContextMenu', () => { const { open, isOpen, actions, targetNodeIds } = useContextMenu(); const basicChain = nodeFactory({ type: BASIC_CHAIN_NODE_TYPE }); vi.spyOn(workflowsStore, 'getNodeById').mockReturnValue(basicChain); - vi.spyOn(NodeHelpers, 'getConnectionTypes').mockReturnValue(['main', 'ai_languageModel']); + vi.spyOn(NodeHelpers, 'getConnectionTypes').mockReturnValue([ + NodeConnectionType.Main, + NodeConnectionType.AiLanguageModel, + ]); open(mockEvent, { source: 'node-right-click', nodeId: basicChain.id }); expect(isOpen.value).toBe(true); diff --git a/packages/editor-ui/src/composables/__tests__/useNodeBase.spec.ts b/packages/editor-ui/src/composables/__tests__/useNodeBase.spec.ts index 566d2ad78c..6e8bfd94fd 100644 --- a/packages/editor-ui/src/composables/__tests__/useNodeBase.spec.ts +++ b/packages/editor-ui/src/composables/__tests__/useNodeBase.spec.ts @@ -1,7 +1,12 @@ import { createPinia, setActivePinia } from 'pinia'; import { mock, mockClear } from 'vitest-mock-extended'; import type { BrowserJsPlumbInstance } from '@jsplumb/browser-ui'; -import type { INode, INodeTypeDescription, Workflow } from 'n8n-workflow'; +import { + NodeConnectionType, + type INode, + type INodeTypeDescription, + type Workflow, +} from 'n8n-workflow'; import { useNodeBase } from '@/composables/useNodeBase'; import { useWorkflowsStore } from '@/stores/workflows.store'; @@ -16,8 +21,8 @@ describe('useNodeBase', () => { const jsPlumbInstance = mock(); const nodeTypeDescription = mock({ - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], }); const workflowObject = mock(); const node = mock(); diff --git a/packages/editor-ui/src/composables/useCanvasOperations.ts b/packages/editor-ui/src/composables/useCanvasOperations.ts index 63fa57c7fd..caaed00196 100644 --- a/packages/editor-ui/src/composables/useCanvasOperations.ts +++ b/packages/editor-ui/src/composables/useCanvasOperations.ts @@ -68,7 +68,6 @@ import * as NodeViewUtils from '@/utils/nodeViewUtils'; import { isValidNodeConnectionType } from '@/utils/typeGuards'; import type { Connection } from '@vue-flow/core'; import type { - ConnectionTypes, IConnection, IConnections, INode, @@ -905,7 +904,7 @@ export function useCanvasOperations({ router }: { router: ReturnType = []; + let outputs: Array = []; try { // It fails when the outputs are an expression. As those nodes have // normally no outputs by default and the only reason we need the @@ -1154,7 +1153,7 @@ export function useCanvasOperations({ router }: { router: ReturnType = []; + let inputs: Array = []; if (targetNodeType) { inputs = NodeHelpers.getNodeInputs(editableWorkflowObject.value, workflowNode, targetNodeType) || diff --git a/packages/editor-ui/src/composables/useNodeBase.ts b/packages/editor-ui/src/composables/useNodeBase.ts index c7c6c9cfa5..970594bb7e 100644 --- a/packages/editor-ui/src/composables/useNodeBase.ts +++ b/packages/editor-ui/src/composables/useNodeBase.ts @@ -10,7 +10,6 @@ import { import { NodeHelpers, NodeConnectionType } from 'n8n-workflow'; import type { - ConnectionTypes, INodeInputConfiguration, INodeTypeDescription, INodeOutputConfiguration, @@ -57,8 +56,8 @@ export function useNodeBase({ const nodeId = computed(() => data.value?.id ?? ''); - const inputs = ref>([]); - const outputs = ref>([]); + const inputs = ref>([]); + const outputs = ref>([]); const createAddInputEndpointSpec = ( connectionName: NodeConnectionType, @@ -139,7 +138,7 @@ export function useNodeBase({ inputConfiguration = value; } - const inputName: ConnectionTypes = inputConfiguration.type; + const inputName: NodeConnectionType = inputConfiguration.type; const rootCategoryInputName = inputName === NodeConnectionType.Main ? NodeConnectionType.Main : 'other'; @@ -366,7 +365,7 @@ export function useNodeBase({ outputs.value.forEach((_value, i) => { const outputConfiguration = outputConfigurations[i]; - const outputName: ConnectionTypes = outputConfiguration.type; + const outputName: NodeConnectionType = outputConfiguration.type; const rootCategoryOutputName = outputName === NodeConnectionType.Main ? NodeConnectionType.Main : 'other'; @@ -536,12 +535,12 @@ export function useNodeBase({ addOutputEndpoints(node, nodeTypeData); } - function getEndpointColor(connectionType: ConnectionTypes) { + function getEndpointColor(connectionType: NodeConnectionType) { return `--node-type-${connectionType}-color`; } function getInputConnectionStyle( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, nodeTypeData: INodeTypeDescription, ): EndpointOptions { if (connectionType === NodeConnectionType.Main) { @@ -559,7 +558,7 @@ export function useNodeBase({ } const createSupplementalConnectionType = ( - connectionName: ConnectionTypes, + connectionName: NodeConnectionType, ): EndpointOptions => ({ endpoint: createAddInputEndpointSpec( connectionName as NodeConnectionType, @@ -571,12 +570,12 @@ export function useNodeBase({ } function getOutputConnectionStyle( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, outputConfiguration: INodeOutputConfiguration, nodeTypeData: INodeTypeDescription, ): EndpointOptions { const createSupplementalConnectionType = ( - connectionName: ConnectionTypes, + connectionName: NodeConnectionType, ): EndpointOptions => ({ endpoint: createDiamondOutputEndpointSpec(), paintStyle: NodeViewUtils.getOutputEndpointStyle( diff --git a/packages/editor-ui/src/composables/useNodeHelpers.ts b/packages/editor-ui/src/composables/useNodeHelpers.ts index fd2fb50a81..529178e5e5 100644 --- a/packages/editor-ui/src/composables/useNodeHelpers.ts +++ b/packages/editor-ui/src/composables/useNodeHelpers.ts @@ -12,7 +12,7 @@ import { WEBHOOK_NODE_TYPE, } from '@/constants'; -import { NodeHelpers, NodeConnectionType, ExpressionEvaluatorProxy } from 'n8n-workflow'; +import { NodeHelpers, ExpressionEvaluatorProxy, NodeConnectionType } from 'n8n-workflow'; import type { INodeProperties, INodeCredentialDescription, @@ -20,7 +20,6 @@ import type { INodeIssues, ICredentialType, INodeIssueObjectProperty, - ConnectionTypes, INodeInputConfiguration, Workflow, INodeExecutionData, @@ -342,7 +341,7 @@ export function useNodeHelpers() { const foundIssues: INodeIssueObjectProperty = {}; const workflowNode = workflow.getNode(node.name); - let inputs: Array = []; + let inputs: Array = []; if (nodeType && workflowNode) { inputs = NodeHelpers.getNodeInputs(workflow, workflowNode, nodeType); } @@ -571,7 +570,7 @@ export function useNodeHelpers() { runIndex = 0, outputIndex = 0, paneType: NodePanelType = 'output', - connectionType: ConnectionTypes = NodeConnectionType.Main, + connectionType: NodeConnectionType = NodeConnectionType.Main, ): INodeExecutionData[] { //TODO: check if this needs to be fixed in different place if ( @@ -617,7 +616,7 @@ export function useNodeHelpers() { function getInputData( connectionsData: ITaskDataConnections, outputIndex: number, - connectionType: ConnectionTypes = NodeConnectionType.Main, + connectionType: NodeConnectionType = NodeConnectionType.Main, ): INodeExecutionData[] { return connectionsData?.[connectionType]?.[outputIndex] ?? []; } @@ -627,7 +626,7 @@ export function useNodeHelpers() { node: string | null, runIndex: number, outputIndex: number, - connectionType: ConnectionTypes = NodeConnectionType.Main, + connectionType: NodeConnectionType = NodeConnectionType.Main, ): IBinaryKeyData[] { if (node === null) { return []; diff --git a/packages/editor-ui/src/stores/nodeTypes.store.ts b/packages/editor-ui/src/stores/nodeTypes.store.ts index e8260fdedb..7a8e66aab0 100644 --- a/packages/editor-ui/src/stores/nodeTypes.store.ts +++ b/packages/editor-ui/src/stores/nodeTypes.store.ts @@ -4,7 +4,6 @@ import type { DynamicNodeParameters, NodeTypesByTypeNameAndVersion } from '@/Int import { addHeaders, addNodeTranslation } from '@/plugins/i18n'; import { omit } from '@/utils/typesUtils'; import type { - ConnectionTypes, INode, INodeInputConfiguration, INodeOutputConfiguration, @@ -138,7 +137,7 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, () => { (acc, node) => { const outputTypes = node.outputs; if (Array.isArray(outputTypes)) { - outputTypes.forEach((value: ConnectionTypes | INodeOutputConfiguration) => { + outputTypes.forEach((value: NodeConnectionType | INodeOutputConfiguration) => { const outputType = typeof value === 'string' ? value : value.type; if (!acc[outputType]) { acc[outputType] = []; @@ -148,7 +147,7 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, () => { } else { // If outputs is not an array, it must be a string expression // in which case we'll try to match all possible non-main output types that are supported - const connectorTypes: ConnectionTypes[] = [ + const connectorTypes: NodeConnectionType[] = [ NodeConnectionType.AiVectorStore, NodeConnectionType.AiChain, NodeConnectionType.AiDocument, @@ -159,7 +158,7 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, () => { NodeConnectionType.AiTextSplitter, NodeConnectionType.AiTool, ]; - connectorTypes.forEach((outputType: ConnectionTypes) => { + connectorTypes.forEach((outputType: NodeConnectionType) => { if (outputTypes.includes(outputType)) { acc[outputType] = acc[outputType] || []; acc[outputType].push(node.name); @@ -181,7 +180,7 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, () => { const inputTypes = node.inputs; if (Array.isArray(inputTypes)) { inputTypes.forEach( - (value: ConnectionTypes | INodeOutputConfiguration | INodeInputConfiguration) => { + (value: NodeConnectionType | INodeOutputConfiguration | INodeInputConfiguration) => { const outputType = typeof value === 'string' ? value : value.type; if (!acc[outputType]) { acc[outputType] = []; diff --git a/packages/editor-ui/src/stores/workflows.store.ts b/packages/editor-ui/src/stores/workflows.store.ts index 45f8a4c658..3256c5670f 100644 --- a/packages/editor-ui/src/stores/workflows.store.ts +++ b/packages/editor-ui/src/stores/workflows.store.ts @@ -55,7 +55,7 @@ import type { IWorkflowSettings, INodeType, } from 'n8n-workflow'; -import { deepCopy, NodeHelpers, Workflow } from 'n8n-workflow'; +import { deepCopy, NodeConnectionType, NodeHelpers, Workflow } from 'n8n-workflow'; import { findLast } from 'lodash-es'; import { useRootStore } from '@/stores/root.store'; @@ -1502,7 +1502,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, () => { function checkIfNodeHasChatParent(nodeName: string): boolean { const workflow = getCurrentWorkflow(); - const parents = workflow.getParentNodes(nodeName, 'main'); + const parents = workflow.getParentNodes(nodeName, NodeConnectionType.Main); const matchedChatNode = parents.find((parent) => { const parentNodeType = getNodeByName(parent)?.type; diff --git a/packages/editor-ui/src/utils/nodeViewUtils.ts b/packages/editor-ui/src/utils/nodeViewUtils.ts index e268d9ae57..a0e87c96de 100644 --- a/packages/editor-ui/src/utils/nodeViewUtils.ts +++ b/packages/editor-ui/src/utils/nodeViewUtils.ts @@ -5,7 +5,6 @@ import type { ArrayAnchorSpec, ConnectorSpec, OverlaySpec, PaintStyle } from '@j import type { Connection, Endpoint, SelectOptions } from '@jsplumb/core'; import { N8nConnector } from '@/plugins/connectors/N8nCustomConnector'; import type { - ConnectionTypes, IConnection, INodeExecutionData, INodeTypeDescription, @@ -118,7 +117,7 @@ export function isCanvasAugmentedType(overlay: T): overlay is T & { canvas: H return typeof overlay === 'object' && overlay !== null && 'canvas' in overlay && !!overlay.canvas; } -export const getConnectorColor = (type: ConnectionTypes, category?: string): string => { +export const getConnectorColor = (type: NodeConnectionType, category?: string): string => { if (category === 'error') { return '--color-node-error-output-text-color'; } @@ -132,7 +131,7 @@ export const getConnectorColor = (type: ConnectionTypes, category?: string): str export const getConnectorPaintStylePull = (connection: Connection): PaintStyle => { const connectorColor = getConnectorColor( - connection.parameters.type as ConnectionTypes, + connection.parameters.type as NodeConnectionType, connection.parameters.category, ); const additionalStyles: PaintStyle = {}; @@ -148,7 +147,7 @@ export const getConnectorPaintStylePull = (connection: Connection): PaintStyle = export const getConnectorPaintStyleDefault = (connection: Connection): PaintStyle => { const connectorColor = getConnectorColor( - connection.parameters.type as ConnectionTypes, + connection.parameters.type as NodeConnectionType, connection.parameters.category, ); return { @@ -161,7 +160,10 @@ export const getConnectorPaintStyleData = ( connection: Connection, category?: string, ): PaintStyle => { - const connectorColor = getConnectorColor(connection.parameters.type as ConnectionTypes, category); + const connectorColor = getConnectorColor( + connection.parameters.type as NodeConnectionType, + category, + ); return { ...CONNECTOR_PAINT_STYLE_DATA, ...(connectorColor ? { stroke: `var(${connectorColor})` } : {}), @@ -194,7 +196,7 @@ export const CONNECTOR_ARROW_OVERLAYS: OverlaySpec[] = [ ]; export const getAnchorPosition = ( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, type: 'input' | 'output', amount: number, spacerIndexes: number[] = [], @@ -256,7 +258,7 @@ export const getEndpointScope = ( export const getInputEndpointStyle = ( nodeTypeData: INodeTypeDescription, color: string, - connectionType: ConnectionTypes = NodeConnectionType.Main, + connectionType: NodeConnectionType = NodeConnectionType.Main, ): EndpointStyle => { let width = 8; let height = nodeTypeData && nodeTypeData.outputs.length > 2 ? 18 : 20; @@ -664,7 +666,7 @@ export const showConnectionActions = (connection: Connection) => { export const getOutputSummary = ( data: ITaskData[], nodeConnections: NodeInputConnections, - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, ) => { const outputMap: { [sourceOutputIndex: string]: { diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 266b4c1fda..3fa3ff9f9c 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -74,7 +74,6 @@ import type { ITelemetryTrackProperties, IWorkflowBase, Workflow, - ConnectionTypes, INodeOutputConfiguration, IRun, } from 'n8n-workflow'; @@ -2289,7 +2288,7 @@ export default defineComponent({ } } - let outputs: Array = []; + let outputs: Array = []; try { // It fails when the outputs are an expression. As those nodes have // normally no outputs by default and the only reason we need the @@ -2424,7 +2423,7 @@ export default defineComponent({ sourceNodeOutputIndex: number, targetNodeName: string, targetNodeOuputIndex: number, - type: ConnectionTypes, + type: NodeConnectionType, ): IConnection | undefined { const nodeConnections = this.workflowsStore.outgoingConnectionsByNodeName(sourceNodeName)[type]; @@ -2531,7 +2530,7 @@ export default defineComponent({ lastSelectedEndpoint.scope as NodeConnectionType, ) ) { - const connectionType = lastSelectedEndpoint.scope as ConnectionTypes; + const connectionType = lastSelectedEndpoint.scope as NodeConnectionType; const newNodeElement = this.instance.getManagedElement(newNodeData.id); const newNodeConnections = this.instance.getEndpoints(newNodeElement); const viableConnection = newNodeConnections.find((conn) => { @@ -2712,7 +2711,7 @@ export default defineComponent({ if (targetNodeType?.inputs?.length) { const workflow = this.workflowHelpers.getCurrentWorkflow(); const workflowNode = workflow.getNode(targetNode.name); - let inputs: Array = []; + let inputs: Array = []; if (targetNodeType && workflowNode) { inputs = NodeHelpers.getNodeInputs(workflow, workflowNode, targetNodeType); } @@ -3106,7 +3105,7 @@ export default defineComponent({ NodeViewUtils.hideConnectionActions(connection); NodeViewUtils.resetConnection(connection); - const scope = connection.scope as ConnectionTypes; + const scope = connection.scope as NodeConnectionType; const scopedEndpoints = Array.from( document.querySelectorAll(`[data-jtk-scope-${scope}=true]`), ); @@ -3609,8 +3608,8 @@ export default defineComponent({ const workflow = this.workflowHelpers.getCurrentWorkflow(); const workflowNode = workflow.getNode(node.name); - let inputs: Array = []; - let outputs: Array = []; + let inputs: Array = []; + let outputs: Array = []; if (nodeType && workflowNode) { inputs = NodeHelpers.getNodeInputs(workflow, workflowNode, nodeType); outputs = NodeHelpers.getNodeOutputs(workflow, workflowNode, nodeType); diff --git a/packages/nodes-base/.eslintrc.js b/packages/nodes-base/.eslintrc.js index 1e990a09c3..80853f230c 100644 --- a/packages/nodes-base/.eslintrc.js +++ b/packages/nodes-base/.eslintrc.js @@ -66,13 +66,13 @@ module.exports = { 'n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node': 'error', 'n8n-nodes-base/node-class-description-empty-string': 'error', 'n8n-nodes-base/node-class-description-icon-not-svg': 'error', - 'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'error', + 'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'off', 'n8n-nodes-base/node-class-description-inputs-wrong-trigger-node': 'error', 'n8n-nodes-base/node-class-description-missing-subtitle': 'error', 'n8n-nodes-base/node-class-description-non-core-color-present': 'error', 'n8n-nodes-base/node-class-description-name-miscased': 'error', 'n8n-nodes-base/node-class-description-name-unsuffixed-trigger-node': 'error', - 'n8n-nodes-base/node-class-description-outputs-wrong': 'error', + 'n8n-nodes-base/node-class-description-outputs-wrong': 'off', 'n8n-nodes-base/node-dirname-against-convention': 'error', 'n8n-nodes-base/node-execute-block-double-assertion-for-items': 'error', 'n8n-nodes-base/node-execute-block-wrong-error-thrown': 'error', diff --git a/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts b/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts index 5e6215e413..20a9cbce0e 100644 --- a/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts +++ b/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { actionNetworkApiRequest, @@ -56,8 +56,8 @@ export class ActionNetwork implements INodeType { defaults: { name: 'Action Network', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'actionNetworkApi', diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts index 3afb193f15..33ebbd9261 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IProduct } from './GenericFunctions'; import { activeCampaignApiRequest, activeCampaignApiRequestAllItems } from './GenericFunctions'; @@ -89,8 +89,8 @@ export class ActiveCampaign implements INodeType { defaults: { name: 'ActiveCampaign', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'activeCampaignApi', diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts index f7a76326ed..80bc1a3a3d 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { activeCampaignApiRequest, activeCampaignApiRequestAllItems } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class ActiveCampaignTrigger implements INodeType { name: 'ActiveCampaign Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'activeCampaignApi', diff --git a/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts b/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts index c7269a5acc..40283c2770 100644 --- a/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts +++ b/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { acuitySchedulingApiRequest } from './GenericFunctions'; @@ -22,7 +23,7 @@ export class AcuitySchedulingTrigger implements INodeType { name: 'Acuity Scheduling Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'acuitySchedulingApi', diff --git a/packages/nodes-base/nodes/Adalo/Adalo.node.ts b/packages/nodes-base/nodes/Adalo/Adalo.node.ts index e012b1e31f..1865f16be5 100644 --- a/packages/nodes-base/nodes/Adalo/Adalo.node.ts +++ b/packages/nodes-base/nodes/Adalo/Adalo.node.ts @@ -1,9 +1,10 @@ -import type { - IDataObject, - IExecuteSingleFunctions, - IHttpRequestOptions, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IDataObject, + type IExecuteSingleFunctions, + type IHttpRequestOptions, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import { collectionFields } from './CollectionDescription'; import type { FieldsUiValues } from './types'; @@ -20,8 +21,8 @@ export class Adalo implements INodeType { defaults: { name: 'Adalo', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'adaloApi', diff --git a/packages/nodes-base/nodes/Affinity/Affinity.node.ts b/packages/nodes-base/nodes/Affinity/Affinity.node.ts index 1a165d47f7..d526f4f5b2 100644 --- a/packages/nodes-base/nodes/Affinity/Affinity.node.ts +++ b/packages/nodes-base/nodes/Affinity/Affinity.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { affinityApiRequest, affinityApiRequestAllItems } from './GenericFunctions'; @@ -34,8 +35,8 @@ export class Affinity implements INodeType { defaults: { name: 'Affinity', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'affinityApi', diff --git a/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts b/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts index dc84c9ce79..a3f9f28bfd 100644 --- a/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts +++ b/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { affinityApiRequest, eventsExist, mapResource } from './GenericFunctions'; @@ -22,7 +22,7 @@ export class AffinityTrigger implements INodeType { name: 'Affinity Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'affinityApi', diff --git a/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts b/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts index 27fc4689f1..3e620b0b40 100644 --- a/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts +++ b/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { jsonParse, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, jsonParse, NodeOperationError } from 'n8n-workflow'; import { contactFields, contactOperations } from './ContactDescription'; @@ -41,8 +41,8 @@ export class AgileCrm implements INodeType { defaults: { name: 'Agile CRM', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'agileCrmApi', diff --git a/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts b/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts index 3042267a44..9d21d82888 100644 --- a/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts +++ b/packages/nodes-base/nodes/AiTransform/AiTransform.node.ts @@ -1,6 +1,7 @@ /* eslint-disable n8n-nodes-base/node-dirname-against-convention */ import { NodeOperationError, + NodeConnectionType, type IExecuteFunctions, type INodeExecutionData, type INodeType, @@ -26,8 +27,8 @@ export class AiTransform implements INodeType { defaults: { name: 'AI Transform', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', properties: [ { diff --git a/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts b/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts index 6031ae754e..d5235546d7 100644 --- a/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts +++ b/packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import type { IRecord } from './v1/GenericFunctions'; @@ -54,7 +54,7 @@ export class AirtableTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Authentication', diff --git a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts index b62ed931e1..b143394e92 100644 --- a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts +++ b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeBaseDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { oldVersionNotice } from '../../../utils/descriptions'; import { generatePairedItemData } from '../../../utils/utilities'; @@ -25,8 +25,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Airtable', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'airtableApi', diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts index 176d4b3ae9..f2ecef8726 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as record from './record/Record.resource'; import * as base from './base/Base.resource'; @@ -15,8 +15,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Airtable', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'airtableTokenApi', diff --git a/packages/nodes-base/nodes/Amqp/Amqp.node.ts b/packages/nodes-base/nodes/Amqp/Amqp.node.ts index 43b16c6caa..47f1833a38 100644 --- a/packages/nodes-base/nodes/Amqp/Amqp.node.ts +++ b/packages/nodes-base/nodes/Amqp/Amqp.node.ts @@ -12,7 +12,7 @@ import type { ICredentialsDecrypted, ICredentialDataDecryptedObject, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; async function checkIfCredentialsValid( credentials: IDataObject, @@ -65,8 +65,8 @@ export class Amqp implements INodeType { defaults: { name: 'AMQP Sender', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'amqp', diff --git a/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts b/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts index c9b72b8b2c..33037c3dd8 100644 --- a/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts +++ b/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts @@ -10,7 +10,7 @@ import type { IDeferredPromise, IRun, } from 'n8n-workflow'; -import { deepCopy, jsonParse, NodeOperationError } from 'n8n-workflow'; +import { deepCopy, jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export class AmqpTrigger implements INodeType { description: INodeTypeDescription = { @@ -24,7 +24,7 @@ export class AmqpTrigger implements INodeType { name: 'AMQP Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'amqp', diff --git a/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts b/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts index b7fe475dad..0ffbc8d7c1 100644 --- a/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts +++ b/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { apiTemplateIoApiRequest, @@ -28,8 +28,8 @@ export class ApiTemplateIo implements INodeType { defaults: { name: 'APITemplate.io', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'apiTemplateIoApi', diff --git a/packages/nodes-base/nodes/Asana/Asana.node.ts b/packages/nodes-base/nodes/Asana/Asana.node.ts index c7ff177553..dc980a96e0 100644 --- a/packages/nodes-base/nodes/Asana/Asana.node.ts +++ b/packages/nodes-base/nodes/Asana/Asana.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -33,8 +33,8 @@ export class Asana implements INodeType { defaults: { name: 'Asana', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'asanaApi', diff --git a/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts b/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts index 5af631543e..2b44d15c75 100644 --- a/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts +++ b/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { asanaApiRequest, getWorkspaces } from './GenericFunctions'; @@ -28,7 +28,7 @@ export class AsanaTrigger implements INodeType { name: 'Asana Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'asanaApi', diff --git a/packages/nodes-base/nodes/Automizy/Automizy.node.ts b/packages/nodes-base/nodes/Automizy/Automizy.node.ts index 357be9c4c5..38c53c4f1f 100644 --- a/packages/nodes-base/nodes/Automizy/Automizy.node.ts +++ b/packages/nodes-base/nodes/Automizy/Automizy.node.ts @@ -1,12 +1,13 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - NodeExecutionWithMetadata, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type NodeExecutionWithMetadata, + NodeConnectionType, } from 'n8n-workflow'; import { automizyApiRequest, automizyApiRequestAllItems } from './GenericFunctions'; @@ -28,8 +29,8 @@ export class Automizy implements INodeType { defaults: { name: 'Automizy', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], hidden: true, credentials: [ { diff --git a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts index bdf287d1f1..876dfdbc34 100644 --- a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts +++ b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts @@ -1,12 +1,13 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IHttpRequestMethods, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IHttpRequestMethods, + NodeConnectionType, } from 'n8n-workflow'; import { autopilotApiRequest, autopilotApiRequestAllItems } from './GenericFunctions'; @@ -31,8 +32,8 @@ export class Autopilot implements INodeType { defaults: { name: 'Autopilot', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'autopilotApi', diff --git a/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts b/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts index f86ebf0e3c..a27ff7c1a5 100644 --- a/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts +++ b/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { autopilotApiRequest } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class AutopilotTrigger implements INodeType { name: 'Autopilot Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'autopilotApi', diff --git a/packages/nodes-base/nodes/Aws/AwsLambda.node.ts b/packages/nodes-base/nodes/Aws/AwsLambda.node.ts index ed69ab35bd..ddd95c4a22 100644 --- a/packages/nodes-base/nodes/Aws/AwsLambda.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsLambda.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { awsApiRequestREST } from './GenericFunctions'; @@ -24,8 +24,8 @@ export class AwsLambda implements INodeType { defaults: { name: 'AWS Lambda', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/AwsSns.node.ts b/packages/nodes-base/nodes/Aws/AwsSns.node.ts index 101ab7b839..fe898d4276 100644 --- a/packages/nodes-base/nodes/Aws/AwsSns.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsSns.node.ts @@ -1,12 +1,13 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeListSearchItems, - INodeListSearchResult, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeListSearchItems, + type INodeListSearchResult, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { awsApiRequestSOAP } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class AwsSns implements INodeType { defaults: { name: 'AWS SNS', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts b/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts index 7aa3c25fb1..1aee04d83b 100644 --- a/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { jsonParse, NodeOperationError } from 'n8n-workflow'; +import { jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import get from 'lodash/get'; import { awsApiRequestSOAP } from './GenericFunctions'; @@ -26,7 +26,7 @@ export class AwsSnsTrigger implements INodeType { name: 'AWS SNS Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts index 1ce0271e09..5cdb0cfa76 100644 --- a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts +++ b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { certificateFields, certificateOperations } from './CertificateDescription'; @@ -22,8 +23,8 @@ export class AwsCertificateManager implements INodeType { defaults: { name: 'AWS Certificate Manager', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts b/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts index 78ea823e16..3d995fd01f 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { awsApiRequestREST } from './GenericFunctions'; @@ -20,8 +21,8 @@ export class AwsComprehend implements INodeType { defaults: { name: 'AWS Comprehend', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts index 4340dd7c16..efc7130007 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts @@ -1,12 +1,13 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, - NodeParameterValue, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + type NodeParameterValue, + NodeConnectionType, } from 'n8n-workflow'; import { awsApiRequest, awsApiRequestAllItems } from './GenericFunctions'; @@ -42,8 +43,8 @@ export class AwsDynamoDB implements INodeType { defaults: { name: 'AWS DynamoDB', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts index 539f0c7761..470b5b3546 100644 --- a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts +++ b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { awsApiRequestSOAP, awsApiRequestSOAPAllItems } from './GenericFunctions'; @@ -30,8 +31,8 @@ export class AwsElb implements INodeType { defaults: { name: 'AWS ELB', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts index 34c08e2073..0f9be63d17 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { awsApiRequestREST, keysTPascalCase } from './GenericFunctions'; @@ -20,8 +21,8 @@ export class AwsRekognition implements INodeType { defaults: { name: 'AWS Rekognition', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', 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 afa888deea..82de951fef 100644 --- a/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts @@ -12,7 +12,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { bucketFields, bucketOperations } from './BucketDescription'; @@ -42,8 +42,8 @@ export class AwsS3V1 implements INodeType { defaults: { name: 'AWS S3', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', 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 075277eccc..7892374659 100644 --- a/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts @@ -13,7 +13,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { bucketFields, bucketOperations } from './BucketDescription'; @@ -42,8 +42,8 @@ export class AwsS3V2 implements INodeType { defaults: { name: 'AWS S3', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts index ce0f1ad1a4..5cf0bd4dc8 100644 --- a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts +++ b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts @@ -8,7 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { awsApiRequestSOAP, awsApiRequestSOAPAllItems } from './GenericFunctions'; @@ -30,8 +30,8 @@ export class AwsSes implements INodeType { defaults: { name: 'AWS SES', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts index 40eda03de5..5b4654a08b 100644 --- a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts +++ b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { pascalCase } from 'change-case'; import { awsApiRequestSOAP } from '../GenericFunctions'; @@ -27,8 +27,8 @@ export class AwsSqs implements INodeType { defaults: { name: 'AWS SQS', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts index ebb845f3b9..a5173d0d14 100644 --- a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts +++ b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts @@ -1,13 +1,14 @@ -import type { - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - IExecuteFunctions, - INodeCredentialTestResult, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type ICredentialDataDecryptedObject, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type IExecuteFunctions, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import type { IExpenseDocument } from './GenericFunctions'; @@ -25,8 +26,8 @@ export class AwsTextract implements INodeType { defaults: { name: 'AWS Textract', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts b/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts index 95093b65c0..d44f1ca0c7 100644 --- a/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts +++ b/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { awsApiRequestREST, awsApiRequestRESTAllItems } from './GenericFunctions'; @@ -20,8 +21,8 @@ export class AwsTranscribe implements INodeType { defaults: { name: 'AWS Transcribe', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'aws', diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts index 44da4c0ce7..213599b614 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as file from './file'; import * as employee from './employee'; @@ -22,9 +22,9 @@ export const versionDescription: INodeTypeDescription = { group: ['transform'], // eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg icon: 'file:bambooHr.png', - inputs: ['main'], + inputs: [NodeConnectionType.Main], name: 'bambooHr', - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Resource', diff --git a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts index 975fc600ac..586fed329c 100644 --- a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts +++ b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { bannerbearApiRequest, keysToSnakeCase } from './GenericFunctions'; @@ -27,8 +28,8 @@ export class Bannerbear implements INodeType { defaults: { name: 'Bannerbear', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'bannerbearApi', diff --git a/packages/nodes-base/nodes/Baserow/Baserow.node.ts b/packages/nodes-base/nodes/Baserow/Baserow.node.ts index 2753f40f56..9b4df37c0c 100644 --- a/packages/nodes-base/nodes/Baserow/Baserow.node.ts +++ b/packages/nodes-base/nodes/Baserow/Baserow.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -38,8 +39,8 @@ export class Baserow implements INodeType { defaults: { name: 'Baserow', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'baserowApi', diff --git a/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts b/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts index c588e4540d..55c6683ca3 100644 --- a/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts +++ b/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts @@ -1,12 +1,13 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeParameters, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeParameters, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -32,8 +33,8 @@ export class Beeminder implements INodeType { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg icon: 'file:beeminder.png', - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'beeminderApi', diff --git a/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts b/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts index e0e6a13778..96c99104a2 100644 --- a/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts +++ b/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts @@ -1,16 +1,17 @@ -import type { - IHookFunctions, - IWebhookFunctions, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeCredentialTestResult, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - IRequestOptions, +import { + type IHookFunctions, + type IWebhookFunctions, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeCredentialTestResult, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + type IRequestOptions, + NodeConnectionType, } from 'n8n-workflow'; import { bitbucketApiRequest, bitbucketApiRequestAllItems } from './GenericFunctions'; @@ -27,7 +28,7 @@ export class BitbucketTrigger implements INodeType { name: 'Bitbucket Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'bitbucketApi', diff --git a/packages/nodes-base/nodes/Bitly/Bitly.node.ts b/packages/nodes-base/nodes/Bitly/Bitly.node.ts index f6c1102b8d..663726b7cc 100644 --- a/packages/nodes-base/nodes/Bitly/Bitly.node.ts +++ b/packages/nodes-base/nodes/Bitly/Bitly.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { linkFields, linkOperations } from './LinkDescription'; @@ -24,8 +25,8 @@ export class Bitly implements INodeType { defaults: { name: 'Bitly', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'bitlyApi', diff --git a/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts b/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts index 2a7ca10685..eaea3c48c6 100644 --- a/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts +++ b/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; import partialRight from 'lodash/partialRight'; @@ -46,8 +46,8 @@ export class Bitwarden implements INodeType { defaults: { name: 'Bitwarden', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'bitwardenApi', diff --git a/packages/nodes-base/nodes/Box/Box.node.ts b/packages/nodes-base/nodes/Box/Box.node.ts index 31c782e054..894326dcbc 100644 --- a/packages/nodes-base/nodes/Box/Box.node.ts +++ b/packages/nodes-base/nodes/Box/Box.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { noCase } from 'change-case'; @@ -28,8 +28,8 @@ export class Box implements INodeType { defaults: { name: 'Box', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'boxOAuth2Api', diff --git a/packages/nodes-base/nodes/Box/BoxTrigger.node.ts b/packages/nodes-base/nodes/Box/BoxTrigger.node.ts index b70bd9675f..08db55d9db 100644 --- a/packages/nodes-base/nodes/Box/BoxTrigger.node.ts +++ b/packages/nodes-base/nodes/Box/BoxTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { boxApiRequest, boxApiRequestAllItems } from './GenericFunctions'; @@ -21,7 +22,7 @@ export class BoxTrigger implements INodeType { name: 'Box Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'boxOAuth2Api', diff --git a/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts b/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts index e470296a40..381982abc3 100644 --- a/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts +++ b/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { brandfetchApiRequest } from './GenericFunctions'; @@ -22,8 +23,8 @@ export class Brandfetch implements INodeType { defaults: { name: 'Brandfetch', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'brandfetchApi', diff --git a/packages/nodes-base/nodes/Brevo/Brevo.node.ts b/packages/nodes-base/nodes/Brevo/Brevo.node.ts index f4519c0651..e1e22ff46f 100644 --- a/packages/nodes-base/nodes/Brevo/Brevo.node.ts +++ b/packages/nodes-base/nodes/Brevo/Brevo.node.ts @@ -1,5 +1,6 @@ /* 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'; @@ -18,8 +19,8 @@ export class Brevo implements INodeType { defaults: { name: 'Brevo', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'sendInBlueApi', diff --git a/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts b/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts index 299b15fb59..4e2a480291 100644 --- a/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts +++ b/packages/nodes-base/nodes/Brevo/BrevoTrigger.node.ts @@ -1,10 +1,11 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IHookFunctions, - INodeType, - INodeTypeDescription, - IWebhookFunctions, - IWebhookResponseData, +import { + NodeConnectionType, + type IHookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, + type IWebhookResponseData, } from 'n8n-workflow'; import { BrevoWebhookApi } from './GenericFunctions'; @@ -29,7 +30,7 @@ export class BrevoTrigger implements INodeType { inputs: [], // keep sendinblue name for backward compatibility name: 'sendInBlueTrigger', - outputs: ['main'], + outputs: [NodeConnectionType.Main], version: 1, webhooks: [ { diff --git a/packages/nodes-base/nodes/Bubble/Bubble.node.ts b/packages/nodes-base/nodes/Bubble/Bubble.node.ts index ea8b74b8f2..d63c980266 100644 --- a/packages/nodes-base/nodes/Bubble/Bubble.node.ts +++ b/packages/nodes-base/nodes/Bubble/Bubble.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { bubbleApiRequest, bubbleApiRequestAllItems, validateJSON } from './GenericFunctions'; @@ -23,8 +23,8 @@ export class Bubble implements INodeType { defaults: { name: 'Bubble', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'bubbleApi', diff --git a/packages/nodes-base/nodes/Cal/CalTrigger.node.ts b/packages/nodes-base/nodes/Cal/CalTrigger.node.ts index 0388e9255b..7a0213572d 100644 --- a/packages/nodes-base/nodes/Cal/CalTrigger.node.ts +++ b/packages/nodes-base/nodes/Cal/CalTrigger.node.ts @@ -1,12 +1,13 @@ -import type { - IDataObject, - IHookFunctions, - IWebhookFunctions, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IDataObject, + type IHookFunctions, + type IWebhookFunctions, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { calApiRequest, sortOptionParameters } from './GenericFunctions'; @@ -24,7 +25,7 @@ export class CalTrigger implements INodeType { name: 'Cal.com Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'calApi', diff --git a/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts b/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts index c6328fa801..f235fb0dd5 100644 --- a/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts +++ b/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { calendlyApiRequest, getAuthenticationType } from './GenericFunctions'; @@ -21,7 +22,7 @@ export class CalendlyTrigger implements INodeType { name: 'Calendly Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'calendlyApi', diff --git a/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts b/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts index ae6c1a997e..3b11e2402e 100644 --- a/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts +++ b/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts @@ -9,7 +9,7 @@ import type { IRequestOptions, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; interface CustomProperty { name: string; @@ -37,8 +37,8 @@ export class Chargebee implements INodeType { defaults: { name: 'Chargebee', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'chargebeeApi', diff --git a/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts b/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts index 2acf1b7803..fe325083e6 100644 --- a/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts +++ b/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IDataObject, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IDataObject, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; export class ChargebeeTrigger implements INodeType { @@ -19,7 +20,7 @@ export class ChargebeeTrigger implements INodeType { name: 'Chargebee Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'default', diff --git a/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts b/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts index 739bb25996..8bbbb36cf2 100644 --- a/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts +++ b/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { pipelineFields, pipelineOperations } from './PipelineDescription'; @@ -23,8 +24,8 @@ export class CircleCi implements INodeType { defaults: { name: 'CircleCI', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'circleCiApi', diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts index ae9e9088c7..fc40c72181 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { getAttachments, webexApiRequest, webexApiRequestAllItems } from './GenericFunctions'; @@ -39,8 +40,8 @@ export class CiscoWebex implements INodeType { required: true, }, ], - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Resource', diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts index 2d3db0396a..c2a1fdd22a 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { getAutomaticSecret, @@ -30,7 +31,7 @@ export class CiscoWebexTrigger implements INodeType { name: 'Webex by Cisco Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'ciscoWebexOAuth2Api', diff --git a/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts b/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts index 24585c3324..48e3cc1ecb 100644 --- a/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts +++ b/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { clearbitApiRequest } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class Clearbit implements INodeType { defaults: { name: 'Clearbit', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'clearbitApi', diff --git a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts index 26294a2bb1..2035d1cb8d 100644 --- a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts +++ b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { clickupApiRequest, clickupApiRequestAllItems, validateJSON } from './GenericFunctions'; @@ -61,8 +61,8 @@ export class ClickUp implements INodeType { defaults: { name: 'ClickUp', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'clickUpApi', diff --git a/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts b/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts index af6e696a0c..0d70804af8 100644 --- a/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts +++ b/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts @@ -9,6 +9,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { clickupApiRequest } from './GenericFunctions'; @@ -24,7 +25,7 @@ export class ClickUpTrigger implements INodeType { name: 'ClickUp Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'clickUpApi', diff --git a/packages/nodes-base/nodes/Clockify/Clockify.node.ts b/packages/nodes-base/nodes/Clockify/Clockify.node.ts index 6b8e7a835d..dc6755c374 100644 --- a/packages/nodes-base/nodes/Clockify/Clockify.node.ts +++ b/packages/nodes-base/nodes/Clockify/Clockify.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { clockifyApiRequest, clockifyApiRequestAllItems } from './GenericFunctions'; @@ -43,8 +44,8 @@ export class Clockify implements INodeType { defaults: { name: 'Clockify', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'clockifyApi', diff --git a/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts b/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts index d0846b6262..a7fce6f348 100644 --- a/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts +++ b/packages/nodes-base/nodes/Clockify/ClockifyTrigger.node.ts @@ -9,6 +9,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { clockifyApiRequest } from './GenericFunctions'; @@ -28,7 +29,7 @@ export class ClockifyTrigger implements INodeType { name: 'Clockify Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'clockifyApi', diff --git a/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts b/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts index f2cad15a22..d6fdccb235 100644 --- a/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts +++ b/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { cloudflareApiRequest, cloudflareApiRequestAllItems } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class Cloudflare implements INodeType { defaults: { name: 'Cloudflare', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'cloudflareApi', diff --git a/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts b/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts index e7b37e6a85..b02f4b63a5 100644 --- a/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts +++ b/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { collectionFields, collectionOperations } from './CollectionDescription'; import { createCollectionEntry, @@ -31,8 +32,8 @@ export class Cockpit implements INodeType { defaults: { name: 'Cockpit', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'cockpitApi', diff --git a/packages/nodes-base/nodes/Coda/Coda.node.ts b/packages/nodes-base/nodes/Coda/Coda.node.ts index be5bf1a796..0b12958f0b 100644 --- a/packages/nodes-base/nodes/Coda/Coda.node.ts +++ b/packages/nodes-base/nodes/Coda/Coda.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { codaApiRequest, codaApiRequestAllItems } from './GenericFunctions'; import { tableFields, tableOperations } from './TableDescription'; import { formulaFields, formulaOperations } from './FormulaDescription'; @@ -27,8 +27,8 @@ export class Coda implements INodeType { defaults: { name: 'Coda', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'codaApi', diff --git a/packages/nodes-base/nodes/Code/Code.node.ts b/packages/nodes-base/nodes/Code/Code.node.ts index 9f028b293f..11aa76fbc2 100644 --- a/packages/nodes-base/nodes/Code/Code.node.ts +++ b/packages/nodes-base/nodes/Code/Code.node.ts @@ -1,10 +1,11 @@ -import type { - CodeExecutionMode, - CodeNodeEditorLanguage, - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type CodeExecutionMode, + type CodeNodeEditorLanguage, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import set from 'lodash/set'; import { javascriptCodeDescription } from './descriptions/JavascriptCodeDescription'; @@ -28,8 +29,8 @@ export class Code implements INodeType { defaults: { name: 'Code', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', properties: [ { diff --git a/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts b/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts index dc9c9e9b5d..b39b85359c 100644 --- a/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts +++ b/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { coinFields, coinOperations } from './CoinDescription'; @@ -27,8 +28,8 @@ export class CoinGecko implements INodeType { defaults: { name: 'CoinGecko', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Resource', diff --git a/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts b/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts index 60d6e6199f..99f866394f 100644 --- a/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts +++ b/packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.ts @@ -1,9 +1,10 @@ -import type { - IExecuteFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { checkInput, @@ -22,11 +23,16 @@ export class CompareDatasets implements INodeType { description: 'Compare two inputs for changes', defaults: { name: 'Compare Datasets' }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node - inputs: ['main', 'main'], + inputs: [NodeConnectionType.Main, NodeConnectionType.Main], inputNames: ['Input A', 'Input B'], requiredInputs: 1, // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong - outputs: ['main', 'main', 'main', 'main'], + outputs: [ + NodeConnectionType.Main, + NodeConnectionType.Main, + NodeConnectionType.Main, + NodeConnectionType.Main, + ], outputNames: ['In A only', 'Same', 'Different', 'In B only'], properties: [ { diff --git a/packages/nodes-base/nodes/Compression/Compression.node.ts b/packages/nodes-base/nodes/Compression/Compression.node.ts index b6ab2a22ba..78fa911228 100644 --- a/packages/nodes-base/nodes/Compression/Compression.node.ts +++ b/packages/nodes-base/nodes/Compression/Compression.node.ts @@ -1,10 +1,11 @@ import { promisify } from 'util'; -import type { - IBinaryKeyData, - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IBinaryKeyData, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import * as fflate from 'fflate'; @@ -57,8 +58,8 @@ export class Compression implements INodeType { name: 'Compression', color: '#408000', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/Contentful/Contentful.node.ts b/packages/nodes-base/nodes/Contentful/Contentful.node.ts index 12403dd8dd..2ba52a23c7 100644 --- a/packages/nodes-base/nodes/Contentful/Contentful.node.ts +++ b/packages/nodes-base/nodes/Contentful/Contentful.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { contentfulApiRequestAllItems, contentfulApiRequest } from './GenericFunctions'; @@ -27,8 +28,8 @@ export class Contentful implements INodeType { defaults: { name: 'Contentful', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'contentfulApi', diff --git a/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts b/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts index a117778f83..4f947c2509 100644 --- a/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts +++ b/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - ILoadOptionsFunctions, - IDataObject, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type ILoadOptionsFunctions, + type IDataObject, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { convertKitApiRequest } from './GenericFunctions'; @@ -32,8 +33,8 @@ export class ConvertKit implements INodeType { defaults: { name: 'ConvertKit', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'convertKitApi', diff --git a/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts b/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts index 415f4ceef1..7d69a46573 100644 --- a/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts +++ b/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { convertKitApiRequest } from './GenericFunctions'; @@ -25,7 +26,7 @@ export class ConvertKitTrigger implements INodeType { name: 'ConvertKit Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'convertKitApi', diff --git a/packages/nodes-base/nodes/Copper/Copper.node.ts b/packages/nodes-base/nodes/Copper/Copper.node.ts index 657d948135..dc2d23a921 100644 --- a/packages/nodes-base/nodes/Copper/Copper.node.ts +++ b/packages/nodes-base/nodes/Copper/Copper.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { adjustCompanyFields, @@ -46,8 +47,8 @@ export class Copper implements INodeType { defaults: { name: 'Copper', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'copperApi', diff --git a/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts b/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts index 4ae1fe780c..e78520ef6f 100644 --- a/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts +++ b/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { copperApiRequest, getAutomaticSecret } from './GenericFunctions'; @@ -21,7 +22,7 @@ export class CopperTrigger implements INodeType { name: 'Copper Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'copperApi', diff --git a/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts b/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts index 2a0f94e40f..0acd63e83e 100644 --- a/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts +++ b/packages/nodes-base/nodes/Copper/descriptions/CompanyDescription.ts @@ -1,8 +1,7 @@ import type { INodeProperties } from 'n8n-workflow'; -import { isoCountryCodes } from '@utils/ISOCountryCodes'; - import { addressFixedCollection, phoneNumbersFixedCollection } from '../utils/sharedFields'; +import { isoCountryCodes } from '@utils/ISOCountryCodes'; export const companyOperations: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Cortex/Cortex.node.ts b/packages/nodes-base/nodes/Cortex/Cortex.node.ts index 6cddcd3b5f..37f5fb05c7 100644 --- a/packages/nodes-base/nodes/Cortex/Cortex.node.ts +++ b/packages/nodes-base/nodes/Cortex/Cortex.node.ts @@ -8,6 +8,7 @@ import type { INodeType, 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'; @@ -32,8 +33,8 @@ export class Cortex implements INodeType { defaults: { name: 'Cortex', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'cortexApi', diff --git a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts index 3676d919ef..a489093425 100644 --- a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts +++ b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts @@ -4,7 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import pgPromise from 'pg-promise'; import { @@ -28,8 +28,8 @@ export class CrateDb implements INodeType { defaults: { name: 'CrateDB', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'crateDb', diff --git a/packages/nodes-base/nodes/Cron/Cron.node.ts b/packages/nodes-base/nodes/Cron/Cron.node.ts index 62f0c595f3..ebb471a99d 100644 --- a/packages/nodes-base/nodes/Cron/Cron.node.ts +++ b/packages/nodes-base/nodes/Cron/Cron.node.ts @@ -5,7 +5,7 @@ import type { ITriggerResponse, TriggerTime, } from 'n8n-workflow'; -import { NodeHelpers, toCronExpression } from 'n8n-workflow'; +import { NodeConnectionType, NodeHelpers, toCronExpression } from 'n8n-workflow'; export class Cron implements INodeType { description: INodeTypeDescription = { @@ -25,7 +25,7 @@ export class Cron implements INodeType { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts b/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts index b245e79a57..f8d94fceaf 100644 --- a/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts +++ b/packages/nodes-base/nodes/CrowdDev/CrowdDev.node.ts @@ -1,4 +1,5 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { allProperties } from './descriptions'; export class CrowdDev implements INodeType { @@ -14,8 +15,8 @@ export class CrowdDev implements INodeType { defaults: { name: 'crowd.dev', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'crowdDevApi', diff --git a/packages/nodes-base/nodes/CrowdDev/CrowdDevTrigger.node.ts b/packages/nodes-base/nodes/CrowdDev/CrowdDevTrigger.node.ts index 8c160f3e04..69f14f16ba 100644 --- a/packages/nodes-base/nodes/CrowdDev/CrowdDevTrigger.node.ts +++ b/packages/nodes-base/nodes/CrowdDev/CrowdDevTrigger.node.ts @@ -1,10 +1,11 @@ -import type { - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - IHttpRequestOptions, +import { + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + type IHttpRequestOptions, + NodeConnectionType, } from 'n8n-workflow'; interface ICrowdDevCreds { @@ -44,7 +45,7 @@ export class CrowdDevTrigger implements INodeType { name: 'crowd.dev Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'crowdDevApi', diff --git a/packages/nodes-base/nodes/Crypto/Crypto.node.ts b/packages/nodes-base/nodes/Crypto/Crypto.node.ts index db913eba2c..a4c0cee1f8 100644 --- a/packages/nodes-base/nodes/Crypto/Crypto.node.ts +++ b/packages/nodes-base/nodes/Crypto/Crypto.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { deepCopy, BINARY_ENCODING } from 'n8n-workflow'; +import { deepCopy, BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow'; const unsupportedAlgorithms = [ 'RSA-MD4', @@ -39,8 +39,8 @@ export class Crypto implements INodeType { name: 'Crypto', color: '#408000', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Action', diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts index e5698bc812..ffba765334 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { customerIoApiRequest, validateJSON } from './GenericFunctions'; import { campaignFields, campaignOperations } from './CampaignDescription'; import { customerFields, customerOperations } from './CustomerDescription'; @@ -24,8 +24,8 @@ export class CustomerIo implements INodeType { defaults: { name: 'Customer.io', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'customerIoApi', diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts index 8958d90081..a1fd44b59d 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { customerIoApiRequest, eventExists } from './GenericFunctions'; @@ -30,7 +31,7 @@ export class CustomerIoTrigger implements INodeType { name: 'Customer.io Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'customerIoApi', diff --git a/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts b/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts index 924b9d2eaa..b673800901 100644 --- a/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts +++ b/packages/nodes-base/nodes/DateTime/V1/DateTimeV1.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { deepCopy, NodeOperationError } from 'n8n-workflow'; +import { deepCopy, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import set from 'lodash/set'; @@ -61,8 +61,8 @@ const versionDescription: INodeTypeDescription = { name: 'Date & Time', color: '#408000', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts b/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts index df7a4a7386..1077a1d9a8 100644 --- a/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts +++ b/packages/nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts @@ -5,7 +5,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { DateTimeUnit, DurationUnit } from 'luxon'; import { DateTime } from 'luxon'; @@ -29,8 +29,8 @@ export class DateTimeV2 implements INodeType { name: 'Date & Time', color: '#408000', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], description: 'Manipulate date and time values', properties: [ { diff --git a/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts b/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts index 7e94d097c0..173d67c783 100644 --- a/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts +++ b/packages/nodes-base/nodes/DebugHelper/DebugHelper.node.ts @@ -4,7 +4,12 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { ApplicationError, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { + ApplicationError, + NodeApiError, + NodeConnectionType, + NodeOperationError, +} from 'n8n-workflow'; import { setSeed, array as mfArray } from 'minifaker'; import { generateCreditCard, @@ -34,8 +39,8 @@ export class DebugHelper implements INodeType { defaults: { name: 'DebugHelper', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [], properties: [ { diff --git a/packages/nodes-base/nodes/DeepL/DeepL.node.ts b/packages/nodes-base/nodes/DeepL/DeepL.node.ts index df154e54ad..6ff2bae30d 100644 --- a/packages/nodes-base/nodes/DeepL/DeepL.node.ts +++ b/packages/nodes-base/nodes/DeepL/DeepL.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { deepLApiRequest } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class DeepL implements INodeType { defaults: { name: 'DeepL', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'deepLApi', diff --git a/packages/nodes-base/nodes/Demio/Demio.node.ts b/packages/nodes-base/nodes/Demio/Demio.node.ts index 384ccd1e8a..4c304f8627 100644 --- a/packages/nodes-base/nodes/Demio/Demio.node.ts +++ b/packages/nodes-base/nodes/Demio/Demio.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { demioApiRequest } from './GenericFunctions'; @@ -26,8 +27,8 @@ export class Demio implements INodeType { defaults: { name: 'Demio', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'demioApi', diff --git a/packages/nodes-base/nodes/Dhl/Dhl.node.ts b/packages/nodes-base/nodes/Dhl/Dhl.node.ts index 9456a0e818..648bcdad7c 100644 --- a/packages/nodes-base/nodes/Dhl/Dhl.node.ts +++ b/packages/nodes-base/nodes/Dhl/Dhl.node.ts @@ -1,13 +1,14 @@ -import type { - IExecuteFunctions, - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - INodeCredentialTestResult, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type ICredentialDataDecryptedObject, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { dhlApiRequest, validateCredentials } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class Dhl implements INodeType { defaults: { name: 'DHL', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'dhlApi', diff --git a/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts b/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts index c36ae729e3..5ae8acdd57 100644 --- a/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts +++ b/packages/nodes-base/nodes/Discord/v1/DiscordV1.node.ts @@ -8,7 +8,13 @@ import type { INodeTypeDescription, IRequestOptions, } from 'n8n-workflow'; -import { jsonParse, NodeApiError, NodeOperationError, sleep } from 'n8n-workflow'; +import { + jsonParse, + NodeApiError, + NodeConnectionType, + NodeOperationError, + sleep, +} from 'n8n-workflow'; import { oldVersionNotice } from '../../../utils/descriptions'; import type { DiscordAttachment, DiscordWebhook } from './Interfaces'; @@ -23,8 +29,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Discord', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ oldVersionNotice, { diff --git a/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts index beb0572f84..7fc8c5d532 100644 --- a/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Discord/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as message from './message'; import * as channel from './channel'; @@ -17,8 +17,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Discord', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'discordBotApi', diff --git a/packages/nodes-base/nodes/Discourse/Discourse.node.ts b/packages/nodes-base/nodes/Discourse/Discourse.node.ts index b4fc41ee53..2fdf147982 100644 --- a/packages/nodes-base/nodes/Discourse/Discourse.node.ts +++ b/packages/nodes-base/nodes/Discourse/Discourse.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { discourseApiRequest } from './GenericFunctions'; @@ -32,8 +33,8 @@ export class Discourse implements INodeType { defaults: { name: 'Discourse', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'discourseApi', diff --git a/packages/nodes-base/nodes/Disqus/Disqus.node.ts b/packages/nodes-base/nodes/Disqus/Disqus.node.ts index 284f4db4d6..91c79f0b71 100644 --- a/packages/nodes-base/nodes/Disqus/Disqus.node.ts +++ b/packages/nodes-base/nodes/Disqus/Disqus.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { disqusApiRequest, disqusApiRequestAllItems } from './GenericFunctions'; @@ -23,8 +23,8 @@ export class Disqus implements INodeType { defaults: { name: 'Disqus', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'disqusApi', diff --git a/packages/nodes-base/nodes/Drift/Drift.node.ts b/packages/nodes-base/nodes/Drift/Drift.node.ts index 9284cf4059..7562ce0f74 100644 --- a/packages/nodes-base/nodes/Drift/Drift.node.ts +++ b/packages/nodes-base/nodes/Drift/Drift.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { driftApiRequest } from './GenericFunctions'; import { contactFields, contactOperations } from './ContactDescription'; import type { IContact } from './ContactInterface'; @@ -22,8 +23,8 @@ export class Drift implements INodeType { defaults: { name: 'Drift', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'driftApi', diff --git a/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts b/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts index a7cacafb8f..6d35041942 100644 --- a/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts +++ b/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { dropboxApiRequest, @@ -28,8 +28,8 @@ export class Dropbox implements INodeType { defaults: { name: 'Dropbox', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'dropboxApi', diff --git a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts index 20c8a038d8..2a4a5be0d6 100644 --- a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts +++ b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { dropcontactApiRequest, mapPairedItemsFrom } from './GenericFunction'; @@ -21,8 +21,8 @@ export class Dropcontact implements INodeType { defaults: { name: 'Dropcontact', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'dropcontactApi', diff --git a/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts b/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts index c5de614ec4..5dd91f524e 100644 --- a/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts +++ b/packages/nodes-base/nodes/E2eTest/E2eTest.node.ts @@ -1,12 +1,13 @@ -import type { - IExecuteFunctions, - ILoadOptionsFunctions, - INodeExecutionData, - INodeListSearchResult, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - ResourceMapperFields, +import { + NodeConnectionType, + type IExecuteFunctions, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeListSearchResult, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type ResourceMapperFields, } from 'n8n-workflow'; import { remoteOptions, resourceMapperFields, returnData, searchOptions } from './mock'; @@ -22,8 +23,8 @@ export class E2eTest implements INodeType { defaults: { name: 'E2E Test', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts index c5929abc82..8217b3f22d 100644 --- a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts +++ b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts @@ -8,7 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { documentFields, documentOperations } from './DocumentDescription'; @@ -29,8 +29,8 @@ export class ERPNext implements INodeType { defaults: { name: 'ERPNext', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'erpNextApi', diff --git a/packages/nodes-base/nodes/EditImage/EditImage.node.ts b/packages/nodes-base/nodes/EditImage/EditImage.node.ts index 8f25a52c34..1df46b8d26 100644 --- a/packages/nodes-base/nodes/EditImage/EditImage.node.ts +++ b/packages/nodes-base/nodes/EditImage/EditImage.node.ts @@ -10,7 +10,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import gm from 'gm'; import { file } from 'tmp-promise'; import getSystemFonts from 'get-system-fonts'; @@ -765,8 +765,8 @@ export class EditImage implements INodeType { name: 'Edit Image', color: '#553399', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/Egoi/Egoi.node.ts b/packages/nodes-base/nodes/Egoi/Egoi.node.ts index a9e4da18c6..8f37a6d222 100644 --- a/packages/nodes-base/nodes/Egoi/Egoi.node.ts +++ b/packages/nodes-base/nodes/Egoi/Egoi.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { egoiApiRequest, egoiApiRequestAllItems, simplify } from './GenericFunctions'; @@ -26,8 +27,8 @@ export class Egoi implements INodeType { defaults: { name: 'E-goi', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'egoiApi', diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts index 36df215476..d986eae76e 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { elasticSecurityApiRequest, @@ -42,8 +42,8 @@ export class ElasticSecurity implements INodeType { defaults: { name: 'Elastic Security', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'elasticSecurityApi', diff --git a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts index d94ac77725..d13d237514 100644 --- a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts +++ b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { jsonParse, NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, jsonParse, NodeApiError } from 'n8n-workflow'; import omit from 'lodash/omit'; import { @@ -31,8 +31,8 @@ export class Elasticsearch implements INodeType { defaults: { name: 'Elasticsearch', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'elasticsearchApi', diff --git a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts index 923ffe5832..25a44e6734 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts @@ -14,7 +14,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; -import { NodeOperationError } 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'; @@ -85,7 +85,7 @@ const versionDescription: INodeTypeDescription = { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'imap', diff --git a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts index b3796263a7..d9268fd5c0 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts @@ -14,7 +14,7 @@ import type { ITriggerResponse, JsonObject, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { ImapSimple, ImapSimpleOptions, Message, MessagePart } from '@n8n/imap'; import { connect as imapConnect, getParts } from '@n8n/imap'; @@ -89,7 +89,7 @@ const versionDescription: INodeTypeDescription = { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'imap', diff --git a/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts b/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts index 3c0d897f8f..d1bf8caed7 100644 --- a/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts +++ b/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { createTransport } from 'nodemailer'; import type SMTPTransport from 'nodemailer/lib/smtp-transport'; @@ -22,8 +23,8 @@ const versionDescription: INodeTypeDescription = { name: 'Send Email', color: '#00bb88', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'smtp', diff --git a/packages/nodes-base/nodes/EmailSend/v2/EmailSendV2.node.ts b/packages/nodes-base/nodes/EmailSend/v2/EmailSendV2.node.ts index ec162c31b0..5660d5ad39 100644 --- a/packages/nodes-base/nodes/EmailSend/v2/EmailSendV2.node.ts +++ b/packages/nodes-base/nodes/EmailSend/v2/EmailSendV2.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import * as send from './send.operation'; @@ -20,8 +21,8 @@ const versionDescription: INodeTypeDescription = { name: 'Send Email', color: '#00bb88', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'smtp', diff --git a/packages/nodes-base/nodes/Emelia/Emelia.node.ts b/packages/nodes-base/nodes/Emelia/Emelia.node.ts index 0485e53af2..0976d1bee0 100644 --- a/packages/nodes-base/nodes/Emelia/Emelia.node.ts +++ b/packages/nodes-base/nodes/Emelia/Emelia.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; @@ -26,8 +27,8 @@ export class Emelia implements INodeType { defaults: { name: 'Emelia', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'emeliaApi', diff --git a/packages/nodes-base/nodes/Emelia/EmeliaTrigger.node.ts b/packages/nodes-base/nodes/Emelia/EmeliaTrigger.node.ts index 82214f4a3f..77ad724288 100644 --- a/packages/nodes-base/nodes/Emelia/EmeliaTrigger.node.ts +++ b/packages/nodes-base/nodes/Emelia/EmeliaTrigger.node.ts @@ -1,12 +1,13 @@ -import type { - IDataObject, - IHookFunctions, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookFunctions, - IWebhookResponseData, +import { + NodeConnectionType, + type IDataObject, + type IHookFunctions, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, + type IWebhookResponseData, } from 'n8n-workflow'; import { emeliaApiRequest, emeliaApiTest, emeliaGraphqlRequest } from './GenericFunctions'; @@ -29,7 +30,7 @@ export class EmeliaTrigger implements INodeType { name: 'Emelia Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'emeliaApi', diff --git a/packages/nodes-base/nodes/ErrorTrigger/ErrorTrigger.node.ts b/packages/nodes-base/nodes/ErrorTrigger/ErrorTrigger.node.ts index a3f30516cc..1de4226d58 100644 --- a/packages/nodes-base/nodes/ErrorTrigger/ErrorTrigger.node.ts +++ b/packages/nodes-base/nodes/ErrorTrigger/ErrorTrigger.node.ts @@ -4,6 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; export class ErrorTrigger implements INodeType { description: INodeTypeDescription = { @@ -22,7 +23,7 @@ export class ErrorTrigger implements INodeType { color: '#0000FF', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts b/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts index 8cdead1b1b..9f8805ecc2 100644 --- a/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts +++ b/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts @@ -9,7 +9,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { eventbriteApiRequest, eventbriteApiRequestAllItems } from './GenericFunctions'; @@ -27,7 +27,7 @@ export class EventbriteTrigger implements INodeType { name: 'Eventbrite Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'eventbriteApi', diff --git a/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts b/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts index efd858bbae..6aa9d0dfa7 100644 --- a/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts +++ b/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export interface IExecReturnData { exitCode: number; @@ -55,8 +55,8 @@ export class ExecuteCommand implements INodeType { name: 'Execute Command', color: '#886644', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Execute Once', diff --git a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts index 0dfd4b2edf..bd80898878 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts @@ -1,11 +1,10 @@ -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, } from 'n8n-workflow'; - import { generatePairedItemData } from '../../utils/utilities'; import { getWorkflowInfo } from './GenericFunctions'; @@ -23,8 +22,8 @@ export class ExecuteWorkflow implements INodeType { name: 'Execute Workflow', color: '#ff6d5a', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts b/packages/nodes-base/nodes/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts index 9ddde6e5aa..feb33a160d 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.ts @@ -1,4 +1,9 @@ -import type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow'; +import { + NodeConnectionType, + type IExecuteFunctions, + type INodeType, + type INodeTypeDescription, +} from 'n8n-workflow'; export class ExecuteWorkflowTrigger implements INodeType { description: INodeTypeDescription = { @@ -17,7 +22,7 @@ export class ExecuteWorkflowTrigger implements INodeType { }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/ExecutionData/ExecutionData.node.ts b/packages/nodes-base/nodes/ExecutionData/ExecutionData.node.ts index 9bba0a7c70..a9e560419f 100644 --- a/packages/nodes-base/nodes/ExecutionData/ExecutionData.node.ts +++ b/packages/nodes-base/nodes/ExecutionData/ExecutionData.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; export class ExecutionData implements INodeType { description: INodeTypeDescription = { @@ -19,8 +20,8 @@ export class ExecutionData implements INodeType { name: 'Execution Data', color: '#29A568', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts b/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts index 0a4a4eb7f9..98cbabaf84 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts @@ -8,7 +8,7 @@ import type { IRequestOptions, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export class FacebookGraphApi implements INodeType { description: INodeTypeDescription = { @@ -21,8 +21,8 @@ export class FacebookGraphApi implements INodeType { defaults: { name: 'Facebook Graph API', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'facebookGraphApi', diff --git a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts index b337ec1fd8..12d092278a 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts @@ -10,7 +10,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; @@ -33,7 +33,7 @@ export class FacebookTrigger implements INodeType { name: 'Facebook Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'facebookGraphAppApi', diff --git a/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts b/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts index 16eb6eb727..5a1c06f91d 100644 --- a/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts +++ b/packages/nodes-base/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.ts @@ -7,6 +7,7 @@ import { type INodeTypeDescription, type IWebhookFunctions, type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { appWebhookSubscriptionCreate, @@ -31,7 +32,7 @@ export class FacebookLeadAdsTrigger implements INodeType { name: 'Facebook Lead Ads Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'facebookLeadAdsOAuth2Api', diff --git a/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts b/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts index 5e204aa59e..c76998bd11 100644 --- a/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts +++ b/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { figmaApiRequest } from './GenericFunctions'; @@ -24,7 +25,7 @@ export class FigmaTrigger implements INodeType { name: 'Figma Trigger (Beta)', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'figmaApi', diff --git a/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts b/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts index aaaceb1f08..db72869ad0 100644 --- a/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts +++ b/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, IRequestOptions, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { getFields, @@ -37,8 +37,8 @@ export class FileMaker implements INodeType { defaults: { name: 'FileMaker', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'fileMaker', diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts index d43345958e..364bd629f6 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts @@ -4,6 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import * as spreadsheet from './actions/spreadsheet.operation'; import * as toBinary from './actions/toBinary.operation'; @@ -22,8 +23,8 @@ export class ConvertToFile implements INodeType { defaults: { name: 'Convert to File', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts b/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts index cec7211989..66f6ca2c9c 100644 --- a/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts +++ b/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts @@ -4,6 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import * as spreadsheet from './actions/spreadsheet.operation'; import * as moveTo from './actions/moveTo.operation'; @@ -21,8 +22,8 @@ export class ExtractFromFile implements INodeType { defaults: { name: 'Extract from File', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Operation', diff --git a/packages/nodes-base/nodes/Files/ReadWriteFile/ReadWriteFile.node.ts b/packages/nodes-base/nodes/Files/ReadWriteFile/ReadWriteFile.node.ts index 9c4b95d170..2fc47f5a0b 100644 --- a/packages/nodes-base/nodes/Files/ReadWriteFile/ReadWriteFile.node.ts +++ b/packages/nodes-base/nodes/Files/ReadWriteFile/ReadWriteFile.node.ts @@ -4,6 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import * as read from './actions/read.operation'; import * as write from './actions/write.operation'; @@ -19,8 +20,8 @@ export class ReadWriteFile implements INodeType { defaults: { name: 'Read/Write Files from Disk', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/Filter/V1/FilterV1.node.ts b/packages/nodes-base/nodes/Filter/V1/FilterV1.node.ts index 899a04aa5f..b70d5122cc 100644 --- a/packages/nodes-base/nodes/Filter/V1/FilterV1.node.ts +++ b/packages/nodes-base/nodes/Filter/V1/FilterV1.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - INodeExecutionData, - INodeParameters, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, - NodeParameterValue, +import { + NodeConnectionType, + type IExecuteFunctions, + type INodeExecutionData, + type INodeParameters, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, + type NodeParameterValue, } from 'n8n-workflow'; import { compareOperationFunctions, convertDateTime } from './GenericFunctions'; @@ -21,8 +22,8 @@ export class FilterV1 implements INodeType { name: 'Filter', color: '#229eff', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], outputNames: ['Kept', 'Discarded'], properties: [ { diff --git a/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts b/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts index 06df074cd5..384af40824 100644 --- a/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts +++ b/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts @@ -7,6 +7,7 @@ import { type INodeType, type INodeTypeBaseDescription, type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { ENABLE_LESS_STRICT_TYPE_VALIDATION } from '../../../utils/constants'; import { getTypeValidationParameter, getTypeValidationStrictness } from '../../If/V2/utils'; @@ -23,8 +24,8 @@ export class FilterV2 implements INodeType { name: 'Filter', color: '#229eff', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], outputNames: ['Kept', 'Discarded'], parameterPane: 'wide', properties: [ diff --git a/packages/nodes-base/nodes/Flow/Flow.node.ts b/packages/nodes-base/nodes/Flow/Flow.node.ts index b364f15488..06caf25a82 100644 --- a/packages/nodes-base/nodes/Flow/Flow.node.ts +++ b/packages/nodes-base/nodes/Flow/Flow.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } 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'; @@ -23,8 +23,8 @@ export class Flow implements INodeType { defaults: { name: 'Flow', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'flowApi', diff --git a/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts b/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts index ebccfa05e6..fc19041f18 100644 --- a/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts +++ b/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { flowApiRequest } from './GenericFunctions'; @@ -21,7 +22,7 @@ export class FlowTrigger implements INodeType { name: 'Flow Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'flowApi', diff --git a/packages/nodes-base/nodes/Form/utils.ts b/packages/nodes-base/nodes/Form/utils.ts index 35f06496ce..65eac4007a 100644 --- a/packages/nodes-base/nodes/Form/utils.ts +++ b/packages/nodes-base/nodes/Form/utils.ts @@ -6,14 +6,12 @@ import type { } from 'n8n-workflow'; import { NodeOperationError, jsonParse } from 'n8n-workflow'; -import type { FormField, FormTriggerData, FormTriggerInput } from './interfaces'; -import { FORM_TRIGGER_AUTHENTICATION_PROPERTY } from './interfaces'; - -import { WebhookAuthorizationError } from '../Webhook/error'; -import { validateWebhookAuthentication } from '../Webhook/utils'; - import { DateTime } from 'luxon'; import isbot from 'isbot'; +import { WebhookAuthorizationError } from '../Webhook/error'; +import { validateWebhookAuthentication } from '../Webhook/utils'; +import type { FormField, FormTriggerData, FormTriggerInput } from './interfaces'; +import { FORM_TRIGGER_AUTHENTICATION_PROPERTY } from './interfaces'; export function prepareFormData({ formTitle, diff --git a/packages/nodes-base/nodes/Form/v1/FormTriggerV1.node.ts b/packages/nodes-base/nodes/Form/v1/FormTriggerV1.node.ts index 3cfa64e51b..6a0bd83a5e 100644 --- a/packages/nodes-base/nodes/Form/v1/FormTriggerV1.node.ts +++ b/packages/nodes-base/nodes/Form/v1/FormTriggerV1.node.ts @@ -1,6 +1,7 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ import { FORM_TRIGGER_PATH_IDENTIFIER, + NodeConnectionType, type INodeType, type INodeTypeBaseDescription, type INodeTypeDescription, @@ -29,7 +30,7 @@ const descriptionV1: INodeTypeDescription = { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'setup', diff --git a/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts b/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts index 90d1242c93..fc530d0aeb 100644 --- a/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts +++ b/packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts @@ -1,10 +1,11 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - INodeProperties, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, - IWebhookFunctions, +import { + NodeConnectionType, + type INodeProperties, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, + type IWebhookFunctions, } from 'n8n-workflow'; import { formWebhook } from '../utils'; @@ -39,7 +40,7 @@ const descriptionV2: INodeTypeDescription = { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'setup', diff --git a/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts b/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts index 19f86791a5..54006c6eca 100644 --- a/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts +++ b/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts @@ -1,12 +1,13 @@ -import type { - IDataObject, - IHookFunctions, - IWebhookFunctions, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IDataObject, + type IHookFunctions, + type IWebhookFunctions, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { formIoApiRequest } from './GenericFunctions'; @@ -24,7 +25,7 @@ export class FormIoTrigger implements INodeType { name: 'Form.io Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'formIoApi', diff --git a/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts b/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts index 055b259312..b49b5e156f 100644 --- a/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts +++ b/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import type { IFormstackWebhookResponseBody } from './GenericFunctions'; import { apiRequest, getForms } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class FormstackTrigger implements INodeType { name: 'Formstack Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'formstackApi', diff --git a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts index 1f2fbb7ab0..c6bcca022b 100644 --- a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts +++ b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { capitalize, @@ -83,8 +83,8 @@ export class Freshdesk implements INodeType { defaults: { name: 'Freshdesk', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'freshdeskApi', diff --git a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts index 731659de78..9884b12284 100644 --- a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts +++ b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { tz } from 'moment-timezone'; import { @@ -70,8 +71,8 @@ export class Freshservice implements INodeType { defaults: { name: 'Freshservice', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'freshserviceApi', diff --git a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts index 03cd77c550..5d438fe3af 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { tz } from 'moment-timezone'; @@ -51,8 +52,8 @@ export class FreshworksCrm implements INodeType { defaults: { name: 'Freshworks CRM', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'freshworksCrmApi', diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index d8b77f7d35..d81c204fc7 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -5,7 +5,7 @@ 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 } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeApiError, NodeConnectionType } from 'n8n-workflow'; import type { ICredentialDataDecryptedObject, ICredentialsDecrypted, @@ -122,8 +122,8 @@ export class Ftp implements INodeType { name: 'FTP', color: '#303050', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { // nodelinter-ignore-next-line diff --git a/packages/nodes-base/nodes/Function/Function.node.ts b/packages/nodes-base/nodes/Function/Function.node.ts index da1a8c11b5..9a25bc4c94 100644 --- a/packages/nodes-base/nodes/Function/Function.node.ts +++ b/packages/nodes-base/nodes/Function/Function.node.ts @@ -8,7 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { deepCopy, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy, NodeOperationError } from 'n8n-workflow'; import { vmResolver } from '../Code/JavaScriptSandbox'; export class Function implements INodeType { @@ -25,8 +25,8 @@ export class Function implements INodeType { name: 'Function', color: '#FF9922', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'A newer version of this node type is available, called the ‘Code’ node', @@ -78,7 +78,7 @@ return items;`, const cleanupData = (inputData: IDataObject): IDataObject => { Object.keys(inputData).map((key) => { if (inputData[key] !== null && typeof inputData[key] === 'object') { - if (inputData[key]!.constructor.name === 'Object') { + if (inputData[key].constructor.name === 'Object') { // Is regular node.js object so check its data inputData[key] = cleanupData(inputData[key] as IDataObject); } else { diff --git a/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts b/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts index 9969782b4f..ecd747d9d3 100644 --- a/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts +++ b/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts @@ -9,7 +9,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { deepCopy, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy, NodeOperationError } from 'n8n-workflow'; import { vmResolver } from '../Code/JavaScriptSandbox'; export class FunctionItem implements INodeType { @@ -25,8 +25,8 @@ export class FunctionItem implements INodeType { name: 'Function Item', color: '#ddbb33', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'A newer version of this node type is available, called the ‘Code’ node', @@ -71,7 +71,7 @@ return item;`, const cleanupData = (inputData: IDataObject): IDataObject => { Object.keys(inputData).map((key) => { if (inputData[key] !== null && typeof inputData[key] === 'object') { - if (inputData[key]!.constructor.name === 'Object') { + if (inputData[key].constructor.name === 'Object') { // Is regular node.js object so check its data inputData[key] = cleanupData(inputData[key] as IDataObject); } else { diff --git a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts index db6636bd61..2dcc85724f 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { getresponseApiRequest, getResponseApiRequestAllItems } from './GenericFunctions'; @@ -26,8 +27,8 @@ export class GetResponse implements INodeType { defaults: { name: 'GetResponse', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'getResponseApi', diff --git a/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts index 2fa0d5dcf3..cc55747346 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts @@ -9,7 +9,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { getresponseApiRequest, getResponseApiRequestAllItems } from './GenericFunctions'; @@ -26,7 +26,7 @@ export class GetResponseTrigger implements INodeType { name: 'GetResponse Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'getResponseApi', diff --git a/packages/nodes-base/nodes/Ghost/Ghost.node.ts b/packages/nodes-base/nodes/Ghost/Ghost.node.ts index 19509ce6e0..22cc49899b 100644 --- a/packages/nodes-base/nodes/Ghost/Ghost.node.ts +++ b/packages/nodes-base/nodes/Ghost/Ghost.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { ghostApiRequest, ghostApiRequestAllItems, validateJSON } from './GenericFunctions'; @@ -26,8 +26,8 @@ export class Ghost implements INodeType { defaults: { name: 'Ghost', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'ghostAdminApi', diff --git a/packages/nodes-base/nodes/Git/Git.node.ts b/packages/nodes-base/nodes/Git/Git.node.ts index e6dc866f8d..2c602cbe75 100644 --- a/packages/nodes-base/nodes/Git/Git.node.ts +++ b/packages/nodes-base/nodes/Git/Git.node.ts @@ -6,6 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import type { LogOptions, SimpleGit, SimpleGitOptions } from 'simple-git'; import simpleGit from 'simple-git'; @@ -30,8 +31,8 @@ export class Git implements INodeType { defaults: { name: 'Git', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gitPassword', diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts index 964c08756b..5a7fea6800 100644 --- a/packages/nodes-base/nodes/Github/Github.node.ts +++ b/packages/nodes-base/nodes/Github/Github.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { @@ -30,8 +30,8 @@ export class Github implements INodeType { defaults: { name: 'GitHub', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'githubApi', diff --git a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts index 25caab4970..0fb142042d 100644 --- a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts +++ b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts @@ -7,7 +7,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import { githubApiRequest } from './GenericFunctions'; import { getRepositories, getUsers } from './SearchFunctions'; @@ -26,7 +26,7 @@ export class GithubTrigger implements INodeType { name: 'Github Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'githubApi', diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index cdf391abf6..a7e7502a4f 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { gitlabApiRequest, gitlabApiRequestAllItems } from './GenericFunctions'; @@ -22,8 +22,8 @@ export class Gitlab implements INodeType { defaults: { name: 'GitLab', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gitlabApi', diff --git a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts index 12febc14e5..f6a7481883 100644 --- a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts +++ b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts @@ -7,7 +7,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { gitlabApiRequest } from './GenericFunctions'; @@ -91,7 +91,7 @@ export class GitlabTrigger implements INodeType { name: 'GitLab Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gitlabApi', diff --git a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts index c76785e4c2..783801dfc7 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; import omit from 'lodash/omit'; @@ -50,8 +50,8 @@ export class GoToWebinar implements INodeType { defaults: { name: 'GoToWebinar', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'goToWebinarOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Ads/GoogleAds.node.ts b/packages/nodes-base/nodes/Google/Ads/GoogleAds.node.ts index 7864eb762d..06e678e656 100644 --- a/packages/nodes-base/nodes/Google/Ads/GoogleAds.node.ts +++ b/packages/nodes-base/nodes/Google/Ads/GoogleAds.node.ts @@ -1,4 +1,4 @@ -import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeType, type INodeTypeDescription } from 'n8n-workflow'; import { campaignFields, campaignOperations } from './CampaignDescription'; @@ -14,8 +14,8 @@ export class GoogleAds implements INodeType { defaults: { name: 'Google Ads', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleAdsOAuth2Api', 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 76a71e4163..906768e5a0 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts @@ -1,14 +1,15 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, - IHttpRequestMethods, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, + type IHttpRequestMethods, + NodeConnectionType, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -30,8 +31,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Google Analytics', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleAnalyticsOAuth2', 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 13191b0007..773eee9afb 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as userActivity from './userActivity/UserActivity.resource'; import * as report from './report/Report.resource'; @@ -14,8 +14,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Google Analytics', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleAnalyticsOAuth2', 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 584c409663..04ef19fd16 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/v1/GoogleBigQueryV1.node.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/v1/GoogleBigQueryV1.node.ts @@ -10,8 +10,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; - -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; import { generatePairedItemData } from '../../../../utils/utilities'; @@ -32,8 +31,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Google BigQuery', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', 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 0e232d38f6..202c26d88c 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,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as database from './database/Database.resource'; export const versionDescription: INodeTypeDescription = { @@ -13,8 +13,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Google BigQuery', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts b/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts index 02096b4604..53cc9338dd 100644 --- a/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts +++ b/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; @@ -25,8 +26,8 @@ export class GoogleBooks implements INodeType { defaults: { name: 'Google Books', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts index 5231bc713f..fe7b191289 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { v4 as uuid } from 'uuid'; @@ -40,8 +40,8 @@ export class GoogleCalendar implements INodeType { defaults: { name: 'Google Calendar', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleCalendarOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts index 3a37632bc1..30c890487a 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendarTrigger.node.ts @@ -5,7 +5,7 @@ import type { INodeTypeDescription, IPollFunctions, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -29,7 +29,7 @@ export class GoogleCalendarTrigger implements INodeType { name: 'Google Calendar Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleCalendarOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts index e58d681403..438608877e 100644 --- a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts +++ b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts @@ -11,7 +11,7 @@ import type { INodeTypeDescription, IRequestOptions, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import jwt from 'jsonwebtoken'; @@ -46,8 +46,8 @@ export class GoogleChat implements INodeType { defaults: { name: 'Google Chat', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts index b482b41c0f..25c7ad6266 100644 --- a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts +++ b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts @@ -1,8 +1,9 @@ -import type { - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import type { IData } from './Interface'; @@ -22,8 +23,8 @@ export class GoogleCloudNaturalLanguage implements INodeType { defaults: { name: 'Google Cloud Natural Language', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleCloudNaturalLanguageOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts b/packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts index 6997af5c81..7613cb3b57 100644 --- a/packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts +++ b/packages/nodes-base/nodes/Google/CloudStorage/GoogleCloudStorage.node.ts @@ -1,4 +1,4 @@ -import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeType, type INodeTypeDescription } from 'n8n-workflow'; import { bucketFields, bucketOperations } from './BucketDescription'; import { objectFields, objectOperations } from './ObjectDescription'; @@ -15,8 +15,8 @@ export class GoogleCloudStorage implements INodeType { defaults: { name: 'Google Cloud Storage', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleCloudStorageOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts b/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts index c85bde865a..240a0e3255 100644 --- a/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts +++ b/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { @@ -31,8 +32,8 @@ export class GoogleContacts implements INodeType { defaults: { name: 'Google Contacts', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleContactsOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts b/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts index fe82cfe437..2c76c41b66 100644 --- a/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts +++ b/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { extractID, @@ -34,8 +34,8 @@ export class GoogleDocs implements INodeType { defaults: { name: 'Google Docs', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts b/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts index 34226fae85..4acdf0996d 100644 --- a/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/GoogleDriveTrigger.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeApiError } 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'; @@ -48,7 +48,7 @@ export class GoogleDriveTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Credential Type', 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 36e4c4b541..b7798ebabf 100644 --- a/packages/nodes-base/nodes/Google/Drive/v1/GoogleDriveV1.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/v1/GoogleDriveV1.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { BINARY_ENCODING } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../constants'; @@ -32,8 +32,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Google Drive', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Drive/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Google/Drive/v2/actions/versionDescription.ts index 7659ddf551..07d229714a 100644 --- a/packages/nodes-base/nodes/Google/Drive/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Drive/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as drive from './drive/Drive.resource'; import * as file from './file/File.resource'; @@ -17,8 +17,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Google Drive', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', 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 cb88bd94c5..c6e8f755e0 100644 --- a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts +++ b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { jsonParse } from 'n8n-workflow'; +import { NodeConnectionType, jsonParse } from 'n8n-workflow'; import { generatePairedItemData } from '../../../../utils/utilities'; import { @@ -34,8 +34,8 @@ export class GoogleFirebaseCloudFirestore implements INodeType { defaults: { name: 'Google Cloud Firestore', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleFirebaseCloudFirestoreOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts index fb19c1d4d8..16f7b1a4ba 100644 --- a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts @@ -19,9 +19,7 @@ export async function googleApiRequest( headers: IDataObject = {}, uri: string | null = null, ): Promise { - const { region } = (await this.getCredentials( - 'googleFirebaseRealtimeDatabaseOAuth2Api', - )) as IDataObject; + const { region } = await this.getCredentials('googleFirebaseRealtimeDatabaseOAuth2Api'); const options: IRequestOptions = { headers: { diff --git a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts index 29c0b3d350..abce9c22d8 100644 --- a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts +++ b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts @@ -9,7 +9,7 @@ import type { JsonObject, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; @@ -25,8 +25,8 @@ export class GoogleFirebaseRealtimeDatabase implements INodeType { defaults: { name: 'Google Cloud Realtime Database', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleFirebaseRealtimeDatabaseOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts b/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts index 72142e6afc..a6a69e8fe6 100644 --- a/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts +++ b/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; @@ -28,8 +28,8 @@ export class GSuiteAdmin implements INodeType { defaults: { name: 'Google Workspace Admin', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gSuiteAdminOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts b/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts index fea6580a86..a1aa6eb8cb 100644 --- a/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { DateTime } from 'luxon'; import { @@ -52,7 +53,7 @@ export class GmailTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Authentication', 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 f5f5b81734..1d06d5b87c 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts @@ -1,15 +1,16 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IBinaryKeyData, - IDataObject, - IExecuteFunctions, - IHttpRequestMethods, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, +import { + NodeConnectionType, + type IBinaryKeyData, + type IDataObject, + type IExecuteFunctions, + type IHttpRequestMethods, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; @@ -43,8 +44,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Gmail', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', 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 48d4023305..e546afb0d6 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IEmail } from '../GenericFunctions'; import { @@ -45,8 +45,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Gmail', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts b/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts index b11d7c6467..302d3b9c43 100644 --- a/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts +++ b/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts @@ -7,7 +7,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import ISO6391 from 'iso-639-1'; import type { @@ -31,8 +31,8 @@ export class GooglePerspective implements INodeType { defaults: { name: 'Google Perspective', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googlePerspectiveOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts index dc59e15df2..40b35417b4 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheetsTrigger.node.ts @@ -5,7 +5,7 @@ import type { INodeTypeDescription, IPollFunctions, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { GOOGLE_DRIVE_FILE_URL_REGEX } from '../constants'; import { apiRequest } from './v2/transport'; @@ -35,7 +35,7 @@ export class GoogleSheetsTrigger implements INodeType { name: 'Google Sheets Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleSheetsTriggerOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts index 809420a59a..5781c51b8f 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts @@ -586,7 +586,7 @@ export class GoogleSheet { item[key] !== undefined ) { //match by exact key name - rowData.push(item[key]!.toString()); + rowData.push(item[key].toString()); } else { rowData.push(''); } 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 265093172f..68b6c6e3df 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts @@ -226,7 +226,7 @@ export class GoogleSheetsV1 implements INodeType { for (const propertyName of Object.keys(deletePropertyToDimensions)) { if (toDelete[propertyName] !== undefined) { - toDelete[propertyName]!.forEach((entry) => { + toDelete[propertyName].forEach((entry) => { requests.push({ deleteDimension: { range: { diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts b/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts index fb3f0090bc..769c5512fb 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import { oldVersionNotice } from '@utils/descriptions'; @@ -14,8 +14,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Google Sheets', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts index ebaa2e40ba..e41a8b9a24 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as sheet from './sheet/Sheet.resource'; import * as spreadsheet from './spreadsheet/SpreadSheet.resource'; @@ -15,8 +15,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Google Sheets', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], hints: [ { message: diff --git a/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts b/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts index f281c34aa7..4e256fd54b 100644 --- a/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts +++ b/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { googleApiRequest } from './GenericFunctions'; @@ -22,8 +23,8 @@ export class GoogleSlides implements INodeType { defaults: { name: 'Google Slides', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts index d0d9dd851f..f9b55c710d 100644 --- a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts +++ b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; @@ -25,8 +26,8 @@ export class GoogleTasks implements INodeType { defaults: { name: 'Google Tasks', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleTasksOAuth2Api', diff --git a/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts b/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts index cee1333ee8..98034a2abc 100644 --- a/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts +++ b/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { googleApiRequest } from './GenericFunctions'; @@ -28,8 +29,8 @@ export class GoogleTranslate implements INodeType { defaults: { name: 'Google Translate', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', diff --git a/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts b/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts index b51e830b4f..810e867d85 100644 --- a/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts +++ b/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts @@ -8,7 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions'; @@ -39,8 +39,8 @@ export class YouTube implements INodeType { defaults: { name: 'YouTube', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'youTubeOAuth2Api', diff --git a/packages/nodes-base/nodes/Gotify/Gotify.node.ts b/packages/nodes-base/nodes/Gotify/Gotify.node.ts index cd088ff3e0..a701007f1c 100644 --- a/packages/nodes-base/nodes/Gotify/Gotify.node.ts +++ b/packages/nodes-base/nodes/Gotify/Gotify.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { gotifyApiRequest, gotifyApiRequestAllItems } from './GenericFunctions'; @@ -21,8 +22,8 @@ export class Gotify implements INodeType { defaults: { name: 'Gotify', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gotifyApi', diff --git a/packages/nodes-base/nodes/Grafana/Grafana.node.ts b/packages/nodes-base/nodes/Grafana/Grafana.node.ts index e89ee4eb52..31aa8cce93 100644 --- a/packages/nodes-base/nodes/Grafana/Grafana.node.ts +++ b/packages/nodes-base/nodes/Grafana/Grafana.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { deriveUid, grafanaApiRequest, throwOnEmptyUpdate } from './GenericFunctions'; @@ -43,8 +43,8 @@ export class Grafana implements INodeType { defaults: { name: 'Grafana', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'grafanaApi', diff --git a/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts b/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts index 58c9132769..303fd7ac91 100644 --- a/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts +++ b/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts @@ -10,7 +10,7 @@ import type { IRequestOptions, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError, jsonParse } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError, jsonParse } from 'n8n-workflow'; export class GraphQL implements INodeType { description: INodeTypeDescription = { @@ -24,8 +24,8 @@ export class GraphQL implements INodeType { defaults: { name: 'GraphQL', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'httpBasicAuth', diff --git a/packages/nodes-base/nodes/Grist/Grist.node.ts b/packages/nodes-base/nodes/Grist/Grist.node.ts index c957b17a6f..93ae44b3af 100644 --- a/packages/nodes-base/nodes/Grist/Grist.node.ts +++ b/packages/nodes-base/nodes/Grist/Grist.node.ts @@ -1,14 +1,15 @@ -import type { - IExecuteFunctions, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeCredentialTestResult, - INodeExecutionData, - INodeType, - INodeTypeDescription, - IRequestOptions, +import { + type IExecuteFunctions, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + type IRequestOptions, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -44,8 +45,8 @@ export class Grist implements INodeType { defaults: { name: 'Grist', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gristApi', diff --git a/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts b/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts index c8394cf93a..eae2f52b9b 100644 --- a/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts +++ b/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { gumroadApiRequest } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class GumroadTrigger implements INodeType { name: 'Gumroad Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'gumroadApi', diff --git a/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts b/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts index 972eb65b17..38ba264685 100644 --- a/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts +++ b/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { hackerNewsApiRequest, hackerNewsApiRequestAllItems } from './GenericFunctions'; @@ -22,8 +22,8 @@ export class HackerNews implements INodeType { defaults: { name: 'Hacker News', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ // ---------------------------------- // Resources diff --git a/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts b/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts index bcbb54d40a..38dafba1a9 100644 --- a/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts +++ b/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts @@ -1,16 +1,17 @@ -import type { - IExecuteFunctions, - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeCredentialTestResult, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - JsonObject, +import { + type IExecuteFunctions, + type ICredentialDataDecryptedObject, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type JsonObject, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -46,8 +47,8 @@ export class HaloPSA implements INodeType { defaults: { name: 'HaloPSA', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'haloPSAApi', diff --git a/packages/nodes-base/nodes/Harvest/Harvest.node.ts b/packages/nodes-base/nodes/Harvest/Harvest.node.ts index 55e0c03f08..b093f5e32e 100644 --- a/packages/nodes-base/nodes/Harvest/Harvest.node.ts +++ b/packages/nodes-base/nodes/Harvest/Harvest.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { clientFields, clientOperations } from './ClientDescription'; @@ -45,8 +45,8 @@ export class Harvest implements INodeType { defaults: { name: 'Harvest', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'harvestApi', diff --git a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts index ef5bed5e12..5498839c4d 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts @@ -8,9 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; - -import { isoCountryCodes } from '@utils/ISOCountryCodes'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { conversationFields, conversationOperations } from './ConversationDescription'; @@ -27,6 +25,7 @@ import { mailboxFields, mailboxOperations } from './MailboxDescription'; import { threadFields, threadOperations } from './ThreadDescription'; import type { IAttachment, IThread } from './ThreadInterface'; +import { isoCountryCodes } from '@utils/ISOCountryCodes'; export class HelpScout implements INodeType { description: INodeTypeDescription = { @@ -40,8 +39,8 @@ export class HelpScout implements INodeType { defaults: { name: 'HelpScout', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'helpScoutOAuth2Api', diff --git a/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts b/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts index e64ca604af..4f56e47f09 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts @@ -7,7 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { randomString } from 'n8n-workflow'; +import { NodeConnectionType, randomString } from 'n8n-workflow'; import { helpscoutApiRequest, helpscoutApiRequestAllItems } from './GenericFunctions'; @@ -23,7 +23,7 @@ export class HelpScoutTrigger implements INodeType { name: 'HelpScout Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'helpScoutOAuth2Api', diff --git a/packages/nodes-base/nodes/HighLevel/v1/HighLevelV1.node.ts b/packages/nodes-base/nodes/HighLevel/v1/HighLevelV1.node.ts index 2fb5bc2520..88243e10ff 100644 --- a/packages/nodes-base/nodes/HighLevel/v1/HighLevelV1.node.ts +++ b/packages/nodes-base/nodes/HighLevel/v1/HighLevelV1.node.ts @@ -5,6 +5,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { contactFields, contactNotes, contactOperations } from './description/ContactDescription'; import { opportunityFields, opportunityOperations } from './description/OpportunityDescription'; @@ -52,8 +53,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'HighLevel', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'highLevelApi', diff --git a/packages/nodes-base/nodes/HighLevel/v2/HighLevelV2.node.ts b/packages/nodes-base/nodes/HighLevel/v2/HighLevelV2.node.ts index 8b22237076..6c6b2cabf5 100644 --- a/packages/nodes-base/nodes/HighLevel/v2/HighLevelV2.node.ts +++ b/packages/nodes-base/nodes/HighLevel/v2/HighLevelV2.node.ts @@ -5,6 +5,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { contactFields, contactNotes, contactOperations } from './description/ContactDescription'; import { opportunityFields, opportunityOperations } from './description/OpportunityDescription'; @@ -54,8 +55,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'HighLevel', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'highLevelOAuth2Api', diff --git a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts index 923f14713c..9d9aa0a435 100644 --- a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts +++ b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts @@ -1,14 +1,15 @@ -import type { - IExecuteFunctions, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeCredentialTestResult, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { configOperations } from './ConfigDescription'; @@ -45,8 +46,8 @@ export class HomeAssistant implements INodeType { defaults: { name: 'Home Assistant', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'homeAssistantApi', diff --git a/packages/nodes-base/nodes/Html/Html.node.ts b/packages/nodes-base/nodes/Html/Html.node.ts index 42dcd96d9b..6c53d3e14e 100644 --- a/packages/nodes-base/nodes/Html/Html.node.ts +++ b/packages/nodes-base/nodes/Html/Html.node.ts @@ -7,7 +7,7 @@ import type { IDataObject, INodeProperties, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import get from 'lodash/get'; import { placeholder } from './placeholder'; import { getValue } from './utils'; @@ -133,8 +133,8 @@ export class Html implements INodeType { defaults: { name: 'HTML', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', properties: [ { diff --git a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts index d76b660dd0..caa29b3f4e 100644 --- a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts +++ b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import get from 'lodash/get'; @@ -57,8 +57,8 @@ export class HtmlExtract implements INodeType { name: 'HTML Extract', color: '#333377', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Source Data', diff --git a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts index 2a34b4f645..740489f23c 100644 --- a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts @@ -11,7 +11,13 @@ import type { IHttpRequestMethods, IRequestOptions, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError, sleep, removeCircularRefs } from 'n8n-workflow'; +import { + NodeApiError, + NodeOperationError, + sleep, + removeCircularRefs, + NodeConnectionType, +} from 'n8n-workflow'; import type { IAuthDataSanitizeKeys } from '../GenericFunctions'; import { replaceNullValues, sanitizeUiMessage } from '../GenericFunctions'; @@ -37,8 +43,8 @@ export class HttpRequestV1 implements INodeType { name: 'HTTP Request', color: '#2200DD', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ // ---------------------------------- // v1 creds diff --git a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts index 76b1e2a0d8..1b08aeb096 100644 --- a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts @@ -11,7 +11,13 @@ import type { IRequestOptions, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError, sleep, removeCircularRefs } from 'n8n-workflow'; +import { + NodeApiError, + NodeOperationError, + sleep, + removeCircularRefs, + NodeConnectionType, +} from 'n8n-workflow'; import type { IAuthDataSanitizeKeys } from '../GenericFunctions'; import { @@ -41,8 +47,8 @@ export class HttpRequestV2 implements INodeType { color: '#2200DD', }, version: 2, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'httpBasicAuth', diff --git a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts index 4c832eeb71..155cd4be52 100644 --- a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts @@ -18,6 +18,7 @@ import type { import { BINARY_ENCODING, NodeApiError, + NodeConnectionType, NodeOperationError, jsonParse, removeCircularRefs, @@ -36,8 +37,8 @@ import { sanitizeUiMessage, setAgentOptions, } from '../GenericFunctions'; -import type { HttpSslAuthCredentials } from '../interfaces'; import { keysToLowercase } from '@utils/utilities'; +import { type HttpSslAuthCredentials } from '../interfaces'; function toText(data: T) { if (typeof data === 'object' && data !== null) { @@ -57,8 +58,8 @@ export class HttpRequestV3 implements INodeType { name: 'HTTP Request', color: '#0004F5', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'httpSslAuth', diff --git a/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts b/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts index aed2bc704d..8c69117e25 100644 --- a/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts +++ b/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { hubspotApiRequest, propertyEvents } from './V1/GenericFunctions'; @@ -25,7 +25,7 @@ export class HubspotTrigger implements INodeType { name: 'HubSpot Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'hubspotDeveloperApi', diff --git a/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts b/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts index d8ab8f039e..098bf45667 100644 --- a/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts +++ b/packages/nodes-base/nodes/Hubspot/V1/HubspotV1.node.ts @@ -13,7 +13,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { @@ -58,8 +58,8 @@ export class HubspotV1 implements INodeType { defaults: { name: 'HubSpot', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'hubspotApi', diff --git a/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts b/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts index e15170bb94..ddc35f500e 100644 --- a/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts +++ b/packages/nodes-base/nodes/Hubspot/V2/HubspotV2.node.ts @@ -15,7 +15,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import set from 'lodash/set'; @@ -60,8 +60,8 @@ export class HubspotV2 implements INodeType { defaults: { name: 'HubSpot', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'hubspotApi', diff --git a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts index 41fc6b1260..fcbd86ef09 100644 --- a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts +++ b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { humanticAiApiRequest } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class HumanticAi implements INodeType { defaults: { name: 'Humantic AI', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'humanticAiApi', diff --git a/packages/nodes-base/nodes/Hunter/Hunter.node.ts b/packages/nodes-base/nodes/Hunter/Hunter.node.ts index 35e730837f..199abd6679 100644 --- a/packages/nodes-base/nodes/Hunter/Hunter.node.ts +++ b/packages/nodes-base/nodes/Hunter/Hunter.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { hunterApiRequest, hunterApiRequestAllItems } from './GenericFunctions'; export class Hunter implements INodeType { @@ -20,8 +21,8 @@ export class Hunter implements INodeType { defaults: { name: 'Hunter', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'hunterApi', diff --git a/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts b/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts index f24a3644d7..b11706bb7a 100644 --- a/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts +++ b/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import * as createEvent from './createEvent.operation'; @@ -22,8 +23,8 @@ export class ICalendar implements INodeType { name: 'iCalendar', color: '#408000', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [], properties: [ { diff --git a/packages/nodes-base/nodes/If/V1/IfV1.node.ts b/packages/nodes-base/nodes/If/V1/IfV1.node.ts index b256a8a5cd..e7fa6b339a 100644 --- a/packages/nodes-base/nodes/If/V1/IfV1.node.ts +++ b/packages/nodes-base/nodes/If/V1/IfV1.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, NodeParameterValue, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export class IfV1 implements INodeType { description: INodeTypeDescription; @@ -21,9 +21,9 @@ export class IfV1 implements INodeType { name: 'If', color: '#408000', }, - inputs: ['main'], + inputs: [NodeConnectionType.Main], - outputs: ['main', 'main'], + outputs: [NodeConnectionType.Main, NodeConnectionType.Main], outputNames: ['true', 'false'], properties: [ { diff --git a/packages/nodes-base/nodes/If/V2/IfV2.node.ts b/packages/nodes-base/nodes/If/V2/IfV2.node.ts index 691fc2e0b9..1fdb6fa7d0 100644 --- a/packages/nodes-base/nodes/If/V2/IfV2.node.ts +++ b/packages/nodes-base/nodes/If/V2/IfV2.node.ts @@ -7,6 +7,7 @@ import { type INodeType, type INodeTypeBaseDescription, type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { ENABLE_LESS_STRICT_TYPE_VALIDATION } from '../../../utils/constants'; import { looseTypeValidationProperty } from '../../../utils/descriptions'; @@ -23,8 +24,8 @@ export class IfV2 implements INodeType { name: 'If', color: '#408000', }, - inputs: ['main'], - outputs: ['main', 'main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main, NodeConnectionType.Main], outputNames: ['true', 'false'], parameterPane: 'wide', properties: [ diff --git a/packages/nodes-base/nodes/Intercom/Intercom.node.ts b/packages/nodes-base/nodes/Intercom/Intercom.node.ts index 8c8dec79bd..6c9a5ef425 100644 --- a/packages/nodes-base/nodes/Intercom/Intercom.node.ts +++ b/packages/nodes-base/nodes/Intercom/Intercom.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import { leadFields, leadOperations } from './LeadDescription'; import { intercomApiRequest, intercomApiRequestAllItems, validateJSON } from './GenericFunctions'; import type { IAvatar, ILead, ILeadCompany } from './LeadInterface'; @@ -30,8 +30,8 @@ export class Intercom implements INodeType { defaults: { name: 'Intercom', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'intercomApi', diff --git a/packages/nodes-base/nodes/Interval/Interval.node.ts b/packages/nodes-base/nodes/Interval/Interval.node.ts index b4a2f088c8..be97325277 100644 --- a/packages/nodes-base/nodes/Interval/Interval.node.ts +++ b/packages/nodes-base/nodes/Interval/Interval.node.ts @@ -4,7 +4,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export class Interval implements INodeType { description: INodeTypeDescription = { @@ -24,7 +24,7 @@ export class Interval implements INodeType { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts index bc0459748a..917e4ec573 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { invoiceNinjaApiRequest, invoiceNinjaApiRequestAllItems } from './GenericFunctions'; @@ -16,8 +17,6 @@ import { invoiceFields, invoiceOperations } from './InvoiceDescription'; import type { IClient, IContact } from './ClientInterface'; -import { isoCountryCodes } from '@utils/ISOCountryCodes'; - import type { IInvoice, IItem } from './invoiceInterface'; import { taskFields, taskOperations } from './TaskDescription'; @@ -35,6 +34,7 @@ import type { IExpense } from './ExpenseInterface'; import { quoteFields, quoteOperations } from './QuoteDescription'; import type { IQuote } from './QuoteInterface'; +import { isoCountryCodes } from '@utils/ISOCountryCodes'; export class InvoiceNinja implements INodeType { description: INodeTypeDescription = { @@ -48,8 +48,8 @@ export class InvoiceNinja implements INodeType { defaults: { name: 'Invoice Ninja', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'invoiceNinjaApi', diff --git a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts index 022973b724..54608d66d1 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -24,7 +25,7 @@ export class InvoiceNinjaTrigger implements INodeType { name: 'Invoice Ninja Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'invoiceNinjaApi', diff --git a/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts b/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts index 30a1eb6ce9..e5319eb6e2 100644 --- a/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts +++ b/packages/nodes-base/nodes/ItemLists/V1/ItemListsV1.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; @@ -30,8 +30,8 @@ export class ItemListsV1 implements INodeType { defaults: { name: 'Item Lists', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [], properties: [ { diff --git a/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts b/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts index 0bca88500c..5447f9e95d 100644 --- a/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts +++ b/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts @@ -7,7 +7,7 @@ import type { INodeTypeDescription, IPairedItemData, } from 'n8n-workflow'; -import { NodeOperationError, deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError, deepCopy } from 'n8n-workflow'; import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; @@ -31,8 +31,8 @@ export class ItemListsV2 implements INodeType { defaults: { name: 'Item Lists', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [], properties: [ { 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 13d5bd8918..544192fd99 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 @@ -172,7 +172,7 @@ export async function execute( if (splited[elementIndex].binary === undefined) { splited[elementIndex].binary = {}; } - splited[elementIndex].binary![Object.keys(element)[0]] = Object.values( + splited[elementIndex].binary[Object.keys(element)[0]] = Object.values( element, )[0] as IBinaryData; diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/versionDescription.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/versionDescription.ts index 8c992a308e..692869406c 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as itemList from './itemList'; @@ -14,8 +14,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Item Lists', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [], properties: [ { diff --git a/packages/nodes-base/nodes/Iterable/Iterable.node.ts b/packages/nodes-base/nodes/Iterable/Iterable.node.ts index ddc10590ba..2159705475 100644 --- a/packages/nodes-base/nodes/Iterable/Iterable.node.ts +++ b/packages/nodes-base/nodes/Iterable/Iterable.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { iterableApiRequest } from './GenericFunctions'; @@ -32,8 +32,8 @@ export class Iterable implements INodeType { defaults: { name: 'Iterable', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'iterableApi', diff --git a/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts b/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts index 3d06e85292..e8e5327918 100644 --- a/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts +++ b/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts @@ -11,7 +11,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { jenkinsApiRequest, tolerateTrailingSlash } from './GenericFunctions'; @@ -33,8 +33,8 @@ export class Jenkins implements INodeType { defaults: { name: 'Jenkins', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'jenkinsApi', diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index ba4b766d1e..8911daeb58 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -2,7 +2,6 @@ import type { Readable } from 'stream'; import mergeWith from 'lodash/mergeWith'; import type { - IBinaryKeyData, IDataObject, IExecuteFunctions, ILoadOptionsFunctions, @@ -13,7 +12,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { filterSortSearchListItems, @@ -52,8 +51,8 @@ export class Jira implements INodeType { defaults: { name: 'Jira Software', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'jiraSoftwareCloudApi', @@ -1105,12 +1104,11 @@ export class Jira implements INodeType { { json: false, encoding: null, useStream: true }, ); - (returnData[index].binary as IBinaryKeyData)[binaryPropertyName] = - await this.helpers.prepareBinaryData( - buffer as Buffer, - attachment.json.filename as string, - attachment.json.mimeType as string, - ); + returnData[index].binary[binaryPropertyName] = await this.helpers.prepareBinaryData( + buffer as Buffer, + attachment.json.filename as string, + attachment.json.mimeType as string, + ); } } } @@ -1155,12 +1153,11 @@ export class Jira implements INodeType { attachment.json.content as string, { json: false, encoding: null, useStream: true }, ); - (returnData[index].binary as IBinaryKeyData)[binaryPropertyName] = - await this.helpers.prepareBinaryData( - buffer as Buffer, - attachment.json.filename as string, - attachment.json.mimeType as string, - ); + returnData[index].binary[binaryPropertyName] = await this.helpers.prepareBinaryData( + buffer as Buffer, + attachment.json.filename as string, + attachment.json.mimeType as string, + ); } } } diff --git a/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts b/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts index 36a69994e5..aa39a0da82 100644 --- a/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts +++ b/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts @@ -7,7 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { allEvents, eventExists, getId, jiraSoftwareCloudApiRequest } from './GenericFunctions'; @@ -23,7 +23,7 @@ export class JiraTrigger implements INodeType { name: 'Jira Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { displayName: 'Credentials to Connect to Jira', diff --git a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts index 0caf61d518..87f34cb596 100644 --- a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts +++ b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts @@ -9,7 +9,7 @@ import type { IWebhookResponseData, MultiPartFormData, } from 'n8n-workflow'; -import { jsonParse } from 'n8n-workflow'; +import { NodeConnectionType, jsonParse } from 'n8n-workflow'; import { jotformApiRequest } from './GenericFunctions'; @@ -31,7 +31,7 @@ export class JotFormTrigger implements INodeType { name: 'JotForm Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'jotFormApi', diff --git a/packages/nodes-base/nodes/Jwt/Jwt.node.ts b/packages/nodes-base/nodes/Jwt/Jwt.node.ts index fa39645180..8d5f99fd2a 100644 --- a/packages/nodes-base/nodes/Jwt/Jwt.node.ts +++ b/packages/nodes-base/nodes/Jwt/Jwt.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import jwt from 'jsonwebtoken'; @@ -53,8 +53,8 @@ export class Jwt implements INodeType { defaults: { name: 'JWT', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { // eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed diff --git a/packages/nodes-base/nodes/Kafka/Kafka.node.ts b/packages/nodes-base/nodes/Kafka/Kafka.node.ts index 8bbcf218d0..8a0ef66b7f 100644 --- a/packages/nodes-base/nodes/Kafka/Kafka.node.ts +++ b/packages/nodes-base/nodes/Kafka/Kafka.node.ts @@ -14,7 +14,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { ApplicationError, NodeOperationError } from 'n8n-workflow'; +import { ApplicationError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { generatePairedItemData } from '../../utils/utilities'; export class Kafka implements INodeType { @@ -28,8 +28,8 @@ export class Kafka implements INodeType { defaults: { name: 'Kafka', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'kafka', diff --git a/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts b/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts index ccd4ff600d..a088c27b19 100644 --- a/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts +++ b/packages/nodes-base/nodes/Kafka/KafkaTrigger.node.ts @@ -11,7 +11,7 @@ import type { ITriggerResponse, IRun, } from 'n8n-workflow'; -import { createDeferredPromise, NodeOperationError } from 'n8n-workflow'; +import { createDeferredPromise, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export class KafkaTrigger implements INodeType { description: INodeTypeDescription = { @@ -25,7 +25,7 @@ export class KafkaTrigger implements INodeType { name: 'Kafka Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'kafka', diff --git a/packages/nodes-base/nodes/Keap/Keap.node.ts b/packages/nodes-base/nodes/Keap/Keap.node.ts index 8c358f5fc6..43a766ab3a 100644 --- a/packages/nodes-base/nodes/Keap/Keap.node.ts +++ b/packages/nodes-base/nodes/Keap/Keap.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { capitalCase, pascalCase } from 'change-case'; import moment from 'moment-timezone'; @@ -62,8 +63,8 @@ export class Keap implements INodeType { defaults: { name: 'Keap', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'keapOAuth2Api', diff --git a/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts b/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts index 9fd1f6fd7f..0534b3e808 100644 --- a/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts +++ b/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { capitalCase } from 'change-case'; import { keapApiRequest } from './GenericFunctions'; @@ -26,7 +27,7 @@ export class KeapTrigger implements INodeType { name: 'Keap Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'keapOAuth2Api', diff --git a/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts b/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts index c29dbfd9e9..946db3742a 100644 --- a/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts +++ b/packages/nodes-base/nodes/Kitemaker/Kitemaker.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { organizationOperations, @@ -48,8 +48,8 @@ export class Kitemaker implements INodeType { defaults: { name: 'Kitemaker', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'kitemakerApi', diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index 2fd41b86d0..2bb60b2b75 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -6,6 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { downloadAttachments, @@ -36,8 +37,8 @@ export class KoBoToolbox implements INodeType { defaults: { name: 'KoBoToolbox', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'koBoToolboxApi', diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts index 6da071ff27..0fbf37178a 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolboxTrigger.node.ts @@ -1,10 +1,11 @@ -import type { - IDataObject, - IHookFunctions, - INodeType, - INodeTypeDescription, - IWebhookFunctions, - IWebhookResponseData, +import { + NodeConnectionType, + type IDataObject, + type IHookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, + type IWebhookResponseData, } from 'n8n-workflow'; import { @@ -29,7 +30,7 @@ export class KoBoToolboxTrigger implements INodeType { name: 'KoBoToolbox Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'koBoToolboxApi', diff --git a/packages/nodes-base/nodes/Ldap/Ldap.node.ts b/packages/nodes-base/nodes/Ldap/Ldap.node.ts index 3e1a9c5d79..575cf8e06f 100644 --- a/packages/nodes-base/nodes/Ldap/Ldap.node.ts +++ b/packages/nodes-base/nodes/Ldap/Ldap.node.ts @@ -10,7 +10,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { Attribute, Change } from 'ldapts'; import { ldapFields } from './LdapDescription'; @@ -28,8 +28,8 @@ export class Ldap implements INodeType { defaults: { name: 'LDAP', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { // eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed diff --git a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts index 49dd8e7136..63c21d7c88 100644 --- a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts +++ b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; @@ -36,8 +37,8 @@ export class Lemlist implements INodeType { defaults: { name: 'Lemlist', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'lemlistApi', diff --git a/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts b/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts index bd1a20cf8f..2a4e53006b 100644 --- a/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts +++ b/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { getEvents, lemlistApiRequest } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class LemlistTrigger implements INodeType { name: 'Lemlist Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'lemlistApi', diff --git a/packages/nodes-base/nodes/Line/Line.node.ts b/packages/nodes-base/nodes/Line/Line.node.ts index 4756fd0d4b..7cdc4b03de 100644 --- a/packages/nodes-base/nodes/Line/Line.node.ts +++ b/packages/nodes-base/nodes/Line/Line.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { lineApiRequest } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class Line implements INodeType { defaults: { name: 'Line', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'lineNotifyOAuth2Api', diff --git a/packages/nodes-base/nodes/Linear/Linear.node.ts b/packages/nodes-base/nodes/Linear/Linear.node.ts index 5852ce150e..0657cf7d05 100644 --- a/packages/nodes-base/nodes/Linear/Linear.node.ts +++ b/packages/nodes-base/nodes/Linear/Linear.node.ts @@ -1,16 +1,17 @@ -import type { - IExecuteFunctions, - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeCredentialTestResult, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - JsonObject, +import { + type IExecuteFunctions, + type ICredentialDataDecryptedObject, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type JsonObject, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -39,8 +40,8 @@ export class Linear implements INodeType { defaults: { name: 'Linear', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'linearApi', diff --git a/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts b/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts index 643f6b70b8..19a3ce2d4e 100644 --- a/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts +++ b/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts @@ -1,11 +1,12 @@ -import type { - IHookFunctions, - IWebhookFunctions, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { capitalizeFirstLetter, linearApiRequest } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class LinearTrigger implements INodeType { name: 'Linear Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'linearApi', diff --git a/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts b/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts index 7ebfa563f3..c096f299e7 100644 --- a/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts +++ b/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { lingvaNexApiRequest } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class LingvaNex implements INodeType { defaults: { name: 'LingvaNex', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'lingvaNexApi', diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index 576a1accf3..b3be6c4eaa 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { linkedInApiRequest } from './GenericFunctions'; import { postFields, postOperations } from './PostDescription'; @@ -22,8 +23,8 @@ export class LinkedIn implements INodeType { defaults: { name: 'LinkedIn', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'linkedInOAuth2Api', diff --git a/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts b/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts index 1d2b3372e1..88bed5162c 100644 --- a/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts +++ b/packages/nodes-base/nodes/LocalFileTrigger/LocalFileTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - ITriggerFunctions, - IDataObject, - INodeType, - INodeTypeDescription, - ITriggerResponse, +import { + type ITriggerFunctions, + type IDataObject, + type INodeType, + type INodeTypeDescription, + type ITriggerResponse, + NodeConnectionType, } from 'n8n-workflow'; import { watch } from 'chokidar'; @@ -35,7 +36,7 @@ export class LocalFileTrigger implements INodeType { "Once you’ve finished building your workflow, activate it to have it also listen continuously (you just won’t see those executions here).", }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Trigger On', diff --git a/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts b/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts index 3f0a78e70b..521a5f9876 100644 --- a/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts +++ b/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { lonescaleApiRequest } from './GenericFunctions'; @@ -22,8 +23,8 @@ export class LoneScale implements INodeType { defaults: { name: 'LoneScale', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'loneScaleApi', diff --git a/packages/nodes-base/nodes/LoneScale/LoneScaleTrigger.node.ts b/packages/nodes-base/nodes/LoneScale/LoneScaleTrigger.node.ts index 905d887109..2c5fe1d640 100644 --- a/packages/nodes-base/nodes/LoneScale/LoneScaleTrigger.node.ts +++ b/packages/nodes-base/nodes/LoneScale/LoneScaleTrigger.node.ts @@ -1,12 +1,13 @@ -import type { - IDataObject, - IHookFunctions, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookFunctions, - IWebhookResponseData, +import { + NodeConnectionType, + type IDataObject, + type IHookFunctions, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, + type IWebhookResponseData, } from 'n8n-workflow'; import { lonescaleApiRequest } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class LoneScaleTrigger implements INodeType { name: 'LoneScale Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'loneScaleApi', diff --git a/packages/nodes-base/nodes/MQTT/Mqtt.node.ts b/packages/nodes-base/nodes/MQTT/Mqtt.node.ts index 76d36eb6b7..bf0c889012 100644 --- a/packages/nodes-base/nodes/MQTT/Mqtt.node.ts +++ b/packages/nodes-base/nodes/MQTT/Mqtt.node.ts @@ -1,12 +1,13 @@ import type { IClientPublishOptions } from 'mqtt'; -import type { - IExecuteFunctions, - ICredentialsDecrypted, - ICredentialTestFunctions, - INodeCredentialTestResult, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { createClient, type MqttCredential } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class Mqtt implements INodeType { defaults: { name: 'MQTT', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mqtt', diff --git a/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts b/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts index e0a8f51ad1..6a79e682aa 100644 --- a/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts +++ b/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts @@ -8,7 +8,7 @@ import type { ITriggerResponse, IRun, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { createClient, type MqttCredential } from './GenericFunctions'; @@ -42,7 +42,7 @@ export class MqttTrigger implements INodeType { "Once you’ve finished building your workflow, activate it to have it also listen continuously (you just won’t see those executions here).", }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mqtt', diff --git a/packages/nodes-base/nodes/Magento/Magento2.node.ts b/packages/nodes-base/nodes/Magento/Magento2.node.ts index 286086cb08..835fb81441 100644 --- a/packages/nodes-base/nodes/Magento/Magento2.node.ts +++ b/packages/nodes-base/nodes/Magento/Magento2.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { capitalCase } from 'change-case'; import { @@ -50,8 +50,8 @@ export class Magento2 implements INodeType { defaults: { name: 'Magento 2', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'magento2Api', diff --git a/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts b/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts index 5278211bfd..5a9a30aca4 100644 --- a/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts +++ b/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { mailCheckApiRequest } from './GenericFunctions'; @@ -20,8 +21,8 @@ export class Mailcheck implements INodeType { defaults: { name: 'Mailcheck', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailcheckApi', diff --git a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts index f65083a15d..8b452a1eee 100644 --- a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { @@ -58,8 +59,8 @@ export class Mailchimp implements INodeType { defaults: { name: 'Mailchimp', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailchimpApi', diff --git a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts index b45dc421f4..8d2373a409 100644 --- a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts @@ -9,7 +9,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { mailchimpApiRequest } from './GenericFunctions'; export class MailchimpTrigger implements INodeType { @@ -24,7 +24,7 @@ export class MailchimpTrigger implements INodeType { name: 'Mailchimp Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailchimpApi', diff --git a/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts b/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts index d23ec1ebb7..266aebcd27 100644 --- a/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts +++ b/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { mailerliteApiRequest, mailerliteApiRequestAllItems } from './GenericFunctions'; @@ -25,8 +26,8 @@ export class MailerLite implements INodeType { defaults: { name: 'MailerLite', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailerLiteApi', diff --git a/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts b/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts index 84f3261d09..697720aa72 100644 --- a/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts +++ b/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { mailerliteApiRequest } from './GenericFunctions'; @@ -22,7 +23,7 @@ export class MailerLiteTrigger implements INodeType { name: 'MailerLite Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailerLiteApi', diff --git a/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts b/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts index f92c1918b1..a36b235d45 100644 --- a/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts +++ b/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts @@ -7,7 +7,7 @@ import type { JsonObject, IRequestOptions, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; export class Mailgun implements INodeType { description: INodeTypeDescription = { @@ -20,8 +20,8 @@ export class Mailgun implements INodeType { defaults: { name: 'Mailgun', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailgunApi', diff --git a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts index f46bf8a6df..a1d282deac 100644 --- a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts +++ b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { IMessage } from './GenericFunctions'; import { mailjetApiRequest, validateJSON } from './GenericFunctions'; @@ -27,8 +27,8 @@ export class Mailjet implements INodeType { defaults: { name: 'Mailjet', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailjetEmailApi', diff --git a/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts b/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts index cc2968dfed..3428dc9951 100644 --- a/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts +++ b/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { mailjetApiRequest } from './GenericFunctions'; @@ -21,7 +22,7 @@ export class MailjetTrigger implements INodeType { name: 'Mailjet Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mailjetEmailApi', diff --git a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts index e650e2ff4c..7371d7acfa 100644 --- a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts +++ b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -106,8 +106,8 @@ export class Mandrill implements INodeType { defaults: { name: 'Mandrill', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mandrillApi', diff --git a/packages/nodes-base/nodes/ManualTrigger/ManualTrigger.node.ts b/packages/nodes-base/nodes/ManualTrigger/ManualTrigger.node.ts index 29f1dfd74f..b235d3fb64 100644 --- a/packages/nodes-base/nodes/ManualTrigger/ManualTrigger.node.ts +++ b/packages/nodes-base/nodes/ManualTrigger/ManualTrigger.node.ts @@ -4,6 +4,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; export class ManualTrigger implements INodeType { description: INodeTypeDescription = { @@ -21,7 +22,7 @@ export class ManualTrigger implements INodeType { }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/Markdown/Markdown.node.ts b/packages/nodes-base/nodes/Markdown/Markdown.node.ts index d55c4944d8..dc38ee2567 100644 --- a/packages/nodes-base/nodes/Markdown/Markdown.node.ts +++ b/packages/nodes-base/nodes/Markdown/Markdown.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import { Converter } from 'showdown'; @@ -28,8 +28,8 @@ export class Markdown implements INodeType { defaults: { name: 'Markdown', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [], properties: [ { diff --git a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts index 247b713dce..2d7aba98e2 100644 --- a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts +++ b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { endOfDayDataFields, @@ -37,8 +37,8 @@ export class Marketstack implements INodeType { defaults: { name: 'Marketstack', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'marketstackApi', diff --git a/packages/nodes-base/nodes/Matrix/Matrix.node.ts b/packages/nodes-base/nodes/Matrix/Matrix.node.ts index eb29563808..eb24fb3c31 100644 --- a/packages/nodes-base/nodes/Matrix/Matrix.node.ts +++ b/packages/nodes-base/nodes/Matrix/Matrix.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { handleMatrixCall, matrixApiRequest } from './GenericFunctions'; @@ -35,8 +36,8 @@ export class Matrix implements INodeType { defaults: { name: 'Matrix', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'matrixApi', diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts index 1fa66bdf39..787c1af46a 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as channel from './channel'; import * as message from './message'; import * as reaction from './reaction'; @@ -16,8 +16,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Mattermost', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mattermostApi', diff --git a/packages/nodes-base/nodes/Mautic/Mautic.node.ts b/packages/nodes-base/nodes/Mautic/Mautic.node.ts index cdfb0e4b44..46e1b6d6ea 100644 --- a/packages/nodes-base/nodes/Mautic/Mautic.node.ts +++ b/packages/nodes-base/nodes/Mautic/Mautic.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { mauticApiRequest, mauticApiRequestAllItems, validateJSON } from './GenericFunctions'; @@ -37,8 +37,8 @@ export class Mautic implements INodeType { defaults: { name: 'Mautic', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mauticApi', diff --git a/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts b/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts index 576321c036..6344813910 100644 --- a/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts +++ b/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts @@ -1,14 +1,15 @@ import { parse as urlParse } from 'url'; -import type { - IHookFunctions, - IWebhookFunctions, - IDataObject, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { mauticApiRequest } from './GenericFunctions'; @@ -25,7 +26,7 @@ export class MauticTrigger implements INodeType { name: 'Mautic Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mauticApi', diff --git a/packages/nodes-base/nodes/Medium/Medium.node.ts b/packages/nodes-base/nodes/Medium/Medium.node.ts index dca3db0e3c..a02ef1721a 100644 --- a/packages/nodes-base/nodes/Medium/Medium.node.ts +++ b/packages/nodes-base/nodes/Medium/Medium.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { mediumApiRequest } from './GenericFunctions'; @@ -24,8 +24,8 @@ export class Medium implements INodeType { defaults: { name: 'Medium', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mediumApi', diff --git a/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts b/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts index 10f185b25a..7105e1aa9a 100644 --- a/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts +++ b/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, IPairedItemData, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import { generatePairedItemData } from '../../../utils/utilities'; import { oldVersionNotice } from '@utils/descriptions'; @@ -27,8 +27,8 @@ export class MergeV1 implements INodeType { color: '#00bbcc', }, - inputs: ['main', 'main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main, NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], inputNames: ['Input 1', 'Input 2'], properties: [ oldVersionNotice, diff --git a/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts b/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts index 6400017ad0..6adc63aa1e 100644 --- a/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts +++ b/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts @@ -1,13 +1,14 @@ import merge from 'lodash/merge'; -import type { - IExecuteFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, - IPairedItemData, +import { + type IExecuteFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, + type IPairedItemData, + NodeConnectionType, } from 'n8n-workflow'; import type { @@ -41,8 +42,8 @@ export class MergeV2 implements INodeType { name: 'Merge', }, - inputs: ['main', 'main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main, NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], inputNames: ['Input 1', 'Input 2'], // If mode is chooseBranch data from both branches is required // to continue, else data from any input suffices diff --git a/packages/nodes-base/nodes/Merge/v2/utils.ts b/packages/nodes-base/nodes/Merge/v2/utils.ts index ecdcbf9434..ec5180c5a5 100644 --- a/packages/nodes-base/nodes/Merge/v2/utils.ts +++ b/packages/nodes-base/nodes/Merge/v2/utils.ts @@ -13,9 +13,8 @@ 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/actions/mode/append.ts b/packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts index 6a6937423e..1eaf58a0a8 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,8 @@ import { type INodeProperties, } from 'n8n-workflow'; -import { updateDisplayOptions } from '@utils/utilities'; - import { numberInputsProperty } from '../../helpers/descriptions'; +import { updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [numberInputsProperty]; 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 8055951199..5bd416ca18 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,8 @@ import { NodeOperationError } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; -import { preparePairedItemDataArray, updateDisplayOptions } from '@utils/utilities'; - import { numberInputsProperty } from '../../helpers/descriptions'; +import { preparePairedItemDataArray, updateDisplayOptions } from '@utils/utilities'; 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 acdc1681d3..504fab3d1f 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineAll.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineAll.ts @@ -5,13 +5,12 @@ import type { IPairedItemData, } from 'n8n-workflow'; -import { updateDisplayOptions } from '@utils/utilities'; - +import merge from 'lodash/merge'; import type { ClashResolveOptions } from '../../helpers/interfaces'; + import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions'; import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils'; - -import merge from 'lodash/merge'; +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 2c5dc979b4..53620d3b05 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByFields.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByFields.ts @@ -5,8 +5,6 @@ import type { INodeProperties, } from 'n8n-workflow'; -import { updateDisplayOptions } from '@utils/utilities'; - import type { ClashResolveOptions, MatchFieldsJoinMode, @@ -22,6 +20,7 @@ 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 2be6a03bf7..67ed47c15b 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByPosition.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineByPosition.ts @@ -6,13 +6,12 @@ import { type IPairedItemData, } from 'n8n-workflow'; -import { updateDisplayOptions } from '@utils/utilities'; - +import merge from 'lodash/merge'; import type { ClashResolveOptions } from '../../helpers/interfaces'; + import { clashHandlingProperties, numberInputsProperty } from '../../helpers/descriptions'; import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils'; - -import merge from 'lodash/merge'; +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 63ca2bbcf3..055db7572d 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/mode/combineBySql.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/mode/combineBySql.ts @@ -7,11 +7,10 @@ import type { } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; -import { getResolvables, updateDisplayOptions } from '@utils/utilities'; -import { numberInputsProperty } from '../../helpers/descriptions'; - import alasql from 'alasql'; import type { Database } from 'alasql'; +import { numberInputsProperty } from '../../helpers/descriptions'; +import { getResolvables, updateDisplayOptions } from '@utils/utilities'; export const properties: INodeProperties[] = [ numberInputsProperty, diff --git a/packages/nodes-base/nodes/Merge/v3/actions/router.ts b/packages/nodes-base/nodes/Merge/v3/actions/router.ts index 15f8165605..fe87969a6f 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/router.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/router.ts @@ -1,7 +1,7 @@ import { NodeExecutionOutput, type IExecuteFunctions } from 'n8n-workflow'; +import { getNodeInputsData } from '../helpers/utils'; import type { MergeType } from './node.type'; import * as mode from './mode'; -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 e7dcd221d7..efcd726f82 100644 --- a/packages/nodes-base/nodes/Merge/v3/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Merge/v3/actions/versionDescription.ts @@ -1,9 +1,8 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; - -import * as mode from './mode'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import { configuredInputs } from '../helpers/utils'; +import * as mode from './mode'; export const versionDescription: INodeTypeDescription = { displayName: 'Merge', @@ -15,7 +14,7 @@ export const versionDescription: INodeTypeDescription = { name: 'Merge', }, inputs: `={{(${configuredInputs})($parameter)}}`, - outputs: ['main'], + outputs: [NodeConnectionType.Main], // If mode is chooseBranch data from both branches is required // to continue, else data from any input suffices requiredInputs: '={{ $parameter["mode"] === "chooseBranch" ? [0, 1] : 1 }}', diff --git a/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts b/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts index 3af966bcd1..0dd650f790 100644 --- a/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts +++ b/packages/nodes-base/nodes/Merge/v3/helpers/utils.ts @@ -15,9 +15,8 @@ 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/MessageBird/MessageBird.node.ts b/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts index abf6ae531c..4d2debcb61 100644 --- a/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts +++ b/packages/nodes-base/nodes/MessageBird/MessageBird.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { messageBirdApiRequest } from './GenericFunctions'; @@ -22,8 +22,8 @@ export class MessageBird implements INodeType { defaults: { name: 'MessageBird', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'messageBirdApi', diff --git a/packages/nodes-base/nodes/Metabase/Metabase.node.ts b/packages/nodes-base/nodes/Metabase/Metabase.node.ts index 64fce71671..cf13c705cd 100644 --- a/packages/nodes-base/nodes/Metabase/Metabase.node.ts +++ b/packages/nodes-base/nodes/Metabase/Metabase.node.ts @@ -1,4 +1,5 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { questionsFields, questionsOperations } from './QuestionsDescription'; @@ -20,8 +21,8 @@ export class Metabase implements INodeType { defaults: { name: 'Metabase', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'metabaseApi', diff --git a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts index 9313fa2474..cbb424368f 100644 --- a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import type { IField } from './GenericFunctions'; import { @@ -32,8 +33,8 @@ export class MicrosoftDynamicsCrm implements INodeType { defaults: { name: 'Microsoft Dynamics CRM', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftDynamicsOAuth2Api', 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 900a1da242..7d9f3819bb 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v1/MicrosoftExcelV1.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v1/MicrosoftExcelV1.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { generatePairedItemData } from '../../../../utils/utilities'; import { @@ -38,8 +38,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Microsoft Excel', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftExcelOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts index f0b31b9d0a..88d111731c 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as table from './table/Table.resource'; import * as workbook from './workbook/Workbook.resource'; @@ -16,8 +16,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Microsoft Excel 365', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftExcelOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts b/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts index b74d76a81a..32d8877a33 100644 --- a/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts +++ b/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { msGraphSecurityApiRequest, @@ -31,8 +32,8 @@ export class MicrosoftGraphSecurity implements INodeType { defaults: { name: 'Microsoft Graph Security', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftGraphSecurityOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts index cbc74b8c74..4e96a58f43 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { microsoftApiRequest, microsoftApiRequestAllItems } from './GenericFunctions'; @@ -26,8 +26,8 @@ export class MicrosoftOneDrive implements INodeType { defaults: { name: 'Microsoft OneDrive', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftOneDriveOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts index 789447f213..3c49766adf 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IPollFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IPollFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { DateTime } from 'luxon'; @@ -30,7 +31,7 @@ export class MicrosoftOneDriveTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [...triggerDescription], }; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts index d0845710af..6c1e6805ff 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlookTrigger.node.ts @@ -1,8 +1,9 @@ -import type { - IPollFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IPollFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { DateTime } from 'luxon'; @@ -33,7 +34,7 @@ export class MicrosoftOutlookTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Trigger On', 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 19ef735e88..16ab6e97a8 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.ts @@ -12,7 +12,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { createMessage, @@ -50,8 +50,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Microsoft Outlook', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftOutlookOAuth2Api', 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 f7f6bb3c48..e81a150e9d 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 @@ -1,5 +1,4 @@ import type { - IBinaryKeyData, IDataObject, IExecuteFunctions, INodeExecutionData, @@ -239,7 +238,7 @@ export async function execute(this: IExecuteFunctions, index: number, items: INo ); } - const binaryData = (items[index].binary as IBinaryKeyData)[binaryPropertyName]; + const binaryData = items[index].binary[binaryPropertyName]; return { '@odata.type': '#microsoft.graph.fileAttachment', name: binaryData.fileName, 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 c324581c1d..a2216b7255 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 @@ -1,5 +1,4 @@ import type { - IBinaryKeyData, IDataObject, IExecuteFunctions, INodeExecutionData, @@ -75,7 +74,7 @@ export async function execute(this: IExecuteFunctions, index: number, items: INo ); } - const binaryData = (items[index].binary as IBinaryKeyData)[binaryPropertyName]; + const binaryData = items[index].binary[binaryPropertyName]; const dataBuffer = await this.helpers.getBinaryDataBuffer(index, binaryPropertyName); const fileName = options.fileName === undefined ? binaryData.fileName : options.fileName; 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 586f3860a5..439b2fdcb3 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,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as calendar from './calendar'; import * as contact from './contact'; import * as draft from './draft'; @@ -20,8 +20,8 @@ export const description: INodeTypeDescription = { defaults: { name: 'Microsoft Outlook', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftOutlookOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts b/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts index b701679773..43724e0370 100644 --- a/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts @@ -1,14 +1,15 @@ import type { IResult } from 'mssql'; -import type { - IExecuteFunctions, - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - INodeCredentialTestResult, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type ICredentialDataDecryptedObject, + type ICredentialsDecrypted, + type ICredentialTestFunctions, + type IDataObject, + type INodeCredentialTestResult, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import type { ITables } from './interfaces'; @@ -34,8 +35,8 @@ export class MicrosoftSql implements INodeType { defaults: { name: 'Microsoft SQL', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', credentials: [ { 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 d9ac396989..7174e76974 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v1/MicrosoftTeamsV1.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v1/MicrosoftTeamsV1.node.ts @@ -1,13 +1,14 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - INodeTypeBaseDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type INodeTypeBaseDescription, + NodeConnectionType, } from 'n8n-workflow'; import { oldVersionNotice } from '../../../../utils/descriptions'; @@ -36,8 +37,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Microsoft Teams', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftTeamsOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/versionDescription.ts index a3d764687a..a8d55cf89d 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as channel from './channel'; import * as channelMessage from './channelMessage'; @@ -17,8 +17,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Microsoft Teams', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftTeamsOAuth2Api', diff --git a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts index 012433efb0..cc72b78302 100644 --- a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts +++ b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { microsoftApiRequest, microsoftApiRequestAllItems } from './GenericFunctions'; @@ -30,8 +30,8 @@ export class MicrosoftToDo implements INodeType { defaults: { name: 'Microsoft To Do', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'microsoftToDoOAuth2Api', diff --git a/packages/nodes-base/nodes/Mindee/Mindee.node.ts b/packages/nodes-base/nodes/Mindee/Mindee.node.ts index 2abb1f9d67..63777b5433 100644 --- a/packages/nodes-base/nodes/Mindee/Mindee.node.ts +++ b/packages/nodes-base/nodes/Mindee/Mindee.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { cleanData, cleanDataPreviousApiVersions, mindeeApiRequest } from './GenericFunctions'; @@ -21,8 +21,8 @@ export class Mindee implements INodeType { defaults: { name: 'Mindee', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mindeeReceiptApi', diff --git a/packages/nodes-base/nodes/Misp/GenericFunctions.ts b/packages/nodes-base/nodes/Misp/GenericFunctions.ts index bdf59bda34..e7e994f174 100644 --- a/packages/nodes-base/nodes/Misp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Misp/GenericFunctions.ts @@ -8,7 +8,6 @@ import type { IRequestOptions, } from 'n8n-workflow'; import { NodeApiError, NodeOperationError, jsonParse } from 'n8n-workflow'; - import type { MispCredentials } from './types'; export async function mispApiRequest( diff --git a/packages/nodes-base/nodes/Misp/Misp.node.ts b/packages/nodes-base/nodes/Misp/Misp.node.ts index e534f4e165..6f5f9ecc14 100644 --- a/packages/nodes-base/nodes/Misp/Misp.node.ts +++ b/packages/nodes-base/nodes/Misp/Misp.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - ILoadOptionsFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type ILoadOptionsFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -55,8 +56,8 @@ export class Misp implements INodeType { defaults: { name: 'MISP', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mispApi', diff --git a/packages/nodes-base/nodes/Mocean/Mocean.node.ts b/packages/nodes-base/nodes/Mocean/Mocean.node.ts index f1bbe8b5c9..e3b9fa95d7 100644 --- a/packages/nodes-base/nodes/Mocean/Mocean.node.ts +++ b/packages/nodes-base/nodes/Mocean/Mocean.node.ts @@ -10,7 +10,7 @@ import type { JsonObject, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { moceanApiRequest } from './GenericFunctions'; @@ -26,8 +26,8 @@ export class Mocean implements INodeType { defaults: { name: 'Mocean', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'moceanApi', diff --git a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts index 7b367aa927..2d28698e26 100644 --- a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts +++ b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { @@ -41,8 +41,8 @@ export class MondayCom implements INodeType { defaults: { name: 'Monday.com', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mondayComApi', diff --git a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts index 8d5de2ea41..5bcf77d902 100644 --- a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts +++ b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { ApplicationError } from 'n8n-workflow'; +import { ApplicationError, NodeConnectionType } from 'n8n-workflow'; import type { FindOneAndReplaceOptions, @@ -43,8 +43,8 @@ export class MongoDb implements INodeType { defaults: { name: 'MongoDB', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mongoDb', diff --git a/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts b/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts index 19eb1ae7e4..8a40cb4d55 100644 --- a/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts +++ b/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -56,8 +57,8 @@ export class MonicaCrm implements INodeType { defaults: { name: 'Monica CRM', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'monicaCrmApi', diff --git a/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts b/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts index e7957c8f02..fa2597a341 100644 --- a/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts +++ b/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts @@ -10,7 +10,13 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { BINARY_ENCODING, deepCopy, jsonParse, NodeOperationError } from 'n8n-workflow'; +import { + BINARY_ENCODING, + deepCopy, + jsonParse, + NodeConnectionType, + NodeOperationError, +} from 'n8n-workflow'; import iconv from 'iconv-lite'; @@ -54,8 +60,8 @@ export class MoveBinaryData implements INodeType { name: 'Convert to/from binary data', color: '#7722CC', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Mode', diff --git a/packages/nodes-base/nodes/Msg91/Msg91.node.ts b/packages/nodes-base/nodes/Msg91/Msg91.node.ts index b2fb8e4414..9067fec27a 100644 --- a/packages/nodes-base/nodes/Msg91/Msg91.node.ts +++ b/packages/nodes-base/nodes/Msg91/Msg91.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { msg91ApiRequest } from './GenericFunctions'; @@ -23,8 +23,8 @@ export class Msg91 implements INodeType { defaults: { name: 'MSG91', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'msg91Api', diff --git a/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts b/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts index c0f369cc82..1437ad37ef 100644 --- a/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts +++ b/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts @@ -11,7 +11,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type mysql2 from 'mysql2/promise'; @@ -30,8 +30,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'MySQL', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mySql', diff --git a/packages/nodes-base/nodes/MySql/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/MySql/v2/actions/versionDescription.ts index ad8e170691..103d270cbf 100644 --- a/packages/nodes-base/nodes/MySql/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/MySql/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as database from './database/Database.resource'; @@ -14,8 +14,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'MySQL', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'mySql', diff --git a/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts b/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts index feca606392..bf4af6b612 100644 --- a/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts +++ b/packages/nodes-base/nodes/MySql/v2/methods/listSearch.ts @@ -13,7 +13,7 @@ export async function searchTables(this: ILoadOptionsFunctions): Promiseactivate it to have it also listen continuously (you just won't see those executions here).", }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'postgres', diff --git a/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts b/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts index f4b780f423..fe9d7e444c 100644 --- a/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts +++ b/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import pgPromise from 'pg-promise'; @@ -28,8 +28,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Postgres', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'postgres', diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Postgres/v2/actions/versionDescription.ts index de6047003d..5abe6f913a 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as database from './database/Database.resource'; @@ -14,8 +14,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Postgres', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'postgres', diff --git a/packages/nodes-base/nodes/Postgres/v2/transport/index.ts b/packages/nodes-base/nodes/Postgres/v2/transport/index.ts index 14c98a2bf7..b19993a31c 100644 --- a/packages/nodes-base/nodes/Postgres/v2/transport/index.ts +++ b/packages/nodes-base/nodes/Postgres/v2/transport/index.ts @@ -7,13 +7,13 @@ import type { ITriggerFunctions, } from 'n8n-workflow'; -import { formatPrivateKey } from '@utils/utilities'; import type { ConnectionsData, PgpConnectionParameters, PostgresNodeCredentials, PostgresNodeOptions, } from '../helpers/interfaces'; +import { formatPrivateKey } from '@utils/utilities'; import { LOCALHOST } from '@utils/constants'; const getPostgresConfig = ( diff --git a/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts b/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts index 54252a6cc5..50197ef01d 100644 --- a/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts +++ b/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts @@ -1,10 +1,11 @@ -import type { - IDataObject, - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IDataObject, + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -26,7 +27,7 @@ export class PostmarkTrigger implements INodeType { name: 'Postmark Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'postmarkApi', diff --git a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts index 47c29d133a..727d32ac5b 100644 --- a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts +++ b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import type { Metrics } from './GenericFunctions'; @@ -32,8 +33,8 @@ export class ProfitWell implements INodeType { defaults: { name: 'ProfitWell', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'profitWellApi', diff --git a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts index e918bc1352..c1a9209dac 100644 --- a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts +++ b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { pushbulletApiRequest, pushbulletApiRequestAllItems } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class Pushbullet implements INodeType { defaults: { name: 'Pushbullet', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'pushbulletOAuth2Api', diff --git a/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts b/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts index 9b35c6c54c..b343444bea 100644 --- a/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts +++ b/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { pushcutApiRequest } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class Pushcut implements INodeType { defaults: { name: 'Pushcut', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'pushcutApi', diff --git a/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts b/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts index 58ad01d373..9be7738117 100644 --- a/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts +++ b/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { pushcutApiRequest } from './GenericFunctions'; @@ -21,7 +22,7 @@ export class PushcutTrigger implements INodeType { name: 'Pushcut Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'pushcutApi', diff --git a/packages/nodes-base/nodes/Pushover/Pushover.node.ts b/packages/nodes-base/nodes/Pushover/Pushover.node.ts index d7d24f69b9..b1262175de 100644 --- a/packages/nodes-base/nodes/Pushover/Pushover.node.ts +++ b/packages/nodes-base/nodes/Pushover/Pushover.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { pushoverApiRequest } from './GenericFunctions'; @@ -22,8 +23,8 @@ export class Pushover implements INodeType { defaults: { name: 'Pushover', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'pushoverApi', diff --git a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts index ad065b1d1d..5a26bfcfa7 100644 --- a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts +++ b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts @@ -4,7 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import pgPromise from 'pg-promise'; @@ -22,8 +22,8 @@ export class QuestDb implements INodeType { defaults: { name: 'QuestDB', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', credentials: [ { diff --git a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts index 55e081553c..fcd71125ce 100644 --- a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts +++ b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts @@ -8,7 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { generatePairedItemData } from '../../utils/utilities'; import { @@ -38,8 +38,8 @@ export class QuickBase implements INodeType { defaults: { name: 'Quick Base', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'quickbaseApi', diff --git a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts index b95189f478..8e81df8aa7 100644 --- a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts +++ b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { capitalCase } from 'change-case'; import isEmpty from 'lodash/isEmpty'; @@ -61,8 +61,8 @@ export class QuickBooks implements INodeType { defaults: { name: 'QuickBooks Online', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'quickBooksOAuth2Api', diff --git a/packages/nodes-base/nodes/QuickChart/QuickChart.node.ts b/packages/nodes-base/nodes/QuickChart/QuickChart.node.ts index f3b9ef2efd..c89249e84f 100644 --- a/packages/nodes-base/nodes/QuickChart/QuickChart.node.ts +++ b/packages/nodes-base/nodes/QuickChart/QuickChart.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { jsonParse, NodeOperationError } from 'n8n-workflow'; +import { jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { CHART_TYPE_OPTIONS, @@ -29,8 +29,8 @@ export class QuickChart implements INodeType { defaults: { name: 'QuickChart', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Chart Type', diff --git a/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts b/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts index a77cd873ce..377ca289ba 100644 --- a/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts +++ b/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts @@ -12,7 +12,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { rabbitmqConnectExchange, rabbitmqConnectQueue } from './GenericFunctions'; import { formatPrivateKey } from '@utils/utilities'; @@ -28,8 +28,8 @@ export class RabbitMQ implements INodeType { defaults: { name: 'RabbitMQ', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'rabbitmq', diff --git a/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts b/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts index a95c67ed26..31e3fec8eb 100644 --- a/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts +++ b/packages/nodes-base/nodes/RabbitMQ/RabbitMQTrigger.node.ts @@ -11,7 +11,7 @@ import type { ITriggerFunctions, ITriggerResponse, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { rabbitDefaultOptions } from './DefaultOptions'; @@ -41,7 +41,7 @@ export class RabbitMQTrigger implements INodeType { "Once you’ve finished building your workflow, activate it to have it also listen continuously (you just won’t see those executions here).", }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'rabbitmq', diff --git a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts index 3e5d047b90..2a4661b35b 100644 --- a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts +++ b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; import omit from 'lodash/omit'; @@ -36,8 +36,8 @@ export class Raindrop implements INodeType { defaults: { name: 'Raindrop', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'raindropOAuth2Api', diff --git a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts index a7e239d000..a41dadbe7a 100644 --- a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts @@ -1,8 +1,9 @@ -import type { - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; export class ReadBinaryFile implements INodeType { @@ -18,8 +19,8 @@ export class ReadBinaryFile implements INodeType { name: 'Read Binary File', color: '#449922', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'File Path', diff --git a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts index a1f0939c9e..b81530f62a 100644 --- a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts @@ -1,8 +1,9 @@ -import type { - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import glob from 'fast-glob'; @@ -21,8 +22,8 @@ export class ReadBinaryFiles implements INodeType { name: 'Read Binary Files', color: '#44AA44', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'File Selector', diff --git a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts index 6652ca191f..7eed004d57 100644 --- a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts +++ b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts @@ -1,5 +1,6 @@ import { NodeOperationError, + NodeConnectionType, type IExecuteFunctions, type INodeExecutionData, type INodeType, @@ -21,8 +22,8 @@ export class ReadPDF implements INodeType { name: 'Read PDF', color: '#003355', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Input Binary Field', diff --git a/packages/nodes-base/nodes/Reddit/Reddit.node.ts b/packages/nodes-base/nodes/Reddit/Reddit.node.ts index 481ed75a91..38d35b1326 100644 --- a/packages/nodes-base/nodes/Reddit/Reddit.node.ts +++ b/packages/nodes-base/nodes/Reddit/Reddit.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { handleListing, redditApiRequest } from './GenericFunctions'; @@ -32,8 +32,8 @@ export class Reddit implements INodeType { defaults: { name: 'Reddit', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'redditOAuth2Api', diff --git a/packages/nodes-base/nodes/Redis/Redis.node.ts b/packages/nodes-base/nodes/Redis/Redis.node.ts index 549a15e85a..f547804b4f 100644 --- a/packages/nodes-base/nodes/Redis/Redis.node.ts +++ b/packages/nodes-base/nodes/Redis/Redis.node.ts @@ -4,6 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import set from 'lodash/set'; @@ -26,8 +27,8 @@ export class Redis implements INodeType { defaults: { name: 'Redis', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'redis', diff --git a/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts b/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts index da3c47a54e..34b4bb8d62 100644 --- a/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts +++ b/packages/nodes-base/nodes/Redis/RedisTrigger.node.ts @@ -4,7 +4,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { redisConnectionTest, setupRedisClient } from './utils'; @@ -25,7 +25,7 @@ export class RedisTrigger implements INodeType { name: 'Redis Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'redis', diff --git a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts index 004a1b8137..7e53e9b0cb 100644 --- a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts +++ b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import get from 'lodash/get'; import set from 'lodash/set'; @@ -29,8 +29,8 @@ export class RenameKeys implements INodeType { name: 'Rename Keys', color: '#772244', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Keys', diff --git a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts index fbb1a6af56..ea378f97e2 100644 --- a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts +++ b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts @@ -8,7 +8,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { jsonParse, BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { jsonParse, BINARY_ENCODING, NodeOperationError, NodeConnectionType } from 'n8n-workflow'; import set from 'lodash/set'; import jwt from 'jsonwebtoken'; import { formatPrivateKey, generatePairedItemData } from '../../utils/utilities'; @@ -24,8 +24,8 @@ export class RespondToWebhook implements INodeType { defaults: { name: 'Respond to Webhook', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'jwtAuth', diff --git a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts index 143f6b1491..de8ddb4924 100644 --- a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts +++ b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { rocketchatApiRequest, validateJSON } from './GenericFunctions'; @@ -54,8 +55,8 @@ export class Rocketchat implements INodeType { defaults: { name: 'RocketChat', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'rocketchatApi', diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts index c2f688876f..4b63a43d74 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts @@ -6,7 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import Parser from 'rss-parser'; import { generatePairedItemData } from '../../utils/utilities'; @@ -35,8 +35,8 @@ export class RssFeedRead implements INodeType { name: 'RSS Read', color: '#b02020', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'URL', diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts index 91823e7e26..b956a4e18d 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedReadTrigger.node.ts @@ -5,7 +5,7 @@ import type { INodeTypeDescription, IPollFunctions, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import Parser from 'rss-parser'; import moment from 'moment-timezone'; @@ -25,7 +25,7 @@ export class RssFeedReadTrigger implements INodeType { }, polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Feed URL', diff --git a/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts b/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts index 439c9501d4..631853a8ec 100644 --- a/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts +++ b/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { RundeckApi } from './RundeckApi'; export class Rundeck implements INodeType { @@ -21,8 +21,8 @@ export class Rundeck implements INodeType { defaults: { name: 'Rundeck', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'rundeckApi', diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index a5926e4930..777788d52d 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -11,7 +11,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { bucketFields, bucketOperations } from '../Aws/S3/V1/BucketDescription'; @@ -34,8 +34,8 @@ export class S3 implements INodeType { defaults: { name: 'S3', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 's3', diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index badf507c51..73fc54fce1 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -9,7 +9,7 @@ import type { JsonObject, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { accountFields, accountOperations } from './AccountDescription'; @@ -72,8 +72,8 @@ export class Salesforce implements INodeType { defaults: { name: 'Salesforce', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'salesforceOAuth2Api', diff --git a/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts b/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts index 613ff5daca..b8e5c80777 100644 --- a/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts +++ b/packages/nodes-base/nodes/Salesforce/SalesforceTrigger.node.ts @@ -1,4 +1,4 @@ -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import type { IDataObject, @@ -40,7 +40,7 @@ export class SalesforceTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Trigger On', diff --git a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts index 820f46f7f5..c0b8d00029 100644 --- a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts +++ b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { salesmateApiRequest, salesmateApiRequestAllItems, @@ -34,8 +34,8 @@ export class Salesmate implements INodeType { defaults: { name: 'Salesmate', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'salesmateApi', diff --git a/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts b/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts index 8808664af3..904c5f6567 100644 --- a/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts +++ b/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts @@ -4,7 +4,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { sendAt } from 'cron'; @@ -28,7 +28,7 @@ export class ScheduleTrigger implements INodeType { }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts index 3f5247d6ca..9010e0d3c9 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { getTableColumns, @@ -39,8 +39,8 @@ export class SeaTable implements INodeType { defaults: { name: 'SeaTable', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'seaTableApi', diff --git a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts index ab90e22034..74776d18b1 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts @@ -1,10 +1,11 @@ -import type { - IPollFunctions, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IPollFunctions, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -32,7 +33,7 @@ export class SeaTableTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Table Name or ID', diff --git a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts index 978135609e..a1e533f6c9 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { companyFields, companyOperations } from './descriptions/CompanyDescription'; @@ -36,8 +37,8 @@ export class SecurityScorecard implements INodeType { defaults: { name: 'SecurityScorecard', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'securityScorecardApi', diff --git a/packages/nodes-base/nodes/Segment/Segment.node.ts b/packages/nodes-base/nodes/Segment/Segment.node.ts index 9e878c5a14..d54612d114 100644 --- a/packages/nodes-base/nodes/Segment/Segment.node.ts +++ b/packages/nodes-base/nodes/Segment/Segment.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; import { segmentApiRequest } from './GenericFunctions'; @@ -31,8 +32,8 @@ export class Segment implements INodeType { defaults: { name: 'Segment', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'segmentApi', diff --git a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts index 69c83d889f..eedd6f7e6a 100644 --- a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts +++ b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts @@ -1,12 +1,13 @@ -import type { - IDataObject, - IExecuteFunctions, - IHttpRequestMethods, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IDataObject, + type IExecuteFunctions, + type IHttpRequestMethods, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -31,8 +32,8 @@ export class SendGrid implements INodeType { defaults: { name: 'SendGrid', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'sendGridApi', diff --git a/packages/nodes-base/nodes/Sendy/Sendy.node.ts b/packages/nodes-base/nodes/Sendy/Sendy.node.ts index 0e8236c68c..9bf36b2e82 100644 --- a/packages/nodes-base/nodes/Sendy/Sendy.node.ts +++ b/packages/nodes-base/nodes/Sendy/Sendy.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { sendyApiRequest } from './GenericFunctions'; @@ -27,8 +27,8 @@ export class Sendy implements INodeType { defaults: { name: 'Sendy', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'sendyApi', diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index eae28e44f9..bd76abd86c 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { eventFields, eventOperations } from './EventDescription'; @@ -36,8 +37,8 @@ export class SentryIo implements INodeType { defaults: { name: 'Sentry.io', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'sentryIoOAuth2Api', diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index 9c634b0953..0e866e1357 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { mapEndpoint, @@ -52,8 +52,8 @@ export class ServiceNow implements INodeType { defaults: { name: 'ServiceNow', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'serviceNowOAuth2Api', diff --git a/packages/nodes-base/nodes/Set/v1/SetV1.node.ts b/packages/nodes-base/nodes/Set/v1/SetV1.node.ts index 141c3e3d48..af05ebc8b5 100644 --- a/packages/nodes-base/nodes/Set/v1/SetV1.node.ts +++ b/packages/nodes-base/nodes/Set/v1/SetV1.node.ts @@ -7,7 +7,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; import set from 'lodash/set'; @@ -22,8 +22,8 @@ const versionDescription: INodeTypeDescription = { name: 'Set', color: '#0000FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Keep Only Set', diff --git a/packages/nodes-base/nodes/Set/v2/SetV2.node.ts b/packages/nodes-base/nodes/Set/v2/SetV2.node.ts index 0f5c050cd0..02975c85c3 100644 --- a/packages/nodes-base/nodes/Set/v2/SetV2.node.ts +++ b/packages/nodes-base/nodes/Set/v2/SetV2.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import type { IncludeMods, SetField, SetNodeOptions } from './helpers/interfaces'; import { INCLUDE } from './helpers/interfaces'; @@ -27,8 +28,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Edit Fields', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Mode', diff --git a/packages/nodes-base/nodes/Shopify/Shopify.node.ts b/packages/nodes-base/nodes/Shopify/Shopify.node.ts index a6e8323e7e..0c3f49078f 100644 --- a/packages/nodes-base/nodes/Shopify/Shopify.node.ts +++ b/packages/nodes-base/nodes/Shopify/Shopify.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { keysToSnakeCase, shopifyApiRequest, shopifyApiRequestAllItems } from './GenericFunctions'; @@ -31,8 +31,8 @@ export class Shopify implements INodeType { defaults: { name: 'Shopify', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'shopifyApi', diff --git a/packages/nodes-base/nodes/Shopify/ShopifyTrigger.node.ts b/packages/nodes-base/nodes/Shopify/ShopifyTrigger.node.ts index c640e7c9f8..12a3b50542 100644 --- a/packages/nodes-base/nodes/Shopify/ShopifyTrigger.node.ts +++ b/packages/nodes-base/nodes/Shopify/ShopifyTrigger.node.ts @@ -1,11 +1,12 @@ import { createHmac } from 'crypto'; -import type { - IHookFunctions, - IWebhookFunctions, - IDataObject, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type IDataObject, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { shopifyApiRequest } from './GenericFunctions'; @@ -23,7 +24,7 @@ export class ShopifyTrigger implements INodeType { name: 'Shopify Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'shopifyApi', diff --git a/packages/nodes-base/nodes/Signl4/Signl4.node.ts b/packages/nodes-base/nodes/Signl4/Signl4.node.ts index 012ce4400a..b86170ea6f 100644 --- a/packages/nodes-base/nodes/Signl4/Signl4.node.ts +++ b/packages/nodes-base/nodes/Signl4/Signl4.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { SIGNL4ApiRequest } from './GenericFunctions'; @@ -22,8 +22,8 @@ export class Signl4 implements INodeType { defaults: { name: 'SIGNL4', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'signl4Api', diff --git a/packages/nodes-base/nodes/Simulate/Simulate.node.ts b/packages/nodes-base/nodes/Simulate/Simulate.node.ts index c91154347f..a80924551c 100644 --- a/packages/nodes-base/nodes/Simulate/Simulate.node.ts +++ b/packages/nodes-base/nodes/Simulate/Simulate.node.ts @@ -1,4 +1,4 @@ -import { sleep, jsonParse, NodeOperationError } from 'n8n-workflow'; +import { sleep, jsonParse, NodeOperationError, NodeConnectionType } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData, @@ -29,8 +29,8 @@ export class Simulate implements INodeType { name: 'Simulate', color: '#b0b0b0', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ iconSelector, subtitleProperty, diff --git a/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts b/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts index 4532908936..d793434ee1 100644 --- a/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts +++ b/packages/nodes-base/nodes/Simulate/SimulateTrigger.node.ts @@ -1,4 +1,4 @@ -import { sleep, NodeOperationError, jsonParse } from 'n8n-workflow'; +import { sleep, NodeOperationError, jsonParse, NodeConnectionType } from 'n8n-workflow'; import type { IDataObject, ITriggerFunctions, @@ -30,7 +30,7 @@ export class SimulateTrigger implements INodeType { color: '#b0b0b0', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { ...iconSelector, default: 'n8n-nodes-base.manualTrigger' }, subtitleProperty, diff --git a/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts b/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts index 6f46b2b827..1e90603adb 100644 --- a/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts +++ b/packages/nodes-base/nodes/Slack/SlackTrigger.node.ts @@ -1,15 +1,16 @@ -import type { - INodeListSearchItems, - ILoadOptionsFunctions, - INodeListSearchResult, - INodePropertyOptions, - IHookFunctions, - IWebhookFunctions, - IDataObject, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - IBinaryKeyData, +import { + type INodeListSearchItems, + type ILoadOptionsFunctions, + type INodeListSearchResult, + type INodePropertyOptions, + type IHookFunctions, + type IWebhookFunctions, + type IDataObject, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + type IBinaryKeyData, + NodeConnectionType, } from 'n8n-workflow'; import { slackApiRequestAllItems } from './V2/GenericFunctions'; @@ -28,7 +29,7 @@ export class SlackTrigger implements INodeType { name: 'Slack Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'default', diff --git a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts index 5cae0a4350..70cd852469 100644 --- a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts +++ b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { channelFields, channelOperations } from './ChannelDescription'; @@ -75,8 +75,8 @@ export class SlackV1 implements INodeType { defaults: { name: 'Slack', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'slackApi', diff --git a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts index 40df76b8cd..19a5efc286 100644 --- a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts +++ b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts @@ -15,7 +15,7 @@ import type { JsonObject, } from 'n8n-workflow'; -import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { channelFields, channelOperations } from './ChannelDescription'; @@ -37,8 +37,8 @@ export class SlackV2 implements INodeType { defaults: { name: 'Slack', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'slackApi', diff --git a/packages/nodes-base/nodes/Sms77/Sms77.node.ts b/packages/nodes-base/nodes/Sms77/Sms77.node.ts index 565e41c347..1fd9a9a12e 100644 --- a/packages/nodes-base/nodes/Sms77/Sms77.node.ts +++ b/packages/nodes-base/nodes/Sms77/Sms77.node.ts @@ -1,9 +1,10 @@ -import type { - IDataObject, - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IDataObject, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import { sms77ApiRequest } from './GenericFunctions'; @@ -20,8 +21,8 @@ export class Sms77 implements INodeType { defaults: { name: 'seven', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'sms77Api', diff --git a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts index a2d33e95f3..83406e1b51 100644 --- a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts +++ b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import snowflake from 'snowflake-sdk'; import { connect, destroy, execute } from './GenericFunctions'; @@ -22,8 +23,8 @@ export class Snowflake implements INodeType { defaults: { name: 'Snowflake', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', credentials: [ { diff --git a/packages/nodes-base/nodes/SplitInBatches/v1/SplitInBatchesV1.node.ts b/packages/nodes-base/nodes/SplitInBatches/v1/SplitInBatchesV1.node.ts index 7d44208e15..e076b29ad0 100644 --- a/packages/nodes-base/nodes/SplitInBatches/v1/SplitInBatchesV1.node.ts +++ b/packages/nodes-base/nodes/SplitInBatches/v1/SplitInBatchesV1.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IPairedItemData, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; export class SplitInBatchesV1 implements INodeType { description: INodeTypeDescription = { @@ -20,8 +20,8 @@ export class SplitInBatchesV1 implements INodeType { name: 'Split In Batches', color: '#007755', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/SplitInBatches/v2/SplitInBatchesV2.node.ts b/packages/nodes-base/nodes/SplitInBatches/v2/SplitInBatchesV2.node.ts index 2ed649da54..6e9a618e72 100644 --- a/packages/nodes-base/nodes/SplitInBatches/v2/SplitInBatchesV2.node.ts +++ b/packages/nodes-base/nodes/SplitInBatches/v2/SplitInBatchesV2.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IPairedItemData, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; export class SplitInBatchesV2 implements INodeType { description: INodeTypeDescription = { @@ -20,9 +20,9 @@ export class SplitInBatchesV2 implements INodeType { name: 'Split In Batches', color: '#007755', }, - inputs: ['main'], + inputs: [NodeConnectionType.Main], // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong - outputs: ['main', 'main'], + outputs: [NodeConnectionType.Main, NodeConnectionType.Main], outputNames: ['loop', 'done'], properties: [ { diff --git a/packages/nodes-base/nodes/SplitInBatches/v3/SplitInBatchesV3.node.ts b/packages/nodes-base/nodes/SplitInBatches/v3/SplitInBatchesV3.node.ts index b8c3e844ab..ea81f55cf1 100644 --- a/packages/nodes-base/nodes/SplitInBatches/v3/SplitInBatchesV3.node.ts +++ b/packages/nodes-base/nodes/SplitInBatches/v3/SplitInBatchesV3.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IPairedItemData, } from 'n8n-workflow'; -import { deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, deepCopy } from 'n8n-workflow'; export class SplitInBatchesV3 implements INodeType { description: INodeTypeDescription = { @@ -21,9 +21,9 @@ export class SplitInBatchesV3 implements INodeType { name: 'Loop Over Items', color: '#007755', }, - inputs: ['main'], + inputs: [NodeConnectionType.Main], // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong - outputs: ['main', 'main'], + outputs: [NodeConnectionType.Main, NodeConnectionType.Main], outputNames: ['done', 'loop'], properties: [ { diff --git a/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts b/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts index 3c329f2ca5..c6594e1403 100644 --- a/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Splunk/v1/GenericFunctions.ts @@ -12,7 +12,6 @@ import { parseString } from 'xml2js'; import { SPLUNK, - type SplunkCredentials, type SplunkError, type SplunkFeedResponse, type SplunkResultResponse, @@ -115,9 +114,7 @@ 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: { diff --git a/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts b/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts index 048b8b2f37..7abe57fdd8 100644 --- a/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts +++ b/packages/nodes-base/nodes/Splunk/v1/SplunkV1.node.ts @@ -8,8 +8,10 @@ import type { INodeTypeDescription, INodeTypeBaseDescription, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; +import set from 'lodash/set'; +import { oldVersionNotice } from '../../../utils/descriptions'; import { formatFeed, formatResults, @@ -34,8 +36,6 @@ import { } from './descriptions'; import type { SplunkFeedResponse } from './types'; -import set from 'lodash/set'; -import { oldVersionNotice } from '../../../utils/descriptions'; const versionDescription: INodeTypeDescription = { displayName: 'Splunk', @@ -48,8 +48,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Splunk', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'splunkApi', diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/router.ts b/packages/nodes-base/nodes/Splunk/v2/actions/router.ts index 289e5d02d7..3b0d3965e8 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/router.ts @@ -1,12 +1,12 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import set from 'lodash/set'; import * as alert from './alert'; import * as report from './report'; import * as search from './search'; import * as user from './user'; -import set from 'lodash/set'; import type { SplunkType } from './node.type'; export async function router(this: IExecuteFunctions): Promise { diff --git a/packages/nodes-base/nodes/Splunk/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Splunk/v2/actions/versionDescription.ts index 8924cb02ee..e21b787e65 100644 --- a/packages/nodes-base/nodes/Splunk/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Splunk/v2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as alert from './alert'; import * as report from './report'; @@ -17,8 +17,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Splunk', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'splunkApi', diff --git a/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts b/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts index 79fc3cc446..7515ba509f 100644 --- a/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/Splunk/v2/helpers/utils.ts @@ -2,8 +2,8 @@ import type { IExecuteFunctions, IDataObject } from 'n8n-workflow'; import { parseString } from 'xml2js'; -import type { SplunkError, SplunkFeedResponse } from './interfaces'; import { SPLUNK } from '../../v1/types'; +import type { SplunkError, SplunkFeedResponse } from './interfaces'; function compactEntryContent(splunkObject: any): any { if (typeof splunkObject !== 'object') { diff --git a/packages/nodes-base/nodes/Spontit/Spontit.node.ts b/packages/nodes-base/nodes/Spontit/Spontit.node.ts index 70f4baf5d0..c91fb3eced 100644 --- a/packages/nodes-base/nodes/Spontit/Spontit.node.ts +++ b/packages/nodes-base/nodes/Spontit/Spontit.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { spontitApiRequest } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class Spontit implements INodeType { defaults: { name: 'Spontit', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'spontitApi', diff --git a/packages/nodes-base/nodes/Spotify/Spotify.node.ts b/packages/nodes-base/nodes/Spotify/Spotify.node.ts index a8929e3b1e..5a7db76a6c 100644 --- a/packages/nodes-base/nodes/Spotify/Spotify.node.ts +++ b/packages/nodes-base/nodes/Spotify/Spotify.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, - IHttpRequestMethods, +import { + type IExecuteFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + type IHttpRequestMethods, + NodeConnectionType, } from 'n8n-workflow'; import { spotifyApiRequest, spotifyApiRequestAllItems } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class Spotify implements INodeType { defaults: { name: 'Spotify', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'spotifyOAuth2Api', diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts index 9d5c71d7b8..b954aa1691 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; -import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import type { JSON2SheetOpts, @@ -43,8 +43,8 @@ export class SpreadsheetFileV1 implements INodeType { name: 'Spreadsheet File', color: '#2244FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ oldVersionNotice, operationProperty, diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts index c1a75b69a9..4694c3efa9 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v2/SpreadsheetFileV2.node.ts @@ -5,6 +5,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { operationProperty } from '../description'; import * as fromFile from './fromFile.operation'; @@ -21,8 +22,8 @@ export class SpreadsheetFileV2 implements INodeType { name: 'Spreadsheet File', color: '#2244FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [operationProperty, ...fromFile.description, ...toFile.description], }; } diff --git a/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts b/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts index 48324668a6..5f93687bf1 100644 --- a/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts +++ b/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; -import { jsonParse } from 'n8n-workflow'; +import { NodeConnectionType, jsonParse } from 'n8n-workflow'; export class SseTrigger implements INodeType { description: INodeTypeDescription = { @@ -35,7 +35,7 @@ export class SseTrigger implements INodeType { "Once you’ve finished building your workflow, activate it to have it also listen continuously (you just won’t see those executions here).", }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'URL', diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index b96f805dfb..ad17713ff6 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -10,7 +10,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { file as tmpFile } from 'tmp-promise'; @@ -61,8 +61,8 @@ export class Ssh implements INodeType { name: 'SSH', color: '#000000', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'sshPassword', diff --git a/packages/nodes-base/nodes/Stackby/Stackby.node.ts b/packages/nodes-base/nodes/Stackby/Stackby.node.ts index 5cccaf4521..c269849a70 100644 --- a/packages/nodes-base/nodes/Stackby/Stackby.node.ts +++ b/packages/nodes-base/nodes/Stackby/Stackby.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { generatePairedItemData } from '../../utils/utilities'; import type { IRecord } from './GenericFunction'; @@ -23,8 +23,8 @@ export class Stackby implements INodeType { defaults: { name: 'Stackby', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'stackbyApi', diff --git a/packages/nodes-base/nodes/Start/Start.node.ts b/packages/nodes-base/nodes/Start/Start.node.ts index 7affed7c2c..b59c225b0a 100644 --- a/packages/nodes-base/nodes/Start/Start.node.ts +++ b/packages/nodes-base/nodes/Start/Start.node.ts @@ -1,8 +1,9 @@ -import type { - IExecuteFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IExecuteFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; export class Start implements INodeType { @@ -21,7 +22,7 @@ export class Start implements INodeType { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: diff --git a/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts b/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts index addd4c0cf9..4c44504920 100644 --- a/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts +++ b/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts @@ -5,7 +5,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { jsonParse, NodeOperationError } from 'n8n-workflow'; +import { jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; const errorObjectPlaceholder = `{ "code": "404", @@ -25,7 +25,7 @@ export class StopAndError implements INodeType { name: 'Stop and Error', color: '#ff0000', }, - inputs: ['main'], + inputs: [NodeConnectionType.Main], // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong outputs: [], properties: [ diff --git a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts index c0c45609a7..02045aa29a 100644 --- a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts +++ b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { storyblokApiRequest, storyblokApiRequestAllItems } from './GenericFunctions'; @@ -26,8 +27,8 @@ export class Storyblok implements INodeType { defaults: { name: 'Storyblok', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'storyblokContentApi', diff --git a/packages/nodes-base/nodes/Strapi/Strapi.node.ts b/packages/nodes-base/nodes/Strapi/Strapi.node.ts index 277f67e0d8..8c991e7397 100644 --- a/packages/nodes-base/nodes/Strapi/Strapi.node.ts +++ b/packages/nodes-base/nodes/Strapi/Strapi.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, IRequestOptions, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { getToken, @@ -33,8 +33,8 @@ export class Strapi implements INodeType { defaults: { name: 'Strapi', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'strapiApi', diff --git a/packages/nodes-base/nodes/Strava/Strava.node.ts b/packages/nodes-base/nodes/Strava/Strava.node.ts index d732a0f747..32f989051c 100644 --- a/packages/nodes-base/nodes/Strava/Strava.node.ts +++ b/packages/nodes-base/nodes/Strava/Strava.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { stravaApiRequest, stravaApiRequestAllItems } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class Strava implements INodeType { defaults: { name: 'Strava', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'stravaOAuth2Api', diff --git a/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts b/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts index bbed04f481..e5b24b19ea 100644 --- a/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts +++ b/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { stravaApiRequest } from './GenericFunctions'; @@ -22,7 +23,7 @@ export class StravaTrigger implements INodeType { name: 'Strava Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'stravaOAuth2Api', diff --git a/packages/nodes-base/nodes/Stripe/Stripe.node.ts b/packages/nodes-base/nodes/Stripe/Stripe.node.ts index b1d02b9981..79d829d61f 100644 --- a/packages/nodes-base/nodes/Stripe/Stripe.node.ts +++ b/packages/nodes-base/nodes/Stripe/Stripe.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import isEmpty from 'lodash/isEmpty'; @@ -48,8 +48,8 @@ export class Stripe implements INodeType { defaults: { name: 'Stripe', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'stripeApi', diff --git a/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts b/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts index fb9b3fb563..d255550254 100644 --- a/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts +++ b/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts @@ -8,7 +8,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType } from 'n8n-workflow'; import { stripeApiRequest } from './helpers'; @@ -24,7 +24,7 @@ export class StripeTrigger implements INodeType { name: 'Stripe Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'stripeApi', diff --git a/packages/nodes-base/nodes/Supabase/Supabase.node.ts b/packages/nodes-base/nodes/Supabase/Supabase.node.ts index 8a73f7a7c2..6323747b7b 100644 --- a/packages/nodes-base/nodes/Supabase/Supabase.node.ts +++ b/packages/nodes-base/nodes/Supabase/Supabase.node.ts @@ -11,7 +11,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { buildGetQuery, @@ -41,8 +41,8 @@ export class Supabase implements INodeType { defaults: { name: 'Supabase', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'supabaseApi', diff --git a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts index b299e9a21e..80e9fcac9e 100644 --- a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts +++ b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { deepCopy, jsonParse, NodeOperationError } from 'n8n-workflow'; +import { deepCopy, jsonParse, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { idsExist, surveyMonkeyApiRequest, surveyMonkeyRequestAllItems } from './GenericFunctions'; @@ -28,7 +28,7 @@ export class SurveyMonkeyTrigger implements INodeType { name: 'SurveyMonkey Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'surveyMonkeyApi', diff --git a/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts b/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts index 4306abb559..4782da7c8e 100644 --- a/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts +++ b/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts @@ -7,7 +7,7 @@ import type { INodeTypeDescription, NodeParameterValue, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; export class SwitchV1 implements INodeType { description: INodeTypeDescription; @@ -20,8 +20,13 @@ export class SwitchV1 implements INodeType { name: 'Switch', color: '#506000', }, - inputs: ['main'], - outputs: ['main', 'main', 'main', 'main'], + inputs: [NodeConnectionType.Main], + outputs: [ + NodeConnectionType.Main, + NodeConnectionType.Main, + NodeConnectionType.Main, + NodeConnectionType.Main, + ], outputNames: ['0', '1', '2', '3'], properties: [ { diff --git a/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts b/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts index bd20956874..c940658c60 100644 --- a/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts +++ b/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts @@ -22,7 +22,7 @@ export class SwitchV2 implements INodeType { name: 'Switch', color: '#506000', }, - inputs: ['main'], + inputs: [NodeConnectionType.Main], outputs: `={{ ((parameters) => { diff --git a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts index c4ac82c990..5c9c212b47 100644 --- a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts +++ b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts @@ -11,10 +11,10 @@ import type { } 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; @@ -55,7 +55,7 @@ export class SwitchV3 implements INodeType { name: 'Switch', color: '#506000', }, - inputs: ['main'], + inputs: [NodeConnectionType.Main], outputs: `={{(${configuredOutputs})($parameter)}}`, properties: [ { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts index 295d92b7a1..cfb9711917 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as customer from './customer'; import * as ticket from './ticket'; @@ -18,8 +18,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'SyncroMSP', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'syncroMspApi', diff --git a/packages/nodes-base/nodes/Taiga/Taiga.node.ts b/packages/nodes-base/nodes/Taiga/Taiga.node.ts index 8520f1b5fa..9d9a23a0af 100644 --- a/packages/nodes-base/nodes/Taiga/Taiga.node.ts +++ b/packages/nodes-base/nodes/Taiga/Taiga.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { getVersionForUpdate, @@ -39,8 +40,8 @@ export class Taiga implements INodeType { defaults: { name: 'Taiga', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'taigaApi', diff --git a/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts b/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts index 1e074e5283..7863cbcb2f 100644 --- a/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts +++ b/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts @@ -1,12 +1,13 @@ -import type { - IHookFunctions, - IDataObject, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookFunctions, - IWebhookResponseData, +import { + type IHookFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { getAutomaticSecret, taigaApiRequest } from './GenericFunctions'; @@ -28,7 +29,7 @@ export class TaigaTrigger implements INodeType { name: 'Taiga Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'taigaApi', diff --git a/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts b/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts index 3dc6933979..3678612c5b 100644 --- a/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts +++ b/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { affiliateFields, affiliateOperations } from './AffiliateDescription'; @@ -32,8 +32,8 @@ export class Tapfiliate implements INodeType { defaults: { name: 'Tapfiliate', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'tapfiliateApi', diff --git a/packages/nodes-base/nodes/Telegram/Telegram.node.ts b/packages/nodes-base/nodes/Telegram/Telegram.node.ts index 7e9f567102..f8cdb0667e 100644 --- a/packages/nodes-base/nodes/Telegram/Telegram.node.ts +++ b/packages/nodes-base/nodes/Telegram/Telegram.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { addAdditionalFields, apiRequest, getPropertyName } from './GenericFunctions'; @@ -24,8 +24,8 @@ export class Telegram implements INodeType { defaults: { name: 'Telegram', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'telegramApi', diff --git a/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts b/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts index aa9161833b..861a576834 100644 --- a/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts +++ b/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts @@ -6,6 +6,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { apiRequest, getImageBySize, getSecretToken } from './GenericFunctions'; @@ -25,7 +26,7 @@ export class TelegramTrigger implements INodeType { name: 'Telegram Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'telegramApi', diff --git a/packages/nodes-base/nodes/TheHive/TheHive.node.ts b/packages/nodes-base/nodes/TheHive/TheHive.node.ts index 02c14dd2d8..de5f9dbb61 100644 --- a/packages/nodes-base/nodes/TheHive/TheHive.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHive.node.ts @@ -1,14 +1,15 @@ /* eslint-disable @typescript-eslint/dot-notation */ -import type { - IDataObject, - IExecuteFunctions, - IHttpRequestMethods, - ILoadOptionsFunctions, - INodeExecutionData, - INodeParameters, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type IDataObject, + type IExecuteFunctions, + type IHttpRequestMethods, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeParameters, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, } from 'n8n-workflow'; import set from 'lodash/set'; @@ -48,8 +49,8 @@ export class TheHive implements INodeType { defaults: { name: 'TheHive', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'theHiveApi', diff --git a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts index a3e7b8e5e1..7cc84868c1 100644 --- a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts @@ -1,10 +1,11 @@ -import type { - IWebhookFunctions, - IDataObject, - IHookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IWebhookFunctions, + type IDataObject, + type IHookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { eventsDescription } from './descriptions/EventsDescription'; @@ -20,7 +21,7 @@ export class TheHiveTrigger implements INodeType { name: 'TheHive Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'default', diff --git a/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts b/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts index 6e8c819397..5550fdf201 100644 --- a/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts +++ b/packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.ts @@ -1,10 +1,11 @@ -import type { - IWebhookFunctions, - IDataObject, - IHookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IWebhookFunctions, + type IDataObject, + type IHookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import get from 'lodash/get'; @@ -21,7 +22,7 @@ export class TheHiveProjectTrigger implements INodeType { name: 'TheHive Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], webhooks: [ { name: 'default', diff --git a/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts b/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts index b5af7386c7..bd6ca8cf59 100644 --- a/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts +++ b/packages/nodes-base/nodes/TheHiveProject/actions/node.description.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as alert from './alert'; import * as case_ from './case'; @@ -21,8 +21,8 @@ export const description: INodeTypeDescription = { defaults: { name: 'TheHive 5', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'theHiveProjectApi', diff --git a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts index eb49ea8963..15461efdf4 100644 --- a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts +++ b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts @@ -4,7 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import pgPromise from 'pg-promise'; import { pgInsert, pgQueryV2, pgUpdate } from '../Postgres/v1/genericFunctions'; @@ -20,8 +20,8 @@ export class TimescaleDb implements INodeType { defaults: { name: 'TimescaleDB', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], parameterPane: 'wide', credentials: [ { diff --git a/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts b/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts index 6d4187225a..783db14e4c 100644 --- a/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts +++ b/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts @@ -10,6 +10,7 @@ import type { INodeTypeBaseDescription, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { todoistApiRequest } from '../GenericFunctions'; @@ -42,8 +43,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Todoist', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'todoistApi', diff --git a/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts b/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts index d0c1841ceb..f9d1a90b53 100644 --- a/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts +++ b/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts @@ -1,14 +1,15 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeListSearchResult, - INodePropertyOptions, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeListSearchResult, + type INodePropertyOptions, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { todoistApiRequest } from '../GenericFunctions'; @@ -42,8 +43,8 @@ const versionDescription: INodeTypeDescription = { defaults: { name: 'Todoist', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'todoistApi', diff --git a/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts b/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts index a95d35ce13..bfa368c1c4 100644 --- a/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts +++ b/packages/nodes-base/nodes/Toggl/TogglTrigger.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import moment from 'moment-timezone'; import { DateTime } from 'luxon'; @@ -32,7 +32,7 @@ export class TogglTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Event', diff --git a/packages/nodes-base/nodes/Totp/Totp.node.ts b/packages/nodes-base/nodes/Totp/Totp.node.ts index ed5a3a5b7a..60196b9b67 100644 --- a/packages/nodes-base/nodes/Totp/Totp.node.ts +++ b/packages/nodes-base/nodes/Totp/Totp.node.ts @@ -5,7 +5,7 @@ import type { INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import OTPAuth from 'otpauth'; @@ -21,8 +21,8 @@ export class Totp implements INodeType { defaults: { name: 'TOTP', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'totpApi', diff --git a/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts b/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts index fd918290a4..93fe13ff43 100644 --- a/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts +++ b/packages/nodes-base/nodes/Transform/Aggregate/Aggregate.node.ts @@ -9,6 +9,7 @@ import { type INodeType, type INodeTypeDescription, type IPairedItemData, + NodeConnectionType, } from 'n8n-workflow'; import { prepareFieldsArray } from '../utils/utils'; import { addBinariesToItem } from './utils'; @@ -25,8 +26,8 @@ export class Aggregate implements INodeType { defaults: { name: 'Aggregate', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Aggregate', diff --git a/packages/nodes-base/nodes/Transform/Limit/Limit.node.ts b/packages/nodes-base/nodes/Transform/Limit/Limit.node.ts index 0415520801..c68dcd15fe 100644 --- a/packages/nodes-base/nodes/Transform/Limit/Limit.node.ts +++ b/packages/nodes-base/nodes/Transform/Limit/Limit.node.ts @@ -4,6 +4,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; export class Limit implements INodeType { description: INodeTypeDescription = { @@ -17,8 +18,8 @@ export class Limit implements INodeType { defaults: { name: 'Limit', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Max Items', diff --git a/packages/nodes-base/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.ts b/packages/nodes-base/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.ts index 33260922d7..9a814f04fc 100644 --- a/packages/nodes-base/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.ts +++ b/packages/nodes-base/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.ts @@ -4,6 +4,7 @@ import lt from 'lodash/lt'; import pick from 'lodash/pick'; import { NodeOperationError, + NodeConnectionType, type IExecuteFunctions, type INodeExecutionData, type INodeType, @@ -25,8 +26,8 @@ export class RemoveDuplicates implements INodeType { defaults: { name: 'Remove Duplicates', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Compare', diff --git a/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts b/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts index 43b5fa85c0..e2e3fa4f58 100644 --- a/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts +++ b/packages/nodes-base/nodes/Transform/Sort/Sort.node.ts @@ -8,6 +8,7 @@ import { type INodeExecutionData, type INodeType, type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { sortByCode } from './utils'; import { shuffleArray } from '@utils/utilities'; @@ -24,8 +25,8 @@ export class Sort implements INodeType { defaults: { name: 'Sort', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Type', diff --git a/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts b/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts index 121a63f519..5c2a9e3a68 100644 --- a/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts +++ b/packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts @@ -1,6 +1,11 @@ import get from 'lodash/get'; import unset from 'lodash/unset'; -import { NodeOperationError, deepCopy, NodeExecutionOutput } from 'n8n-workflow'; +import { + NodeOperationError, + deepCopy, + NodeExecutionOutput, + NodeConnectionType, +} from 'n8n-workflow'; import type { IBinaryData, IDataObject, @@ -24,8 +29,8 @@ export class SplitOut implements INodeType { defaults: { name: 'Split Out', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Fields To Split Out', @@ -191,7 +196,7 @@ export class SplitOut implements INodeType { if (splited[elementIndex].binary === undefined) { splited[elementIndex].binary = {}; } - splited[elementIndex].binary![Object.keys(element)[0]] = Object.values( + splited[elementIndex].binary[Object.keys(element)[0]] = Object.values( element, )[0] as IBinaryData; diff --git a/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts b/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts index 2c4d73fcf0..12d0e06f22 100644 --- a/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts +++ b/packages/nodes-base/nodes/Transform/Summarize/Summarize.node.ts @@ -1,5 +1,6 @@ import { NodeOperationError, + NodeConnectionType, type IExecuteFunctions, type INodeExecutionData, type INodeType, @@ -28,8 +29,8 @@ export class Summarize implements INodeType { defaults: { name: 'Summarize', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Fields to Summarize', diff --git a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts index 752e13ac8e..2ff7950d70 100644 --- a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts +++ b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { buildFields, buildOperations } from './BuildDescription'; @@ -23,8 +24,8 @@ export class TravisCi implements INodeType { defaults: { name: 'TravisCI', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'travisCiApi', diff --git a/packages/nodes-base/nodes/Trello/Trello.node.ts b/packages/nodes-base/nodes/Trello/Trello.node.ts index 56648c3714..3e4d840025 100644 --- a/packages/nodes-base/nodes/Trello/Trello.node.ts +++ b/packages/nodes-base/nodes/Trello/Trello.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { apiRequest, apiRequestAllItems } from './GenericFunctions'; @@ -47,8 +47,8 @@ export class Trello implements INodeType { defaults: { name: 'Trello', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'trelloApi', diff --git a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts index cfb1faf0ab..a91cd90bf2 100644 --- a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts +++ b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { apiRequest } from './GenericFunctions'; @@ -22,7 +23,7 @@ export class TrelloTrigger implements INodeType { name: 'Trello Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'trelloApi', diff --git a/packages/nodes-base/nodes/Twake/Twake.node.ts b/packages/nodes-base/nodes/Twake/Twake.node.ts index b39f1353d1..90137be51f 100644 --- a/packages/nodes-base/nodes/Twake/Twake.node.ts +++ b/packages/nodes-base/nodes/Twake/Twake.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { twakeApiRequest } from './GenericFunctions'; @@ -24,8 +24,8 @@ export class Twake implements INodeType { defaults: { name: 'Twake', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'twakeCloudApi', diff --git a/packages/nodes-base/nodes/Twilio/Twilio.node.ts b/packages/nodes-base/nodes/Twilio/Twilio.node.ts index b3eeec537f..3ee8a914b5 100644 --- a/packages/nodes-base/nodes/Twilio/Twilio.node.ts +++ b/packages/nodes-base/nodes/Twilio/Twilio.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { escapeXml, twilioApiRequest } from './GenericFunctions'; @@ -22,8 +22,8 @@ export class Twilio implements INodeType { defaults: { name: 'Twilio', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'twilioApi', diff --git a/packages/nodes-base/nodes/Twilio/TwilioTrigger.node.ts b/packages/nodes-base/nodes/Twilio/TwilioTrigger.node.ts index 4bf3d253d6..2fbff48cc9 100644 --- a/packages/nodes-base/nodes/Twilio/TwilioTrigger.node.ts +++ b/packages/nodes-base/nodes/Twilio/TwilioTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IHookFunctions, - IWebhookFunctions, - INodeType, - INodeTypeDescription, - IWebhookResponseData, +import { + type IHookFunctions, + type IWebhookFunctions, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { twilioTriggerApiRequest } from './GenericFunctions'; @@ -22,7 +23,7 @@ export class TwilioTrigger implements INodeType { name: 'Twilio Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'twilioApi', diff --git a/packages/nodes-base/nodes/Twist/Twist.node.ts b/packages/nodes-base/nodes/Twist/Twist.node.ts index 3507fb3c0e..4eeb254df6 100644 --- a/packages/nodes-base/nodes/Twist/Twist.node.ts +++ b/packages/nodes-base/nodes/Twist/Twist.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { v4 as uuid } from 'uuid'; import moment from 'moment-timezone'; @@ -35,8 +36,8 @@ export class Twist implements INodeType { defaults: { name: 'Twist', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'twistOAuth2Api', diff --git a/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts b/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts index b87547660c..025747e06e 100644 --- a/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts +++ b/packages/nodes-base/nodes/Twitter/V1/TwitterV1.node.ts @@ -9,6 +9,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import ISO6391 from 'iso-639-1'; import { directMessageFields, directMessageOperations } from './DirectMessageDescription'; @@ -35,8 +36,8 @@ export class TwitterV1 implements INodeType { defaults: { name: 'Twitter', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'twitterOAuth1Api', diff --git a/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts b/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts index 7e3fa3c18b..02061c5e48 100644 --- a/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts +++ b/packages/nodes-base/nodes/Twitter/V2/TwitterV2.node.ts @@ -1,14 +1,15 @@ -import type { - IDataObject, - IExecuteFunctions, - ILoadOptionsFunctions, - INodeExecutionData, - INodeParameterResourceLocator, - INodePropertyOptions, - INodeType, - INodeTypeBaseDescription, - INodeTypeDescription, - JsonObject, +import { + NodeConnectionType, + type IDataObject, + type IExecuteFunctions, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeParameterResourceLocator, + type INodePropertyOptions, + type INodeType, + type INodeTypeBaseDescription, + type INodeTypeDescription, + type JsonObject, } from 'n8n-workflow'; import ISO6391 from 'iso-639-1'; @@ -38,8 +39,8 @@ export class TwitterV2 implements INodeType { defaults: { name: 'X', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'twitterOAuth2Api', diff --git a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts index 8993fb6774..4bd4860ab2 100644 --- a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts +++ b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts @@ -10,7 +10,7 @@ import type { IWebhookResponseData, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, randomString } from 'n8n-workflow'; +import { NodeApiError, NodeConnectionType, randomString } from 'n8n-workflow'; import type { ITypeformAnswer, @@ -32,7 +32,7 @@ export class TypeformTrigger implements INodeType { name: 'Typeform Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'typeformApi', diff --git a/packages/nodes-base/nodes/UProc/UProc.node.ts b/packages/nodes-base/nodes/UProc/UProc.node.ts index a923d803cf..4e54bb8be5 100644 --- a/packages/nodes-base/nodes/UProc/UProc.node.ts +++ b/packages/nodes-base/nodes/UProc/UProc.node.ts @@ -6,6 +6,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { uprocApiRequest } from './GenericFunctions'; @@ -26,8 +27,8 @@ export class UProc implements INodeType { defaults: { name: 'uProc', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'uprocApi', diff --git a/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts b/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts index 6bbab8a80e..9fd7fd1a97 100644 --- a/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts +++ b/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts @@ -1,9 +1,10 @@ -import type { - IExecuteFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -30,8 +31,8 @@ export class UnleashedSoftware implements INodeType { defaults: { name: 'Unleashed Software', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'unleashedSoftwareApi', diff --git a/packages/nodes-base/nodes/Uplead/Uplead.node.ts b/packages/nodes-base/nodes/Uplead/Uplead.node.ts index 4fffb05fd0..6f4b046e79 100644 --- a/packages/nodes-base/nodes/Uplead/Uplead.node.ts +++ b/packages/nodes-base/nodes/Uplead/Uplead.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { upleadApiRequest } from './GenericFunctions'; import { companyFields, companyOperations } from './CompanyDesciption'; import { personFields, personOperations } from './PersonDescription'; @@ -22,8 +23,8 @@ export class Uplead implements INodeType { defaults: { name: 'Uplead', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'upleadApi', diff --git a/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts b/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts index d0ade6005f..b0fc649227 100644 --- a/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts +++ b/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import moment from 'moment-timezone'; import { uptimeRobotApiRequest } from './GenericFunctions'; @@ -32,8 +33,8 @@ export class UptimeRobot implements INodeType { defaults: { name: 'UptimeRobot', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'uptimeRobotApi', diff --git a/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts b/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts index 5a8e202ed4..b20bdd3315 100644 --- a/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts +++ b/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { scanFields, scanOperations } from './descriptions'; @@ -24,8 +24,8 @@ export class UrlScanIo implements INodeType { defaults: { name: 'urlscan.io', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'urlScanIoApi', diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts index a02c8cc13d..7ac6594b1b 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { venafiApiRequest, venafiApiRequestAllItems } from './GenericFunctions'; @@ -24,8 +25,8 @@ export class VenafiTlsProtectDatacenter implements INodeType { defaults: { name: 'Venafi TLS Protect Datacenter', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'venafiTlsProtectDatacenterApi', diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts index 518e539a59..bf6bb6e9a1 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenterTrigger.node.ts @@ -1,9 +1,10 @@ -import type { - IPollFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IPollFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -30,7 +31,7 @@ export class VenafiTlsProtectDatacenterTrigger implements INodeType { ], polling: true, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Trigger On', diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts index 9538759d62..fa24b95e39 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { encryptPassphrase, venafiApiRequest, venafiApiRequestAllItems } from './GenericFunctions'; @@ -37,8 +38,8 @@ export class VenafiTlsProtectCloud implements INodeType { defaults: { name: 'Venafi TLS Protect Cloud', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'venafiTlsProtectCloudApi', diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloudTrigger.node.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloudTrigger.node.ts index 75478cc78d..4f93701c32 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloudTrigger.node.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloudTrigger.node.ts @@ -1,11 +1,12 @@ -import type { - IHookFunctions, - ILoadOptionsFunctions, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - IWebhookFunctions, - IWebhookResponseData, +import { + NodeConnectionType, + type IHookFunctions, + type ILoadOptionsFunctions, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type IWebhookFunctions, + type IWebhookResponseData, } from 'n8n-workflow'; import { venafiApiRequest } from './GenericFunctions'; @@ -36,7 +37,7 @@ export class VenafiTlsProtectCloudTrigger implements INodeType { }, ], inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { // eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options diff --git a/packages/nodes-base/nodes/Vero/Vero.node.ts b/packages/nodes-base/nodes/Vero/Vero.node.ts index c38d9ae9a0..c495112f95 100644 --- a/packages/nodes-base/nodes/Vero/Vero.node.ts +++ b/packages/nodes-base/nodes/Vero/Vero.node.ts @@ -6,7 +6,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError } from 'n8n-workflow'; +import { NodeConnectionType, NodeApiError } from 'n8n-workflow'; import { validateJSON, veroApiRequest } from './GenericFunctions'; import { userFields, userOperations } from './UserDescription'; import { eventFields, eventOperations } from './EventDescripion'; @@ -23,8 +23,8 @@ export class Vero implements INodeType { defaults: { name: 'Vero', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'veroApi', diff --git a/packages/nodes-base/nodes/Vonage/Vonage.node.ts b/packages/nodes-base/nodes/Vonage/Vonage.node.ts index 5d557119bb..609c262567 100644 --- a/packages/nodes-base/nodes/Vonage/Vonage.node.ts +++ b/packages/nodes-base/nodes/Vonage/Vonage.node.ts @@ -5,6 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { vonageApiRequest } from './GenericFunctions'; @@ -21,8 +22,8 @@ export class Vonage implements INodeType { defaults: { name: 'Vonage', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'vonageApi', diff --git a/packages/nodes-base/nodes/Wait/Wait.node.ts b/packages/nodes-base/nodes/Wait/Wait.node.ts index 10bbb01871..9f377df7f9 100644 --- a/packages/nodes-base/nodes/Wait/Wait.node.ts +++ b/packages/nodes-base/nodes/Wait/Wait.node.ts @@ -7,7 +7,7 @@ import type { IDisplayOptions, IWebhookFunctions, } from 'n8n-workflow'; -import { WAIT_TIME_UNLIMITED, NodeOperationError } from 'n8n-workflow'; +import { WAIT_TIME_UNLIMITED, NodeOperationError, NodeConnectionType } from 'n8n-workflow'; import { authenticationProperty, @@ -234,8 +234,8 @@ export class Wait extends Webhook { name: 'Wait', color: '#804050', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: credentialsProperty(this.authPropertyName), hints: [ { diff --git a/packages/nodes-base/nodes/Webflow/V1/WebflowTriggerV1.node.ts b/packages/nodes-base/nodes/Webflow/V1/WebflowTriggerV1.node.ts index 9163fd495e..7c36ed0e26 100644 --- a/packages/nodes-base/nodes/Webflow/V1/WebflowTriggerV1.node.ts +++ b/packages/nodes-base/nodes/Webflow/V1/WebflowTriggerV1.node.ts @@ -1,12 +1,13 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { - IHookFunctions, - IWebhookFunctions, - IDataObject, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - INodeTypeBaseDescription, +import { + type IHookFunctions, + type IWebhookFunctions, + type IDataObject, + type INodeType, + type INodeTypeDescription, + type IWebhookResponseData, + type INodeTypeBaseDescription, + NodeConnectionType, } from 'n8n-workflow'; import { getSites, webflowApiRequest } from '../GenericFunctions'; @@ -28,7 +29,7 @@ export class WebflowTriggerV1 implements INodeType { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'webflowApi', diff --git a/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts b/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts index d4392c2174..2985cd7369 100644 --- a/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts +++ b/packages/nodes-base/nodes/Webflow/V1/WebflowV1.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - INodeTypeBaseDescription, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type INodeTypeBaseDescription, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -29,8 +30,8 @@ export class WebflowV1 implements INodeType { defaults: { name: 'Webflow', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'webflowApi', diff --git a/packages/nodes-base/nodes/Webflow/V2/WebflowTriggerV2.node.ts b/packages/nodes-base/nodes/Webflow/V2/WebflowTriggerV2.node.ts index 560f7390ab..bc827bc11e 100644 --- a/packages/nodes-base/nodes/Webflow/V2/WebflowTriggerV2.node.ts +++ b/packages/nodes-base/nodes/Webflow/V2/WebflowTriggerV2.node.ts @@ -8,6 +8,7 @@ import type { IWebhookFunctions, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { getSites, webflowApiRequest } from '../GenericFunctions'; @@ -28,7 +29,7 @@ export class WebflowTriggerV2 implements INodeType { }, // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'webflowOAuth2Api', diff --git a/packages/nodes-base/nodes/Webflow/V2/actions/versionDescription.ts b/packages/nodes-base/nodes/Webflow/V2/actions/versionDescription.ts index 1f93d9493d..41a3ab654d 100644 --- a/packages/nodes-base/nodes/Webflow/V2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Webflow/V2/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import type { INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow'; import * as item from './Item/Item.resource'; @@ -14,8 +14,8 @@ export const versionDescription: INodeTypeDescription = { defaults: { name: 'Webflow', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'webflowOAuth2Api', diff --git a/packages/nodes-base/nodes/Webhook/Webhook.node.ts b/packages/nodes-base/nodes/Webhook/Webhook.node.ts index 88021152e1..a237ce9ada 100644 --- a/packages/nodes-base/nodes/Webhook/Webhook.node.ts +++ b/packages/nodes-base/nodes/Webhook/Webhook.node.ts @@ -292,10 +292,10 @@ export class Webhook extends Node { const processFiles: MultiPartFormData.File[] = []; let multiFile = false; if (Array.isArray(files[key])) { - processFiles.push(...(files[key] as MultiPartFormData.File[])); + processFiles.push(...files[key]); multiFile = true; } else { - processFiles.push(files[key] as MultiPartFormData.File); + processFiles.push(files[key]); } let fileCount = 0; diff --git a/packages/nodes-base/nodes/Webhook/utils.ts b/packages/nodes-base/nodes/Webhook/utils.ts index ba86f49caa..b749cd326f 100644 --- a/packages/nodes-base/nodes/Webhook/utils.ts +++ b/packages/nodes-base/nodes/Webhook/utils.ts @@ -5,10 +5,10 @@ import type { IDataObject, ICredentialDataDecryptedObject, } from 'n8n-workflow'; -import { WebhookAuthorizationError } from './error'; import basicAuth from 'basic-auth'; import jwt from 'jsonwebtoken'; import { formatPrivateKey } from '../../utils/utilities'; +import { WebhookAuthorizationError } from './error'; type WebhookParameters = { httpMethod: string; diff --git a/packages/nodes-base/nodes/Wekan/Wekan.node.ts b/packages/nodes-base/nodes/Wekan/Wekan.node.ts index dad2e479d2..be3201b517 100644 --- a/packages/nodes-base/nodes/Wekan/Wekan.node.ts +++ b/packages/nodes-base/nodes/Wekan/Wekan.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IHttpRequestMethods, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { wrapData } from '../../utils/utilities'; import { apiRequest } from './GenericFunctions'; @@ -40,8 +40,8 @@ export class Wekan implements INodeType { defaults: { name: 'Wekan', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wekanApi', diff --git a/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts b/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts index ed30f1d851..7275a9b43e 100644 --- a/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts +++ b/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.ts @@ -1,4 +1,5 @@ import type { INodeType, INodeTypeDescription } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { messageFields, messageTypeFields } from './MessagesDescription'; import { mediaFields, mediaTypeFields } from './MediaDescription'; @@ -15,8 +16,8 @@ export class WhatsApp implements INodeType { defaults: { name: 'WhatsApp Business Cloud', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'whatsAppApi', diff --git a/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts b/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts index 58444a6c62..fb0f0e40f4 100644 --- a/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts +++ b/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts @@ -7,6 +7,7 @@ import { type INodeTypeDescription, type IWebhookFunctions, type IWebhookResponseData, + NodeConnectionType, } from 'n8n-workflow'; import { appWebhookSubscriptionCreate, @@ -29,7 +30,7 @@ export class WhatsAppTrigger implements INodeType { name: 'WhatsApp Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'whatsAppTriggerApi', diff --git a/packages/nodes-base/nodes/Wise/Wise.node.ts b/packages/nodes-base/nodes/Wise/Wise.node.ts index e025adf5ee..e544bfc059 100644 --- a/packages/nodes-base/nodes/Wise/Wise.node.ts +++ b/packages/nodes-base/nodes/Wise/Wise.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import omit from 'lodash/omit'; import moment from 'moment-timezone'; @@ -48,8 +49,8 @@ export class Wise implements INodeType { defaults: { name: 'Wise', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wiseApi', diff --git a/packages/nodes-base/nodes/Wise/WiseTrigger.node.ts b/packages/nodes-base/nodes/Wise/WiseTrigger.node.ts index c9a3bf55e4..30e8c2d1ea 100644 --- a/packages/nodes-base/nodes/Wise/WiseTrigger.node.ts +++ b/packages/nodes-base/nodes/Wise/WiseTrigger.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import type { Profile } from './GenericFunctions'; import { getTriggerName, livePublicKey, testPublicKey, wiseApiRequest } from './GenericFunctions'; @@ -25,7 +26,7 @@ export class WiseTrigger implements INodeType { name: 'Wise Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wiseApi', diff --git a/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts b/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts index 6548d5486d..055d6ea6ab 100644 --- a/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts +++ b/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { adjustMetadata, @@ -41,8 +42,8 @@ export class WooCommerce implements INodeType { defaults: { name: 'WooCommerce', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wooCommerceApi', diff --git a/packages/nodes-base/nodes/WooCommerce/WooCommerceTrigger.node.ts b/packages/nodes-base/nodes/WooCommerce/WooCommerceTrigger.node.ts index af36889a38..66fbb553bf 100644 --- a/packages/nodes-base/nodes/WooCommerce/WooCommerceTrigger.node.ts +++ b/packages/nodes-base/nodes/WooCommerce/WooCommerceTrigger.node.ts @@ -7,6 +7,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { getAutomaticSecret, woocommerceApiRequest } from './GenericFunctions'; @@ -22,7 +23,7 @@ export class WooCommerceTrigger implements INodeType { name: 'WooCommerce Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wooCommerceApi', diff --git a/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts b/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts index 2be63e30ad..98230c4c82 100644 --- a/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts +++ b/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts @@ -7,6 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { wordpressApiRequest, wordpressApiRequestAllItems } from './GenericFunctions'; import { postFields, postOperations } from './PostDescription'; import { pageFields, pageOperations } from './PageDescription'; @@ -28,8 +29,8 @@ export class Wordpress implements INodeType { defaults: { name: 'Wordpress', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wordpressApi', diff --git a/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts b/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts index 6c7c13bf89..1241cf5691 100644 --- a/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts +++ b/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts @@ -8,6 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { workableApiRequest } from './GenericFunctions'; @@ -26,7 +27,7 @@ export class WorkableTrigger implements INodeType { name: 'Workable Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'workableApi', diff --git a/packages/nodes-base/nodes/WorkflowTrigger/WorkflowTrigger.node.ts b/packages/nodes-base/nodes/WorkflowTrigger/WorkflowTrigger.node.ts index d3ccad98bb..7c6a2babf1 100644 --- a/packages/nodes-base/nodes/WorkflowTrigger/WorkflowTrigger.node.ts +++ b/packages/nodes-base/nodes/WorkflowTrigger/WorkflowTrigger.node.ts @@ -4,6 +4,7 @@ import type { INodeTypeDescription, ITriggerResponse, } from 'n8n-workflow'; +import { NodeConnectionType } from 'n8n-workflow'; type eventType = 'Workflow activated' | 'Workflow updated' | undefined; type activationType = 'activate' | 'update'; @@ -25,7 +26,7 @@ export class WorkflowTrigger implements INodeType { color: '#ff6d5a', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Events', diff --git a/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts b/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts index cb99c492aa..29dc40993a 100644 --- a/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts +++ b/packages/nodes-base/nodes/WriteBinaryFile/WriteBinaryFile.node.ts @@ -1,6 +1,6 @@ import type { Readable } from 'stream'; -import { BINARY_ENCODING } from 'n8n-workflow'; +import { BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData, @@ -21,8 +21,8 @@ export class WriteBinaryFile implements INodeType { name: 'Write Binary File', color: '#CC2233', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'File Name', diff --git a/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts b/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts index bd10e1ea90..e0276b2e1b 100644 --- a/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts +++ b/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts @@ -9,7 +9,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { jsonParse } from 'n8n-workflow'; +import { NodeConnectionType, jsonParse } from 'n8n-workflow'; import { wufooApiRequest } from './GenericFunctions'; @@ -28,7 +28,7 @@ export class WufooTrigger implements INodeType { name: 'Wufoo Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'wufooApi', diff --git a/packages/nodes-base/nodes/Xero/Xero.node.ts b/packages/nodes-base/nodes/Xero/Xero.node.ts index a05a20c621..79df82e971 100644 --- a/packages/nodes-base/nodes/Xero/Xero.node.ts +++ b/packages/nodes-base/nodes/Xero/Xero.node.ts @@ -1,12 +1,13 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, - JsonObject, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + type JsonObject, + NodeConnectionType, } from 'n8n-workflow'; import { xeroApiRequest, xeroApiRequestAllItems } from './GenericFunctions'; @@ -31,8 +32,8 @@ export class Xero implements INodeType { defaults: { name: 'Xero', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'xeroOAuth2Api', diff --git a/packages/nodes-base/nodes/Xml/Xml.node.ts b/packages/nodes-base/nodes/Xml/Xml.node.ts index d603b7e37e..3c2cc455e9 100644 --- a/packages/nodes-base/nodes/Xml/Xml.node.ts +++ b/packages/nodes-base/nodes/Xml/Xml.node.ts @@ -5,7 +5,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError, deepCopy } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError, deepCopy } from 'n8n-workflow'; export class Xml implements INodeType { description: INodeTypeDescription = { @@ -21,8 +21,8 @@ export class Xml implements INodeType { name: 'XML', color: '#333377', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Mode', diff --git a/packages/nodes-base/nodes/Yourls/Yourls.node.ts b/packages/nodes-base/nodes/Yourls/Yourls.node.ts index f21b435acf..3c41e9112e 100644 --- a/packages/nodes-base/nodes/Yourls/Yourls.node.ts +++ b/packages/nodes-base/nodes/Yourls/Yourls.node.ts @@ -1,9 +1,10 @@ -import type { - IExecuteFunctions, - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { yourlsApiRequest } from './GenericFunctions'; @@ -23,8 +24,8 @@ export class Yourls implements INodeType { defaults: { name: 'Yourls', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'yourlsApi', diff --git a/packages/nodes-base/nodes/Zammad/Zammad.node.ts b/packages/nodes-base/nodes/Zammad/Zammad.node.ts index f4282ee7d3..67c5a4694b 100644 --- a/packages/nodes-base/nodes/Zammad/Zammad.node.ts +++ b/packages/nodes-base/nodes/Zammad/Zammad.node.ts @@ -10,7 +10,7 @@ import type { INodeTypeDescription, IRequestOptions, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { groupDescription, @@ -53,8 +53,8 @@ export class Zammad implements INodeType { defaults: { name: 'Zammad', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'zammadBasicAuthApi', diff --git a/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts b/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts index 0d82fe3c4d..4dc8927a89 100644 --- a/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts +++ b/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, JsonObject, } from 'n8n-workflow'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError, NodeOperationError, NodeConnectionType } from 'n8n-workflow'; import { validateJSON, zendeskApiRequest, zendeskApiRequestAllItems } from './GenericFunctions'; @@ -34,8 +34,8 @@ export class Zendesk implements INodeType { defaults: { name: 'Zendesk', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'zendeskApi', diff --git a/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts b/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts index 92b0d88fd2..2e9b06b13f 100644 --- a/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts +++ b/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts @@ -8,7 +8,7 @@ import type { INodeTypeDescription, IWebhookResponseData, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { zendeskApiRequest, zendeskApiRequestAllItems } from './GenericFunctions'; import { conditionFields } from './ConditionDescription'; @@ -27,7 +27,7 @@ export class ZendeskTrigger implements INodeType { name: 'Zendesk Trigger', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'zendeskApi', diff --git a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts index c7cc56a5b1..09c38cb354 100644 --- a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts +++ b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts @@ -1,10 +1,11 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import { @@ -77,8 +78,8 @@ export class ZohoCrm implements INodeType { defaults: { name: 'Zoho CRM', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'zohoOAuth2Api', diff --git a/packages/nodes-base/nodes/Zoom/Zoom.node.ts b/packages/nodes-base/nodes/Zoom/Zoom.node.ts index 9af800bbd6..baea0e1904 100644 --- a/packages/nodes-base/nodes/Zoom/Zoom.node.ts +++ b/packages/nodes-base/nodes/Zoom/Zoom.node.ts @@ -1,11 +1,12 @@ -import type { - IExecuteFunctions, - IDataObject, - ILoadOptionsFunctions, - INodeExecutionData, - INodePropertyOptions, - INodeType, - INodeTypeDescription, +import { + type IExecuteFunctions, + type IDataObject, + type ILoadOptionsFunctions, + type INodeExecutionData, + type INodePropertyOptions, + type INodeType, + type INodeTypeDescription, + NodeConnectionType, } from 'n8n-workflow'; import moment from 'moment-timezone'; @@ -53,8 +54,8 @@ export class Zoom implements INodeType { name: 'Zoom', }, icon: 'file:zoom.svg', - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { // create a JWT app on Zoom Marketplace diff --git a/packages/nodes-base/nodes/Zulip/Zulip.node.ts b/packages/nodes-base/nodes/Zulip/Zulip.node.ts index 034f2ef9b8..2d620511fb 100644 --- a/packages/nodes-base/nodes/Zulip/Zulip.node.ts +++ b/packages/nodes-base/nodes/Zulip/Zulip.node.ts @@ -7,7 +7,7 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { NodeOperationError } from 'n8n-workflow'; +import { NodeConnectionType, NodeOperationError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; import { validateJSON, zulipApiRequest } from './GenericFunctions'; import { messageFields, messageOperations } from './MessageDescription'; @@ -29,8 +29,8 @@ export class Zulip implements INodeType { defaults: { name: 'Zulip', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'zulipApi', diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index d17408293f..475b81e5f1 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -910,7 +910,7 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn & parentCallbackManager?: CallbackManager, ): Promise; getInputConnectionData( - inputName: ConnectionTypes, + inputName: NodeConnectionType, itemIndex: number, inputIndex?: number, ): Promise; @@ -923,12 +923,12 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn & // TODO: Make this one then only available in the new config one addInputData( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, data: INodeExecutionData[][] | ExecutionError, runIndex?: number, ): { index: number }; addOutputData( - connectionType: ConnectionTypes, + connectionType: NodeConnectionType, currentNodeRunIndex: number, data: INodeExecutionData[][] | ExecutionError, ): void; @@ -1049,7 +1049,7 @@ export interface IWebhookFunctions extends FunctionsBaseWithRequiredKeys<'getMod getBodyData(): IDataObject; getHeaderData(): IncomingHttpHeaders; getInputConnectionData( - inputName: ConnectionTypes, + inputName: NodeConnectionType, itemIndex: number, inputIndex?: number, ): Promise; @@ -1758,21 +1758,6 @@ export interface IPostReceiveSort extends IPostReceiveBase { }; } -export type ConnectionTypes = - | 'ai_agent' - | 'ai_chain' - | 'ai_document' - | 'ai_embedding' - | 'ai_languageModel' - | 'ai_memory' - | 'ai_outputParser' - | 'ai_retriever' - | 'ai_textSplitter' - | 'ai_tool' - | 'ai_vectorRetriever' - | 'ai_vectorStore' - | 'main'; - export const enum NodeConnectionType { AiAgent = 'ai_agent', @@ -1825,7 +1810,7 @@ export interface INodeInputConfiguration { category?: string; displayName?: string; required?: boolean; - type: ConnectionTypes; + type: NodeConnectionType; filter?: INodeInputFilter; maxConnections?: number; } @@ -1835,7 +1820,7 @@ export interface INodeOutputConfiguration { displayName?: string; maxConnections?: number; required?: boolean; - type: ConnectionTypes; + type: NodeConnectionType; } export type ExpressionString = `={{${string}}}`; @@ -1853,10 +1838,10 @@ export interface INodeTypeDescription extends INodeTypeBaseDescription { defaults: NodeDefaults; eventTriggerDescription?: string; activationMessage?: string; - inputs: Array | ExpressionString; + inputs: Array | ExpressionString; requiredInputs?: string | number[] | number; // Ony available with executionOrder => "v1" inputNames?: string[]; - outputs: Array | ExpressionString; + outputs: Array | ExpressionString; outputNames?: string[]; properties: INodeProperties[]; credentials?: INodeCredentialDescription[]; diff --git a/packages/workflow/src/NodeHelpers.ts b/packages/workflow/src/NodeHelpers.ts index 485ad0d9b1..635bccddfe 100644 --- a/packages/workflow/src/NodeHelpers.ts +++ b/packages/workflow/src/NodeHelpers.ts @@ -35,7 +35,6 @@ import type { IWorkflowExecuteAdditionalData, NodeParameterValue, ResourceMapperValue, - ConnectionTypes, INodeTypeDescription, INodeOutputConfiguration, INodeInputConfiguration, @@ -1245,8 +1244,8 @@ export function getNodeWebhookUrl( } export function getConnectionTypes( - connections: Array, -): ConnectionTypes[] { + connections: Array, +): NodeConnectionType[] { return connections .map((connection) => { if (typeof connection === 'string') { @@ -1261,7 +1260,7 @@ export function getNodeInputs( workflow: Workflow, node: INode, nodeTypeData: INodeTypeDescription, -): Array { +): Array { if (Array.isArray(nodeTypeData?.inputs)) { return nodeTypeData.inputs; } @@ -1273,7 +1272,7 @@ export function getNodeInputs( nodeTypeData.inputs, 'internal', {}, - ) || []) as ConnectionTypes[]; + ) || []) as NodeConnectionType[]; } catch (e) { console.warn('Could not calculate inputs dynamically for node: ', node.name); return []; @@ -1353,8 +1352,8 @@ export function getNodeOutputs( workflow: Workflow, node: INode, nodeTypeData: INodeTypeDescription, -): Array { - let outputs: Array = []; +): Array { + let outputs: Array = []; if (Array.isArray(nodeTypeData.outputs)) { outputs = nodeTypeData.outputs; @@ -1366,7 +1365,7 @@ export function getNodeOutputs( nodeTypeData.outputs, 'internal', {}, - ) || []) as ConnectionTypes[]; + ) || []) as NodeConnectionType[]; } catch (e) { console.warn('Could not calculate outputs dynamically for node: ', node.name); } @@ -1389,7 +1388,7 @@ export function getNodeOutputs( ...outputs, { category: 'error', - type: 'main', + type: NodeConnectionType.Main, displayName: 'Error', }, ]; diff --git a/packages/workflow/src/Workflow.ts b/packages/workflow/src/Workflow.ts index ef0539db28..aa4131bfc6 100644 --- a/packages/workflow/src/Workflow.ts +++ b/packages/workflow/src/Workflow.ts @@ -41,7 +41,6 @@ import type { IRun, IRunNodeResponse, NodeParameterValueType, - ConnectionTypes, CloseFunction, INodeOutputConfiguration, } from './Interfaces'; @@ -580,11 +579,11 @@ export class Workflow { /** * Finds the highest parent nodes of the node with the given name * - * @param {ConnectionTypes} [type='main'] + * @param {NodeConnectionType} [type='main'] */ getHighestNode( nodeName: string, - type: ConnectionTypes = 'main', + type: NodeConnectionType = NodeConnectionType.Main, nodeConnectionIndex?: number, checkedNodes?: string[], ): string[] { @@ -664,7 +663,7 @@ export class Workflow { */ getChildNodes( nodeName: string, - type: ConnectionTypes | 'ALL' | 'ALL_NON_MAIN' = 'main', + type: NodeConnectionType | 'ALL' | 'ALL_NON_MAIN' = NodeConnectionType.Main, depth = -1, ): string[] { return this.getConnectedNodes(this.connectionsBySourceNode, nodeName, type, depth); @@ -673,12 +672,12 @@ export class Workflow { /** * Returns all the nodes before the given one * - * @param {ConnectionTypes} [type='main'] + * @param {NodeConnectionType} [type='main'] * @param {*} [depth=-1] */ getParentNodes( nodeName: string, - type: ConnectionTypes | 'ALL' | 'ALL_NON_MAIN' = 'main', + type: NodeConnectionType | 'ALL' | 'ALL_NON_MAIN' = NodeConnectionType.Main, depth = -1, ): string[] { return this.getConnectedNodes(this.connectionsByDestinationNode, nodeName, type, depth); @@ -688,13 +687,13 @@ export class Workflow { * Gets all the nodes which are connected nodes starting from * the given one * - * @param {ConnectionTypes} [type='main'] + * @param {NodeConnectionType} [type='main'] * @param {*} [depth=-1] */ getConnectedNodes( connections: IConnections, nodeName: string, - connectionType: ConnectionTypes | 'ALL' | 'ALL_NON_MAIN' = 'main', + connectionType: NodeConnectionType | 'ALL' | 'ALL_NON_MAIN' = NodeConnectionType.Main, depth = -1, checkedNodesIncoming?: string[], ): string[] { @@ -710,13 +709,13 @@ export class Workflow { return []; } - let types: ConnectionTypes[]; + let types: NodeConnectionType[]; if (connectionType === 'ALL') { - types = Object.keys(connections[nodeName]) as ConnectionTypes[]; + types = Object.keys(connections[nodeName]) as NodeConnectionType[]; } else if (connectionType === 'ALL_NON_MAIN') { types = Object.keys(connections[nodeName]).filter( (type) => type !== 'main', - ) as ConnectionTypes[]; + ) as NodeConnectionType[]; } else { types = [connectionType]; } @@ -800,7 +799,7 @@ export class Workflow { searchNodesBFS(connections: IConnections, sourceNode: string, maxDepth = -1): IConnectedNode[] { const returnConns: IConnectedNode[] = []; - const type: ConnectionTypes = 'main'; + const type: NodeConnectionType = NodeConnectionType.Main; let queue: IConnectedNode[] = []; queue.push({ name: sourceNode, @@ -907,7 +906,7 @@ export class Workflow { getNodeConnectionIndexes( nodeName: string, parentNodeName: string, - type: ConnectionTypes = 'main', + type: NodeConnectionType = NodeConnectionType.Main, depth = -1, checkedNodes?: string[], ): INodeConnection | undefined { diff --git a/packages/workflow/src/WorkflowDataProxy.ts b/packages/workflow/src/WorkflowDataProxy.ts index 5c2d360527..8e9cf49f03 100644 --- a/packages/workflow/src/WorkflowDataProxy.ts +++ b/packages/workflow/src/WorkflowDataProxy.ts @@ -5,21 +5,22 @@ import { DateTime, Duration, Interval, Settings } from 'luxon'; import * as jmespath from 'jmespath'; -import type { - IDataObject, - IExecuteData, - INodeExecutionData, - INodeParameters, - IPairedItemData, - IRunExecutionData, - ISourceData, - ITaskData, - IWorkflowDataProxyAdditionalKeys, - IWorkflowDataProxyData, - INodeParameterResourceLocator, - NodeParameterValueType, - WorkflowExecuteMode, - ProxyInput, +import { + type IDataObject, + type IExecuteData, + type INodeExecutionData, + type INodeParameters, + type IPairedItemData, + type IRunExecutionData, + type ISourceData, + type ITaskData, + type IWorkflowDataProxyAdditionalKeys, + type IWorkflowDataProxyData, + type INodeParameterResourceLocator, + type NodeParameterValueType, + type WorkflowExecuteMode, + type ProxyInput, + NodeConnectionType, } from './Interfaces'; import * as NodeHelpers from './NodeHelpers'; import { ExpressionError, type ExpressionErrorOptions } from './errors/expression.error'; @@ -346,7 +347,7 @@ export class WorkflowDataProxy { const nodeConnection = that.workflow.getNodeConnectionIndexes( that.contextNodeName, nodeName, - 'main', + NodeConnectionType.Main, ); if (nodeConnection === undefined) { diff --git a/packages/workflow/test/NodeHelpers.test.ts b/packages/workflow/test/NodeHelpers.test.ts index 142bc82a20..7dd3603130 100644 --- a/packages/workflow/test/NodeHelpers.test.ts +++ b/packages/workflow/test/NodeHelpers.test.ts @@ -1,9 +1,10 @@ -import type { - INode, - INodeParameters, - INodeProperties, - INodeType, - INodeTypeDescription, +import { + NodeConnectionType, + type INode, + type INodeParameters, + type INodeProperties, + type INodeType, + type INodeTypeDescription, } from '@/Interfaces'; import type { Workflow } from '@/Workflow'; import { @@ -3573,9 +3574,9 @@ describe('NodeHelpers', () => { [false, null], [false, { outputs: '={{random_expression}}' }], [false, { outputs: [] }], - [false, { outputs: ['main'] }], - [true, { outputs: ['ai_agent'] }], - [true, { outputs: ['main', 'ai_agent'] }], + [false, { outputs: [NodeConnectionType.Main] }], + [true, { outputs: [NodeConnectionType.AiAgent] }], + [true, { outputs: [NodeConnectionType.Main, NodeConnectionType.AiAgent] }], ]; test.each(tests)('should return %p for %o', (expected, nodeType) => { expect(isSubNodeType(nodeType)).toBe(expected); diff --git a/packages/workflow/test/NodeTypes.ts b/packages/workflow/test/NodeTypes.ts index 14ed8e1ed5..f255d92e62 100644 --- a/packages/workflow/test/NodeTypes.ts +++ b/packages/workflow/test/NodeTypes.ts @@ -1,11 +1,12 @@ import { mock } from 'jest-mock-extended'; -import type { - IDataObject, - INodeType, - INodeTypeData, - INodeTypes, - IVersionedNodeType, - LoadedClass, +import { + NodeConnectionType, + type IDataObject, + type INodeType, + type INodeTypeData, + type INodeTypes, + type IVersionedNodeType, + type LoadedClass, } from '@/Interfaces'; import * as NodeHelpers from '@/NodeHelpers'; @@ -60,8 +61,8 @@ const googleSheetsNode: LoadedClass = { defaults: { name: 'Google Sheets', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], credentials: [ { name: 'googleApi', @@ -286,9 +287,9 @@ const googleSheetsNode: LoadedClass = { displayName: 'Google Sheets', group: ['input', 'output'], icon: 'file:googleSheets.svg', - inputs: ['main'], + inputs: [NodeConnectionType.Main], name: 'googleSheets', - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { default: 'oAuth2', @@ -551,8 +552,8 @@ const setNode: LoadedClass = { name: 'Set', color: '#0000FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Value1', @@ -588,7 +589,7 @@ const manualTriggerNode: LoadedClass = { color: '#909298', }, inputs: [], - outputs: ['main'], + outputs: [NodeConnectionType.Main], properties: [ { displayName: @@ -621,8 +622,8 @@ export class NodeTypes implements INodeTypes { name: 'Set Multi', color: '#0000FF', }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionType.Main], + outputs: [NodeConnectionType.Main], properties: [ { displayName: 'Values',