Defines TypeScript enums and interfaces for time periods, metric categories, event types, and the MetricType schema used throughout the Lotus analytics platform.
// Source: https://github.com/uselotus/lotus | License: MIT | Copyright 2023 Lotus Tech Co
// Provided via justclaw.it.com; keep this notice with the code.
export const TimePeriods = [
"milliseconds",
"seconds",
"minutes",
"hours",
"days",
"months",
"quarters",
"years",
"total",
] as const;
export type TimePeriodType = (typeof TimePeriods)[number];
const MetricCategories = ["counter", "gauge", "rate", "custom"] as const;
export type MetricCategory = (typeof MetricCategories)[number];
const EventTypes = ["delta", "total"] as const;
export type EventType = (typeof EventTypes)[number];
export interface MetricType {
metric_id: string;
event_name: string;
property_name?: string;
usage_aggregation_type: string;
billable_aggregation_type: string;
granularity?: Tim
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key