import { AnyObj, Class } from '@ditsmod/core';
import { SchemaObject, SchemaObjectType, XEncodingObject, XMediaTypeObject, XSchemaObject } from '@ts-stack/openapi-spec';
import { AnyEnum, CustomType } from '#decorators/property.js';
import { mediaTypeName } from '#types/media-types.js';
export interface ContentOptions<T extends mediaTypeName = mediaTypeName> {
    mediaType: T;
    mediaTypeParams?: string;
    model?: Class<AnyObj>;
    /**
     * A map between a property name and its encoding information. The key, being the property name,
     * MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody`
     * objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
     */
    encoding?: {
        [encodingName: string]: XEncodingObject;
    };
}
export declare class Content {
    protected content: {
        [mediaTypeName: string]: XMediaTypeObject;
    };
    protected scanInProgress: WeakSet<WeakKey>;
    protected standartTypes: (ArrayConstructor | ObjectConstructor | BooleanConstructor | NumberConstructor | StringConstructor)[];
    protected standartTypesStrings: string[];
    /**
     * Sets media type.
     */
    set<T extends mediaTypeName = mediaTypeName>(contentOptions: ContentOptions<T>): this;
    get<T extends mediaTypeName = mediaTypeName>(contentOptions?: ContentOptions<T>): {
        [mediaTypeName: string]: XMediaTypeObject;
    };
    protected getSchema(model: Class<AnyObj>): SchemaObject;
    /**
     * Sets minimum properties for the model's schema:
     * - `type` if it's standart model (Boolean, Number, String, Array, Object);
     * - init empty `items` and `properties` if it's suitable.
     */
    protected getSchemaStubForModel(model: Class<AnyObj>): SchemaObject;
    protected checkTypeDefinitionConflict(modelName: string, property: string, propertyType: Class<AnyObj>, type?: SchemaObjectType | SchemaObjectType[], customType?: CustomType): void;
    protected setRequiredProperties(parentSchema: SchemaObject, propertyName: string, schema?: XSchemaObject): void;
    protected fillPropertySchema(model: Class<AnyObj>, propertyType: Class<AnyObj>, originPropertySchema?: XSchemaObject, customType?: CustomType): SchemaObject;
    /**
     * @todo Refactor this.
     */
    protected fillItems(model: Class<AnyObj>, propertySchema: SchemaObject, customType?: CustomType): void;
    /**
     * @todo Refactor this.
     */
    protected checkCircularRefAndFillItems(modelName: string, propertySchema: SchemaObject, customItem: Class<AnyObj>, whatIs: 'array' | 'object'): void;
    protected fillEnum(schema: SchemaObject, enumModel: AnyEnum | AnyEnum[]): void;
}
export declare function getContent<T extends mediaTypeName = mediaTypeName>(contentOptions?: ContentOptions<T>): {
    [mediaTypeName: string]: XMediaTypeObject;
};
//# sourceMappingURL=content.d.ts.map