@chainlink/external-adapter-framework 0.0.55 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/adapter.d.ts +1 -1
  2. package/adapter.js +0 -1
  3. package/background-executor.js +0 -1
  4. package/cache/factory.js +0 -1
  5. package/cache/index.js +0 -1
  6. package/cache/local.js +0 -1
  7. package/cache/metrics.js +3 -1
  8. package/cache/redis.js +0 -1
  9. package/config/index.d.ts +1 -1
  10. package/config/index.js +0 -1
  11. package/config/provider-limits.js +0 -1
  12. package/examples/bank-frick/accounts.js +0 -1
  13. package/examples/bank-frick/config/index.d.ts +1 -1
  14. package/examples/bank-frick/config/index.js +0 -1
  15. package/examples/bank-frick/index.js +0 -1
  16. package/examples/bank-frick/util.js +0 -1
  17. package/examples/coingecko/src/config/index.js +0 -1
  18. package/examples/coingecko/src/crypto-utils.js +0 -1
  19. package/examples/coingecko/src/endpoint/coins.js +0 -1
  20. package/examples/coingecko/src/endpoint/crypto-marketcap.js +0 -1
  21. package/examples/coingecko/src/endpoint/crypto-volume.js +0 -1
  22. package/examples/coingecko/src/endpoint/crypto.js +0 -1
  23. package/examples/coingecko/src/endpoint/dominance.js +0 -1
  24. package/examples/coingecko/src/endpoint/global-marketcap.js +0 -1
  25. package/examples/coingecko/src/endpoint/index.js +0 -1
  26. package/examples/coingecko/src/global-utils.d.ts +1 -1
  27. package/examples/coingecko/src/global-utils.js +0 -1
  28. package/examples/coingecko/src/index.d.ts +1 -1
  29. package/examples/coingecko/src/index.js +0 -1
  30. package/examples/coingecko-old/batch-warming.js +0 -1
  31. package/examples/coingecko-old/index.js +0 -1
  32. package/examples/coingecko-old/rest.js +0 -1
  33. package/examples/genesis/config/index.js +0 -1
  34. package/examples/genesis/index.js +0 -1
  35. package/examples/genesis/sseStream.js +0 -1
  36. package/examples/ncfx/config/index.js +0 -1
  37. package/examples/ncfx/index.js +0 -1
  38. package/examples/ncfx/websocket.js +0 -1
  39. package/index.d.ts +1 -1
  40. package/index.js +0 -1
  41. package/metrics/constants.js +0 -1
  42. package/metrics/index.js +0 -1
  43. package/metrics/util.js +0 -1
  44. package/package.json +1 -1
  45. package/rate-limiting/background/fixed-frequency.js +0 -1
  46. package/rate-limiting/index.d.ts +2 -2
  47. package/rate-limiting/index.js +0 -1
  48. package/rate-limiting/metrics.js +0 -1
  49. package/rate-limiting/request/simple-counting.js +0 -1
  50. package/transports/batch-warming.js +0 -1
  51. package/transports/index.js +4 -1
  52. package/transports/metrics.d.ts +1 -1
  53. package/transports/metrics.js +0 -1
  54. package/transports/rest.js +0 -1
  55. package/transports/sse.js +0 -1
  56. package/transports/util.js +0 -1
  57. package/transports/websocket.js +0 -1
  58. package/util/censor/censor-list.js +0 -1
  59. package/util/index.js +0 -1
  60. package/util/logger.js +0 -1
  61. package/util/request.js +0 -1
  62. package/util/subscription-set/expiring-sorted-set.js +0 -1
  63. package/util/subscription-set/redis-sorted-set.js +0 -1
  64. package/util/subscription-set/subscription-set.js +0 -1
  65. package/util/test-payload-loader.js +0 -1
  66. package/validation/error.js +0 -1
  67. package/validation/index.js +3 -2
  68. package/validation/input-params.js +0 -1
  69. package/validation/input-validator.d.ts +1 -1
  70. package/validation/input-validator.js +0 -1
  71. package/validation/override-functions.js +0 -1
