mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
refactor(core): Introduce overload for boolean-type node parameter (no-changelog) (#4647)
* 📘 Set up overloads * 📘 Add temporary assertion * 🔥 Remove inferrable boolean assertions * ⏪ Undo autoformatting
This commit is contained in:
@@ -258,7 +258,7 @@ export class GmailV2 implements INodeType {
|
||||
responseData = await googleApiRequest.call(this, 'GET', endpoint);
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
|
||||
responseData = await googleApiRequest.call(this, 'GET', `/gmail/v1/users/me/labels`);
|
||||
|
||||
@@ -379,7 +379,7 @@ export class GmailV2 implements INodeType {
|
||||
responseData = [nodeExecutionData];
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i, {}) as IDataObject;
|
||||
const filters = this.getNodeParameter('filters', i, {}) as IDataObject;
|
||||
const qs: IDataObject = {};
|
||||
@@ -605,7 +605,7 @@ export class GmailV2 implements INodeType {
|
||||
responseData = { success: true };
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const qs: IDataObject = {};
|
||||
Object.assign(qs, options);
|
||||
@@ -705,7 +705,7 @@ export class GmailV2 implements INodeType {
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
//https://developers.google.com/gmail/api/reference/rest/v1/users.threads/list
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const qs: IDataObject = {};
|
||||
Object.assign(qs, prepareQuery.call(this, filters));
|
||||
|
||||
Reference in New Issue
Block a user