import { Time } from '@pawel-up/data-mock/Time.js';
import { IApiAnyShape, IApiArrayShape, IApiDataExample, IApiFileShape, IApiNodeShape, IApiPropertyShape, IApiScalarShape, IApiSchemaShape, IShapeUnion, IApiTupleShape, IApiUnionShape } from '../definitions/Shapes.js';
export interface IShapeRenderOptions {
    /**
     * All selected unions in the current view.
     * When the processor encounter an union it checks this array
     * to pick the selected union.
     * When the selected union cannot be determined it picks the first union.
     */
    selectedUnions?: string[];
    /**
     * Whether to include optional fields into the schema.
     * @default false
     */
    renderOptional?: boolean;
    /**
     * When set it uses the data mocking library to generate the values
     * when examples and default are not set.
     */
    renderMocked?: boolean;
    /**
     * The library **always** uses default values in the schema.
     * When a default value is not set by default it inserts an empty value for
     * the given data type ('', false, null, random date). When this is set
     * it includes examples in the generated value.
     */
    renderExamples?: boolean;
}
/**
 * A base class for generators that generates a schema from AMF's shape definition.
 */
export declare abstract class ShapeBase {
    opts: Readonly<IShapeRenderOptions>;
    time: Time;
    constructor(opts?: IShapeRenderOptions);
    protected _scalarValue(schema: IApiScalarShape): string | number | boolean | null | undefined;
    /**
     * Checks whether the union represents a scalar + nil which is equivalent
     * to having scalar that is not required.
     *
     * See more about nil values in RAML:
     * https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#nil-type
     *
     * @param union The list of unions in the shape
     */
    protected _isNotRequiredUnion(union: IShapeUnion[]): boolean;
    /**
     * Generates a schema from AMF's shape.
     * @param schema The Shape definition
     * @returns The generated example
     */
    abstract generate(schema: IShapeUnion | IApiPropertyShape<IShapeUnion>): string | number | boolean | null | undefined;
    /**
     * Serializes generated values into the final mime type related form.
     *
     * @returns The generated example
     */
    abstract serialize(value: unknown): string | undefined;
    /**
     * @param example The example to turn into a JS object
     */
    protected abstract _exampleToObject(example?: IApiDataExample): unknown;
    protected abstract _scalarShapeObject(schema: IApiScalarShape): unknown;
    protected abstract _nilShapeObject(schema: IApiScalarShape): unknown;
    protected abstract _nodeShapeObject(schema: IApiNodeShape): unknown;
    protected abstract _unionShapeObject(schema: IApiUnionShape): unknown;
    protected abstract _fileShapeObject(schema?: IApiFileShape): unknown;
    protected abstract _schemaShapeObject(schema?: IApiSchemaShape): unknown;
    protected abstract _arrayShapeObject(schema: IApiArrayShape): unknown;
    protected abstract _tupleShapeObject(schema?: IApiTupleShape): unknown;
    protected abstract _anyShapeObject(schema: IApiAnyShape): unknown;
    protected abstract _propertyShapeObject(schema: IApiPropertyShape): unknown;
}
//# sourceMappingURL=ShapeBase.d.ts.map