From e471c0c62ef540dfefca314257e8681e3313b966 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 3 Nov 2023 08:48:07 +0100 Subject: [PATCH] chore: update orval schemas (#5249) This PR updates the orval schemas in prep for working with scheduled CRs on the front end. Also contains a whole host of other orval updates. --- frontend/src/openapi/models/bannerSchema.ts | 33 +++++++++++ frontend/src/openapi/models/bannersSchema.ts | 14 +++++ ...eRequestCreateFeatureSchemaOneOfPayload.ts | 2 +- ...hangeRequestCreateSchemaOneOfSixPayload.ts | 2 +- ...estOneOrManyCreateSchemaOneOfSixPayload.ts | 2 +- .../models/changeRequestScheduleSchema.ts | 16 +++++ .../changeRequestScheduleSchemaStatus.ts | 17 ++++++ .../src/openapi/models/changeRequestSchema.ts | 39 ++---------- .../models/changeRequestSchemaOneOf.ts | 40 +++++++++++++ ...s => changeRequestSchemaOneOfCreatedBy.ts} | 2 +- .../models/changeRequestSchemaOneOfFour.ts | 42 +++++++++++++ .../changeRequestSchemaOneOfFourCreatedBy.ts | 14 +++++ .../changeRequestSchemaOneOfFourState.ts | 16 +++++ ...te.ts => changeRequestSchemaOneOfState.ts} | 6 +- .../models/changeRequestStateSchema.ts | 12 ++-- .../models/changeRequestStateSchemaOneOf.ts | 13 ++++ ... => changeRequestStateSchemaOneOfState.ts} | 6 +- .../changeRequestStateSchemaOneOfThree.ts | 15 +++++ ...changeRequestStateSchemaOneOfThreeState.ts | 16 +++++ ...essageBanners401.ts => createBanner400.ts} | 2 +- ...MessageBanner403.ts => createBanner401.ts} | 2 +- ...MessageBanner401.ts => createBanner403.ts} | 2 +- ...MessageBanner400.ts => createBanner415.ts} | 2 +- .../src/openapi/models/createBannerSchema.ts | 29 +++++++++ .../openapi/models/createMessageBanner415.ts | 14 ----- .../models/createMessageBannerSchema.ts | 29 --------- .../src/openapi/models/deleteBanner401.ts | 14 +++++ .../src/openapi/models/deleteBanner403.ts | 14 +++++ .../src/openapi/models/deleteBanner404.ts | 14 +++++ .../openapi/models/deleteMessageBanner401.ts | 14 ----- .../openapi/models/deleteMessageBanner403.ts | 14 ----- .../openapi/models/deleteMessageBanner404.ts | 14 ----- .../src/openapi/models/disableBanner401.ts | 14 +++++ .../src/openapi/models/disableBanner403.ts | 14 +++++ .../src/openapi/models/disableBanner404.ts | 14 +++++ .../src/openapi/models/enableBanner401.ts | 14 +++++ .../src/openapi/models/enableBanner403.ts | 14 +++++ .../src/openapi/models/enableBanner404.ts | 14 +++++ .../src/openapi/models/eventSchemaType.ts | 7 ++- .../models/featureEnvironmentSchema.ts | 4 ++ frontend/src/openapi/models/getBanners401.ts | 14 +++++ frontend/src/openapi/models/index.ts | 59 +++++++++++++------ .../src/openapi/models/messageBannerSchema.ts | 33 ----------- .../openapi/models/messageBannersSchema.ts | 14 ----- .../openapi/models/searchEventsSchemaType.ts | 7 ++- .../src/openapi/models/searchFeatures401.ts | 14 +++++ .../src/openapi/models/searchFeatures403.ts | 14 +++++ .../src/openapi/models/searchFeatures404.ts | 14 +++++ .../openapi/models/searchFeaturesParams.ts | 36 +++++++++++ .../openapi/models/searchFeaturesSchema.ts | 14 +++++ .../src/openapi/models/updateBanner400.ts | 14 +++++ .../src/openapi/models/updateBanner401.ts | 14 +++++ .../src/openapi/models/updateBanner403.ts | 14 +++++ .../src/openapi/models/updateBanner404.ts | 14 +++++ .../src/openapi/models/updateBanner415.ts | 14 +++++ .../openapi/models/updateMessageBanner400.ts | 14 ----- .../openapi/models/updateMessageBanner401.ts | 14 ----- .../openapi/models/updateMessageBanner403.ts | 14 ----- .../openapi/models/updateMessageBanner404.ts | 14 ----- .../openapi/models/updateMessageBanner415.ts | 14 ----- .../models/validateArchiveFeaturesSchema.ts | 15 +++++ 61 files changed, 658 insertions(+), 282 deletions(-) create mode 100644 frontend/src/openapi/models/bannerSchema.ts create mode 100644 frontend/src/openapi/models/bannersSchema.ts create mode 100644 frontend/src/openapi/models/changeRequestScheduleSchema.ts create mode 100644 frontend/src/openapi/models/changeRequestScheduleSchemaStatus.ts create mode 100644 frontend/src/openapi/models/changeRequestSchemaOneOf.ts rename frontend/src/openapi/models/{changeRequestSchemaCreatedBy.ts => changeRequestSchemaOneOfCreatedBy.ts} (83%) create mode 100644 frontend/src/openapi/models/changeRequestSchemaOneOfFour.ts create mode 100644 frontend/src/openapi/models/changeRequestSchemaOneOfFourCreatedBy.ts create mode 100644 frontend/src/openapi/models/changeRequestSchemaOneOfFourState.ts rename frontend/src/openapi/models/{changeRequestSchemaState.ts => changeRequestSchemaOneOfState.ts} (67%) create mode 100644 frontend/src/openapi/models/changeRequestStateSchemaOneOf.ts rename frontend/src/openapi/models/{changeRequestStateSchemaState.ts => changeRequestStateSchemaOneOfState.ts} (65%) create mode 100644 frontend/src/openapi/models/changeRequestStateSchemaOneOfThree.ts create mode 100644 frontend/src/openapi/models/changeRequestStateSchemaOneOfThreeState.ts rename frontend/src/openapi/models/{getMessageBanners401.ts => createBanner400.ts} (88%) rename frontend/src/openapi/models/{createMessageBanner403.ts => createBanner401.ts} (87%) rename frontend/src/openapi/models/{createMessageBanner401.ts => createBanner403.ts} (87%) rename frontend/src/openapi/models/{createMessageBanner400.ts => createBanner415.ts} (87%) create mode 100644 frontend/src/openapi/models/createBannerSchema.ts delete mode 100644 frontend/src/openapi/models/createMessageBanner415.ts delete mode 100644 frontend/src/openapi/models/createMessageBannerSchema.ts create mode 100644 frontend/src/openapi/models/deleteBanner401.ts create mode 100644 frontend/src/openapi/models/deleteBanner403.ts create mode 100644 frontend/src/openapi/models/deleteBanner404.ts delete mode 100644 frontend/src/openapi/models/deleteMessageBanner401.ts delete mode 100644 frontend/src/openapi/models/deleteMessageBanner403.ts delete mode 100644 frontend/src/openapi/models/deleteMessageBanner404.ts create mode 100644 frontend/src/openapi/models/disableBanner401.ts create mode 100644 frontend/src/openapi/models/disableBanner403.ts create mode 100644 frontend/src/openapi/models/disableBanner404.ts create mode 100644 frontend/src/openapi/models/enableBanner401.ts create mode 100644 frontend/src/openapi/models/enableBanner403.ts create mode 100644 frontend/src/openapi/models/enableBanner404.ts create mode 100644 frontend/src/openapi/models/getBanners401.ts delete mode 100644 frontend/src/openapi/models/messageBannerSchema.ts delete mode 100644 frontend/src/openapi/models/messageBannersSchema.ts create mode 100644 frontend/src/openapi/models/searchFeatures401.ts create mode 100644 frontend/src/openapi/models/searchFeatures403.ts create mode 100644 frontend/src/openapi/models/searchFeatures404.ts create mode 100644 frontend/src/openapi/models/searchFeaturesParams.ts create mode 100644 frontend/src/openapi/models/searchFeaturesSchema.ts create mode 100644 frontend/src/openapi/models/updateBanner400.ts create mode 100644 frontend/src/openapi/models/updateBanner401.ts create mode 100644 frontend/src/openapi/models/updateBanner403.ts create mode 100644 frontend/src/openapi/models/updateBanner404.ts create mode 100644 frontend/src/openapi/models/updateBanner415.ts delete mode 100644 frontend/src/openapi/models/updateMessageBanner400.ts delete mode 100644 frontend/src/openapi/models/updateMessageBanner401.ts delete mode 100644 frontend/src/openapi/models/updateMessageBanner403.ts delete mode 100644 frontend/src/openapi/models/updateMessageBanner404.ts delete mode 100644 frontend/src/openapi/models/updateMessageBanner415.ts create mode 100644 frontend/src/openapi/models/validateArchiveFeaturesSchema.ts diff --git a/frontend/src/openapi/models/bannerSchema.ts b/frontend/src/openapi/models/bannerSchema.ts new file mode 100644 index 0000000000..e71e57be05 --- /dev/null +++ b/frontend/src/openapi/models/bannerSchema.ts @@ -0,0 +1,33 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * An object describing a banner to be displayed to all users. + */ +export interface BannerSchema { + /** The banner's ID. Banner IDs are incrementing integers. In other words, a more recently created banner will always have a higher ID than an older one. */ + id: number; + /** The message to display to all users. Supports markdown. */ + message: string; + /** Whether the banner should be displayed currently. If not specified, defaults to true. */ + enabled?: boolean; + /** The variant of the banner. One of "info", "warning", "error", or "success". If not specified, defaults to "info". */ + variant?: string; + /** Whether the banner should be sticky on the screen. If not specified, defaults to `false`. */ + sticky?: boolean; + /** The icon to display on the banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed. */ + icon?: string | null; + /** The link to display on the banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed. */ + link?: string | null; + /** The text to display on the link. If not specified, will be displayed as "More info". */ + linkText?: string | null; + /** The title to display on the dialog. If not specified, this will be the same as `linkText`. */ + dialogTitle?: string | null; + /** The markdown to display on the dialog. If not specified, no dialog will be displayed. */ + dialog?: string | null; + /** The date and time of when the banner was created. */ + createdAt: string; +} diff --git a/frontend/src/openapi/models/bannersSchema.ts b/frontend/src/openapi/models/bannersSchema.ts new file mode 100644 index 0000000000..00f5f20f67 --- /dev/null +++ b/frontend/src/openapi/models/bannersSchema.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { BannerSchema } from './bannerSchema'; + +/** + * A response model with a list of banners. + */ +export interface BannersSchema { + /** A list of banners. */ + banners: BannerSchema[]; +} diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfPayload.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfPayload.ts index a73a745313..dba50fd8ad 100644 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfPayload.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfPayload.ts @@ -7,6 +7,6 @@ export type ChangeRequestCreateFeatureSchemaOneOfPayload = { /** The new state of the feature. */ enabled: boolean; - /** Only relevant when ALL the strategies are disabled. If true, all the disabled strategies will be enabled. If false, the default strategy will be added */ + /** Only relevant when ALL the strategies are disabled. If `true`, all the disabled strategies will be enabled. If `false`, the default strategy will be added */ shouldActivateDisabledStrategies?: boolean; }; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfSixPayload.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfSixPayload.ts index 5701a50d65..07a25f7dda 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfSixPayload.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfSixPayload.ts @@ -7,6 +7,6 @@ export type ChangeRequestCreateSchemaOneOfSixPayload = { /** The new state of the feature. */ enabled: boolean; - /** Only relevant when ALL the strategies are disabled. If true, all the disabled strategies will be enabled. If false, the default strategy will be added */ + /** Only relevant when ALL the strategies are disabled. If `true`, all the disabled strategies will be enabled. If `false`, the default strategy will be added */ shouldActivateDisabledStrategies?: boolean; }; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfSixPayload.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfSixPayload.ts index c5fc15c2c8..7e3c3fb60e 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfSixPayload.ts +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfSixPayload.ts @@ -7,6 +7,6 @@ export type ChangeRequestOneOrManyCreateSchemaOneOfSixPayload = { /** The new state of the feature. */ enabled: boolean; - /** Only relevant when ALL the strategies are disabled. If true, all the disabled strategies will be enabled. If false, the default strategy will be added */ + /** Only relevant when ALL the strategies are disabled. If `true`, all the disabled strategies will be enabled. If `false`, the default strategy will be added */ shouldActivateDisabledStrategies?: boolean; }; diff --git a/frontend/src/openapi/models/changeRequestScheduleSchema.ts b/frontend/src/openapi/models/changeRequestScheduleSchema.ts new file mode 100644 index 0000000000..3cdf245a46 --- /dev/null +++ b/frontend/src/openapi/models/changeRequestScheduleSchema.ts @@ -0,0 +1,16 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestScheduleSchemaStatus } from './changeRequestScheduleSchemaStatus'; + +/** + * A schedule for a change request. + */ +export interface ChangeRequestScheduleSchema { + /** When this change request is to be applied. */ + scheduledAt: string; + /** The status of the schedule. */ + status: ChangeRequestScheduleSchemaStatus; +} diff --git a/frontend/src/openapi/models/changeRequestScheduleSchemaStatus.ts b/frontend/src/openapi/models/changeRequestScheduleSchemaStatus.ts new file mode 100644 index 0000000000..59d5ccecb8 --- /dev/null +++ b/frontend/src/openapi/models/changeRequestScheduleSchemaStatus.ts @@ -0,0 +1,17 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The status of the schedule. + */ +export type ChangeRequestScheduleSchemaStatus = + typeof ChangeRequestScheduleSchemaStatus[keyof typeof ChangeRequestScheduleSchemaStatus]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ChangeRequestScheduleSchemaStatus = { + pending: 'pending', + failed: 'failed', +} as const; diff --git a/frontend/src/openapi/models/changeRequestSchema.ts b/frontend/src/openapi/models/changeRequestSchema.ts index d2d53e2d18..f54f1802b4 100644 --- a/frontend/src/openapi/models/changeRequestSchema.ts +++ b/frontend/src/openapi/models/changeRequestSchema.ts @@ -3,41 +3,12 @@ * Do not edit manually. * See `gen:api` script in package.json */ -import type { ChangeRequestSchemaState } from './changeRequestSchemaState'; -import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema'; -import type { ChangeRequestSegmentChangeSchema } from './changeRequestSegmentChangeSchema'; -import type { ChangeRequestApprovalSchema } from './changeRequestApprovalSchema'; -import type { ChangeRequestCommentSchema } from './changeRequestCommentSchema'; -import type { ChangeRequestSchemaCreatedBy } from './changeRequestSchemaCreatedBy'; +import type { ChangeRequestSchemaOneOf } from './changeRequestSchemaOneOf'; +import type { ChangeRequestSchemaOneOfFour } from './changeRequestSchemaOneOfFour'; /** * A [change request](https://docs.getunleash.io/reference/change-requests) */ -export interface ChangeRequestSchema { - /** This change requests's ID. */ - id: number; - /** A title describing the change request's content. */ - title?: string; - /** The environment in which the changes should be applied. */ - environment: string; - /** The current state of the change request. */ - state: ChangeRequestSchemaState; - /** The minimum number of approvals required before this change request can be applied. */ - minApprovals: number; - /** The project this change request belongs to. */ - project: string; - /** The list of features and their changes that relate to this change request. */ - features: ChangeRequestFeatureSchema[]; - /** The list of segments and their changes that relate to this change request. */ - segments: ChangeRequestSegmentChangeSchema[]; - /** A list of approvals that this change request has received. */ - approvals?: ChangeRequestApprovalSchema[]; - /** A list of rejections that this change request has received. */ - rejections?: ChangeRequestApprovalSchema[]; - /** All comments that have been made on this change request. */ - comments?: ChangeRequestCommentSchema[]; - /** The user who created this change request. */ - createdBy: ChangeRequestSchemaCreatedBy; - /** When this change request was created. */ - createdAt: string; -} +export type ChangeRequestSchema = + | ChangeRequestSchemaOneOf + | ChangeRequestSchemaOneOfFour; diff --git a/frontend/src/openapi/models/changeRequestSchemaOneOf.ts b/frontend/src/openapi/models/changeRequestSchemaOneOf.ts new file mode 100644 index 0000000000..1586fddefd --- /dev/null +++ b/frontend/src/openapi/models/changeRequestSchemaOneOf.ts @@ -0,0 +1,40 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema'; +import type { ChangeRequestSegmentChangeSchema } from './changeRequestSegmentChangeSchema'; +import type { ChangeRequestApprovalSchema } from './changeRequestApprovalSchema'; +import type { ChangeRequestCommentSchema } from './changeRequestCommentSchema'; +import type { ChangeRequestSchemaOneOfCreatedBy } from './changeRequestSchemaOneOfCreatedBy'; +import type { ChangeRequestSchemaOneOfState } from './changeRequestSchemaOneOfState'; + +export type ChangeRequestSchemaOneOf = { + /** This change requests's ID. */ + id: number; + /** A title describing the change request's content. */ + title?: string; + /** The environment in which the changes should be applied. */ + environment: string; + /** The minimum number of approvals required before this change request can be applied. */ + minApprovals: number; + /** The project this change request belongs to. */ + project: string; + /** The list of features and their changes that relate to this change request. */ + features: ChangeRequestFeatureSchema[]; + /** The list of segments and their changes that relate to this change request. */ + segments: ChangeRequestSegmentChangeSchema[]; + /** A list of approvals that this change request has received. */ + approvals?: ChangeRequestApprovalSchema[]; + /** A list of rejections that this change request has received. */ + rejections?: ChangeRequestApprovalSchema[]; + /** All comments that have been made on this change request. */ + comments?: ChangeRequestCommentSchema[]; + /** The user who created this change request. */ + createdBy: ChangeRequestSchemaOneOfCreatedBy; + /** When this change request was created. */ + createdAt: string; + /** The current state of the change request. */ + state: ChangeRequestSchemaOneOfState; +}; diff --git a/frontend/src/openapi/models/changeRequestSchemaCreatedBy.ts b/frontend/src/openapi/models/changeRequestSchemaOneOfCreatedBy.ts similarity index 83% rename from frontend/src/openapi/models/changeRequestSchemaCreatedBy.ts rename to frontend/src/openapi/models/changeRequestSchemaOneOfCreatedBy.ts index 0a29cccdc6..0c4864284c 100644 --- a/frontend/src/openapi/models/changeRequestSchemaCreatedBy.ts +++ b/frontend/src/openapi/models/changeRequestSchemaOneOfCreatedBy.ts @@ -7,7 +7,7 @@ /** * The user who created this change request. */ -export type ChangeRequestSchemaCreatedBy = { +export type ChangeRequestSchemaOneOfCreatedBy = { username?: string | null; /** The URL of the user's profile image. */ imageUrl?: string | null; diff --git a/frontend/src/openapi/models/changeRequestSchemaOneOfFour.ts b/frontend/src/openapi/models/changeRequestSchemaOneOfFour.ts new file mode 100644 index 0000000000..6bbb20e9be --- /dev/null +++ b/frontend/src/openapi/models/changeRequestSchemaOneOfFour.ts @@ -0,0 +1,42 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema'; +import type { ChangeRequestSegmentChangeSchema } from './changeRequestSegmentChangeSchema'; +import type { ChangeRequestApprovalSchema } from './changeRequestApprovalSchema'; +import type { ChangeRequestCommentSchema } from './changeRequestCommentSchema'; +import type { ChangeRequestSchemaOneOfFourCreatedBy } from './changeRequestSchemaOneOfFourCreatedBy'; +import type { ChangeRequestSchemaOneOfFourState } from './changeRequestSchemaOneOfFourState'; +import type { ChangeRequestScheduleSchema } from './changeRequestScheduleSchema'; + +export type ChangeRequestSchemaOneOfFour = { + /** This change requests's ID. */ + id: number; + /** A title describing the change request's content. */ + title?: string; + /** The environment in which the changes should be applied. */ + environment: string; + /** The minimum number of approvals required before this change request can be applied. */ + minApprovals: number; + /** The project this change request belongs to. */ + project: string; + /** The list of features and their changes that relate to this change request. */ + features: ChangeRequestFeatureSchema[]; + /** The list of segments and their changes that relate to this change request. */ + segments: ChangeRequestSegmentChangeSchema[]; + /** A list of approvals that this change request has received. */ + approvals?: ChangeRequestApprovalSchema[]; + /** A list of rejections that this change request has received. */ + rejections?: ChangeRequestApprovalSchema[]; + /** All comments that have been made on this change request. */ + comments?: ChangeRequestCommentSchema[]; + /** The user who created this change request. */ + createdBy: ChangeRequestSchemaOneOfFourCreatedBy; + /** When this change request was created. */ + createdAt: string; + /** The current state of the change request. */ + state: ChangeRequestSchemaOneOfFourState; + schedule: ChangeRequestScheduleSchema; +}; diff --git a/frontend/src/openapi/models/changeRequestSchemaOneOfFourCreatedBy.ts b/frontend/src/openapi/models/changeRequestSchemaOneOfFourCreatedBy.ts new file mode 100644 index 0000000000..9315a36d3d --- /dev/null +++ b/frontend/src/openapi/models/changeRequestSchemaOneOfFourCreatedBy.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The user who created this change request. + */ +export type ChangeRequestSchemaOneOfFourCreatedBy = { + username?: string | null; + /** The URL of the user's profile image. */ + imageUrl?: string | null; +}; diff --git a/frontend/src/openapi/models/changeRequestSchemaOneOfFourState.ts b/frontend/src/openapi/models/changeRequestSchemaOneOfFourState.ts new file mode 100644 index 0000000000..49d4f4d764 --- /dev/null +++ b/frontend/src/openapi/models/changeRequestSchemaOneOfFourState.ts @@ -0,0 +1,16 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The current state of the change request. + */ +export type ChangeRequestSchemaOneOfFourState = + typeof ChangeRequestSchemaOneOfFourState[keyof typeof ChangeRequestSchemaOneOfFourState]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ChangeRequestSchemaOneOfFourState = { + Scheduled: 'Scheduled', +} as const; diff --git a/frontend/src/openapi/models/changeRequestSchemaState.ts b/frontend/src/openapi/models/changeRequestSchemaOneOfState.ts similarity index 67% rename from frontend/src/openapi/models/changeRequestSchemaState.ts rename to frontend/src/openapi/models/changeRequestSchemaOneOfState.ts index 3283c3a0bd..78464b9e2d 100644 --- a/frontend/src/openapi/models/changeRequestSchemaState.ts +++ b/frontend/src/openapi/models/changeRequestSchemaOneOfState.ts @@ -7,11 +7,11 @@ /** * The current state of the change request. */ -export type ChangeRequestSchemaState = - typeof ChangeRequestSchemaState[keyof typeof ChangeRequestSchemaState]; +export type ChangeRequestSchemaOneOfState = + typeof ChangeRequestSchemaOneOfState[keyof typeof ChangeRequestSchemaOneOfState]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestSchemaState = { +export const ChangeRequestSchemaOneOfState = { Draft: 'Draft', In_review: 'In review', Approved: 'Approved', diff --git a/frontend/src/openapi/models/changeRequestStateSchema.ts b/frontend/src/openapi/models/changeRequestStateSchema.ts index 1d35d25c7c..ed1cb2f06e 100644 --- a/frontend/src/openapi/models/changeRequestStateSchema.ts +++ b/frontend/src/openapi/models/changeRequestStateSchema.ts @@ -3,14 +3,12 @@ * Do not edit manually. * See `gen:api` script in package.json */ -import type { ChangeRequestStateSchemaState } from './changeRequestStateSchemaState'; +import type { ChangeRequestStateSchemaOneOf } from './changeRequestStateSchemaOneOf'; +import type { ChangeRequestStateSchemaOneOfThree } from './changeRequestStateSchemaOneOfThree'; /** * Data used to update the state of a [change request](https://docs.getunleash.io/reference/change-requests). */ -export interface ChangeRequestStateSchema { - /** The new desired state for the change request */ - state: ChangeRequestStateSchemaState; - /** Any comments accompanying the state changed. Used when sending a draft to review. */ - comment?: string; -} +export type ChangeRequestStateSchema = + | ChangeRequestStateSchemaOneOf + | ChangeRequestStateSchemaOneOfThree; diff --git a/frontend/src/openapi/models/changeRequestStateSchemaOneOf.ts b/frontend/src/openapi/models/changeRequestStateSchemaOneOf.ts new file mode 100644 index 0000000000..a62a2b7f78 --- /dev/null +++ b/frontend/src/openapi/models/changeRequestStateSchemaOneOf.ts @@ -0,0 +1,13 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestStateSchemaOneOfState } from './changeRequestStateSchemaOneOfState'; + +export type ChangeRequestStateSchemaOneOf = { + /** The new desired state for the change request */ + state: ChangeRequestStateSchemaOneOfState; + /** Any comments accompanying the state changed. Used when sending a draft to review. */ + comment?: string; +}; diff --git a/frontend/src/openapi/models/changeRequestStateSchemaState.ts b/frontend/src/openapi/models/changeRequestStateSchemaOneOfState.ts similarity index 65% rename from frontend/src/openapi/models/changeRequestStateSchemaState.ts rename to frontend/src/openapi/models/changeRequestStateSchemaOneOfState.ts index 457fa5508b..426ad02a22 100644 --- a/frontend/src/openapi/models/changeRequestStateSchemaState.ts +++ b/frontend/src/openapi/models/changeRequestStateSchemaOneOfState.ts @@ -7,11 +7,11 @@ /** * The new desired state for the change request */ -export type ChangeRequestStateSchemaState = - typeof ChangeRequestStateSchemaState[keyof typeof ChangeRequestStateSchemaState]; +export type ChangeRequestStateSchemaOneOfState = + typeof ChangeRequestStateSchemaOneOfState[keyof typeof ChangeRequestStateSchemaOneOfState]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestStateSchemaState = { +export const ChangeRequestStateSchemaOneOfState = { Draft: 'Draft', In_review: 'In review', Approved: 'Approved', diff --git a/frontend/src/openapi/models/changeRequestStateSchemaOneOfThree.ts b/frontend/src/openapi/models/changeRequestStateSchemaOneOfThree.ts new file mode 100644 index 0000000000..3d0bed1a3f --- /dev/null +++ b/frontend/src/openapi/models/changeRequestStateSchemaOneOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestStateSchemaOneOfThreeState } from './changeRequestStateSchemaOneOfThreeState'; + +export type ChangeRequestStateSchemaOneOfThree = { + /** The new desired state for the change request */ + state: ChangeRequestStateSchemaOneOfThreeState; + /** The time at which the change request should be applied. */ + scheduledAt: string; + /** Any comments accompanying the state changed. Used when sending a draft to review. */ + comment?: string; +}; diff --git a/frontend/src/openapi/models/changeRequestStateSchemaOneOfThreeState.ts b/frontend/src/openapi/models/changeRequestStateSchemaOneOfThreeState.ts new file mode 100644 index 0000000000..43454dae0c --- /dev/null +++ b/frontend/src/openapi/models/changeRequestStateSchemaOneOfThreeState.ts @@ -0,0 +1,16 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The new desired state for the change request + */ +export type ChangeRequestStateSchemaOneOfThreeState = + typeof ChangeRequestStateSchemaOneOfThreeState[keyof typeof ChangeRequestStateSchemaOneOfThreeState]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ChangeRequestStateSchemaOneOfThreeState = { + Scheduled: 'Scheduled', +} as const; diff --git a/frontend/src/openapi/models/getMessageBanners401.ts b/frontend/src/openapi/models/createBanner400.ts similarity index 88% rename from frontend/src/openapi/models/getMessageBanners401.ts rename to frontend/src/openapi/models/createBanner400.ts index 5c513ad57f..ceabf58185 100644 --- a/frontend/src/openapi/models/getMessageBanners401.ts +++ b/frontend/src/openapi/models/createBanner400.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type GetMessageBanners401 = { +export type CreateBanner400 = { /** The ID of the error instance */ id?: string; /** The name of the error kind */ diff --git a/frontend/src/openapi/models/createMessageBanner403.ts b/frontend/src/openapi/models/createBanner401.ts similarity index 87% rename from frontend/src/openapi/models/createMessageBanner403.ts rename to frontend/src/openapi/models/createBanner401.ts index e048b6b87e..4089fff063 100644 --- a/frontend/src/openapi/models/createMessageBanner403.ts +++ b/frontend/src/openapi/models/createBanner401.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type CreateMessageBanner403 = { +export type CreateBanner401 = { /** The ID of the error instance */ id?: string; /** The name of the error kind */ diff --git a/frontend/src/openapi/models/createMessageBanner401.ts b/frontend/src/openapi/models/createBanner403.ts similarity index 87% rename from frontend/src/openapi/models/createMessageBanner401.ts rename to frontend/src/openapi/models/createBanner403.ts index e9e3611ebb..02c5bc2c9a 100644 --- a/frontend/src/openapi/models/createMessageBanner401.ts +++ b/frontend/src/openapi/models/createBanner403.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type CreateMessageBanner401 = { +export type CreateBanner403 = { /** The ID of the error instance */ id?: string; /** The name of the error kind */ diff --git a/frontend/src/openapi/models/createMessageBanner400.ts b/frontend/src/openapi/models/createBanner415.ts similarity index 87% rename from frontend/src/openapi/models/createMessageBanner400.ts rename to frontend/src/openapi/models/createBanner415.ts index 9b7508b9cd..fda61fc3b7 100644 --- a/frontend/src/openapi/models/createMessageBanner400.ts +++ b/frontend/src/openapi/models/createBanner415.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type CreateMessageBanner400 = { +export type CreateBanner415 = { /** The ID of the error instance */ id?: string; /** The name of the error kind */ diff --git a/frontend/src/openapi/models/createBannerSchema.ts b/frontend/src/openapi/models/createBannerSchema.ts new file mode 100644 index 0000000000..a49c20c543 --- /dev/null +++ b/frontend/src/openapi/models/createBannerSchema.ts @@ -0,0 +1,29 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * Describes the properties required to create or update a banner. + */ +export interface CreateBannerSchema { + /** The message to display to all users. Supports markdown. */ + message: string; + /** Whether the banner should be displayed currently. If not specified, defaults to true. */ + enabled?: boolean; + /** The variant of the banner. One of "info", "warning", "error", or "success". If not specified, defaults to "info". */ + variant?: string; + /** Whether the banner should be sticky on the screen. If not specified, defaults to `false`. */ + sticky?: boolean; + /** The icon to display on the banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed. */ + icon?: string | null; + /** The link to display on the banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed. */ + link?: string | null; + /** The text to display on the link. If not specified, will be displayed as "More info". */ + linkText?: string | null; + /** The title to display on the dialog. If not specified, this will be the same as `linkText`. */ + dialogTitle?: string | null; + /** The markdown to display on the dialog. If not specified, no dialog will be displayed. */ + dialog?: string | null; +} diff --git a/frontend/src/openapi/models/createMessageBanner415.ts b/frontend/src/openapi/models/createMessageBanner415.ts deleted file mode 100644 index 54e536d7e3..0000000000 --- a/frontend/src/openapi/models/createMessageBanner415.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type CreateMessageBanner415 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/createMessageBannerSchema.ts b/frontend/src/openapi/models/createMessageBannerSchema.ts deleted file mode 100644 index 968e7adc84..0000000000 --- a/frontend/src/openapi/models/createMessageBannerSchema.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -/** - * Describes the properties required to create or update a message banner. - */ -export interface CreateMessageBannerSchema { - /** The message to display to all users. Supports markdown. */ - message: string; - /** Whether the message banner should be displayed to all users. If not specified, defaults to true. */ - enabled?: boolean; - /** The variant of the message banner. One of "info", "warning", "error", or "success". If not specified, defaults to "info". */ - variant?: string; - /** Whether the message banner should be sticky on the screen. If not specified, defaults to `false`. */ - sticky?: boolean; - /** The icon to display on the message banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed. */ - icon?: string | null; - /** The link to display on the message banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed. */ - link?: string | null; - /** The text to display on the link. If not specified, will be displayed as "More info". */ - linkText?: string | null; - /** The title to display on the dialog. If not specified, this will be the same as `linkText`. */ - dialogTitle?: string | null; - /** The markdown to display on the dialog. If not specified, no dialog will be displayed. */ - dialog?: string | null; -} diff --git a/frontend/src/openapi/models/deleteBanner401.ts b/frontend/src/openapi/models/deleteBanner401.ts new file mode 100644 index 0000000000..4a5c5341c2 --- /dev/null +++ b/frontend/src/openapi/models/deleteBanner401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DeleteBanner401 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/deleteBanner403.ts b/frontend/src/openapi/models/deleteBanner403.ts new file mode 100644 index 0000000000..d3a57141c2 --- /dev/null +++ b/frontend/src/openapi/models/deleteBanner403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DeleteBanner403 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/deleteBanner404.ts b/frontend/src/openapi/models/deleteBanner404.ts new file mode 100644 index 0000000000..35cb3781ad --- /dev/null +++ b/frontend/src/openapi/models/deleteBanner404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DeleteBanner404 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/deleteMessageBanner401.ts b/frontend/src/openapi/models/deleteMessageBanner401.ts deleted file mode 100644 index 6e084e66d7..0000000000 --- a/frontend/src/openapi/models/deleteMessageBanner401.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type DeleteMessageBanner401 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/deleteMessageBanner403.ts b/frontend/src/openapi/models/deleteMessageBanner403.ts deleted file mode 100644 index 9d17f170c3..0000000000 --- a/frontend/src/openapi/models/deleteMessageBanner403.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type DeleteMessageBanner403 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/deleteMessageBanner404.ts b/frontend/src/openapi/models/deleteMessageBanner404.ts deleted file mode 100644 index e39440e536..0000000000 --- a/frontend/src/openapi/models/deleteMessageBanner404.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type DeleteMessageBanner404 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/disableBanner401.ts b/frontend/src/openapi/models/disableBanner401.ts new file mode 100644 index 0000000000..964a1ceaff --- /dev/null +++ b/frontend/src/openapi/models/disableBanner401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DisableBanner401 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/disableBanner403.ts b/frontend/src/openapi/models/disableBanner403.ts new file mode 100644 index 0000000000..56921017ac --- /dev/null +++ b/frontend/src/openapi/models/disableBanner403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DisableBanner403 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/disableBanner404.ts b/frontend/src/openapi/models/disableBanner404.ts new file mode 100644 index 0000000000..0c7c68828a --- /dev/null +++ b/frontend/src/openapi/models/disableBanner404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DisableBanner404 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/enableBanner401.ts b/frontend/src/openapi/models/enableBanner401.ts new file mode 100644 index 0000000000..fac5feb545 --- /dev/null +++ b/frontend/src/openapi/models/enableBanner401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type EnableBanner401 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/enableBanner403.ts b/frontend/src/openapi/models/enableBanner403.ts new file mode 100644 index 0000000000..f44a882d68 --- /dev/null +++ b/frontend/src/openapi/models/enableBanner403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type EnableBanner403 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/enableBanner404.ts b/frontend/src/openapi/models/enableBanner404.ts new file mode 100644 index 0000000000..d370d99fc7 --- /dev/null +++ b/frontend/src/openapi/models/enableBanner404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type EnableBanner404 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/eventSchemaType.ts b/frontend/src/openapi/models/eventSchemaType.ts index b5fbff0afe..19e6b6c45a 100644 --- a/frontend/src/openapi/models/eventSchemaType.ts +++ b/frontend/src/openapi/models/eventSchemaType.ts @@ -109,6 +109,7 @@ export const EventSchemaType = { 'change-request-cancelled': 'change-request-cancelled', 'change-request-sent-to-review': 'change-request-sent-to-review', 'change-request-applied': 'change-request-applied', + 'change-request-scheduled': 'change-request-scheduled', 'api-token-created': 'api-token-created', 'api-token-updated': 'api-token-updated', 'api-token-deleted': 'api-token-deleted', @@ -125,7 +126,7 @@ export const EventSchemaType = { 'feature-dependency-added': 'feature-dependency-added', 'feature-dependency-removed': 'feature-dependency-removed', 'feature-dependencies-removed': 'feature-dependencies-removed', - 'message-banner-created': 'message-banner-created', - 'message-banner-updated': 'message-banner-updated', - 'message-banner-deleted': 'message-banner-deleted', + 'banner-created': 'banner-created', + 'banner-updated': 'banner-updated', + 'banner-deleted': 'banner-deleted', } as const; diff --git a/frontend/src/openapi/models/featureEnvironmentSchema.ts b/frontend/src/openapi/models/featureEnvironmentSchema.ts index e816aa1b6f..55f27a2ec4 100644 --- a/frontend/src/openapi/models/featureEnvironmentSchema.ts +++ b/frontend/src/openapi/models/featureEnvironmentSchema.ts @@ -30,4 +30,8 @@ export interface FeatureEnvironmentSchema { variants?: VariantSchema[]; /** The date when metrics where last collected for the feature environment */ lastSeenAt?: string | null; + /** Whether the feature has any strategies defined. */ + hasStrategies?: boolean; + /** Whether the feature has any enabled strategies defined. */ + hasEnabledStrategies?: boolean; } diff --git a/frontend/src/openapi/models/getBanners401.ts b/frontend/src/openapi/models/getBanners401.ts new file mode 100644 index 0000000000..86e7a7dc4b --- /dev/null +++ b/frontend/src/openapi/models/getBanners401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type GetBanners401 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 2bceb4ac2c..6383f9d401 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -87,6 +87,8 @@ export * from './archiveFeatures400'; export * from './archiveFeatures401'; export * from './archiveFeatures403'; export * from './archiveFeatures415'; +export * from './bannerSchema'; +export * from './bannersSchema'; export * from './batchFeaturesSchema'; export * from './batchStaleSchema'; export * from './bulkMetrics400'; @@ -214,15 +216,24 @@ export * from './changeRequestOneOrManyCreateSchemaOneOfTwoone'; export * from './changeRequestOneOrManyCreateSchemaOneOfTwooneAction'; export * from './changeRequestOneOrManyCreateSchemaOneOfTwothree'; export * from './changeRequestOneOrManyCreateSchemaOneOfTwothreeAction'; +export * from './changeRequestScheduleSchema'; +export * from './changeRequestScheduleSchemaStatus'; export * from './changeRequestSchema'; -export * from './changeRequestSchemaCreatedBy'; -export * from './changeRequestSchemaState'; +export * from './changeRequestSchemaOneOf'; +export * from './changeRequestSchemaOneOfCreatedBy'; +export * from './changeRequestSchemaOneOfFour'; +export * from './changeRequestSchemaOneOfFourCreatedBy'; +export * from './changeRequestSchemaOneOfFourState'; +export * from './changeRequestSchemaOneOfState'; export * from './changeRequestSegmentChangeSchema'; export * from './changeRequestSegmentChangeSchemaCreatedBy'; export * from './changeRequestSegmentChangeSchemaPayload'; export * from './changeRequestSegmentChangeSchemaPayloadOneOf'; export * from './changeRequestStateSchema'; -export * from './changeRequestStateSchemaState'; +export * from './changeRequestStateSchemaOneOf'; +export * from './changeRequestStateSchemaOneOfState'; +export * from './changeRequestStateSchemaOneOfThree'; +export * from './changeRequestStateSchemaOneOfThreeState'; export * from './changeRequestUpdateTitleSchema'; export * from './changeRequestsSchema'; export * from './changeRoleForGroup401'; @@ -279,6 +290,11 @@ export * from './createApplication400'; export * from './createApplication401'; export * from './createApplication403'; export * from './createApplicationSchema'; +export * from './createBanner400'; +export * from './createBanner401'; +export * from './createBanner403'; +export * from './createBanner415'; +export * from './createBannerSchema'; export * from './createContextFieldSchema'; export * from './createDependentFeatureSchema'; export * from './createEnvironment400'; @@ -302,11 +318,6 @@ export * from './createGroupSchema'; export * from './createGroupSchemaUsersItem'; export * from './createGroupSchemaUsersItemUser'; export * from './createInvitedUserSchema'; -export * from './createMessageBanner400'; -export * from './createMessageBanner401'; -export * from './createMessageBanner403'; -export * from './createMessageBanner415'; -export * from './createMessageBannerSchema'; export * from './createPat401'; export * from './createPat403'; export * from './createPat404'; @@ -386,6 +397,9 @@ export * from './deleteApiToken401'; export * from './deleteApiToken403'; export * from './deleteApplication401'; export * from './deleteApplication403'; +export * from './deleteBanner401'; +export * from './deleteBanner403'; +export * from './deleteBanner404'; export * from './deleteFeature401'; export * from './deleteFeature403'; export * from './deleteFeatureDependencies401'; @@ -403,9 +417,6 @@ export * from './deleteFeatures403'; export * from './deleteGroup400'; export * from './deleteGroup401'; export * from './deleteGroup403'; -export * from './deleteMessageBanner401'; -export * from './deleteMessageBanner403'; -export * from './deleteMessageBanner404'; export * from './deletePat401'; export * from './deletePat403'; export * from './deletePat404'; @@ -436,11 +447,17 @@ export * from './dependentFeatureSchema'; export * from './deprecateStrategy401'; export * from './deprecateStrategy403'; export * from './deprecateStrategy404'; +export * from './disableBanner401'; +export * from './disableBanner403'; +export * from './disableBanner404'; export * from './doraFeaturesSchema'; export * from './edgeTokenSchema'; export * from './edgeTokenSchemaType'; export * from './editChange404'; export * from './emailSchema'; +export * from './enableBanner401'; +export * from './enableBanner403'; +export * from './enableBanner404'; export * from './environmentProjectSchema'; export * from './environmentSchema'; export * from './environmentsProjectSchema'; @@ -503,6 +520,7 @@ export * from './getArchivedFeatures401'; export * from './getArchivedFeatures403'; export * from './getArchivedFeaturesByProjectId401'; export * from './getArchivedFeaturesByProjectId403'; +export * from './getBanners401'; export * from './getBaseUsersAndGroups401'; export * from './getChangeRequest404'; export * from './getEnvironment401'; @@ -551,7 +569,6 @@ export * from './getLoginHistory404'; export * from './getMaintenance401'; export * from './getMaintenance403'; export * from './getMe401'; -export * from './getMessageBanners401'; export * from './getOidcSettings400'; export * from './getOidcSettings401'; export * from './getOidcSettings403'; @@ -665,8 +682,6 @@ export * from './maintenanceSchema'; export * from './markNotificationsAsReadSchema'; export * from './meSchema'; export * from './meSchemaSplash'; -export * from './messageBannerSchema'; -export * from './messageBannersSchema'; export * from './nameSchema'; export * from './notificationsSchema'; export * from './notificationsSchemaItem'; @@ -842,6 +857,11 @@ export * from './sdkContextSchemaProperties'; export * from './sdkFlatContextSchema'; export * from './searchEventsSchema'; export * from './searchEventsSchemaType'; +export * from './searchFeatures401'; +export * from './searchFeatures403'; +export * from './searchFeatures404'; +export * from './searchFeaturesParams'; +export * from './searchFeaturesSchema'; export * from './searchUsers401'; export * from './searchUsersParams'; export * from './segmentSchema'; @@ -938,6 +958,11 @@ export * from './updateApiToken401'; export * from './updateApiToken403'; export * from './updateApiToken415'; export * from './updateApiTokenSchema'; +export * from './updateBanner400'; +export * from './updateBanner401'; +export * from './updateBanner403'; +export * from './updateBanner404'; +export * from './updateBanner415'; export * from './updateChangeRequestEnvironmentConfigSchema'; export * from './updateContextFieldSchema'; export * from './updateEnvironment400'; @@ -974,11 +999,6 @@ export * from './updateGroup401'; export * from './updateGroup403'; export * from './updateGroup404'; export * from './updateGroup409'; -export * from './updateMessageBanner400'; -export * from './updateMessageBanner401'; -export * from './updateMessageBanner403'; -export * from './updateMessageBanner404'; -export * from './updateMessageBanner415'; export * from './updateProject400'; export * from './updateProject401'; export * from './updateProject403'; @@ -1053,6 +1073,7 @@ export * from './validateArchiveFeatures400'; export * from './validateArchiveFeatures401'; export * from './validateArchiveFeatures403'; export * from './validateArchiveFeatures415'; +export * from './validateArchiveFeaturesSchema'; export * from './validateConstraint400'; export * from './validateConstraint401'; export * from './validateConstraint403'; diff --git a/frontend/src/openapi/models/messageBannerSchema.ts b/frontend/src/openapi/models/messageBannerSchema.ts deleted file mode 100644 index 395da383a7..0000000000 --- a/frontend/src/openapi/models/messageBannerSchema.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -/** - * An object describing a message banner to be displayed to all users. - */ -export interface MessageBannerSchema { - /** The message banner's ID. Message banner IDs are incrementing integers. In other words, a more recently created message banner will always have a higher ID than an older one. */ - id: number; - /** The message to display to all users. Supports markdown. */ - message: string; - /** Whether the message banner should be displayed to all users. If not specified, defaults to true. */ - enabled?: boolean; - /** The variant of the message banner. One of "info", "warning", "error", or "success". If not specified, defaults to "info". */ - variant?: string; - /** Whether the message banner should be sticky on the screen. If not specified, defaults to `false`. */ - sticky?: boolean; - /** The icon to display on the message banner. Can be one of https://fonts.google.com/icons. If not specified, this will be the default icon for the variant. If "none", no icon will be displayed. */ - icon?: string | null; - /** The link to display on the message banner. Can either be an absolute or a relative link (e.g. absolute: "https://example.com" or relative: "/admin/service-accounts"). If "dialog", will display a dialog when clicked. If not specified, no link will be displayed. */ - link?: string | null; - /** The text to display on the link. If not specified, will be displayed as "More info". */ - linkText?: string | null; - /** The title to display on the dialog. If not specified, this will be the same as `linkText`. */ - dialogTitle?: string | null; - /** The markdown to display on the dialog. If not specified, no dialog will be displayed. */ - dialog?: string | null; - /** The date and time of when the message banner was created. */ - createdAt: string; -} diff --git a/frontend/src/openapi/models/messageBannersSchema.ts b/frontend/src/openapi/models/messageBannersSchema.ts deleted file mode 100644 index 5b14d9b7c5..0000000000 --- a/frontend/src/openapi/models/messageBannersSchema.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { MessageBannerSchema } from './messageBannerSchema'; - -/** - * A response model with a list of message banners. - */ -export interface MessageBannersSchema { - /** A list of message banners. */ - messageBanners: MessageBannerSchema[]; -} diff --git a/frontend/src/openapi/models/searchEventsSchemaType.ts b/frontend/src/openapi/models/searchEventsSchemaType.ts index 430c257d18..cefd2a6d59 100644 --- a/frontend/src/openapi/models/searchEventsSchemaType.ts +++ b/frontend/src/openapi/models/searchEventsSchemaType.ts @@ -109,6 +109,7 @@ export const SearchEventsSchemaType = { 'change-request-cancelled': 'change-request-cancelled', 'change-request-sent-to-review': 'change-request-sent-to-review', 'change-request-applied': 'change-request-applied', + 'change-request-scheduled': 'change-request-scheduled', 'api-token-created': 'api-token-created', 'api-token-updated': 'api-token-updated', 'api-token-deleted': 'api-token-deleted', @@ -125,7 +126,7 @@ export const SearchEventsSchemaType = { 'feature-dependency-added': 'feature-dependency-added', 'feature-dependency-removed': 'feature-dependency-removed', 'feature-dependencies-removed': 'feature-dependencies-removed', - 'message-banner-created': 'message-banner-created', - 'message-banner-updated': 'message-banner-updated', - 'message-banner-deleted': 'message-banner-deleted', + 'banner-created': 'banner-created', + 'banner-updated': 'banner-updated', + 'banner-deleted': 'banner-deleted', } as const; diff --git a/frontend/src/openapi/models/searchFeatures401.ts b/frontend/src/openapi/models/searchFeatures401.ts new file mode 100644 index 0000000000..3a3cb00fc2 --- /dev/null +++ b/frontend/src/openapi/models/searchFeatures401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type SearchFeatures401 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/searchFeatures403.ts b/frontend/src/openapi/models/searchFeatures403.ts new file mode 100644 index 0000000000..547f2fe96f --- /dev/null +++ b/frontend/src/openapi/models/searchFeatures403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type SearchFeatures403 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/searchFeatures404.ts b/frontend/src/openapi/models/searchFeatures404.ts new file mode 100644 index 0000000000..3f95b00e07 --- /dev/null +++ b/frontend/src/openapi/models/searchFeatures404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type SearchFeatures404 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/searchFeaturesParams.ts b/frontend/src/openapi/models/searchFeaturesParams.ts new file mode 100644 index 0000000000..8181bd6989 --- /dev/null +++ b/frontend/src/openapi/models/searchFeaturesParams.ts @@ -0,0 +1,36 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type SearchFeaturesParams = { + /** + * The search query for the feature or tag + */ + query?: string; + /** + * Id of the project where search and filter is performed + */ + projectId?: 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[]; + /** + * 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. + */ + cursor?: string; + /** + * The number of results to return in a page. By default it is set to 50 + */ + limit?: string; +}; diff --git a/frontend/src/openapi/models/searchFeaturesSchema.ts b/frontend/src/openapi/models/searchFeaturesSchema.ts new file mode 100644 index 0000000000..8107044e19 --- /dev/null +++ b/frontend/src/openapi/models/searchFeaturesSchema.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { FeatureSchema } from './featureSchema'; + +/** + * A list of features matching search and filter criteria. + */ +export interface SearchFeaturesSchema { + /** The full list of features in this project (excluding archived features) */ + features: FeatureSchema[]; +} diff --git a/frontend/src/openapi/models/updateBanner400.ts b/frontend/src/openapi/models/updateBanner400.ts new file mode 100644 index 0000000000..bb1da2c5d9 --- /dev/null +++ b/frontend/src/openapi/models/updateBanner400.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateBanner400 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/updateBanner401.ts b/frontend/src/openapi/models/updateBanner401.ts new file mode 100644 index 0000000000..800f880784 --- /dev/null +++ b/frontend/src/openapi/models/updateBanner401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateBanner401 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/updateBanner403.ts b/frontend/src/openapi/models/updateBanner403.ts new file mode 100644 index 0000000000..b5cfbcb81e --- /dev/null +++ b/frontend/src/openapi/models/updateBanner403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateBanner403 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/updateBanner404.ts b/frontend/src/openapi/models/updateBanner404.ts new file mode 100644 index 0000000000..2caf1c2eeb --- /dev/null +++ b/frontend/src/openapi/models/updateBanner404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateBanner404 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/updateBanner415.ts b/frontend/src/openapi/models/updateBanner415.ts new file mode 100644 index 0000000000..c00df64ec7 --- /dev/null +++ b/frontend/src/openapi/models/updateBanner415.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateBanner415 = { + /** The ID of the error instance */ + id?: string; + /** The name of the error kind */ + name?: string; + /** A description of what went wrong. */ + message?: string; +}; diff --git a/frontend/src/openapi/models/updateMessageBanner400.ts b/frontend/src/openapi/models/updateMessageBanner400.ts deleted file mode 100644 index 0facf20b94..0000000000 --- a/frontend/src/openapi/models/updateMessageBanner400.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMessageBanner400 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/updateMessageBanner401.ts b/frontend/src/openapi/models/updateMessageBanner401.ts deleted file mode 100644 index 1063ffacbc..0000000000 --- a/frontend/src/openapi/models/updateMessageBanner401.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMessageBanner401 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/updateMessageBanner403.ts b/frontend/src/openapi/models/updateMessageBanner403.ts deleted file mode 100644 index 8765489a6f..0000000000 --- a/frontend/src/openapi/models/updateMessageBanner403.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMessageBanner403 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/updateMessageBanner404.ts b/frontend/src/openapi/models/updateMessageBanner404.ts deleted file mode 100644 index dc2c2fbde8..0000000000 --- a/frontend/src/openapi/models/updateMessageBanner404.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMessageBanner404 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/updateMessageBanner415.ts b/frontend/src/openapi/models/updateMessageBanner415.ts deleted file mode 100644 index 3c8f8fa049..0000000000 --- a/frontend/src/openapi/models/updateMessageBanner415.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMessageBanner415 = { - /** The ID of the error instance */ - id?: string; - /** The name of the error kind */ - name?: string; - /** A description of what went wrong. */ - message?: string; -}; diff --git a/frontend/src/openapi/models/validateArchiveFeaturesSchema.ts b/frontend/src/openapi/models/validateArchiveFeaturesSchema.ts new file mode 100644 index 0000000000..c574ade4ea --- /dev/null +++ b/frontend/src/openapi/models/validateArchiveFeaturesSchema.ts @@ -0,0 +1,15 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * Validation details for features archive operation + */ +export interface ValidateArchiveFeaturesSchema { + /** List of parent features that would orphan child features that are not part of the archive operation */ + parentsWithChildFeatures: string[]; + /** Whether any dependencies will be deleted as part of archive */ + hasDeletedDependencies: boolean; +}