import { DeserializedPayload } from '@api-client/core/lib/transformers/PayloadSerializer.js';
/**
 * @param body The body
 * @param charset The optional charset to use with the text decoder.
 */
export declare function ensureBodyString(body: DeserializedPayload, charset?: string): string | undefined;
/**
 * Computes charset value from the `content-type` header.
 * @param contentType Content type header string
 */
export declare function computeCharset(contentType?: string): string | undefined;
/**
 * Reads content-type header from the response headers.
 *
 * @param contentType The value of the content type header
 * @returns When present an array where first item is the content type
 *          and second is charset value. Otherwise empty array.
 */
export declare function readContentType(contentType?: string): string[];
export declare const defaultBinaryTypes: string[];
/**
 * @description Tests whether the content type represents a JSON body.
 * @export
 * @param mime The body mime type.
 * @returns True when the body is a JSON body.
 */
export declare function isJsonBody(mime: string): boolean;
/**
 * Checks whether the content type corresponds to an XML body.
 */
export declare function isXmlBody(mime: string): boolean;
/**
 * Checks whether the content type corresponds to an XML body.
 */
export declare function isPdfBody(mime: string): boolean;
/**
 * Checks whether the content type corresponds to an XML body.
 */
export declare function isBinaryBody(mime: string): boolean;
/**
 * Checks whether the content type represents an image and if so it
 * returns its general type.
 */
export declare function imageBody(mime: string): 'binary' | 'svg' | undefined;
export declare function isTextBody(mime: string): boolean;
//# sourceMappingURL=Payload.d.ts.map