package/adapter.d.ts CHANGED
@@ -100,7 +100,7 @@ export declare class AdapterEndpoint<Params, Result, CustomSettings extends Sett
100
100
  transport: Transport<Params, Result, CustomSettings>;
101
101
  inputParameters: InputParameters;
102
102
  rateLimiting?: EndpointRateLimitingConfig | undefined;
103
- validator: InputValidator;
103
+ validator?: InputValidator;
104
104
  constructor(params: AdapterEndpointParams<Params, Result, CustomSettings>);
105
105
  }
106
106
  declare type CustomAdapterSettings = SettingsMap & NegatedAdapterSettings;
package/adapter.js CHANGED
@@ -192,4 +192,3 @@ class Adapter {
192
192
  }
193
193
  }
194
194
  exports.Adapter = Adapter;
195
- //# sourceMappingURL=adapter.js.map
@@ -79,4 +79,3 @@ async function callBackgroundExecutes(adapter, apiShutdownPromise) {
79
79
  }
80
80
  }
81
81
  exports.callBackgroundExecutes = callBackgroundExecutes;
82
- //# sourceMappingURL=background-executor.js.map
package/cache/factory.js CHANGED
@@ -21,4 +21,3 @@ class CacheFactory {
21
21
  }
22
22
  }
23
23
  exports.CacheFactory = CacheFactory;
24
- //# sourceMappingURL=factory.js.map
package/cache/index.js CHANGED
@@ -172,4 +172,3 @@ const buildCacheMiddleware = (adapter) => async (req, res) => {
172
172
  logger.debug('Did not find response in cache, moving to next middleware');
173
173
  };
174
174
  exports.buildCacheMiddleware = buildCacheMiddleware;
175
- //# sourceMappingURL=index.js.map
package/cache/local.js CHANGED
@@ -81,4 +81,3 @@ class LocalCache {
81
81
  }
82
82
  }
83
83
  exports.LocalCache = LocalCache;
84
- //# sourceMappingURL=local.js.map
package/cache/metrics.js CHANGED
@@ -73,6 +73,9 @@ const baseLabels = [
73
73
  // labelNames: [...baseLabels, 'cache_hit'] as const,
74
74
  // buckets: [0.01, 0.1, 1, 10],
75
75
  // })
76
+ if (process.env['METRICS_ENABLED'] === 'false') {
77
+ client.register.clear();
78
+ }
76
79
  const cacheDataGetCount = new client.Counter({
77
80
  name: 'cache_data_get_count',
78
81
  help: 'A counter that increments every time a value is fetched from the cache',
@@ -118,4 +121,3 @@ exports.cacheWarmerCount = new client.Gauge({
118
121
  help: 'The number of cache warmers running',
119
122
  labelNames: ['isBatched'],
120
123
  });
121
- //# sourceMappingURL=metrics.js.map
package/cache/redis.js CHANGED
@@ -98,4 +98,3 @@ class RedisCache {
98
98
  }
99
99
  }
100
100
  exports.RedisCache = RedisCache;
101
- //# sourceMappingURL=redis.js.map
package/config/index.d.ts CHANGED
@@ -191,7 +191,7 @@ export declare const BaseSettings: {
191
191
  readonly description: "Maximum amount of characters that the common part of the cache key or feed ID can have";
192
192
  readonly type: "number";
193
193
  readonly default: 300;
194
- readonly validate: (value?: number | undefined) => "MAX_COMMON_KEY_SIZE must be a number between 150 and 500" | undefined;
194
+ readonly validate: (value?: number) => "MAX_COMMON_KEY_SIZE must be a number between 150 and 500" | undefined;
195
195
  };
196
196
  readonly REST_TRANSPORT_MAX_RATE_LIMIT_RETRIES: {
197
197
  readonly description: "Maximum amount of times the Rest Transport will attempt to set up a request when blocked by the rate limiter";
package/config/index.js CHANGED
@@ -342,4 +342,3 @@ const getEnv = (name, config) => {
342
342
  return value;
343
343
  }
344
344
  };
345
- //# sourceMappingURL=index.js.map
@@ -72,4 +72,3 @@ const calculateRateLimit = (providerLimit) => {
72
72
  minute: quota,
73
73
  };
74
74
  };
75
- //# sourceMappingURL=provider-limits.js.map
@@ -190,4 +190,3 @@ exports.accountsRestEndpoint = new adapter_1.AdapterEndpoint({
190
190
  transport: new BankFrickAccountsTransport(),
191
191
  inputParameters,
192
192
  });
193
- //# sourceMappingURL=accounts.js.map
@@ -6,7 +6,7 @@ export declare const customSettings: {
6
6
  readonly type: "number";
7
7
  readonly required: false;
8
8
  readonly default: 500;
9
- readonly validate: (value?: number | undefined) => string | undefined;
9
+ readonly validate: (value?: number) => string | undefined;
10
10
  };
11
11
  readonly PRIVATE_KEY: {
12
12
  readonly description: "";
@@ -52,4 +52,3 @@ exports.customSettings = {
52
52
  },
53
53
  },
54
54
  };
