"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toTypescriptTypeDefinition = exports.schemaStats = exports.SchemaAnalyzer = exports.getSimplifiedSchema = exports.getSchemaPaths = exports.analyzeDocuments = exports.parseSchema = void 0;
const schema_accessor_1 = require("./schema-accessor");
const schema_analyzer_1 = require("./schema-analyzer");
Object.defineProperty(exports, "SchemaAnalyzer", { enumerable: true, get: function () { return schema_analyzer_1.SchemaAnalyzer; } });
const internalToExpanded_1 = require("./schema-converters/internalToExpanded");
const internalToMongoDB_1 = require("./schema-converters/internalToMongoDB");
const internalToStandard_1 = require("./schema-converters/internalToStandard");
const schemaStats = __importStar(require("./stats"));
exports.schemaStats = schemaStats;
const to_typescript_1 = require("./to-typescript");
Object.defineProperty(exports, "toTypescriptTypeDefinition", { enumerable: true, get: function () { return to_typescript_1.toTypescriptTypeDefinition; } });
async function analyzeDocuments(source, options) {
    const internalSchema = (await (0, schema_analyzer_1.getCompletedSchemaAnalyzer)(source, options)).getResult();
    return new schema_accessor_1.InternalSchemaBasedAccessor(internalSchema, {
        internalToStandard: internalToStandard_1.convertInternalToStandard,
        internalToMongoDB: internalToMongoDB_1.convertInternalToMongodb,
        internalToExpanded: internalToExpanded_1.convertInternalToExpanded
    });
}
exports.analyzeDocuments = analyzeDocuments;
async function parseSchema(source, options) {
    return (await (0, schema_analyzer_1.getCompletedSchemaAnalyzer)(source, options)).getResult();
}
exports.parseSchema = parseSchema;
async function getSchemaPaths(source) {
    return (await (0, schema_analyzer_1.getCompletedSchemaAnalyzer)(source)).getSchemaPaths();
}
exports.getSchemaPaths = getSchemaPaths;
async function getSimplifiedSchema(source) {
    return (await (0, schema_analyzer_1.getCompletedSchemaAnalyzer)(source)).getSimplifiedSchema();
}
exports.getSimplifiedSchema = getSimplifiedSchema;
exports.default = parseSchema;
//# sourceMappingURL=index.js.map