import { Environment } from '../contexts/EnvironmentContext'; export declare const toSearchString: (query: Record) => string; export declare const checkForSpecialCharacters: (domain: string) => boolean; export declare const createCurlVariables: (req: { query_data: string[]; header_data: string[]; json: JSON; path_data: string; url: string; method: string; }) => { query: string; headers: string[]; headerParams: string[]; }; export declare const buildEndpointUrl: (ep: string, environment: Environment) => string; export declare const findKey: (previousState: { [key: number]: string; }, name: string, fieldValue: string, entryType: string) => {}; export declare const introspect: (req: { query_data: string[]; header_data: string[]; json: JSON; path_data: string; url: string; method: string; }, restEndpoint: string) => string; export declare function isPublicEndpoint(ep: string, environment: Environment): boolean; export declare function isJsonString(str: string): boolean; export declare function isValidHttpUrl(string: string): boolean; export declare const removeQueryParams: (url: string) => string; /** * Sanitize callback URL to avoid open redirect to 3rd party origins. * - a valid relative URL => return it as is * - a valid absolute URL on the current origin => return it as a relative URL * - all other cases => return `/` * * @param callbackPath relative or absolure URL * @returns a relative URL that is safe to use in `router.push()` */ export declare const makeSafeCallbackPath: (callbackPath: string) => string; export declare const validateIPaddress: (ipaddress: string) => boolean; /** * Map a zenserv domain to a dashboard domain (intended to automatically * redirect from dashboard.ibm.stepzen.com to region-specific domains in * production). * * @param domain zenserv domain, e.g. `us-east-a.ibm.stepzen.net` * @returns dashboard domain, e.g. `us-east-a.dashboard.ibm.stepzen.com` or * `undefined` if no match is found (which implies the current * dashboard domain is just fine) */ export declare const parseJsonOrDefault: (jsonString: string | null | undefined, defaultValue: T) => T;