55
- //# sourceMappingURL=index.js.map
@@ -13,4 +13,3 @@ exports.adapter = new adapter_1.Adapter({
13
13
  API_ENDPOINT: 'https://olbsandbox.bankfrick.li/webapi/v2',
14
14
  },
15
15
  });
16
- //# sourceMappingURL=index.js.map
@@ -37,4 +37,3 @@ const generateJWT = async (config, signingAlgorithm = 'rsa-sha512') => {
37
37
  return response.data.token;
38
38
  };
39
39
  exports.generateJWT = generateJWT;
40
- //# sourceMappingURL=util.js.map
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PRO_API_ENDPOINT = exports.DEFAULT_API_ENDPOINT = void 0;
4
4
  exports.DEFAULT_API_ENDPOINT = 'https://api.coingecko.com/api/v3';
5
5
  exports.PRO_API_ENDPOINT = 'https://pro-api.coingecko.com/api/v3';
6
- //# sourceMappingURL=index.js.map
@@ -58,4 +58,3 @@ const constructEntry = (res, requestPayload, resultPath) => {
58
58
  return entry;
59
59
  };
60
60
  exports.constructEntry = constructEntry;
61
- //# sourceMappingURL=crypto-utils.js.map
@@ -34,4 +34,3 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
34
34
  transport: restEndpointTransport,
35
35
  inputParameters: exports.inputParameters,
36
36
  });
37
- //# sourceMappingURL=coins.js.map
@@ -27,4 +27,3 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
27
27
  transport: batchEndpointTransport,
28
28
  inputParameters: crypto_utils_1.cryptoInputParams,
29
29
  });
30
- //# sourceMappingURL=crypto-marketcap.js.map
@@ -27,4 +27,3 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
27
27
  transport: batchEndpointTransport,
28
28
  inputParameters: crypto_utils_1.cryptoInputParams,
29
29
  });
30
- //# sourceMappingURL=crypto-volume.js.map
@@ -25,4 +25,3 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
25
25
  transport: batchEndpointTransport,
26
26
  inputParameters: crypto_utils_1.cryptoInputParams,
27
27
  });
28
- //# sourceMappingURL=crypto.js.map
@@ -25,4 +25,3 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
25
25
  transport: batchEndpointTransport,
26
26
  inputParameters: global_utils_1.inputParameters,
27
27
  });
28
- //# sourceMappingURL=dominance.js.map
@@ -25,4 +25,3 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
25
25
  transport: batchEndpointTransport,
26
26
  inputParameters: global_utils_1.inputParameters,
27
27
  });
