import { fhirtypes, utils } from 'fsh-sushi'; import { MasterFisher } from '../utils'; import { ExportableCodeSystem, ExportableExtension, ExportableInstance, ExportableProfile, ExportableValueSet, ExportableAlias } from '../exportable'; export declare function optimizeURL(url: string, aliases: ExportableAlias[], types: utils.Type[], fisher: MasterFisher, makeAlias?: boolean): string; /** * Resolves a URL to a name, if possible; otherwise returns undefined. If the URL resolves to a name, * but the name does not resolve back to the same URL, then return undefined since the name clashes with * a more preferred name. This can happen if a project defines something with the same name as a FHIR * definition. * @param url - the url to resolve * @param types - the allowed types to resolve against * @param fisher - a fisher for finding definitions to use during resolution * @returns {string} the name representing the URL or undefined if it cannot be resolved to a name */ export declare function resolveURL(url: string, types: utils.Type[], fisher: MasterFisher): string | undefined; /** * Gets an alias for a url. If an alias exists, it is used. If no alias exists, an alias is generated * from the url * @param aliases - a map of existing aliases * @param url - the url to get * @param fisher - a fisher for finding definitions to use during resolution * @returns {string | undefined} the name representing the URL or the undefined if no alias exists or can be created */ export declare function resolveAliasFromURL(url: string, aliases: ExportableAlias[]): string | undefined; /** * Gets the element types for a given path in respect to an instance of a FHIR resource. * Returns undefined if it was not able to determine the types (due to missing definitions, etc.). * @param instance - the instance the path relates to * @param path - the path to the element of interest * @param fisher - a fisher to lookup the instance definition * @returns an array of types or undefined if it could not determine the types */ export declare function getTypesForInstancePath(instance: ExportableInstance, path: string, fisher: MasterFisher): fhirtypes.ElementDefinitionType[] | undefined; /** * Gets the element types for a given caret path in respect to a definition and rule path. * Returns undefined if it was not able to determine the types (due to missing definitions, etc.). * @param definition - the profile, extension, valueset, or codesystem the path relates to * @param rulePath - the path to the element of interest to which the caret relates * @param caretPath - the path to the element of interest within the definitional object * @param fisher - a fisher to lookup the necessary definitions * @returns an array of types or undefined if it could not determine the types */ export declare function getTypesForCaretPath(definition: ExportableProfile | ExportableExtension | ExportableValueSet | ExportableCodeSystem, rulePath: string, caretPath: string, fisher: MasterFisher): fhirtypes.ElementDefinitionType[];