"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.selectableRuntimeSchema = exports.metricResponseSchema = void 0;
const dateSchema = { type: 'string', format: 'date-time' };
const memoryDataPointSchema = {
    type: 'object',
    additionalProperties: false,
    properties: {
        date: dateSchema,
        rss: { type: 'number' },
        totalHeap: { type: 'number' },
        usedHeap: { type: 'number' },
        newSpace: { type: 'number' },
        oldSpace: { type: 'number' }
    },
    required: ['date', 'rss', 'totalHeap', 'usedHeap', 'newSpace', 'oldSpace']
};
const cpuDataPointSchema = {
    type: 'object',
    additionalProperties: false,
    properties: {
        date: dateSchema,
        cpu: { type: 'number' },
        eventLoop: { type: 'number' }
    },
    required: ['date', 'cpu', 'eventLoop']
};
const latencyDataPointSchema = {
    type: 'object',
    additionalProperties: false,
    properties: {
        date: { type: 'string', format: 'date-time' },
        p90: { type: 'number' },
        p95: { type: 'number' },
        p99: { type: 'number' }
    },
    required: ['date', 'p90', 'p95', 'p99']
};
const requestDataPointSchema = {
    type: 'object',
    additionalProperties: false,
    properties: {
        date: { type: 'string', format: 'date-time' },
        count: { type: 'number' },
        rps: { type: 'number' }
    },
    required: ['date', 'count', 'rps']
};
exports.metricResponseSchema = {
    type: 'object',
    additionalProperties: false,
    properties: {
        dataMem: { type: 'array', items: memoryDataPointSchema },
        dataCpu: { type: 'array', items: cpuDataPointSchema },
        dataLatency: { type: 'array', items: latencyDataPointSchema },
        dataReq: { type: 'array', items: requestDataPointSchema }
    },
    required: ['dataMem', 'dataCpu', 'dataLatency', 'dataReq']
};
exports.selectableRuntimeSchema = {
    type: 'object',
    additionalProperties: false,
    properties: {
        pid: {
            type: 'integer'
        },
        cwd: {
            type: 'string'
        },
        argv: {
            type: 'array',
            items: {
                type: 'string'
            }
        },
        uptimeSeconds: {
            type: 'number'
        },
        execPath: {
            type: 'string'
        },
        nodeVersion: {
            type: 'string'
        },
        projectDir: {
            type: 'string'
        },
        packageName: {
            type: 'string'
        },
        packageVersion: {
            type: 'string'
        },
        url: {
            type: 'string'
        },
        platformaticVersion: {
            type: 'string'
        },
        selected: {
            type: 'boolean'
        }
    },
    required: [
        'pid',
        'cwd',
        'argv',
        'uptimeSeconds',
        'execPath',
        'nodeVersion',
        'projectDir',
        'packageName',
        'packageVersion',
        'url',
        'platformaticVersion',
        'selected'
    ]
};
//# sourceMappingURL=index.js.map