UNPKG

apitally

Version:

Simple API monitoring & analytics for REST APIs built with Express, Fastify, NestJS, AdonisJS, Hono, H3, Elysia, Hapi, and Koa.

24 lines (21 loc) 818 B
import { ApitallyConsumer, ApitallyConfig } from '../common/types.js'; import * as h3 from 'h3'; import { H3Event } from 'h3'; import '../common/logging.js'; import 'winston'; import '../common/requestLogger.js'; import 'node:buffer'; import 'node:http'; import '../common/tempGzipFile.js'; declare const REQUEST_TIMESTAMP_SYMBOL: unique symbol; declare const REQUEST_BODY_SYMBOL: unique symbol; declare module "h3" { interface H3EventContext { apitallyConsumer?: ApitallyConsumer | string; [REQUEST_TIMESTAMP_SYMBOL]?: number; [REQUEST_BODY_SYMBOL]?: Buffer; } } declare const apitallyPlugin: (options: ApitallyConfig) => h3.H3Plugin; declare function setConsumer(event: H3Event, consumer: ApitallyConsumer | string | null | undefined): void; export { apitallyPlugin, setConsumer };