import type { Internal, Struct } from '@strapi/types'; import type { SchemaHandler } from './schema-builder/schema-handler'; /** * Formats a component attributes */ export declare const formatComponent: (component: any) => { uid: any; category: any; apiId: any; schema: { displayName: any; description: any; icon: any; connection: any; collectionName: any; pluginOptions: any; attributes: any; }; }; /** * Creates a component and handle the nested components sent with it */ export declare const createComponent: ({ component, components, }: any) => Promise>; /** * A component in a Content-Type Builder payload: the `info` fields sit at the top level, * unlike the loaded `Struct.ComponentSchema`. */ export type ComponentInput = { category: string; displayName: string; icon?: string; description?: string; options?: Struct.SchemaOptions; pluginOptions?: Struct.SchemaPluginOptions; collectionName?: string; attributes: Record; }; /** * A component sent along with the edited one: an existing component to update (by `uid`), * or a new one with a temporary uid that attributes in the same payload can reference. */ export type NestedComponentInput = ComponentInput & ({ uid: Internal.UID.Component; tmpUID?: never; } | { tmpUID: string; uid?: never; }); export type ComponentToCreate = { component: ComponentInput; components?: NestedComponentInput[]; }; export declare const editComponent: (uid: Internal.UID.Component, { component, components }: ComponentToCreate) => Promise>; export declare const deleteComponent: (uid: Internal.UID.Component) => Promise; //# sourceMappingURL=components.d.ts.map