mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
refactor(core): Fix type errors in workflow, core, nodes-langchain, and nodes-base (no-changelog) (#9450)
This commit is contained in:
committed by
GitHub
parent
d9616fc36f
commit
2bdc459bb2
@@ -7,7 +7,7 @@ import type {
|
||||
IRequestOptions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { BINARY_ENCODING, NodeApiError } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function microsoftApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
@@ -222,23 +222,3 @@ export async function downloadAttachments(
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
export async function binaryToAttachments(
|
||||
this: IExecuteFunctions,
|
||||
attachments: IDataObject[],
|
||||
items: INodeExecutionData[],
|
||||
i: number,
|
||||
) {
|
||||
return await Promise.all(
|
||||
attachments.map(async (attachment) => {
|
||||
const binaryPropertyName = attachment.binaryPropertyName as string;
|
||||
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
||||
const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
||||
return {
|
||||
'@odata.type': '#microsoft.graph.fileAttachment',
|
||||
name: binaryData.fileName,
|
||||
contentBytes: dataBuffer.toString(BINARY_ENCODING),
|
||||
};
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user