import { NativePcmItem, PcmItem } from "./item.js"; /** * A material from the PCM. */ export interface PcmMaterial extends PcmItem { /** * A unique but human-readable alias of the material. */ alias?: string; /** * A preview color for the material. */ previewColor: string; /** * Whether or not the material is a varnish material. * * A varnish material can produce pseudo-embossing by coating the surface. * Debossing is not possible. */ isVarnishMaterial: boolean; /** * Whether or not the material is a surface material. * * A surface material may only be used to set a surface material with the * #setSurfaceMaterial(...) method. It cannot be used as a layer material. */ isSurfaceMaterial: boolean; /** * Whether or not the material is a printing material. * * When it is, the layer texture is always printed on top of the material * and it is not possible to enable content overprinting (but color * overprinting is possible). */ isPrintingMaterial: boolean; /** * Wether or not the material can be overprinted with an image. */ supportsOverprintContent: boolean; /** * Wether or not the material can be combined with a pattern embossing. */ supportsPatternEmbossing: boolean; /** * Whether or not the material can be overprinted with a color. */ supportsOverprintColor: boolean; /** * If the material supports overprinting with color, how is the color applied? * * `tint` will apply the color as a tint whereas `opaque` will apply the color * as an opaque color (i.e. you won't see an image below). * * `none` if overprinting is not supported at all. */ overprintMode: "tint" | "opaque" | "none"; /** * The definition required to render the material. */ definition: unknown; } /** * @internal The material how it is returned by the PCM api. */ export interface NativePcmMaterial extends NativePcmItem { alias?: string; previewColor: string; definition: unknown; } /** * A subset of the PcmMaterial interface but only containing the properties * that are required to render the material. */ export type PcmMaterialMinimalData = Pick; /** * Checks if the given object is a PcmMaterial. * * @param obj The object to check. * @returns True if the object is a PcmMaterial, false otherwise. */ export declare function isPcmMaterial(obj: unknown): obj is PcmMaterial; /** * Checks if the given object is a PcmMaterialMinimalData. * * @param obj The object to check. * @returns True if the object is a PcmMaterialMinimalData, false otherwise. */ export declare function isPcmMaterialMinimalData(obj: unknown): obj is PcmMaterialMinimalData; /** * Gets a list with all available materials. * * @param auth The authorisation information. * @param baseUrl The base url. * @returns A list with all available materials. */ export declare function getMaterials(auth?: import("../methods/auth.js").Auth, baseUrl?: string): Promise; /** * Gets an material by its id. * * Using the id is not filtered (e.g., permissions, deprecations, etc.) and may * return elements that are not returned by {@link getMaterials}. * * @param id The id of the material. * @param auth The authorisation information. * @param baseUrl The base url. * @returns The material with the given id or undefined if no material with the * given id exists. */ export declare function getMaterialById(id: string, auth?: import("../methods/auth.js").Auth, baseUrl?: string): Promise; /** * @internal * Maps a native pcm material (as it is returned by the PCM API) to the * interface used for the user-facing definition. * * @param material The native material. * @returns The library pcm material. */ export declare function mapNativePcmMaterial(material: NativePcmMaterial): PcmMaterial; /** * Returns the underlying base color of a given material * @param material * @returns */ export declare function getMaterialBaseColor(material: PcmMaterial): { /** Red channel. Value Range: `0-255` */ r: number; /** Green channel. Value Range: `0-255` */ g: number; /** Blue channel. Value Range: `0-255` */ b: number; };