mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,41 +1,18 @@
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
import { IDataObject, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
segmentApiRequest,
|
||||
} from './GenericFunctions';
|
||||
import { segmentApiRequest } from './GenericFunctions';
|
||||
|
||||
import {
|
||||
groupFields,
|
||||
groupOperations,
|
||||
} from './GroupDescription';
|
||||
import { groupFields, groupOperations } from './GroupDescription';
|
||||
|
||||
import {
|
||||
identifyFields,
|
||||
identifyOperations,
|
||||
} from './IdentifyDescription';
|
||||
import { identifyFields, identifyOperations } from './IdentifyDescription';
|
||||
|
||||
import {
|
||||
IIdentify,
|
||||
} from './IdentifyInterface';
|
||||
import { IIdentify } from './IdentifyInterface';
|
||||
|
||||
import {
|
||||
trackFields,
|
||||
trackOperations,
|
||||
} from './TrackDescription';
|
||||
import { trackFields, trackOperations } from './TrackDescription';
|
||||
|
||||
import {
|
||||
IGroup,
|
||||
ITrack,
|
||||
} from './TrackInterface';
|
||||
import { IGroup, ITrack } from './TrackInterface';
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
@@ -109,9 +86,12 @@ export class Segment implements INodeType {
|
||||
if (operation === 'add') {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
const groupId = this.getNodeParameter('groupId', i) as string;
|
||||
const traits = (this.getNodeParameter('traits', i) as IDataObject).traitsUi as IDataObject[];
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject).contextUi as IDataObject;
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject).integrationsUi as IDataObject;
|
||||
const traits = (this.getNodeParameter('traits', i) as IDataObject)
|
||||
.traitsUi as IDataObject[];
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject)
|
||||
.contextUi as IDataObject;
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject)
|
||||
.integrationsUi as IDataObject;
|
||||
const body: IGroup = {
|
||||
groupId,
|
||||
traits: {
|
||||
@@ -240,9 +220,12 @@ export class Segment implements INodeType {
|
||||
//https://segment.com/docs/connections/sources/catalog/libraries/server/http-api/#identify
|
||||
if (operation === 'create') {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject).contextUi as IDataObject;
|
||||
const traits = (this.getNodeParameter('traits', i) as IDataObject).traitsUi as IDataObject[];
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject).integrationsUi as IDataObject;
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject)
|
||||
.contextUi as IDataObject;
|
||||
const traits = (this.getNodeParameter('traits', i) as IDataObject)
|
||||
.traitsUi as IDataObject[];
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject)
|
||||
.integrationsUi as IDataObject;
|
||||
const body: IIdentify = {
|
||||
context: {
|
||||
app: {},
|
||||
@@ -370,13 +353,15 @@ export class Segment implements INodeType {
|
||||
if (operation === 'event') {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
const event = this.getNodeParameter('event', i) as string;
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject).contextUi as IDataObject;
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject).integrationsUi as IDataObject;
|
||||
const properties = (this.getNodeParameter('properties', i) as IDataObject).propertiesUi as IDataObject[];
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject)
|
||||
.contextUi as IDataObject;
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject)
|
||||
.integrationsUi as IDataObject;
|
||||
const properties = (this.getNodeParameter('properties', i) as IDataObject)
|
||||
.propertiesUi as IDataObject[];
|
||||
const body: ITrack = {
|
||||
event,
|
||||
traits: {
|
||||
},
|
||||
traits: {},
|
||||
context: {
|
||||
app: {},
|
||||
campaign: {},
|
||||
@@ -500,9 +485,12 @@ export class Segment implements INodeType {
|
||||
if (operation === 'page') {
|
||||
const userId = this.getNodeParameter('userId', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject).contextUi as IDataObject;
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject).integrationsUi as IDataObject;
|
||||
const properties = (this.getNodeParameter('properties', i) as IDataObject).propertiesUi as IDataObject[];
|
||||
const context = (this.getNodeParameter('context', i) as IDataObject)
|
||||
.contextUi as IDataObject;
|
||||
const integrations = (this.getNodeParameter('integrations', i) as IDataObject)
|
||||
.integrationsUi as IDataObject;
|
||||
const properties = (this.getNodeParameter('properties', i) as IDataObject)
|
||||
.propertiesUi as IDataObject[];
|
||||
const body: ITrack = {
|
||||
name,
|
||||
traits: {},
|
||||
|
||||
Reference in New Issue
Block a user