@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.
@@ -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.ZodObject<{
106
- id: z.ZodString;
107
- type: z.ZodEnum<typeof MetricType>;
108
- timestamp: z.ZodDate;
109
- value: z.ZodNumber;
110
- dimensions: z.ZodRecord<z.ZodString, z.ZodString>;
111
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
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.ZodObject<{
114
- metrics: z.ZodArray<z.ZodEnum<typeof MetricType>>;
115
- dateRange: z.ZodObject<{
116
- start: z.ZodDate;
117
- end: z.ZodDate;
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.ZodOptional<z.ZodEnum<{
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.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
127
- groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
128
- orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
129
- field: z.ZodString;
130
- direction: z.ZodEnum<{
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.ZodOptional<z.ZodNumber>;
136
- offset: z.ZodOptional<z.ZodNumber>;
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.ZodObject<{
139
- id: z.ZodString;
140
- type: z.ZodEnum<{
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.ZodString;
146
- description: z.ZodString;
147
- severity: z.ZodEnum<{
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.ZodEnum<typeof MetricType>;
154
- dimensions: z.ZodRecord<z.ZodString, z.ZodString>;
155
- value: z.ZodNumber;
156
- expectedValue: z.ZodOptional<z.ZodNumber>;
157
- confidence: z.ZodNumber;
158
- actionable: z.ZodBoolean;
159
- recommendations: z.ZodOptional<z.ZodArray<z.ZodString>>;
160
- detectedAt: z.ZodDate;
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.27.2",
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.27.2",
38
+ "@k-msg/core": "0.28.0",
39
39
  "zod": "^4.0.14",
40
- "@k-msg/messaging": "0.27.2"
40
+ "@k-msg/messaging": "0.28.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^5.7.2",