diff --git a/scripts/generator-adapter/generators/app/templates/src/transport/custom.ts.ejs b/scripts/generator-adapter/generators/app/templates/src/transport/custom.ts.ejs index 2f3834dc..98ef799b 100644 --- a/scripts/generator-adapter/generators/app/templates/src/transport/custom.ts.ejs +++ b/scripts/generator-adapter/generators/app/templates/src/transport/custom.ts.ejs @@ -5,8 +5,7 @@ import { AdapterRequest, AdapterResponse, } from '@chainlink/external-adapter-framework/util' -import { TypeFromDefinition } from '@chainlink/external-adapter-framework/validation/input-params' -import { BaseEndpointTypes } from '../endpoint/<%= inputEndpointName %>' +import { BaseEndpointTypes, inputParameters } from '../endpoint/<%= inputEndpointName %>' <% if (includeComments) { -%> // CustomTransport extends base types from endpoint and adds additional, Provider-specific types (if needed). @@ -23,7 +22,7 @@ export type CustomTransportTypes = BaseEndpointTypes & { // different protocol, or you need custom functionality that built-in transports don't support. For example, custom, multistep authentication // for requests, paginated requests, on-chain data retrieval using third party libraries, and so on. <% } -%> -export class CustomTransport implements Transport { +export class CustomTransport implements Transport { <% if (includeComments) { -%> // name of the transport, used for logging <% } -%> @@ -31,7 +30,7 @@ export class CustomTransport implements Transpor <% if (includeComments) { -%> // cache instance for caching responses from provider <% } -%> - responseCache!: ResponseCache + responseCache!: ResponseCache <% if (includeComments) { -%> // instance of Requester to be used for data fetching. Use this instance to perform http calls <% } -%> @@ -41,7 +40,7 @@ export class CustomTransport implements Transpor // REQUIRED. Transport will be automatically initialized by the framework using this method. It will be called with transport // dependencies, adapter settings, endpoint name, and transport name as arguments. Use this method to initialize transport state <% } -%> - async initialize(dependencies: TransportDependencies, _adapterSettings: CustomTransportTypes['Settings'], _endpointName: string, transportName: string): Promise { + async initialize(dependencies: TransportDependencies, _adapterSettings: CustomTransportTypes['Settings'], _endpointName: string, transportName: string): Promise { this.responseCache = dependencies.responseCache this.requester = dependencies.requester this.name = transportName @@ -52,7 +51,7 @@ export class CustomTransport implements Transpor // request, process it,save it in the cache and return to user. <% } -%> async foregroundExecute( - req: AdapterRequest>, + req: AdapterRequest ): Promise> { // Custom transport logic