Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: orval with project insights #6621

Merged
merged 3 commits into from Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions frontend/src/openapi/models/actionDefinitionParameterSchema.ts
@@ -0,0 +1,23 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionDefinitionParameterSchemaName } from './actionDefinitionParameterSchemaName';
import type { ActionDefinitionParameterSchemaType } from './actionDefinitionParameterSchemaType';

/**
* Defines a parameter for an action.
*/
export interface ActionDefinitionParameterSchema {
/** The label of the parameter. */
label: string;
/** The name of the parameter. */
name: ActionDefinitionParameterSchemaName;
/** Whether the parameter is optional. */
optional?: boolean;
/** Lists of options to be used for the parameter. */
options?: string[];
/** The parameter type. */
type: ActionDefinitionParameterSchemaType;
}
19 changes: 19 additions & 0 deletions frontend/src/openapi/models/actionDefinitionParameterSchemaName.ts
@@ -0,0 +1,19 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The name of the parameter.
*/
export type ActionDefinitionParameterSchemaName =
(typeof ActionDefinitionParameterSchemaName)[keyof typeof ActionDefinitionParameterSchemaName];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ActionDefinitionParameterSchemaName = {
project: 'project',
environment: 'environment',
featureName: 'featureName',
tag: 'tag',
} as const;
17 changes: 17 additions & 0 deletions frontend/src/openapi/models/actionDefinitionParameterSchemaType.ts
@@ -0,0 +1,17 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The parameter type.
*/
export type ActionDefinitionParameterSchemaType =
(typeof ActionDefinitionParameterSchemaType)[keyof typeof ActionDefinitionParameterSchemaType];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ActionDefinitionParameterSchemaType = {
select: 'select',
hidden: 'hidden',
} as const;
22 changes: 22 additions & 0 deletions frontend/src/openapi/models/actionDefinitionSchema.ts
@@ -0,0 +1,22 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionDefinitionParameterSchema } from './actionDefinitionParameterSchema';

/**
* Configuration of a single action and its parameters.
*/
export interface ActionDefinitionSchema {
/** The category of the action. */
category: string;
/** A description for the action. */
description: string;
/** The label of the action. */
label: string;
/** The parameters required to perform the action. */
parameters: ActionDefinitionParameterSchema[];
/** The permissions required to perform the action. */
permissions: string[];
}
16 changes: 16 additions & 0 deletions frontend/src/openapi/models/actionDefinitionsConfigSchema.ts
@@ -0,0 +1,16 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ActionDefinitionSchema } from './actionDefinitionSchema';

/**
* Configuration of different actions and their parameters.
*/
export interface ActionDefinitionsConfigSchema {
TOGGLE_FEATURE_OFF?: ActionDefinitionSchema;
TOGGLE_FEATURE_ON?: ActionDefinitionSchema;
TOGGLE_FEATURES_OFF_BY_TAG?: ActionDefinitionSchema;
TOGGLE_FEATURES_ON_BY_TAG?: ActionDefinitionSchema;
}
Expand Up @@ -7,4 +7,4 @@
/**
* Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose. Consult the documentation for details.
*/
export type AddonCreateUpdateSchemaParameters = { [key: string]: unknown };
export type AddonCreateUpdateSchemaParameters = { [key: string]: {} };
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/addonSchemaParameters.ts
Expand Up @@ -7,4 +7,4 @@
/**
* Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose.
*/
export type AddonSchemaParameters = { [key: string]: unknown };
export type AddonSchemaParameters = { [key: string]: {} };
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getProjectInsights401.ts
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetProjectInsights401 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getProjectInsights403.ts
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetProjectInsights403 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/getProjectInsights404.ts
@@ -0,0 +1,14 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

