/** * Shared utilities for the Postgres v-next observability domain. * * Differences from the ClickHouse v-next helpers: * - jsonb columns are passed through as native objects/arrays. No * JSON.stringify on the way in or JSON.parse on the way out. * - text[] columns are passed as native arrays. * - Timestamps are sent as ISO strings; the pg driver coerces them. */ import type { CreateFeedbackRecord, CreateLogRecord, CreateMetricRecord, CreateScoreRecord, CreateSpanRecord, FeedbackRecord, LightSpanRecord, LogRecord, MetricRecord, ScoreRecord, SpanRecord } from '@mastra/core/storage'; export declare function normalizeTags(tags: unknown): string[]; export declare function normalizeLabels(labels: Record | null | undefined): Record; export declare function buildMetadataSearch(metadata: Record | null | undefined): Record; export declare function toDate(value: unknown): Date; export declare function toDateOrNull(value: unknown): Date | null; export declare function toIsoOrDate(value: Date | number | string): Date | string; export declare function spanRecordToRow(span: CreateSpanRecord): Record; export declare function rowToSpanRecord(row: Record): SpanRecord; /** * Build a {@link LightSpanRecord} from a row that projected only the light * column set (see `SPAN_LIGHT_SELECT_COLUMNS` in sql.ts). Used by * `getTraceLight` — the timeline view doesn't need the full span payload. */ export declare function rowToLightSpanRecord(row: Record): LightSpanRecord; export declare function logRecordToRow(log: CreateLogRecord): Record; export declare function rowToLogRecord(row: Record): LogRecord; export declare function metricRecordToRow(metric: CreateMetricRecord): Record; export declare function rowToMetricRecord(row: Record): MetricRecord; export declare function scoreRecordToRow(score: CreateScoreRecord): Record; export declare function rowToScoreRecord(row: Record): ScoreRecord; export declare function feedbackRecordToRow(feedback: CreateFeedbackRecord): Record; export declare function rowToFeedbackRecord(row: Record): FeedbackRecord; //# sourceMappingURL=helpers.d.ts.map