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

@@ -1108,7 +1108,7 @@ export class Freshdesk implements INodeType {
const status = this.getNodeParameter('status', i) as string;
const priority = this.getNodeParameter('priority', i) as string;
const source = this.getNodeParameter('source', i) as string;
const options = this.getNodeParameter('options', i) as IDataObject;
const options = this.getNodeParameter('options', i);
//const jsonActive = this.getNodeParameter('jsonParameters') as boolean;
const body: ICreateTicketBody = {
// @ts-ignore
@@ -1201,7 +1201,7 @@ export class Freshdesk implements INodeType {
//https://developers.freshdesk.com/api/#update_ticket
if (operation === 'update') {
const ticketId = this.getNodeParameter('ticketId', i) as string;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i);
const body: ICreateTicketBody = {};
if (updateFields.requester) {
@@ -1286,7 +1286,7 @@ export class Freshdesk implements INodeType {
//https://developers.freshdesk.com/api/#list_all_tickets
if (operation === 'getAll') {
const returnAll = this.getNodeParameter('returnAll', i);
const options = this.getNodeParameter('options', i) as IDataObject;
const options = this.getNodeParameter('options', i);
if (options.requesterId) {
qs.requester_id = options.requesterId as string;
}