import { CoreEntity } from '@grandlinex/core'; import { SKey, SSchemaEl, SSchemaElObj } from '../Meta/SwaggerTypes.js'; export type ESchemaAddOption = { key: string; list?: boolean; entity?: CoreEntity; schema?: SSchemaEl; required?: boolean; nullable?: boolean; }; export declare class ESchemaEditor { private data; private name; private constructor(); /** * Removes the specified keys from the schema's properties and updates the required list. * * @param {...(keyof T)} keys - The keys of the properties to remove. * @returns {ESchemaEditor} The editor instance for method chaining. */ remove(...keys: (keyof T)[]): ESchemaEditor; /** * Adds properties to the schema based on the provided options. * * @param {...ESchemaAddOption} options The options describing the properties to add. Each option may specify a * `key`, a `schema` or an `entity`, and optionally whether the property is a `list`, `nullable`, or `required`. * @returns {ESchemaEditor} The editor instance for chaining. */ add(...options: ESchemaAddOption[]): ESchemaEditor; getSchema(): SSchemaElObj; getSKeySchema(): SKey; static fromEntity(e: J): ESchemaEditor; /** * Generates a JSON schema representation from a CoreEntity instance. * * This method inspects the entity's metadata to construct a schema object * describing the entity's shape. The resulting schema contains: * - `type`: always `"object"`. * - `description`: a string indicating the entity name. * - `required`: an array of property names that are defined on the entity. * - `properties`: an object mapping each property name to an object that * includes the resolved database type and its nullability. * * If no metadata is found for the provided entity, the method returns `undefined`. * * @param {T} entity - The entity instance for which to create a schema. * @returns {SSchemaElObj | undefined} The generated schema object, or `undefined` * if the entity's metadata could not be retrieved. */ static schemaFromEntity(entity: T): SSchemaElObj | undefined; }