feat(API): Add fields to insight by time type and export types from index (#14172)

This commit is contained in:
Guillaume Jacquart
2025-03-25 16:48:06 +01:00
committed by GitHub
parent 7fb6eb1488
commit 3d332ab04f
3 changed files with 12 additions and 0 deletions

View File

@@ -32,4 +32,6 @@ export type {
InsightsSummaryType,
InsightsSummaryUnit,
InsightsSummary,
InsightsByWorkflow,
InsightsByTime,
} from './schemas/insights.schema';

View File

@@ -162,6 +162,8 @@ describe('insightsByTimeSchema', () => {
date: '2025-03-25T10:34:36.484Z',
values: {
total: 200,
succeeded: 180,
failed: 20,
failureRate: 10,
averageRunTime: 40,
timeSaved: 100,
@@ -175,6 +177,8 @@ describe('insightsByTimeSchema', () => {
date: '20240325', // Should be a string
values: {
total: 200,
succeeded: 180,
failed: 20,
failureRate: 10,
averageRunTime: 40,
timeSaved: 100,
@@ -188,6 +192,8 @@ describe('insightsByTimeSchema', () => {
date: 20240325, // Should be a string
values: {
total: 200,
succeeded: 180,
failed: 20,
failureRate: 10,
averageRunTime: 40,
timeSaved: 100,
@@ -201,6 +207,8 @@ describe('insightsByTimeSchema', () => {
date: '2025-03-25T10:34:36.484Z',
values: {
total: 200,
succeeded: 180,
failed: 20,
failureRate: 10,
averageRunTime: 40,
},

View File

@@ -74,6 +74,8 @@ export const insightsByTimeDataSchemas = {
values: z
.object({
total: z.number(),
succeeded: z.number(),
failed: z.number(),
failureRate: z.number(),
averageRunTime: z.number(),
timeSaved: z.number(),