28
- //# sourceMappingURL=global-marketcap.js.map
@@ -13,4 +13,3 @@ var dominance_1 = require("./dominance");
13
13
  Object.defineProperty(exports, "dominance", { enumerable: true, get: function () { return dominance_1.endpoint; } });
14
14
  var crypto_volume_1 = require("./crypto-volume");
15
15
  Object.defineProperty(exports, "cryptoVolume", { enumerable: true, get: function () { return crypto_volume_1.endpoint; } });
16
- //# sourceMappingURL=index.js.map
@@ -22,6 +22,6 @@ interface ResultEntry {
22
22
  value: number;
23
23
  params: AdapterRequestParams;
24
24
  }
25
- export declare const buildGlobalRequestBody: (apiKey?: string | undefined) => AxiosRequestConfig<never>;
25
+ export declare const buildGlobalRequestBody: (apiKey?: string) => AxiosRequestConfig<never>;
26
26
  export declare const constructEntry: (res: AxiosResponse<ProviderResponseBody>, requestPayload: AdapterRequestParams, resultPath: 'total_market_cap' | 'market_cap_percentage') => ResultEntry | undefined;
27
27
  export {};
@@ -44,4 +44,3 @@ const constructEntry = (res, requestPayload, resultPath) => {
44
44
  };
45
45
  };
46
46
  exports.constructEntry = constructEntry;
47
- //# sourceMappingURL=global-utils.js.map
@@ -1,4 +1,4 @@
1
1
  /// <reference types="node" />
2
2
  import { Adapter } from '../../../../src/adapter';
3
3
  export declare const adapter: Adapter<import("../../../config").SettingsMap>;
4
- export declare const server: () => Promise<import("fastify").FastifyInstance<import("http").Server, import("http").IncomingMessage, import("http").ServerResponse, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> | undefined>;
4
+ export declare const server: () => Promise<import("fastify").FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> | undefined>;
@@ -16,4 +16,3 @@ exports.adapter = new adapter_1.Adapter({
16
16
  });
17
17
  const server = () => (0, __1.expose)(exports.adapter);
18
18
  exports.server = server;
19
- //# sourceMappingURL=index.js.map
@@ -51,4 +51,3 @@ exports.batchEndpoint = new adapter_1.AdapterEndpoint({
51
51
  transport: batchEndpointTransport,
52
52
  inputParameters,
53
53
  });
54
- //# sourceMappingURL=batch-warming.js.map
@@ -9,4 +9,3 @@ exports.adapter = new adapter_1.Adapter({
9
9
  defaultEndpoint: 'batch',
10
10
  endpoints: [rest_1.restEndpoint, batch_warming_1.batchEndpoint],
11
11
  });
12
- //# sourceMappingURL=index.js.map
@@ -52,4 +52,3 @@ exports.restEndpoint = new adapter_1.AdapterEndpoint({
52
52
  transport: restEndpointTransport,
53
53
  inputParameters,
54
54
  });
55
- //# sourceMappingURL=rest.js.map
@@ -8,4 +8,3 @@ exports.customSettings = {
8
8
  required: true,
9
9
  },
10
10
  };
11
- //# sourceMappingURL=index.js.map
@@ -10,4 +10,3 @@ exports.adapter = new adapter_1.Adapter({
10
10
  endpoints: [sseStream_1.sseEndpoint],
11
11
  customSettings: config_1.customSettings,
12
12
  });
13
- //# sourceMappingURL=index.js.map
@@ -139,4 +139,3 @@ exports.sseEndpoint = new adapter_1.AdapterEndpoint({
139
139
  transport: exports.sseTransport,
140
140
  inputParameters: exports.inputParameters,
141
141
  });
142
- //# sourceMappingURL=sseStream.js.map
@@ -13,4 +13,3 @@ exports.customSettings = {
13
13
  required: true,
14
14
  },
15
15
  };
16
- //# sourceMappingURL=index.js.map
@@ -9,4 +9,3 @@ exports.adapter = new adapter_1.Adapter({
9
9
  endpoints: [websocket_1.webSocketEndpoint],
10
10
  customSettings: config_1.customSettings,
11
11
  });
