@mastra/server 1.13.3-alpha.1 → 1.14.0-alpha.2
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/CHANGELOG.md +11 -0
- package/dist/_types/@internal_core/dist/index.d.ts +1333 -0
- package/dist/chunk-2UVJD67W.cjs +136 -0
- package/dist/chunk-2UVJD67W.cjs.map +1 -0
- package/dist/chunk-4VGZOVOI.js +656 -0
- package/dist/chunk-4VGZOVOI.js.map +1 -0
- package/dist/{chunk-A2443FGH.js → chunk-55AD3MAT.js} +24 -18
- package/dist/chunk-55AD3MAT.js.map +1 -0
- package/dist/{observational-memory-XXD6E2SO-RTIRYSYO.cjs → chunk-A6HL3JRC.cjs} +306 -130
- package/dist/chunk-A6HL3JRC.cjs.map +1 -0
- package/dist/{observational-memory-XXD6E2SO-TGAG7QCA.js → chunk-KZAB4IB3.js} +305 -131
- package/dist/chunk-KZAB4IB3.js.map +1 -0
- package/dist/{chunk-SFC2UJ2C.js → chunk-LL5SPRAA.js} +5 -5
- package/dist/{chunk-SFC2UJ2C.js.map → chunk-LL5SPRAA.js.map} +1 -1
- package/dist/chunk-LUHJDABR.cjs +675 -0
- package/dist/chunk-LUHJDABR.cjs.map +1 -0
- package/dist/{chunk-7P6XT5WB.cjs → chunk-OXZCCCIJ.cjs} +28 -22
- package/dist/chunk-OXZCCCIJ.cjs.map +1 -0
- package/dist/chunk-RSIZIEPW.js +131 -0
- package/dist/chunk-RSIZIEPW.js.map +1 -0
- package/dist/{chunk-4AR4SH3H.cjs → chunk-UDDFVPPC.cjs} +6 -6
- package/dist/{chunk-4AR4SH3H.cjs.map → chunk-UDDFVPPC.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/observational-memory-UEDVTWS2-COV6JJZK.js +3 -0
- package/dist/observational-memory-UEDVTWS2-COV6JJZK.js.map +1 -0
- package/dist/observational-memory-UEDVTWS2-TU3KK4ZG.cjs +68 -0
- package/dist/observational-memory-UEDVTWS2-TU3KK4ZG.cjs.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +80 -0
- package/dist/server/handlers/observability-new-endpoints.cjs.map +1 -0
- package/dist/server/handlers/observability-new-endpoints.d.ts +1212 -0
- package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -0
- package/dist/server/handlers/observability-new-endpoints.js +3 -0
- package/dist/server/handlers/observability-new-endpoints.js.map +1 -0
- package/dist/server/handlers/observability-shared.cjs +24 -0
- package/dist/server/handlers/observability-shared.cjs.map +1 -0
- package/dist/server/handlers/observability-shared.d.ts +126 -0
- package/dist/server/handlers/observability-shared.d.ts.map +1 -0
- package/dist/server/handlers/observability-shared.js +3 -0
- package/dist/server/handlers/observability-shared.js.map +1 -0
- package/dist/server/handlers/observability.cjs +78 -5
- package/dist/server/handlers/observability.d.ts +22 -20
- package/dist/server/handlers/observability.d.ts.map +1 -1
- package/dist/server/handlers/observability.js +2 -1
- package/dist/server/handlers.cjs +10 -10
- package/dist/server/handlers.js +3 -3
- package/dist/server/schemas/index.cjs +82 -82
- package/dist/server/schemas/index.js +2 -2
- package/dist/server/server-adapter/index.cjs +43 -24
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.js +25 -6
- package/dist/server/server-adapter/index.js.map +1 -1
- package/dist/server/server-adapter/routes/observability.d.ts +531 -21
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/package.json +6 -5
- package/dist/chunk-3NG2FRSI.js +0 -41
- package/dist/chunk-3NG2FRSI.js.map +0 -1
- package/dist/chunk-5ZBS3CWT.cjs +0 -43
- package/dist/chunk-5ZBS3CWT.cjs.map +0 -1
- package/dist/chunk-7P6XT5WB.cjs.map +0 -1
- package/dist/chunk-A2443FGH.js.map +0 -1
- package/dist/observational-memory-XXD6E2SO-RTIRYSYO.cjs.map +0 -1
- package/dist/observational-memory-XXD6E2SO-TGAG7QCA.js.map +0 -1
|
@@ -0,0 +1,1333 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
|
|
3
|
+
/** Types of entities that can produce observability spans. */
|
|
4
|
+
declare enum EntityType {
|
|
5
|
+
/** Agent/Model execution */
|
|
6
|
+
AGENT = "agent",
|
|
7
|
+
/** Eval */
|
|
8
|
+
EVAL = "eval",
|
|
9
|
+
/** Input Processor */
|
|
10
|
+
INPUT_PROCESSOR = "input_processor",
|
|
11
|
+
/** Input Step Processor */
|
|
12
|
+
INPUT_STEP_PROCESSOR = "input_step_processor",
|
|
13
|
+
/** Output Processor */
|
|
14
|
+
OUTPUT_PROCESSOR = "output_processor",
|
|
15
|
+
/** Output Step Processor */
|
|
16
|
+
OUTPUT_STEP_PROCESSOR = "output_step_processor",
|
|
17
|
+
/** Workflow Step */
|
|
18
|
+
WORKFLOW_STEP = "workflow_step",
|
|
19
|
+
/** Tool */
|
|
20
|
+
TOOL = "tool",
|
|
21
|
+
/** Workflow */
|
|
22
|
+
WORKFLOW_RUN = "workflow_run"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Common DB fields
|
|
26
|
+
*/
|
|
27
|
+
declare const createdAtField: z.ZodDate;
|
|
28
|
+
declare const updatedAtField: z.ZodDate;
|
|
29
|
+
declare const dbTimestamps: {
|
|
30
|
+
readonly createdAt: z.ZodDate;
|
|
31
|
+
readonly updatedAt: z.ZodNullable<z.ZodDate>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Pagination arguments for list queries (page and perPage only)
|
|
35
|
+
* Uses z.coerce to handle string → number conversion from query params
|
|
36
|
+
*/
|
|
37
|
+
declare const paginationArgsSchema: z.ZodObject<{
|
|
38
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
39
|
+
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
/** Input type for pagination arguments (page and perPage). */
|
|
42
|
+
type PaginationArgs = z.input<typeof paginationArgsSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* Pagination response info
|
|
45
|
+
* Used across all paginated endpoints
|
|
46
|
+
*/
|
|
47
|
+
declare const paginationInfoSchema: z.ZodObject<{
|
|
48
|
+
total: z.ZodNumber;
|
|
49
|
+
page: z.ZodNumber;
|
|
50
|
+
perPage: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>;
|
|
51
|
+
hasMore: z.ZodBoolean;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/**
|
|
54
|
+
* Date range for filtering by time
|
|
55
|
+
* Uses z.coerce to handle ISO string → Date conversion from query params
|
|
56
|
+
*/
|
|
57
|
+
declare const dateRangeSchema: z.ZodObject<{
|
|
58
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
59
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
60
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
/** Date range with optional inclusive/exclusive boundaries. */
|
|
64
|
+
type DateRange = z.input<typeof dateRangeSchema>;
|
|
65
|
+
declare const sortDirectionSchema: z.ZodEnum<{
|
|
66
|
+
ASC: "ASC";
|
|
67
|
+
DESC: "DESC";
|
|
68
|
+
}>;
|
|
69
|
+
declare const entityTypeField: z.ZodEnum<typeof EntityType>;
|
|
70
|
+
declare const entityIdField: z.ZodString;
|
|
71
|
+
declare const entityNameField: z.ZodString;
|
|
72
|
+
declare const userIdField: z.ZodString;
|
|
73
|
+
declare const organizationIdField: z.ZodString;
|
|
74
|
+
declare const resourceIdField: z.ZodString;
|
|
75
|
+
declare const runIdField: z.ZodString;
|
|
76
|
+
declare const sessionIdField: z.ZodString;
|
|
77
|
+
declare const threadIdField: z.ZodString;
|
|
78
|
+
declare const requestIdField: z.ZodString;
|
|
79
|
+
declare const environmentField: z.ZodString;
|
|
80
|
+
declare const sourceField: z.ZodString;
|
|
81
|
+
declare const serviceNameField: z.ZodString;
|
|
82
|
+
declare const parentEntityTypeField: z.ZodEnum<typeof EntityType>;
|
|
83
|
+
declare const parentEntityIdField: z.ZodString;
|
|
84
|
+
declare const parentEntityNameField: z.ZodString;
|
|
85
|
+
declare const rootEntityTypeField: z.ZodEnum<typeof EntityType>;
|
|
86
|
+
declare const rootEntityIdField: z.ZodString;
|
|
87
|
+
declare const rootEntityNameField: z.ZodString;
|
|
88
|
+
declare const experimentIdField: z.ZodString;
|
|
89
|
+
declare const scopeField: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
90
|
+
declare const metadataField: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
91
|
+
declare const tagsField: z.ZodArray<z.ZodString>;
|
|
92
|
+
/**
|
|
93
|
+
* Context fields shared across observability signals (metrics, logs).
|
|
94
|
+
* All fields are nullish — each signal uses them as optional context.
|
|
95
|
+
*/
|
|
96
|
+
declare const contextFields: {
|
|
97
|
+
readonly entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
98
|
+
readonly entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
+
readonly entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
readonly parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
101
|
+
readonly parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
readonly parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
readonly rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
104
|
+
readonly rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
readonly rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
readonly userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
readonly organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
|
+
readonly resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
|
+
readonly runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
readonly sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
readonly threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
readonly requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
readonly environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
readonly source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
readonly serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
readonly scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
117
|
+
readonly experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Common filter fields shared across observability signal filters (metrics, logs, scores, feedback).
|
|
121
|
+
* All fields are optional — each signal extends this with signal-specific filters.
|
|
122
|
+
*/
|
|
123
|
+
declare const commonFilterFields: {
|
|
124
|
+
readonly timestamp: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
126
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
127
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
readonly traceId: z.ZodOptional<z.ZodString>;
|
|
131
|
+
readonly spanId: z.ZodOptional<z.ZodString>;
|
|
132
|
+
readonly entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
133
|
+
readonly entityName: z.ZodOptional<z.ZodString>;
|
|
134
|
+
readonly userId: z.ZodOptional<z.ZodString>;
|
|
135
|
+
readonly organizationId: z.ZodOptional<z.ZodString>;
|
|
136
|
+
readonly experimentId: z.ZodOptional<z.ZodString>;
|
|
137
|
+
readonly serviceName: z.ZodOptional<z.ZodString>;
|
|
138
|
+
readonly environment: z.ZodOptional<z.ZodString>;
|
|
139
|
+
};
|
|
140
|
+
/** Zod schema for trace ID field */
|
|
141
|
+
declare const traceIdField: z.ZodString;
|
|
142
|
+
/** Zod schema for span ID field */
|
|
143
|
+
declare const spanIdField: z.ZodString;
|
|
144
|
+
|
|
145
|
+
/** Log level schema for validation */
|
|
146
|
+
declare const logLevelSchema: z.ZodEnum<{
|
|
147
|
+
error: "error";
|
|
148
|
+
debug: "debug";
|
|
149
|
+
info: "info";
|
|
150
|
+
warn: "warn";
|
|
151
|
+
fatal: "fatal";
|
|
152
|
+
}>;
|
|
153
|
+
/**
|
|
154
|
+
* Schema for logs as stored in the database.
|
|
155
|
+
* Includes all fields from ExportedLog plus storage-specific fields.
|
|
156
|
+
*/
|
|
157
|
+
declare const logRecordSchema: z.ZodObject<{
|
|
158
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
159
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
160
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
161
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
162
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
164
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
167
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
168
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
171
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
176
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
180
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
181
|
+
timestamp: z.ZodDate;
|
|
182
|
+
level: z.ZodEnum<{
|
|
183
|
+
error: "error";
|
|
184
|
+
debug: "debug";
|
|
185
|
+
info: "info";
|
|
186
|
+
warn: "warn";
|
|
187
|
+
fatal: "fatal";
|
|
188
|
+
}>;
|
|
189
|
+
message: z.ZodString;
|
|
190
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
191
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
/** Log record type for storage */
|
|
195
|
+
type LogRecord = z.infer<typeof logRecordSchema>;
|
|
196
|
+
/**
|
|
197
|
+
* Schema for user-provided log input (minimal required fields).
|
|
198
|
+
* The logger enriches this with context before emitting ExportedLog.
|
|
199
|
+
*/
|
|
200
|
+
declare const logRecordInputSchema: z.ZodObject<{
|
|
201
|
+
level: z.ZodEnum<{
|
|
202
|
+
error: "error";
|
|
203
|
+
debug: "debug";
|
|
204
|
+
info: "info";
|
|
205
|
+
warn: "warn";
|
|
206
|
+
fatal: "fatal";
|
|
207
|
+
}>;
|
|
208
|
+
message: z.ZodString;
|
|
209
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
210
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
/** User-facing log input type */
|
|
213
|
+
type LogRecordInput = z.infer<typeof logRecordInputSchema>;
|
|
214
|
+
/** Schema for creating a log record */
|
|
215
|
+
declare const createLogRecordSchema: z.ZodObject<{
|
|
216
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
217
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
218
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
219
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
222
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
225
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
235
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
238
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
239
|
+
timestamp: z.ZodDate;
|
|
240
|
+
level: z.ZodEnum<{
|
|
241
|
+
error: "error";
|
|
242
|
+
debug: "debug";
|
|
243
|
+
info: "info";
|
|
244
|
+
warn: "warn";
|
|
245
|
+
fatal: "fatal";
|
|
246
|
+
}>;
|
|
247
|
+
message: z.ZodString;
|
|
248
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
249
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
250
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
/** Log record for creation (excludes db timestamps) */
|
|
253
|
+
type CreateLogRecord = z.infer<typeof createLogRecordSchema>;
|
|
254
|
+
/** Schema for batchCreateLogs operation arguments */
|
|
255
|
+
declare const batchCreateLogsArgsSchema: z.ZodObject<{
|
|
256
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
257
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
258
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
259
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
260
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
261
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
262
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
263
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
266
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
270
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
274
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
276
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
279
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
280
|
+
timestamp: z.ZodDate;
|
|
281
|
+
level: z.ZodEnum<{
|
|
282
|
+
error: "error";
|
|
283
|
+
debug: "debug";
|
|
284
|
+
info: "info";
|
|
285
|
+
warn: "warn";
|
|
286
|
+
fatal: "fatal";
|
|
287
|
+
}>;
|
|
288
|
+
message: z.ZodString;
|
|
289
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
290
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
291
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
|
+
}, z.core.$strip>>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
/** Arguments for batch creating logs */
|
|
295
|
+
type BatchCreateLogsArgs = z.infer<typeof batchCreateLogsArgsSchema>;
|
|
296
|
+
/** Schema for filtering logs in list queries */
|
|
297
|
+
declare const logsFilterSchema: z.ZodObject<{
|
|
298
|
+
level: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
299
|
+
error: "error";
|
|
300
|
+
debug: "debug";
|
|
301
|
+
info: "info";
|
|
302
|
+
warn: "warn";
|
|
303
|
+
fatal: "fatal";
|
|
304
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
305
|
+
error: "error";
|
|
306
|
+
debug: "debug";
|
|
307
|
+
info: "info";
|
|
308
|
+
warn: "warn";
|
|
309
|
+
fatal: "fatal";
|
|
310
|
+
}>>]>>;
|
|
311
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
312
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
313
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
314
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
315
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
316
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
317
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
318
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
319
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
320
|
+
source: z.ZodOptional<z.ZodString>;
|
|
321
|
+
search: z.ZodOptional<z.ZodString>;
|
|
322
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
|
+
dataKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
324
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
325
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
326
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
327
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
+
}, z.core.$strip>>;
|
|
330
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
331
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
332
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
333
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
334
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
335
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
336
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
337
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
338
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
/** Filters for querying logs */
|
|
341
|
+
type LogsFilter = z.infer<typeof logsFilterSchema>;
|
|
342
|
+
/** Fields available for ordering log results */
|
|
343
|
+
declare const logsOrderByFieldSchema: z.ZodEnum<{
|
|
344
|
+
timestamp: "timestamp";
|
|
345
|
+
}>;
|
|
346
|
+
/** Order by configuration for log queries */
|
|
347
|
+
declare const logsOrderBySchema: z.ZodObject<{
|
|
348
|
+
field: z.ZodDefault<z.ZodEnum<{
|
|
349
|
+
timestamp: "timestamp";
|
|
350
|
+
}>>;
|
|
351
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
352
|
+
ASC: "ASC";
|
|
353
|
+
DESC: "DESC";
|
|
354
|
+
}>>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
/** Schema for listLogs operation arguments */
|
|
357
|
+
declare const listLogsArgsSchema: z.ZodObject<{
|
|
358
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
level: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
360
|
+
error: "error";
|
|
361
|
+
debug: "debug";
|
|
362
|
+
info: "info";
|
|
363
|
+
warn: "warn";
|
|
364
|
+
fatal: "fatal";
|
|
365
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
366
|
+
error: "error";
|
|
367
|
+
debug: "debug";
|
|
368
|
+
info: "info";
|
|
369
|
+
warn: "warn";
|
|
370
|
+
fatal: "fatal";
|
|
371
|
+
}>>]>>;
|
|
372
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
373
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
374
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
375
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
376
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
377
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
378
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
379
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
380
|
+
resourceId: z.ZodOptional<z.ZodString>;
|
|
381
|
+
source: z.ZodOptional<z.ZodString>;
|
|
382
|
+
search: z.ZodOptional<z.ZodString>;
|
|
383
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
384
|
+
dataKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
385
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
387
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
388
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
389
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
390
|
+
}, z.core.$strip>>;
|
|
391
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
392
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
393
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
394
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
395
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
396
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
397
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
398
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
399
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
pagination: z.ZodDefault<z.ZodObject<{
|
|
402
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
403
|
+
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
|
+
orderBy: z.ZodDefault<z.ZodObject<{
|
|
406
|
+
field: z.ZodDefault<z.ZodEnum<{
|
|
407
|
+
timestamp: "timestamp";
|
|
408
|
+
}>>;
|
|
409
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
410
|
+
ASC: "ASC";
|
|
411
|
+
DESC: "DESC";
|
|
412
|
+
}>>;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
/** Arguments for listing logs */
|
|
416
|
+
type ListLogsArgs = z.input<typeof listLogsArgsSchema>;
|
|
417
|
+
/** Schema for listLogs operation response */
|
|
418
|
+
declare const listLogsResponseSchema: z.ZodObject<{
|
|
419
|
+
pagination: z.ZodObject<{
|
|
420
|
+
total: z.ZodNumber;
|
|
421
|
+
page: z.ZodNumber;
|
|
422
|
+
perPage: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>;
|
|
423
|
+
hasMore: z.ZodBoolean;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
logs: z.ZodArray<z.ZodObject<{
|
|
426
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
427
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
428
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
429
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
431
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
432
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
433
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
434
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
435
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
436
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
437
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
438
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
439
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
440
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
441
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
444
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
445
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
446
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
447
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
448
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
449
|
+
timestamp: z.ZodDate;
|
|
450
|
+
level: z.ZodEnum<{
|
|
451
|
+
error: "error";
|
|
452
|
+
debug: "debug";
|
|
453
|
+
info: "info";
|
|
454
|
+
warn: "warn";
|
|
455
|
+
fatal: "fatal";
|
|
456
|
+
}>;
|
|
457
|
+
message: z.ZodString;
|
|
458
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
459
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
461
|
+
}, z.core.$strip>>;
|
|
462
|
+
}, z.core.$strip>;
|
|
463
|
+
/** Response containing paginated logs */
|
|
464
|
+
type ListLogsResponse = z.infer<typeof listLogsResponseSchema>;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Schema for scores as stored in the database.
|
|
468
|
+
* Includes all fields from ExportedScore plus storage-specific fields.
|
|
469
|
+
*/
|
|
470
|
+
declare const scoreRecordSchema: z.ZodObject<{
|
|
471
|
+
timestamp: z.ZodDate;
|
|
472
|
+
traceId: z.ZodString;
|
|
473
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
474
|
+
scorerId: z.ZodString;
|
|
475
|
+
scorerVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
476
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
477
|
+
score: z.ZodNumber;
|
|
478
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
479
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
scoreTraceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
481
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
482
|
+
}, z.core.$strip>;
|
|
483
|
+
/** Score record type for storage */
|
|
484
|
+
type ScoreRecord = z.infer<typeof scoreRecordSchema>;
|
|
485
|
+
/**
|
|
486
|
+
* Schema for user-provided score input (minimal required fields).
|
|
487
|
+
* The span/trace context adds traceId/spanId before emitting ExportedScore.
|
|
488
|
+
*/
|
|
489
|
+
declare const scoreInputSchema: z.ZodObject<{
|
|
490
|
+
scorerId: z.ZodString;
|
|
491
|
+
scorerVersion: z.ZodOptional<z.ZodString>;
|
|
492
|
+
source: z.ZodOptional<z.ZodString>;
|
|
493
|
+
score: z.ZodNumber;
|
|
494
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
495
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
496
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
497
|
+
scoreTraceId: z.ZodOptional<z.ZodString>;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
/** User-facing score input type */
|
|
500
|
+
type ScoreInput = z.infer<typeof scoreInputSchema>;
|
|
501
|
+
/** Schema for creating a score record */
|
|
502
|
+
declare const createScoreRecordSchema: z.ZodObject<{
|
|
503
|
+
timestamp: z.ZodDate;
|
|
504
|
+
traceId: z.ZodString;
|
|
505
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
506
|
+
scorerId: z.ZodString;
|
|
507
|
+
scorerVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
|
+
score: z.ZodNumber;
|
|
510
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
511
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
512
|
+
scoreTraceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
513
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
/** Score record for creation */
|
|
516
|
+
type CreateScoreRecord = z.infer<typeof createScoreRecordSchema>;
|
|
517
|
+
/** Schema for createScore operation arguments */
|
|
518
|
+
declare const createScoreArgsSchema: z.ZodObject<{
|
|
519
|
+
score: z.ZodObject<{
|
|
520
|
+
timestamp: z.ZodDate;
|
|
521
|
+
traceId: z.ZodString;
|
|
522
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
523
|
+
scorerId: z.ZodString;
|
|
524
|
+
scorerVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
525
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
526
|
+
score: z.ZodNumber;
|
|
527
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
528
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
529
|
+
scoreTraceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
530
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
531
|
+
}, z.core.$strip>;
|
|
532
|
+
}, z.core.$strip>;
|
|
533
|
+
/** Arguments for creating a score */
|
|
534
|
+
type CreateScoreArgs = z.infer<typeof createScoreArgsSchema>;
|
|
535
|
+
/** Schema for createScore operation body in client/server */
|
|
536
|
+
declare const createScoreBodySchema: z.ZodObject<{
|
|
537
|
+
score: z.ZodObject<{
|
|
538
|
+
traceId: z.ZodString;
|
|
539
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
540
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
541
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
542
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
543
|
+
scorerId: z.ZodString;
|
|
544
|
+
score: z.ZodNumber;
|
|
545
|
+
scorerVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
546
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
547
|
+
scoreTraceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
|
+
}, z.core.$strip>;
|
|
549
|
+
}, z.core.$strip>;
|
|
550
|
+
/** Body for creating a score in client/server */
|
|
551
|
+
type CreateScoreBody = z.infer<typeof createScoreBodySchema>;
|
|
552
|
+
/** Schema for createScore operation response */
|
|
553
|
+
declare const createScoreResponseSchema: z.ZodObject<{
|
|
554
|
+
success: z.ZodBoolean;
|
|
555
|
+
}, z.core.$strip>;
|
|
556
|
+
/** Response from creating a score */
|
|
557
|
+
type CreateScoreResponse = z.infer<typeof createScoreResponseSchema>;
|
|
558
|
+
/** Schema for batchCreateScores operation arguments */
|
|
559
|
+
declare const batchCreateScoresArgsSchema: z.ZodObject<{
|
|
560
|
+
scores: z.ZodArray<z.ZodObject<{
|
|
561
|
+
timestamp: z.ZodDate;
|
|
562
|
+
traceId: z.ZodString;
|
|
563
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
564
|
+
scorerId: z.ZodString;
|
|
565
|
+
scorerVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
566
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
567
|
+
score: z.ZodNumber;
|
|
568
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
569
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
570
|
+
scoreTraceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
571
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
572
|
+
}, z.core.$strip>>;
|
|
573
|
+
}, z.core.$strip>;
|
|
574
|
+
/** Arguments for batch creating scores */
|
|
575
|
+
type BatchCreateScoresArgs = z.infer<typeof batchCreateScoresArgsSchema>;
|
|
576
|
+
/** Schema for filtering scores in list queries */
|
|
577
|
+
declare const scoresFilterSchema: z.ZodObject<{
|
|
578
|
+
scorerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
579
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
580
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
581
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
582
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
583
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
584
|
+
}, z.core.$strip>>;
|
|
585
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
586
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
587
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
588
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
589
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
590
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
591
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
592
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
593
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
594
|
+
}, z.core.$strip>;
|
|
595
|
+
/** Filters for querying scores */
|
|
596
|
+
type ScoresFilter = z.infer<typeof scoresFilterSchema>;
|
|
597
|
+
/** Fields available for ordering score results */
|
|
598
|
+
declare const scoresOrderByFieldSchema: z.ZodEnum<{
|
|
599
|
+
timestamp: "timestamp";
|
|
600
|
+
score: "score";
|
|
601
|
+
}>;
|
|
602
|
+
/** Order by configuration for score queries */
|
|
603
|
+
declare const scoresOrderBySchema: z.ZodObject<{
|
|
604
|
+
field: z.ZodDefault<z.ZodEnum<{
|
|
605
|
+
timestamp: "timestamp";
|
|
606
|
+
score: "score";
|
|
607
|
+
}>>;
|
|
608
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
609
|
+
ASC: "ASC";
|
|
610
|
+
DESC: "DESC";
|
|
611
|
+
}>>;
|
|
612
|
+
}, z.core.$strip>;
|
|
613
|
+
/** Schema for listScores operation arguments */
|
|
614
|
+
declare const listScoresArgsSchema: z.ZodObject<{
|
|
615
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
616
|
+
scorerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
617
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
618
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
619
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
620
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
621
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
622
|
+
}, z.core.$strip>>;
|
|
623
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
624
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
625
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
626
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
627
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
628
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
629
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
630
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
631
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
632
|
+
}, z.core.$strip>>;
|
|
633
|
+
pagination: z.ZodDefault<z.ZodObject<{
|
|
634
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
635
|
+
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
636
|
+
}, z.core.$strip>>;
|
|
637
|
+
orderBy: z.ZodDefault<z.ZodObject<{
|
|
638
|
+
field: z.ZodDefault<z.ZodEnum<{
|
|
639
|
+
timestamp: "timestamp";
|
|
640
|
+
score: "score";
|
|
641
|
+
}>>;
|
|
642
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
643
|
+
ASC: "ASC";
|
|
644
|
+
DESC: "DESC";
|
|
645
|
+
}>>;
|
|
646
|
+
}, z.core.$strip>>;
|
|
647
|
+
}, z.core.$strip>;
|
|
648
|
+
/** Arguments for listing scores */
|
|
649
|
+
type ListScoresArgs = z.input<typeof listScoresArgsSchema>;
|
|
650
|
+
/** Schema for listScores operation response */
|
|
651
|
+
declare const listScoresResponseSchema: z.ZodObject<{
|
|
652
|
+
pagination: z.ZodObject<{
|
|
653
|
+
total: z.ZodNumber;
|
|
654
|
+
page: z.ZodNumber;
|
|
655
|
+
perPage: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>;
|
|
656
|
+
hasMore: z.ZodBoolean;
|
|
657
|
+
}, z.core.$strip>;
|
|
658
|
+
scores: z.ZodArray<z.ZodObject<{
|
|
659
|
+
timestamp: z.ZodDate;
|
|
660
|
+
traceId: z.ZodString;
|
|
661
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
662
|
+
scorerId: z.ZodString;
|
|
663
|
+
scorerVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
664
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
665
|
+
score: z.ZodNumber;
|
|
666
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
667
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
668
|
+
scoreTraceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
669
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
670
|
+
}, z.core.$strip>>;
|
|
671
|
+
}, z.core.$strip>;
|
|
672
|
+
/** Response containing paginated scores */
|
|
673
|
+
type ListScoresResponse = z.infer<typeof listScoresResponseSchema>;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Schema for feedback as stored in the database.
|
|
677
|
+
* Includes all fields from ExportedFeedback plus storage-specific fields.
|
|
678
|
+
*/
|
|
679
|
+
declare const feedbackRecordSchema: z.ZodObject<{
|
|
680
|
+
timestamp: z.ZodDate;
|
|
681
|
+
traceId: z.ZodString;
|
|
682
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
683
|
+
source: z.ZodString;
|
|
684
|
+
feedbackType: z.ZodString;
|
|
685
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
686
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
687
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
688
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
689
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
690
|
+
}, z.core.$strip>;
|
|
691
|
+
/** Feedback record type for storage */
|
|
692
|
+
type FeedbackRecord = z.infer<typeof feedbackRecordSchema>;
|
|
693
|
+
/**
|
|
694
|
+
* Schema for user-provided feedback input (minimal required fields).
|
|
695
|
+
* The span/trace context adds traceId/spanId before emitting ExportedFeedback.
|
|
696
|
+
*/
|
|
697
|
+
declare const feedbackInputSchema: z.ZodObject<{
|
|
698
|
+
source: z.ZodString;
|
|
699
|
+
feedbackType: z.ZodString;
|
|
700
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
701
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
702
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
703
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
704
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
705
|
+
}, z.core.$strip>;
|
|
706
|
+
/** User-facing feedback input type */
|
|
707
|
+
type FeedbackInput = z.infer<typeof feedbackInputSchema>;
|
|
708
|
+
/** Schema for creating a feedback record */
|
|
709
|
+
declare const createFeedbackRecordSchema: z.ZodObject<{
|
|
710
|
+
timestamp: z.ZodDate;
|
|
711
|
+
traceId: z.ZodString;
|
|
712
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
713
|
+
source: z.ZodString;
|
|
714
|
+
feedbackType: z.ZodString;
|
|
715
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
716
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
717
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
718
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
719
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
720
|
+
}, z.core.$strip>;
|
|
721
|
+
/** Feedback record for creation */
|
|
722
|
+
type CreateFeedbackRecord = z.infer<typeof createFeedbackRecordSchema>;
|
|
723
|
+
/** Schema for createFeedback operation arguments */
|
|
724
|
+
declare const createFeedbackArgsSchema: z.ZodObject<{
|
|
725
|
+
feedback: z.ZodObject<{
|
|
726
|
+
timestamp: z.ZodDate;
|
|
727
|
+
traceId: z.ZodString;
|
|
728
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
729
|
+
source: z.ZodString;
|
|
730
|
+
feedbackType: z.ZodString;
|
|
731
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
732
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
733
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
734
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
735
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
736
|
+
}, z.core.$strip>;
|
|
737
|
+
}, z.core.$strip>;
|
|
738
|
+
/** Arguments for creating feedback */
|
|
739
|
+
type CreateFeedbackArgs = z.infer<typeof createFeedbackArgsSchema>;
|
|
740
|
+
/** Schema for createFeedback operation body in client/server */
|
|
741
|
+
declare const createFeedbackBodySchema: z.ZodObject<{
|
|
742
|
+
feedback: z.ZodObject<{
|
|
743
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
744
|
+
traceId: z.ZodString;
|
|
745
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
746
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
747
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
748
|
+
source: z.ZodString;
|
|
749
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
feedbackType: z.ZodString;
|
|
751
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
}, z.core.$strip>;
|
|
753
|
+
}, z.core.$strip>;
|
|
754
|
+
/** Body for creating feedback in client/server */
|
|
755
|
+
type CreateFeedbackBody = z.infer<typeof createFeedbackBodySchema>;
|
|
756
|
+
/** Schema for createFeedback operation response */
|
|
757
|
+
declare const createFeedbackResponseSchema: z.ZodObject<{
|
|
758
|
+
success: z.ZodBoolean;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
/** Response from creating feedback */
|
|
761
|
+
type CreateFeedbackResponse = z.infer<typeof createFeedbackResponseSchema>;
|
|
762
|
+
/** Schema for batchCreateFeedback operation arguments */
|
|
763
|
+
declare const batchCreateFeedbackArgsSchema: z.ZodObject<{
|
|
764
|
+
feedbacks: z.ZodArray<z.ZodObject<{
|
|
765
|
+
timestamp: z.ZodDate;
|
|
766
|
+
traceId: z.ZodString;
|
|
767
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
768
|
+
source: z.ZodString;
|
|
769
|
+
feedbackType: z.ZodString;
|
|
770
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
771
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
772
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
773
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
774
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
775
|
+
}, z.core.$strip>>;
|
|
776
|
+
}, z.core.$strip>;
|
|
777
|
+
/** Arguments for batch creating feedback */
|
|
778
|
+
type BatchCreateFeedbackArgs = z.infer<typeof batchCreateFeedbackArgsSchema>;
|
|
779
|
+
/** Schema for filtering feedback in list queries */
|
|
780
|
+
declare const feedbackFilterSchema: z.ZodObject<{
|
|
781
|
+
feedbackType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
782
|
+
source: z.ZodOptional<z.ZodString>;
|
|
783
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
784
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
785
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
786
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
787
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
788
|
+
}, z.core.$strip>>;
|
|
789
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
790
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
791
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
792
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
793
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
794
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
795
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
796
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
797
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
798
|
+
}, z.core.$strip>;
|
|
799
|
+
/** Filters for querying feedback */
|
|
800
|
+
type FeedbackFilter = z.infer<typeof feedbackFilterSchema>;
|
|
801
|
+
/** Fields available for ordering feedback results */
|
|
802
|
+
declare const feedbackOrderByFieldSchema: z.ZodEnum<{
|
|
803
|
+
timestamp: "timestamp";
|
|
804
|
+
}>;
|
|
805
|
+
/** Order by configuration for feedback queries */
|
|
806
|
+
declare const feedbackOrderBySchema: z.ZodObject<{
|
|
807
|
+
field: z.ZodDefault<z.ZodEnum<{
|
|
808
|
+
timestamp: "timestamp";
|
|
809
|
+
}>>;
|
|
810
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
811
|
+
ASC: "ASC";
|
|
812
|
+
DESC: "DESC";
|
|
813
|
+
}>>;
|
|
814
|
+
}, z.core.$strip>;
|
|
815
|
+
/** Schema for listFeedback operation arguments */
|
|
816
|
+
declare const listFeedbackArgsSchema: z.ZodObject<{
|
|
817
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
818
|
+
feedbackType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
819
|
+
source: z.ZodOptional<z.ZodString>;
|
|
820
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
821
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
822
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
823
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
824
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
825
|
+
}, z.core.$strip>>;
|
|
826
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
827
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
828
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
829
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
830
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
831
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
832
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
833
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
834
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
835
|
+
}, z.core.$strip>>;
|
|
836
|
+
pagination: z.ZodDefault<z.ZodObject<{
|
|
837
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
838
|
+
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
839
|
+
}, z.core.$strip>>;
|
|
840
|
+
orderBy: z.ZodDefault<z.ZodObject<{
|
|
841
|
+
field: z.ZodDefault<z.ZodEnum<{
|
|
842
|
+
timestamp: "timestamp";
|
|
843
|
+
}>>;
|
|
844
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
845
|
+
ASC: "ASC";
|
|
846
|
+
DESC: "DESC";
|
|
847
|
+
}>>;
|
|
848
|
+
}, z.core.$strip>>;
|
|
849
|
+
}, z.core.$strip>;
|
|
850
|
+
/** Arguments for listing feedback */
|
|
851
|
+
type ListFeedbackArgs = z.input<typeof listFeedbackArgsSchema>;
|
|
852
|
+
/** Schema for listFeedback operation response */
|
|
853
|
+
declare const listFeedbackResponseSchema: z.ZodObject<{
|
|
854
|
+
pagination: z.ZodObject<{
|
|
855
|
+
total: z.ZodNumber;
|
|
856
|
+
page: z.ZodNumber;
|
|
857
|
+
perPage: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>;
|
|
858
|
+
hasMore: z.ZodBoolean;
|
|
859
|
+
}, z.core.$strip>;
|
|
860
|
+
feedback: z.ZodArray<z.ZodObject<{
|
|
861
|
+
timestamp: z.ZodDate;
|
|
862
|
+
traceId: z.ZodString;
|
|
863
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
864
|
+
source: z.ZodString;
|
|
865
|
+
feedbackType: z.ZodString;
|
|
866
|
+
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
867
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
868
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
869
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
870
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
871
|
+
}, z.core.$strip>>;
|
|
872
|
+
}, z.core.$strip>;
|
|
873
|
+
/** Response containing paginated feedback */
|
|
874
|
+
type ListFeedbackResponse = z.infer<typeof listFeedbackResponseSchema>;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* @deprecated MetricType is no longer stored. All metrics are raw events
|
|
878
|
+
* with aggregation determined at query time.
|
|
879
|
+
*/
|
|
880
|
+
declare const metricTypeSchema: z.ZodEnum<{
|
|
881
|
+
counter: "counter";
|
|
882
|
+
gauge: "gauge";
|
|
883
|
+
histogram: "histogram";
|
|
884
|
+
}>;
|
|
885
|
+
/**
|
|
886
|
+
* Schema for metrics as stored in the database.
|
|
887
|
+
* Each record is a single metric observation.
|
|
888
|
+
*/
|
|
889
|
+
declare const metricRecordSchema: z.ZodObject<{
|
|
890
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
891
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
892
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
893
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
894
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
895
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
896
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
897
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
898
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
899
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
900
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
901
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
902
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
903
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
904
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
905
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
906
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
907
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
908
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
909
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
910
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
911
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
912
|
+
timestamp: z.ZodDate;
|
|
913
|
+
name: z.ZodString;
|
|
914
|
+
value: z.ZodNumber;
|
|
915
|
+
labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
916
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
917
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
918
|
+
}, z.core.$strip>;
|
|
919
|
+
/** Metric record type for storage */
|
|
920
|
+
type MetricRecord = z.infer<typeof metricRecordSchema>;
|
|
921
|
+
/**
|
|
922
|
+
* Schema for user-provided metric input (minimal required fields).
|
|
923
|
+
* The metrics context enriches this with environment before emitting ExportedMetric.
|
|
924
|
+
*/
|
|
925
|
+
declare const metricInputSchema: z.ZodObject<{
|
|
926
|
+
name: z.ZodString;
|
|
927
|
+
value: z.ZodNumber;
|
|
928
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
929
|
+
}, z.core.$strip>;
|
|
930
|
+
/** User-facing metric input type */
|
|
931
|
+
type MetricInput = z.infer<typeof metricInputSchema>;
|
|
932
|
+
/** Schema for creating a metric record (without db timestamps) */
|
|
933
|
+
declare const createMetricRecordSchema: z.ZodObject<{
|
|
934
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
935
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
936
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
937
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
938
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
939
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
940
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
941
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
942
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
943
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
944
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
945
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
946
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
947
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
948
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
949
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
950
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
951
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
952
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
953
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
954
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
955
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
956
|
+
timestamp: z.ZodDate;
|
|
957
|
+
name: z.ZodString;
|
|
958
|
+
value: z.ZodNumber;
|
|
959
|
+
labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
960
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
961
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
962
|
+
}, z.core.$strip>;
|
|
963
|
+
/** Metric record for creation (excludes db timestamps) */
|
|
964
|
+
type CreateMetricRecord = z.infer<typeof createMetricRecordSchema>;
|
|
965
|
+
/** Schema for batchCreateMetrics operation arguments */
|
|
966
|
+
declare const batchCreateMetricsArgsSchema: z.ZodObject<{
|
|
967
|
+
metrics: z.ZodArray<z.ZodObject<{
|
|
968
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
969
|
+
entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
970
|
+
entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
971
|
+
entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
972
|
+
parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
973
|
+
parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
974
|
+
parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
975
|
+
rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof EntityType>>>;
|
|
976
|
+
rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
977
|
+
rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
978
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
979
|
+
organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
980
|
+
resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
981
|
+
runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
982
|
+
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
983
|
+
threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
984
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
985
|
+
environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
986
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
987
|
+
serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
988
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
989
|
+
experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
990
|
+
timestamp: z.ZodDate;
|
|
991
|
+
name: z.ZodString;
|
|
992
|
+
value: z.ZodNumber;
|
|
993
|
+
labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
994
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
995
|
+
spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
996
|
+
}, z.core.$strip>>;
|
|
997
|
+
}, z.core.$strip>;
|
|
998
|
+
/** Arguments for batch recording metrics */
|
|
999
|
+
type BatchCreateMetricsArgs = z.infer<typeof batchCreateMetricsArgsSchema>;
|
|
1000
|
+
/** Aggregation type schema */
|
|
1001
|
+
declare const aggregationTypeSchema: z.ZodEnum<{
|
|
1002
|
+
sum: "sum";
|
|
1003
|
+
avg: "avg";
|
|
1004
|
+
min: "min";
|
|
1005
|
+
max: "max";
|
|
1006
|
+
count: "count";
|
|
1007
|
+
last: "last";
|
|
1008
|
+
}>;
|
|
1009
|
+
type AggregationType = z.infer<typeof aggregationTypeSchema>;
|
|
1010
|
+
/** Aggregation interval schema */
|
|
1011
|
+
declare const aggregationIntervalSchema: z.ZodEnum<{
|
|
1012
|
+
"1m": "1m";
|
|
1013
|
+
"5m": "5m";
|
|
1014
|
+
"15m": "15m";
|
|
1015
|
+
"1h": "1h";
|
|
1016
|
+
"1d": "1d";
|
|
1017
|
+
}>;
|
|
1018
|
+
type AggregationInterval = z.infer<typeof aggregationIntervalSchema>;
|
|
1019
|
+
/** Schema for metric aggregation configuration */
|
|
1020
|
+
declare const metricsAggregationSchema: z.ZodObject<{
|
|
1021
|
+
type: z.ZodEnum<{
|
|
1022
|
+
sum: "sum";
|
|
1023
|
+
avg: "avg";
|
|
1024
|
+
min: "min";
|
|
1025
|
+
max: "max";
|
|
1026
|
+
count: "count";
|
|
1027
|
+
last: "last";
|
|
1028
|
+
}>;
|
|
1029
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
1030
|
+
"1m": "1m";
|
|
1031
|
+
"5m": "5m";
|
|
1032
|
+
"15m": "15m";
|
|
1033
|
+
"1h": "1h";
|
|
1034
|
+
"1d": "1d";
|
|
1035
|
+
}>>;
|
|
1036
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1037
|
+
}, z.core.$strip>;
|
|
1038
|
+
/** Metrics aggregation configuration type */
|
|
1039
|
+
type MetricsAggregation = z.infer<typeof metricsAggregationSchema>;
|
|
1040
|
+
/** Schema for filtering metrics in queries */
|
|
1041
|
+
declare const metricsFilterSchema: z.ZodObject<{
|
|
1042
|
+
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1043
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1044
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
1045
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1046
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1048
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1049
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1050
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
1051
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1052
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1053
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1054
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1055
|
+
}, z.core.$strip>>;
|
|
1056
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1059
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
1060
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1061
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
1062
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
1063
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
}, z.core.$strip>;
|
|
1066
|
+
/** Filters for querying metrics */
|
|
1067
|
+
type MetricsFilter = z.infer<typeof metricsFilterSchema>;
|
|
1068
|
+
/** Compare period for aggregate queries with period-over-period comparison */
|
|
1069
|
+
declare const comparePeriodSchema: z.ZodEnum<{
|
|
1070
|
+
previous_period: "previous_period";
|
|
1071
|
+
previous_day: "previous_day";
|
|
1072
|
+
previous_week: "previous_week";
|
|
1073
|
+
}>;
|
|
1074
|
+
declare const getMetricAggregateArgsSchema: z.ZodObject<{
|
|
1075
|
+
name: z.ZodArray<z.ZodString>;
|
|
1076
|
+
aggregation: z.ZodEnum<{
|
|
1077
|
+
sum: "sum";
|
|
1078
|
+
avg: "avg";
|
|
1079
|
+
min: "min";
|
|
1080
|
+
max: "max";
|
|
1081
|
+
count: "count";
|
|
1082
|
+
last: "last";
|
|
1083
|
+
}>;
|
|
1084
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
1085
|
+
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1086
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1087
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1089
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
1090
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1091
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1092
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1093
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
1094
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1095
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1096
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1097
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1098
|
+
}, z.core.$strip>>;
|
|
1099
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1102
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
1103
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1104
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
1106
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
1107
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
1108
|
+
}, z.core.$strip>>;
|
|
1109
|
+
comparePeriod: z.ZodOptional<z.ZodEnum<{
|
|
1110
|
+
previous_period: "previous_period";
|
|
1111
|
+
previous_day: "previous_day";
|
|
1112
|
+
previous_week: "previous_week";
|
|
1113
|
+
}>>;
|
|
1114
|
+
}, z.core.$strip>;
|
|
1115
|
+
type GetMetricAggregateArgs = z.infer<typeof getMetricAggregateArgsSchema>;
|
|
1116
|
+
declare const getMetricAggregateResponseSchema: z.ZodObject<{
|
|
1117
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
1118
|
+
previousValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1119
|
+
changePercent: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1120
|
+
}, z.core.$strip>;
|
|
1121
|
+
type GetMetricAggregateResponse = z.infer<typeof getMetricAggregateResponseSchema>;
|
|
1122
|
+
declare const getMetricBreakdownArgsSchema: z.ZodObject<{
|
|
1123
|
+
name: z.ZodArray<z.ZodString>;
|
|
1124
|
+
groupBy: z.ZodArray<z.ZodString>;
|
|
1125
|
+
aggregation: z.ZodEnum<{
|
|
1126
|
+
sum: "sum";
|
|
1127
|
+
avg: "avg";
|
|
1128
|
+
min: "min";
|
|
1129
|
+
max: "max";
|
|
1130
|
+
count: "count";
|
|
1131
|
+
last: "last";
|
|
1132
|
+
}>;
|
|
1133
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
1134
|
+
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1135
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1136
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
1137
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1138
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
1139
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1140
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1141
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1142
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
1143
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1144
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1145
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1146
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1147
|
+
}, z.core.$strip>>;
|
|
1148
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
1149
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
1150
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1151
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
1152
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
1154
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
1157
|
+
}, z.core.$strip>>;
|
|
1158
|
+
}, z.core.$strip>;
|
|
1159
|
+
type GetMetricBreakdownArgs = z.infer<typeof getMetricBreakdownArgsSchema>;
|
|
1160
|
+
declare const getMetricBreakdownResponseSchema: z.ZodObject<{
|
|
1161
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
1162
|
+
dimensions: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
|
|
1163
|
+
value: z.ZodNumber;
|
|
1164
|
+
}, z.core.$strip>>;
|
|
1165
|
+
}, z.core.$strip>;
|
|
1166
|
+
type GetMetricBreakdownResponse = z.infer<typeof getMetricBreakdownResponseSchema>;
|
|
1167
|
+
declare const getMetricTimeSeriesArgsSchema: z.ZodObject<{
|
|
1168
|
+
name: z.ZodArray<z.ZodString>;
|
|
1169
|
+
interval: z.ZodEnum<{
|
|
1170
|
+
"1m": "1m";
|
|
1171
|
+
"5m": "5m";
|
|
1172
|
+
"15m": "15m";
|
|
1173
|
+
"1h": "1h";
|
|
1174
|
+
"1d": "1d";
|
|
1175
|
+
}>;
|
|
1176
|
+
aggregation: z.ZodEnum<{
|
|
1177
|
+
sum: "sum";
|
|
1178
|
+
avg: "avg";
|
|
1179
|
+
min: "min";
|
|
1180
|
+
max: "max";
|
|
1181
|
+
count: "count";
|
|
1182
|
+
last: "last";
|
|
1183
|
+
}>;
|
|
1184
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
1185
|
+
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1186
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1187
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
1188
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1189
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
1190
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1193
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
1194
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1195
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1196
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1197
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1198
|
+
}, z.core.$strip>>;
|
|
1199
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
1200
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
1201
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1202
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
1203
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1204
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
1205
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
1206
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
1207
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
}, z.core.$strip>>;
|
|
1209
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1210
|
+
}, z.core.$strip>;
|
|
1211
|
+
type GetMetricTimeSeriesArgs = z.infer<typeof getMetricTimeSeriesArgsSchema>;
|
|
1212
|
+
declare const getMetricTimeSeriesResponseSchema: z.ZodObject<{
|
|
1213
|
+
series: z.ZodArray<z.ZodObject<{
|
|
1214
|
+
name: z.ZodString;
|
|
1215
|
+
points: z.ZodArray<z.ZodObject<{
|
|
1216
|
+
timestamp: z.ZodDate;
|
|
1217
|
+
value: z.ZodNumber;
|
|
1218
|
+
}, z.core.$strip>>;
|
|
1219
|
+
}, z.core.$strip>>;
|
|
1220
|
+
}, z.core.$strip>;
|
|
1221
|
+
type GetMetricTimeSeriesResponse = z.infer<typeof getMetricTimeSeriesResponseSchema>;
|
|
1222
|
+
declare const getMetricPercentilesArgsSchema: z.ZodObject<{
|
|
1223
|
+
name: z.ZodString;
|
|
1224
|
+
percentiles: z.ZodArray<z.ZodNumber>;
|
|
1225
|
+
interval: z.ZodEnum<{
|
|
1226
|
+
"1m": "1m";
|
|
1227
|
+
"5m": "5m";
|
|
1228
|
+
"15m": "15m";
|
|
1229
|
+
"1h": "1h";
|
|
1230
|
+
"1d": "1d";
|
|
1231
|
+
}>;
|
|
1232
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
1233
|
+
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1234
|
+
parentEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1235
|
+
parentEntityName: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
rootEntityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1237
|
+
rootEntityName: z.ZodOptional<z.ZodString>;
|
|
1238
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
1239
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1240
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1241
|
+
timestamp: z.ZodOptional<z.ZodObject<{
|
|
1242
|
+
start: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1243
|
+
end: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
1244
|
+
startExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1245
|
+
endExclusive: z.ZodOptional<z.ZodBoolean>;
|
|
1246
|
+
}, z.core.$strip>>;
|
|
1247
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
spanId: z.ZodOptional<z.ZodString>;
|
|
1249
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1250
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
1251
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1252
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
1253
|
+
experimentId: z.ZodOptional<z.ZodString>;
|
|
1254
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
1255
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
1256
|
+
}, z.core.$strip>>;
|
|
1257
|
+
}, z.core.$strip>;
|
|
1258
|
+
type GetMetricPercentilesArgs = z.infer<typeof getMetricPercentilesArgsSchema>;
|
|
1259
|
+
declare const getMetricPercentilesResponseSchema: z.ZodObject<{
|
|
1260
|
+
series: z.ZodArray<z.ZodObject<{
|
|
1261
|
+
percentile: z.ZodNumber;
|
|
1262
|
+
points: z.ZodArray<z.ZodObject<{
|
|
1263
|
+
timestamp: z.ZodDate;
|
|
1264
|
+
value: z.ZodNumber;
|
|
1265
|
+
}, z.core.$strip>>;
|
|
1266
|
+
}, z.core.$strip>>;
|
|
1267
|
+
}, z.core.$strip>;
|
|
1268
|
+
type GetMetricPercentilesResponse = z.infer<typeof getMetricPercentilesResponseSchema>;
|
|
1269
|
+
|
|
1270
|
+
declare const getMetricNamesArgsSchema: z.ZodObject<{
|
|
1271
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1272
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1273
|
+
}, z.core.$strip>;
|
|
1274
|
+
type GetMetricNamesArgs = z.infer<typeof getMetricNamesArgsSchema>;
|
|
1275
|
+
declare const getMetricNamesResponseSchema: z.ZodObject<{
|
|
1276
|
+
names: z.ZodArray<z.ZodString>;
|
|
1277
|
+
}, z.core.$strip>;
|
|
1278
|
+
type GetMetricNamesResponse = z.infer<typeof getMetricNamesResponseSchema>;
|
|
1279
|
+
declare const getMetricLabelKeysArgsSchema: z.ZodObject<{
|
|
1280
|
+
metricName: z.ZodString;
|
|
1281
|
+
}, z.core.$strip>;
|
|
1282
|
+
type GetMetricLabelKeysArgs = z.infer<typeof getMetricLabelKeysArgsSchema>;
|
|
1283
|
+
declare const getMetricLabelKeysResponseSchema: z.ZodObject<{
|
|
1284
|
+
keys: z.ZodArray<z.ZodString>;
|
|
1285
|
+
}, z.core.$strip>;
|
|
1286
|
+
type GetMetricLabelKeysResponse = z.infer<typeof getMetricLabelKeysResponseSchema>;
|
|
1287
|
+
declare const getMetricLabelValuesArgsSchema: z.ZodObject<{
|
|
1288
|
+
metricName: z.ZodString;
|
|
1289
|
+
labelKey: z.ZodString;
|
|
1290
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1291
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1292
|
+
}, z.core.$strip>;
|
|
1293
|
+
type GetMetricLabelValuesArgs = z.infer<typeof getMetricLabelValuesArgsSchema>;
|
|
1294
|
+
declare const getMetricLabelValuesResponseSchema: z.ZodObject<{
|
|
1295
|
+
values: z.ZodArray<z.ZodString>;
|
|
1296
|
+
}, z.core.$strip>;
|
|
1297
|
+
type GetMetricLabelValuesResponse = z.infer<typeof getMetricLabelValuesResponseSchema>;
|
|
1298
|
+
declare const getEntityTypesArgsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1299
|
+
type GetEntityTypesArgs = z.infer<typeof getEntityTypesArgsSchema>;
|
|
1300
|
+
declare const getEntityTypesResponseSchema: z.ZodObject<{
|
|
1301
|
+
entityTypes: z.ZodArray<z.ZodEnum<typeof EntityType>>;
|
|
1302
|
+
}, z.core.$strip>;
|
|
1303
|
+
type GetEntityTypesResponse = z.infer<typeof getEntityTypesResponseSchema>;
|
|
1304
|
+
declare const getEntityNamesArgsSchema: z.ZodObject<{
|
|
1305
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1306
|
+
}, z.core.$strip>;
|
|
1307
|
+
type GetEntityNamesArgs = z.infer<typeof getEntityNamesArgsSchema>;
|
|
1308
|
+
declare const getEntityNamesResponseSchema: z.ZodObject<{
|
|
1309
|
+
names: z.ZodArray<z.ZodString>;
|
|
1310
|
+
}, z.core.$strip>;
|
|
1311
|
+
type GetEntityNamesResponse = z.infer<typeof getEntityNamesResponseSchema>;
|
|
1312
|
+
declare const getServiceNamesArgsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1313
|
+
type GetServiceNamesArgs = z.infer<typeof getServiceNamesArgsSchema>;
|
|
1314
|
+
declare const getServiceNamesResponseSchema: z.ZodObject<{
|
|
1315
|
+
serviceNames: z.ZodArray<z.ZodString>;
|
|
1316
|
+
}, z.core.$strip>;
|
|
1317
|
+
type GetServiceNamesResponse = z.infer<typeof getServiceNamesResponseSchema>;
|
|
1318
|
+
declare const getEnvironmentsArgsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1319
|
+
type GetEnvironmentsArgs = z.infer<typeof getEnvironmentsArgsSchema>;
|
|
1320
|
+
declare const getEnvironmentsResponseSchema: z.ZodObject<{
|
|
1321
|
+
environments: z.ZodArray<z.ZodString>;
|
|
1322
|
+
}, z.core.$strip>;
|
|
1323
|
+
type GetEnvironmentsResponse = z.infer<typeof getEnvironmentsResponseSchema>;
|
|
1324
|
+
declare const getTagsArgsSchema: z.ZodObject<{
|
|
1325
|
+
entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
|
|
1326
|
+
}, z.core.$strip>;
|
|
1327
|
+
type GetTagsArgs = z.infer<typeof getTagsArgsSchema>;
|
|
1328
|
+
declare const getTagsResponseSchema: z.ZodObject<{
|
|
1329
|
+
tags: z.ZodArray<z.ZodString>;
|
|
1330
|
+
}, z.core.$strip>;
|
|
1331
|
+
type GetTagsResponse = z.infer<typeof getTagsResponseSchema>;
|
|
1332
|
+
|
|
1333
|
+
export { type AggregationInterval, type AggregationType, type BatchCreateFeedbackArgs, type BatchCreateLogsArgs, type BatchCreateMetricsArgs, type BatchCreateScoresArgs, type CreateFeedbackArgs, type CreateFeedbackBody, type CreateFeedbackRecord, type CreateFeedbackResponse, type CreateLogRecord, type CreateMetricRecord, type CreateScoreArgs, type CreateScoreBody, type CreateScoreRecord, type CreateScoreResponse, type DateRange, EntityType, type FeedbackFilter, type FeedbackInput, type FeedbackRecord, type GetEntityNamesArgs, type GetEntityNamesResponse, type GetEntityTypesArgs, type GetEntityTypesResponse, type GetEnvironmentsArgs, type GetEnvironmentsResponse, type GetMetricAggregateArgs, type GetMetricAggregateResponse, type GetMetricBreakdownArgs, type GetMetricBreakdownResponse, type GetMetricLabelKeysArgs, type GetMetricLabelKeysResponse, type GetMetricLabelValuesArgs, type GetMetricLabelValuesResponse, type GetMetricNamesArgs, type GetMetricNamesResponse, type GetMetricPercentilesArgs, type GetMetricPercentilesResponse, type GetMetricTimeSeriesArgs, type GetMetricTimeSeriesResponse, type GetServiceNamesArgs, type GetServiceNamesResponse, type GetTagsArgs, type GetTagsResponse, type ListFeedbackArgs, type ListFeedbackResponse, type ListLogsArgs, type ListLogsResponse, type ListScoresArgs, type ListScoresResponse, type LogRecord, type LogRecordInput, type LogsFilter, type MetricInput, type MetricRecord, type MetricsAggregation, type MetricsFilter, type PaginationArgs, type ScoreInput, type ScoreRecord, type ScoresFilter, aggregationIntervalSchema, aggregationTypeSchema, batchCreateFeedbackArgsSchema, batchCreateLogsArgsSchema, batchCreateMetricsArgsSchema, batchCreateScoresArgsSchema, commonFilterFields, comparePeriodSchema, contextFields, createFeedbackArgsSchema, createFeedbackBodySchema, createFeedbackRecordSchema, createFeedbackResponseSchema, createLogRecordSchema, createMetricRecordSchema, createScoreArgsSchema, createScoreBodySchema, createScoreRecordSchema, createScoreResponseSchema, createdAtField, dateRangeSchema, dbTimestamps, entityIdField, entityNameField, entityTypeField, environmentField, experimentIdField, feedbackFilterSchema, feedbackInputSchema, feedbackOrderByFieldSchema, feedbackOrderBySchema, feedbackRecordSchema, getEntityNamesArgsSchema, getEntityNamesResponseSchema, getEntityTypesArgsSchema, getEntityTypesResponseSchema, getEnvironmentsArgsSchema, getEnvironmentsResponseSchema, getMetricAggregateArgsSchema, getMetricAggregateResponseSchema, getMetricBreakdownArgsSchema, getMetricBreakdownResponseSchema, getMetricLabelKeysArgsSchema, getMetricLabelKeysResponseSchema, getMetricLabelValuesArgsSchema, getMetricLabelValuesResponseSchema, getMetricNamesArgsSchema, getMetricNamesResponseSchema, getMetricPercentilesArgsSchema, getMetricPercentilesResponseSchema, getMetricTimeSeriesArgsSchema, getMetricTimeSeriesResponseSchema, getServiceNamesArgsSchema, getServiceNamesResponseSchema, getTagsArgsSchema, getTagsResponseSchema, listFeedbackArgsSchema, listFeedbackResponseSchema, listLogsArgsSchema, listLogsResponseSchema, listScoresArgsSchema, listScoresResponseSchema, logLevelSchema, logRecordInputSchema, logRecordSchema, logsFilterSchema, logsOrderByFieldSchema, logsOrderBySchema, metadataField, metricInputSchema, metricRecordSchema, metricTypeSchema, metricsAggregationSchema, metricsFilterSchema, organizationIdField, paginationArgsSchema, paginationInfoSchema, parentEntityIdField, parentEntityNameField, parentEntityTypeField, requestIdField, resourceIdField, rootEntityIdField, rootEntityNameField, rootEntityTypeField, runIdField, scopeField, scoreInputSchema, scoreRecordSchema, scoresFilterSchema, scoresOrderByFieldSchema, scoresOrderBySchema, serviceNameField, sessionIdField, sortDirectionSchema, sourceField, spanIdField, tagsField, threadIdField, traceIdField, updatedAtField, userIdField };
|