1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-26 01:17:00 +02:00

Frontend OpenAPI types update (#5520)

This commit is contained in:
Tymoteusz Czech 2023-12-01 14:30:30 +01:00 committed by GitHub
parent 26f9cf98d5
commit fba80222de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 22 deletions

View File

@ -17,9 +17,9 @@ export interface AdminSegmentSchema {
description?: string | null;
/** The list of constraints that are used in this segment */
constraints: ConstraintSchema[];
/** The number of projects that use this segment */
/** The number of feature flags that use this segment. The number also includes the any flags with pending change requests that would add this segment. */
usedInFeatures?: number | null;
/** The number of projects that use this segment */
/** The number of projects that use this segment. The number includes any projects with pending change requests that would add this segment. */
usedInProjects?: number | null;
/** The project the segment belongs to. Only present if the segment is a project-specific segment. */
project?: string | null;

View File

@ -7,7 +7,7 @@
export type AdminStrategiesSchemaStrategiesItem = {
/** The ID of the strategy */
id: string;
/** The ID of the strategy */
/** The name of the feature flag that this strategy belongs to. */
featureName: string;
/** The ID of the project that the strategy belongs to. */
projectId: string;

View File

@ -29,6 +29,7 @@ export const EventSchemaType = {
'feature-strategy-update': 'feature-strategy-update',
'feature-strategy-add': 'feature-strategy-add',
'feature-strategy-remove': 'feature-strategy-remove',
'feature-type-updated': 'feature-type-updated',
'strategy-order-changed': 'strategy-order-changed',
'drop-feature-tags': 'drop-feature-tags',
'feature-untagged': 'feature-untagged',
@ -63,6 +64,9 @@ export const EventSchemaType = {
'project-group-role-changed': 'project-group-role-changed',
'project-group-added': 'project-group-added',
'project-group-removed': 'project-group-removed',
'role-created': 'role-created',
'role-updated': 'role-updated',
'role-deleted': 'role-deleted',
'drop-projects': 'drop-projects',
'tag-created': 'tag-created',
'tag-deleted': 'tag-deleted',
@ -82,12 +86,17 @@ export const EventSchemaType = {
'user-deleted': 'user-deleted',
'drop-environments': 'drop-environments',
'environment-import': 'environment-import',
'environment-created': 'environment-created',
'environment-updated': 'environment-updated',
'environment-deleted': 'environment-deleted',
'segment-created': 'segment-created',
'segment-updated': 'segment-updated',
'segment-deleted': 'segment-deleted',
'group-created': 'group-created',
'group-updated': 'group-updated',
'group-deleted': 'group-deleted',
'group-user-added': 'group-user-added',
'group-user-removed': 'group-user-removed',
'setting-created': 'setting-created',
'setting-updated': 'setting-updated',
'setting-deleted': 'setting-deleted',
@ -108,8 +117,15 @@ export const EventSchemaType = {
'change-request-approval-added': 'change-request-approval-added',
'change-request-cancelled': 'change-request-cancelled',
'change-request-sent-to-review': 'change-request-sent-to-review',
'scheduled-change-request-executed': 'scheduled-change-request-executed',
'change-request-applied': 'change-request-applied',
'change-request-scheduled': 'change-request-scheduled',
'change-request-scheduled-application-success':
'change-request-scheduled-application-success',
'change-request-scheduled-application-failure':
'change-request-scheduled-application-failure',
'change-request-configuration-updated':
'change-request-configuration-updated',
'api-token-created': 'api-token-created',
'api-token-updated': 'api-token-updated',
'api-token-deleted': 'api-token-deleted',
@ -129,4 +145,7 @@ export const EventSchemaType = {
'banner-created': 'banner-created',
'banner-updated': 'banner-updated',
'banner-deleted': 'banner-deleted',
'project-environment-added': 'project-environment-added',
'project-environment-removed': 'project-environment-removed',
'default-strategy-updated': 'default-strategy-updated',
} as const;

View File

@ -725,7 +725,6 @@ export * from './patchFeatureVariants403';
export * from './patchFeatureVariants404';
export * from './patchSchema';
export * from './patchSchemaOp';
export * from './patchSchemaValue';
export * from './patchesSchema';
export * from './patsSchema';
export * from './permissionSchema';

View File

@ -4,7 +4,6 @@
* 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
@ -17,5 +16,5 @@ export interface PatchSchema {
/** The target to move or copy from, if performing one of those operations */
from?: string;
/** The value to add or replace, if performing one of those operations */
value?: PatchSchemaValue;
value?: unknown;
}

View File

@ -1,10 +0,0 @@
/**
* 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 = unknown | null;

View File

@ -29,6 +29,7 @@ export const SearchEventsSchemaType = {
'feature-strategy-update': 'feature-strategy-update',
'feature-strategy-add': 'feature-strategy-add',
'feature-strategy-remove': 'feature-strategy-remove',
'feature-type-updated': 'feature-type-updated',
'strategy-order-changed': 'strategy-order-changed',
'drop-feature-tags': 'drop-feature-tags',
'feature-untagged': 'feature-untagged',
@ -63,6 +64,9 @@ export const SearchEventsSchemaType = {
'project-group-role-changed': 'project-group-role-changed',
'project-group-added': 'project-group-added',
'project-group-removed': 'project-group-removed',
'role-created': 'role-created',
'role-updated': 'role-updated',
'role-deleted': 'role-deleted',
'drop-projects': 'drop-projects',
'tag-created': 'tag-created',
'tag-deleted': 'tag-deleted',
@ -82,12 +86,17 @@ export const SearchEventsSchemaType = {
'user-deleted': 'user-deleted',
'drop-environments': 'drop-environments',
'environment-import': 'environment-import',
'environment-created': 'environment-created',
'environment-updated': 'environment-updated',
'environment-deleted': 'environment-deleted',
'segment-created': 'segment-created',
'segment-updated': 'segment-updated',
'segment-deleted': 'segment-deleted',
'group-created': 'group-created',
'group-updated': 'group-updated',
'group-deleted': 'group-deleted',
'group-user-added': 'group-user-added',
'group-user-removed': 'group-user-removed',
'setting-created': 'setting-created',
'setting-updated': 'setting-updated',
'setting-deleted': 'setting-deleted',
@ -108,8 +117,15 @@ export const SearchEventsSchemaType = {
'change-request-approval-added': 'change-request-approval-added',
'change-request-cancelled': 'change-request-cancelled',
'change-request-sent-to-review': 'change-request-sent-to-review',
'scheduled-change-request-executed': 'scheduled-change-request-executed',
'change-request-applied': 'change-request-applied',
'change-request-scheduled': 'change-request-scheduled',
'change-request-scheduled-application-success':
'change-request-scheduled-application-success',
'change-request-scheduled-application-failure':
'change-request-scheduled-application-failure',
'change-request-configuration-updated':
'change-request-configuration-updated',
'api-token-created': 'api-token-created',
'api-token-updated': 'api-token-updated',
'api-token-deleted': 'api-token-deleted',
@ -129,4 +145,7 @@ export const SearchEventsSchemaType = {
'banner-created': 'banner-created',
'banner-updated': 'banner-updated',
'banner-deleted': 'banner-deleted',
'project-environment-added': 'project-environment-added',
'project-environment-removed': 'project-environment-removed',
'default-strategy-updated': 'default-strategy-updated',
} as const;

View File

@ -6,13 +6,13 @@
export type SearchFeaturesParams = {
/**
* The search query for the feature or tag
* The search query for the feature name or tag
*/
query?: string;
/**
* Id of the project where search and filter is performed
*/
projectId?: string;
project?: string;
/**
* The list of feature types to filter by
*/
@ -20,17 +20,33 @@ export type SearchFeaturesParams = {
/**
* The list of feature tags to filter by. Feature tag has to specify a type and a value joined with a colon.
*/
tag?: string[];
tag?: string;
/**
* The list of segments with operators to filter by.
*/
segment?: string;
/**
* The list of feature environment status to filter by. Feature environment has to specify a name and a status joined with a colon.
*/
status?: string[];
/**
* The next feature created at date the client has not seen. Used for cursor-based pagination. Empty if starting from the beginning.
* The number of features to skip when returning a page. By default it is set to 0.
*/
cursor?: string;
offset?: string;
/**
* The number of results to return in a page. By default it is set to 50
* The number of feature environments to return in a page. By default it is set to 50.
*/
limit?: string;
/**
* The field to sort the results by. By default it is set to "createdAt".
*/
sortBy?: string;
/**
* The sort order for the sortBy. By default it is det to "asc".
*/
sortOrder?: string;
/**
* The flag to indicate if the favorite features should be returned first. By default it is set to false.
*/
favoritesFirst?: string;
};

View File

@ -11,4 +11,6 @@ import type { FeatureSchema } from './featureSchema';
export interface SearchFeaturesSchema {
/** The full list of features in this project (excluding archived features) */
features: FeatureSchema[];
/** Total count of the features matching search and filter criteria */
total?: number;
}