@mastra/server 1.64.0-alpha.8 → 1.64.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.
Files changed (44) hide show
  1. package/dist/_types/@internal_core/dist/storage/index.d.ts +66 -1
  2. package/dist/{api-schema-manifest-Ckuac2Uz.js → api-schema-manifest-BiPbewoh.js} +2 -2
  3. package/dist/{api-schema-manifest-Ckuac2Uz.js.map → api-schema-manifest-BiPbewoh.js.map} +1 -1
  4. package/dist/{api-schema-manifest-BC-yts9Q.cjs → api-schema-manifest-BqgRfP-2.cjs} +2 -2
  5. package/dist/{api-schema-manifest-BC-yts9Q.cjs.map → api-schema-manifest-BqgRfP-2.cjs.map} +1 -1
  6. package/dist/docs/SKILL.md +1 -1
  7. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  8. package/dist/{observability-new-endpoints-BGXu1TX-.cjs → observability-new-endpoints-BxXDVoQ0.cjs} +36 -7
  9. package/dist/observability-new-endpoints-BxXDVoQ0.cjs.map +1 -0
  10. package/dist/{observability-new-endpoints-CsXPhgyd.js → observability-new-endpoints-C_om-Dj7.js} +31 -8
  11. package/dist/observability-new-endpoints-C_om-Dj7.js.map +1 -0
  12. package/dist/{routes-DCdH7ljX.js → routes-CCD8Q7x1.js} +3 -2
  13. package/dist/routes-CCD8Q7x1.js.map +1 -0
  14. package/dist/{routes-BAnhbh9P.cjs → routes-DYQWvd_y.cjs} +3 -2
  15. package/dist/routes-DYQWvd_y.cjs.map +1 -0
  16. package/dist/server/handlers/observability-new-endpoints.cjs +2 -1
  17. package/dist/server/handlers/observability-new-endpoints.d.ts +286 -0
  18. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  19. package/dist/server/handlers/observability-new-endpoints.js +2 -2
  20. package/dist/server/handlers/observability-shared.cjs +7 -0
  21. package/dist/server/handlers/observability-shared.cjs.map +1 -1
  22. package/dist/server/handlers/observability-shared.d.ts +7 -0
  23. package/dist/server/handlers/observability-shared.d.ts.map +1 -1
  24. package/dist/server/handlers/observability-shared.js +7 -0
  25. package/dist/server/handlers/observability-shared.js.map +1 -1
  26. package/dist/server/handlers/observability.cjs +4 -2
  27. package/dist/server/handlers/observability.cjs.map +1 -1
  28. package/dist/server/handlers/observability.js +4 -3
  29. package/dist/server/handlers/observability.js.map +1 -1
  30. package/dist/server/handlers/system.cjs +1 -1
  31. package/dist/server/handlers/system.js +1 -1
  32. package/dist/server/server-adapter/index.cjs +14 -1
  33. package/dist/server/server-adapter/index.cjs.map +1 -1
  34. package/dist/server/server-adapter/index.d.ts +8 -0
  35. package/dist/server/server-adapter/index.d.ts.map +1 -1
  36. package/dist/server/server-adapter/index.js +14 -1
  37. package/dist/server/server-adapter/index.js.map +1 -1
  38. package/dist/server/server-adapter/routes/observability.d.ts +142 -0
  39. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  40. package/package.json +9 -9
  41. package/dist/observability-new-endpoints-BGXu1TX-.cjs.map +0 -1
  42. package/dist/observability-new-endpoints-CsXPhgyd.js.map +0 -1
  43. package/dist/routes-BAnhbh9P.cjs.map +0 -1
  44. package/dist/routes-DCdH7ljX.js.map +0 -1
@@ -1016,6 +1016,7 @@ export declare const LIST_FEEDBACK: Omit<import("@mastra/core/server").ApiRoute,
1016
1016
  feedbackUserId?: string | null | undefined;
1017
1017
  sourceId?: string | null | undefined;
1018
1018
  metadata?: Record<string, unknown> | null | undefined;
1019
+ reviewStatus: "needs-review" | "reviewed";
1019
1020
  }[];
1020
1021
  }>;
1021
1022
  pathParamSchema?: z.ZodType;
@@ -1080,6 +1081,10 @@ export declare const LIST_FEEDBACK: Omit<import("@mastra/core/server").ApiRoute,
1080
1081
  feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1081
1082
  sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1082
1083
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1084
+ reviewStatus: z.ZodEnum<{
1085
+ "needs-review": "needs-review";
1086
+ reviewed: "reviewed";
1087
+ }>;
1083
1088
  }, z.core.$strip>>;
1084
1089
  }, z.core.$strip>> | undefined;
1085
1090
  } & {
@@ -1129,6 +1134,7 @@ export declare const CREATE_FEEDBACK: Omit<import("@mastra/core/server").ApiRout
1129
1134
  feedbackUserId?: string | null | undefined;
1130
1135
  sourceId?: string | null | undefined;
1131
1136
  metadata?: Record<string, unknown> | null | undefined;
1137
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
1132
1138
  };
1133
1139
  } & ServerContext): Promise<{
1134
1140
  success: boolean;
@@ -1181,6 +1187,10 @@ export declare const CREATE_FEEDBACK: Omit<import("@mastra/core/server").ApiRout
1181
1187
  feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1182
1188
  sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1183
1189
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1190
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
1191
+ "needs-review": "needs-review";
1192
+ reviewed: "reviewed";
1193
+ }>>;
1184
1194
  }, z.core.$strip>;
1185
1195
  }, z.core.$strip>, z.ZodObject<{
1186
1196
  success: z.ZodBoolean;
@@ -1188,6 +1198,119 @@ export declare const CREATE_FEEDBACK: Omit<import("@mastra/core/server").ApiRout
1188
1198
  } & {
1189
1199
  readonly _mastraSchemaRoute: true;
1190
1200
  };
