1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/src/lib/openapi/spec/project-activity-schema.ts
Jaanus Sellin c9dc5267a6
feat: project status backend structure (#8630)
Adding project status schema definition, controller, service, e2e test.

Next PR will add functionality for activity object.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-11-01 14:17:20 +02:00

31 lines
897 B
TypeScript

import type { FromSchema } from 'json-schema-to-ts';
export const projectActivitySchema = {
$id: '#/components/schemas/projectActivitySchema',
type: 'array',
description:
'An array of project activity information. Each item contains a date and the total number of activities for that date.',
items: {
type: 'object',
additionalProperties: false,
required: ['date', 'count'],
properties: {
date: {
type: 'string',
example: '2022-12-14',
description: 'Activity date',
},
count: {
type: 'integer',
minimum: 0,
description: 'Activity count',
},
},
},
components: {
schemas: {},
},
} as const;
export type ProjectActivitySchema = FromSchema<typeof projectActivitySchema>;