import { Context } from '../enums/context.js'; export declare class ClientManager { private static INSTANCE; private host; private readonly clientHosts; /** * defined prefixes for items, that should have trailing slash * we need to define library's prefix from the client */ private readonly itemPrefixes; private constructor(); static getInstance(): ClientManager; /** * Define default host * @param host URL string that should have a trailing slash * @returns instance */ setHost(host: string): this; /** * Add a specific host for given context. A context cannot have its host set twice. * @param {Context} context * @param {URL} host * @returns instance */ addHost(context: Context, host: string): this; private getBase; /** * Get URL by context * @param {Context} context * @param {string} path subpath, that should not start with slash * @param qs query strings to be added to the url * @returns url */ getURLByContext(context: Context, path?: string, qs?: { [key: string]: string | number | boolean; }): URL; /** * Get link string by context * @param {Context} context * @param {string} path subpath, that should not start with slash * @param qs query strings to be added to the url * @returns url string */ getLinkByContext(context: Context, path?: string, qs?: { [key: string]: string | number | boolean; }): string; /** * Get URL to access an item by context * @param {Context} context * @param {string} itemId id of the item to build the URL for * @param qs query strings to be added to the url * @returns url */ getItemAsURL(context: Context, itemId: string, qs?: { [key: string]: string | number | boolean; }): URL; /** * Get link string to access an item by context * @param {Context} context * @param {string} itemId id of the item to build the URL for * @param qs query strings to be added to the url * @returns url string */ getItemLink(context: Context, itemId: string, qs?: { [key: string]: string | number | boolean; }): string; /** * Get context given the link string * @param {string} link url to get the context from * @returns context */ getContextByLink(link: string): `${Context}`; }