import type { ApiEndpoint, IEndpointInfo } from '../endpoint.js'; import { CallerHooks } from '../hooks.js'; /** * Request Content-Type extension for endpoint. * */ export interface IEndpointInputContentType { /** Endpoint request content-type, if was specified. */ readonly contentType?: string; /** Marks this endpoint with Content-Type request header to be set as 'application/x-www-form-urlencoded'. */ asUrlEncoded(): this; /** Marks this endpoint with Content-Type request header to be set as 'multipart/form-data'. */ asMultipartForm(): this; /** Marks this endpoint with Content-Type request header to be set as 'application/json'. */ asJson(): this; /** Marks this endpoint with Content-Type request header to be set as passed value. */ withContentType(contentType: string): this; } export declare namespace IEndpointInputContentType { const extender: ApiEndpoint.IBuilderExtender; function guard(api: IEndpointInfo): api is (IEndpointInfo & IEndpointInputContentType); function tryApplyContentType(api: IEndpointInfo, headers: Record): void; function createHooks(): CallerHooks; }