You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/generator-adapter/generators/app/templates/src/transport/custombg.ts.ejs
+11-24Lines changed: 11 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
import { TransportDependencies } from '@chainlink/external-adapter-framework/transports'
2
2
import { calculateHttpRequestKey } from '@chainlink/external-adapter-framework/cache'
3
-
import { ResponseCache } from '@chainlink/external-adapter-framework/cache/response'
4
3
import { Requester } from '@chainlink/external-adapter-framework/util/requester'
5
4
import {
6
5
AdapterResponse, sleep, makeLogger
@@ -20,26 +19,13 @@ type PriceResponse = {
20
19
}
21
20
}
22
21
23
-
<%if (includeComments) { -%>
24
-
// <%= normalizedEndpointNameCap %>Transport extends base types from endpoint and adds additional, Provider-specific types (if needed).
25
-
<% } -%>
26
-
export type <%= normalizedEndpointNameCap %>TransportTypes = BaseEndpointTypes & {
27
-
Provider: {
28
-
RequestBody: never
29
-
ResponseBody: any
30
-
}
31
-
}
32
22
<%if (includeComments) { -%>
33
23
// <%= normalizedEndpointNameCap %>Transport is used to perform custom data fetching and processing from a Provider. The framework provides built-in transports to
34
24
// fetch data from a Provider using several protocols, including `http`, `websocket`, and `sse`. Use <%= normalizedEndpointNameCap %>Transport when the Provider uses
35
25
// different protocol, or you need custom functionality that built-in transports don't support. For example, custom, multistep authentication
36
26
// for requests, paginated requests, on-chain data retrieval using third party libraries, and so on.
37
27
<% } -%>
38
-
export class <%= normalizedEndpointNameCap %>Transport extends SubscriptionTransport<<%= normalizedEndpointNameCap %>TransportTypes> {
39
-
<%if (includeComments) { -%>
40
-
// name of the transport, used for logging
41
-
<% } -%>
42
-
name!: string
28
+
export class <%= normalizedEndpointNameCap %>Transport extends SubscriptionTransport<BaseEndpointTypes> {
43
29
<%if (includeComments) { -%>
44
30
// name of the endpoint, used to calculate the request key
0 commit comments