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:
Iván Ovejero
2022-11-18 16:29:44 +01:00
committed by GitHub
parent 0565194473
commit 0d9eeea024
202 changed files with 1003 additions and 985 deletions

View File

@@ -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(',');