/** * The parent type of all PCM items (projects, geometries, environments, * materials, etc.). */ export interface PcmItem { /** * The id of the item. * * Guaranteed to be unique and not change over time. */ id: string; /** * The human-readable display name of the item. */ displayName: string; /** * A description of the item. */ description?: string; /** * Tags for the item. */ tags: string[]; /** * Flags for the item. * * TODO: Remove when permission system is in place */ flags: string[]; /** * The category of the item. */ category: PcmItemCategory; /** * @internal * * List of additional files that are linked to the item (e.g. thumbnails and manuals). */ files: PcmItemFile[]; /** * @internal */ accessRight: PermissionRole; /** * The date at which the item was created */ creationDate: Date; /** * The id of the parent folder containing this item. */ parentFolderId?: string; } /** @internal */ export interface PcmItemFile { /** * The name of the file. */ name: string; type: string; description?: string; extension: string; url: string; creationDate: Date; } /** * A category for PCM items for grouping in the UI. */ export interface PcmItemCategory { /** * A unique id for the category. */ id: string; /** * The human-readable name of the category. */ name: string; /** * An optional description of the category. */ description?: string; /** * The order priority of the category. * * Categories with a higher priority are meant to be displayed first. */ orderPriority: number; } /** * @internal The item how it is returned by the PCM api. */ export interface NativePcmItem { id: string; name: string; description: string | null | undefined; tags: string[]; flags: string[]; category: NativePcmCategory; files: NativePcmItemFile[]; access_right?: PermissionRole; /** Date formatted string */ creation_date: string; parent_folder_uuid?: string; } interface NativePcmItemFile { name: string; type: string; description?: string; extension: string; url: string; creation_date: string; } interface NativePcmCategory { id: string; name: string; description: string | null; order_priority: number; } /** * @internal */ export declare enum PermissionRole { /**Implicit role if the item is no longer available*/ NONE = "NONE", /**Read access to the item data*/ USER = "USER", /**Full access to the item*/ OWNER = "OWNER", /** Should only be displayed but usage should be forbidden. */ TEASER = "TEASER" } /** * Checks if the given object is a PcmItem. * * @param obj The object to check. * @returns True if the object is a PcmItem, false otherwise. */ export declare function isPcmItem(obj: unknown): obj is PcmItem; /** @internal */ export declare const mapNativePcmItemToPcmItem: (item: NativePcmItem) => PcmItem; export {};