mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)
* 📘 Set up overload * 🔥 Remove inferrable record assertions * 👕 Fix semicolon * 👕 Fix another semicolon
This commit is contained in:
@@ -69,7 +69,7 @@ export class Flow implements INodeType {
|
||||
if (operation === 'create') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const body: ITask = {
|
||||
organization_id: credentials.organizationId as number,
|
||||
};
|
||||
@@ -131,7 +131,7 @@ export class Flow implements INodeType {
|
||||
if (operation === 'update') {
|
||||
const workspaceId = this.getNodeParameter('workspaceId', i) as string;
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
const body: ITask = {
|
||||
organization_id: credentials.organizationId as number,
|
||||
};
|
||||
@@ -198,7 +198,7 @@ export class Flow implements INodeType {
|
||||
//https://developer.getflow.com/api/#tasks_get-task
|
||||
if (operation === 'get') {
|
||||
const taskId = this.getNodeParameter('taskId', i) as string;
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
qs.organization_id = credentials.organizationId as number;
|
||||
if (filters.include) {
|
||||
qs.include = (filters.include as string[]).join(',');
|
||||
@@ -212,7 +212,7 @@ export class Flow implements INodeType {
|
||||
//https://developer.getflow.com/api/#tasks_get-tasks
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i);
|
||||
qs.organization_id = credentials.organizationId as number;
|
||||
if (filters.include) {
|
||||
qs.include = (filters.include as string[]).join(',');
|
||||
|
||||
Reference in New Issue
Block a user