@aikidosec/firewall
Version:
Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks
20 lines (19 loc) • 591 B
TypeScript
import { Context } from "../Context";
import { APIAuthType } from "./getApiAuthType";
import { BodyDataType } from "./getBodyDataType";
import { DataSchema } from "./getDataSchema";
export type APISpec = {
body?: APIBodyInfo;
query?: DataSchema;
auth?: APIAuthType[];
};
type APIBodyInfo = {
type: BodyDataType;
schema: DataSchema;
};
/**
* Get body data type and schema from context.
* Returns undefined if the body is not an object or if the body type could not be determined.
*/
export declare function getApiInfo(context: Context): APISpec | undefined;
export {};