mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -302,7 +302,7 @@ export class Zendesk implements INodeType {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
if (additionalFields.type) {
|
||||
body.type = additionalFields.type as string;
|
||||
@@ -354,7 +354,7 @@ export class Zendesk implements INodeType {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
if (updateFields.type) {
|
||||
body.type = updateFields.type as string;
|
||||
@@ -420,7 +420,7 @@ export class Zendesk implements INodeType {
|
||||
if (operation === 'getAll') {
|
||||
const ticketType = this.getNodeParameter('ticketType', i) as string;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
qs.query = 'type:ticket';
|
||||
if (options.query) {
|
||||
qs.query += ` ${options.query}`;
|
||||
@@ -527,7 +527,7 @@ export class Zendesk implements INodeType {
|
||||
//https://developer.zendesk.com/api-reference/ticketing/users/users/#create-user
|
||||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
@@ -553,7 +553,7 @@ export class Zendesk implements INodeType {
|
||||
//https://developer.zendesk.com/api-reference/ticketing/users/users/#update-user
|
||||
if (operation === 'update') {
|
||||
const userId = this.getNodeParameter('id', i) as string;
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
const updateFields = this.getNodeParameter('updateFields', i);
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
@@ -586,7 +586,7 @@ export class Zendesk implements INodeType {
|
||||
//https://developer.zendesk.com/api-reference/ticketing/users/users/#list-users
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const options = this.getNodeParameter('filters', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
@@ -620,7 +620,7 @@ export class Zendesk implements INodeType {
|
||||
//https://developer.zendesk.com/api-reference/ticketing/users/users/#search-users
|
||||
if (operation === 'search') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const options = this.getNodeParameter('filters', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user