mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Format nodes-base package (A-F) (#3800)
* 🔨 prettier formated nodes - A * 🔨 prettier formated nodes - B * ⚡ prettier formated nodes - C * ⚡ prettier formated nodes - D * ⚡ prettier formated nodes - E-F * 🎨 Adjust nodes-base formatting command (#3805) * Format additional files in nodes A-F (#3811) * ⚡ fixes * 🎨 Add Mindee to ignored dirs Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -1,18 +1,8 @@
|
||||
import {
|
||||
IHookFunctions,
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
IWebhookResponseData,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
boxApiRequest,
|
||||
boxApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
import { boxApiRequest, boxApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
export class BoxTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -191,12 +181,14 @@ export class BoxTrigger implements INodeType {
|
||||
{
|
||||
name: 'Metadata Instance Deleted',
|
||||
value: 'METADATA_INSTANCE.DELETED',
|
||||
description: 'An existing metadata template instance associated with a file or folder is deleted',
|
||||
description:
|
||||
'An existing metadata template instance associated with a file or folder is deleted',
|
||||
},
|
||||
{
|
||||
name: 'Metadata Instance Updated',
|
||||
value: 'METADATA_INSTANCE.UPDATED',
|
||||
description: 'An attribute (value) is updated/deleted for an existing metadata template instance associated with a file or folder',
|
||||
description:
|
||||
'An attribute (value) is updated/deleted for an existing metadata template instance associated with a file or folder',
|
||||
},
|
||||
{
|
||||
name: 'Sharedlink Created',
|
||||
@@ -275,9 +267,11 @@ export class BoxTrigger implements INodeType {
|
||||
const webhooks = await boxApiRequestAllItems.call(this, 'entries', 'GET', endpoint, {});
|
||||
|
||||
for (const webhook of webhooks) {
|
||||
if (webhook.address === webhookUrl &&
|
||||
if (
|
||||
webhook.address === webhookUrl &&
|
||||
webhook.target.id === targetId &&
|
||||
webhook.target.type === targetType) {
|
||||
webhook.target.type === targetType
|
||||
) {
|
||||
for (const event of events) {
|
||||
if (!webhook.triggers.includes(event)) {
|
||||
return false;
|
||||
@@ -321,7 +315,6 @@ export class BoxTrigger implements INodeType {
|
||||
async delete(this: IHookFunctions): Promise<boolean> {
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
if (webhookData.webhookId !== undefined) {
|
||||
|
||||
const endpoint = `/webhooks/${webhookData.webhookId}`;
|
||||
|
||||
try {
|
||||
@@ -343,9 +336,7 @@ export class BoxTrigger implements INodeType {
|
||||
const bodyData = this.getBodyData();
|
||||
|
||||
return {
|
||||
workflowData: [
|
||||
this.helpers.returnJsonArray(bodyData),
|
||||
],
|
||||
workflowData: [this.helpers.returnJsonArray(bodyData)],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user