n8n-nodes-base 1.91.1 → 1.93.0
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/credentials/Aws.credentials.js +0 -2
- package/dist/credentials/Aws.credentials.js.map +1 -1
- package/dist/credentials/JinaAiApi.credentials.js +61 -0
- package/dist/credentials/JinaAiApi.credentials.js.map +1 -0
- package/dist/credentials/MicrosoftAzureCosmosDbSharedKeyApi.credentials.js +1 -1
- package/dist/credentials/MicrosoftAzureCosmosDbSharedKeyApi.credentials.js.map +1 -1
- package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js +0 -9
- package/dist/credentials/MicrosoftSharePointOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js +13 -0
- package/dist/credentials/MicrosoftTeamsOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/Snowflake.credentials.js +46 -2
- package/dist/credentials/Snowflake.credentials.js.map +1 -1
- package/dist/known/credentials.json +18 -1
- package/dist/known/nodes.json +28 -0
- package/dist/methods/defined.json +6 -0
- package/dist/methods/referenced.json +3 -0
- package/dist/nodes/Affinity/__schema__/v1.0.0/listEntry/getAll.json +1 -4
- package/dist/nodes/Airtop/__schema__/v1.0.0/extraction/query.json +47 -0
- package/dist/nodes/Aws/Cognito/AwsCognito.node.js +102 -0
- package/dist/nodes/Aws/Cognito/AwsCognito.node.js.map +1 -0
- package/dist/nodes/Aws/Cognito/AwsCognito.node.json +18 -0
- package/dist/nodes/Aws/Cognito/cognito.svg +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/common.description.js +160 -0
- package/dist/nodes/Aws/Cognito/descriptions/common.description.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/Group.resource.js +189 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/Group.resource.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/create.operation.js +126 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/create.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/delete.operation.js +47 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/delete.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/get.operation.js +54 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/get.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/getAll.operation.js +95 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/getAll.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/update.operation.js +120 -0
- package/dist/nodes/Aws/Cognito/descriptions/group/update.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/index.js +45 -0
- package/dist/nodes/Aws/Cognito/descriptions/index.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/User.resource.js +263 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/User.resource.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/addToGroup.operation.js +51 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/addToGroup.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/create.operation.js +299 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/create.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/delete.operation.js +47 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/delete.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/get.operation.js +54 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/get.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/getAll.operation.js +187 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/getAll.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/removeFromGroup.operation.js +60 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/removeFromGroup.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/update.operation.js +189 -0
- package/dist/nodes/Aws/Cognito/descriptions/user/update.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/userPool/UserPool.resource.js +81 -0
- package/dist/nodes/Aws/Cognito/descriptions/userPool/UserPool.resource.js.map +1 -0
- package/dist/nodes/Aws/Cognito/descriptions/userPool/get.operation.js +50 -0
- package/dist/nodes/Aws/Cognito/descriptions/userPool/get.operation.js.map +1 -0
- package/dist/nodes/Aws/Cognito/helpers/constants.js +91 -0
- package/dist/nodes/Aws/Cognito/helpers/constants.js.map +1 -0
- package/dist/nodes/Aws/Cognito/helpers/errorHandler.js +109 -0
- package/dist/nodes/Aws/Cognito/helpers/errorHandler.js.map +1 -0
- package/dist/nodes/Aws/Cognito/helpers/interfaces.js +17 -0
- package/dist/nodes/Aws/Cognito/helpers/interfaces.js.map +1 -0
- package/dist/nodes/Aws/Cognito/helpers/utils.js +318 -0
- package/dist/nodes/Aws/Cognito/helpers/utils.js.map +1 -0
- package/dist/nodes/Aws/Cognito/methods/index.js +39 -0
- package/dist/nodes/Aws/Cognito/methods/index.js.map +1 -0
- package/dist/nodes/Aws/Cognito/methods/listSearch.js +157 -0
- package/dist/nodes/Aws/Cognito/methods/listSearch.js.map +1 -0
- package/dist/nodes/Aws/Cognito/transport/index.js +72 -0
- package/dist/nodes/Aws/Cognito/transport/index.js.map +1 -0
- package/dist/nodes/Aws/IAM/AwsIam.node.js +95 -0
- package/dist/nodes/Aws/IAM/AwsIam.node.js.map +1 -0
- package/dist/nodes/Aws/IAM/AwsIam.node.json +18 -0
- package/dist/nodes/Aws/IAM/AwsIam.svg +18 -0
- package/dist/nodes/Aws/IAM/descriptions/common.js +188 -0
- package/dist/nodes/Aws/IAM/descriptions/common.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js +175 -0
- package/dist/nodes/Aws/IAM/descriptions/group/Group.resource.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js +66 -0
- package/dist/nodes/Aws/IAM/descriptions/group/create.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js +43 -0
- package/dist/nodes/Aws/IAM/descriptions/group/delete.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js +50 -0
- package/dist/nodes/Aws/IAM/descriptions/group/get.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js +47 -0
- package/dist/nodes/Aws/IAM/descriptions/group/getAll.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js +70 -0
- package/dist/nodes/Aws/IAM/descriptions/group/update.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/index.js +42 -0
- package/dist/nodes/Aws/IAM/descriptions/index.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js +231 -0
- package/dist/nodes/Aws/IAM/descriptions/user/User.resource.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js +47 -0
- package/dist/nodes/Aws/IAM/descriptions/user/addToGroup.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js +118 -0
- package/dist/nodes/Aws/IAM/descriptions/user/create.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js +43 -0
- package/dist/nodes/Aws/IAM/descriptions/user/delete.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js +43 -0
- package/dist/nodes/Aws/IAM/descriptions/user/get.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js +66 -0
- package/dist/nodes/Aws/IAM/descriptions/user/getAll.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js +74 -0
- package/dist/nodes/Aws/IAM/descriptions/user/removeFromGroup.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js +68 -0
- package/dist/nodes/Aws/IAM/descriptions/user/update.operation.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/constants.js +47 -0
- package/dist/nodes/Aws/IAM/helpers/constants.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/errorHandler.js +90 -0
- package/dist/nodes/Aws/IAM/helpers/errorHandler.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/types.js +17 -0
- package/dist/nodes/Aws/IAM/helpers/types.js.map +1 -0
- package/dist/nodes/Aws/IAM/helpers/utils.js +279 -0
- package/dist/nodes/Aws/IAM/helpers/utils.js.map +1 -0
- package/dist/nodes/Aws/IAM/methods/index.js +39 -0
- package/dist/nodes/Aws/IAM/methods/index.js.map +1 -0
- package/dist/nodes/Aws/IAM/methods/listSearch.js +132 -0
- package/dist/nodes/Aws/IAM/methods/listSearch.js.map +1 -0
- package/dist/nodes/Aws/IAM/transport/index.js +64 -0
- package/dist/nodes/Aws/IAM/transport/index.js.map +1 -0
- package/dist/nodes/Aws/S3/__schema__/v2.0.0/file/getAll.json +1 -7
- package/dist/nodes/BambooHr/__schema__/v1.0.0/employee/get.json +10 -1
- package/dist/nodes/Cron/Cron.node.js +1 -1
- package/dist/nodes/Cron/Cron.node.js.map +1 -1
- package/dist/nodes/Dropcontact/__schema__/v1.0.0/contact/enrich.json +7 -15
- package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js +2 -2
- package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js.map +1 -1
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +2 -2
- package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
- package/dist/nodes/EmailSend/__schema__/v2.1.0/email/send.json +7 -1
- package/dist/nodes/Evaluation/Evaluation/Description.node.js +146 -0
- package/dist/nodes/Evaluation/Evaluation/Description.node.js.map +1 -0
- package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js +117 -0
- package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js.map +1 -0
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +187 -0
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -0
- package/dist/nodes/Evaluation/methods/index.js +42 -0
- package/dist/nodes/Evaluation/methods/index.js.map +1 -0
- package/dist/nodes/Evaluation/methods/loadOptions.js +40 -0
- package/dist/nodes/Evaluation/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js +119 -0
- package/dist/nodes/Evaluation/utils/evaluationTriggerUtils.js.map +1 -0
- package/dist/nodes/Evaluation/utils/evaluationUtils.js +171 -0
- package/dist/nodes/Evaluation/utils/evaluationUtils.js.map +1 -0
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +4 -3
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
- package/dist/nodes/Form/common.descriptions.js +2 -2
- package/dist/nodes/Form/common.descriptions.js.map +1 -1
- package/dist/nodes/Github/__schema__/v1.1.0/file/list.json +44 -0
- package/dist/nodes/Gitlab/__schema__/v1.0.0/file/get.json +1 -4
- package/dist/nodes/Google/BusinessProfile/__schema__/v1.0.0/review/getAll.json +1 -12
- package/dist/nodes/Google/Calendar/__schema__/v1.3.0/event/getAll.json +4 -7
- package/dist/nodes/Google/Contacts/__schema__/v1.0.0/contact/getAll.json +1 -12
- package/dist/nodes/Google/Drive/__schema__/v3.0.0/file/download.json +9 -0
- package/dist/nodes/Google/Firebase/CloudFirestore/__schema__/v1.1.0/document/query.json +7 -1
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/addLabels.json +1 -13
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/get.json +7 -1
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/getAll.json +29 -113
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/thread/get.json +1 -60
- package/dist/nodes/Google/Sheet/GoogleSheets.node.js +3 -2
- package/dist/nodes/Google/Sheet/GoogleSheets.node.js.map +1 -1
- package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js +113 -107
- package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.node.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js +52 -105
- package/dist/nodes/Google/Sheet/v2/actions/sheet/read.operation.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js +97 -0
- package/dist/nodes/Google/Sheet/v2/actions/utils/readOperation.js.map +1 -0
- package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js +21 -18
- package/dist/nodes/Google/Sheet/v2/actions/versionDescription.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js +4 -0
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js.map +1 -1
- package/dist/nodes/Google/Task/__schema__/v1.0.0/task/getAll.json +1 -4
- package/dist/nodes/Google/YouTube/YouTube.node.js +4 -2
- package/dist/nodes/Google/YouTube/YouTube.node.js.map +1 -1
- package/dist/nodes/Google/YouTube/__schema__/v1.0.0/video/get.json +35 -1
- package/dist/nodes/Hubspot/__schema__/v2.1.0/company/getAll.json +4 -1
- package/dist/nodes/Hubspot/__schema__/v2.1.0/contact/search.json +1 -4
- package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/getAll.json +45 -11
- package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/search.json +2 -5
- package/dist/nodes/Hubspot/__schema__/v2.1.0/ticket/get.json +4 -4
- package/dist/nodes/Interval/Interval.node.js +1 -1
- package/dist/nodes/Interval/Interval.node.js.map +1 -1
- package/dist/nodes/ItemLists/__schema__/v3.0.0/itemList/limit.json +4 -1
- package/dist/nodes/JinaAI/JinaAi.node.js +486 -0
- package/dist/nodes/JinaAI/JinaAi.node.js.map +1 -0
- package/dist/nodes/JinaAI/JinaAi.node.json +18 -0
- package/dist/nodes/JinaAI/jinaAi.dark.svg +6 -0
- package/dist/nodes/JinaAI/jinaAi.svg +6 -0
- package/dist/nodes/Jira/__schema__/v1.0.0/issue/get.json +259 -1
- package/dist/nodes/Jira/__schema__/v1.0.0/issue/getAll.json +57 -37
- package/dist/nodes/Linear/__schema__/v1.0.0/issue/getAll.json +1 -12
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +2 -2
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
- package/dist/nodes/MQTT/MqttTrigger.node.js +2 -2
- package/dist/nodes/MQTT/MqttTrigger.node.js.map +1 -1
- package/dist/nodes/ManualTrigger/ManualTrigger.node.js +1 -1
- package/dist/nodes/ManualTrigger/ManualTrigger.node.js.map +1 -1
- package/dist/nodes/Microsoft/AzureCosmosDb/AzureCosmosDb.node.json +2 -2
- package/dist/nodes/Microsoft/Entra/MicrosoftEntra.node.js +2 -2
- package/dist/nodes/Microsoft/Entra/MicrosoftEntra.node.js.map +1 -1
- package/dist/nodes/Microsoft/Entra/__schema__/v1.0.0/user/getAll.json +1 -7
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/event/getAll.json +4 -1
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/folderMessage/getAll.json +8 -47
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/get.json +124 -1
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/getAll.json +40 -20
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/sendAndWait.json +12 -11
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/messageAttachment/get.json +13 -1
- package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js +93 -0
- package/dist/nodes/Microsoft/SharePoint/MicrosoftSharePoint.node.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/MicrosoftSharepoint.node.json +18 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js +190 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/common.descriptions.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js +108 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/File.resource.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js +62 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/download.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js +129 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js +77 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/file/upload.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/index.js +45 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/index.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js +175 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/Item.resource.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js +100 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js +62 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js +83 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js +203 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js +100 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js +100 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/item/upsert.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js +99 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/List.resource.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js +65 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js +105 -0
- package/dist/nodes/Microsoft/SharePoint/descriptions/list/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js +17 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/interfaces.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/utils.js +252 -0
- package/dist/nodes/Microsoft/SharePoint/helpers/utils.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/methods/index.js +42 -0
- package/dist/nodes/Microsoft/SharePoint/methods/index.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js +222 -0
- package/dist/nodes/Microsoft/SharePoint/methods/listSearch.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js +104 -0
- package/dist/nodes/Microsoft/SharePoint/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/test/credentials.js +54 -0
- package/dist/nodes/Microsoft/SharePoint/test/credentials.js.map +1 -0
- package/dist/nodes/Microsoft/SharePoint/transport/index.js +46 -0
- package/dist/nodes/Microsoft/SharePoint/transport/index.js.map +1 -0
- package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/blob/getAll.json +44 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js +387 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/MicrosoftTeamsTrigger.node.json +18 -0
- package/dist/nodes/Microsoft/Teams/__schema__/v2.0.0/channel/getAll.json +1 -4
- package/dist/nodes/Microsoft/Teams/v2/helpers/types.js +17 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/types.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js +147 -0
- package/dist/nodes/Microsoft/Teams/v2/helpers/utils-trigger.js.map +1 -0
- package/dist/nodes/Microsoft/Teams/v2/transport/index.js.map +1 -1
- package/dist/nodes/Microsoft/ToDo/__schema__/v1.0.0/task/getAll.json +21 -5
- package/dist/nodes/Notion/__schema__/v2.2.0/database/get.json +149 -2
- package/dist/nodes/Odoo/__schema__/v1.0.0/contact/getAll.json +10 -1
- package/dist/nodes/Odoo/__schema__/v1.0.0/custom/getAll.json +1 -4
- package/dist/nodes/Odoo/__schema__/v1.0.0/opportunity/getAll.json +49 -1
- package/dist/nodes/OpenAi/__schema__/v1.1.0/chat/complete.json +1 -29
- package/dist/nodes/Pipedrive/__schema__/v1.0.0/organization/search.json +20 -25
- package/dist/nodes/Pipedrive/__schema__/v1.0.0/person/search.json +1 -18
- package/dist/nodes/Plivo/__schema__/v1.0.0/call/make.json +15 -0
- package/dist/nodes/PostBin/BinDescription.js +1 -1
- package/dist/nodes/PostBin/BinDescription.js.map +1 -1
- package/dist/nodes/PostBin/GenericFunctions.js +5 -5
- package/dist/nodes/PostBin/GenericFunctions.js.map +1 -1
- package/dist/nodes/PostBin/PostBin.node.js +1 -1
- package/dist/nodes/PostBin/PostBin.node.js.map +1 -1
- package/dist/nodes/PostBin/RequestDescription.js +2 -2
- package/dist/nodes/PostBin/RequestDescription.js.map +1 -1
- package/dist/nodes/Postgres/PostgresTrigger.node.js +2 -2
- package/dist/nodes/Postgres/PostgresTrigger.node.js.map +1 -1
- package/dist/nodes/QuickBooks/__schema__/v1.0.0/transaction/getReport.json +1 -4
- package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js +2 -2
- package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +8 -3
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/utils.js +43 -0
- package/dist/nodes/RespondToWebhook/utils.js.map +1 -0
- package/dist/nodes/Salesforce/__schema__/v1.0.0/customObject/getAll.json +2 -2
- package/dist/nodes/Salesforce/__schema__/v1.0.0/opportunity/getAll.json +5 -2
- package/dist/nodes/Salesforce/__schema__/v1.0.0/task/getAll.json +4 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.js +1 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
- package/dist/nodes/SeaTable/__schema__/v2.0.0/row/list.json +30 -0
- package/dist/nodes/ServiceNow/__schema__/v1.0.0/tableRecord/getAll.json +1 -4
- package/dist/nodes/Slack/__schema__/v2.3.0/channel/history.json +49 -3
- package/dist/nodes/Slack/__schema__/v2.3.0/message/post.json +4 -1
- package/dist/nodes/Snowflake/GenericFunctions.js +34 -2
- package/dist/nodes/Snowflake/GenericFunctions.js.map +1 -1
- package/dist/nodes/Snowflake/Snowflake.node.js +5 -7
- package/dist/nodes/Snowflake/Snowflake.node.js.map +1 -1
- package/dist/nodes/SseTrigger/SseTrigger.node.js +2 -2
- package/dist/nodes/SseTrigger/SseTrigger.node.js.map +1 -1
- package/dist/nodes/Ssh/__schema__/v1.0.0/command/execute.json +4 -1
- package/dist/nodes/Strapi/__schema__/v1.0.0/entry/get.json +32 -0
- package/dist/nodes/Strapi/__schema__/v1.0.0/entry/getAll.json +1 -4
- package/dist/nodes/Telegram/__schema__/v1.2.0/chat/get.json +27 -1
- package/dist/nodes/Telegram/__schema__/v1.2.0/chat/member.json +7 -1
- package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendMessage.json +1 -4
- package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendPhoto.json +4 -1
- package/dist/nodes/Trello/__schema__/v1.0.0/list/getAll.json +7 -1
- package/dist/nodes/Trello/__schema__/v1.0.0/list/getCards.json +13 -1
- package/dist/nodes/Wordpress/PageDescription.js +0 -17
- package/dist/nodes/Wordpress/PageDescription.js.map +1 -1
- package/dist/nodes/Wordpress/__schema__/v1.0.0/post/get.json +7 -1
- package/dist/nodes/Zoho/__schema__/v1.0.0/contact/getAll.json +15 -16
- package/dist/nodes/Zoho/__schema__/v1.0.0/lead/getAll.json +1 -122
- package/dist/nodes/Zoom/__schema__/v1.0.0/meeting/getAll.json +1 -4
- package/dist/types/credentials.json +8 -7
- package/dist/types/nodes.json +29 -22
- package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +12 -2
- package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
- package/package.json +16 -9
- /package/dist/{credentials/icons/SharePoint.svg → nodes/Microsoft/SharePoint/microsoftSharePoint.svg} +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var resourceMapping_exports = {};
|
|
20
|
+
__export(resourceMapping_exports, {
|
|
21
|
+
getMappingColumns: () => getMappingColumns
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(resourceMapping_exports);
|
|
24
|
+
var import_transport = require("../transport");
|
|
25
|
+
const unsupportedFields = ["geoLocation", "location", "term", "url"];
|
|
26
|
+
const fieldTypeMapping = {
|
|
27
|
+
string: ["text", "user", "lookup"],
|
|
28
|
+
// unknownFutureValue: rating
|
|
29
|
+
number: ["number", "currency", "unknownFutureValue"],
|
|
30
|
+
boolean: ["boolean"],
|
|
31
|
+
dateTime: ["dateTime"],
|
|
32
|
+
object: ["thumbnail"],
|
|
33
|
+
options: ["choice"]
|
|
34
|
+
};
|
|
35
|
+
function mapType(column) {
|
|
36
|
+
if (unsupportedFields.includes(column.type)) {
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
let mappedType = "string";
|
|
40
|
+
for (const t of Object.keys(fieldTypeMapping)) {
|
|
41
|
+
const postgresTypes = fieldTypeMapping[t];
|
|
42
|
+
if (postgresTypes?.includes(column.type)) {
|
|
43
|
+
mappedType = t;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return mappedType;
|
|
47
|
+
}
|
|
48
|
+
async function getMappingColumns() {
|
|
49
|
+
const site = this.getNodeParameter("site", void 0, { extractValue: true });
|
|
50
|
+
const list = this.getNodeParameter("list", void 0, { extractValue: true });
|
|
51
|
+
const operation = this.getNodeParameter("operation");
|
|
52
|
+
const response = await import_transport.microsoftSharePointApiRequest.call(
|
|
53
|
+
this,
|
|
54
|
+
"GET",
|
|
55
|
+
`/sites/${site}/lists/${list}/contentTypes`,
|
|
56
|
+
{},
|
|
57
|
+
{ expand: "columns" }
|
|
58
|
+
);
|
|
59
|
+
const columns = response.value[0].columns;
|
|
60
|
+
const fields = [];
|
|
61
|
+
for (const column of columns.filter((x) => !x.hidden && !x.readOnly)) {
|
|
62
|
+
const fieldType = mapType(column);
|
|
63
|
+
const field = {
|
|
64
|
+
id: column.name,
|
|
65
|
+
canBeUsedToMatch: column.enforceUniqueValues && column.required,
|
|
66
|
+
defaultMatch: false,
|
|
67
|
+
display: true,
|
|
68
|
+
displayName: column.displayName,
|
|
69
|
+
readOnly: column.readOnly || !fieldType,
|
|
70
|
+
required: column.required,
|
|
71
|
+
type: fieldType
|
|
72
|
+
};
|
|
73
|
+
if (field.type === "options") {
|
|
74
|
+
field.options = [];
|
|
75
|
+
if (Array.isArray(column.choice?.choices)) {
|
|
76
|
+
for (const choice of column.choice.choices) {
|
|
77
|
+
field.options.push({
|
|
78
|
+
name: choice,
|
|
79
|
+
value: choice
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
fields.push(field);
|
|
85
|
+
}
|
|
86
|
+
if (operation === "update") {
|
|
87
|
+
fields.push({
|
|
88
|
+
id: "id",
|
|
89
|
+
canBeUsedToMatch: true,
|
|
90
|
+
defaultMatch: false,
|
|
91
|
+
display: true,
|
|
92
|
+
displayName: "ID",
|
|
93
|
+
readOnly: true,
|
|
94
|
+
required: true,
|
|
95
|
+
type: "string"
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return { fields };
|
|
99
|
+
}
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
102
|
+
getMappingColumns
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=resourceMapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../nodes/Microsoft/SharePoint/methods/resourceMapping.ts"],"sourcesContent":["import type {\n\tFieldType,\n\tILoadOptionsFunctions,\n\tResourceMapperField,\n\tResourceMapperFields,\n} from 'n8n-workflow';\n\nimport type { IListColumnType } from '../helpers/interfaces';\nimport { microsoftSharePointApiRequest } from '../transport';\n\nconst unsupportedFields = ['geoLocation', 'location', 'term', 'url'];\nconst fieldTypeMapping: Partial<Record<FieldType, string[]>> = {\n\tstring: ['text', 'user', 'lookup'],\n\t// unknownFutureValue: rating\n\tnumber: ['number', 'currency', 'unknownFutureValue'],\n\tboolean: ['boolean'],\n\tdateTime: ['dateTime'],\n\tobject: ['thumbnail'],\n\toptions: ['choice'],\n};\n\nfunction mapType(column: IListColumnType): FieldType | undefined {\n\tif (unsupportedFields.includes(column.type)) {\n\t\treturn undefined;\n\t}\n\tlet mappedType: FieldType = 'string';\n\tfor (const t of Object.keys(fieldTypeMapping)) {\n\t\tconst postgresTypes = fieldTypeMapping[t as FieldType];\n\t\tif (postgresTypes?.includes(column.type)) {\n\t\t\tmappedType = t as FieldType;\n\t\t}\n\t}\n\treturn mappedType;\n}\n\nexport async function getMappingColumns(\n\tthis: ILoadOptionsFunctions,\n): Promise<ResourceMapperFields> {\n\tconst site = this.getNodeParameter('site', undefined, { extractValue: true }) as string;\n\tconst list = this.getNodeParameter('list', undefined, { extractValue: true }) as string;\n\tconst operation = this.getNodeParameter('operation') as string;\n\n\tconst response = await microsoftSharePointApiRequest.call(\n\t\tthis,\n\t\t'GET',\n\t\t`/sites/${site}/lists/${list}/contentTypes`,\n\t\t{},\n\t\t{ expand: 'columns' },\n\t);\n\n\tconst columns: IListColumnType[] = response.value[0].columns;\n\n\tconst fields: ResourceMapperField[] = [];\n\n\tfor (const column of columns.filter((x) => !x.hidden && !x.readOnly)) {\n\t\tconst fieldType = mapType(column);\n\t\tconst field = {\n\t\t\tid: column.name,\n\t\t\tcanBeUsedToMatch: column.enforceUniqueValues && column.required,\n\t\t\tdefaultMatch: false,\n\t\t\tdisplay: true,\n\t\t\tdisplayName: column.displayName,\n\t\t\treadOnly: column.readOnly || !fieldType,\n\t\t\trequired: column.required,\n\t\t\ttype: fieldType,\n\t\t} as ResourceMapperField;\n\t\tif (field.type === 'options') {\n\t\t\tfield.options = [];\n\t\t\tif (Array.isArray(column.choice?.choices)) {\n\t\t\t\tfor (const choice of column.choice.choices) {\n\t\t\t\t\tfield.options.push({\n\t\t\t\t\t\tname: choice,\n\t\t\t\t\t\tvalue: choice,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfields.push(field);\n\t}\n\n\tif (operation === 'update') {\n\t\tfields.push({\n\t\t\tid: 'id',\n\t\t\tcanBeUsedToMatch: true,\n\t\t\tdefaultMatch: false,\n\t\t\tdisplay: true,\n\t\t\tdisplayName: 'ID',\n\t\t\treadOnly: true,\n\t\t\trequired: true,\n\t\t\ttype: 'string',\n\t\t});\n\t}\n\n\treturn { fields };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,uBAA8C;AAE9C,MAAM,oBAAoB,CAAC,eAAe,YAAY,QAAQ,KAAK;AACnE,MAAM,mBAAyD;AAAA,EAC9D,QAAQ,CAAC,QAAQ,QAAQ,QAAQ;AAAA;AAAA,EAEjC,QAAQ,CAAC,UAAU,YAAY,oBAAoB;AAAA,EACnD,SAAS,CAAC,SAAS;AAAA,EACnB,UAAU,CAAC,UAAU;AAAA,EACrB,QAAQ,CAAC,WAAW;AAAA,EACpB,SAAS,CAAC,QAAQ;AACnB;AAEA,SAAS,QAAQ,QAAgD;AAChE,MAAI,kBAAkB,SAAS,OAAO,IAAI,GAAG;AAC5C,WAAO;AAAA,EACR;AACA,MAAI,aAAwB;AAC5B,aAAW,KAAK,OAAO,KAAK,gBAAgB,GAAG;AAC9C,UAAM,gBAAgB,iBAAiB,CAAc;AACrD,QAAI,eAAe,SAAS,OAAO,IAAI,GAAG;AACzC,mBAAa;AAAA,IACd;AAAA,EACD;AACA,SAAO;AACR;AAEA,eAAsB,oBAEW;AAChC,QAAM,OAAO,KAAK,iBAAiB,QAAQ,QAAW,EAAE,cAAc,KAAK,CAAC;AAC5E,QAAM,OAAO,KAAK,iBAAiB,QAAQ,QAAW,EAAE,cAAc,KAAK,CAAC;AAC5E,QAAM,YAAY,KAAK,iBAAiB,WAAW;AAEnD,QAAM,WAAW,MAAM,+CAA8B;AAAA,IACpD;AAAA,IACA;AAAA,IACA,UAAU,IAAI,UAAU,IAAI;AAAA,IAC5B,CAAC;AAAA,IACD,EAAE,QAAQ,UAAU;AAAA,EACrB;AAEA,QAAM,UAA6B,SAAS,MAAM,CAAC,EAAE;AAErD,QAAM,SAAgC,CAAC;AAEvC,aAAW,UAAU,QAAQ,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,GAAG;AACrE,UAAM,YAAY,QAAQ,MAAM;AAChC,UAAM,QAAQ;AAAA,MACb,IAAI,OAAO;AAAA,MACX,kBAAkB,OAAO,uBAAuB,OAAO;AAAA,MACvD,cAAc;AAAA,MACd,SAAS;AAAA,MACT,aAAa,OAAO;AAAA,MACpB,UAAU,OAAO,YAAY,CAAC;AAAA,MAC9B,UAAU,OAAO;AAAA,MACjB,MAAM;AAAA,IACP;AACA,QAAI,MAAM,SAAS,WAAW;AAC7B,YAAM,UAAU,CAAC;AACjB,UAAI,MAAM,QAAQ,OAAO,QAAQ,OAAO,GAAG;AAC1C,mBAAW,UAAU,OAAO,OAAO,SAAS;AAC3C,gBAAM,QAAQ,KAAK;AAAA,YAClB,MAAM;AAAA,YACN,OAAO;AAAA,UACR,CAAC;AAAA,QACF;AAAA,MACD;AAAA,IACD;AACA,WAAO,KAAK,KAAK;AAAA,EAClB;AAEA,MAAI,cAAc,UAAU;AAC3B,WAAO,KAAK;AAAA,MACX,IAAI;AAAA,MACJ,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,UAAU;AAAA,MACV,MAAM;AAAA,IACP,CAAC;AAAA,EACF;AAEA,SAAO,EAAE,OAAO;AACjB;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var credentials_exports = {};
|
|
20
|
+
__export(credentials_exports, {
|
|
21
|
+
credentials: () => credentials
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(credentials_exports);
|
|
24
|
+
const credentials = {
|
|
25
|
+
microsoftSharePointOAuth2Api: {
|
|
26
|
+
grantType: "authorizationCode",
|
|
27
|
+
authUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
|
|
28
|
+
accessTokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
|
|
29
|
+
clientId: "CLIENT_ID",
|
|
30
|
+
clientSecret: "CLIENT_SECRET",
|
|
31
|
+
scope: "openid offline_access https://mydomain.sharepoint.com/.default",
|
|
32
|
+
authQueryParameters: "response_mode=query",
|
|
33
|
+
authentication: "body",
|
|
34
|
+
oauthTokenData: {
|
|
35
|
+
token_type: "Bearer",
|
|
36
|
+
scope: "https://mydomain.sharepoint.com/Sites.Manage.All https://mydomain.sharepoint.com/Sites.Read.All https://mydomain.sharepoint.com/Sites.ReadWrite.All https://mydomain.sharepoint.com/Sites.Selected https://mydomain.sharepoint.com/User.Read https://mydomain.sharepoint.com/.default",
|
|
37
|
+
expires_in: 4763,
|
|
38
|
+
ext_expires_in: 4763,
|
|
39
|
+
access_token: "ACCESSTOKEN",
|
|
40
|
+
refresh_token: "REFRESHTOKEN",
|
|
41
|
+
id_token: "IDTOKEN",
|
|
42
|
+
callbackQueryString: {
|
|
43
|
+
session_state: "SESSIONSTATE"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
subdomain: "mydomain",
|
|
47
|
+
baseUrl: "https://mydomain.sharepoint.com/_api/v2.0"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
credentials
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../nodes/Microsoft/SharePoint/test/credentials.ts"],"sourcesContent":["export const credentials = {\n\tmicrosoftSharePointOAuth2Api: {\n\t\tgrantType: 'authorizationCode',\n\t\tauthUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',\n\t\taccessTokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',\n\t\tclientId: 'CLIENT_ID',\n\t\tclientSecret: 'CLIENT_SECRET',\n\t\tscope: 'openid offline_access https://mydomain.sharepoint.com/.default',\n\t\tauthQueryParameters: 'response_mode=query',\n\t\tauthentication: 'body',\n\t\toauthTokenData: {\n\t\t\ttoken_type: 'Bearer',\n\t\t\tscope:\n\t\t\t\t'https://mydomain.sharepoint.com/Sites.Manage.All https://mydomain.sharepoint.com/Sites.Read.All https://mydomain.sharepoint.com/Sites.ReadWrite.All https://mydomain.sharepoint.com/Sites.Selected https://mydomain.sharepoint.com/User.Read https://mydomain.sharepoint.com/.default',\n\t\t\texpires_in: 4763,\n\t\t\text_expires_in: 4763,\n\t\t\taccess_token: 'ACCESSTOKEN',\n\t\t\trefresh_token: 'REFRESHTOKEN',\n\t\t\tid_token: 'IDTOKEN',\n\t\t\tcallbackQueryString: {\n\t\t\t\tsession_state: 'SESSIONSTATE',\n\t\t\t},\n\t\t},\n\t\tsubdomain: 'mydomain',\n\t\tbaseUrl: 'https://mydomain.sharepoint.com/_api/v2.0',\n\t},\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;AAAA,EAC1B,8BAA8B;AAAA,IAC7B,WAAW;AAAA,IACX,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,cAAc;AAAA,IACd,OAAO;AAAA,IACP,qBAAqB;AAAA,IACrB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,MACf,YAAY;AAAA,MACZ,OACC;AAAA,MACD,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,UAAU;AAAA,MACV,qBAAqB;AAAA,QACpB,eAAe;AAAA,MAChB;AAAA,IACD;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,EACV;AACD;","names":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var transport_exports = {};
|
|
20
|
+
__export(transport_exports, {
|
|
21
|
+
microsoftSharePointApiRequest: () => microsoftSharePointApiRequest
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(transport_exports);
|
|
24
|
+
async function microsoftSharePointApiRequest(method, endpoint, body = {}, qs, headers, url) {
|
|
25
|
+
const credentials = await this.getCredentials(
|
|
26
|
+
"microsoftSharePointOAuth2Api"
|
|
27
|
+
);
|
|
28
|
+
const options = {
|
|
29
|
+
method,
|
|
30
|
+
url: url ?? `https://${credentials.subdomain}.sharepoint.com/_api/v2.0${endpoint}`,
|
|
31
|
+
json: true,
|
|
32
|
+
headers,
|
|
33
|
+
body,
|
|
34
|
+
qs
|
|
35
|
+
};
|
|
36
|
+
return await this.helpers.httpRequestWithAuthentication.call(
|
|
37
|
+
this,
|
|
38
|
+
"microsoftSharePointOAuth2Api",
|
|
39
|
+
options
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
microsoftSharePointApiRequest
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../nodes/Microsoft/SharePoint/transport/index.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIExecuteSingleFunctions,\n\tIHttpRequestMethods,\n\tIHttpRequestOptions,\n\tILoadOptionsFunctions,\n} from 'n8n-workflow';\n\nexport async function microsoftSharePointApiRequest(\n\tthis: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\tbody: IDataObject | Buffer = {},\n\tqs?: IDataObject,\n\theaders?: IDataObject,\n\turl?: string,\n): Promise<any> {\n\tconst credentials: { subdomain: string } = await this.getCredentials(\n\t\t'microsoftSharePointOAuth2Api',\n\t);\n\n\tconst options: IHttpRequestOptions = {\n\t\tmethod,\n\t\turl: url ?? `https://${credentials.subdomain}.sharepoint.com/_api/v2.0${endpoint}`,\n\t\tjson: true,\n\t\theaders,\n\t\tbody,\n\t\tqs,\n\t};\n\n\treturn await this.helpers.httpRequestWithAuthentication.call(\n\t\tthis,\n\t\t'microsoftSharePointOAuth2Api',\n\t\toptions,\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,eAAsB,8BAErB,QACA,UACA,OAA6B,CAAC,GAC9B,IACA,SACA,KACe;AACf,QAAM,cAAqC,MAAM,KAAK;AAAA,IACrD;AAAA,EACD;AAEA,QAAM,UAA+B;AAAA,IACpC;AAAA,IACA,KAAK,OAAO,WAAW,YAAY,SAAS,4BAA4B,QAAQ;AAAA,IAChF,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,SAAO,MAAM,KAAK,QAAQ,8BAA8B;AAAA,IACvD;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"name": {
|
|
5
|
+
"type": "string"
|
|
6
|
+
},
|
|
7
|
+
"properties": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"blobType": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"contentLength": {
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"contentMD5": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"contentType": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"creationTime": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"etag": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"lastModified": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"leaseState": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"leaseStatus": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"serverEncrypted": {
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"version": 1
|
|
44
|
+
}
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var MicrosoftTeamsTrigger_node_exports = {};
|
|
20
|
+
__export(MicrosoftTeamsTrigger_node_exports, {
|
|
21
|
+
MicrosoftTeamsTrigger: () => MicrosoftTeamsTrigger
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(MicrosoftTeamsTrigger_node_exports);
|
|
24
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
25
|
+
var import_utils_trigger = require("./v2/helpers/utils-trigger");
|
|
26
|
+
var import_methods = require("./v2/methods");
|
|
27
|
+
var import_transport = require("./v2/transport");
|
|
28
|
+
class MicrosoftTeamsTrigger {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.description = {
|
|
31
|
+
displayName: "Microsoft Teams Trigger",
|
|
32
|
+
name: "microsoftTeamsTrigger",
|
|
33
|
+
icon: "file:teams.svg",
|
|
34
|
+
group: ["trigger"],
|
|
35
|
+
version: 1,
|
|
36
|
+
description: "Triggers workflows in n8n based on events from Microsoft Teams, such as new messages or team updates, using specified configurations.",
|
|
37
|
+
subtitle: "Microsoft Teams Trigger",
|
|
38
|
+
defaults: {
|
|
39
|
+
name: "Microsoft Teams Trigger"
|
|
40
|
+
},
|
|
41
|
+
credentials: [
|
|
42
|
+
{
|
|
43
|
+
name: "microsoftTeamsOAuth2Api",
|
|
44
|
+
required: true
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
inputs: [],
|
|
48
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.Main],
|
|
49
|
+
webhooks: [
|
|
50
|
+
{
|
|
51
|
+
name: "default",
|
|
52
|
+
httpMethod: "POST",
|
|
53
|
+
responseMode: "onReceived",
|
|
54
|
+
path: "webhook"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
properties: [
|
|
58
|
+
{
|
|
59
|
+
displayName: "Trigger On",
|
|
60
|
+
name: "event",
|
|
61
|
+
type: "options",
|
|
62
|
+
default: "newChannelMessage",
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
name: "New Channel",
|
|
66
|
+
value: "newChannel",
|
|
67
|
+
description: "A new channel is created"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "New Channel Message",
|
|
71
|
+
value: "newChannelMessage",
|
|
72
|
+
description: "A message is posted to a channel"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "New Chat",
|
|
76
|
+
value: "newChat",
|
|
77
|
+
description: "A new chat is created"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "New Chat Message",
|
|
81
|
+
value: "newChatMessage",
|
|
82
|
+
description: "A message is posted to a chat"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "New Team Member",
|
|
86
|
+
value: "newTeamMember",
|
|
87
|
+
description: "A new member is added to a team"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
description: "Select the event to trigger the workflow"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
displayName: "Watch All Teams",
|
|
94
|
+
name: "watchAllTeams",
|
|
95
|
+
type: "boolean",
|
|
96
|
+
default: false,
|
|
97
|
+
description: "Whether to watch for the event in all the available teams",
|
|
98
|
+
displayOptions: {
|
|
99
|
+
show: {
|
|
100
|
+
event: ["newChannel", "newChannelMessage", "newTeamMember"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: "Team",
|
|
106
|
+
name: "teamId",
|
|
107
|
+
type: "resourceLocator",
|
|
108
|
+
default: {
|
|
109
|
+
mode: "list",
|
|
110
|
+
value: ""
|
|
111
|
+
},
|
|
112
|
+
required: true,
|
|
113
|
+
description: "Select a team from the list, enter an ID or a URL",
|
|
114
|
+
modes: [
|
|
115
|
+
{
|
|
116
|
+
displayName: "From List",
|
|
117
|
+
name: "list",
|
|
118
|
+
type: "list",
|
|
119
|
+
placeholder: "Select a team...",
|
|
120
|
+
typeOptions: {
|
|
121
|
+
searchListMethod: "getTeams",
|
|
122
|
+
searchable: true
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: "By ID",
|
|
127
|
+
name: "id",
|
|
128
|
+
type: "string",
|
|
129
|
+
placeholder: "e.g., 61165b04-e4cc-4026-b43f-926b4e2a7182"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
displayName: "By URL",
|
|
133
|
+
name: "url",
|
|
134
|
+
type: "string",
|
|
135
|
+
placeholder: "e.g., https://teams.microsoft.com/l/team/19%3A...groupId=your-team-id&tenantId=...",
|
|
136
|
+
extractValue: {
|
|
137
|
+
type: "regex",
|
|
138
|
+
regex: /groupId=([0-9a-fA-F-]{36})/
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
displayOptions: {
|
|
143
|
+
show: {
|
|
144
|
+
event: ["newChannel", "newChannelMessage", "newTeamMember"],
|
|
145
|
+
watchAllTeams: [false]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
displayName: "Watch All Channels",
|
|
151
|
+
name: "watchAllChannels",
|
|
152
|
+
type: "boolean",
|
|
153
|
+
default: false,
|
|
154
|
+
description: "Whether to watch for the event in all the available channels",
|
|
155
|
+
displayOptions: {
|
|
156
|
+
show: {
|
|
157
|
+
event: ["newChannelMessage"],
|
|
158
|
+
watchAllTeams: [false]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
displayName: "Channel",
|
|
164
|
+
name: "channelId",
|
|
165
|
+
type: "resourceLocator",
|
|
166
|
+
default: {
|
|
167
|
+
mode: "list",
|
|
168
|
+
value: ""
|
|
169
|
+
},
|
|
170
|
+
required: true,
|
|
171
|
+
description: "Select a channel from the list, enter an ID or a URL",
|
|
172
|
+
modes: [
|
|
173
|
+
{
|
|
174
|
+
displayName: "From List",
|
|
175
|
+
name: "list",
|
|
176
|
+
type: "list",
|
|
177
|
+
placeholder: "Select a channel...",
|
|
178
|
+
typeOptions: {
|
|
179
|
+
searchListMethod: "getChannels",
|
|
180
|
+
searchable: true
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
displayName: "By ID",
|
|
185
|
+
name: "id",
|
|
186
|
+
type: "string",
|
|
187
|
+
placeholder: "e.g., 19:-xlxyqXNSCxpI1SDzgQ_L9ZvzSR26pgphq1BJ9y7QJE1@thread.tacv2"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
displayName: "By URL",
|
|
191
|
+
name: "url",
|
|
192
|
+
type: "string",
|
|
193
|
+
placeholder: "e.g., https://teams.microsoft.com/l/channel/19%3A...@thread.tacv2/...",
|
|
194
|
+
extractValue: {
|
|
195
|
+
type: "regex",
|
|
196
|
+
regex: /channel\/([^\/?]+)/
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
displayOptions: {
|
|
201
|
+
show: {
|
|
202
|
+
event: ["newChannelMessage"],
|
|
203
|
+
watchAllTeams: [false],
|
|
204
|
+
watchAllChannels: [false]
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
displayName: "Watch All Chats",
|
|
210
|
+
name: "watchAllChats",
|
|
211
|
+
type: "boolean",
|
|
212
|
+
default: false,
|
|
213
|
+
description: "Whether to watch for the event in all the available chats",
|
|
214
|
+
displayOptions: {
|
|
215
|
+
show: {
|
|
216
|
+
event: ["newChatMessage"]
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
displayName: "Chat",
|
|
222
|
+
name: "chatId",
|
|
223
|
+
type: "resourceLocator",
|
|
224
|
+
default: {
|
|
225
|
+
mode: "list",
|
|
226
|
+
value: ""
|
|
227
|
+
},
|
|
228
|
+
required: true,
|
|
229
|
+
description: "Select a chat from the list, enter an ID or a URL",
|
|
230
|
+
modes: [
|
|
231
|
+
{
|
|
232
|
+
displayName: "From List",
|
|
233
|
+
name: "list",
|
|
234
|
+
type: "list",
|
|
235
|
+
placeholder: "Select a chat...",
|
|
236
|
+
typeOptions: {
|
|
237
|
+
searchListMethod: "getChats",
|
|
238
|
+
searchable: true
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
displayName: "By ID",
|
|
243
|
+
name: "id",
|
|
244
|
+
type: "string",
|
|
245
|
+
placeholder: "19:7e2f1174-e8ee-4859-b8b1-a8d1cc63d276@unq.gbl.spaces"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
displayName: "By URL",
|
|
249
|
+
name: "url",
|
|
250
|
+
type: "string",
|
|
251
|
+
placeholder: "https://teams.microsoft.com/_#/conversations/CHAT_ID",
|
|
252
|
+
extractValue: {
|
|
253
|
+
type: "regex",
|
|
254
|
+
regex: /conversations\/([^\/?]+)/i
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
displayOptions: {
|
|
259
|
+
show: {
|
|
260
|
+
event: ["newChatMessage"],
|
|
261
|
+
watchAllChats: [false]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
};
|
|
267
|
+
this.methods = {
|
|
268
|
+
listSearch: import_methods.listSearch
|
|
269
|
+
};
|
|
270
|
+
this.webhookMethods = {
|
|
271
|
+
default: {
|
|
272
|
+
async checkExists() {
|
|
273
|
+
const event = this.getNodeParameter("event", 0);
|
|
274
|
+
const webhookUrl = this.getNodeWebhookUrl("default");
|
|
275
|
+
const webhookData = this.getWorkflowStaticData("node");
|
|
276
|
+
try {
|
|
277
|
+
const subscriptions = await import_transport.microsoftApiRequestAllItems.call(
|
|
278
|
+
this,
|
|
279
|
+
"value",
|
|
280
|
+
"GET",
|
|
281
|
+
"/v1.0/subscriptions"
|
|
282
|
+
);
|
|
283
|
+
const matchingSubscriptions = subscriptions.filter(
|
|
284
|
+
(subscription) => subscription.notificationUrl === webhookUrl
|
|
285
|
+
);
|
|
286
|
+
const now = /* @__PURE__ */ new Date();
|
|
287
|
+
const thresholdMs = 5 * 60 * 1e3;
|
|
288
|
+
const validSubscriptions = matchingSubscriptions.filter((subscription) => {
|
|
289
|
+
const expiration = new Date(subscription.expirationDateTime);
|
|
290
|
+
return expiration.getTime() - now.getTime() > thresholdMs;
|
|
291
|
+
});
|
|
292
|
+
const resourcePaths = await import_utils_trigger.getResourcePath.call(this, event);
|
|
293
|
+
const requiredResources = Array.isArray(resourcePaths) ? resourcePaths : [resourcePaths];
|
|
294
|
+
const subscribedResources = validSubscriptions.map((sub) => sub.resource);
|
|
295
|
+
const allResourcesSubscribed = requiredResources.every(
|
|
296
|
+
(resource) => subscribedResources.includes(resource)
|
|
297
|
+
);
|
|
298
|
+
if (allResourcesSubscribed) {
|
|
299
|
+
webhookData.subscriptionIds = validSubscriptions.map((sub) => sub.id);
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
return false;
|
|
303
|
+
} catch (error) {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
async create() {
|
|
308
|
+
const event = this.getNodeParameter("event", 0);
|
|
309
|
+
const webhookUrl = this.getNodeWebhookUrl("default");
|
|
310
|
+
const webhookData = this.getWorkflowStaticData("node");
|
|
311
|
+
if (!webhookUrl || !webhookUrl.startsWith("https://")) {
|
|
312
|
+
throw new import_n8n_workflow.NodeApiError(this.getNode(), {
|
|
313
|
+
message: "Invalid Notification URL",
|
|
314
|
+
description: `The webhook URL "${webhookUrl}" is invalid. Microsoft Graph requires an HTTPS URL.`
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
const resourcePaths = await import_utils_trigger.getResourcePath.call(this, event);
|
|
318
|
+
const subscriptionIds = [];
|
|
319
|
+
if (Array.isArray(resourcePaths)) {
|
|
320
|
+
await Promise.all(
|
|
321
|
+
resourcePaths.map(async (resource) => {
|
|
322
|
+
const subscription = await import_utils_trigger.createSubscription.call(this, webhookUrl, resource);
|
|
323
|
+
subscriptionIds.push(subscription.id);
|
|
324
|
+
return subscription;
|
|
325
|
+
})
|
|
326
|
+
);
|
|
327
|
+
webhookData.subscriptionIds = subscriptionIds;
|
|
328
|
+
} else {
|
|
329
|
+
const subscription = await import_utils_trigger.createSubscription.call(this, webhookUrl, resourcePaths);
|
|
330
|
+
webhookData.subscriptionIds = [subscription.id];
|
|
331
|
+
}
|
|
332
|
+
return true;
|
|
333
|
+
},
|
|
334
|
+
async delete() {
|
|
335
|
+
const webhookData = this.getWorkflowStaticData("node");
|
|
336
|
+
const storedIds = webhookData.subscriptionIds;
|
|
337
|
+
if (!Array.isArray(storedIds)) {
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
try {
|
|
341
|
+
await Promise.all(
|
|
342
|
+
storedIds.map(async (subscriptionId) => {
|
|
343
|
+
try {
|
|
344
|
+
await import_transport.microsoftApiRequest.call(
|
|
345
|
+
this,
|
|
346
|
+
"DELETE",
|
|
347
|
+
`/v1.0/subscriptions/${subscriptionId}`
|
|
348
|
+
);
|
|
349
|
+
} catch (error) {
|
|
350
|
+
if (error.httpStatusCode !== 404) {
|
|
351
|
+
throw error;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
);
|
|
356
|
+
delete webhookData.subscriptionIds;
|
|
357
|
+
return true;
|
|
358
|
+
} catch (error) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
async webhook() {
|
|
366
|
+
const req = this.getRequestObject();
|
|
367
|
+
const res = this.getResponseObject();
|
|
368
|
+
if (req.query.validationToken) {
|
|
369
|
+
res.status(200).send(req.query.validationToken);
|
|
370
|
+
return { noWebhookResponse: true };
|
|
371
|
+
}
|
|
372
|
+
const eventNotifications = req.body.value;
|
|
373
|
+
const response = {
|
|
374
|
+
workflowData: eventNotifications.map((event) => [
|
|
375
|
+
{
|
|
376
|
+
json: event.resourceData ?? event
|
|
377
|
+
}
|
|
378
|
+
])
|
|
379
|
+
};
|
|
380
|
+
return response;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
384
|
+
0 && (module.exports = {
|
|
385
|
+
MicrosoftTeamsTrigger
|
|
386
|
+
});
|
|
387
|
+
//# sourceMappingURL=MicrosoftTeamsTrigger.node.js.map
|