From 0919b7b9252feabe88ec29a1e35de169894dde72 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Wed, 22 Oct 2025 15:40:30 +0200 Subject: [PATCH] refactor: update/create progression to change progression (#10843) --- .../Change/ConsolidatedProgressionChanges.tsx | 48 +++--------- .../Changes/Change/FeatureChange.tsx | 3 +- .../Changes/Change/MilestoneListRenderer.tsx | 6 +- .../Changes/Change/ProgressionChange.tsx | 54 +++++--------- .../Changes/Change/ReleasePlanChange.tsx | 24 +++--- .../Changes/Change/applyProgressionChanges.ts | 23 ++---- .../changeRequest/changeRequest.types.ts | 47 ++++-------- .../ReleasePlanChangeRequestDialog.tsx | 39 ++-------- .../MilestoneProgressionForm.tsx | 6 +- .../ReleasePlan/ReleasePlan.tsx | 45 +++-------- .../MilestoneTransitionDisplay.tsx | 9 ++- .../MilestoneAutomation.tsx | 20 ++--- .../ReleasePlanMilestoneItem.tsx | 74 +++++-------------- .../useChangeRequestApi.ts | 3 +- .../useMilestoneProgressionsApi.ts | 32 ++------ ...03.ts => changeMilestoneProgression401.ts} | 2 +- ...01.ts => changeMilestoneProgression403.ts} | 2 +- ...ts => changeMilestoneProgressionSchema.ts} | 12 ++- .../changeRequestCreateFeatureSchema.ts | 6 +- ...equestCreateFeatureSchemaOneOfThreefive.ts | 18 ----- ...CreateFeatureSchemaOneOfThreefiveAction.ts | 16 ---- ...questCreateFeatureSchemaOneOfThreethree.ts | 18 +++++ ...eateFeatureSchemaOneOfThreethreeAction.ts} | 6 +- ...ateFeatureSchemaOneOfThreethreePayload.ts} | 2 +- ...RequestCreateFeatureSchemaOneOfThreetwo.ts | 18 ----- ...tCreateFeatureSchemaOneOfThreetwoAction.ts | 16 ---- ...equestCreateFeatureSchemaOneOfThreezero.ts | 6 +- ...CreateFeatureSchemaOneOfThreezeroAction.ts | 2 +- ...eateFeatureSchemaOneOfThreezeroPayload.ts} | 7 +- .../models/changeRequestCreateSchema.ts | 6 +- .../changeRequestCreateSchemaOneOfFourzero.ts | 18 ----- ...hangeRequestCreateSchemaOneOfThreeeight.ts | 18 +++++ ...questCreateSchemaOneOfThreeeightAction.ts} | 6 +- ...uestCreateSchemaOneOfThreeeightPayload.ts} | 2 +- ...changeRequestCreateSchemaOneOfThreefive.ts | 6 +- ...RequestCreateSchemaOneOfThreefiveAction.ts | 2 +- ...questCreateSchemaOneOfThreefivePayload.ts} | 6 +- ...hangeRequestCreateSchemaOneOfThreeseven.ts | 18 ----- ...equestCreateSchemaOneOfThreesevenAction.ts | 16 ---- .../changeRequestOneOrManyCreateSchema.ts | 6 +- ...questOneOrManyCreateSchemaOneOfFourzero.ts | 18 ----- ...estOneOrManyCreateSchemaOneOfThreeeight.ts | 18 +++++ ...OrManyCreateSchemaOneOfThreeeightAction.ts | 16 ++++ ...ManyCreateSchemaOneOfThreeeightPayload.ts} | 2 +- ...uestOneOrManyCreateSchemaOneOfThreefive.ts | 6 +- ...eOrManyCreateSchemaOneOfThreefiveAction.ts | 2 +- ...rManyCreateSchemaOneOfThreefivePayload.ts} | 6 +- ...estOneOrManyCreateSchemaOneOfThreeseven.ts | 18 ----- ...OrManyCreateSchemaOneOfThreesevenAction.ts | 16 ---- .../models/detailedInvoicesLineSchema.ts | 4 +- .../detailedInvoicesSchemaInvoicesItem.ts | 2 +- ...sion401.ts => edgeInstanceHeartbeat400.ts} | 2 +- .../openapi/models/edgeLicenseStateSchema.ts | 14 ++++ .../edgeLicenseStateSchemaEdgeLicenseState.ts | 18 +++++ .../src/openapi/models/eventSchemaType.ts | 1 + frontend/src/openapi/models/index.ts | 44 +++++------ .../src/openapi/models/licenseReadSchema.ts | 7 +- .../models/licenseReadSchemaResources.ts | 17 +++++ .../models/updateMilestoneProgression403.ts | 14 ---- .../models/updateMilestoneProgression404.ts | 14 ---- .../updateMilestoneProgressionSchema.ts | 14 ---- 61 files changed, 310 insertions(+), 611 deletions(-) rename frontend/src/openapi/models/{createMilestoneProgression403.ts => changeMilestoneProgression401.ts} (85%) rename frontend/src/openapi/models/{createMilestoneProgression401.ts => changeMilestoneProgression403.ts} (85%) rename frontend/src/openapi/models/{changeRequestOneOrManyCreateSchemaOneOfThreesevenPayload.ts => changeMilestoneProgressionSchema.ts} (56%) delete mode 100644 frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefive.ts delete mode 100644 frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefiveAction.ts create mode 100644 frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethree.ts rename frontend/src/openapi/models/{changeRequestOneOrManyCreateSchemaOneOfFourzeroAction.ts => changeRequestCreateFeatureSchemaOneOfThreethreeAction.ts} (52%) rename frontend/src/openapi/models/{changeRequestOneOrManyCreateSchemaOneOfFourzeroPayload.ts => changeRequestCreateFeatureSchemaOneOfThreethreePayload.ts} (76%) delete mode 100644 frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwo.ts delete mode 100644 frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoAction.ts rename frontend/src/openapi/models/{createMilestoneProgressionSchema.ts => changeRequestCreateFeatureSchemaOneOfThreezeroPayload.ts} (79%) delete mode 100644 frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzero.ts create mode 100644 frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeight.ts rename frontend/src/openapi/models/{changeRequestCreateSchemaOneOfFourzeroAction.ts => changeRequestCreateSchemaOneOfThreeeightAction.ts} (51%) rename frontend/src/openapi/models/{changeRequestCreateSchemaOneOfFourzeroPayload.ts => changeRequestCreateSchemaOneOfThreeeightPayload.ts} (75%) rename frontend/src/openapi/models/{changeRequestCreateFeatureSchemaOneOfThreetwoPayload.ts => changeRequestCreateSchemaOneOfThreefivePayload.ts} (64%) delete mode 100644 frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeseven.ts delete mode 100644 frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenAction.ts delete mode 100644 frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzero.ts create mode 100644 frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeight.ts create mode 100644 frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightAction.ts rename frontend/src/openapi/models/{changeRequestCreateFeatureSchemaOneOfThreefivePayload.ts => changeRequestOneOrManyCreateSchemaOneOfThreeeightPayload.ts} (73%) rename frontend/src/openapi/models/{changeRequestCreateSchemaOneOfThreesevenPayload.ts => changeRequestOneOrManyCreateSchemaOneOfThreefivePayload.ts} (63%) delete mode 100644 frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeseven.ts delete mode 100644 frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenAction.ts rename frontend/src/openapi/models/{updateMilestoneProgression401.ts => edgeInstanceHeartbeat400.ts} (85%) create mode 100644 frontend/src/openapi/models/edgeLicenseStateSchema.ts create mode 100644 frontend/src/openapi/models/edgeLicenseStateSchemaEdgeLicenseState.ts create mode 100644 frontend/src/openapi/models/licenseReadSchemaResources.ts delete mode 100644 frontend/src/openapi/models/updateMilestoneProgression403.ts delete mode 100644 frontend/src/openapi/models/updateMilestoneProgression404.ts delete mode 100644 frontend/src/openapi/models/updateMilestoneProgressionSchema.ts diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ConsolidatedProgressionChanges.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ConsolidatedProgressionChanges.tsx index 918a42cae6..330c56608c 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ConsolidatedProgressionChanges.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ConsolidatedProgressionChanges.tsx @@ -2,8 +2,7 @@ import type { FC } from 'react'; import { styled } from '@mui/material'; import type { ChangeRequestState, - IChangeRequestCreateMilestoneProgression, - IChangeRequestUpdateMilestoneProgression, + IChangeRequestChangeMilestoneProgression, IChangeRequestDeleteMilestoneProgression, IChangeRequestFeature, } from 'component/changeRequest/changeRequest.types'; @@ -15,7 +14,7 @@ import { ChangeItemWrapper, Deleted, } from './Change.styles.tsx'; -import type { UpdateMilestoneProgressionSchema } from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { MilestoneListRenderer } from './MilestoneListRenderer.tsx'; import { applyProgressionChanges } from './applyProgressionChanges.js'; import { EventDiff } from 'component/events/EventDiff/EventDiff'; @@ -27,33 +26,15 @@ const StyledTabs = styled(Tabs)(({ theme }) => ({ })); type ProgressionChange = - | IChangeRequestCreateMilestoneProgression - | IChangeRequestUpdateMilestoneProgression + | IChangeRequestChangeMilestoneProgression | IChangeRequestDeleteMilestoneProgression; -const getFirstChangeWithSnapshot = ( - progressionChanges: ProgressionChange[], -) => { - return ( - progressionChanges.find( - (change) => - change.payload?.snapshot && - (change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression'), - ) || progressionChanges.find((change) => change.payload?.snapshot) - ); -}; - const getMilestonesWithAutomation = ( progressionChanges: ProgressionChange[], ): Set => { return new Set( progressionChanges - .filter( - (change) => - change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression', - ) + .filter((change) => change.action === 'changeMilestoneProgression') .map((change) => change.payload.sourceMilestone) .filter((id): id is string => Boolean(id)), ); @@ -80,11 +61,9 @@ const getChangeDescriptions = ( basePlan.milestones.find((milestone) => milestone.id === sourceId) ?.name || sourceId; const action = - change.action === 'createMilestoneProgression' - ? 'Adding' - : change.action === 'deleteMilestoneProgression' - ? 'Deleting' - : 'Updating'; + change.action === 'changeMilestoneProgression' + ? 'Changing' + : 'Deleting'; return `${action} automation for ${sourceName}`; }); }; @@ -95,7 +74,7 @@ export const ConsolidatedProgressionChanges: FC<{ changeRequestState: ChangeRequestState; onUpdateChangeRequestSubmit?: ( sourceMilestoneId: string, - payload: UpdateMilestoneProgressionSchema, + payload: ChangeMilestoneProgressionSchema, ) => Promise; onDeleteChangeRequestSubmit?: (sourceMilestoneId: string) => Promise; }> = ({ @@ -110,20 +89,15 @@ export const ConsolidatedProgressionChanges: FC<{ ( change, ): change is - | IChangeRequestCreateMilestoneProgression - | IChangeRequestUpdateMilestoneProgression + | IChangeRequestChangeMilestoneProgression | IChangeRequestDeleteMilestoneProgression => - change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression' || + change.action === 'changeMilestoneProgression' || change.action === 'deleteMilestoneProgression', ); if (progressionChanges.length === 0) return null; - const firstChangeWithSnapshot = - getFirstChangeWithSnapshot(progressionChanges); - const basePlan = - firstChangeWithSnapshot?.payload?.snapshot || currentReleasePlan; + const basePlan = currentReleasePlan; if (!basePlan) { return null; diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/FeatureChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/FeatureChange.tsx index 49ab7fb3cb..1a28315211 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/FeatureChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/FeatureChange.tsx @@ -207,8 +207,7 @@ export const FeatureChange: FC<{ {(change.action === 'addReleasePlan' || change.action === 'deleteReleasePlan' || change.action === 'startMilestone' || - change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression' || + change.action === 'changeMilestoneProgression' || change.action === 'deleteMilestoneProgression') && ( ; onUpdateAutomation?: ( sourceMilestoneId: string, - payload: UpdateMilestoneProgressionSchema, + payload: ChangeMilestoneProgressionSchema, ) => Promise; onDeleteAutomation?: (sourceMilestoneId: string) => void; } @@ -44,6 +44,7 @@ export const MilestoneListRenderer = ({ <> {plan.milestones.map((milestone, index) => { const isNotLastMilestone = index < plan.milestones.length - 1; + const nextMilestoneId = plan.milestones[index + 1]?.id || ''; const shouldShowAutomation = milestonesWithAutomation.has(milestone.id) || milestonesWithDeletedAutomation.has(milestone.id); @@ -67,6 +68,7 @@ export const MilestoneListRenderer = ({ milestone.transitionCondition .intervalMinutes } + targetMilestoneId={nextMilestoneId} onSave={async (payload) => { await onUpdateAutomation?.( milestone.id, diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ProgressionChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ProgressionChange.tsx index 2e0df9f13c..960302c2e3 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ProgressionChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ProgressionChange.tsx @@ -2,19 +2,13 @@ import type { FC, ReactNode } from 'react'; import { Typography } from '@mui/material'; import type { ChangeRequestState, - IChangeRequestCreateMilestoneProgression, - IChangeRequestUpdateMilestoneProgression, + IChangeRequestChangeMilestoneProgression, } from 'component/changeRequest/changeRequest.types'; import type { IReleasePlan } from 'interfaces/releasePlans'; -import type { UpdateMilestoneProgressionSchema } from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { EventDiff } from 'component/events/EventDiff/EventDiff'; import { Tab, TabList, TabPanel, Tabs } from './ChangeTabComponents.tsx'; -import { - Action, - Added, - ChangeItemInfo, - ChangeItemWrapper, -} from './Change.styles.tsx'; +import { Action, ChangeItemInfo, ChangeItemWrapper } from './Change.styles.tsx'; import { styled } from '@mui/material'; import { MilestoneListRenderer } from './MilestoneListRenderer.tsx'; import { applyProgressionChanges } from './applyProgressionChanges.ts'; @@ -26,15 +20,13 @@ const StyledTabs = styled(Tabs)(({ theme }) => ({ })); interface ProgressionChangeProps { - change: - | IChangeRequestCreateMilestoneProgression - | IChangeRequestUpdateMilestoneProgression; + change: IChangeRequestChangeMilestoneProgression; currentReleasePlan?: IReleasePlan; actions?: ReactNode; changeRequestState: ChangeRequestState; onUpdateChangeRequestSubmit?: ( sourceMilestoneId: string, - payload: UpdateMilestoneProgressionSchema, + payload: ChangeMilestoneProgressionSchema, ) => Promise; onDeleteChangeRequestSubmit?: (sourceMilestoneId: string) => void; } @@ -47,12 +39,10 @@ export const ProgressionChange: FC = ({ onUpdateChangeRequestSubmit, onDeleteChangeRequestSubmit, }) => { - const basePlan = change.payload.snapshot || currentReleasePlan; + const basePlan = currentReleasePlan; if (!basePlan) return null; - const isCreate = change.action === 'createMilestoneProgression'; const sourceId = change.payload.sourceMilestone; - if (!sourceId) return null; const sourceMilestone = basePlan.milestones.find( @@ -60,11 +50,10 @@ export const ProgressionChange: FC = ({ ); const sourceMilestoneName = sourceMilestone?.name || sourceId; - const targetMilestoneName = isCreate - ? basePlan.milestones.find( - (milestone) => milestone.id === change.payload.targetMilestone, - )?.name || change.payload.targetMilestone - : undefined; + const targetMilestoneName = + basePlan.milestones.find( + (milestone) => milestone.id === change.payload.targetMilestone, + )?.name || change.payload.targetMilestone; const modifiedPlan = applyProgressionChanges(basePlan, [change]); @@ -77,21 +66,10 @@ export const ProgressionChange: FC = ({ - {isCreate ? ( - <> - Adding automation to release plan - - {sourceMilestoneName} → {targetMilestoneName} - - - ) : ( - <> - Updating automation in release plan - - {sourceMilestoneName} - - - )} + Changing automation in release plan + + {sourceMilestoneName} → {targetMilestoneName} +
@@ -105,7 +83,9 @@ export const ProgressionChange: FC = ({ diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ReleasePlanChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ReleasePlanChange.tsx index 73868007e3..9036e9cd0e 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ReleasePlanChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ReleasePlanChange.tsx @@ -5,8 +5,7 @@ import type { IChangeRequestAddReleasePlan, IChangeRequestDeleteReleasePlan, IChangeRequestStartMilestone, - IChangeRequestCreateMilestoneProgression, - IChangeRequestUpdateMilestoneProgression, + IChangeRequestChangeMilestoneProgression, IChangeRequestDeleteMilestoneProgression, } from 'component/changeRequest/changeRequest.types'; import { useReleasePlanPreview } from 'hooks/useReleasePlanPreview'; @@ -27,7 +26,7 @@ import { import { useChangeRequestApi } from 'hooks/api/actions/useChangeRequestApi/useChangeRequestApi'; import { usePendingChangeRequests } from 'hooks/api/getters/usePendingChangeRequests/usePendingChangeRequests'; import useToast from 'hooks/useToast'; -import type { UpdateMilestoneProgressionSchema } from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { ProgressionChange } from './ProgressionChange.tsx'; import { ConsolidatedProgressionChanges } from './ConsolidatedProgressionChanges.tsx'; @@ -245,8 +244,7 @@ export const ReleasePlanChange: FC<{ | IChangeRequestAddReleasePlan | IChangeRequestDeleteReleasePlan | IChangeRequestStartMilestone - | IChangeRequestCreateMilestoneProgression - | IChangeRequestUpdateMilestoneProgression + | IChangeRequestChangeMilestoneProgression | IChangeRequestDeleteMilestoneProgression; environmentName: string; featureName: string; @@ -277,11 +275,11 @@ export const ReleasePlanChange: FC<{ const handleUpdateChangeRequestSubmit = async ( sourceMilestoneId: string, - payload: UpdateMilestoneProgressionSchema, + payload: ChangeMilestoneProgressionSchema, ) => { await addChange(projectId, environmentName, { feature: featureName, - action: 'updateMilestoneProgression', + action: 'changeMilestoneProgression', payload: { sourceMilestone: sourceMilestoneId, ...payload, @@ -321,19 +319,16 @@ export const ReleasePlanChange: FC<{ // check if we should consolidate with other progression changes if ( feature && - (change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression' || + (change.action === 'changeMilestoneProgression' || change.action === 'deleteMilestoneProgression') ) { const progressionChanges = feature.changes.filter( ( change, ): change is - | IChangeRequestCreateMilestoneProgression - | IChangeRequestUpdateMilestoneProgression + | IChangeRequestChangeMilestoneProgression | IChangeRequestDeleteMilestoneProgression => - change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression' || + change.action === 'changeMilestoneProgression' || change.action === 'deleteMilestoneProgression', ); @@ -383,8 +378,7 @@ export const ReleasePlanChange: FC<{ actions={actions} /> )} - {(change.action === 'createMilestoneProgression' || - change.action === 'updateMilestoneProgression') && ( + {change.action === 'changeMilestoneProgression' && ( { - const createChange = progressionChanges.find( - (change): change is IChangeRequestCreateMilestoneProgression => - change.action === 'createMilestoneProgression' && - change.payload.sourceMilestone === milestone.id, - ); - const updateChange = progressionChanges.find( - (change): change is IChangeRequestUpdateMilestoneProgression => - change.action === 'updateMilestoneProgression' && + const changeProgression = progressionChanges.find( + (change): change is IChangeRequestChangeMilestoneProgression => + change.action === 'changeMilestoneProgression' && change.payload.sourceMilestone === milestone.id, ); const deleteChange = progressionChanges.find( @@ -40,11 +33,11 @@ export const applyProgressionChanges = ( }; } - const change = updateChange || createChange; - if (change) { + if (changeProgression) { return { ...milestone, - transitionCondition: change.payload.transitionCondition, + transitionCondition: + changeProgression.payload.transitionCondition, }; } return milestone; diff --git a/frontend/src/component/changeRequest/changeRequest.types.ts b/frontend/src/component/changeRequest/changeRequest.types.ts index a5f96c3f91..9fc35ffebb 100644 --- a/frontend/src/component/changeRequest/changeRequest.types.ts +++ b/frontend/src/component/changeRequest/changeRequest.types.ts @@ -2,11 +2,7 @@ import type { IFeatureVariant } from 'interfaces/featureToggle'; import type { ISegment } from 'interfaces/segment'; import type { IFeatureStrategy } from '../../interfaces/strategy.js'; import type { IUser } from '../../interfaces/user.js'; -import type { - SetStrategySortOrderSchema, - CreateMilestoneProgressionSchema, - UpdateMilestoneProgressionSchema, -} from 'openapi'; +import type { SetStrategySortOrderSchema } from 'openapi'; import type { IReleasePlan } from 'interfaces/releasePlans'; type BaseChangeRequest = { @@ -136,8 +132,7 @@ type ChangeRequestPayload = | ChangeRequestAddReleasePlan | ChangeRequestDeleteReleasePlan | ChangeRequestStartMilestone - | ChangeRequestCreateMilestoneProgression - | ChangeRequestUpdateMilestoneProgression + | ChangeRequestChangeMilestoneProgression | ChangeRequestDeleteMilestoneProgression; export interface IChangeRequestAddStrategy extends IChangeRequestChangeBase { @@ -195,16 +190,10 @@ export interface IChangeRequestStartMilestone extends IChangeRequestChangeBase { payload: ChangeRequestStartMilestone; } -export interface IChangeRequestCreateMilestoneProgression +export interface IChangeRequestChangeMilestoneProgression extends IChangeRequestChangeBase { - action: 'createMilestoneProgression'; - payload: ChangeRequestCreateMilestoneProgression; -} - -export interface IChangeRequestUpdateMilestoneProgression - extends IChangeRequestChangeBase { - action: 'updateMilestoneProgression'; - payload: ChangeRequestUpdateMilestoneProgression; + action: 'changeMilestoneProgression'; + payload: ChangeRequestChangeMilestoneProgression; } export interface IChangeRequestDeleteMilestoneProgression @@ -261,8 +250,7 @@ export type IFeatureChange = | IChangeRequestAddReleasePlan | IChangeRequestDeleteReleasePlan | IChangeRequestStartMilestone - | IChangeRequestCreateMilestoneProgression - | IChangeRequestUpdateMilestoneProgression + | IChangeRequestChangeMilestoneProgression | IChangeRequestDeleteMilestoneProgression; export type ISegmentChange = @@ -296,22 +284,14 @@ type ChangeRequestStartMilestone = { snapshot?: IReleasePlan; }; -type ChangeRequestCreateMilestoneProgression = - CreateMilestoneProgressionSchema & { - snapshot?: IReleasePlan; - }; - -type ChangeRequestUpdateMilestoneProgression = - UpdateMilestoneProgressionSchema & { - sourceMilestoneId?: string; - sourceMilestone?: string; // Backward compatibility for existing change requests - snapshot?: IReleasePlan; - }; +type ChangeRequestChangeMilestoneProgression = { + sourceMilestone: string; + targetMilestone: string; + transitionCondition: { intervalMinutes: number }; +}; type ChangeRequestDeleteMilestoneProgression = { - sourceMilestoneId?: string; - sourceMilestone?: string; // Backward compatibility for existing change requests - snapshot?: IReleasePlan; + sourceMilestone: string; }; export type ChangeRequestAddStrategy = Pick< @@ -352,6 +332,5 @@ export type ChangeRequestAction = | 'addReleasePlan' | 'deleteReleasePlan' | 'startMilestone' - | 'createMilestoneProgression' - | 'updateMilestoneProgression' + | 'changeMilestoneProgression' | 'deleteMilestoneProgression'; diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ChangeRequest/ReleasePlanChangeRequestDialog.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ChangeRequest/ReleasePlanChangeRequestDialog.tsx index 8a249302db..0ee18e4ac4 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ChangeRequest/ReleasePlanChangeRequestDialog.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ChangeRequest/ReleasePlanChangeRequestDialog.tsx @@ -4,10 +4,7 @@ import type { IReleasePlan, IReleasePlanMilestone, } from 'interfaces/releasePlans'; -import type { - CreateMilestoneProgressionSchema, - UpdateMilestoneProgressionSchema, -} from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { getTimeValueAndUnitFromMinutes } from '../hooks/useMilestoneProgressionForm.js'; const StyledBoldSpan = styled('span')(({ theme }) => ({ @@ -24,13 +21,8 @@ type ChangeRequestAction = milestone: IReleasePlanMilestone; } | { - type: 'createMilestoneProgression'; - payload: CreateMilestoneProgressionSchema; - } - | { - type: 'updateMilestoneProgression'; - sourceMilestoneId: string; - payload: UpdateMilestoneProgressionSchema; + type: 'changeMilestoneProgression'; + payload: ChangeMilestoneProgressionSchema; } | { type: 'deleteMilestoneProgression'; @@ -91,7 +83,7 @@ export const ReleasePlanChangeRequestDialog = ({

); - case 'createMilestoneProgression': { + case 'changeMilestoneProgression': { const sourceMilestone = releasePlan.milestones.find( (milestone) => milestone.id === action.payload.sourceMilestone, @@ -108,7 +100,7 @@ export const ReleasePlanChangeRequestDialog = ({ return (

- Create automation to proceed from{' '} + Configure automation to proceed from{' '} {sourceMilestone?.name}{' '} to{' '} {targetMilestone?.name}{' '} @@ -118,27 +110,6 @@ export const ReleasePlanChangeRequestDialog = ({ ); } - case 'updateMilestoneProgression': { - const milestone = releasePlan.milestones.find( - (milestone) => milestone.id === action.sourceMilestoneId, - ); - - const { value, unit } = getTimeValueAndUnitFromMinutes( - action.payload.transitionCondition.intervalMinutes, - ); - const timeInterval = `${value} ${unit}`; - - return ( -

- Update automation for{' '} - {milestone?.name} to - proceed after{' '} - {timeInterval} in{' '} - {environmentId} -

- ); - } - case 'deleteMilestoneProgression': { const milestone = releasePlan.milestones.find( (milestone) => milestone.id === action.sourceMilestoneId, diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/MilestoneProgressionForm/MilestoneProgressionForm.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/MilestoneProgressionForm/MilestoneProgressionForm.tsx index d5db801319..3e11b58f40 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/MilestoneProgressionForm/MilestoneProgressionForm.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/MilestoneProgressionForm/MilestoneProgressionForm.tsx @@ -2,7 +2,7 @@ import { Button, styled } from '@mui/material'; import BoltIcon from '@mui/icons-material/Bolt'; import { useMilestoneProgressionForm } from '../hooks/useMilestoneProgressionForm.js'; import { MilestoneProgressionTimeInput } from './MilestoneProgressionTimeInput.tsx'; -import type { CreateMilestoneProgressionSchema } from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; const StyledFormContainer = styled('div')(({ theme }) => ({ display: 'flex', @@ -55,7 +55,9 @@ const StyledErrorMessage = styled('span')(({ theme }) => ({ interface IMilestoneProgressionFormProps { sourceMilestoneId: string; targetMilestoneId: string; - onSubmit: (payload: CreateMilestoneProgressionSchema) => Promise; + onSubmit: ( + payload: ChangeMilestoneProgressionSchema, + ) => Promise<{ shouldReset?: boolean }>; onCancel: () => void; } diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlan.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlan.tsx index 5a6d73feec..83033d1ce9 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlan.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlan.tsx @@ -22,10 +22,7 @@ import { Truncator } from 'component/common/Truncator/Truncator'; import { useUiFlag } from 'hooks/useUiFlag'; import { useMilestoneProgressionsApi } from 'hooks/api/actions/useMilestoneProgressionsApi/useMilestoneProgressionsApi'; import { DeleteProgressionDialog } from './DeleteProgressionDialog.tsx'; -import type { - CreateMilestoneProgressionSchema, - UpdateMilestoneProgressionSchema, -} from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { ReleasePlanMilestoneItem } from './ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx'; const StyledContainer = styled('div')(({ theme }) => ({ @@ -111,13 +108,8 @@ export const ReleasePlan = ({ | { type: 'removeReleasePlan'; environmentActive: boolean } | { type: 'startMilestone'; milestone: IReleasePlanMilestone } | { - type: 'createMilestoneProgression'; - payload: CreateMilestoneProgressionSchema; - } - | { - type: 'updateMilestoneProgression'; - sourceMilestoneId: string; - payload: UpdateMilestoneProgressionSchema; + type: 'changeMilestoneProgression'; + payload: ChangeMilestoneProgressionSchema; } | { type: 'deleteMilestoneProgression'; @@ -201,25 +193,14 @@ export const ReleasePlan = ({ }); break; - case 'createMilestoneProgression': + case 'changeMilestoneProgression': await addChange(projectId, environment, { feature: featureName, - action: 'createMilestoneProgression', + action: 'changeMilestoneProgression', payload: changeRequestAction.payload, }); break; - case 'updateMilestoneProgression': - await addChange(projectId, environment, { - feature: featureName, - action: 'updateMilestoneProgression', - payload: { - sourceMilestone: changeRequestAction.sourceMilestoneId, - ...changeRequestAction.payload, - }, - }); - break; - case 'deleteMilestoneProgression': await addChange(projectId, environment, { feature: featureName, @@ -314,18 +295,10 @@ export const ReleasePlan = ({ }); }; - const handleAddToChangeRequest = ( - action: - | { - type: 'createMilestoneProgression'; - payload: CreateMilestoneProgressionSchema; - } - | { - type: 'updateMilestoneProgression'; - sourceMilestoneId: string; - payload: UpdateMilestoneProgressionSchema; - }, - ) => { + const handleAddToChangeRequest = (action: { + type: 'changeMilestoneProgression'; + payload: ChangeMilestoneProgressionSchema; + }) => { setChangeRequestAction(action); }; diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestone/MilestoneTransitionDisplay.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestone/MilestoneTransitionDisplay.tsx index b5039a40a8..235a8925a5 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestone/MilestoneTransitionDisplay.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestone/MilestoneTransitionDisplay.tsx @@ -7,7 +7,7 @@ import { useMilestoneProgressionForm, getTimeValueAndUnitFromMinutes, } from '../hooks/useMilestoneProgressionForm.js'; -import type { UpdateMilestoneProgressionSchema } from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import type { ReactNode } from 'react'; import { useEffect } from 'react'; @@ -58,8 +58,9 @@ const StyledButtonGroup = styled('div')(({ theme }) => ({ interface IMilestoneTransitionDisplayProps { intervalMinutes: number; + targetMilestoneId: string; onSave: ( - payload: UpdateMilestoneProgressionSchema, + payload: ChangeMilestoneProgressionSchema, ) => Promise<{ shouldReset?: boolean }>; onDelete: () => void; milestoneName: string; @@ -69,6 +70,7 @@ interface IMilestoneTransitionDisplayProps { export const MilestoneTransitionDisplay = ({ intervalMinutes, + targetMilestoneId, onSave, onDelete, milestoneName, @@ -97,7 +99,8 @@ export const MilestoneTransitionDisplay = ({ const handleSave = async () => { if (!hasChanged) return; - const payload: UpdateMilestoneProgressionSchema = { + const payload: ChangeMilestoneProgressionSchema = { + targetMilestone: targetMilestoneId, transitionCondition: { intervalMinutes: currentIntervalMinutes, }, diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx index 0d46bf7bea..6ce8d1e9c3 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx @@ -2,10 +2,7 @@ import Add from '@mui/icons-material/Add'; import { Button, styled } from '@mui/material'; import { Badge } from 'component/common/Badge/Badge'; import type { IReleasePlanMilestone } from 'interfaces/releasePlans'; -import type { - CreateMilestoneProgressionSchema, - UpdateMilestoneProgressionSchema, -} from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { MilestoneAutomationSection } from '../ReleasePlanMilestone/MilestoneAutomationSection.tsx'; import { MilestoneTransitionDisplay } from '../ReleasePlanMilestone/MilestoneTransitionDisplay.tsx'; import type { MilestoneStatus } from '../ReleasePlanMilestone/ReleasePlanMilestoneStatus.tsx'; @@ -57,11 +54,8 @@ interface MilestoneAutomationProps { pendingProgressionChange: PendingProgressionChange | null; onOpenProgressionForm: () => void; onCloseProgressionForm: () => void; - onCreateProgression: ( - payload: CreateMilestoneProgressionSchema, - ) => Promise; - onUpdateProgression: ( - payload: UpdateMilestoneProgressionSchema, + onChangeProgression: ( + payload: ChangeMilestoneProgressionSchema, ) => Promise<{ shouldReset?: boolean }>; onDeleteProgression: (milestone: IReleasePlanMilestone) => void; } @@ -78,8 +72,7 @@ export const MilestoneAutomation = ({ pendingProgressionChange, onOpenProgressionForm, onCloseProgressionForm, - onCreateProgression, - onUpdateProgression, + onChangeProgression, onDeleteProgression, }: MilestoneAutomationProps) => { const showAutomation = @@ -108,7 +101,7 @@ export const MilestoneAutomation = ({ ) : effectiveTransitionCondition ? ( @@ -116,7 +109,8 @@ export const MilestoneAutomation = ({ intervalMinutes={ effectiveTransitionCondition.intervalMinutes } - onSave={onUpdateProgression} + targetMilestoneId={nextMilestoneId} + onSave={onChangeProgression} onDelete={() => onDeleteProgression(milestone)} milestoneName={milestone.name} status={status} diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx index 3f3014c69c..6c71ce9bc2 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx @@ -1,10 +1,7 @@ import { styled } from '@mui/material'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import type { IReleasePlanMilestone } from 'interfaces/releasePlans'; -import type { - CreateMilestoneProgressionSchema, - UpdateMilestoneProgressionSchema, -} from 'openapi'; +import type { ChangeMilestoneProgressionSchema } from 'openapi'; import { ReleasePlanMilestone } from '../ReleasePlanMilestone/ReleasePlanMilestone.tsx'; import { useMilestoneProgressionsApi } from 'hooks/api/actions/useMilestoneProgressionsApi/useMilestoneProgressionsApi'; import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled'; @@ -44,18 +41,10 @@ export interface IReleasePlanMilestoneItemProps { onSetProgressionFormOpenIndex: (index: number | null) => void; onStartMilestone?: (milestone: IReleasePlanMilestone) => void; onDeleteProgression: (milestone: IReleasePlanMilestone) => void; - onAddToChangeRequest: ( - action: - | { - type: 'createMilestoneProgression'; - payload: CreateMilestoneProgressionSchema; - } - | { - type: 'updateMilestoneProgression'; - sourceMilestoneId: string; - payload: UpdateMilestoneProgressionSchema; - }, - ) => void; + onAddToChangeRequest: (action: { + type: 'changeMilestoneProgression'; + payload: ChangeMilestoneProgressionSchema; + }) => void; getPendingProgressionChange: ( sourceMilestoneId: string, ) => PendingProgressionChange | null; @@ -85,8 +74,7 @@ export const ReleasePlanMilestoneItem = ({ featureName, onUpdate, }: IReleasePlanMilestoneItemProps) => { - const { createMilestoneProgression, updateMilestoneProgression } = - useMilestoneProgressionsApi(); + const { changeMilestoneProgression } = useMilestoneProgressionsApi(); const { isChangeRequestConfigured } = useChangeRequestsEnabled(projectId); const { setToastData, setToastApiError } = useToast(); @@ -98,50 +86,22 @@ export const ReleasePlanMilestoneItem = ({ const handleCloseProgressionForm = () => onSetProgressionFormOpenIndex(null); - const handleCreateProgression = async ( - payload: CreateMilestoneProgressionSchema, - ) => { - if (isChangeRequestConfigured(environment)) { - onAddToChangeRequest({ - type: 'createMilestoneProgression', - payload, - }); - handleCloseProgressionForm(); - return; - } - - try { - await createMilestoneProgression( - projectId, - environment, - featureName, - payload, - ); - setToastData({ - type: 'success', - text: 'Automation configured successfully', - }); - handleCloseProgressionForm(); - await onUpdate(); - } catch (error: unknown) { - setToastApiError(formatUnknownError(error)); - } - }; - - const handleUpdateProgression = async ( - payload: UpdateMilestoneProgressionSchema, + const handleChangeProgression = async ( + payload: ChangeMilestoneProgressionSchema, ): Promise<{ shouldReset?: boolean }> => { if (isChangeRequestConfigured(environment)) { onAddToChangeRequest({ - type: 'updateMilestoneProgression', - sourceMilestoneId: milestone.id, - payload, + type: 'changeMilestoneProgression', + payload: { + ...payload, + sourceMilestone: milestone.id, + }, }); return { shouldReset: true }; } try { - await updateMilestoneProgression( + await changeMilestoneProgression( projectId, environment, featureName, @@ -150,8 +110,9 @@ export const ReleasePlanMilestoneItem = ({ ); setToastData({ type: 'success', - text: 'Automation updated successfully', + text: 'Automation configured successfully', }); + handleCloseProgressionForm(); await onUpdate(); return {}; } catch (error: unknown) { @@ -187,8 +148,7 @@ export const ReleasePlanMilestoneItem = ({ pendingProgressionChange={pendingProgressionChange} onOpenProgressionForm={handleOpenProgressionForm} onCloseProgressionForm={handleCloseProgressionForm} - onCreateProgression={handleCreateProgression} - onUpdateProgression={handleUpdateProgression} + onChangeProgression={handleChangeProgression} onDeleteProgression={onDeleteProgression} /> ) : undefined; diff --git a/frontend/src/hooks/api/actions/useChangeRequestApi/useChangeRequestApi.ts b/frontend/src/hooks/api/actions/useChangeRequestApi/useChangeRequestApi.ts index c23ca074a6..52026b109b 100644 --- a/frontend/src/hooks/api/actions/useChangeRequestApi/useChangeRequestApi.ts +++ b/frontend/src/hooks/api/actions/useChangeRequestApi/useChangeRequestApi.ts @@ -22,8 +22,7 @@ export interface IChangeSchema { | 'addReleasePlan' | 'deleteReleasePlan' | 'startMilestone' - | 'createMilestoneProgression' - | 'updateMilestoneProgression' + | 'changeMilestoneProgression' | 'deleteMilestoneProgression'; payload: string | boolean | object | number | undefined; } diff --git a/frontend/src/hooks/api/actions/useMilestoneProgressionsApi/useMilestoneProgressionsApi.ts b/frontend/src/hooks/api/actions/useMilestoneProgressionsApi/useMilestoneProgressionsApi.ts index 6ac00a8eb6..50cea7805f 100644 --- a/frontend/src/hooks/api/actions/useMilestoneProgressionsApi/useMilestoneProgressionsApi.ts +++ b/frontend/src/hooks/api/actions/useMilestoneProgressionsApi/useMilestoneProgressionsApi.ts @@ -1,40 +1,19 @@ import useAPI from '../useApi/useApi.js'; -import type { CreateMilestoneProgressionSchema } from 'openapi/models/createMilestoneProgressionSchema'; -import type { UpdateMilestoneProgressionSchema } from 'openapi/models/updateMilestoneProgressionSchema'; +import type { ChangeMilestoneProgressionSchema } from 'openapi/models/changeMilestoneProgressionSchema'; export const useMilestoneProgressionsApi = () => { const { makeRequest, createRequest, errors, loading } = useAPI({ propagateErrors: true, }); - const createMilestoneProgression = async ( - projectId: string, - environment: string, - featureName: string, - body: CreateMilestoneProgressionSchema, - ): Promise => { - const requestId = 'createMilestoneProgression'; - const path = `api/admin/projects/${projectId}/features/${featureName}/environments/${environment}/progressions`; - const req = createRequest( - path, - { - method: 'POST', - body: JSON.stringify(body), - }, - requestId, - ); - - await makeRequest(req.caller, req.id); - }; - - const updateMilestoneProgression = async ( + const changeMilestoneProgression = async ( projectId: string, environment: string, featureName: string, sourceMilestoneId: string, - body: UpdateMilestoneProgressionSchema, + body: ChangeMilestoneProgressionSchema, ): Promise => { - const requestId = 'updateMilestoneProgression'; + const requestId = 'changeMilestoneProgression'; const path = `api/admin/projects/${projectId}/features/${featureName}/environments/${environment}/progressions/${sourceMilestoneId}`; const req = createRequest( path, @@ -68,8 +47,7 @@ export const useMilestoneProgressionsApi = () => { }; return { - createMilestoneProgression, - updateMilestoneProgression, + changeMilestoneProgression, deleteMilestoneProgression, errors, loading, diff --git a/frontend/src/openapi/models/createMilestoneProgression403.ts b/frontend/src/openapi/models/changeMilestoneProgression401.ts similarity index 85% rename from frontend/src/openapi/models/createMilestoneProgression403.ts rename to frontend/src/openapi/models/changeMilestoneProgression401.ts index 0fb6a49145..b47b502099 100644 --- a/frontend/src/openapi/models/createMilestoneProgression403.ts +++ b/frontend/src/openapi/models/changeMilestoneProgression401.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type CreateMilestoneProgression403 = { +export type ChangeMilestoneProgression401 = { /** The ID of the error instance */ id?: string; /** A description of what went wrong. */ diff --git a/frontend/src/openapi/models/createMilestoneProgression401.ts b/frontend/src/openapi/models/changeMilestoneProgression403.ts similarity index 85% rename from frontend/src/openapi/models/createMilestoneProgression401.ts rename to frontend/src/openapi/models/changeMilestoneProgression403.ts index e74f07b802..3813e0cad6 100644 --- a/frontend/src/openapi/models/createMilestoneProgression401.ts +++ b/frontend/src/openapi/models/changeMilestoneProgression403.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type CreateMilestoneProgression401 = { +export type ChangeMilestoneProgression403 = { /** The ID of the error instance */ id?: string; /** A description of what went wrong. */ diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenPayload.ts b/frontend/src/openapi/models/changeMilestoneProgressionSchema.ts similarity index 56% rename from frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenPayload.ts rename to frontend/src/openapi/models/changeMilestoneProgressionSchema.ts index b8c9833263..144bd15cee 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenPayload.ts +++ b/frontend/src/openapi/models/changeMilestoneProgressionSchema.ts @@ -5,9 +5,13 @@ */ import type { TransitionConditionSchema } from './transitionConditionSchema.js'; -export type ChangeRequestOneOrManyCreateSchemaOneOfThreesevenPayload = { - /** The ID of the source milestone with progression to update. */ - sourceMilestone: string; +/** + * Request body to create or update a milestone progression + */ +export interface ChangeMilestoneProgressionSchema { + /** The ID of the target milestone */ + targetMilestone: string; /** The condition configuration for the transition */ transitionCondition: TransitionConditionSchema; -}; + [key: string]: unknown; +} diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchema.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchema.ts index 2e3f30d7fb..02dc7bc0cc 100644 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchema.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchema.ts @@ -16,8 +16,7 @@ import type { ChangeRequestCreateFeatureSchemaOneOfTwotwo } from './changeReques import type { ChangeRequestCreateFeatureSchemaOneOfTwofour } from './changeRequestCreateFeatureSchemaOneOfTwofour.js'; import type { ChangeRequestCreateFeatureSchemaOneOfTwoseven } from './changeRequestCreateFeatureSchemaOneOfTwoseven.js'; import type { ChangeRequestCreateFeatureSchemaOneOfThreezero } from './changeRequestCreateFeatureSchemaOneOfThreezero.js'; -import type { ChangeRequestCreateFeatureSchemaOneOfThreetwo } from './changeRequestCreateFeatureSchemaOneOfThreetwo.js'; -import type { ChangeRequestCreateFeatureSchemaOneOfThreefive } from './changeRequestCreateFeatureSchemaOneOfThreefive.js'; +import type { ChangeRequestCreateFeatureSchemaOneOfThreethree } from './changeRequestCreateFeatureSchemaOneOfThreethree.js'; /** * Data used to create a [change request](https://docs.getunleash.io/reference/change-requests) for a single feature change. @@ -36,5 +35,4 @@ export type ChangeRequestCreateFeatureSchema = | ChangeRequestCreateFeatureSchemaOneOfTwofour | ChangeRequestCreateFeatureSchemaOneOfTwoseven | ChangeRequestCreateFeatureSchemaOneOfThreezero - | ChangeRequestCreateFeatureSchemaOneOfThreetwo - | ChangeRequestCreateFeatureSchemaOneOfThreefive; + | ChangeRequestCreateFeatureSchemaOneOfThreethree; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefive.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefive.ts deleted file mode 100644 index 605a0c7718..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefive.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { ChangeRequestCreateFeatureSchemaOneOfThreefiveAction } from './changeRequestCreateFeatureSchemaOneOfThreefiveAction.js'; -import type { ChangeRequestCreateFeatureSchemaOneOfThreefivePayload } from './changeRequestCreateFeatureSchemaOneOfThreefivePayload.js'; - -/** - * Delete milestone progression. - */ -export type ChangeRequestCreateFeatureSchemaOneOfThreefive = { - /** The name of this action. */ - action: ChangeRequestCreateFeatureSchemaOneOfThreefiveAction; - /** The name of the feature that this change applies to. */ - feature: string; - payload: ChangeRequestCreateFeatureSchemaOneOfThreefivePayload; -}; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefiveAction.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefiveAction.ts deleted file mode 100644 index 8fd408b950..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefiveAction.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -/** - * The name of this action. - */ -export type ChangeRequestCreateFeatureSchemaOneOfThreefiveAction = - (typeof ChangeRequestCreateFeatureSchemaOneOfThreefiveAction)[keyof typeof ChangeRequestCreateFeatureSchemaOneOfThreefiveAction]; - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestCreateFeatureSchemaOneOfThreefiveAction = { - deleteMilestoneProgression: 'deleteMilestoneProgression', -} as const; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethree.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethree.ts new file mode 100644 index 0000000000..a18fa72870 --- /dev/null +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethree.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestCreateFeatureSchemaOneOfThreethreeAction } from './changeRequestCreateFeatureSchemaOneOfThreethreeAction.js'; +import type { ChangeRequestCreateFeatureSchemaOneOfThreethreePayload } from './changeRequestCreateFeatureSchemaOneOfThreethreePayload.js'; + +/** + * Delete milestone progression. + */ +export type ChangeRequestCreateFeatureSchemaOneOfThreethree = { + /** The name of this action. */ + action: ChangeRequestCreateFeatureSchemaOneOfThreethreeAction; + /** The name of the feature that this change applies to. */ + feature: string; + payload: ChangeRequestCreateFeatureSchemaOneOfThreethreePayload; +}; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzeroAction.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethreeAction.ts similarity index 52% rename from frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzeroAction.ts rename to frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethreeAction.ts index ac929f7bb5..4a9e2295bd 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzeroAction.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethreeAction.ts @@ -7,10 +7,10 @@ /** * The name of this action. */ -export type ChangeRequestOneOrManyCreateSchemaOneOfFourzeroAction = - (typeof ChangeRequestOneOrManyCreateSchemaOneOfFourzeroAction)[keyof typeof ChangeRequestOneOrManyCreateSchemaOneOfFourzeroAction]; +export type ChangeRequestCreateFeatureSchemaOneOfThreethreeAction = + (typeof ChangeRequestCreateFeatureSchemaOneOfThreethreeAction)[keyof typeof ChangeRequestCreateFeatureSchemaOneOfThreethreeAction]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestOneOrManyCreateSchemaOneOfFourzeroAction = { +export const ChangeRequestCreateFeatureSchemaOneOfThreethreeAction = { deleteMilestoneProgression: 'deleteMilestoneProgression', } as const; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzeroPayload.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethreePayload.ts similarity index 76% rename from frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzeroPayload.ts rename to frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethreePayload.ts index eef066ae30..cbeb4e1997 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzeroPayload.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreethreePayload.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type ChangeRequestOneOrManyCreateSchemaOneOfFourzeroPayload = { +export type ChangeRequestCreateFeatureSchemaOneOfThreethreePayload = { /** The ID of the source milestone with progression to delete. */ sourceMilestone: string; }; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwo.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwo.ts deleted file mode 100644 index dbc2146fec..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwo.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { ChangeRequestCreateFeatureSchemaOneOfThreetwoAction } from './changeRequestCreateFeatureSchemaOneOfThreetwoAction.js'; -import type { ChangeRequestCreateFeatureSchemaOneOfThreetwoPayload } from './changeRequestCreateFeatureSchemaOneOfThreetwoPayload.js'; - -/** - * Update milestone progression transition condition. - */ -export type ChangeRequestCreateFeatureSchemaOneOfThreetwo = { - /** The name of this action. */ - action: ChangeRequestCreateFeatureSchemaOneOfThreetwoAction; - /** The name of the feature that this change applies to. */ - feature: string; - payload: ChangeRequestCreateFeatureSchemaOneOfThreetwoPayload; -}; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoAction.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoAction.ts deleted file mode 100644 index ecdc22aa84..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoAction.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -/** - * The name of this action. - */ -export type ChangeRequestCreateFeatureSchemaOneOfThreetwoAction = - (typeof ChangeRequestCreateFeatureSchemaOneOfThreetwoAction)[keyof typeof ChangeRequestCreateFeatureSchemaOneOfThreetwoAction]; - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestCreateFeatureSchemaOneOfThreetwoAction = { - updateMilestoneProgression: 'updateMilestoneProgression', -} as const; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezero.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezero.ts index 1c0dc44f0d..f24970ac98 100644 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezero.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezero.ts @@ -4,15 +4,15 @@ * See `gen:api` script in package.json */ import type { ChangeRequestCreateFeatureSchemaOneOfThreezeroAction } from './changeRequestCreateFeatureSchemaOneOfThreezeroAction.js'; -import type { CreateMilestoneProgressionSchema } from './createMilestoneProgressionSchema.js'; +import type { ChangeRequestCreateFeatureSchemaOneOfThreezeroPayload } from './changeRequestCreateFeatureSchemaOneOfThreezeroPayload.js'; /** - * Create milestone progression from one milestone to another. + * Create or update milestone progression from one milestone to another. */ export type ChangeRequestCreateFeatureSchemaOneOfThreezero = { /** The name of this action. */ action: ChangeRequestCreateFeatureSchemaOneOfThreezeroAction; /** The name of the feature that this change applies to. */ feature: string; - payload: CreateMilestoneProgressionSchema; + payload: ChangeRequestCreateFeatureSchemaOneOfThreezeroPayload; }; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroAction.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroAction.ts index 81bf9def1d..763f4c164b 100644 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroAction.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroAction.ts @@ -12,5 +12,5 @@ export type ChangeRequestCreateFeatureSchemaOneOfThreezeroAction = // eslint-disable-next-line @typescript-eslint/no-redeclare export const ChangeRequestCreateFeatureSchemaOneOfThreezeroAction = { - createMilestoneProgression: 'createMilestoneProgression', + changeMilestoneProgression: 'changeMilestoneProgression', } as const; diff --git a/frontend/src/openapi/models/createMilestoneProgressionSchema.ts b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroPayload.ts similarity index 79% rename from frontend/src/openapi/models/createMilestoneProgressionSchema.ts rename to frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroPayload.ts index 08c4d2397b..f9763ed14e 100644 --- a/frontend/src/openapi/models/createMilestoneProgressionSchema.ts +++ b/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreezeroPayload.ts @@ -5,14 +5,11 @@ */ import type { TransitionConditionSchema } from './transitionConditionSchema.js'; -/** - * Request body to create a milestone progression - */ -export interface CreateMilestoneProgressionSchema { +export type ChangeRequestCreateFeatureSchemaOneOfThreezeroPayload = { /** The ID of the source milestone */ sourceMilestone: string; /** The ID of the target milestone */ targetMilestone: string; /** The condition configuration for the transition */ transitionCondition: TransitionConditionSchema; -} +}; diff --git a/frontend/src/openapi/models/changeRequestCreateSchema.ts b/frontend/src/openapi/models/changeRequestCreateSchema.ts index ce10d1a2bf..2035e1fb50 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchema.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchema.ts @@ -18,8 +18,7 @@ import type { ChangeRequestCreateSchemaOneOfTwoseven } from './changeRequestCrea import type { ChangeRequestCreateSchemaOneOfTwonine } from './changeRequestCreateSchemaOneOfTwonine.js'; import type { ChangeRequestCreateSchemaOneOfThreetwo } from './changeRequestCreateSchemaOneOfThreetwo.js'; import type { ChangeRequestCreateSchemaOneOfThreefive } from './changeRequestCreateSchemaOneOfThreefive.js'; -import type { ChangeRequestCreateSchemaOneOfThreeseven } from './changeRequestCreateSchemaOneOfThreeseven.js'; -import type { ChangeRequestCreateSchemaOneOfFourzero } from './changeRequestCreateSchemaOneOfFourzero.js'; +import type { ChangeRequestCreateSchemaOneOfThreeeight } from './changeRequestCreateSchemaOneOfThreeeight.js'; /** * Data used to create a [change request](https://docs.getunleash.io/reference/change-requests) for a single feature or segment change. @@ -40,5 +39,4 @@ export type ChangeRequestCreateSchema = | ChangeRequestCreateSchemaOneOfTwonine | ChangeRequestCreateSchemaOneOfThreetwo | ChangeRequestCreateSchemaOneOfThreefive - | ChangeRequestCreateSchemaOneOfThreeseven - | ChangeRequestCreateSchemaOneOfFourzero; + | ChangeRequestCreateSchemaOneOfThreeeight; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzero.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzero.ts deleted file mode 100644 index bf99ce009b..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzero.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { ChangeRequestCreateSchemaOneOfFourzeroAction } from './changeRequestCreateSchemaOneOfFourzeroAction.js'; -import type { ChangeRequestCreateSchemaOneOfFourzeroPayload } from './changeRequestCreateSchemaOneOfFourzeroPayload.js'; - -/** - * Delete milestone progression. - */ -export type ChangeRequestCreateSchemaOneOfFourzero = { - /** The name of this action. */ - action: ChangeRequestCreateSchemaOneOfFourzeroAction; - /** The name of the feature that this change applies to. */ - feature: string; - payload: ChangeRequestCreateSchemaOneOfFourzeroPayload; -}; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeight.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeight.ts new file mode 100644 index 0000000000..f1d10800fc --- /dev/null +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeight.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestCreateSchemaOneOfThreeeightAction } from './changeRequestCreateSchemaOneOfThreeeightAction.js'; +import type { ChangeRequestCreateSchemaOneOfThreeeightPayload } from './changeRequestCreateSchemaOneOfThreeeightPayload.js'; + +/** + * Delete milestone progression. + */ +export type ChangeRequestCreateSchemaOneOfThreeeight = { + /** The name of this action. */ + action: ChangeRequestCreateSchemaOneOfThreeeightAction; + /** The name of the feature that this change applies to. */ + feature: string; + payload: ChangeRequestCreateSchemaOneOfThreeeightPayload; +}; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzeroAction.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeightAction.ts similarity index 51% rename from frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzeroAction.ts rename to frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeightAction.ts index b0f25a82b2..354ef5c824 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzeroAction.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeightAction.ts @@ -7,10 +7,10 @@ /** * The name of this action. */ -export type ChangeRequestCreateSchemaOneOfFourzeroAction = - (typeof ChangeRequestCreateSchemaOneOfFourzeroAction)[keyof typeof ChangeRequestCreateSchemaOneOfFourzeroAction]; +export type ChangeRequestCreateSchemaOneOfThreeeightAction = + (typeof ChangeRequestCreateSchemaOneOfThreeeightAction)[keyof typeof ChangeRequestCreateSchemaOneOfThreeeightAction]; // eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestCreateSchemaOneOfFourzeroAction = { +export const ChangeRequestCreateSchemaOneOfThreeeightAction = { deleteMilestoneProgression: 'deleteMilestoneProgression', } as const; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzeroPayload.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeightPayload.ts similarity index 75% rename from frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzeroPayload.ts rename to frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeightPayload.ts index 02438c291e..d856a49a9b 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfFourzeroPayload.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeeightPayload.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type ChangeRequestCreateSchemaOneOfFourzeroPayload = { +export type ChangeRequestCreateSchemaOneOfThreeeightPayload = { /** The ID of the source milestone with progression to delete. */ sourceMilestone: string; }; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefive.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefive.ts index c4cb93ff6f..acd262b80e 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefive.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefive.ts @@ -4,15 +4,15 @@ * See `gen:api` script in package.json */ import type { ChangeRequestCreateSchemaOneOfThreefiveAction } from './changeRequestCreateSchemaOneOfThreefiveAction.js'; -import type { CreateMilestoneProgressionSchema } from './createMilestoneProgressionSchema.js'; +import type { ChangeRequestCreateSchemaOneOfThreefivePayload } from './changeRequestCreateSchemaOneOfThreefivePayload.js'; /** - * Create milestone progression from one milestone to another. + * Create or update milestone progression from one milestone to another. */ export type ChangeRequestCreateSchemaOneOfThreefive = { /** The name of this action. */ action: ChangeRequestCreateSchemaOneOfThreefiveAction; /** The name of the feature that this change applies to. */ feature: string; - payload: CreateMilestoneProgressionSchema; + payload: ChangeRequestCreateSchemaOneOfThreefivePayload; }; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefiveAction.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefiveAction.ts index 438a3c60a6..0849acec2b 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefiveAction.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefiveAction.ts @@ -12,5 +12,5 @@ export type ChangeRequestCreateSchemaOneOfThreefiveAction = // eslint-disable-next-line @typescript-eslint/no-redeclare export const ChangeRequestCreateSchemaOneOfThreefiveAction = { - createMilestoneProgression: 'createMilestoneProgression', + changeMilestoneProgression: 'changeMilestoneProgression', } as const; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoPayload.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefivePayload.ts similarity index 64% rename from frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoPayload.ts rename to frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefivePayload.ts index 3aa6ddea9b..bee02ddfe9 100644 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreetwoPayload.ts +++ b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreefivePayload.ts @@ -5,9 +5,11 @@ */ import type { TransitionConditionSchema } from './transitionConditionSchema.js'; -export type ChangeRequestCreateFeatureSchemaOneOfThreetwoPayload = { - /** The ID of the source milestone with progression to update. */ +export type ChangeRequestCreateSchemaOneOfThreefivePayload = { + /** The ID of the source milestone */ sourceMilestone: string; + /** The ID of the target milestone */ + targetMilestone: string; /** The condition configuration for the transition */ transitionCondition: TransitionConditionSchema; }; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeseven.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeseven.ts deleted file mode 100644 index ac0eaa3515..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreeseven.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { ChangeRequestCreateSchemaOneOfThreesevenAction } from './changeRequestCreateSchemaOneOfThreesevenAction.js'; -import type { ChangeRequestCreateSchemaOneOfThreesevenPayload } from './changeRequestCreateSchemaOneOfThreesevenPayload.js'; - -/** - * Update milestone progression transition condition. - */ -export type ChangeRequestCreateSchemaOneOfThreeseven = { - /** The name of this action. */ - action: ChangeRequestCreateSchemaOneOfThreesevenAction; - /** The name of the feature that this change applies to. */ - feature: string; - payload: ChangeRequestCreateSchemaOneOfThreesevenPayload; -}; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenAction.ts b/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenAction.ts deleted file mode 100644 index 2e802ef5b7..0000000000 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenAction.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -/** - * The name of this action. - */ -export type ChangeRequestCreateSchemaOneOfThreesevenAction = - (typeof ChangeRequestCreateSchemaOneOfThreesevenAction)[keyof typeof ChangeRequestCreateSchemaOneOfThreesevenAction]; - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestCreateSchemaOneOfThreesevenAction = { - updateMilestoneProgression: 'updateMilestoneProgression', -} as const; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchema.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchema.ts index 62d7c7e620..1db7fc1c37 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchema.ts +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchema.ts @@ -18,8 +18,7 @@ import type { ChangeRequestOneOrManyCreateSchemaOneOfTwoseven } from './changeRe import type { ChangeRequestOneOrManyCreateSchemaOneOfTwonine } from './changeRequestOneOrManyCreateSchemaOneOfTwonine.js'; import type { ChangeRequestOneOrManyCreateSchemaOneOfThreetwo } from './changeRequestOneOrManyCreateSchemaOneOfThreetwo.js'; import type { ChangeRequestOneOrManyCreateSchemaOneOfThreefive } from './changeRequestOneOrManyCreateSchemaOneOfThreefive.js'; -import type { ChangeRequestOneOrManyCreateSchemaOneOfThreeseven } from './changeRequestOneOrManyCreateSchemaOneOfThreeseven.js'; -import type { ChangeRequestOneOrManyCreateSchemaOneOfFourzero } from './changeRequestOneOrManyCreateSchemaOneOfFourzero.js'; +import type { ChangeRequestOneOrManyCreateSchemaOneOfThreeeight } from './changeRequestOneOrManyCreateSchemaOneOfThreeeight.js'; import type { ChangeRequestCreateSchema } from './changeRequestCreateSchema.js'; /** @@ -41,6 +40,5 @@ export type ChangeRequestOneOrManyCreateSchema = | ChangeRequestOneOrManyCreateSchemaOneOfTwonine | ChangeRequestOneOrManyCreateSchemaOneOfThreetwo | ChangeRequestOneOrManyCreateSchemaOneOfThreefive - | ChangeRequestOneOrManyCreateSchemaOneOfThreeseven - | ChangeRequestOneOrManyCreateSchemaOneOfFourzero + | ChangeRequestOneOrManyCreateSchemaOneOfThreeeight | ChangeRequestCreateSchema[]; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzero.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzero.ts deleted file mode 100644 index 7632a07b0d..0000000000 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfFourzero.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { ChangeRequestOneOrManyCreateSchemaOneOfFourzeroAction } from './changeRequestOneOrManyCreateSchemaOneOfFourzeroAction.js'; -import type { ChangeRequestOneOrManyCreateSchemaOneOfFourzeroPayload } from './changeRequestOneOrManyCreateSchemaOneOfFourzeroPayload.js'; - -/** - * Delete milestone progression. - */ -export type ChangeRequestOneOrManyCreateSchemaOneOfFourzero = { - /** The name of this action. */ - action: ChangeRequestOneOrManyCreateSchemaOneOfFourzeroAction; - /** The name of the feature that this change applies to. */ - feature: string; - payload: ChangeRequestOneOrManyCreateSchemaOneOfFourzeroPayload; -}; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeight.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeight.ts new file mode 100644 index 0000000000..53cb92ee7c --- /dev/null +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeight.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { ChangeRequestOneOrManyCreateSchemaOneOfThreeeightAction } from './changeRequestOneOrManyCreateSchemaOneOfThreeeightAction.js'; +import type { ChangeRequestOneOrManyCreateSchemaOneOfThreeeightPayload } from './changeRequestOneOrManyCreateSchemaOneOfThreeeightPayload.js'; + +/** + * Delete milestone progression. + */ +export type ChangeRequestOneOrManyCreateSchemaOneOfThreeeight = { + /** The name of this action. */ + action: ChangeRequestOneOrManyCreateSchemaOneOfThreeeightAction; + /** The name of the feature that this change applies to. */ + feature: string; + payload: ChangeRequestOneOrManyCreateSchemaOneOfThreeeightPayload; +}; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightAction.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightAction.ts new file mode 100644 index 0000000000..8f7e2af2aa --- /dev/null +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightAction.ts @@ -0,0 +1,16 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The name of this action. + */ +export type ChangeRequestOneOrManyCreateSchemaOneOfThreeeightAction = + (typeof ChangeRequestOneOrManyCreateSchemaOneOfThreeeightAction)[keyof typeof ChangeRequestOneOrManyCreateSchemaOneOfThreeeightAction]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const ChangeRequestOneOrManyCreateSchemaOneOfThreeeightAction = { + deleteMilestoneProgression: 'deleteMilestoneProgression', +} as const; diff --git a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefivePayload.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightPayload.ts similarity index 73% rename from frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefivePayload.ts rename to frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightPayload.ts index ce1ef8579f..d7f6c44afa 100644 --- a/frontend/src/openapi/models/changeRequestCreateFeatureSchemaOneOfThreefivePayload.ts +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeeightPayload.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type ChangeRequestCreateFeatureSchemaOneOfThreefivePayload = { +export type ChangeRequestOneOrManyCreateSchemaOneOfThreeeightPayload = { /** The ID of the source milestone with progression to delete. */ sourceMilestone: string; }; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefive.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefive.ts index 9671753cf9..afea40555e 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefive.ts +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefive.ts @@ -4,15 +4,15 @@ * See `gen:api` script in package.json */ import type { ChangeRequestOneOrManyCreateSchemaOneOfThreefiveAction } from './changeRequestOneOrManyCreateSchemaOneOfThreefiveAction.js'; -import type { CreateMilestoneProgressionSchema } from './createMilestoneProgressionSchema.js'; +import type { ChangeRequestOneOrManyCreateSchemaOneOfThreefivePayload } from './changeRequestOneOrManyCreateSchemaOneOfThreefivePayload.js'; /** - * Create milestone progression from one milestone to another. + * Create or update milestone progression from one milestone to another. */ export type ChangeRequestOneOrManyCreateSchemaOneOfThreefive = { /** The name of this action. */ action: ChangeRequestOneOrManyCreateSchemaOneOfThreefiveAction; /** The name of the feature that this change applies to. */ feature: string; - payload: CreateMilestoneProgressionSchema; + payload: ChangeRequestOneOrManyCreateSchemaOneOfThreefivePayload; }; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefiveAction.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefiveAction.ts index bc5402dd71..21fbf78728 100644 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefiveAction.ts +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefiveAction.ts @@ -12,5 +12,5 @@ export type ChangeRequestOneOrManyCreateSchemaOneOfThreefiveAction = // eslint-disable-next-line @typescript-eslint/no-redeclare export const ChangeRequestOneOrManyCreateSchemaOneOfThreefiveAction = { - createMilestoneProgression: 'createMilestoneProgression', + changeMilestoneProgression: 'changeMilestoneProgression', } as const; diff --git a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenPayload.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefivePayload.ts similarity index 63% rename from frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenPayload.ts rename to frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefivePayload.ts index a2060a0689..d55d76ddb4 100644 --- a/frontend/src/openapi/models/changeRequestCreateSchemaOneOfThreesevenPayload.ts +++ b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreefivePayload.ts @@ -5,9 +5,11 @@ */ import type { TransitionConditionSchema } from './transitionConditionSchema.js'; -export type ChangeRequestCreateSchemaOneOfThreesevenPayload = { - /** The ID of the source milestone with progression to update. */ +export type ChangeRequestOneOrManyCreateSchemaOneOfThreefivePayload = { + /** The ID of the source milestone */ sourceMilestone: string; + /** The ID of the target milestone */ + targetMilestone: string; /** The condition configuration for the transition */ transitionCondition: TransitionConditionSchema; }; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeseven.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeseven.ts deleted file mode 100644 index aa6696d58d..0000000000 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreeseven.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { ChangeRequestOneOrManyCreateSchemaOneOfThreesevenAction } from './changeRequestOneOrManyCreateSchemaOneOfThreesevenAction.js'; -import type { ChangeRequestOneOrManyCreateSchemaOneOfThreesevenPayload } from './changeRequestOneOrManyCreateSchemaOneOfThreesevenPayload.js'; - -/** - * Update milestone progression transition condition. - */ -export type ChangeRequestOneOrManyCreateSchemaOneOfThreeseven = { - /** The name of this action. */ - action: ChangeRequestOneOrManyCreateSchemaOneOfThreesevenAction; - /** The name of the feature that this change applies to. */ - feature: string; - payload: ChangeRequestOneOrManyCreateSchemaOneOfThreesevenPayload; -}; diff --git a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenAction.ts b/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenAction.ts deleted file mode 100644 index 6e85e6ed5c..0000000000 --- a/frontend/src/openapi/models/changeRequestOneOrManyCreateSchemaOneOfThreesevenAction.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -/** - * The name of this action. - */ -export type ChangeRequestOneOrManyCreateSchemaOneOfThreesevenAction = - (typeof ChangeRequestOneOrManyCreateSchemaOneOfThreesevenAction)[keyof typeof ChangeRequestOneOrManyCreateSchemaOneOfThreesevenAction]; - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const ChangeRequestOneOrManyCreateSchemaOneOfThreesevenAction = { - updateMilestoneProgression: 'updateMilestoneProgression', -} as const; diff --git a/frontend/src/openapi/models/detailedInvoicesLineSchema.ts b/frontend/src/openapi/models/detailedInvoicesLineSchema.ts index 88c384e6dc..196fb06dea 100644 --- a/frontend/src/openapi/models/detailedInvoicesLineSchema.ts +++ b/frontend/src/openapi/models/detailedInvoicesLineSchema.ts @@ -22,7 +22,7 @@ export interface DetailedInvoicesLineSchema { /** Optional start date for the metered period */ startDate?: string; /** Total amount for this line item in minor currency units */ - totalAmount: number; - /** Unit price for usage line items */ + totalAmount?: number; + /** Unit price for the line item */ unitPrice?: number; } diff --git a/frontend/src/openapi/models/detailedInvoicesSchemaInvoicesItem.ts b/frontend/src/openapi/models/detailedInvoicesSchemaInvoicesItem.ts index 927026dec6..0ed0ed33d8 100644 --- a/frontend/src/openapi/models/detailedInvoicesSchemaInvoicesItem.ts +++ b/frontend/src/openapi/models/detailedInvoicesSchemaInvoicesItem.ts @@ -27,7 +27,7 @@ export type DetailedInvoicesSchemaInvoicesItem = { /** Tax amount for the invoice */ taxAmount: number; /** Tax percentage for the invoice */ - taxPercentage?: number; + taxPercentage: number; /** Total amount for the invoice */ totalAmount: number; /** Usage line items (traffic, consumption usage, overages) */ diff --git a/frontend/src/openapi/models/updateMilestoneProgression401.ts b/frontend/src/openapi/models/edgeInstanceHeartbeat400.ts similarity index 85% rename from frontend/src/openapi/models/updateMilestoneProgression401.ts rename to frontend/src/openapi/models/edgeInstanceHeartbeat400.ts index dfc229edb1..a7e4a630b5 100644 --- a/frontend/src/openapi/models/updateMilestoneProgression401.ts +++ b/frontend/src/openapi/models/edgeInstanceHeartbeat400.ts @@ -4,7 +4,7 @@ * See `gen:api` script in package.json */ -export type UpdateMilestoneProgression401 = { +export type EdgeInstanceHeartbeat400 = { /** The ID of the error instance */ id?: string; /** A description of what went wrong. */ diff --git a/frontend/src/openapi/models/edgeLicenseStateSchema.ts b/frontend/src/openapi/models/edgeLicenseStateSchema.ts new file mode 100644 index 0000000000..c02ed93571 --- /dev/null +++ b/frontend/src/openapi/models/edgeLicenseStateSchema.ts @@ -0,0 +1,14 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ +import type { EdgeLicenseStateSchemaEdgeLicenseState } from './edgeLicenseStateSchemaEdgeLicenseState.js'; + +/** + * A model representing the Edge license state response. + */ +export interface EdgeLicenseStateSchema { + /** State of the current Enterprise Edge license */ + edgeLicenseState: EdgeLicenseStateSchemaEdgeLicenseState; +} diff --git a/frontend/src/openapi/models/edgeLicenseStateSchemaEdgeLicenseState.ts b/frontend/src/openapi/models/edgeLicenseStateSchemaEdgeLicenseState.ts new file mode 100644 index 0000000000..03961157b1 --- /dev/null +++ b/frontend/src/openapi/models/edgeLicenseStateSchemaEdgeLicenseState.ts @@ -0,0 +1,18 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * State of the current Enterprise Edge license + */ +export type EdgeLicenseStateSchemaEdgeLicenseState = + (typeof EdgeLicenseStateSchemaEdgeLicenseState)[keyof typeof EdgeLicenseStateSchemaEdgeLicenseState]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const EdgeLicenseStateSchemaEdgeLicenseState = { + Valid: 'Valid', + Invalid: 'Invalid', + Expired: 'Expired', +} as const; diff --git a/frontend/src/openapi/models/eventSchemaType.ts b/frontend/src/openapi/models/eventSchemaType.ts index b161e1fa37..3e1321f6fa 100644 --- a/frontend/src/openapi/models/eventSchemaType.ts +++ b/frontend/src/openapi/models/eventSchemaType.ts @@ -173,6 +173,7 @@ export const EventSchemaType = { 'milestone-progression-created': 'milestone-progression-created', 'milestone-progression-updated': 'milestone-progression-updated', 'milestone-progression-deleted': 'milestone-progression-deleted', + 'milestone-progression-changed': 'milestone-progression-changed', 'user-preference-updated': 'user-preference-updated', 'scim-users-deleted': 'scim-users-deleted', 'scim-groups-deleted': 'scim-groups-deleted', diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index bd9705b163..5bf2cd4518 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -141,6 +141,9 @@ export * from './bulkToggleFeaturesEnvironmentOn415.js'; export * from './bulkToggleFeaturesSchema.js'; export * from './cdnApiTokenSchema.js'; export * from './cdnApiTokensSchema.js'; +export * from './changeMilestoneProgression401.js'; +export * from './changeMilestoneProgression403.js'; +export * from './changeMilestoneProgressionSchema.js'; export * from './changePassword401.js'; export * from './changePassword403.js'; export * from './changePassword415.js'; @@ -185,14 +188,12 @@ export * from './changeRequestCreateFeatureSchemaOneOfOnethreePayload.js'; export * from './changeRequestCreateFeatureSchemaOneOfPayload.js'; export * from './changeRequestCreateFeatureSchemaOneOfSix.js'; export * from './changeRequestCreateFeatureSchemaOneOfSixAction.js'; -export * from './changeRequestCreateFeatureSchemaOneOfThreefive.js'; -export * from './changeRequestCreateFeatureSchemaOneOfThreefiveAction.js'; -export * from './changeRequestCreateFeatureSchemaOneOfThreefivePayload.js'; -export * from './changeRequestCreateFeatureSchemaOneOfThreetwo.js'; -export * from './changeRequestCreateFeatureSchemaOneOfThreetwoAction.js'; -export * from './changeRequestCreateFeatureSchemaOneOfThreetwoPayload.js'; +export * from './changeRequestCreateFeatureSchemaOneOfThreethree.js'; +export * from './changeRequestCreateFeatureSchemaOneOfThreethreeAction.js'; +export * from './changeRequestCreateFeatureSchemaOneOfThreethreePayload.js'; export * from './changeRequestCreateFeatureSchemaOneOfThreezero.js'; export * from './changeRequestCreateFeatureSchemaOneOfThreezeroAction.js'; +export * from './changeRequestCreateFeatureSchemaOneOfThreezeroPayload.js'; export * from './changeRequestCreateFeatureSchemaOneOfTwofour.js'; export * from './changeRequestCreateFeatureSchemaOneOfTwofourAction.js'; export * from './changeRequestCreateFeatureSchemaOneOfTwofourPayload.js'; @@ -206,9 +207,6 @@ export * from './changeRequestCreateFeatureSchemaOneOfTwozeroAction.js'; export * from './changeRequestCreateSchema.js'; export * from './changeRequestCreateSchemaOneOf.js'; export * from './changeRequestCreateSchemaOneOfAction.js'; -export * from './changeRequestCreateSchemaOneOfFourzero.js'; -export * from './changeRequestCreateSchemaOneOfFourzeroAction.js'; -export * from './changeRequestCreateSchemaOneOfFourzeroPayload.js'; export * from './changeRequestCreateSchemaOneOfNine.js'; export * from './changeRequestCreateSchemaOneOfNineAction.js'; export * from './changeRequestCreateSchemaOneOfOneeight.js'; @@ -227,11 +225,12 @@ export * from './changeRequestCreateSchemaOneOfSixPayload.js'; export * from './changeRequestCreateSchemaOneOfThree.js'; export * from './changeRequestCreateSchemaOneOfThreeAction.js'; export * from './changeRequestCreateSchemaOneOfThreePayload.js'; +export * from './changeRequestCreateSchemaOneOfThreeeight.js'; +export * from './changeRequestCreateSchemaOneOfThreeeightAction.js'; +export * from './changeRequestCreateSchemaOneOfThreeeightPayload.js'; export * from './changeRequestCreateSchemaOneOfThreefive.js'; export * from './changeRequestCreateSchemaOneOfThreefiveAction.js'; -export * from './changeRequestCreateSchemaOneOfThreeseven.js'; -export * from './changeRequestCreateSchemaOneOfThreesevenAction.js'; -export * from './changeRequestCreateSchemaOneOfThreesevenPayload.js'; +export * from './changeRequestCreateSchemaOneOfThreefivePayload.js'; export * from './changeRequestCreateSchemaOneOfThreetwo.js'; export * from './changeRequestCreateSchemaOneOfThreetwoAction.js'; export * from './changeRequestCreateSchemaOneOfThreetwoPayload.js'; @@ -259,9 +258,6 @@ export * from './changeRequestFeatureSchema.js'; export * from './changeRequestOneOrManyCreateSchema.js'; export * from './changeRequestOneOrManyCreateSchemaOneOf.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfAction.js'; -export * from './changeRequestOneOrManyCreateSchemaOneOfFourzero.js'; -export * from './changeRequestOneOrManyCreateSchemaOneOfFourzeroAction.js'; -export * from './changeRequestOneOrManyCreateSchemaOneOfFourzeroPayload.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfNine.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfNineAction.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfOneeight.js'; @@ -280,11 +276,12 @@ export * from './changeRequestOneOrManyCreateSchemaOneOfSixPayload.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThree.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreeAction.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreePayload.js'; +export * from './changeRequestOneOrManyCreateSchemaOneOfThreeeight.js'; +export * from './changeRequestOneOrManyCreateSchemaOneOfThreeeightAction.js'; +export * from './changeRequestOneOrManyCreateSchemaOneOfThreeeightPayload.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreefive.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreefiveAction.js'; -export * from './changeRequestOneOrManyCreateSchemaOneOfThreeseven.js'; -export * from './changeRequestOneOrManyCreateSchemaOneOfThreesevenAction.js'; -export * from './changeRequestOneOrManyCreateSchemaOneOfThreesevenPayload.js'; +export * from './changeRequestOneOrManyCreateSchemaOneOfThreefivePayload.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreetwo.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreetwoAction.js'; export * from './changeRequestOneOrManyCreateSchemaOneOfThreetwoPayload.js'; @@ -464,9 +461,6 @@ export * from './createImpactMetricsConfigSchemaLabelSelectors.js'; export * from './createImpactMetricsConfigSchemaTimeRange.js'; export * from './createImpactMetricsConfigSchemaYAxisMin.js'; export * from './createInvitedUserSchema.js'; -export * from './createMilestoneProgression401.js'; -export * from './createMilestoneProgression403.js'; -export * from './createMilestoneProgressionSchema.js'; export * from './createPat401.js'; export * from './createPat403.js'; export * from './createPat404.js'; @@ -642,12 +636,15 @@ export * from './doraFeaturesSchema.js'; export * from './edgeEndpointTrafficSchema.js'; export * from './edgeInstanceDataSchema.js'; export * from './edgeInstanceDataSchemaHosting.js'; +export * from './edgeInstanceHeartbeat400.js'; export * from './edgeInstanceTrafficSchema.js'; export * from './edgeInstanceTrafficSchemaAccessDenied.js'; export * from './edgeInstanceTrafficSchemaCachedResponses.js'; export * from './edgeInstanceTrafficSchemaGet.js'; export * from './edgeInstanceTrafficSchemaPost.js'; export * from './edgeLatencyMetricsSchema.js'; +export * from './edgeLicenseStateSchema.js'; +export * from './edgeLicenseStateSchemaEdgeLicenseState.js'; export * from './edgeProcessMetricsSchema.js'; export * from './edgeRequestStatsSchema.js'; export * from './edgeTokenSchema.js'; @@ -988,6 +985,7 @@ export * from './legalValueSchema.js'; export * from './licenseCheckSchema.js'; export * from './licenseCheckSchemaMessageType.js'; export * from './licenseReadSchema.js'; +export * from './licenseReadSchemaResources.js'; export * from './licenseUpdateSchema.js'; export * from './licensedUserSchema.js'; export * from './licensedUsersSchema.js'; @@ -1504,10 +1502,6 @@ export * from './updateLicense400.js'; export * from './updateLicense401.js'; export * from './updateLicense403.js'; export * from './updateLicense415.js'; -export * from './updateMilestoneProgression401.js'; -export * from './updateMilestoneProgression403.js'; -export * from './updateMilestoneProgression404.js'; -export * from './updateMilestoneProgressionSchema.js'; export * from './updateMilestoneStrategy401.js'; export * from './updateMilestoneStrategy403.js'; export * from './updateMilestoneStrategy404.js'; diff --git a/frontend/src/openapi/models/licenseReadSchema.ts b/frontend/src/openapi/models/licenseReadSchema.ts index 646dcd0c43..12bdf21fdb 100644 --- a/frontend/src/openapi/models/licenseReadSchema.ts +++ b/frontend/src/openapi/models/licenseReadSchema.ts @@ -3,6 +3,7 @@ * Do not edit manually. * See `gen:api` script in package.json */ +import type { LicenseReadSchemaResources } from './licenseReadSchemaResources.js'; /** * A model representing a license response. @@ -22,10 +23,8 @@ export interface LicenseReadSchema { isValid: boolean; /** Name of plan that the license is for. */ plan?: string; - /** Number of release templates in the license. */ - releaseTemplates?: number; - /** Number of seats in the license. */ - seats?: number; + /** The resources available in the license. */ + resources?: LicenseReadSchemaResources; /** The actual license token. */ token?: string; /** Type of license. */ diff --git a/frontend/src/openapi/models/licenseReadSchemaResources.ts b/frontend/src/openapi/models/licenseReadSchemaResources.ts new file mode 100644 index 0000000000..62689ba0b4 --- /dev/null +++ b/frontend/src/openapi/models/licenseReadSchemaResources.ts @@ -0,0 +1,17 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +/** + * The resources available in the license. + */ +export type LicenseReadSchemaResources = { + /** Number of Edge instances in the license. */ + edgeInstances?: number; + /** Number of release templates in the license. */ + releaseTemplates?: number; + /** Number of seats in the license. */ + seats?: number; +}; diff --git a/frontend/src/openapi/models/updateMilestoneProgression403.ts b/frontend/src/openapi/models/updateMilestoneProgression403.ts deleted file mode 100644 index da5515e8e1..0000000000 --- a/frontend/src/openapi/models/updateMilestoneProgression403.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMilestoneProgression403 = { - /** 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/updateMilestoneProgression404.ts b/frontend/src/openapi/models/updateMilestoneProgression404.ts deleted file mode 100644 index 2f962f8b0e..0000000000 --- a/frontend/src/openapi/models/updateMilestoneProgression404.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ - -export type UpdateMilestoneProgression404 = { - /** 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/updateMilestoneProgressionSchema.ts b/frontend/src/openapi/models/updateMilestoneProgressionSchema.ts deleted file mode 100644 index 1d7982a074..0000000000 --- a/frontend/src/openapi/models/updateMilestoneProgressionSchema.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by Orval - * Do not edit manually. - * See `gen:api` script in package.json - */ -import type { TransitionConditionSchema } from './transitionConditionSchema.js'; - -/** - * Request body to update a milestone progression transition condition - */ -export interface UpdateMilestoneProgressionSchema { - /** The updated condition configuration for the transition */ - transitionCondition: TransitionConditionSchema; -}