12
- //# sourceMappingURL=index.js.map
@@ -71,4 +71,3 @@ exports.webSocketEndpoint = new adapter_1.AdapterEndpoint({
71
71
  transport: exports.websocketTransport,
72
72
  inputParameters: exports.inputParameters,
73
73
  });
74
- //# sourceMappingURL=websocket.js.map
package/index.d.ts CHANGED
@@ -8,4 +8,4 @@ import { Adapter, AdapterDependencies } from './adapter';
8
8
  * @param dependencies - an optional object with adapter dependencies to inject
9
9
  * @returns a Promise that resolves to the http.Server listening for connections
10
10
  */
11
- export declare const expose: (adapter: Adapter, dependencies?: Partial<AdapterDependencies> | undefined) => Promise<FastifyInstance | undefined>;
11
+ export declare const expose: (adapter: Adapter, dependencies?: Partial<AdapterDependencies>) => Promise<FastifyInstance | undefined>;
package/index.js CHANGED
@@ -142,4 +142,3 @@ function buildSmokeEndpoint(app, config) {
142
142
  return res.status(200).send('OK');
143
143
  });
144
144
  }
145
- //# sourceMappingURL=index.js.map
@@ -23,4 +23,3 @@ var HttpRequestType;
23
23
  exports.MAX_FEED_ID_LENGTH = 300;
24
24
  // We should tune these as we collect data, this is the default bucket distribution that prom comes with
25
25
  exports.requestDurationBuckets = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10];
26
- //# sourceMappingURL=constants.js.map
package/metrics/index.js CHANGED
@@ -135,4 +135,3 @@ exports.bgExecuteDurationSeconds = new client.Gauge({
135
135
  help: 'A histogram bucket of the distribution of background execute durations',
136
136
  labelNames: ['endpoint'],
137
137
  });
138
- //# sourceMappingURL=index.js.map
package/metrics/util.js CHANGED
@@ -7,4 +7,3 @@ const getMetricsMeta = ({ adapterEndpoint, adapterConfig, }, data) => {
7
7
  return { feedId };
8
8
  };
9
9
  exports.getMetricsMeta = getMetricsMeta;
10
- //# sourceMappingURL=util.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainlink/external-adapter-framework",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -33,4 +33,3 @@ class FixedFrequencyRateLimiter {
33
33
  }
34
34
  }
35
35
  exports.FixedFrequencyRateLimiter = FixedFrequencyRateLimiter;
36
- //# sourceMappingURL=fixed-frequency.js.map
@@ -44,7 +44,7 @@ export interface BackgroundExecuteRateLimiter extends RateLimiter {
44
44
  * @param limits - the rate limit tier set for the adapter
45
45
  * @returns the most restrictive of the set options, in requests per second
46
46
  */
47
- export declare const consolidateTierLimits: (limits?: AdapterRateLimitTier | undefined) => number;
47
+ export declare const consolidateTierLimits: (limits?: AdapterRateLimitTier) => number;
48
48
  /**
49
49
  * Validates rate limiting tiers specified for the adapter, and returns the one to use.
50
50
  *
@@ -52,5 +52,5 @@ export declare const consolidateTierLimits: (limits?: AdapterRateLimitTier | und
52
52
  * @param tiers - the adapter config listing the different available API tiers
53
53
  * @returns the specified API tier, or a default one if none are specified
54
54
  */
55
- export declare const getRateLimitingTier: (config: AdapterConfig, tiers?: Record<string, AdapterRateLimitTier> | undefined) => AdapterRateLimitTier | undefined;
55
+ export declare const getRateLimitingTier: (config: AdapterConfig, tiers?: Record<string, AdapterRateLimitTier>) => AdapterRateLimitTier | undefined;
56
56
  export declare const buildRateLimitTiersFromConfig: (config: AdapterConfig) => AdapterRateLimitTier | undefined;
@@ -83,4 +83,3 @@ const buildRateLimitTiersFromConfig = (config) => {
83
83
  };
84
84
  };
