Skip to content

Commit

Permalink
chore: generate orval types (#6699)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Mar 26, 2024
1 parent 06eda20 commit 93395d2
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 29 deletions.
Expand Up @@ -46,6 +46,7 @@ test('Display minimal overview information', () => {
tags: [],
description: '',
type: '',
dependencyType: null,
project: 'my_project',
},
}}
Expand Down
Expand Up @@ -308,6 +308,12 @@ export const ProjectFeatureToggles = ({
type: '-',
name: `Feature name ${index}`,
createdAt: new Date().toISOString(),
dependencyType: null,
favorite: false,
impressionData: false,
project: 'project',
segments: [],
stale: false,
environments: [
{
name: 'production',
Expand Down
25 changes: 11 additions & 14 deletions frontend/src/openapi/models/featureSearchResponseSchema.ts
Expand Up @@ -3,6 +3,7 @@
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { FeatureSearchResponseSchemaDependencyType } from './featureSearchResponseSchemaDependencyType';
import type { FeatureSearchEnvironmentSchema } from './featureSearchEnvironmentSchema';
import type { FeatureSearchResponseSchemaStrategiesItem } from './featureSearchResponseSchemaStrategiesItem';
import type { TagSchema } from './tagSchema';
Expand All @@ -16,22 +17,18 @@ export interface FeatureSearchResponseSchema {
archived?: boolean;
/** The date the feature was archived */
archivedAt?: string | null;
/** The list of child feature names. This is an experimental field and may change. */
children?: string[];
/** The date the feature was created */
createdAt?: string | null;
/** The list of parent dependencies. This is an experimental field and may change. */
dependencyType?: string;
createdAt: string | null;
/** The type of dependency. 'parent' means that the feature is a parent feature, 'child' means that the feature is a child feature. */
dependencyType: FeatureSearchResponseSchemaDependencyType;
/** Detailed description of the feature */
description?: string | null;
/** `true` if the feature is enabled, otherwise `false`. */
enabled?: boolean;
/** The list of environments where the feature can be used */
environments?: FeatureSearchEnvironmentSchema[];
environments: FeatureSearchEnvironmentSchema[];
/** `true` if the feature was favorited, otherwise `false`. */
favorite?: boolean;
favorite: boolean;
/** `true` if the impression data collection is enabled for the feature, otherwise `false`. */
impressionData?: boolean;
impressionData: boolean;
/**
* The date when metrics where last collected for the feature. This field is deprecated, use the one in featureEnvironmentSchema
* @deprecated
Expand All @@ -40,11 +37,11 @@ export interface FeatureSearchResponseSchema {
/** Unique feature name */
name: string;
/** Name of the project the feature belongs to */
project?: string;
project: string;
/** The list of segments the feature is enabled for. */
segments?: string[];
segments: string[];
/** `true` if the feature is stale based on the age and feature type, otherwise `false`. */
stale?: boolean;
stale: boolean;
/**
* This is a legacy field that will be deprecated
* @deprecated
Expand All @@ -53,7 +50,7 @@ export interface FeatureSearchResponseSchema {
/** The list of feature tags */
tags?: TagSchema[] | null;
/** Type of the toggle e.g. experiment, kill-switch, release, operational, permission */
type?: string;
type: string;
/**
* The list of feature variants
* @deprecated
Expand Down

This file was deleted.

@@ -0,0 +1,18 @@
/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/

/**
* The type of dependency. 'parent' means that the feature is a parent feature, 'child' means that the feature is a child feature.
*/
export type FeatureSearchResponseSchemaDependencyType =
| (typeof FeatureSearchResponseSchemaDependencyType)[keyof typeof FeatureSearchResponseSchemaDependencyType]
| null;

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const FeatureSearchResponseSchemaDependencyType = {
parent: 'parent',
child: 'child',
} as const;
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/index.ts
Expand Up @@ -541,7 +541,7 @@ export * from './featureSchemaDependenciesItem';
export * from './featureSchemaStrategiesItem';
export * from './featureSearchEnvironmentSchema';
export * from './featureSearchResponseSchema';
export * from './featureSearchResponseSchemaDependenciesItem';
export * from './featureSearchResponseSchemaDependencyType';
export * from './featureSearchResponseSchemaStrategiesItem';
export * from './featureStrategySchema';
export * from './featureStrategySegmentSchema';
Expand Down

0 comments on commit 93395d2

Please sign in to comment.