import Log from "./Log";
import Metric from "./Metric";
import MetricItemAggMV1m from "./MetricItemAggMV1m";
import MetricItemAggMV1mByHostV2 from "./MetricItemAggMV1mByHostV2";
import MetricBaselineHourly from "./MetricBaselineHourly";
import Span from "./Span";
import ExceptionInstance from "./ExceptionInstance";
import MonitorLog from "./MonitorLog";
import Profile from "./Profile";
import ProfileSample from "./ProfileSample";
import AuditLog from "./AuditLog";
const AnalyticsModels = [
    Log,
    Span,
    Metric,
    /*
     * Materialized-view target tables. AggregatingMergeTree engine; rows
     * are populated by attached MVs on `Metric` insert. Read-only.
     */
    MetricItemAggMV1m,
    /*
     * The hostIdentifier-keyed V1 host rollup was dropped by the
     * RekeyMetricHostRollupToEntityKey migration; only V2 is registered so
     * boot-time schema sync doesn't resurrect the dropped V1 table.
     */
    MetricItemAggMV1mByHostV2,
    MetricBaselineHourly,
    ExceptionInstance,
    MonitorLog,
    Profile,
    ProfileSample,
    AuditLog,
];
const modelTypeMap = {};
export const getModelTypeByName = (tableName) => {
    if (modelTypeMap[tableName]) {
        return modelTypeMap[tableName] || null;
    }
    const modelType = AnalyticsModels.find((modelType) => {
        return new modelType().tableName === tableName;
    });
    if (!modelType) {
        return null;
    }
    modelTypeMap[tableName] = modelType;
    return modelType;
};
export default AnalyticsModels;
//# sourceMappingURL=Index.js.map