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:
@@ -151,7 +151,7 @@ export class CoinGecko implements INodeType {
|
||||
//https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_
|
||||
//https://www.coingecko.com/api/documentations/v3#/contract/get_coins__id__contract__contract_address_
|
||||
if (operation === 'get') {
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.community_data = false;
|
||||
qs.developer_data = false;
|
||||
@@ -207,7 +207,7 @@ export class CoinGecko implements INodeType {
|
||||
if (operation === 'market') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const baseCurrency = this.getNodeParameter('baseCurrency', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.vs_currency = baseCurrency;
|
||||
|
||||
@@ -240,7 +240,7 @@ export class CoinGecko implements INodeType {
|
||||
if (operation === 'price') {
|
||||
const searchBy = this.getNodeParameter('searchBy', i) as string;
|
||||
const quoteCurrencies = this.getNodeParameter('quoteCurrencies', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.vs_currencies = quoteCurrencies.join(',');
|
||||
|
||||
@@ -274,7 +274,7 @@ export class CoinGecko implements INodeType {
|
||||
if (operation === 'ticker') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const coinId = this.getNodeParameter('coinId', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
@@ -311,7 +311,7 @@ export class CoinGecko implements INodeType {
|
||||
if (operation === 'history') {
|
||||
const coinId = this.getNodeParameter('coinId', i) as string;
|
||||
const date = this.getNodeParameter('date', i) as string;
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
@@ -411,7 +411,7 @@ export class CoinGecko implements INodeType {
|
||||
//https://www.coingecko.com/api/documentations/v3#/events/get_events
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i);
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
Object.assign(qs, options);
|
||||
|
||||
@@ -440,7 +440,7 @@ export class CoinGecko implements INodeType {
|
||||
if (operation === 'price') {
|
||||
const ids = this.getNodeParameter('ids', i) as string;
|
||||
const currencies = this.getNodeParameter('currencies', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
(qs.ids = ids), (qs.vs_currencies = currencies.join(','));
|
||||
|
||||
@@ -454,7 +454,7 @@ export class CoinGecko implements INodeType {
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
const contractAddresses = this.getNodeParameter('contractAddresses', i) as string;
|
||||
const currencies = this.getNodeParameter('currencies', i) as string[];
|
||||
const options = this.getNodeParameter('options', i) as IDataObject;
|
||||
const options = this.getNodeParameter('options', i);
|
||||
|
||||
qs.contract_addresses = contractAddresses;
|
||||
qs.vs_currencies = currencies.join(',');
|
||||
|
||||
Reference in New Issue
Block a user