feat: Add Outlook Trigger Node (#8656)

Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
Bram Kn
2024-02-28 10:23:58 +01:00
committed by GitHub
parent 1e750c26b7
commit 720ae1b96b
7 changed files with 348 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ import type {
IExecuteFunctions,
IExecuteSingleFunctions,
ILoadOptionsFunctions,
IPollFunctions,
JsonObject,
} from 'n8n-workflow';
import { ApplicationError, jsonParse, NodeApiError } from 'n8n-workflow';
@@ -278,7 +279,7 @@ export function prepareFilterString(filters: IDataObject) {
}
export function prepareApiError(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions,
error: IDataObject,
itemIndex = 0,
) {

View File

@@ -6,11 +6,12 @@ import type {
IExecuteSingleFunctions,
ILoadOptionsFunctions,
INodeExecutionData,
IPollFunctions,
} from 'n8n-workflow';
import { prepareApiError } from '../helpers/utils';
export async function microsoftApiRequest(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions,
method: IHttpRequestMethods,
resource: string,
body: IDataObject = {},
@@ -59,7 +60,7 @@ export async function microsoftApiRequest(
error.description
) {
let updatedError;
// Try to return the error prettier, otherwise return the original one repalcing the message with the description
// Try to return the error prettier, otherwise return the original one replacing the message with the description
try {
updatedError = prepareApiError.call(this, error);
} catch (e) {}
@@ -75,7 +76,7 @@ export async function microsoftApiRequest(
}
export async function microsoftApiRequestAllItems(
this: IExecuteFunctions | ILoadOptionsFunctions,
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
propertyName: string,
method: IHttpRequestMethods,
endpoint: string,
@@ -107,7 +108,7 @@ export async function microsoftApiRequestAllItems(
}
export async function downloadAttachments(
this: IExecuteFunctions,
this: IExecuteFunctions | IPollFunctions,
messages: IDataObject[] | IDataObject,
prefix: string,
) {