mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Use NodeConnectionType consistently across the code base (no-changelog) (#10595)
This commit is contained in:
@@ -12,7 +12,6 @@ import { parseString } from 'xml2js';
|
||||
|
||||
import {
|
||||
SPLUNK,
|
||||
type SplunkCredentials,
|
||||
type SplunkError,
|
||||
type SplunkFeedResponse,
|
||||
type SplunkResultResponse,
|
||||
@@ -115,9 +114,7 @@ export async function splunkApiRequest(
|
||||
body: IDataObject = {},
|
||||
qs: IDataObject = {},
|
||||
): Promise<any> {
|
||||
const { baseUrl, allowUnauthorizedCerts } = (await this.getCredentials(
|
||||
'splunkApi',
|
||||
)) as SplunkCredentials;
|
||||
const { baseUrl, allowUnauthorizedCerts } = await this.getCredentials('splunkApi');
|
||||
|
||||
const options: IRequestOptions = {
|
||||
headers: {
|
||||
|
||||
@@ -8,8 +8,10 @@ import type {
|
||||
INodeTypeDescription,
|
||||
INodeTypeBaseDescription,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
import { NodeApiError, NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import set from 'lodash/set';
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
import {
|
||||
formatFeed,
|
||||
formatResults,
|
||||
@@ -34,8 +36,6 @@ import {
|
||||
} from './descriptions';
|
||||
|
||||
import type { SplunkFeedResponse } from './types';
|
||||
import set from 'lodash/set';
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Splunk',
|
||||
@@ -48,8 +48,8 @@ const versionDescription: INodeTypeDescription = {
|
||||
defaults: {
|
||||
name: 'Splunk',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'splunkApi',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import set from 'lodash/set';
|
||||
import * as alert from './alert';
|
||||
import * as report from './report';
|
||||
import * as search from './search';
|
||||
import * as user from './user';
|
||||
|
||||
import set from 'lodash/set';
|
||||
import type { SplunkType } from './node.type';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import type { INodeTypeDescription } from 'n8n-workflow';
|
||||
import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow';
|
||||
|
||||
import * as alert from './alert';
|
||||
import * as report from './report';
|
||||
@@ -17,8 +17,8 @@ export const versionDescription: INodeTypeDescription = {
|
||||
defaults: {
|
||||
name: 'Splunk',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'splunkApi',
|
||||
|
||||
@@ -2,8 +2,8 @@ import type { IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
||||
|
||||
import { parseString } from 'xml2js';
|
||||
|
||||
import type { SplunkError, SplunkFeedResponse } from './interfaces';
|
||||
import { SPLUNK } from '../../v1/types';
|
||||
import type { SplunkError, SplunkFeedResponse } from './interfaces';
|
||||
|
||||
function compactEntryContent(splunkObject: any): any {
|
||||
if (typeof splunkObject !== 'object') {
|
||||
|
||||
Reference in New Issue
Block a user