-
-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update Frontend schema (#8037)
update types, fix frontend types issues in insights and archive
- Loading branch information
Showing
17 changed files
with
247 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 3 additions & 12 deletions
15
frontend/src/hooks/api/getters/useFeaturesArchive/useFeaturesArchive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Generated by Orval | ||
* Do not edit manually. | ||
* See `gen:api` script in package.json | ||
*/ | ||
import type { ArchivedFeatureSchemaEnvironmentsItem } from './archivedFeatureSchemaEnvironmentsItem'; | ||
|
||
/** | ||
* An archived project feature flag definition | ||
*/ | ||
export interface ArchivedFeatureSchema { | ||
/** The date the feature was archived */ | ||
archivedAt?: string; | ||
/** The date the feature was created */ | ||
createdAt?: string; | ||
/** | ||
* Detailed description of the feature | ||
* @nullable | ||
*/ | ||
description?: string | null; | ||
/** | ||
* The list of environments where the feature can be used | ||
* @deprecated | ||
*/ | ||
environments?: ArchivedFeatureSchemaEnvironmentsItem[]; | ||
/** `true` if the impression data collection is enabled for the feature, otherwise `false`. */ | ||
impressionData?: boolean; | ||
/** | ||
* The date when metrics where last collected for the feature. This field was deprecated in v5, use the one in featureEnvironmentSchema | ||
* @deprecated | ||
* @nullable | ||
*/ | ||
lastSeenAt?: string | null; | ||
/** Unique feature name */ | ||
name: string; | ||
/** Name of the project the feature belongs to */ | ||
project: string; | ||
/** `true` if the feature is stale based on the age and feature type, otherwise `false`. */ | ||
stale?: boolean; | ||
/** Type of the flag e.g. experiment, kill-switch, release, operational, permission */ | ||
type?: string; | ||
} |
17 changes: 17 additions & 0 deletions
17
frontend/src/openapi/models/archivedFeatureSchemaEnvironmentsItem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Generated by Orval | ||
* Do not edit manually. | ||
* See `gen:api` script in package.json | ||
*/ | ||
|
||
export type ArchivedFeatureSchemaEnvironmentsItem = { | ||
/** `true` if the feature is enabled for the environment, otherwise `false`. */ | ||
enabled?: boolean; | ||
/** | ||
* The date when metrics where last collected for the feature environment | ||
* @nullable | ||
*/ | ||
lastSeenAt?: string | null; | ||
/** The name of the environment */ | ||
name?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Generated by Orval | ||
* Do not edit manually. | ||
* See `gen:api` script in package.json | ||
*/ | ||
import type { ArchivedFeatureSchema } from './archivedFeatureSchema'; | ||
|
||
/** | ||
* A list of archived features | ||
*/ | ||
export interface ArchivedFeaturesSchema { | ||
/** A list of features */ | ||
features: ArchivedFeatureSchema[]; | ||
/** The version of the feature's schema */ | ||
version: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
frontend/src/openapi/models/instanceAdminStatsSchemaApiTokens.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Generated by Orval | ||
* Do not edit manually. | ||
* See `gen:api` script in package.json | ||
*/ | ||
|
||
/** | ||
* The number of API tokens in Unleash, split by type | ||
*/ | ||
export type InstanceAdminStatsSchemaApiTokens = { | ||
/** | ||
* The number of admin tokens. | ||
* @minimum 0 | ||
*/ | ||
admin?: number; | ||
/** | ||
* The number of client tokens. | ||
* @minimum 0 | ||
*/ | ||
client?: number; | ||
/** | ||
* The number of frontend tokens. | ||
* @minimum 0 | ||
*/ | ||
frontend?: number; | ||
}; |
13 changes: 0 additions & 13 deletions
13
frontend/src/openapi/models/instanceInsightsSchemaFlags.ts
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
frontend/src/openapi/models/instanceInsightsSchemaUsers.ts
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
frontend/src/openapi/models/projectFeatureEnvironmentSchema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Generated by Orval | ||
* Do not edit manually. | ||
* See `gen:api` script in package.json | ||
*/ | ||
|
||
/** | ||
* A detailed description of the feature environment | ||
*/ | ||
export interface ProjectFeatureEnvironmentSchema { | ||
/** `true` if the feature is enabled for the environment, otherwise `false`. */ | ||
enabled: boolean; | ||
/** Whether the feature has any enabled strategies defined. */ | ||
hasEnabledStrategies?: boolean; | ||
/** Whether the feature has any strategies defined. */ | ||
hasStrategies?: boolean; | ||
/** | ||
* The date when metrics where last collected for the feature environment | ||
* @nullable | ||
*/ | ||
lastSeenAt: string | null; | ||
/** The name of the environment */ | ||
name: string; | ||
/** The sort order of the feature environment in the feature environments list */ | ||
sortOrder: number; | ||
/** The type of the environment */ | ||
type: string; | ||
/** The number of defined variants */ | ||
variantCount: number; | ||
} |
Oops, something went wrong.