import type { Request, RequestHandler } from "express"; import type { AnyParameters } from "../shared"; import type { P2pBillsApi } from "./bills.api"; import type { BillStatusNotificationBody } from "./p2p.types"; type Promisify = T extends Promise ? T : Promise; type AnyCallableFunction = (...parameters: AnyParameters) => unknown; type PromisifyReturnType = Promisify>; type PromiseWrappedFunction = (...parameters: Parameters) => PromisifyReturnType; /** * @template {AnyCallableFunction} T * * @param {T} callable * @return {PromiseWrappedFunction} */ export declare function promise(callable: T): PromiseWrappedFunction; /** * * * @template T * @param {Request} request * @return {Promise} Promise */ export declare function parseJsonRequestBody(request: Request): Promise; export type BillRequestHandler = RequestHandler, any, BillStatusNotificationBody>; export type MiddlewareOptions = { memo?: boolean; memoTime?: number; }; /** * * * @param {(string | string[] | undefined)} value * @return {string} string */ export declare function resolveHeaderValue(value?: string | string[] | undefined): string; /** * * * @export * @param {P2pBillsApi} bills * @param {MiddlewareOptions} [options={}] * @param {BillRequestHandler} [handler] * @return {BillRequestHandler} BillRequestHandler */ export declare function createP2pNotificationMiddleware(bills: P2pBillsApi, options?: MiddlewareOptions, handler?: BillRequestHandler): BillRequestHandler; export {};