1201
+ export declare const UPDATE_FEEDBACK_REVIEW_STATUS: Omit<import("@mastra/core/server").ApiRoute, "createHandler" | "handler" | "method" | "openapi" | "path"> & {
1202
+ method: string;
1203
+ path: `/${string}`;
1204
+ responseType: "json";
1205
+ streamFormat?: 'sse' | 'stream';
1206
+ sseFlushOnConnect?: boolean;
1207
+ handler(params: {
1208
+ feedbackId: string;
1209
+ } & {
1210
+ reviewStatus: "needs-review" | "reviewed";
1211
+ } & ServerContext): Promise<{
1212
+ entityType?: import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType | null | undefined;
1213
+ entityId?: string | null | undefined;
1214
+ entityName?: string | null | undefined;
1215
+ parentEntityType?: import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType | null | undefined;
1216
+ parentEntityId?: string | null | undefined;
1217
+ parentEntityName?: string | null | undefined;
1218
+ rootEntityType?: import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType | null | undefined;
1219
+ rootEntityId?: string | null | undefined;
1220
+ rootEntityName?: string | null | undefined;
1221
+ userId?: string | null | undefined;
1222
+ organizationId?: string | null | undefined;
1223
+ resourceId?: string | null | undefined;
1224
+ runId?: string | null | undefined;
1225
+ sessionId?: string | null | undefined;
1226
+ threadId?: string | null | undefined;
1227
+ requestId?: string | null | undefined;
1228
+ environment?: string | null | undefined;
1229
+ serviceName?: string | null | undefined;
1230
+ scope?: Record<string, unknown> | null | undefined;
1231
+ entityVersionId?: string | null | undefined;
1232
+ parentEntityVersionId?: string | null | undefined;
1233
+ rootEntityVersionId?: string | null | undefined;
1234
+ experimentId?: string | null | undefined;
1235
+ executionSource?: string | null | undefined;
1236
+ tags?: string[] | null | undefined;
1237
+ feedbackId?: string | null | undefined;
1238
+ timestamp: Date;
1239
+ traceId?: string | null | undefined;
1240
+ spanId?: string | null | undefined;
1241
+ feedbackSource?: string | null | undefined;
1242
+ source?: string | null | undefined;
1243
+ feedbackType: string;
1244
+ value: string | number;
1245
+ comment?: string | null | undefined;
1246
+ feedbackUserId?: string | null | undefined;
1247
+ sourceId?: string | null | undefined;
1248
+ metadata?: Record<string, unknown> | null | undefined;
1249
+ reviewStatus: "needs-review" | "reviewed";
1250
+ }>;
1251
+ pathParamSchema?: z.ZodType;
1252
+ queryParamSchema?: z.ZodType;
1253
+ bodySchema?: z.ZodType;
1254
+ responseSchema?: z.ZodType;
1255
+ openapi?: import("../server-adapter/openapi-utils").OpenAPIRoute;
1256
+ maxBodySize?: number;
1257
+ deprecated?: boolean;
1258
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
1259
+ fga?: import("@mastra/core/auth").FGARouteConfig;
1260
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
1261
+ readonly __schemas?: import("../server-adapter").RouteSchemas<z.ZodObject<{
1262
+ feedbackId: z.ZodString;
1263
+ }, z.core.$strip>, undefined, z.ZodObject<{
1264
+ reviewStatus: z.ZodEnum<{
1265
+ "needs-review": "needs-review";
1266
+ reviewed: "reviewed";
1267
+ }>;
1268
+ }, z.core.$strip>, z.ZodObject<{
1269
+ entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType>>>;
1270
+ entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1271
+ entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1272
+ parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType>>>;
1273
+ parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1274
+ parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1275
+ rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType>>>;
1276
+ rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1277
+ rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1278
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1279
+ organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1280
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1281
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1282
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1283
+ threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1284
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1285
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1286
+ serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1287
+ scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1288
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1289
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1290
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1291
+ experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1292
+ executionSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1293
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1294
+ feedbackId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1295
+ timestamp: z.ZodDate;
1296
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1297
+ spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1298
+ feedbackSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1299
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1300
+ feedbackType: z.ZodString;
1301
+ value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
1302
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1303
+ feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1304
+ sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1305
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1306
+ reviewStatus: z.ZodEnum<{
1307
+ "needs-review": "needs-review";
1308
+ reviewed: "reviewed";
1309
+ }>;
1310
+ }, z.core.$strip>> | undefined;
1311
+ } & {
1312
+ readonly _mastraSchemaRoute: true;
1313
+ };
1191
1314
  export declare const GET_FEEDBACK_AGGREGATE: Omit<import("@mastra/core/server").ApiRoute, "createHandler" | "handler" | "method" | "openapi" | "path"> & {
1192
1315
  method: string;
1193
1316
  path: `/${string}`;
@@ -1232,6 +1355,7 @@ export declare const GET_FEEDBACK_AGGREGATE: Omit<import("@mastra/core/server").
1232
1355
  feedbackSource?: string | undefined;
1233
1356
  source?: string | undefined;
1234
1357
  feedbackUserId?: string | undefined;
1358
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
1235
1359
  } | undefined;
1236
1360
  comparePeriod?: "previous_day" | "previous_period" | "previous_week" | undefined;
1237
1361
  } & ServerContext): Promise<{
@@ -1295,6 +1419,10 @@ export declare const GET_FEEDBACK_AGGREGATE: Omit<import("@mastra/core/server").
1295
1419
  feedbackSource: z.ZodOptional<z.ZodString>;
1296
1420
  source: z.ZodOptional<z.ZodString>;
1297
1421
  feedbackUserId: z.ZodOptional<z.ZodString>;
1422
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
1423
+ "needs-review": "needs-review";
1424
+ reviewed: "reviewed";
1425
+ }>>;
1298
1426
  }, z.core.$strip>>;
1299
1427
  comparePeriod: z.ZodOptional<z.ZodEnum<{
1300
1428
  previous_day: "previous_day";
@@ -1354,6 +1482,7 @@ export declare const GET_FEEDBACK_BREAKDOWN: Omit<import("@mastra/core/server").
1354
1482
  feedbackSource?: string | undefined;
1355
1483
  source?: string | undefined;
1356
1484
  feedbackUserId?: string | undefined;
1485
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
1357
1486
  } | undefined;
1358
1487
  } & ServerContext): Promise<{
1359
1488
  groups: {
@@ -1418,6 +1547,10 @@ export declare const GET_FEEDBACK_BREAKDOWN: Omit<import("@mastra/core/server").
1418
1547
  feedbackSource: z.ZodOptional<z.ZodString>;
1419
1548
  source: z.ZodOptional<z.ZodString>;
1420
1549
  feedbackUserId: z.ZodOptional<z.ZodString>;
1550
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
1551
+ "needs-review": "needs-review";
1552
+ reviewed: "reviewed";
1553
+ }>>;
1421
1554
  }, z.core.$strip>>;
1422
1555
  }, z.core.$strip>, z.ZodObject<{
1423
1556
  groups: z.ZodArray<z.ZodObject<{
@@ -1473,6 +1606,7 @@ export declare const GET_FEEDBACK_TIME_SERIES: Omit<import("@mastra/core/server"
1473
1606
  feedbackSource?: string | undefined;
1474
1607
  source?: string | undefined;
1475
1608
  feedbackUserId?: string | undefined;
1609
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
1476
1610
  } | undefined;
1477
1611
  groupBy?: string[] | undefined;
1478
1612
  } & ServerContext): Promise<{
@@ -1547,6 +1681,10 @@ export declare const GET_FEEDBACK_TIME_SERIES: Omit<import("@mastra/core/server"
1547
1681
  feedbackSource: z.ZodOptional<z.ZodString>;
1548
1682
  source: z.ZodOptional<z.ZodString>;
1549
1683
  feedbackUserId: z.ZodOptional<z.ZodString>;
1684
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
1685
+ "needs-review": "needs-review";
1686
+ reviewed: "reviewed";
1687
+ }>>;
1550
1688
  }, z.core.$strip>>;
1551
1689
  groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
1552
1690
  }, z.core.$strip>, z.ZodObject<{
@@ -1606,6 +1744,7 @@ export declare const GET_FEEDBACK_PERCENTILES: Omit<import("@mastra/core/server"
1606
1744
  feedbackSource?: string | undefined;
1607
1745
  source?: string | undefined;
1608
1746
  feedbackUserId?: string | undefined;
1747
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
1609
1748
  } | undefined;
1610
1749
  } & ServerContext): Promise<{
1611
1750
  series: {
@@ -1671,6 +1810,10 @@ export declare const GET_FEEDBACK_PERCENTILES: Omit<import("@mastra/core/server"
1671
1810
  feedbackSource: z.ZodOptional<z.ZodString>;
1672
1811
  source: z.ZodOptional<z.ZodString>;
1673
1812
  feedbackUserId: z.ZodOptional<z.ZodString>;
1813
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
1814
+ "needs-review": "needs-review";
1815
+ reviewed: "reviewed";
1816
+ }>>;
1674
1817
  }, z.core.$strip>>;
1675
1818
  }, z.core.$strip>, z.ZodObject<{
1676
1819
  series: z.ZodArray<z.ZodObject<{
@@ -3626,6 +3769,7 @@ export declare const NEW_ROUTES: {
3626
3769
  feedbackUserId?: string | null | undefined;
3627
3770
  sourceId?: string | null | undefined;
3628
3771
  metadata?: Record<string, unknown> | null | undefined;
3772
+ reviewStatus: "needs-review" | "reviewed";
3629
3773
  }[];
3630
3774
  }>;
3631
3775
  pathParamSchema?: z.ZodType;
@@ -3690,6 +3834,10 @@ export declare const NEW_ROUTES: {
3690
3834
  feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3691
3835
  sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3692
3836
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
3837
+ reviewStatus: z.ZodEnum<{
3838
+ "needs-review": "needs-review";
3839
+ reviewed: "reviewed";
3840
+ }>;
3693
3841
  }, z.core.$strip>>;
3694
3842
  }, z.core.$strip>> | undefined;
