Skip to content

Commit

Permalink
feat: update orval schema (#8595)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Oct 30, 2024
1 parent a1d6795 commit 8259b9e
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 22 deletions.
4 changes: 2 additions & 2 deletions frontend/src/openapi/models/eventSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/openapi/models/featureSearchResponseSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/featureTypeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ 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[];
/** The current onboarding status of the project. */
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[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -22,5 +24,4 @@ export type PersonalDashboardProjectDetailsSchemaLatestEventsItem = {
* @nullable
*/
summary: string | null;
createdAt: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ export type PersonalDashboardProjectDetailsSchemaRolesItemType =
export const PersonalDashboardProjectDetailsSchemaRolesItemType = {
custom: 'custom',
project: 'project',
root: 'root',
'custom-root': 'custom-root',
} as const;
15 changes: 12 additions & 3 deletions frontend/src/openapi/models/personalDashboardSchemaProjectsItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/openapi/models/searchFeaturesParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/uiConfigSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 8259b9e

Please sign in to comment.