2023-01-27 13:13:41 +01:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
|
|
|
|
export const projectStatsSchema = {
|
|
|
|
$id: '#/components/schemas/projectStatsSchema',
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: false,
|
2023-01-27 17:19:27 +01:00
|
|
|
required: [
|
|
|
|
'avgTimeToProdCurrentWindow',
|
|
|
|
'createdCurrentWindow',
|
|
|
|
'createdPastWindow',
|
|
|
|
'archivedCurrentWindow',
|
|
|
|
'archivedPastWindow',
|
|
|
|
'projectActivityCurrentWindow',
|
|
|
|
'projectActivityPastWindow',
|
|
|
|
'projectMembersAddedCurrentWindow',
|
|
|
|
],
|
2023-02-10 15:05:57 +01:00
|
|
|
description: `Statistics for a project, including the average time to production, number of features created, the project activity and more.
|
|
|
|
|
|
|
|
Stats are divided into current and previous **windows**.
|
|
|
|
- The **current window** is the past 30 days.
|
|
|
|
- The **previous window** is the 30 days **before** the current window (from 60 to 30 days ago)`,
|
2023-01-27 13:13:41 +01:00
|
|
|
properties: {
|
|
|
|
avgTimeToProdCurrentWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 10,
|
|
|
|
description:
|
|
|
|
'The average time from when a feature was created to when it was enabled in the "production" environment during the current window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
createdCurrentWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 15,
|
|
|
|
description:
|
|
|
|
'The number of feature toggles created during the current window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
createdPastWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 15,
|
|
|
|
description:
|
|
|
|
'The number of feature toggles created during the previous window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
archivedCurrentWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 5,
|
|
|
|
description:
|
|
|
|
'The number of feature toggles that were archived during the current window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
archivedPastWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 5,
|
|
|
|
description:
|
|
|
|
'The number of feature toggles that were archived during the previous window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
projectActivityCurrentWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 100,
|
|
|
|
description:
|
|
|
|
'The number of project events that occurred during the current window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
projectActivityPastWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 100,
|
|
|
|
description:
|
|
|
|
'The number of project events that occurred during the previous window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
projectMembersAddedCurrentWindow: {
|
|
|
|
type: 'number',
|
2023-02-10 15:05:57 +01:00
|
|
|
example: 1,
|
|
|
|
description:
|
|
|
|
'The number of members that were added to the project during the current window',
|
2023-01-27 13:13:41 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type ProjectStatsSchema = FromSchema<typeof projectStatsSchema>;
|