/** * Utility class for requesting a specific RDF version from the backend through the Accept header. * * The version is announced with the version media type parameter, as defined by RDF 1.2. */ export declare class RdfVersionUtil { /** * The RDF version the workbench requests from the backend. */ static readonly VERSION = "1.2"; /** * Media types which are not RDF or SPARQL results formats, so the version parameter is meaningless for them. * text/plain is deliberately not here, because it is also the media type of N-Triples. */ private static readonly NON_RDF_MEDIA_TYPES; private static readonly VERSION_PARAM; private static readonly WEIGHT_PARAM; /** * Adds the RDF version parameter to every RDF media range of an Accept header value. * * The parameter is placed right after the media type parameters and before the weight (q), * because anything after the weight is not a media type parameter. Media ranges which already * declare a version and non-RDF media types are left untouched, so calling this more than once is safe. * * @param accept - The Accept header value. May contain several comma-separated media ranges. * @returns The header value with the version added, or the original value if it is empty. * * @example * RdfVersionUtil.withVersion('application/sparql-results+json;q=0.9, *\/*;q=0.8'); * // Returns: 'application/sparql-results+json;version=1.2;q=0.9, *\/*;version=1.2;q=0.8' */ static withVersion(accept: string): string; static withVersion(accept: string | undefined): string | undefined; private static addVersionToMediaRange; }