refactor(core): Introduce overload for number-type node parameter (no-changelog) (#4644)

* 📘 Set up overloads

* 📘 Add temporary assertion

* 🔥 Remove inferrable number assertions

* ✏️ Add ticket ref
This commit is contained in:
Iván Ovejero
2022-11-18 15:26:22 +01:00
committed by GitHub
parent 600b285a44
commit 0565194473
166 changed files with 783 additions and 689 deletions

View File

@@ -450,7 +450,7 @@ export class Zendesk implements INodeType {
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
const limit = this.getNodeParameter('limit', i);
qs.per_page = limit;
responseData = await zendeskApiRequest.call(this, 'GET', endpoint, {}, qs);
responseData = responseData.results || responseData.suspended_tickets;
@@ -508,7 +508,7 @@ export class Zendesk implements INodeType {
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
const limit = this.getNodeParameter('limit', i);
qs.limit = limit;
responseData = await zendeskApiRequestAllItems.call(
this,
@@ -600,7 +600,7 @@ export class Zendesk implements INodeType {
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
const limit = this.getNodeParameter('limit', i);
qs.per_page = limit;
responseData = await zendeskApiRequest.call(this, 'GET', `/users`, {}, qs);
responseData = responseData.users;
@@ -634,7 +634,7 @@ export class Zendesk implements INodeType {
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
const limit = this.getNodeParameter('limit', i);
qs.per_page = limit;
responseData = await zendeskApiRequest.call(this, 'GET', `/users/search`, {}, qs);
responseData = responseData.users;
@@ -733,7 +733,7 @@ export class Zendesk implements INodeType {
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
const limit = this.getNodeParameter('limit', i);
qs.per_page = limit;
responseData = await zendeskApiRequest.call(this, 'GET', `/organizations`, {}, qs);
responseData = responseData.organizations;