n8n-nodes-base 1.7.0 → 1.8.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/LinearOAuth2Api.credentials.d.ts +8 -0
- package/dist/credentials/LinearOAuth2Api.credentials.js +73 -0
- package/dist/credentials/LinearOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/MicrosoftOutlookOAuth2Api.credentials.js +15 -1
- package/dist/credentials/MicrosoftOutlookOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/Sms77Api.credentials.js +16 -3
- package/dist/credentials/Sms77Api.credentials.js.map +1 -1
- package/dist/credentials/TwitterOAuth1Api.credentials.js +2 -2
- package/dist/credentials/TwitterOAuth1Api.credentials.js.map +1 -1
- package/dist/credentials/TwitterOAuth2Api.credentials.js +2 -2
- package/dist/credentials/TwitterOAuth2Api.credentials.js.map +1 -1
- package/dist/known/credentials.json +12 -0
- package/dist/methods/defined.json +4 -1
- package/dist/methods/referenced.json +4 -1
- package/dist/nodes/Airtable/v2/actions/base/getMany.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/base/getSchema.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/record/create.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/record/deleteRecord.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/record/get.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/record/search.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/record/update.operation.d.ts +2 -0
- package/dist/nodes/Airtable/v2/actions/record/upsert.operation.d.ts +2 -0
- package/dist/nodes/Code/descriptions/JavascriptCodeDescription.js +1 -0
- package/dist/nodes/Code/descriptions/JavascriptCodeDescription.js.map +1 -1
- package/dist/nodes/Code/descriptions/PythonCodeDescription.js +1 -0
- package/dist/nodes/Code/descriptions/PythonCodeDescription.js.map +1 -1
- package/dist/nodes/CrateDb/CrateDb.node.js +1 -0
- package/dist/nodes/CrateDb/CrateDb.node.js.map +1 -1
- package/dist/nodes/E2eTest/E2eTest.node.js +7 -0
- package/dist/nodes/E2eTest/E2eTest.node.js.map +1 -1
- package/dist/nodes/E2eTest/mock.js +9 -0
- package/dist/nodes/E2eTest/mock.js.map +1 -1
- package/dist/nodes/EmailSend/v2/send.operation.d.ts +2 -0
- package/dist/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.d.ts +2 -0
- package/dist/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.js +2 -0
- package/dist/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.js.map +1 -1
- package/dist/nodes/Google/BigQuery/v2/actions/database/insert.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/drive/create.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/drive/deleteDrive.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/drive/get.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/drive/list.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/drive/update.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/copy.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/deleteFile.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/download.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/move.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/share.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/update.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/file/upload.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/fileFolder/search.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/folder/create.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/folder/deleteFolder.operation.d.ts +2 -0
- package/dist/nodes/Google/Drive/v2/actions/folder/share.operation.d.ts +2 -0
- package/dist/nodes/Html/Html.node.js +10 -1
- package/dist/nodes/Html/Html.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
- package/dist/nodes/ItemLists/V3/actions/itemList/concatenateItems.operation.d.ts +2 -0
- package/dist/nodes/ItemLists/V3/actions/itemList/limit.operation.d.ts +2 -0
- package/dist/nodes/ItemLists/V3/actions/itemList/removeDuplicates.operation.d.ts +2 -0
- package/dist/nodes/ItemLists/V3/actions/itemList/sort.operation.d.ts +2 -0
- package/dist/nodes/ItemLists/V3/actions/itemList/splitOutItems.operation.d.ts +2 -0
- package/dist/nodes/ItemLists/V3/actions/itemList/summarize.operation.d.ts +2 -0
- package/dist/nodes/Linear/GenericFunctions.js +2 -1
- package/dist/nodes/Linear/GenericFunctions.js.map +1 -1
- package/dist/nodes/Linear/Linear.node.js +30 -0
- package/dist/nodes/Linear/Linear.node.js.map +1 -1
- package/dist/nodes/Linear/LinearTrigger.node.js +30 -0
- package/dist/nodes/Linear/LinearTrigger.node.js.map +1 -1
- package/dist/nodes/Microsoft/Excel/v2/actions/table/addTable.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/table/append.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/table/convertToRange.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/table/deleteTable.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/table/getColumns.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/table/getRows.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/table/lookup.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/workbook/addWorksheet.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/workbook/deleteWorkbook.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/workbook/getAll.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/append.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/clear.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/deleteWorksheet.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/getAll.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/readRows.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/update.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Excel/v2/actions/worksheet/upsert.operation.d.ts +2 -0
- package/dist/nodes/Microsoft/Outlook/MicrosoftOutlook.node.d.ts +3 -9
- package/dist/nodes/Microsoft/Outlook/MicrosoftOutlook.node.js +9 -774
- package/dist/nodes/Microsoft/Outlook/MicrosoftOutlook.node.js.map +1 -1
- package/dist/nodes/Microsoft/Outlook/test/v2/node/calendar/create.workflow.json +92 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/calendar/delete.workflow.json +74 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/calendar/get.workflow.json +93 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/calendar/getAll.workflow.json +112 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/calendar/update.workflow.json +98 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/contact/create.workflow.json +121 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/contact/update.workflow.json +138 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/draft/create.workflow.json +154 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/draft/send.workflow.json +76 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/event/create.workflow.json +170 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/folder/create.workflow.json +85 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/folderMessage/getAll.workflow.json +84 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/message/move.workflow.json +81 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/message/reply.workflow.json +134 -0
- package/dist/nodes/Microsoft/Outlook/test/v2/node/message/send.workflow.json +73 -0
- package/dist/nodes/Microsoft/Outlook/v1/DraftDescription.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/DraftMessageSharedDescription.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/FolderDescription.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/FolderMessageDecription.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/GenericFunctions.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/MessageAttachmentDescription.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/MessageDescription.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.d.ts +11 -0
- package/dist/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.js +811 -0
- package/dist/nodes/Microsoft/Outlook/v1/MicrosoftOutlookV1.node.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.d.ts +11 -0
- package/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.js +20 -0
- package/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.js +105 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.js +24 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.js +25 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.js +61 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/index.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/index.js +88 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.js +99 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/calendar/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.js +54 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.js +24 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.js +69 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.js +116 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/index.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/index.js +88 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.js +37 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/contact/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.js +229 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.js +24 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.js +108 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/index.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/index.js +88 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.js +44 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/send.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.js +189 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/draft/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/create.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/create.operation.js +270 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.js +25 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/get.operation.js +71 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.js +139 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/index.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/index.js +88 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/update.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/update.operation.js +257 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.js +54 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/create.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.js +25 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.js +52 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.js +101 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/index.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/index.js +88 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.js +38 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folder/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.js +253 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folderMessage/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.d.ts +4 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.js +52 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/folderMessage/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.js +24 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/delete.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/get.operation.js +146 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.js +269 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/index.d.ts +10 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/index.js +106 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/move.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/move.operation.js +33 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/move.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.js +263 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/reply.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/send.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/send.operation.js +240 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/send.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/update.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/update.operation.js +197 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/message/update.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.js +106 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/add.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.js +54 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/download.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.js +74 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/get.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.d.ts +26 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.js +81 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/getAll.operation.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.d.ts +7 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.js +79 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/messageAttachment/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/node.description.d.ts +2 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/node.description.js +106 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/node.description.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/node.type.d.ts +13 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/node.type.js +3 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/node.type.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/router.d.ts +2 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/router.js +97 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/router.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/common.descriptions.d.ts +7 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/common.descriptions.js +394 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/common.descriptions.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/index.d.ts +2 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/index.js +19 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/rlc.description.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/rlc.description.js +223 -0
- package/dist/nodes/Microsoft/Outlook/v2/descriptions/rlc.description.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/helpers/utils.d.ts +35 -0
- package/dist/nodes/Microsoft/Outlook/v2/helpers/utils.js +266 -0
- package/dist/nodes/Microsoft/Outlook/v2/helpers/utils.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/index.d.ts +2 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/index.js +29 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/index.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/listSearch.d.ts +8 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/listSearch.js +182 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/listSearch.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/loadOptions.d.ts +4 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/loadOptions.js +42 -0
- package/dist/nodes/Microsoft/Outlook/v2/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Microsoft/Outlook/v2/transport/index.d.ts +6 -0
- package/dist/nodes/Microsoft/Outlook/v2/transport/index.js +122 -0
- package/dist/nodes/Microsoft/Outlook/v2/transport/index.js.map +1 -0
- package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js +2 -1
- package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js.map +1 -1
- package/dist/nodes/MySql/v1/MySqlV1.node.js +1 -0
- package/dist/nodes/MySql/v1/MySqlV1.node.js.map +1 -1
- package/dist/nodes/MySql/v2/actions/database/deleteTable.operation.d.ts +2 -0
- package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.d.ts +2 -0
- package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.js +2 -1
- package/dist/nodes/MySql/v2/actions/database/executeQuery.operation.js.map +1 -1
- package/dist/nodes/MySql/v2/actions/database/insert.operation.d.ts +2 -0
- package/dist/nodes/MySql/v2/actions/database/select.operation.d.ts +2 -0
- package/dist/nodes/MySql/v2/actions/database/update.operation.d.ts +2 -0
- package/dist/nodes/MySql/v2/actions/database/upsert.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v1/PostgresV1.node.js +1 -0
- package/dist/nodes/Postgres/v1/PostgresV1.node.js.map +1 -1
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js +2 -1
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js.map +1 -1
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/router.js +1 -1
- package/dist/nodes/Postgres/v2/actions/router.js.map +1 -1
- package/dist/nodes/QuestDb/QuestDb.node.js +1 -0
- package/dist/nodes/QuestDb/QuestDb.node.js.map +1 -1
- package/dist/nodes/Set/Set.node.d.ts +3 -4
- package/dist/nodes/Set/Set.node.js +12 -173
- package/dist/nodes/Set/Set.node.js.map +1 -1
- package/dist/nodes/Set/Set.node.json +1 -1
- package/dist/nodes/Set/test/Set.v3.workflow.json +656 -0
- package/dist/nodes/Set/v1/SetV1.node.d.ts +6 -0
- package/dist/nodes/Set/v1/SetV1.node.js +191 -0
- package/dist/nodes/Set/v1/SetV1.node.js.map +1 -0
- package/dist/nodes/Set/v2/SetV2.node.d.ts +6 -0
- package/dist/nodes/Set/v2/SetV2.node.js +248 -0
- package/dist/nodes/Set/v2/SetV2.node.js.map +1 -0
- package/dist/nodes/Set/v2/helpers/interfaces.d.ts +23 -0
- package/dist/nodes/Set/v2/helpers/interfaces.js +10 -0
- package/dist/nodes/Set/v2/helpers/interfaces.js.map +1 -0
- package/dist/nodes/Set/v2/helpers/utils.d.ts +9 -0
- package/dist/nodes/Set/v2/helpers/utils.js +172 -0
- package/dist/nodes/Set/v2/helpers/utils.js.map +1 -0
- package/dist/nodes/Set/v2/manual.mode.d.ts +30 -0
- package/dist/nodes/Set/v2/manual.mode.js +178 -0
- package/dist/nodes/Set/v2/manual.mode.js.map +1 -0
- package/dist/nodes/Set/v2/raw.mode.d.ts +30 -0
- package/dist/nodes/Set/v2/raw.mode.js +51 -0
- package/dist/nodes/Set/v2/raw.mode.js.map +1 -0
- package/dist/nodes/Sms77/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Sms77/GenericFunctions.js +1 -1
- package/dist/nodes/Sms77/Sms77.node.js +4 -4
- package/dist/nodes/Sms77/Sms77.node.js.map +1 -1
- package/dist/nodes/Sms77/Sms77.node.json +2 -1
- package/dist/nodes/Sms77/seven.svg +1 -0
- package/dist/nodes/Snowflake/Snowflake.node.js +1 -0
- package/dist/nodes/Snowflake/Snowflake.node.js.map +1 -1
- package/dist/nodes/Spotify/Spotify.node.js +3 -3
- package/dist/nodes/Spotify/Spotify.node.js.map +1 -1
- package/dist/nodes/TheHiveProject/actions/alert/create.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/deleteAlert.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/executeResponder.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/get.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/merge.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/promote.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/status.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/alert/update.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/addAttachment.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/create.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/deleteAttachment.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/deleteCase.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/executeResponder.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/get.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/getAttachment.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/getTimeline.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/case/update.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/comment/add.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/comment/deleteComment.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/comment/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/comment/update.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/addAttachment.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/create.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/deleteAttachment.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/deleteLog.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/executeResponder.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/get.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/log/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/create.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/deleteObservable.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/executeAnalyzer.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/executeResponder.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/get.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/observable/update.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/page/create.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/page/deletePage.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/page/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/page/update.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/query/executeQuery.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/task/create.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/task/deleteTask.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/task/executeResponder.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/task/get.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/task/search.operation.d.ts +2 -0
- package/dist/nodes/TheHiveProject/actions/task/update.operation.d.ts +2 -0
- package/dist/nodes/TimescaleDb/TimescaleDb.node.js +1 -0
- package/dist/nodes/TimescaleDb/TimescaleDb.node.js.map +1 -1
- package/dist/nodes/Twitter/Twitter.node.js +3 -3
- package/dist/nodes/Twitter/Twitter.node.js.map +1 -1
- package/dist/nodes/Twitter/Twitter.node.json +1 -1
- package/dist/nodes/Twitter/V2/TwitterV2.node.js +2 -2
- package/dist/nodes/Twitter/V2/TwitterV2.node.js.map +1 -1
- package/dist/nodes/Twitter/x.svg +1 -0
- package/dist/types/credentials.json +5 -4
- package/dist/types/nodes.json +28 -25
- package/dist/utils/utilities.d.ts +2 -0
- package/package.json +4 -3
- package/dist/nodes/Microsoft/Outlook/DraftDescription.js.map +0 -1
- package/dist/nodes/Microsoft/Outlook/DraftMessageSharedDescription.js.map +0 -1
- package/dist/nodes/Microsoft/Outlook/FolderDescription.js.map +0 -1
- package/dist/nodes/Microsoft/Outlook/FolderMessageDecription.js.map +0 -1
- package/dist/nodes/Microsoft/Outlook/GenericFunctions.js.map +0 -1
- package/dist/nodes/Microsoft/Outlook/MessageAttachmentDescription.js.map +0 -1
- package/dist/nodes/Microsoft/Outlook/MessageDescription.js.map +0 -1
- package/dist/nodes/Sms77/sms77.png +0 -0
- package/dist/nodes/Twitter/twitter.svg +0 -1
- /package/dist/nodes/Microsoft/Outlook/{DraftDescription.d.ts → v1/DraftDescription.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{DraftDescription.js → v1/DraftDescription.js} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{DraftMessageSharedDescription.d.ts → v1/DraftMessageSharedDescription.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{DraftMessageSharedDescription.js → v1/DraftMessageSharedDescription.js} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{FolderDescription.d.ts → v1/FolderDescription.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{FolderDescription.js → v1/FolderDescription.js} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{FolderMessageDecription.d.ts → v1/FolderMessageDecription.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{FolderMessageDecription.js → v1/FolderMessageDecription.js} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{GenericFunctions.d.ts → v1/GenericFunctions.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{GenericFunctions.js → v1/GenericFunctions.js} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{MessageAttachmentDescription.d.ts → v1/MessageAttachmentDescription.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{MessageAttachmentDescription.js → v1/MessageAttachmentDescription.js} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{MessageDescription.d.ts → v1/MessageDescription.d.ts} +0 -0
- /package/dist/nodes/Microsoft/Outlook/{MessageDescription.js → v1/MessageDescription.js} +0 -0
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MicrosoftOutlookV1 = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
6
|
+
const DraftDescription_1 = require("./DraftDescription");
|
|
7
|
+
const DraftMessageSharedDescription_1 = require("./DraftMessageSharedDescription");
|
|
8
|
+
const MessageDescription_1 = require("./MessageDescription");
|
|
9
|
+
const MessageAttachmentDescription_1 = require("./MessageAttachmentDescription");
|
|
10
|
+
const FolderDescription_1 = require("./FolderDescription");
|
|
11
|
+
const FolderMessageDecription_1 = require("./FolderMessageDecription");
|
|
12
|
+
const descriptions_1 = require("../../../../utils/descriptions");
|
|
13
|
+
const versionDescription = {
|
|
14
|
+
displayName: 'Microsoft Outlook',
|
|
15
|
+
name: 'microsoftOutlook',
|
|
16
|
+
group: ['transform'],
|
|
17
|
+
icon: 'file:outlook.svg',
|
|
18
|
+
version: 1,
|
|
19
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
20
|
+
description: 'Consume Microsoft Outlook API',
|
|
21
|
+
defaults: {
|
|
22
|
+
name: 'Microsoft Outlook',
|
|
23
|
+
},
|
|
24
|
+
inputs: ['main'],
|
|
25
|
+
outputs: ['main'],
|
|
26
|
+
credentials: [
|
|
27
|
+
{
|
|
28
|
+
name: 'microsoftOutlookOAuth2Api',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
properties: [
|
|
33
|
+
descriptions_1.oldVersionNotice,
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Resource',
|
|
36
|
+
name: 'resource',
|
|
37
|
+
type: 'options',
|
|
38
|
+
noDataExpression: true,
|
|
39
|
+
default: 'message',
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
name: 'Draft',
|
|
43
|
+
value: 'draft',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Folder',
|
|
47
|
+
value: 'folder',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Folder Message',
|
|
51
|
+
value: 'folderMessage',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'Message',
|
|
55
|
+
value: 'message',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'Message Attachment',
|
|
59
|
+
value: 'messageAttachment',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
...DraftDescription_1.draftOperations,
|
|
64
|
+
...DraftDescription_1.draftFields,
|
|
65
|
+
...MessageDescription_1.messageOperations,
|
|
66
|
+
...MessageDescription_1.messageFields,
|
|
67
|
+
...MessageAttachmentDescription_1.messageAttachmentOperations,
|
|
68
|
+
...MessageAttachmentDescription_1.messageAttachmentFields,
|
|
69
|
+
...FolderDescription_1.folderOperations,
|
|
70
|
+
...FolderDescription_1.folderFields,
|
|
71
|
+
...FolderMessageDecription_1.folderMessageOperations,
|
|
72
|
+
...FolderMessageDecription_1.folderMessageFields,
|
|
73
|
+
...DraftMessageSharedDescription_1.draftMessageSharedFields,
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
class MicrosoftOutlookV1 {
|
|
77
|
+
constructor(baseDescription) {
|
|
78
|
+
this.methods = {
|
|
79
|
+
loadOptions: {
|
|
80
|
+
async getCategories() {
|
|
81
|
+
const returnData = [];
|
|
82
|
+
const categories = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', '/outlook/masterCategories');
|
|
83
|
+
for (const category of categories) {
|
|
84
|
+
returnData.push({
|
|
85
|
+
name: category.displayName,
|
|
86
|
+
value: category.id,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return returnData;
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
this.description = {
|
|
94
|
+
...baseDescription,
|
|
95
|
+
...versionDescription,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
async execute() {
|
|
99
|
+
const items = this.getInputData();
|
|
100
|
+
const returnData = [];
|
|
101
|
+
const length = items.length;
|
|
102
|
+
const qs = {};
|
|
103
|
+
let responseData;
|
|
104
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
105
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
106
|
+
if (['draft', 'message'].includes(resource)) {
|
|
107
|
+
if (operation === 'delete') {
|
|
108
|
+
for (let i = 0; i < length; i++) {
|
|
109
|
+
try {
|
|
110
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
111
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'DELETE', `/messages/${messageId}`);
|
|
112
|
+
returnData.push({ success: true });
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
if (this.continueOnFail()) {
|
|
116
|
+
returnData.push({ error: error.message });
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (operation === 'get') {
|
|
124
|
+
for (let i = 0; i < length; i++) {
|
|
125
|
+
try {
|
|
126
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
127
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
128
|
+
if (additionalFields.fields) {
|
|
129
|
+
qs.$select = additionalFields.fields;
|
|
130
|
+
}
|
|
131
|
+
if (additionalFields.filter) {
|
|
132
|
+
qs.$filter = additionalFields.filter;
|
|
133
|
+
}
|
|
134
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}`, undefined, qs);
|
|
135
|
+
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
136
|
+
const prefix = additionalFields.dataPropertyAttachmentsPrefixName;
|
|
137
|
+
const data = await GenericFunctions_1.downloadAttachments.call(this, responseData, prefix);
|
|
138
|
+
returnData.push.apply(returnData, data);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
returnData.push(responseData);
|
|
142
|
+
}
|
|
143
|
+
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
144
|
+
return [returnData];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
if (this.continueOnFail()) {
|
|
149
|
+
returnData.push({ error: error.message });
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (operation === 'update') {
|
|
157
|
+
for (let i = 0; i < length; i++) {
|
|
158
|
+
try {
|
|
159
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
160
|
+
const updateFields = this.getNodeParameter('updateFields', i);
|
|
161
|
+
const body = (0, GenericFunctions_1.createMessage)(updateFields);
|
|
162
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'PATCH', `/messages/${messageId}`, body, {});
|
|
163
|
+
returnData.push(responseData);
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
if (this.continueOnFail()) {
|
|
167
|
+
returnData.push({ error: error.message });
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (resource === 'draft') {
|
|
176
|
+
if (operation === 'create') {
|
|
177
|
+
for (let i = 0; i < length; i++) {
|
|
178
|
+
try {
|
|
179
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
180
|
+
const subject = this.getNodeParameter('subject', i);
|
|
181
|
+
const bodyContent = this.getNodeParameter('bodyContent', i, '');
|
|
182
|
+
additionalFields.subject = subject;
|
|
183
|
+
additionalFields.bodyContent = bodyContent || ' ';
|
|
184
|
+
const body = (0, GenericFunctions_1.createMessage)(additionalFields);
|
|
185
|
+
if (additionalFields.attachments) {
|
|
186
|
+
const attachments = additionalFields.attachments
|
|
187
|
+
.attachments;
|
|
188
|
+
body.attachments = attachments.map((attachment) => {
|
|
189
|
+
const binaryPropertyName = attachment.binaryPropertyName;
|
|
190
|
+
if (items[i].binary === undefined) {
|
|
191
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No binary data exists on item!', {
|
|
192
|
+
itemIndex: i,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
if (items[i].binary[binaryPropertyName] === undefined) {
|
|
196
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No binary data property "${binaryPropertyName}" does not exists on item!`, { itemIndex: i });
|
|
197
|
+
}
|
|
198
|
+
const binaryData = items[i].binary[binaryPropertyName];
|
|
199
|
+
return {
|
|
200
|
+
'@odata.type': '#microsoft.graph.fileAttachment',
|
|
201
|
+
name: binaryData.fileName,
|
|
202
|
+
contentBytes: binaryData.data,
|
|
203
|
+
};
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', '/messages', body, {});
|
|
207
|
+
returnData.push(responseData);
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
if (this.continueOnFail()) {
|
|
211
|
+
returnData.push({ error: error.message });
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
throw error;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (operation === 'send') {
|
|
219
|
+
for (let i = 0; i < length; i++) {
|
|
220
|
+
try {
|
|
221
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
222
|
+
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
223
|
+
if (additionalFields === null || additionalFields === void 0 ? void 0 : additionalFields.recipients) {
|
|
224
|
+
const recipients = additionalFields.recipients
|
|
225
|
+
.split(',')
|
|
226
|
+
.filter((email) => !!email);
|
|
227
|
+
if (recipients.length !== 0) {
|
|
228
|
+
await GenericFunctions_1.microsoftApiRequest.call(this, 'PATCH', `/messages/${messageId}`, {
|
|
229
|
+
toRecipients: recipients.map((recipient) => (0, GenericFunctions_1.makeRecipient)(recipient)),
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/send`);
|
|
234
|
+
returnData.push({ success: true });
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
if (this.continueOnFail()) {
|
|
238
|
+
returnData.push({ error: error.message });
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
throw error;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (resource === 'message') {
|
|
247
|
+
if (operation === 'reply') {
|
|
248
|
+
for (let i = 0; i < length; i++) {
|
|
249
|
+
try {
|
|
250
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
251
|
+
const replyType = this.getNodeParameter('replyType', i);
|
|
252
|
+
const comment = this.getNodeParameter('comment', i);
|
|
253
|
+
const send = this.getNodeParameter('send', i, false);
|
|
254
|
+
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
255
|
+
const body = {};
|
|
256
|
+
let action = 'createReply';
|
|
257
|
+
if (replyType === 'replyAll') {
|
|
258
|
+
body.comment = comment;
|
|
259
|
+
action = 'createReplyAll';
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
body.comment = comment;
|
|
263
|
+
body.message = {};
|
|
264
|
+
Object.assign(body.message, (0, GenericFunctions_1.createMessage)(additionalFields));
|
|
265
|
+
delete body.message.attachments;
|
|
266
|
+
}
|
|
267
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/${action}`, body);
|
|
268
|
+
if (additionalFields.attachments) {
|
|
269
|
+
const attachments = additionalFields.attachments
|
|
270
|
+
.attachments;
|
|
271
|
+
const data = attachments.map((attachment) => {
|
|
272
|
+
const binaryPropertyName = attachment.binaryPropertyName;
|
|
273
|
+
if (items[i].binary === undefined) {
|
|
274
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No binary data exists on item!', {
|
|
275
|
+
itemIndex: i,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
if (items[i].binary[binaryPropertyName] === undefined) {
|
|
279
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No binary data property "${binaryPropertyName}" does not exists on item!`, { itemIndex: i });
|
|
280
|
+
}
|
|
281
|
+
const binaryData = items[i].binary[binaryPropertyName];
|
|
282
|
+
return {
|
|
283
|
+
'@odata.type': '#microsoft.graph.fileAttachment',
|
|
284
|
+
name: binaryData.fileName,
|
|
285
|
+
contentBytes: binaryData.data,
|
|
286
|
+
};
|
|
287
|
+
});
|
|
288
|
+
for (const attachment of data) {
|
|
289
|
+
await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${responseData.id}/attachments`, attachment, {});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if (send) {
|
|
293
|
+
await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${responseData.id}/send`);
|
|
294
|
+
}
|
|
295
|
+
returnData.push(responseData);
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
if (this.continueOnFail()) {
|
|
299
|
+
returnData.push({ error: error.message });
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
throw error;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
if (operation === 'getMime') {
|
|
307
|
+
for (let i = 0; i < length; i++) {
|
|
308
|
+
try {
|
|
309
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
310
|
+
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
|
|
311
|
+
const response = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/$value`, undefined, {}, undefined, {}, { encoding: null, resolveWithFullResponse: true });
|
|
312
|
+
let mimeType;
|
|
313
|
+
if (response.headers['content-type']) {
|
|
314
|
+
mimeType = response.headers['content-type'];
|
|
315
|
+
}
|
|
316
|
+
const newItem = {
|
|
317
|
+
json: items[i].json,
|
|
318
|
+
binary: {},
|
|
319
|
+
};
|
|
320
|
+
if (items[i].binary !== undefined) {
|
|
321
|
+
Object.assign(newItem.binary, items[i].binary);
|
|
322
|
+
}
|
|
323
|
+
items[i] = newItem;
|
|
324
|
+
const fileName = `${messageId}.eml`;
|
|
325
|
+
const data = Buffer.from(response.body, 'utf8');
|
|
326
|
+
items[i].binary[dataPropertyNameDownload] = await this.helpers.prepareBinaryData(data, fileName, mimeType);
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
if (this.continueOnFail()) {
|
|
330
|
+
items[i].json = { error: error.message };
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
throw error;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (operation === 'getAll') {
|
|
338
|
+
let additionalFields = {};
|
|
339
|
+
for (let i = 0; i < length; i++) {
|
|
340
|
+
try {
|
|
341
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
342
|
+
additionalFields = this.getNodeParameter('additionalFields', i);
|
|
343
|
+
if (additionalFields.fields) {
|
|
344
|
+
qs.$select = additionalFields.fields;
|
|
345
|
+
}
|
|
346
|
+
if (additionalFields.filter) {
|
|
347
|
+
qs.$filter = additionalFields.filter;
|
|
348
|
+
}
|
|
349
|
+
const endpoint = '/messages';
|
|
350
|
+
if (returnAll) {
|
|
351
|
+
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint, undefined, qs);
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
qs.$top = this.getNodeParameter('limit', i);
|
|
355
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
|
356
|
+
responseData = responseData.value;
|
|
357
|
+
}
|
|
358
|
+
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
359
|
+
const prefix = additionalFields.dataPropertyAttachmentsPrefixName;
|
|
360
|
+
const data = await GenericFunctions_1.downloadAttachments.call(this, responseData, prefix);
|
|
361
|
+
returnData.push.apply(returnData, data);
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
returnData.push.apply(returnData, responseData);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
catch (error) {
|
|
368
|
+
if (this.continueOnFail()) {
|
|
369
|
+
returnData.push({ error: error.message });
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
throw error;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
376
|
+
return [returnData];
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (operation === 'move') {
|
|
380
|
+
for (let i = 0; i < length; i++) {
|
|
381
|
+
try {
|
|
382
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
383
|
+
const destinationId = this.getNodeParameter('folderId', i);
|
|
384
|
+
const body = {
|
|
385
|
+
destinationId,
|
|
386
|
+
};
|
|
387
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/move`, body);
|
|
388
|
+
returnData.push({ success: true });
|
|
389
|
+
}
|
|
390
|
+
catch (error) {
|
|
391
|
+
if (this.continueOnFail()) {
|
|
392
|
+
returnData.push({ error: error.message });
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
throw error;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if (operation === 'send') {
|
|
400
|
+
for (let i = 0; i < length; i++) {
|
|
401
|
+
try {
|
|
402
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
403
|
+
const toRecipients = this.getNodeParameter('toRecipients', i);
|
|
404
|
+
const subject = this.getNodeParameter('subject', i);
|
|
405
|
+
const bodyContent = this.getNodeParameter('bodyContent', i, '');
|
|
406
|
+
additionalFields.subject = subject;
|
|
407
|
+
additionalFields.bodyContent = bodyContent || ' ';
|
|
408
|
+
additionalFields.toRecipients = toRecipients;
|
|
409
|
+
const saveToSentItems = additionalFields.saveToSentItems === undefined
|
|
410
|
+
? true
|
|
411
|
+
: additionalFields.saveToSentItems;
|
|
412
|
+
delete additionalFields.saveToSentItems;
|
|
413
|
+
const message = (0, GenericFunctions_1.createMessage)(additionalFields);
|
|
414
|
+
if (additionalFields.attachments) {
|
|
415
|
+
const attachments = additionalFields.attachments
|
|
416
|
+
.attachments;
|
|
417
|
+
message.attachments = attachments.map((attachment) => {
|
|
418
|
+
const binaryPropertyName = attachment.binaryPropertyName;
|
|
419
|
+
if (items[i].binary === undefined) {
|
|
420
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No binary data exists on item!', {
|
|
421
|
+
itemIndex: i,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
if (items[i].binary[binaryPropertyName] === undefined) {
|
|
425
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No binary data property "${binaryPropertyName}" does not exists on item!`, { itemIndex: i });
|
|
426
|
+
}
|
|
427
|
+
const binaryData = items[i].binary[binaryPropertyName];
|
|
428
|
+
return {
|
|
429
|
+
'@odata.type': '#microsoft.graph.fileAttachment',
|
|
430
|
+
name: binaryData.fileName,
|
|
431
|
+
contentBytes: binaryData.data,
|
|
432
|
+
};
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
const body = {
|
|
436
|
+
message,
|
|
437
|
+
saveToSentItems,
|
|
438
|
+
};
|
|
439
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', '/sendMail', body, {});
|
|
440
|
+
returnData.push({ success: true });
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
if (this.continueOnFail()) {
|
|
444
|
+
returnData.push({ error: error.message });
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
throw error;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
if (resource === 'messageAttachment') {
|
|
453
|
+
if (operation === 'add') {
|
|
454
|
+
for (let i = 0; i < length; i++) {
|
|
455
|
+
try {
|
|
456
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
457
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0);
|
|
458
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
459
|
+
if (items[i].binary === undefined) {
|
|
460
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No binary data exists on item!');
|
|
461
|
+
}
|
|
462
|
+
if (items[i].binary[binaryPropertyName] === undefined) {
|
|
463
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No binary data property "${binaryPropertyName}" does not exists on item!`, { itemIndex: i });
|
|
464
|
+
}
|
|
465
|
+
const binaryData = items[i].binary[binaryPropertyName];
|
|
466
|
+
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
467
|
+
const fileName = additionalFields.fileName === undefined
|
|
468
|
+
? binaryData.fileName
|
|
469
|
+
: additionalFields.fileName;
|
|
470
|
+
if (!fileName) {
|
|
471
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'File name is not set. It has either to be set via "Additional Fields" or has to be set on the binary property!', { itemIndex: i });
|
|
472
|
+
}
|
|
473
|
+
if (dataBuffer.length > 3e6) {
|
|
474
|
+
const chunkSize = 4e6;
|
|
475
|
+
const body = {
|
|
476
|
+
AttachmentItem: {
|
|
477
|
+
attachmentType: 'file',
|
|
478
|
+
name: fileName,
|
|
479
|
+
size: dataBuffer.length,
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/attachments/createUploadSession`, body);
|
|
483
|
+
const uploadUrl = responseData.uploadUrl;
|
|
484
|
+
if (uploadUrl === undefined) {
|
|
485
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
|
|
486
|
+
message: 'Failed to get upload session',
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
for (let bytesUploaded = 0; bytesUploaded < dataBuffer.length; bytesUploaded += chunkSize) {
|
|
490
|
+
const nextChunk = Math.min(bytesUploaded + chunkSize, dataBuffer.length);
|
|
491
|
+
const contentRange = `bytes ${bytesUploaded}-${nextChunk - 1}/${dataBuffer.length}`;
|
|
492
|
+
const data = dataBuffer.subarray(bytesUploaded, nextChunk);
|
|
493
|
+
responseData = await this.helpers.request(uploadUrl, {
|
|
494
|
+
method: 'PUT',
|
|
495
|
+
headers: {
|
|
496
|
+
'Content-Type': 'application/octet-stream',
|
|
497
|
+
'Content-Length': data.length,
|
|
498
|
+
'Content-Range': contentRange,
|
|
499
|
+
},
|
|
500
|
+
body: data,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
const body = {
|
|
506
|
+
'@odata.type': '#microsoft.graph.fileAttachment',
|
|
507
|
+
name: fileName,
|
|
508
|
+
contentBytes: binaryData.data,
|
|
509
|
+
};
|
|
510
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/attachments`, body, {});
|
|
511
|
+
}
|
|
512
|
+
returnData.push({ success: true });
|
|
513
|
+
}
|
|
514
|
+
catch (error) {
|
|
515
|
+
if (this.continueOnFail()) {
|
|
516
|
+
returnData.push({ error: error.message });
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
throw error;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
if (operation === 'download') {
|
|
524
|
+
for (let i = 0; i < length; i++) {
|
|
525
|
+
try {
|
|
526
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
527
|
+
const attachmentId = this.getNodeParameter('attachmentId', i);
|
|
528
|
+
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
|
|
529
|
+
const attachmentDetails = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/attachments/${attachmentId}`, undefined, { $select: 'id,name,contentType' });
|
|
530
|
+
let mimeType;
|
|
531
|
+
if (attachmentDetails.contentType) {
|
|
532
|
+
mimeType = attachmentDetails.contentType;
|
|
533
|
+
}
|
|
534
|
+
const fileName = attachmentDetails.name;
|
|
535
|
+
const response = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/attachments/${attachmentId}/$value`, undefined, {}, undefined, {}, { encoding: null, resolveWithFullResponse: true });
|
|
536
|
+
const newItem = {
|
|
537
|
+
json: items[i].json,
|
|
538
|
+
binary: {},
|
|
539
|
+
};
|
|
540
|
+
if (items[i].binary !== undefined) {
|
|
541
|
+
Object.assign(newItem.binary, items[i].binary);
|
|
542
|
+
}
|
|
543
|
+
items[i] = newItem;
|
|
544
|
+
const data = Buffer.from(response.body, 'utf8');
|
|
545
|
+
items[i].binary[dataPropertyNameDownload] = await this.helpers.prepareBinaryData(data, fileName, mimeType);
|
|
546
|
+
}
|
|
547
|
+
catch (error) {
|
|
548
|
+
if (this.continueOnFail()) {
|
|
549
|
+
items[i].json = { error: error.message };
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
throw error;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (operation === 'get') {
|
|
557
|
+
for (let i = 0; i < length; i++) {
|
|
558
|
+
try {
|
|
559
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
560
|
+
const attachmentId = this.getNodeParameter('attachmentId', i);
|
|
561
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
562
|
+
qs.$select = 'id,lastModifiedDateTime,name,contentType,size,isInline';
|
|
563
|
+
if (additionalFields.fields) {
|
|
564
|
+
qs.$select = additionalFields.fields;
|
|
565
|
+
}
|
|
566
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/attachments/${attachmentId}`, undefined, qs);
|
|
567
|
+
returnData.push(responseData);
|
|
568
|
+
}
|
|
569
|
+
catch (error) {
|
|
570
|
+
if (this.continueOnFail()) {
|
|
571
|
+
returnData.push({ error: error.message });
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
throw error;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
if (operation === 'getAll') {
|
|
579
|
+
for (let i = 0; i < length; i++) {
|
|
580
|
+
try {
|
|
581
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
582
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
583
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
584
|
+
qs.$select = 'id,lastModifiedDateTime,name,contentType,size,isInline';
|
|
585
|
+
if (additionalFields.fields) {
|
|
586
|
+
qs.$select = additionalFields.fields;
|
|
587
|
+
}
|
|
588
|
+
if (additionalFields.filter) {
|
|
589
|
+
qs.$filter = additionalFields.filter;
|
|
590
|
+
}
|
|
591
|
+
const endpoint = `/messages/${messageId}/attachments`;
|
|
592
|
+
if (returnAll) {
|
|
593
|
+
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint, undefined, qs);
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
qs.$top = this.getNodeParameter('limit', i);
|
|
597
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
|
598
|
+
responseData = responseData.value;
|
|
599
|
+
}
|
|
600
|
+
returnData.push.apply(returnData, responseData);
|
|
601
|
+
}
|
|
602
|
+
catch (error) {
|
|
603
|
+
if (this.continueOnFail()) {
|
|
604
|
+
returnData.push({ error: error.message });
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
throw error;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
if (resource === 'folder') {
|
|
613
|
+
if (operation === 'create') {
|
|
614
|
+
for (let i = 0; i < length; i++) {
|
|
615
|
+
try {
|
|
616
|
+
const displayName = this.getNodeParameter('displayName', i);
|
|
617
|
+
const folderType = this.getNodeParameter('folderType', i);
|
|
618
|
+
const body = {
|
|
619
|
+
displayName,
|
|
620
|
+
};
|
|
621
|
+
let endpoint = '/mailFolders';
|
|
622
|
+
if (folderType === 'searchFolder') {
|
|
623
|
+
endpoint = '/mailFolders/searchfolders/childFolders';
|
|
624
|
+
const includeNestedFolders = this.getNodeParameter('includeNestedFolders', i);
|
|
625
|
+
const sourceFolderIds = this.getNodeParameter('sourceFolderIds', i);
|
|
626
|
+
const filterQuery = this.getNodeParameter('filterQuery', i);
|
|
627
|
+
Object.assign(body, {
|
|
628
|
+
'@odata.type': 'microsoft.graph.mailSearchFolder',
|
|
629
|
+
includeNestedFolders,
|
|
630
|
+
sourceFolderIds,
|
|
631
|
+
filterQuery,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', endpoint, body);
|
|
635
|
+
returnData.push(responseData);
|
|
636
|
+
}
|
|
637
|
+
catch (error) {
|
|
638
|
+
if (this.continueOnFail()) {
|
|
639
|
+
returnData.push({ error: error.message });
|
|
640
|
+
continue;
|
|
641
|
+
}
|
|
642
|
+
throw error;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
if (operation === 'delete') {
|
|
647
|
+
for (let i = 0; i < length; i++) {
|
|
648
|
+
try {
|
|
649
|
+
const folderId = this.getNodeParameter('folderId', i);
|
|
650
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'DELETE', `/mailFolders/${folderId}`);
|
|
651
|
+
returnData.push({ success: true });
|
|
652
|
+
}
|
|
653
|
+
catch (error) {
|
|
654
|
+
if (this.continueOnFail()) {
|
|
655
|
+
returnData.push({ error: error.message });
|
|
656
|
+
continue;
|
|
657
|
+
}
|
|
658
|
+
throw error;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
if (operation === 'get') {
|
|
663
|
+
for (let i = 0; i < length; i++) {
|
|
664
|
+
try {
|
|
665
|
+
const folderId = this.getNodeParameter('folderId', i);
|
|
666
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
667
|
+
if (additionalFields.fields) {
|
|
668
|
+
qs.$select = additionalFields.fields;
|
|
669
|
+
}
|
|
670
|
+
if (additionalFields.filter) {
|
|
671
|
+
qs.$filter = additionalFields.filter;
|
|
672
|
+
}
|
|
673
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/mailFolders/${folderId}`, {}, qs);
|
|
674
|
+
returnData.push(responseData);
|
|
675
|
+
}
|
|
676
|
+
catch (error) {
|
|
677
|
+
if (this.continueOnFail()) {
|
|
678
|
+
returnData.push({ error: error.message });
|
|
679
|
+
continue;
|
|
680
|
+
}
|
|
681
|
+
throw error;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
if (operation === 'getAll') {
|
|
686
|
+
for (let i = 0; i < length; i++) {
|
|
687
|
+
try {
|
|
688
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
689
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
690
|
+
if (additionalFields.fields) {
|
|
691
|
+
qs.$select = additionalFields.fields;
|
|
692
|
+
}
|
|
693
|
+
if (additionalFields.filter) {
|
|
694
|
+
qs.$filter = additionalFields.filter;
|
|
695
|
+
}
|
|
696
|
+
if (returnAll) {
|
|
697
|
+
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', '/mailFolders', {}, qs);
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
qs.$top = this.getNodeParameter('limit', i);
|
|
701
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', '/mailFolders', {}, qs);
|
|
702
|
+
responseData = responseData.value;
|
|
703
|
+
}
|
|
704
|
+
returnData.push.apply(returnData, responseData);
|
|
705
|
+
}
|
|
706
|
+
catch (error) {
|
|
707
|
+
if (this.continueOnFail()) {
|
|
708
|
+
returnData.push({ error: error.message });
|
|
709
|
+
continue;
|
|
710
|
+
}
|
|
711
|
+
throw error;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
if (operation === 'getChildren') {
|
|
716
|
+
for (let i = 0; i < length; i++) {
|
|
717
|
+
try {
|
|
718
|
+
const folderId = this.getNodeParameter('folderId', i);
|
|
719
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
720
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
721
|
+
if (additionalFields.fields) {
|
|
722
|
+
qs.$select = additionalFields.fields;
|
|
723
|
+
}
|
|
724
|
+
if (additionalFields.filter) {
|
|
725
|
+
qs.$filter = additionalFields.filter;
|
|
726
|
+
}
|
|
727
|
+
if (returnAll) {
|
|
728
|
+
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', `/mailFolders/${folderId}/childFolders`, qs);
|
|
729
|
+
}
|
|
730
|
+
else {
|
|
731
|
+
qs.$top = this.getNodeParameter('limit', i);
|
|
732
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/mailFolders/${folderId}/childFolders`, undefined, qs);
|
|
733
|
+
responseData = responseData.value;
|
|
734
|
+
}
|
|
735
|
+
returnData.push.apply(returnData, responseData);
|
|
736
|
+
}
|
|
737
|
+
catch (error) {
|
|
738
|
+
if (this.continueOnFail()) {
|
|
739
|
+
returnData.push({ error: error.message });
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
throw error;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
if (operation === 'update') {
|
|
747
|
+
for (let i = 0; i < length; i++) {
|
|
748
|
+
try {
|
|
749
|
+
const folderId = this.getNodeParameter('folderId', i);
|
|
750
|
+
const updateFields = this.getNodeParameter('updateFields', i);
|
|
751
|
+
const body = {
|
|
752
|
+
...updateFields,
|
|
753
|
+
};
|
|
754
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'PATCH', `/mailFolders/${folderId}`, body);
|
|
755
|
+
returnData.push(responseData);
|
|
756
|
+
}
|
|
757
|
+
catch (error) {
|
|
758
|
+
if (this.continueOnFail()) {
|
|
759
|
+
returnData.push({ error: error.message });
|
|
760
|
+
continue;
|
|
761
|
+
}
|
|
762
|
+
throw error;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
if (resource === 'folderMessage') {
|
|
768
|
+
for (let i = 0; i < length; i++) {
|
|
769
|
+
try {
|
|
770
|
+
if (operation === 'getAll') {
|
|
771
|
+
const folderId = this.getNodeParameter('folderId', i);
|
|
772
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
773
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
774
|
+
if (additionalFields.fields) {
|
|
775
|
+
qs.$select = additionalFields.fields;
|
|
776
|
+
}
|
|
777
|
+
if (additionalFields.filter) {
|
|
778
|
+
qs.$filter = additionalFields.filter;
|
|
779
|
+
}
|
|
780
|
+
const endpoint = `/mailFolders/${folderId}/messages`;
|
|
781
|
+
if (returnAll) {
|
|
782
|
+
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint, qs);
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
qs.$top = this.getNodeParameter('limit', i);
|
|
786
|
+
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
|
787
|
+
responseData = responseData.value;
|
|
788
|
+
}
|
|
789
|
+
returnData.push.apply(returnData, responseData);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
catch (error) {
|
|
793
|
+
if (this.continueOnFail()) {
|
|
794
|
+
returnData.push({ error: error.message });
|
|
795
|
+
continue;
|
|
796
|
+
}
|
|
797
|
+
throw error;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
if ((resource === 'message' && operation === 'getMime') ||
|
|
802
|
+
(resource === 'messageAttachment' && operation === 'download')) {
|
|
803
|
+
return [items];
|
|
804
|
+
}
|
|
805
|
+
else {
|
|
806
|
+
return [this.helpers.returnJsonArray(returnData)];
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
exports.MicrosoftOutlookV1 = MicrosoftOutlookV1;
|
|
811
|
+
//# sourceMappingURL=MicrosoftOutlookV1.node.js.map
|