feat: Add Outlook Trigger Node (#8656)
Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
@@ -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,
|
||||
) {
|
||||
|
||||
@@ -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,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user