mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
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 {
|
||||
convertNETDates,
|
||||
@@ -15,15 +8,9 @@ import {
|
||||
unleashedApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
salesOrderFields,
|
||||
salesOrderOperations,
|
||||
} from './SalesOrderDescription';
|
||||
import { salesOrderFields, salesOrderOperations } from './SalesOrderDescription';
|
||||
|
||||
import {
|
||||
stockOnHandFields,
|
||||
stockOnHandOperations,
|
||||
} from './StockOnHandDescription';
|
||||
import { stockOnHandFields, stockOnHandOperations } from './StockOnHandDescription';
|
||||
|
||||
import moment from 'moment';
|
||||
|
||||
@@ -75,7 +62,6 @@ export class UnleashedSoftware implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
|
||||
const items = this.getInputData();
|
||||
const returnData: IDataObject[] = [];
|
||||
const length = items.length;
|
||||
@@ -83,15 +69,12 @@ export class UnleashedSoftware implements INodeType {
|
||||
let responseData;
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
const resource = this.getNodeParameter('resource', 0) as string;
|
||||
const operation = this.getNodeParameter('operation', 0) as string;
|
||||
|
||||
//https://apidocs.unleashedsoftware.com/SalesOrders
|
||||
if (resource === 'salesOrder') {
|
||||
|
||||
if (operation === 'getAll') {
|
||||
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
|
||||
@@ -114,7 +97,14 @@ export class UnleashedSoftware implements INodeType {
|
||||
Object.assign(qs, filters);
|
||||
|
||||
if (returnAll) {
|
||||
responseData = await unleashedApiRequestAllItems.call(this, 'Items', 'GET', '/SalesOrders', {}, qs);
|
||||
responseData = await unleashedApiRequestAllItems.call(
|
||||
this,
|
||||
'Items',
|
||||
'GET',
|
||||
'/SalesOrders',
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.pageSize = limit;
|
||||
@@ -128,7 +118,6 @@ export class UnleashedSoftware implements INodeType {
|
||||
|
||||
//https://apidocs.unleashedsoftware.com/StockOnHand
|
||||
if (resource === 'stockOnHand') {
|
||||
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
|
||||
@@ -149,7 +138,14 @@ export class UnleashedSoftware implements INodeType {
|
||||
Object.assign(qs, filters);
|
||||
|
||||
if (returnAll) {
|
||||
responseData = await unleashedApiRequestAllItems.call(this, 'Items', 'GET', '/StockOnHand', {}, qs);
|
||||
responseData = await unleashedApiRequestAllItems.call(
|
||||
this,
|
||||
'Items',
|
||||
'GET',
|
||||
'/StockOnHand',
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
const limit = this.getNodeParameter('limit', i) as number;
|
||||
qs.pageSize = limit;
|
||||
|
||||
Reference in New Issue
Block a user