import type { Helper } from "../helper-registry.js"; /** * Encode a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. * * @example * {{encodeURIComponent test.name}} * * * * @param {unknown} str - The un-encoded string from test data or CTRF report. * @returns {string} The encoded string for use in URLs or test report links. * * Use this helper to safely include test names or suite names in URLs in CTRF HTML reports. */ export declare const encodeURIComponentHelper: Helper; /** * Escape the given string by replacing characters with escape sequences. Useful for allowing the string to be used in a URL, etc. * * @example * {{escapeUrl test.name}} * * * * @param {unknown} str - The string to escape from test data or CTRF report. * @returns {string} Escaped string for use in URLs or test report links. * * Use this helper to escape file paths or test names for safe URL usage in CTRF reports. */ export declare const escapeUrlHelper: Helper; /** * Decode a Uniform Resource Identifier (URI) component. * * @example * {{decodeURIComponent encodedName}} * * * * @param {unknown} str - The encoded string from test data or CTRF report. * @returns {string} The decoded string for display in test reports. * * Use this helper to display decoded test names or suite names from URLs in CTRF HTML reports. */ export declare const decodeURIComponentHelper: Helper; /** * Take a base URL and a href URL, and resolve them as a browser would for an anchor tag. * * @example * {{resolveUrl baseUrl href}} * * * * @param {unknown} base - The base URL (e.g., test report root). * @param {unknown} href - The href to resolve (e.g., relative path to resource). * @returns {string} The resolved URL for use in test report links. * * Use this helper to generate absolute links to test artifacts in CTRF HTML reports. */ export declare const resolveUrlHelper: Helper; /** * Strip the query string from the given URL. * * @example * {{stripQueryString url}} * * * * @param {unknown} url - The URL to strip query string from. * @returns {string} The URL without the query string, for clean display in test reports. * * Use this helper to display clean URLs in CTRF HTML reports, omitting query parameters. */ export declare const stripQueryStringHelper: Helper; /** * Strip protocol from a URL. Useful for displaying media that may have an 'http' protocol on secure connections. * * @example * * {{stripProtocol url}} * * * @param {unknown} str - The URL string to strip protocol from. * @returns {string} The URL with http/https protocol stripped, for use in test report links. * * Use this helper to display protocol-relative URLs in CTRF HTML reports for compatibility with both http and https. */ export declare const stripProtocolHelper: Helper; export declare const urlHelpers: Helper[];