mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-09 00:18:26 +01:00
Update orval for project status lifecycle (#8716)
Update schema and orval for project status to add lifecycle information
This commit is contained in:
parent
11d264541d
commit
24a30e5ec3
@ -13,6 +13,28 @@ const placeholderData: ProjectStatusSchema = {
|
|||||||
segments: 0,
|
segments: 0,
|
||||||
},
|
},
|
||||||
averageHealth: 0,
|
averageHealth: 0,
|
||||||
|
lifecycleSummary: {
|
||||||
|
initial: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
preLive: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
live: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
completed: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
archived: {
|
||||||
|
currentFlags: 0,
|
||||||
|
last30Days: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useProjectStatus = (projectId: string) => {
|
export const useProjectStatus = (projectId: string) => {
|
||||||
|
@ -1030,6 +1030,12 @@ export * from './projectSettingsSchemaDefaultStickiness';
|
|||||||
export * from './projectSettingsSchemaMode';
|
export * from './projectSettingsSchemaMode';
|
||||||
export * from './projectStatsSchema';
|
export * from './projectStatsSchema';
|
||||||
export * from './projectStatusSchema';
|
export * from './projectStatusSchema';
|
||||||
|
export * from './projectStatusSchemaLifecycleSummary';
|
||||||
|
export * from './projectStatusSchemaLifecycleSummaryArchived';
|
||||||
|
export * from './projectStatusSchemaLifecycleSummaryCompleted';
|
||||||
|
export * from './projectStatusSchemaLifecycleSummaryInitial';
|
||||||
|
export * from './projectStatusSchemaLifecycleSummaryLive';
|
||||||
|
export * from './projectStatusSchemaLifecycleSummaryPreLive';
|
||||||
export * from './projectStatusSchemaResources';
|
export * from './projectStatusSchemaResources';
|
||||||
export * from './projectUsersSchema';
|
export * from './projectUsersSchema';
|
||||||
export * from './projectsSchema';
|
export * from './projectsSchema';
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* See `gen:api` script in package.json
|
* See `gen:api` script in package.json
|
||||||
*/
|
*/
|
||||||
import type { ProjectActivitySchema } from './projectActivitySchema';
|
import type { ProjectActivitySchema } from './projectActivitySchema';
|
||||||
|
import type { ProjectStatusSchemaLifecycleSummary } from './projectStatusSchemaLifecycleSummary';
|
||||||
import type { ProjectStatusSchemaResources } from './projectStatusSchemaResources';
|
import type { ProjectStatusSchemaResources } from './projectStatusSchemaResources';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,6 +18,8 @@ export interface ProjectStatusSchema {
|
|||||||
* @minimum 0
|
* @minimum 0
|
||||||
*/
|
*/
|
||||||
averageHealth: number;
|
averageHealth: number;
|
||||||
|
/** Feature flag lifecycle statistics for this project. */
|
||||||
|
lifecycleSummary: ProjectStatusSchemaLifecycleSummary;
|
||||||
/** Key resources within the project */
|
/** Key resources within the project */
|
||||||
resources: ProjectStatusSchemaResources;
|
resources: ProjectStatusSchemaResources;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* Generated by Orval
|
||||||
|
* Do not edit manually.
|
||||||
|
* See `gen:api` script in package.json
|
||||||
|
*/
|
||||||
|
import type { ProjectStatusSchemaLifecycleSummaryArchived } from './projectStatusSchemaLifecycleSummaryArchived';
|
||||||
|
import type { ProjectStatusSchemaLifecycleSummaryCompleted } from './projectStatusSchemaLifecycleSummaryCompleted';
|
||||||
|
import type { ProjectStatusSchemaLifecycleSummaryInitial } from './projectStatusSchemaLifecycleSummaryInitial';
|
||||||
|
import type { ProjectStatusSchemaLifecycleSummaryLive } from './projectStatusSchemaLifecycleSummaryLive';
|
||||||
|
import type { ProjectStatusSchemaLifecycleSummaryPreLive } from './projectStatusSchemaLifecycleSummaryPreLive';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Feature flag lifecycle statistics for this project.
|
||||||
|
*/
|
||||||
|
export type ProjectStatusSchemaLifecycleSummary = {
|
||||||
|
/** Information on archived flags in this project. */
|
||||||
|
archived: ProjectStatusSchemaLifecycleSummaryArchived;
|
||||||
|
/** Statistics on feature flags in a given stage in this project. */
|
||||||
|
completed: ProjectStatusSchemaLifecycleSummaryCompleted;
|
||||||
|
/** Statistics on feature flags in a given stage in this project. */
|
||||||
|
initial: ProjectStatusSchemaLifecycleSummaryInitial;
|
||||||
|
/** Statistics on feature flags in a given stage in this project. */
|
||||||
|
live: ProjectStatusSchemaLifecycleSummaryLive;
|
||||||
|
/** Statistics on feature flags in a given stage in this project. */
|
||||||
|
preLive: ProjectStatusSchemaLifecycleSummaryPreLive;
|
||||||
|
};
|
@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Generated by Orval
|
||||||
|
* Do not edit manually.
|
||||||
|
* See `gen:api` script in package.json
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information on archived flags in this project.
|
||||||
|
*/
|
||||||
|
export type ProjectStatusSchemaLifecycleSummaryArchived = {
|
||||||
|
/** The number of archived feature flags in this project. If a flag is deleted permanently, it will no longer be counted as part of this statistic. */
|
||||||
|
currentFlags: number;
|
||||||
|
/** The number of flags in this project that have been changed over the last 30 days. */
|
||||||
|
last30Days: number;
|
||||||
|
};
|
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Generated by Orval
|
||||||
|
* Do not edit manually.
|
||||||
|
* See `gen:api` script in package.json
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Statistics on feature flags in a given stage in this project.
|
||||||
|
*/
|
||||||
|
export type ProjectStatusSchemaLifecycleSummaryCompleted = {
|
||||||
|
/**
|
||||||
|
* The average number of days a feature flag remains in a stage in this project. Will be null if Unleash doesn't have any data for this stage yet.
|
||||||
|
* @nullable
|
||||||
|
*/
|
||||||
|
averageDays: number | null;
|
||||||
|
/** The number of feature flags currently in a stage in this project. */
|
||||||
|
currentFlags: number;
|
||||||
|
};
|
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Generated by Orval
|
||||||
|
* Do not edit manually.
|
||||||
|
* See `gen:api` script in package.json
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Statistics on feature flags in a given stage in this project.
|
||||||
|
*/
|
||||||
|
export type ProjectStatusSchemaLifecycleSummaryInitial = {
|
||||||
|
/**
|
||||||
|
* The average number of days a feature flag remains in a stage in this project. Will be null if Unleash doesn't have any data for this stage yet.
|
||||||
|
* @nullable
|
||||||
|
*/
|
||||||
|
averageDays: number | null;
|
||||||
|
/** The number of feature flags currently in a stage in this project. */
|
||||||
|
currentFlags: number;
|
||||||
|
};
|
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Generated by Orval
|
||||||
|
* Do not edit manually.
|
||||||
|
* See `gen:api` script in package.json
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Statistics on feature flags in a given stage in this project.
|
||||||
|
*/
|
||||||
|
export type ProjectStatusSchemaLifecycleSummaryLive = {
|
||||||
|
/**
|
||||||
|
* The average number of days a feature flag remains in a stage in this project. Will be null if Unleash doesn't have any data for this stage yet.
|
||||||
|
* @nullable
|
||||||
|
*/
|
||||||
|
averageDays: number | null;
|
||||||
|
/** The number of feature flags currently in a stage in this project. */
|
||||||
|
currentFlags: number;
|
||||||
|
};
|
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Generated by Orval
|
||||||
|
* Do not edit manually.
|
||||||
|
* See `gen:api` script in package.json
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Statistics on feature flags in a given stage in this project.
|
||||||
|
*/
|
||||||
|
export type ProjectStatusSchemaLifecycleSummaryPreLive = {
|
||||||
|
/**
|
||||||
|
* The average number of days a feature flag remains in a stage in this project. Will be null if Unleash doesn't have any data for this stage yet.
|
||||||
|
* @nullable
|
||||||
|
*/
|
||||||
|
averageDays: number | null;
|
||||||
|
/** The number of feature flags currently in a stage in this project. */
|
||||||
|
currentFlags: number;
|
||||||
|
};
|
@ -4,6 +4,28 @@ import type { ProjectStatusSchema } from './project-status-schema';
|
|||||||
test('projectStatusSchema', () => {
|
test('projectStatusSchema', () => {
|
||||||
const data: ProjectStatusSchema = {
|
const data: ProjectStatusSchema = {
|
||||||
averageHealth: 50,
|
averageHealth: 50,
|
||||||
|
lifecycleSummary: {
|
||||||
|
initial: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
preLive: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
live: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
completed: {
|
||||||
|
currentFlags: 0,
|
||||||
|
averageDays: null,
|
||||||
|
},
|
||||||
|
archived: {
|
||||||
|
currentFlags: 0,
|
||||||
|
last30Days: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
activityCountByDate: [
|
activityCountByDate: [
|
||||||
{ date: '2022-12-14', count: 2 },
|
{ date: '2022-12-14', count: 2 },
|
||||||
{ date: '2022-12-15', count: 5 },
|
{ date: '2022-12-15', count: 5 },
|
||||||
|
@ -28,7 +28,12 @@ export const projectStatusSchema = {
|
|||||||
$id: '#/components/schemas/projectStatusSchema',
|
$id: '#/components/schemas/projectStatusSchema',
|
||||||
type: 'object',
|
type: 'object',
|
||||||
additionalProperties: false,
|
additionalProperties: false,
|
||||||
required: ['activityCountByDate', 'resources', 'averageHealth'],
|
required: [
|
||||||
|
'activityCountByDate',
|
||||||
|
'resources',
|
||||||
|
'averageHealth',
|
||||||
|
'lifecycleSummary',
|
||||||
|
],
|
||||||
description:
|
description:
|
||||||
'Schema representing the overall status of a project, including an array of activity records. Each record in the activity array contains a date and a count, providing a snapshot of the project’s activity level over time.',
|
'Schema representing the overall status of a project, including an array of activity records. Each record in the activity array contains a date and a count, providing a snapshot of the project’s activity level over time.',
|
||||||
properties: {
|
properties: {
|
||||||
|
Loading…
Reference in New Issue
Block a user