From 8259b9e9f6b8f26449d5ae87b19505c3cbc8b87a Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Wed, 30 Oct 2024 14:33:51 +0200 Subject: [PATCH] feat: update orval schema (#8595) --- frontend/src/openapi/models/eventSchema.ts | 4 +-- .../models/featureSearchResponseSchema.ts | 2 -- .../src/openapi/models/featureTypeSchema.ts | 2 +- .../personalDashboardProjectDetailsSchema.ts | 6 ++-- ...alDashboardProjectDetailsSchemaInsights.ts | 36 +++++++++++++++---- ...ardProjectDetailsSchemaLatestEventsItem.ts | 3 +- ...hboardProjectDetailsSchemaRolesItemType.ts | 2 -- .../personalDashboardSchemaProjectsItem.ts | 15 ++++++-- .../openapi/models/searchFeaturesParams.ts | 4 +++ frontend/src/openapi/models/uiConfigSchema.ts | 2 ++ 10 files changed, 54 insertions(+), 22 deletions(-) diff --git a/frontend/src/openapi/models/eventSchema.ts b/frontend/src/openapi/models/eventSchema.ts index 40a6f3ff17fa..1bfd2ab963ba 100644 --- a/frontend/src/openapi/models/eventSchema.ts +++ b/frontend/src/openapi/models/eventSchema.ts @@ -42,7 +42,7 @@ export interface EventSchema { */ id: number; /** - * **[Experimental]** The concise, human-readable name of the event. + * The concise, human-readable name of the event. * @nullable */ label?: string | null; @@ -57,7 +57,7 @@ export interface EventSchema { */ project?: string | null; /** - * **[Experimental]** A markdown-formatted summary of the event. + * A markdown-formatted summary of the event. * @nullable */ summary?: string | null; diff --git a/frontend/src/openapi/models/featureSearchResponseSchema.ts b/frontend/src/openapi/models/featureSearchResponseSchema.ts index 14d1d7567344..5eb92e962e00 100644 --- a/frontend/src/openapi/models/featureSearchResponseSchema.ts +++ b/frontend/src/openapi/models/featureSearchResponseSchema.ts @@ -15,8 +15,6 @@ import type { VariantSchema } from './variantSchema'; * A feature flag definition */ export interface FeatureSearchResponseSchema { - /** `true` if the feature is archived */ - archived?: boolean; /** * The date the feature was archived * @nullable diff --git a/frontend/src/openapi/models/featureTypeSchema.ts b/frontend/src/openapi/models/featureTypeSchema.ts index 7d1ee7edb9ec..f95a1e8afd32 100644 --- a/frontend/src/openapi/models/featureTypeSchema.ts +++ b/frontend/src/openapi/models/featureTypeSchema.ts @@ -5,7 +5,7 @@ */ /** - * A [feature flag type](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types. + * A [feature flag type](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types). */ export interface FeatureTypeSchema { /** A description of what this feature flag type is intended to be used for. */ diff --git a/frontend/src/openapi/models/personalDashboardProjectDetailsSchema.ts b/frontend/src/openapi/models/personalDashboardProjectDetailsSchema.ts index 30dfee7472f4..8cde624f62ed 100644 --- a/frontend/src/openapi/models/personalDashboardProjectDetailsSchema.ts +++ b/frontend/src/openapi/models/personalDashboardProjectDetailsSchema.ts @@ -13,7 +13,7 @@ import type { PersonalDashboardProjectDetailsSchemaRolesItem } from './personalD * Project details in personal dashboard */ export interface PersonalDashboardProjectDetailsSchema { - /** Insights for the project */ + /** Insights for the project, including flag data and project health information. */ insights: PersonalDashboardProjectDetailsSchemaInsights; /** The latest events for the project. */ latestEvents: PersonalDashboardProjectDetailsSchemaLatestEventsItem[]; @@ -21,8 +21,6 @@ export interface PersonalDashboardProjectDetailsSchema { onboardingStatus: PersonalDashboardProjectDetailsSchemaOnboardingStatus; /** The users and/or groups that have the "owner" role in this project. If no such users or groups exist, the list will contain the "system" owner instead. */ owners: PersonalDashboardProjectDetailsSchemaOwners; - /** - * The list of roles that the user has in this project. - */ + /** The list of roles that the user has in this project. */ roles: PersonalDashboardProjectDetailsSchemaRolesItem[]; } diff --git a/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaInsights.ts b/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaInsights.ts index 284f9bb620e2..44523408eece 100644 --- a/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaInsights.ts +++ b/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaInsights.ts @@ -5,22 +5,44 @@ */ /** - * Insights for the project + * Insights for the project, including flag data and project health information. */ export type PersonalDashboardProjectDetailsSchemaInsights = { /** - * The average health score in the current window of the last 4 weeks + * The number of active flags that are not stale or potentially stale + * @minimum 0 + */ + activeFlags: number; + /** + * The project's average health score over the last 4 weeks + * @minimum 0 * @nullable */ avgHealthCurrentWindow: number | null; /** - * The average health score in the previous 4 weeks before the current window + * The project's average health score over the previous 4-week window + * @minimum 0 * @nullable */ avgHealthPastWindow: number | null; - totalFlags: number; - activeFlags: number; - staleFlags: number; - potentiallyStaleFlags: number; + /** + * The project's current health score + * @minimum 0 + */ health: number; + /** + * The number of potentially stale flags as calculated by Unleash + * @minimum 0 + */ + potentiallyStaleFlags: number; + /** + * The current number of flags that have been manually marked as stale + * @minimum 0 + */ + staleFlags: number; + /** + * The current number of non-archived flags + * @minimum 0 + */ + totalFlags: number; }; diff --git a/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaLatestEventsItem.ts b/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaLatestEventsItem.ts index 2341bdaf3b00..a30589ba734d 100644 --- a/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaLatestEventsItem.ts +++ b/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaLatestEventsItem.ts @@ -8,6 +8,8 @@ * An event summary */ export type PersonalDashboardProjectDetailsSchemaLatestEventsItem = { + /** When the event was recorded */ + createdAt: string; /** Which user created this event */ createdBy: string; /** URL used for the user profile image of the event author */ @@ -22,5 +24,4 @@ export type PersonalDashboardProjectDetailsSchemaLatestEventsItem = { * @nullable */ summary: string | null; - createdAt: string; }; diff --git a/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaRolesItemType.ts b/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaRolesItemType.ts index 16931c421637..608590082bab 100644 --- a/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaRolesItemType.ts +++ b/frontend/src/openapi/models/personalDashboardProjectDetailsSchemaRolesItemType.ts @@ -14,6 +14,4 @@ export type PersonalDashboardProjectDetailsSchemaRolesItemType = export const PersonalDashboardProjectDetailsSchemaRolesItemType = { custom: 'custom', project: 'project', - root: 'root', - 'custom-root': 'custom-root', } as const; diff --git a/frontend/src/openapi/models/personalDashboardSchemaProjectsItem.ts b/frontend/src/openapi/models/personalDashboardSchemaProjectsItem.ts index 47672a5b7a56..aa2ecbd6d316 100644 --- a/frontend/src/openapi/models/personalDashboardSchemaProjectsItem.ts +++ b/frontend/src/openapi/models/personalDashboardSchemaProjectsItem.ts @@ -5,13 +5,22 @@ */ export type PersonalDashboardSchemaProjectsItem = { - /** The number of features this project has */ + /** + * The number of features this project has + * @minimum 0 + */ featureCount: number; - /** An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100 */ + /** + * An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100 + * @minimum 0 + */ health: number; /** The id of the project */ id: string; - /** The number of members this project has */ + /** + * The number of members this project has + * @minimum 0 + */ memberCount: number; /** The name of the project */ name: string; diff --git a/frontend/src/openapi/models/searchFeaturesParams.ts b/frontend/src/openapi/models/searchFeaturesParams.ts index 4d2a4266dc46..8042c470ce64 100644 --- a/frontend/src/openapi/models/searchFeaturesParams.ts +++ b/frontend/src/openapi/models/searchFeaturesParams.ts @@ -58,6 +58,10 @@ export type SearchFeaturesParams = { * The flag to indicate if the favorite features should be returned first. By default it is set to false. */ favoritesFirst?: string; + /** + * Whether to get results for archived feature flags or active feature flags. If `true`, Unleash will return only archived flags. If `false`, it will return only active flags. + */ + archived?: string; /** * The date the feature was created. The date can be specified with an operator. The supported operators are IS_BEFORE, IS_ON_OR_AFTER. */ diff --git a/frontend/src/openapi/models/uiConfigSchema.ts b/frontend/src/openapi/models/uiConfigSchema.ts index 7cb033f9a80d..efdf37add500 100644 --- a/frontend/src/openapi/models/uiConfigSchema.ts +++ b/frontend/src/openapi/models/uiConfigSchema.ts @@ -55,6 +55,8 @@ export interface UiConfigSchema { * @deprecated */ strategySegmentsLimit?: number; + /** Whether Unleash AI is available. */ + unleashAIAvailable?: boolean; /** The URL of the Unleash instance. */ unleashUrl: string; /** The current version of Unleash */