Skip to content

Commit

Permalink
chore: openapi update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek committed Dec 1, 2023
1 parent 26f9cf9 commit eb96e22
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 22 deletions.
4 changes: 2 additions & 2 deletions frontend/src/openapi/models/adminSegmentSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/openapi/models/eventSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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;
1 change: 0 additions & 1 deletion frontend/src/openapi/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/openapi/models/patchSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
10 changes: 0 additions & 10 deletions frontend/src/openapi/models/patchSchemaValue.ts

This file was deleted.

19 changes: 19 additions & 0 deletions frontend/src/openapi/models/searchEventsSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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;
28 changes: 22 additions & 6 deletions frontend/src/openapi/models/searchFeaturesParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,47 @@

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
*/
type?: string[];
/**
* 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;
};
2 changes: 2 additions & 0 deletions frontend/src/openapi/models/searchFeaturesSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit eb96e22

Please sign in to comment.