85
85
  exports.buildRateLimitTiersFromConfig = buildRateLimitTiersFromConfig;
86
- //# sourceMappingURL=index.js.map
@@ -42,4 +42,3 @@ exports.rateLimitCreditsSpentTotal = new client.Counter({
42
42
  help: 'The number of data provider credits the adapter is consuming',
43
43
  labelNames: ['participant_id', 'feed_id'],
44
44
  });
45
- //# sourceMappingURL=metrics.js.map
@@ -60,4 +60,3 @@ class SimpleCountingRateLimiter {
60
60
  }
61
61
  }
62
62
  exports.SimpleCountingRateLimiter = SimpleCountingRateLimiter;
63
- //# sourceMappingURL=simple-counting.js.map
@@ -106,4 +106,3 @@ class BatchWarmingTransport {
106
106
  }
107
107
  }
108
108
  exports.BatchWarmingTransport = BatchWarmingTransport;
109
- //# sourceMappingURL=batch-warming.js.map
@@ -30,6 +30,7 @@ exports.buildTransportHandler = exports.buildCacheEntriesFromResults = void 0;
30
30
  const cache_1 = require("../cache");
31
31
  const util_1 = require("../util");
32
32
  const transportMetrics = __importStar(require("./metrics"));
33
+ const client = __importStar(require("prom-client"));
33
34
  __exportStar(require("./batch-warming"), exports);
34
35
  __exportStar(require("./rest"), exports);
35
36
  __exportStar(require("./websocket"), exports);
@@ -110,4 +111,6 @@ const buildTransportHandler = (adapter) => async (req, reply) => {
110
111
  return reply.send();
111
112
  };
112
113
  exports.buildTransportHandler = buildTransportHandler;
113
- //# sourceMappingURL=index.js.map
114
+ if (process.env['METRICS_ENABLED'] === 'false') {
115
+ client.register.clear();
116
+ }
@@ -1,7 +1,7 @@
1
1
  import * as client from 'prom-client';
2
2
  import { AdapterContext } from '../adapter';
3
3
  import { SettingsMap } from '../config';
4
- export declare const dataProviderMetricsLabel: (providerStatusCode?: number | undefined, method?: string) => {
4
+ export declare const dataProviderMetricsLabel: (providerStatusCode?: number, method?: string) => {
5
5
  provider_status_code: number | undefined;
6
6
  method: string;
7
7
  };
@@ -119,4 +119,3 @@ exports.transportPollingDurationSeconds = new client.Gauge({
119
119
  help: 'A histogram bucket of the distribution of transport polling idle time durations',
120
120
  labelNames: ['endpoint', 'succeeded'],
121
121
  });
122
- //# sourceMappingURL=metrics.js.map
@@ -136,4 +136,3 @@ class RestTransport {
136
136
  }
137
137
  }
138
138
  exports.RestTransport = RestTransport;
139
- //# sourceMappingURL=rest.js.map
package/transports/sse.js CHANGED
@@ -93,4 +93,3 @@ class SSETransport {
93
93
  }
94
94
  }
95
95
  exports.SSETransport = SSETransport;
96
- //# sourceMappingURL=sse.js.map
@@ -84,4 +84,3 @@ async function axiosRequest(request, config) {
84
84
  return providerResponse;
85
85
  }
86
86
  exports.axiosRequest = axiosRequest;
87
- //# sourceMappingURL=util.js.map
@@ -165,4 +165,3 @@ class WebSocketTransport {
165
165
  }
166
166
  }
167
167
  exports.WebSocketTransport = WebSocketTransport;
168
- //# sourceMappingURL=websocket.js.map
@@ -10,4 +10,3 @@ class CensorList {
10
10
  }
11
11
  exports.default = CensorList;
12
12
  CensorList.censorList = [];
