import type { HttpContext } from '@adonisjs/core/http'; export declare const ODataResponseFormat: ("json" | "xml")[]; export type ODataResponseFormat = (typeof ODataResponseFormat)[number]; export declare const negotiateContent: (ctx: HttpContext, fallback?: ODataResponseFormat) => ODataResponseFormat; export declare const ODataMetadataLevel: ("full" | "minimal" | "none")[]; export type ODataMetadataLevel = (typeof ODataMetadataLevel)[number]; export declare const negotiateMetadata: (ctx: HttpContext, fallback?: ODataMetadataLevel) => ODataMetadataLevel; export declare const ODataPreference: ("minimal" | "representation")[]; export type ODataPreference = (typeof ODataPreference)[number]; export declare const negotiatePreference: (ctx: HttpContext, fallback?: ODataPreference) => ODataPreference; /** * Negotiates the OData JSON `IEEE754Compatible` format parameter for a request. * * Per OData JSON §3.2, when `IEEE754Compatible=true` is negotiated, `Edm.Int64` * and `Edm.Decimal` values MUST be serialized as JSON strings (to preserve * precision in JavaScript / Power BI / Excel); when `false`, they are * serialized as JSON numbers. The server MUST NOT advertise a parameter it * does not actually conform to — mismatching the advertised parameter and the * actual payload is what triggers the Power BI * `DataSource.Error: Cannot convert a value to target type 'Edm.Int64' because * of conflict between input format string/number and parameter * 'IEEE754Compatible' false/true`. * * The fallback defaults to `false` (the OData spec default when the client * omits the parameter). Power BI and other OData clients that do not * explicitly request `IEEE754Compatible=true` reject unsolicited `=true` * responses — they expect JSON numbers for `Edm.Int64` / `Edm.Decimal` and * choke on strings they did not ask for. The controller's reverse-coercion * helper (`coerceIeee754NumericValues`) converts node-postgres `bigint` / * `numeric` string values back to JSON numbers when `=false`, so the wire * format stays consistent with the advertised parameter. Clients that * explicitly request `=true` via `Accept` / `$format` still get string * serialization. */ export declare const negotiateIeee754Compatible: (ctx: HttpContext, fallback?: boolean) => boolean;