import { AdapterFlags, Context } from "@decaf-ts/core"; export type ResponseParser = = Context>(res: any, ctx: C) => void; /** * @description HTTP configuration type * @summary Configuration type for HTTP connections specifying protocol and host * @typedef {Object} HttpConfig * @property {('http'|'https')} protocol - The HTTP protocol to use * @property {string} host - The host address * @memberOf module:for-http */ export type HttpConfig = { protocol: "http" | "https"; host: string; parsers?: ResponseParser[]; eventsListenerPath?: string; headers?: boolean; events?: boolean; eventHeaderResolver?: () => Promise> | Record; }; /** * @description HTTP flags interface * @summary Interface extending RepositoryFlags with HTTP-specific options * @interface HttpFlags * @property {Record} [headers] - Optional HTTP headers to include with requests * @memberOf module:for-http */ export interface HttpFlags extends AdapterFlags { headers?: Record; }