import { Id } from '../classes/id'; /** * Gets a list of all componentIds from a JSON configuration that is an object or stringified JSON. * @param configuration JSON configuration object or string. If a string, it will be parsed as JSON. * @returns */ export declare function getComponentIdsFromConfiguration(configuration: string | any): string[]; /** * Useful for retrieving a configuration from an object that is an item definition. * jsonConfiguration, if available, takes precedence over configuration. * Content tool api defines the jsonConfiguration for ease of development. * Actual Rubens configurator only takes the stringified JSON in the configuration property. * @param item item as object * @returns configuration as string or empty string */ export declare function getItemConfigurationAsString(item: any): string; /** * Ensures an asset object has the requested IDs, optionally mutating or copy. * @param asset Parsed asset object that should receive the catalog/external IDs. * @param intendedId Full ID in the catalog:external format that should be applied when filling or overwriting. * @param overwriteIds When true, always replace existing identifiers with `intendedId`. * @param fillIds When true and `overwriteIds` is false, only fill missing identifiers (leaving existing ones intact). * @param deepCopy When true, the function works on a cloned asset and returns the clone; otherwise it mutates the original. * @returns Asset (original or clone if deep copy is set) with identifiers ensured. */ export declare function fixAssetId(asset: any, intendedId: string | Id, overwriteIds?: boolean, fillIds?: boolean, deepCopy?: boolean): any; /** * jsonConfiguration is for development, configuration for production use. * This function ensures that the item has configuration and/or jsonConfiguration according to the flags. * @param item the item to normalize * @param keepConfiguration if true, keeps/creates the configuration property as stringified JSON * @param keepJsonConfiguration if true, keeps/creates the jsonConfiguration property as object * @param deepCopy if true, makes a deep copy of the configuration object when creating jsonConfiguration; otherwise mutates the same object * @returns if deep copy, the new item; otherwise the same item instance */ export declare function normalizeItemConfiguration(item: any, keepConfiguration: boolean, keepJsonConfiguration: boolean, deepCopy: boolean): any; /** * Useful for retrieving a configuration from an object that is an item definition. * jsonConfiguration, if available, takes precedence over configuration. * Content tool api defines the jsonConfiguration for ease of development. * Actual Rubens configurator only takes the stringified JSON in the configuration property. * @param item item as object * @returns configuration as object or empty object */ export declare function getItemConfigurationAsObject(item: any): any;