feat(Facebook Lead Ads Trigger Node): Add Facebook Lead Ads Trigger Node (#7113)

Github issue / Community forum post (link here to close automatically):
https://community.n8n.io/t/facebook-lead-ads-integration/4590/19

---------

Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
Elias Meire
2023-10-20 13:43:55 +02:00
committed by GitHub
parent 647372be27
commit ac814a9c61
14 changed files with 835 additions and 25 deletions

View File

@@ -29,6 +29,21 @@ function findReferencedMethods(obj, refs = {}, latestName = '') {
return refs;
}
function addWebhookLifecycle(nodeType) {
if (nodeType.description.webhooks) {
nodeType.description.webhooks = nodeType.description.webhooks.map((webhook) => {
const webhookMethods =
nodeType?.webhookMethods?.[webhook.name] ?? nodeType?.webhookMethods?.default;
webhook.hasLifecycleMethods = Boolean(
webhookMethods?.checkExists && webhookMethods?.create && webhookMethods?.delete,
);
return webhook;
});
}
return nodeType;
}
(async () => {
const loader = new PackageDirectoryLoader(packageDir);
await loader.loadAll();
@@ -60,6 +75,7 @@ function findReferencedMethods(obj, refs = {}, latestName = '') {
.map((data) => {
const nodeType = NodeHelpers.getVersionedNodeType(data.type);
NodeHelpers.applySpecialNodeParameters(nodeType);
addWebhookLifecycle(nodeType);
return data.type;
})
.flatMap((nodeData) => {