3695
3843
  } & {
@@ -3739,6 +3887,7 @@ export declare const NEW_ROUTES: {
3739
3887
  feedbackUserId?: string | null | undefined;
3740
3888
  sourceId?: string | null | undefined;
3741
3889
  metadata?: Record<string, unknown> | null | undefined;
3890
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
3742
3891
  };
3743
3892
  } & ServerContext): Promise<{
3744
3893
  success: boolean;
@@ -3791,6 +3940,10 @@ export declare const NEW_ROUTES: {
3791
3940
  feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3792
3941
  sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3793
3942
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
3943
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
3944
+ "needs-review": "needs-review";
3945
+ reviewed: "reviewed";
3946
+ }>>;
3794
3947
  }, z.core.$strip>;
3795
3948
  }, z.core.$strip>, z.ZodObject<{
3796
3949
  success: z.ZodBoolean;
@@ -3798,6 +3951,119 @@ export declare const NEW_ROUTES: {
3798
3951
  } & {
3799
3952
  readonly _mastraSchemaRoute: true;
3800
3953
  };
3954
+ UPDATE_FEEDBACK_REVIEW_STATUS: Omit<import("@mastra/core/server").ApiRoute, "createHandler" | "handler" | "method" | "openapi" | "path"> & {
3955
+ method: string;
3956
+ path: `/${string}`;
3957
+ responseType: "json";
3958
+ streamFormat?: 'sse' | 'stream';
3959
+ sseFlushOnConnect?: boolean;
3960
+ handler(params: {
3961
+ feedbackId: string;
3962
+ } & {
3963
+ reviewStatus: "needs-review" | "reviewed";
3964
+ } & ServerContext): Promise<{
3965
+ entityType?: import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType | null | undefined;
3966
+ entityId?: string | null | undefined;
3967
+ entityName?: string | null | undefined;
3968
+ parentEntityType?: import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType | null | undefined;
3969
+ parentEntityId?: string | null | undefined;
3970
+ parentEntityName?: string | null | undefined;
3971
+ rootEntityType?: import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType | null | undefined;
3972
+ rootEntityId?: string | null | undefined;
3973
+ rootEntityName?: string | null | undefined;
3974
+ userId?: string | null | undefined;
3975
+ organizationId?: string | null | undefined;
3976
+ resourceId?: string | null | undefined;
3977
+ runId?: string | null | undefined;
3978
+ sessionId?: string | null | undefined;
3979
+ threadId?: string | null | undefined;
3980
+ requestId?: string | null | undefined;
3981
+ environment?: string | null | undefined;
3982
+ serviceName?: string | null | undefined;
3983
+ scope?: Record<string, unknown> | null | undefined;
3984
+ entityVersionId?: string | null | undefined;
3985
+ parentEntityVersionId?: string | null | undefined;
3986
+ rootEntityVersionId?: string | null | undefined;
3987
+ experimentId?: string | null | undefined;
3988
+ executionSource?: string | null | undefined;
3989
+ tags?: string[] | null | undefined;
3990
+ feedbackId?: string | null | undefined;
3991
+ timestamp: Date;
3992
+ traceId?: string | null | undefined;
3993
+ spanId?: string | null | undefined;
3994
+ feedbackSource?: string | null | undefined;
3995
+ source?: string | null | undefined;
3996
+ feedbackType: string;
3997
+ value: string | number;
3998
+ comment?: string | null | undefined;
3999
+ feedbackUserId?: string | null | undefined;
4000
+ sourceId?: string | null | undefined;
4001
+ metadata?: Record<string, unknown> | null | undefined;
4002
+ reviewStatus: "needs-review" | "reviewed";
4003
+ }>;
4004
+ pathParamSchema?: z.ZodType;
4005
+ queryParamSchema?: z.ZodType;
4006
+ bodySchema?: z.ZodType;
4007
+ responseSchema?: z.ZodType;
4008
+ openapi?: import("../server-adapter/openapi-utils").OpenAPIRoute;
4009
+ maxBodySize?: number;
4010
+ deprecated?: boolean;
4011
+ requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
4012
+ fga?: import("@mastra/core/auth").FGARouteConfig;
4013
+ onValidationError?: import("@mastra/core/server").ValidationErrorHook;
4014
+ readonly __schemas?: import("../server-adapter").RouteSchemas<z.ZodObject<{
4015
+ feedbackId: z.ZodString;
4016
+ }, z.core.$strip>, undefined, z.ZodObject<{
4017
+ reviewStatus: z.ZodEnum<{
4018
+ "needs-review": "needs-review";
4019
+ reviewed: "reviewed";
4020
+ }>;
4021
+ }, z.core.$strip>, z.ZodObject<{
4022
+ entityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType>>>;
4023
+ entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4024
+ entityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4025
+ parentEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType>>>;
4026
+ parentEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4027
+ parentEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4028
+ rootEntityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("../../_types/@internal_core/dist/storage/index.d.ts").EntityType>>>;
4029
+ rootEntityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4030
+ rootEntityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4031
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4032
+ organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4033
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4034
+ runId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4035
+ sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4036
+ threadId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4037
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4038
+ environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4039
+ serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4040
+ scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4041
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4042
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4043
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4044
+ experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4045
+ executionSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4046
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
4047
+ feedbackId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4048
+ timestamp: z.ZodDate;
4049
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4050
+ spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4051
+ feedbackSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4052
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4053
+ feedbackType: z.ZodString;
4054
+ value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
4055
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4056
+ feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4057
+ sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4058
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4059
+ reviewStatus: z.ZodEnum<{
4060
+ "needs-review": "needs-review";
4061
+ reviewed: "reviewed";
4062
+ }>;
4063
+ }, z.core.$strip>> | undefined;
4064
+ } & {
4065
+ readonly _mastraSchemaRoute: true;
4066
+ };
3801
4067
  GET_FEEDBACK_AGGREGATE: Omit<import("@mastra/core/server").ApiRoute, "createHandler" | "handler" | "method" | "openapi" | "path"> & {
3802
4068
  method: string;
3803
4069
  path: `/${string}`;
@@ -3842,6 +4108,7 @@ export declare const NEW_ROUTES: {
3842
4108
  feedbackSource?: string | undefined;
3843
4109
  source?: string | undefined;
3844
4110
  feedbackUserId?: string | undefined;
4111
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
3845
4112
  } | undefined;
3846
4113
  comparePeriod?: "previous_day" | "previous_period" | "previous_week" | undefined;
3847
4114
  } & ServerContext): Promise<{
@@ -3905,6 +4172,10 @@ export declare const NEW_ROUTES: {
3905
4172
  feedbackSource: z.ZodOptional<z.ZodString>;
3906
4173
  source: z.ZodOptional<z.ZodString>;
3907
4174
  feedbackUserId: z.ZodOptional<z.ZodString>;
4175
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
4176
+ "needs-review": "needs-review";
4177
+ reviewed: "reviewed";
4178
+ }>>;
3908
4179
  }, z.core.$strip>>;
