diff --git a/frontend/src/hooks/api/getters/useInsights/useInsights.ts b/frontend/src/hooks/api/getters/useInsights/useInsights.ts index fce0e715d2..b5043b3628 100644 --- a/frontend/src/hooks/api/getters/useInsights/useInsights.ts +++ b/frontend/src/hooks/api/getters/useInsights/useInsights.ts @@ -34,6 +34,7 @@ export const useInsights = ( metricsSummaryTrends: [], environmentTypeTrends: [], lifecycleTrends: [], + creationArchiveTrends: [], } as InstanceInsightsSchema), refetchInsights, loading: !error && !data, diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 3d3d38d720..06e1fed3fc 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -894,6 +894,8 @@ export * from './instanceAdminStatsSchemaClientAppsItemRange.js'; export * from './instanceAdminStatsSchemaPreviousDayMetricsBucketsCount.js'; export * from './instanceAdminStatsSchemaProductionChanges.js'; export * from './instanceInsightsSchema.js'; +export * from './instanceInsightsSchemaCreationArchiveTrendsItem.js'; +export * from './instanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags.js'; export * from './instanceInsightsSchemaEnvironmentTypeTrendsItem.js'; export * from './instanceInsightsSchemaFlagTrendsItem.js'; export * from './instanceInsightsSchemaLifecycleTrendsItem.js'; diff --git a/frontend/src/openapi/models/instanceInsightsSchema.ts b/frontend/src/openapi/models/instanceInsightsSchema.ts index e9559ac035..b087427ae9 100644 --- a/frontend/src/openapi/models/instanceInsightsSchema.ts +++ b/frontend/src/openapi/models/instanceInsightsSchema.ts @@ -3,6 +3,7 @@ * Do not edit manually. * See `gen:api` script in package.json */ +import type { InstanceInsightsSchemaCreationArchiveTrendsItem } from './instanceInsightsSchemaCreationArchiveTrendsItem.js'; import type { InstanceInsightsSchemaEnvironmentTypeTrendsItem } from './instanceInsightsSchemaEnvironmentTypeTrendsItem.js'; import type { InstanceInsightsSchemaFlagTrendsItem } from './instanceInsightsSchemaFlagTrendsItem.js'; import type { InstanceInsightsSchemaLifecycleTrendsItem } from './instanceInsightsSchemaLifecycleTrendsItem.js'; @@ -14,6 +15,8 @@ import type { InstanceInsightsSchemaUserTrendsItem } from './instanceInsightsSch * A summary of this Unleash instance's usage statistics, including user and flag counts, and trends over time. */ export interface InstanceInsightsSchema { + /** Weekly count of created vs archived flags by project and flag type */ + creationArchiveTrends: InstanceInsightsSchemaCreationArchiveTrendsItem[]; /** How updates per environment type changed over time */ environmentTypeTrends: InstanceInsightsSchemaEnvironmentTypeTrendsItem[]; /** How number of flags changed over time */ diff --git a/frontend/src/openapi/models/instanceInsightsSchemaCreationArchiveTrendsItem.ts b/frontend/src/openapi/models/instanceInsightsSchemaCreationArchiveTrendsItem.ts new file mode 100644 index 0000000000..d3ece31f4e --- /dev/null +++ b/frontend/src/openapi/models/instanceInsightsSchemaCreationArchiveTrendsItem.ts @@ -0,0 +1,22 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { InstanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags } from './instanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags.js'; + +export type InstanceInsightsSchemaCreationArchiveTrendsItem = { + /** + * Total count of archived flags during this week + * @minimum 0 + */ + archivedFlags: number; + /** Count of newly created flags by flag type */ + createdFlags: InstanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags; + /** A UTC date when the stats were captured. Time is the very end of a given week. */ + date: string; + /** Project id that the flags belong to */ + project: string; + /** Year and week in a given year for which the stats were calculated */ + week: string; +}; diff --git a/frontend/src/openapi/models/instanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags.ts b/frontend/src/openapi/models/instanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags.ts new file mode 100644 index 0000000000..67901c14cc --- /dev/null +++ b/frontend/src/openapi/models/instanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags.ts @@ -0,0 +1,12 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * Count of newly created flags by flag type + */ +export type InstanceInsightsSchemaCreationArchiveTrendsItemCreatedFlags = { + [key: string]: number; +};