import { IPdfMetadata } from "@aurigma/design-atoms-model/Product/Interfaces/IPdfMetadata"; import { Client } from "./PostMessage/Client"; import { ImageMetaData } from "@aurigma/design-atoms-model/Product/Items"; /** * Allows you to get and set the user ID and PDF metadata of a product at runtime. * @public */ export declare class RuntimeConfiguration { private _postMessageClient; /** @internal */ constructor(_postMessageClient: Client); /** * Reads PDF metadata of the current product. * @returns The `IPdfMetadata` structure with data to be saved in the hi-res output. * @example * ``` js * const data = await editor.configuration.getPdfMetadata() * .catch(error => console.error("Retrieving PDF metadata failed with exception: ", error)); * * console.info("getPdfMetadata returned: " + data.title); * ``` */ getPdfMetadata(): Promise; /** * Sets PDF metadata to the current product. * @param config - PDF metadata to be saved in the hi-res output. * @example * ``` js * editor.configuration.setPdfMetadata({ * author: "John Wood", * title: "Postcard template with flowers", * keywords: "red,flower,postcard" * }) * .catch(error => console.error("setPdfMetadata failed with exception: ", error)); * ``` */ setPdfMetadata(config: IPdfMetadata): Promise; /** * Reads ID of the user working on the product. * @returns The user identifier. * @example * ``` js * let editor = await CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition, config); * console.log(await editor.configuration.getUserId()); * ``` */ getUserId(): Promise; /** * Loads metadata of an image. * @param url - The link to the image. * @param fromDesignImages - If `true`, gets metadata from the design gallery. * @returns Image properties. * @example * ``` js * // Get metadata of an image in the public gallery. * const metaData = await editor.configuration.getImageMetadata("public:backgrounds/azure.jpg"); * ``` */ getImageMetadata(url: string, fromDesignImages?: boolean): Promise; /** * Sets a new user identifier and moves user files to this user's folders. * @remarks Before using this method, you must enable the {@link https://customerscanvas.com/dev/editors/design-editor-web-app/it-ops/config-backend/appsettings.html#SecureModeEnabled|secure mode} and {@link https://customerscanvas.com/dev/editors/design-editor-web-app/apis/auth-tokens.html|update an authentication token} by using the `additionalUserId` parameter with the new user identifier. * @param userId - The new user identifier that needs to be set for the product. * @example * ``` html * * * Setting a new user ID * * * * * * * * * * * * ``` */ setUserId(userId: string): Promise; }