export type GetProjectInsights404 = {
/** The ID of the error instance */
id?: string;
/** A description of what went wrong. */
message?: string;
/** The name of the error kind */
name?: string;
};
14 changes: 14 additions & 0 deletions frontend/src/openapi/models/index.ts
Expand Up @@ -7,6 +7,11 @@
export * from './_exportFormat';
export * from './_exportParams';
export * from './accessOverviewSchema';
export * from './actionDefinitionParameterSchema';
export * from './actionDefinitionParameterSchemaName';
export * from './actionDefinitionParameterSchemaType';
export * from './actionDefinitionSchema';
export * from './actionDefinitionsConfigSchema';
export * from './actionEventSchema';
export * from './actionEventSchemaExecutionParams';
export * from './actionEventSchemaState';
Expand Down Expand Up @@ -673,6 +678,9 @@ export * from './getProjectEnvironments404';
export * from './getProjectHealthReport401';
export * from './getProjectHealthReport403';
export * from './getProjectHealthReport404';
export * from './getProjectInsights401';
export * from './getProjectInsights403';
export * from './getProjectInsights404';
export * from './getProjectOverview401';
export * from './getProjectOverview403';
export * from './getProjectOverview404';
Expand Down Expand Up @@ -827,6 +835,7 @@ export * from './patchFeatureVariants403';
export * from './patchFeatureVariants404';
export * from './patchSchema';
export * from './patchSchemaOp';
export * from './patchSchemaValue';
export * from './patchesSchema';
export * from './patsSchema';
export * from './permissionSchema';
Expand Down Expand Up @@ -867,6 +876,10 @@ export * from './projectCreatedSchema';
export * from './projectCreatedSchemaMode';
export * from './projectDoraMetricsSchema';
export * from './projectEnvironmentSchema';
export * from './projectInsightsSchema';
export * from './projectInsightsSchemaChangeRequests';
export * from './projectInsightsSchemaHealth';
export * from './projectInsightsSchemaMembers';
export * from './projectOverviewSchema';
export * from './projectOverviewSchemaMode';
export * from './projectRoleSchema';
Expand Down Expand Up @@ -1056,6 +1069,7 @@ export * from './toggleFeatureEnvironmentOn400';
export * from './toggleFeatureEnvironmentOn401';
export * from './toggleFeatureEnvironmentOn403';
export * from './toggleFeatureEnvironmentOn404';
export * from './toggleFeaturesByTagActionSchema';
export * from './toggleMaintenance400';
export * from './toggleMaintenance401';
export * from './toggleMaintenance403';
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/openapi/models/patchSchema.ts
Expand Up @@ -4,6 +4,7 @@
* See `gen:api` script in package.json
*/
import type { PatchSchemaOp } from './patchSchemaOp';
import type { PatchSchemaValue } from './patchSchemaValue';

/**
* A [JSON patch](https://www.rfc-editor.org/rfc/rfc6902) operation description
Expand All @@ -16,5 +17,5 @@ export interface PatchSchema {
/** The path to the property to operate on */
path: string;
/** The value to add or replace, if performing one of those operations */
value?: unknown;
value?: PatchSchemaValue;
}
10 changes: 10 additions & 0 deletions frontend/src/openapi/models/patchSchemaValue.ts
@@ -0,0 +1,10 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The value to add or replace, if performing one of those operations
*/
export type PatchSchemaValue = {};
29 changes: 29 additions & 0 deletions frontend/src/openapi/models/projectInsightsSchema.ts
@@ -0,0 +1,29 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { ProjectInsightsSchemaChangeRequests } from './projectInsightsSchemaChangeRequests';
import type { FeatureTypeCountSchema } from './featureTypeCountSchema';
import type { ProjectInsightsSchemaHealth } from './projectInsightsSchemaHealth';
import type { ProjectDoraMetricsSchema } from './projectDoraMetricsSchema';
import type { ProjectInsightsSchemaMembers } from './projectInsightsSchemaMembers';
import type { ProjectStatsSchema } from './projectStatsSchema';

