n8n-nodes-base 0.234.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/credentials/GoogleDriveOAuth2Api.credentials.js +0 -6
- package/dist/credentials/GoogleDriveOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/{BrevoApi.credentials.d.ts → SendInBlueApi.credentials.d.ts} +1 -1
- package/dist/credentials/{BrevoApi.credentials.js → SendInBlueApi.credentials.js} +7 -7
- package/dist/credentials/SendInBlueApi.credentials.js.map +1 -0
- package/dist/credentials/TwitterOAuth1Api.credentials.js +0 -6
- package/dist/credentials/TwitterOAuth1Api.credentials.js.map +1 -1
- package/dist/known/credentials.json +11 -35
- package/dist/known/nodes.json +8 -16
- package/dist/nodes/Code/Code.node.js +1 -2
- package/dist/nodes/Code/Code.node.js.map +1 -1
- package/dist/nodes/CompareDatasets/CompareDatasets.node.js +2 -1
- package/dist/nodes/CompareDatasets/CompareDatasets.node.js.map +1 -1
- package/dist/nodes/CompareDatasets/test/node/workflow.compareDatasets.forceInputNodeExecution.json +211 -0
- package/dist/nodes/Google/Drive/{v1/GenericFunctions.js → GenericFunctions.js} +1 -1
- package/dist/nodes/Google/Drive/GenericFunctions.js.map +1 -0
- package/dist/nodes/Google/Drive/GoogleDrive.node.d.ts +12 -3
- package/dist/nodes/Google/Drive/GoogleDrive.node.js +2301 -10
- package/dist/nodes/Google/Drive/GoogleDrive.node.js.map +1 -1
- package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.d.ts +1 -1
- package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js +2 -2
- package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js.map +1 -1
- package/dist/nodes/Google/Drive/SearchFunctions.js.map +1 -0
- package/dist/nodes/GraphQL/GraphQL.node.js +0 -32
- package/dist/nodes/GraphQL/GraphQL.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +0 -22
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
- package/dist/nodes/ItemLists/ItemLists.node.js +1 -3
- package/dist/nodes/ItemLists/ItemLists.node.js.map +1 -1
- package/dist/nodes/Matrix/GenericFunctions.js +2 -8
- package/dist/nodes/Matrix/GenericFunctions.js.map +1 -1
- package/dist/nodes/Matrix/MediaDescription.js +1 -23
- package/dist/nodes/Matrix/MediaDescription.js.map +1 -1
- package/dist/nodes/Merge/Merge.node.js +1 -0
- package/dist/nodes/Merge/Merge.node.js.map +1 -1
- package/dist/nodes/Merge/test/node/workflow.mixed.forceInputNodeExecution.json +2440 -0
- package/dist/nodes/Merge/test/node/workflow.mixed.not.forceInputNodeExecution.json +2378 -0
- package/dist/nodes/Merge/v2/MergeV2.node.js +21 -1
- package/dist/nodes/Merge/v2/MergeV2.node.js.map +1 -1
- package/dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js +0 -7
- package/dist/nodes/Microsoft/ToDo/MicrosoftToDo.node.js.map +1 -1
- package/dist/nodes/Microsoft/ToDo/TaskDescription.js +0 -7
- package/dist/nodes/Microsoft/ToDo/TaskDescription.js.map +1 -1
- package/dist/nodes/Notion/DatabasePageDescription.js +0 -41
- package/dist/nodes/Notion/DatabasePageDescription.js.map +1 -1
- package/dist/nodes/Notion/v2/NotionV2.node.js +0 -9
- package/dist/nodes/Notion/v2/NotionV2.node.js.map +1 -1
- package/dist/nodes/Salesforce/ContactDescription.js +3 -3
- package/dist/nodes/Salesforce/ContactDescription.js.map +1 -1
- package/dist/nodes/{Brevo → SendInBlue}/AttributeDescription.js +1 -1
- package/dist/nodes/SendInBlue/AttributeDescription.js.map +1 -0
- package/dist/nodes/SendInBlue/ContactDescription.js.map +1 -0
- package/dist/nodes/{Brevo → SendInBlue}/EmailDescription.js +10 -10
- package/dist/nodes/SendInBlue/EmailDescription.js.map +1 -0
- package/dist/nodes/{Brevo → SendInBlue}/GenericFunctions.d.ts +2 -2
- package/dist/nodes/{Brevo → SendInBlue}/GenericFunctions.js +14 -14
- package/dist/nodes/SendInBlue/GenericFunctions.js.map +1 -0
- package/dist/nodes/{Brevo/Brevo.node.d.ts → SendInBlue/SendInBlue.node.d.ts} +1 -1
- package/dist/nodes/{Brevo/Brevo.node.js → SendInBlue/SendInBlue.node.js} +9 -9
- package/dist/nodes/SendInBlue/SendInBlue.node.js.map +1 -0
- package/dist/nodes/{Brevo/Brevo.node.json → SendInBlue/SendInBlue.node.json} +4 -5
- package/dist/nodes/{Brevo/BrevoTrigger.node.d.ts → SendInBlue/SendInBlueTrigger.node.d.ts} +1 -1
- package/dist/nodes/{Brevo/BrevoTrigger.node.js → SendInBlue/SendInBlueTrigger.node.js} +11 -11
- package/dist/nodes/SendInBlue/SendInBlueTrigger.node.js.map +1 -0
- package/dist/nodes/{Brevo/BrevoTrigger.node.json → SendInBlue/SendInBlueTrigger.node.json} +4 -5
- package/dist/nodes/SendInBlue/SenderDescrition.js.map +1 -0
- package/dist/nodes/SendInBlue/sendinblue.svg +20 -0
- package/dist/nodes/Strava/ActivityDescription.js +0 -7
- package/dist/nodes/Strava/ActivityDescription.js.map +1 -1
- package/dist/nodes/Strava/Strava.node.js +6 -0
- package/dist/nodes/Strava/Strava.node.js.map +1 -1
- package/dist/nodes/Twitter/DirectMessageDescription.js.map +1 -0
- package/dist/nodes/Twitter/GenericFunctions.js.map +1 -0
- package/dist/nodes/Twitter/TweetDescription.js.map +1 -0
- package/dist/nodes/Twitter/TweetInterface.js.map +1 -0
- package/dist/nodes/Twitter/Twitter.node.d.ts +9 -3
- package/dist/nodes/Twitter/Twitter.node.js +224 -12
- package/dist/nodes/Twitter/Twitter.node.js.map +1 -1
- package/dist/nodes/Twitter/Twitter.node.json +1 -2
- package/dist/nodes/Wait/Wait.node.d.ts +4 -7
- package/dist/nodes/Wait/Wait.node.js +499 -77
- package/dist/nodes/Wait/Wait.node.js.map +1 -1
- package/dist/nodes/Webhook/Webhook.node.d.ts +3 -8
- package/dist/nodes/Webhook/Webhook.node.js +460 -148
- package/dist/nodes/Webhook/Webhook.node.js.map +1 -1
- package/dist/types/credentials.json +3 -6
- package/dist/types/nodes.json +21 -26
- package/package.json +6 -12
- package/dist/credentials/BrevoApi.credentials.js.map +0 -1
- package/dist/credentials/CrowdDevApi.credentials.d.ts +0 -9
- package/dist/credentials/CrowdDevApi.credentials.js +0 -62
- package/dist/credentials/CrowdDevApi.credentials.js.map +0 -1
- package/dist/credentials/HttpCustomAuth.credentials.d.ts +0 -9
- package/dist/credentials/HttpCustomAuth.credentials.js +0 -25
- package/dist/credentials/HttpCustomAuth.credentials.js.map +0 -1
- package/dist/credentials/TwitterOAuth2Api.credentials.d.ts +0 -8
- package/dist/credentials/TwitterOAuth2Api.credentials.js +0 -73
- package/dist/credentials/TwitterOAuth2Api.credentials.js.map +0 -1
- package/dist/nodes/Brevo/AttributeDescription.js.map +0 -1
- package/dist/nodes/Brevo/Brevo.node.js.map +0 -1
- package/dist/nodes/Brevo/BrevoTrigger.node.js.map +0 -1
- package/dist/nodes/Brevo/ContactDescription.js.map +0 -1
- package/dist/nodes/Brevo/EmailDescription.js.map +0 -1
- package/dist/nodes/Brevo/GenericFunctions.js.map +0 -1
- package/dist/nodes/Brevo/SenderDescrition.js.map +0 -1
- package/dist/nodes/Brevo/brevo.svg +0 -4
- package/dist/nodes/CrowdDev/CrowdDev.node.d.ts +0 -4
- package/dist/nodes/CrowdDev/CrowdDev.node.js +0 -36
- package/dist/nodes/CrowdDev/CrowdDev.node.js.map +0 -1
- package/dist/nodes/CrowdDev/CrowdDev.node.json +0 -18
- package/dist/nodes/CrowdDev/CrowdDevTrigger.node.d.ts +0 -12
- package/dist/nodes/CrowdDev/CrowdDevTrigger.node.js +0 -145
- package/dist/nodes/CrowdDev/CrowdDevTrigger.node.js.map +0 -1
- package/dist/nodes/CrowdDev/CrowdDevTrigger.node.json +0 -18
- package/dist/nodes/CrowdDev/GenericFunctions.d.ts +0 -7
- package/dist/nodes/CrowdDev/GenericFunctions.js +0 -157
- package/dist/nodes/CrowdDev/GenericFunctions.js.map +0 -1
- package/dist/nodes/CrowdDev/crowdDev.svg +0 -15
- package/dist/nodes/CrowdDev/descriptions/activityFields.d.ts +0 -4
- package/dist/nodes/CrowdDev/descriptions/activityFields.js +0 -180
- package/dist/nodes/CrowdDev/descriptions/activityFields.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/automationFields.d.ts +0 -4
- package/dist/nodes/CrowdDev/descriptions/automationFields.js +0 -126
- package/dist/nodes/CrowdDev/descriptions/automationFields.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/index.d.ts +0 -2
- package/dist/nodes/CrowdDev/descriptions/index.js +0 -26
- package/dist/nodes/CrowdDev/descriptions/index.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/memberFields.d.ts +0 -4
- package/dist/nodes/CrowdDev/descriptions/memberFields.js +0 -291
- package/dist/nodes/CrowdDev/descriptions/memberFields.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/noteFields.d.ts +0 -4
- package/dist/nodes/CrowdDev/descriptions/noteFields.js +0 -90
- package/dist/nodes/CrowdDev/descriptions/noteFields.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/organizationFields.d.ts +0 -4
- package/dist/nodes/CrowdDev/descriptions/organizationFields.js +0 -146
- package/dist/nodes/CrowdDev/descriptions/organizationFields.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/resources.d.ts +0 -2
- package/dist/nodes/CrowdDev/descriptions/resources.js +0 -38
- package/dist/nodes/CrowdDev/descriptions/resources.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/shared.d.ts +0 -2
- package/dist/nodes/CrowdDev/descriptions/shared.js +0 -29
- package/dist/nodes/CrowdDev/descriptions/shared.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/taskFields.d.ts +0 -4
- package/dist/nodes/CrowdDev/descriptions/taskFields.js +0 -159
- package/dist/nodes/CrowdDev/descriptions/taskFields.js.map +0 -1
- package/dist/nodes/CrowdDev/descriptions/utils.d.ts +0 -5
- package/dist/nodes/CrowdDev/descriptions/utils.js +0 -55
- package/dist/nodes/CrowdDev/descriptions/utils.js.map +0 -1
- package/dist/nodes/Google/Drive/test/v2/node/helpers.d.ts +0 -3
- package/dist/nodes/Google/Drive/test/v2/node/helpers.js +0 -34
- package/dist/nodes/Google/Drive/test/v2/node/helpers.js.map +0 -1
- package/dist/nodes/Google/Drive/v1/GenericFunctions.js.map +0 -1
- package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.d.ts +0 -14
- package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.js +0 -2324
- package/dist/nodes/Google/Drive/v1/GoogleDriveV1.node.js.map +0 -1
- package/dist/nodes/Google/Drive/v1/SearchFunctions.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/GoogleDriveV2.node.d.ts +0 -10
- package/dist/nodes/Google/Drive/v2/GoogleDriveV2.node.js +0 -20
- package/dist/nodes/Google/Drive/v2/GoogleDriveV2.node.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/common.descriptions.d.ts +0 -19
- package/dist/nodes/Google/Drive/v2/actions/common.descriptions.js +0 -598
- package/dist/nodes/Google/Drive/v2/actions/common.descriptions.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/drive/Drive.resource.d.ts +0 -8
- package/dist/nodes/Google/Drive/v2/actions/drive/Drive.resource.js +0 -88
- package/dist/nodes/Google/Drive/v2/actions/drive/Drive.resource.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.js +0 -235
- package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.js +0 -31
- package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.js +0 -50
- package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.js +0 -81
- package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.js +0 -100
- package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/File.resource.d.ts +0 -11
- package/dist/nodes/Google/Drive/v2/actions/file/File.resource.js +0 -115
- package/dist/nodes/Google/Drive/v2/actions/file/File.resource.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.js +0 -104
- package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.js +0 -134
- package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.js +0 -57
- package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/download.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/download.operation.js +0 -218
- package/dist/nodes/Google/Drive/v2/actions/file/download.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/move.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/move.operation.js +0 -60
- package/dist/nodes/Google/Drive/v2/actions/file/move.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/share.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/share.operation.js +0 -43
- package/dist/nodes/Google/Drive/v2/actions/file/share.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/update.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/update.operation.js +0 -221
- package/dist/nodes/Google/Drive/v2/actions/file/update.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.js +0 -135
- package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/FileFolder.resource.d.ts +0 -4
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/FileFolder.resource.js +0 -52
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/FileFolder.resource.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.js +0 -335
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/folder/Folder.resource.d.ts +0 -6
- package/dist/nodes/Google/Drive/v2/actions/folder/Folder.resource.js +0 -70
- package/dist/nodes/Google/Drive/v2/actions/folder/Folder.resource.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.js +0 -92
- package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.js +0 -59
- package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.d.ts +0 -23
- package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.js +0 -43
- package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/node.type.d.ts +0 -9
- package/dist/nodes/Google/Drive/v2/actions/node.type.js +0 -3
- package/dist/nodes/Google/Drive/v2/actions/node.type.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/router.d.ts +0 -2
- package/dist/nodes/Google/Drive/v2/actions/router.js +0 -76
- package/dist/nodes/Google/Drive/v2/actions/router.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/actions/versionDescription.d.ts +0 -2
- package/dist/nodes/Google/Drive/v2/actions/versionDescription.js +0 -112
- package/dist/nodes/Google/Drive/v2/actions/versionDescription.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/helpers/interfaces.d.ts +0 -34
- package/dist/nodes/Google/Drive/v2/helpers/interfaces.js +0 -26
- package/dist/nodes/Google/Drive/v2/helpers/interfaces.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/helpers/utils.d.ts +0 -15
- package/dist/nodes/Google/Drive/v2/helpers/utils.js +0 -104
- package/dist/nodes/Google/Drive/v2/helpers/utils.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/methods/index.d.ts +0 -1
- package/dist/nodes/Google/Drive/v2/methods/index.js +0 -28
- package/dist/nodes/Google/Drive/v2/methods/index.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/methods/listSearch.d.ts +0 -6
- package/dist/nodes/Google/Drive/v2/methods/listSearch.js +0 -144
- package/dist/nodes/Google/Drive/v2/methods/listSearch.js.map +0 -1
- package/dist/nodes/Google/Drive/v2/transport/index.d.ts +0 -4
- package/dist/nodes/Google/Drive/v2/transport/index.js +0 -68
- package/dist/nodes/Google/Drive/v2/transport/index.js.map +0 -1
- package/dist/nodes/ItemLists/V3/ItemListsV3.node.d.ts +0 -6
- package/dist/nodes/ItemLists/V3/ItemListsV3.node.js +0 -18
- package/dist/nodes/ItemLists/V3/ItemListsV3.node.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/common.descriptions.d.ts +0 -2
- package/dist/nodes/ItemLists/V3/actions/common.descriptions.js +0 -11
- package/dist/nodes/ItemLists/V3/actions/common.descriptions.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.d.ts +0 -23
- package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.js +0 -303
- package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/index.d.ts +0 -9
- package/dist/nodes/ItemLists/V3/actions/itemList/index.js +0 -97
- package/dist/nodes/ItemLists/V3/actions/itemList/index.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.d.ts +0 -23
- package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.js +0 -57
- package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.d.ts +0 -23
- package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.js +0 -204
- package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.d.ts +0 -23
- package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.js +0 -262
- package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.d.ts +0 -23
- package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.js +0 -183
- package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.d.ts +0 -23
- package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.js +0 -491
- package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/node.type.d.ts +0 -6
- package/dist/nodes/ItemLists/V3/actions/node.type.js +0 -3
- package/dist/nodes/ItemLists/V3/actions/node.type.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/router.d.ts +0 -2
- package/dist/nodes/ItemLists/V3/actions/router.js +0 -53
- package/dist/nodes/ItemLists/V3/actions/router.js.map +0 -1
- package/dist/nodes/ItemLists/V3/actions/versionDescription.d.ts +0 -2
- package/dist/nodes/ItemLists/V3/actions/versionDescription.js +0 -58
- package/dist/nodes/ItemLists/V3/actions/versionDescription.js.map +0 -1
- package/dist/nodes/ItemLists/V3/helpers/utils.d.ts +0 -5
- package/dist/nodes/ItemLists/V3/helpers/utils.js +0 -57
- package/dist/nodes/ItemLists/V3/helpers/utils.js.map +0 -1
- package/dist/nodes/ItemLists/test/node/workflow.update_3.json +0 -606
- package/dist/nodes/Twitter/V1/DirectMessageDescription.js.map +0 -1
- package/dist/nodes/Twitter/V1/GenericFunctions.js.map +0 -1
- package/dist/nodes/Twitter/V1/TweetDescription.js.map +0 -1
- package/dist/nodes/Twitter/V1/TweetInterface.js.map +0 -1
- package/dist/nodes/Twitter/V1/TwitterV1.node.d.ts +0 -11
- package/dist/nodes/Twitter/V1/TwitterV1.node.js +0 -235
- package/dist/nodes/Twitter/V1/TwitterV1.node.js.map +0 -1
- package/dist/nodes/Twitter/V2/DirectMessageDescription.d.ts +0 -3
- package/dist/nodes/Twitter/V2/DirectMessageDescription.js +0 -100
- package/dist/nodes/Twitter/V2/DirectMessageDescription.js.map +0 -1
- package/dist/nodes/Twitter/V2/GenericFunctions.d.ts +0 -5
- package/dist/nodes/Twitter/V2/GenericFunctions.js +0 -88
- package/dist/nodes/Twitter/V2/GenericFunctions.js.map +0 -1
- package/dist/nodes/Twitter/V2/ListDescription.d.ts +0 -3
- package/dist/nodes/Twitter/V2/ListDescription.js +0 -92
- package/dist/nodes/Twitter/V2/ListDescription.js.map +0 -1
- package/dist/nodes/Twitter/V2/TweetDescription.d.ts +0 -3
- package/dist/nodes/Twitter/V2/TweetDescription.js +0 -452
- package/dist/nodes/Twitter/V2/TweetDescription.js.map +0 -1
- package/dist/nodes/Twitter/V2/TweetInterface.d.ts +0 -23
- package/dist/nodes/Twitter/V2/TweetInterface.js +0 -3
- package/dist/nodes/Twitter/V2/TweetInterface.js.map +0 -1
- package/dist/nodes/Twitter/V2/TwitterV2.node.d.ts +0 -11
- package/dist/nodes/Twitter/V2/TwitterV2.node.js +0 -245
- package/dist/nodes/Twitter/V2/TwitterV2.node.js.map +0 -1
- package/dist/nodes/Twitter/V2/UserDescription.d.ts +0 -3
- package/dist/nodes/Twitter/V2/UserDescription.js +0 -76
- package/dist/nodes/Twitter/V2/UserDescription.js.map +0 -1
- package/dist/nodes/Twitter/test/Workflow_Twitter_UnitTest.json +0 -284
- package/dist/nodes/Webhook/description.d.ts +0 -10
- package/dist/nodes/Webhook/description.js +0 -325
- package/dist/nodes/Webhook/description.js.map +0 -1
- package/dist/nodes/Webhook/error.d.ts +0 -4
- package/dist/nodes/Webhook/error.js +0 -20
- package/dist/nodes/Webhook/error.js.map +0 -1
- package/dist/package.json +0 -850
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/constants.js +0 -7
- package/dist/utils/constants.js.map +0 -1
- /package/dist/nodes/Google/Drive/{v1/GenericFunctions.d.ts → GenericFunctions.d.ts} +0 -0
- /package/dist/nodes/Google/Drive/{v1/SearchFunctions.d.ts → SearchFunctions.d.ts} +0 -0
- /package/dist/nodes/Google/Drive/{v1/SearchFunctions.js → SearchFunctions.js} +0 -0
- /package/dist/nodes/{Brevo → SendInBlue}/AttributeDescription.d.ts +0 -0
- /package/dist/nodes/{Brevo → SendInBlue}/ContactDescription.d.ts +0 -0
- /package/dist/nodes/{Brevo → SendInBlue}/ContactDescription.js +0 -0
- /package/dist/nodes/{Brevo → SendInBlue}/EmailDescription.d.ts +0 -0
- /package/dist/nodes/{Brevo → SendInBlue}/SenderDescrition.d.ts +0 -0
- /package/dist/nodes/{Brevo → SendInBlue}/SenderDescrition.js +0 -0
- /package/dist/nodes/Twitter/{V1/DirectMessageDescription.d.ts → DirectMessageDescription.d.ts} +0 -0
- /package/dist/nodes/Twitter/{V1/DirectMessageDescription.js → DirectMessageDescription.js} +0 -0
- /package/dist/nodes/Twitter/{V1/GenericFunctions.d.ts → GenericFunctions.d.ts} +0 -0
- /package/dist/nodes/Twitter/{V1/GenericFunctions.js → GenericFunctions.js} +0 -0
- /package/dist/nodes/Twitter/{V1/TweetDescription.d.ts → TweetDescription.d.ts} +0 -0
- /package/dist/nodes/Twitter/{V1/TweetDescription.js → TweetDescription.js} +0 -0
- /package/dist/nodes/Twitter/{V1/TweetInterface.d.ts → TweetInterface.d.ts} +0 -0
- /package/dist/nodes/Twitter/{V1/TweetInterface.js → TweetInterface.js} +0 -0
|
@@ -12,13 +12,25 @@ const basic_auth_1 = __importDefault(require("basic-auth"));
|
|
|
12
12
|
const formidable_1 = __importDefault(require("formidable"));
|
|
13
13
|
const isbot_1 = __importDefault(require("isbot"));
|
|
14
14
|
const tmp_promise_1 = require("tmp-promise");
|
|
15
|
-
const description_1 = require("./description");
|
|
16
|
-
const error_1 = require("./error");
|
|
17
15
|
const pipeline = (0, util_1.promisify)(stream_1.default.pipeline);
|
|
18
|
-
|
|
16
|
+
function authorizationError(resp, realm, responseCode, message) {
|
|
17
|
+
if (message === undefined) {
|
|
18
|
+
message = 'Authorization problem!';
|
|
19
|
+
if (responseCode === 401) {
|
|
20
|
+
message = 'Authorization is required!';
|
|
21
|
+
}
|
|
22
|
+
else if (responseCode === 403) {
|
|
23
|
+
message = 'Authorization data is wrong!';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
resp.writeHead(responseCode, { 'WWW-Authenticate': `Basic realm="${realm}"` });
|
|
27
|
+
resp.end(message);
|
|
28
|
+
return {
|
|
29
|
+
noWebhookResponse: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
class Webhook {
|
|
19
33
|
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.authPropertyName = 'authentication';
|
|
22
34
|
this.description = {
|
|
23
35
|
displayName: 'Webhook',
|
|
24
36
|
icon: 'file:webhook.svg',
|
|
@@ -41,11 +53,96 @@ class Webhook extends n8n_workflow_1.Node {
|
|
|
41
53
|
},
|
|
42
54
|
inputs: [],
|
|
43
55
|
outputs: ['main'],
|
|
44
|
-
credentials:
|
|
45
|
-
|
|
56
|
+
credentials: [
|
|
57
|
+
{
|
|
58
|
+
name: 'httpBasicAuth',
|
|
59
|
+
required: true,
|
|
60
|
+
displayOptions: {
|
|
61
|
+
show: {
|
|
62
|
+
authentication: ['basicAuth'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'httpHeaderAuth',
|
|
68
|
+
required: true,
|
|
69
|
+
displayOptions: {
|
|
70
|
+
show: {
|
|
71
|
+
authentication: ['headerAuth'],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
webhooks: [
|
|
77
|
+
{
|
|
78
|
+
name: 'default',
|
|
79
|
+
httpMethod: '={{$parameter["httpMethod"]}}',
|
|
80
|
+
isFullPath: true,
|
|
81
|
+
responseCode: '={{$parameter["responseCode"]}}',
|
|
82
|
+
responseMode: '={{$parameter["responseMode"]}}',
|
|
83
|
+
responseData: '={{$parameter["responseData"] || ($parameter.options.noResponseBody ? "noData" : undefined) }}',
|
|
84
|
+
responseBinaryPropertyName: '={{$parameter["responseBinaryPropertyName"]}}',
|
|
85
|
+
responseContentType: '={{$parameter["options"]["responseContentType"]}}',
|
|
86
|
+
responsePropertyName: '={{$parameter["options"]["responsePropertyName"]}}',
|
|
87
|
+
responseHeaders: '={{$parameter["options"]["responseHeaders"]}}',
|
|
88
|
+
path: '={{$parameter["path"]}}',
|
|
89
|
+
},
|
|
90
|
+
],
|
|
46
91
|
properties: [
|
|
47
|
-
|
|
48
|
-
|
|
92
|
+
{
|
|
93
|
+
displayName: 'Authentication',
|
|
94
|
+
name: 'authentication',
|
|
95
|
+
type: 'options',
|
|
96
|
+
options: [
|
|
97
|
+
{
|
|
98
|
+
name: 'Basic Auth',
|
|
99
|
+
value: 'basicAuth',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'Header Auth',
|
|
103
|
+
value: 'headerAuth',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'None',
|
|
107
|
+
value: 'none',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
default: 'none',
|
|
111
|
+
description: 'The way to authenticate',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
displayName: 'HTTP Method',
|
|
115
|
+
name: 'httpMethod',
|
|
116
|
+
type: 'options',
|
|
117
|
+
options: [
|
|
118
|
+
{
|
|
119
|
+
name: 'DELETE',
|
|
120
|
+
value: 'DELETE',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'GET',
|
|
124
|
+
value: 'GET',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'HEAD',
|
|
128
|
+
value: 'HEAD',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'PATCH',
|
|
132
|
+
value: 'PATCH',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'POST',
|
|
136
|
+
value: 'POST',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'PUT',
|
|
140
|
+
value: 'PUT',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
default: 'GET',
|
|
144
|
+
description: 'The HTTP method to listen to',
|
|
145
|
+
},
|
|
49
146
|
{
|
|
50
147
|
displayName: 'Path',
|
|
51
148
|
name: 'path',
|
|
@@ -55,7 +152,30 @@ class Webhook extends n8n_workflow_1.Node {
|
|
|
55
152
|
required: true,
|
|
56
153
|
description: 'The path to listen to',
|
|
57
154
|
},
|
|
58
|
-
|
|
155
|
+
{
|
|
156
|
+
displayName: 'Respond',
|
|
157
|
+
name: 'responseMode',
|
|
158
|
+
type: 'options',
|
|
159
|
+
options: [
|
|
160
|
+
{
|
|
161
|
+
name: 'Immediately',
|
|
162
|
+
value: 'onReceived',
|
|
163
|
+
description: 'As soon as this node executes',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'When Last Node Finishes',
|
|
167
|
+
value: 'lastNode',
|
|
168
|
+
description: 'Returns data of the last-executed node',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "Using 'Respond to Webhook' Node",
|
|
172
|
+
value: 'responseNode',
|
|
173
|
+
description: 'Response defined in that node',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
default: 'onReceived',
|
|
177
|
+
description: 'When and how to respond to the webhook',
|
|
178
|
+
},
|
|
59
179
|
{
|
|
60
180
|
displayName: 'Insert a \'Respond to Webhook\' node to control when and how you respond. <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/" target="_blank">More details</a>',
|
|
61
181
|
name: 'webhookNotice',
|
|
@@ -67,171 +187,363 @@ class Webhook extends n8n_workflow_1.Node {
|
|
|
67
187
|
},
|
|
68
188
|
default: '',
|
|
69
189
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
190
|
+
{
|
|
191
|
+
displayName: 'Response Code',
|
|
192
|
+
name: 'responseCode',
|
|
193
|
+
type: 'number',
|
|
194
|
+
displayOptions: {
|
|
195
|
+
hide: {
|
|
196
|
+
responseMode: ['responseNode'],
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
typeOptions: {
|
|
200
|
+
minValue: 100,
|
|
201
|
+
maxValue: 599,
|
|
202
|
+
},
|
|
203
|
+
default: 200,
|
|
204
|
+
description: 'The HTTP Response code to return',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
displayName: 'Response Data',
|
|
208
|
+
name: 'responseData',
|
|
209
|
+
type: 'options',
|
|
210
|
+
displayOptions: {
|
|
211
|
+
show: {
|
|
212
|
+
responseMode: ['lastNode'],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
options: [
|
|
216
|
+
{
|
|
217
|
+
name: 'All Entries',
|
|
218
|
+
value: 'allEntries',
|
|
219
|
+
description: 'Returns all the entries of the last node. Always returns an array.',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'First Entry JSON',
|
|
223
|
+
value: 'firstEntryJson',
|
|
224
|
+
description: 'Returns the JSON data of the first entry of the last node. Always returns a JSON object.',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'First Entry Binary',
|
|
228
|
+
value: 'firstEntryBinary',
|
|
229
|
+
description: 'Returns the binary data of the first entry of the last node. Always returns a binary file.',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'No Response Body',
|
|
233
|
+
value: 'noData',
|
|
234
|
+
description: 'Returns without a body',
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
default: 'firstEntryJson',
|
|
238
|
+
description: 'What data should be returned. If it should return all items as an array or only the first item as object.',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
displayName: 'Property Name',
|
|
242
|
+
name: 'responseBinaryPropertyName',
|
|
243
|
+
type: 'string',
|
|
244
|
+
required: true,
|
|
245
|
+
default: 'data',
|
|
246
|
+
displayOptions: {
|
|
247
|
+
show: {
|
|
248
|
+
responseData: ['firstEntryBinary'],
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
description: 'Name of the binary property to return',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
displayName: 'Options',
|
|
255
|
+
name: 'options',
|
|
256
|
+
type: 'collection',
|
|
257
|
+
placeholder: 'Add Option',
|
|
258
|
+
default: {},
|
|
259
|
+
options: [
|
|
260
|
+
{
|
|
261
|
+
displayName: 'Binary Data',
|
|
262
|
+
name: 'binaryData',
|
|
263
|
+
type: 'boolean',
|
|
264
|
+
displayOptions: {
|
|
265
|
+
show: {
|
|
266
|
+
'/httpMethod': ['PATCH', 'PUT', 'POST'],
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
default: false,
|
|
270
|
+
description: 'Whether the webhook will receive binary data',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
displayName: 'Binary Property',
|
|
274
|
+
name: 'binaryPropertyName',
|
|
275
|
+
type: 'string',
|
|
276
|
+
default: 'data',
|
|
277
|
+
required: true,
|
|
278
|
+
displayOptions: {
|
|
279
|
+
show: {
|
|
280
|
+
binaryData: [true],
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
description: 'Name of the binary property to write the data of the received file to. If the data gets received via "Form-Data Multipart" it will be the prefix and a number starting with 0 will be attached to it.',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
displayName: 'Ignore Bots',
|
|
287
|
+
name: 'ignoreBots',
|
|
288
|
+
type: 'boolean',
|
|
289
|
+
default: false,
|
|
290
|
+
description: 'Whether to ignore requests from bots like link previewers and web crawlers',
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
displayName: 'No Response Body',
|
|
294
|
+
name: 'noResponseBody',
|
|
295
|
+
type: 'boolean',
|
|
296
|
+
default: false,
|
|
297
|
+
description: 'Whether to send any body in the response',
|
|
298
|
+
displayOptions: {
|
|
299
|
+
hide: {
|
|
300
|
+
rawBody: [true],
|
|
301
|
+
},
|
|
302
|
+
show: {
|
|
303
|
+
'/responseMode': ['onReceived'],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
displayName: 'Raw Body',
|
|
309
|
+
name: 'rawBody',
|
|
310
|
+
type: 'boolean',
|
|
311
|
+
displayOptions: {
|
|
312
|
+
hide: {
|
|
313
|
+
binaryData: [true],
|
|
314
|
+
noResponseBody: [true],
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
default: false,
|
|
318
|
+
description: 'Raw body (binary)',
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
displayName: 'Response Data',
|
|
322
|
+
name: 'responseData',
|
|
323
|
+
type: 'string',
|
|
324
|
+
displayOptions: {
|
|
325
|
+
show: {
|
|
326
|
+
'/responseMode': ['onReceived'],
|
|
327
|
+
},
|
|
328
|
+
hide: {
|
|
329
|
+
noResponseBody: [true],
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
default: '',
|
|
333
|
+
placeholder: 'success',
|
|
334
|
+
description: 'Custom response data to send',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
displayName: 'Response Content-Type',
|
|
338
|
+
name: 'responseContentType',
|
|
339
|
+
type: 'string',
|
|
340
|
+
displayOptions: {
|
|
341
|
+
show: {
|
|
342
|
+
'/responseData': ['firstEntryJson'],
|
|
343
|
+
'/responseMode': ['lastNode'],
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
default: '',
|
|
347
|
+
placeholder: 'application/xml',
|
|
348
|
+
description: 'Set a custom content-type to return if another one as the "application/json" should be returned',
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
displayName: 'Response Headers',
|
|
352
|
+
name: 'responseHeaders',
|
|
353
|
+
placeholder: 'Add Response Header',
|
|
354
|
+
description: 'Add headers to the webhook response',
|
|
355
|
+
type: 'fixedCollection',
|
|
356
|
+
typeOptions: {
|
|
357
|
+
multipleValues: true,
|
|
358
|
+
},
|
|
359
|
+
default: {},
|
|
360
|
+
options: [
|
|
361
|
+
{
|
|
362
|
+
name: 'entries',
|
|
363
|
+
displayName: 'Entries',
|
|
364
|
+
values: [
|
|
365
|
+
{
|
|
366
|
+
displayName: 'Name',
|
|
367
|
+
name: 'name',
|
|
368
|
+
type: 'string',
|
|
369
|
+
default: '',
|
|
370
|
+
description: 'Name of the header',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
displayName: 'Value',
|
|
374
|
+
name: 'value',
|
|
375
|
+
type: 'string',
|
|
376
|
+
default: '',
|
|
377
|
+
description: 'Value of the header',
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
displayName: 'Property Name',
|
|
385
|
+
name: 'responsePropertyName',
|
|
386
|
+
type: 'string',
|
|
387
|
+
displayOptions: {
|
|
388
|
+
show: {
|
|
389
|
+
'/responseData': ['firstEntryJson'],
|
|
390
|
+
'/responseMode': ['lastNode'],
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
default: 'data',
|
|
394
|
+
description: 'Name of the property to return the data of instead of the whole JSON',
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
},
|
|
74
398
|
],
|
|
75
399
|
};
|
|
76
400
|
}
|
|
77
|
-
async webhook(
|
|
401
|
+
async webhook() {
|
|
78
402
|
var _a;
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (error instanceof error_1.WebhookAuthorizationError) {
|
|
89
|
-
resp.writeHead(error.responseCode, { 'WWW-Authenticate': 'Basic realm="Webhook"' });
|
|
90
|
-
resp.end(error.message);
|
|
91
|
-
return { noWebhookResponse: true };
|
|
92
|
-
}
|
|
93
|
-
throw error;
|
|
403
|
+
const authentication = this.getNodeParameter('authentication');
|
|
404
|
+
const options = this.getNodeParameter('options', {});
|
|
405
|
+
const req = this.getRequestObject();
|
|
406
|
+
const resp = this.getResponseObject();
|
|
407
|
+
const headers = this.getHeaderData();
|
|
408
|
+
const realm = 'Webhook';
|
|
409
|
+
const ignoreBots = options.ignoreBots;
|
|
410
|
+
if (ignoreBots && (0, isbot_1.default)(headers['user-agent'])) {
|
|
411
|
+
return authorizationError(resp, realm, 403);
|
|
94
412
|
}
|
|
95
|
-
const mimeType = (_a = req.headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json';
|
|
96
|
-
if (mimeType.includes('multipart/form-data')) {
|
|
97
|
-
return this.handleFormData(context);
|
|
98
|
-
}
|
|
99
|
-
if (options.binaryData) {
|
|
100
|
-
return this.handleBinaryData(context);
|
|
101
|
-
}
|
|
102
|
-
const response = {
|
|
103
|
-
json: {
|
|
104
|
-
headers: req.headers,
|
|
105
|
-
params: req.params,
|
|
106
|
-
query: req.query,
|
|
107
|
-
body: req.body,
|
|
108
|
-
},
|
|
109
|
-
binary: options.rawBody
|
|
110
|
-
? {
|
|
111
|
-
data: {
|
|
112
|
-
data: req.rawBody.toString(n8n_workflow_1.BINARY_ENCODING),
|
|
113
|
-
mimeType,
|
|
114
|
-
},
|
|
115
|
-
}
|
|
116
|
-
: undefined,
|
|
117
|
-
};
|
|
118
|
-
return {
|
|
119
|
-
webhookResponse: options.responseData,
|
|
120
|
-
workflowData: [[response]],
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
async validateAuth(context) {
|
|
124
|
-
const authentication = context.getNodeParameter(this.authPropertyName);
|
|
125
|
-
if (authentication === 'none')
|
|
126
|
-
return;
|
|
127
|
-
const req = context.getRequestObject();
|
|
128
|
-
const headers = context.getHeaderData();
|
|
129
413
|
if (authentication === 'basicAuth') {
|
|
130
|
-
let
|
|
414
|
+
let httpBasicAuth;
|
|
131
415
|
try {
|
|
132
|
-
|
|
416
|
+
httpBasicAuth = await this.getCredentials('httpBasicAuth');
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
133
419
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
throw new error_1.WebhookAuthorizationError(500, 'No authentication data defined on node!');
|
|
420
|
+
if (httpBasicAuth === undefined || !httpBasicAuth.user || !httpBasicAuth.password) {
|
|
421
|
+
return authorizationError(resp, realm, 500, 'No authentication data defined on node!');
|
|
137
422
|
}
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
423
|
+
const basicAuthData = (0, basic_auth_1.default)(req);
|
|
424
|
+
if (basicAuthData === undefined) {
|
|
425
|
+
return authorizationError(resp, realm, 401);
|
|
426
|
+
}
|
|
427
|
+
if (basicAuthData.name !== httpBasicAuth.user ||
|
|
428
|
+
basicAuthData.pass !== httpBasicAuth.password) {
|
|
429
|
+
return authorizationError(resp, realm, 403);
|
|
143
430
|
}
|
|
144
431
|
}
|
|
145
432
|
else if (authentication === 'headerAuth') {
|
|
146
|
-
let
|
|
433
|
+
let httpHeaderAuth;
|
|
147
434
|
try {
|
|
148
|
-
|
|
435
|
+
httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
|
|
436
|
+
}
|
|
437
|
+
catch (error) {
|
|
149
438
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
throw new error_1.WebhookAuthorizationError(500, 'No authentication data defined on node!');
|
|
439
|
+
if (httpHeaderAuth === undefined || !httpHeaderAuth.name || !httpHeaderAuth.value) {
|
|
440
|
+
return authorizationError(resp, realm, 500, 'No authentication data defined on node!');
|
|
153
441
|
}
|
|
154
|
-
const headerName =
|
|
155
|
-
const
|
|
442
|
+
const headerName = httpHeaderAuth.name.toLowerCase();
|
|
443
|
+
const headerValue = httpHeaderAuth.value;
|
|
156
444
|
if (!headers.hasOwnProperty(headerName) ||
|
|
157
|
-
headers[headerName] !==
|
|
158
|
-
|
|
445
|
+
headers[headerName] !== headerValue) {
|
|
446
|
+
return authorizationError(resp, realm, 403);
|
|
159
447
|
}
|
|
160
448
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
processFiles.push(...files[xfile]);
|
|
183
|
-
multiFile = true;
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
processFiles.push(files[xfile]);
|
|
187
|
-
}
|
|
188
|
-
let fileCount = 0;
|
|
189
|
-
for (const file of processFiles) {
|
|
190
|
-
let binaryPropertyName = xfile;
|
|
191
|
-
if (binaryPropertyName.endsWith('[]')) {
|
|
192
|
-
binaryPropertyName = binaryPropertyName.slice(0, -2);
|
|
449
|
+
const mimeType = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json';
|
|
450
|
+
if (mimeType.includes('multipart/form-data')) {
|
|
451
|
+
const form = new formidable_1.default.IncomingForm({ multiples: true });
|
|
452
|
+
return new Promise((resolve, _reject) => {
|
|
453
|
+
form.parse(req, async (err, data, files) => {
|
|
454
|
+
const returnItem = {
|
|
455
|
+
binary: {},
|
|
456
|
+
json: {
|
|
457
|
+
headers,
|
|
458
|
+
params: this.getParamsData(),
|
|
459
|
+
query: this.getQueryData(),
|
|
460
|
+
body: data,
|
|
461
|
+
},
|
|
462
|
+
};
|
|
463
|
+
let count = 0;
|
|
464
|
+
for (const xfile of Object.keys(files)) {
|
|
465
|
+
const processFiles = [];
|
|
466
|
+
let multiFile = false;
|
|
467
|
+
if (Array.isArray(files[xfile])) {
|
|
468
|
+
processFiles.push(...files[xfile]);
|
|
469
|
+
multiFile = true;
|
|
193
470
|
}
|
|
194
|
-
|
|
195
|
-
|
|
471
|
+
else {
|
|
472
|
+
processFiles.push(files[xfile]);
|
|
196
473
|
}
|
|
197
|
-
|
|
198
|
-
|
|
474
|
+
let fileCount = 0;
|
|
475
|
+
for (const file of processFiles) {
|
|
476
|
+
let binaryPropertyName = xfile;
|
|
477
|
+
if (binaryPropertyName.endsWith('[]')) {
|
|
478
|
+
binaryPropertyName = binaryPropertyName.slice(0, -2);
|
|
479
|
+
}
|
|
480
|
+
if (multiFile) {
|
|
481
|
+
binaryPropertyName += fileCount++;
|
|
482
|
+
}
|
|
483
|
+
if (options.binaryPropertyName) {
|
|
484
|
+
binaryPropertyName = `${options.binaryPropertyName}${count}`;
|
|
485
|
+
}
|
|
486
|
+
const fileJson = file.toJSON();
|
|
487
|
+
returnItem.binary[binaryPropertyName] = await this.nodeHelpers.copyBinaryFile(file.path, fileJson.name || fileJson.filename, fileJson.type);
|
|
488
|
+
count += 1;
|
|
199
489
|
}
|
|
200
|
-
const fileJson = file.toJSON();
|
|
201
|
-
returnItem.binary[binaryPropertyName] = await context.nodeHelpers.copyBinaryFile(file.path, fileJson.name || fileJson.filename, fileJson.type);
|
|
202
|
-
count += 1;
|
|
203
490
|
}
|
|
204
|
-
|
|
205
|
-
|
|
491
|
+
resolve({
|
|
492
|
+
workflowData: [[returnItem]],
|
|
493
|
+
});
|
|
494
|
+
});
|
|
206
495
|
});
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
496
|
+
}
|
|
497
|
+
if (options.binaryData === true) {
|
|
498
|
+
const binaryFile = await (0, tmp_promise_1.file)({ prefix: 'n8n-webhook-' });
|
|
499
|
+
try {
|
|
500
|
+
await pipeline(req, fs_1.default.createWriteStream(binaryFile.path));
|
|
501
|
+
const returnItem = {
|
|
502
|
+
binary: {},
|
|
503
|
+
json: {
|
|
504
|
+
headers,
|
|
505
|
+
params: this.getParamsData(),
|
|
506
|
+
query: this.getQueryData(),
|
|
507
|
+
body: this.getBodyData(),
|
|
508
|
+
},
|
|
509
|
+
};
|
|
510
|
+
const binaryPropertyName = (options.binaryPropertyName || 'data');
|
|
511
|
+
returnItem.binary[binaryPropertyName] = await this.nodeHelpers.copyBinaryFile(binaryFile.path, mimeType);
|
|
512
|
+
return {
|
|
513
|
+
workflowData: [[returnItem]],
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
catch (error) {
|
|
517
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
|
|
518
|
+
}
|
|
519
|
+
finally {
|
|
520
|
+
await binaryFile.cleanup();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const response = {
|
|
524
|
+
json: {
|
|
525
|
+
headers,
|
|
526
|
+
params: this.getParamsData(),
|
|
527
|
+
query: this.getQueryData(),
|
|
528
|
+
body: this.getBodyData(),
|
|
529
|
+
},
|
|
530
|
+
};
|
|
531
|
+
if (options.rawBody) {
|
|
532
|
+
response.binary = {
|
|
533
|
+
data: {
|
|
534
|
+
data: req.rawBody.toString(n8n_workflow_1.BINARY_ENCODING),
|
|
535
|
+
mimeType,
|
|
223
536
|
},
|
|
224
537
|
};
|
|
225
|
-
const binaryPropertyName = (options.binaryPropertyName || 'data');
|
|
226
|
-
returnItem.binary[binaryPropertyName] = await context.nodeHelpers.copyBinaryFile(binaryFile.path, (_a = req.headers['content-type']) !== null && _a !== void 0 ? _a : 'application/octet-stream');
|
|
227
|
-
return { workflowData: [[returnItem]] };
|
|
228
|
-
}
|
|
229
|
-
catch (error) {
|
|
230
|
-
throw new n8n_workflow_1.NodeOperationError(context.getNode(), error);
|
|
231
538
|
}
|
|
232
|
-
|
|
233
|
-
|
|
539
|
+
let webhookResponse;
|
|
540
|
+
if (options.responseData) {
|
|
541
|
+
webhookResponse = options.responseData;
|
|
234
542
|
}
|
|
543
|
+
return {
|
|
544
|
+
webhookResponse,
|
|
545
|
+
workflowData: [[response]],
|
|
546
|
+
};
|
|
235
547
|
}
|
|
236
548
|
}
|
|
237
549
|
exports.Webhook = Webhook;
|