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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user