3909
4180
  comparePeriod: z.ZodOptional<z.ZodEnum<{
3910
4181
  previous_day: "previous_day";
@@ -3964,6 +4235,7 @@ export declare const NEW_ROUTES: {
3964
4235
  feedbackSource?: string | undefined;
3965
4236
  source?: string | undefined;
3966
4237
  feedbackUserId?: string | undefined;
4238
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
3967
4239
  } | undefined;
3968
4240
  } & ServerContext): Promise<{
3969
4241
  groups: {
@@ -4028,6 +4300,10 @@ export declare const NEW_ROUTES: {
4028
4300
  feedbackSource: z.ZodOptional<z.ZodString>;
4029
4301
  source: z.ZodOptional<z.ZodString>;
4030
4302
  feedbackUserId: z.ZodOptional<z.ZodString>;
4303
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
4304
+ "needs-review": "needs-review";
4305
+ reviewed: "reviewed";
4306
+ }>>;
4031
4307
  }, z.core.$strip>>;
4032
4308
  }, z.core.$strip>, z.ZodObject<{
4033
4309
  groups: z.ZodArray<z.ZodObject<{
@@ -4083,6 +4359,7 @@ export declare const NEW_ROUTES: {
4083
4359
  feedbackSource?: string | undefined;
4084
4360
  source?: string | undefined;
4085
4361
  feedbackUserId?: string | undefined;
4362
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
4086
4363
  } | undefined;
4087
4364
  groupBy?: string[] | undefined;
4088
4365
  } & ServerContext): Promise<{
@@ -4157,6 +4434,10 @@ export declare const NEW_ROUTES: {
4157
4434
  feedbackSource: z.ZodOptional<z.ZodString>;
4158
4435
  source: z.ZodOptional<z.ZodString>;
4159
4436
  feedbackUserId: z.ZodOptional<z.ZodString>;
4437
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
4438
+ "needs-review": "needs-review";
4439
+ reviewed: "reviewed";
4440
+ }>>;
4160
4441
  }, z.core.$strip>>;
4161
4442
  groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
4162
4443
  }, z.core.$strip>, z.ZodObject<{
@@ -4216,6 +4497,7 @@ export declare const NEW_ROUTES: {
4216
4497
  feedbackSource?: string | undefined;
4217
4498
  source?: string | undefined;
4218
4499
  feedbackUserId?: string | undefined;
4500
+ reviewStatus?: "needs-review" | "reviewed" | undefined;
4219
4501
  } | undefined;
4220
4502
  } & ServerContext): Promise<{
4221
4503
  series: {
@@ -4281,6 +4563,10 @@ export declare const NEW_ROUTES: {
4281
4563
  feedbackSource: z.ZodOptional<z.ZodString>;
4282
4564
  source: z.ZodOptional<z.ZodString>;
4283
4565
  feedbackUserId: z.ZodOptional<z.ZodString>;
4566
+ reviewStatus: z.ZodOptional<z.ZodEnum<{
4567
+ "needs-review": "needs-review";
4568
+ reviewed: "reviewed";
4569
+ }>>;
4284
4570
  }, z.core.$strip>>;
4285
4571
  }, z.core.$strip>, z.ZodObject<{
4286
4572
  series: z.ZodArray<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"observability-new-endpoints.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/observability-new-endpoints.ts"],"names":[],"mappings":"AAgEA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAe,aAAa,EAAsB,MAAM,0BAA0B,CAAC;AA2D/F,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBpB,CAAC;AAMH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUvB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BtB,CAAC"}
@@ -1,2 +1,2 @@
1
- import { C as GET_TAGS, D as LIST_SCORES, E as LIST_METRICS, O as NEW_ROUTES, S as GET_SERVICE_NAMES, T as LIST_LOGS, _ as GET_SCORE, a as GET_ENVIRONMENTS, b as GET_SCORE_PERCENTILES, c as GET_FEEDBACK_PERCENTILES, d as GET_METRIC_BREAKDOWN, f as GET_METRIC_LABEL_KEYS, g as GET_METRIC_TIME_SERIES, h as GET_METRIC_PERCENTILES, i as GET_ENTITY_TYPES, l as GET_FEEDBACK_TIME_SERIES, m as GET_METRIC_NAMES, n as CREATE_SCORE, o as GET_FEEDBACK_AGGREGATE, p as GET_METRIC_LABEL_VALUES, r as GET_ENTITY_NAMES, s as GET_FEEDBACK_BREAKDOWN, t as CREATE_FEEDBACK, u as GET_METRIC_AGGREGATE, v as GET_SCORE_AGGREGATE, w as LIST_FEEDBACK, x as GET_SCORE_TIME_SERIES, y as GET_SCORE_BREAKDOWN } from "../../observability-new-endpoints-CsXPhgyd.js";
2
- export { CREATE_FEEDBACK, CREATE_SCORE, GET_ENTITY_NAMES, GET_ENTITY_TYPES, GET_ENVIRONMENTS, GET_FEEDBACK_AGGREGATE, GET_FEEDBACK_BREAKDOWN, GET_FEEDBACK_PERCENTILES, GET_FEEDBACK_TIME_SERIES, GET_METRIC_AGGREGATE, GET_METRIC_BREAKDOWN, GET_METRIC_LABEL_KEYS, GET_METRIC_LABEL_VALUES, GET_METRIC_NAMES, GET_METRIC_PERCENTILES, GET_METRIC_TIME_SERIES, GET_SCORE, GET_SCORE_AGGREGATE, GET_SCORE_BREAKDOWN, GET_SCORE_PERCENTILES, GET_SCORE_TIME_SERIES, GET_SERVICE_NAMES, GET_TAGS, LIST_FEEDBACK, LIST_LOGS, LIST_METRICS, LIST_SCORES, NEW_ROUTES };
1
+ import { C as GET_TAGS, D as LIST_SCORES, E as LIST_METRICS, O as NEW_ROUTES, S as GET_SERVICE_NAMES, T as LIST_LOGS, _ as GET_SCORE, a as GET_ENVIRONMENTS, b as GET_SCORE_PERCENTILES, c as GET_FEEDBACK_PERCENTILES, d as GET_METRIC_BREAKDOWN, f as GET_METRIC_LABEL_KEYS, g as GET_METRIC_TIME_SERIES, h as GET_METRIC_PERCENTILES, i as GET_ENTITY_TYPES, k as UPDATE_FEEDBACK_REVIEW_STATUS, l as GET_FEEDBACK_TIME_SERIES, m as GET_METRIC_NAMES, n as CREATE_SCORE, o as GET_FEEDBACK_AGGREGATE, p as GET_METRIC_LABEL_VALUES, r as GET_ENTITY_NAMES, s as GET_FEEDBACK_BREAKDOWN, t as CREATE_FEEDBACK, u as GET_METRIC_AGGREGATE, v as GET_SCORE_AGGREGATE, w as LIST_FEEDBACK, x as GET_SCORE_TIME_SERIES, y as GET_SCORE_BREAKDOWN } from "../../observability-new-endpoints-C_om-Dj7.js";
2
+ export { CREATE_FEEDBACK, CREATE_SCORE, GET_ENTITY_NAMES, GET_ENTITY_TYPES, GET_ENVIRONMENTS, GET_FEEDBACK_AGGREGATE, GET_FEEDBACK_BREAKDOWN, GET_FEEDBACK_PERCENTILES, GET_FEEDBACK_TIME_SERIES, GET_METRIC_AGGREGATE, GET_METRIC_BREAKDOWN, GET_METRIC_LABEL_KEYS, GET_METRIC_LABEL_VALUES, GET_METRIC_NAMES, GET_METRIC_PERCENTILES, GET_METRIC_TIME_SERIES, GET_SCORE, GET_SCORE_AGGREGATE, GET_SCORE_BREAKDOWN, GET_SCORE_PERCENTILES, GET_SCORE_TIME_SERIES, GET_SERVICE_NAMES, GET_TAGS, LIST_FEEDBACK, LIST_LOGS, LIST_METRICS, LIST_SCORES, NEW_ROUTES, UPDATE_FEEDBACK_REVIEW_STATUS };
@@ -114,6 +114,13 @@ const NEW_ROUTE_DEFS = {
114
114
  summary: "Create feedback",
115
115
  description: "Creates a single feedback record in the observability store"
116
116
  },