13
- //# sourceMappingURL=censor-list.js.map
package/util/index.js CHANGED
@@ -35,4 +35,3 @@ const isArray = (o) => o !== null && typeof o === 'object' && Array.isArray(o);
35
35
  exports.isArray = isArray;
36
36
  const isEmpty = (o) => o === undefined || o === null || o === '';
37
37
  exports.isEmpty = isEmpty;
38
- //# sourceMappingURL=index.js.map
package/util/logger.js CHANGED
@@ -79,4 +79,3 @@ function censor(obj, censorList) {
79
79
  });
80
80
  return stringified;
81
81
  }
82
- //# sourceMappingURL=logger.js.map
package/util/request.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=request.js.map
@@ -33,4 +33,3 @@ class ExpiringSortedSet {
33
33
  }
34
34
  }
35
35
  exports.ExpiringSortedSet = ExpiringSortedSet;
36
- //# sourceMappingURL=expiring-sorted-set.js.map
@@ -26,4 +26,3 @@ class RedisSubscriptionSet {
26
26
  }
27
27
  }
28
28
  exports.RedisSubscriptionSet = RedisSubscriptionSet;
29
- //# sourceMappingURL=redis-sorted-set.js.map
@@ -25,4 +25,3 @@ class SubscriptionSetFactory {
25
25
  }
26
26
  }
27
27
  exports.SubscriptionSetFactory = SubscriptionSetFactory;
28
- //# sourceMappingURL=subscription-set.js.map
@@ -81,4 +81,3 @@ function resolvePayload(fileName) {
81
81
  return null;
82
82
  }
83
83
  }
84
- //# sourceMappingURL=test-payload-loader.js.map
@@ -77,4 +77,3 @@ class AdapterCustomError extends AdapterError {
77
77
  }
78
78
  }
79
79
  exports.AdapterCustomError = AdapterCustomError;
80
- //# sourceMappingURL=error.js.map
@@ -40,7 +40,9 @@ const validatorMiddleware = (adapter) => (req, reply, done) => {
40
40
  statusCode: 404,
41
41
  });
42
42
  }
43
- const validatedData = endpoint.validator.validateInput(req.body?.['data']);
43
+ const validatedData = endpoint.validator
44
+ ? endpoint.validator.validateInput(req.body?.['data'])
45
+ : req.body?.['data'];
44
46
  req.requestContext = {
45
47
  cacheKey: '',
46
48
  data: validatedData,
@@ -90,4 +92,3 @@ const errorCatchingMiddleware = (err, req, res) => {
90
92
  }
91
93
  };
92
94
  exports.errorCatchingMiddleware = errorCatchingMiddleware;
93
- //# sourceMappingURL=index.js.map
@@ -28,4 +28,3 @@ exports.baseInputParameters = {
28
28
  // Type: 'string', TODO: Once complex types are supported this could be { from: string, to: string, includes: [{ from: string, to: string, adapters: string[], inverse: boolean, tokens: boolean }] } }[]
29
29
  },
30
30
  };
31
- //# sourceMappingURL=input-params.js.map
@@ -4,7 +4,7 @@ export declare class InputValidator {
4
4
  private readonly inputConfig;
5
5
  private aliases;
6
6
  constructor(inputConfig: InputParameters);
7
- validateInput(input: Record<string, unknown>): NormalizedInput;
7
+ validateInput(input: any): NormalizedInput;
8
8
  private initializeInputs;
9
9
  private validateInputParamsSchema;
10
10
  private validateRequiredConfig;
@@ -121,4 +121,3 @@ class InputValidator {
121
121
  }
122
122
  }
123
123
  exports.InputValidator = InputValidator;
124
- //# sourceMappingURL=input-validator.js.map
@@ -38,4 +38,3 @@ const performSymbolOverrides = (adapter, req) => {
38
38
  req.requestContext.data['base'] = requestedSymbols;
39
39
  };
40
40
  exports.performSymbolOverrides = performSymbolOverrides;
41
- //# sourceMappingURL=override-functions.js.map