import type { CommonHttpClientFetchResponseBody } from "api-typescript-generator/openapi-client"; /** * Minimal response type compatible with both native fetch and Forge API responses. */ export interface AnyResponse { ok: boolean; status: number; statusText: string; headers: { get(key: string): string | null; has(key: string): boolean; forEach(callbackfn: (value: string, key: string) => void): void; }; text(): Promise; arrayBuffer(): Promise; } /** * The product name of the Atlassian product instance. */ export type AtlassianProductName = "jira" | "confluence"; export declare const contentTypeHeaderName = "content-type"; /** * Atlassian API Endpoints contradict HTTP specification by returning empty body for JSON responses. * This response body is used as a fallback for such cases. */ export declare const emptyJsonResponseBody: CommonHttpClientFetchResponseBody; /** * Checks if the provided media type is JSON. */ export declare const isJsonMediaType: (mediaType: string) => boolean; /** * Helper function to get response body from fetch response. * Checks for empty JSON responses and returns data: null in such cases. */ export declare function getResponseBodyFromFetchResponse(response: AnyResponse): Promise;