n8n-nodes-base 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/Airtable/v2/methods/resourceMapping.js +2 -2
- package/dist/nodes/Airtable/v2/methods/resourceMapping.js.map +1 -1
- 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/Google/Sheet/v2/actions/sheet/Sheet.resource.js +25 -25
- package/dist/nodes/Google/Sheet/v2/actions/sheet/Sheet.resource.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/spreadsheet/SpreadSheet.resource.js +2 -2
- package/dist/nodes/Google/Sheet/v2/actions/spreadsheet/SpreadSheet.resource.js.map +1 -1
- 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 +30 -27
- 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
|
@@ -2,789 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MicrosoftOutlook = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
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
|
-
class MicrosoftOutlook {
|
|
5
|
+
const MicrosoftOutlookV1_node_1 = require("./v1/MicrosoftOutlookV1.node");
|
|
6
|
+
const MicrosoftOutlookV2_node_1 = require("./v2/MicrosoftOutlookV2.node");
|
|
7
|
+
class MicrosoftOutlook extends n8n_workflow_1.VersionedNodeType {
|
|
13
8
|
constructor() {
|
|
14
|
-
|
|
9
|
+
const baseDescription = {
|
|
15
10
|
displayName: 'Microsoft Outlook',
|
|
16
11
|
name: 'microsoftOutlook',
|
|
17
12
|
group: ['transform'],
|
|
18
13
|
icon: 'file:outlook.svg',
|
|
19
|
-
version: 1,
|
|
20
14
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
21
15
|
description: 'Consume Microsoft Outlook API',
|
|
22
|
-
|
|
23
|
-
name: 'Microsoft Outlook',
|
|
24
|
-
},
|
|
25
|
-
inputs: ['main'],
|
|
26
|
-
outputs: ['main'],
|
|
27
|
-
credentials: [
|
|
28
|
-
{
|
|
29
|
-
name: 'microsoftOutlookOAuth2Api',
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
properties: [
|
|
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
|
-
],
|
|
16
|
+
defaultVersion: 2,
|
|
75
17
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const returnData = [];
|
|
80
|
-
const categories = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', '/outlook/masterCategories');
|
|
81
|
-
for (const category of categories) {
|
|
82
|
-
returnData.push({
|
|
83
|
-
name: category.displayName,
|
|
84
|
-
value: category.displayName,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
return returnData;
|
|
88
|
-
},
|
|
89
|
-
},
|
|
18
|
+
const nodeVersions = {
|
|
19
|
+
1: new MicrosoftOutlookV1_node_1.MicrosoftOutlookV1(baseDescription),
|
|
20
|
+
2: new MicrosoftOutlookV2_node_1.MicrosoftOutlookV2(baseDescription),
|
|
90
21
|
};
|
|
91
|
-
|
|
92
|
-
async execute() {
|
|
93
|
-
const items = this.getInputData();
|
|
94
|
-
const returnData = [];
|
|
95
|
-
const length = items.length;
|
|
96
|
-
const qs = {};
|
|
97
|
-
let responseData;
|
|
98
|
-
const resource = this.getNodeParameter('resource', 0);
|
|
99
|
-
const operation = this.getNodeParameter('operation', 0);
|
|
100
|
-
if (['draft', 'message'].includes(resource)) {
|
|
101
|
-
if (operation === 'delete') {
|
|
102
|
-
for (let i = 0; i < length; i++) {
|
|
103
|
-
try {
|
|
104
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
105
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'DELETE', `/messages/${messageId}`);
|
|
106
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
|
|
107
|
-
returnData.push(...executionData);
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
if (this.continueOnFail()) {
|
|
111
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
112
|
-
returnData.push(...executionData);
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
throw error;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
if (operation === 'get') {
|
|
120
|
-
for (let i = 0; i < length; i++) {
|
|
121
|
-
try {
|
|
122
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
123
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
124
|
-
if (additionalFields.fields) {
|
|
125
|
-
qs.$select = additionalFields.fields;
|
|
126
|
-
}
|
|
127
|
-
if (additionalFields.filter) {
|
|
128
|
-
qs.$filter = additionalFields.filter;
|
|
129
|
-
}
|
|
130
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}`, undefined, qs);
|
|
131
|
-
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
132
|
-
const prefix = additionalFields.dataPropertyAttachmentsPrefixName;
|
|
133
|
-
const data = await GenericFunctions_1.downloadAttachments.call(this, responseData, prefix);
|
|
134
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data), { itemData: { item: i } });
|
|
135
|
-
returnData.push(...executionData);
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
139
|
-
returnData.push(...executionData);
|
|
140
|
-
}
|
|
141
|
-
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
142
|
-
return [returnData];
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
catch (error) {
|
|
146
|
-
if (this.continueOnFail()) {
|
|
147
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
148
|
-
returnData.push(...executionData);
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
throw error;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (operation === 'update') {
|
|
156
|
-
for (let i = 0; i < length; i++) {
|
|
157
|
-
try {
|
|
158
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
159
|
-
const updateFields = this.getNodeParameter('updateFields', i);
|
|
160
|
-
const body = (0, GenericFunctions_1.createMessage)(updateFields);
|
|
161
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'PATCH', `/messages/${messageId}`, body, {});
|
|
162
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
163
|
-
returnData.push(...executionData);
|
|
164
|
-
}
|
|
165
|
-
catch (error) {
|
|
166
|
-
if (this.continueOnFail()) {
|
|
167
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
168
|
-
returnData.push(...executionData);
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
throw error;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
if (resource === 'draft') {
|
|
177
|
-
if (operation === 'create') {
|
|
178
|
-
for (let i = 0; i < length; i++) {
|
|
179
|
-
try {
|
|
180
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
181
|
-
const subject = this.getNodeParameter('subject', i);
|
|
182
|
-
const bodyContent = this.getNodeParameter('bodyContent', i, '');
|
|
183
|
-
additionalFields.subject = subject;
|
|
184
|
-
additionalFields.bodyContent = bodyContent || ' ';
|
|
185
|
-
const body = (0, GenericFunctions_1.createMessage)(additionalFields);
|
|
186
|
-
if (additionalFields.attachments) {
|
|
187
|
-
const attachments = additionalFields.attachments
|
|
188
|
-
.attachments;
|
|
189
|
-
body.attachments = await GenericFunctions_1.binaryToAttachments.call(this, attachments, items, i);
|
|
190
|
-
}
|
|
191
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', '/messages', body, {});
|
|
192
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
193
|
-
returnData.push(...executionData);
|
|
194
|
-
}
|
|
195
|
-
catch (error) {
|
|
196
|
-
if (this.continueOnFail()) {
|
|
197
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
198
|
-
returnData.push(...executionData);
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
throw error;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
if (operation === 'send') {
|
|
206
|
-
for (let i = 0; i < length; i++) {
|
|
207
|
-
try {
|
|
208
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
209
|
-
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
210
|
-
if (additionalFields === null || additionalFields === void 0 ? void 0 : additionalFields.recipients) {
|
|
211
|
-
const recipients = additionalFields.recipients
|
|
212
|
-
.split(',')
|
|
213
|
-
.filter((email) => !!email);
|
|
214
|
-
if (recipients.length !== 0) {
|
|
215
|
-
await GenericFunctions_1.microsoftApiRequest.call(this, 'PATCH', `/messages/${messageId}`, {
|
|
216
|
-
toRecipients: recipients.map((recipient) => (0, GenericFunctions_1.makeRecipient)(recipient)),
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/send`);
|
|
221
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
|
|
222
|
-
returnData.push(...executionData);
|
|
223
|
-
}
|
|
224
|
-
catch (error) {
|
|
225
|
-
if (this.continueOnFail()) {
|
|
226
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
227
|
-
returnData.push(...executionData);
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
throw error;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
if (resource === 'message') {
|
|
236
|
-
if (operation === 'reply') {
|
|
237
|
-
for (let i = 0; i < length; i++) {
|
|
238
|
-
try {
|
|
239
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
240
|
-
const replyType = this.getNodeParameter('replyType', i);
|
|
241
|
-
const comment = this.getNodeParameter('comment', i);
|
|
242
|
-
const send = this.getNodeParameter('send', i, false);
|
|
243
|
-
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
244
|
-
const body = {};
|
|
245
|
-
let action = 'createReply';
|
|
246
|
-
if (replyType === 'replyAll') {
|
|
247
|
-
body.comment = comment;
|
|
248
|
-
action = 'createReplyAll';
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
body.comment = comment;
|
|
252
|
-
body.message = {};
|
|
253
|
-
Object.assign(body.message, (0, GenericFunctions_1.createMessage)(additionalFields));
|
|
254
|
-
delete body.message.attachments;
|
|
255
|
-
}
|
|
256
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/${action}`, body);
|
|
257
|
-
if (additionalFields.attachments) {
|
|
258
|
-
const attachments = additionalFields.attachments
|
|
259
|
-
.attachments;
|
|
260
|
-
const data = await GenericFunctions_1.binaryToAttachments.call(this, attachments, items, i);
|
|
261
|
-
for (const attachment of data) {
|
|
262
|
-
await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${responseData.id}/attachments`, attachment, {});
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (send) {
|
|
266
|
-
await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${responseData.id}/send`);
|
|
267
|
-
}
|
|
268
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
269
|
-
returnData.push(...executionData);
|
|
270
|
-
}
|
|
271
|
-
catch (error) {
|
|
272
|
-
if (this.continueOnFail()) {
|
|
273
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
274
|
-
returnData.push(...executionData);
|
|
275
|
-
continue;
|
|
276
|
-
}
|
|
277
|
-
throw error;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
if (operation === 'getMime') {
|
|
282
|
-
for (let i = 0; i < length; i++) {
|
|
283
|
-
try {
|
|
284
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
285
|
-
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
|
|
286
|
-
const response = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/$value`, undefined, {}, undefined, {}, { encoding: null, resolveWithFullResponse: true });
|
|
287
|
-
let mimeType;
|
|
288
|
-
if (response.headers['content-type']) {
|
|
289
|
-
mimeType = response.headers['content-type'];
|
|
290
|
-
}
|
|
291
|
-
const newItem = {
|
|
292
|
-
json: items[i].json,
|
|
293
|
-
binary: {},
|
|
294
|
-
};
|
|
295
|
-
if (items[i].binary !== undefined) {
|
|
296
|
-
Object.assign(newItem.binary, items[i].binary);
|
|
297
|
-
}
|
|
298
|
-
items[i] = newItem;
|
|
299
|
-
const fileName = `${messageId}.eml`;
|
|
300
|
-
const data = Buffer.from(response.body, 'utf8');
|
|
301
|
-
items[i].binary[dataPropertyNameDownload] = await this.helpers.prepareBinaryData(data, fileName, mimeType);
|
|
302
|
-
}
|
|
303
|
-
catch (error) {
|
|
304
|
-
if (this.continueOnFail()) {
|
|
305
|
-
items[i].json = { error: error.message };
|
|
306
|
-
continue;
|
|
307
|
-
}
|
|
308
|
-
throw error;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
if (operation === 'getAll') {
|
|
313
|
-
let additionalFields = {};
|
|
314
|
-
for (let i = 0; i < length; i++) {
|
|
315
|
-
try {
|
|
316
|
-
const returnAll = this.getNodeParameter('returnAll', i);
|
|
317
|
-
additionalFields = this.getNodeParameter('additionalFields', i);
|
|
318
|
-
if (additionalFields.fields) {
|
|
319
|
-
qs.$select = additionalFields.fields;
|
|
320
|
-
}
|
|
321
|
-
if (additionalFields.filter) {
|
|
322
|
-
qs.$filter = additionalFields.filter;
|
|
323
|
-
}
|
|
324
|
-
const endpoint = '/messages';
|
|
325
|
-
if (returnAll) {
|
|
326
|
-
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint, undefined, qs);
|
|
327
|
-
}
|
|
328
|
-
else {
|
|
329
|
-
qs.$top = this.getNodeParameter('limit', i);
|
|
330
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
|
331
|
-
responseData = responseData.value;
|
|
332
|
-
}
|
|
333
|
-
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
334
|
-
const prefix = additionalFields.dataPropertyAttachmentsPrefixName;
|
|
335
|
-
const data = await GenericFunctions_1.downloadAttachments.call(this, responseData, prefix);
|
|
336
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data), { itemData: { item: i } });
|
|
337
|
-
returnData.push(...executionData);
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
341
|
-
returnData.push(...executionData);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
catch (error) {
|
|
345
|
-
if (this.continueOnFail()) {
|
|
346
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
347
|
-
returnData.push(...executionData);
|
|
348
|
-
continue;
|
|
349
|
-
}
|
|
350
|
-
throw error;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
if (additionalFields.dataPropertyAttachmentsPrefixName) {
|
|
354
|
-
return [returnData];
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
if (operation === 'move') {
|
|
358
|
-
for (let i = 0; i < length; i++) {
|
|
359
|
-
try {
|
|
360
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
361
|
-
const destinationId = this.getNodeParameter('folderId', i);
|
|
362
|
-
const body = {
|
|
363
|
-
destinationId,
|
|
364
|
-
};
|
|
365
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/move`, body);
|
|
366
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
|
|
367
|
-
returnData.push(...executionData);
|
|
368
|
-
}
|
|
369
|
-
catch (error) {
|
|
370
|
-
if (this.continueOnFail()) {
|
|
371
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
372
|
-
returnData.push(...executionData);
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
throw error;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
if (operation === 'send') {
|
|
380
|
-
for (let i = 0; i < length; i++) {
|
|
381
|
-
try {
|
|
382
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
383
|
-
const toRecipients = this.getNodeParameter('toRecipients', i);
|
|
384
|
-
const subject = this.getNodeParameter('subject', i);
|
|
385
|
-
const bodyContent = this.getNodeParameter('bodyContent', i, '');
|
|
386
|
-
additionalFields.subject = subject;
|
|
387
|
-
additionalFields.bodyContent = bodyContent || ' ';
|
|
388
|
-
additionalFields.toRecipients = toRecipients;
|
|
389
|
-
const saveToSentItems = additionalFields.saveToSentItems === undefined
|
|
390
|
-
? true
|
|
391
|
-
: additionalFields.saveToSentItems;
|
|
392
|
-
delete additionalFields.saveToSentItems;
|
|
393
|
-
const message = (0, GenericFunctions_1.createMessage)(additionalFields);
|
|
394
|
-
if (additionalFields.attachments) {
|
|
395
|
-
const attachments = additionalFields.attachments
|
|
396
|
-
.attachments;
|
|
397
|
-
message.attachments = await GenericFunctions_1.binaryToAttachments.call(this, attachments, items, i);
|
|
398
|
-
}
|
|
399
|
-
const body = {
|
|
400
|
-
message,
|
|
401
|
-
saveToSentItems,
|
|
402
|
-
};
|
|
403
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', '/sendMail', body, {});
|
|
404
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
|
|
405
|
-
returnData.push(...executionData);
|
|
406
|
-
}
|
|
407
|
-
catch (error) {
|
|
408
|
-
if (this.continueOnFail()) {
|
|
409
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
410
|
-
returnData.push(...executionData);
|
|
411
|
-
continue;
|
|
412
|
-
}
|
|
413
|
-
throw error;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
if (resource === 'messageAttachment') {
|
|
419
|
-
if (operation === 'add') {
|
|
420
|
-
for (let i = 0; i < length; i++) {
|
|
421
|
-
try {
|
|
422
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
423
|
-
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0);
|
|
424
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
425
|
-
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
426
|
-
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
427
|
-
const fileName = additionalFields.fileName === undefined
|
|
428
|
-
? binaryData.fileName
|
|
429
|
-
: additionalFields.fileName;
|
|
430
|
-
if (!fileName) {
|
|
431
|
-
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 });
|
|
432
|
-
}
|
|
433
|
-
if (dataBuffer.length > 3e6) {
|
|
434
|
-
const chunkSize = 4e6;
|
|
435
|
-
const body = {
|
|
436
|
-
AttachmentItem: {
|
|
437
|
-
attachmentType: 'file',
|
|
438
|
-
name: fileName,
|
|
439
|
-
size: dataBuffer.length,
|
|
440
|
-
},
|
|
441
|
-
};
|
|
442
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/attachments/createUploadSession`, body);
|
|
443
|
-
const uploadUrl = responseData.uploadUrl;
|
|
444
|
-
if (uploadUrl === undefined) {
|
|
445
|
-
throw new n8n_workflow_1.NodeApiError(this.getNode(), responseData, {
|
|
446
|
-
message: 'Failed to get upload session',
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
for (let bytesUploaded = 0; bytesUploaded < dataBuffer.length; bytesUploaded += chunkSize) {
|
|
450
|
-
const nextChunk = Math.min(bytesUploaded + chunkSize, dataBuffer.length);
|
|
451
|
-
const contentRange = `bytes ${bytesUploaded}-${nextChunk - 1}/${dataBuffer.length}`;
|
|
452
|
-
const data = dataBuffer.subarray(bytesUploaded, nextChunk);
|
|
453
|
-
responseData = await this.helpers.request(uploadUrl, {
|
|
454
|
-
method: 'PUT',
|
|
455
|
-
headers: {
|
|
456
|
-
'Content-Type': 'application/octet-stream',
|
|
457
|
-
'Content-Length': data.length,
|
|
458
|
-
'Content-Range': contentRange,
|
|
459
|
-
},
|
|
460
|
-
body: data,
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
else {
|
|
465
|
-
const body = {
|
|
466
|
-
'@odata.type': '#microsoft.graph.fileAttachment',
|
|
467
|
-
name: fileName,
|
|
468
|
-
contentBytes: dataBuffer.toString('base64'),
|
|
469
|
-
};
|
|
470
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', `/messages/${messageId}/attachments`, body, {});
|
|
471
|
-
}
|
|
472
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
|
|
473
|
-
returnData.push(...executionData);
|
|
474
|
-
}
|
|
475
|
-
catch (error) {
|
|
476
|
-
if (this.continueOnFail()) {
|
|
477
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
478
|
-
returnData.push(...executionData);
|
|
479
|
-
continue;
|
|
480
|
-
}
|
|
481
|
-
throw error;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
if (operation === 'download') {
|
|
486
|
-
for (let i = 0; i < length; i++) {
|
|
487
|
-
try {
|
|
488
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
489
|
-
const attachmentId = this.getNodeParameter('attachmentId', i);
|
|
490
|
-
const dataPropertyNameDownload = this.getNodeParameter('binaryPropertyName', i);
|
|
491
|
-
const attachmentDetails = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/attachments/${attachmentId}`, undefined, { $select: 'id,name,contentType' });
|
|
492
|
-
let mimeType;
|
|
493
|
-
if (attachmentDetails.contentType) {
|
|
494
|
-
mimeType = attachmentDetails.contentType;
|
|
495
|
-
}
|
|
496
|
-
const fileName = attachmentDetails.name;
|
|
497
|
-
const response = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/attachments/${attachmentId}/$value`, undefined, {}, undefined, {}, { encoding: null, resolveWithFullResponse: true });
|
|
498
|
-
const newItem = {
|
|
499
|
-
json: items[i].json,
|
|
500
|
-
binary: {},
|
|
501
|
-
};
|
|
502
|
-
if (items[i].binary !== undefined) {
|
|
503
|
-
Object.assign(newItem.binary, items[i].binary);
|
|
504
|
-
}
|
|
505
|
-
items[i] = newItem;
|
|
506
|
-
const data = Buffer.from(response.body, 'utf8');
|
|
507
|
-
items[i].binary[dataPropertyNameDownload] = await this.helpers.prepareBinaryData(data, fileName, mimeType);
|
|
508
|
-
}
|
|
509
|
-
catch (error) {
|
|
510
|
-
if (this.continueOnFail()) {
|
|
511
|
-
items[i].json = { error: error.message };
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
throw error;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
if (operation === 'get') {
|
|
519
|
-
for (let i = 0; i < length; i++) {
|
|
520
|
-
try {
|
|
521
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
522
|
-
const attachmentId = this.getNodeParameter('attachmentId', i);
|
|
523
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
524
|
-
qs.$select = 'id,lastModifiedDateTime,name,contentType,size,isInline';
|
|
525
|
-
if (additionalFields.fields) {
|
|
526
|
-
qs.$select = additionalFields.fields;
|
|
527
|
-
}
|
|
528
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/messages/${messageId}/attachments/${attachmentId}`, undefined, qs);
|
|
529
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
530
|
-
returnData.push(...executionData);
|
|
531
|
-
}
|
|
532
|
-
catch (error) {
|
|
533
|
-
if (this.continueOnFail()) {
|
|
534
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
535
|
-
returnData.push(...executionData);
|
|
536
|
-
continue;
|
|
537
|
-
}
|
|
538
|
-
throw error;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
if (operation === 'getAll') {
|
|
543
|
-
for (let i = 0; i < length; i++) {
|
|
544
|
-
try {
|
|
545
|
-
const messageId = this.getNodeParameter('messageId', i);
|
|
546
|
-
const returnAll = this.getNodeParameter('returnAll', i);
|
|
547
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
548
|
-
qs.$select = 'id,lastModifiedDateTime,name,contentType,size,isInline';
|
|
549
|
-
if (additionalFields.fields) {
|
|
550
|
-
qs.$select = additionalFields.fields;
|
|
551
|
-
}
|
|
552
|
-
if (additionalFields.filter) {
|
|
553
|
-
qs.$filter = additionalFields.filter;
|
|
554
|
-
}
|
|
555
|
-
const endpoint = `/messages/${messageId}/attachments`;
|
|
556
|
-
if (returnAll) {
|
|
557
|
-
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint, undefined, qs);
|
|
558
|
-
}
|
|
559
|
-
else {
|
|
560
|
-
qs.$top = this.getNodeParameter('limit', i);
|
|
561
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
|
562
|
-
responseData = responseData.value;
|
|
563
|
-
}
|
|
564
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
565
|
-
returnData.push(...executionData);
|
|
566
|
-
}
|
|
567
|
-
catch (error) {
|
|
568
|
-
if (this.continueOnFail()) {
|
|
569
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
570
|
-
returnData.push(...executionData);
|
|
571
|
-
continue;
|
|
572
|
-
}
|
|
573
|
-
throw error;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
if (resource === 'folder') {
|
|
579
|
-
if (operation === 'create') {
|
|
580
|
-
for (let i = 0; i < length; i++) {
|
|
581
|
-
try {
|
|
582
|
-
const displayName = this.getNodeParameter('displayName', i);
|
|
583
|
-
const folderType = this.getNodeParameter('folderType', i);
|
|
584
|
-
const body = {
|
|
585
|
-
displayName,
|
|
586
|
-
};
|
|
587
|
-
let endpoint = '/mailFolders';
|
|
588
|
-
if (folderType === 'searchFolder') {
|
|
589
|
-
endpoint = '/mailFolders/searchfolders/childFolders';
|
|
590
|
-
const includeNestedFolders = this.getNodeParameter('includeNestedFolders', i);
|
|
591
|
-
const sourceFolderIds = this.getNodeParameter('sourceFolderIds', i);
|
|
592
|
-
const filterQuery = this.getNodeParameter('filterQuery', i);
|
|
593
|
-
Object.assign(body, {
|
|
594
|
-
'@odata.type': 'microsoft.graph.mailSearchFolder',
|
|
595
|
-
includeNestedFolders,
|
|
596
|
-
sourceFolderIds,
|
|
597
|
-
filterQuery,
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'POST', endpoint, body);
|
|
601
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
602
|
-
returnData.push(...executionData);
|
|
603
|
-
}
|
|
604
|
-
catch (error) {
|
|
605
|
-
if (this.continueOnFail()) {
|
|
606
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
607
|
-
returnData.push(...executionData);
|
|
608
|
-
continue;
|
|
609
|
-
}
|
|
610
|
-
throw error;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
if (operation === 'delete') {
|
|
615
|
-
for (let i = 0; i < length; i++) {
|
|
616
|
-
try {
|
|
617
|
-
const folderId = this.getNodeParameter('folderId', i);
|
|
618
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'DELETE', `/mailFolders/${folderId}`);
|
|
619
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ success: true }), { itemData: { item: i } });
|
|
620
|
-
returnData.push(...executionData);
|
|
621
|
-
}
|
|
622
|
-
catch (error) {
|
|
623
|
-
if (this.continueOnFail()) {
|
|
624
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
625
|
-
returnData.push(...executionData);
|
|
626
|
-
continue;
|
|
627
|
-
}
|
|
628
|
-
throw error;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
if (operation === 'get') {
|
|
633
|
-
for (let i = 0; i < length; i++) {
|
|
634
|
-
try {
|
|
635
|
-
const folderId = this.getNodeParameter('folderId', i);
|
|
636
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
637
|
-
if (additionalFields.fields) {
|
|
638
|
-
qs.$select = additionalFields.fields;
|
|
639
|
-
}
|
|
640
|
-
if (additionalFields.filter) {
|
|
641
|
-
qs.$filter = additionalFields.filter;
|
|
642
|
-
}
|
|
643
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/mailFolders/${folderId}`, {}, qs);
|
|
644
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
645
|
-
returnData.push(...executionData);
|
|
646
|
-
}
|
|
647
|
-
catch (error) {
|
|
648
|
-
if (this.continueOnFail()) {
|
|
649
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
650
|
-
returnData.push(...executionData);
|
|
651
|
-
continue;
|
|
652
|
-
}
|
|
653
|
-
throw error;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
if (operation === 'getAll') {
|
|
658
|
-
for (let i = 0; i < length; i++) {
|
|
659
|
-
try {
|
|
660
|
-
const returnAll = this.getNodeParameter('returnAll', i);
|
|
661
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
662
|
-
if (additionalFields.fields) {
|
|
663
|
-
qs.$select = additionalFields.fields;
|
|
664
|
-
}
|
|
665
|
-
if (additionalFields.filter) {
|
|
666
|
-
qs.$filter = additionalFields.filter;
|
|
667
|
-
}
|
|
668
|
-
if (returnAll) {
|
|
669
|
-
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', '/mailFolders', {}, qs);
|
|
670
|
-
}
|
|
671
|
-
else {
|
|
672
|
-
qs.$top = this.getNodeParameter('limit', i);
|
|
673
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', '/mailFolders', {}, qs);
|
|
674
|
-
responseData = responseData.value;
|
|
675
|
-
}
|
|
676
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
677
|
-
returnData.push(...executionData);
|
|
678
|
-
}
|
|
679
|
-
catch (error) {
|
|
680
|
-
if (this.continueOnFail()) {
|
|
681
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
682
|
-
returnData.push(...executionData);
|
|
683
|
-
continue;
|
|
684
|
-
}
|
|
685
|
-
throw error;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
if (operation === 'getChildren') {
|
|
690
|
-
for (let i = 0; i < length; i++) {
|
|
691
|
-
try {
|
|
692
|
-
const folderId = this.getNodeParameter('folderId', i);
|
|
693
|
-
const returnAll = this.getNodeParameter('returnAll', i);
|
|
694
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
695
|
-
if (additionalFields.fields) {
|
|
696
|
-
qs.$select = additionalFields.fields;
|
|
697
|
-
}
|
|
698
|
-
if (additionalFields.filter) {
|
|
699
|
-
qs.$filter = additionalFields.filter;
|
|
700
|
-
}
|
|
701
|
-
if (returnAll) {
|
|
702
|
-
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', `/mailFolders/${folderId}/childFolders`, qs);
|
|
703
|
-
}
|
|
704
|
-
else {
|
|
705
|
-
qs.$top = this.getNodeParameter('limit', i);
|
|
706
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/mailFolders/${folderId}/childFolders`, undefined, qs);
|
|
707
|
-
responseData = responseData.value;
|
|
708
|
-
}
|
|
709
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
710
|
-
returnData.push(...executionData);
|
|
711
|
-
}
|
|
712
|
-
catch (error) {
|
|
713
|
-
if (this.continueOnFail()) {
|
|
714
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
715
|
-
returnData.push(...executionData);
|
|
716
|
-
continue;
|
|
717
|
-
}
|
|
718
|
-
throw error;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
if (operation === 'update') {
|
|
723
|
-
for (let i = 0; i < length; i++) {
|
|
724
|
-
try {
|
|
725
|
-
const folderId = this.getNodeParameter('folderId', i);
|
|
726
|
-
const updateFields = this.getNodeParameter('updateFields', i);
|
|
727
|
-
const body = {
|
|
728
|
-
...updateFields,
|
|
729
|
-
};
|
|
730
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'PATCH', `/mailFolders/${folderId}`, body);
|
|
731
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
732
|
-
returnData.push(...executionData);
|
|
733
|
-
}
|
|
734
|
-
catch (error) {
|
|
735
|
-
if (this.continueOnFail()) {
|
|
736
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
737
|
-
returnData.push(...executionData);
|
|
738
|
-
continue;
|
|
739
|
-
}
|
|
740
|
-
throw error;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
if (resource === 'folderMessage') {
|
|
746
|
-
for (let i = 0; i < length; i++) {
|
|
747
|
-
try {
|
|
748
|
-
if (operation === 'getAll') {
|
|
749
|
-
const folderId = this.getNodeParameter('folderId', i);
|
|
750
|
-
const returnAll = this.getNodeParameter('returnAll', i);
|
|
751
|
-
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
752
|
-
if (additionalFields.fields) {
|
|
753
|
-
qs.$select = additionalFields.fields;
|
|
754
|
-
}
|
|
755
|
-
if (additionalFields.filter) {
|
|
756
|
-
qs.$filter = additionalFields.filter;
|
|
757
|
-
}
|
|
758
|
-
const endpoint = `/mailFolders/${folderId}/messages`;
|
|
759
|
-
if (returnAll) {
|
|
760
|
-
responseData = await GenericFunctions_1.microsoftApiRequestAllItems.call(this, 'value', 'GET', endpoint, qs);
|
|
761
|
-
}
|
|
762
|
-
else {
|
|
763
|
-
qs.$top = this.getNodeParameter('limit', i);
|
|
764
|
-
responseData = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', endpoint, undefined, qs);
|
|
765
|
-
responseData = responseData.value;
|
|
766
|
-
}
|
|
767
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
768
|
-
returnData.push(...executionData);
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
catch (error) {
|
|
772
|
-
if (this.continueOnFail()) {
|
|
773
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
|
|
774
|
-
returnData.push(...executionData);
|
|
775
|
-
continue;
|
|
776
|
-
}
|
|
777
|
-
throw error;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
if ((resource === 'message' && operation === 'getMime') ||
|
|
782
|
-
(resource === 'messageAttachment' && operation === 'download')) {
|
|
783
|
-
return [items];
|
|
784
|
-
}
|
|
785
|
-
else {
|
|
786
|
-
return [returnData];
|
|
787
|
-
}
|
|
22
|
+
super(nodeVersions, baseDescription);
|
|
788
23
|
}
|
|
789
24
|
}
|
|
790
25
|
exports.MicrosoftOutlook = MicrosoftOutlook;
|