UNPKG

@mojaloop/inter-scheme-proxy-cache-lib

Version:

Common component, that provides scheme proxy caching mapping (ISPC)

67 lines (60 loc) 2.6 kB
/***** License -------------- Copyright © 2020-2025 Mojaloop Foundation The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Contributors -------------- This is the official list of the Mojaloop project contributors for this file. Names of the original copyright holders (individuals or organizations) should be listed with a '*' in the first column. People who have contributed from an organization can be listed under the organization that actually holds the copyright for their contributions (see the Mojaloop Foundation for an example). Those individuals should have their names indented and be marked with a '-'. Email address can be added optionally within square brackets <email>. * Mojaloop Foundation - Name Surname <name.surname@mojaloop.io> * Eugen Klymniuk <eugen.klymniuk@infitx.com> -------------- **********/ /** @hidden */ interface ILogger extends LogMethods { child(context?: LogContext): ILogger; } type Json = string | number | boolean | { [x: string]: Json; } | Array<Json>; /** Makes the T hover overlay more readable in IDE */ type Prettify<T> = { [K in keyof T]: T[K]; } & unknown; /** @hidden */ declare const logLevelsMap: { readonly error: "error"; readonly warn: "warn"; readonly info: "info"; readonly verbose: "verbose"; readonly debug: "debug"; readonly silly: "silly"; readonly audit: "audit"; readonly trace: "trace"; readonly perf: "perf"; }; declare const logLevelValues: ("error" | "warn" | "info" | "verbose" | "debug" | "silly" | "audit" | "trace" | "perf")[]; type LogLevel = (typeof logLevelValues)[number]; /** @hidden */ type LogContext = Json | string | null; /** @hidden */ type LogMeta = unknown; /** @hidden */ type LogMethod = (message: string, meta?: LogMeta) => void; /** @hidden */ type LogMethods = { [key in LogLevel]: LogMethod; } & { [isKey in `is${Capitalize<LogLevel>}Enabled`]: boolean; }; export { type ILogger, type Json, type LogContext, type LogLevel, type LogMeta, type LogMethod, type LogMethods, type Prettify, logLevelValues, logLevelsMap };