import { AnyProperty } from './properties.js'; export declare const MAIN_BASE_TYPES: readonly ["_component", "_experience", "_section", "_page"]; export declare const MEDIA_BASE_TYPES: readonly ["_image", "_media", "_video"]; export declare const OTHER_BASE_TYPES: readonly ["_folder"]; export declare const ALL_BASE_TYPES: readonly ["_component", "_experience", "_section", "_page", "_image", "_media", "_video", "_folder"]; export type BaseTypes = (typeof ALL_BASE_TYPES)[number]; export type MediaStringTypes = (typeof MEDIA_BASE_TYPES)[number]; export type PropertiesRecord = Record; /** A "Base" content type that includes all common attributes for all content types */ type BaseContentType = { key: string; displayName: string; extends?: Contract | Array; properties?: PropertiesRecord; }; /** Represents the required values to be provided to make a Contract type */ export type SuppliedContractValues

= { key: string; displayName: string; properties?: P; }; type InnerContractValues = { isContract: true; __type: 'contract'; }; /** Represents the Contract type in CMS */ export type Contract

= SuppliedContractValues

& InnerContractValues; /** Convert union to intersection type */ type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; /** Extract properties from contracts without distributing */ type ExtractContractProperties = C extends Contract ? P : never; /** Type-level property merging - mirrors the runtime getMergedProps function */ type MergedPropertiesType = ('extends' extends keyof T ? T['extends'] extends Array ? UnionToIntersection> : T['extends'] extends Contract ? P : {} : {}) & ('properties' extends keyof T ? T['properties'] : {}); /** Represents the Page type in CMS */ export type PageContentType = BaseContentType & { baseType: '_page'; mayContainTypes?: Array | '_self' | string>; }; /** Represents the Experience type in CMS */ export type ExperienceContentType = BaseContentType & { baseType: '_experience'; mayContainTypes?: Array | '_self' | string>; }; /** Represents the Folder (Used in the asset panel to organizing content and not in Graph) type in CMS */ export type FolderContentType = BaseContentType & { baseType: '_folder'; mayContainTypes?: Array | '_self' | string>; }; /** Represents the "Component" type (also called "Block") in CMS */ export type ComponentContentType = BaseContentType & { baseType: '_component'; compositionBehaviors?: ('sectionEnabled' | 'elementEnabled')[]; mayContainTypes?: Array | '_self' | string>; }; /** This content type is used only internally */ export type SectionContentType = BaseContentType & { baseType: '_section'; }; /** Represents a "Media" content type (Image, Media, Video) */ export type MediaContentType = BaseContentType & { baseType: MediaStringTypes; }; /** All possible content types */ export type AnyContentType = ComponentContentType | ExperienceContentType | PageContentType | FolderContentType | SectionContentType | MediaContentType; export type ContentType = Omit & { properties: MergedPropertiesType; __type: 'contentType'; }; /** All possible content types for allowed and restricted fields */ export type PermittedTypes = Contract | ContentType | AnyContentType['baseType'] | '_self' | (string & {}); export {};