117
+ UPDATE_FEEDBACK_REVIEW_STATUS: {
118
+ method: "PATCH",
119
+ path: "/observability/feedback/:feedbackId/review-status",
120
+ summary: "Update feedback review status",
121
+ description: "Updates a feedback record's review workflow status",
122
+ requiresPermission: "observability:write"
123
+ },
117
124
  GET_FEEDBACK_AGGREGATE: {
118
125
  method: "POST",
119
126
  path: "/observability/feedback/aggregate",
@@ -1 +1 @@
1
- {"version":3,"file":"observability-shared.cjs","names":["candidate","HTTPException","coreFeatures","z","paginationArgsSchema","wrapSchemaForQueryParams","listModeSchema","deltaCursorSchema","deltaLimitSchema"],"sources":["../../../src/server/handlers/observability-shared.ts"],"sourcesContent":["import type { Mastra } from '@mastra/core';\nimport { coreFeatures } from '@mastra/core/features';\nimport type { MastraCompositeStore, ObservabilityStorage, ScoresStorage } from '@mastra/core/storage';\nimport { z } from 'zod/v4';\nimport { HTTPException } from '../http-exception';\nimport type { ServerRoute } from '../server-adapter/routes';\nimport { wrapSchemaForQueryParams } from '../server-adapter/routes/route-builder';\nimport {\n deltaCursorSchema,\n deltaLimitSchema,\n listModeSchema,\n paginationArgsSchema,\n} from './observability-list-query-schemas';\n\nexport const OBSERVABILITY_DELTA_POLLING_FEATURE = 'observability-delta-polling';\nexport const OBSERVABILITY_DELTA_POLLING_UPGRADE_MESSAGE =\n 'Delta polling requires a newer @mastra/core with observability delta polling support. Please upgrade.';\n\nexport const OBSERVABILITY_LIST_ENDPOINTS = {\n traces: 'traces',\n branches: 'branches',\n logs: 'logs',\n metrics: 'metrics',\n scores: 'scores',\n feedback: 'feedback',\n} as const;\n\nexport type ObservabilityListEndpoint =\n (typeof OBSERVABILITY_LIST_ENDPOINTS)[keyof typeof OBSERVABILITY_LIST_ENDPOINTS];\nconst OBSERVABILITY_DELTA_POLLING_STORAGE_FEATURE = 'delta-polling';\n\nfunction getFeatures(observabilityStore: ObservabilityStorage): readonly string[] | undefined {\n const candidate = observabilityStore as ObservabilityStorage & {\n getFeatures?: () => readonly string[] | undefined;\n };\n return candidate.getFeatures?.();\n}\n\n/** Retrieves MastraCompositeStore or throws 500 if unavailable. */\nexport function getStorage(mastra: Mastra): MastraCompositeStore {\n const storage = mastra.getStorage();\n if (!storage) {\n throw new HTTPException(500, { message: 'Storage is not available' });\n }\n return storage;\n}\n\n/** Retrieves the observability storage domain or throws 501 if unavailable. */\nexport async function getObservabilityStore(mastra: Mastra): Promise<ObservabilityStorage> {\n const storage = getStorage(mastra);\n const observability = await storage.getStore('observability');\n if (!observability) {\n // 501, not 500: a missing or explicitly disabled observability domain\n // (e.g. `domains: { observability: false }`) is a capability gap, not a\n // server failure — matching the other 501s in this file.\n throw new HTTPException(501, { message: 'Observability storage domain is not available' });\n }\n return observability;\n}\n\n/** Retrieves the scores storage domain or throws 501 if unavailable. */\nexport async function getScoresStore(mastra: Mastra): Promise<ScoresStorage> {\n const storage = getStorage(mastra);\n const scores = await storage.getStore('scores');\n if (!scores) {\n throw new HTTPException(501, { message: 'Scores storage domain is not available' });\n }\n return scores;\n}\n\nexport function assertObservabilityDeltaSupported(\n observabilityStore: ObservabilityStorage,\n endpoint: ObservabilityListEndpoint,\n) {\n if (!coreFeatures.has(OBSERVABILITY_DELTA_POLLING_FEATURE)) {\n throw new HTTPException(501, {\n message: `${OBSERVABILITY_DELTA_POLLING_UPGRADE_MESSAGE} (endpoint: ${endpoint})`,\n });\n }\n\n if (getFeatures(observabilityStore)?.includes(OBSERVABILITY_DELTA_POLLING_STORAGE_FEATURE)) {\n return;\n }\n\n throw new HTTPException(501, {\n message: `Delta polling is not supported by the configured observability store for ${endpoint}`,\n });\n}\n\nexport interface RouteDetails {\n method: ServerRoute['method'];\n path: `/${string}`;\n summary: string;\n description: string;\n requiresPermission?: ServerRoute['requiresPermission'];\n}\n\nexport const NEW_ROUTE_DEFS = {\n LIST_METRICS: {\n method: 'GET',\n path: '/observability/metrics',\n summary: 'List metrics',\n description: 'Returns a paginated list of metrics with optional filtering and sorting',\n },\n\n LIST_LOGS: {\n method: 'GET',\n path: '/observability/logs',\n summary: 'List logs',\n description: 'Returns a paginated list of logs with optional filtering and sorting',\n },\n\n LIST_SCORES: {\n method: 'GET',\n path: '/observability/scores',\n summary: 'List scores',\n description: 'Returns a paginated list of scores with optional filtering and sorting',\n },\n\n CREATE_SCORE: {\n method: 'POST',\n path: '/observability/scores',\n summary: 'Create a score',\n description: 'Creates a single score record in the observability store',\n },\n\n GET_SCORE: {\n method: 'GET',\n path: '/observability/scores/:scoreId',\n summary: 'Get score',\n description: 'Returns a single score by scoreId',\n },\n\n GET_SCORE_AGGREGATE: {\n method: 'POST',\n path: '/observability/scores/aggregate',\n summary: 'Get score aggregate',\n description: 'Returns an aggregated score value with optional period-over-period comparison',\n requiresPermission: 'observability:read',\n },\n\n GET_SCORE_BREAKDOWN: {\n method: 'POST',\n path: '/observability/scores/breakdown',\n summary: 'Get score breakdown',\n description: 'Returns score values grouped by specified dimensions',\n requiresPermission: 'observability:read',\n },\n\n GET_SCORE_TIME_SERIES: {\n method: 'POST',\n path: '/observability/scores/timeseries',\n summary: 'Get score time series',\n description: 'Returns score values bucketed by time interval with optional grouping',\n requiresPermission: 'observability:read',\n },\n\n GET_SCORE_PERCENTILES: {\n method: 'POST',\n path: '/observability/scores/percentiles',\n summary: 'Get score percentiles',\n description: 'Returns percentile values for a score bucketed by time interval',\n requiresPermission: 'observability:read',\n },\n\n LIST_FEEDBACK: {\n method: 'GET',\n path: '/observability/feedback',\n summary: 'List feedback',\n description: 'Returns a paginated list of feedback with optional filtering and sorting',\n },\n\n CREATE_FEEDBACK: {\n method: 'POST',\n path: '/observability/feedback',\n summary: 'Create feedback',\n description: 'Creates a single feedback record in the observability store',\n },\n\n GET_FEEDBACK_AGGREGATE: {\n method: 'POST',\n path: '/observability/feedback/aggregate',\n summary: 'Get feedback aggregate',\n description: 'Returns an aggregated numeric feedback value with optional period-over-period comparison',\n requiresPermission: 'observability:read',\n },\n\n GET_FEEDBACK_BREAKDOWN: {\n method: 'POST',\n path: '/observability/feedback/breakdown',\n summary: 'Get feedback breakdown',\n description: 'Returns numeric feedback values grouped by specified dimensions',\n requiresPermission: 'observability:read',\n },\n\n GET_FEEDBACK_TIME_SERIES: {\n method: 'POST',\n path: '/observability/feedback/timeseries',\n summary: 'Get feedback time series',\n description: 'Returns numeric feedback values bucketed by time interval with optional grouping',\n requiresPermission: 'observability:read',\n },\n\n GET_FEEDBACK_PERCENTILES: {\n method: 'POST',\n path: '/observability/feedback/percentiles',\n summary: 'Get feedback percentiles',\n description: 'Returns percentile values for numeric feedback bucketed by time interval',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_AGGREGATE: {\n method: 'POST',\n path: '/observability/metrics/aggregate',\n summary: 'Get metric aggregate',\n description: 'Returns an aggregated metric value with optional period-over-period comparison',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_BREAKDOWN: {\n method: 'POST',\n path: '/observability/metrics/breakdown',\n summary: 'Get metric breakdown',\n description: 'Returns metric values grouped by specified dimensions',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_TIME_SERIES: {\n method: 'POST',\n path: '/observability/metrics/timeseries',\n summary: 'Get metric time series',\n description: 'Returns metric values bucketed by time interval with optional grouping',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_PERCENTILES: {\n method: 'POST',\n path: '/observability/metrics/percentiles',\n summary: 'Get metric percentiles',\n description: 'Returns percentile values for a metric bucketed by time interval',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_NAMES: {\n method: 'GET',\n path: '/observability/discovery/metric-names',\n summary: 'Get metric names',\n description: 'Returns distinct metric names with optional prefix filtering',\n },\n\n GET_METRIC_LABEL_KEYS: {\n method: 'GET',\n path: '/observability/discovery/metric-label-keys',\n summary: 'Get metric label keys',\n description: 'Returns distinct label keys for a given metric',\n },\n\n GET_METRIC_LABEL_VALUES: {\n method: 'GET',\n path: '/observability/discovery/metric-label-values',\n summary: 'Get label values',\n description: 'Returns distinct values for a given metric label key',\n },\n\n GET_ENTITY_TYPES: {\n method: 'GET',\n path: '/observability/discovery/entity-types',\n summary: 'Get entity types',\n description: 'Returns distinct entity types from observability data',\n },\n\n GET_ENTITY_NAMES: {\n method: 'GET',\n path: '/observability/discovery/entity-names',\n summary: 'Get entity names',\n description: 'Returns distinct entity names with optional type filtering',\n },\n\n GET_SERVICE_NAMES: {\n method: 'GET',\n path: '/observability/discovery/service-names',\n summary: 'Get service names',\n description: 'Returns distinct service names from observability data',\n },\n\n GET_ENVIRONMENTS: {\n method: 'GET',\n path: '/observability/discovery/environments',\n summary: 'Get environments',\n description: 'Returns distinct environments from observability data',\n },\n\n GET_TAGS: {\n method: 'GET',\n path: '/observability/discovery/tags',\n summary: 'Get tags',\n description: 'Returns distinct tags with optional entity type filtering',\n },\n} as const satisfies Record<string, RouteDetails>;\n\nexport type NewRoutesKey = keyof typeof NEW_ROUTE_DEFS;\nexport type NewRoutesDefinitions = (typeof NEW_ROUTE_DEFS)[NewRoutesKey];\n\nexport function createObservabilityListQuerySchema<\n TFilter extends z.ZodObject<z.ZodRawShape>,\n TOrderBy extends z.ZodObject<z.ZodRawShape>,\n>(filterSchema: TFilter, orderBySchema: TOrderBy) {\n const unwrapDefault = (schema: unknown) => {\n const zodSchema = schema as z.ZodTypeAny;\n return zodSchema instanceof z.ZodDefault ? zodSchema.unwrap() : zodSchema;\n };\n const paginationShape = paginationArgsSchema.shape as unknown as Record<string, z.ZodTypeAny>;\n const orderByShape = orderBySchema.shape as unknown as Record<string, z.ZodTypeAny>;\n\n const pageSchema = unwrapDefault(paginationShape.page);\n const perPageSchema = unwrapDefault(paginationShape.perPage);\n const fieldSchema = orderByShape.field ? unwrapDefault(orderByShape.field) : z.never().optional();\n const directionSchema = orderByShape.direction ? unwrapDefault(orderByShape.direction) : z.never().optional();\n\n return wrapSchemaForQueryParams(\n z\n .object({\n ...filterSchema.shape,\n page: pageSchema,\n perPage: perPageSchema,\n field: fieldSchema,\n direction: directionSchema,\n mode: listModeSchema.optional(),\n after: deltaCursorSchema.optional(),\n limit: deltaLimitSchema,\n })\n .partial(),\n ).superRefine((value, ctx) => {\n const isDelta = value.mode === 'delta';\n const hasPagination = value.page !== undefined || value.perPage !== undefined;\n const hasOrderBy = value.field !== undefined || value.direction !== undefined;\n const hasAfter = value.after !== undefined;\n const hasLimit = value.limit !== undefined;\n\n if (isDelta) {\n if (hasPagination) {\n if (value.page !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['page'],\n message: '`page` is not allowed when `mode=delta`',\n });\n }\n if (value.perPage !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['perPage'],\n message: '`perPage` is not allowed when `mode=delta`',\n });\n }\n }\n if (hasOrderBy) {\n if (value.field !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['field'],\n message: '`field` is not allowed when `mode=delta`',\n });\n }\n if (value.direction !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['direction'],\n message: '`direction` is not allowed when `mode=delta`',\n });\n }\n }\n return;\n }\n\n if (hasAfter) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['after'],\n message: '`after` is only allowed when `mode=delta`',\n });\n }\n if (hasLimit) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['limit'],\n message: '`limit` is only allowed when `mode=delta`',\n });\n }\n });\n}\n"],"mappings":";;;;;;;;AAcA,MAAa,sCAAsC;AACnD,MAAa,8CACX;AAEF,MAAa,+BAA+B;CAC1C,QAAQ;CACR,UAAU;CACV,MAAM;CACN,SAAS;CACT,QAAQ;CACR,UAAU;AACZ;AAIA,MAAM,8CAA8C;AAEpD,SAAS,YAAY,oBAAyE;CAI5F,OAAOA,mBAAU,cAAc;AACjC;;AAGA,SAAgB,WAAW,QAAsC;CAC/D,MAAM,UAAU,OAAO,WAAW;CAClC,IAAI,CAAC,SACH,MAAM,IAAIC,uBAAAA,cAAc,KAAK,EAAE,SAAS,2BAA2B,CAAC;CAEtE,OAAO;AACT;;AAGA,eAAsB,sBAAsB,QAA+C;CAEzF,MAAM,gBAAgB,MADN,WAAW,MACO,CAAC,CAAC,SAAS,eAAe;CAC5D,IAAI,CAAC,eAIH,MAAM,IAAIA,uBAAAA,cAAc,KAAK,EAAE,SAAS,gDAAgD,CAAC;CAE3F,OAAO;AACT;;AAGA,eAAsB,eAAe,QAAwC;CAE3E,MAAM,SAAS,MADC,WAAW,MACA,CAAC,CAAC,SAAS,QAAQ;CAC9C,IAAI,CAAC,QACH,MAAM,IAAIA,uBAAAA,cAAc,KAAK,EAAE,SAAS,yCAAyC,CAAC;CAEpF,OAAO;AACT;AAEA,SAAgB,kCACd,oBACA,UACA;CACA,IAAI,CAACC,sBAAAA,aAAa,IAAA,6BAAuC,GACvD,MAAM,IAAID,uBAAAA,cAAc,KAAK,EAC3B,SAAS,G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A,EAAE,aAAa;GACrB,MAAM,CAAC,OAAO;GACd,SAAS;EACX,CAAC;EAEH,IAAI,UACF,IAAI,SAAS;GACX,MAAMA,OAAAA,EAAE,aAAa;GACrB,MAAM,CAAC,OAAO;GACd,SAAS;EACX,CAAC;CAEL,CAAC;AACH"}
1
+ {"version":3,"file":"observability-shared.cjs","names":["candidate","HTTPException","coreFeatures","z","paginationArgsSchema","wrapSchemaForQueryParams","listModeSchema","deltaCursorSchema","deltaLimitSchema"],"sources":["../../../src/server/handlers/observability-shared.ts"],"sourcesContent":["import type { Mastra } from '@mastra/core';\nimport { coreFeatures } from '@mastra/core/features';\nimport type { MastraCompositeStore, ObservabilityStorage, ScoresStorage } from '@mastra/core/storage';\nimport { z } from 'zod/v4';\nimport { HTTPException } from '../http-exception';\nimport type { ServerRoute } from '../server-adapter/routes';\nimport { wrapSchemaForQueryParams } from '../server-adapter/routes/route-builder';\nimport {\n deltaCursorSchema,\n deltaLimitSchema,\n listModeSchema,\n paginationArgsSchema,\n} from './observability-list-query-schemas';\n\nexport const OBSERVABILITY_DELTA_POLLING_FEATURE = 'observability-delta-polling';\nexport const OBSERVABILITY_DELTA_POLLING_UPGRADE_MESSAGE =\n 'Delta polling requires a newer @mastra/core with observability delta polling support. Please upgrade.';\n\nexport const OBSERVABILITY_LIST_ENDPOINTS = {\n traces: 'traces',\n branches: 'branches',\n logs: 'logs',\n metrics: 'metrics',\n scores: 'scores',\n feedback: 'feedback',\n} as const;\n\nexport type ObservabilityListEndpoint =\n (typeof OBSERVABILITY_LIST_ENDPOINTS)[keyof typeof OBSERVABILITY_LIST_ENDPOINTS];\nconst OBSERVABILITY_DELTA_POLLING_STORAGE_FEATURE = 'delta-polling';\n\nfunction getFeatures(observabilityStore: ObservabilityStorage): readonly string[] | undefined {\n const candidate = observabilityStore as ObservabilityStorage & {\n getFeatures?: () => readonly string[] | undefined;\n };\n return candidate.getFeatures?.();\n}\n\n/** Retrieves MastraCompositeStore or throws 500 if unavailable. */\nexport function getStorage(mastra: Mastra): MastraCompositeStore {\n const storage = mastra.getStorage();\n if (!storage) {\n throw new HTTPException(500, { message: 'Storage is not available' });\n }\n return storage;\n}\n\n/** Retrieves the observability storage domain or throws 501 if unavailable. */\nexport async function getObservabilityStore(mastra: Mastra): Promise<ObservabilityStorage> {\n const storage = getStorage(mastra);\n const observability = await storage.getStore('observability');\n if (!observability) {\n // 501, not 500: a missing or explicitly disabled observability domain\n // (e.g. `domains: { observability: false }`) is a capability gap, not a\n // server failure — matching the other 501s in this file.\n throw new HTTPException(501, { message: 'Observability storage domain is not available' });\n }\n return observability;\n}\n\n/** Retrieves the scores storage domain or throws 501 if unavailable. */\nexport async function getScoresStore(mastra: Mastra): Promise<ScoresStorage> {\n const storage = getStorage(mastra);\n const scores = await storage.getStore('scores');\n if (!scores) {\n throw new HTTPException(501, { message: 'Scores storage domain is not available' });\n }\n return scores;\n}\n\nexport function assertObservabilityDeltaSupported(\n observabilityStore: ObservabilityStorage,\n endpoint: ObservabilityListEndpoint,\n) {\n if (!coreFeatures.has(OBSERVABILITY_DELTA_POLLING_FEATURE)) {\n throw new HTTPException(501, {\n message: `${OBSERVABILITY_DELTA_POLLING_UPGRADE_MESSAGE} (endpoint: ${endpoint})`,\n });\n }\n\n if (getFeatures(observabilityStore)?.includes(OBSERVABILITY_DELTA_POLLING_STORAGE_FEATURE)) {\n return;\n }\n\n throw new HTTPException(501, {\n message: `Delta polling is not supported by the configured observability store for ${endpoint}`,\n });\n}\n\nexport interface RouteDetails {\n method: ServerRoute['method'];\n path: `/${string}`;\n summary: string;\n description: string;\n requiresPermission?: ServerRoute['requiresPermission'];\n}\n\nexport const NEW_ROUTE_DEFS = {\n LIST_METRICS: {\n method: 'GET',\n path: '/observability/metrics',\n summary: 'List metrics',\n description: 'Returns a paginated list of metrics with optional filtering and sorting',\n },\n\n LIST_LOGS: {\n method: 'GET',\n path: '/observability/logs',\n summary: 'List logs',\n description: 'Returns a paginated list of logs with optional filtering and sorting',\n },\n\n LIST_SCORES: {\n method: 'GET',\n path: '/observability/scores',\n summary: 'List scores',\n description: 'Returns a paginated list of scores with optional filtering and sorting',\n },\n\n CREATE_SCORE: {\n method: 'POST',\n path: '/observability/scores',\n summary: 'Create a score',\n description: 'Creates a single score record in the observability store',\n },\n\n GET_SCORE: {\n method: 'GET',\n path: '/observability/scores/:scoreId',\n summary: 'Get score',\n description: 'Returns a single score by scoreId',\n },\n\n GET_SCORE_AGGREGATE: {\n method: 'POST',\n path: '/observability/scores/aggregate',\n summary: 'Get score aggregate',\n description: 'Returns an aggregated score value with optional period-over-period comparison',\n requiresPermission: 'observability:read',\n },\n\n GET_SCORE_BREAKDOWN: {\n method: 'POST',\n path: '/observability/scores/breakdown',\n summary: 'Get score breakdown',\n description: 'Returns score values grouped by specified dimensions',\n requiresPermission: 'observability:read',\n },\n\n GET_SCORE_TIME_SERIES: {\n method: 'POST',\n path: '/observability/scores/timeseries',\n summary: 'Get score time series',\n description: 'Returns score values bucketed by time interval with optional grouping',\n requiresPermission: 'observability:read',\n },\n\n GET_SCORE_PERCENTILES: {\n method: 'POST',\n path: '/observability/scores/percentiles',\n summary: 'Get score percentiles',\n description: 'Returns percentile values for a score bucketed by time interval',\n requiresPermission: 'observability:read',\n },\n\n LIST_FEEDBACK: {\n method: 'GET',\n path: '/observability/feedback',\n summary: 'List feedback',\n description: 'Returns a paginated list of feedback with optional filtering and sorting',\n },\n\n CREATE_FEEDBACK: {\n method: 'POST',\n path: '/observability/feedback',\n summary: 'Create feedback',\n description: 'Creates a single feedback record in the observability store',\n },\n\n UPDATE_FEEDBACK_REVIEW_STATUS: {\n method: 'PATCH',\n path: '/observability/feedback/:feedbackId/review-status',\n summary: 'Update feedback review status',\n description: \"Updates a feedback record's review workflow status\",\n requiresPermission: 'observability:write',\n },\n\n GET_FEEDBACK_AGGREGATE: {\n method: 'POST',\n path: '/observability/feedback/aggregate',\n summary: 'Get feedback aggregate',\n description: 'Returns an aggregated numeric feedback value with optional period-over-period comparison',\n requiresPermission: 'observability:read',\n },\n\n GET_FEEDBACK_BREAKDOWN: {\n method: 'POST',\n path: '/observability/feedback/breakdown',\n summary: 'Get feedback breakdown',\n description: 'Returns numeric feedback values grouped by specified dimensions',\n requiresPermission: 'observability:read',\n },\n\n GET_FEEDBACK_TIME_SERIES: {\n method: 'POST',\n path: '/observability/feedback/timeseries',\n summary: 'Get feedback time series',\n description: 'Returns numeric feedback values bucketed by time interval with optional grouping',\n requiresPermission: 'observability:read',\n },\n\n GET_FEEDBACK_PERCENTILES: {\n method: 'POST',\n path: '/observability/feedback/percentiles',\n summary: 'Get feedback percentiles',\n description: 'Returns percentile values for numeric feedback bucketed by time interval',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_AGGREGATE: {\n method: 'POST',\n path: '/observability/metrics/aggregate',\n summary: 'Get metric aggregate',\n description: 'Returns an aggregated metric value with optional period-over-period comparison',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_BREAKDOWN: {\n method: 'POST',\n path: '/observability/metrics/breakdown',\n summary: 'Get metric breakdown',\n description: 'Returns metric values grouped by specified dimensions',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_TIME_SERIES: {\n method: 'POST',\n path: '/observability/metrics/timeseries',\n summary: 'Get metric time series',\n description: 'Returns metric values bucketed by time interval with optional grouping',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_PERCENTILES: {\n method: 'POST',\n path: '/observability/metrics/percentiles',\n summary: 'Get metric percentiles',\n description: 'Returns percentile values for a metric bucketed by time interval',\n requiresPermission: 'observability:read',\n },\n\n GET_METRIC_NAMES: {\n method: 'GET',\n path: '/observability/discovery/metric-names',\n summary: 'Get metric names',\n description: 'Returns distinct metric names with optional prefix filtering',\n },\n\n GET_METRIC_LABEL_KEYS: {\n method: 'GET',\n path: '/observability/discovery/metric-label-keys',\n summary: 'Get metric label keys',\n description: 'Returns distinct label keys for a given metric',\n },\n\n GET_METRIC_LABEL_VALUES: {\n method: 'GET',\n path: '/observability/discovery/metric-label-values',\n summary: 'Get label values',\n description: 'Returns distinct values for a given metric label key',\n },\n\n GET_ENTITY_TYPES: {\n method: 'GET',\n path: '/observability/discovery/entity-types',\n summary: 'Get entity types',\n description: 'Returns distinct entity types from observability data',\n },\n\n GET_ENTITY_NAMES: {\n method: 'GET',\n path: '/observability/discovery/entity-names',\n summary: 'Get entity names',\n description: 'Returns distinct entity names with optional type filtering',\n },\n\n GET_SERVICE_NAMES: {\n method: 'GET',\n path: '/observability/discovery/service-names',\n summary: 'Get service names',\n description: 'Returns distinct service names from observability data',\n },\n\n GET_ENVIRONMENTS: {\n method: 'GET',\n path: '/observability/discovery/environments',\n summary: 'Get environments',\n description: 'Returns distinct environments from observability data',\n },\n\n GET_TAGS: {\n method: 'GET',\n path: '/observability/discovery/tags',\n summary: 'Get tags',\n description: 'Returns distinct tags with optional entity type filtering',\n },\n} as const satisfies Record<string, RouteDetails>;\n\nexport type NewRoutesKey = keyof typeof NEW_ROUTE_DEFS;\nexport type NewRoutesDefinitions = (typeof NEW_ROUTE_DEFS)[NewRoutesKey];\n\nexport function createObservabilityListQuerySchema<\n TFilter extends z.ZodObject<z.ZodRawShape>,\n TOrderBy extends z.ZodObject<z.ZodRawShape>,\n>(filterSchema: TFilter, orderBySchema: TOrderBy) {\n const unwrapDefault = (schema: unknown) => {\n const zodSchema = schema as z.ZodTypeAny;\n return zodSchema instanceof z.ZodDefault ? zodSchema.unwrap() : zodSchema;\n };\n const paginationShape = paginationArgsSchema.shape as unknown as Record<string, z.ZodTypeAny>;\n const orderByShape = orderBySchema.shape as unknown as Record<string, z.ZodTypeAny>;\n\n const pageSchema = unwrapDefault(paginationShape.page);\n const perPageSchema = unwrapDefault(paginationShape.perPage);\n const fieldSchema = orderByShape.field ? unwrapDefault(orderByShape.field) : z.never().optional();\n const directionSchema = orderByShape.direction ? unwrapDefault(orderByShape.direction) : z.never().optional();\n\n return wrapSchemaForQueryParams(\n z\n .object({\n ...filterSchema.shape,\n page: pageSchema,\n perPage: perPageSchema,\n field: fieldSchema,\n direction: directionSchema,\n mode: listModeSchema.optional(),\n after: deltaCursorSchema.optional(),\n limit: deltaLimitSchema,\n })\n .partial(),\n ).superRefine((value, ctx) => {\n const isDelta = value.mode === 'delta';\n const hasPagination = value.page !== undefined || value.perPage !== undefined;\n const hasOrderBy = value.field !== undefined || value.direction !== undefined;\n const hasAfter = value.after !== undefined;\n const hasLimit = value.limit !== undefined;\n\n if (isDelta) {\n if (hasPagination) {\n if (value.page !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['page'],\n message: '`page` is not allowed when `mode=delta`',\n });\n }\n if (value.perPage !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['perPage'],\n message: '`perPage` is not allowed when `mode=delta`',\n });\n }\n }\n if (hasOrderBy) {\n if (value.field !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['field'],\n message: '`field` is not allowed when `mode=delta`',\n });\n }\n if (value.direction !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['direction'],\n message: '`direction` is not allowed when `mode=delta`',\n });\n }\n }\n return;\n }\n\n if (hasAfter) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['after'],\n message: '`after` is only allowed when `mode=delta`',\n });\n }\n if (hasLimit) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['limit'],\n message: '`limit` is only allowed when `mode=delta`',\n });\n }\n });\n}\n"],"mappings":";;;;;;;;AAcA,MAAa,sCAAsC;AACnD,MAAa,8CACX;AAEF,MAAa,+BAA+B;CAC1C,QAAQ;CACR,UAAU;CACV,MAAM;CACN,SAAS;CACT,QAAQ;CACR,UAAU;AACZ;AAIA,MAAM,8CAA8C;AAEpD,SAAS,YAAY,oBAAyE;CAI5F,OAAOA,mBAAU,cAAc;AACjC;;AAGA,SAAgB,WAAW,QAAsC;CAC/D,MAAM,UAAU,OAAO,WAAW;CAClC,IAAI,CAAC,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W,MAAM,UAAU,KAAA;EACjC,MAAM,WAAW,MAAM,UAAU,KAAA;EAEjC,IAAI,SAAS;GACX,IAAI,eAAe;IACjB,IAAI,MAAM,SAAS,KAAA,GACjB,IAAI,SAAS;KACX,MAAML,OAAAA,EAAE,aAAa;KACrB,MAAM,CAAC,MAAM;KACb,SAAS;IACX,CAAC;IAEH,IAAI,MAAM,YAAY,KAAA,GACpB,IAAI,SAAS;KACX,MAAMA,OAAAA,EAAE,aAAa;KACrB,MAAM,CAAC,SAAS;KAChB,SAAS;IACX,CAAC;GAEL;GACA,IAAI,YAAY;IACd,IAAI,MAAM,UAAU,KAAA,GAClB,IAAI,SAAS;KACX,MAAMA,OAAAA,EAAE,aAAa;KACrB,MAAM,CAAC,OAAO;KACd,SAAS;IACX,CAAC;IAEH,IAAI,MAAM,cAAc,KAAA,GACtB,IAAI,SAAS;KACX,MAAMA,OAAAA,EAAE,aAAa;KACrB,MAAM,CAAC,WAAW;KAClB,SAAS;IACX,CAAC;GAEL;GACA;EACF;EAEA,IAAI,UACF,IAAI,SAAS;GACX,MAAMA,OAAAA,EAAE,aAAa;GACrB,MAAM,CAAC,OAAO;GACd,SAAS;EACX,CAAC;EAEH,IAAI,UACF,IAAI,SAAS;GACX,MAAMA,OAAAA,EAAE,aAAa;GACrB,MAAM,CAAC,OAAO;GACd,SAAS;EACX,CAAC;CAEL,CAAC;AACH"}
@@ -98,6 +98,13 @@ export declare const NEW_ROUTE_DEFS: {
98
98
  readonly summary: 'Create feedback';
99
99
  readonly description: 'Creates a single feedback record in the observability store';
100
100
  };
101
+ readonly UPDATE_FEEDBACK_REVIEW_STATUS: {
102
+ readonly method: 'PATCH';
103
+ readonly path: '/observability/feedback/:feedbackId/review-status';
104
+ readonly summary: 'Update feedback review status';
105
+ readonly description: "Updates a feedback record's review workflow status";
106
+ readonly requiresPermission: 'observability:write';
107
+ };
101
108
  readonly GET_FEEDBACK_AGGREGATE: {
102
109
  readonly method: 'POST';
103
110
  readonly path: '/observability/feedback/aggregate';