import { ComponentPayload } from '../classes/componentpayload'; import { ProjectFileService } from '../classes/projectfileservice'; /** * Extracts components from a catalog response and saves them to the project file service. * @param componentFilter * * If string -> expected stringified RegExp * * If RegExp -> used as a filter for ids * * If string[] -> used as a list of ids to extract * * If undefined -> all components are extracted * @param projectFileService * @param catalogId * @returns */ export declare function extractComponentsResponse(projectFileService: ProjectFileService, catalogId: string, componentFilter?: string | RegExp | string[] | undefined): ComponentPayload[] | undefined; /** * Finds a component in the catalog components and extracts its payload. * If the component is not found, it returns undefined. * @param catalogComponents * @param componentId * @returns undefined if fail, otherwise returns the ComponentPayload * @throws Error if no components provided */ export declare function extractComponentPayloadFromResponse(catalogComponent: any): ComponentPayload | undefined; /** * Extracts items from a catalog response and saves them to the project file service. * @param componentFilter * * If string -> expected stringified RegExp * * If RegExp -> used as a filter for ids * * If string[] -> used as a list of ids to extract * * If undefined -> all components are extracted * @param projectFileService * @param catalogId */ export declare function extractItemsResponse(projectFileService: ProjectFileService, catalogId: string, componentFilter?: string | RegExp | string[] | undefined): any[] | undefined; /** * There are some legacy properties in the material json that are not needed anymore. * This function will remove them. * @param material the object to modify */ export declare function cleanupMaterialJson(material: any): void; export declare const THIS_MATERIAL = "@material"; export declare const LOCAL_DOWNLOADED_THUMBNAIL_ATTRIBUTE_NAME = "localThumbnail"; export declare const THUMBNAIL_FILENAME = "thumbnail"; export declare function extractMaterialsResponse(projectFileService: ProjectFileService, catalogId: string, materialFilter?: string | RegExp | string[] | undefined, downloadTextures?: boolean): Promise;