/**
* A high-level overview of a project insights. It contains information such as project statistics, overall health, types of flags, members overview, change requests overview.
*/
export interface ProjectInsightsSchema {
/** Count of change requests in different stages of the [process](https://docs.getunleash.io/reference/change-requests#change-request-flow). Only for enterprise users. */
changeRequests?: ProjectInsightsSchemaChangeRequests;
/** The number of features of each type */
featureTypeCounts: FeatureTypeCountSchema[];
/** Health summary of the project */
health: ProjectInsightsSchemaHealth;
/** Lead time (DORA) metrics */
leadTime: ProjectDoraMetricsSchema;
/** Active/inactive users summary */
members: ProjectInsightsSchemaMembers;
/** Project statistics */
stats: ProjectStatsSchema;
}
23 changes: 23 additions & 0 deletions frontend/src/openapi/models/projectInsightsSchemaChangeRequests.ts
@@ -0,0 +1,23 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Count of change requests in different stages of the [process](https://docs.getunleash.io/reference/change-requests#change-request-flow). Only for enterprise users.
*/
export type ProjectInsightsSchemaChangeRequests = {
/** The number of applied change requests */
applied: number;
/** The number of approved change requests */
approved: number;
/** The number of rejected change requests */
rejected: number;
/** The number of change requests awaiting the review */
reviewRequired: number;
/** The number of scheduled change requests */
scheduled: number;
/** The number of total change requests in this project */
total: number;
};
19 changes: 19 additions & 0 deletions frontend/src/openapi/models/projectInsightsSchemaHealth.ts
@@ -0,0 +1,19 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Health summary of the project
*/
export type ProjectInsightsSchemaHealth = {
/** The number of active feature toggles. */
activeCount: number;
/** The number of potentially stale feature toggles. */
potentiallyStaleCount: number;
/** An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100 */
rating: number;
/** The number of stale feature toggles. */
staleCount: number;
};
17 changes: 17 additions & 0 deletions frontend/src/openapi/models/projectInsightsSchemaMembers.ts
@@ -0,0 +1,17 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Active/inactive users summary
*/
export type ProjectInsightsSchemaMembers = {
/** The number of active project members who have used Unleash in the past 60 days */
active: number;
/** The number of inactive project members who have not used Unleash in the past 60 days */
inactive: number;
/** The number of total project members in the previous month */
totalPreviousMonth?: number;
};
16 changes: 8 additions & 8 deletions frontend/src/openapi/models/resourceLimitsSchema.ts
Expand Up @@ -9,19 +9,19 @@
*/
export interface ResourceLimitsSchema {
/** The maximum number of actions per action set allowed. */
actionSetActions?: number;
actionSetActions: number;
/** The maximum number of filters per action set allowed. */
actionSetFilters?: number;
actionSetFilters: number;
/** The maximum number of filter values inside an action set allowed. */
actionSetFilterValues?: number;
actionSetFilterValues: number;
/** The maximum number of action set definitions per project allowed. */
actionSetsPerProject?: number;
actionSetsPerProject: number;
/** The maximum number of values per segment allowed. */
segmentValues?: number;
segmentValues: number;
/** The maximum number of signal endpoints allowed. */
signalEndpoints?: number;
signalEndpoints: number;
/** The maximum number of signal tokens per endpoint allowed. */
signalTokensPerEndpoint?: number;
signalTokensPerEndpoint: number;
/** The maximum number of strategy segments allowed. */
strategySegments?: number;
strategySegments: number;
}
17 changes: 17 additions & 0 deletions frontend/src/openapi/models/toggleFeaturesByTagActionSchema.ts
@@ -0,0 +1,17 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* Input data required for the action
*/
export interface ToggleFeaturesByTagActionSchema {
/** The environment we want to target */
environment: string;
/** The project where the feature is located */
project: string;
/** The tag we want to target, in the following format: `[TAG_TYPE]:[TAG_VALUE]` */
tag: string;
}