From 8a507b2eec3294faa9bbb95d93068f8946b016d3 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Fri, 8 Nov 2024 10:53:45 +0200 Subject: [PATCH] feat: connect project health frontend with backend (#8695) 1. Connected project health frontend with backend 2. Synced orval --- .../Project/ProjectStatus/ProjectHealth.tsx | 21 ++++++----- .../ProjectStatus/ProjectStatusModal.tsx | 2 +- .../useProjectStatus/useProjectStatus.ts | 1 + .../addMilestoneToReleasePlanTemplate401.ts | 14 +++++++ .../addMilestoneToReleasePlanTemplate403.ts | 14 +++++++ .../addMilestoneToReleasePlanTemplate404.ts | 14 +++++++ .../models/addStrategyToMilestone401.ts | 14 +++++++ .../models/addStrategyToMilestone403.ts | 14 +++++++ .../models/addStrategyToMilestone404.ts | 14 +++++++ .../models/deleteReleasePlanTemplate401.ts | 14 +++++++ .../models/deleteReleasePlanTemplate403.ts | 14 +++++++ .../deprecatedSearchEventsSchemaType.ts | 4 ++ .../src/openapi/models/eventSchemaType.ts | 4 ++ frontend/src/openapi/models/index.ts | 25 +++++++++++++ .../src/openapi/models/projectStatusSchema.ts | 15 ++++---- .../models/projectStatusSchemaResources.ts | 20 +++++++++- .../releasePlanMilestoneStrategySchema.ts | 2 +- .../models/remoteMilestoneStrategy401.ts | 14 +++++++ .../models/remoteMilestoneStrategy403.ts | 14 +++++++ .../models/remoteMilestoneStrategy404.ts | 14 +++++++ .../models/removeReleasePlanMilestone401.ts | 14 +++++++ .../models/removeReleasePlanMilestone403.ts | 14 +++++++ .../models/removeReleasePlanMilestone404.ts | 14 +++++++ .../models/updateMilestoneStrategy401.ts | 14 +++++++ .../models/updateMilestoneStrategy403.ts | 14 +++++++ .../models/updateMilestoneStrategy404.ts | 14 +++++++ .../updateReleasePlanMilestoneSchema.ts | 20 ++++++++++ ...pdateReleasePlanMilestoneStrategySchema.ts | 37 +++++++++++++++++++ .../models/updateReleasePlanTemplate401.ts | 14 +++++++ .../models/updateReleasePlanTemplate403.ts | 14 +++++++ .../updateReleasePlanTemplateMilestone401.ts | 14 +++++++ .../updateReleasePlanTemplateMilestone403.ts | 14 +++++++ .../updateReleasePlanTemplateMilestone404.ts | 14 +++++++ .../models/updateReleasePlanTemplateSchema.ts | 28 ++++++++++++++ 34 files changed, 466 insertions(+), 21 deletions(-) create mode 100644 frontend/src/openapi/models/addMilestoneToReleasePlanTemplate401.ts create mode 100644 frontend/src/openapi/models/addMilestoneToReleasePlanTemplate403.ts create mode 100644 frontend/src/openapi/models/addMilestoneToReleasePlanTemplate404.ts create mode 100644 frontend/src/openapi/models/addStrategyToMilestone401.ts create mode 100644 frontend/src/openapi/models/addStrategyToMilestone403.ts create mode 100644 frontend/src/openapi/models/addStrategyToMilestone404.ts create mode 100644 frontend/src/openapi/models/deleteReleasePlanTemplate401.ts create mode 100644 frontend/src/openapi/models/deleteReleasePlanTemplate403.ts create mode 100644 frontend/src/openapi/models/remoteMilestoneStrategy401.ts create mode 100644 frontend/src/openapi/models/remoteMilestoneStrategy403.ts create mode 100644 frontend/src/openapi/models/remoteMilestoneStrategy404.ts create mode 100644 frontend/src/openapi/models/removeReleasePlanMilestone401.ts create mode 100644 frontend/src/openapi/models/removeReleasePlanMilestone403.ts create mode 100644 frontend/src/openapi/models/removeReleasePlanMilestone404.ts create mode 100644 frontend/src/openapi/models/updateMilestoneStrategy401.ts create mode 100644 frontend/src/openapi/models/updateMilestoneStrategy403.ts create mode 100644 frontend/src/openapi/models/updateMilestoneStrategy404.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanMilestoneSchema.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanMilestoneStrategySchema.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanTemplate401.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanTemplate403.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanTemplateMilestone401.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanTemplateMilestone403.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanTemplateMilestone404.ts create mode 100644 frontend/src/openapi/models/updateReleasePlanTemplateSchema.ts diff --git a/frontend/src/component/project/Project/ProjectStatus/ProjectHealth.tsx b/frontend/src/component/project/Project/ProjectStatus/ProjectHealth.tsx index 30d646e1d7..966b240943 100644 --- a/frontend/src/component/project/Project/ProjectStatus/ProjectHealth.tsx +++ b/frontend/src/component/project/Project/ProjectStatus/ProjectHealth.tsx @@ -1,12 +1,9 @@ -import type React from 'react'; import { useTheme, Typography } from '@mui/material'; import { styled } from '@mui/system'; import { Link } from 'react-router-dom'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; - -interface ProjectHealthProps { - health: number; -} +import { useProjectStatus } from 'hooks/api/getters/useProjectStatus/useProjectStatus'; +import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; const HealthContainer = styled('div')(({ theme }) => ({ backgroundColor: theme.palette.envAccordion.expanded, @@ -30,7 +27,11 @@ const DescriptionText = styled(Typography)(({ theme }) => ({ color: theme.palette.text.secondary, })); -export const ProjectHealth: React.FC = ({ health }) => { +export const ProjectHealth = () => { + const projectId = useRequiredPathParam('projectId'); + const { + data: { averageHealth }, + } = useProjectStatus(projectId); const { isOss } = useUiConfig(); const theme = useTheme(); const radius = 40; @@ -40,7 +41,7 @@ export const ProjectHealth: React.FC = ({ health }) => { const gapLength = 0.3; const filledLength = 1 - gapLength; const offset = 0.75 - gapLength / 2; - const healthLength = (health / 100) * circumference * 0.7; + const healthLength = (averageHealth / 100) * circumference * 0.7; return ( @@ -74,12 +75,12 @@ export const ProjectHealth: React.FC = ({ health }) => { fill={theme.palette.text.primary} fontSize='24px' > - {health}% + {averageHealth}% - On average, your project health has remained at {health}% - the last 4 weeks + On average, your project health has remained at{' '} + {averageHealth}% the last 4 weeks diff --git a/frontend/src/component/project/Project/ProjectStatus/ProjectStatusModal.tsx b/frontend/src/component/project/Project/ProjectStatus/ProjectStatusModal.tsx index 4408f4d883..8357c70350 100644 --- a/frontend/src/component/project/Project/ProjectStatus/ProjectStatusModal.tsx +++ b/frontend/src/component/project/Project/ProjectStatus/ProjectStatusModal.tsx @@ -37,7 +37,7 @@ export const ProjectStatusModal = ({ open, close }: Props) => { - + diff --git a/frontend/src/hooks/api/getters/useProjectStatus/useProjectStatus.ts b/frontend/src/hooks/api/getters/useProjectStatus/useProjectStatus.ts index 11755d59ad..d3a5963f18 100644 --- a/frontend/src/hooks/api/getters/useProjectStatus/useProjectStatus.ts +++ b/frontend/src/hooks/api/getters/useProjectStatus/useProjectStatus.ts @@ -12,6 +12,7 @@ const placeholderData: ProjectStatusSchema = { apiTokens: 0, segments: 0, }, + averageHealth: 0, }; export const useProjectStatus = (projectId: string) => { diff --git a/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate401.ts b/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate401.ts new file mode 100644 index 0000000000..7c344a04d6 --- /dev/null +++ b/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type AddMilestoneToReleasePlanTemplate401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate403.ts b/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate403.ts new file mode 100644 index 0000000000..2cd301cceb --- /dev/null +++ b/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type AddMilestoneToReleasePlanTemplate403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate404.ts b/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate404.ts new file mode 100644 index 0000000000..043010932a --- /dev/null +++ b/frontend/src/openapi/models/addMilestoneToReleasePlanTemplate404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type AddMilestoneToReleasePlanTemplate404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/addStrategyToMilestone401.ts b/frontend/src/openapi/models/addStrategyToMilestone401.ts new file mode 100644 index 0000000000..7e04e64dad --- /dev/null +++ b/frontend/src/openapi/models/addStrategyToMilestone401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type AddStrategyToMilestone401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/addStrategyToMilestone403.ts b/frontend/src/openapi/models/addStrategyToMilestone403.ts new file mode 100644 index 0000000000..c0ae3e1ba2 --- /dev/null +++ b/frontend/src/openapi/models/addStrategyToMilestone403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type AddStrategyToMilestone403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/addStrategyToMilestone404.ts b/frontend/src/openapi/models/addStrategyToMilestone404.ts new file mode 100644 index 0000000000..ffc37e81fa --- /dev/null +++ b/frontend/src/openapi/models/addStrategyToMilestone404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type AddStrategyToMilestone404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/deleteReleasePlanTemplate401.ts b/frontend/src/openapi/models/deleteReleasePlanTemplate401.ts new file mode 100644 index 0000000000..4a91de8af2 --- /dev/null +++ b/frontend/src/openapi/models/deleteReleasePlanTemplate401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DeleteReleasePlanTemplate401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/deleteReleasePlanTemplate403.ts b/frontend/src/openapi/models/deleteReleasePlanTemplate403.ts new file mode 100644 index 0000000000..77ff78edc3 --- /dev/null +++ b/frontend/src/openapi/models/deleteReleasePlanTemplate403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type DeleteReleasePlanTemplate403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts b/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts index 5997615e66..a146c92ddb 100644 --- a/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts +++ b/frontend/src/openapi/models/deprecatedSearchEventsSchemaType.ts @@ -162,4 +162,8 @@ export const DeprecatedSearchEventsSchemaType = { 'actions-created': 'actions-created', 'actions-updated': 'actions-updated', 'actions-deleted': 'actions-deleted', + 'release-plan-template-created': 'release-plan-template-created', + 'release-plan-template-updated': 'release-plan-template-updated', + 'release-plan-template-deleted': 'release-plan-template-deleted', + 'user-preference-updated': 'user-preference-updated', } as const; diff --git a/frontend/src/openapi/models/eventSchemaType.ts b/frontend/src/openapi/models/eventSchemaType.ts index 99cce4516a..2bd61fc107 100644 --- a/frontend/src/openapi/models/eventSchemaType.ts +++ b/frontend/src/openapi/models/eventSchemaType.ts @@ -162,4 +162,8 @@ export const EventSchemaType = { 'actions-created': 'actions-created', 'actions-updated': 'actions-updated', 'actions-deleted': 'actions-deleted', + 'release-plan-template-created': 'release-plan-template-created', + 'release-plan-template-updated': 'release-plan-template-updated', + 'release-plan-template-deleted': 'release-plan-template-deleted', + 'user-preference-updated': 'user-preference-updated', } as const; diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 4dd6d3daa0..8e28d287be 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -47,6 +47,9 @@ export * from './addFeatureDependency404'; export * from './addFeatureStrategy401'; export * from './addFeatureStrategy403'; export * from './addFeatureStrategy404'; +export * from './addMilestoneToReleasePlanTemplate401'; +export * from './addMilestoneToReleasePlanTemplate403'; +export * from './addMilestoneToReleasePlanTemplate404'; export * from './addPublicSignupTokenUser400'; export * from './addPublicSignupTokenUser409'; export * from './addRoleAccessToProject400'; @@ -57,6 +60,9 @@ export * from './addRoleAccessToProject415'; export * from './addRoleToUser401'; export * from './addRoleToUser403'; export * from './addRoleToUser404'; +export * from './addStrategyToMilestone401'; +export * from './addStrategyToMilestone403'; +export * from './addStrategyToMilestone404'; export * from './addTag400'; export * from './addTag401'; export * from './addTag403'; @@ -504,6 +510,8 @@ export * from './deleteProjectApiToken400'; export * from './deleteProjectApiToken401'; export * from './deleteProjectApiToken403'; export * from './deleteProjectApiToken404'; +export * from './deleteReleasePlanTemplate401'; +export * from './deleteReleasePlanTemplate403'; export * from './deleteRole400'; export * from './deleteRole401'; export * from './deleteRole403'; @@ -1048,6 +1056,9 @@ export * from './releasePlanSchema'; export * from './releasePlanSchemaDiscriminator'; export * from './releasePlanTemplateSchema'; export * from './releasePlanTemplateSchemaDiscriminator'; +export * from './remoteMilestoneStrategy401'; +export * from './remoteMilestoneStrategy403'; +export * from './remoteMilestoneStrategy404'; export * from './removeEnvironment400'; export * from './removeEnvironment401'; export * from './removeEnvironmentFromProject400'; @@ -1060,6 +1071,9 @@ export * from './removeFavoriteProject404'; export * from './removeGroupAccess401'; export * from './removeGroupAccess403'; export * from './removeGroupAccess404'; +export * from './removeReleasePlanMilestone401'; +export * from './removeReleasePlanMilestone403'; +export * from './removeReleasePlanMilestone404'; export * from './removeRoleForUser401'; export * from './removeRoleForUser403'; export * from './removeRoleForUser404'; @@ -1303,6 +1317,9 @@ export * from './updateLicense400'; export * from './updateLicense401'; export * from './updateLicense403'; export * from './updateLicense415'; +export * from './updateMilestoneStrategy401'; +export * from './updateMilestoneStrategy403'; +export * from './updateMilestoneStrategy404'; export * from './updateProject400'; export * from './updateProject401'; export * from './updateProject403'; @@ -1320,6 +1337,14 @@ export * from './updateProjectSchemaMode'; export * from './updatePublicSignupToken400'; export * from './updatePublicSignupToken401'; export * from './updatePublicSignupToken403'; +export * from './updateReleasePlanMilestoneSchema'; +export * from './updateReleasePlanMilestoneStrategySchema'; +export * from './updateReleasePlanTemplate401'; +export * from './updateReleasePlanTemplate403'; +export * from './updateReleasePlanTemplateMilestone401'; +export * from './updateReleasePlanTemplateMilestone403'; +export * from './updateReleasePlanTemplateMilestone404'; +export * from './updateReleasePlanTemplateSchema'; export * from './updateRole400'; export * from './updateRole401'; export * from './updateRole403'; diff --git a/frontend/src/openapi/models/projectStatusSchema.ts b/frontend/src/openapi/models/projectStatusSchema.ts index 6bb8f730fb..0794d97f1c 100644 --- a/frontend/src/openapi/models/projectStatusSchema.ts +++ b/frontend/src/openapi/models/projectStatusSchema.ts @@ -4,6 +4,7 @@ * See `gen:api` script in package.json */ import type { ProjectActivitySchema } from './projectActivitySchema'; +import type { ProjectStatusSchemaResources } from './projectStatusSchemaResources'; /** * Schema representing the overall status of a project, including an array of activity records. Each record in the activity array contains a date and a count, providing a snapshot of the project’s activity level over time. @@ -11,13 +12,11 @@ import type { ProjectActivitySchema } from './projectActivitySchema'; export interface ProjectStatusSchema { /** Array of activity records with date and count, representing the project’s daily activity statistics. */ activityCountByDate: ProjectActivitySchema; - + /** + * The average health score over the last 4 weeks, indicating whether features are stale or active. + * @minimum 0 + */ + averageHealth: number; /** Key resources within the project */ - /** Handwritten placeholder */ - resources: { - connectedEnvironments: number; - apiTokens: number; - members: number; - segments: number; - }; + resources: ProjectStatusSchemaResources; } diff --git a/frontend/src/openapi/models/projectStatusSchemaResources.ts b/frontend/src/openapi/models/projectStatusSchemaResources.ts index 6483aff39e..bb028781dd 100644 --- a/frontend/src/openapi/models/projectStatusSchemaResources.ts +++ b/frontend/src/openapi/models/projectStatusSchemaResources.ts @@ -8,6 +8,24 @@ * Key resources within the project */ export type ProjectStatusSchemaResources = { - /** The number of environments that have received SDK traffic in this project. */ + /** + * The number of API tokens created specifically for this project. + * @minimum 0 + */ + apiTokens: number; + /** + * The number of environments that have received SDK traffic in this project. + * @minimum 0 + */ connectedEnvironments: number; + /** + * The number of users who have been granted roles in this project. Does not include users who have access via groups. + * @minimum 0 + */ + members: number; + /** + * The number of segments that are scoped to this project. + * @minimum 0 + */ + segments: number; }; diff --git a/frontend/src/openapi/models/releasePlanMilestoneStrategySchema.ts b/frontend/src/openapi/models/releasePlanMilestoneStrategySchema.ts index e3ca117192..f9dbf1bca4 100644 --- a/frontend/src/openapi/models/releasePlanMilestoneStrategySchema.ts +++ b/frontend/src/openapi/models/releasePlanMilestoneStrategySchema.ts @@ -31,7 +31,7 @@ export interface ReleasePlanMilestoneStrategySchema { * A descriptive title for the strategy * @nullable */ - title: string | null; + title?: string | null; /** Strategy level variants */ variants?: CreateStrategyVariantSchema[]; } diff --git a/frontend/src/openapi/models/remoteMilestoneStrategy401.ts b/frontend/src/openapi/models/remoteMilestoneStrategy401.ts new file mode 100644 index 0000000000..0701ea62ef --- /dev/null +++ b/frontend/src/openapi/models/remoteMilestoneStrategy401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type RemoteMilestoneStrategy401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/remoteMilestoneStrategy403.ts b/frontend/src/openapi/models/remoteMilestoneStrategy403.ts new file mode 100644 index 0000000000..c3cae9b44e --- /dev/null +++ b/frontend/src/openapi/models/remoteMilestoneStrategy403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type RemoteMilestoneStrategy403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/remoteMilestoneStrategy404.ts b/frontend/src/openapi/models/remoteMilestoneStrategy404.ts new file mode 100644 index 0000000000..89a4fb8c6b --- /dev/null +++ b/frontend/src/openapi/models/remoteMilestoneStrategy404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type RemoteMilestoneStrategy404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/removeReleasePlanMilestone401.ts b/frontend/src/openapi/models/removeReleasePlanMilestone401.ts new file mode 100644 index 0000000000..1aa432dd40 --- /dev/null +++ b/frontend/src/openapi/models/removeReleasePlanMilestone401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type RemoveReleasePlanMilestone401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/removeReleasePlanMilestone403.ts b/frontend/src/openapi/models/removeReleasePlanMilestone403.ts new file mode 100644 index 0000000000..8a2963a9d1 --- /dev/null +++ b/frontend/src/openapi/models/removeReleasePlanMilestone403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type RemoveReleasePlanMilestone403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/removeReleasePlanMilestone404.ts b/frontend/src/openapi/models/removeReleasePlanMilestone404.ts new file mode 100644 index 0000000000..4c87bd7678 --- /dev/null +++ b/frontend/src/openapi/models/removeReleasePlanMilestone404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type RemoveReleasePlanMilestone404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateMilestoneStrategy401.ts b/frontend/src/openapi/models/updateMilestoneStrategy401.ts new file mode 100644 index 0000000000..a3a05e3d93 --- /dev/null +++ b/frontend/src/openapi/models/updateMilestoneStrategy401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateMilestoneStrategy401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateMilestoneStrategy403.ts b/frontend/src/openapi/models/updateMilestoneStrategy403.ts new file mode 100644 index 0000000000..2408bd3002 --- /dev/null +++ b/frontend/src/openapi/models/updateMilestoneStrategy403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateMilestoneStrategy403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateMilestoneStrategy404.ts b/frontend/src/openapi/models/updateMilestoneStrategy404.ts new file mode 100644 index 0000000000..02c0d06b34 --- /dev/null +++ b/frontend/src/openapi/models/updateMilestoneStrategy404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateMilestoneStrategy404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateReleasePlanMilestoneSchema.ts b/frontend/src/openapi/models/updateReleasePlanMilestoneSchema.ts new file mode 100644 index 0000000000..d66e577b57 --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanMilestoneSchema.ts @@ -0,0 +1,20 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { UpdateReleasePlanMilestoneStrategySchema } from './updateReleasePlanMilestoneStrategySchema'; + +/** + * Schema representing the update of a release plan milestone. + */ +export interface UpdateReleasePlanMilestoneSchema { + /** The name of the milestone. */ + name: string; + /** The ID of the release plan/template that this milestone belongs to. */ + releasePlanDefinitionId: string; + /** The order of the milestone in the release plan. */ + sortOrder: number; + /** A list of strategies that are attached to this milestone. */ + strategies?: UpdateReleasePlanMilestoneStrategySchema[]; +} diff --git a/frontend/src/openapi/models/updateReleasePlanMilestoneStrategySchema.ts b/frontend/src/openapi/models/updateReleasePlanMilestoneStrategySchema.ts new file mode 100644 index 0000000000..2122e1d2d1 --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanMilestoneStrategySchema.ts @@ -0,0 +1,37 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ConstraintSchema } from './constraintSchema'; +import type { ParametersSchema } from './parametersSchema'; +import type { CreateStrategyVariantSchema } from './createStrategyVariantSchema'; + +/** + * Schema representing the update of a release plan milestone. + */ +export interface UpdateReleasePlanMilestoneStrategySchema { + /** A list of the constraints attached to the strategy. See https://docs.getunleash.io/reference/strategy-constraints */ + constraints?: ConstraintSchema[]; + /** The milestone strategy's ID. Milestone strategy IDs are ulids. */ + id?: string; + /** + * The ID of the milestone that this strategy belongs to. + */ + milestoneId: string; + /** An object containing the parameters for the strategy */ + parameters?: ParametersSchema; + /** Ids of segments to use for this strategy */ + segments?: number[]; + /** The order of the strategy in the list */ + sortOrder: number; + /** The name of the strategy type */ + strategyName: string; + /** + * A descriptive title for the strategy + * @nullable + */ + title?: string | null; + /** Strategy level variants */ + variants?: CreateStrategyVariantSchema[]; +} diff --git a/frontend/src/openapi/models/updateReleasePlanTemplate401.ts b/frontend/src/openapi/models/updateReleasePlanTemplate401.ts new file mode 100644 index 0000000000..a867a4cce7 --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanTemplate401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateReleasePlanTemplate401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateReleasePlanTemplate403.ts b/frontend/src/openapi/models/updateReleasePlanTemplate403.ts new file mode 100644 index 0000000000..c096eaec71 --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanTemplate403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateReleasePlanTemplate403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateReleasePlanTemplateMilestone401.ts b/frontend/src/openapi/models/updateReleasePlanTemplateMilestone401.ts new file mode 100644 index 0000000000..f59c9a97d9 --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanTemplateMilestone401.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateReleasePlanTemplateMilestone401 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateReleasePlanTemplateMilestone403.ts b/frontend/src/openapi/models/updateReleasePlanTemplateMilestone403.ts new file mode 100644 index 0000000000..eaf746feea --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanTemplateMilestone403.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateReleasePlanTemplateMilestone403 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateReleasePlanTemplateMilestone404.ts b/frontend/src/openapi/models/updateReleasePlanTemplateMilestone404.ts new file mode 100644 index 0000000000..173c964b4d --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanTemplateMilestone404.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type UpdateReleasePlanTemplateMilestone404 = { + /** The ID of the error instance */ + id?: string; + /** A description of what went wrong. */ + message?: string; + /** The name of the error kind */ + name?: string; +}; diff --git a/frontend/src/openapi/models/updateReleasePlanTemplateSchema.ts b/frontend/src/openapi/models/updateReleasePlanTemplateSchema.ts new file mode 100644 index 0000000000..80e3d6f995 --- /dev/null +++ b/frontend/src/openapi/models/updateReleasePlanTemplateSchema.ts @@ -0,0 +1,28 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { CreateReleasePlanMilestoneSchema } from './createReleasePlanMilestoneSchema'; + +/** + * Schema representing the update of a release template. + */ +export interface UpdateReleasePlanTemplateSchema { + /** + * A description of the release template. + * @nullable + */ + description?: string | null; + /** + * The release plan/template's ID. Release template IDs are ulids. + */ + id: string; + /** + * A list of the milestones in this release template. + * @nullable + */ + milestones?: CreateReleasePlanMilestoneSchema[] | null; + /** The name of the release template. */ + name: string; +}