@k-msg/analytics 0.27.2 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +40 -40
- package/dist/index.mjs +40 -40
- package/dist/types/analytics.types.d.ts +35 -35
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "zod/mini";
|
|
2
2
|
export interface AnalyticsConfig {
|
|
3
3
|
enableRealTimeTracking: boolean;
|
|
4
4
|
retentionDays: number;
|
|
@@ -102,62 +102,62 @@ export interface AnalyticsResult {
|
|
|
102
102
|
};
|
|
103
103
|
insights?: InsightData[];
|
|
104
104
|
}
|
|
105
|
-
export declare const MetricDataSchema: z.
|
|
106
|
-
id: z.
|
|
107
|
-
type: z.
|
|
108
|
-
timestamp: z.
|
|
109
|
-
value: z.
|
|
110
|
-
dimensions: z.
|
|
111
|
-
metadata: z.
|
|
105
|
+
export declare const MetricDataSchema: z.ZodMiniObject<{
|
|
106
|
+
id: z.ZodMiniString<string>;
|
|
107
|
+
type: z.ZodMiniEnum<typeof MetricType>;
|
|
108
|
+
timestamp: z.ZodMiniDate<Date>;
|
|
109
|
+
value: z.ZodMiniNumber<number>;
|
|
110
|
+
dimensions: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
111
|
+
metadata: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
112
112
|
}, z.core.$strip>;
|
|
113
|
-
export declare const AnalyticsQuerySchema: z.
|
|
114
|
-
metrics: z.
|
|
115
|
-
dateRange: z.
|
|
116
|
-
start: z.
|
|
117
|
-
end: z.
|
|
113
|
+
export declare const AnalyticsQuerySchema: z.ZodMiniObject<{
|
|
114
|
+
metrics: z.ZodMiniArray<z.ZodMiniEnum<typeof MetricType>>;
|
|
115
|
+
dateRange: z.ZodMiniObject<{
|
|
116
|
+
start: z.ZodMiniDate<Date>;
|
|
117
|
+
end: z.ZodMiniDate<Date>;
|
|
118
118
|
}, z.core.$strip>;
|
|
119
|
-
interval: z.
|
|
119
|
+
interval: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
120
120
|
minute: "minute";
|
|
121
121
|
hour: "hour";
|
|
122
122
|
day: "day";
|
|
123
123
|
week: "week";
|
|
124
124
|
month: "month";
|
|
125
125
|
}>>;
|
|
126
|
-
filters: z.
|
|
127
|
-
groupBy: z.
|
|
128
|
-
orderBy: z.
|
|
129
|
-
field: z.
|
|
130
|
-
direction: z.
|
|
126
|
+
filters: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
127
|
+
groupBy: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
128
|
+
orderBy: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
129
|
+
field: z.ZodMiniString<string>;
|
|
130
|
+
direction: z.ZodMiniEnum<{
|
|
131
131
|
asc: "asc";
|
|
132
132
|
desc: "desc";
|
|
133
133
|
}>;
|
|
134
134
|
}, z.core.$strip>>>;
|
|
135
|
-
limit: z.
|
|
136
|
-
offset: z.
|
|
135
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
136
|
+
offset: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
137
137
|
}, z.core.$strip>;
|
|
138
|
-
export declare const InsightDataSchema: z.
|
|
139
|
-
id: z.
|
|
140
|
-
type: z.
|
|
138
|
+
export declare const InsightDataSchema: z.ZodMiniObject<{
|
|
139
|
+
id: z.ZodMiniString<string>;
|
|
140
|
+
type: z.ZodMiniEnum<{
|
|
141
141
|
anomaly: "anomaly";
|
|
142
142
|
trend: "trend";
|
|
143
143
|
recommendation: "recommendation";
|
|
144
144
|
}>;
|
|
145
|
-
title: z.
|
|
146
|
-
description: z.
|
|
147
|
-
severity: z.
|
|
145
|
+
title: z.ZodMiniString<string>;
|
|
146
|
+
description: z.ZodMiniString<string>;
|
|
147
|
+
severity: z.ZodMiniEnum<{
|
|
148
148
|
low: "low";
|
|
149
149
|
medium: "medium";
|
|
150
150
|
high: "high";
|
|
151
151
|
critical: "critical";
|
|
152
152
|
}>;
|
|
153
|
-
metric: z.
|
|
154
|
-
dimensions: z.
|
|
155
|
-
value: z.
|
|
156
|
-
expectedValue: z.
|
|
157
|
-
confidence: z.
|
|
158
|
-
actionable: z.
|
|
159
|
-
recommendations: z.
|
|
160
|
-
detectedAt: z.
|
|
153
|
+
metric: z.ZodMiniEnum<typeof MetricType>;
|
|
154
|
+
dimensions: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
155
|
+
value: z.ZodMiniNumber<number>;
|
|
156
|
+
expectedValue: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
157
|
+
confidence: z.ZodMiniNumber<number>;
|
|
158
|
+
actionable: z.ZodMiniBoolean<boolean>;
|
|
159
|
+
recommendations: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
160
|
+
detectedAt: z.ZodMiniDate<Date>;
|
|
161
161
|
}, z.core.$strip>;
|
|
162
162
|
export type MetricDataType = z.infer<typeof MetricDataSchema>;
|
|
163
163
|
export type AnalyticsQueryType = z.infer<typeof AnalyticsQuerySchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k-msg/analytics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"packageManager": "bun@1.3.8",
|
|
5
5
|
"description": "Analytics and reporting engine for message tracking and insights",
|
|
6
6
|
"type": "module",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"publish": "bun publish --access public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@k-msg/core": "0.
|
|
38
|
+
"@k-msg/core": "0.28.0",
|
|
39
39
|
"zod": "^4.0.14",
|
|
40
|
-
"@k-msg/messaging": "0.
|
|
40
|
+
"@k-msg/messaging": "0.28.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"typescript": "^5.7.2",
|